@salesforce/core 8.28.0 → 8.28.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.
@@ -5,16 +5,7 @@ import { z } from 'zod';
5
5
  */
6
6
  export declare const ScratchOrgDefSchema: z.ZodObject<{
7
7
  orgName: z.ZodOptional<z.ZodString>;
8
- edition: z.ZodEnum<{
9
- group: "group";
10
- developer: "developer";
11
- enterprise: "enterprise";
12
- "partner-developer": "partner-developer";
13
- "partner-enterprise": "partner-enterprise";
14
- "partner-group": "partner-group";
15
- "partner-professional": "partner-professional";
16
- professional: "professional";
17
- }>;
8
+ edition: z.ZodString;
18
9
  country: z.ZodOptional<z.ZodString>;
19
10
  username: z.ZodOptional<z.ZodString>;
20
11
  adminEmail: z.ZodOptional<z.ZodString>;
@@ -18,16 +18,23 @@ exports.ScratchOrgDefSchema = zod_1.z
18
18
  .object({
19
19
  orgName: zod_1.z.string().optional().describe('The name of the scratch org.').meta({ title: 'Organization Name' }),
20
20
  edition: zod_1.z
21
- .enum([
22
- 'developer',
23
- 'enterprise',
24
- 'group',
25
- 'partner-developer',
26
- 'partner-enterprise',
27
- 'partner-group',
28
- 'partner-professional',
29
- 'professional',
30
- ])
21
+ .string()
22
+ .refine((val) => {
23
+ const validOptions = [
24
+ 'developer',
25
+ 'enterprise',
26
+ 'group',
27
+ 'partner developer',
28
+ 'partner enterprise',
29
+ 'partner group',
30
+ 'partner professional',
31
+ 'professional',
32
+ ];
33
+ // Check if the lowercase input matches any of our valid options
34
+ return validOptions.includes(val.toLowerCase());
35
+ }, {
36
+ message: 'Invalid Salesforce edition. Valid options are: developer, enterprise, group, partner developer, partner enterprise, partner group, partner professional, professional.',
37
+ })
31
38
  .describe('The Salesforce edition of the scratch org.'),
32
39
  country: zod_1.z
33
40
  .string()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "8.28.0",
3
+ "version": "8.28.1",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",
@@ -9,17 +9,7 @@
9
9
  },
10
10
  "edition": {
11
11
  "description": "The Salesforce edition of the scratch org.",
12
- "type": "string",
13
- "enum": [
14
- "developer",
15
- "enterprise",
16
- "group",
17
- "partner-developer",
18
- "partner-enterprise",
19
- "partner-group",
20
- "partner-professional",
21
- "professional"
22
- ]
12
+ "type": "string"
23
13
  },
24
14
  "country": {
25
15
  "description": "Dev Hub's country. If you want to override this value, enter the two-character, upper-case ISO-3166 country code (Alpha-2 code). You can find a full list of these codes at several sites, such as: https://www.iso.org/obp/ui/#search. This value sets the locale of the scratch org.",