@zohodesk/react-cli 0.0.1-exp.161.2 → 0.0.1-exp.161.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.
- package/README.md +9 -48
- package/lib/common/index.js +6 -6
- package/lib/loaderUtils/index.js +4 -4
- package/lib/pluginUtils/getDevPlugins.js +0 -2
- package/lib/pluginUtils/getProdPlugins.js +0 -2
- package/lib/pluginUtils/index.js +12 -12
- package/lib/plugins/EFCPlugin.js +13 -43
- package/lib/plugins/I18nSplitPlugin/utils/hashUtils.js +2 -2
- package/lib/plugins/I18nSplitPlugin/utils/propertiesUtils.js +1 -1
- package/lib/plugins/ManifestPlugin.js +0 -8
- package/lib/plugins/index.js +36 -36
- package/lib/postcss-plugins/RTLSplitPlugin.js +1 -1
- package/lib/schemas/index.js +0 -3
- package/lib/templates/linterConstant.js +1 -1
- package/lib/utils/cssClassNameGenerate.js +2 -9
- package/lib/utils/cssURLReplacer.js +1 -1
- package/lib/utils/index.js +19 -21
- package/lib/utils/jsonHelper.js +1 -1
- package/lib/utils/reinstallDependencies.js +1 -1
- package/package.json +4 -5
- package/lib/plugins/EFCTemplatePlugin.js +0 -151
- package/node_modules0/history/CHANGES.md +0 -395
- package/node_modules0/history/DOMUtils.js +0 -3
- package/node_modules0/history/ExecutionEnvironment.js +0 -3
- package/node_modules0/history/LICENSE +0 -21
- package/node_modules0/history/LocationUtils.js +0 -3
- package/node_modules0/history/PathUtils.js +0 -3
- package/node_modules0/history/README.md +0 -282
- package/node_modules0/history/cjs/history.js +0 -933
- package/node_modules0/history/cjs/history.min.js +0 -1
- package/node_modules0/history/createBrowserHistory.js +0 -3
- package/node_modules0/history/createHashHistory.js +0 -3
- package/node_modules0/history/createMemoryHistory.js +0 -3
- package/node_modules0/history/createTransitionManager.js +0 -3
- package/node_modules0/history/es/DOMUtils.js +0 -7
- package/node_modules0/history/es/ExecutionEnvironment.js +0 -7
- package/node_modules0/history/es/LocationUtils.js +0 -7
- package/node_modules0/history/es/PathUtils.js +0 -7
- package/node_modules0/history/es/createBrowserHistory.js +0 -7
- package/node_modules0/history/es/createHashHistory.js +0 -7
- package/node_modules0/history/es/createMemoryHistory.js +0 -7
- package/node_modules0/history/es/createTransitionManager.js +0 -7
- package/node_modules0/history/es/warnAboutDeprecatedESMImport.js +0 -35
- package/node_modules0/history/esm/history.js +0 -904
- package/node_modules0/history/index.js +0 -7
- package/node_modules0/history/package.json +0 -120
- package/node_modules0/history/umd/history.js +0 -1059
- package/node_modules0/history/umd/history.min.js +0 -1
- package/node_modules0/history/warnAboutDeprecatedCJSRequire.js +0 -35
package/README.md
CHANGED
@@ -1,78 +1,39 @@
|
|
1
1
|
# React CLI
|
2
2
|
|
3
3
|
A CLI tool for build modern web application and libraries
|
4
|
-
|
5
|
-
# 0.0.1-exp.161.2
|
6
|
-
|
7
|
-
- Features
|
8
|
-
- feature added for efc `templateFilePath` in `paakage.json` option palce is `"react-cli" => "efc" `
|
9
|
-
- `(('publicPath'))` this placeholder will be replace as publicPath string `publicPath`
|
10
|
-
- `(('getInitalAssets'))` this placeholder will be replace as function `getInitalAssets`
|
11
|
-
- `getInitalAssets` this function has two arguments `assetsType`, `lang`
|
12
|
-
- `assetsType` are `js`, `css`, `i18n`
|
13
|
-
- `lang` this argument only works when `i18n` is `assetsType`
|
14
|
-
|
15
|
-
# 0.0.1-exp.161.1
|
16
|
-
|
17
|
-
- Features
|
18
|
-
- feature added for efc `cdnStatement`
|
19
|
-
- Issue fixes:-
|
20
|
-
- css classname hash change issue fix
|
21
|
-
- debug package conflit issue fix in nock in (react-cli test)
|
22
|
-
- manifest.json css file name correction issue for rtl and ltr
|
23
|
-
|
24
4
|
# 0.0.1-beta.160
|
25
|
-
|
26
5
|
- @zohodesk/normalizer package version updated to 1.0.2
|
27
|
-
|
28
6
|
# 0.0.1-beta.159
|
29
|
-
|
30
7
|
- @zohodesk/datetimejs package updated to beta.7
|
31
|
-
|
32
|
-
# 0.0.1-exp.159
|
33
|
-
|
34
|
-
- isse fix:-
|
35
|
-
- when rtl ltr css split enable manifest json css filename keys comes with hash .
|
36
|
-
|
37
8
|
# 0.0.1-beta.158
|
38
|
-
|
39
|
-
- Removing source map files from service worker caching.
|
40
|
-
|
9
|
+
- Removing source map files from service worker caching.
|
41
10
|
# 0.0.1-beta.157
|
42
|
-
|
43
|
-
- Experimental version issue fix(Dummy version removed)
|
44
|
-
|
11
|
+
- Experimental version issue fix(Dummy version removed)
|
45
12
|
# 0.0.1-beta.156
|
46
|
-
|
47
|
-
- ReportPublish issue fix
|
13
|
+
- ReportPublish issue fix
|
48
14
|
|
49
15
|
# 0.0.1-beta.155
|
50
|
-
|
51
|
-
- get impacted library source files option added
|
16
|
+
- get impacted library source files option added
|
52
17
|
|
53
18
|
# 0.0.1-beta.154
|
54
|
-
|
55
|
-
-
|
56
|
-
-
|
57
|
-
- un wanted {{--js-smap}} in inital html without enable smap in build
|
19
|
+
- mockPrefix option for mock url prefix change
|
20
|
+
- Issue fix:-
|
21
|
+
- un wanted {{--js-smap}} in inital html without enable smap in build
|
58
22
|
|
59
23
|
# 0.0.1-beta.153
|
60
|
-
|
61
24
|
- Vendor include array added
|
62
25
|
- If you need to include any thrid party js in vendor we can use this array
|
63
26
|
|
64
27
|
# 0.0.1-beta.152
|
65
|
-
|
66
28
|
impact servise related changes:-
|
67
|
-
|
68
29
|
- nowatchstart option added. will be used like `react-cli nowatchstart <...options>` this will be used for src file changes no need to reflect (or no need to rebulid on file changes)
|
69
30
|
- cssselector_zip option added. will be used like `--cssselector-zip=selectormapping.zip`
|
70
31
|
only work in two ways
|
71
32
|
1. `react-cli start --disable-watch --cssselector-zip=selectormapping.zip` app start command with `--disable-watch` flag and your usaul options
|
72
33
|
2. `react-cli nowatchstart --cssselector-zip=selectormapping.zip` app start command's usaul options
|
73
34
|
#### Urls are:-
|
74
|
-
Below express path are added, For download zip files and
|
75
|
-
- `/zips/${zipname}.zip`
|
35
|
+
Below express path are added, For download zip files and
|
36
|
+
- `/zips/${zipname}.zip` for css selector maps zip file (contains css_map filies and original css files)
|
76
37
|
- `/zips/build.zip` build zip file (contains bundled all files)
|
77
38
|
|
78
39
|
# 0.0.1-beta.151
|
package/lib/common/index.js
CHANGED
@@ -3,22 +3,22 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
Object.defineProperty(exports, "
|
6
|
+
Object.defineProperty(exports, "splitChunks", {
|
7
7
|
enumerable: true,
|
8
8
|
get: function () {
|
9
|
-
return
|
9
|
+
return _splitChunks.default;
|
10
10
|
}
|
11
11
|
});
|
12
|
-
Object.defineProperty(exports, "
|
12
|
+
Object.defineProperty(exports, "getEntries", {
|
13
13
|
enumerable: true,
|
14
14
|
get: function () {
|
15
|
-
return
|
15
|
+
return _getEntries.default;
|
16
16
|
}
|
17
17
|
});
|
18
|
-
Object.defineProperty(exports, "
|
18
|
+
Object.defineProperty(exports, "getPublicPathConfig", {
|
19
19
|
enumerable: true,
|
20
20
|
get: function () {
|
21
|
-
return
|
21
|
+
return _getPublicPathConfig.default;
|
22
22
|
}
|
23
23
|
});
|
24
24
|
Object.defineProperty(exports, "templateParameters", {
|
package/lib/loaderUtils/index.js
CHANGED
@@ -3,16 +3,16 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
Object.defineProperty(exports, "
|
6
|
+
Object.defineProperty(exports, "getDevJsLoaders", {
|
7
7
|
enumerable: true,
|
8
8
|
get: function () {
|
9
|
-
return
|
9
|
+
return _getDevJsLoaders.default;
|
10
10
|
}
|
11
11
|
});
|
12
|
-
Object.defineProperty(exports, "
|
12
|
+
Object.defineProperty(exports, "getCSSLoaders", {
|
13
13
|
enumerable: true,
|
14
14
|
get: function () {
|
15
|
-
return
|
15
|
+
return _getCSSLoaders.default;
|
16
16
|
}
|
17
17
|
});
|
18
18
|
|
@@ -55,7 +55,6 @@ let getDevPlugins = (options, publicPath) => {
|
|
55
55
|
},
|
56
56
|
efc: {
|
57
57
|
hasEFC: newOptionForEnableEFC,
|
58
|
-
templateFilePath,
|
59
58
|
nameScope: efcNameSpace,
|
60
59
|
localeAttr: efcLocaleAttr
|
61
60
|
},
|
@@ -163,7 +162,6 @@ let getDevPlugins = (options, publicPath) => {
|
|
163
162
|
plugins.push(new _plugins.EFCPlugin({
|
164
163
|
isDevelopment: true,
|
165
164
|
i18nManifestFileName,
|
166
|
-
templateFilePath,
|
167
165
|
i18nFileNameTemplate,
|
168
166
|
serverUrl: publicPath,
|
169
167
|
entryPointName: 'efc',
|
@@ -72,7 +72,6 @@ let getProdPlugins = (options, publicPath = '') => {
|
|
72
72
|
const {
|
73
73
|
hasEFC: newOptionForEnableEFC,
|
74
74
|
nameScope: efcNameSpace,
|
75
|
-
templateFilePath,
|
76
75
|
localeAttr: efcLocaleAttr
|
77
76
|
} = options.efc;
|
78
77
|
const hasEFC = newOptionForEnableEFC || prevOptionForEnableEFC;
|
@@ -167,7 +166,6 @@ let getProdPlugins = (options, publicPath = '') => {
|
|
167
166
|
isDevelopment,
|
168
167
|
serverUrl: publicPath,
|
169
168
|
i18nFileNameTemplate,
|
170
|
-
templateFilePath,
|
171
169
|
i18nManifestFileName,
|
172
170
|
entryPointName: 'efc',
|
173
171
|
// outputFile: 'zohodesk-efc-sdk-latest.js',
|
package/lib/pluginUtils/index.js
CHANGED
@@ -9,22 +9,16 @@ Object.defineProperty(exports, "getDevPlugins", {
|
|
9
9
|
return _getDevPlugins.default;
|
10
10
|
}
|
11
11
|
});
|
12
|
-
Object.defineProperty(exports, "
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _getDocsPlugins.default;
|
16
|
-
}
|
17
|
-
});
|
18
|
-
Object.defineProperty(exports, "getLibraryPlugins", {
|
12
|
+
Object.defineProperty(exports, "getProdPlugins", {
|
19
13
|
enumerable: true,
|
20
14
|
get: function () {
|
21
|
-
return
|
15
|
+
return _getProdPlugins.default;
|
22
16
|
}
|
23
17
|
});
|
24
|
-
Object.defineProperty(exports, "
|
18
|
+
Object.defineProperty(exports, "getDocsPlugins", {
|
25
19
|
enumerable: true,
|
26
20
|
get: function () {
|
27
|
-
return
|
21
|
+
return _getDocsPlugins.default;
|
28
22
|
}
|
29
23
|
});
|
30
24
|
Object.defineProperty(exports, "getServerPlugins", {
|
@@ -33,10 +27,10 @@ Object.defineProperty(exports, "getServerPlugins", {
|
|
33
27
|
return _getServerPlugins.default;
|
34
28
|
}
|
35
29
|
});
|
36
|
-
Object.defineProperty(exports, "
|
30
|
+
Object.defineProperty(exports, "getLibraryPlugins", {
|
37
31
|
enumerable: true,
|
38
32
|
get: function () {
|
39
|
-
return
|
33
|
+
return _getLibraryPlugins.default;
|
40
34
|
}
|
41
35
|
});
|
42
36
|
Object.defineProperty(exports, "getUMDComponentPlugins", {
|
@@ -45,6 +39,12 @@ Object.defineProperty(exports, "getUMDComponentPlugins", {
|
|
45
39
|
return _getUMDComponentPlugins.default;
|
46
40
|
}
|
47
41
|
});
|
42
|
+
Object.defineProperty(exports, "getUMDCSSPlugins", {
|
43
|
+
enumerable: true,
|
44
|
+
get: function () {
|
45
|
+
return _getUMDCSSPlugins.default;
|
46
|
+
}
|
47
|
+
});
|
48
48
|
|
49
49
|
var _getDevPlugins = _interopRequireDefault(require("./getDevPlugins"));
|
50
50
|
|
package/lib/plugins/EFCPlugin.js
CHANGED
@@ -17,8 +17,6 @@ var _I18nKeysIdentifer = _interopRequireDefault(require("./I18nSplitPlugin/I18nK
|
|
17
17
|
|
18
18
|
var _replaceCssDirTemplate = require("./RtlSplitPlugin/replaceCssDirTemplate");
|
19
19
|
|
20
|
-
var _EFCTemplatePlugin = _interopRequireDefault(require("./EFCTemplatePlugin"));
|
21
|
-
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
23
21
|
|
24
22
|
// import { getShortI18nAssets } from './I18nSplitPlugin/utils/hashUtils';
|
@@ -36,19 +34,17 @@ const {
|
|
36
34
|
efc: efcOptios
|
37
35
|
} = cliOptions;
|
38
36
|
const {
|
39
|
-
createSDkFile
|
40
|
-
cdnStatement
|
37
|
+
createSDkFile
|
41
38
|
} = efcOptios;
|
42
39
|
|
43
40
|
class EFCPlugin {
|
44
41
|
constructor(options = {}) {
|
45
42
|
this.isDevelopment = options.isDevelopment;
|
46
|
-
this.templateFilePath = options.templateFilePath;
|
47
43
|
this.serverUrl = options.serverUrl;
|
48
44
|
this.i18nFileNameTemplate = options.i18nFileNameTemplate; // NOTE: this logic may be needed for i18n splited file name with contenthash cases
|
49
45
|
// this.i18nManifestFileName = options.i18nManifestFileName;
|
50
46
|
// IMPORTANT: here we mergeing optionds from pacakge.json and options via constructor
|
51
|
-
// So when debugging consider this as well
|
47
|
+
// So when debugging consider this as well
|
52
48
|
|
53
49
|
this.options = Object.assign({}, efcOptios, options);
|
54
50
|
this.options.entryPointName = options.entryPointName || 'efc';
|
@@ -129,35 +125,20 @@ class EFCPlugin {
|
|
129
125
|
${enableRTLSplit ? `const cssDir = ${cssDirStatement};` : ''}
|
130
126
|
const prod = !${this.isDevelopment};
|
131
127
|
let cdnVariableName = "${cdnVariableName}";
|
132
|
-
|
133
|
-
|
134
|
-
${
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
})();` : ''}
|
139
|
-
|
140
|
-
${publicPaths.callback ? `return (${publicPaths.callback})(ext)` : ''}
|
141
|
-
|
142
|
-
let assetURLs = {
|
143
|
-
//hook
|
144
|
-
js: ${JSON.stringify(jsPath || serverUrl)},
|
145
|
-
css: ${JSON.stringify(cssPath || serverUrl)},
|
146
|
-
i18n: ${JSON.stringify(i18nJsPath || serverUrl)}
|
147
|
-
};
|
148
|
-
|
149
|
-
return assetURLs[ext];
|
150
|
-
|
151
|
-
}
|
152
|
-
|
128
|
+
let assetURLs = {
|
129
|
+
//hook
|
130
|
+
js: ${JSON.stringify(jsPath || serverUrl)},
|
131
|
+
css: ${JSON.stringify(cssPath || serverUrl)},
|
132
|
+
i18n: ${JSON.stringify(i18nJsPath || serverUrl)}
|
133
|
+
};
|
153
134
|
|
154
135
|
window.desk_urls={}
|
155
|
-
window.desk_urls.staticDomain = 'https:' +
|
136
|
+
window.desk_urls.staticDomain = 'https:' + assetURLs.js + '/';
|
156
137
|
if (prod && cdnVariableName) {
|
157
|
-
window["${cdnVariableName}"] = 'https:' +
|
138
|
+
window["${cdnVariableName}"] = 'https:' + assetURLs.css + '/';
|
158
139
|
}
|
159
140
|
|
160
|
-
let initalI18nAssets = ${initalI18nAssets};
|
141
|
+
let initalI18nAssets = ${initalI18nAssets}.map(urlpath => "${i18nJsPath}/"+ urlpath);
|
161
142
|
let initialAssets = initalI18nAssets.concat(${JSON.stringify(enableRTLSplit ? filteredInitialFiles.map(filePath => (0, _replaceCssDirTemplate.replaceCssDirTemplate)(filePath, cssDirTemplate)) : filteredInitialFiles)});
|
162
143
|
|
163
144
|
let loadAsset = (id, type, url) => {
|
@@ -169,12 +150,12 @@ class EFCPlugin {
|
|
169
150
|
switch(type) {
|
170
151
|
case 'script':
|
171
152
|
case 'i18n':
|
172
|
-
el.src = (type === 'i18n'?
|
153
|
+
el.src = (type === 'i18n'? assetURLs.i18n : assetURLs.js)+'/'+url
|
173
154
|
el.defer = 'defer';
|
174
155
|
document.body.appendChild(el);
|
175
156
|
break;
|
176
157
|
case 'link':
|
177
|
-
el.href =
|
158
|
+
el.href = assetURLs.css+'/'+url${enableRTLSplit ? `.replace(${JSON.stringify(cssDirTemplate)}, cssDir)` : ''}
|
178
159
|
el.rel = 'stylesheet';
|
179
160
|
document.head.appendChild(el);
|
180
161
|
break;
|
@@ -205,17 +186,6 @@ class EFCPlugin {
|
|
205
186
|
apply(compiler) {
|
206
187
|
if (!createSDkFile) {
|
207
188
|
return;
|
208
|
-
} //console.log('this.templateFilePath', this.templateFilePath, this.options);
|
209
|
-
|
210
|
-
|
211
|
-
if (this.templateFilePath) {
|
212
|
-
new _EFCTemplatePlugin.default({
|
213
|
-
templateFilePath: this.templateFilePath,
|
214
|
-
publicPath: this.serverUrl,
|
215
|
-
i18nFileNameTemplate: this.i18nFileNameTemplate,
|
216
|
-
entryPointName: this.options.entryPointName
|
217
|
-
}).apply(compiler);
|
218
|
-
return;
|
219
189
|
}
|
220
190
|
|
221
191
|
compiler.hooks.emit.tap('EFCPlugin', compilation => {
|
@@ -3,9 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.REGEXP_CONTENTHASH = void 0;
|
7
|
-
exports.getShortI18nAssets = getShortI18nAssets;
|
8
6
|
exports.hasContentHash = hasContentHash;
|
7
|
+
exports.getShortI18nAssets = getShortI18nAssets;
|
8
|
+
exports.REGEXP_CONTENTHASH = void 0;
|
9
9
|
|
10
10
|
var _urlConcat = require("../../../utils/urlConcat");
|
11
11
|
|
@@ -21,14 +21,6 @@ let filenameParser = filename => {
|
|
21
21
|
} = _path.default.parse(hashedName);
|
22
22
|
|
23
23
|
let nameparts = name.split('.');
|
24
|
-
|
25
|
-
if (ext === '.css' && /^(rtl|ltr)$/.test(nameparts[nameparts.length - 1])) {
|
26
|
-
return {
|
27
|
-
name: nameparts.slice(0, nameparts.length - 2).join('.') + ext,
|
28
|
-
hashedName
|
29
|
-
};
|
30
|
-
}
|
31
|
-
|
32
24
|
return {
|
33
25
|
name: nameparts.slice(0, nameparts.length - 1).join('.') + ext,
|
34
26
|
hashedName
|
package/lib/plugins/index.js
CHANGED
@@ -3,112 +3,112 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
Object.defineProperty(exports, "
|
6
|
+
Object.defineProperty(exports, "ModuleStatsPlugin", {
|
7
7
|
enumerable: true,
|
8
8
|
get: function () {
|
9
|
-
return
|
9
|
+
return _ModuleStatsPlugin.default;
|
10
10
|
}
|
11
11
|
});
|
12
|
-
Object.defineProperty(exports, "
|
12
|
+
Object.defineProperty(exports, "SourceMapHookPlugin", {
|
13
13
|
enumerable: true,
|
14
14
|
get: function () {
|
15
|
-
return
|
15
|
+
return _SourceMapHookPlugin.default;
|
16
16
|
}
|
17
17
|
});
|
18
|
-
Object.defineProperty(exports, "
|
18
|
+
Object.defineProperty(exports, "UnusedFilesFindPlugin", {
|
19
19
|
enumerable: true,
|
20
20
|
get: function () {
|
21
|
-
return
|
21
|
+
return _UnusedFilesFindPlugin.default;
|
22
22
|
}
|
23
23
|
});
|
24
|
-
Object.defineProperty(exports, "
|
24
|
+
Object.defineProperty(exports, "ScriptInstrumentPlugin", {
|
25
25
|
enumerable: true,
|
26
26
|
get: function () {
|
27
|
-
return
|
27
|
+
return _ScriptInstrumentPlugin.default;
|
28
28
|
}
|
29
29
|
});
|
30
|
-
Object.defineProperty(exports, "
|
30
|
+
Object.defineProperty(exports, "PublicPathChangePlugin", {
|
31
31
|
enumerable: true,
|
32
32
|
get: function () {
|
33
|
-
return
|
33
|
+
return _PublicPathChangePlugin.default;
|
34
34
|
}
|
35
35
|
});
|
36
|
-
Object.defineProperty(exports, "
|
36
|
+
Object.defineProperty(exports, "OptimizeJSPlugin", {
|
37
37
|
enumerable: true,
|
38
38
|
get: function () {
|
39
|
-
return
|
39
|
+
return _OptimizeJSPlugin.default;
|
40
40
|
}
|
41
41
|
});
|
42
|
-
Object.defineProperty(exports, "
|
42
|
+
Object.defineProperty(exports, "ResourceHintsPlugin", {
|
43
43
|
enumerable: true,
|
44
44
|
get: function () {
|
45
|
-
return
|
45
|
+
return _ResourceHintsPlugin.default;
|
46
46
|
}
|
47
47
|
});
|
48
|
-
Object.defineProperty(exports, "
|
48
|
+
Object.defineProperty(exports, "UglifyCSSPlugin", {
|
49
49
|
enumerable: true,
|
50
50
|
get: function () {
|
51
|
-
return
|
51
|
+
return _UglifyCSSPlugin.default;
|
52
52
|
}
|
53
53
|
});
|
54
|
-
Object.defineProperty(exports, "
|
54
|
+
Object.defineProperty(exports, "ManifestPlugin", {
|
55
55
|
enumerable: true,
|
56
56
|
get: function () {
|
57
|
-
return
|
57
|
+
return _ManifestPlugin.default;
|
58
58
|
}
|
59
59
|
});
|
60
|
-
Object.defineProperty(exports, "
|
60
|
+
Object.defineProperty(exports, "CleanUpStatsPlugin", {
|
61
61
|
enumerable: true,
|
62
62
|
get: function () {
|
63
|
-
return
|
63
|
+
return _CleanupStatsPlugin.default;
|
64
64
|
}
|
65
65
|
});
|
66
|
-
Object.defineProperty(exports, "
|
66
|
+
Object.defineProperty(exports, "EFCPlugin", {
|
67
67
|
enumerable: true,
|
68
68
|
get: function () {
|
69
|
-
return
|
69
|
+
return _EFCPlugin.default;
|
70
70
|
}
|
71
71
|
});
|
72
|
-
Object.defineProperty(exports, "
|
72
|
+
Object.defineProperty(exports, "PublicPathCallbackPlugin", {
|
73
73
|
enumerable: true,
|
74
74
|
get: function () {
|
75
|
-
return
|
75
|
+
return _PublicPathCallbackPlugin.default;
|
76
76
|
}
|
77
77
|
});
|
78
|
-
Object.defineProperty(exports, "
|
78
|
+
Object.defineProperty(exports, "I18NInjectIntoIndexPlugin", {
|
79
79
|
enumerable: true,
|
80
80
|
get: function () {
|
81
|
-
return
|
81
|
+
return _I18NInjectIntoIndexPlugin.default;
|
82
82
|
}
|
83
83
|
});
|
84
|
-
Object.defineProperty(exports, "
|
84
|
+
Object.defineProperty(exports, "ReportGeneratePlugin", {
|
85
85
|
enumerable: true,
|
86
86
|
get: function () {
|
87
|
-
return
|
87
|
+
return _ReportGeneratePlugin.default;
|
88
88
|
}
|
89
89
|
});
|
90
|
-
Object.defineProperty(exports, "
|
90
|
+
Object.defineProperty(exports, "ShadowDOMSupportPlugin", {
|
91
91
|
enumerable: true,
|
92
92
|
get: function () {
|
93
|
-
return
|
93
|
+
return _ShadowDOMSupportPlugin.default;
|
94
94
|
}
|
95
95
|
});
|
96
|
-
Object.defineProperty(exports, "
|
96
|
+
Object.defineProperty(exports, "ServiceWorkerPlugin", {
|
97
97
|
enumerable: true,
|
98
98
|
get: function () {
|
99
|
-
return
|
99
|
+
return _ServiceWorkerPlugin.default;
|
100
100
|
}
|
101
101
|
});
|
102
|
-
Object.defineProperty(exports, "
|
102
|
+
Object.defineProperty(exports, "TPHashMappingPlugin", {
|
103
103
|
enumerable: true,
|
104
104
|
get: function () {
|
105
|
-
return
|
105
|
+
return _TPHashMappingPlugin.default;
|
106
106
|
}
|
107
107
|
});
|
108
|
-
Object.defineProperty(exports, "
|
108
|
+
Object.defineProperty(exports, "CdnChangePlugin", {
|
109
109
|
enumerable: true,
|
110
110
|
get: function () {
|
111
|
-
return
|
111
|
+
return _CdnChangePlugin.default;
|
112
112
|
}
|
113
113
|
});
|
114
114
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.separateRtlAndLtr = separateRtlAndLtr;
|
7
6
|
exports.separateSingleDir = separateSingleDir;
|
7
|
+
exports.separateRtlAndLtr = separateRtlAndLtr;
|
8
8
|
|
9
9
|
var postcss = _interopRequireWildcard(require("postcss"));
|
10
10
|
|
package/lib/schemas/index.js
CHANGED
@@ -42,14 +42,11 @@ var _default = {
|
|
42
42
|
nameScope: 'ZOHODESK',
|
43
43
|
version: 'default',
|
44
44
|
outputFile: 'zohodesk-efc-sdk-[version].js',
|
45
|
-
templateFilePath: '',
|
46
45
|
localeAttr: 'data-efc-locale',
|
47
46
|
localeDefaultValue: 'en_US',
|
48
47
|
localeStatement: null,
|
49
48
|
cssDirAttr: 'data-efc-dir',
|
50
49
|
cssDirDefaultValue: 'ltr',
|
51
|
-
cdnStatement: '',
|
52
|
-
// cdnStatement: "new URL(document.querySelector(\"script[src*='zohodesk-efc-sdk']\").src).origin",
|
53
50
|
cssDirStatement: null
|
54
51
|
},
|
55
52
|
app: {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.endTag = exports.htmlTemplate = void 0;
|
7
7
|
const htmlTemplate = '<!DOCTYPE html><html> <head> <title>Eslint Security Rule</title> <style type="text/css"> body{margin: 0; font: 93.75%/1.6 -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;}body, html{width: 100%; height: 100%;}.pkCont{}.pkEmpty{height: 300px;display: flex;align-items: center;justify-content: center;font-size: 20px;}.pkUl{margin: 0; padding: 0; list-style-type: none;}.pkLi{}.pkRow{display: flex; padding: 12px 16px;}.pkArrowCont{cursor: pointer; width: 50px; display: flex; align-items: center; justify-content: center; background-color: #f4f5f5; border-radius: 4px;}.pkArrow{width: 1px; height: 1px; border: 5px solid; border-color: #000 transparent transparent; margin-top: 7px;}.pkDetailsOpen .pkArrow{margin: 0 0 7px; border-color: transparent transparent #000;}.pkFileName{font-weight: 600; margin: 0 8px;}.pkUrl{flex: 1; min-width: 0; min-height: 0; word-break: break-word; word-wrap: break-word; color: blue;}.pkDetails{margin-left: 66px; display: none;}.pkDetailsOpen .pkDetails{display: block;}.pkDetailsHead{font-weight: 600; display: flex; border: 1px solid #e5e5e5; padding: 3px 8px;}.pkDetailsBody{max-height: 400px; overflow: auto;}.pkDetailsRow{display: flex; padding: 10px 8px;}.pkDetailsRow:nth-child(even){background-color: #f4f5f5;}.pkDetailsCol{word-break: break-word; word-wrap: break-word;}.pkError{color: red;}.pkDetailsCol:nth-child(1){width: 10%;}.pkDetailsCol:nth-child(2){width: 10%;}.pkDetailsCol:nth-child(3){width: 40%;}.pkDetailsCol:nth-child(4){width: 40%;}</style> <script>function toggleWrapper(element){var classArray=element.parentElement.parentElement.className; if (classArray.includes("pkDetailsOpen")){element.parentElement.parentElement.className="pkLi";}else{element.parentElement.parentElement.className="pkLi pkDetailsOpen";}}</script> </head> <body> <div class="pkCont">';
|
8
8
|
exports.htmlTemplate = htmlTemplate;
|
9
9
|
const endTag = '</div></body></html>';
|
@@ -40,13 +40,6 @@ var _default = (unique = true, {
|
|
40
40
|
filenames,
|
41
41
|
packages
|
42
42
|
}, classNamePrefix) => (context, localIdentName, localName) => {
|
43
|
-
// NOTE: in build macine we use date as folder path.
|
44
|
-
// So every time we create new build there is path will alway different
|
45
|
-
// in order to minmaze that problem we try in relative path;
|
46
|
-
// console.log('context.resourcePath', context.resourcePath, context);
|
47
|
-
// let contextResourcePath = context.resourcePath;
|
48
|
-
let relativePath = _path.default.relative(context.rootContext, context.resourcePath);
|
49
|
-
|
50
43
|
if (context.resourcePath.endsWith('.plain.css')) {
|
51
44
|
return localName;
|
52
45
|
}
|
@@ -54,7 +47,7 @@ var _default = (unique = true, {
|
|
54
47
|
|
55
48
|
|
56
49
|
if (unique) {
|
57
|
-
let h = (0, _getHash.default)(
|
50
|
+
let h = (0, _getHash.default)(context.resourcePath + localName, 10);
|
58
51
|
return `${classNamePrefix}${h}`;
|
59
52
|
}
|
60
53
|
/* old production mode end*/
|
@@ -67,7 +60,7 @@ var _default = (unique = true, {
|
|
67
60
|
//let local = localName.toLowerCase()
|
68
61
|
|
69
62
|
if (isSelectorPackage(context.resourcePath, packages) || filenames.indexOf(cleanFileName) !== -1) {
|
70
|
-
let h = (0, _getHash.default)(
|
63
|
+
let h = (0, _getHash.default)(context.resourcePath + localName, 10);
|
71
64
|
return `${classNamePrefix}${h}`;
|
72
65
|
}
|
73
66
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.cssUrlReplacer = exports.getUrls = exports.getFileType = void 0;
|
7
7
|
|
8
8
|
var _fs = _interopRequireDefault(require("fs"));
|
9
9
|
|