@salesforce/b2c-cli 2.3.1 → 2.5.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.
Files changed (442) hide show
  1. package/bin/dev.js +8 -8
  2. package/bin/run.js +5 -7
  3. package/content/guidance/b2c/b2c-business-manager-extensions/SKILL.md +361 -0
  4. package/content/guidance/b2c/b2c-business-manager-extensions/references/EXTENSIONS-XML.md +458 -0
  5. package/content/guidance/b2c/b2c-controllers/SKILL.md +301 -0
  6. package/content/guidance/b2c/b2c-controllers/references/CLASSIC-PATTERNS.md +335 -0
  7. package/content/guidance/b2c/b2c-controllers/references/SFRA-PATTERNS.md +400 -0
  8. package/content/guidance/b2c/b2c-custom-api-development/SKILL.md +281 -0
  9. package/content/guidance/b2c/b2c-custom-api-development/references/CONTRACT.md +142 -0
  10. package/content/guidance/b2c/b2c-custom-api-development/references/IMPLEMENTATION.md +153 -0
  11. package/content/guidance/b2c/b2c-custom-api-development/references/TESTING.md +118 -0
  12. package/content/guidance/b2c/b2c-custom-caches/SKILL.md +279 -0
  13. package/content/guidance/b2c/b2c-custom-job-steps/SKILL.md +520 -0
  14. package/content/guidance/b2c/b2c-custom-job-steps/references/CHUNK-ORIENTED.md +377 -0
  15. package/content/guidance/b2c/b2c-custom-job-steps/references/JOBS-XML.md +212 -0
  16. package/content/guidance/b2c/b2c-custom-job-steps/references/STEPTYPES-JSON.md +373 -0
  17. package/content/guidance/b2c/b2c-custom-job-steps/references/TASK-ORIENTED.md +344 -0
  18. package/content/guidance/b2c/b2c-custom-objects/SKILL.md +327 -0
  19. package/content/guidance/b2c/b2c-custom-objects/references/OCAPI-SEARCH.md +298 -0
  20. package/content/guidance/b2c/b2c-forms/SKILL.md +242 -0
  21. package/content/guidance/b2c/b2c-forms/references/FORM-XML.md +409 -0
  22. package/content/guidance/b2c/b2c-hooks/SKILL.md +500 -0
  23. package/content/guidance/b2c/b2c-hooks/references/OCAPI-SCAPI-HOOKS.md +403 -0
  24. package/content/guidance/b2c/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +169 -0
  25. package/content/guidance/b2c/b2c-hooks/references/SYSTEM-HOOKS.md +433 -0
  26. package/content/guidance/b2c/b2c-isml/SKILL.md +320 -0
  27. package/content/guidance/b2c/b2c-isml/references/EXPRESSIONS.md +366 -0
  28. package/content/guidance/b2c/b2c-isml/references/TAGS.md +443 -0
  29. package/content/guidance/b2c/b2c-localization/SKILL.md +344 -0
  30. package/content/guidance/b2c/b2c-localization/references/PATTERNS.md +407 -0
  31. package/content/guidance/b2c/b2c-logging/SKILL.md +352 -0
  32. package/content/guidance/b2c/b2c-logging/references/LOG-FILES.md +282 -0
  33. package/content/guidance/b2c/b2c-metadata/SKILL.md +406 -0
  34. package/content/guidance/b2c/b2c-metadata/references/SYSTEM-OBJECTS.md +320 -0
  35. package/content/guidance/b2c/b2c-metadata/references/XML-EXAMPLES.md +366 -0
  36. package/content/guidance/b2c/b2c-onboarding/SKILL.md +154 -0
  37. package/content/guidance/b2c/b2c-ordering/SKILL.md +391 -0
  38. package/content/guidance/b2c/b2c-page-designer/SKILL.md +410 -0
  39. package/content/guidance/b2c/b2c-page-designer/references/ATTRIBUTE-TYPES.md +436 -0
  40. package/content/guidance/b2c/b2c-page-designer/references/META-DEFINITIONS.md +340 -0
  41. package/content/guidance/b2c/b2c-querying-data/SKILL.md +289 -0
  42. package/content/guidance/b2c/b2c-querying-data/references/PERFORMANCE-APIS.md +74 -0
  43. package/content/guidance/b2c/b2c-scapi-admin/SKILL.md +53 -0
  44. package/content/guidance/b2c/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +440 -0
  45. package/content/guidance/b2c/b2c-scapi-admin/references/INTEGRATION-PATTERNS.md +518 -0
  46. package/content/guidance/b2c/b2c-scapi-admin/references/OAUTH-SCOPES.md +337 -0
  47. package/content/guidance/b2c/b2c-scapi-shopper/SKILL.md +56 -0
  48. package/content/guidance/b2c/b2c-scapi-shopper/references/CHECKOUT-FLOW.md +466 -0
  49. package/content/guidance/b2c/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +351 -0
  50. package/content/guidance/b2c/b2c-scapi-shopper/references/COMMON-PATTERNS.md +390 -0
  51. package/content/guidance/b2c/b2c-scapi-shopper/references/SCOPES.md +290 -0
  52. package/content/guidance/b2c/b2c-slas-auth-patterns/SKILL.md +420 -0
  53. package/content/guidance/b2c/b2c-slas-auth-patterns/references/PASSKEYS.md +126 -0
  54. package/content/guidance/b2c/b2c-slas-auth-patterns/references/SESSION-BRIDGE.md +267 -0
  55. package/content/guidance/b2c/b2c-slas-auth-patterns/references/TOKEN-LIFECYCLE.md +367 -0
  56. package/content/guidance/b2c/b2c-webservices/SKILL.md +318 -0
  57. package/content/guidance/b2c/b2c-webservices/references/FTP-SERVICES.md +524 -0
  58. package/content/guidance/b2c/b2c-webservices/references/HTTP-SERVICES.md +578 -0
  59. package/content/guidance/b2c/b2c-webservices/references/SERVICES-XML.md +351 -0
  60. package/content/guidance/b2c/b2c-webservices/references/SOAP-SERVICES.md +587 -0
  61. package/content/guidance/b2c-cli/b2c-am/SKILL.md +277 -0
  62. package/content/guidance/b2c-cli/b2c-bm-users-roles/SKILL.md +210 -0
  63. package/content/guidance/b2c-cli/b2c-cap/SKILL.md +131 -0
  64. package/content/guidance/b2c-cli/b2c-cip/SKILL.md +116 -0
  65. package/content/guidance/b2c-cli/b2c-cip/references/KNOWN_TABLES.md +105 -0
  66. package/content/guidance/b2c-cli/b2c-cip/references/SALES_ANALYSIS.md +50 -0
  67. package/content/guidance/b2c-cli/b2c-cip/references/STARTER_QUERIES.md +147 -0
  68. package/content/guidance/b2c-cli/b2c-code/SKILL.md +146 -0
  69. package/content/guidance/b2c-cli/b2c-config/SKILL.md +481 -0
  70. package/content/guidance/b2c-cli/b2c-content/SKILL.md +176 -0
  71. package/content/guidance/b2c-cli/b2c-debug/SKILL.md +138 -0
  72. package/content/guidance/b2c-cli/b2c-docs/SKILL.md +301 -0
  73. package/content/guidance/b2c-cli/b2c-ecdn/SKILL.md +137 -0
  74. package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +97 -0
  75. package/content/guidance/b2c-cli/b2c-ecdn/references/SECURITY.md +75 -0
  76. package/content/guidance/b2c-cli/b2c-import-set-migrations/SKILL.md +265 -0
  77. package/content/guidance/b2c-cli/b2c-job/SKILL.md +70 -0
  78. package/content/guidance/b2c-cli/b2c-job/references/EXPORT.md +121 -0
  79. package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +55 -0
  80. package/content/guidance/b2c-cli/b2c-job/references/RUN-AND-MONITOR.md +148 -0
  81. package/content/guidance/b2c-cli/b2c-logs/SKILL.md +249 -0
  82. package/content/guidance/b2c-cli/b2c-metrics/SKILL.md +315 -0
  83. package/content/guidance/b2c-cli/b2c-mrt/SKILL.md +207 -0
  84. package/content/guidance/b2c-cli/b2c-mrt/references/BUNDLE-COMMANDS.md +203 -0
  85. package/content/guidance/b2c-cli/b2c-mrt/references/ENVIRONMENT-COMMANDS.md +218 -0
  86. package/content/guidance/b2c-cli/b2c-mrt/references/PROJECT-COMMANDS.md +154 -0
  87. package/content/guidance/b2c-cli/b2c-sandbox/SKILL.md +112 -0
  88. package/content/guidance/b2c-cli/b2c-scapi-custom/SKILL.md +126 -0
  89. package/content/guidance/b2c-cli/b2c-scapi-schemas/SKILL.md +70 -0
  90. package/content/guidance/b2c-cli/b2c-scapi-schemas/references/CLI-EXAMPLES.md +108 -0
  91. package/content/guidance/b2c-cli/b2c-site-import-export/SKILL.md +57 -0
  92. package/content/guidance/b2c-cli/b2c-site-import-export/references/IMPORT-OPTIONS.md +118 -0
  93. package/content/guidance/b2c-cli/b2c-site-import-export/references/METADATA-XML.md +381 -0
  94. package/content/guidance/b2c-cli/b2c-site-import-export/references/WORKFLOWS.md +182 -0
  95. package/content/guidance/b2c-cli/b2c-sites/SKILL.md +112 -0
  96. package/content/guidance/b2c-cli/b2c-slas/SKILL.md +182 -0
  97. package/content/guidance/b2c-cli/b2c-webdav/SKILL.md +186 -0
  98. package/content/guidance/b2c-ops/b2c-checkout-triage/SKILL.md +68 -0
  99. package/content/guidance/b2c-ops/b2c-edge-traffic-triage/SKILL.md +69 -0
  100. package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +80 -0
  101. package/content/guidance/b2c-ops/b2c-job-health/references/job-logs.md +21 -0
  102. package/content/guidance/b2c-ops/b2c-order-failure-triage/SKILL.md +66 -0
  103. package/content/guidance/b2c-ops/b2c-order-failure-triage/references/order-evidence.md +87 -0
  104. package/content/guidance/b2c-ops/b2c-production-triage/SKILL.md +88 -0
  105. package/content/guidance/b2c-ops/b2c-production-triage/references/escalation.md +57 -0
  106. package/content/guidance/index.json +1969 -0
  107. package/content/guidance/storefront-next/sfnext-accessibility/SKILL.md +103 -0
  108. package/content/guidance/storefront-next/sfnext-accessibility/references/checklist.md +64 -0
  109. package/content/guidance/storefront-next/sfnext-analytics-consent/SKILL.md +91 -0
  110. package/content/guidance/storefront-next/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
  111. package/content/guidance/storefront-next/sfnext-authentication/SKILL.md +127 -0
  112. package/content/guidance/storefront-next/sfnext-authentication/references/COOKIES.md +39 -0
  113. package/content/guidance/storefront-next/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
  114. package/content/guidance/storefront-next/sfnext-commerce-features/SKILL.md +67 -0
  115. package/content/guidance/storefront-next/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
  116. package/content/guidance/storefront-next/sfnext-components/SKILL.md +153 -0
  117. package/content/guidance/storefront-next/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
  118. package/content/guidance/storefront-next/sfnext-components/references/SHAPE-TOKENS.md +51 -0
  119. package/content/guidance/storefront-next/sfnext-components/references/STORYBOOK.md +54 -0
  120. package/content/guidance/storefront-next/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
  121. package/content/guidance/storefront-next/sfnext-components/references/TROUBLESHOOTING.md +19 -0
  122. package/content/guidance/storefront-next/sfnext-configuration/SKILL.md +163 -0
  123. package/content/guidance/storefront-next/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
  124. package/content/guidance/storefront-next/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
  125. package/content/guidance/storefront-next/sfnext-data-fetching/SKILL.md +140 -0
  126. package/content/guidance/storefront-next/sfnext-data-fetching/references/ACTIONS.md +53 -0
  127. package/content/guidance/storefront-next/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
  128. package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADERS.md +73 -0
  129. package/content/guidance/storefront-next/sfnext-data-fetching/references/SCAPI-FETCHER.md +39 -0
  130. package/content/guidance/storefront-next/sfnext-deployment/SKILL.md +127 -0
  131. package/content/guidance/storefront-next/sfnext-deployment/references/MRT-DEPLOYMENT.md +59 -0
  132. package/content/guidance/storefront-next/sfnext-extensions/SKILL.md +118 -0
  133. package/content/guidance/storefront-next/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
  134. package/content/guidance/storefront-next/sfnext-extensions/references/BASE-AUDIT.md +68 -0
  135. package/content/guidance/storefront-next/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
  136. package/content/guidance/storefront-next/sfnext-extensions/references/EXTENSION-EXAMPLES.md +79 -0
  137. package/content/guidance/storefront-next/sfnext-hybrid-storefronts/SKILL.md +93 -0
  138. package/content/guidance/storefront-next/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +86 -0
  139. package/content/guidance/storefront-next/sfnext-i18n/SKILL.md +152 -0
  140. package/content/guidance/storefront-next/sfnext-i18n/references/locale-config.md +35 -0
  141. package/content/guidance/storefront-next/sfnext-overview/SKILL.md +101 -0
  142. package/content/guidance/storefront-next/sfnext-page-designer/SKILL.md +202 -0
  143. package/content/guidance/storefront-next/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
  144. package/content/guidance/storefront-next/sfnext-page-designer/references/COMPONENT-REGISTRY.md +111 -0
  145. package/content/guidance/storefront-next/sfnext-page-designer/references/DECORATOR-PATTERNS.md +168 -0
  146. package/content/guidance/storefront-next/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
  147. package/content/guidance/storefront-next/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
  148. package/content/guidance/storefront-next/sfnext-performance/SKILL.md +102 -0
  149. package/content/guidance/storefront-next/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
  150. package/content/guidance/storefront-next/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
  151. package/content/guidance/storefront-next/sfnext-project-setup/SKILL.md +147 -0
  152. package/content/guidance/storefront-next/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -0
  153. package/content/guidance/storefront-next/sfnext-project-setup/references/SCRIPTS.md +47 -0
  154. package/content/guidance/storefront-next/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
  155. package/content/guidance/storefront-next/sfnext-quality-gates/SKILL.md +70 -0
  156. package/content/guidance/storefront-next/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
  157. package/content/guidance/storefront-next/sfnext-revalidation/SKILL.md +121 -0
  158. package/content/guidance/storefront-next/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
  159. package/content/guidance/storefront-next/sfnext-routing/SKILL.md +123 -0
  160. package/content/guidance/storefront-next/sfnext-routing/references/ROUTE-CONVENTIONS.md +65 -0
  161. package/content/guidance/storefront-next/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
  162. package/content/guidance/storefront-next/sfnext-scapi/SKILL.md +126 -0
  163. package/content/guidance/storefront-next/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
  164. package/content/guidance/storefront-next/sfnext-security/SKILL.md +129 -0
  165. package/content/guidance/storefront-next/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
  166. package/content/guidance/storefront-next/sfnext-security/references/TURNSTILE.md +43 -0
  167. package/content/guidance/storefront-next/sfnext-seo/SKILL.md +95 -0
  168. package/content/guidance/storefront-next/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
  169. package/content/guidance/storefront-next/sfnext-seo/references/SEO-ROUTES.md +31 -0
  170. package/content/guidance/storefront-next/sfnext-state-management/SKILL.md +114 -0
  171. package/content/guidance/storefront-next/sfnext-state-management/references/PATTERNS.md +45 -0
  172. package/content/guidance/storefront-next/sfnext-testing/SKILL.md +151 -0
  173. package/content/guidance/storefront-next/sfnext-testing/references/E2E.md +38 -0
  174. package/content/guidance/storefront-next/sfnext-testing/references/STORYBOOK-PATTERNS.md +97 -0
  175. package/content/guidance/storefront-next/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
  176. package/content/guidance/storefront-next/sfnext-theming/SKILL.md +104 -0
  177. package/content/guidance/storefront-next/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
  178. package/dist/commands/cap/install.d.ts +1 -0
  179. package/dist/commands/cap/list.d.ts +1 -0
  180. package/dist/commands/cap/pull.d.ts +1 -0
  181. package/dist/commands/cap/tasks.d.ts +1 -0
  182. package/dist/commands/cap/uninstall.d.ts +1 -0
  183. package/dist/commands/cip/describe.d.ts +1 -0
  184. package/dist/commands/cip/query.d.ts +1 -0
  185. package/dist/commands/cip/report/bot-traffic-share.d.ts +1 -0
  186. package/dist/commands/cip/report/checkout-funnel-dropoff.d.ts +1 -0
  187. package/dist/commands/cip/report/controller-error-rate-trend.d.ts +1 -0
  188. package/dist/commands/cip/report/controller-health-scorecard.d.ts +1 -0
  189. package/dist/commands/cip/report/customer-registration-trends.d.ts +1 -0
  190. package/dist/commands/cip/report/discount-depth-breakdown.d.ts +1 -0
  191. package/dist/commands/cip/report/inventory-stockout-by-location.d.ts +1 -0
  192. package/dist/commands/cip/report/new-vs-returning-buyer-revenue.d.ts +1 -0
  193. package/dist/commands/cip/report/ocapi-client-usage.d.ts +1 -0
  194. package/dist/commands/cip/report/ocapi-requests.d.ts +1 -0
  195. package/dist/commands/cip/report/payment-method-performance.d.ts +1 -0
  196. package/dist/commands/cip/report/product-co-purchase-analysis.d.ts +1 -0
  197. package/dist/commands/cip/report/promotion-discount-analysis.d.ts +1 -0
  198. package/dist/commands/cip/report/promotion-roi-leaderboard.d.ts +1 -0
  199. package/dist/commands/cip/report/recommender-effectiveness.d.ts +1 -0
  200. package/dist/commands/cip/report/remote-include-performance.d.ts +1 -0
  201. package/dist/commands/cip/report/revenue-by-channel.d.ts +1 -0
  202. package/dist/commands/cip/report/sales-analytics.d.ts +1 -0
  203. package/dist/commands/cip/report/sales-summary.d.ts +1 -0
  204. package/dist/commands/cip/report/scapi-cache-hit-ratio.d.ts +1 -0
  205. package/dist/commands/cip/report/scapi-error-rate-by-status.d.ts +1 -0
  206. package/dist/commands/cip/report/scapi-latency-distribution.d.ts +1 -0
  207. package/dist/commands/cip/report/scapi-traffic-latency.d.ts +1 -0
  208. package/dist/commands/cip/report/search-query-performance.d.ts +1 -0
  209. package/dist/commands/cip/report/top-referrers.d.ts +1 -0
  210. package/dist/commands/cip/report/top-selling-products.d.ts +1 -0
  211. package/dist/commands/cip/report/zero-result-searches.d.ts +1 -0
  212. package/dist/commands/cip/tables.d.ts +1 -0
  213. package/dist/commands/code/activate.d.ts +1 -0
  214. package/dist/commands/code/delete.d.ts +1 -0
  215. package/dist/commands/code/deploy.d.ts +1 -0
  216. package/dist/commands/code/download.d.ts +1 -0
  217. package/dist/commands/code/watch.d.ts +1 -0
  218. package/dist/commands/commands/search.d.ts +35 -0
  219. package/dist/commands/commands/search.js +85 -0
  220. package/dist/commands/commands/search.js.map +1 -0
  221. package/dist/commands/content/export.d.ts +1 -0
  222. package/dist/commands/content/list.d.ts +1 -0
  223. package/dist/commands/content/validate.d.ts +1 -0
  224. package/dist/commands/debug/cli.d.ts +1 -0
  225. package/dist/commands/debug/index.d.ts +1 -0
  226. package/dist/commands/docs/cache.d.ts +1 -0
  227. package/dist/commands/docs/download.d.ts +1 -0
  228. package/dist/commands/docs/read.d.ts +1 -0
  229. package/dist/commands/docs/schema.d.ts +1 -0
  230. package/dist/commands/docs/search.d.ts +1 -0
  231. package/dist/commands/docs/skill.d.ts +41 -0
  232. package/dist/commands/docs/skill.js +183 -0
  233. package/dist/commands/docs/skill.js.map +1 -0
  234. package/dist/commands/ecdn/cache/purge.d.ts +1 -0
  235. package/dist/commands/ecdn/certificates/add.d.ts +1 -0
  236. package/dist/commands/ecdn/certificates/delete.d.ts +1 -0
  237. package/dist/commands/ecdn/certificates/list.d.ts +1 -0
  238. package/dist/commands/ecdn/certificates/update.d.ts +1 -0
  239. package/dist/commands/ecdn/certificates/validate.d.ts +1 -0
  240. package/dist/commands/ecdn/cipher-suites/get.d.ts +1 -0
  241. package/dist/commands/ecdn/cipher-suites/update.d.ts +1 -0
  242. package/dist/commands/ecdn/firewall/create.d.ts +1 -0
  243. package/dist/commands/ecdn/firewall/delete.d.ts +1 -0
  244. package/dist/commands/ecdn/firewall/get.d.ts +1 -0
  245. package/dist/commands/ecdn/firewall/list.d.ts +1 -0
  246. package/dist/commands/ecdn/firewall/reorder.d.ts +1 -0
  247. package/dist/commands/ecdn/firewall/update.d.ts +1 -0
  248. package/dist/commands/ecdn/logpush/jobs/create.d.ts +1 -0
  249. package/dist/commands/ecdn/logpush/jobs/delete.d.ts +1 -0
  250. package/dist/commands/ecdn/logpush/jobs/get.d.ts +1 -0
  251. package/dist/commands/ecdn/logpush/jobs/list.d.ts +1 -0
  252. package/dist/commands/ecdn/logpush/jobs/update.d.ts +1 -0
  253. package/dist/commands/ecdn/logpush/ownership.d.ts +1 -0
  254. package/dist/commands/ecdn/mrt-rules/create.d.ts +1 -0
  255. package/dist/commands/ecdn/mrt-rules/delete.d.ts +1 -0
  256. package/dist/commands/ecdn/mrt-rules/get.d.ts +1 -0
  257. package/dist/commands/ecdn/mrt-rules/rules/delete.d.ts +1 -0
  258. package/dist/commands/ecdn/mrt-rules/rules/update.d.ts +1 -0
  259. package/dist/commands/ecdn/mrt-rules/update.d.ts +1 -0
  260. package/dist/commands/ecdn/mtls/create.d.ts +1 -0
  261. package/dist/commands/ecdn/mtls/delete.d.ts +1 -0
  262. package/dist/commands/ecdn/mtls/get.d.ts +1 -0
  263. package/dist/commands/ecdn/mtls/issue.d.ts +1 -0
  264. package/dist/commands/ecdn/mtls/list.d.ts +1 -0
  265. package/dist/commands/ecdn/mtls/setup.d.ts +1 -0
  266. package/dist/commands/ecdn/origin-headers/delete.d.ts +1 -0
  267. package/dist/commands/ecdn/origin-headers/get.d.ts +1 -0
  268. package/dist/commands/ecdn/origin-headers/set.d.ts +1 -0
  269. package/dist/commands/ecdn/page-shield/notifications/create.d.ts +1 -0
  270. package/dist/commands/ecdn/page-shield/notifications/delete.d.ts +1 -0
  271. package/dist/commands/ecdn/page-shield/notifications/list.d.ts +1 -0
  272. package/dist/commands/ecdn/page-shield/policies/create.d.ts +1 -0
  273. package/dist/commands/ecdn/page-shield/policies/delete.d.ts +1 -0
  274. package/dist/commands/ecdn/page-shield/policies/get.d.ts +1 -0
  275. package/dist/commands/ecdn/page-shield/policies/list.d.ts +1 -0
  276. package/dist/commands/ecdn/page-shield/policies/update.d.ts +1 -0
  277. package/dist/commands/ecdn/page-shield/scripts/get.d.ts +1 -0
  278. package/dist/commands/ecdn/page-shield/scripts/list.d.ts +1 -0
  279. package/dist/commands/ecdn/rate-limit/create.d.ts +1 -0
  280. package/dist/commands/ecdn/rate-limit/delete.d.ts +1 -0
  281. package/dist/commands/ecdn/rate-limit/get.d.ts +1 -0
  282. package/dist/commands/ecdn/rate-limit/list.d.ts +1 -0
  283. package/dist/commands/ecdn/rate-limit/update.d.ts +1 -0
  284. package/dist/commands/ecdn/security/get.d.ts +1 -0
  285. package/dist/commands/ecdn/security/update.d.ts +1 -0
  286. package/dist/commands/ecdn/speed/get.d.ts +1 -0
  287. package/dist/commands/ecdn/speed/update.d.ts +1 -0
  288. package/dist/commands/ecdn/waf/groups/list.d.ts +1 -0
  289. package/dist/commands/ecdn/waf/groups/update.d.ts +1 -0
  290. package/dist/commands/ecdn/waf/managed-rules/list.d.ts +1 -0
  291. package/dist/commands/ecdn/waf/managed-rules/update.d.ts +1 -0
  292. package/dist/commands/ecdn/waf/migrate.d.ts +1 -0
  293. package/dist/commands/ecdn/waf/owasp/get.d.ts +1 -0
  294. package/dist/commands/ecdn/waf/owasp/update.d.ts +1 -0
  295. package/dist/commands/ecdn/waf/rules/get.d.ts +1 -0
  296. package/dist/commands/ecdn/waf/rules/list.d.ts +1 -0
  297. package/dist/commands/ecdn/waf/rules/update.d.ts +1 -0
  298. package/dist/commands/ecdn/waf/rulesets/list.d.ts +1 -0
  299. package/dist/commands/ecdn/waf/rulesets/update.d.ts +1 -0
  300. package/dist/commands/ecdn/zones/create.d.ts +1 -0
  301. package/dist/commands/ecdn/zones/list.d.ts +1 -0
  302. package/dist/commands/job/execution/delete.d.ts +1 -0
  303. package/dist/commands/job/export.d.ts +1 -0
  304. package/dist/commands/job/import-set.d.ts +1 -0
  305. package/dist/commands/job/import.d.ts +1 -0
  306. package/dist/commands/job/log.d.ts +1 -0
  307. package/dist/commands/job/run.d.ts +1 -0
  308. package/dist/commands/job/run.js +1 -1
  309. package/dist/commands/job/run.js.map +1 -1
  310. package/dist/commands/job/search.d.ts +1 -0
  311. package/dist/commands/job/wait.d.ts +1 -0
  312. package/dist/commands/logs/get.d.ts +1 -0
  313. package/dist/commands/logs/list.d.ts +1 -0
  314. package/dist/commands/logs/tail.d.ts +1 -0
  315. package/dist/commands/metrics/controller.d.ts +1 -0
  316. package/dist/commands/metrics/ecdn.d.ts +1 -0
  317. package/dist/commands/metrics/mrt.d.ts +1 -0
  318. package/dist/commands/metrics/ocapi.d.ts +1 -0
  319. package/dist/commands/metrics/overall.d.ts +1 -0
  320. package/dist/commands/metrics/sales.d.ts +1 -0
  321. package/dist/commands/metrics/scapi-hooks.d.ts +1 -0
  322. package/dist/commands/metrics/scapi.d.ts +1 -0
  323. package/dist/commands/metrics/third-party.d.ts +1 -0
  324. package/dist/commands/mrt/bundle/delete.d.ts +1 -0
  325. package/dist/commands/mrt/bundle/deploy.d.ts +1 -0
  326. package/dist/commands/mrt/bundle/download.d.ts +1 -0
  327. package/dist/commands/mrt/bundle/history.d.ts +1 -0
  328. package/dist/commands/mrt/bundle/list.d.ts +1 -0
  329. package/dist/commands/mrt/bundle/save.d.ts +1 -0
  330. package/dist/commands/mrt/bundle/upload-v2.d.ts +1 -0
  331. package/dist/commands/mrt/env/access-control/list.d.ts +1 -0
  332. package/dist/commands/mrt/env/b2c.d.ts +1 -0
  333. package/dist/commands/mrt/env/clone.d.ts +1 -0
  334. package/dist/commands/mrt/env/create.d.ts +1 -0
  335. package/dist/commands/mrt/env/delete.d.ts +1 -0
  336. package/dist/commands/mrt/env/get.d.ts +1 -0
  337. package/dist/commands/mrt/env/invalidate.d.ts +1 -0
  338. package/dist/commands/mrt/env/list.d.ts +1 -0
  339. package/dist/commands/mrt/env/redirect/clone.d.ts +1 -0
  340. package/dist/commands/mrt/env/redirect/create.d.ts +1 -0
  341. package/dist/commands/mrt/env/redirect/delete.d.ts +1 -0
  342. package/dist/commands/mrt/env/redirect/list.d.ts +1 -0
  343. package/dist/commands/mrt/env/update.d.ts +1 -0
  344. package/dist/commands/mrt/env/var/delete.d.ts +1 -0
  345. package/dist/commands/mrt/env/var/list.d.ts +1 -0
  346. package/dist/commands/mrt/env/var/push.d.ts +1 -0
  347. package/dist/commands/mrt/env/var/set.d.ts +1 -0
  348. package/dist/commands/mrt/org/b2c.d.ts +1 -0
  349. package/dist/commands/mrt/org/cert/create.d.ts +1 -0
  350. package/dist/commands/mrt/org/cert/delete.d.ts +1 -0
  351. package/dist/commands/mrt/org/cert/get.d.ts +1 -0
  352. package/dist/commands/mrt/org/cert/list.d.ts +1 -0
  353. package/dist/commands/mrt/org/cert/restart-validation.d.ts +1 -0
  354. package/dist/commands/mrt/org/list.d.ts +1 -0
  355. package/dist/commands/mrt/org/member/add.d.ts +1 -0
  356. package/dist/commands/mrt/org/member/get.d.ts +1 -0
  357. package/dist/commands/mrt/org/member/list.d.ts +1 -0
  358. package/dist/commands/mrt/org/member/remove.d.ts +1 -0
  359. package/dist/commands/mrt/org/member/update.d.ts +1 -0
  360. package/dist/commands/mrt/project/create.d.ts +1 -0
  361. package/dist/commands/mrt/project/delete.d.ts +1 -0
  362. package/dist/commands/mrt/project/get.d.ts +1 -0
  363. package/dist/commands/mrt/project/list.d.ts +1 -0
  364. package/dist/commands/mrt/project/member/add.d.ts +1 -0
  365. package/dist/commands/mrt/project/member/get.d.ts +1 -0
  366. package/dist/commands/mrt/project/member/list.d.ts +1 -0
  367. package/dist/commands/mrt/project/member/remove.d.ts +1 -0
  368. package/dist/commands/mrt/project/member/update.d.ts +1 -0
  369. package/dist/commands/mrt/project/notification/delete.d.ts +1 -0
  370. package/dist/commands/mrt/project/notification/get.d.ts +1 -0
  371. package/dist/commands/mrt/project/update.d.ts +1 -0
  372. package/dist/commands/mrt/save-credentials.d.ts +1 -0
  373. package/dist/commands/mrt/tail-logs.d.ts +1 -0
  374. package/dist/commands/mrt/user/api-key.d.ts +1 -0
  375. package/dist/commands/mrt/user/email-prefs.d.ts +1 -0
  376. package/dist/commands/mrt/user/profile.d.ts +1 -0
  377. package/dist/commands/scaffold/init.js +2 -1
  378. package/dist/commands/scaffold/init.js.map +1 -1
  379. package/dist/commands/scapi/custom/status.d.ts +1 -0
  380. package/dist/commands/scapi/schemas/get.d.ts +9 -0
  381. package/dist/commands/scapi/schemas/get.js +51 -19
  382. package/dist/commands/scapi/schemas/get.js.map +1 -1
  383. package/dist/commands/scapi/schemas/list.d.ts +6 -0
  384. package/dist/commands/scapi/schemas/list.js +28 -18
  385. package/dist/commands/scapi/schemas/list.js.map +1 -1
  386. package/dist/commands/setup/get.d.ts +36 -0
  387. package/dist/commands/setup/get.js +67 -0
  388. package/dist/commands/setup/get.js.map +1 -0
  389. package/dist/commands/setup/ide/tsserver-plugin.d.ts +1 -0
  390. package/dist/commands/setup/ide/vscode-types.d.ts +1 -0
  391. package/dist/commands/setup/index.js +4 -3
  392. package/dist/commands/setup/index.js.map +1 -1
  393. package/dist/commands/setup/inspect.d.ts +1 -0
  394. package/dist/commands/setup/inspect.js +15 -4
  395. package/dist/commands/setup/inspect.js.map +1 -1
  396. package/dist/commands/setup/instance/create.d.ts +9 -0
  397. package/dist/commands/setup/instance/create.js +22 -6
  398. package/dist/commands/setup/instance/create.js.map +1 -1
  399. package/dist/commands/setup/instance/list.d.ts +1 -0
  400. package/dist/commands/setup/instance/list.js +3 -4
  401. package/dist/commands/setup/instance/list.js.map +1 -1
  402. package/dist/commands/setup/instance/remove.d.ts +1 -0
  403. package/dist/commands/setup/instance/remove.js +5 -5
  404. package/dist/commands/setup/instance/remove.js.map +1 -1
  405. package/dist/commands/setup/instance/set-active.d.ts +6 -0
  406. package/dist/commands/setup/instance/set-active.js +20 -5
  407. package/dist/commands/setup/instance/set-active.js.map +1 -1
  408. package/dist/commands/setup/openshell.d.ts +1 -0
  409. package/dist/commands/setup/set.d.ts +37 -0
  410. package/dist/commands/setup/set.js +87 -0
  411. package/dist/commands/setup/set.js.map +1 -0
  412. package/dist/commands/setup/skills.d.ts +1 -0
  413. package/dist/commands/setup/unset.d.ts +37 -0
  414. package/dist/commands/setup/unset.js +55 -0
  415. package/dist/commands/setup/unset.js.map +1 -0
  416. package/dist/commands/slas/client/create.d.ts +1 -0
  417. package/dist/commands/slas/client/delete.d.ts +1 -0
  418. package/dist/commands/slas/client/get.d.ts +1 -0
  419. package/dist/commands/slas/client/list.d.ts +1 -0
  420. package/dist/commands/slas/client/open.d.ts +1 -0
  421. package/dist/commands/slas/client/update.d.ts +1 -0
  422. package/dist/commands/slas/token.d.ts +1 -0
  423. package/dist/commands/slas/token.js +2 -1
  424. package/dist/commands/slas/token.js.map +1 -1
  425. package/dist/commands/webdav/get.d.ts +1 -0
  426. package/dist/commands/webdav/rm.d.ts +1 -0
  427. package/dist/help.d.ts +25 -0
  428. package/dist/help.js +96 -0
  429. package/dist/help.js.map +1 -0
  430. package/dist/lib/scaffold/generate-helper.js +3 -2
  431. package/dist/lib/scaffold/generate-helper.js.map +1 -1
  432. package/dist/lib/skills.d.ts +19 -0
  433. package/dist/lib/skills.js +75 -0
  434. package/dist/lib/skills.js.map +1 -0
  435. package/dist/utils/cip/command.d.ts +1 -0
  436. package/dist/utils/ecdn/zone-command.d.ts +1 -0
  437. package/dist/utils/setup/config-field-command.d.ts +25 -0
  438. package/dist/utils/setup/config-field-command.js +41 -0
  439. package/dist/utils/setup/config-field-command.js.map +1 -0
  440. package/dist/utils/slas/client.d.ts +1 -0
  441. package/oclif.manifest.json +20802 -16968
  442. package/package.json +11 -5
