@salesforce/packaging 0.0.2 → 0.0.3

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.
@@ -0,0 +1,16 @@
1
+ export declare enum BuildNumberToken {
2
+ LATEST_BUILD_NUMBER_TOKEN = "LATEST",
3
+ NEXT_BUILD_NUMBER_TOKEN = "NEXT",
4
+ RELEASED_BUILD_NUMBER_TOKEN = "RELEASED",
5
+ HIGHEST_VERSION_NUMBER_TOKEN = "HIGHEST",
6
+ NONE_VERSION_NUMBER_TOKEN = "NONE"
7
+ }
8
+ export declare class VersionNumber {
9
+ major: string;
10
+ minor: string;
11
+ patch: string;
12
+ build: string;
13
+ private constructor();
14
+ static from(versionString: string): VersionNumber;
15
+ toString(): string;
16
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2022, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.VersionNumber = exports.BuildNumberToken = void 0;
10
+ const core_1 = require("@salesforce/core");
11
+ core_1.Messages.importMessagesDirectory(__dirname);
12
+ const messages = core_1.Messages.loadMessages('@salesforce/packaging', 'messages');
13
+ var BuildNumberToken;
14
+ (function (BuildNumberToken) {
15
+ BuildNumberToken["LATEST_BUILD_NUMBER_TOKEN"] = "LATEST";
16
+ BuildNumberToken["NEXT_BUILD_NUMBER_TOKEN"] = "NEXT";
17
+ BuildNumberToken["RELEASED_BUILD_NUMBER_TOKEN"] = "RELEASED";
18
+ BuildNumberToken["HIGHEST_VERSION_NUMBER_TOKEN"] = "HIGHEST";
19
+ BuildNumberToken["NONE_VERSION_NUMBER_TOKEN"] = "NONE";
20
+ })(BuildNumberToken = exports.BuildNumberToken || (exports.BuildNumberToken = {}));
21
+ class VersionNumber {
22
+ constructor(major, minor, patch, build) {
23
+ this.major = major;
24
+ this.minor = minor;
25
+ this.patch = patch;
26
+ this.build = build;
27
+ }
28
+ static from(versionString) {
29
+ if (!versionString) {
30
+ throw new Error(messages.getMessage('errorMissingVersionNumber'));
31
+ }
32
+ const version = versionString.split('.');
33
+ if ((version === null || version === void 0 ? void 0 : version.length) === 4) {
34
+ const [major, minor, patch, build] = version;
35
+ const asNumbers = [major, minor, patch, build].map((v) => parseInt(v, 10));
36
+ if (asNumbers.slice(0, 3).some((v) => isNaN(v))) {
37
+ throw new Error(messages.getMessage('errorInvalidMajorMinorPatchNumber', [versionString]));
38
+ }
39
+ if (isNaN(asNumbers[3]) && !Object.values(BuildNumberToken).includes(build)) {
40
+ throw new Error(messages.getMessage('errorInvalidBuildNumberToken', [
41
+ versionString,
42
+ Object.values(BuildNumberToken).join(', '),
43
+ ]));
44
+ }
45
+ return new VersionNumber(major, minor, patch, build);
46
+ }
47
+ throw new Error(messages.getMessage('errorInvalidVersionNumber', [versionString]));
48
+ }
49
+ toString() {
50
+ {
51
+ return `${this.major || '0'}.${this.minor || '0'}.${this.patch || '0'}.${this.build ? `${this.build}` : '0'}`;
52
+ }
53
+ }
54
+ }
55
+ exports.VersionNumber = VersionNumber;
56
+ //# sourceMappingURL=versionNumber.js.map
@@ -0,0 +1,191 @@
1
+ # topicHelp
2
+
3
+ develop, install, and manage packages
4
+
5
+ # topicHelpLong
6
+
7
+ Use the package commands to develop, install, and manage packages.
8
+
9
+ # createdLastDaysDescription
10
+
11
+ created in the last specified number of days (starting at 00:00:00 of first day to now; 0 for today)
12
+
13
+ # createdLastDaysLongDescription
14
+
15
+ Filters the list based on the specified maximum number of days since the request was created (starting at 00:00:00 of first day to now; 0 for today).
16
+
17
+ # modifiedLastDaysDescription
18
+
19
+ list items modified in the specified last number of days (starting at 00:00:00 of first day to now; 0 for today)
20
+
21
+ # modifiedLastDaysLongDescription
22
+
23
+ Lists the items modified in the specified last number of days, starting at 00:00:00 of first day to now. Use 0 for today.
24
+
25
+ # invalidIdOrAlias
26
+
27
+ The %s: %s isn't defined in the sfdx-project.json. Add it to the packageDirectories section and add the alias to packageAliases with its %s ID.
28
+
29
+ # invalidDaysNumber
30
+
31
+ Provide a valid positive number for %s.
32
+
33
+ # invalidStatus
34
+
35
+ Invalid status '%s'. Please provide one of these statuses: %s
36
+
37
+ # packageNotEnabledAction
38
+
39
+ Packaging is not enabled on this org. Verify that you are authenticated to the desired org and try again. Otherwise, contact Salesforce Customer Support for more information.
40
+
41
+ # packageInstanceNotEnabled
42
+
43
+ Your org does not have permission to specify a build instance for your package version. Verify that you are authenticated to the desired org and try again. Otherwise, contact Salesforce Customer Support for more information.
44
+
45
+ # packageSourceOrgNotEnabled
46
+
47
+ Your Dev Hub does not have permission to specify a source org for your build org. Verify that you are authenticated to the correct Dev Hub and try again. Otherwise, contact Salesforce Customer Support for assistance.
48
+
49
+ # installStatus
50
+
51
+ Waiting for the package install request to complete. Status = %s
52
+
53
+ # errorMissingVersionNumber
54
+
55
+ The VersionNumber property must be specified.
56
+
57
+ # errorInvalidMajorMinorPatchNumber
58
+
59
+ VersionNumber parts major, minor or patch must be a number but the value found is [%s].
60
+
61
+ # errorInvalidVersionNumber
62
+
63
+ VersionNumber must be in the format major.minor.patch.build but the value found is [%s].
64
+
65
+ # errorInvalidBuildNumber
66
+
67
+ The provided VersionNumber '%s' is invalid. Provide an integer value or use the keyword '%s' for the build number.
68
+
69
+ # errorInvalidBuildNumberToken
70
+
71
+ The provided VersionNumber '%s' is invalid. Build number token must be a number or one of these tokens '%s'.
72
+
73
+ # errorInvalidBuildNumberForKeywords
74
+
75
+ The provided VersionNumber '%s' is invalid. Provide an integer value or use the keyword '%s' or '%s' for the build number.
76
+
77
+ # errorInvalidPatchNumber
78
+
79
+ The provided VersionNumber '%s' is not supported. Provide a patch number of 0.
80
+
81
+ # errorInvalidMajorMinorNumber
82
+
83
+ The provided VersionNumber '%s' is invalid. Provide an integer value for the %s number.
84
+
85
+ # errorInvalidAncestorVersionFormat
86
+
87
+ The ancestor versionNumber must be in the format major.minor.patch but the value found is [%s].
88
+
89
+ # errorNoMatchingMajorMinorForPatch
90
+
91
+ Can’t create patch version. The specified package ancestor [%s] either isn’t a promoted and released version, or can’t be found. Check the specified ancestor version, and then retry creating the patch version.
92
+
93
+ # errorNoMatchingAncestor
94
+
95
+ The ancestorId for ancestorVersion [%s] can't be found. Package ID [%s].
96
+
97
+ # errorAncestorNotReleased
98
+
99
+ The ancestor package version [%s] specified in the sfdx-project.json file hasn’t been promoted and released. Release the ancestor package version before specifying it as the ancestor in a new package or patch version.
100
+
101
+ # errorAncestorNotHighest
102
+
103
+ Can’t create package version. The ancestor version [%s] you specified isn’t the highest released package version. Set the ancestor version to %s, and try creating the package version again. You can also specify --skipancestorcheck to override the ancestry requirement.
104
+
105
+ # errorAncestorNoneNotAllowed
106
+
107
+ Can’t create package version because you didn’t specify a package ancestor. Set the ancestor version to %s, and try creating the package version. You can also specify --skipancestorcheck to override the ancestry requirement.
108
+
109
+ # errorAncestorIdVersionMismatch
110
+
111
+ Can’t create package version. The ancestorVersion listed in your sfdx-project.json file doesn’t map to this package. Ensure the ancestor ID is correct, or set the ID to ancestorID:HIGHEST to ensure the highest released package version is used as the ancestor. Then try creating the package version again.
112
+
113
+ # errorAncestorIdVersionHighestOrNoneMismatch
114
+
115
+ Can’t create package version. The ancestorId [%s] and ancestorVersion [%s] in your sfdx-project.json file don’t map to the same package version. Remove the incorrect entry, and try creating the package version again.
116
+
117
+ # errorpackageAncestorIdsKeyNotSupported
118
+
119
+ The package2AncestorIds key is no longer supported in a scratch org definition. Ancestors defined in sfdx-project.json will be included in the scratch org.
120
+
121
+ # errorInvalidIdNoMatchingVersionId
122
+
123
+ The %s %s is invalid, as a corresponding %s was not found
124
+
125
+ # errorIdTypeMismatch
126
+
127
+ ID type mismatch: an ID of type %s is required, but an ID of type %s was specified: %s
128
+
129
+ # updatedSfProject
130
+
131
+ sfdx-project.json has been updated.
132
+
133
+ # errorSfProjectFileWrite
134
+
135
+ sfdx-project.json could not be updated with the following entry for this package:
136
+ %s
137
+ Reason: %s
138
+
139
+ # invalidPackageTypeAction
140
+
141
+ Specify Unlocked or Managed for package type.
142
+
143
+ # invalidPackageTypeMessage
144
+
145
+ Invalid package type
146
+
147
+ # idNotFoundAction
148
+
149
+ It`s possible that this package was created on a different Dev Hub. Authenticate to the Dev Hub org that owns the package, and reference that Dev Hub when running the command.
150
+
151
+ # malformedPackageVersionIdAction
152
+
153
+ Use "sfdx force:package:version:list" to verify the 05i package version ID.
154
+
155
+ # malformedPackageVersionIdMessage
156
+
157
+ We can’t find this package version ID for this Dev Hub.
158
+
159
+ # malformedPackageIdAction
160
+
161
+ Use "sfdx force:package:list" to verify the 0Ho package version ID.
162
+
163
+ # malformedPackageIdMessage
164
+
165
+ We can’t find this package ID for this Dev Hub.
166
+
167
+ # notFoundMessage
168
+
169
+ The requested resource does not exist
170
+
171
+ # errorMoreThanOnePackage2WithSeed
172
+
173
+ Only one package in a Dev Hub is allowed per converted from first-generation package, but the following were found:
174
+ %s
175
+
176
+ # versionCreateFailedWithMultipleErrors
177
+
178
+ Multiple errors occurred:
179
+
180
+ # errorScriptsNotApplicableToUnlockedPackage
181
+
182
+ We can’t create the package version. This parameter is available only for second-generation managed packages. Create the package version without the postinstallscript or uninstallscript parameters.,
183
+
184
+ # errorAncestorNotApplicableToUnlockedPackage
185
+
186
+ Can’t create package version. Specifying an ancestor is available only for second-generation managed packages. Remove the ancestorId or ancestorVersion from your sfdx-project.json file, and then create the package version again.,
187
+
188
+ # itemDoesNotFitWithinMaxLength
189
+
190
+ When calculating the number of items to be included in query "%s", when formatted, was too long.
191
+ The item was (truncated): %s with a length of %s. The maximum length of items, when formatted is %s.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/packaging",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "packing libraries to Salesforce packaging platform",
5
5
  "main": "lib/exported",
6
6
  "types": "lib/exported.d.ts",
@@ -34,7 +34,7 @@
34
34
  "!lib/**/*.map"
35
35
  ],
36
36
  "dependencies": {
37
- "@salesforce/core": "^3.20.0",
37
+ "@salesforce/core": "^3.21.0",
38
38
  "@salesforce/kit": "^1.5.42",
39
39
  "@salesforce/schemas": "^1.2.0",
40
40
  "@salesforce/ts-types": "^1.5.20",