@ui5/webcomponents-tools 0.0.0-d0bcf47c7 → 0.0.0-d473b9686
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/CHANGELOG.md +1410 -1
- package/README.md +6 -6
- package/assets-meta.js +158 -0
- package/bin/dev.js +12 -1
- package/components-package/eslint.js +36 -0
- package/components-package/nps.js +122 -46
- package/components-package/postcss.components.js +1 -21
- package/components-package/postcss.themes.js +1 -23
- package/components-package/vite.config.js +13 -0
- package/components-package/wdio.js +152 -65
- package/icons-collection/nps.js +71 -28
- package/lib/amd-to-es6/index.js +102 -0
- package/lib/amd-to-es6/no-remaining-require.js +33 -0
- package/lib/cem/custom-elements-manifest.config.mjs +501 -0
- package/lib/cem/event.mjs +131 -0
- package/lib/cem/schema-internal.json +1357 -0
- package/lib/cem/schema.json +1098 -0
- package/lib/cem/types-internal.d.ts +796 -0
- package/lib/cem/types.d.ts +736 -0
- package/lib/cem/utils.mjs +384 -0
- package/lib/cem/validate.js +70 -0
- package/lib/copy-and-watch/index.js +145 -0
- package/lib/copy-list/index.js +28 -0
- package/lib/create-icons/index.js +126 -0
- package/lib/create-illustrations/index.js +182 -0
- package/lib/create-new-component/index.js +114 -0
- package/lib/create-new-component/tsFileContentTemplate.js +71 -0
- package/lib/css-processors/css-processor-component-styles.mjs +48 -0
- package/lib/css-processors/css-processor-components.mjs +77 -0
- package/lib/css-processors/css-processor-themes.mjs +79 -0
- package/lib/css-processors/scope-variables.mjs +49 -0
- package/lib/css-processors/shared.mjs +76 -0
- package/lib/dev-server/custom-hot-update-plugin.js +39 -0
- package/lib/dev-server/dev-server.js +66 -0
- package/lib/dev-server/ssr-dom-shim-loader.js +26 -0
- package/lib/dev-server/virtual-index-html-plugin.js +52 -0
- package/lib/generate-js-imports/illustrations.js +86 -0
- package/lib/generate-json-imports/i18n.js +71 -0
- package/lib/generate-json-imports/themes.js +58 -0
- package/lib/hbs2lit/index.js +3 -0
- package/lib/hbs2lit/src/compiler.js +60 -0
- package/lib/hbs2lit/src/extendedAttributeMapping.js +12 -0
- package/lib/hbs2lit/src/includesReplacer.js +31 -0
- package/lib/hbs2lit/src/litVisitor2.js +278 -0
- package/lib/hbs2lit/src/partials2.js +51 -0
- package/lib/hbs2lit/src/partialsVisitor.js +187 -0
- package/lib/hbs2lit/src/svgProcessor.js +76 -0
- package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +40 -0
- package/lib/hbs2ui5/index.js +119 -0
- package/lib/i18n/defaults.js +82 -0
- package/lib/i18n/toJSON.js +43 -0
- package/lib/postcss-combine-duplicated-selectors/index.js +185 -0
- package/lib/remove-dev-mode/remove-dev-mode.mjs +37 -0
- package/lib/scoping/get-all-tags.js +37 -0
- package/lib/scoping/lint-src.js +32 -0
- package/lib/scoping/missing-dependencies.js +65 -0
- package/lib/scoping/report-tags-usage.js +28 -0
- package/lib/scoping/scope-test-pages.js +41 -0
- package/lib/test-runner/test-runner.js +71 -0
- package/package.json +56 -55
- package/bin/init-ui5-package.js +0 -3
- package/package-lock.json +0 -9994
@@ -0,0 +1,71 @@
|
|
1
|
+
const child_process = require("child_process");
|
2
|
+
const { readFileSync } = require("fs");
|
3
|
+
const path = require("path");
|
4
|
+
const fs = require("fs");
|
5
|
+
|
6
|
+
// search for dev-server port
|
7
|
+
// start in current folder
|
8
|
+
// traversing upwards in case of mono repo tests and dev-server running in root folder of repository
|
9
|
+
let devServerFolder = process.cwd();
|
10
|
+
let devServerPort;
|
11
|
+
while (true) {
|
12
|
+
try {
|
13
|
+
devServerPort = readFileSync(path.join(devServerFolder, ".dev-server-port")).toString();
|
14
|
+
break; // found
|
15
|
+
} catch (e) {
|
16
|
+
// file not found
|
17
|
+
if (devServerFolder === path.dirname(devServerFolder)) {
|
18
|
+
break; // reached root folder "/"
|
19
|
+
}
|
20
|
+
devServerFolder = path.dirname(devServerFolder);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
// check if we are in a monorepo and extract path from package.json
|
25
|
+
let packageRepositoryPath = "";
|
26
|
+
const pkg = require(path.join(process.cwd(), "package.json"));
|
27
|
+
packageRepositoryPath = pkg.repository ? pkg.repository.directory : "";
|
28
|
+
|
29
|
+
// construct base url
|
30
|
+
// use devServerPort if a dev server is running, otherwise let the baseUrl in the wdio config be used
|
31
|
+
// if a dev server is running in the root of a mono repo, append tha package path like this
|
32
|
+
// http://localhost:${devServerPort}/packages/main/
|
33
|
+
let baseUrl = "";
|
34
|
+
if (devServerPort) {
|
35
|
+
console.log(`Found port ${devServerPort} from '${path.join(devServerFolder, ".dev-server-port")}'`);
|
36
|
+
const devServerInRoot = !devServerFolder.includes(packageRepositoryPath);
|
37
|
+
if (devServerInRoot) {
|
38
|
+
baseUrl = `--base-url http://localhost:${devServerPort}/${packageRepositoryPath}/`;
|
39
|
+
} else {
|
40
|
+
baseUrl = `--base-url http://localhost:${devServerPort}/`;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
if (!baseUrl) {
|
45
|
+
console.log("No dev server running, running tests served from `dist`, make sure it is up to date");
|
46
|
+
}
|
47
|
+
|
48
|
+
// add single spec parameter if passed
|
49
|
+
let spec = "";
|
50
|
+
if (process.argv.length === 3) {
|
51
|
+
const specFile = process.argv[2];
|
52
|
+
spec = `--spec ${specFile}`;
|
53
|
+
}
|
54
|
+
|
55
|
+
// more parameters - pass them to wdio
|
56
|
+
let restParams = "";
|
57
|
+
if (process.argv.length > 3) {
|
58
|
+
restParams = process.argv.slice(2).join(" ");
|
59
|
+
}
|
60
|
+
|
61
|
+
let wdioConfig = "";
|
62
|
+
if (fs.existsSync("config/wdio.conf.cjs")) {
|
63
|
+
wdioConfig = "config/wdio.conf.cjs";
|
64
|
+
} else if (fs.existsSync("config/wdio.conf.js")) {
|
65
|
+
wdioConfig = "config/wdio.conf.js";
|
66
|
+
}
|
67
|
+
|
68
|
+
// run wdio with calculated parameters
|
69
|
+
const cmd = `yarn cross-env WDIO_LOG_LEVEL=error wdio ${wdioConfig} ${spec} ${baseUrl} ${restParams}`;
|
70
|
+
console.log(`executing: ${cmd}`);
|
71
|
+
child_process.execSync(cmd, {stdio: 'inherit'});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ui5/webcomponents-tools",
|
3
|
-
"version": "0.0.0-
|
3
|
+
"version": "0.0.0-d473b9686",
|
4
4
|
"description": "UI5 Web Components: webcomponents.tools",
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
6
6
|
"license": "Apache-2.0",
|
@@ -13,8 +13,7 @@
|
|
13
13
|
"scripts": {},
|
14
14
|
"bin": {
|
15
15
|
"wc-dev": "bin/dev.js",
|
16
|
-
"wc-create-ui5-element": "bin/create-ui5-element.js"
|
17
|
-
"wc-init-ui5-package": "bin/init-ui5-package.js"
|
16
|
+
"wc-create-ui5-element": "bin/create-ui5-element.js"
|
18
17
|
},
|
19
18
|
"repository": {
|
20
19
|
"type": "git",
|
@@ -22,61 +21,63 @@
|
|
22
21
|
"directory": "packages/tools"
|
23
22
|
},
|
24
23
|
"dependencies": {
|
25
|
-
"@
|
26
|
-
"@
|
27
|
-
"@
|
28
|
-
"@
|
29
|
-
"@wdio/
|
30
|
-
"@wdio/
|
31
|
-
"@wdio/
|
32
|
-
"@wdio/
|
33
|
-
"@wdio/
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"chai": "^4.
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
24
|
+
"@custom-elements-manifest/analyzer": "^0.8.4",
|
25
|
+
"@typescript-eslint/eslint-plugin": "^6.9.0",
|
26
|
+
"@typescript-eslint/parser": "^6.9.0",
|
27
|
+
"@wdio/cli": "^7.19.7",
|
28
|
+
"@wdio/dot-reporter": "^7.19.7",
|
29
|
+
"@wdio/local-runner": "^7.19.7",
|
30
|
+
"@wdio/mocha-framework": "^7.19.7",
|
31
|
+
"@wdio/spec-reporter": "^7.19.7",
|
32
|
+
"@wdio/static-server-service": "^7.19.5",
|
33
|
+
"ajv": "^8.12.0",
|
34
|
+
"cem-plugin-vs-code-custom-data-generator": "^1.4.2",
|
35
|
+
"chai": "^4.3.4",
|
36
|
+
"child_process": "^1.0.2",
|
37
|
+
"chokidar": "^3.5.1",
|
38
|
+
"chokidar-cli": "^3.0.0",
|
40
39
|
"command-line-args": "^5.1.1",
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"cross-env": "^
|
44
|
-
"
|
45
|
-
"escodegen": "^
|
46
|
-
"eslint": "^
|
47
|
-
"eslint-config-airbnb-base": "^
|
48
|
-
"eslint-plugin-import": "^2.
|
40
|
+
"comment-parser": "^1.4.0",
|
41
|
+
"concurrently": "^6.0.0",
|
42
|
+
"cross-env": "^7.0.3",
|
43
|
+
"custom-element-jet-brains-integration": "^1.4.4",
|
44
|
+
"escodegen": "^2.0.0",
|
45
|
+
"eslint": "^7.22.0",
|
46
|
+
"eslint-config-airbnb-base": "^14.2.1",
|
47
|
+
"eslint-plugin-import": "^2.22.1",
|
49
48
|
"esprima": "^4.0.1",
|
50
|
-
"getopts": "^2.
|
51
|
-
"glob": "^7.1.
|
52
|
-
"
|
53
|
-
"
|
49
|
+
"getopts": "^2.3.0",
|
50
|
+
"glob": "^7.1.6",
|
51
|
+
"glob-parent": "^6.0.2",
|
52
|
+
"globby": "^13.1.1",
|
53
|
+
"handlebars": "^4.7.7",
|
54
|
+
"is-port-reachable": "^3.1.0",
|
54
55
|
"json-beautify": "^1.1.1",
|
55
|
-
"mkdirp": "^0.
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"postcss": "^
|
59
|
-
"postcss-
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"
|
64
|
-
"rimraf": "^
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
68
|
-
"rollup-plugin-less": "^1.1.2",
|
69
|
-
"rollup-plugin-livereload": "^1.0.4",
|
70
|
-
"rollup-plugin-node-resolve": "^4.0.0",
|
71
|
-
"rollup-plugin-notify": "^1.1.0",
|
72
|
-
"rollup-plugin-string": "^2.0.2",
|
73
|
-
"rollup-plugin-terser": "^5.1.3",
|
74
|
-
"rollup-plugin-url": "^2.2.0",
|
75
|
-
"rollup-plugin-visualizer": "^0.9.2",
|
76
|
-
"serve": "^10.1.1",
|
77
|
-
"wdio-chromedriver-service": "^5.0.2"
|
56
|
+
"mkdirp": "^1.0.4",
|
57
|
+
"nps": "^5.10.0",
|
58
|
+
"postcss": "^8.4.5",
|
59
|
+
"postcss-cli": "^9.1.0",
|
60
|
+
"postcss-selector-parser": "^6.0.10",
|
61
|
+
"prompts": "^2.4.2",
|
62
|
+
"properties-reader": "^2.2.0",
|
63
|
+
"recursive-readdir": "^2.2.2",
|
64
|
+
"resolve": "^1.20.0",
|
65
|
+
"rimraf": "^3.0.2",
|
66
|
+
"slash": "3.0.0",
|
67
|
+
"vite": "^4.4.9",
|
68
|
+
"wdio-chromedriver-service": "^7.3.2"
|
78
69
|
},
|
79
|
-
"
|
80
|
-
"
|
70
|
+
"peerDependencies": {
|
71
|
+
"chromedriver": "*",
|
72
|
+
"typescript": "^4.9.4"
|
73
|
+
},
|
74
|
+
"peerDependenciesMeta": {
|
75
|
+
"typescript": {
|
76
|
+
"optional": true
|
77
|
+
}
|
78
|
+
},
|
79
|
+
"devDependencies": {
|
80
|
+
"esbuild": "^0.19.9",
|
81
|
+
"yargs": "^17.5.1"
|
81
82
|
}
|
82
83
|
}
|
package/bin/init-ui5-package.js
DELETED