@khester/create-dynamics-app 1.1.0 → 2.1.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 (210) hide show
  1. package/README.md +74 -0
  2. package/dist/artifacts/registry.d.ts +18 -0
  3. package/dist/artifacts/registry.d.ts.map +1 -0
  4. package/dist/artifacts/registry.js +340 -0
  5. package/dist/artifacts/registry.js.map +1 -0
  6. package/dist/artifacts/types.d.ts +122 -0
  7. package/dist/artifacts/types.d.ts.map +1 -0
  8. package/dist/artifacts/types.js +7 -0
  9. package/dist/artifacts/types.js.map +1 -0
  10. package/dist/artifacts/validators.d.ts +16 -0
  11. package/dist/artifacts/validators.d.ts.map +1 -0
  12. package/dist/artifacts/validators.js +45 -0
  13. package/dist/artifacts/validators.js.map +1 -0
  14. package/dist/fromDesign.d.ts +5 -0
  15. package/dist/fromDesign.d.ts.map +1 -0
  16. package/dist/fromDesign.js +98 -0
  17. package/dist/fromDesign.js.map +1 -0
  18. package/dist/index.js +129 -177
  19. package/dist/index.js.map +1 -1
  20. package/dist/injectDevTools.d.ts +28 -0
  21. package/dist/injectDevTools.d.ts.map +1 -0
  22. package/dist/injectDevTools.js +148 -0
  23. package/dist/injectDevTools.js.map +1 -0
  24. package/dist/scaffold.d.ts +48 -0
  25. package/dist/scaffold.d.ts.map +1 -0
  26. package/dist/scaffold.js +180 -0
  27. package/dist/scaffold.js.map +1 -0
  28. package/dist/templatePlan.d.ts +3 -0
  29. package/dist/templatePlan.d.ts.map +1 -0
  30. package/dist/templatePlan.js +43 -0
  31. package/dist/templatePlan.js.map +1 -0
  32. package/dist/utils/copyTemplate.d.ts +13 -1
  33. package/dist/utils/copyTemplate.d.ts.map +1 -1
  34. package/dist/utils/copyTemplate.js +98 -4
  35. package/dist/utils/copyTemplate.js.map +1 -1
  36. package/dist/utils/updatePackageJson.d.ts +11 -1
  37. package/dist/utils/updatePackageJson.d.ts.map +1 -1
  38. package/dist/utils/updatePackageJson.js +12 -10
  39. package/dist/utils/updatePackageJson.js.map +1 -1
  40. package/package.json +10 -7
  41. package/templates/_shared/dev-tools/auth/get-token.js +72 -0
  42. package/templates/_shared/dev-tools/dev/mock-xrm.js +42 -0
  43. package/templates/_shared/dev-tools/metadata-sync/index.js +152 -0
  44. package/templates/_shared/dev-tools/smoke/test-retrieve.js +44 -0
  45. package/templates/dialog-form/README.md +27 -0
  46. package/templates/dialog-form/_variants/App.v8.tsx +39 -0
  47. package/templates/dialog-form/_variants/App.v9.tsx +41 -0
  48. package/templates/dialog-form/gitignore +5 -0
  49. package/templates/dialog-form/package.json +27 -0
  50. package/templates/dialog-form/public/index.html +11 -0
  51. package/templates/dialog-form/src/index.tsx +10 -0
  52. package/templates/dialog-form/src/services/dataverse.ts +30 -0
  53. package/templates/dialog-form/tsconfig.json +15 -0
  54. package/templates/dialog-form/webpack.config.js +17 -0
  55. package/templates/grid-customizer/README.md +28 -0
  56. package/templates/grid-customizer/gitignore +4 -0
  57. package/templates/grid-customizer/package.json +25 -0
  58. package/templates/grid-customizer/src/GridCustomizer.ts +28 -0
  59. package/templates/grid-customizer/src/cell-renderers.tsx +35 -0
  60. package/templates/grid-customizer/src/index.ts +4 -0
  61. package/templates/grid-customizer/src/types/grid-types.ts +30 -0
  62. package/templates/grid-customizer/src/utils/color-utils.ts +24 -0
  63. package/templates/grid-customizer/tsconfig.json +15 -0
  64. package/templates/grid-customizer/webpack.config.js +17 -0
  65. package/templates/pcf-dataset/ControlManifest.Input.xml +16 -0
  66. package/templates/pcf-dataset/README.md +21 -0
  67. package/templates/pcf-dataset/gitignore +5 -0
  68. package/templates/pcf-dataset/index.ts +39 -0
  69. package/templates/pcf-dataset/package.json +30 -0
  70. package/templates/pcf-dataset/strings/{{componentName}}.1033.resx +47 -0
  71. package/templates/pcf-dataset/tsconfig.json +8 -0
  72. package/templates/pcf-dataset/{{componentName}}Component.tsx +39 -0
  73. package/templates/pcf-field/ControlManifest.Input.xml +17 -0
  74. package/templates/pcf-field/README.md +95 -0
  75. package/templates/pcf-field/_variants/ValueInput.boolean.tsx +24 -0
  76. package/templates/pcf-field/_variants/ValueInput.date.tsx +27 -0
  77. package/templates/pcf-field/_variants/ValueInput.number.tsx +35 -0
  78. package/templates/pcf-field/_variants/ValueInput.text.tsx +27 -0
  79. package/templates/pcf-field/gitignore +5 -0
  80. package/templates/pcf-field/index.ts +61 -0
  81. package/templates/pcf-field/package.json +30 -0
  82. package/templates/pcf-field/strings/{{componentName}}.1033.resx +47 -0
  83. package/templates/pcf-field/tsconfig.json +8 -0
  84. package/templates/pcf-field/{{componentName}}Component.tsx +35 -0
  85. package/templates/power-pages-starter/gitignore +5 -0
  86. package/templates/react-custom-page/gitignore +5 -0
  87. package/templates/{dynamics-365-starter → react-custom-page}/package.json +3 -3
  88. package/templates/react-custom-page/tools/metadata-sync/index.js +152 -0
  89. package/templates/static-web-app/README.md +36 -0
  90. package/templates/static-web-app/_variants/App.v8.tsx +32 -0
  91. package/templates/static-web-app/_variants/App.v9.tsx +31 -0
  92. package/templates/static-web-app/api/host.json +12 -0
  93. package/templates/static-web-app/api/package.json +19 -0
  94. package/templates/static-web-app/api/src/functions/hello.ts +16 -0
  95. package/templates/static-web-app/api/tsconfig.json +14 -0
  96. package/templates/static-web-app/frontend/index.html +12 -0
  97. package/templates/static-web-app/frontend/package.json +23 -0
  98. package/templates/static-web-app/frontend/src/index.tsx +8 -0
  99. package/templates/static-web-app/frontend/tsconfig.json +16 -0
  100. package/templates/static-web-app/frontend/vite.config.ts +13 -0
  101. package/templates/static-web-app/gitignore +8 -0
  102. package/templates/static-web-app/package.json +15 -0
  103. package/templates/static-web-app/staticwebapp.config.json +7 -0
  104. package/templates/teams-app/README.md +27 -0
  105. package/templates/teams-app/_variants/graph.off.ts +7 -0
  106. package/templates/teams-app/_variants/graph.on.ts +22 -0
  107. package/templates/teams-app/appPackage/manifest.json +26 -0
  108. package/templates/teams-app/gitignore +5 -0
  109. package/templates/teams-app/index.html +12 -0
  110. package/templates/teams-app/package.json +26 -0
  111. package/templates/teams-app/src/App.tsx +25 -0
  112. package/templates/teams-app/src/index.tsx +8 -0
  113. package/templates/teams-app/tsconfig.json +16 -0
  114. package/templates/teams-app/vite.config.ts +9 -0
  115. package/templates/web-resource/README.md +39 -0
  116. package/templates/web-resource/_variants/App.v8.tsx +29 -0
  117. package/templates/web-resource/_variants/App.v9.tsx +28 -0
  118. package/templates/web-resource/gitignore +5 -0
  119. package/templates/web-resource/package.json +27 -0
  120. package/templates/web-resource/public/index.html +11 -0
  121. package/templates/web-resource/src/index.tsx +10 -0
  122. package/templates/web-resource/src/services/dataverse.ts +30 -0
  123. package/templates/web-resource/tsconfig.json +15 -0
  124. package/templates/web-resource/webpack.config.js +17 -0
  125. package/dist/utils/consultingHelpers.d.ts +0 -13
  126. package/dist/utils/consultingHelpers.d.ts.map +0 -1
  127. package/dist/utils/consultingHelpers.js +0 -569
  128. package/dist/utils/consultingHelpers.js.map +0 -1
  129. package/templates/dynamics-365-starter/INTEGRATION_TEST_RESULTS.md +0 -302
  130. package/templates/dynamics-365-starter/PHASE_4_COMPLETION_SUMMARY.md +0 -305
  131. package/templates/dynamics-365-starter/deployment/QUICKSTART-MAC.md +0 -507
  132. package/templates/dynamics-365-starter/deployment/QUICKSTART-WINDOWS.md +0 -372
  133. package/templates/dynamics-365-starter/deployment/pipelines/README.md +0 -375
  134. package/templates/dynamics-365-starter/deployment/pipelines/azure-pipelines.yml +0 -330
  135. package/templates/dynamics-365-starter/deployment/pipelines/github-actions.yml +0 -422
  136. package/templates/dynamics-365-starter/deployment/pipelines/jenkins.groovy +0 -636
  137. package/templates/dynamics-365-starter/deployment/scripts/deploy.ps1 +0 -417
  138. package/templates/dynamics-365-starter/deployment/scripts/deploy.sh +0 -582
  139. package/templates/dynamics-365-starter/deployment/scripts/team-onboarding.ps1 +0 -486
  140. package/templates/dynamics-365-starter/deployment/scripts/team-onboarding.sh +0 -567
  141. package/templates/dynamics-365-starter/deployment/scripts/validate-setup.ps1 +0 -703
  142. package/templates/dynamics-365-starter/deployment/scripts/validate-setup.sh +0 -671
  143. package/templates/dynamics-365-starter/docs/team-standards/README.md +0 -273
  144. package/templates/dynamics-365-starter/docs/team-standards/client-onboarding.md +0 -577
  145. package/templates/dynamics-365-starter/docs/team-standards/code-review-checklist.md +0 -359
  146. package/templates/dynamics-365-starter/docs/team-standards/coding-standards.md +0 -700
  147. package/templates/dynamics-365-starter/docs/team-standards/cross-platform-team-guide.md +0 -736
  148. package/templates/dynamics-365-starter/docs/team-standards/development-workflows.md +0 -727
  149. package/templates/dynamics-365-starter/docs/troubleshooting/common-errors.md +0 -758
  150. package/templates/dynamics-365-starter/docs/troubleshooting/platform-specific-issues.md +0 -878
  151. package/templates/dynamics-365-starter/src/client-project-template/README.md +0 -234
  152. package/templates/dynamics-365-starter/src/client-project-template/config/client.template.json +0 -114
  153. package/templates/dynamics-365-starter/src/client-project-template/config/environments/template.json +0 -186
  154. package/templates/dynamics-365-starter/src/client-project-template/scripts/client-setup.js +0 -667
  155. package/templates/dynamics-365-starter/src/examples/README.md +0 -52
  156. package/templates/dynamics-365-starter/src/examples/component-examples/opportunity-management.tsx +0 -625
  157. package/templates/dynamics-365-starter/src/examples/entity-examples/opportunity-model.ts +0 -545
  158. package/templates/dynamics-365-starter/src/examples/integration-examples/custom-pcf-wrapper.tsx +0 -722
  159. package/templates/dynamics-365-starter/src/examples/workflow-examples/sales-workflow.ts +0 -662
  160. package/templates/dynamics-365-starter/src/page-templates/EntityDashboard.tsx +0 -519
  161. package/templates/dynamics-365-starter/src/page-templates/EntityDetailPage.tsx +0 -456
  162. package/templates/dynamics-365-starter/src/page-templates/EntityListPage.tsx +0 -406
  163. package/templates/dynamics-365-starter/src/page-templates/RelatedEntitiesPage.tsx +0 -578
  164. package/templates/dynamics-365-starter/src/page-templates/SearchPage.tsx +0 -629
  165. package/templates/dynamics-365-starter/tools/entity-generator/index.js +0 -168
  166. package/templates/dynamics-365-starter/tools/entity-generator/templates/constants.template.ts +0 -124
  167. package/templates/dynamics-365-starter/tools/entity-generator/templates/form.template.css +0 -283
  168. package/templates/dynamics-365-starter/tools/entity-generator/templates/form.template.tsx +0 -275
  169. package/templates/dynamics-365-starter/tools/entity-generator/templates/management.template.css +0 -204
  170. package/templates/dynamics-365-starter/tools/entity-generator/templates/management.template.tsx +0 -413
  171. package/templates/dynamics-365-starter/tools/entity-generator/templates/model.template.ts +0 -250
  172. package/templates/dynamics-365-starter/tools/metadata-sync/d365-client.js +0 -410
  173. package/templates/dynamics-365-starter/tools/metadata-sync/index.js +0 -512
  174. package/templates/dynamics-365-starter/tools/metadata-sync/type-generator.js +0 -675
  175. /package/templates/{dynamics-365-starter → react-custom-page}/README.md +0 -0
  176. /package/templates/{dynamics-365-starter → react-custom-page}/deployment/README.md +0 -0
  177. /package/templates/{dynamics-365-starter → react-custom-page}/docs/ARCHITECTURE_OVERVIEW.md +0 -0
  178. /package/templates/{dynamics-365-starter → react-custom-page}/docs/BEST_PRACTICES.md +0 -0
  179. /package/templates/{dynamics-365-starter → react-custom-page}/docs/MIGRATION_GUIDE.md +0 -0
  180. /package/templates/{dynamics-365-starter → react-custom-page}/public/index.html +0 -0
  181. /package/templates/{dynamics-365-starter → react-custom-page}/scripts/custom-build.js +0 -0
  182. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountForm.css +0 -0
  183. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountForm.tsx +0 -0
  184. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountManagement.css +0 -0
  185. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountManagement.tsx +0 -0
  186. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactForm.css +0 -0
  187. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactForm.tsx +0 -0
  188. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactManagement.css +0 -0
  189. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactManagement.tsx +0 -0
  190. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LogDialog.tsx +0 -0
  191. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingContext.tsx +0 -0
  192. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingDebugPanel.css +0 -0
  193. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingDebugPanel.tsx +0 -0
  194. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingProvider.tsx +0 -0
  195. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/logger.ts +0 -0
  196. /package/templates/{dynamics-365-starter → react-custom-page}/src/constants/account.ts +0 -0
  197. /package/templates/{dynamics-365-starter → react-custom-page}/src/constants/contact.ts +0 -0
  198. /package/templates/{dynamics-365-starter → react-custom-page}/src/index.tsx +0 -0
  199. /package/templates/{dynamics-365-starter → react-custom-page}/src/models/Account.ts +0 -0
  200. /package/templates/{dynamics-365-starter → react-custom-page}/src/models/BaseEntity.ts +0 -0
  201. /package/templates/{dynamics-365-starter → react-custom-page}/src/models/Contact.ts +0 -0
  202. /package/templates/{dynamics-365-starter → react-custom-page}/src/pcf/ContactControlWrapper.tsx +0 -0
  203. /package/templates/{dynamics-365-starter → react-custom-page}/src/pcf/MultiEntityControlWrapper.tsx +0 -0
  204. /package/templates/{dynamics-365-starter → react-custom-page}/src/providers/DynamicsProvider.tsx +0 -0
  205. /package/templates/{dynamics-365-starter → react-custom-page}/src/services/MockApiService.ts +0 -0
  206. /package/templates/{dynamics-365-starter → react-custom-page}/src/services/ServiceFactory.ts +0 -0
  207. /package/templates/{dynamics-365-starter → react-custom-page}/src/services/XrmApiService.ts +0 -0
  208. /package/templates/{dynamics-365-starter → react-custom-page}/src/styles/index.css +0 -0
  209. /package/templates/{dynamics-365-starter → react-custom-page}/tsconfig.json +0 -0
  210. /package/templates/{dynamics-365-starter → react-custom-page}/webpack.config.js +0 -0
