@salesforce/afv-skills 1.58.0 → 1.60.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-architecture-analyze/SKILL.md +66 -17
- package/skills/agentforce-architecture-analyze/assets/cli/show_access_token.yaml +4 -7
- package/skills/agentforce-architecture-analyze/references/contract.json +1 -1
- package/skills/agentforce-architecture-analyze/scripts/emit_env.py +2 -2
- package/skills/agentforce-architecture-analyze/scripts/main.py +40 -44
- package/skills/agentforce-architecture-analyze/scripts/rest_client.py +11 -3
- package/skills/agentforce-architecture-analyze/scripts/sf_cli.py +77 -10
- package/skills/agentforce-architecture-analyze/scripts/tests/test_end_to_end_fixture.py +1 -0
- package/skills/agentforce-architecture-analyze/scripts/tests/test_flow_children_inflation.py +1 -0
- package/skills/agentforce-architecture-analyze/scripts/tests/test_main_pipeline.py +53 -2
- package/skills/agentforce-architecture-analyze/scripts/tests/test_resolve_creds.py +184 -36
- package/skills/agentforce-architecture-analyze/scripts/tests/test_rest_client.py +17 -0
- package/skills/agentforce-architecture-analyze/scripts/tests/test_sf_cli.py +165 -11
- package/skills/agentforce-architecture-analyze/scripts/tests/test_skill_md_pipeline_block.py +319 -0
- package/skills/agentforce-bot-upgrade/SKILL.md +3 -1
- package/skills/agentforce-d360-analyze/SKILL.md +28 -10
- package/skills/agentforce-d360-analyze/scripts/dc.py +200 -50
- package/skills/agentforce-d360-analyze/scripts/discover_sessions.py +10 -6
- package/skills/agentforce-d360-analyze/scripts/fetch_dc.py +22 -6
- package/skills/agentforce-d360-analyze/scripts/resolve_session.py +21 -13
- package/skills/agentforce-d360-analyze/scripts/tests/test_dc_and_resolve_session.py +298 -76
- package/skills/agentforce-d360-analyze/scripts/tests/test_default_target_org.py +432 -0
- package/skills/agentforce-d360-analyze/scripts/tests/test_discover_sessions.py +1 -1
- package/skills/agentforce-d360-analyze/scripts/tests/test_resolve_session_main.py +9 -3
- package/skills/agentforce-d360-analyze/scripts/tests/test_skill_md_prefix_block.py +176 -0
- package/skills/agentforce-generate/SKILL.md +21 -1
- package/skills/agentforce-generate/references/known-issues.md +51 -1
- package/skills/agentforce-generate/references/legacy-nga-regression-eval.md +547 -0
- package/skills/agentforce-generate/references/upgrade-legacy-agent-to-agentscript.md +577 -0
- package/skills/agentforce-generate/scripts/upgrade-legacy-nga-analyze.py +404 -0
- package/skills/agentforce-generate/scripts/upgrade-legacy-nga-run-trials.sh +58 -0
- package/skills/agentforce-persona-generate/SKILL.md +505 -0
- package/skills/agentforce-persona-generate/assets/checklist-template.md +100 -0
- package/skills/agentforce-persona-generate/assets/persona-encoding-template.md +252 -0
- package/skills/agentforce-persona-generate/assets/persona-template.md +229 -0
- package/skills/agentforce-persona-generate/assets/sample-dialog-template.md +50 -0
- package/skills/agentforce-persona-generate/assets/workshop-outline-template.md +97 -0
- package/skills/agentforce-persona-generate/examples/concierge-persona.md +189 -0
- package/skills/agentforce-persona-generate/examples/concierge-sample-dialog.md +70 -0
- package/skills/agentforce-persona-generate/examples/drover-persona.md +194 -0
- package/skills/agentforce-persona-generate/examples/drover-sample-dialog.md +62 -0
- package/skills/agentforce-persona-generate/examples/steady-hand-persona.md +188 -0
- package/skills/agentforce-persona-generate/examples/steady-hand-sample-dialog.md +68 -0
- package/skills/agentforce-persona-generate/examples/yt-persona.md +195 -0
- package/skills/agentforce-persona-generate/examples/yt-sample-dialog.md +66 -0
- package/skills/agentforce-persona-generate/references/attributions.md +36 -0
- package/skills/agentforce-persona-generate/references/interaction-design-notes.md +30 -0
- package/skills/agentforce-persona-generate/references/persona-encoding-guide.md +566 -0
- package/skills/agentforce-persona-generate/references/persona-framework.md +796 -0
- package/skills/agentforce-persona-generate/references/refinement-mappings.md +31 -0
- package/skills/agentforce-persona-generate/references/scoring-rubric.md +58 -0
- package/skills/agentforce-persona-generate/references/voice-catalog.json +2327 -0
- package/skills/agentforce-persona-generate/references/workshop-question-policy.md +90 -0
- package/skills/agentforce-persona-generate/references/workshop-scenario-seeds.md +119 -0
- package/skills/agentforce-persona-generate/scripts/parse_agent_yaml.py +223 -0
- package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +17 -27
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +7 -17
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +47 -63
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +10 -13
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -46
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +4 -21
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +58 -82
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +16 -315
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +9 -24
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -44
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +11 -63
- package/skills/consumer-goods-rtr-datacloud-export-configure/SKILL.md +2 -1
- package/skills/consumer-goods-tpe-dashboard-configure/SKILL.md +2 -1
- package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/SKILL.md +2 -1
- package/skills/consumer-goods-tpe-datakit-deploy/SKILL.md +2 -1
- package/skills/data360-schema-get/SKILL.md +3 -3
- package/skills/design-systems-slds-validate/references/report-format.md +1 -1
- package/skills/dx-app-analytics-query/SKILL.md +8 -8
- package/skills/dx-org-manage/SKILL.md +1 -0
- package/skills/dx-org-shape-manage/SKILL.md +1 -0
- package/skills/dx-org-snapshot-manage/SKILL.md +172 -0
- package/skills/dx-org-snapshot-manage/examples/create_error_output.json +16 -0
- package/skills/dx-org-snapshot-manage/examples/create_success_output.json +19 -0
- package/skills/dx-org-snapshot-manage/examples/delete_output.json +9 -0
- package/skills/dx-org-snapshot-manage/examples/get_output.json +19 -0
- package/skills/dx-org-snapshot-manage/examples/list_output.json +36 -0
- package/skills/dx-org-snapshot-manage/references/cli_flags.md +179 -0
- package/skills/dx-org-snapshot-manage/references/snapshot_usage.md +55 -0
- package/skills/dx-org-trial-expiration-check/SKILL.md +1 -1
- package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +2 -2
- package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +7 -5
- package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +11 -11
- package/skills/experience-content-media-image-generate/SKILL.md +83 -0
- package/skills/experience-content-media-image-generate/scripts/download-image.sh +84 -0
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +12 -12
- package/skills/experience-ui-bundle-app-coordinate/references/phase-completion-validation.md +3 -3
- package/skills/experience-ui-bundle-app-coordinate/references/phase-execution-pattern.md +9 -7
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-dangling-refs.mjs +132 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.mjs +62 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-1-complete.mjs +71 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-4-complete.mjs +95 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-6-ready.mjs +78 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-prerequisites.mjs +21 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.mjs +28 -0
- package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +3 -1
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.mjs +40 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +7 -5
- package/skills/experience-ui-bundle-frontend-generate/scripts/check-preconditions.mjs +70 -0
- package/skills/experience-ui-bundle-frontend-generate/scripts/resolve-ui-bundle.mjs +76 -0
- package/skills/experience-ui-bundle-frontend-generate/scripts/verify-rules.mjs +115 -0
- package/skills/experience-ui-bundle-metadata-generate/SKILL.md +7 -3
- package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +1 -1
- package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +1 -1
- package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.mjs +43 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.mjs +131 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.mjs +152 -0
- package/skills/experience-ui-bundle-mfa-configure/references/branding.md +10 -6
- package/skills/external-diagram-mermaid-generate/SKILL.md +12 -12
- package/skills/field-service-data-capture-migrate/references/component-mapping.md +1 -1
- package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +1 -2
- package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +1 -0
- package/skills/field-service-data-capture-migrate/references/transformer-rules.md +1 -1
- package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +12 -1
- package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +4 -1
- package/skills/field-service-setup-orchestrator-get/SKILL.md +0 -1
- package/skills/insurance-brokerage-agency-billing-configure/SKILL.md +233 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/accounting-setup.md +117 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/billing-rules-config.md +237 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/billing-settings.md +271 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/demo-policy-config.md +138 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/org-defaults.md +64 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/permissions-config.md +226 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/prerequisites.md +142 -0
- package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +3 -2
- package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-execution-state-and-recovery.md +3 -3
- package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-overview.md +68 -45
- package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-visit-creation-data.md +17 -18
- package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +16 -3
- package/skills/life-sciences-kam-coordinate/references/stage-5-data-creation-data.md +16 -13
- package/skills/marketing-message-test/SKILL.md +194 -0
- package/skills/marketing-message-test/references/api-contract.md +333 -0
- package/skills/omnistudio-callable-apex-generate/SKILL.md +3 -3
- package/skills/omnistudio-datamapper-generate/SKILL.md +6 -6
- package/skills/omnistudio-datapacks-deploy/SKILL.md +11 -11
- package/skills/omnistudio-dependencies-analyze/SKILL.md +5 -5
- package/skills/omnistudio-epc-catalog-generate/SKILL.md +6 -6
- package/skills/omnistudio-flexcard-generate/SKILL.md +6 -6
- package/skills/omnistudio-integration-procedure-generate/SKILL.md +6 -6
- package/skills/omnistudio-omniscript-generate/SKILL.md +6 -5
- package/skills/platform-apex-logs-debug/SKILL.md +1 -0
- package/skills/platform-metadata-deploy/SKILL.md +1 -0
- package/skills/platform-models-api-configure/SKILL.md +5 -5
- package/skills/platform-soql-query/SKILL.md +1 -0
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +17 -6
- package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +107 -192
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone-action.json +6 -6
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +49 -20
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +4 -4
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +224 -290
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/workflow.md +295 -0
- package/skills/service-itsm-incident-priority-configure/SKILL.md +1 -1
- package/skills/service-itsm-slack-itservice-configure/SKILL.md +2 -1
- package/skills/service-itsm-slack-itservice-configure/references/manage-slack-connection.md +2 -2
- package/skills/service-omni-channel-setup-coordinate/SKILL.md +20 -13
- package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +5 -55
- package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +0 -38
- package/skills/service-omni-command-center-analyze/SKILL.md +2 -3
- package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
- package/skills/tableau-next-asset-create/README.md +65 -0
- package/skills/tableau-next-asset-create/SKILL.md +409 -0
- package/skills/tableau-next-asset-create/references/admin-users.md +149 -0
- package/skills/tableau-next-asset-create/references/ai-readiness.md +355 -0
- package/skills/tableau-next-asset-create/references/alerts.md +111 -0
- package/skills/tableau-next-asset-create/references/build-workflow.md +819 -0
- package/skills/tableau-next-asset-create/references/dashboard-authoring.md +302 -0
- package/skills/tableau-next-asset-create/references/dashboard-design-principles.md +352 -0
- package/skills/tableau-next-asset-create/references/data-transform-gotchas.md +210 -0
- package/skills/tableau-next-asset-create/references/data-understanding.md +387 -0
- package/skills/tableau-next-asset-create/references/deep-reference-index.md +74 -0
- package/skills/tableau-next-asset-create/references/destructive-operations.md +62 -0
- package/skills/tableau-next-asset-create/references/edit-dashboard.md +273 -0
- package/skills/tableau-next-asset-create/references/edit-visualization.md +529 -0
- package/skills/tableau-next-asset-create/references/empty-source-handling.md +104 -0
- package/skills/tableau-next-asset-create/references/ingest-and-metric-gotchas.md +638 -0
- package/skills/tableau-next-asset-create/references/insight-bundle.md +69 -0
- package/skills/tableau-next-asset-create/references/large-flat-file-handling.md +331 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_envelope.json +54 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_shared-widget-fields.json +122 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/add_page.json +29 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/delete_page.json +27 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/discard_dashboard.json +11 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget.json +30 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget_to_page.json +30 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/place_widget_on_page.json +30 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_dashboard.json +16 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_page.json +26 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/rename_page.json +28 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/save_dashboard.json +18 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/undo.json +11 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_button_widget.json +69 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_container_widget.json +88 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_filter_widget.json +146 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_metric_widget.json +78 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_navigation_widget.json +80 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_parameter_widget.json +160 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_text_widget.json +103 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_visualization_widget.json +68 -0
- package/skills/tableau-next-asset-create/references/sdm-tool-reference.md +721 -0
- package/skills/tableau-next-asset-create/references/semantic-query-and-enrichment.md +355 -0
- package/skills/tableau-next-asset-create/references/shared-gates.md +322 -0
- package/skills/tableau-next-asset-create/references/sharing-and-promotion.md +306 -0
- package/skills/tableau-next-asset-create/references/tasks/ai-readiness-audit.md +51 -0
- package/skills/tableau-next-asset-create/references/tasks/analyze-data.md +48 -0
- package/skills/tableau-next-asset-create/references/tasks/build-dashboard.md +66 -0
- package/skills/tableau-next-asset-create/references/tasks/build-end-to-end.md +73 -0
- package/skills/tableau-next-asset-create/references/tasks/create-data-transform.md +51 -0
- package/skills/tableau-next-asset-create/references/tasks/create-viz.md +58 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-dashboard.md +80 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-sdm.md +106 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-viz.md +40 -0
- package/skills/tableau-next-asset-create/references/tasks/enrich-model.md +68 -0
- package/skills/tableau-next-asset-create/references/tasks/ingest-flat-file.md +68 -0
- package/skills/tableau-next-asset-create/references/tasks/manage-alert.md +35 -0
- package/skills/tableau-next-asset-create/references/tasks/profile-dataset.md +47 -0
- package/skills/tableau-next-asset-create/references/tasks/promote-or-reuse.md +46 -0
- package/skills/tableau-next-asset-create/references/tasks/provision-user.md +39 -0
- package/skills/tableau-next-asset-create/references/tasks/query-model.md +92 -0
- package/skills/tableau-next-asset-create/references/tasks/review-verified-questions.md +42 -0
- package/skills/tableau-next-asset-create/references/tasks/share-asset.md +37 -0
- package/skills/tableau-next-asset-create/references/verified-questions.md +125 -0
- package/skills/tableau-next-asset-create/references/viz-authoring.md +992 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-dangling-refs.sh +0 -42
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.sh +0 -26
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-1-complete.sh +0 -35
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-4-complete.sh +0 -47
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-6-ready.sh +0 -33
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-prerequisites.sh +0 -20
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.sh +0 -15
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +0 -30
- package/skills/experience-ui-bundle-frontend-generate/scripts/check-preconditions.sh +0 -37
- package/skills/experience-ui-bundle-frontend-generate/scripts/resolve-ui-bundle.sh +0 -66
- package/skills/experience-ui-bundle-frontend-generate/scripts/verify-rules.sh +0 -58
- package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.sh +0 -30
- package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +0 -73
- package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +0 -118
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +0 -102
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Verify no surviving file still imports/references a file deleted during scaffold pruning
|
|
3
|
-
# Usage: check-dangling-refs.sh <deleted-basename> [<deleted-basename> ...]
|
|
4
|
-
# <deleted-basename> is the file name without extension, e.g. "codegen" for codegen.yml,
|
|
5
|
-
# "graphqlClient" for src/api/graphqlClient.ts, "useAsyncData" for the deleted hook.
|
|
6
|
-
# Exit 0 if no dangling references found, exit 1 with error message(s) if any are found.
|
|
7
|
-
|
|
8
|
-
set -e
|
|
9
|
-
|
|
10
|
-
if [ "$#" -eq 0 ]; then
|
|
11
|
-
echo "ERROR: check-dangling-refs.sh requires at least one deleted-file basename as an argument"
|
|
12
|
-
exit 1
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
BUNDLE_DIR=$(find force-app/main/default/uiBundles -mindepth 1 -maxdepth 1 -type d 2>/dev/null | head -1)
|
|
16
|
-
|
|
17
|
-
if [ -z "$BUNDLE_DIR" ]; then
|
|
18
|
-
echo "ERROR: No UI bundle directory found in force-app/main/default/uiBundles/"
|
|
19
|
-
exit 1
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
FOUND_DANGLING=0
|
|
23
|
-
|
|
24
|
-
for basename in "$@"; do
|
|
25
|
-
# Search all tracked source/config files (excluding node_modules, dist, build) for the
|
|
26
|
-
# basename — catches imports, requires, and config references (e.g. codegen.yml paths).
|
|
27
|
-
MATCHES=$(grep -rlF --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=build \
|
|
28
|
-
--exclude-dir=.git -- "$basename" "$BUNDLE_DIR" 2>/dev/null || true)
|
|
29
|
-
|
|
30
|
-
if [ -n "$MATCHES" ]; then
|
|
31
|
-
echo "ERROR: Dangling reference to deleted file '$basename' found in:"
|
|
32
|
-
echo "$MATCHES" | sed 's/^/ - /'
|
|
33
|
-
FOUND_DANGLING=1
|
|
34
|
-
fi
|
|
35
|
-
done
|
|
36
|
-
|
|
37
|
-
if [ "$FOUND_DANGLING" -eq 1 ]; then
|
|
38
|
-
exit 1
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
echo "SUCCESS: No dangling references found for: $*"
|
|
42
|
-
exit 0
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Check which hosting target is configured in .uibundle-meta.xml files
|
|
3
|
-
|
|
4
|
-
# Find all .uibundle-meta.xml files
|
|
5
|
-
META_FILES=$(find . -name "*.uibundle-meta.xml" -type f 2>/dev/null)
|
|
6
|
-
|
|
7
|
-
if [ -z "$META_FILES" ]; then
|
|
8
|
-
echo "ERROR: No .uibundle-meta.xml files found"
|
|
9
|
-
exit 1
|
|
10
|
-
fi
|
|
11
|
-
|
|
12
|
-
# Check for ExperienceSite target
|
|
13
|
-
if echo "$META_FILES" | xargs grep -q '<target>ExperienceSite</target>' 2>/dev/null; then
|
|
14
|
-
echo "ExperienceSite"
|
|
15
|
-
exit 0
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
# Check for CustomApplication target
|
|
19
|
-
if echo "$META_FILES" | xargs grep -q '<target>CustomApplication</target>' 2>/dev/null; then
|
|
20
|
-
echo "CustomApplication"
|
|
21
|
-
exit 0
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
# No valid target found
|
|
25
|
-
echo "ERROR: No valid hosting target found in .uibundle-meta.xml"
|
|
26
|
-
exit 1
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Verify Phase 1 (Scaffolding) completed successfully
|
|
3
|
-
# Exit 0 if complete, exit 1 with error message if incomplete
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
BUNDLE_DIR=$(find force-app/main/default/uiBundles -mindepth 1 -maxdepth 1 -type d 2>/dev/null | head -1)
|
|
8
|
-
|
|
9
|
-
if [ -z "$BUNDLE_DIR" ]; then
|
|
10
|
-
echo "ERROR: Phase 1 incomplete: No UI bundle directory found in force-app/main/default/uiBundles/"
|
|
11
|
-
exit 1
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
if [ ! -d "$BUNDLE_DIR/src" ]; then
|
|
15
|
-
echo "ERROR: Phase 1 incomplete: No src/ directory found in $BUNDLE_DIR"
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
if ! ls "$BUNDLE_DIR"/*.uibundle-meta.xml >/dev/null 2>&1; then
|
|
20
|
-
echo "ERROR: Phase 1 incomplete: No .uibundle-meta.xml file found in $BUNDLE_DIR"
|
|
21
|
-
exit 1
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
if ! grep -q '<target>' "$BUNDLE_DIR"/*.uibundle-meta.xml 2>/dev/null; then
|
|
25
|
-
echo "ERROR: Phase 1 incomplete: .uibundle-meta.xml missing <target> element"
|
|
26
|
-
exit 1
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
if [ ! -f "$BUNDLE_DIR/package.json" ]; then
|
|
30
|
-
echo "ERROR: Phase 1 incomplete: No package.json found in $BUNDLE_DIR"
|
|
31
|
-
exit 1
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
echo "SUCCESS: Phase 1 complete: Scaffold verified"
|
|
35
|
-
exit 0
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Verify Phase 4 (UI) completed successfully
|
|
3
|
-
# Exit 0 if complete, exit 1 with error message if incomplete
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
BUNDLE_DIR=$(find force-app/main/default/uiBundles -mindepth 1 -maxdepth 1 -type d 2>/dev/null | head -1)
|
|
8
|
-
|
|
9
|
-
if [ -z "$BUNDLE_DIR" ]; then
|
|
10
|
-
echo "ERROR: Phase 4 cannot run: No UI bundle directory found (Phase 1 not complete)"
|
|
11
|
-
exit 1
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
# Check Phase 1 scaffold prerequisites
|
|
15
|
-
if [ ! -f "$BUNDLE_DIR/package.json" ]; then
|
|
16
|
-
echo "ERROR: Phase 4 cannot run: No package.json found (Phase 1 not complete)"
|
|
17
|
-
exit 1
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
if ! grep -q '"react"' "$BUNDLE_DIR/package.json" 2>/dev/null; then
|
|
21
|
-
echo "ERROR: Phase 4 cannot run: React dependencies not installed in package.json"
|
|
22
|
-
exit 1
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
# Check Phase 4 completion
|
|
26
|
-
if [ ! -f "$BUNDLE_DIR/src/App.tsx" ]; then
|
|
27
|
-
echo "ERROR: Phase 4 incomplete: No App.tsx found in $BUNDLE_DIR/src/"
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
if [ ! -d "$BUNDLE_DIR/src/pages" ]; then
|
|
32
|
-
echo "ERROR: Phase 4 incomplete: No pages/ directory found in $BUNDLE_DIR/src/"
|
|
33
|
-
exit 1
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
if [ -z "$(find "$BUNDLE_DIR/src/pages" -name '*.tsx' 2>/dev/null)" ]; then
|
|
37
|
-
echo "ERROR: Phase 4 incomplete: No .tsx files found in pages/ directory"
|
|
38
|
-
exit 1
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
if [ ! -f "$BUNDLE_DIR/dist/index.html" ]; then
|
|
42
|
-
echo "ERROR: Phase 4 incomplete: No dist/index.html found (build not complete)"
|
|
43
|
-
exit 1
|
|
44
|
-
fi
|
|
45
|
-
|
|
46
|
-
echo "SUCCESS: Phase 4 complete: UI verified"
|
|
47
|
-
exit 0
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Verify Phase 6 (Deployment) prerequisites are met
|
|
3
|
-
# Exit 0 if ready, exit 1 with error message if not ready
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
BUNDLE_DIR=$(find force-app/main/default/uiBundles -mindepth 1 -maxdepth 1 -type d 2>/dev/null | head -1)
|
|
8
|
-
|
|
9
|
-
if [ -z "$BUNDLE_DIR" ]; then
|
|
10
|
-
echo "ERROR: Phase 6 cannot run: No UI bundle directory found (Phase 1 not complete)"
|
|
11
|
-
exit 1
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
# Check build artifact exists
|
|
15
|
-
if [ ! -f "$BUNDLE_DIR/dist/index.html" ]; then
|
|
16
|
-
echo "ERROR: Phase 6 cannot run: No dist/index.html found (Phase 4 build not complete)"
|
|
17
|
-
exit 1
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
# Check org authentication
|
|
21
|
-
if ! sf org display --json >/dev/null 2>&1; then
|
|
22
|
-
echo "ERROR: Phase 6 cannot run: No authenticated org found (run: sf org login web)"
|
|
23
|
-
exit 1
|
|
24
|
-
fi
|
|
25
|
-
|
|
26
|
-
# Check hosting target is set
|
|
27
|
-
if ! grep -q '<target>' "$BUNDLE_DIR"/*.uibundle-meta.xml 2>/dev/null; then
|
|
28
|
-
echo "ERROR: Phase 6 cannot run: .uibundle-meta.xml missing <target> element (Phase 1 not complete)"
|
|
29
|
-
exit 1
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
echo "SUCCESS: Phase 6 ready: All deployment prerequisites met"
|
|
33
|
-
exit 0
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Check prerequisites for UI Bundle app building
|
|
3
|
-
# Exit 0 if all prerequisites met, exit 1 with error message if any missing
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
# Check Node.js version (requires >= 20.x)
|
|
8
|
-
if ! command -v node >/dev/null 2>&1; then
|
|
9
|
-
echo "ERROR: Node.js not found. Install Node.js >= 20.x"
|
|
10
|
-
exit 1
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
NODE_VERSION=$(node --version 2>/dev/null | sed 's/^v//' | cut -d. -f1)
|
|
14
|
-
if [ "$NODE_VERSION" -lt 20 ]; then
|
|
15
|
-
echo "ERROR: Node.js version $NODE_VERSION detected. Requires >= 20.x"
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
echo "SUCCESS: Node.js v${NODE_VERSION} meets the >= 20.x requirement"
|
|
20
|
-
exit 0
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Check if sfdx-project.json exists and is valid JSON
|
|
3
|
-
|
|
4
|
-
if [ ! -f sfdx-project.json ]; then
|
|
5
|
-
echo 'ERROR: sfdx-project.json not found'
|
|
6
|
-
exit 1
|
|
7
|
-
fi
|
|
8
|
-
|
|
9
|
-
# Validate JSON format using python (more portable than node)
|
|
10
|
-
if ! python3 -c "import json; json.load(open('sfdx-project.json'))" 2>/dev/null; then
|
|
11
|
-
echo 'ERROR: sfdx-project.json is not valid JSON'
|
|
12
|
-
exit 1
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
echo 'sfdx-project.json is valid'
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Resolve the existing path of a UIBundle's meta XML file.
|
|
3
|
-
#
|
|
4
|
-
# UIBundle metadata may live at either the nested bundle-style path
|
|
5
|
-
# (uiBundles/{appName}/{appName}.uibundle-meta.xml) or, in older/hand-authored
|
|
6
|
-
# projects, the flat path (uiBundles/{appName}.uibundle-meta.xml). This script
|
|
7
|
-
# performs the deterministic file-existence check and prints whichever path
|
|
8
|
-
# already exists, preferring the nested layout.
|
|
9
|
-
#
|
|
10
|
-
# Usage: scripts/resolve-uibundle-path.sh <appName>
|
|
11
|
-
|
|
12
|
-
set -euo pipefail
|
|
13
|
-
|
|
14
|
-
APP="${1:-}"
|
|
15
|
-
if [ -z "$APP" ]; then
|
|
16
|
-
echo "ERROR: appName argument is required" >&2
|
|
17
|
-
exit 1
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
NESTED="uiBundles/${APP}/${APP}.uibundle-meta.xml"
|
|
21
|
-
FLAT="uiBundles/${APP}.uibundle-meta.xml"
|
|
22
|
-
|
|
23
|
-
if [ -f "$NESTED" ]; then
|
|
24
|
-
echo "$NESTED"
|
|
25
|
-
elif [ -f "$FLAT" ]; then
|
|
26
|
-
echo "$FLAT"
|
|
27
|
-
else
|
|
28
|
-
echo "ERROR: no .uibundle-meta.xml found for $APP" >&2
|
|
29
|
-
exit 1
|
|
30
|
-
fi
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Verify a resolved UI bundle directory is actually scaffolded before any
|
|
3
|
-
# rule in this skill applies.
|
|
4
|
-
# Usage: check-preconditions.sh <bundle-dir>
|
|
5
|
-
# <bundle-dir> is the path printed by resolve-ui-bundle.sh.
|
|
6
|
-
#
|
|
7
|
-
# Exit 0 if the bundle is scaffolded (src/appLayout.tsx, src/routes.tsx, and
|
|
8
|
-
# src/components/ui/ all present).
|
|
9
|
-
# Exit 1 with the missing pieces listed if the bundle is a fresh SFDX
|
|
10
|
-
# project, a non-UI-bundle React project, or only partially scaffolded —
|
|
11
|
-
# the caller must stop and redirect the user to
|
|
12
|
-
# experience-ui-bundle-app-coordinate (or experience-ui-bundle-metadata-generate)
|
|
13
|
-
# instead of falling back to generic React knowledge.
|
|
14
|
-
|
|
15
|
-
set -uo pipefail
|
|
16
|
-
|
|
17
|
-
BUNDLE_DIR="${1:-}"
|
|
18
|
-
|
|
19
|
-
if [ -z "$BUNDLE_DIR" ] || [ ! -d "$BUNDLE_DIR" ]; then
|
|
20
|
-
echo "ERROR: check-preconditions.sh requires a valid bundle directory argument" >&2
|
|
21
|
-
exit 1
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
MISSING=()
|
|
25
|
-
[ -f "$BUNDLE_DIR/src/appLayout.tsx" ] || MISSING+=("src/appLayout.tsx")
|
|
26
|
-
[ -f "$BUNDLE_DIR/src/routes.tsx" ] || MISSING+=("src/routes.tsx")
|
|
27
|
-
[ -d "$BUNDLE_DIR/src/components/ui" ] || MISSING+=("src/components/ui/")
|
|
28
|
-
|
|
29
|
-
if [ "${#MISSING[@]}" -gt 0 ]; then
|
|
30
|
-
echo "ERROR: $BUNDLE_DIR is not a scaffolded UI bundle. Missing:" >&2
|
|
31
|
-
printf ' - %s\n' "${MISSING[@]}" >&2
|
|
32
|
-
echo "Stop here. Tell the user the bundle isn't scaffolded yet and direct them to experience-ui-bundle-app-coordinate (or experience-ui-bundle-metadata-generate) to scaffold it first." >&2
|
|
33
|
-
exit 1
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
echo "SUCCESS: $BUNDLE_DIR is scaffolded (src/appLayout.tsx, src/routes.tsx, src/components/ui/ present)"
|
|
37
|
-
exit 0
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Resolve the single UI bundle directory for this project.
|
|
3
|
-
# Usage: resolve-ui-bundle.sh [project-root] (default: current directory)
|
|
4
|
-
#
|
|
5
|
-
# Reads sfdx-project.json's packageDirectories[0].path, looks under
|
|
6
|
-
# <that-path>/main/default/uiBundles/, and prints the resolved bundle
|
|
7
|
-
# directory to stdout on success.
|
|
8
|
-
#
|
|
9
|
-
# Exit 0: exactly one bundle directory found — printed to stdout.
|
|
10
|
-
# Exit 1: sfdx-project.json missing/invalid, or no uiBundles/* subdirectory
|
|
11
|
-
# found at all (not a scaffolded SFDX project yet).
|
|
12
|
-
# Exit 2: multiple uiBundles/* subdirectories found — caller MUST ask the
|
|
13
|
-
# user which one they mean rather than guessing; candidate names are
|
|
14
|
-
# printed to stderr.
|
|
15
|
-
|
|
16
|
-
set -uo pipefail
|
|
17
|
-
|
|
18
|
-
PROJECT_ROOT="${1:-.}"
|
|
19
|
-
SFDX_PROJECT="$PROJECT_ROOT/sfdx-project.json"
|
|
20
|
-
|
|
21
|
-
if [ ! -f "$SFDX_PROJECT" ]; then
|
|
22
|
-
echo "ERROR: sfdx-project.json not found at $SFDX_PROJECT" >&2
|
|
23
|
-
exit 1
|
|
24
|
-
fi
|
|
25
|
-
|
|
26
|
-
SOURCE_PATH=$(python3 -c "
|
|
27
|
-
import json, sys
|
|
28
|
-
try:
|
|
29
|
-
with open('$SFDX_PROJECT') as f:
|
|
30
|
-
data = json.load(f)
|
|
31
|
-
dirs = data.get('packageDirectories', [])
|
|
32
|
-
print(dirs[0].get('path', '') if dirs else '')
|
|
33
|
-
except Exception:
|
|
34
|
-
print('')
|
|
35
|
-
" 2>/dev/null)
|
|
36
|
-
|
|
37
|
-
if [ -z "$SOURCE_PATH" ]; then
|
|
38
|
-
echo "ERROR: sfdx-project.json is invalid or has no packageDirectories[0].path" >&2
|
|
39
|
-
exit 1
|
|
40
|
-
fi
|
|
41
|
-
|
|
42
|
-
BUNDLES_DIR="$PROJECT_ROOT/$SOURCE_PATH/main/default/uiBundles"
|
|
43
|
-
|
|
44
|
-
if [ ! -d "$BUNDLES_DIR" ]; then
|
|
45
|
-
echo "ERROR: No uiBundles/ directory found at $BUNDLES_DIR" >&2
|
|
46
|
-
exit 1
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
BUNDLE_DIRS=()
|
|
50
|
-
while IFS= read -r d; do
|
|
51
|
-
BUNDLE_DIRS+=("$d")
|
|
52
|
-
done < <(find "$BUNDLES_DIR" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | sort)
|
|
53
|
-
|
|
54
|
-
if [ "${#BUNDLE_DIRS[@]}" -eq 0 ]; then
|
|
55
|
-
echo "ERROR: $BUNDLES_DIR exists but contains no bundle subdirectories" >&2
|
|
56
|
-
exit 1
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
if [ "${#BUNDLE_DIRS[@]}" -gt 1 ]; then
|
|
60
|
-
echo "AMBIGUOUS: Multiple UI bundle directories found — ask the user which one they mean before editing or running any command:" >&2
|
|
61
|
-
printf ' - %s\n' "${BUNDLE_DIRS[@]}" >&2
|
|
62
|
-
exit 2
|
|
63
|
-
fi
|
|
64
|
-
|
|
65
|
-
echo "${BUNDLE_DIRS[0]}"
|
|
66
|
-
exit 0
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Grep-based verification of the hard, checkable rules in this skill that
|
|
3
|
-
# `npm run lint` / `npm run build` do not catch on their own — a wrong
|
|
4
|
-
# react-router-dom import, a hardcoded basename, an inline style prop, a
|
|
5
|
-
# stray lightning/*-or-@wire import, or leftover template boilerplate can
|
|
6
|
-
# all lint and build clean while breaking at runtime or shipping unfinished
|
|
7
|
-
# branding.
|
|
8
|
-
#
|
|
9
|
-
# Usage: verify-rules.sh <file-or-dir> [<file-or-dir> ...]
|
|
10
|
-
# Pass the specific files you edited, or the bundle's src/ directory (and
|
|
11
|
-
# its index.html) to check everything.
|
|
12
|
-
#
|
|
13
|
-
# Exit 0 if no violations are found.
|
|
14
|
-
# Exit 1 with every violation listed (rule + matching file paths) if any
|
|
15
|
-
# are found — fix them before considering the task complete, even if lint
|
|
16
|
-
# and build passed.
|
|
17
|
-
|
|
18
|
-
set -uo pipefail
|
|
19
|
-
|
|
20
|
-
if [ "$#" -eq 0 ]; then
|
|
21
|
-
echo "ERROR: verify-rules.sh requires at least one file or directory argument" >&2
|
|
22
|
-
exit 1
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
for p in "$@"; do
|
|
26
|
-
if [ ! -e "$p" ]; then
|
|
27
|
-
echo "ERROR: path does not exist: $p" >&2
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
done
|
|
31
|
-
|
|
32
|
-
FOUND=0
|
|
33
|
-
|
|
34
|
-
check() {
|
|
35
|
-
label="$1"
|
|
36
|
-
pattern="$2"
|
|
37
|
-
shift 2
|
|
38
|
-
hits=$(grep -rlE --include='*.ts' --include='*.tsx' --include='*.js' --include='*.jsx' --include='*.html' \
|
|
39
|
-
--exclude-dir=node_modules --exclude-dir=dist --exclude-dir=build -- "$pattern" "$@" 2>/dev/null || true)
|
|
40
|
-
if [ -n "$hits" ]; then
|
|
41
|
-
echo "ERROR: $label found in:" >&2
|
|
42
|
-
echo "$hits" | sed 's/^/ - /' >&2
|
|
43
|
-
FOUND=1
|
|
44
|
-
fi
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
check 'import from "react-router-dom" (must be "react-router")' 'from[[:space:]]+['"'"'"]react-router-dom['"'"'"]' "$@"
|
|
48
|
-
check 'a hardcoded basename literal (must derive from <base href> at runtime)' 'basename:[[:space:]]*['"'"'"][/A-Za-z0-9_-]+['"'"'"]' "$@"
|
|
49
|
-
check 'an inline style={{...}} prop (Tailwind utility classes only)' 'style=\{\{' "$@"
|
|
50
|
-
check 'a forbidden lightning/* import or @wire usage (LWC-only)' 'from[[:space:]]+['"'"'"]lightning/|@wire' "$@"
|
|
51
|
-
check 'leftover boilerplate branding (<title>React App</title> / Vite + React)' '<title>[^<]*React App[^<]*</title>|Vite[[:space:]]*\+[[:space:]]*React' "$@"
|
|
52
|
-
|
|
53
|
-
if [ "$FOUND" -eq 1 ]; then
|
|
54
|
-
exit 1
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
echo "SUCCESS: No hard-rule violations found in: $*"
|
|
58
|
-
exit 0
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Checks that sourceApiVersion in sfdx-project.json is 67.0 or higher.
|
|
3
|
-
# If lower, updates it to "67.0".
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
PROJECT_FILE="sfdx-project.json"
|
|
8
|
-
|
|
9
|
-
if [[ ! -f "$PROJECT_FILE" ]]; then
|
|
10
|
-
echo "ERROR: $PROJECT_FILE not found in current directory"
|
|
11
|
-
exit 1
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
# Extract sourceApiVersion and check if it's below 67.0
|
|
15
|
-
version=$(jq -r '.sourceApiVersion // "0"' "$PROJECT_FILE")
|
|
16
|
-
is_below=$(jq --arg v "$version" -n '($v | split(".") | .[0] | tonumber) < 67')
|
|
17
|
-
|
|
18
|
-
if [[ "$is_below" == "true" ]]; then
|
|
19
|
-
echo "WARNING: sourceApiVersion is $version (< 67.0)"
|
|
20
|
-
echo "Updating $PROJECT_FILE to set sourceApiVersion to \"67.0\""
|
|
21
|
-
|
|
22
|
-
# Update the file
|
|
23
|
-
jq '.sourceApiVersion = "67.0"' "$PROJECT_FILE" > "$PROJECT_FILE.tmp"
|
|
24
|
-
mv "$PROJECT_FILE.tmp" "$PROJECT_FILE"
|
|
25
|
-
|
|
26
|
-
echo "OK: Updated sourceApiVersion to 67.0"
|
|
27
|
-
exit 0
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
echo "OK: sourceApiVersion is $version (>= 67.0)"
|
|
@@ -1,73 +0,0 @@
|
|
|
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,118 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Verifies that a UI bundle was created under force-app/main/default/uiBundles/
|
|
3
|
-
# (and not at the repo root, which would be non-deployable), AND that the
|
|
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.
|
|
9
|
-
#
|
|
10
|
-
# If a custom output directory was used (--output-dir on the scaffold command),
|
|
11
|
-
# pass it as the second argument. The script then verifies the bundle exists
|
|
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.
|
|
15
|
-
|
|
16
|
-
set -e
|
|
17
|
-
|
|
18
|
-
if [[ $# -lt 1 || $# -gt 3 ]]; then
|
|
19
|
-
echo "ERROR: Bundle name required"
|
|
20
|
-
echo "Usage: bash verify-bundle-location.sh <BundleName> [<CustomOutputDir>] [<framework>]"
|
|
21
|
-
exit 1
|
|
22
|
-
fi
|
|
23
|
-
|
|
24
|
-
BUNDLE_NAME="$1"
|
|
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
|
|
36
|
-
|
|
37
|
-
# Checks that the scaffold actually produced a full project, not just
|
|
38
|
-
# hand-written metadata files. Returns 1 (and prints guidance) if incomplete.
|
|
39
|
-
# Pass a second argument with the --output-dir value when checking a bundle
|
|
40
|
-
# in a custom location, so the remediation command matches where the bundle
|
|
41
|
-
# actually needs to end up rather than always pointing at the default path.
|
|
42
|
-
check_scaffold_complete() {
|
|
43
|
-
local bundle_path="$1"
|
|
44
|
-
local output_dir="${2:-}"
|
|
45
|
-
local missing=()
|
|
46
|
-
[[ -f "$bundle_path/package.json" ]] || missing+=("package.json")
|
|
47
|
-
[[ -d "$bundle_path/src" ]] || missing+=("src/")
|
|
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
|
|
56
|
-
|
|
57
|
-
if [[ ${#missing[@]} -gt 0 ]]; then
|
|
58
|
-
local scaffold_cmd="sf template generate ui-bundle -n $BUNDLE_NAME --template $TEMPLATE"
|
|
59
|
-
if [[ -n "$output_dir" ]]; then
|
|
60
|
-
scaffold_cmd="$scaffold_cmd --output-dir \"$output_dir\""
|
|
61
|
-
fi
|
|
62
|
-
echo "ERROR: Bundle found at $bundle_path, but the scaffold is incomplete. Missing:" >&2
|
|
63
|
-
printf ' - %s\n' "${missing[@]}" >&2
|
|
64
|
-
echo "" >&2
|
|
65
|
-
echo "This usually means 'sf template generate ui-bundle' was never run — metadata" >&2
|
|
66
|
-
echo "files alone were hand-authored instead. Run the scaffold command now:" >&2
|
|
67
|
-
echo " $scaffold_cmd" >&2
|
|
68
|
-
echo "Metadata files are configuration ON TOP of the scaffold, not a substitute for it." >&2
|
|
69
|
-
return 1
|
|
70
|
-
fi
|
|
71
|
-
return 0
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if [[ -n "$CUSTOM_OUTPUT_DIR" ]]; then
|
|
75
|
-
CUSTOM_PATH="$CUSTOM_OUTPUT_DIR/$BUNDLE_NAME"
|
|
76
|
-
if [[ -d "$CUSTOM_PATH" ]]; then
|
|
77
|
-
if check_scaffold_complete "$CUSTOM_PATH" "$CUSTOM_OUTPUT_DIR"; then
|
|
78
|
-
echo "OK: Bundle found at $CUSTOM_PATH (custom output-dir location, scaffold complete)"
|
|
79
|
-
exit 0
|
|
80
|
-
fi
|
|
81
|
-
exit 1
|
|
82
|
-
fi
|
|
83
|
-
echo "ERROR: Bundle not found at custom output-dir location: $CUSTOM_PATH"
|
|
84
|
-
echo "Check that --output-dir matched what was passed to the scaffold command."
|
|
85
|
-
exit 1
|
|
86
|
-
fi
|
|
87
|
-
|
|
88
|
-
EXPECTED_PATH="force-app/main/default/uiBundles/$BUNDLE_NAME"
|
|
89
|
-
WRONG_PATH="uiBundles/$BUNDLE_NAME"
|
|
90
|
-
|
|
91
|
-
if [[ -d "$EXPECTED_PATH" ]]; then
|
|
92
|
-
if check_scaffold_complete "$EXPECTED_PATH"; then
|
|
93
|
-
echo "OK: Bundle found at $EXPECTED_PATH (deployable location, scaffold complete)"
|
|
94
|
-
exit 0
|
|
95
|
-
fi
|
|
96
|
-
exit 1
|
|
97
|
-
fi
|
|
98
|
-
|
|
99
|
-
if [[ -d "$WRONG_PATH" ]]; then
|
|
100
|
-
echo "ERROR: Bundle found at repo root: $WRONG_PATH"
|
|
101
|
-
echo "This location is NOT deployable. The SFDX deploy command will not find it."
|
|
102
|
-
echo ""
|
|
103
|
-
echo "To fix: Move the bundle to force-app/main/default/uiBundles/"
|
|
104
|
-
echo " mkdir -p force-app/main/default/uiBundles/ && mv $WRONG_PATH $EXPECTED_PATH"
|
|
105
|
-
echo ""
|
|
106
|
-
check_scaffold_complete "$WRONG_PATH" || true
|
|
107
|
-
exit 1
|
|
108
|
-
fi
|
|
109
|
-
|
|
110
|
-
echo "ERROR: Bundle not found at either location:"
|
|
111
|
-
echo " - Expected: $EXPECTED_PATH"
|
|
112
|
-
echo " - Also checked: $WRONG_PATH"
|
|
113
|
-
echo ""
|
|
114
|
-
echo "If a custom --output-dir was used, re-run this script with that directory"
|
|
115
|
-
echo "as the second argument: bash verify-bundle-location.sh $BUNDLE_NAME <CustomOutputDir>"
|
|
116
|
-
echo ""
|
|
117
|
-
echo "Otherwise, the scaffold command may have failed. Check for errors above."
|
|
118
|
-
exit 1
|