@scandipwa/magento-scripts 1.14.1-alpha.2 → 1.14.1-alpha.3

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 (46) hide show
  1. package/index.js +13 -0
  2. package/lib/tasks/file-system/create-php-storm-config.js +82 -0
  3. package/lib/tasks/file-system/index.js +1 -1
  4. package/lib/tasks/requirements/docker/index.js +2 -0
  5. package/lib/tasks/requirements/docker/install.js +11 -11
  6. package/lib/tasks/requirements/docker/running-status.js +137 -0
  7. package/lib/tasks/requirements/docker/version.js +2 -0
  8. package/lib/tasks/start.js +2 -6
  9. package/lib/util/instance-metadata.js +1 -7
  10. package/lib/util/is-running-root.js +3 -0
  11. package/lib/util/systemctl.js +46 -0
  12. package/package.json +2 -3
  13. package/typings/context.d.ts +0 -2
  14. package/lib/config/xml-parser.js +0 -61
  15. package/lib/tasks/file-system/create-phpstorm-config/database-config.js +0 -248
  16. package/lib/tasks/file-system/create-phpstorm-config/eslint-config.js +0 -85
  17. package/lib/tasks/file-system/create-phpstorm-config/exclude-folder-config.js +0 -154
  18. package/lib/tasks/file-system/create-phpstorm-config/index.js +0 -27
  19. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/coding-standard-config.js +0 -29
  20. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/config.js +0 -54
  21. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/custom-ruleset-path-config.js +0 -31
  22. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/default-properties-config.js +0 -42
  23. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/eslint-inspection-config.js +0 -37
  24. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/index.js +0 -80
  25. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/magento-coding-standard-config.js +0 -29
  26. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/mess-detector-validation-inspection-config.js +0 -145
  27. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/paths.js +0 -20
  28. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-fixer-validation-inspection-config.js +0 -60
  29. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-validation-inspection-config.js +0 -119
  30. package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/stylelint-inspection-config.js +0 -37
  31. package/lib/tasks/file-system/create-phpstorm-config/keys.js +0 -14
  32. package/lib/tasks/file-system/create-phpstorm-config/php-config/index.js +0 -67
  33. package/lib/tasks/file-system/create-phpstorm-config/php-config/mess-detector-config.js +0 -57
  34. package/lib/tasks/file-system/create-phpstorm-config/php-config/php-code-sniffer-config.js +0 -76
  35. package/lib/tasks/file-system/create-phpstorm-config/php-config/php-cs-fixer-config.js +0 -63
  36. package/lib/tasks/file-system/create-phpstorm-config/php-config/php-project-shared-configuration-config.js +0 -69
  37. package/lib/tasks/file-system/create-phpstorm-config/stylelint-config.js +0 -77
  38. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/composer-settings-config.js +0 -98
  39. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/format-setting-config.js +0 -57
  40. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/index.js +0 -66
  41. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-debug-general-config.js +0 -64
  42. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-server-config.js +0 -60
  43. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/properties-component-config.js +0 -51
  44. package/lib/tasks/file-system/create-phpstorm-config/workspace-config/run-manager-config.js +0 -74
  45. package/lib/tasks/file-system/create-phpstorm-config/xml-utils.js +0 -5
  46. package/typings/phpstorm.d.ts +0 -33