@@ -0,0 +1,320 @@
1
+ ---
2
+ name: b2c-isml
3
+ description: Build ISML templates with isprint, isset, isloop, isdecorate, isinclude tags, and ${...} expression syntax. Use this skill whenever the user needs to write or debug storefront templates, create decorator layouts with isreplace, build reusable template modules, control HTML encoding in output, or use ISML expression language for dynamic content. Also use when fixing template rendering issues -- even if they just say 'loop through products in the template' or 'my HTML is getting escaped'.
4
+ ---
5
+
6
+ # ISML Skill
7
+
8
+ This skill guides you through creating and working with ISML (Isomorphic Markup Language) templates in Salesforce B2C Commerce. ISML templates combine HTML with dynamic server-side tags.
9
+
10
+ ## Overview
11
+
12
+ ISML templates are server-side templates that generate HTML. They use special tags prefixed with `is` and expressions in `${...}` syntax to embed dynamic content.
13
+
14
+ ## File Location
15
+
16
+ Templates reside in the cartridge's `templates` directory:
17
+
18
+ ```
19
+ /my-cartridge
20
+ /cartridge
21
+ /templates
22
+ /default # Default locale
23
+ /product
24
+ detail.isml
25
+ tile.isml
26
+ /home
27
+ homepage.isml
28
+ /util
29
+ modules.isml # Custom tag definitions
30
+ /fr_FR # French-specific templates
31
+ /product
32
+ detail.isml
33
+ ```
34
+
35
+ ## Essential Tags
36
+
37
+ ### Conditional Logic
38
+
39
+ ```html
40
+ <isif condition="${product.available}">
41
+ <span class="in-stock">In Stock</span>
42
+ <iselseif condition="${product.preorderable}">
43
+ <span class="preorder">Pre-order</span>
44
+ <iselse>
45
+ <span class="out-of-stock">Out of Stock</span>
46
+ </isif>
47
+ ```
48
+
49
+ ### Loops
50
+
51
+ ```html
52
+ <isloop items="${products}" var="product" status="loopstate">
53
+ <div class="product ${loopstate.odd ? 'odd' : 'even'}">
54
+ <span>${loopstate.count}. ${product.name}</span>
55
+ <isif condition="${loopstate.first}">
56
+ <span class="badge">Featured</span>
57
+ </isif>
58
+ </div>
59
+ </isloop>
60
+ ```
61
+
62
+ **Loop status properties:**
63
+ - `count` - Iteration number (1-based)
64
+ - `index` - Current index (0-based)
65
+ - `first` - Boolean, true on first iteration
66
+ - `last` - Boolean, true on last iteration
67
+ - `odd` - Boolean, true on odd iterations
68
+ - `even` - Boolean, true on even iterations
69
+
70
+ ### Variables
71
+
72
+ ```html
73
+ <!-- Set a variable (scope is required) -->
74
+ <isset name="productName" value="${product.name}" scope="page"/>
75
+
76
+ <!-- Use the variable -->
77
+ <span>${productName}</span>
78
+
79
+ <!-- Remove a variable -->
80
+ <isremove name="productName" scope="page"/>
81
+ ```
82
+
83
+ **Scopes (required):** `page`, `request`, `session`, `pdict`
84
+
85
+ ### Output
86
+
87
+ ```html
88
+ <!-- Basic output (HTML encoded by default) -->
89
+ <isprint value="${product.name}"/>
90
+
91
+ <!-- Unencoded output (use carefully) -->
92
+ <isprint value="${htmlContent}" encoding="off"/>
93
+
94
+ <!-- Formatted number -->
95
+ <isprint value="${price}" style="CURRENCY"/>
96
+
97
+ <!-- Formatted date -->
98
+ <isprint value="${order.creationDate}" style="DATE_SHORT"/>
99
+ ```
100
+
101
+ ### Include Templates
102
+
103
+ ```html
104
+ <!-- Include local template -->
105
+ <isinclude template="product/components/price"/>
106
+
107
+ <!-- Include with URL (remote include) -->
108
+ <isinclude url="${URLUtils.url('Product-GetPrice', 'pid', product.ID)}"/>
109
+ ```
110
+
111
+ ### Decorator Pattern
112
+
113
+ **Base decorator (layouts/pagelayout.isml):**
114
+ ```html
115
+ <!DOCTYPE html>
116
+ <html>
117
+ <head>
118
+ <title>${pdict.pageTitle}</title>
119
+ </head>
120
+ <body>
121
+ <header>
122
+ <isinclude template="components/header"/>
123
+ </header>
124
+ <main>
125
+ <isreplace/> <!-- Content inserted here -->
126
+ </main>
127
+ <footer>
128
+ <isinclude template="components/footer"/>
129
+ </footer>
130
+ </body>
131
+ </html>
132
+ ```
133
+
134
+ **Page using decorator:**
135
+ ```html
136
+ <isdecorate template="layouts/pagelayout">
137
+ <isslot id="home-banner" context="global"/>
138
+ <div class="homepage-content">
139
+ <h1>${pdict.welcomeMessage}</h1>
140
+ </div>
141
+ </isdecorate>
142
+ ```
143
+
144
+ ## Expressions
145
+
146
+ Expressions use `${...}` syntax to embed dynamic values:
147
+
148
+ ```html
149
+ <!-- Property access -->
150
+ ${product.name}
151
+ ${product.price.sales.value}
152
+
153
+ <!-- Method calls -->
154
+ ${product.getAvailabilityModel().isInStock()}
155
+
156
+ <!-- Built-in objects -->
157
+ ${pdict.myVariable} <!-- Controller data -->
158
+ ${session.customer.firstName} <!-- Session data -->
159
+ ${request.httpParameterMap.pid.stringValue}
160
+
161
+ <!-- Operators -->
162
+ ${price > 100 ? 'expensive' : 'affordable'}
163
+ ${firstName + ' ' + lastName}
164
+ ${quantity * unitPrice}
165
+ ```
166
+
167
+ ## Built-in Utilities
168
+
169
+ ### URLUtils
170
+
171
+ ```html
172
+ <!-- Controller URL -->
173
+ <a href="${URLUtils.url('Product-Show', 'pid', product.ID)}">View</a>
174
+
175
+ <!-- HTTPS URL -->
176
+ <a href="${URLUtils.https('Account-Show')}">My Account</a>
177
+
178
+ <!-- Static resource -->
179
+ <img src="${URLUtils.staticURL('/images/logo.png')}" alt="Logo"/>
180
+
181
+ <!-- Absolute URL -->
182
+ <a href="${URLUtils.abs('Home-Show')}">Home</a>
183
+ ```
184
+
185
+ ### Resource (Localization)
186
+
187
+ ```html
188
+ <!-- Get localized string -->
189
+ ${Resource.msg('button.addtocart', 'product', null)}
190
+
191
+ <!-- With parameters -->
192
+ ${Resource.msgf('cart.items', 'cart', null, cartCount)}
193
+ ```
194
+
195
+ ### StringUtils
196
+
197
+ ```html
198
+ <!-- Truncate text -->
199
+ ${StringUtils.truncate(description, 100, '...')}
200
+
201
+ <!-- Format number -->
202
+ ${StringUtils.formatNumber(quantity, '###,###')}
203
+ ```
204
+
205
+ ## Custom Modules
206
+
207
+ Define reusable custom tags in `util/modules.isml`:
208
+
209
+ ```html
210
+ <!-- Definition in util/modules.isml -->
211
+ <ismodule template="components/productcard"
212
+ name="productcard"
213
+ attribute="product"
214
+ attribute="showPrice"
215
+ attribute="showRating"/>
216
+
217
+ <!-- Usage in any template -->
218
+ <isinclude template="util/modules"/>
219
+ <isproductcard product="${product}" showPrice="${true}" showRating="${true}"/>
220
+ ```
221
+
222
+ **Component template (components/productcard.isml):**
223
+ ```html
224
+ <div class="product-card">
225
+ <img src="${product.image.url}" alt="${product.name}"/>
226
+ <h3>${product.name}</h3>
227
+ <isif condition="${pdict.showPrice}">
228
+ <span class="price">${product.price.sales.formatted}</span>
229
+ </isif>
230
+ <isif condition="${pdict.showRating && product.rating}">
231
+ <span class="rating">${product.rating} stars</span>
232
+ </isif>
233
+ </div>
234
+ ```
235
+
236
+ ## Caching
237
+
238
+ ```html
239
+ <!-- Cache for 24 hours -->
240
+ <iscache type="relative" hour="24"/>
241
+
242
+ <!-- Daily cache (expires at midnight) -->
243
+ <iscache type="daily" hour="0" minute="0"/>
244
+
245
+ <!-- Vary cache by parameter -->
246
+ <iscache type="relative" hour="1" varyby="price_promotion"/>
247
+ ```
248
+
249
+ **Place `<iscache>` at the beginning of the template.**
250
+
251
+ ## Content Type
252
+
253
+ ```html
254
+ <!-- Set content type (must be first in template) -->
255
+ <iscontent type="text/html" charset="UTF-8"/>
256
+
257
+ <!-- For JSON responses -->
258
+ <iscontent type="application/json" charset="UTF-8"/>
259
+
260
+ <!-- For XML -->
261
+ <iscontent type="application/xml" charset="UTF-8"/>
262
+ ```
263
+
264
+ ## Embedded Scripts
265
+
266
+ ```html
267
+ <isscript>
268
+ var ProductMgr = require('dw/catalog/ProductMgr');
269
+ var product = ProductMgr.getProduct(pdict.pid);
270
+ var price = product.priceModel.price;
271
+ </isscript>
272
+
273
+ <span>${price.toFormattedString()}</span>
274
+ ```
275
+
276
+ **Best Practice:** Keep `<isscript>` blocks minimal. Move complex logic to controllers or helper scripts.
277
+
278
+ ## Comments
279
+
280
+ ```html
281
+ <!-- HTML comment (visible in source) -->
282
+
283
+ <iscomment>
284
+ ISML comment - stripped from output.
285
+ Use for documentation and hiding sensitive info.
286
+ </iscomment>
287
+ ```
288
+
289
+ ## Tag Location Constraints
290
+
291
+ Not all ISML tags can be used anywhere. Important constraints:
292
+
293
+ | Tag | Allowed Location |
294
+ |-----|------------------|
295
+ | `<iscontent>` | Must be before DOCTYPE declaration |
296
+ | `<isredirect>` | Must be before DOCTYPE declaration |
297
+ | `<isprint>` | Only in `<body>` |
298
+ | `<isbreak>` | Only in `<body>`, inside `<isloop>` |
299
+ | `<iscontinue>` | Only in `<body>`, inside `<isloop>` |
300
+ | `<isnext>` | Inside `<isloop>` |
301
+ | `<isreplace>` | Must be within `<isdecorate>` tags |
302
+ | `<isactivedatahead>` | Only in `<head>` |
303
+
304
+ Tags that can be used **anywhere**: `<isif>`, `<isloop>`, `<isinclude>`, `<isset>`, `<isremove>`, `<iscache>`, `<iscomment>`, `<ismodule>`, `<iscookie>`, `<isstatus>`.
305
+
306
+ ## Best Practices
307
+
308
+ 1. **Use `<iscomment>`** instead of HTML comments for sensitive info
309
+ 2. **Place `<iscontent>` first** in templates that need it
310
+ 3. **Define modules** in `util/modules.isml` for consistency
311
+ 4. **Keep templates simple** - move logic to controllers/helpers
312
+ 5. **Use decorators** for consistent page layouts
313
+ 6. **Enable caching** on cacheable pages with `<iscache>`
314
+ 7. **Encode output** - default encoding prevents XSS
315
+
316
+ ## Detailed Reference
317
+
318
+ For comprehensive tag documentation:
319
+ - [Tags Reference](references/TAGS.md) - All ISML tags with examples
320
+ - [Expressions Reference](references/EXPRESSIONS.md) - Expression syntax and built-in functions
@@ -0,0 +1,366 @@
1
+ # ISML Expressions Reference
2
+
3
+ Expression syntax and built-in functions available in ISML templates.
4
+
5
+ ## Expression Syntax
6
+
7
+ Expressions use `${...}` syntax:
8
+
9
+ ```html
10
+ ${expression}
11
+ ```
12
+
13
+ ## Property Access
14
+
15
+ ```html
16
+ <!-- Simple property -->
17
+ ${product.name}
18
+
19
+ <!-- Nested property -->
20
+ ${product.price.sales.value}
21
+
22
+ <!-- Method call -->
23
+ ${product.getName()}
24
+
25
+ <!-- Chained access -->
26
+ ${customer.profile.addressBook.preferredAddress.city}
27
+ ```
28
+
29
+ ## Built-in Objects
30
+
31
+ ### pdict
32
+
33
+ Data passed from controller:
34
+
35
+ ```html
36
+ <!-- Controller: res.render('template', { myVar: 'value' }) -->
37
+ ${pdict.myVar}
38
+ ```
39
+
40
+ ### session
41
+
42
+ Session data:
43
+
44
+ ```html
45
+ ${session.sessionID}
46
+ ${session.customer}
47
+ ${session.customer.authenticated}
48
+ ${session.customer.profile.firstName}
49
+ ${session.currency.currencyCode}
50
+ ${session.custom.myCustomAttribute}
51
+ ```
52
+
53
+ ### request
54
+
55
+ HTTP request:
56
+
57
+ ```html
58
+ ${request.httpMethod}
59
+ ${request.httpHost}
60
+ ${request.httpPath}
61
+ ${request.httpHeaders}
62
+ ${request.httpParameterMap.paramName.stringValue}
63
+ ${request.locale}
64
+ ${request.isHttpSecure()}
65
+ ```
66
+
67
+ ### response
68
+
69
+ HTTP response (limited in templates):
70
+
71
+ ```html
72
+ ${response.writer}
73
+ ```
74
+
75
+ ### customer
76
+
77
+ Current customer:
78
+
79
+ ```html
80
+ ${customer.authenticated}
81
+ ${customer.registered}
82
+ ${customer.ID}
83
+ ${customer.profile.firstName}
84
+ ${customer.profile.email}
85
+ ```
86
+
87
+ ## Operators
88
+
89
+ ### Arithmetic
90
+
91
+ ```html
92
+ ${price * quantity}
93
+ ${total + tax}
94
+ ${price - discount}
95
+ ${total / count}
96
+ ${value % 2} <!-- Modulo -->
97
+ ```
98
+
99
+ ### Comparison
100
+
101
+ ```html
102
+ ${price > 100}
103
+ ${quantity >= 1}
104
+ ${price < maxPrice}
105
+ ${stock <= threshold}
106
+ ${product.ID == 'ABC123'}
107
+ ${status != 'CANCELLED'}
108
+ ```
109
+
110
+ ### Logical
111
+
112
+ ```html
113
+ ${inStock && available}
114
+ ${isNew || onSale}
115
+ ${!outOfStock}
116
+ ```
117
+
118
+ ### Ternary
119
+
120
+ ```html
121
+ ${inStock ? 'Available' : 'Out of Stock'}
122
+ ${customer.authenticated ? customer.profile.firstName : 'Guest'}
123
+ ```
124
+
125
+ ### String Concatenation
126
+
127
+ ```html
128
+ ${firstName + ' ' + lastName}
129
+ ${'Product: ' + product.name}
130
+ ```
131
+
132
+ ### Null Check
133
+
134
+ ```html
135
+ ${product != null ? product.name : 'Unknown'}
136
+ ${empty(products) ? 'No products' : products.length + ' products'}
137
+ ```
138
+
139
+ ## Built-in Functions
140
+
141
+ ### empty()
142
+
143
+ Check if null, empty string, or empty collection:
144
+
145
+ ```html
146
+ <isif condition="${empty(products)}">
147
+ No products found
148
+ </isif>
149
+
150
+ <isif condition="${!empty(customer.profile)}">
151
+ Welcome, ${customer.profile.firstName}
152
+ </isif>
153
+ ```
154
+
155
+ ## Utility Classes
156
+
157
+ ### URLUtils
158
+
159
+ Generate URLs:
160
+
161
+ ```html
162
+ <!-- Controller URL -->
163
+ ${URLUtils.url('Controller-Action')}
164
+ ${URLUtils.url('Product-Show', 'pid', product.ID)}
165
+ ${URLUtils.url('Search-Show', 'q', searchTerm, 'page', pageNum)}
166
+
167
+ <!-- HTTPS URL -->
168
+ ${URLUtils.https('Account-Show')}
169
+ ${URLUtils.https('Checkout-Start')}
170
+
171
+ <!-- HTTP URL -->
172
+ ${URLUtils.http('Home-Show')}
173
+
174
+ <!-- Absolute URL -->
175
+ ${URLUtils.abs('Home-Show')}
176
+ ${URLUtils.absStatic('/images/logo.png')}
177
+
178
+ <!-- Static resource -->
179
+ ${URLUtils.staticURL('/css/style.css')}
180
+ ${URLUtils.staticURL(URLUtils.CONTEXT_CATALOG, '', '/images/product.jpg')}
181
+
182
+ <!-- Web root -->
183
+ ${URLUtils.webRoot()}
184
+ ${URLUtils.httpWebRoot()}
185
+ ${URLUtils.httpsWebRoot()}
186
+
187
+ <!-- Home URL -->
188
+ ${URLUtils.home()}
189
+ ${URLUtils.httpHome()}
190
+ ${URLUtils.httpsHome()}
191
+
192
+ <!-- Continue URL (current page) -->
193
+ ${URLUtils.continueURL()}
194
+ ```
195
+
196
+ ### Resource
197
+
198
+ Localized strings:
199
+
200
+ ```html
201
+ <!-- Simple message -->
202
+ ${Resource.msg('key.name', 'bundlename', null)}
203
+
204
+ <!-- With fallback -->
205
+ ${Resource.msg('key.name', 'bundlename', 'Default Value')}
206
+
207
+ <!-- With parameters -->
208
+ ${Resource.msgf('cart.itemcount', 'cart', null, itemCount)}
209
+ ${Resource.msgf('greeting', 'common', null, firstName, lastName)}
210
+ ```
211
+
212
+ ### StringUtils
213
+
214
+ String manipulation:
215
+
216
+ ```html
217
+ <!-- Truncate -->
218
+ ${StringUtils.truncate(description, 100, '...')}
219
+
220
+ <!-- Pad -->
221
+ ${StringUtils.pad(orderNumber, 10)}
222
+
223
+ <!-- Trim -->
224
+ ${StringUtils.trim(input)}
225
+
226
+ <!-- Format -->
227
+ ${StringUtils.formatNumber(quantity, '###,###')}
228
+ ${StringUtils.formatInteger(count)}
229
+ ${StringUtils.formatMoney(price)}
230
+
231
+ <!-- Encoding -->
232
+ ${StringUtils.stringToHtml(text)}
233
+ ${StringUtils.encodeString(text, 'UTF-8')}
234
+ ```
235
+
236
+ ### dw.util.Locale
237
+
238
+ Locale information:
239
+
240
+ ```html
241
+ ${new dw.util.Locale(request.locale).displayCountry}
242
+ ${new dw.util.Locale(request.locale).displayLanguage}
243
+ ```
244
+
245
+ ## Date/Time
246
+
247
+ ### Formatting Dates
248
+
249
+ ```html
250
+ <!-- Using isprint -->
251
+ <isprint value="${order.creationDate}" style="DATE_SHORT"/>
252
+ <isprint value="${order.creationDate}" formatter="yyyy-MM-dd HH:mm:ss"/>
253
+
254
+ <!-- Using StringUtils -->
255
+ ${StringUtils.formatCalendar(new dw.util.Calendar(), 'yyyy-MM-dd')}
256
+ ```
257
+
258
+ ### Current Date
259
+
260
+ ```html
261
+ <isscript>
262
+ var now = new Date();
263
+ var calendar = new dw.util.Calendar();
264
+ </isscript>
265
+ ${now}
266
+ ${calendar.time}
267
+ ```
268
+
269
+ ## Collection Operations
270
+
271
+ ### Iteration
272
+
273
+ ```html
274
+ <isloop items="${products}" var="product" status="st">
275
+ ${st.count}: ${product.name}
276
+ </isloop>
277
+ ```
278
+
279
+ ### Size/Length
280
+
281
+ ```html
282
+ ${products.length}
283
+ ${products.size()}
284
+ ${basket.productLineItems.length}
285
+ ```
286
+
287
+ ### Check Contents
288
+
289
+ ```html
290
+ <isif condition="${products.length > 0}">
291
+ Found ${products.length} products
292
+ </isif>
293
+
294
+ <isif condition="${empty(cart.items)}">
295
+ Cart is empty
296
+ </isif>
297
+ ```
298
+
299
+ ## Common Patterns
300
+
301
+ ### Null-safe Access
302
+
303
+ ```html
304
+ <!-- Check before access -->
305
+ <isif condition="${product && product.brand}">
306
+ ${product.brand.displayValue}
307
+ </isif>
308
+
309
+ <!-- Ternary fallback -->
310
+ ${product.brand ? product.brand.displayValue : 'Unknown Brand'}
311
+ ```
312
+
313
+ ### Default Values
314
+
315
+ ```html
316
+ ${quantity || 1}
317
+ ${customer.profile.firstName || 'Guest'}
318
+ ```
319
+
320
+ ### Conditional Classes
321
+
322
+ ```html
323
+ <div class="product ${product.available ? 'in-stock' : 'out-of-stock'}">
324
+ <li class="${loopstatus.first ? 'first' : ''} ${loopstatus.last ? 'last' : ''}">
325
+ ```
326
+
327
+ ### Price Formatting
328
+
329
+ ```html
330
+ <!-- Formatted price -->
331
+ ${product.priceModel.price.toFormattedString()}
332
+
333
+ <!-- Raw value -->
334
+ ${product.priceModel.price.value}
335
+
336
+ <!-- Currency code -->
337
+ ${product.priceModel.price.currencyCode}
338
+ ```
339
+
340
+ ### Product Images
341
+
342
+ ```html
343
+ <!-- Primary image -->
344
+ ${product.getImage('large').URL}
345
+ ${product.getImage('large').absURL}
346
+ ${product.getImage('large').alt}
347
+
348
+ <!-- Image with fallback -->
349
+ <isif condition="${product.getImage('large')}">
350
+ <img src="${product.getImage('large').URL}" alt="${product.name}"/>
351
+ <iselse>
352
+ <img src="${URLUtils.staticURL('/images/no-image.png')}" alt="No image"/>
353
+ </isif>
354
+ ```
355
+
356
+ ### Localized Attributes
357
+
358
+ ```html
359
+ <!-- Display value for localized attribute -->
360
+ ${product.custom.myAttribute}
361
+ ${product.brand.displayValue}
362
+
363
+ <!-- Enum value -->
364
+ ${product.custom.productType.value}
365
+ ${product.custom.productType.displayValue}
366
+ ```