@salesforce/source-deploy-retrieve 7.5.10 → 7.5.12
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/src/client/metadataApiRetrieve.d.ts +1 -1
- package/lib/src/client/types.d.ts +14 -14
- package/lib/src/collections/componentSet.d.ts +2 -2
- package/lib/src/collections/componentSetBuilder.d.ts +4 -4
- package/lib/src/common/types.d.ts +1 -1
- package/lib/src/convert/types.d.ts +16 -16
- package/lib/src/registry/metadataRegistry.json +7 -0
- package/lib/src/registry/registry.d.ts +7 -0
- package/lib/src/registry/types.d.ts +6 -0
- package/lib/src/resolve/sourceComponent.d.ts +1 -1
- package/lib/src/resolve/types.d.ts +4 -4
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ import { ComponentSet } from '../collections';
|
|
|
2
2
|
import { RegistryAccess } from '../registry';
|
|
3
3
|
import { MetadataTransfer, MetadataTransferOptions } from './metadataTransfer';
|
|
4
4
|
import { AsyncResult, FileResponse, MetadataApiRetrieveStatus, MetadataTransferResult, RetrieveOptions } from './types';
|
|
5
|
-
export
|
|
5
|
+
export type MetadataApiRetrieveOptions = MetadataTransferOptions & RetrieveOptions & {
|
|
6
6
|
registry?: RegistryAccess;
|
|
7
7
|
};
|
|
8
8
|
export declare class RetrieveResult implements MetadataTransferResult {
|
|
@@ -3,7 +3,7 @@ import { PackageTypeMembers } from '../collections/types';
|
|
|
3
3
|
import { SourcePath } from '../common/types';
|
|
4
4
|
import { MetadataComponent, SourceComponent } from '../resolve';
|
|
5
5
|
import { SfdxFileFormat } from '../convert';
|
|
6
|
-
export
|
|
6
|
+
export type RecordId = string;
|
|
7
7
|
export declare enum ComponentStatus {
|
|
8
8
|
Created = "Created",
|
|
9
9
|
Changed = "Changed",
|
|
@@ -11,18 +11,18 @@ export declare enum ComponentStatus {
|
|
|
11
11
|
Deleted = "Deleted",
|
|
12
12
|
Failed = "Failed"
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type ComponentDeployment = {
|
|
15
15
|
id?: string;
|
|
16
16
|
component: SourceComponent;
|
|
17
17
|
status: ComponentStatus;
|
|
18
18
|
diagnostics: ComponentDiagnostic[];
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type ComponentRetrieval = {
|
|
21
21
|
component: SourceComponent;
|
|
22
22
|
status?: RequestStatus;
|
|
23
23
|
diagnostics?: ComponentDiagnostic;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type ComponentDiagnostic = {
|
|
26
26
|
lineNumber?: number;
|
|
27
27
|
columnNumber?: number;
|
|
28
28
|
filePath?: SourcePath;
|
|
@@ -44,7 +44,7 @@ interface FileResponseFailure extends FileResponseBase {
|
|
|
44
44
|
error: string;
|
|
45
45
|
problemType: 'Warning' | 'Error';
|
|
46
46
|
}
|
|
47
|
-
export
|
|
47
|
+
export type FileResponse = FileResponseSuccess | FileResponseFailure;
|
|
48
48
|
export interface MetadataTransferResult {
|
|
49
49
|
response: MetadataRequestStatus;
|
|
50
50
|
components: ComponentSet;
|
|
@@ -68,11 +68,11 @@ export interface MetadataRequestStatus {
|
|
|
68
68
|
success: boolean;
|
|
69
69
|
done: boolean;
|
|
70
70
|
}
|
|
71
|
-
export
|
|
71
|
+
export type RetrieveFailure = {
|
|
72
72
|
component?: MetadataComponent;
|
|
73
73
|
message: string;
|
|
74
74
|
};
|
|
75
|
-
export
|
|
75
|
+
export type RetrieveSuccess = {
|
|
76
76
|
component: SourceComponent;
|
|
77
77
|
properties?: FileProperties;
|
|
78
78
|
};
|
|
@@ -103,7 +103,7 @@ export interface MetadataApiDeployStatus extends MetadataRequestStatus {
|
|
|
103
103
|
startDate?: string;
|
|
104
104
|
stateDetail?: string;
|
|
105
105
|
}
|
|
106
|
-
export
|
|
106
|
+
export type DeployDetails = {
|
|
107
107
|
componentFailures?: DeployMessage | DeployMessage[];
|
|
108
108
|
componentSuccesses?: DeployMessage | DeployMessage[];
|
|
109
109
|
runTestResult?: RunTestResult;
|
|
@@ -152,8 +152,8 @@ export interface Successes {
|
|
|
152
152
|
name: string;
|
|
153
153
|
time: string;
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
export
|
|
155
|
+
type BooleanString = 'true' | 'false' | true | false;
|
|
156
|
+
export type DeployMessage = {
|
|
157
157
|
changed: BooleanString;
|
|
158
158
|
columnNumber?: string;
|
|
159
159
|
componentType?: string;
|
|
@@ -168,7 +168,7 @@ export declare type DeployMessage = {
|
|
|
168
168
|
problemType?: 'Warning' | 'Error';
|
|
169
169
|
success: BooleanString;
|
|
170
170
|
};
|
|
171
|
-
export
|
|
171
|
+
export type RetrieveRequest = {
|
|
172
172
|
apiVersion: string;
|
|
173
173
|
packageNames?: string[];
|
|
174
174
|
singlePackage?: boolean;
|
|
@@ -177,7 +177,7 @@ export declare type RetrieveRequest = {
|
|
|
177
177
|
types: PackageTypeMembers[];
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
|
-
export
|
|
180
|
+
export type RetrieveMessage = {
|
|
181
181
|
fileName: string;
|
|
182
182
|
problem: string;
|
|
183
183
|
};
|
|
@@ -191,7 +191,7 @@ declare enum ManageableState {
|
|
|
191
191
|
Released = "released",
|
|
192
192
|
Unmanaged = "unmanaged"
|
|
193
193
|
}
|
|
194
|
-
export
|
|
194
|
+
export type FileProperties = {
|
|
195
195
|
createdById: string;
|
|
196
196
|
createdByName: string;
|
|
197
197
|
createdDate: string;
|
|
@@ -230,7 +230,7 @@ export interface PackageOption {
|
|
|
230
230
|
*/
|
|
231
231
|
outputDir?: SourcePath;
|
|
232
232
|
}
|
|
233
|
-
export
|
|
233
|
+
export type PackageOptions = string[] | PackageOption[];
|
|
234
234
|
export interface RetrieveExtractOptions {
|
|
235
235
|
/**
|
|
236
236
|
* Top most directory within the retrieved zip file.
|
|
@@ -3,8 +3,8 @@ import { ComponentLike, MetadataComponent, MetadataMember, SourceComponent } fro
|
|
|
3
3
|
import { RegistryAccess } from '../registry';
|
|
4
4
|
import { DestructiveChangesType, FromManifestOptions, FromSourceOptions, FromConnectionOptions, PackageManifestObject } from './types';
|
|
5
5
|
import { LazyCollection } from './lazyCollection';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type DeploySetOptions = Omit<MetadataApiDeployOptions, 'components'>;
|
|
7
|
+
export type RetrieveSetOptions = Omit<MetadataApiRetrieveOptions, 'components'>;
|
|
8
8
|
/**
|
|
9
9
|
* A collection containing no duplicate metadata members (`fullName` and `type` pairs). `ComponentSets`
|
|
10
10
|
* are a convenient way of constructing a unique collection of components to perform operations such as
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ComponentSet } from '../collections';
|
|
2
|
-
export
|
|
2
|
+
export type ManifestOption = {
|
|
3
3
|
manifestPath: string;
|
|
4
4
|
directoryPaths: string[];
|
|
5
5
|
destructiveChangesPre?: string;
|
|
6
6
|
destructiveChangesPost?: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type MetadataOption = {
|
|
9
9
|
metadataEntries: string[];
|
|
10
10
|
directoryPaths: string[];
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type OrgOption = {
|
|
13
13
|
username: string;
|
|
14
14
|
exclude: string[];
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type ComponentSetOptions = {
|
|
17
17
|
packagenames?: string[];
|
|
18
18
|
sourcepath?: string[];
|
|
19
19
|
manifest?: ManifestOption;
|
|
@@ -3,41 +3,41 @@
|
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
import { SourcePath } from '../common/types';
|
|
5
5
|
import { MetadataComponent, SourceComponent } from '../resolve';
|
|
6
|
-
export
|
|
6
|
+
export type WriteInfo = {
|
|
7
7
|
output: SourcePath;
|
|
8
8
|
source: Readable;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type WriterFormat = {
|
|
11
11
|
component: MetadataComponent;
|
|
12
12
|
writeInfos: WriteInfo[];
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type PackageName = {
|
|
15
15
|
/**
|
|
16
16
|
* Optional name to give to the package, otherwise one is generated.
|
|
17
17
|
*/
|
|
18
18
|
packageName?: string;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
type UniqueOutputDir = {
|
|
21
21
|
/**
|
|
22
22
|
* Whether to generate a unique directory within the outputDirectory. Default is true.
|
|
23
23
|
*/
|
|
24
24
|
genUniqueDir?: boolean;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type DirectoryConfig = PackageName & UniqueOutputDir & {
|
|
27
27
|
type: 'directory';
|
|
28
28
|
/**
|
|
29
29
|
* Directory path to output the converted package to.
|
|
30
30
|
*/
|
|
31
31
|
outputDirectory: SourcePath;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type ZipConfig = PackageName & UniqueOutputDir & {
|
|
34
34
|
type: 'zip';
|
|
35
35
|
/**
|
|
36
36
|
* Directory path to output the zip package to.
|
|
37
37
|
*/
|
|
38
38
|
outputDirectory?: SourcePath;
|
|
39
39
|
};
|
|
40
|
-
export
|
|
40
|
+
export type MergeConfig = {
|
|
41
41
|
type: 'merge';
|
|
42
42
|
/**
|
|
43
43
|
* Existing components to merge and replace the converted components with.
|
|
@@ -64,9 +64,9 @@ export interface MetadataTransformer {
|
|
|
64
64
|
*
|
|
65
65
|
* `source` - Friendly for local editing and committing files to source control.
|
|
66
66
|
*/
|
|
67
|
-
export
|
|
68
|
-
export
|
|
69
|
-
export
|
|
67
|
+
export type SfdxFileFormat = 'metadata' | 'source';
|
|
68
|
+
export type ConvertOutputConfig = DirectoryConfig | ZipConfig | MergeConfig;
|
|
69
|
+
export type ConvertResult = {
|
|
70
70
|
/**
|
|
71
71
|
* Location of converted package. `Undefined` if `outputDirectory` is omitted from output config.
|
|
72
72
|
*/
|
|
@@ -81,13 +81,13 @@ export declare type ConvertResult = {
|
|
|
81
81
|
converted?: SourceComponent[];
|
|
82
82
|
};
|
|
83
83
|
/** Stored by file on SourceComponent for stream processing */
|
|
84
|
-
export
|
|
84
|
+
export type MarkedReplacement = {
|
|
85
85
|
toReplace: RegExp;
|
|
86
86
|
replaceWith: string;
|
|
87
87
|
matchedFilename: string;
|
|
88
88
|
singleFile?: boolean;
|
|
89
89
|
};
|
|
90
|
-
export
|
|
90
|
+
export type ReplacementConfig = ReplacementLocation & ReplacementSource & ReplacementTarget & {
|
|
91
91
|
/** Only do the replacement if ALL of the environment values in this array match */
|
|
92
92
|
replaceWhenEnv?: [
|
|
93
93
|
{
|
|
@@ -96,21 +96,21 @@ export declare type ReplacementConfig = ReplacementLocation & ReplacementSource
|
|
|
96
96
|
}
|
|
97
97
|
];
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
type ReplacementLocation = {
|
|
100
100
|
filename: string;
|
|
101
101
|
glob?: never;
|
|
102
102
|
} | {
|
|
103
103
|
filename?: never;
|
|
104
104
|
glob: string;
|
|
105
105
|
};
|
|
106
|
-
|
|
106
|
+
type ReplacementSource = {
|
|
107
107
|
replaceWithEnv: string;
|
|
108
108
|
replaceWithFile?: never;
|
|
109
109
|
} | {
|
|
110
110
|
replaceWithEnv?: never;
|
|
111
111
|
replaceWithFile: string;
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
type ReplacementTarget = {
|
|
114
114
|
stringToReplace: string;
|
|
115
115
|
regexToReplace?: never;
|
|
116
116
|
} | {
|
|
@@ -118,7 +118,7 @@ declare type ReplacementTarget = {
|
|
|
118
118
|
/** When putting regex into json, you have to use an extra backslash to escape your regex backslashes because JSON also treats backslash as an escape character */
|
|
119
119
|
regexToReplace: string;
|
|
120
120
|
};
|
|
121
|
-
export
|
|
121
|
+
export type ReplacementEvent = {
|
|
122
122
|
filename: string;
|
|
123
123
|
replaced: string;
|
|
124
124
|
};
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
"directoryName": "staticresources",
|
|
113
113
|
"inFolder": false,
|
|
114
114
|
"strictDirectoryName": true,
|
|
115
|
+
"supportsPartialDelete": true,
|
|
115
116
|
"strategies": {
|
|
116
117
|
"adapter": "mixedContent",
|
|
117
118
|
"transformer": "staticResource"
|
|
@@ -134,6 +135,7 @@
|
|
|
134
135
|
"directoryName": "experiences",
|
|
135
136
|
"inFolder": false,
|
|
136
137
|
"strictDirectoryName": true,
|
|
138
|
+
"supportsPartialDelete": true,
|
|
137
139
|
"strategies": {
|
|
138
140
|
"adapter": "mixedContent"
|
|
139
141
|
}
|
|
@@ -163,6 +165,7 @@
|
|
|
163
165
|
"directoryName": "aura",
|
|
164
166
|
"inFolder": false,
|
|
165
167
|
"strictDirectoryName": true,
|
|
168
|
+
"supportsPartialDelete": true,
|
|
166
169
|
"strategies": {
|
|
167
170
|
"adapter": "bundle"
|
|
168
171
|
}
|
|
@@ -173,6 +176,7 @@
|
|
|
173
176
|
"directoryName": "lwc",
|
|
174
177
|
"inFolder": false,
|
|
175
178
|
"strictDirectoryName": true,
|
|
179
|
+
"supportsPartialDelete": true,
|
|
176
180
|
"strategies": {
|
|
177
181
|
"adapter": "bundle"
|
|
178
182
|
}
|
|
@@ -1123,6 +1127,7 @@
|
|
|
1123
1127
|
"directoryName": "waveTemplates",
|
|
1124
1128
|
"inFolder": false,
|
|
1125
1129
|
"strictDirectoryName": true,
|
|
1130
|
+
"supportsPartialDelete": true,
|
|
1126
1131
|
"strategies": {
|
|
1127
1132
|
"adapter": "bundle"
|
|
1128
1133
|
}
|
|
@@ -3149,6 +3154,7 @@
|
|
|
3149
3154
|
"directoryName": "digitalExperiences",
|
|
3150
3155
|
"inFolder": false,
|
|
3151
3156
|
"supportsWildcardAndName": true,
|
|
3157
|
+
"supportsPartialDelete": true,
|
|
3152
3158
|
"suffix": "digitalExperience",
|
|
3153
3159
|
"children": {
|
|
3154
3160
|
"types": {
|
|
@@ -3157,6 +3163,7 @@
|
|
|
3157
3163
|
"name": "DigitalExperience",
|
|
3158
3164
|
"directoryName": "digitalExperiences",
|
|
3159
3165
|
"suffix": "digitalExperience",
|
|
3166
|
+
"supportsPartialDelete": true,
|
|
3160
3167
|
"strategies": {
|
|
3161
3168
|
"adapter": "digitalExperience"
|
|
3162
3169
|
}
|
|
@@ -115,6 +115,7 @@ export declare const registry: Readonly<{
|
|
|
115
115
|
directoryName: string;
|
|
116
116
|
inFolder: boolean;
|
|
117
117
|
strictDirectoryName: boolean;
|
|
118
|
+
supportsPartialDelete: boolean;
|
|
118
119
|
strategies: {
|
|
119
120
|
adapter: string;
|
|
120
121
|
transformer: string;
|
|
@@ -137,6 +138,7 @@ export declare const registry: Readonly<{
|
|
|
137
138
|
directoryName: string;
|
|
138
139
|
inFolder: boolean;
|
|
139
140
|
strictDirectoryName: boolean;
|
|
141
|
+
supportsPartialDelete: boolean;
|
|
140
142
|
strategies: {
|
|
141
143
|
adapter: string;
|
|
142
144
|
};
|
|
@@ -166,6 +168,7 @@ export declare const registry: Readonly<{
|
|
|
166
168
|
directoryName: string;
|
|
167
169
|
inFolder: boolean;
|
|
168
170
|
strictDirectoryName: boolean;
|
|
171
|
+
supportsPartialDelete: boolean;
|
|
169
172
|
strategies: {
|
|
170
173
|
adapter: string;
|
|
171
174
|
};
|
|
@@ -176,6 +179,7 @@ export declare const registry: Readonly<{
|
|
|
176
179
|
directoryName: string;
|
|
177
180
|
inFolder: boolean;
|
|
178
181
|
strictDirectoryName: boolean;
|
|
182
|
+
supportsPartialDelete: boolean;
|
|
179
183
|
strategies: {
|
|
180
184
|
adapter: string;
|
|
181
185
|
};
|
|
@@ -1126,6 +1130,7 @@ export declare const registry: Readonly<{
|
|
|
1126
1130
|
directoryName: string;
|
|
1127
1131
|
inFolder: boolean;
|
|
1128
1132
|
strictDirectoryName: boolean;
|
|
1133
|
+
supportsPartialDelete: boolean;
|
|
1129
1134
|
strategies: {
|
|
1130
1135
|
adapter: string;
|
|
1131
1136
|
};
|
|
@@ -3152,6 +3157,7 @@ export declare const registry: Readonly<{
|
|
|
3152
3157
|
directoryName: string;
|
|
3153
3158
|
inFolder: boolean;
|
|
3154
3159
|
supportsWildcardAndName: boolean;
|
|
3160
|
+
supportsPartialDelete: boolean;
|
|
3155
3161
|
suffix: string;
|
|
3156
3162
|
children: {
|
|
3157
3163
|
types: {
|
|
@@ -3160,6 +3166,7 @@ export declare const registry: Readonly<{
|
|
|
3160
3166
|
name: string;
|
|
3161
3167
|
directoryName: string;
|
|
3162
3168
|
suffix: string;
|
|
3169
|
+
supportsPartialDelete: boolean;
|
|
3163
3170
|
strategies: {
|
|
3164
3171
|
adapter: string;
|
|
3165
3172
|
};
|
|
@@ -96,6 +96,12 @@ export interface MetadataType {
|
|
|
96
96
|
```
|
|
97
97
|
*/
|
|
98
98
|
supportsWildcardAndName?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Whether the component can be partially deleted, such as metadata types that are made up of multiple files.
|
|
101
|
+
*
|
|
102
|
+
* __Examples:__ `LightningComponentBundle`, `ExperienceBundle`, `StaticResource`, and `DigitalExperienceBundle`
|
|
103
|
+
*/
|
|
104
|
+
supportsPartialDelete?: boolean;
|
|
99
105
|
/**
|
|
100
106
|
* Whenever this type is requested, return the aliasFor type instead
|
|
101
107
|
*/
|
|
@@ -6,7 +6,7 @@ import { MarkedReplacement } from '../convert/types';
|
|
|
6
6
|
import { MetadataComponent, VirtualDirectory } from './types';
|
|
7
7
|
import { TreeContainer } from './treeContainers';
|
|
8
8
|
import { ForceIgnore } from './forceIgnore';
|
|
9
|
-
export
|
|
9
|
+
export type ComponentProperties = {
|
|
10
10
|
name: string;
|
|
11
11
|
type: MetadataType;
|
|
12
12
|
xml?: string;
|
|
@@ -11,20 +11,20 @@ export interface MetadataMember {
|
|
|
11
11
|
fullName: string;
|
|
12
12
|
type: string;
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type ComponentLike = MetadataComponent | MetadataMember;
|
|
15
15
|
/**
|
|
16
16
|
* Properties of a metadata xml's file name
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type MetadataXml = {
|
|
19
19
|
fullName: string;
|
|
20
20
|
suffix: string;
|
|
21
21
|
path: SourcePath;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type VirtualFile = {
|
|
24
24
|
name: string;
|
|
25
25
|
data?: Buffer;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type VirtualDirectory = {
|
|
28
28
|
dirPath: SourcePath;
|
|
29
29
|
children: Array<VirtualFile | string>;
|
|
30
30
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/source-deploy-retrieve",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.12",
|
|
4
4
|
"description": "JavaScript library to run Salesforce metadata deploys and retrieves",
|
|
5
5
|
"main": "lib/src/index.js",
|
|
6
6
|
"author": "Salesforce",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/shelljs": "^0.8.11",
|
|
54
54
|
"@types/unzipper": "^0.10.5",
|
|
55
55
|
"@typescript-eslint/eslint-plugin": "^5.42.0",
|
|
56
|
-
"@typescript-eslint/parser": "^5.
|
|
56
|
+
"@typescript-eslint/parser": "^5.43.0",
|
|
57
57
|
"chai": "^4.3.7",
|
|
58
58
|
"commitizen": "^3.1.2",
|
|
59
59
|
"deep-equal-in-any-order": "^1.1.19",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"shx": "^0.3.4",
|
|
78
78
|
"sinon": "10.0.0",
|
|
79
79
|
"ts-node": "^10.9.1",
|
|
80
|
-
"typescript": "^4.
|
|
80
|
+
"typescript": "^4.9.3"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"build": "sf-build",
|