sf-plugin-data 0.0.0-stage → 0.2.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 +21 -0
- package/README.md +589 -2
- package/bin/run.js +4 -0
- package/docs/artifact-format.md +527 -0
- package/docs/capabilities.md +1208 -0
- package/docs/git-workflow.md +160 -0
- package/docs/handover.md +10446 -0
- package/lib/api.d.ts +7 -0
- package/lib/api.js +7 -0
- package/lib/artifacts/code-fields.d.ts +49 -0
- package/lib/artifacts/code-fields.js +142 -0
- package/lib/artifacts/data-graph-document.d.ts +29 -0
- package/lib/artifacts/data-graph-document.js +52 -0
- package/lib/artifacts/data-space-field.d.ts +65 -0
- package/lib/artifacts/data-space-field.js +98 -0
- package/lib/artifacts/data-stream-document.d.ts +264 -0
- package/lib/artifacts/data-stream-document.js +680 -0
- package/lib/artifacts/data-transform-document.d.ts +152 -0
- package/lib/artifacts/data-transform-document.js +560 -0
- package/lib/artifacts/dependency-selection.d.ts +51 -0
- package/lib/artifacts/dependency-selection.js +154 -0
- package/lib/artifacts/dlo-document.d.ts +93 -0
- package/lib/artifacts/dlo-document.js +253 -0
- package/lib/artifacts/enum-case.d.ts +39 -0
- package/lib/artifacts/enum-case.js +67 -0
- package/lib/artifacts/git-deploy-selection.d.ts +68 -0
- package/lib/artifacts/git-deploy-selection.js +474 -0
- package/lib/artifacts/identity-resolution-document.d.ts +133 -0
- package/lib/artifacts/identity-resolution-document.js +625 -0
- package/lib/artifacts/mapping-document.d.ts +1 -0
- package/lib/artifacts/mapping-document.js +1 -0
- package/lib/artifacts/native-calculated-insight-document.d.ts +142 -0
- package/lib/artifacts/native-calculated-insight-document.js +321 -0
- package/lib/artifacts/native-data-graph-document.d.ts +124 -0
- package/lib/artifacts/native-data-graph-document.js +780 -0
- package/lib/artifacts/native-dmo-document.d.ts +151 -0
- package/lib/artifacts/native-dmo-document.js +313 -0
- package/lib/artifacts/native-mapping-document.d.ts +67 -0
- package/lib/artifacts/native-mapping-document.js +187 -0
- package/lib/artifacts/native-relationship-document.d.ts +76 -0
- package/lib/artifacts/native-relationship-document.js +232 -0
- package/lib/artifacts/path-selector.d.ts +55 -0
- package/lib/artifacts/path-selector.js +167 -0
- package/lib/artifacts/read-deploy-input.d.ts +239 -0
- package/lib/artifacts/read-deploy-input.js +1359 -0
- package/lib/artifacts/segment-document.d.ts +183 -0
- package/lib/artifacts/segment-document.js +570 -0
- package/lib/artifacts/verbatim-document.d.ts +203 -0
- package/lib/artifacts/verbatim-document.js +339 -0
- package/lib/artifacts/write-data-graph.d.ts +17 -0
- package/lib/artifacts/write-data-graph.js +162 -0
- package/lib/artifacts/write-data-stream.d.ts +11 -0
- package/lib/artifacts/write-data-stream.js +175 -0
- package/lib/artifacts/write-data-transform.d.ts +11 -0
- package/lib/artifacts/write-data-transform.js +180 -0
- package/lib/artifacts/write-dlo.d.ts +11 -0
- package/lib/artifacts/write-dlo.js +158 -0
- package/lib/artifacts/write-identity-resolution.d.ts +18 -0
- package/lib/artifacts/write-identity-resolution.js +165 -0
- package/lib/artifacts/write-mapping-definition.d.ts +17 -0
- package/lib/artifacts/write-mapping-definition.js +127 -0
- package/lib/artifacts/write-member-export.d.ts +88 -0
- package/lib/artifacts/write-member-export.js +199 -0
- package/lib/artifacts/write-native-calculated-insight.d.ts +21 -0
- package/lib/artifacts/write-native-calculated-insight.js +176 -0
- package/lib/artifacts/write-native-dmo.d.ts +11 -0
- package/lib/artifacts/write-native-dmo.js +158 -0
- package/lib/artifacts/write-native-mapping.d.ts +11 -0
- package/lib/artifacts/write-native-mapping.js +157 -0
- package/lib/artifacts/write-native-relationship.d.ts +11 -0
- package/lib/artifacts/write-native-relationship.js +157 -0
- package/lib/artifacts/write-segment.d.ts +26 -0
- package/lib/artifacts/write-segment.js +212 -0
- package/lib/commands/data360/delete.d.ts +280 -0
- package/lib/commands/data360/delete.js +2297 -0
- package/lib/commands/data360/deploy.d.ts +303 -0
- package/lib/commands/data360/deploy.js +2400 -0
- package/lib/commands/data360/publish.d.ts +93 -0
- package/lib/commands/data360/publish.js +292 -0
- package/lib/commands/data360/retrieve.d.ts +322 -0
- package/lib/commands/data360/retrieve.js +1963 -0
- package/lib/commands/data360/segment/members/export.d.ts +101 -0
- package/lib/commands/data360/segment/members/export.js +318 -0
- package/lib/errors/codes/calculated-insight.d.ts +2 -0
- package/lib/errors/codes/calculated-insight.js +25 -0
- package/lib/errors/codes/data-graph.d.ts +2 -0
- package/lib/errors/codes/data-graph.js +22 -0
- package/lib/errors/codes/data-stream.d.ts +2 -0
- package/lib/errors/codes/data-stream.js +70 -0
- package/lib/errors/codes/data-transform.d.ts +2 -0
- package/lib/errors/codes/data-transform.js +35 -0
- package/lib/errors/codes/dependency.d.ts +2 -0
- package/lib/errors/codes/dependency.js +11 -0
- package/lib/errors/codes/dlo.d.ts +2 -0
- package/lib/errors/codes/dlo.js +31 -0
- package/lib/errors/codes/dmo.d.ts +2 -0
- package/lib/errors/codes/dmo.js +28 -0
- package/lib/errors/codes/general.d.ts +2 -0
- package/lib/errors/codes/general.js +57 -0
- package/lib/errors/codes/identity-resolution.d.ts +2 -0
- package/lib/errors/codes/identity-resolution.js +24 -0
- package/lib/errors/codes/mapping.d.ts +2 -0
- package/lib/errors/codes/mapping.js +42 -0
- package/lib/errors/codes/relationship.d.ts +2 -0
- package/lib/errors/codes/relationship.js +21 -0
- package/lib/errors/codes/segment.d.ts +2 -0
- package/lib/errors/codes/segment.js +49 -0
- package/lib/errors/registry.d.ts +60 -0
- package/lib/errors/registry.js +123 -0
- package/lib/plugin.d.ts +5 -0
- package/lib/plugin.js +5 -0
- package/lib/services/acquire-retrieve-selection.d.ts +43 -0
- package/lib/services/acquire-retrieve-selection.js +145 -0
- package/lib/services/bind-identity-resolution-dependencies.d.ts +53 -0
- package/lib/services/bind-identity-resolution-dependencies.js +238 -0
- package/lib/services/bind-segment-dependencies.d.ts +49 -0
- package/lib/services/bind-segment-dependencies.js +115 -0
- package/lib/services/bounded-reads.d.ts +17 -0
- package/lib/services/bounded-reads.js +42 -0
- package/lib/services/calculated-insight-sql-checks.d.ts +33 -0
- package/lib/services/calculated-insight-sql-checks.js +193 -0
- package/lib/services/command-dlo.d.ts +48 -0
- package/lib/services/command-dlo.js +103 -0
- package/lib/services/command-native-data-graph.d.ts +54 -0
- package/lib/services/command-native-data-graph.js +485 -0
- package/lib/services/command-native-data-stream.d.ts +104 -0
- package/lib/services/command-native-data-stream.js +257 -0
- package/lib/services/command-native-dmo.d.ts +124 -0
- package/lib/services/command-native-dmo.js +338 -0
- package/lib/services/command-native-mapping.d.ts +65 -0
- package/lib/services/command-native-mapping.js +129 -0
- package/lib/services/command-native-relationship.d.ts +46 -0
- package/lib/services/command-native-relationship.js +103 -0
- package/lib/services/cross-dataspace-deploy.d.ts +111 -0
- package/lib/services/cross-dataspace-deploy.js +493 -0
- package/lib/services/cross-dataspace-rename.d.ts +74 -0
- package/lib/services/cross-dataspace-rename.js +1314 -0
- package/lib/services/cross-dataspace-sql.d.ts +109 -0
- package/lib/services/cross-dataspace-sql.js +1301 -0
- package/lib/services/cross-space-context.d.ts +23 -0
- package/lib/services/cross-space-context.js +36 -0
- package/lib/services/crud-plan.d.ts +137 -0
- package/lib/services/crud-plan.js +408 -0
- package/lib/services/data-space-check.d.ts +89 -0
- package/lib/services/data-space-check.js +162 -0
- package/lib/services/data-space-prefix.d.ts +77 -0
- package/lib/services/data-space-prefix.js +127 -0
- package/lib/services/data-transform-space.d.ts +31 -0
- package/lib/services/data-transform-space.js +79 -0
- package/lib/services/delete-calculated-insight.d.ts +44 -0
- package/lib/services/delete-calculated-insight.js +101 -0
- package/lib/services/delete-data-transform.d.ts +52 -0
- package/lib/services/delete-data-transform.js +222 -0
- package/lib/services/delete-dmo-field.d.ts +211 -0
- package/lib/services/delete-dmo-field.js +472 -0
- package/lib/services/delete-identity-resolution.d.ts +43 -0
- package/lib/services/delete-identity-resolution.js +295 -0
- package/lib/services/delete-segment.d.ts +42 -0
- package/lib/services/delete-segment.js +248 -0
- package/lib/services/deploy-result.d.ts +54 -0
- package/lib/services/deploy-result.js +60 -0
- package/lib/services/escaped-copy.d.ts +23 -0
- package/lib/services/escaped-copy.js +88 -0
- package/lib/services/execute-calculated-insight-deploy.d.ts +42 -0
- package/lib/services/execute-calculated-insight-deploy.js +96 -0
- package/lib/services/execute-data-transform-deploy.d.ts +56 -0
- package/lib/services/execute-data-transform-deploy.js +168 -0
- package/lib/services/execute-native-identity-resolution-deploy.d.ts +48 -0
- package/lib/services/execute-native-identity-resolution-deploy.js +360 -0
- package/lib/services/execute-segment-deploy.d.ts +45 -0
- package/lib/services/execute-segment-deploy.js +393 -0
- package/lib/services/local-file-removal.d.ts +36 -0
- package/lib/services/local-file-removal.js +103 -0
- package/lib/services/native-calculated-insight.d.ts +87 -0
- package/lib/services/native-calculated-insight.js +164 -0
- package/lib/services/native-crm-data-stream.d.ts +91 -0
- package/lib/services/native-crm-data-stream.js +272 -0
- package/lib/services/native-data-graph-context.d.ts +12 -0
- package/lib/services/native-data-graph-context.js +139 -0
- package/lib/services/native-data-graph-crd.d.ts +261 -0
- package/lib/services/native-data-graph-crd.js +866 -0
- package/lib/services/native-data-stream.d.ts +329 -0
- package/lib/services/native-data-stream.js +1830 -0
- package/lib/services/native-dlo.d.ts +163 -0
- package/lib/services/native-dlo.js +402 -0
- package/lib/services/native-dmo.d.ts +191 -0
- package/lib/services/native-dmo.js +614 -0
- package/lib/services/native-mapping.d.ts +255 -0
- package/lib/services/native-mapping.js +1226 -0
- package/lib/services/native-relationship.d.ts +132 -0
- package/lib/services/native-relationship.js +512 -0
- package/lib/services/operation-diagnostic.d.ts +83 -0
- package/lib/services/operation-diagnostic.js +272 -0
- package/lib/services/preflight-calculated-insight-deploy.d.ts +58 -0
- package/lib/services/preflight-calculated-insight-deploy.js +95 -0
- package/lib/services/preflight-data-transform-deploy.d.ts +33 -0
- package/lib/services/preflight-data-transform-deploy.js +104 -0
- package/lib/services/preflight-identity-resolution-deploy.d.ts +107 -0
- package/lib/services/preflight-identity-resolution-deploy.js +281 -0
- package/lib/services/preflight-segment-deploy.d.ts +31 -0
- package/lib/services/preflight-segment-deploy.js +109 -0
- package/lib/services/publish-calculated-insight.d.ts +40 -0
- package/lib/services/publish-calculated-insight.js +95 -0
- package/lib/services/publish-segment.d.ts +65 -0
- package/lib/services/publish-segment.js +194 -0
- package/lib/services/readback-pace.d.ts +16 -0
- package/lib/services/readback-pace.js +23 -0
- package/lib/services/retrieve-data-transform.d.ts +26 -0
- package/lib/services/retrieve-data-transform.js +65 -0
- package/lib/services/retrieve-identity-resolution.d.ts +40 -0
- package/lib/services/retrieve-identity-resolution.js +87 -0
- package/lib/services/retrieve-inventory.d.ts +32 -0
- package/lib/services/retrieve-inventory.js +151 -0
- package/lib/services/retrieve-segment.d.ts +120 -0
- package/lib/services/retrieve-segment.js +502 -0
- package/lib/services/segment-lookup.d.ts +46 -0
- package/lib/services/segment-lookup.js +108 -0
- package/lib/services/segment-members.d.ts +144 -0
- package/lib/services/segment-members.js +402 -0
- package/lib/services/select-native-retrieve.d.ts +60 -0
- package/lib/services/select-native-retrieve.js +226 -0
- package/lib/services/settle-calculated-insight.d.ts +22 -0
- package/lib/services/settle-calculated-insight.js +53 -0
- package/lib/services/sql-tokens.d.ts +58 -0
- package/lib/services/sql-tokens.js +147 -0
- package/lib/transport/api-version.d.ts +36 -0
- package/lib/transport/api-version.js +89 -0
- package/lib/transport/bound-ssot.d.ts +27 -0
- package/lib/transport/bound-ssot.js +116 -0
- package/lib/transport/calculated-insight-rest.d.ts +28 -0
- package/lib/transport/calculated-insight-rest.js +62 -0
- package/lib/transport/connect-client.d.ts +129 -0
- package/lib/transport/connect-client.js +446 -0
- package/lib/transport/connect-diagnostic.d.ts +89 -0
- package/lib/transport/connect-diagnostic.js +331 -0
- package/lib/transport/data-graph-rest.d.ts +27 -0
- package/lib/transport/data-graph-rest.js +76 -0
- package/lib/transport/data-stream-rest.d.ts +62 -0
- package/lib/transport/data-stream-rest.js +348 -0
- package/lib/transport/data-transform-rest.d.ts +25 -0
- package/lib/transport/data-transform-rest.js +100 -0
- package/lib/transport/dlo-native-rest.d.ts +22 -0
- package/lib/transport/dlo-native-rest.js +89 -0
- package/lib/transport/dlo-rest.d.ts +23 -0
- package/lib/transport/dlo-rest.js +135 -0
- package/lib/transport/dmo-native-rest.d.ts +18 -0
- package/lib/transport/dmo-native-rest.js +55 -0
- package/lib/transport/dmo-rest.d.ts +30 -0
- package/lib/transport/dmo-rest.js +163 -0
- package/lib/transport/mapping-rest.d.ts +63 -0
- package/lib/transport/mapping-rest.js +341 -0
- package/lib/transport/project-metadata.d.ts +36 -0
- package/lib/transport/project-metadata.js +118 -0
- package/lib/transport/relationship-rest.d.ts +43 -0
- package/lib/transport/relationship-rest.js +201 -0
- package/package.json +96 -4
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** CLI hints for Data transform error codes. Long-form pages: docs/errors/data-transform/<CODE>.md */
|
|
2
|
+
export const hints = {
|
|
3
|
+
INCOMPLETE_TRANSFORM_INVENTORY: 'The list of data transforms in the org could not be read completely and consistently. Nothing was changed; rerun the command when the org is not changing transforms.',
|
|
4
|
+
INVALID_TRANSFORM_DELETE_SELECTION: 'A data transform delete names it exactly as -m data-transform:<Name>; with --changed-since, the deleted file must hold the transform its file name names. Fix the selection and rerun.',
|
|
5
|
+
INVALID_TRANSFORM_OFFSET: 'The plugin asked for an invalid page of the data transform list. Nothing was changed; this points to a plugin bug, so report it with the command you ran.',
|
|
6
|
+
INVALID_TRANSFORM_RESPONSE: 'Salesforce returned something other than a data transform record when the plugin read it. Nothing was changed; check the transform in Data Cloud and rerun.',
|
|
7
|
+
INVALID_TRANSFORM_SCOPE: 'Data transforms are only supported with API version auto or 68.0. Remove another --api-version value and rerun.',
|
|
8
|
+
INVALID_TRANSFORM_SELECTION: 'A data transform name or record ID has an invalid format. Use the API name as in the org (letters, digits, underscores) or the 18-character ID starting with 1dt, then rerun.',
|
|
9
|
+
INVALID_TRANSFORM_TARGET_ID: 'A data transform record ID does not have the expected format (1dt followed by 15 letters or digits). Nothing was changed; check the transform in Data Cloud, then rerun.',
|
|
10
|
+
PARTIAL_TRANSFORM_OUTPUT: 'The transform file was written, but the final check of its contents failed. Open data360/dataTransforms/<Name>.dataTransform.json, then rerun the retrieve with --overwrite.',
|
|
11
|
+
TRANSFORM_CONNECTION_DRIFT: 'The connection to the org changed while the command was running. Check that your org login is stable, then rerun the command.',
|
|
12
|
+
TRANSFORM_DATASPACE_MISMATCH: "The data transform (its file's c__dataSpace, or the transform of that name in the org) is in another data space than the run. A transform without any data space in the org is handled in default. Run with the --dataspace the message names, then rerun.",
|
|
13
|
+
TRANSFORM_DATASPACE_UNREADABLE: 'The plugin could not read the data space of the transform from the org (SOQL on MktDataTransform), so nothing was retrieved, changed or deleted. Check the org login and the message, then rerun.',
|
|
14
|
+
TRANSFORM_DELETE_IDENTITY_MISMATCH: 'The data transform list has no entry with the resolved ID and name together. Nothing was deleted; the transform changed during the run, so preview the delete again, then rerun.',
|
|
15
|
+
TRANSFORM_DELETE_INPUT_DRIFT: 'The delete inputs or the transform definition changed while the command was running. Nothing was deleted; wait until nobody is editing the transform, then rerun.',
|
|
16
|
+
TRANSFORM_DELETE_PROCESSING: 'The data transform is still PROCESSING, so the delete was not sent. Nothing was changed; wait until Data Cloud shows the transform ACTIVE, then rerun the delete.',
|
|
17
|
+
TRANSFORM_DELETE_UNCONFIRMED: 'The DELETE was sent but its result could not be confirmed. Do not rerun the delete; check in Data Cloud whether the transform still exists.',
|
|
18
|
+
TRANSFORM_DEPLOY_FAILED: 'The data transform deploy stopped on an error the plugin does not classify, such as an HTTP error from Salesforce. Read the message, check the transform in Data Cloud, then rerun.',
|
|
19
|
+
TRANSFORM_FILENAME_COLLISION: 'Another file in data360/dataTransforms differs only in case or trailing spaces, or holds a different transform. Rename or remove that file, then rerun the retrieve.',
|
|
20
|
+
TRANSFORM_IDENTITY_MISMATCH: 'The transform read from the org does not match the requested name or ID, for example a name that differs only in letter case. Use the name exactly as in the org, then rerun.',
|
|
21
|
+
TRANSFORM_PREFIX_MISMATCH: "A data transform name does not match its data space's prefix (ds2_ in dataspace2; no other space's prefix in default). A new transform is refused, an existing one only warned about.",
|
|
22
|
+
TRANSFORM_PREVIEW_LIMITATIONS: 'This preview only read from the org. Salesforce validation did not run; create or update was chosen by name from the current list of transforms.',
|
|
23
|
+
TRANSFORM_READBACK_MISMATCH: 'The transform was written, but reading it back did not return a transform with the written ID and name, or a written schedule with the frequency of the file. Check the transform in Data Cloud before deploying again.',
|
|
24
|
+
TRANSFORM_RETRIEVE_FAILED: 'The data transform could not be retrieved because of an error the plugin does not classify, such as an HTTP error. Read the message, check the name and your org login, then rerun.',
|
|
25
|
+
TRANSFORM_SCHEDULE_CHANGE: 'The deploy sends the schedule of the file, so the transform runs on that schedule in the target org ({ "frequency": "None" } turns it off). Remove the schedule key from the file to leave the org schedule alone.',
|
|
26
|
+
TRANSFORM_SCHEDULE_NOT_SENT: 'The transform definition was written, but the transform was still processing at the end of the wait, so its schedule was not sent. Wait until it is ACTIVE, then rerun the deploy.',
|
|
27
|
+
TRANSFORM_SCHEDULE_REJECTED: 'The transform definition was written, but Salesforce rejected the schedule of the file. Read its message, correct the schedule in the file, then rerun the deploy.',
|
|
28
|
+
TRANSFORM_SERVER_PROCESSING: 'The transform definition was written and read back, but Data Cloud is still processing it. Check its status in Data Cloud before relying on its output.',
|
|
29
|
+
TRANSFORM_TARGET_DRIFT: 'The transform in the org differs from the local file or changed during the run. Nothing was changed; retrieve it again, review the difference, then rerun.',
|
|
30
|
+
TRANSFORM_TARGET_NOT_RESOLVED: 'Two or more data transforms in the org have this name when letter case is ignored, so it does not resolve to one transform. Nothing was changed; rename or remove the duplicate in Data Cloud, then rerun.',
|
|
31
|
+
TRANSFORM_VALIDATION_FAILED: 'Salesforce validation rejected the new data transform, or its answer could not be read. Nothing was created; check the definition and DLOs in Data Cloud, then rerun.',
|
|
32
|
+
TRANSFORM_WRITE_IDENTITY_MISMATCH: 'Salesforce answered the write with a different or invalid transform ID or name. Check in Data Cloud which transform was changed before deploying again.',
|
|
33
|
+
TRANSFORM_WRITE_UNCONFIRMED: 'The transform write was sent, but Salesforce did not return a readable confirmation. Check in Data Cloud whether the transform was created or updated before deploying again.',
|
|
34
|
+
UNSUPPORTED_TRANSFORM_INPUT: 'The data transform file is not inert JSON, or its name, definition/definitions, a top-level key, schedule or data space is not one the plugin can send. Fix the file (the message names the key) and rerun.',
|
|
35
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** CLI hints for Dependency error codes. Long-form pages: docs/errors/dependency/<CODE>.md */
|
|
2
|
+
export const hints = {
|
|
3
|
+
DEPENDENCIES_PLANNED: 'A parent of this item is created earlier in the same deploy, or a dependent is deleted earlier in the same delete, so the preview does not check the item yet. No action is needed.',
|
|
4
|
+
DEPENDENCY_ACQUISITION_FAILED: 'A selected DMO or segment, or an object a segment uses, could not be read from the org. Check the names and your access, then rerun the retrieve.',
|
|
5
|
+
DEPENDENCY_CLOSURE_UNSUPPORTED: 'The definition of a retrieved DMO could not be checked for the components it depends on, so nothing was written. Check the DMO in the org, then rerun.',
|
|
6
|
+
DEPENDENCY_CYCLE: 'The selected components depend on each other in a loop, so no safe order exists. Split the selection or remove the circular reference, then rerun.',
|
|
7
|
+
DEPENDENCY_DUPLICATE_IDENTITY: 'Two selected files define the same component (same type and API name). Keep one file per component in the selection, then rerun.',
|
|
8
|
+
DEPENDENCY_IDENTITY_UNSUPPORTED: 'A selected component, or one it refers to, has an unsupported type, another data space than the component naming it, or an invalid API name. Fix the reference, then rerun.',
|
|
9
|
+
DEPENDENCY_INPUT_CHANGED: 'A selected file changed on disk while the command was running. Finish editing, then rerun the deploy.',
|
|
10
|
+
DEPENDENCY_LIMIT_EXCEEDED: 'The selection has more than 256 components or 512 dependency links. Split it into smaller selections and run them one after another.',
|
|
11
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** CLI hints for Data lake object error codes. Long-form pages: docs/errors/dlo/<CODE>.md */
|
|
2
|
+
export const hints = {
|
|
3
|
+
AMBIGUOUS_DLO_RESPONSE: 'Salesforce returned zero or several data lake objects where exactly one was expected. Check that the name is unique in the org, then rerun.',
|
|
4
|
+
DLO_DATASPACE_MISMATCH: 'The c__dataSpace list of the DLO file does not hold the data space of the run. Add it to the list, or run with the --dataspace the file lists.',
|
|
5
|
+
DLO_DATASPACE_NOT_SETTLED: 'The DLO data space change was sent, but the DLO did not list the planned data spaces in time. Read the DLO in the org before you deploy again.',
|
|
6
|
+
DLO_DATASPACE_REMOVAL_NOT_ALLOWED: 'The DLO belongs to data spaces its c__dataSpace list leaves out. Add them to the list, or rerun with --allow-dataspace-removal to remove the DLO from them.',
|
|
7
|
+
DLO_DELETE_NOT_CONFIRMED: 'Salesforce accepted the DLO DELETE, but the DLO could not be confirmed gone. Do not rerun the delete; read the DLO in the org first and act on what you find.',
|
|
8
|
+
DLO_DELETE_OTHER_DATASPACES: 'The DLO also belongs to other data spaces, and a delete removes it from all of them. Deploy a shorter c__dataSpace list with --allow-dataspace-removal instead.',
|
|
9
|
+
DLO_DELETE_UNCONFIRMED: 'The DLO DELETE got an unexpected answer, so its outcome is unknown. Read the DLO in the org before you run the delete again.',
|
|
10
|
+
DLO_DEPENDENCIES_UNCONFIRMED: 'The dependency list of the DLO could not be read in the expected form, so the delete was not started. Check access to the DLO in the org and rerun.',
|
|
11
|
+
DLO_DEPENDENCY_EXISTS: 'Other components still depend on this DLO. Delete the listed dependents first, or select them in the same command as dmo:<Name> or mapping:<Name>.',
|
|
12
|
+
DLO_DEPENDENCY_PENDING: 'Salesforce still lists the dependents this command deleted, so the DLO itself was not deleted. Wait until its dependency list is empty, then rerun the delete.',
|
|
13
|
+
DLO_HTTP_ERROR: 'Salesforce answered a DLO request with an HTTP error. Read the status and API detail in the message, fix access, name or input, then rerun.',
|
|
14
|
+
DLO_MEMBERSHIP_UPDATE_REJECTED: 'Salesforce answered the data space member change without success, so the DLO data spaces were not changed. Read the message, fix the cause and rerun.',
|
|
15
|
+
DLO_REQUEST_UNCONFIRMED: 'A DLO request ended without a readable answer from Salesforce. Check the org connection, inspect the target if a write was sent, then rerun.',
|
|
16
|
+
DLO_TARGET_IDENTITY_MISMATCH: 'The org returned a DLO whose name does not match the one requested. Check the exact API name in the org and rerun; inspect the target first if a write was sent.',
|
|
17
|
+
INVALID_DLO_DOCUMENT: 'The DLO definition from the org does not fit the plugin file format. Inspect the DLO in the org (label, data space, event field) and report it if it looks normal.',
|
|
18
|
+
INVALID_DLO_FIELD: 'A field of the DLO read from the org does not fit the plugin file format. Inspect the field names and types of the DLO in the org.',
|
|
19
|
+
INVALID_DLO_NAME: 'The DLO API name is not valid. Use the exact name: a letter first, then letters, digits or underscores, ending in __dll.',
|
|
20
|
+
INVALID_DLO_PRIMARY_KEY: 'The DLO does not have exactly one usable primary-key field. Mark one ordinary field (not KQ_ or a system field) with isPrimaryKey true, then rerun.',
|
|
21
|
+
INVALID_DLO_RESPONSE: 'Salesforce returned a DLO answer the plugin could not read. Inspect the DLO in the org, especially if a write was sent, then rerun.',
|
|
22
|
+
INVALID_DLO_TARGET_ID: 'The org returned a DLO record ID in an unexpected form, so the write or delete was not sent. Inspect the DLO in the org and rerun.',
|
|
23
|
+
PARTIAL_DLO_OUTPUT: 'The DLO file was written but could not be verified afterwards. Check the file under data360/dlo, then rerun the retrieve with --overwrite.',
|
|
24
|
+
UNSUPPORTED_DLO_CATEGORY_CHANGE: 'The category of an existing DLO cannot be changed. Set category in the file back to the org value, or create the DLO under a new name.',
|
|
25
|
+
UNSUPPORTED_DLO_DATASPACE: 'The DLO in the org lists no usable data space, or not the data space of the run. Pass a --dataspace the DLO belongs to (its c__dataSpace list) and rerun.',
|
|
26
|
+
UNSUPPORTED_DLO_EVENT_FIELD_CHANGE: 'The event date field of an existing DLO cannot be changed. Set eventDateTimeFieldName back to the org value, or leave it out of the file.',
|
|
27
|
+
UNSUPPORTED_DLO_FIELD_ADDITION: 'A field added to an existing DLO cannot be a primary key or a generated field. Remove it from the file or add it as an ordinary field.',
|
|
28
|
+
UNSUPPORTED_DLO_FIELD_CHANGE: 'An existing DLO field was changed or removed in the file, which Salesforce does not allow. Restore the field as it is in the org; only new fields can be added.',
|
|
29
|
+
UNSUPPORTED_DLO_MEMBERSHIP: 'A data space membership of the DLO carries more than its name (such as a record filter), which the plugin does not model. The DLO is written as-is; change it in the org.',
|
|
30
|
+
UNSUPPORTED_DLO_SELECTION: 'The target org or DLO name passed to a DLO request is not valid. Use a real --target-org alias or username and exact DLO names ending in __dll.',
|
|
31
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** CLI hints for Data model object error codes. Long-form pages: docs/errors/dmo/<CODE>.md */
|
|
2
|
+
export const hints = {
|
|
3
|
+
DMO_DATASPACE_MISMATCH: "The DMO file's c__dataSpace is not the data space of the run, or the DMO in the org is in another one. Run with the --dataspace the file names, or correct c__dataSpace, then rerun.",
|
|
4
|
+
DMO_DELETE_NOT_CONFIRMED: 'Salesforce accepted the DMO DELETE, but the DMO could not be confirmed gone. Do not rerun the delete; read the DMO in the org first and act on what you find.',
|
|
5
|
+
DMO_DELETE_UNCONFIRMED: 'The DMO DELETE got an unexpected answer, so its outcome is unknown. Read the DMO in the org before you run the delete again.',
|
|
6
|
+
DMO_FIELD_KEY_NOT_SENT: 'Salesforce takes no input for the named DMO field keys, so the file values were not sent and the org keeps its own. Change them in the Data Model UI if needed.',
|
|
7
|
+
DMO_FIELD_NOT_FOUND: 'A field named for removal does not exist on the DMO in the org. Check the exact field API names, then rerun.',
|
|
8
|
+
DMO_FIELD_REMOVAL_FAILED: 'The Metadata API did not confirm the field removal. Read the DMO and its mappings in the org to see which fields remain before another attempt.',
|
|
9
|
+
DMO_FIELD_REMOVAL_MAPPED: 'A field to remove is still mapped. Drop its pair from the mapping first, or select every mapping holding it in the same deploy with that pair removed from each file.',
|
|
10
|
+
DMO_FIELD_REMOVAL_PLANNED: 'Fields missing from the DMO file will be removed from the org. If that is not what you want, add them back to the file before you deploy.',
|
|
11
|
+
DMO_FIELD_REMOVAL_SIDE_EFFECT: 'Salesforce changed more than the removed fields and their mapping pairs. Nothing was rolled back; read the DMO and its mappings before any further action.',
|
|
12
|
+
DMO_FIELD_REMOVAL_UNAVAILABLE: 'The plugin had no Metadata API route for the planned field removal, so nothing was written. Rerun the command; if it persists, report it with the --json output.',
|
|
13
|
+
DMO_HTTP_ERROR: 'Salesforce answered a DMO request with an HTTP error. Read the status and API detail in the message, fix access, name or input, then rerun.',
|
|
14
|
+
DMO_PERSISTENCE_UNCONFIRMED: 'The DMO change was sent, but reading it back did not show it. Read the DMO in the org before another attempt; the change may still have taken effect.',
|
|
15
|
+
DMO_PREFIX_MISMATCH: "A custom DMO name does not match its data space's prefix (ds2_ in dataspace2; no other space's prefix in default). A new DMO is refused, an existing one only warned about.",
|
|
16
|
+
DMO_REQUEST_UNCONFIRMED: 'A DMO request ended without a readable answer from Salesforce. Check the org connection, inspect the target if a write was sent, then rerun.',
|
|
17
|
+
DMO_TARGET_IDENTITY_MISMATCH: 'The org returned a DMO whose name does not match the one requested. Check the exact API name in the org and rerun; inspect the target first if a write was sent.',
|
|
18
|
+
INVALID_DMO_DOCUMENT: 'The DMO definition from the org does not fit the plugin file format. Inspect the DMO in the org (name, data space, label, category, fields) and report it if it looks normal.',
|
|
19
|
+
INVALID_DMO_FIELD: 'A DMO field name or definition is not valid. Use exact custom field names ending in __c; for a field read from the org, inspect that field.',
|
|
20
|
+
INVALID_DMO_NAME: 'The DMO API name is not valid. Use the exact name: a letter first, then letters, digits or underscores, ending in __dlm.',
|
|
21
|
+
INVALID_DMO_RESPONSE: 'Salesforce returned a DMO answer the plugin could not read. Inspect the DMO in the org, especially if a write was sent, then rerun.',
|
|
22
|
+
PARTIAL_DMO_OUTPUT: 'The DMO file was written but could not be verified afterwards. Check the file under data360/dmo, then rerun the retrieve with --overwrite.',
|
|
23
|
+
UNSUPPORTED_DMO_DATASPACE: 'The DMO in the org is not in the data space of the run. Pass the --dataspace that holds the DMO (its c__dataSpace), or leave the flag out for default, and rerun.',
|
|
24
|
+
UNSUPPORTED_DMO_FIELD_ADDITION: 'This field cannot be added to the existing DMO. New fields must not be primary keys or generated, and on a standard DMO need a name without a namespace.',
|
|
25
|
+
UNSUPPORTED_DMO_FIELD_CHANGE: 'The file changes or removes a DMO field in a way the plugin cannot apply. Restore it as in the org; to remove a custom field, deploy with --allow-field-removal.',
|
|
26
|
+
UNSUPPORTED_DMO_SELECTION: 'The target org passed to a DMO request is not valid. Pass --target-org with the alias or username of an authenticated org.',
|
|
27
|
+
UNSUPPORTED_DMO_TARGET: 'The plugin does not send this DMO write: a new DMO with a namespaced name, or a write to a DMO whose read has no name.',
|
|
28
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** CLI hints for General error codes. Long-form pages: docs/errors/general/<CODE>.md */
|
|
2
|
+
export const hints = {
|
|
3
|
+
ACQUISITION_FAILED: 'The plugin could not read a DMO definition through the Metadata API. Check that the org session is valid and the DMO exists in the target, then rerun.',
|
|
4
|
+
AUTHENTICATION_FAILED: 'Salesforce rejected the session or the org could not be loaded. Check the org with sf org display, log in again with sf org login web if needed, then rerun.',
|
|
5
|
+
BLOCKED_GIT_LIFECYCLE: 'The Git changes include a rename (also one split across commit, index and worktree), a conflict or a deleted file the plugin cannot identify. Stage renames so Git can detect them, or select the files with --source-dir or -m.',
|
|
6
|
+
CROSS_DATASPACE_COPY_CONFLICT: 'The translated copy of a file would go to a path that already holds other content. Existing files are never changed, so nothing was sent. Move or remove that file, then rerun.',
|
|
7
|
+
CROSS_DATASPACE_RULESETS_READ_FAILED: 'A file of another data space names an identity resolution output, and the ruleset list that places it could not be read. Nothing was sent; check the org session, then rerun.',
|
|
8
|
+
CROSS_DATASPACE_UNRESOLVED: "A name in a file of another data space cannot be placed in the run's data space by rule, so nothing was sent. Read which name and why, change the selection or the file, then rerun.",
|
|
9
|
+
CROSS_DATASPACE_UNSUPPORTED: '--allow-cross-dataspace cannot translate this kind of file yet (STL transforms with an unknown node, transforms other than STL and DCSQL, streams). Nothing was sent. Deploy those in their own data space.',
|
|
10
|
+
DATASPACE_READ_FAILED: 'The list of data spaces could not be read completely from the org, so nothing was read or written. Check the org session and Data Cloud access, then rerun.',
|
|
11
|
+
DELETE_FAILED: 'The delete stopped for a reason without a more specific code. Read the message, check the item outcome and inspect the target before trying again; nothing is retried.',
|
|
12
|
+
DELETE_PHASE_NOT_SETTLED: 'Salesforce is still processing a deletion of this run, so the later phases were not started. Wait until it reads absent, then rerun the same delete.',
|
|
13
|
+
DEPLOY_EXECUTION_BLOCKED: 'At least one item was blocked, so the deploy stopped before or between writes. Read the item lines above for the reason, fix it, then rerun the same deploy.',
|
|
14
|
+
DEPLOY_EXECUTION_FAILED: 'The deploy failed and a write may already have happened. Read the item lines, inspect the target with retrieve or deploy --preview, then decide whether to rerun.',
|
|
15
|
+
DEPLOY_FRESH_ADMISSION_BLOCKED: 'Right before writing this item, a fresh check found something different from the earlier check, so it and later items were not written. Run deploy --preview to see the current state, then rerun.',
|
|
16
|
+
DEPLOY_PREVIEW_BLOCKED: 'The preview found at least one item that a deploy would refuse. Read the item lines above for the reason and fix it before running the deploy without --preview.',
|
|
17
|
+
DEPLOY_PREVIEW_FAILED: 'The preview could not finish. Read the message for the cause, such as session, selection or target access, fix it and run the preview again. Nothing was written.',
|
|
18
|
+
DESTRUCTIVE_CONFIRMATION_REQUIRED: 'A delete with --changed-since needs explicit confirmation. Check it with --preview first, then rerun the same delete with --confirm-delete.',
|
|
19
|
+
DUPLICATE_IDENTITY: 'Two selected files describe the same component. Keep one file per component in the selection, for example by narrowing --source-dir, then rerun.',
|
|
20
|
+
EXECUTION_UNCONFIRMED: 'A write was sent but its result could not be confirmed, so it may have taken effect. Inspect the target with retrieve or deploy --preview before running the deploy again.',
|
|
21
|
+
HTML_ESCAPED_FILE: 'The file holds HTML-escaped text (such as & or ') where the org holds the character itself; Salesforce would store the entities literally, so nothing was written. Retrieve the component again, or write the characters themselves.',
|
|
22
|
+
INVALID_ASYNC_SCOPE: '--async works only when the selection contains an identity resolution. Remove --async, or select an identity-resolution file or -m identity-resolution:<Name>.',
|
|
23
|
+
INVALID_DATASPACE_FIELD: 'The c__dataSpace key of the file is missing or not valid: a data space name (for a data transform or data graph, the one its definition names), or for a DLO a list of names without repeats. Correct the file or retrieve it again.',
|
|
24
|
+
INVALID_DRAFT_SCOPE: '--draft applies only to calculated insights at API auto or 68.0. Select only calculated insights and drop other API versions.',
|
|
25
|
+
INVALID_FIELD_DELETE_SELECTION: '--field needs exactly one -m dmo:<Name__dlm> and no other selector, --changed-since or --delete-dlo; --output-dir works only with --field.',
|
|
26
|
+
INVALID_GIT_SELECTION: 'The --changed-since reference or the Git output could not be used. Pass a commit, branch or tag that exists locally and run the command inside the Git repository.',
|
|
27
|
+
INVALID_REQUEST: 'The plugin refused to build the Salesforce request from these inputs. Check --target-org, --api-version and the selected names, and that the org uses an https instance URL.',
|
|
28
|
+
INVALID_SCOPE: 'This family does not support the requested --api-version, or the run could not use the data space. Use --api-version auto (or a version the family allows), then rerun.',
|
|
29
|
+
INVALID_SELECTION: 'The selection is not valid for this command. Check the -m type:ApiName syntax, the --source-dir paths and flags that cannot be combined, then rerun.',
|
|
30
|
+
INVALID_SOURCE: 'A selected file is not a valid definition for its file type, or its content names a different component than its file name. Fix the file, or retrieve it again, then rerun.',
|
|
31
|
+
INVALID_WAIT_TIMEOUT_SCOPE: '--wait-timeout applies only to a deploy that holds a data graph or to a segment publish, and must be whole seconds. Remove it, or select a data graph or a segment.',
|
|
32
|
+
LEGACY_DATASPACE_KEY: 'The file still has an old data space key (identity.dataSpace, spec.segmentOn.dataSpace, or dataSpace in a calculated insight or an identity resolution reference). Move it to the top-level c__dataSpace key, or retrieve again.',
|
|
33
|
+
LOCAL_FILE_REMOVAL_FAILED: 'The deletion in the org is confirmed, but a local file was not removed. Do not repeat the delete; check the file named in the message and remove it yourself.',
|
|
34
|
+
LOCAL_REFRESH_FAILED: 'The fields were deleted in the org, but some project files were not refreshed. Do not repeat the delete; run sf data360 retrieve with --overwrite for the DMO and its mappings.',
|
|
35
|
+
NATIVE_INVENTORY_FAILED: 'Listing the DLOs, DMOs or mappings in the org failed, so nothing was retrieved. Check the org session and permissions in the message, then rerun or select exact type:ApiName members.',
|
|
36
|
+
NATIVE_INVENTORY_UNCONFIRMED: 'The list of DLOs or DMOs from the org could not be confirmed complete, so nothing was retrieved. Retrieve exact members with -m dmo:<Name> or -m dlo:<Name>, or rerun later.',
|
|
37
|
+
NATIVE_PARENT_SETTLEMENT_UNCONFIRMED: 'A parent DLO or DMO was written but could not be confirmed ready, so dependent items were not deployed. Wait, check the parent with deploy --preview, then rerun.',
|
|
38
|
+
NATIVE_RETRIEVE_FAILED: 'This DLO, DMO, mapping or relationship could not be retrieved for a reason without a more specific code. Read the message, check the org session, then rerun.',
|
|
39
|
+
OUTPUT_CHANGED: 'The target file changed on disk while the plugin was writing it, so the write stopped. Make sure nothing else edits the project during the run, then rerun.',
|
|
40
|
+
OUTPUT_FAILED: 'The retrieved definition could not be written to the project. Check that the output folder is writable, has free space and that the temp folder settings are valid, then rerun.',
|
|
41
|
+
OVERWRITE_REQUIRED: 'A different version of this file already exists in the project. Compare it with the org, then rerun with --overwrite (-x) to replace it, or keep your local file.',
|
|
42
|
+
PREFLIGHT_FAILED: 'Checking this item against the target failed, so nothing was deployed. Read the message for the cause, such as session, permissions or input, fix it and run deploy --preview again.',
|
|
43
|
+
PROCESSING_ACKNOWLEDGEMENT_REQUIRED: 'This create or update starts processing in Data Cloud and needs your explicit consent. Check it with --preview, then rerun with --allow-processing.',
|
|
44
|
+
REMOVE_FAILED: 'Removing this local file failed after a confirmed deletion. Close programs that hold the file, check permissions, then delete it yourself; do not repeat the delete.',
|
|
45
|
+
REQUEST_FAILED: 'Salesforce rejected or did not complete a request. Read the HTTP status and request ID in the message, fix the cause such as permissions, a missing object or limits, then rerun.',
|
|
46
|
+
RETRIEVE_FAILED: 'Retrieval stopped for a reason without a more specific code. Read the message, check the org session and output folder, then rerun the retrieve.',
|
|
47
|
+
STANDARD_CLI_UNAVAILABLE: 'The globally installed Salesforce CLI npm package was not found. Install it with npm install --global @salesforce/cli, then rerun the retrieve.',
|
|
48
|
+
STANDARD_RETRIEVE_UNKNOWN: 'The Salesforce CLI process ended without an exit code, for example after a timeout or with too much output. Check that sf runs on its own, then rerun the retrieve.',
|
|
49
|
+
TARGET_ORG_REQUIRED: 'No usable target org was found. Pass --target-org <alias or username>, or set a default with sf config set target-org, then rerun.',
|
|
50
|
+
UNKNOWN_DATASPACE: 'The org has no data space of that name. Check --dataspace and the c__dataSpace values of the selected files against the data spaces the message lists.',
|
|
51
|
+
UNMODELLED_RESPONSE: 'Retrieve wrote this object as-is because the plugin could not read its answer from the org, and the check gave no more specific reason. Manage the object in Salesforce, or report the output.',
|
|
52
|
+
UNSAFE_PATH: 'The plugin refused a file path because it is a link, a hard-linked file, a folder or lies outside the allowed folder. Use plain files and folders inside the project, then rerun.',
|
|
53
|
+
UNSAFE_SOURCE: 'A selected source file is missing, linked, too large or changed while the plugin read it. Use plain files under 1 MiB and do not edit them during the run, then rerun.',
|
|
54
|
+
UNSAFE_TEMP: 'On Windows, TEMP, TMP, TMPDIR or the Node.js temp folder is not the temp folder the plugin accepts. Set them to the same absolute folder for this shell, then rerun.',
|
|
55
|
+
UNSUPPORTED_DATASPACE_FILTER: 'A c__dataSpace entry is a filtered membership ({name, filter}), which the plugin does not deploy yet. Use the plain data space name, or set the filter in the org.',
|
|
56
|
+
VERBATIM_NOT_DEPLOYABLE: 'The named file was retrieved as-is because the plugin cannot represent that object, so it cannot be deployed. Change the object in the org, or select a file the plugin can represent.',
|
|
57
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** CLI hints for Identity resolution error codes. Long-form pages: docs/errors/identity-resolution/<CODE>.md */
|
|
2
|
+
export const hints = {
|
|
3
|
+
IDENTITY_RESOLUTION_ACQUISITION_FAILED: 'The identity resolution ruleset could not be read from the org. Check the API name, your Data Cloud access and any Salesforce detail, then rerun the retrieve.',
|
|
4
|
+
IDENTITY_RESOLUTION_ASYNC_DEPENDENTS: 'The selection holds an identity resolution and a graph, calculated insight or Segment that uses its unified DMO, so --async cannot be used. Drop --async, or deploy the dependents in a later run.',
|
|
5
|
+
IDENTITY_RESOLUTION_BINDING_UNQUALIFIED: 'The DMOs and fields this ruleset uses, or the unified objects it creates, could not be verified in the target org. Check that they exist with the expected fields, then rerun.',
|
|
6
|
+
IDENTITY_RESOLUTION_DATASPACE_MISMATCH: "The ruleset file's c__dataSpace, or the ruleset of that name in the org, is in another data space than the run. Rerun with the --dataspace the message names, or correct c__dataSpace.",
|
|
7
|
+
IDENTITY_RESOLUTION_DATASPACE_UNREADABLE: 'The org answered the read of the ruleset without a usable data space (dataSpaceName), so the plugin cannot tell where it is and wrote or changed nothing. Rerun; if it repeats, check the ruleset in Data Cloud.',
|
|
8
|
+
IDENTITY_RESOLUTION_DELETE_ADMISSION_FAILED: 'The ruleset could not be matched in the org, or its inputs and outputs could not be verified, so nothing was deleted. Check it in Data Cloud, then preview the delete again.',
|
|
9
|
+
IDENTITY_RESOLUTION_DELETION_UNCONFIRMED: 'The delete request was sent, but the absence of the ruleset could not be confirmed. Do not resend it; preview the delete or retrieve the ruleset to see whether it still exists.',
|
|
10
|
+
IDENTITY_RESOLUTION_DEPENDENCY_OTHER_DATASPACE: "A DMO, DLO source or unified output the ruleset names is in another data space than the ruleset. Name the component of the ruleset's own data space (ds2_Individual__dlm with FirstName__c outside default), then rerun.",
|
|
11
|
+
IDENTITY_RESOLUTION_EFFECT_ACKNOWLEDGEMENT_REQUIRED: 'Creating or updating a ruleset starts processing in Salesforce, and a create also adds unified objects to the org. Rerun with --allow-processing to accept this.',
|
|
12
|
+
IDENTITY_RESOLUTION_FRESH_ADMISSION_BLOCKED: 'Right before writing, a fresh check of the ruleset gave a different result than the first check, so the batch stopped. Preview again to see the current state, then rerun.',
|
|
13
|
+
IDENTITY_RESOLUTION_IDENTITY_MISMATCH: 'The org returned a ruleset whose name differs from the one requested, so no file was written. Check the exact ruleset API name, then rerun.',
|
|
14
|
+
IDENTITY_RESOLUTION_NAME_NOT_STORED: "In a non-default data space Salesforce names a ruleset <prefix>_<type>_<rulesetId>; this file's name lacks the prefix, so a create could not be read back. Nothing was sent; rename the file and identity.apiName, or retrieve the ruleset.",
|
|
15
|
+
IDENTITY_RESOLUTION_NAME_TYPE_MISMATCH: 'A new ruleset must be named after its configuration type, as <type> or <type>_<rulesetId> (with the data space prefix, <prefix>_<type>_<rulesetId>, outside default). Rename the file and its apiName to match, then rerun.',
|
|
16
|
+
IDENTITY_RESOLUTION_NATIVE68_ADMISSION_FAILED: 'The ruleset, its inputs or the target could not be verified before the write, so nothing was changed. Check the file, the referenced DMOs and the org, then rerun with --preview.',
|
|
17
|
+
IDENTITY_RESOLUTION_NATIVE68_MUTATION_UNCONFIRMED: 'The ruleset write was sent, but its result could not be confirmed. Do not resend it blindly; rerun the same deploy with --preview to see the current state.',
|
|
18
|
+
IDENTITY_RESOLUTION_NOT_SETTLED: 'The ruleset is still publishing or deleting in the org, so it cannot be changed now. Wait until it settles, then rerun the same command.',
|
|
19
|
+
IDENTITY_RESOLUTION_TARGET_UNQUALIFIED: 'The ruleset could not be looked up in the target org; the error was not a plain not found. Check your Data Cloud access and any Salesforce detail, then rerun.',
|
|
20
|
+
IDENTITY_RESOLUTION_UPDATE_UNQUALIFIED: 'The file changes the configuration type or secondary DMO of an existing ruleset, which an update cannot carry. Revert those fields, or delete the ruleset and deploy it again.',
|
|
21
|
+
INCOMPLETE_IDENTITY_RESOLUTION: 'The answer for the ruleset was incomplete, so no file was written. Rerun the retrieve; if it repeats, check the ruleset in Data Cloud.',
|
|
22
|
+
PARTIAL_IDENTITY_RESOLUTION_OUTPUT: 'The ruleset file was written, but the final check of it failed, so it may not match the org. Inspect the .identityResolution.json file and retrieve again with --overwrite.',
|
|
23
|
+
UNSUPPORTED_IDENTITY_RESOLUTION_CONFIGURATION: 'The ruleset lacks a required key or has a shape, value or name deploy cannot send. Retrieve keeps unknown keys and nulls, or writes the ruleset as-is; deploy refuses and names the key path.',
|
|
24
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** CLI hints for Mapping error codes. Long-form pages: docs/errors/mapping/<CODE>.md */
|
|
2
|
+
export const hints = {
|
|
3
|
+
AMBIGUOUS_MAPPING_TARGET: "More than one mapping in the org matches the same name or the same source DLO and target DMO, so the plugin cannot tell which one is meant. Inspect the DMO's mappings in the org.",
|
|
4
|
+
INVALID_DEFINITION: 'The mapping definition read from the org does not have the expected form, so it was not written. Check the mapping in the org, or retrieve it with -m mapping:<ApiName>.',
|
|
5
|
+
INVALID_MAPPING_BINDING: 'A mapping lookup was asked for a DMO or DLO name that is not a valid Name__dlm or Name__dll API name. Check the source and target object names of the mapping.',
|
|
6
|
+
INVALID_MAPPING_BODY: "The mapping write request the plugin built did not have the expected shape, so it was not sent. Check the mapping file's pairs; if the file is valid, report the problem.",
|
|
7
|
+
INVALID_MAPPING_DOCUMENT: 'The mapping file, or the mapping read from the org, does not match the mapping format. Check schemaVersion, kind, identity, the __dll and __dlm names and that fieldMappings is not empty.',
|
|
8
|
+
INVALID_MAPPING_FIELD: 'A field pair has an unknown key, a field name that is not Name__c, or repeats another pair or pair name. Fix the fieldMappings entries of the mapping file.',
|
|
9
|
+
INVALID_MAPPING_NAME: 'The mapping API name is not valid: it must start with a letter and use only letters, digits and underscores, at most 240 characters. Correct the mapping name.',
|
|
10
|
+
INVALID_MAPPING_RESPONSE: 'Salesforce answered a mapping request with a body the plugin could not read as a mapping. Rerun the command; if it repeats, inspect the mapping in the org.',
|
|
11
|
+
MAPPING_ACTIVATES_STANDARD_DMO: 'This is the first mapping onto a standard DMO, and creating it enables that DMO permanently. Deleting the mapping later does not undo that; continue only if intended.',
|
|
12
|
+
MAPPING_DATASPACE_MISMATCH: "The mapping file's c__dataSpace is not the data space of the run. Run with the --dataspace the file names, or correct c__dataSpace.",
|
|
13
|
+
MAPPING_DELETE_FAILED: 'The Metadata API did not confirm the destructive deployment that deletes the mapping. Read the problems shown, check whether the mapping still exists, then fix the cause.',
|
|
14
|
+
MAPPING_DELETE_SIDE_EFFECT: "The mapping was deleted, but the DMO's other mappings or its fields changed too. Inspect the DMO and its mappings in the org; nothing was rolled back.",
|
|
15
|
+
MAPPING_DELETION_UNCONFIRMED: "The deletion was sent, but the mapping could still be read after the plugin's checks. Do not repeat the delete at once; read the mapping again later to see if it is gone.",
|
|
16
|
+
MAPPING_DEPENDENCIES_PLANNED: "The mapping's source DLO or target DMO is created earlier in this same deploy, so the preview cannot compare the mapping yet. Run the deploy to check it after its parents.",
|
|
17
|
+
MAPPING_DEPENDENCY_IDENTITY_MISMATCH: "The source DLO or target DMO read from the org did not match the name or data space the mapping names. Check the mapping's object names and data space, then rerun.",
|
|
18
|
+
MAPPING_FIELD_NOT_FOUND: 'A field pair names a field that does not exist on the source DLO or the target DMO. Create the field first or correct the pair in the mapping file.',
|
|
19
|
+
MAPPING_FIELD_TYPES_DIFFER: 'Some pairs map fields of different data types. Salesforce accepts this; check the listed pairs if the difference is not intended.',
|
|
20
|
+
MAPPING_GENERATED_PAIRS_UNPROVEN: 'The mapping was not saved: its source DLO or target DMO could not be read to leave out the pairs Salesforce generates. Check both objects exist and are readable, then rerun.',
|
|
21
|
+
MAPPING_HTTP_ERROR: 'Salesforce rejected a mapping request with an HTTP error. Read the status and API detail in the message, fix the cause (name, access, org state), then rerun.',
|
|
22
|
+
MAPPING_INVENTORY_UNCONFIRMED: "The list of the DMO's mappings could not be confirmed against the individual mapping reads. Wait for pending mapping changes to finish, then rerun.",
|
|
23
|
+
MAPPING_INVENTORY_UNQUALIFIED: 'Retrieving all mappings is not supported together with the other selected families. Select mappings by name (mapping:<Name>) or retrieve mapping in its own run.',
|
|
24
|
+
MAPPING_LABEL_READ_FAILED: 'The Metadata API read of the mapping, needed to compare or change its label, failed, so no label update was sent. Check the org login and the connection, then rerun the deploy.',
|
|
25
|
+
MAPPING_LABEL_UPDATE_REJECTED: "Salesforce refused the Metadata API update of the mapping's label, so the label was not changed. Read Salesforce's text in the message, correct spec.label, then rerun.",
|
|
26
|
+
MAPPING_LAST_MAPPING_DELETE_BLOCKED: 'Salesforce does not delete the last mapping of a custom DMO. Delete the DMO instead (sf data360 delete --metadata dmo:<Name>__dlm), which removes its mapping too.',
|
|
27
|
+
MAPPING_PARENTS_REQUIRED: "The plugin had no way to read the mapping's source DLO and target DMO, so it could not leave out generated pairs. This is a plugin fault; report it with the command you ran.",
|
|
28
|
+
MAPPING_PARENT_CHANGED: 'The source DLO or target DMO changed while the mapping was being updated. Let other changes finish, inspect the mapping in the org, then rerun the deploy.',
|
|
29
|
+
MAPPING_PERSISTENCE_UNCONFIRMED: 'The mapping write was sent, but reading it back did not show the expected pairs or label. Inspect the mapping in the org before deploying again; nothing was retried or rolled back.',
|
|
30
|
+
MAPPING_PROTECTED_LAYOUT_UNPROVEN: 'The plugin could not prove which pairs of this mapping must stay (key, key qualifier and system pairs), so it removes none. Keep those pairs, or change the mapping in the org.',
|
|
31
|
+
MAPPING_PROTECTED_PAIR_REQUIRED: 'The mapping file leaves out a pair that must never be unmapped, such as the primary key pair. Add that pair back to fieldMappings and rerun.',
|
|
32
|
+
MAPPING_REQUEST_UNCONFIRMED: 'The plugin could not confirm how Salesforce answered a mapping request. Inspect the mapping in the org before running the command again; nothing was retried.',
|
|
33
|
+
MAPPING_SELECTOR_REQUIRED: 'A mapping pair read from the org has no pair name, so it cannot be removed on its own. Rerun later; if it persists, change the mapping in Data Cloud Setup.',
|
|
34
|
+
MAPPING_TARGET_BINDING_MISMATCH: "The mapping found in the org binds a different source DLO, target DMO or data space than the mapping file. Check the file's binding against the org before deploying.",
|
|
35
|
+
MAPPING_TARGET_IDENTITY_MISMATCH: 'Salesforce returned a mapping with a different name than the one requested, so the result was not trusted. Rerun the command; if it repeats, check the mapping name in the org.',
|
|
36
|
+
MAPPING_TARGET_NOT_SETTLED: 'The mapping in the org is not ACTIVE yet, for example because Salesforce is still processing an earlier change. Wait until it is ACTIVE, then rerun.',
|
|
37
|
+
MAPPING_UNMAP_PERSISTENCE_UNCONFIRMED: "A field pair was removed, but reading the mappings back did not confirm the expected result. Inspect the DMO's mappings in the org before trying again; nothing was rolled back.",
|
|
38
|
+
MAPPING_UNMAP_PLAN_CHANGED: "The DMO's mappings changed between planning and the first write, so nothing was removed. Rerun the command to plan again against the current org.",
|
|
39
|
+
PARTIAL_MAPPING_OUTPUT: 'The mapping file was written, but checking it afterwards failed, so its content may be incomplete. Inspect the file, delete it if needed, and rerun the retrieve with --overwrite.',
|
|
40
|
+
UNSUPPORTED_MAPPING_DATASPACE: 'Salesforce reported the mapping in a different data space than the one this command works in. Rerun with that data space in --dataspace, or select a mapping of this data space.',
|
|
41
|
+
UNSUPPORTED_MAPPING_SELECTION: 'The target org value cannot be passed on safely: it is empty, starts with a dash or contains control characters. Pass a valid alias or username with --target-org.',
|
|
42
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** CLI hints for Relationship error codes. Long-form pages: docs/errors/relationship/<CODE>.md */
|
|
2
|
+
export const hints = {
|
|
3
|
+
AMBIGUOUS_RELATIONSHIP_TARGET: 'More than one relationship in the org links the same source and target fields, so the plugin cannot tell which one the file means. Delete the extra one by name, then rerun.',
|
|
4
|
+
INVALID_RELATIONSHIP_BINDING: 'A DMO name used to list relationships is not a valid DMO API name. Check the relationship:Name__dlm selector or the source object in the relationship file.',
|
|
5
|
+
INVALID_RELATIONSHIP_DOCUMENT: 'A relationship does not fit the file format: the source must be a DMO API name with a custom field (__c), the target any object and field API name (a DMO or a CRM object), and cardinality and owner must be set. Check it in the org.',
|
|
6
|
+
INVALID_RELATIONSHIP_NAME: 'The relationship name is not a valid API name: it must start with a letter and use only letters, digits and underscores. Use the exact name from the org.',
|
|
7
|
+
INVALID_RELATIONSHIP_RESPONSE: 'Salesforce answered the relationship list in a shape the plugin does not expect. Rerun the command; if it repeats, inspect the raw list response for the DMO.',
|
|
8
|
+
PARTIAL_RELATIONSHIP_OUTPUT: 'The relationship file was written, but a later step of saving it failed, so the file may not be complete. Inspect it under data360/relationship and retrieve again with --overwrite.',
|
|
9
|
+
RELATIONSHIP_DELETION_UNCONFIRMED: "The relationship delete was sent, but the relationship still appears in the source DMO's list. Check it in the org before deleting again; nothing is retried.",
|
|
10
|
+
RELATIONSHIP_DEPENDENCIES_PLANNED: 'This batch creates a DMO the relationship uses, so the preview cannot compare the relationship yet. No action is needed; the deploy checks it after the DMO exists.',
|
|
11
|
+
RELATIONSHIP_FILE_IDENTITY_MISMATCH: "The relationship definition the delete checks names a different relationship than the one selected. Nothing was deleted; with --changed-since, fix the deleted file's content, otherwise report it.",
|
|
12
|
+
RELATIONSHIP_HTTP_ERROR: 'Salesforce rejected a relationship request with an HTTP error. Read the status and API detail in the message; for a create, the source DMO (and a target DMO) must already be mapped.',
|
|
13
|
+
RELATIONSHIP_INVENTORY_INCOMPLETE: 'The relationship list of the DMO did not add up (page count, total or duplicate names), possibly because it changed during the read. Rerun the command.',
|
|
14
|
+
RELATIONSHIP_NAME_MISMATCH: "No relationship has this name, but another one carries the file's binding. Retrieve the source DMO's relationships and delete that one by its name.",
|
|
15
|
+
RELATIONSHIP_PERSISTENCE_UNCONFIRMED: "The relationship create or update was sent, but it did not read back with the file's values in time (a create also as active). Check the source DMO's relationships before deploying again.",
|
|
16
|
+
RELATIONSHIP_REQUEST_UNCONFIRMED: "A relationship request ended without a clear result (an HTTP request, or a Metadata API read or update). For a create, update or delete, list the source DMO's relationships before trying again; nothing is retried.",
|
|
17
|
+
RELATIONSHIP_UPDATE_REJECTED: "Salesforce refused the Metadata API update of the relationship, and nothing was changed. Read Salesforce's answer in the message; a changed owner or target object is refused, for example.",
|
|
18
|
+
RELATIONSHIP_TARGET_BINDING_MISMATCH: 'The relationship with this name links other objects or fields than expected: another source DMO than the selector names, or with --changed-since another binding than the deleted file. Check it before deleting.',
|
|
19
|
+
UNSUPPORTED_RELATIONSHIP_DATASPACE: "The relationship file's c__dataSpace is not the data space of the run. Run with the --dataspace the file names, or leave it out for the default data space.",
|
|
20
|
+
UNSUPPORTED_RELATIONSHIP_SELECTION: 'The target org value cannot be passed on to Salesforce CLI. Use a plain org alias or username with --target-org.',
|
|
21
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** CLI hints for Segment error codes. Long-form pages: docs/errors/segment/<CODE>.md */
|
|
2
|
+
export const hints = {
|
|
3
|
+
INCOMPLETE_SEGMENT: 'The segment read finished without a usable definition and without a more specific reason. Rerun the retrieve; if it repeats, read the segment directly with the API.',
|
|
4
|
+
INVALID_SEGMENT_DOCUMENT: 'A segment value is not text the plugin can send (missing, empty, too long, control characters), the models are not a list, or a model name cannot name a SQL file. Retrieve writes such a segment as-is; fix the file for deploy.',
|
|
5
|
+
INVALID_SEGMENT_RESPONSE: 'Salesforce answered the segment read in a shape the plugin does not expect (not exactly one segment). Rerun the retrieve; if it repeats, inspect the raw API response.',
|
|
6
|
+
PARTIAL_SEGMENT_OUTPUT: 'A segment file was written, but a later step of saving the JSON and SQL files failed, so the files on disk may not be complete. Inspect the .segment.json and .sql files and retrieve again with --overwrite.',
|
|
7
|
+
SEGMENT_ACQUISITION_FAILED: 'The plugin could not read the segment, or a complete segment list, from the org. Check the segment name, the target org login and the Salesforce API detail in the message, then rerun.',
|
|
8
|
+
SEGMENT_ADMISSION_FAILED: 'The checks right before the segment write failed, so nothing was sent. Make sure the .segment.json file did not change during the run, check the org, and run the deploy again.',
|
|
9
|
+
SEGMENT_CHILD_NOT_FOUND: 'A child segment named in spec.childSegments of a Waterfall file is not in the target org, so nothing was written. Deploy the child first (or select it in the same deploy) or fix the name.',
|
|
10
|
+
SEGMENT_CREATE_CONFLICT: 'Salesforce refused the create because a segment with this name already exists (HTTP 409). The plugin does not switch to an update; inspect the target, then preview again.',
|
|
11
|
+
SEGMENT_CREATE_UNCONFIRMED: 'The segment create was sent, but its result could not be confirmed. Inspect the segment in the org before deploying again; the plugin does not retry.',
|
|
12
|
+
SEGMENT_DATASPACE_MISMATCH: "The segment (its file's c__dataSpace, or the segment Salesforce read by that name) is in another data space than the run. Run with the --dataspace the message names, or correct c__dataSpace, then rerun.",
|
|
13
|
+
SEGMENT_DELETE_ADMISSION_FAILED: 'The checks before the segment delete failed, so nothing was deleted. Read the message, check the segment and its source DMO in Data Cloud, then preview the delete again.',
|
|
14
|
+
SEGMENT_DELETION_UNCONFIRMED: 'The segment delete was sent, but the plugin could not confirm that the segment is gone. Check the segment in the org before any further delete; nothing is retried.',
|
|
15
|
+
SEGMENT_DEPENDENCY_ACQUISITION_FAILED: 'The plugin could not read the DMO this segment is built on. Check that the DMO exists in the org, that the login works and the API detail in the message, then rerun.',
|
|
16
|
+
SEGMENT_DEPENDENCY_AMBIGUOUS_OR_MISSING: 'The DMO this segment is built on (spec.segmentOn) was not returned under that exact name. Create the DMO in the target org or fix the name in the file, then rerun.',
|
|
17
|
+
SEGMENT_DEPENDENCY_DRIFT: 'The DMO this segment uses changed in the org while the deploy was running, so nothing was written. Make sure nobody changes the DMO, then preview and deploy again.',
|
|
18
|
+
SEGMENT_DEPENDENCY_OTHER_DATASPACE: "The DMO this segment is built on, or a Waterfall child segment, is in another data space than the segment. Name the component of the segment's own data space (<prefix>_<Name> in a non-default one), then rerun.",
|
|
19
|
+
SEGMENT_FRESH_ADMISSION_BLOCKED: 'Right before writing this segment in a batch, a fresh check no longer allowed a create, update or no change, or --allow-processing was missing. Preview the batch again.',
|
|
20
|
+
SEGMENT_IDENTITY_MISMATCH: 'Salesforce returned a segment with a different name than requested, or without a data space. Check the exact segment name (case matters), then rerun.',
|
|
21
|
+
SEGMENT_MEMBERS_CHANGED: "The segment's member count changed during the export, so a publish finished mid-read and no file was written. Run the export again.",
|
|
22
|
+
SEGMENT_MEMBERS_NOT_FOUND: "No segment in the run's data space has this API name, record ID or display name. Check the exact value (case matters; <prefix>_<Name> outside default) and --dataspace, then rerun the export.",
|
|
23
|
+
SEGMENT_MEMBERS_OUTPUT_FAILED: 'The members were read but the output file could not be written, so no file was left. Check that the folder is writable and has free space, then rerun.',
|
|
24
|
+
SEGMENT_MEMBERS_READ_FAILED: 'Salesforce answered a member read with an error, or the detail query did not finish, so no file was written. Read the API detail in the message, fix the cause and rerun.',
|
|
25
|
+
SEGMENT_MEMBERS_UNEXPECTED_RESPONSE: 'Salesforce answered a member read in a shape the plugin does not expect, so no file was written. Rerun the export; if it repeats, inspect the raw API response.',
|
|
26
|
+
SEGMENT_MEMBER_DETAILS_AMBIGUOUS: 'A segment member matched more than one row of the DMO the segment is built on, so --include-details cannot write one row per member. Export without --include-details.',
|
|
27
|
+
SEGMENT_MEMBER_DETAILS_UNAVAILABLE: 'The segment names no membership DMO or source DMO, or Salesforce lists no single relationship between them, so --include-details cannot join them. Export without it.',
|
|
28
|
+
SEGMENT_NAME_NOT_STORED: "In a non-default data space Salesforce stores a segment as <prefix>_<Name>; this file's name lacks the prefix, so a create could not be read back. Nothing was sent; add the prefix to the file name and identity.apiName.",
|
|
29
|
+
SEGMENT_NOT_FOUND: 'No segment of the org has this API name or record ID in any data space, or the value is not a segment record ID (1sg…). Check the exact value (case matters; <prefix>_<Name> outside default) and deploy the segment first.',
|
|
30
|
+
SEGMENT_OTHER_DATASPACE: 'The segment with this API name or record ID exists, but in another data space than the one asked for. Use the segment of the right data space, or look it up in the data space the message names.',
|
|
31
|
+
SEGMENT_PUBLISH_ADMISSION_FAILED: 'The segment could not be read before the publish, or it does not exist in the org, so nothing was published. Deploy or check the segment, then rerun.',
|
|
32
|
+
SEGMENT_PUBLISH_DEFINITION_MISMATCH: 'The segment in the org does not hold the definition of the selected file, so it was not published. Deploy the file first, or publish the org segment with -m segment:Name.',
|
|
33
|
+
SEGMENT_PUBLISH_FAILED: 'Salesforce ran the publish and reports publishStatus FAILED. Check the segment and its source DMO in Data Cloud before publishing again; nothing was resent.',
|
|
34
|
+
SEGMENT_PUBLISH_REJECTED: 'Salesforce refused the publish request; its answer is in the message. Fix the cause it names, then run the publish again; nothing was resent.',
|
|
35
|
+
SEGMENT_PUBLISH_STARTED: 'With --async the publish was started and Salesforce accepted it; the command did not wait for the result. Read the segment later for its publish status; nothing was resent.',
|
|
36
|
+
SEGMENT_PUBLISH_STILL_PROCESSING: 'Salesforce accepted the publish and is still processing it when --wait-timeout ran out. It did not fail and was not resent; read the segment later for the result.',
|
|
37
|
+
SEGMENT_PUBLISH_UNCONFIRMED: 'The publish was sent, but its answer or the status after it could not be read, so the publish may be running. Read the segment before publishing again; nothing was resent.',
|
|
38
|
+
SEGMENT_READBACK_MISMATCH: 'After the write, the segment read back differently from the file, or other settings or its DMO changed. Inspect the segment in the org before any further deploy.',
|
|
39
|
+
SEGMENT_SCHEDULE_CHANGE: 'The deploy sends the schedule of the file, so the segment publishes on that schedule in the target org ({ "frequency": "None" } turns it off). Remove the schedule key from the file to leave the org schedule alone.',
|
|
40
|
+
SEGMENT_SELECTION_AMBIGUOUS: "More than one segment in the run's data space matches this display name or record ID and none was chosen. Rerun with an API name listed in the message.",
|
|
41
|
+
SEGMENT_SETTLEMENT_UNQUALIFIED: 'After the write, the segment showed a status other than active, processing or counting. Inspect the segment status in the org before any further deploy.',
|
|
42
|
+
SEGMENT_TARGET_DRIFT: "The target segment changed between the deploy's checks and the write, so nothing was written. Preview the deploy again to see the current state.",
|
|
43
|
+
SEGMENT_TARGET_IDENTITY_MISMATCH: 'The segment found in the org has a different identity than the file. Check that identity.apiName in the .segment.json file matches the segment name in the org.',
|
|
44
|
+
SEGMENT_TARGET_UNQUALIFIED: 'The fresh check of the target segment did not allow a create or an update. Read the segment code printed with it, fix that cause, and preview the deploy again.',
|
|
45
|
+
SEGMENT_UPDATE_UNCONFIRMED: 'The segment update was sent, but its result could not be confirmed. Inspect the segment in the org before deploying again; the plugin does not retry.',
|
|
46
|
+
UNKNOWN_SEGMENT_CONFIGURATION: 'The segment has a setting the plugin does not know, or misses one. Retrieve keeps unknown settings in the file; deploy refuses them and names the key. Remove the key, or manage the segment in Data Cloud.',
|
|
47
|
+
UNSUPPORTED_SEGMENT_VARIANT: 'The segment has parameters (no write takes them), schedule details the plugin does not know, UI criteria that are not a JSON object or no DMO source. Retrieve writes it as-is; deploy refuses it.',
|
|
48
|
+
UNSUPPORTED_SEGMENT_XML: "Segment XML files cannot be deployed. Select the segment's .segment.json file instead; retrieve one with sf data360 retrieve -m segment:Name if you do not have it.",
|
|
49
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** One entry per docs/errors/<family>/ folder. */
|
|
2
|
+
export declare const errorFamilies: {
|
|
3
|
+
readonly 'calculated-insight': Readonly<Record<string, string>>;
|
|
4
|
+
readonly 'data-graph': Readonly<Record<string, string>>;
|
|
5
|
+
readonly 'data-stream': Readonly<Record<string, string>>;
|
|
6
|
+
readonly 'data-transform': Readonly<Record<string, string>>;
|
|
7
|
+
readonly dependency: Readonly<Record<string, string>>;
|
|
8
|
+
readonly dlo: Readonly<Record<string, string>>;
|
|
9
|
+
readonly dmo: Readonly<Record<string, string>>;
|
|
10
|
+
readonly general: Readonly<Record<string, string>>;
|
|
11
|
+
readonly 'identity-resolution': Readonly<Record<string, string>>;
|
|
12
|
+
readonly mapping: Readonly<Record<string, string>>;
|
|
13
|
+
readonly relationship: Readonly<Record<string, string>>;
|
|
14
|
+
readonly segment: Readonly<Record<string, string>>;
|
|
15
|
+
};
|
|
16
|
+
export type ErrorFamily = keyof typeof errorFamilies;
|
|
17
|
+
export type ErrorCodeInfo = Readonly<{
|
|
18
|
+
family: ErrorFamily;
|
|
19
|
+
hint: string;
|
|
20
|
+
docs: string;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Register a cause-specific hint, which then replaces the hint of its code where a diagnostic
|
|
24
|
+
* carries it. A hint any other object carries (a raw or verbatim payload) is never kept.
|
|
25
|
+
* @param {string} hint Static plugin-built sentence.
|
|
26
|
+
*/
|
|
27
|
+
export declare function registerCauseHint(hint: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Look up the CLI hint and reference page of a plugin error code.
|
|
30
|
+
* @param {string} code Plugin diagnostic code.
|
|
31
|
+
* @returns {ErrorCodeInfo | undefined} Registered hint, family and docs URL.
|
|
32
|
+
*/
|
|
33
|
+
export declare function errorCodeInfo(code: string): ErrorCodeInfo | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* All registered codes, for tests and the docs index.
|
|
36
|
+
* @returns {string[]} Registered codes.
|
|
37
|
+
*/
|
|
38
|
+
export declare function registeredErrorCodes(): string[];
|
|
39
|
+
/**
|
|
40
|
+
* Add `hint` and `docs` to every `{ code, message }` diagnostic with a registered code,
|
|
41
|
+
* wherever it sits in a command result (top-level errors, items, preflight results). A
|
|
42
|
+
* registered cause-specific hint the diagnostic already carries is kept; any other is replaced.
|
|
43
|
+
* @template T
|
|
44
|
+
* @param {T} value Command result envelope.
|
|
45
|
+
* @returns {T} The same envelope, annotated in place.
|
|
46
|
+
*/
|
|
47
|
+
export declare function annotateDiagnostics<T>(value: T): T;
|
|
48
|
+
/**
|
|
49
|
+
* Human output for one diagnostic: `CODE: message`, then the hint and the docs link.
|
|
50
|
+
* The hint line is left out when the message already says it; a registered cause-specific hint
|
|
51
|
+
* the diagnostic carries replaces the hint of its code.
|
|
52
|
+
* @param {{ code: string; message: string; hint?: string }} diagnostic Diagnostic to print.
|
|
53
|
+
* @param {string} [prefix] Text before the code, such as `dmo:Name__dlm: `.
|
|
54
|
+
* @returns {string} One or more lines.
|
|
55
|
+
*/
|
|
56
|
+
export declare function formatDiagnostic(diagnostic: Readonly<{
|
|
57
|
+
code: string;
|
|
58
|
+
message: string;
|
|
59
|
+
hint?: unknown;
|
|
60
|
+
}>, prefix?: string): string;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { plugin } from '../plugin.js';
|
|
2
|
+
import { hints as calculatedInsight } from './codes/calculated-insight.js';
|
|
3
|
+
import { hints as dataGraph } from './codes/data-graph.js';
|
|
4
|
+
import { hints as dataStream } from './codes/data-stream.js';
|
|
5
|
+
import { hints as dataTransform } from './codes/data-transform.js';
|
|
6
|
+
import { hints as dependency } from './codes/dependency.js';
|
|
7
|
+
import { hints as dlo } from './codes/dlo.js';
|
|
8
|
+
import { hints as dmo } from './codes/dmo.js';
|
|
9
|
+
import { hints as general } from './codes/general.js';
|
|
10
|
+
import { hints as identityResolution } from './codes/identity-resolution.js';
|
|
11
|
+
import { hints as mapping } from './codes/mapping.js';
|
|
12
|
+
import { hints as relationship } from './codes/relationship.js';
|
|
13
|
+
import { hints as segment } from './codes/segment.js';
|
|
14
|
+
/** One entry per docs/errors/<family>/ folder. */
|
|
15
|
+
export const errorFamilies = {
|
|
16
|
+
'calculated-insight': calculatedInsight,
|
|
17
|
+
'data-graph': dataGraph,
|
|
18
|
+
'data-stream': dataStream,
|
|
19
|
+
'data-transform': dataTransform,
|
|
20
|
+
dependency,
|
|
21
|
+
dlo,
|
|
22
|
+
dmo,
|
|
23
|
+
general,
|
|
24
|
+
'identity-resolution': identityResolution,
|
|
25
|
+
mapping,
|
|
26
|
+
relationship,
|
|
27
|
+
segment,
|
|
28
|
+
};
|
|
29
|
+
const registry = new Map();
|
|
30
|
+
for (const [family, entries] of Object.entries(errorFamilies))
|
|
31
|
+
for (const [code, hint] of Object.entries(entries))
|
|
32
|
+
registry.set(code, Object.freeze({
|
|
33
|
+
family,
|
|
34
|
+
hint,
|
|
35
|
+
docs: `https://github.com/JoernBerkefeld/sf-plugin-data/blob/v${plugin.version}/docs/errors/${family}/${code}.md`,
|
|
36
|
+
}));
|
|
37
|
+
/** Cause-specific hints registered by the plugin's own code (see {@link registerCauseHint}). */
|
|
38
|
+
const causeHints = new Set();
|
|
39
|
+
/**
|
|
40
|
+
* Register a cause-specific hint, which then replaces the hint of its code where a diagnostic
|
|
41
|
+
* carries it. A hint any other object carries (a raw or verbatim payload) is never kept.
|
|
42
|
+
* @param {string} hint Static plugin-built sentence.
|
|
43
|
+
*/
|
|
44
|
+
export function registerCauseHint(hint) {
|
|
45
|
+
causeHints.add(hint);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The hint to show for a diagnostic: its own when the plugin registered it, otherwise the
|
|
49
|
+
* registered hint of its code.
|
|
50
|
+
* @param {unknown} own The diagnostic's hint property.
|
|
51
|
+
* @param {string} registered Hint of the code.
|
|
52
|
+
* @returns {string} Hint.
|
|
53
|
+
*/
|
|
54
|
+
function hintFor(own, registered) {
|
|
55
|
+
return typeof own === 'string' && causeHints.has(own) ? own : registered;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Look up the CLI hint and reference page of a plugin error code.
|
|
59
|
+
* @param {string} code Plugin diagnostic code.
|
|
60
|
+
* @returns {ErrorCodeInfo | undefined} Registered hint, family and docs URL.
|
|
61
|
+
*/
|
|
62
|
+
export function errorCodeInfo(code) {
|
|
63
|
+
return registry.get(code);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* All registered codes, for tests and the docs index.
|
|
67
|
+
* @returns {string[]} Registered codes.
|
|
68
|
+
*/
|
|
69
|
+
export function registeredErrorCodes() {
|
|
70
|
+
return [...registry.keys()];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Add `hint` and `docs` to every `{ code, message }` diagnostic with a registered code,
|
|
74
|
+
* wherever it sits in a command result (top-level errors, items, preflight results). A
|
|
75
|
+
* registered cause-specific hint the diagnostic already carries is kept; any other is replaced.
|
|
76
|
+
* @template T
|
|
77
|
+
* @param {T} value Command result envelope.
|
|
78
|
+
* @returns {T} The same envelope, annotated in place.
|
|
79
|
+
*/
|
|
80
|
+
export function annotateDiagnostics(value) {
|
|
81
|
+
const seen = new Set();
|
|
82
|
+
const visit = (node, depth) => {
|
|
83
|
+
if (!node || typeof node !== 'object' || depth > 12 || seen.has(node))
|
|
84
|
+
return;
|
|
85
|
+
seen.add(node);
|
|
86
|
+
if (Array.isArray(node)) {
|
|
87
|
+
for (const entry of node)
|
|
88
|
+
visit(entry, depth + 1);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const record = node;
|
|
92
|
+
if (typeof record.code === 'string' && typeof record.message === 'string') {
|
|
93
|
+
const info = registry.get(record.code);
|
|
94
|
+
if (info && Object.isExtensible(record)) {
|
|
95
|
+
record.hint = hintFor(record.hint, info.hint);
|
|
96
|
+
record.docs = info.docs;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
for (const child of Object.values(record))
|
|
100
|
+
visit(child, depth + 1);
|
|
101
|
+
};
|
|
102
|
+
visit(value, 0);
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Human output for one diagnostic: `CODE: message`, then the hint and the docs link.
|
|
107
|
+
* The hint line is left out when the message already says it; a registered cause-specific hint
|
|
108
|
+
* the diagnostic carries replaces the hint of its code.
|
|
109
|
+
* @param {{ code: string; message: string; hint?: string }} diagnostic Diagnostic to print.
|
|
110
|
+
* @param {string} [prefix] Text before the code, such as `dmo:Name__dlm: `.
|
|
111
|
+
* @returns {string} One or more lines.
|
|
112
|
+
*/
|
|
113
|
+
export function formatDiagnostic(diagnostic, prefix = '') {
|
|
114
|
+
const lines = [`${prefix}${diagnostic.code}: ${diagnostic.message}`];
|
|
115
|
+
const info = registry.get(diagnostic.code);
|
|
116
|
+
if (info) {
|
|
117
|
+
const hint = hintFor(diagnostic.hint, info.hint);
|
|
118
|
+
if (!diagnostic.message.includes(hint))
|
|
119
|
+
lines.push(`Hint: ${hint}`);
|
|
120
|
+
lines.push(`Docs: ${info.docs}`);
|
|
121
|
+
}
|
|
122
|
+
return lines.join('\n');
|
|
123
|
+
}
|
package/lib/plugin.d.ts
ADDED
package/lib/plugin.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
// Both src/ and the installed lib/ sit directly beneath this plugin's package root.
|
|
3
|
+
const packageJson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
4
|
+
/** Plugin identity reported in command results: name and version only. */
|
|
5
|
+
export const plugin = { name: packageJson.name, version: packageJson.version };
|