@salesforce/afv-skills 1.55.0 → 1.57.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/package.json +1 -1
- package/skills/agentforce-generate/SKILL.md +8 -0
- package/skills/agentforce-generate/references/actions-reference.md +2 -2
- package/skills/agentforce-generate/references/voice-modality-reference.md +51 -15
- package/skills/agentforce-generate/references/voice-telephony-cli.md +193 -0
- package/skills/agentforce-observe/SKILL.md +13 -9
- package/skills/agentforce-observe/references/ahm-alerts.md +193 -14
- package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +24 -15
- package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +11 -0
- package/skills/automation-sandbox-post-copy-config-generate/assets/json_schema.json +33 -1
- package/skills/automation-sandbox-post-copy-config-generate/references/configuration_catalog.md +32 -1
- package/skills/automation-sandbox-post-copy-configure/SKILL.md +75 -71
- package/skills/automation-sandbox-post-copy-configure/assets/scheduled_apex_template.apex +13 -0
- package/skills/automation-sandbox-post-copy-configure/examples/sample_scheduled_apex_config.json +13 -0
- package/skills/automation-sandbox-post-copy-configure/references/scheduled_apex_path.md +155 -0
- package/skills/automation-sandbox-post-copy-configure/scripts/build-scheduled-apex.mjs +62 -0
- package/skills/automation-sandbox-post-copy-configure/scripts/soql-escape-job-name.mjs +28 -0
- package/skills/commerce-b2b-open-code-components-integrate/SKILL.md +1 -1
- package/skills/commerce-b2b-open-code-components-replace/SKILL.md +16 -16
- package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +383 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +324 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +63 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +100 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +46 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/04-deploy-engine.js +198 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/05-deploy-tpm-accruals.js +231 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +82 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +517 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +416 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -0
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +514 -0
- package/skills/consumer-goods-sync-management-configure/SKILL.md +137 -0
- package/skills/consumer-goods-sync-management-configure/examples/scenarios.md +294 -0
- package/skills/consumer-goods-sync-management-configure/references/act1-setup-sync.md +333 -0
- package/skills/consumer-goods-sync-management-configure/references/act2-assign-users.md +324 -0
- package/skills/consumer-goods-sync-management-configure/references/act3-plan-verify.md +113 -0
- package/skills/consumer-goods-sync-management-configure/references/readiness-and-enablement.md +164 -0
- package/skills/consumer-goods-sync-management-configure/references/sync-management-app-install-backbone.md +159 -0
- package/skills/consumer-goods-sync-management-configure/references/transports-and-namespace.md +220 -0
- package/skills/consumer-goods-sync-management-configure/references/verify-and-smoke.md +175 -0
- package/skills/dx-devops-project-manage/SKILL.md +1 -1
- package/skills/dx-org-analyze/SKILL.md +0 -1
- package/skills/dx-org-analyze/scripts/collect_org_data.py +2 -2
- package/skills/dx-org-analyze/scripts/compute_diff.py +2 -4
- package/skills/dx-org-analyze/scripts/introspect_org.py +4 -40
- package/skills/dx-org-manage/SKILL.md +6 -50
- package/skills/dx-org-manage/examples/README.md +10 -16
- package/skills/dx-org-manage/references/scratch-org-create.md +1 -1
- package/skills/dx-org-manage/references/scratch-org-operations.md +1 -1
- package/skills/dx-org-shape-manage/SKILL.md +4 -3
- package/skills/education-cloud-domain-configure/references/gotchas-extended.md +1 -0
- package/skills/experience-accessibility-validate/SKILL.md +8 -5
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-1-1-non-text-content.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-i-lists.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-ii-tables.md +20 -85
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iii-form-labels.md +4 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iv-regions.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-v-groups.md +2 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-5-identify-input.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-1-4-3-contrast.md +4 -14
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-1-1-keyboard.md +9 -5
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-4-link-purpose.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-6-headings-labels.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-1-pointer-gestures.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-2-pointer-cancellation.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-3-label-in-name.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-7-dragging-movement.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-1-on-focus.md +0 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-2-on-input.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-1-error-identification.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-2-labels-instructions.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-3-error-suggestion.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-i-name.md +4 -5
- package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-ii-role.md +1 -4
- package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-iii-value.md +0 -4
- package/skills/experience-cms-content-generate/SKILL.md +1 -1
- package/skills/experience-cms-content-render/SKILL.md +3 -3
- package/skills/experience-cms-content-render/assets/angular/MediaRenderer.component.ts +35 -7
- package/skills/experience-cms-content-render/assets/angular/cms-item.service.ts +13 -4
- package/skills/experience-cms-content-render/assets/react/MediaRenderer.tsx +30 -8
- package/skills/experience-cms-content-render/assets/react/useCmsItem.ts +14 -4
- package/skills/experience-cms-content-render/assets/shared/cmsCore.types.ts +11 -1
- package/skills/experience-cms-content-render/assets/shared/externalRefs.ts +1 -1
- package/skills/experience-cms-content-render/assets/shared/mediaLabels.ts +62 -0
- package/skills/experience-cms-content-render/references/init-scaffold.md +13 -6
- package/skills/experience-content-media-stock-image-search/SKILL.md +0 -1
- package/skills/experience-lwc-accessibility-jest-run/SKILL.md +104 -25
- package/skills/experience-lwc-accessibility-jest-run/assets/jest.config.js +4 -0
- package/skills/experience-lwc-accessibility-jest-run/assets/sa11y-jest-setup.js +5 -0
- package/skills/experience-lwc-design-generate/SKILL.md +1 -1
- package/skills/experience-lwc-legacy-migrate/SKILL.md +212 -0
- package/skills/experience-lwc-legacy-migrate/assets/lo20-host-page-template.html +192 -0
- package/skills/experience-lwc-legacy-migrate/references/aura-to-lwc-completeness-checklist.md +188 -0
- package/skills/experience-lwc-legacy-migrate/references/lightning-out-2-system-reference.md +495 -0
- package/skills/experience-lwc-legacy-migrate/references/lightning-out-beta-to-2-migration.md +824 -0
- package/skills/experience-lwc-legacy-migrate/scripts/convert-lo-names.py +94 -0
- package/skills/experience-lwc-legacy-migrate/scripts/validate-lo20-page.py +133 -0
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +5 -5
- package/skills/experience-ui-bundle-features-generate/SKILL.md +65 -36
- package/skills/experience-ui-bundle-features-generate/references/angular/features.md +74 -0
- package/skills/experience-ui-bundle-features-generate/references/react/features.md +59 -0
- package/skills/experience-ui-bundle-features-generate/scripts/detect-framework.sh +73 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -2
- package/skills/experience-ui-bundle-metadata-generate/SKILL.md +26 -14
- package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +37 -0
- package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +32 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +73 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +30 -8
- package/skills/experience-ui-bundle-project-generate/SKILL.md +1 -1
- package/skills/field-service-data-capture-migrate/SKILL.md +391 -0
- package/skills/field-service-data-capture-migrate/assets/sample-legacy-flow.flow-meta.xml +163 -0
- package/skills/field-service-data-capture-migrate/references/architecture-notes.md +40 -0
- package/skills/field-service-data-capture-migrate/references/component-mapping.md +278 -0
- package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +183 -0
- package/skills/field-service-data-capture-migrate/references/dc-platform-rules.md +130 -0
- package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +215 -0
- package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +36 -0
- package/skills/field-service-data-capture-migrate/references/migration-checklist.md +121 -0
- package/skills/field-service-data-capture-migrate/references/transformer-rules.md +132 -0
- package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +277 -0
- package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1311 -0
- package/skills/field-service-data-capture-migrate/scripts/cud_analysis.py +402 -0
- package/skills/field-service-data-capture-migrate/scripts/deploy_flow.sh +230 -0
- package/skills/field-service-data-capture-migrate/scripts/discover_subflow_tree.py +230 -0
- package/skills/field-service-data-capture-migrate/scripts/flow_input.py +186 -0
- package/skills/field-service-data-capture-migrate/scripts/flow_xml_utils.py +39 -0
- package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +413 -0
- package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +199 -0
- package/skills/field-service-data-capture-migrate/scripts/json_to_flow_xml.py +146 -0
- package/skills/field-service-data-capture-migrate/scripts/manual_review_flags.py +42 -0
- package/skills/field-service-data-capture-migrate/scripts/retrieve_flow_rest.sh +155 -0
- package/skills/field-service-data-capture-migrate/scripts/subflow_names.py +49 -0
- package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +1661 -0
- package/skills/field-service-data-capture-migrate/scripts/validate_flow.sh +147 -0
- package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +1258 -0
- package/skills/integration-connectivity-connected-app-configure/SKILL.md +5 -5
- package/skills/integration-connectivity-generate/SKILL.md +10 -10
- package/skills/integration-connectivity-generate/scripts/configure-named-credential.sh +2 -2
- package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +1 -1
- package/skills/life-sciences-fieldsalesrep-coordinate/references/orchestration-flow.md +1 -1
- package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +14 -1
- package/skills/mobile-apps-create/SKILL.md +1 -1
- package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/SKILL.md +7 -7
- package/skills/platform-apex-test-generate/SKILL.md +1 -1
- package/skills/platform-apex-test-run/SKILL.md +1 -1
- package/skills/platform-custom-field-generate/SKILL.md +1 -1
- package/skills/platform-custom-lightning-type-generate/SKILL.md +1 -1
- package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -1
- package/skills/platform-custom-object-generate/SKILL.md +1 -1
- package/skills/platform-custom-report-type-generate/SKILL.md +1 -1
- package/skills/platform-custom-setting-generate/SKILL.md +1 -1
- package/skills/platform-data-and-tooling-api-context-get/SKILL.md +1 -1
- package/skills/platform-data-manage/SKILL.md +10 -10
- package/skills/platform-flexipage-generate/SKILL.md +1 -1
- package/skills/platform-lightning-app-coordinate/SKILL.md +1 -1
- package/skills/platform-metadata-api-context-get/SKILL.md +1 -1
- package/skills/platform-metadata-retrieve/SKILL.md +1 -1
- package/skills/platform-permission-set-generate/SKILL.md +1 -1
- package/skills/platform-report-generate/SKILL.md +1 -1
- package/skills/platform-salesforce-connect-adapter-generate/SKILL.md +4 -4
- package/skills/platform-sandbox-configure/SKILL.md +108 -133
- package/skills/platform-sandbox-configure/references/api-response-shapes.md +39 -0
- package/skills/platform-sandbox-configure/references/definition-file-approach.md +73 -0
- package/skills/platform-sharing-owd-configure/SKILL.md +1 -1
- package/skills/platform-sharing-rules-generate/SKILL.md +1 -1
- package/skills/platform-soql-query/SKILL.md +1 -1
- package/skills/platform-value-set-generate/SKILL.md +1 -1
- package/skills/platform-widget-generate/SKILL.md +26 -18
- package/skills/platform-widget-generate/examples/formulas.json +191 -0
- package/skills/platform-widget-generate/references/widget-formulas.md +123 -0
- package/skills/platform-widget-generate/references/widget-meta-directives.md +4 -4
- package/skills/sales-call-scoring-configure/SKILL.md +318 -0
- package/skills/sales-call-scoring-configure/assets/best-practice-competencies.json +67 -0
- package/skills/sales-call-scoring-configure/assets/ootb-competencies.json +58 -0
- package/skills/sales-call-scoring-configure/references/admin-communication.md +79 -0
- package/skills/sales-call-scoring-configure/references/competency-crud.md +130 -0
- package/skills/sales-call-scoring-configure/scripts/create-competency.sh +166 -0
- package/skills/sales-call-scoring-configure/scripts/create-custom-competency.sh +166 -0
- package/skills/sales-call-scoring-configure/scripts/edit-competency.sh +185 -0
- package/skills/sales-call-scoring-configure/scripts/edit-custom-competency.sh +190 -0
- package/skills/sales-call-scoring-configure/scripts/enable-call-scoring.sh +436 -0
- package/skills/sales-call-scoring-configure/scripts/get-competency.sh +72 -0
- package/skills/sales-call-scoring-configure/scripts/get-custom-competency.sh +78 -0
- package/skills/sales-call-scoring-configure/scripts/install-best-practice-competencies.sh +223 -0
- package/skills/sales-call-scoring-configure/scripts/install-ootb-competencies.sh +237 -0
- package/skills/sales-call-scoring-configure/scripts/list-competencies.sh +99 -0
- package/skills/sales-call-scoring-configure/scripts/shared/auth.sh +116 -0
- package/skills/sales-call-scoring-configure/scripts/shared/cap.sh +86 -0
- package/skills/sales-call-scoring-configure/scripts/shared/soap.sh +267 -0
- package/skills/sales-call-scoring-configure/scripts/shared/soql.sh +25 -0
- package/skills/sales-call-scoring-configure/scripts/toggle-competency.sh +112 -0
- package/skills/sales-call-scoring-configure/scripts/toggle-custom-competency.sh +125 -0
- package/skills/sales-call-scoring-configure/scripts/verify-ootb-competencies.sh +116 -0
- package/skills/service-agentforce-human-escalation-configure/SKILL.md +4 -0
- package/skills/service-agentforce-human-escalation-configure/scripts/tests/_bootstrap.py +26 -6
- package/skills/service-agentforce-human-escalation-configure/scripts/tests/test_escalation_contracts.py +5 -4
- package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1 -0
- package/skills/service-de-channel-activate/SKILL.md +6 -5
- package/skills/service-de-channel-create/SKILL.md +3 -3
- package/skills/service-de-channel-routing-configure/SKILL.md +3 -3
- package/skills/service-de-channel-settings-configure/SKILL.md +195 -0
- package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +152 -0
- package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/gotchas.md +3 -3
- package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/language-keywords.md +4 -4
- package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/worked-examples.md +14 -14
- package/skills/service-de-headless-channel-configure/SKILL.md +6 -6
- package/skills/service-de-headless-channel-configure/references/worked-examples.md +1 -1
- package/skills/service-de-waba-integrate/SKILL.md +2 -1
- package/skills/service-digital-engagement-deployment-configure/SKILL.md +2 -0
- package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +29 -0
- package/skills/service-email-to-case-configure/SKILL.md +1 -1
- package/skills/service-helpagent-coordinate/SKILL.md +3 -2
- package/skills/service-helpagent-coordinate/references/channel-voice.md +15 -4
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +49 -31
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +71 -6
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +26 -4
- package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +35 -10
- package/skills/service-itsm-agentic-setup-cmdb-access-assign/references/mcp-invocation.md +25 -5
- package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +5 -5
- package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +1 -1
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +2 -2
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/examples/output-templates.md +1 -1
- package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +25 -15
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +8 -5
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +4 -2
- package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +1 -1
- package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +29 -16
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +8 -5
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +4 -2
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +1 -1
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +29 -16
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +138 -68
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +31 -15
- package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +156 -0
- package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +148 -0
- package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +162 -0
- package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +149 -0
- package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +103 -89
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +2 -2
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +21 -39
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +3 -3
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +18 -1
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +63 -37
- package/skills/service-omni-attribute-routing-configure/SKILL.md +53 -0
- package/skills/service-omni-attribute-routing-configure/references/api-notes.md +7 -0
- package/skills/service-omni-attribute-routing-configure/scripts/configure-and-report.sh +224 -0
- package/skills/service-omni-attribute-routing-configure/scripts/tests/test_attribute_routing_contracts.py +137 -0
- package/skills/service-omni-channel-inventory-analyze/SKILL.md +96 -0
- package/skills/service-omni-channel-inventory-analyze/references/api-notes.md +52 -0
- package/skills/service-omni-channel-inventory-analyze/scripts/analyze.sh +185 -0
- package/skills/service-omni-channel-inventory-analyze/scripts/tests/_bootstrap.py +84 -0
- package/skills/service-omni-channel-inventory-analyze/scripts/tests/test_inventory_analyze_contracts.py +141 -0
- package/skills/service-omni-channel-limits-analyze/SKILL.md +70 -0
- package/skills/service-omni-channel-limits-analyze/references/api-notes.md +22 -0
- package/skills/service-omni-channel-limits-analyze/scripts/analyze.sh +159 -0
- package/skills/service-omni-channel-limits-analyze/scripts/tests/_bootstrap.py +87 -0
- package/skills/service-omni-channel-limits-analyze/scripts/tests/test_limits_analyze_contracts.py +99 -0
- package/skills/service-omni-channel-setup-coordinate/SKILL.md +12 -20
- package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +55 -5
- package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +38 -0
- package/skills/service-omni-command-center-analyze/SKILL.md +2 -2
- package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
- package/skills/dx-org-manage/examples/snapshots/error_output.json +0 -9
- package/skills/dx-org-manage/examples/snapshots/success_output.json +0 -15
- package/skills/dx-org-manage/references/cli_flags.md +0 -67
- package/skills/dx-org-manage/references/creating-snapshot.md +0 -103
- package/skills/dx-org-manage/references/snapshot_usage.md +0 -74
- package/skills/experience-accessibility-validate/scripts/contrast-ratio.py +0 -153
- package/skills/experience-lwc-accessibility-jest-run/references/running-sa11y-jest-tests.md +0 -205
- package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +0 -14
- /package/skills/experience-ui-bundle-features-generate/references/{conflict-resolution-schema.json → common/conflict-resolution-schema.json} +0 -0
- /package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/references/api-response-schema.md +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# detect-framework.sh — deterministic UI Bundle framework detector.
|
|
4
|
+
#
|
|
5
|
+
# Usage: bash detect-framework.sh [ROOT]
|
|
6
|
+
# ROOT app or uiBundle root to inspect (default: current directory)
|
|
7
|
+
#
|
|
8
|
+
# Prints exactly one of the following tokens to stdout, nothing else, and sets
|
|
9
|
+
# a matching exit code so callers can branch without parsing:
|
|
10
|
+
# react (exit 0) — React signals only
|
|
11
|
+
# angular (exit 0) — Angular signals only
|
|
12
|
+
# ambiguous (exit 2) — both React and Angular signals present
|
|
13
|
+
# unknown (exit 3) — neither framework detected
|
|
14
|
+
#
|
|
15
|
+
# Step 0 of the skill acts on the result: a single framework (exit 0) proceeds;
|
|
16
|
+
# `ambiguous` asks the user to disambiguate; `unknown` TERMINATES the workflow
|
|
17
|
+
# (no supported framework found — do not guess).
|
|
18
|
+
|
|
19
|
+
set -u
|
|
20
|
+
|
|
21
|
+
ROOT="${1:-.}"
|
|
22
|
+
angular=0
|
|
23
|
+
react=0
|
|
24
|
+
|
|
25
|
+
# Resolve ROOT to an absolute path when possible (for the angular.json walk-up).
|
|
26
|
+
abs_root="$(cd "$ROOT" 2>/dev/null && pwd || true)"
|
|
27
|
+
|
|
28
|
+
# 1) angular.json at or above ROOT → Angular workspace.
|
|
29
|
+
dir="$abs_root"
|
|
30
|
+
while [ -n "$dir" ]; do
|
|
31
|
+
[ -f "$dir/angular.json" ] && angular=1
|
|
32
|
+
[ "$dir" = "/" ] && break
|
|
33
|
+
dir="$(dirname "$dir")"
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
# 2) package.json dependencies (excluding node_modules).
|
|
37
|
+
while IFS= read -r pkg; do
|
|
38
|
+
[ -z "$pkg" ] && continue
|
|
39
|
+
grep -q '"@angular/core"' "$pkg" 2>/dev/null && angular=1
|
|
40
|
+
grep -Eq '"react"[[:space:]]*:' "$pkg" 2>/dev/null && react=1
|
|
41
|
+
done <<EOF
|
|
42
|
+
$(find "$ROOT" -type d -name node_modules -prune -o -type f -name package.json -print 2>/dev/null)
|
|
43
|
+
EOF
|
|
44
|
+
|
|
45
|
+
# 3) Source-file signatures (excluding node_modules).
|
|
46
|
+
has_file() {
|
|
47
|
+
find "$ROOT" -type d -name node_modules -prune -o -type f -name "$1" -print 2>/dev/null | grep -q .
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Angular: component files, routing module, or @Component-decorated classes.
|
|
51
|
+
has_file '*.component.ts' && angular=1
|
|
52
|
+
has_file 'app.routes.ts' && angular=1
|
|
53
|
+
if grep -rls --exclude-dir=node_modules --include='*.ts' '@Component' "$ROOT" 2>/dev/null | grep -q .; then
|
|
54
|
+
angular=1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# React: JSX/TSX source files.
|
|
58
|
+
has_file '*.tsx' && react=1
|
|
59
|
+
has_file '*.jsx' && react=1
|
|
60
|
+
|
|
61
|
+
if [ "$angular" -eq 1 ] && [ "$react" -eq 1 ]; then
|
|
62
|
+
echo ambiguous
|
|
63
|
+
exit 2
|
|
64
|
+
elif [ "$angular" -eq 1 ]; then
|
|
65
|
+
echo angular
|
|
66
|
+
exit 0
|
|
67
|
+
elif [ "$react" -eq 1 ]; then
|
|
68
|
+
echo react
|
|
69
|
+
exit 0
|
|
70
|
+
else
|
|
71
|
+
echo unknown
|
|
72
|
+
exit 3
|
|
73
|
+
fi
|
|
@@ -60,11 +60,11 @@ A request to rename/rebrand the app (e.g. "call it X everywhere a user would see
|
|
|
60
60
|
Some capabilities ship as pre-built, tested feature packages. The catalog **evolves and is not something you can know from memory** — never decide from the request wording alone whether a capability "is" or "isn't" a feature. Before hand-writing any non-trivial capability (anything beyond a plain page, component, or styling change) in this skill:
|
|
61
61
|
|
|
62
62
|
1. **Consult the authoritative catalog.** Invoke `experience-ui-bundle-features-generate`, which runs `list` to show the *current* set of installable features. Do not rely on a hardcoded or remembered list — this skill deliberately names none, because any names it listed would go stale.
|
|
63
|
-
2. **Detect whether a matching feature is already installed** in the bundle — inspect `package.json` dependencies and existing `src/` files. If present,
|
|
63
|
+
2. **Detect whether a matching feature is already installed** in the bundle — inspect `package.json` dependencies and existing `src/` files. If present, do not reinstall or re-implement it — **but you must still adopt it**: invoke `experience-ui-bundle-features-generate` to `describe` it (which reads the feature's README — the adoption contract), wire it into the app, and, if the feature ships config (e.g. a `config.json`), set that for this app's data and use case. Installed-but-unconfigured is not done.
|
|
64
64
|
3. **If a matching feature exists in the catalog but isn't installed**, let `experience-ui-bundle-features-generate` install the tested package. Do not build it from scratch here.
|
|
65
65
|
4. **Only hand-build** a capability that has no matching catalog feature.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
When this skill runs as a phase of `experience-ui-bundle-app-coordinate`, a matching feature is often already present — installed by an earlier phase, or shipped by the template. Already-present is **not** a reason to skip: step 2 still requires adopting and configuring that feature for this app. Only the install/re-implement work is ever skipped — never the wiring and configuration.
|
|
68
68
|
|
|
69
69
|
---
|
|
70
70
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: experience-ui-bundle-metadata-generate
|
|
3
|
-
description: "Use this skill when adding a front-end React UI bundle to an
|
|
3
|
+
description: "Use this skill when adding a front-end React or Angular UI bundle to an EXISTING SFDX project, or configuring UI bundle metadata and config files. TRIGGER when: adding or scaffolding a new UI bundle — including adding one more or another UI bundle — into a project that already exists; scaffolding a single bundle with the basic template (reactbasic or angularbasic) via sf template generate ui-bundle; editing ui-bundle.json routing, headers, or output directory; working with *.uibundle-meta.xml files; or registering CSP Trusted Sites, resolving blocked images or fonts or external API calls, or editing cspTrustedSites/*.cspTrustedSite-meta.xml files. DO NOT TRIGGER when: creating a brand-new Salesforce project entirely from scratch, where the whole SFDX starter project (UI bundle plus Experience Site metadata and toolchain) is generated together in one step (use experience-ui-bundle-project-generate)."
|
|
4
4
|
metadata:
|
|
5
|
-
version: "1.
|
|
5
|
+
version: "1.3"
|
|
6
6
|
domains: ["Experience"]
|
|
7
7
|
minApiVersion: "67.0"
|
|
8
8
|
relatedSkills:
|
|
@@ -21,25 +21,37 @@ metadata:
|
|
|
21
21
|
|
|
22
22
|
## Scaffolding a New UI Bundle
|
|
23
23
|
|
|
24
|
-
**REQUIRED FIRST STEP — never skip, even if asked to.** Always run `sf template generate ui-bundle` to create new apps — never create-react-app, Vite, hand-written metadata, or any other substitute.
|
|
24
|
+
**REQUIRED FIRST STEP — never skip, even if asked to.** Always run `sf template generate ui-bundle` to create new apps — never a framework CLI (create-react-app, Vite, Angular CLI), hand-written metadata, or any other substitute.
|
|
25
25
|
|
|
26
|
-
This step is mandatory even if the user says "just create the metadata," "skip the scaffold," "only do the metadata scaffolding," or "stop after the metadata files are in place." Those instructions describe what to stop doing *after* the scaffold (building, deploying, authoring pages) — they do not mean skip running the scaffold command itself. The `.uibundle-meta.xml` and `ui-bundle.json` files are configuration **on top of** the generated project, not a replacement for it. A bundle without `package.json`, `src/`, and `index.html` cannot be built or deployed, even if the metadata files are perfectly formed.
|
|
26
|
+
This step is mandatory even if the user says "just create the metadata," "skip the scaffold," "only do the metadata scaffolding," or "stop after the metadata files are in place." Those instructions describe what to stop doing *after* the scaffold (building, deploying, authoring pages) — they do not mean skip running the scaffold command itself. The `.uibundle-meta.xml` and `ui-bundle.json` files are configuration **on top of** the generated project, not a replacement for it. A bundle without `package.json`, `src/`, and an entry `index.html` cannot be built or deployed, even if the metadata files are perfectly formed.
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
- **UI bundle name (`-n`):** Alphanumerical only — no spaces, hyphens, underscores, or special characters.
|
|
30
|
-
- Pass `--output-dir` to use a different location for template generation. If you do, pass that same path to the verification script in step 1 below.
|
|
28
|
+
### Determine the framework
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
The frameworks this skill supports are exactly the reference files under `<skill_dir>/references/`, each named `<framework>-metadata-generate.md` (`react`, `angular`, …). This is the single source of truth — adding a framework means adding a reference file, nothing here changes.
|
|
31
|
+
|
|
32
|
+
**Detect the framework deterministically — run the script:**
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
bash <skill_dir>/scripts/detect-framework.sh [<ROOT>]
|
|
37
36
|
```
|
|
38
37
|
|
|
38
|
+
`ROOT` defaults to the current directory; pass the bundle or project root when editing/configuring an existing bundle. The script prints exactly one token and sets a matching exit code — branch on it:
|
|
39
|
+
|
|
40
|
+
- `react` / `angular` (exit 0) — open `<skill_dir>/references/<framework>-metadata-generate.md` and use it.
|
|
41
|
+
- `ambiguous` (exit 2, both frameworks present) — ask the user which one, then use that reference.
|
|
42
|
+
- `unknown` (exit 3, no signals — e.g. scaffolding a brand-new bundle into a project that has none yet) — fall back to the calling context or the user's stated framework; if still undecided, list `<skill_dir>/references/`, derive the supported set by stripping the `-metadata-generate.md` suffix from each filename, and ask the user to pick.
|
|
43
|
+
|
|
44
|
+
If the calling context or the user already named the framework, that overrides detection — but still confirm a matching reference file exists. **Never guess.**
|
|
45
|
+
|
|
46
|
+
The reference file gives you the exact `--template` flag, the entry-file layout, and the default boilerplate strings to replace for that framework.
|
|
47
|
+
|
|
48
|
+
- **UI bundle name (`-n`):** Alphanumerical only — no spaces, hyphens, underscores, or special characters.
|
|
49
|
+
- Pass `--output-dir` to use a different location for template generation. If you do, pass that same path to the verification script in step 1 below.
|
|
50
|
+
|
|
39
51
|
After generation:
|
|
40
|
-
1. **Verify the scaffold is complete** — run `bash <skill_dir>/scripts/verify-bundle-location.sh <BundleName> [<CustomOutputDir>]` from the project root and follow any error output. This checks both the bundle's location AND that `package.json`, `src/`, and `index.html` exist — if any are missing, the scaffold step was skipped; go back and run `sf template generate ui-bundle` before continuing. Pass `<CustomOutputDir>` only if you used `--output-dir` during scaffolding;
|
|
52
|
+
1. **Verify the scaffold is complete** — run `bash <skill_dir>/scripts/verify-bundle-location.sh <BundleName> [<CustomOutputDir>] [<framework>]` from the project root and follow any error output. This checks both the bundle's location AND that `package.json`, `src/`, and an entry `index.html` exist — if any are missing, the scaffold step was skipped; go back and run `sf template generate ui-bundle` before continuing. Pass `<CustomOutputDir>` only if you used `--output-dir` during scaffolding (pass `""` to skip it while still supplying a framework); pass `<framework>` (`react` or `angular`) so the remediation hint uses the right template.
|
|
41
53
|
2. **Verify API version** — run `bash <skill_dir>/scripts/check-api-version.sh` from the project root to ensure `sourceApiVersion` in `sfdx-project.json` is 67.0 or higher. The script will automatically update it if needed.
|
|
42
|
-
3. Replace all default boilerplate —
|
|
54
|
+
3. Replace all default boilerplate — the framework reference file lists the exact stock `<title>` and placeholder strings to replace
|
|
43
55
|
4. Populate the home page with real content (landing section, banners, hero, navigation)
|
|
44
56
|
5. Update navigation and placeholders (see the `experience-ui-bundle-frontend-generate` skill)
|
|
45
57
|
6. **Configure a hosting target** — a UI bundle without a `<target>` in its meta XML will not be visible in the org. Use `experience-ui-bundle-custom-app-generate` for internal (App Launcher) apps or `experience-ui-bundle-site-generate` for external (Experience Site) apps.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Angular UI Bundle Scaffold
|
|
2
|
+
|
|
3
|
+
Reference for the **Angular** path of `experience-ui-bundle-metadata-generate`. Use this to scaffold the bundle, then return to the "After generation" steps in `SKILL.md`.
|
|
4
|
+
|
|
5
|
+
## Scaffold command
|
|
6
|
+
|
|
7
|
+
Always pass `--template angularbasic` to scaffold an Angular bundle:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Run from SFDX project root. The CLI creates the bundle under
|
|
11
|
+
# force-app/main/default/uiBundles/<AppName>/ — verify this before continuing.
|
|
12
|
+
sf template generate ui-bundle -n CoffeeBoutique --template angularbasic
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Pass `--output-dir` to generate at a different location. If you do, pass that same path to `verify-bundle-location.sh` in the verification step.
|
|
16
|
+
|
|
17
|
+
## What the scaffold produces
|
|
18
|
+
|
|
19
|
+
An Angular (TypeScript, standalone components) app under `force-app/main/default/uiBundles/<AppName>/`:
|
|
20
|
+
|
|
21
|
+
- **Entry HTML:** `src/index.html` (NOT the bundle root), mounting `<app-root>` and carrying a `<base href="/">`.
|
|
22
|
+
- **App entry:** `src/main.ts`; `src/app/app.ts` + `src/app/app.html`, `src/app/app.config.ts`, `src/app/app.routes.ts`; pages under `src/app/pages/`.
|
|
23
|
+
- **Build:** Angular CLI driven by `angular.json` with the `@angular-builders/custom-esbuild:application` builder. Salesforce integration (API-version substitution, org proxy, Live Preview / `SFDC_ENV` / base-href injection) is wired via the esbuild plugin + `middleware/` — no `vite.config.ts`.
|
|
24
|
+
- **Build output:** the builder's `outputPath.browser` is flattened to `dist/`, matching `ui-bundle.json` `outputDir: "dist"` — same as React.
|
|
25
|
+
|
|
26
|
+
## Default boilerplate to replace
|
|
27
|
+
|
|
28
|
+
Replace every stock string before shipping — searching for these is the fastest way to find them:
|
|
29
|
+
|
|
30
|
+
- `<title>MyAngularApp</title>` in `src/index.html` → a real product title.
|
|
31
|
+
- Default `<app-root>` welcome/landing markup in `src/app/app.html` and any placeholder page stubs under `src/app/pages/`.
|
|
32
|
+
- Placeholder navigation and empty routes (see `experience-ui-bundle-frontend-generate`).
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
- **Dev-server port / CSP:** the Angular bundle's dev server is `sf-angular-serve` (the `package.json` `dev` script, provided by `@salesforce/angular-plugin-ui-bundle`), whose default port is `5173` — the same as React's Vite default — overridable with `SF_UIBUNDLE_PORT`. No Angular-specific CSP Trusted Site change is needed for local dev vs React.
|
|
37
|
+
- **Element/binding syntax:** Angular uses `<app-root>` and standalone components with native control flow (`@if` / `@for`) — not JSX. This only matters when authoring pages; the metadata and config files below are framework-neutral.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# React UI Bundle Scaffold
|
|
2
|
+
|
|
3
|
+
Reference for the **React** path of `experience-ui-bundle-metadata-generate`. Use this to scaffold the bundle, then return to the "After generation" steps in `SKILL.md`.
|
|
4
|
+
|
|
5
|
+
## Scaffold command
|
|
6
|
+
|
|
7
|
+
Always pass `--template reactbasic` to scaffold a React/Vite bundle:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Run from SFDX project root. The CLI creates the bundle under
|
|
11
|
+
# force-app/main/default/uiBundles/<AppName>/ — verify this before continuing.
|
|
12
|
+
sf template generate ui-bundle -n CoffeeBoutique --template reactbasic
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Pass `--output-dir` to generate at a different location. If you do, pass that same path to `verify-bundle-location.sh` in the verification step.
|
|
16
|
+
|
|
17
|
+
## What the scaffold produces
|
|
18
|
+
|
|
19
|
+
A React + Vite (TypeScript) app under `force-app/main/default/uiBundles/<AppName>/`:
|
|
20
|
+
|
|
21
|
+
- **Entry HTML:** `index.html` at the bundle root, mounting `<div id="root">` and loading `src/app.tsx`.
|
|
22
|
+
- **App entry:** `src/app.tsx`; pages under `src/pages/`, components under `src/components/`.
|
|
23
|
+
- **Toolchain:** `vite.config.ts`, `package.json`, shadcn/ui primitives, Tailwind, GraphQL client + `codegen.yml`.
|
|
24
|
+
- **Build output:** `dist/` (matches `ui-bundle.json` `outputDir: "dist"`).
|
|
25
|
+
|
|
26
|
+
## Default boilerplate to replace
|
|
27
|
+
|
|
28
|
+
Replace every stock string before shipping — searching for these is the fastest way to find them:
|
|
29
|
+
|
|
30
|
+
- `<title>Welcome to React App</title>` in `index.html` → a real product title.
|
|
31
|
+
- Any "React App" / "Vite + React" placeholder copy and default hero/landing text.
|
|
32
|
+
- Placeholder navigation and empty page stubs (see `experience-ui-bundle-frontend-generate`).
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# detect-framework.sh — deterministic UI Bundle framework detector.
|
|
4
|
+
#
|
|
5
|
+
# Usage: bash detect-framework.sh [ROOT]
|
|
6
|
+
# ROOT app or uiBundle root to inspect (default: current directory)
|
|
7
|
+
#
|
|
8
|
+
# Prints exactly one of the following tokens to stdout, nothing else, and sets
|
|
9
|
+
# a matching exit code so callers can branch without parsing:
|
|
10
|
+
# react (exit 0) — React signals only
|
|
11
|
+
# angular (exit 0) — Angular signals only
|
|
12
|
+
# ambiguous (exit 2) — both React and Angular signals present
|
|
13
|
+
# unknown (exit 3) — neither framework detected
|
|
14
|
+
#
|
|
15
|
+
# Step 0 of the skill acts on the result: a single framework (exit 0) proceeds;
|
|
16
|
+
# `ambiguous` asks the user to disambiguate; `unknown` TERMINATES the workflow
|
|
17
|
+
# (no supported framework found — do not guess).
|
|
18
|
+
|
|
19
|
+
set -u
|
|
20
|
+
|
|
21
|
+
ROOT="${1:-.}"
|
|
22
|
+
angular=0
|
|
23
|
+
react=0
|
|
24
|
+
|
|
25
|
+
# Resolve ROOT to an absolute path when possible (for the angular.json walk-up).
|
|
26
|
+
abs_root="$(cd "$ROOT" 2>/dev/null && pwd || true)"
|
|
27
|
+
|
|
28
|
+
# 1) angular.json at or above ROOT → Angular workspace.
|
|
29
|
+
dir="$abs_root"
|
|
30
|
+
while [ -n "$dir" ]; do
|
|
31
|
+
[ -f "$dir/angular.json" ] && angular=1
|
|
32
|
+
[ "$dir" = "/" ] && break
|
|
33
|
+
dir="$(dirname "$dir")"
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
# 2) package.json dependencies (excluding node_modules).
|
|
37
|
+
while IFS= read -r pkg; do
|
|
38
|
+
[ -z "$pkg" ] && continue
|
|
39
|
+
grep -q '"@angular/core"' "$pkg" 2>/dev/null && angular=1
|
|
40
|
+
grep -Eq '"react"[[:space:]]*:' "$pkg" 2>/dev/null && react=1
|
|
41
|
+
done <<EOF
|
|
42
|
+
$(find "$ROOT" -type d -name node_modules -prune -o -type f -name package.json -print 2>/dev/null)
|
|
43
|
+
EOF
|
|
44
|
+
|
|
45
|
+
# 3) Source-file signatures (excluding node_modules).
|
|
46
|
+
has_file() {
|
|
47
|
+
find "$ROOT" -type d -name node_modules -prune -o -type f -name "$1" -print 2>/dev/null | grep -q .
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Angular: component files, routing module, or @Component-decorated classes.
|
|
51
|
+
has_file '*.component.ts' && angular=1
|
|
52
|
+
has_file 'app.routes.ts' && angular=1
|
|
53
|
+
if grep -rls --exclude-dir=node_modules --include='*.ts' '@Component' "$ROOT" 2>/dev/null | grep -q .; then
|
|
54
|
+
angular=1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# React: JSX/TSX source files.
|
|
58
|
+
has_file '*.tsx' && react=1
|
|
59
|
+
has_file '*.jsx' && react=1
|
|
60
|
+
|
|
61
|
+
if [ "$angular" -eq 1 ] && [ "$react" -eq 1 ]; then
|
|
62
|
+
echo ambiguous
|
|
63
|
+
exit 2
|
|
64
|
+
elif [ "$angular" -eq 1 ]; then
|
|
65
|
+
echo angular
|
|
66
|
+
exit 0
|
|
67
|
+
elif [ "$react" -eq 1 ]; then
|
|
68
|
+
echo react
|
|
69
|
+
exit 0
|
|
70
|
+
else
|
|
71
|
+
echo unknown
|
|
72
|
+
exit 3
|
|
73
|
+
fi
|
|
@@ -1,25 +1,40 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# Verifies that a UI bundle was created under force-app/main/default/uiBundles/
|
|
3
3
|
# (and not at the repo root, which would be non-deployable), AND that the
|
|
4
|
-
# scaffold itself is complete (package.json, src/, index.html present) —
|
|
5
|
-
# just a hand-authored metadata-only directory.
|
|
4
|
+
# scaffold itself is complete (package.json, src/, entry index.html present) —
|
|
5
|
+
# not just a hand-authored metadata-only directory.
|
|
6
|
+
#
|
|
7
|
+
# The entry index.html lives at the bundle root for React (reactbasic) and at
|
|
8
|
+
# src/index.html for Angular (angularbasic), so both locations are accepted.
|
|
6
9
|
#
|
|
7
10
|
# If a custom output directory was used (--output-dir on the scaffold command),
|
|
8
11
|
# pass it as the second argument. The script then verifies the bundle exists
|
|
9
|
-
# there instead of assuming the default location.
|
|
12
|
+
# there instead of assuming the default location. Pass the framework
|
|
13
|
+
# (react|angular) as the third argument so the remediation hint uses the right
|
|
14
|
+
# --template flag; pass "" for the second argument to supply only a framework.
|
|
10
15
|
|
|
11
16
|
set -e
|
|
12
17
|
|
|
13
|
-
if [[ $# -lt 1 || $# -gt
|
|
18
|
+
if [[ $# -lt 1 || $# -gt 3 ]]; then
|
|
14
19
|
echo "ERROR: Bundle name required"
|
|
15
|
-
echo "Usage: bash verify-bundle-location.sh <BundleName> [<CustomOutputDir>]"
|
|
20
|
+
echo "Usage: bash verify-bundle-location.sh <BundleName> [<CustomOutputDir>] [<framework>]"
|
|
16
21
|
exit 1
|
|
17
22
|
fi
|
|
18
23
|
|
|
19
24
|
BUNDLE_NAME="$1"
|
|
20
25
|
CUSTOM_OUTPUT_DIR="${2:-}"
|
|
26
|
+
FRAMEWORK="${3:-}"
|
|
27
|
+
|
|
28
|
+
# Pick the remediation template and the expected entry-HTML location from the
|
|
29
|
+
# framework. When the framework is not supplied we stay lenient: default the
|
|
30
|
+
# hint to reactbasic and accept the entry index.html at either location.
|
|
31
|
+
case "$FRAMEWORK" in
|
|
32
|
+
angular) TEMPLATE="angularbasic"; ENTRY="src/index.html" ;;
|
|
33
|
+
react) TEMPLATE="reactbasic"; ENTRY="index.html" ;;
|
|
34
|
+
*) TEMPLATE="reactbasic"; ENTRY="" ;;
|
|
35
|
+
esac
|
|
21
36
|
|
|
22
|
-
# Checks that the scaffold actually produced a full
|
|
37
|
+
# Checks that the scaffold actually produced a full project, not just
|
|
23
38
|
# hand-written metadata files. Returns 1 (and prints guidance) if incomplete.
|
|
24
39
|
# Pass a second argument with the --output-dir value when checking a bundle
|
|
25
40
|
# in a custom location, so the remediation command matches where the bundle
|
|
@@ -30,10 +45,17 @@ check_scaffold_complete() {
|
|
|
30
45
|
local missing=()
|
|
31
46
|
[[ -f "$bundle_path/package.json" ]] || missing+=("package.json")
|
|
32
47
|
[[ -d "$bundle_path/src" ]] || missing+=("src/")
|
|
33
|
-
|
|
48
|
+
# Entry HTML lives at the bundle root for React and at src/index.html for
|
|
49
|
+
# Angular. When the framework is known, require the correct location; when it
|
|
50
|
+
# is unknown, accept either.
|
|
51
|
+
if [[ -n "$ENTRY" ]]; then
|
|
52
|
+
[[ -f "$bundle_path/$ENTRY" ]] || missing+=("$ENTRY")
|
|
53
|
+
else
|
|
54
|
+
[[ -f "$bundle_path/index.html" || -f "$bundle_path/src/index.html" ]] || missing+=("index.html")
|
|
55
|
+
fi
|
|
34
56
|
|
|
35
57
|
if [[ ${#missing[@]} -gt 0 ]]; then
|
|
36
|
-
local scaffold_cmd="sf template generate ui-bundle -n $BUNDLE_NAME --template
|
|
58
|
+
local scaffold_cmd="sf template generate ui-bundle -n $BUNDLE_NAME --template $TEMPLATE"
|
|
37
59
|
if [[ -n "$output_dir" ]]; then
|
|
38
60
|
scaffold_cmd="$scaffold_cmd --output-dir \"$output_dir\""
|
|
39
61
|
fi
|
|
@@ -113,4 +113,4 @@ From here, continue development with the other ui-bundle skills (`experience-ui-
|
|
|
113
113
|
|
|
114
114
|
- The starters are **minimal** — no seeded sample data or custom objects. Build the rest with the other ui-bundle skills.
|
|
115
115
|
- These templates use the `uiBundles` metadata convention. The UI bundle directory and meta XML are named after the project name you pass to `--name`.
|
|
116
|
-
- `sf template generate project --help` lists all available templates if the flag names ever change.
|
|
116
|
+
- `sf template generate project --help` lists all available templates if the flag names ever change.
|