@@ -1,507 +0,0 @@
1
- # Quick Start Guide - Mac Developers
2
-
3
- 🍎 **Platform-specific setup for Mac developers using Bash**
4
-
5
- ## Prerequisites
6
-
7
- ### Required Software
8
-
9
- - **macOS 10.15+** (Catalina or newer)
10
- - **Homebrew** package manager
11
- - **Node.js 18+** and **npm**
12
- - **Git**
13
-
14
- ### Install Development Tools
15
-
16
- ```bash
17
- # Install Homebrew (if not already installed)
18
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
19
-
20
- # Install required tools
21
- brew install node npm git jq curl
22
-
23
- # Verify installations
24
- node --version
25
- npm --version
26
- git --version
27
- jq --version
28
- ```
29
-
30
- ### Optional: Install PowerShell Core (Alternative)
31
-
32
- ```bash
33
- # If you prefer PowerShell (optional)
34
- brew install --cask powershell
35
-
36
- # Verify PowerShell installation
37
- pwsh --version
38
- ```
39
-
40
- ## Project Setup
41
-
42
- ### 1. Clone and Setup Project
43
-
44
- ```bash
45
- # Clone the project
46
- git clone https://github.com/your-org/your-dynamics-project.git
47
- cd your-dynamics-project
48
-
49
- # Install dependencies
50
- npm install
51
-
52
- # Build the project
53
- npm run build:prod
54
- ```
55
-
56
- ### 2. Configure Environment
57
-
58
- ```bash
59
- # Copy environment template
60
- cp config/environments/template.json config/environments/dev.json
61
-
62
- # Edit configuration (use your preferred editor)
63
- code config/environments/dev.json # VS Code
64
- # or
65
- nano config/environments/dev.json # Terminal editor
66
- ```
67
-
68
- ### 3. Validate Setup
69
-
70
- ```bash
71
- # Make deployment script executable
72
- chmod +x deployment/scripts/deploy.sh
73
- chmod +x deployment/scripts/validate-setup.sh
74
- chmod +x deployment/scripts/test-connection.sh
75
-
76
- # Run validation script
77
- ./deployment/scripts/validate-setup.sh
78
-
79
- # Test connection to D365
80
- ./deployment/scripts/test-connection.sh dev
81
- ```
82
-
83
- ## Daily Deployment Workflow
84
-
85
- ### Development Deployment
86
-
87
- ```bash
88
- # Quick development deployment
89
- ./deployment/scripts/deploy.sh dev
90
-
91
- # With verbose output
92
- ./deployment/scripts/deploy.sh dev --verbose
93
-
94
- # Dry run (test without changes)
95
- ./deployment/scripts/deploy.sh dev --dry-run
96
- ```
97
-
98
- ### Production Deployment
99
-
100
- ```bash
101
- # Production deployment with backup
102
- ./deployment/scripts/deploy.sh prod
103
-
104
- # Force deployment (skip some validations)
105
- ./deployment/scripts/deploy.sh prod --force
106
-
107
- # Skip backup (faster deployment)
108
- ./deployment/scripts/deploy.sh prod --skip-backup
109
- ```
110
-
111
- ### Entity Generation
112
-
113
- ```bash
114
- # Generate new entity
115
- npm run generate:entity -- --entity "salesorder" --display-name "Sales Order"
116
-
117
- # Generate multiple entities
118
- npm run generate:entity -- --entity "product" --display-name "Product"
119
- npm run generate:entity -- --entity "pricing" --display-name "Pricing Rule"
120
- ```
121
-
122
- ## Common Commands Reference
123
-
124
- ### Build Commands
125
-
126
- ```bash
127
- npm run build:dev # Development build (unminified)
128
- npm run build:prod # Production build (optimized)
129
- npm run build:d365 # Dynamics 365 optimized build
130
- npm run clean # Clean build artifacts
131
- ```
132
-
133
- ### Quality Checks
134
-
135
- ```bash
136
- npm run lint # Check code style
137
- npm run lint:fix # Fix code style issues
138
- npm run typecheck # TypeScript validation
139
- npm run quality # Run all quality checks
140
- npm run test # Run unit tests
141
- ```
142
-
143
- ### Metadata Operations
144
-
145
- ```bash
146
- npm run metadata:pull -- --environment dev --entities "account,contact"
147
- npm run metadata:generate
148
- npm run metadata:validate -- --environment dev
149
- npm run metadata:sync -- --environment dev --all
150
- ```
151
-
152
- ### Deployment Operations
153
-
154
- ```bash
155
- # Deploy to specific environment
156
- ./deployment/scripts/deploy.sh <environment>
157
-
158
- # Rollback deployment
159
- ./deployment/scripts/rollback.sh <environment> backup-file.tar.gz
160
-
161
- # Health check
162
- ./deployment/scripts/health-check.sh <environment>
163
-
164
- # Monitor deployment
165
- ./deployment/scripts/monitor.sh <environment>
166
- ```
167
-
168
- ## Bash Configuration
169
-
170
- ### Shell Profile Setup
171
-
172
- ```bash
173
- # Determine your shell
174
- echo $SHELL
175
-
176
- # For Zsh (default on macOS Catalina+)
177
- echo '# Dynamics 365 Development Aliases' >> ~/.zshrc
178
- echo 'alias d365deploy="./deployment/scripts/deploy.sh"' >> ~/.zshrc
179
- echo 'alias d365health="./deployment/scripts/health-check.sh"' >> ~/.zshrc
180
- echo 'alias d365rollback="./deployment/scripts/rollback.sh"' >> ~/.zshrc
181
- echo 'alias d365cd="cd ~/Code/YourProject"' >> ~/.zshrc
182
-
183
- # For Bash
184
- echo '# Dynamics 365 Development Aliases' >> ~/.bash_profile
185
- echo 'alias d365deploy="./deployment/scripts/deploy.sh"' >> ~/.bash_profile
186
- echo 'alias d365health="./deployment/scripts/health-check.sh"' >> ~/.bash_profile
187
- echo 'alias d365rollback="./deployment/scripts/rollback.sh"' >> ~/.bash_profile
188
- echo 'alias d365cd="cd ~/Code/YourProject"' >> ~/.bash_profile
189
-
190
- # Reload profile
191
- source ~/.zshrc # or ~/.bash_profile
192
- ```
193
-
194
- ### Environment Variables
195
-
196
- ```bash
197
- # Set environment variables for session
198
- export D365_ENVIRONMENT="dev"
199
- export D365_CLIENT_ID="your-client-id"
200
-
201
- # Make permanent (add to ~/.zshrc or ~/.bash_profile)
202
- echo 'export D365_ENVIRONMENT="dev"' >> ~/.zshrc
203
- echo 'export D365_CLIENT_ID="your-client-id"' >> ~/.zshrc
204
- ```
205
-
206
- ## Mac-Specific Tips
207
-
208
- ### File Permissions
209
-
210
- ```bash
211
- # Make all deployment scripts executable
212
- find deployment/scripts -name "*.sh" -exec chmod +x {} \;
213
-
214
- # Check file permissions
215
- ls -la deployment/scripts/
216
- ```
217
-
218
- ### Path Handling
219
-
220
- ```bash
221
- # Use forward slashes for paths (native to Unix/Mac)
222
- ./deployment/scripts/deploy.sh
223
-
224
- # Current directory reference
225
- ./deployment/scripts/deploy.sh dev
226
- ```
227
-
228
- ### Using Finder Integration
229
-
230
- ```bash
231
- # Open current directory in Finder
232
- open .
233
-
234
- # Open project in VS Code
235
- code .
236
-
237
- # Open specific file
238
- open config/environments/dev.json
239
- ```
240
-
241
- ### Terminal Configuration
242
-
243
- #### iTerm2 Setup (Recommended)
244
-
245
- ```bash
246
- # Install iTerm2
247
- brew install --cask iterm2
248
-
249
- # Create D365 project profile in iTerm2:
250
- # 1. Open iTerm2 Preferences
251
- # 2. Go to Profiles
252
- # 3. Create new profile "D365 Development"
253
- # 4. Set working directory to your project folder
254
- # 5. Set custom color scheme if desired
255
- ```
256
-
257
- #### Terminal.app Setup
258
-
259
- ```bash
260
- # Create custom terminal profile:
261
- # 1. Open Terminal.app
262
- # 2. Go to Terminal > Preferences > Profiles
263
- # 3. Duplicate "Basic" profile
264
- # 4. Name it "D365 Development"
265
- # 5. Set startup directory to your project
266
- ```
267
-
268
- ## Troubleshooting
269
-
270
- ### Common Issues
271
-
272
- #### Permission Denied Errors
273
-
274
- ```bash
275
- # Fix script permissions
276
- chmod +x deployment/scripts/deploy.sh
277
-
278
- # Check script permissions
279
- ls -la deployment/scripts/deploy.sh
280
- ```
281
-
282
- #### Command Not Found
283
-
284
- ```bash
285
- # Check if tool is installed
286
- which jq
287
- which curl
288
- which node
289
-
290
- # Install missing tools
291
- brew install jq curl node
292
- ```
293
-
294
- #### Authentication Issues
295
-
296
- ```bash
297
- # Clear any cached credentials
298
- rm -rf ~/.azure
299
- rm -rf ~/.config/powershell
300
-
301
- # Test authentication
302
- ./deployment/scripts/test-auth.sh dev
303
- ```
304
-
305
- #### Build Failures
306
-
307
- ```bash
308
- # Clear npm cache
309
- npm cache clean --force
310
-
311
- # Remove node_modules and reinstall
312
- rm -rf node_modules
313
- npm install
314
-
315
- # Clear build artifacts
316
- npm run clean
317
- ```
318
-
319
- #### Network Issues
320
-
321
- ```bash
322
- # Check internet connectivity
323
- ping google.com
324
-
325
- # Test D365 connectivity
326
- curl -I https://yourdomain.crm.dynamics.com
327
-
328
- # Check for proxy issues
329
- echo $HTTP_PROXY
330
- echo $HTTPS_PROXY
331
- ```
332
-
333
- ### Performance Optimization
334
-
335
- ```bash
336
- # Increase Node.js memory limit
337
- export NODE_OPTIONS="--max-old-space-size=4096"
338
-
339
- # Use faster package manager (optional)
340
- brew install pnpm
341
- # Then use 'pnpm install' instead of 'npm install'
342
- ```
343
-
344
- ## VS Code Integration
345
-
346
- ### Recommended Extensions
347
-
348
- - **TypeScript** - Enhanced TypeScript support
349
- - **Bash IDE** - Bash script development
350
- - **REST Client** - Test D365 APIs
351
- - **GitLens** - Enhanced Git capabilities
352
-
353
- ### Launch Configuration
354
-
355
- ```json
356
- // .vscode/launch.json
357
- {
358
- "version": "0.2.0",
359
- "configurations": [
360
- {
361
- "name": "Deploy to Dev",
362
- "type": "node",
363
- "request": "launch",
364
- "program": "${workspaceFolder}/deployment/scripts/deploy.sh",
365
- "args": ["dev", "--verbose"],
366
- "cwd": "${workspaceFolder}",
367
- "console": "integratedTerminal"
368
- }
369
- ]
370
- }
371
- ```
372
-
373
- ### Tasks Configuration
374
-
375
- ```json
376
- // .vscode/tasks.json
377
- {
378
- "version": "2.0.0",
379
- "tasks": [
380
- {
381
- "label": "Deploy to Dev",
382
- "type": "shell",
383
- "command": "./deployment/scripts/deploy.sh",
384
- "args": ["dev"],
385
- "group": "build",
386
- "presentation": {
387
- "echo": true,
388
- "reveal": "always",
389
- "focus": false,
390
- "panel": "shared"
391
- },
392
- "problemMatcher": []
393
- },
394
- {
395
- "label": "Generate Entity",
396
- "type": "shell",
397
- "command": "npm",
398
- "args": [
399
- "run",
400
- "generate:entity",
401
- "--",
402
- "--entity",
403
- "${input:entityName}",
404
- "--display-name",
405
- "${input:displayName}"
406
- ],
407
- "group": "build"
408
- }
409
- ],
410
- "inputs": [
411
- {
412
- "id": "entityName",
413
- "description": "Entity logical name",
414
- "default": "customentity",
415
- "type": "promptString"
416
- },
417
- {
418
- "id": "displayName",
419
- "description": "Entity display name",
420
- "default": "Custom Entity",
421
- "type": "promptString"
422
- }
423
- ]
424
- }
425
- ```
426
-
427
- ## Docker Alternative (Optional)
428
-
429
- ### Using Docker for Consistency
430
-
431
- ```bash
432
- # Create Dockerfile for D365 development
433
- cat > Dockerfile << 'EOF'
434
- FROM node:18-alpine
435
- RUN apk add --no-cache bash jq curl git
436
- WORKDIR /app
437
- COPY package*.json ./
438
- RUN npm ci
439
- COPY . .
440
- RUN npm run build:prod
441
- CMD ["./deployment/scripts/deploy.sh"]
442
- EOF
443
-
444
- # Build Docker image
445
- docker build -t d365-deploy .
446
-
447
- # Run deployment in container
448
- docker run --rm -v $(pwd)/config:/app/config d365-deploy dev
449
- ```
450
-
451
- ## Team Collaboration
452
-
453
- ### Shared Scripts Compatibility
454
-
455
- All Bash scripts in `deployment/scripts/` work identically across all Mac machines and are
456
- compatible with Linux CI/CD systems.
457
-
458
- ### Configuration Sharing
459
-
460
- - Environment configs in `config/environments/` are shared across team
461
- - Personal settings go in `.env.local` (not committed to git)
462
- - Use the same JSON configuration files as Windows team members
463
-
464
- ### Log Files
465
-
466
- ```bash
467
- # Deployment logs location
468
- ls -la deployment/logs/
469
-
470
- # View latest deployment log
471
- tail -f deployment/logs/deploy-dev-*.log
472
-
473
- # Search for errors
474
- grep -i error deployment/logs/deploy-dev-*.log
475
- ```
476
-
477
- ## Compatibility with Windows Team Members
478
-
479
- ### Same Functionality
480
-
481
- ✅ **Identical deployment results** as Windows PowerShell scripts
482
- ✅ **Same configuration files** work for both platforms
483
- ✅ **Same entity generation** and build processes
484
- ✅ **Compatible log formats** for shared troubleshooting
485
-
486
- ### Command Equivalents
487
-
488
- | Windows PowerShell | Mac Bash | Result |
489
- | ---------------------------------------- | ---------------------------- | ----------------- |
490
- | `.\deploy.ps1 -Environment dev` | `./deploy.sh dev` | Same deployment |
491
- | `.\deploy.ps1 -Environment prod -DryRun` | `./deploy.sh prod --dry-run` | Same dry run |
492
- | `.\health-check.ps1 -Environment prod` | `./health-check.sh prod` | Same health check |
493
-
494
- ## Next Steps
495
-
496
- 1. ✅ **Complete environment setup** using this guide
497
- 2. ✅ **Run first deployment** to development environment
498
- 3. ✅ **Generate your first entity** using the entity generator
499
- 4. ✅ **Deploy to test environment** when ready
500
- 5. ✅ **Set up CI/CD pipeline** for automated deployments
501
-
502
- For Windows team members, refer to `QUICKSTART-WINDOWS.md` for their platform-specific setup.
503
-
504
- ---
505
-
506
- 💡 **Tip**: Save this guide to your bookmarks and use the **Common Commands Reference** section for
507
- daily workflows!