@salesforce/templates 66.4.1 → 66.4.2

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 (81) hide show
  1. package/lib/generators/projectGenerator.js +30 -1
  2. package/lib/generators/projectGenerator.js.map +1 -1
  3. package/lib/templates/project/nativemobile/README.md +21 -0
  4. package/lib/templates/project/nativemobile/ScratchDef.json +5 -0
  5. package/lib/templates/project/nativemobile/appMetadata-content.json +29 -0
  6. package/lib/templates/project/nativemobile/appMetadata-meta.json +5 -0
  7. package/lib/templates/project/nativemobile/buildMetadata-content.json +8 -0
  8. package/lib/templates/project/nativemobile/buildMetadata-meta.json +5 -0
  9. package/lib/templates/project/nativemobile/digitalExperience-meta.xml +4 -0
  10. package/lib/templates/project/nativemobile/ecDefinition-content.json +5 -0
  11. package/lib/templates/project/nativemobile/ecDefinition-meta.json +5 -0
  12. package/lib/templates/project/nativemobile/homeScreen-content.json +77 -0
  13. package/lib/templates/project/nativemobile/homeScreen-meta.json +5 -0
  14. package/lib/templates/project/reactb2e/AGENT.md +17 -13
  15. package/lib/templates/project/reactb2e/CHANGELOG.md +276 -0
  16. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/index.html +2 -2
  17. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/package.json +10 -5
  18. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/app.tsx +1 -9
  19. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/AgentforceConversationClient.tsx +15 -5
  20. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/tsconfig.tsbuildinfo +1 -0
  21. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/vite.config.ts +1 -2
  22. package/lib/templates/project/reactb2e/_r_/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md +11 -5
  23. package/lib/templates/project/reactb2e/_r_/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md +13 -6
  24. package/lib/templates/project/reactb2e/_r_/skills/feature-react-file-upload-file-upload/SKILL.md +396 -0
  25. package/lib/templates/project/reactb2e/_r_/skills/webapp-features/SKILL.md +210 -0
  26. package/lib/templates/project/reactb2e/_r_/skills/{webapp-react-add-component → webapp-react}/SKILL.md +5 -3
  27. package/lib/templates/project/reactb2e/_r_/skills/{webapp-react-add-component → webapp-react}/implementation/header-footer.md +8 -0
  28. package/lib/templates/project/{reactb2x/_r_/skills/webapp-react-add-component → reactb2e/_r_/skills/webapp-react}/implementation/page.md +8 -7
  29. package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/SKILL.md +11 -8
  30. package/lib/templates/project/reactb2e/_r_/webapp-cli-commands.md +88 -0
  31. package/lib/templates/project/reactb2e/_r_/webapp-react-code-quality.md +1 -1
  32. package/lib/templates/project/reactb2e/_r_/webapp-react-typescript.md +1 -1
  33. package/lib/templates/project/reactb2e/_r_/webapp-react.md +55 -1
  34. package/lib/templates/project/reactb2e/_r_/webapp-skills-first.md +1 -1
  35. package/lib/templates/project/reactb2e/_r_/webapp-webapplication.md +159 -0
  36. package/lib/templates/project/reactb2e/_r_/webapp.md +2 -2
  37. package/lib/templates/project/reactb2e/package.json +1 -1
  38. package/lib/templates/project/reactb2e/scripts/prepare-import-unique-fields.js +17 -3
  39. package/lib/templates/project/reactb2e/scripts/setup-cli.mjs +318 -67
  40. package/lib/templates/project/reactb2x/AGENT.md +17 -13
  41. package/lib/templates/project/reactb2x/CHANGELOG.md +276 -0
  42. package/lib/templates/project/reactb2x/_p_/_m_/_d_/_s_/_a1_/sfdc_cms__site/appreacttemplateb2x1/content.json +1 -1
  43. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/index.html +2 -2
  44. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/package.json +10 -4
  45. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/api/userProfileApi.ts +15 -1
  46. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ChangePassword.tsx +1 -1
  47. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ForgotPassword.tsx +1 -1
  48. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Login.tsx +2 -2
  49. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Register.tsx +2 -2
  50. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ResetPassword.tsx +1 -1
  51. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/app.tsx +2 -1
  52. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/tsconfig.tsbuildinfo +1 -0
  53. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/vite.config.ts +1 -2
  54. package/lib/templates/project/reactb2x/_r_/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md +11 -5
  55. package/lib/templates/project/reactb2x/_r_/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md +13 -6
  56. package/lib/templates/project/reactb2x/_r_/skills/feature-react-file-upload-file-upload/SKILL.md +396 -0
  57. package/lib/templates/project/reactb2x/_r_/skills/webapp-features/SKILL.md +210 -0
  58. package/lib/templates/project/reactb2x/_r_/skills/{webapp-react-add-component → webapp-react}/SKILL.md +5 -3
  59. package/lib/templates/project/reactb2x/_r_/skills/{webapp-react-add-component → webapp-react}/implementation/header-footer.md +8 -0
  60. package/lib/templates/project/{reactb2e/_r_/skills/webapp-react-add-component → reactb2x/_r_/skills/webapp-react}/implementation/page.md +8 -7
  61. package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/SKILL.md +11 -8
  62. package/lib/templates/project/reactb2x/_r_/webapp-cli-commands.md +88 -0
  63. package/lib/templates/project/reactb2x/_r_/webapp-react-code-quality.md +1 -1
  64. package/lib/templates/project/reactb2x/_r_/webapp-react-typescript.md +1 -1
  65. package/lib/templates/project/reactb2x/_r_/webapp-react.md +55 -1
  66. package/lib/templates/project/reactb2x/_r_/webapp-skills-first.md +1 -1
  67. package/lib/templates/project/reactb2x/_r_/webapp-webapplication.md +159 -0
  68. package/lib/templates/project/reactb2x/_r_/webapp.md +2 -2
  69. package/lib/templates/project/reactb2x/package.json +1 -1
  70. package/lib/templates/project/reactb2x/scripts/prepare-import-unique-fields.js +17 -3
  71. package/lib/templates/project/reactb2x/scripts/setup-cli.mjs +318 -67
  72. package/lib/templates/webapplication/reactbasic/index.html +2 -2
  73. package/lib/templates/webapplication/reactbasic/package.json +3 -3
  74. package/lib/templates/webapplication/reactbasic/src/app.tsx +1 -9
  75. package/lib/templates/webapplication/reactbasic/vite.config.ts +1 -2
  76. package/lib/utils/types.d.ts +1 -1
  77. package/package.json +6 -6
  78. package/lib/templates/project/reactb2e/_r_/webapp-no-node-e.md +0 -65
  79. package/lib/templates/project/reactb2x/_r_/webapp-no-node-e.md +0 -65
  80. /package/lib/templates/project/reactb2e/_r_/skills/{webapp-react-add-component → webapp-react}/implementation/component.md +0 -0
  81. /package/lib/templates/project/reactb2x/_r_/skills/{webapp-react-add-component → webapp-react}/implementation/component.md +0 -0
