@scandipwa/magento-scripts 1.14.0 → 1.14.1-alpha.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 (44) hide show
  1. package/lib/config/templates/php-fpm.template.conf +1 -0
  2. package/lib/config/versions/magento-2.3.7-p2.js +47 -0
  3. package/lib/config/versions/magento-2.3.7-p3.js +47 -0
  4. package/lib/config/versions/magento-2.4.3-p2.js +51 -0
  5. package/lib/config/versions/magento-2.4.4.js +51 -0
  6. package/lib/config/xml-parser.js +61 -0
  7. package/lib/tasks/file-system/create-phpstorm-config/database-config.js +248 -0
  8. package/lib/tasks/file-system/create-phpstorm-config/eslint-config.js +85 -0
  9. package/lib/tasks/file-system/create-phpstorm-config/exclude-folder-config.js +154 -0
  10. package/lib/tasks/file-system/create-phpstorm-config/index.js +27 -0
  11. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/coding-standard-config.js +29 -0
  12. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/config.js +54 -0
  13. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/custom-ruleset-path-config.js +31 -0
  14. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/default-properties-config.js +42 -0
  15. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/eslint-inspection-config.js +37 -0
  16. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/index.js +80 -0
  17. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/magento-coding-standard-config.js +29 -0
  18. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/mess-detector-validation-inspection-config.js +145 -0
  19. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/paths.js +20 -0
  20. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-fixer-validation-inspection-config.js +60 -0
  21. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-validation-inspection-config.js +119 -0
  22. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/stylelint-inspection-config.js +37 -0
  23. package/lib/tasks/file-system/create-phpstorm-config/keys.js +14 -0
  24. package/lib/tasks/file-system/create-phpstorm-config/php-config/index.js +67 -0
  25. package/lib/tasks/file-system/create-phpstorm-config/php-config/mess-detector-config.js +57 -0
  26. package/lib/tasks/file-system/create-phpstorm-config/php-config/php-code-sniffer-config.js +76 -0
  27. package/lib/tasks/file-system/create-phpstorm-config/php-config/php-cs-fixer-config.js +63 -0
  28. package/lib/tasks/file-system/create-phpstorm-config/php-config/php-project-shared-configuration-config.js +69 -0
  29. package/lib/tasks/file-system/create-phpstorm-config/stylelint-config.js +77 -0
  30. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/composer-settings-config.js +98 -0
  31. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/format-setting-config.js +57 -0
  32. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/index.js +66 -0
  33. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-debug-general-config.js +64 -0
  34. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-server-config.js +60 -0
  35. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/properties-component-config.js +51 -0
  36. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/run-manager-config.js +74 -0
  37. package/lib/tasks/file-system/create-phpstorm-config/xml-utils.js +5 -0
  38. package/lib/tasks/file-system/index.js +1 -1
  39. package/lib/tasks/start.js +6 -2
  40. package/lib/util/instance-metadata.js +7 -1
  41. package/package.json +13 -2
  42. package/typings/context.d.ts +2 -0
  43. package/typings/phpstorm.d.ts +33 -0
  44. package/lib/tasks/file-system/create-php-storm-config.js +0 -82
@@ -1,82 +0,0 @@
1
- const setConfigFile = require('../../util/set-config');
2
- const pathExists = require('../../util/path-exists');
3
- const path = require('path');
4
- const fs = require('fs');
5
-
6
- const createPhpStormConfig = () => ({
7
- title: 'Setting PHPStorm config',
8
- task: async ({ config: { phpStorm }, ports }) => {
9
- const { phpLanguageLevel } = phpStorm.php;
10
- const jdbcUrl = `jdbc:mysql://localhost:${ports.mysql}/magento`;
11
-
12
- try {
13
- await setConfigFile({
14
- configPathname: phpStorm.xdebug.path,
15
- template: phpStorm.xdebug.templatePath,
16
- overwrite: true,
17
- templateArgs: {
18
- phpStorm
19
- }
20
- });
21
- } catch (e) {
22
- throw new Error(`Unexpected error accrued during workspace.xml config creation\n\n${e}`);
23
- }
24
-
25
- try {
26
- await setConfigFile({
27
- configPathname: phpStorm.php.path,
28
- template: phpStorm.php.templatePath,
29
- overwrite: true,
30
- templateArgs: {
31
- phpLanguageLevel
32
- }
33
- });
34
- } catch (e) {
35
- throw new Error(`Unexpected error accrued during php.xml config creation\n\n${e}`);
36
- }
37
-
38
- try {
39
- await setConfigFile({
40
- configPathname: phpStorm.database.dataSourcesLocal.path,
41
- template: phpStorm.database.dataSourcesLocal.templatePath,
42
- overwrite: true,
43
- templateArgs: {
44
- phpStorm
45
- }
46
- });
47
- } catch (e) {
48
- throw new Error(`Unexpected error accrued during dataSources.local.xml config creation\n\n${e}`);
49
- }
50
-
51
- try {
52
- await setConfigFile({
53
- configPathname: phpStorm.database.dataSources.path,
54
- template: phpStorm.database.dataSources.templatePath,
55
- overwrite: true,
56
- templateArgs: {
57
- phpStorm,
58
- jdbcUrl
59
- }
60
- });
61
- } catch (e) {
62
- throw new Error(`Unexpected error accrued during dataSources.xml config creation\n\n${e}`);
63
- }
64
-
65
- if (!await pathExists(path.resolve('./.idea/dataSources'))) {
66
- await fs.promises.mkdir(path.resolve('./.idea/dataSources'));
67
- }
68
-
69
- try {
70
- await setConfigFile({
71
- configPathname: phpStorm.inspectionTools.path,
72
- template: phpStorm.inspectionTools.templatePath,
73
- overwrite: true,
74
- templateArgs: {}
75
- });
76
- } catch (e) {
77
- throw new Error(`Unexpected error accrued during Project_Default.xml config creation\n\n${e}`);
78
- }
79
- }
80
- });
81
-
82
- module.exports = createPhpStormConfig;