@salesforce/packaging 4.12.0 → 4.13.1
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/exported.d.ts +3 -0
- package/lib/exported.js +16 -4
- package/lib/interfaces/bundleInterfacesAndType.d.ts +33 -0
- package/lib/interfaces/bundleInterfacesAndType.js +18 -0
- package/lib/interfaces/bundleSObjects.d.ts +146 -0
- package/lib/interfaces/bundleSObjects.js +19 -0
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/interfaces/index.js +15 -4
- package/lib/interfaces/packagingInterfacesAndType.js +13 -4
- package/lib/package/index.d.ts +3 -0
- package/lib/package/index.js +16 -4
- package/lib/package/packageAncestry.js +13 -4
- package/lib/package/packageBundle.d.ts +37 -0
- package/lib/package/packageBundle.js +85 -0
- package/lib/package/packageBundleCreate.d.ts +7 -0
- package/lib/package/packageBundleCreate.js +53 -0
- package/lib/package/packageBundleInstall.d.ts +9 -0
- package/lib/package/packageBundleInstall.js +132 -0
- package/lib/package/packageBundleVersion.d.ts +21 -0
- package/lib/package/packageBundleVersion.js +225 -0
- package/lib/package/packageBundleVersionCreate.d.ts +11 -0
- package/lib/package/packageBundleVersionCreate.js +248 -0
- package/lib/package/packageConvert.js +13 -4
- package/lib/package/packageCreate.js +13 -4
- package/lib/package/packageDelete.js +13 -4
- package/lib/package/packageInstall.js +13 -4
- package/lib/package/packageProfileApi.js +13 -4
- package/lib/package/packagePushUpgrade.js +13 -4
- package/lib/package/packageUninstall.js +13 -4
- package/lib/package/packageVersion.js +13 -4
- package/lib/package/packageVersionCreate.js +13 -4
- package/lib/package/packageVersionCreateRequest.js +13 -4
- package/lib/package/packageVersionCreateRequestReport.js +13 -4
- package/lib/package/packageVersionDependency.js +13 -4
- package/lib/package/packageVersionList.js +13 -4
- package/lib/package/packageVersionReport.js +13 -4
- package/lib/package/packageVersionRetrieve.js +13 -4
- package/lib/package/subscriberPackageVersion.js +13 -4
- package/lib/package/versionNumber.js +13 -4
- package/lib/package1/index.js +13 -4
- package/lib/package1/package1Version.js +13 -4
- package/lib/utils/bundleUtils.d.ts +1 -0
- package/lib/utils/bundleUtils.js +28 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +16 -5
- package/lib/utils/packageUtils.js +13 -4
- package/messages/bundle_create.md +3 -0
- package/messages/bundle_install.md +11 -0
- package/messages/bundle_utils.md +7 -0
- package/messages/bundle_version.md +3 -0
- package/messages/bundle_version_create.md +47 -0
- package/package.json +8 -7
- package/LICENSE +0 -25
package/lib/exported.d.ts
CHANGED
package/lib/exported.js
CHANGED
|
@@ -15,13 +15,25 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/*
|
|
18
|
-
* Copyright
|
|
19
|
-
*
|
|
20
|
-
* Licensed under the
|
|
21
|
-
*
|
|
18
|
+
* Copyright 2025, Salesforce, Inc.
|
|
19
|
+
*
|
|
20
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License.
|
|
22
|
+
* You may obtain a copy of the License at
|
|
23
|
+
*
|
|
24
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
*
|
|
26
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
27
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
28
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
+
* See the License for the specific language governing permissions and
|
|
30
|
+
* limitations under the License.
|
|
22
31
|
*/
|
|
23
32
|
__exportStar(require("./interfaces"), exports);
|
|
24
33
|
__exportStar(require("./package"), exports);
|
|
25
34
|
__exportStar(require("./package1"), exports);
|
|
26
35
|
__exportStar(require("./utils"), exports);
|
|
36
|
+
__exportStar(require("./package/packageBundle"), exports);
|
|
37
|
+
__exportStar(require("./package/packageBundleVersionCreate"), exports);
|
|
38
|
+
__exportStar(require("./package/packageBundleInstall"), exports);
|
|
27
39
|
//# sourceMappingURL=exported.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Nullable } from '@salesforce/ts-types';
|
|
2
|
+
import { Connection, SfProject } from '@salesforce/core';
|
|
3
|
+
import { Duration } from '@salesforce/kit';
|
|
4
|
+
import { SaveResult } from '@jsforce/jsforce-node';
|
|
5
|
+
export type BundleCreateOptions = {
|
|
6
|
+
BundleName: string;
|
|
7
|
+
Description: string;
|
|
8
|
+
};
|
|
9
|
+
export type BundleVersionCreateOptions = {
|
|
10
|
+
connection: Connection;
|
|
11
|
+
project: SfProject;
|
|
12
|
+
PackageBundle: string;
|
|
13
|
+
MajorVersion: string;
|
|
14
|
+
MinorVersion: string;
|
|
15
|
+
Ancestor: Nullable<string>;
|
|
16
|
+
BundleVersionComponentsPath: string;
|
|
17
|
+
Description?: string;
|
|
18
|
+
polling?: {
|
|
19
|
+
timeout: Duration;
|
|
20
|
+
frequency: Duration;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export type BundleInstallOptions = {
|
|
24
|
+
connection: Connection;
|
|
25
|
+
project: SfProject;
|
|
26
|
+
PackageBundleVersion: string;
|
|
27
|
+
DevelopmentOrganization: string;
|
|
28
|
+
polling?: {
|
|
29
|
+
timeout: Duration;
|
|
30
|
+
frequency: Duration;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type BundleSaveResult = SaveResult;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025, Salesforce, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
//# sourceMappingURL=bundleInterfacesAndType.js.map
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { Nullable } from '@salesforce/ts-types';
|
|
2
|
+
import { BundleEntry } from '@salesforce/schemas';
|
|
3
|
+
import type { Schema } from '@jsforce/jsforce-node';
|
|
4
|
+
export { BundleEntry };
|
|
5
|
+
export type QueryRecord = Schema & {
|
|
6
|
+
Id: string;
|
|
7
|
+
PackageBundle?: {
|
|
8
|
+
Id: string;
|
|
9
|
+
BundleName: string;
|
|
10
|
+
Description?: string;
|
|
11
|
+
IsDeleted: boolean;
|
|
12
|
+
CreatedDate: string;
|
|
13
|
+
CreatedById: string;
|
|
14
|
+
LastModifiedDate: string;
|
|
15
|
+
LastModifiedById: string;
|
|
16
|
+
SystemModstamp: string;
|
|
17
|
+
};
|
|
18
|
+
VersionName: string;
|
|
19
|
+
MajorVersion: string;
|
|
20
|
+
MinorVersion: string;
|
|
21
|
+
IsReleased: boolean;
|
|
22
|
+
Ancestor?: {
|
|
23
|
+
Id: string;
|
|
24
|
+
PackageBundle?: {
|
|
25
|
+
Id: string;
|
|
26
|
+
BundleName: string;
|
|
27
|
+
Description?: string;
|
|
28
|
+
IsDeleted: boolean;
|
|
29
|
+
CreatedDate: string;
|
|
30
|
+
CreatedById: string;
|
|
31
|
+
LastModifiedDate: string;
|
|
32
|
+
LastModifiedById: string;
|
|
33
|
+
SystemModstamp: string;
|
|
34
|
+
};
|
|
35
|
+
VersionName: string;
|
|
36
|
+
MajorVersion: string;
|
|
37
|
+
MinorVersion: string;
|
|
38
|
+
IsReleased: boolean;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export type AncestorRecord = {
|
|
42
|
+
Id: string;
|
|
43
|
+
PackageBundle?: {
|
|
44
|
+
Id: string;
|
|
45
|
+
BundleName: string;
|
|
46
|
+
Description?: string;
|
|
47
|
+
IsDeleted: boolean;
|
|
48
|
+
CreatedDate: string;
|
|
49
|
+
CreatedById: string;
|
|
50
|
+
LastModifiedDate: string;
|
|
51
|
+
LastModifiedById: string;
|
|
52
|
+
SystemModstamp: string;
|
|
53
|
+
};
|
|
54
|
+
VersionName: string;
|
|
55
|
+
MajorVersion: string;
|
|
56
|
+
MinorVersion: string;
|
|
57
|
+
IsReleased: boolean;
|
|
58
|
+
};
|
|
59
|
+
export declare namespace BundleSObjects {
|
|
60
|
+
type Bundle = {
|
|
61
|
+
BundleName: string;
|
|
62
|
+
Description?: string;
|
|
63
|
+
Id: string;
|
|
64
|
+
IsDeleted: boolean;
|
|
65
|
+
CreatedDate: string;
|
|
66
|
+
CreatedById: string;
|
|
67
|
+
LastModifiedDate: string;
|
|
68
|
+
LastModifiedById: string;
|
|
69
|
+
SystemModstamp: string;
|
|
70
|
+
};
|
|
71
|
+
type BundleVersion = {
|
|
72
|
+
Id: string;
|
|
73
|
+
PackageBundle: Bundle;
|
|
74
|
+
VersionName: string;
|
|
75
|
+
MajorVersion: string;
|
|
76
|
+
MinorVersion: string;
|
|
77
|
+
Ancestor: Nullable<BundleVersion>;
|
|
78
|
+
IsReleased: boolean;
|
|
79
|
+
CreatedDate: string;
|
|
80
|
+
CreatedById: string;
|
|
81
|
+
LastModifiedDate: string;
|
|
82
|
+
LastModifiedById: string;
|
|
83
|
+
};
|
|
84
|
+
type PkgBundleVersionCreateReq = {
|
|
85
|
+
PackageBundleId: string;
|
|
86
|
+
VersionName: string;
|
|
87
|
+
MajorVersion: string;
|
|
88
|
+
MinorVersion: string;
|
|
89
|
+
BundleVersionComponents: string;
|
|
90
|
+
Ancestor?: string | null;
|
|
91
|
+
};
|
|
92
|
+
type PackageBundleVersionCreateRequestResult = PkgBundleVersionCreateReq & {
|
|
93
|
+
Id: string;
|
|
94
|
+
PackageBundleVersionId: string;
|
|
95
|
+
RequestStatus: PkgBundleVersionCreateReqStatus;
|
|
96
|
+
CreatedDate: string;
|
|
97
|
+
CreatedById: string;
|
|
98
|
+
Error?: string[];
|
|
99
|
+
};
|
|
100
|
+
enum PkgBundleVersionCreateReqStatus {
|
|
101
|
+
queued = "Queued",
|
|
102
|
+
success = "Success",
|
|
103
|
+
error = "Error"
|
|
104
|
+
}
|
|
105
|
+
enum PkgBundleVersionInstallReqStatus {
|
|
106
|
+
queued = "Queued",
|
|
107
|
+
success = "Success",
|
|
108
|
+
error = "Error"
|
|
109
|
+
}
|
|
110
|
+
type PkgBundleVersionQueryRecord = {
|
|
111
|
+
Id: string;
|
|
112
|
+
RequestStatus: BundleSObjects.PkgBundleVersionCreateReqStatus;
|
|
113
|
+
PackageBundle: Bundle;
|
|
114
|
+
PackageBundleVersion: BundleVersion;
|
|
115
|
+
VersionName: string;
|
|
116
|
+
MajorVersion: string;
|
|
117
|
+
MinorVersion: string;
|
|
118
|
+
Ancestor: BundleVersion;
|
|
119
|
+
BundleVersionComponents: string;
|
|
120
|
+
CreatedDate: string;
|
|
121
|
+
CreatedById: string;
|
|
122
|
+
Error?: string[];
|
|
123
|
+
} & Schema;
|
|
124
|
+
type PkgBundleVersionInstallReq = {
|
|
125
|
+
PackageBundleVersionID: string;
|
|
126
|
+
DevelopmentOrganization: string;
|
|
127
|
+
};
|
|
128
|
+
type PkgBundleVersionInstallReqResult = PkgBundleVersionInstallReq & {
|
|
129
|
+
Id: string;
|
|
130
|
+
InstallStatus: PkgBundleVersionInstallReqStatus;
|
|
131
|
+
ValidationError: string;
|
|
132
|
+
CreatedDate: string;
|
|
133
|
+
CreatedById: string;
|
|
134
|
+
Error?: string[];
|
|
135
|
+
};
|
|
136
|
+
type PkgBundleVersionInstallQueryRecord = {
|
|
137
|
+
Id: string;
|
|
138
|
+
InstallStatus: BundleSObjects.PkgBundleVersionInstallReqStatus;
|
|
139
|
+
PackageBundleVersionID: string;
|
|
140
|
+
DevelopmentOrganization: string;
|
|
141
|
+
ValidationError: string;
|
|
142
|
+
CreatedDate: string;
|
|
143
|
+
CreatedById: string;
|
|
144
|
+
Error?: string[];
|
|
145
|
+
} & Schema;
|
|
146
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BundleSObjects = void 0;
|
|
4
|
+
var BundleSObjects;
|
|
5
|
+
(function (BundleSObjects) {
|
|
6
|
+
let PkgBundleVersionCreateReqStatus;
|
|
7
|
+
(function (PkgBundleVersionCreateReqStatus) {
|
|
8
|
+
PkgBundleVersionCreateReqStatus["queued"] = "Queued";
|
|
9
|
+
PkgBundleVersionCreateReqStatus["success"] = "Success";
|
|
10
|
+
PkgBundleVersionCreateReqStatus["error"] = "Error";
|
|
11
|
+
})(PkgBundleVersionCreateReqStatus = BundleSObjects.PkgBundleVersionCreateReqStatus || (BundleSObjects.PkgBundleVersionCreateReqStatus = {}));
|
|
12
|
+
let PkgBundleVersionInstallReqStatus;
|
|
13
|
+
(function (PkgBundleVersionInstallReqStatus) {
|
|
14
|
+
PkgBundleVersionInstallReqStatus["queued"] = "Queued";
|
|
15
|
+
PkgBundleVersionInstallReqStatus["success"] = "Success";
|
|
16
|
+
PkgBundleVersionInstallReqStatus["error"] = "Error";
|
|
17
|
+
})(PkgBundleVersionInstallReqStatus = BundleSObjects.PkgBundleVersionInstallReqStatus || (BundleSObjects.PkgBundleVersionInstallReqStatus = {}));
|
|
18
|
+
})(BundleSObjects || (exports.BundleSObjects = BundleSObjects = {}));
|
|
19
|
+
//# sourceMappingURL=bundleSObjects.js.map
|
package/lib/interfaces/index.js
CHANGED
|
@@ -15,11 +15,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/*
|
|
18
|
-
* Copyright
|
|
19
|
-
*
|
|
20
|
-
* Licensed under the
|
|
21
|
-
*
|
|
18
|
+
* Copyright 2025, Salesforce, Inc.
|
|
19
|
+
*
|
|
20
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License.
|
|
22
|
+
* You may obtain a copy of the License at
|
|
23
|
+
*
|
|
24
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
*
|
|
26
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
27
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
28
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
+
* See the License for the specific language governing permissions and
|
|
30
|
+
* limitations under the License.
|
|
22
31
|
*/
|
|
23
32
|
__exportStar(require("./packagingInterfacesAndType"), exports);
|
|
24
33
|
__exportStar(require("./packagingSObjects"), exports);
|
|
34
|
+
__exportStar(require("./bundleInterfacesAndType"), exports);
|
|
35
|
+
__exportStar(require("./bundleSObjects"), exports);
|
|
25
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the
|
|
6
|
-
*
|
|
3
|
+
* Copyright 2025, Salesforce, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
7
16
|
*/
|
|
8
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
18
|
exports.Package1VersionEvents = exports.PackageVersionEvents = exports.PackageEvents = exports.PackageVersionCreateRequestResultInProgressStatuses = void 0;
|
package/lib/package/index.d.ts
CHANGED
|
@@ -3,3 +3,6 @@ export * from './packageVersion';
|
|
|
3
3
|
export * from './subscriberPackageVersion';
|
|
4
4
|
export * from './packagePushUpgrade';
|
|
5
5
|
export { VersionNumber } from './versionNumber';
|
|
6
|
+
export * from './packageBundle';
|
|
7
|
+
export * from './packageBundleVersion';
|
|
8
|
+
export * from './packageBundleInstall';
|
package/lib/package/index.js
CHANGED
|
@@ -16,10 +16,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.VersionNumber = void 0;
|
|
18
18
|
/*
|
|
19
|
-
* Copyright
|
|
20
|
-
*
|
|
21
|
-
* Licensed under the
|
|
22
|
-
*
|
|
19
|
+
* Copyright 2025, Salesforce, Inc.
|
|
20
|
+
*
|
|
21
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
22
|
+
* you may not use this file except in compliance with the License.
|
|
23
|
+
* You may obtain a copy of the License at
|
|
24
|
+
*
|
|
25
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
26
|
+
*
|
|
27
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
28
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
29
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
30
|
+
* See the License for the specific language governing permissions and
|
|
31
|
+
* limitations under the License.
|
|
23
32
|
*/
|
|
24
33
|
__exportStar(require("./package"), exports);
|
|
25
34
|
__exportStar(require("./packageVersion"), exports);
|
|
@@ -27,4 +36,7 @@ __exportStar(require("./subscriberPackageVersion"), exports);
|
|
|
27
36
|
__exportStar(require("./packagePushUpgrade"), exports);
|
|
28
37
|
var versionNumber_1 = require("./versionNumber");
|
|
29
38
|
Object.defineProperty(exports, "VersionNumber", { enumerable: true, get: function () { return versionNumber_1.VersionNumber; } });
|
|
39
|
+
__exportStar(require("./packageBundle"), exports);
|
|
40
|
+
__exportStar(require("./packageBundleVersion"), exports);
|
|
41
|
+
__exportStar(require("./packageBundleInstall"), exports);
|
|
30
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -38,10 +38,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.PackageAncestryNode = exports.AncestryDotProducer = exports.AncestryJsonProducer = exports.AncestryTreeProducer = exports.PackageAncestry = void 0;
|
|
40
40
|
/*
|
|
41
|
-
* Copyright
|
|
42
|
-
*
|
|
43
|
-
* Licensed under the
|
|
44
|
-
*
|
|
41
|
+
* Copyright 2025, Salesforce, Inc.
|
|
42
|
+
*
|
|
43
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
44
|
+
* you may not use this file except in compliance with the License.
|
|
45
|
+
* You may obtain a copy of the License at
|
|
46
|
+
*
|
|
47
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
48
|
+
*
|
|
49
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
50
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
51
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
52
|
+
* See the License for the specific language governing permissions and
|
|
53
|
+
* limitations under the License.
|
|
45
54
|
*/
|
|
46
55
|
const node_os_1 = require("node:os");
|
|
47
56
|
const core_1 = require("@salesforce/core");
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Connection, SfProject } from '@salesforce/core';
|
|
2
|
+
import { SaveResult } from '@jsforce/jsforce-node';
|
|
3
|
+
import { Duration } from '@salesforce/kit';
|
|
4
|
+
import { BundleCreateOptions, BundleSObjects, BundleVersionCreateOptions } from '../interfaces';
|
|
5
|
+
export declare class PackageBundle {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new package bundle.
|
|
8
|
+
*
|
|
9
|
+
* @param connection - instance of Connection
|
|
10
|
+
* @param project - instance of SfProject
|
|
11
|
+
* @param options - options for creating a bundle - see BundleCreateOptions
|
|
12
|
+
* @returns PackageBundle
|
|
13
|
+
*/
|
|
14
|
+
static create(connection: Connection, project: SfProject, options: BundleCreateOptions): Promise<{
|
|
15
|
+
Id: string;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Create a new package bundle version.
|
|
19
|
+
*
|
|
20
|
+
* @param connection - instance of Connection
|
|
21
|
+
* @param project - instance of SfProject
|
|
22
|
+
* @param options - options for creating a bundle version - see BundleVersionCreateOptions
|
|
23
|
+
* @returns PackageBundle
|
|
24
|
+
*/
|
|
25
|
+
static createVersion(options: BundleVersionCreateOptions, polling?: {
|
|
26
|
+
frequency: Duration;
|
|
27
|
+
timeout: Duration;
|
|
28
|
+
}): Promise<BundleSObjects.PackageBundleVersionCreateRequestResult>;
|
|
29
|
+
static delete(connection: Connection, project: SfProject, idOrAlias: string): Promise<SaveResult>;
|
|
30
|
+
/**
|
|
31
|
+
* Returns all the package bundles that are available in the org, up to 10,000. If more records are
|
|
32
|
+
* needed use the `SF_ORG_MAX_QUERY_LIMIT` env var.
|
|
33
|
+
*
|
|
34
|
+
* @param connection
|
|
35
|
+
*/
|
|
36
|
+
static list(connection: Connection): Promise<BundleSObjects.Bundle[]>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025, Salesforce, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PackageBundle = void 0;
|
|
19
|
+
const core_1 = require("@salesforce/core");
|
|
20
|
+
const kit_1 = require("@salesforce/kit");
|
|
21
|
+
const packageBundleCreate_1 = require("./packageBundleCreate");
|
|
22
|
+
const packageBundleVersion_1 = require("./packageBundleVersion");
|
|
23
|
+
const BundleFields = [
|
|
24
|
+
'BundleName',
|
|
25
|
+
'Description',
|
|
26
|
+
'Id',
|
|
27
|
+
'IsDeleted',
|
|
28
|
+
'CreatedDate',
|
|
29
|
+
'CreatedById',
|
|
30
|
+
'LastModifiedDate',
|
|
31
|
+
'LastModifiedById',
|
|
32
|
+
'SystemModstamp',
|
|
33
|
+
];
|
|
34
|
+
class PackageBundle {
|
|
35
|
+
/**
|
|
36
|
+
* Create a new package bundle.
|
|
37
|
+
*
|
|
38
|
+
* @param connection - instance of Connection
|
|
39
|
+
* @param project - instance of SfProject
|
|
40
|
+
* @param options - options for creating a bundle - see BundleCreateOptions
|
|
41
|
+
* @returns PackageBundle
|
|
42
|
+
*/
|
|
43
|
+
static async create(connection, project, options) {
|
|
44
|
+
return (0, packageBundleCreate_1.createBundle)(connection, project, options);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Create a new package bundle version.
|
|
48
|
+
*
|
|
49
|
+
* @param connection - instance of Connection
|
|
50
|
+
* @param project - instance of SfProject
|
|
51
|
+
* @param options - options for creating a bundle version - see BundleVersionCreateOptions
|
|
52
|
+
* @returns PackageBundle
|
|
53
|
+
*/
|
|
54
|
+
static async createVersion(options, polling = {
|
|
55
|
+
frequency: kit_1.Duration.seconds(0),
|
|
56
|
+
timeout: kit_1.Duration.seconds(0),
|
|
57
|
+
}) {
|
|
58
|
+
return packageBundleVersion_1.PackageBundleVersion.create(options, polling);
|
|
59
|
+
}
|
|
60
|
+
static async delete(connection, project, idOrAlias) {
|
|
61
|
+
// Check if it's already an ID (1Fl followed by 15 characters)
|
|
62
|
+
if (/^1Fl.{15}$/.test(idOrAlias)) {
|
|
63
|
+
return connection.tooling.sobject('PackageBundle').delete(idOrAlias);
|
|
64
|
+
}
|
|
65
|
+
// Validate that project is provided when using aliases
|
|
66
|
+
if (!project) {
|
|
67
|
+
throw new core_1.SfError('Project instance is required when deleting package bundle by alias');
|
|
68
|
+
}
|
|
69
|
+
// eslint-disable-next-line no-param-reassign
|
|
70
|
+
idOrAlias = project.getPackageBundleIdFromAlias(idOrAlias) ?? idOrAlias;
|
|
71
|
+
return connection.tooling.sobject('PackageBundle').delete(idOrAlias);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Returns all the package bundles that are available in the org, up to 10,000. If more records are
|
|
75
|
+
* needed use the `SF_ORG_MAX_QUERY_LIMIT` env var.
|
|
76
|
+
*
|
|
77
|
+
* @param connection
|
|
78
|
+
*/
|
|
79
|
+
static async list(connection) {
|
|
80
|
+
const query = `select ${BundleFields.join(', ')} from PackageBundle ORDER BY BundleName`;
|
|
81
|
+
return (await connection.autoFetchQuery(query, { tooling: true }))?.records;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.PackageBundle = PackageBundle;
|
|
85
|
+
//# sourceMappingURL=packageBundle.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Connection, SfProject } from '@salesforce/core';
|
|
2
|
+
import { BundleEntry } from '@salesforce/schemas';
|
|
3
|
+
import { BundleCreateOptions } from '../interfaces';
|
|
4
|
+
export declare function createPackageDirEntry(project: SfProject, options: BundleCreateOptions): BundleEntry;
|
|
5
|
+
export declare function createBundle(connection: Connection, project: SfProject, options: BundleCreateOptions): Promise<{
|
|
6
|
+
Id: string;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPackageDirEntry = createPackageDirEntry;
|
|
4
|
+
exports.createBundle = createBundle;
|
|
5
|
+
/*
|
|
6
|
+
* Copyright 2025, Salesforce, Inc.
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
const core_1 = require("@salesforce/core");
|
|
21
|
+
const bundleUtils_1 = require("../utils/bundleUtils");
|
|
22
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
23
|
+
const messages = core_1.Messages.loadMessages('@salesforce/packaging', 'bundle_create');
|
|
24
|
+
function createPackageDirEntry(project, options) {
|
|
25
|
+
return {
|
|
26
|
+
versionName: 'ver 0.1',
|
|
27
|
+
versionNumber: '0.1',
|
|
28
|
+
name: options.BundleName,
|
|
29
|
+
versionDescription: options.Description,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
async function createBundle(connection, project, options) {
|
|
33
|
+
const request = { BundleName: options.BundleName, Description: options.Description };
|
|
34
|
+
let createResult;
|
|
35
|
+
try {
|
|
36
|
+
createResult = await connection.tooling.sobject('PackageBundle').create(request);
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
const error = err instanceof Error
|
|
40
|
+
? err
|
|
41
|
+
: new Error(typeof err === 'string' ? err : messages.getMessage('failedToCreatePackageBundle'));
|
|
42
|
+
throw core_1.SfError.wrap((0, bundleUtils_1.massageErrorMessage)(error));
|
|
43
|
+
}
|
|
44
|
+
if (!createResult?.success) {
|
|
45
|
+
throw core_1.SfError.wrap((0, bundleUtils_1.massageErrorMessage)(new Error(messages.getMessage('failedToCreatePackageBundle'))));
|
|
46
|
+
}
|
|
47
|
+
const bundleEntry = createPackageDirEntry(project, options);
|
|
48
|
+
project.getSfProjectJson().addPackageBundle(bundleEntry);
|
|
49
|
+
project.getSfProjectJson().addPackageBundleAlias(bundleEntry.name, createResult.id);
|
|
50
|
+
await project.getSfProjectJson().write();
|
|
51
|
+
return { Id: createResult.id };
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=packageBundleCreate.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Connection, SfProject } from '@salesforce/core';
|
|
2
|
+
import { BundleSObjects, BundleInstallOptions } from '../interfaces';
|
|
3
|
+
export declare class PackageBundleInstall {
|
|
4
|
+
static getInstallStatus(installRequestId: string, connection: Connection): Promise<BundleSObjects.PkgBundleVersionInstallReqResult>;
|
|
5
|
+
static getInstallStatuses(connection: Connection, status?: BundleSObjects.PkgBundleVersionInstallReqStatus, createdLastDays?: number): Promise<BundleSObjects.PkgBundleVersionInstallReqResult[]>;
|
|
6
|
+
static installBundle(connection: Connection, project: SfProject, options: BundleInstallOptions): Promise<BundleSObjects.PkgBundleVersionInstallReqResult>;
|
|
7
|
+
private static parsePackageBundleVersionId;
|
|
8
|
+
private static pollInstallStatus;
|
|
9
|
+
}
|