@qooxdoo/framework 7.0.0-beta.2 → 7.0.0-beta.6
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 +12 -0
- package/Manifest.json +2 -3
- package/README.md +7 -3
- package/bin/deploy/qx +0 -0
- package/lib/compiler/compile-info.json +44 -45
- package/lib/compiler/index.js +1971 -8371
- package/lib/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +3 -1
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css +1 -1
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -1
- package/lib/resource/qx/tool/cli/templates/template_vars.js +1 -1
- package/lib/resource/qx/tool/loadsass.js +6 -12
- package/lib/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
- package/lib/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
- package/lib/resource/qx/tool/schema/compile-1-0-0.json +3 -7
- package/package.json +25 -12
- package/source/class/qx/io/__init__.js +5 -3
- package/source/class/qx/io/exception/Cancel.js +34 -0
- package/source/class/qx/io/exception/Exception.js +38 -0
- package/source/class/qx/{tool/compiler/Version.js → io/exception/Protocol.js} +13 -7
- package/source/class/qx/io/exception/Transport.js +39 -0
- package/source/class/qx/io/exception/__init__.js +4 -0
- package/source/class/qx/io/graphql/Client.js +112 -0
- package/source/class/qx/io/graphql/__init__.js +9 -0
- package/source/class/qx/io/graphql/protocol/Message.js +65 -0
- package/source/class/qx/io/graphql/protocol/Request.js +95 -0
- package/source/class/qx/io/graphql/protocol/Response.js +61 -0
- package/source/class/qx/io/graphql/protocol/__init__.js +6 -0
- package/source/class/qx/io/jsonrpc/Client.js +323 -0
- package/source/class/qx/io/jsonrpc/__init__.js +15 -0
- package/source/class/qx/io/jsonrpc/protocol/Batch.js +97 -0
- package/source/class/qx/io/jsonrpc/protocol/Error.js +63 -0
- package/source/class/qx/io/jsonrpc/protocol/Message.js +48 -0
- package/source/class/qx/io/jsonrpc/protocol/Notification.js +45 -0
- package/source/class/qx/io/jsonrpc/protocol/Parser.js +81 -0
- package/source/class/qx/io/jsonrpc/protocol/Request.js +93 -0
- package/source/class/qx/io/jsonrpc/protocol/Result.js +48 -0
- package/source/class/qx/io/jsonrpc/protocol/__init__.js +5 -0
- package/source/class/qx/io/request/authentication/Bearer.js +52 -0
- package/source/class/qx/io/transport/AbstractClient.js +100 -0
- package/source/class/qx/io/transport/AbstractTransport.js +41 -0
- package/source/class/qx/io/transport/Fetch.js +95 -0
- package/source/class/qx/io/transport/ITransport.js +40 -0
- package/source/class/qx/io/transport/PostMessage.js +55 -0
- package/source/class/qx/io/transport/Websocket.js +97 -0
- package/source/class/qx/io/transport/Xhr.js +139 -0
- package/source/class/qx/io/transport/__init__.js +18 -0
- package/source/class/qx/test/io/MAssert.js +46 -0
- package/source/class/qx/test/io/graphql/Client.js +169 -0
- package/source/class/qx/test/io/graphql/ClientFetch.js +34 -0
- package/source/class/qx/test/io/graphql/Request.js +42 -0
- package/source/class/qx/test/io/jsonrpc/Client.js +267 -0
- package/source/class/qx/test/io/jsonrpc/Protocol.js +80 -0
- package/source/class/qx/test/io/transport/PostMessage.js +56 -0
- package/source/class/qx/test/io/transport/Websocket.js +63 -0
- package/source/class/qx/test/ui/embed/Iframe.js +1 -0
- package/source/class/qx/test/ui/form/ComboBox.js +0 -42
- package/source/class/qx/test/util/DateFormat.js +45 -6
- package/source/class/qx/theme/manager/Decoration.js +0 -0
- package/source/class/qx/theme/tangible/ColorDark.js +0 -0
- package/source/class/qx/tool/cli/Cli.js +5 -3
- package/source/class/qx/tool/cli/api/CompilerApi.js +15 -5
- package/source/class/qx/tool/cli/commands/Command.js +7 -0
- package/source/class/qx/tool/cli/commands/Compile.js +4 -4
- package/source/class/qx/tool/cli/commands/Lint.js +30 -11
- package/source/class/qx/tool/cli/commands/Package.js +1 -2
- package/source/class/qx/tool/cli/commands/package/Publish.js +33 -10
- package/source/class/qx/tool/compiler/Analyser.js +21 -22
- package/source/class/qx/tool/compiler/app/WebFont.js +1 -1
- package/source/class/qx/tool/compiler/makers/AppMaker.js +15 -14
- package/source/class/qx/tool/compiler/targets/Target.js +2 -1
- package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +1 -2
- package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +17 -9
- package/source/class/qx/tool/config/Abstract.js +3 -3
- package/source/class/qx/tool/config/Utils.js +10 -1
- package/source/class/qx/tool/utils/Json.js +1 -1
- package/source/class/qx/ui/container/SlideBar.js +3 -0
- package/source/class/qx/ui/core/Widget.js +70 -0
- package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -0
- package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -0
- package/source/class/qx/ui/form/AbstractSelectBox.js +38 -6
- package/source/class/qx/ui/form/Button.js +3 -0
- package/source/class/qx/ui/form/CheckBox.js +25 -1
- package/source/class/qx/ui/form/ComboBox.js +41 -27
- package/source/class/qx/ui/form/DateField.js +16 -1
- package/source/class/qx/ui/form/List.js +3 -0
- package/source/class/qx/ui/form/MenuButton.js +28 -2
- package/source/class/qx/ui/form/RadioButton.js +7 -0
- package/source/class/qx/ui/form/RadioButtonGroup.js +3 -0
- package/source/class/qx/ui/form/RadioGroup.js +19 -0
- package/source/class/qx/ui/form/SelectBox.js +28 -1
- package/source/class/qx/ui/form/Slider.js +15 -0
- package/source/class/qx/ui/form/SplitButton.js +3 -0
- package/source/class/qx/ui/form/ToggleButton.js +8 -0
- package/source/class/qx/ui/menu/AbstractButton.js +28 -0
- package/source/class/qx/ui/menu/Button.js +3 -0
- package/source/class/qx/ui/menu/CheckBox.js +8 -0
- package/source/class/qx/ui/menu/Manager.js +2 -0
- package/source/class/qx/ui/menu/Menu.js +74 -2
- package/source/class/qx/ui/menu/RadioButton.js +10 -1
- package/source/class/qx/ui/menubar/Button.js +0 -27
- package/source/class/qx/ui/menubar/MenuBar.js +12 -0
- package/source/class/qx/ui/splitpane/Blocker.js +3 -0
- package/source/class/qx/ui/splitpane/Pane.js +3 -0
- package/source/class/qx/ui/table/Table.js +24 -2
- package/source/class/qx/ui/table/cellrenderer/Abstract.js +3 -1
- package/source/class/qx/ui/table/cellrenderer/AbstractImage.js +7 -3
- package/source/class/qx/ui/table/headerrenderer/HeaderCell.js +3 -0
- package/source/class/qx/ui/table/pane/Header.js +3 -0
- package/source/class/qx/ui/table/pane/Model.js +10 -4
- package/source/class/qx/ui/table/pane/Scroller.js +3 -7
- package/source/class/qx/ui/table/rowrenderer/Default.js +1 -1
- package/source/class/qx/ui/tabview/Page.js +26 -0
- package/source/class/qx/ui/tabview/TabView.js +3 -0
- package/source/class/qx/ui/toolbar/Button.js +2 -27
- package/source/class/qx/ui/toolbar/CheckBox.js +0 -27
- package/source/class/qx/ui/toolbar/RadioButton.js +21 -0
- package/source/class/qx/ui/toolbar/SplitButton.js +0 -28
- package/source/class/qx/ui/toolbar/ToolBar.js +3 -0
- package/source/class/qx/ui/window/Window.js +8 -0
- package/source/class/qx/util/format/DateFormat.js +44 -17
- package/source/class/qxWeb.js +2 -0
- package/source/resource/qx/decoration/Indigo/font/JosefinSlab-SemiBold.ttf +0 -0
- package/source/resource/qx/decoration/Indigo/font/SIL Open Font License 1.1.txt +0 -0
- package/source/resource/qx/iconfont/MaterialIcons/fetch-fonts.sh +0 -0
- package/source/resource/qx/tool/bin/build-devtools +0 -0
- package/source/resource/qx/tool/bin/build-website +0 -0
- package/source/resource/qx/tool/bin/download-assets +0 -0
- package/source/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +3 -1
- package/source/resource/qx/tool/cli/templates/template_vars.js +1 -1
- package/source/resource/qx/tool/loadsass.js +6 -12
- package/source/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
- package/source/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
- package/source/resource/qx/tool/schema/compile-1-0-0.json +3 -7
- package/source/translation/hr.po +297 -0
- package/lib/resource/qx/tool/website/.gitignore +0 -2
- package/source/class/qx/io/request/auth/.gitignore +0 -0
- package/source/class/qx/test/bom/client/.gitignore +0 -0
- package/source/class/qx/test/ui/control/.gitignore +0 -0
- package/source/resource/qx/decoration/Modern/treevirtual/.gitignore +0 -0
- package/source/resource/qx/mobile/css/.gitignore +0 -3
- package/source/resource/qx/tool/website/.gitignore +0 -2
- package/source/resource/qx/website/.gitignore +0 -1
- package/source/resource/qx/website/scss/.gitignore +0 -1
|
@@ -326,7 +326,7 @@ qx.Class.define("qx.tool.cli.commands.Compile", {
|
|
|
326
326
|
|
|
327
327
|
if (this.argv.verbose) {
|
|
328
328
|
console.log(`
|
|
329
|
-
Compiler: v${
|
|
329
|
+
Compiler: v${this.getCompilerVersion()} in ${require.main.filename}
|
|
330
330
|
Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
|
|
331
331
|
}
|
|
332
332
|
|
|
@@ -571,10 +571,10 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
|
|
|
571
571
|
createMakersFromConfig: async function(data) {
|
|
572
572
|
const Console = qx.tool.compiler.Console.getInstance();
|
|
573
573
|
var t = this;
|
|
574
|
-
|
|
575
574
|
if (data.babelOptions) {
|
|
576
|
-
if (!data
|
|
577
|
-
data.
|
|
575
|
+
if (!data?.babel?.options) {
|
|
576
|
+
data.babel = data.babel || {};
|
|
577
|
+
data.babel.options = data.babelOptions;
|
|
578
578
|
qx.tool.compiler.Console.print("qx.tool.cli.compile.deprecatedBabelOptions");
|
|
579
579
|
} else {
|
|
580
580
|
qx.tool.compiler.Console.print("qx.tool.cli.compile.deprecatedBabelOptionsConflicting");
|
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
************************************************************************ */
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const {ESLint} = require("eslint");
|
|
20
20
|
const fs = qx.tool.utils.Promisify.fs;
|
|
21
|
+
const path = require("path");
|
|
21
22
|
const replaceInFile = require("replace-in-file");
|
|
22
23
|
|
|
23
24
|
qx.Class.define("qx.tool.cli.commands.Lint", {
|
|
@@ -85,12 +86,21 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
|
|
|
85
86
|
|
|
86
87
|
process: async function() {
|
|
87
88
|
await this.__applyFixes();
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
|
|
90
|
+
let helperFilePath = require.main.path;
|
|
91
|
+
while (true) {
|
|
92
|
+
if (await fs.existsAsync(path.join(helperFilePath, "node_modules"))) {
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
helperFilePath = path.dirname(helperFilePath);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
let config = await qx.tool.cli.Cli.getInstance().getParsedArgs();
|
|
90
99
|
let lintOptions = config.eslintConfig || {};
|
|
91
100
|
lintOptions.extends = lintOptions.extends || ["@qooxdoo/qx/browser"];
|
|
92
101
|
lintOptions.globals = Object.assign(lintOptions.globals || {}, await this.__addGlobals(config));
|
|
93
|
-
let linter = new
|
|
102
|
+
let linter = new ESLint({
|
|
103
|
+
cwd: helperFilePath,
|
|
94
104
|
cache: this.argv.cache || false,
|
|
95
105
|
baseConfig: lintOptions,
|
|
96
106
|
useEslintrc: this.argv.useEslintrc,
|
|
@@ -98,15 +108,24 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
|
|
|
98
108
|
});
|
|
99
109
|
let files = this.argv.files || [];
|
|
100
110
|
if (files.length === 0) {
|
|
101
|
-
files.push("source/class
|
|
111
|
+
files.push("source/class/**/*.js");
|
|
112
|
+
}
|
|
113
|
+
for (let i = 0; i < files.length; i++) {
|
|
114
|
+
files[i] = path.join(process.cwd(), files[i]);
|
|
102
115
|
}
|
|
103
|
-
if (this.argv.
|
|
104
|
-
const fileConfig = linter.
|
|
116
|
+
if (this.argv.printConfig) {
|
|
117
|
+
const fileConfig = await linter.calculateConfigForFile(files[0]);
|
|
105
118
|
qx.tool.compiler.Console.info(JSON.stringify(fileConfig, null, " "));
|
|
106
119
|
} else {
|
|
107
|
-
let report = linter.
|
|
120
|
+
let report = await linter.lintFiles(files);
|
|
121
|
+
report.errorCount = 0;
|
|
122
|
+
report.warningCount =0;
|
|
123
|
+
for (const r of report) {
|
|
124
|
+
report.errorCount += r.errorCount;
|
|
125
|
+
report.warningCount += r.warningCount;
|
|
126
|
+
}
|
|
108
127
|
if (this.argv.fix) {
|
|
109
|
-
|
|
128
|
+
await ESLint.outputFixes(report);
|
|
110
129
|
}
|
|
111
130
|
if (report.errorCount > 0 || report.warningCount > 0) {
|
|
112
131
|
let outputFormat = this.argv.format || "codeframe";
|
|
@@ -115,8 +134,8 @@ qx.Class.define("qx.tool.cli.commands.Lint", {
|
|
|
115
134
|
if (report.errorCount + report.warningCount > 150) {
|
|
116
135
|
outputFormat = "compact";
|
|
117
136
|
}
|
|
118
|
-
const formatter = linter.
|
|
119
|
-
const s = formatter(report
|
|
137
|
+
const formatter = await linter.loadFormatter(outputFormat);
|
|
138
|
+
const s = formatter.format(report);
|
|
120
139
|
if (this.argv.outputFile) {
|
|
121
140
|
if (this.argv.verbose) {
|
|
122
141
|
qx.tool.compiler.Console.info(`Report to be written to ${this.argv.outputFile}`);
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
const fs = qx.tool.utils.Promisify.fs;
|
|
19
19
|
const path = require("upath");
|
|
20
20
|
const process = require("process");
|
|
21
|
-
const jsonlint = require("jsonlint");
|
|
22
21
|
const stringify = require("json-stable-stringify");
|
|
23
22
|
|
|
24
23
|
/**
|
|
@@ -213,7 +212,7 @@ qx.Class.define("qx.tool.cli.commands.Package", {
|
|
|
213
212
|
return this.__cache;
|
|
214
213
|
}
|
|
215
214
|
try {
|
|
216
|
-
this.__cache =
|
|
215
|
+
this.__cache = JSON.parse(fs.readFileSync(this.getCachePath(), "UTF-8"));
|
|
217
216
|
} catch (e) {
|
|
218
217
|
this.__cache = {
|
|
219
218
|
repos : {
|
|
@@ -39,10 +39,8 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
39
39
|
alias : "t",
|
|
40
40
|
describe: "Set the release type",
|
|
41
41
|
nargs: 1,
|
|
42
|
-
requiresArg: true,
|
|
43
42
|
choices: "major,premajor,minor,preminor,patch,prepatch,prerelease".split(/,/),
|
|
44
|
-
type: "string"
|
|
45
|
-
default : "patch"
|
|
43
|
+
type: "string"
|
|
46
44
|
},
|
|
47
45
|
"noninteractive":{
|
|
48
46
|
alias: "I",
|
|
@@ -101,6 +99,14 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
101
99
|
};
|
|
102
100
|
}
|
|
103
101
|
},
|
|
102
|
+
events: {
|
|
103
|
+
/**
|
|
104
|
+
* Fired before commit happens. Data is an object with
|
|
105
|
+
* version: new_version,
|
|
106
|
+
* argv: this.argv
|
|
107
|
+
*/
|
|
108
|
+
"beforeCommit": "qx.event.type.Data"
|
|
109
|
+
},
|
|
104
110
|
|
|
105
111
|
members: {
|
|
106
112
|
|
|
@@ -121,7 +127,10 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
121
127
|
const argv = this.argv;
|
|
122
128
|
|
|
123
129
|
// qooxdoo version
|
|
124
|
-
let qxVersion = await this.
|
|
130
|
+
let qxVersion = await this.getQxVersion();
|
|
131
|
+
if (fs.existsSync("Manifest.json")) {
|
|
132
|
+
qxVersion = await this.getAppQxVersion();
|
|
133
|
+
}
|
|
125
134
|
if (argv.verbose) {
|
|
126
135
|
this.info(`Using qooxdoo version: ${qxVersion}`);
|
|
127
136
|
}
|
|
@@ -210,6 +219,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
210
219
|
}
|
|
211
220
|
|
|
212
221
|
// version
|
|
222
|
+
let old_version = mainManifestModel.getValue("info.version");
|
|
213
223
|
let new_version;
|
|
214
224
|
if (argv.useVersion) {
|
|
215
225
|
// use user-supplied value
|
|
@@ -220,10 +230,17 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
220
230
|
new_version = new_version.toString();
|
|
221
231
|
} else {
|
|
222
232
|
// use version number from manifest and increment it
|
|
223
|
-
let old_version = mainManifestModel.getValue("info.version");
|
|
224
233
|
if (!semver.valid(old_version)) {
|
|
225
234
|
throw new qx.tool.utils.Utils.UserError("Invalid version number in Manifest. Must be a valid semver version (x.y.z).");
|
|
226
235
|
}
|
|
236
|
+
if (!argv.type) {
|
|
237
|
+
argv.type = (semver.prerelease(old_version)) ? "prerelease" : "patch";
|
|
238
|
+
}
|
|
239
|
+
argv.prerelease = Boolean(argv.prerelease)
|
|
240
|
+
|| (argv.type === "prerelease")
|
|
241
|
+
|| (argv.type === "prepatch")
|
|
242
|
+
|| (argv.type === "preminor")
|
|
243
|
+
|| (argv.type === "premajor");
|
|
227
244
|
new_version = semver.inc(old_version, argv.type);
|
|
228
245
|
}
|
|
229
246
|
|
|
@@ -286,7 +303,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
286
303
|
let question = {
|
|
287
304
|
type: "confirm",
|
|
288
305
|
name: "doRelease",
|
|
289
|
-
message: `This will ${argv.version?"set":"increment"} the version to ${new_version}, having a dependency on qooxdoo ${semver_range}, and create a release of the current master on GitHub. Do you want to proceed?`,
|
|
306
|
+
message: `This will ${argv.version?"set":"increment"} the version from ${old_version} to ${new_version}, having a dependency on qooxdoo ${semver_range}, and create a release of the current master on GitHub. Do you want to proceed?`,
|
|
290
307
|
default: "y"
|
|
291
308
|
};
|
|
292
309
|
let answer = await inquirer.prompt(question);
|
|
@@ -306,7 +323,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
306
323
|
if (argv.dryrun) {
|
|
307
324
|
if (!argv.quiet) {
|
|
308
325
|
qx.tool.compiler.Console.info(`Dry run: Not committing ${manifestModel.getRelativeDataPath()} with the following content:`);
|
|
309
|
-
qx.tool.compiler.Console.info(manifestModel.getData());
|
|
326
|
+
qx.tool.compiler.Console.info(JSON.stringify(manifestModel.getData(), null, 2));
|
|
310
327
|
}
|
|
311
328
|
} else {
|
|
312
329
|
manifestModel.save();
|
|
@@ -328,9 +345,15 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
328
345
|
}
|
|
329
346
|
}
|
|
330
347
|
|
|
348
|
+
await this.fireDataEventAsync("beforeCommit", {
|
|
349
|
+
version: new_version,
|
|
350
|
+
argv: this.argv
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
|
|
331
354
|
if (argv.dryrun) {
|
|
332
355
|
qx.tool.compiler.Console.info(`Dry run: not creating tag and release '${tag}' of ${repo_name}...`);
|
|
333
|
-
|
|
356
|
+
return;
|
|
334
357
|
}
|
|
335
358
|
|
|
336
359
|
// commit message
|
|
@@ -368,7 +391,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
368
391
|
name: tag,
|
|
369
392
|
body: message,
|
|
370
393
|
draft: false,
|
|
371
|
-
prerelease:
|
|
394
|
+
prerelease: argv.prerelease
|
|
372
395
|
};
|
|
373
396
|
await octokit.repos.createRelease(release_data);
|
|
374
397
|
if (!argv.quiet) {
|
|
@@ -388,7 +411,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
|
|
|
388
411
|
qx.tool.compiler.Console.info(`Added GitHub topic '${topic}'.`);
|
|
389
412
|
}
|
|
390
413
|
}
|
|
391
|
-
|
|
414
|
+
run("git", ["pull"]);
|
|
392
415
|
},
|
|
393
416
|
|
|
394
417
|
/**
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
var fs = require("fs");
|
|
28
28
|
var async = require("async");
|
|
29
29
|
|
|
30
|
-
var jsonlint = require("jsonlint");
|
|
31
30
|
var hash = require("object-hash");
|
|
32
31
|
|
|
33
32
|
const {promisify} = require("util");
|
|
@@ -104,7 +103,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
104
103
|
check: "Map",
|
|
105
104
|
apply: "_applyEnvironment"
|
|
106
105
|
},
|
|
107
|
-
|
|
106
|
+
|
|
108
107
|
/** configuration of babel */
|
|
109
108
|
babelConfig: {
|
|
110
109
|
init: null,
|
|
@@ -125,7 +124,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
125
124
|
nullable: false,
|
|
126
125
|
check: "Array"
|
|
127
126
|
},
|
|
128
|
-
|
|
127
|
+
|
|
129
128
|
/** Whether and how to mangle private identifiers */
|
|
130
129
|
manglePrivates: {
|
|
131
130
|
init: "readable",
|
|
@@ -353,11 +352,11 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
353
352
|
|
|
354
353
|
compiledClasses[data.classFile.getClassName()] = data;
|
|
355
354
|
});
|
|
356
|
-
|
|
355
|
+
|
|
357
356
|
// Note that it is important to pre-load the classes in all libraries - this is because
|
|
358
357
|
// Babel plugins MUST be synchronous (ie cannot afford an async lookup of files on disk
|
|
359
358
|
// in mid parse)
|
|
360
|
-
await qx.tool.utils.Promisify.map(this.__libraries, async library =>
|
|
359
|
+
await qx.tool.utils.Promisify.map(this.__libraries, async library =>
|
|
361
360
|
qx.tool.utils.Promisify.call(cb => library.scanForClasses(cb))
|
|
362
361
|
);
|
|
363
362
|
|
|
@@ -390,7 +389,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
390
389
|
}
|
|
391
390
|
return deps;
|
|
392
391
|
}
|
|
393
|
-
|
|
392
|
+
|
|
394
393
|
for (var classIndex = 0; classIndex < classes.length; classIndex++) {
|
|
395
394
|
try {
|
|
396
395
|
let dbClassInfo = await qx.tool.utils.Promisify.call(cb => t.getClassInfo(classes[classIndex], cb));
|
|
@@ -679,7 +678,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
679
678
|
eventMeta.overriddenFrom = eventInfo.overriddenFrom;
|
|
680
679
|
}
|
|
681
680
|
}
|
|
682
|
-
}
|
|
681
|
+
}
|
|
683
682
|
|
|
684
683
|
if (meta.properties) {
|
|
685
684
|
for (let propertyName in meta.properties) {
|
|
@@ -695,7 +694,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
695
694
|
}
|
|
696
695
|
}
|
|
697
696
|
}
|
|
698
|
-
|
|
697
|
+
|
|
699
698
|
for (let propertyName in classEntities.properties) {
|
|
700
699
|
let propertyInfo = classEntities.properties[propertyName];
|
|
701
700
|
if ((propertyInfo.abstract || propertyInfo.mixin) && !meta.properties[propertyName]) {
|
|
@@ -809,7 +808,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
809
808
|
}
|
|
810
809
|
var filename = qx.tool.compiler.ClassFile.getOutputPath(t, classname) + "on";
|
|
811
810
|
return readFile(filename, {encoding: "utf-8"})
|
|
812
|
-
.then(str =>
|
|
811
|
+
.then(str => JSON.parse(str))
|
|
813
812
|
.then(meta => cachedMeta[classname] = meta)
|
|
814
813
|
.catch(err => {
|
|
815
814
|
qx.tool.compiler.Console.error("Failed to load meta for " + classname + ": " + err);
|
|
@@ -857,7 +856,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
857
856
|
|
|
858
857
|
await Promise.all(Object.keys(toSave).map(classname => saveMetaData(classname, toSave[classname])));
|
|
859
858
|
}
|
|
860
|
-
|
|
859
|
+
|
|
861
860
|
return await analyzeMeta();
|
|
862
861
|
},
|
|
863
862
|
|
|
@@ -1025,24 +1024,24 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
1025
1024
|
libraries = [];
|
|
1026
1025
|
}
|
|
1027
1026
|
libraries = libraries.filter(lib => lib != appLibrary);
|
|
1028
|
-
|
|
1027
|
+
|
|
1029
1028
|
await qx.Promise.all(locales.map(async locale => {
|
|
1030
1029
|
let libTranslations = {};
|
|
1031
1030
|
await qx.Promise.all(libraries.map(async lib => {
|
|
1032
1031
|
var translation = new qx.tool.compiler.app.Translation(lib, locale);
|
|
1033
1032
|
await translation.read();
|
|
1034
|
-
libTranslations[lib.toHashCode()] = translation;
|
|
1033
|
+
libTranslations[lib.toHashCode()] = translation;
|
|
1035
1034
|
}));
|
|
1036
|
-
|
|
1035
|
+
|
|
1037
1036
|
var translation = new qx.tool.compiler.app.Translation(appLibrary, locale);
|
|
1038
1037
|
translation.setWriteLineNumbers(this.isWritePoLineNumbers());
|
|
1039
1038
|
await translation.read();
|
|
1040
|
-
|
|
1039
|
+
|
|
1041
1040
|
let unusedEntries = {};
|
|
1042
1041
|
for (let msgid in translation.getEntries()) {
|
|
1043
1042
|
unusedEntries[msgid] = true;
|
|
1044
1043
|
}
|
|
1045
|
-
|
|
1044
|
+
|
|
1046
1045
|
await qx.Promise.all(this.__classes.map(async classname => {
|
|
1047
1046
|
let isAppClass = appLibrary.isClass(classname);
|
|
1048
1047
|
let classLibrary = !isAppClass && libraries.find(lib => lib.isClass(classname)) || null;
|
|
@@ -1054,7 +1053,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
1054
1053
|
if (!dbClassInfo.translations) {
|
|
1055
1054
|
return;
|
|
1056
1055
|
}
|
|
1057
|
-
|
|
1056
|
+
|
|
1058
1057
|
function isEmpty(entry) {
|
|
1059
1058
|
if (!entry) {
|
|
1060
1059
|
return true;
|
|
@@ -1067,7 +1066,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
1067
1066
|
|
|
1068
1067
|
dbClassInfo.translations.forEach(function(src) {
|
|
1069
1068
|
delete unusedEntries[src.msgid];
|
|
1070
|
-
|
|
1069
|
+
|
|
1071
1070
|
if (classLibrary) {
|
|
1072
1071
|
let entry = translation.getEntry(src.msgid);
|
|
1073
1072
|
if (!isEmpty(entry)) {
|
|
@@ -1085,7 +1084,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
1085
1084
|
}
|
|
1086
1085
|
return;
|
|
1087
1086
|
}
|
|
1088
|
-
|
|
1087
|
+
|
|
1089
1088
|
let entry = translation.getOrCreateEntry(src.msgid);
|
|
1090
1089
|
if (src.msgid_plural) {
|
|
1091
1090
|
entry.msgid_plural = src.msgid_plural;
|
|
@@ -1114,7 +1113,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
1114
1113
|
}
|
|
1115
1114
|
});
|
|
1116
1115
|
}));
|
|
1117
|
-
|
|
1116
|
+
|
|
1118
1117
|
Object.keys(unusedEntries).forEach(msgid => {
|
|
1119
1118
|
var entry = translation.getEntry(msgid);
|
|
1120
1119
|
if (entry) {
|
|
@@ -1129,7 +1128,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
1129
1128
|
}
|
|
1130
1129
|
}
|
|
1131
1130
|
});
|
|
1132
|
-
|
|
1131
|
+
|
|
1133
1132
|
await translation.write();
|
|
1134
1133
|
}));
|
|
1135
1134
|
},
|
|
@@ -1345,7 +1344,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
1345
1344
|
}
|
|
1346
1345
|
|
|
1347
1346
|
// then check if compiler version is the same
|
|
1348
|
-
if (db.compilerVersion !== qx.tool.
|
|
1347
|
+
if (db.compilerVersion !== qx.tool.config.Utils.getCompilerVersion()) {
|
|
1349
1348
|
return true;
|
|
1350
1349
|
}
|
|
1351
1350
|
|
|
@@ -1370,7 +1369,7 @@ qx.Class.define("qx.tool.compiler.Analyser", {
|
|
|
1370
1369
|
|
|
1371
1370
|
db.libraries = libraries;
|
|
1372
1371
|
db.environmentHash = this.__environmentHash;
|
|
1373
|
-
db.compilerVersion = qx.tool.
|
|
1372
|
+
db.compilerVersion = qx.tool.config.Utils.getCompilerVersion();
|
|
1374
1373
|
}
|
|
1375
1374
|
}
|
|
1376
1375
|
});
|
|
@@ -23,7 +23,7 @@ const fs = require("fs");
|
|
|
23
23
|
const path = require("path");
|
|
24
24
|
const tmp = require("tmp");
|
|
25
25
|
const http = require("http");
|
|
26
|
-
const fontkit = require("fontkit");
|
|
26
|
+
const fontkit = require("@foliojs-fork/fontkit");
|
|
27
27
|
|
|
28
28
|
var log = qx.tool.utils.LogManager.createLog("font");
|
|
29
29
|
|
|
@@ -70,7 +70,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
|
|
|
70
70
|
async make() {
|
|
71
71
|
var analyser = this.getAnalyser();
|
|
72
72
|
let target = this.getTarget();
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
await this.fireEventAsync("making");
|
|
75
75
|
this.setSuccess(null);
|
|
76
76
|
this.setHasWarnings(null);
|
|
@@ -82,12 +82,13 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
|
|
|
82
82
|
qx.tool.compiler.ClassFile.ENVIRONMENT_CONSTANTS,
|
|
83
83
|
{
|
|
84
84
|
"qx.compiler": true,
|
|
85
|
-
"qx.compiler.version": qx.tool.
|
|
85
|
+
"qx.compiler.version": qx.tool.config.Utils.getCompilerVersion()
|
|
86
86
|
},
|
|
87
87
|
this.getEnvironment(),
|
|
88
88
|
target.getDefaultEnvironment(),
|
|
89
|
-
target.getEnvironment()
|
|
90
|
-
|
|
89
|
+
target.getEnvironment()
|
|
90
|
+
);
|
|
91
|
+
|
|
91
92
|
let preserve = target.getPreserveEnvironment();
|
|
92
93
|
if (preserve) {
|
|
93
94
|
let tmp = {};
|
|
@@ -101,7 +102,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
|
|
|
101
102
|
this.getApplications().forEach(app => {
|
|
102
103
|
appEnvironments[app.toHashCode()] = qx.tool.utils.Values.merge({}, compileEnv, app.getCalculatedEnvironment());
|
|
103
104
|
});
|
|
104
|
-
|
|
105
|
+
|
|
105
106
|
// Analyze the list of environment variables, detect which are shared between all apps
|
|
106
107
|
let allAppEnv = {};
|
|
107
108
|
this.getApplications().forEach(app => {
|
|
@@ -117,7 +118,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
|
|
|
117
118
|
}
|
|
118
119
|
});
|
|
119
120
|
});
|
|
120
|
-
|
|
121
|
+
|
|
121
122
|
// If an env setting is the same for all apps, move it to the target for code elimination; similarly,
|
|
122
123
|
// if it varies between apps, then remove it from the target and make each app specify it individually
|
|
123
124
|
this.getApplications().forEach(app => {
|
|
@@ -132,8 +133,8 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
|
|
|
132
133
|
}
|
|
133
134
|
});
|
|
134
135
|
});
|
|
135
|
-
|
|
136
|
-
// Cleanup to remove env that have been moved to the app
|
|
136
|
+
|
|
137
|
+
// Cleanup to remove env that have been moved to the app
|
|
137
138
|
Object.keys(allAppEnv).forEach(key => {
|
|
138
139
|
if (!preserve[key] && allAppEnv[key].same) {
|
|
139
140
|
compileEnv[key] = allAppEnv[key].value;
|
|
@@ -150,14 +151,14 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
|
|
|
150
151
|
await qx.tool.utils.Utils.makeParentDir(this.getOutputDir());
|
|
151
152
|
await analyser.resetDatabase();
|
|
152
153
|
}
|
|
153
|
-
|
|
154
|
+
|
|
154
155
|
await qx.tool.utils.Utils.promisifyThis(analyser.initialScan, analyser);
|
|
155
156
|
await analyser.updateEnvironmentData();
|
|
156
157
|
|
|
157
158
|
target.setAnalyser(analyser);
|
|
158
159
|
this.__applications.forEach(app => app.setAnalyser(analyser));
|
|
159
160
|
await target.open();
|
|
160
|
-
|
|
161
|
+
|
|
161
162
|
if (this.isOutputTypescript()) {
|
|
162
163
|
analyser.getLibraries().forEach(library => {
|
|
163
164
|
var symbols = library.getKnownSymbols();
|
|
@@ -179,7 +180,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
|
|
|
179
180
|
}
|
|
180
181
|
});
|
|
181
182
|
await analyser.analyseClasses();
|
|
182
|
-
|
|
183
|
+
|
|
183
184
|
await analyser.saveDatabase();
|
|
184
185
|
await this.fireEventAsync("writingApplications");
|
|
185
186
|
|
|
@@ -191,11 +192,11 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
|
|
|
191
192
|
var appsThisTime = this.__applications.filter(app => {
|
|
192
193
|
let loadDeps = app.getDependencies();
|
|
193
194
|
if (!loadDeps || !loadDeps.length) {
|
|
194
|
-
return true;
|
|
195
|
+
return true;
|
|
195
196
|
}
|
|
196
197
|
return loadDeps.some(name => Boolean(compiledClasses[name]));
|
|
197
198
|
});
|
|
198
|
-
|
|
199
|
+
|
|
199
200
|
let allAppInfos = [];
|
|
200
201
|
|
|
201
202
|
let db = analyser.getDatabase();
|
|
@@ -244,7 +245,7 @@ qx.Class.define("qx.tool.compiler.makers.AppMaker", {
|
|
|
244
245
|
.run()
|
|
245
246
|
);
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
+
|
|
248
249
|
await analyser.saveDatabase();
|
|
249
250
|
await this.fireEventAsync("made");
|
|
250
251
|
this.setSuccess(success);
|
|
@@ -894,7 +894,8 @@ qx.Class.define("qx.tool.compiler.targets.Target", {
|
|
|
894
894
|
"appPath": t.getProjectDir(application) + "/",
|
|
895
895
|
"preBootJs": "",
|
|
896
896
|
"appTitle": (application.getTitle()||"Qooxdoo Application"),
|
|
897
|
-
"timeStamp": timeStamp
|
|
897
|
+
"timeStamp": timeStamp,
|
|
898
|
+
"indexJsTimestamp": indexJsTimestamp
|
|
898
899
|
};
|
|
899
900
|
await fs.writeFileAsync(t.getOutputDir() + "index.html", replaceVars(indexHtml), { encoding: "utf8" });
|
|
900
901
|
}
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
var path = require("path");
|
|
25
25
|
|
|
26
26
|
var fs = require("fs");
|
|
27
|
-
var jsonlint = require("jsonlint");
|
|
28
27
|
const {promisify} = require("util");
|
|
29
28
|
const readFile = promisify(fs.readFile);
|
|
30
29
|
/**
|
|
@@ -150,7 +149,7 @@ qx.Class.define("qx.tool.compiler.targets.TypeScriptWriter", {
|
|
|
150
149
|
}
|
|
151
150
|
var fileName = path.join(this.__target.getOutputDir(), "transpiled", classname.replace(/\./g, "/") + ".json");
|
|
152
151
|
return readFile(fileName, "UTF-8")
|
|
153
|
-
.then(content => this.__apiCache[classname] =
|
|
152
|
+
.then(content => this.__apiCache[classname] = JSON.parse(content))
|
|
154
153
|
.catch(err => qx.tool.compiler.Console.error("Error parsing " + classname + ": " + err.stack));
|
|
155
154
|
},
|
|
156
155
|
|
|
@@ -24,29 +24,36 @@ const fs = qx.tool.utils.Promisify.fs;
|
|
|
24
24
|
const path = require("upath");
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Represents a "polyfill.js" that is generated as part of a compile
|
|
27
|
+
* Represents a "polyfill.js" that is generated as part of a compile
|
|
28
28
|
*/
|
|
29
29
|
qx.Class.define("qx.tool.compiler.targets.meta.PolyfillJs", {
|
|
30
30
|
extend: qx.tool.compiler.targets.meta.AbstractJavascriptMeta,
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
construct(appMeta) {
|
|
33
33
|
this.base(arguments, appMeta, `${appMeta.getApplicationRoot()}polyfill.js`);
|
|
34
34
|
},
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
properties: {
|
|
37
37
|
needsWriteToDisk: {
|
|
38
38
|
init: true,
|
|
39
39
|
refine: true
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
members: {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
46
|
* @Override
|
|
47
47
|
*/
|
|
48
48
|
async writeSourceCodeToStream(ws) {
|
|
49
|
-
|
|
49
|
+
await this.__write(path.join(require.resolve("core-js-bundle"), "../minified.js"), ws);
|
|
50
|
+
await new Promise(resolve => {
|
|
51
|
+
ws.write("\n", resolve);
|
|
52
|
+
});
|
|
53
|
+
await this.__write(path.join(require.resolve("regenerator-runtime"), "../runtime.js"), ws);
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
async __write(srcFilename, ws) {
|
|
50
57
|
let rs = fs.createReadStream(srcFilename, "utf8");
|
|
51
58
|
await new Promise((resolve, reject) => {
|
|
52
59
|
rs.on("end", resolve);
|
|
@@ -54,8 +61,9 @@ qx.Class.define("qx.tool.compiler.targets.meta.PolyfillJs", {
|
|
|
54
61
|
rs.pipe(ws, { end: false });
|
|
55
62
|
});
|
|
56
63
|
},
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
59
67
|
* @Override
|
|
60
68
|
*/
|
|
61
69
|
async getSourceMap() {
|
|
@@ -332,7 +332,7 @@ qx.Class.define("qx.tool.config.Abstract", {
|
|
|
332
332
|
*/
|
|
333
333
|
setValue(prop_path, value, options) {
|
|
334
334
|
let originalValue = this.getValue(prop_path, options);
|
|
335
|
-
set_value(this.getData(), prop_path, value,
|
|
335
|
+
set_value(this.getData(), prop_path, value, {preservePaths:false});
|
|
336
336
|
try {
|
|
337
337
|
this.validate();
|
|
338
338
|
} catch (e) {
|
|
@@ -340,7 +340,7 @@ qx.Class.define("qx.tool.config.Abstract", {
|
|
|
340
340
|
if (originalValue === undefined) {
|
|
341
341
|
unset_value(this.getData(), prop_path);
|
|
342
342
|
} else {
|
|
343
|
-
set_value(this.getData(), prop_path, originalValue,
|
|
343
|
+
set_value(this.getData(), prop_path, originalValue, {preservePaths:false});
|
|
344
344
|
}
|
|
345
345
|
// throw
|
|
346
346
|
throw e;
|
|
@@ -362,7 +362,7 @@ qx.Class.define("qx.tool.config.Abstract", {
|
|
|
362
362
|
this.validate();
|
|
363
363
|
} catch (e) {
|
|
364
364
|
// revert value
|
|
365
|
-
set_value(this.getData(), prop_path, originalValue,
|
|
365
|
+
set_value(this.getData(), prop_path, originalValue, {preservePaths:false});
|
|
366
366
|
// throw
|
|
367
367
|
throw e;
|
|
368
368
|
}
|
|
@@ -191,7 +191,7 @@ qx.Class.define("qx.tool.config.Utils", {
|
|
|
191
191
|
|
|
192
192
|
throw new qx.tool.utils.Utils.UserError(`Path to the qx library cannot be determined.`);
|
|
193
193
|
};
|
|
194
|
-
|
|
194
|
+
|
|
195
195
|
this.__qxPathPromise = getQxPathImpl();
|
|
196
196
|
return await this.__qxPathPromise;
|
|
197
197
|
},
|
|
@@ -217,6 +217,15 @@ qx.Class.define("qx.tool.config.Utils", {
|
|
|
217
217
|
return qx.tool.config.Utils.getLibraryVersion(qxpath);
|
|
218
218
|
},
|
|
219
219
|
|
|
220
|
+
/**
|
|
221
|
+
* returns the compiler version.
|
|
222
|
+
* The version is written during compiler compile into the enviroment
|
|
223
|
+
* @return {String}
|
|
224
|
+
*/
|
|
225
|
+
getCompilerVersion() {
|
|
226
|
+
return qx.core.Environment.get("qx.compiler.version");
|
|
227
|
+
},
|
|
228
|
+
|
|
220
229
|
/**
|
|
221
230
|
* Returns the qooxdoo version used in the application in the current or given
|
|
222
231
|
* directory. Throws if no such version can be determined
|
|
@@ -272,6 +272,9 @@ qx.Class.define("qx.ui.container.SlideBar",
|
|
|
272
272
|
// property apply
|
|
273
273
|
_applyOrientation : function(value, old)
|
|
274
274
|
{
|
|
275
|
+
// ARIA attrs
|
|
276
|
+
this.getContentElement().setAttribute("aria-orientation", value);
|
|
277
|
+
|
|
275
278
|
var oldLayouts = [this.getLayout(), this._getLayout()];
|
|
276
279
|
var buttonForward = this.getChildControl("button-forward");
|
|
277
280
|
var buttonBackward = this.getChildControl("button-backward");
|