@salesforce/source-deploy-retrieve 7.5.10 → 7.5.13

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.
@@ -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 declare type MetadataApiRetrieveOptions = MetadataTransferOptions & RetrieveOptions & {
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 declare type RecordId = string;
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 declare type ComponentDeployment = {
14
+ export type ComponentDeployment = {
15
15
  id?: string;
16
16
  component: SourceComponent;
17
17
  status: ComponentStatus;
18
18
  diagnostics: ComponentDiagnostic[];
19
19
  };
20
- export declare type ComponentRetrieval = {
20
+ export type ComponentRetrieval = {
21
21
  component: SourceComponent;
22
22
  status?: RequestStatus;
23
23
  diagnostics?: ComponentDiagnostic;
24
24
  };
25
- export declare type ComponentDiagnostic = {
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 declare type FileResponse = FileResponseSuccess | FileResponseFailure;
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 declare type RetrieveFailure = {
71
+ export type RetrieveFailure = {
72
72
  component?: MetadataComponent;
73
73
  message: string;
74
74
  };
75
- export declare type RetrieveSuccess = {
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 declare type DeployDetails = {
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
- declare type BooleanString = 'true' | 'false' | true | false;
156
- export declare type DeployMessage = {
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 declare type RetrieveRequest = {
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 declare type RetrieveMessage = {
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 declare type FileProperties = {
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 declare type PackageOptions = string[] | PackageOption[];
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 declare type DeploySetOptions = Omit<MetadataApiDeployOptions, 'components'>;
7
- export declare type RetrieveSetOptions = Omit<MetadataApiRetrieveOptions, 'components'>;
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 declare type ManifestOption = {
2
+ export type ManifestOption = {
3
3
  manifestPath: string;
4
4
  directoryPaths: string[];
5
5
  destructiveChangesPre?: string;
6
6
  destructiveChangesPost?: string;
7
7
  };
8
- declare type MetadataOption = {
8
+ type MetadataOption = {
9
9
  metadataEntries: string[];
10
10
  directoryPaths: string[];
11
11
  };
12
- declare type OrgOption = {
12
+ type OrgOption = {
13
13
  username: string;
14
14
  exclude: string[];
15
15
  };
16
- export declare type ComponentSetOptions = {
16
+ export type ComponentSetOptions = {
17
17
  packagenames?: string[];
18
18
  sourcepath?: string[];
19
19
  manifest?: ManifestOption;
@@ -3,7 +3,7 @@ import { TreeContainer } from '../resolve';
3
3
  /**
4
4
  * File system path to a source file of a metadata component.
5
5
  */
6
- export declare type SourcePath = string;
6
+ export type SourcePath = string;
7
7
  export interface TreeOptions {
8
8
  tree: TreeContainer;
9
9
  }
@@ -11,6 +11,7 @@ const stream_1 = require("stream");
11
11
  const path_1 = require("path");
12
12
  const core_1 = require("@salesforce/core");
13
13
  const graceful_fs_1 = require("graceful-fs");
14
+ const ts_types_1 = require("@salesforce/ts-types");
14
15
  const fileSystemHandler_1 = require("../utils/fileSystemHandler");
15
16
  const collections_1 = require("../collections");
16
17
  const registry_1 = require("../registry");
@@ -98,8 +99,12 @@ class MetadataConverter {
98
99
  }
99
100
  return result;
100
101
  }
101
- catch (e) {
102
- throw new core_1.SfError(messages.getMessage('error_failed_convert', [e.message]), 'ConversionError', [], e);
102
+ catch (err) {
103
+ if (!(err instanceof Error) && !(0, ts_types_1.isString)(err)) {
104
+ throw err;
105
+ }
106
+ const error = (0, ts_types_1.isString)(err) ? new Error(err) : err;
107
+ throw new core_1.SfError(messages.getMessage('error_failed_convert', [error.message]), 'ConversionError', [], error);
103
108
  }
104
109
  }
105
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"metadataConverter.js","sourceRoot":"","sources":["../../../src/convert/metadataConverter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,mCAA+C;AAC/C,+BAAgD;AAChD,2CAAqD;AACrD,6CAAuC;AAEvC,kEAAmE;AAEnE,gDAAsE;AACtE,0CAA6C;AAC7C,uCAAoF;AAEpF,iDAA6D;AAE7D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,oCAAoC,EAAE,KAAK,EAAE;IAC1E,sBAAsB;IACtB,yCAAyC;CAC1C,CAAC,CAAC;AAEH,MAAa,iBAAiB;IAQ5B,YAAmB,QAAQ,GAAG,IAAI,yBAAc,EAAE;QAChD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CA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AAG,4BAA4B,CAAC;AACjE,kDAAgC,GAAG,2BAA2B,CAAC;AAC/D,wCAAsB,GAAG,iBAAiB,CAAC;AAoHpE,MAAM,cAAc,GAAG,CAAC,YAAyC,EAA0B,EAAE;IAC3F,IAAI,WAAuB,CAAC;IAC5B,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC;IACjF,IAAI,eAAe,EAAE;QACnB,IAAI,WAAW,EAAE;YACf,WAAW,GAAG,IAAA,WAAI,EAAC,eAAe,EAAE,WAAW,CAAC,CAAC;SAClD;aAAM,IAAI,YAAY,EAAE;YACvB,WAAW,GAAG,IAAA,WAAI,EAAC,eAAe,EAAE,GAAG,iBAAiB,CAAC,sBAAsB,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;SAClG;aAAM;YACL,WAAW,GAAG,IAAA,gBAAS,EAAC,eAAe,CAAC,CAAC;SAC1C;QAED,IAAI,IAAI,KAAK,KAAK,EAAE;YAClB,WAAW,IAAI,MAAM,CAAC;YACtB,IAAA,yCAAqB,EAAC,IAAA,cAAO,EAAC,WAAW,CAAC,CAAC,CAAC;SAC7C;aAAM;YACL,IAAA,yCAAqB,EAAC,WAAW,CAAC,CAAC;SACpC;KACF;IACD,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,sBAA8C,EAAU,EAAE;IACxF,IAAI,sBAAsB,KAAK,oCAAsB,CAAC,IAAI,EAAE;QAC1D,OAAO,iBAAiB,CAAC,iCAAiC,CAAC;KAC5D;SAAM,IAAI,sBAAsB,KAAK,oCAAsB,CAAC,GAAG,EAAE;QAChE,OAAO,iBAAiB,CAAC,gCAAgC,CAAC;KAC3D;AACH,CAAC,CAAC"}
@@ -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 declare type WriteInfo = {
6
+ export type WriteInfo = {
7
7
  output: SourcePath;
8
8
  source: Readable;
9
9
  };
10
- export declare type WriterFormat = {
10
+ export type WriterFormat = {
11
11
  component: MetadataComponent;
12
12
  writeInfos: WriteInfo[];
13
13
  };
14
- declare type PackageName = {
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
- declare type UniqueOutputDir = {
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 declare type DirectoryConfig = PackageName & UniqueOutputDir & {
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 declare type ZipConfig = PackageName & UniqueOutputDir & {
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 declare type MergeConfig = {
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 declare type SfdxFileFormat = 'metadata' | 'source';
68
- export declare type ConvertOutputConfig = DirectoryConfig | ZipConfig | MergeConfig;
69
- export declare type ConvertResult = {
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 declare type MarkedReplacement = {
84
+ export type MarkedReplacement = {
85
85
  toReplace: RegExp;
86
86
  replaceWith: string;
87
87
  matchedFilename: string;
88
88
  singleFile?: boolean;
89
89
  };
90
- export declare type ReplacementConfig = ReplacementLocation & ReplacementSource & ReplacementTarget & {
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
- declare type ReplacementLocation = {
99
+ type ReplacementLocation = {
100
100
  filename: string;
101
101
  glob?: never;
102
102
  } | {
103
103
  filename?: never;
104
104
  glob: string;
105
105
  };
106
- declare type ReplacementSource = {
106
+ type ReplacementSource = {
107
107
  replaceWithEnv: string;
108
108
  replaceWithFile?: never;
109
109
  } | {
110
110
  replaceWithEnv?: never;
111
111
  replaceWithFile: string;
112
112
  };
113
- declare type ReplacementTarget = {
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 declare type ReplacementEvent = {
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 declare type ComponentProperties = {
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 declare type ComponentLike = MetadataComponent | MetadataMember;
14
+ export type ComponentLike = MetadataComponent | MetadataMember;
15
15
  /**
16
16
  * Properties of a metadata xml's file name
17
17
  */
18
- export declare type MetadataXml = {
18
+ export type MetadataXml = {
19
19
  fullName: string;
20
20
  suffix: string;
21
21
  path: SourcePath;
22
22
  };
23
- export declare type VirtualFile = {
23
+ export type VirtualFile = {
24
24
  name: string;
25
25
  data?: Buffer;
26
26
  };
27
- export declare type VirtualDirectory = {
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.10",
3
+ "version": "7.5.13",
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.41.0",
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.8.4"
80
+ "typescript": "^4.9.3"
81
81
  },
82
82
  "scripts": {
83
83
  "build": "sf-build",