@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.
- package/lib/config/templates/php-fpm.template.conf +1 -0
- package/lib/config/versions/magento-2.3.7-p2.js +47 -0
- package/lib/config/versions/magento-2.3.7-p3.js +47 -0
- package/lib/config/versions/magento-2.4.3-p2.js +51 -0
- package/lib/config/versions/magento-2.4.4.js +51 -0
- package/lib/config/xml-parser.js +61 -0
- package/lib/tasks/file-system/create-phpstorm-config/database-config.js +248 -0
- package/lib/tasks/file-system/create-phpstorm-config/eslint-config.js +85 -0
- package/lib/tasks/file-system/create-phpstorm-config/exclude-folder-config.js +154 -0
- package/lib/tasks/file-system/create-phpstorm-config/index.js +27 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/coding-standard-config.js +29 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/config.js +54 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/custom-ruleset-path-config.js +31 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/default-properties-config.js +42 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/eslint-inspection-config.js +37 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/index.js +80 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/magento-coding-standard-config.js +29 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/mess-detector-validation-inspection-config.js +145 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/paths.js +20 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-fixer-validation-inspection-config.js +60 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/php-cs-validation-inspection-config.js +119 -0
- package/lib/tasks/file-system/create-phpstorm-config/inspection-tools-config/stylelint-inspection-config.js +37 -0
- package/lib/tasks/file-system/create-phpstorm-config/keys.js +14 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/index.js +67 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/mess-detector-config.js +57 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-code-sniffer-config.js +76 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-cs-fixer-config.js +63 -0
- package/lib/tasks/file-system/create-phpstorm-config/php-config/php-project-shared-configuration-config.js +69 -0
- package/lib/tasks/file-system/create-phpstorm-config/stylelint-config.js +77 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/composer-settings-config.js +98 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/format-setting-config.js +57 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/index.js +66 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-debug-general-config.js +64 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/php-server-config.js +60 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/properties-component-config.js +51 -0
- package/lib/tasks/file-system/create-phpstorm-config/workspace-config/run-manager-config.js +74 -0
- package/lib/tasks/file-system/create-phpstorm-config/xml-utils.js +5 -0
- package/lib/tasks/file-system/index.js +1 -1
- package/lib/tasks/start.js +6 -2
- package/lib/util/instance-metadata.js +7 -1
- package/package.json +13 -2
- package/typings/context.d.ts +2 -0
- package/typings/phpstorm.d.ts +33 -0
- 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;
|