@@ -1,65 +0,0 @@
1
- ---
2
- description: No complex node -e one-liners — use temp .js files or sed/awk instead
3
- paths:
4
- - "force-app/main/default/webapplications/**/*"
5
- ---
6
-
7
- # A4D Enforcement: No `node -e` One-Liners
8
-
9
- This project **forbids** using `node -e` (or `node -p`, `node --eval`) one-liners for any operation—file manipulation, string replacement, reading/writing configs, or shell automation.
10
-
11
- ## Why This Exists
12
-
13
- Complex `node -e '...'` one-liners **silently break in Zsh** (the default macOS shell) because of:
14
-
15
- - **`!` (history expansion):** Zsh interprets `!` inside double quotes as history expansion, causing `event not found` errors or silent corruption.
16
- - **Backtick interpolation:** Template literals (`` ` ``) are interpreted as command substitution by the shell before Node.js ever sees them.
17
- - **Nested quoting:** Multi-line JS crammed into a single shell string requires fragile quote escaping that differs between Bash and Zsh.
18
-
19
- These failures are **silent and intermittent**—the command may appear to succeed while producing corrupt output.
20
-
21
- ## What To Do Instead
22
-
23
- ### For multi-line file edits or transforms
24
-
25
- 1. **Write a temporary `.js` script**, run it, then delete it:
26
-
27
- ```bash
28
- cat > /tmp/_transform.js << 'SCRIPT'
29
- const fs = require('fs');
30
- const data = JSON.parse(fs.readFileSync('package.json', 'utf8'));
31
- data.name = 'my-app';
32
- fs.writeFileSync('package.json', JSON.stringify(data, null, 2) + '\n');
33
- SCRIPT
34
- node /tmp/_transform.js && rm /tmp/_transform.js
35
- ```
36
-
37
- 2. **Use `sed` or `awk`** for simple, single-pattern replacements with careful escaping:
38
-
39
- ```bash
40
- sed -i '' 's/old-value/new-value/g' path/to/file
41
- ```
42
-
43
- 3. **Use `jq`** for JSON edits:
44
-
45
- ```bash
46
- jq '.name = "my-app"' package.json > tmp.json && mv tmp.json package.json
47
- ```
48
-
49
- 4. **Use the IDE/agent file-editing tools** (replace_in_file, write_to_file, StrReplace, Write) whenever available—these bypass the shell entirely.
50
-
51
- ### For simple, truly one-line expressions
52
-
53
- A trivial `node -e "console.log(1+1)"` with no special characters is acceptable, but **if the expression contains any of these, use a temp file instead:**
54
- - Template literals (backticks)
55
- - `!` characters
56
- - Nested quotes
57
- - Multi-line strings
58
- - `fs` read/write operations
59
-
60
- ## Violation Handling
61
-
62
- - If any prior step used a complex `node -e` one-liner, **revert and redo** using one of the approved methods above.
63
- - If a shell command fails with `event not found`, `unexpected token`, or produces garbled output, check for a `node -e` violation first.
64
-
65
- **Cross-reference:** This rule is also summarized in **webapp.md** (MUST FOLLOW #1). Both apply.