@appdirect/sfb-toolkit 4.0.25 → 5.0.1

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 (58) hide show
  1. package/bin/index.js +4 -4
  2. package/coverage/clover.xml +89 -80
  3. package/coverage/coverage-final.json +3 -3
  4. package/coverage/lcov-report/constants/customUserAttributesMock.js.html +1 -1
  5. package/coverage/lcov-report/constants/index.html +1 -1
  6. package/coverage/lcov-report/constants/pageUrls.js.html +1 -1
  7. package/coverage/lcov-report/constants/userMock.js.html +1 -1
  8. package/coverage/lcov-report/controllers/controllers-utils/assetsUtils.js.html +1 -1
  9. package/coverage/lcov-report/controllers/controllers-utils/index.html +1 -1
  10. package/coverage/lcov-report/controllers/data-filters/bootstrap-data-filter.js.html +1 -1
  11. package/coverage/lcov-report/controllers/data-filters/call-to-actions-filter.js.html +1 -1
  12. package/coverage/lcov-report/controllers/data-filters/index.html +1 -1
  13. package/coverage/lcov-report/controllers/index.html +15 -15
  14. package/coverage/lcov-report/controllers/index.js.html +15 -12
  15. package/coverage/lcov-report/front-end-utils/src/components/base/ResultItem.js.html +1 -1
  16. package/coverage/lcov-report/front-end-utils/src/components/base/SearchBar.js.html +1 -1
  17. package/coverage/lcov-report/front-end-utils/src/components/base/index.html +1 -1
  18. package/coverage/lcov-report/front-end-utils/src/components/base/item.js.html +1 -1
  19. package/coverage/lcov-report/front-end-utils/src/components/container.js.html +1 -1
  20. package/coverage/lcov-report/front-end-utils/src/components/data-view.js.html +1 -1
  21. package/coverage/lcov-report/front-end-utils/src/components/header-view.js.html +125 -71
  22. package/coverage/lcov-report/front-end-utils/src/components/index.html +14 -14
  23. package/coverage/lcov-report/front-end-utils/src/components/search.js.html +1 -1
  24. package/coverage/lcov-report/front-end-utils/src/constants/index.html +5 -5
  25. package/coverage/lcov-report/front-end-utils/src/constants/pageUrl.js.html +12 -6
  26. package/coverage/lcov-report/front-end-utils/src/constants/roleType.js.html +1 -1
  27. package/coverage/lcov-report/front-end-utils/src/constants/searchType.js.html +1 -1
  28. package/coverage/lcov-report/front-end-utils/src/utils/debounce.js.html +1 -1
  29. package/coverage/lcov-report/front-end-utils/src/utils/index.html +1 -1
  30. package/coverage/lcov-report/index.html +25 -25
  31. package/coverage/lcov-report/middlewares/config.js.html +1 -1
  32. package/coverage/lcov-report/middlewares/index.html +1 -1
  33. package/coverage/lcov-report/tools/index.html +1 -1
  34. package/coverage/lcov-report/tools/proxy-fetch.js.html +1 -1
  35. package/coverage/lcov.info +160 -144
  36. package/index.js +2 -0
  37. package/mockPages/admin/admin.html +4 -1
  38. package/mockPages/login/css/theme-index.css +353 -0
  39. package/mockPages/login/images/login.png +0 -0
  40. package/mockPages/login/login.html +43 -0
  41. package/npm-shrinkwrap.json +26 -15
  42. package/package.json +4 -3
  43. package/readme.md +13 -181
  44. package/src/api/cors.js +5 -2
  45. package/src/controllers/index.js +2 -1
  46. package/src/front-end-utils/dist/toolbar.bundle.js +1 -1
  47. package/src/front-end-utils/src/components/header-view.js +80 -62
  48. package/src/front-end-utils/src/constants/pageUrl.js +2 -1
  49. package/src/routes/cors.js +55 -31
  50. package/src/routes/index.js +45 -41
  51. package/src/routes/mockRoutes/marketplaceManager/bootstrapContext.js +109 -499
  52. package/src/routes/mockRoutes/user/bootstrapContext.js +26 -432
  53. package/src/tools/prompt-questions.js +16 -3
  54. package/src/tools/toolkit-components-add.js +1 -4
  55. package/src/tools/toolkit-import.js +1 -1
  56. package/src/tools/toolkit-status.js +3 -3
  57. package/src/tools/zip-theme.js +1 -0
  58. package/themes-config.json +7 -0
