@qooxdoo/framework 7.1.0 → 7.1.1
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 +3 -0
- package/Manifest.json +22 -22
- package/lib/compiler/compile-info.json +83 -83
- package/lib/compiler/index.js +422 -356
- package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
- package/lib/resource/qx/tool/schema/compile-1-0-0.json +11 -1
- package/npm-shrinkwrap.json +11471 -562
- package/package.json +4 -3
- package/source/class/qx/event/handler/Focus.js +1 -1
- package/source/class/qx/theme/iconfont/LoadMaterialIcons.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsOutlined.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsRound.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsSharp.js +4 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsTwoTone.js +4 -4
- package/source/class/qx/theme/tangible/ColorEngine.js +3 -3
- package/source/class/qx/theme/tangible/Decoration.js +3 -3
- package/source/class/qx/tool/cli/commands/Compile.js +10 -2
- package/source/class/qx/tool/cli/commands/Lint.js +14 -13
- package/source/class/qx/tool/compiler/Es6ify.js +7 -4
- package/source/class/qx/tool/compiler/app/Application.js +14 -0
- package/source/class/qx/tool/compiler/targets/Target.js +6 -5
- package/source/class/qx/tool/compiler/targets/meta/Browserify.js +73 -31
- package/source/class/qx/tool/utils/Json.js +1 -1
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/{materialicons-v70.ttf → materialicons-v126.ttf} +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v126.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v100.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v101.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff2 +0 -0
- package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +1 -2
- package/source/resource/qx/tool/schema/compile-1-0-0.json +11 -1
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialicons-v70.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined-v38.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround-v37.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp-v38.woff2 +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.eot +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.otf +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone-v36.woff2 +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qooxdoo/framework",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"description": "The JS Framework for Coders",
|
|
5
5
|
"author": "The qooxdoo project",
|
|
6
6
|
"keywords": [
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"bin/deploy"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@babel/core": "^7.
|
|
54
|
+
"@babel/core": "^7.17.10",
|
|
55
55
|
"@babel/eslint-parser": "^7.16.3",
|
|
56
56
|
"@babel/generator": "^7.12.11",
|
|
57
57
|
"@babel/parser": "^7.12.11",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@babel/plugin-syntax-jsx": "^7.16.7",
|
|
61
61
|
"@babel/plugin-transform-block-scoping": "^7.12.12",
|
|
62
62
|
"@babel/plugin-transform-react-jsx": "^7.12.12",
|
|
63
|
-
"@babel/preset-env": "^7.
|
|
63
|
+
"@babel/preset-env": "^7.17.10",
|
|
64
64
|
"@babel/preset-react": "^7.12.10",
|
|
65
65
|
"@babel/preset-typescript": "^7.12.7",
|
|
66
66
|
"@babel/traverse": "^7.12.12",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"ajv": "^8.8.1",
|
|
74
74
|
"app-module-path": "^2.2.0",
|
|
75
75
|
"async": "^2.6.3",
|
|
76
|
+
"babelify": "^10.0.0",
|
|
76
77
|
"better-ajv-errors": "^1.1.1",
|
|
77
78
|
"browserify": "^17.0.0",
|
|
78
79
|
"chokidar": "^3.5.1",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
* A dummy class to trigger the compiler to copy the MaterialIcons font files
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
|
-
* @asset(qx/iconfont/MaterialIcons/materialicons-
|
|
24
|
-
* @asset(qx/iconfont/MaterialIcons/materialicons-
|
|
25
|
-
* @asset(qx/iconfont/MaterialIcons/materialicons-
|
|
26
|
-
* @asset(qx/iconfont/MaterialIcons/materialicons-
|
|
23
|
+
* @asset(qx/iconfont/MaterialIcons/materialicons-v126.ttf)
|
|
24
|
+
* @asset(qx/iconfont/MaterialIcons/materialicons-v126.woff2)
|
|
25
|
+
* @asset(qx/iconfont/MaterialIcons/materialicons-v126.woff)
|
|
26
|
+
* @asset(qx/iconfont/MaterialIcons/materialicons-v126.eot)
|
|
27
27
|
*/
|
|
28
28
|
qx.Class.define("qx.theme.iconfont.LoadMaterialIcons", {});
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
* A dummy class to trigger the compiler to copy the MaterialIconsOutlined font files
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-
|
|
24
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-
|
|
25
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-
|
|
26
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-
|
|
23
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v101.otf)
|
|
24
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff2)
|
|
25
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v101.woff)
|
|
26
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconsoutlined-v101.eot)
|
|
27
27
|
*/
|
|
28
28
|
qx.Class.define("qx.theme.iconfont.LoadMaterialIconsOutlined", {});
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
* A dummy class to trigger the compiler to copy the MaterialIconsRound font files
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconsround-
|
|
24
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconsround-
|
|
25
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconsround-
|
|
26
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconsround-
|
|
23
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconsround-v100.otf)
|
|
24
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconsround-v100.woff2)
|
|
25
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconsround-v100.woff)
|
|
26
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconsround-v100.eot)
|
|
27
27
|
*/
|
|
28
28
|
qx.Class.define("qx.theme.iconfont.LoadMaterialIconsRound", {});
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
* A dummy class to trigger the compiler to copy the MaterialIconsSharpe font files
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconssharp-
|
|
24
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconssharp-
|
|
25
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconssharp-
|
|
26
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconssharp-
|
|
23
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconssharp-v101.otf)
|
|
24
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconssharp-v101.woff2)
|
|
25
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconssharp-v101.woff)
|
|
26
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconssharp-v101.eot)
|
|
27
27
|
*/
|
|
28
28
|
qx.Class.define("qx.theme.iconfont.LoadMaterialIconsSharp", {});
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
* A dummy class to trigger the compiler to copy the MaterialIconsTwoTone font files
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconstwotone-
|
|
24
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconstwotone-
|
|
25
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconstwotone-
|
|
26
|
-
* @asset(qx/iconfont/MaterialIcons/materialiconstwotone-
|
|
23
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v104.otf)
|
|
24
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff2)
|
|
25
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v104.woff)
|
|
26
|
+
* @asset(qx/iconfont/MaterialIcons/materialiconstwotone-v104.eot)
|
|
27
27
|
*/
|
|
28
28
|
qx.Class.define("qx.theme.iconfont.LoadMaterialIconsTwoTone", {});
|
|
@@ -87,7 +87,7 @@ var helper = {
|
|
|
87
87
|
var color = d[0];
|
|
88
88
|
var state = d[1];
|
|
89
89
|
switch (state) {
|
|
90
|
-
case "
|
|
90
|
+
case "focused":
|
|
91
91
|
return qx.util.ColorUtil.scale(color, {
|
|
92
92
|
lightness: 10,
|
|
93
93
|
saturation: 10
|
|
@@ -159,10 +159,10 @@ qx.Theme.define("qx.theme.tangible.ColorEngine", {
|
|
|
159
159
|
"text-on-error": helper.onX,
|
|
160
160
|
"primary-hovered": helper.xState,
|
|
161
161
|
"primary-disabled": helper.xState,
|
|
162
|
-
"primary-
|
|
162
|
+
"primary-focused": helper.xState,
|
|
163
163
|
"primary-selected": helper.xState,
|
|
164
164
|
"primary-selected_disabled": helper.xState,
|
|
165
|
-
"error-
|
|
165
|
+
"error-focused": helper.xState,
|
|
166
166
|
|
|
167
167
|
// alpha colors
|
|
168
168
|
"primary-alpha-5": helper.setAlpha,
|
|
@@ -40,7 +40,7 @@ qx.Theme.define("qx.theme.tangible.Decoration", {
|
|
|
40
40
|
include: "material-textfield",
|
|
41
41
|
style: {
|
|
42
42
|
widthBottom: 2,
|
|
43
|
-
colorBottom: "primary-
|
|
43
|
+
colorBottom: "primary-focused"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
|
|
@@ -56,7 +56,7 @@ qx.Theme.define("qx.theme.tangible.Decoration", {
|
|
|
56
56
|
include: "material-textfield",
|
|
57
57
|
style: {
|
|
58
58
|
widthBottom: 2,
|
|
59
|
-
colorBottom: "error-
|
|
59
|
+
colorBottom: "error-focused"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
|
|
@@ -287,7 +287,7 @@ qx.Theme.define("qx.theme.tangible.Decoration", {
|
|
|
287
287
|
"button-box-pressed": {
|
|
288
288
|
include: "button-box",
|
|
289
289
|
|
|
290
|
-
style: { backgroundColor: "primary-
|
|
290
|
+
style: { backgroundColor: "primary-focused" }
|
|
291
291
|
},
|
|
292
292
|
|
|
293
293
|
"button-box-pressed-hovered": {
|
|
@@ -359,7 +359,10 @@ qx.Class.define("qx.tool.cli.commands.Compile", {
|
|
|
359
359
|
this.argv["feedback"] = configDb.db("qx.default.feedback", true);
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
-
|
|
362
|
+
// Validate compile.json against the schema
|
|
363
|
+
await qx.tool.config.Compile.getInstance().load();
|
|
364
|
+
|
|
365
|
+
if (this.argv.verbose) {
|
|
363
366
|
console.log(`
|
|
364
367
|
Compiler: v${this.getCompilerVersion()} in ${require.main.filename}
|
|
365
368
|
Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
|
|
@@ -1204,7 +1207,8 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
|
|
|
1204
1207
|
"loaderTemplate",
|
|
1205
1208
|
"publish",
|
|
1206
1209
|
"deploy",
|
|
1207
|
-
"standalone"
|
|
1210
|
+
"standalone",
|
|
1211
|
+
"localModules"
|
|
1208
1212
|
].forEach(name => {
|
|
1209
1213
|
if (appConfig[name] !== undefined) {
|
|
1210
1214
|
var fname = "set" + qx.lang.String.firstUp(name);
|
|
@@ -1226,6 +1230,10 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
|
|
|
1226
1230
|
app.setDescription(appConfig.description);
|
|
1227
1231
|
}
|
|
1228
1232
|
|
|
1233
|
+
if (appConfig.localModules) {
|
|
1234
|
+
app.setLocalModules(appConfig.localModules);
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1229
1237
|
var parts = appConfig.parts || targetConfig.parts || data.parts;
|
|
1230
1238
|
if (parts) {
|
|
1231
1239
|
if (!parts.boot) {
|
|
@@ -95,7 +95,16 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
|
|
|
95
95
|
|
|
96
96
|
members: {
|
|
97
97
|
async process() {
|
|
98
|
-
|
|
98
|
+
|
|
99
|
+
let files = this.argv.files || [];
|
|
100
|
+
if (files.length === 0) {
|
|
101
|
+
files.push("source/class/**/*.js");
|
|
102
|
+
}
|
|
103
|
+
for (let i = 0; i < files.length; i++) {
|
|
104
|
+
files[i] = path.join(process.cwd(), files[i]);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
await this.__applyFixes(files);
|
|
99
108
|
|
|
100
109
|
let helperFilePath = require.main.path;
|
|
101
110
|
while (true) {
|
|
@@ -134,13 +143,6 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
|
|
|
134
143
|
fix: this.argv.fix
|
|
135
144
|
});
|
|
136
145
|
|
|
137
|
-
let files = this.argv.files || [];
|
|
138
|
-
if (files.length === 0) {
|
|
139
|
-
files.push("source/class/**/*.js");
|
|
140
|
-
}
|
|
141
|
-
for (let i = 0; i < files.length; i++) {
|
|
142
|
-
files[i] = path.join(process.cwd(), files[i]);
|
|
143
|
-
}
|
|
144
146
|
if (this.argv.printConfig) {
|
|
145
147
|
const fileConfig = await linter.calculateConfigForFile(files[0]);
|
|
146
148
|
qx.tool.compiler.Console.info(JSON.stringify(fileConfig, null, " "));
|
|
@@ -230,19 +232,18 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
|
|
|
230
232
|
* @return {Promise<void>}
|
|
231
233
|
* @private
|
|
232
234
|
*/
|
|
233
|
-
async __applyFixes() {
|
|
235
|
+
async __applyFixes(files) {
|
|
234
236
|
const fixParams = this.argv.fixJsdocParams;
|
|
235
237
|
if (fixParams && fixParams !== "off") {
|
|
236
|
-
let replaceInFiles = [];
|
|
237
238
|
const regex =
|
|
238
239
|
fixParams === "type-first"
|
|
239
240
|
? /@param\s+([\w$]+)\s+({[\w|[\]{}<>?. ]+})/g
|
|
240
241
|
: /@param\s+({[\w|[\]{}<>?. ]+})\s+([\w$]+)/g;
|
|
241
|
-
replaceInFiles
|
|
242
|
-
files:
|
|
242
|
+
let replaceInFiles = {
|
|
243
|
+
files: files,
|
|
243
244
|
from: regex,
|
|
244
245
|
to: "@param $2 $1"
|
|
245
|
-
}
|
|
246
|
+
};
|
|
246
247
|
|
|
247
248
|
await replaceInFile(replaceInFiles);
|
|
248
249
|
}
|
|
@@ -106,6 +106,7 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
|
|
|
106
106
|
construct(filename) {
|
|
107
107
|
super();
|
|
108
108
|
this.__filename = filename;
|
|
109
|
+
this.__knownApiFunctions = ["addListener","addListenerOnce"];
|
|
109
110
|
},
|
|
110
111
|
|
|
111
112
|
properties: {
|
|
@@ -125,6 +126,7 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
|
|
|
125
126
|
|
|
126
127
|
members: {
|
|
127
128
|
__filename: null,
|
|
129
|
+
__knownApiFunctions: null,
|
|
128
130
|
|
|
129
131
|
async transform() {
|
|
130
132
|
let src = await fs.promises.readFile(this.__filename, "utf8");
|
|
@@ -275,6 +277,7 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
|
|
|
275
277
|
let t = this;
|
|
276
278
|
const isTest = this.__filename.indexOf("/test/") > -1;
|
|
277
279
|
let arrowFunctions = this.getArrowFunctions();
|
|
280
|
+
let knownApiFunctions = this.__knownApiFunctions;
|
|
278
281
|
|
|
279
282
|
return {
|
|
280
283
|
visitor: {
|
|
@@ -282,13 +285,13 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
|
|
|
282
285
|
if (path.node.callee.type == "MemberExpression") {
|
|
283
286
|
let callee = collapseMemberExpression(path.node.callee);
|
|
284
287
|
if (arrowFunctions == "careful") {
|
|
285
|
-
if (!callee.endsWith(".
|
|
288
|
+
if (!knownApiFunctions.some(fName => callee.endsWith("."+fName))) {
|
|
286
289
|
return;
|
|
287
290
|
}
|
|
288
291
|
if (
|
|
289
292
|
path.node.arguments.length != 3 ||
|
|
290
293
|
path.node.arguments[0].type != "StringLiteral" ||
|
|
291
|
-
path.node.arguments[1].type != "
|
|
294
|
+
path.node.arguments[1].type != "FunctionExpression" ||
|
|
292
295
|
path.node.arguments[2].type != "ThisExpression"
|
|
293
296
|
) {
|
|
294
297
|
return;
|
|
@@ -324,14 +327,14 @@ qx.Class.define("qx.tool.compiler.Es6ify", {
|
|
|
324
327
|
* @returns
|
|
325
328
|
*/
|
|
326
329
|
__pluginRemoveUnnecessaryThis() {
|
|
330
|
+
let knownApiFunctions = this.__knownApiFunctions;
|
|
327
331
|
return {
|
|
328
332
|
visitor: {
|
|
329
333
|
CallExpression(path) {
|
|
330
334
|
if (
|
|
331
335
|
path.node.callee.type == "MemberExpression" &&
|
|
332
|
-
path.node.callee.object.type == "ThisExpression" &&
|
|
333
336
|
path.node.callee.property.type == "Identifier" &&
|
|
334
|
-
path.node.callee.property.name
|
|
337
|
+
knownApiFunctions.includes(path.node.callee.property.name) &&
|
|
335
338
|
path.node.arguments.length == 3 &&
|
|
336
339
|
path.node.arguments[0].type == "StringLiteral" &&
|
|
337
340
|
path.node.arguments[1].type == "ArrowFunctionExpression" &&
|
|
@@ -217,6 +217,20 @@ qx.Class.define("qx.tool.compiler.app.Application", {
|
|
|
217
217
|
writeIndexHtmlToRoot: {
|
|
218
218
|
init: false,
|
|
219
219
|
check: "Boolean"
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Map specifying local modules to include in the build. Local modules are
|
|
224
|
+
* always included in the compiled output, regardless of application type
|
|
225
|
+
* (node, browser, etc.). Each member of the map has a key that is the
|
|
226
|
+
* name of the module to be `require`d in code. The value is the path to
|
|
227
|
+
* the module to be included. The path must begin with "./", and is
|
|
228
|
+
* relative to the directory containing compile.json. The module may be
|
|
229
|
+
* either a CommonJS module or an ES6 module.
|
|
230
|
+
*/
|
|
231
|
+
localModules : {
|
|
232
|
+
init : null,
|
|
233
|
+
check : "Object"
|
|
220
234
|
}
|
|
221
235
|
},
|
|
222
236
|
|
|
@@ -432,11 +432,12 @@ qx.Class.define("qx.tool.compiler.targets.Target", {
|
|
|
432
432
|
new qx.tool.compiler.targets.meta.PolyfillJs(appMeta)
|
|
433
433
|
);
|
|
434
434
|
|
|
435
|
-
// Add browserified CommonJS modules, if any
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
435
|
+
// Add browserified CommonJS modules, if any. The Browserify
|
|
436
|
+
// class will always bundle local modules specified for an
|
|
437
|
+
// application in compile.json, but will not bundle `require()`d
|
|
438
|
+
// modules that are Node modules.
|
|
439
|
+
bootPackage.addJavascriptMeta(
|
|
440
|
+
new qx.tool.compiler.targets.meta.Browserify(appMeta));
|
|
440
441
|
|
|
441
442
|
/*
|
|
442
443
|
* Assemble the Parts
|
|
@@ -24,7 +24,7 @@ const fs = qx.tool.utils.Promisify.fs;
|
|
|
24
24
|
const path = require("upath");
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
*
|
|
28
28
|
*/
|
|
29
29
|
qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
|
|
30
30
|
extend: qx.tool.compiler.targets.meta.AbstractJavascriptMeta,
|
|
@@ -45,35 +45,52 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
|
|
|
45
45
|
let hasCommonjsModules = false;
|
|
46
46
|
let commonjsModules = new Set();
|
|
47
47
|
let references = {};
|
|
48
|
+
const localModules =
|
|
49
|
+
this.__appMeta.getApplication().getLocalModules() || {};
|
|
48
50
|
const db = this.__appMeta.getAnalyser().getDatabase();
|
|
49
51
|
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
52
|
+
// Only include discovered `require()`d Node modules if the
|
|
53
|
+
// target application type is browser.
|
|
54
|
+
if (this.__appMeta.getEnvironmentValue("qx.compiler.applicationType") ==
|
|
55
|
+
"browser") {
|
|
56
|
+
|
|
57
|
+
// Get a Set of unique `require`d CommonJS module names from
|
|
58
|
+
// all classes
|
|
59
|
+
for (let className in db.classInfo) {
|
|
60
|
+
let classInfo = db.classInfo[className];
|
|
61
|
+
if (classInfo.commonjsModules) {
|
|
62
|
+
Object.keys(classInfo.commonjsModules).forEach(
|
|
63
|
+
moduleName =>
|
|
64
|
+
{
|
|
65
|
+
// Ignore this found `require()` if its a local modules
|
|
66
|
+
if (moduleName in localModules) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Add this module name to the set of module names
|
|
71
|
+
commonjsModules.add(moduleName);
|
|
72
|
+
|
|
73
|
+
// Add the list of references from which this module was require()d
|
|
74
|
+
if (! references[moduleName]) {
|
|
75
|
+
references[moduleName] = new Set();
|
|
76
|
+
}
|
|
77
|
+
references[moduleName].add([ ...classInfo.commonjsModules[moduleName] ]);
|
|
78
|
+
|
|
79
|
+
// There is at least one module
|
|
80
|
+
hasCommonjsModules = true;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
69
83
|
}
|
|
70
84
|
}
|
|
71
85
|
|
|
72
|
-
// If there are any CommonJS modules required,
|
|
73
|
-
|
|
86
|
+
// If there are any CommonJS modules required to be bundled, or
|
|
87
|
+
// any local modules specified for the application in
|
|
88
|
+
// compile.json, browserify them
|
|
89
|
+
if (hasCommonjsModules || localModules) {
|
|
74
90
|
await this.__browserify(
|
|
75
91
|
commonjsModules,
|
|
76
92
|
references,
|
|
93
|
+
localModules,
|
|
77
94
|
ws
|
|
78
95
|
);
|
|
79
96
|
}
|
|
@@ -83,8 +100,9 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
|
|
|
83
100
|
});
|
|
84
101
|
},
|
|
85
102
|
|
|
86
|
-
async __browserify(commonjsModules, references, ws) {
|
|
87
|
-
|
|
103
|
+
async __browserify(commonjsModules, references, localModules, ws) {
|
|
104
|
+
const babelify = require("babelify");
|
|
105
|
+
const preset = require("@babel/preset-env");
|
|
88
106
|
const browserify = require("browserify");
|
|
89
107
|
const builtins = require("browserify/lib/builtins.js");
|
|
90
108
|
|
|
@@ -97,7 +115,7 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
|
|
|
97
115
|
|
|
98
116
|
return new Promise(resolve =>
|
|
99
117
|
{
|
|
100
|
-
b = browserify(
|
|
118
|
+
let b = browserify(
|
|
101
119
|
[],
|
|
102
120
|
{
|
|
103
121
|
builtins : builtins,
|
|
@@ -106,20 +124,44 @@ qx.Class.define("qx.tool.compiler.targets.meta.Browserify", {
|
|
|
106
124
|
detectGlobals : true
|
|
107
125
|
});
|
|
108
126
|
b._mdeps.on("missing", (id, parent) => {
|
|
109
|
-
|
|
127
|
+
let message = [];
|
|
110
128
|
|
|
111
|
-
|
|
112
|
-
|
|
129
|
+
message.push(`ERROR: could not locate require()d module: "${id}"`);
|
|
130
|
+
message.push(" required from:");
|
|
131
|
+
|
|
132
|
+
try {
|
|
113
133
|
[ ...references[id] ].forEach(refs => {
|
|
114
134
|
refs.forEach(ref =>
|
|
115
135
|
{
|
|
116
136
|
message.push(` ${ref}`);
|
|
117
137
|
});
|
|
118
138
|
});
|
|
139
|
+
} catch(e) {
|
|
140
|
+
message.push(` <compile.json:application.localModules'>`);
|
|
141
|
+
}
|
|
119
142
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
143
|
+
qx.tool.compiler.Console.error(message.join("\n"));
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// Include any dynamically determined `require()`d modules
|
|
147
|
+
if (commonjsModules.length > 0) {
|
|
148
|
+
b.require(commonjsModules);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Include any local modules specified for the application
|
|
152
|
+
// in compile.json
|
|
153
|
+
if (localModules) {
|
|
154
|
+
for (let requireName in localModules) {
|
|
155
|
+
b.require(localModules[requireName], { expose : requireName });
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Ensure ES6 local modules are converted to CommonJS format
|
|
160
|
+
b.transform(babelify, {
|
|
161
|
+
presets: [preset],
|
|
162
|
+
sourceMaps: false,
|
|
163
|
+
global: true
|
|
164
|
+
});
|
|
123
165
|
b.bundle((e, output) => {
|
|
124
166
|
if (e) {
|
|
125
167
|
// We've already handled the case of missing module. This is something else.
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* *********************************************************************** */
|
|
24
24
|
|
|
25
25
|
const Ajv = require("ajv");
|
|
26
|
-
const betterAjvErrors = require("better-ajv-errors");
|
|
26
|
+
const betterAjvErrors = require("better-ajv-errors").default;
|
|
27
27
|
const fs = qx.tool.utils.Promisify.fs;
|
|
28
28
|
|
|
29
29
|
qx.Class.define("qx.tool.utils.Json", {
|
|
Binary file
|
package/source/resource/qx/iconfont/MaterialIcons/{materialicons-v70.ttf → materialicons-v126.ttf}
RENAMED
|
Binary file
|
|
Binary file
|
|
@@ -91,7 +91,6 @@ qx.$$createdAt = function(obj, filename, lineNumber, column) {
|
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
var isWebkit = /AppleWebKit\/([^ ]+)/.test(navigator.userAgent);
|
|
94
|
-
var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
95
94
|
var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
|
|
96
95
|
|
|
97
96
|
qx.$$loader = {
|
|
@@ -103,7 +102,7 @@ qx.$$loader = {
|
|
|
103
102
|
closureParts : %{ClosureParts},
|
|
104
103
|
bootIsInline : %{BootIsInline},
|
|
105
104
|
addNoCacheParam : %{NoCacheParam},
|
|
106
|
-
isLoadParallel: !
|
|
105
|
+
isLoadParallel: !isIE11 && 'async' in document.createElement('script'),
|
|
107
106
|
delayDefer: false,
|
|
108
107
|
splashscreen: window.QOOXDOO_SPLASH_SCREEN || null,
|
|
109
108
|
isLoadChunked: false,
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"minItems": 1,
|
|
54
54
|
"items": {
|
|
55
55
|
"type": "object",
|
|
56
|
-
"additionalItems": false,
|
|
57
56
|
"required": [
|
|
58
57
|
"class",
|
|
59
58
|
"name"
|
|
60
59
|
],
|
|
60
|
+
"additionalProperties": false,
|
|
61
61
|
"properties": {
|
|
62
62
|
"class" : {
|
|
63
63
|
"description": "The class name of the main application class (it typically inherits from `qx.application.Standalone` for web applications)",
|
|
@@ -105,6 +105,10 @@
|
|
|
105
105
|
"type": "boolean",
|
|
106
106
|
"default": true
|
|
107
107
|
},
|
|
108
|
+
"default": {
|
|
109
|
+
"description": "This browser application is written into the root of the target dir. If not set the first application is used instead",
|
|
110
|
+
"type": "boolean"
|
|
111
|
+
},
|
|
108
112
|
"standalone": {
|
|
109
113
|
"description": "Whether this application can be opened in a browser on its own (true) or is part of a different application (false)",
|
|
110
114
|
"type": "boolean",
|
|
@@ -168,6 +172,12 @@
|
|
|
168
172
|
},
|
|
169
173
|
"parts": {
|
|
170
174
|
"$ref": "#/properties/parts"
|
|
175
|
+
},
|
|
176
|
+
"localModules": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"additionalProperties": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
}
|
|
171
181
|
}
|
|
172
182
|
}
|
|
173
183
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|