@salesforce/core 8.23.7 → 8.24.1-dev.0
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/LICENSE.txt +1 -1
- package/README.md +27 -0
- package/lib/index.d.ts +6 -1
- package/lib/index.js +11 -2
- package/lib/org/scratchOrgInfoGenerator.js +12 -1
- package/lib/schema/project-scratch-def/features.d.ts +2 -0
- package/lib/schema/project-scratch-def/features.js +36 -0
- package/lib/schema/project-scratch-def/patternFeaturesList.d.ts +1 -0
- package/lib/schema/project-scratch-def/patternFeaturesList.js +69 -0
- package/lib/schema/project-scratch-def/scratchOrgDef.d.ts +176 -0
- package/lib/schema/project-scratch-def/scratchOrgDef.js +73 -0
- package/lib/schema/project-scratch-def/settings.d.ts +150 -0
- package/lib/schema/project-scratch-def/settings.js +591 -0
- package/lib/schema/project-scratch-def/simpleFeaturesList.d.ts +1 -0
- package/lib/schema/project-scratch-def/simpleFeaturesList.js +272 -0
- package/lib/schema/sfdx-project/bundleEntry.d.ts +11 -0
- package/lib/schema/sfdx-project/bundleEntry.js +28 -0
- package/lib/schema/sfdx-project/packageDir.d.ts +84 -0
- package/lib/schema/sfdx-project/packageDir.js +146 -0
- package/lib/schema/sfdx-project/registryPresets.d.ts +2 -0
- package/lib/schema/sfdx-project/registryPresets.js +12 -0
- package/lib/schema/sfdx-project/registryVariants.d.ts +104 -0
- package/lib/schema/sfdx-project/registryVariants.js +57 -0
- package/lib/schema/sfdx-project/replacements.d.ts +70 -0
- package/lib/schema/sfdx-project/replacements.js +76 -0
- package/lib/schema/sfdx-project/sfdxProjectJson.d.ts +201 -0
- package/lib/schema/sfdx-project/sfdxProjectJson.js +89 -0
- package/lib/schema/validator.d.ts +8 -0
- package/lib/schema/validator.js +8 -0
- package/lib/sfProject.d.ts +7 -5
- package/lib/sfProject.js +17 -21
- package/package.json +62 -9
- package/schemas/project-scratch-def.schema.json +1789 -0
- package/schemas/sfdx-project.schema.json +909 -0
package/LICENSE.txt
CHANGED
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
- [Description](#description)
|
|
4
4
|
- [Usage](#usage)
|
|
5
5
|
- [Contributing](#contributing)
|
|
6
|
+
- [JSON Schemas](#json-schemas)
|
|
6
7
|
- [Using TestSetup](#using-testsetup)
|
|
7
8
|
- [Message Transformer](#message-transformer)
|
|
8
9
|
|
|
@@ -22,6 +23,32 @@ If you're interested in contributing, take a look at the [CONTRIBUTING](CONTRIBU
|
|
|
22
23
|
|
|
23
24
|
Report all issues to the [issues only repository](https://github.com/forcedotcom/cli/issues).
|
|
24
25
|
|
|
26
|
+
## JSON Schemas
|
|
27
|
+
|
|
28
|
+
This library provides JSON schemas for `sfdx-project.json` and scratch org definition files. These schemas are generated from Zod schemas that are also exported for runtime validation.
|
|
29
|
+
|
|
30
|
+
### Importing JSON Schemas
|
|
31
|
+
|
|
32
|
+
```javascript
|
|
33
|
+
// Import the JSON schema files directly
|
|
34
|
+
import sfdxProjectSchema from '@salesforce/core/sfdx-project.schema.json';
|
|
35
|
+
import scratchDefSchema from '@salesforce/core/project-scratch-def.schema.json';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Using Zod Schemas for Validation
|
|
39
|
+
|
|
40
|
+
`.parse` validates and the result is TS-typed. See zod docs for all the parsing options.
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
import { ProjectJsonSchema, ScratchOrgDefSchema } from '@salesforce/core';
|
|
44
|
+
|
|
45
|
+
// Validate and parse sfdx-project.json contents (throws on invalid)
|
|
46
|
+
const projectJson = ProjectJsonSchema.parse(projectJsonContents);
|
|
47
|
+
|
|
48
|
+
// Validate and parse scratch org definition
|
|
49
|
+
const scratchDef = ScratchOrgDefSchema.parse(scratchDefContents);
|
|
50
|
+
```
|
|
51
|
+
|
|
25
52
|
# Using TestSetup
|
|
26
53
|
|
|
27
54
|
The Salesforce DX Core Library provides a unit testing utility to help with mocking and sand-boxing core components. This feature allows unit tests to execute without needing to make API calls to salesforce.com.
|
package/lib/index.d.ts
CHANGED
|
@@ -24,7 +24,10 @@ export { Fields, FieldValue, LoggerLevel, LoggerLevelValue, LogLine, LoggerOptio
|
|
|
24
24
|
export { Messages, StructuredMessage } from './messages';
|
|
25
25
|
export { Org, SandboxProcessObject, StatusEvent, SandboxInfo, SandboxEvents, SandboxUserAuthResponse, SandboxUserAuthRequest, SandboxRequest, ResumeSandboxRequest, OrgTypes, ResultEvent, ScratchOrgRequest, } from './org/org';
|
|
26
26
|
export { OrgConfigProperties, ORG_CONFIG_ALLOWED_PROPERTIES } from './org/orgConfigProperties';
|
|
27
|
-
export { NamedPackageDir, SfProject, SfProjectJson } from './sfProject';
|
|
27
|
+
export { NamedPackageDir, SfProject, SfProjectJson, isPackagingDirectory, isNamedPackagingDirectory, } from './sfProject';
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated For sfdx-project.json and scratch org definitions, use the exported zod schemas (ProjectJsonSchema, ScratchOrgDefSchema) from '@salesforce/core'. For custom schemas, use a schema validator library like zod directly.
|
|
30
|
+
*/
|
|
28
31
|
export { SchemaValidator } from './schema/validator';
|
|
29
32
|
export { SfError } from './sfError';
|
|
30
33
|
export { PollingClient } from './status/pollingClient';
|
|
@@ -35,6 +38,8 @@ export { PermissionSetAssignment, PermissionSetAssignmentFields } from './org/pe
|
|
|
35
38
|
export { lockInit } from './util/fileLocking';
|
|
36
39
|
export { ScratchOrgCreateOptions, ScratchOrgCreateResult, scratchOrgCreate, scratchOrgResume, } from './org/scratchOrgCreate';
|
|
37
40
|
export { ScratchOrgInfo } from './org/scratchOrgTypes';
|
|
41
|
+
export { ProjectJson, ProjectJsonSchema } from './schema/sfdx-project/sfdxProjectJson';
|
|
42
|
+
export { ScratchOrgDef, ScratchOrgDefSchema } from './schema/project-scratch-def/scratchOrgDef';
|
|
38
43
|
export { ScratchOrgLifecycleEvent, scratchOrgLifecycleEventName, scratchOrgLifecycleStages, } from './org/scratchOrgLifecycleEvents';
|
|
39
44
|
export { ScratchOrgCache } from './org/scratchOrgCache';
|
|
40
45
|
export { default as ScratchOrgSettingsGenerator } from './org/scratchOrgSettingsGenerator';
|
package/lib/index.js
CHANGED
|
@@ -23,8 +23,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
exports.fs = exports.ScratchOrgSettingsGenerator = exports.ScratchOrgCache = exports.scratchOrgLifecycleStages = exports.scratchOrgLifecycleEventName = void 0;
|
|
26
|
+
exports.lockInit = exports.PermissionSetAssignment = exports.User = exports.REQUIRED_FIELDS = exports.DefaultUserFields = exports.MyDomainResolver = exports.StreamingClient = exports.CometClient = exports.PollingClient = exports.SfError = exports.SchemaValidator = exports.isNamedPackagingDirectory = exports.isPackagingDirectory = exports.SfProjectJson = exports.SfProject = exports.ORG_CONFIG_ALLOWED_PROPERTIES = exports.OrgConfigProperties = exports.OrgTypes = exports.SandboxEvents = exports.Org = exports.Messages = exports.Logger = exports.LoggerLevel = exports.generateApiName = exports.getJwtAudienceUrl = exports.SfdcUrl = exports.WebOAuthServer = exports.Lifecycle = exports.Global = exports.Mode = exports.SFDX_HTTP_HEADERS = exports.Connection = exports.AuthRemover = exports.AuthInfo = exports.ConfigAggregator = exports.SandboxRequestCache = exports.SF_ALLOWED_PROPERTIES = exports.SFDX_ALLOWED_PROPERTIES = exports.SfConfigProperties = exports.SfdxPropertyKeys = exports.Config = exports.OrgUsersConfig = exports.DeviceOauthService = exports.StateAggregator = exports.EnvVars = exports.SUPPORTED_ENV_VARS = exports.EnvironmentVariable = exports.envVars = exports.TTLConfig = exports.ConfigFile = void 0;
|
|
27
|
+
exports.fs = exports.ScratchOrgSettingsGenerator = exports.ScratchOrgCache = exports.scratchOrgLifecycleStages = exports.scratchOrgLifecycleEventName = exports.ScratchOrgDefSchema = exports.ProjectJsonSchema = exports.scratchOrgResume = exports.scratchOrgCreate = void 0;
|
|
28
28
|
const messages_1 = require("./messages");
|
|
29
29
|
;
|
|
30
30
|
var configFile_1 = require("./config/configFile");
|
|
@@ -87,6 +87,11 @@ Object.defineProperty(exports, "ORG_CONFIG_ALLOWED_PROPERTIES", { enumerable: tr
|
|
|
87
87
|
var sfProject_1 = require("./sfProject");
|
|
88
88
|
Object.defineProperty(exports, "SfProject", { enumerable: true, get: function () { return sfProject_1.SfProject; } });
|
|
89
89
|
Object.defineProperty(exports, "SfProjectJson", { enumerable: true, get: function () { return sfProject_1.SfProjectJson; } });
|
|
90
|
+
Object.defineProperty(exports, "isPackagingDirectory", { enumerable: true, get: function () { return sfProject_1.isPackagingDirectory; } });
|
|
91
|
+
Object.defineProperty(exports, "isNamedPackagingDirectory", { enumerable: true, get: function () { return sfProject_1.isNamedPackagingDirectory; } });
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated For sfdx-project.json and scratch org definitions, use the exported zod schemas (ProjectJsonSchema, ScratchOrgDefSchema) from '@salesforce/core'. For custom schemas, use a schema validator library like zod directly.
|
|
94
|
+
*/
|
|
90
95
|
var validator_1 = require("./schema/validator");
|
|
91
96
|
Object.defineProperty(exports, "SchemaValidator", { enumerable: true, get: function () { return validator_1.SchemaValidator; } });
|
|
92
97
|
var sfError_1 = require("./sfError");
|
|
@@ -109,6 +114,10 @@ Object.defineProperty(exports, "lockInit", { enumerable: true, get: function ()
|
|
|
109
114
|
var scratchOrgCreate_1 = require("./org/scratchOrgCreate");
|
|
110
115
|
Object.defineProperty(exports, "scratchOrgCreate", { enumerable: true, get: function () { return scratchOrgCreate_1.scratchOrgCreate; } });
|
|
111
116
|
Object.defineProperty(exports, "scratchOrgResume", { enumerable: true, get: function () { return scratchOrgCreate_1.scratchOrgResume; } });
|
|
117
|
+
var sfdxProjectJson_1 = require("./schema/sfdx-project/sfdxProjectJson");
|
|
118
|
+
Object.defineProperty(exports, "ProjectJsonSchema", { enumerable: true, get: function () { return sfdxProjectJson_1.ProjectJsonSchema; } });
|
|
119
|
+
var scratchOrgDef_1 = require("./schema/project-scratch-def/scratchOrgDef");
|
|
120
|
+
Object.defineProperty(exports, "ScratchOrgDefSchema", { enumerable: true, get: function () { return scratchOrgDef_1.ScratchOrgDefSchema; } });
|
|
112
121
|
var scratchOrgLifecycleEvents_1 = require("./org/scratchOrgLifecycleEvents");
|
|
113
122
|
Object.defineProperty(exports, "scratchOrgLifecycleEventName", { enumerable: true, get: function () { return scratchOrgLifecycleEvents_1.scratchOrgLifecycleEventName; } });
|
|
114
123
|
Object.defineProperty(exports, "scratchOrgLifecycleStages", { enumerable: true, get: function () { return scratchOrgLifecycleEvents_1.scratchOrgLifecycleStages; } });
|
|
@@ -14,6 +14,8 @@ const sfProject_1 = require("../sfProject");
|
|
|
14
14
|
const webOAuthServer_1 = require("../webOAuthServer");
|
|
15
15
|
const messages_1 = require("../messages");
|
|
16
16
|
const sfError_1 = require("../sfError");
|
|
17
|
+
const scratchOrgDef_1 = require("../schema/project-scratch-def/scratchOrgDef");
|
|
18
|
+
const lifecycleEvents_1 = require("../lifecycleEvents");
|
|
17
19
|
const scratchOrgFeatureDeprecation_1 = require("./scratchOrgFeatureDeprecation");
|
|
18
20
|
const authInfo_1 = require("./authInfo");
|
|
19
21
|
;
|
|
@@ -227,7 +229,16 @@ const parseDefinitionFile = async (definitionFile) => {
|
|
|
227
229
|
const defFileContents = (0, kit_1.parseJson)(fileData);
|
|
228
230
|
// remove key '$schema' from the definition file
|
|
229
231
|
delete defFileContents['$schema'];
|
|
230
|
-
|
|
232
|
+
// Validate with zod schema and emit warnings if there are issues
|
|
233
|
+
const result = scratchOrgDef_1.ScratchOrgDefSchema.safeParse(defFileContents);
|
|
234
|
+
if (!result.success) {
|
|
235
|
+
const errorMessages = result.error.issues.map((err) => `${err.path.join('.')}: ${err.message}`).join('\n');
|
|
236
|
+
await lifecycleEvents_1.Lifecycle.getInstance().emitWarning(`Scratch org definition validation issues in ${definitionFile}:\n${errorMessages}`);
|
|
237
|
+
return defFileContents;
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
return result.data;
|
|
241
|
+
}
|
|
231
242
|
}
|
|
232
243
|
catch (err) {
|
|
233
244
|
const error = err;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FeaturesSchema = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const simpleFeaturesList_1 = require("./simpleFeaturesList");
|
|
12
|
+
const patternFeaturesList_1 = require("./patternFeaturesList");
|
|
13
|
+
// Set for O(1) case-insensitive lookup of simple features
|
|
14
|
+
const simpleFeaturesLowerSet = new Set(simpleFeaturesList_1.simpleFeaturesList.map((f) => f.toLowerCase()));
|
|
15
|
+
// Helper to create a case-insensitive feature pattern with title
|
|
16
|
+
// Note: JSON Schema pattern won't include the 'i' flag, but Zod validates case-insensitively
|
|
17
|
+
const featurePattern = (name) => zod_1.z
|
|
18
|
+
.string()
|
|
19
|
+
.regex(new RegExp(`^${name}:[0-9]+$`, 'i'))
|
|
20
|
+
.meta({ title: `${name}:<value>` });
|
|
21
|
+
// Case-insensitive simple feature validation
|
|
22
|
+
// Uses refine for runtime case-insensitivity, meta.enum for JSON Schema output
|
|
23
|
+
const simpleFeatureSchema = zod_1.z
|
|
24
|
+
.string()
|
|
25
|
+
.refine((s) => simpleFeaturesLowerSet.has(s.toLowerCase()))
|
|
26
|
+
.meta({ enum: simpleFeaturesList_1.simpleFeaturesList });
|
|
27
|
+
// Combined features schema
|
|
28
|
+
// Features are case-insensitive per Salesforce docs:
|
|
29
|
+
// https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm
|
|
30
|
+
exports.FeaturesSchema = zod_1.z.array(zod_1.z.union([
|
|
31
|
+
// Feature patterns - parametrized features with numeric values
|
|
32
|
+
zod_1.z.union(patternFeaturesList_1.patternFeaturesList.map(featurePattern)),
|
|
33
|
+
// Feature enum - boolean/named features
|
|
34
|
+
simpleFeatureSchema,
|
|
35
|
+
]));
|
|
36
|
+
//# sourceMappingURL=features.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const patternFeaturesList: string[];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.patternFeaturesList = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
exports.patternFeaturesList = [
|
|
11
|
+
'AddCustomApps',
|
|
12
|
+
'AddCustomObjects',
|
|
13
|
+
'AddCustomRelationships',
|
|
14
|
+
'AddCustomTabs',
|
|
15
|
+
'AddDataComCRMRecordCredit',
|
|
16
|
+
'AddInsightsQueryLimit',
|
|
17
|
+
'AdditionalFieldHistory',
|
|
18
|
+
'AssetScheduling',
|
|
19
|
+
'CalloutSizeMB',
|
|
20
|
+
'ConcStreamingClients',
|
|
21
|
+
'ConsolePersistenceInterval',
|
|
22
|
+
'EducationCloud',
|
|
23
|
+
'EmpPublishRateLimit',
|
|
24
|
+
'EncryptionStatisticsInterval',
|
|
25
|
+
'EncryptionSyncInterval',
|
|
26
|
+
'FieldService',
|
|
27
|
+
'FieldServiceAppointmentAssistantUser',
|
|
28
|
+
'FieldServiceDispatcherUser',
|
|
29
|
+
'FieldServiceLastMileUser',
|
|
30
|
+
'FieldServiceMobileUser',
|
|
31
|
+
'FieldServiceSchedulingUser',
|
|
32
|
+
'FinancialServicesCommunityUser',
|
|
33
|
+
'FinancialServicesUser',
|
|
34
|
+
'GenStreamingEventsPerDay',
|
|
35
|
+
'HoursBetweenCoverageJob',
|
|
36
|
+
'LoyaltyMaxOrderLinePerHour',
|
|
37
|
+
'LoyaltyMaxProcExecPerHour',
|
|
38
|
+
'LoyaltyMaxTransactions',
|
|
39
|
+
'LoyaltyMaxTrxnJournals',
|
|
40
|
+
'LoyaltyMaximumPartners',
|
|
41
|
+
'LoyaltyMaximumPrograms',
|
|
42
|
+
'MaxActiveDPEDefs',
|
|
43
|
+
'MaxApexCodeSize',
|
|
44
|
+
'MaxCustomLabels',
|
|
45
|
+
'MaxDataSourcesPerDPE',
|
|
46
|
+
'MaxDatasetLinksPerDT',
|
|
47
|
+
'MaxDecisionTableAllowed',
|
|
48
|
+
'MaxFavoritesAllowed',
|
|
49
|
+
'MaxFieldsPerNode',
|
|
50
|
+
'MaxInputColumnsPerDT',
|
|
51
|
+
'MaxLoyaltyProcessRules',
|
|
52
|
+
'MaxNoOfLexThemesAllowed',
|
|
53
|
+
'MaxNodesPerDPE',
|
|
54
|
+
'MaxOutputColumnsPerDT',
|
|
55
|
+
'MaxSourceObjectPerDSL',
|
|
56
|
+
'MaxStreamingTopics',
|
|
57
|
+
'MaxUserNavItemsAllowed',
|
|
58
|
+
'MaxUserStreamingChannels',
|
|
59
|
+
'MaxWritebacksPerDPE',
|
|
60
|
+
'MedVisDescriptorLimit',
|
|
61
|
+
'MobileExtMaxFileSizeMB',
|
|
62
|
+
'NumPlatformEvents',
|
|
63
|
+
'PlatformConnect',
|
|
64
|
+
'PlatformEventsPerDay',
|
|
65
|
+
'StreamingEventsPerDay',
|
|
66
|
+
'SubPerStreamingChannel',
|
|
67
|
+
'SubPerStreamingTopic',
|
|
68
|
+
];
|
|
69
|
+
//# sourceMappingURL=patternFeaturesList.js.map
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Scratch Org Definition Configuration
|
|
4
|
+
* The scratch org definition file contains the configuration values that determine the shape of the scratch org.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ScratchOrgDefSchema: z.ZodObject<{
|
|
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
|
+
}>;
|
|
18
|
+
country: z.ZodOptional<z.ZodString>;
|
|
19
|
+
username: z.ZodOptional<z.ZodString>;
|
|
20
|
+
adminEmail: z.ZodOptional<z.ZodString>;
|
|
21
|
+
description: z.ZodOptional<z.ZodString>;
|
|
22
|
+
hasSampleData: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
23
|
+
language: z.ZodOptional<z.ZodString>;
|
|
24
|
+
features: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<z.ZodString[]>, z.ZodString]>>>;
|
|
25
|
+
template: z.ZodOptional<z.ZodString>;
|
|
26
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
accountingSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
28
|
+
accountInsightsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
29
|
+
accountIntelligenceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
30
|
+
accountPlanSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
31
|
+
accountSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
32
|
+
actionsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
33
|
+
activitiesSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
34
|
+
addressSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
35
|
+
agentforceForDevelopersSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
36
|
+
agentPlatformSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
37
|
+
aIReplyRecommendationsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
38
|
+
analyticsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
39
|
+
apexSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
40
|
+
appAnalyticsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
41
|
+
appExperienceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
|
+
associationEngineSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
43
|
+
automatedContactsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
44
|
+
botSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
45
|
+
branchManagementSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
46
|
+
businessHoursSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
47
|
+
campaignSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
48
|
+
caseSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
49
|
+
chatterAnswersSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
50
|
+
chatterEmailsMDSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
51
|
+
chatterSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
52
|
+
codeBuilderSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
53
|
+
collectionsDashboardSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
54
|
+
communitiesSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
55
|
+
companySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
|
+
connectedAppSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
57
|
+
contentSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
58
|
+
contractSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
59
|
+
conversationalIntelligenceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
60
|
+
conversationChannelDefinition: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
61
|
+
currencySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
62
|
+
customAddressFieldSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
63
|
+
dataDotComSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
64
|
+
dataImportManagementSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
65
|
+
deploymentSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
66
|
+
devHubSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
67
|
+
documentGenerationSetting: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
68
|
+
dynamicFormsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
69
|
+
eACSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
70
|
+
einsteinAgentSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
71
|
+
einsteinAISettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
72
|
+
einsteinGptSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
73
|
+
emailAdministrationSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
74
|
+
emailIntegrationSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
75
|
+
emailTemplateSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
76
|
+
employeeUserSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
77
|
+
encryptionKeySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
78
|
+
enhancedNotesSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
79
|
+
entitlementSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
80
|
+
eventSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
81
|
+
experienceBundleSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
82
|
+
externalClientAppSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
83
|
+
externalServicesSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
84
|
+
fieldServiceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
85
|
+
filesConnectSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
86
|
+
fileUploadAndDownloadSecuritySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
87
|
+
flowSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
88
|
+
forecastingObjectListSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
89
|
+
forecastingSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
90
|
+
highVelocitySalesSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
91
|
+
ideasSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
92
|
+
identityProviderSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
93
|
+
iframeWhiteListUrlSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
94
|
+
incidentMgmtSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
95
|
+
industriesEinsteinFeatureSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
96
|
+
industriesLoyaltySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
97
|
+
industriesSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
98
|
+
interestTaggingSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
99
|
+
inventorySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
100
|
+
invLatePymntRiskCalcSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
101
|
+
invocableActionSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
102
|
+
ioTSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
103
|
+
knowledgeSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
104
|
+
languageSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
105
|
+
leadConfigSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
106
|
+
leadConvertSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
107
|
+
lightningExperienceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
108
|
+
liveAgentSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
109
|
+
liveMessageSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
110
|
+
macroSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
111
|
+
mailMergeSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
112
|
+
mapAndLocationSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
113
|
+
meetingsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
114
|
+
mfgServiceConsoleSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
115
|
+
mobileSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
116
|
+
myDomainSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
117
|
+
nameSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
118
|
+
notificationsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
119
|
+
oauthOidcSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
120
|
+
objectHierarchyRelationship: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
121
|
+
objectLinkingSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
122
|
+
omniChannelSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
123
|
+
opportunityInsightsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
124
|
+
opportunityScoreSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
125
|
+
opportunitySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
126
|
+
orderManagementSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
127
|
+
orderSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
128
|
+
orgPreferenceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
129
|
+
orgSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
130
|
+
pardotEinsteinSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
131
|
+
pardotSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
132
|
+
partyDataModelSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
133
|
+
pathAssistantSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
134
|
+
paymentsSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
135
|
+
picklistSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
136
|
+
platformEncryptionSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
137
|
+
platformEventSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
138
|
+
predictionBuilderSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
139
|
+
privacySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
140
|
+
processFlowMigration: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
141
|
+
productSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
142
|
+
quoteSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
143
|
+
realTimeEventSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
144
|
+
recordPageSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
145
|
+
retailExecutionSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
146
|
+
salesAgreementSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
147
|
+
sandboxSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
148
|
+
schemaSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
149
|
+
searchSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
150
|
+
securitySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
151
|
+
serviceCloudVoiceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
152
|
+
serviceSetupAssistantSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
153
|
+
sharingSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
154
|
+
siteSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
155
|
+
socialCustomerServiceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
156
|
+
socialProfileSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
157
|
+
sourceTrackingSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
158
|
+
subscriptionManagementSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
159
|
+
surveySettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
160
|
+
territory2Settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
161
|
+
trailheadSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
162
|
+
trialOrgSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
163
|
+
userEngagementSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
164
|
+
userInterfaceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
165
|
+
userManagementSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
166
|
+
voiceSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
167
|
+
warrantyLifeCycleMgmtSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
168
|
+
workDotComSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
169
|
+
workforceEngagementSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
170
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
171
|
+
release: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
preview: "preview";
|
|
173
|
+
previous: "previous";
|
|
174
|
+
}>>;
|
|
175
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
176
|
+
export type ScratchOrgDef = z.infer<typeof ScratchOrgDefSchema>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScratchOrgDefSchema = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const features_1 = require("./features");
|
|
12
|
+
const settings_1 = require("./settings");
|
|
13
|
+
/**
|
|
14
|
+
* Scratch Org Definition Configuration
|
|
15
|
+
* The scratch org definition file contains the configuration values that determine the shape of the scratch org.
|
|
16
|
+
*/
|
|
17
|
+
exports.ScratchOrgDefSchema = zod_1.z
|
|
18
|
+
.object({
|
|
19
|
+
orgName: zod_1.z.string().optional().describe('The name of the scratch org.').meta({ title: 'Organization Name' }),
|
|
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
|
+
])
|
|
31
|
+
.describe('The Salesforce edition of the scratch org.'),
|
|
32
|
+
country: zod_1.z
|
|
33
|
+
.string()
|
|
34
|
+
.max(2)
|
|
35
|
+
.optional()
|
|
36
|
+
.describe("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."),
|
|
37
|
+
username: zod_1.z.string().optional().describe('A user name formatted like test-unique_identifier@orgName.net.'),
|
|
38
|
+
adminEmail: zod_1.z
|
|
39
|
+
.string()
|
|
40
|
+
.optional()
|
|
41
|
+
.describe('Email address of the Dev Hub user making the scratch org creation request.')
|
|
42
|
+
.meta({ title: 'Administrator Email Address' }),
|
|
43
|
+
description: zod_1.z
|
|
44
|
+
.string()
|
|
45
|
+
.optional()
|
|
46
|
+
.describe("The description is a good way to document the scratch org's purpose. You can view or edit the description in the Dev Hub. From App Launcher, select Scratch Org Info or Active Scratch Orgs, then click the scratch org number.")
|
|
47
|
+
.meta({ title: 'Description of the Org' }),
|
|
48
|
+
hasSampleData: zod_1.z
|
|
49
|
+
.boolean()
|
|
50
|
+
.default(false)
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('Valid values are true and false. False is the default, which creates an org without sample data.')
|
|
53
|
+
.meta({ title: 'Include Sample Data' }),
|
|
54
|
+
language: zod_1.z
|
|
55
|
+
.string()
|
|
56
|
+
.max(5)
|
|
57
|
+
.optional()
|
|
58
|
+
.describe('Default language for the country. To override the language set by the Dev Hub locale, see Supported Languages (https://help.salesforce.com/articleView?id=faq_getstart_what_languages_does.htm&type=5&language=en_US) for the codes to use in this field.')
|
|
59
|
+
.meta({ title: 'Default Language' }),
|
|
60
|
+
features: features_1.FeaturesSchema.optional().describe('Features to enable in the scratch org.'),
|
|
61
|
+
template: zod_1.z
|
|
62
|
+
.string()
|
|
63
|
+
.optional()
|
|
64
|
+
.describe('The template id for the scratch org shape. (Pilot)')
|
|
65
|
+
.meta({ title: 'Template ID' }),
|
|
66
|
+
settings: settings_1.SettingsSchema.optional().describe('Settings for the scratch org.'),
|
|
67
|
+
release: zod_1.z
|
|
68
|
+
.enum(['preview', 'previous'])
|
|
69
|
+
.optional()
|
|
70
|
+
.describe('Same Salesforce release as the Dev Hub org. Options are preview or previous. Can use only during Salesforce release transition periods.'),
|
|
71
|
+
})
|
|
72
|
+
.catchall(zod_1.z.unknown());
|
|
73
|
+
//# sourceMappingURL=scratchOrgDef.js.map
|