package/bin/index.js CHANGED
@@ -229,7 +229,7 @@ program
229
229
  'Comment out existing exported components and add those provided.').conflicts(['replace', 'skip']))
230
230
  .addOption( new Option(`-s, --${INDEX_EXPORT_NO_CHANGE}`,
231
231
  'Do nothing. (Manual index Update will be required)').conflicts(['replace', 'comment']))
232
- .description(`${chalk.bold.bgRed(' BETA ')} Copy custom components`)
232
+ .description('Copy UI library components')
233
233
  .action((components, options) => {
234
234
  const hasFlagArgument = Object.keys(options).length !== 0;
235
235
  const hasComponentArguments = components.length !== 0;
@@ -252,7 +252,7 @@ program
252
252
 
253
253
  program
254
254
  .command("components-delete")
255
- .description(`${chalk.bold.bgRed(' BETA ')} Delete custom components`)
255
+ .description('Delete copied UI library components')
256
256
  .option(`${COMPONENTS_DELETE_FLAG_SHORT}, ${COMPONENTS_DELETE_FLAG_FULL} <sfbVersion> <components...>`,
257
257
  'Delete all specified [components] found in sfb_theme_components[sfbVersion]')
258
258
  .action(() => {
@@ -271,7 +271,7 @@ program
271
271
  )
272
272
  )
273
273
  .option("-o, --orderable", "Whether the component is orderable", false)
274
- .description(`${chalk.bold.bgRed(' BETA ')} Add a new component`)
274
+ .description('Add a new custom component')
275
275
  .action((name, options) => {
276
276
  spawn(
277
277
  `node "${__dirname}/../${COMPONENTS_ADD}" ${name} ${options.page} ${options.orderable}`,
@@ -318,7 +318,7 @@ program
318
318
 
319
319
  program
320
320
  .command("import [themePath] [marketplacePath] [themeName]")
321
- .description(`${chalk.bold.bgRed(' BETA ')} Imports a theme`)
321
+ .description('Imports a theme')
322
322
  .action((themePath, marketplacePath, themeName) => {
323
323
  spawn(
324
324
  `node "${__dirname}/../${IMPORT_PATH}" ${themePath} ${marketplacePath} ${themeName}`,
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1710964631361" clover="3.2.0">
3
- <project timestamp="1710964631361" name="All files">
4
- <metrics statements="498" coveredstatements="424" conditionals="246" coveredconditionals="175" methods="133" coveredmethods="109" elements="877" coveredelements="708" complexity="0" loc="498" ncloc="498" packages="10" files="20" classes="20"/>
2
+ <coverage generated="1715264479834" clover="3.2.0">
3
+ <project timestamp="1715264479834" name="All files">
4
+ <metrics statements="507" coveredstatements="433" conditionals="253" coveredconditionals="182" methods="133" coveredmethods="109" elements="893" coveredelements="724" complexity="0" loc="507" ncloc="507" packages="10" files="20" classes="20"/>
5
5
  <package name="constants">
6
6
  <metrics statements="9" coveredstatements="9" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
7
7
  <file name="customUserAttributesMock.js" path="/var/jenkins/workspace/sf-devtools-pipeline-release-to-npm/src/constants/customUserAttributesMock.js">
@@ -24,9 +24,9 @@
24
24
  </file>
25
25
  </package>
26
26
  <package name="controllers">
27
- <metrics statements="156" coveredstatements="127" conditionals="75" coveredconditionals="42" methods="32" coveredmethods="27"/>
27
+ <metrics statements="157" coveredstatements="128" conditionals="77" coveredconditionals="44" methods="32" coveredmethods="27"/>
28
28
  <file name="index.js" path="/var/jenkins/workspace/sf-devtools-pipeline-release-to-npm/src/controllers/index.js">
29
- <metrics statements="156" coveredstatements="127" conditionals="75" coveredconditionals="42" methods="32" coveredmethods="27"/>
29
+ <metrics statements="157" coveredstatements="128" conditionals="77" coveredconditionals="44" methods="32" coveredmethods="27"/>
30
30
  <line num="3" count="2" type="stmt"/>
31
31
  <line num="4" count="2" type="stmt"/>
32
32
  <line num="5" count="2" type="stmt"/>
@@ -85,7 +85,7 @@
85
85
  <line num="116" count="0" type="stmt"/>
86
86
  <line num="125" count="1" type="stmt"/>
87
87
  <line num="126" count="1" type="stmt"/>
88
- <line num="127" count="1" type="cond" truecount="1" falsecount="1"/>
88
+ <line num="127" count="1" type="cond" truecount="3" falsecount="1"/>
89
89
  <line num="128" count="0" type="stmt"/>
90
90
  <line num="130" count="1" type="stmt"/>
91
91
  <line num="158" count="1" type="stmt"/>
@@ -146,43 +146,44 @@
146
146
  <line num="333" count="2" type="stmt"/>
147
147
  <line num="334" count="2" type="stmt"/>
148
148
  <line num="335" count="2" type="stmt"/>
149
- <line num="336" count="2" type="stmt"/>
150
- <line num="337" count="2" type="stmt"/>
151
- <line num="341" count="2" type="stmt"/>
152
- <line num="343" count="0" type="stmt"/>
153
- <line num="348" count="2" type="stmt"/>
154
- <line num="352" count="2" type="cond" truecount="2" falsecount="0"/>
155
- <line num="353" count="1" type="stmt"/>
156
- <line num="355" count="1" type="stmt"/>
157
- <line num="360" count="2" type="stmt"/>
149
+ <line num="336" count="4" type="stmt"/>
150
+ <line num="337" count="4" type="stmt"/>
151
+ <line num="338" count="4" type="stmt"/>
152
+ <line num="342" count="4" type="stmt"/>
153
+ <line num="344" count="0" type="stmt"/>
154
+ <line num="349" count="2" type="stmt"/>
155
+ <line num="353" count="2" type="cond" truecount="2" falsecount="0"/>
156
+ <line num="354" count="1" type="stmt"/>
157
+ <line num="356" count="1" type="stmt"/>
158
158
  <line num="361" count="2" type="stmt"/>
159
159
  <line num="362" count="2" type="stmt"/>
160
160
  <line num="363" count="2" type="stmt"/>
161
161
  <line num="364" count="2" type="stmt"/>
162
- <line num="365" count="2" type="cond" truecount="1" falsecount="1"/>
163
- <line num="368" count="2" type="stmt"/>
164
- <line num="373" count="2" type="stmt"/>
165
- <line num="378" count="2" type="stmt"/>
162
+ <line num="365" count="2" type="stmt"/>
163
+ <line num="366" count="2" type="cond" truecount="1" falsecount="1"/>
164
+ <line num="369" count="2" type="stmt"/>
165
+ <line num="374" count="2" type="stmt"/>
166
166
  <line num="379" count="2" type="stmt"/>
167
167
  <line num="380" count="2" type="stmt"/>
168
168
  <line num="381" count="2" type="stmt"/>
169
- <line num="383" count="2" type="cond" truecount="1" falsecount="1"/>
170
- <line num="384" count="2" type="cond" truecount="2" falsecount="0"/>
171
- <line num="385" count="2" type="stmt"/>
172
- <line num="389" count="2" type="stmt"/>
173
- <line num="390" count="1" type="cond" truecount="1" falsecount="1"/>
174
- <line num="391" count="0" type="stmt"/>
175
- <line num="398" count="0" type="stmt"/>
176
- <line num="402" count="2" type="stmt"/>
177
- <line num="404" count="1" type="stmt"/>
169
+ <line num="382" count="2" type="stmt"/>
170
+ <line num="384" count="2" type="cond" truecount="1" falsecount="1"/>
171
+ <line num="385" count="2" type="cond" truecount="2" falsecount="0"/>
172
+ <line num="386" count="2" type="stmt"/>
173
+ <line num="390" count="2" type="stmt"/>
174
+ <line num="391" count="1" type="cond" truecount="1" falsecount="1"/>
175
+ <line num="392" count="0" type="stmt"/>
176
+ <line num="399" count="0" type="stmt"/>
177
+ <line num="403" count="2" type="stmt"/>
178
178
  <line num="405" count="1" type="stmt"/>
179
- <line num="411" count="1" type="cond" truecount="1" falsecount="1"/>
180
- <line num="412" count="1" type="stmt"/>
181
- <line num="440" count="1" type="stmt"/>
182
- <line num="442" count="1" type="cond" truecount="1" falsecount="1"/>
183
- <line num="443" count="1" type="stmt"/>
184
- <line num="447" count="0" type="stmt"/>
185
- <line num="452" count="2" type="stmt"/>
179
+ <line num="406" count="1" type="stmt"/>
180
+ <line num="412" count="1" type="cond" truecount="1" falsecount="1"/>
181
+ <line num="413" count="1" type="stmt"/>
182
+ <line num="441" count="1" type="stmt"/>
183
+ <line num="443" count="1" type="cond" truecount="1" falsecount="1"/>
184
+ <line num="444" count="1" type="stmt"/>
185
+ <line num="448" count="0" type="stmt"/>
186
+ <line num="453" count="2" type="stmt"/>
186
187
  </file>
187
188
  </package>
188
189
  <package name="controllers.controllers-utils">
@@ -253,7 +254,7 @@
253
254
  </file>
254
255
  </package>
255
256
  <package name="front-end-utils.src.components">
256
- <metrics statements="177" coveredstatements="149" conditionals="104" coveredconditionals="90" methods="56" coveredmethods="47"/>
257
+ <metrics statements="184" coveredstatements="156" conditionals="109" coveredconditionals="95" methods="56" coveredmethods="47"/>
257
258
  <file name="container.js" path="/var/jenkins/workspace/sf-devtools-pipeline-release-to-npm/src/front-end-utils/src/components/container.js">
258
259
  <metrics statements="24" coveredstatements="22" conditionals="16" coveredconditionals="12" methods="8" coveredmethods="6"/>
259
260
  <line num="16" count="1" type="stmt"/>
@@ -316,53 +317,60 @@
316
317
  <line num="77" count="11" type="stmt"/>
317
318
  </file>
318
319
  <file name="header-view.js" path="/var/jenkins/workspace/sf-devtools-pipeline-release-to-npm/src/front-end-utils/src/components/header-view.js">
319
- <metrics statements="46" coveredstatements="40" conditionals="21" coveredconditionals="21" methods="10" coveredmethods="7"/>
320
- <line num="21" count="1" type="stmt"/>
321
- <line num="24" count="24" type="cond" truecount="2" falsecount="0"/>
322
- <line num="28" count="1" type="stmt"/>
323
- <line num="38" count="1" type="stmt"/>
324
- <line num="46" count="1" type="stmt"/>
325
- <line num="64" count="1" type="stmt"/>
320
+ <metrics statements="53" coveredstatements="47" conditionals="26" coveredconditionals="26" methods="10" coveredmethods="7"/>
321
+ <line num="20" count="1" type="stmt"/>
322
+ <line num="23" count="24" type="cond" truecount="2" falsecount="0"/>
323
+ <line num="27" count="1" type="stmt"/>
324
+ <line num="37" count="1" type="stmt"/>
325
+ <line num="45" count="1" type="stmt"/>
326
+ <line num="63" count="1" type="stmt"/>
327
+ <line num="69" count="1" type="stmt"/>
326
328
  <line num="70" count="1" type="stmt"/>
327
- <line num="71" count="1" type="stmt"/>
328
- <line num="73" count="1" type="stmt"/>
329
+ <line num="72" count="1" type="stmt"/>
330
+ <line num="73" count="12" type="stmt"/>
329
331
  <line num="74" count="12" type="cond" truecount="3" falsecount="0"/>
330
332
  <line num="76" count="3" type="stmt"/>
331
- <line num="77" count="3" type="stmt"/>
332
- <line num="78" count="3" type="stmt"/>
333
- <line num="80" count="4" type="stmt"/>
334
- <line num="81" count="4" type="stmt"/>
333
+ <line num="79" count="3" type="stmt"/>
334
+ <line num="80" count="3" type="stmt"/>
335
335
  <line num="82" count="4" type="stmt"/>
336
- <line num="83" count="4" type="stmt"/>
337
- <line num="85" count="5" type="stmt"/>
338
- <line num="86" count="5" type="stmt"/>
339
- <line num="90" count="1" type="stmt"/>
340
- <line num="96" count="1" type="stmt"/>
341
- <line num="103" count="17" type="stmt"/>
342
- <line num="104" count="17" type="stmt"/>
343
- <line num="112" count="120" type="stmt"/>
344
- <line num="113" count="12" type="stmt"/>
345
- <line num="114" count="12" type="stmt"/>
346
- <line num="115" count="12" type="cond" truecount="5" falsecount="0"/>
347
- <line num="116" count="1" type="stmt"/>
348
- <line num="117" count="1" type="stmt"/>
349
- <line num="118" count="1" type="stmt"/>
350
- <line num="121" count="12" type="stmt"/>
351
- <line num="123" count="12" type="stmt"/>
352
- <line num="124" count="12" type="cond" truecount="4" falsecount="0"/>
353
- <line num="125" count="7" type="stmt"/>
354
- <line num="129" count="17" type="stmt"/>
355
- <line num="130" count="0" type="stmt"/>
356
- <line num="131" count="0" type="stmt"/>
357
- <line num="132" count="0" type="stmt"/>
358
- <line num="133" count="0" type="stmt"/>
359
- <line num="134" count="0" type="stmt"/>
360
- <line num="137" count="17" type="stmt"/>
361
- <line num="138" count="0" type="stmt"/>
336
+ <line num="85" count="4" type="stmt"/>
337
+ <line num="86" count="4" type="stmt"/>
338
+ <line num="87" count="4" type="stmt"/>
339
+ <line num="89" count="5" type="stmt"/>
340
+ <line num="90" count="5" type="stmt"/>
341
+ <line num="94" count="1" type="stmt"/>
342
+ <line num="100" count="1" type="stmt"/>
343
+ <line num="107" count="17" type="stmt"/>
344
+ <line num="108" count="17" type="stmt"/>
345
+ <line num="116" count="120" type="stmt"/>
346
+ <line num="117" count="12" type="stmt"/>
347
+ <line num="118" count="12" type="stmt"/>
348
+ <line num="119" count="12" type="cond" truecount="4" falsecount="0"/>
349
+ <line num="120" count="1" type="stmt"/>
350
+ <line num="121" count="1" type="stmt"/>
351
+ <line num="122" count="1" type="stmt"/>
352
+ <line num="124" count="12" type="cond" truecount="2" falsecount="0"/>
353
+ <line num="125" count="1" type="stmt"/>
354
+ <line num="126" count="1" type="stmt"/>
355
+ <line num="127" count="1" type="stmt"/>
356
+ <line num="130" count="12" type="stmt"/>
357
+ <line num="132" count="12" type="stmt"/>
358
+ <line num="133" count="12" type="cond" truecount="4" falsecount="0"/>
359
+ <line num="134" count="1" type="stmt"/>
360
+ <line num="136" count="12" type="cond" truecount="4" falsecount="0"/>
361
+ <line num="137" count="6" type="stmt"/>
362
362
  <line num="141" count="17" type="stmt"/>
363
- <line num="142" count="1" type="stmt"/>
364
- <line num="148" count="24" type="stmt"/>
365
- <line num="149" count="24" type="stmt"/>
363
+ <line num="142" count="0" type="stmt"/>
364
+ <line num="143" count="0" type="stmt"/>
365
+ <line num="144" count="0" type="stmt"/>
366
+ <line num="145" count="0" type="stmt"/>
367
+ <line num="146" count="0" type="stmt"/>
368
+ <line num="149" count="17" type="stmt"/>
369
+ <line num="150" count="0" type="stmt"/>
370
+ <line num="153" count="17" type="stmt"/>
371
+ <line num="154" count="1" type="stmt"/>
372
+ <line num="160" count="24" type="stmt"/>
373
+ <line num="161" count="24" type="stmt"/>
366
374
  </file>
367
375
  <file name="search.js" path="/var/jenkins/workspace/sf-devtools-pipeline-release-to-npm/src/front-end-utils/src/components/search.js">
368
376
  <metrics statements="76" coveredstatements="73" conditionals="57" coveredconditionals="47" methods="31" coveredmethods="29"/>
@@ -519,12 +527,13 @@
519
527
  </file>
520
528
  </package>
521
529
  <package name="front-end-utils.src.constants">
522
- <metrics statements="11" coveredstatements="11" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
530
+ <metrics statements="12" coveredstatements="12" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
523
531
  <file name="pageUrl.js" path="/var/jenkins/workspace/sf-devtools-pipeline-release-to-npm/src/front-end-utils/src/constants/pageUrl.js">
524
- <metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
532
+ <metrics statements="4" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
525
533
  <line num="1" count="1" type="stmt"/>
526
534
  <line num="2" count="1" type="stmt"/>
527
535
  <line num="3" count="1" type="stmt"/>
536
+ <line num="4" count="1" type="stmt"/>
528
537
  </file>
529
538
  <file name="roleType.js" path="/var/jenkins/workspace/sf-devtools-pipeline-release-to-npm/src/front-end-utils/src/constants/roleType.js">
530
539
  <metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>