@@ -1,74 +0,0 @@
1
- const { nameKey } = require('../keys');
2
-
3
- const RUN_MANAGER_COMPONENT_NAME = 'RunManager';
4
-
5
- const PHP_REMOTE_DEBUG_RUN_CONFIGURATION_TYPE = 'PhpRemoteDebugRunConfigurationType';
6
-
7
- const serverNameKey = '@_server_name';
8
- const sessionIdKey = '@_session_id';
9
-
10
- /**
11
- * @param {Array} workspaceConfigs
12
- * @param {import('../../../../../typings/phpstorm').PHPStormConfig} phpStormConfiguration
13
- * @returns {Promise<Boolean>}
14
- */
15
- const setupRunManager = async (workspaceConfigs, phpStormConfiguration) => {
16
- const { xdebug } = phpStormConfiguration;
17
- let hasChanges = false;
18
- const runManagerComponent = workspaceConfigs.find(
19
- (workspaceConfig) => workspaceConfig[nameKey] === RUN_MANAGER_COMPONENT_NAME
20
- );
21
-
22
- const defaultRunManagerConfiguration = {
23
- [nameKey]: xdebug.runManagerName,
24
- '@_type': PHP_REMOTE_DEBUG_RUN_CONFIGURATION_TYPE,
25
- '@_factoryName': 'PHP Remote Debug',
26
- '@_filter_connections': 'FILTER',
27
- [serverNameKey]: xdebug.serverName,
28
- [sessionIdKey]: xdebug.sessionId,
29
- method: {
30
- '@_v': '2'
31
- }
32
- };
33
-
34
- if (runManagerComponent) {
35
- if (runManagerComponent.configuration && !Array.isArray(runManagerComponent.configuration)) {
36
- hasChanges = true;
37
- runManagerComponent.configuration = [runManagerComponent.configuration];
38
- } else if (!runManagerComponent.configuration) {
39
- hasChanges = true;
40
- runManagerComponent.configuration = [];
41
- }
42
-
43
- const phpRemoteDebugRunConfiguration = runManagerComponent.configuration.find(
44
- (configuration) => configuration['@_type'] === PHP_REMOTE_DEBUG_RUN_CONFIGURATION_TYPE && configuration[nameKey] === xdebug.runManagerName
45
- );
46
-
47
- if (phpRemoteDebugRunConfiguration) {
48
- if (phpRemoteDebugRunConfiguration[serverNameKey] !== xdebug.serverName) {
49
- hasChanges = true;
50
- phpRemoteDebugRunConfiguration[serverNameKey] = xdebug.serverName;
51
- }
52
-
53
- if (phpRemoteDebugRunConfiguration[sessionIdKey] !== xdebug.sessionId) {
54
- hasChanges = true;
55
- phpRemoteDebugRunConfiguration[sessionIdKey] = xdebug.sessionId;
56
- }
57
- } else {
58
- hasChanges = true;
59
- runManagerComponent.configuration.push(defaultRunManagerConfiguration);
60
- }
61
- } else {
62
- hasChanges = true;
63
- workspaceConfigs.push({
64
- [nameKey]: RUN_MANAGER_COMPONENT_NAME,
65
- configuration: [
66
- defaultRunManagerConfiguration
67
- ]
68
- });
69
- }
70
-
71
- return hasChanges;
72
- };
73
-
74
- module.exports = setupRunManager;
@@ -1,5 +0,0 @@
1
- const formatPathForPHPStormConfig = (p) => p.replace(process.cwd(), '$PROJECT_DIR$');
2
-
3
- module.exports = {
4
- formatPathForPHPStormConfig
5
- };
@@ -1,33 +0,0 @@
1
- export interface PHPStormConfig {
2
- xdebug: {
3
- v2Port: string;
4
- v3Port: string;
5
- debugServerAddress: string;
6
- serverName: string;
7
- runManagerName: string;
8
- sessionId: string;
9
- path: string;
10
- templatePath: string;
11
- }
12
- php: {
13
- phpLanguageLevel: string;
14
- path: string;
15
- templatePath: string;
16
- }
17
- database: {
18
- driver: string;
19
- dataSourceManagerName: string;
20
- dataSourcesLocal: {
21
- path: string;
22
- templatePath: string;
23
- }
24
- dataSources: {
25
- path: string;
26
- templatePath: string;
27
- }
28
- }
29
- inspectionTools: {
30
- path: string;
31
- templatePath: string;
32
- }
33
- }