@qooxdoo/framework 7.0.0-beta → 7.0.0-beta.4

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.
Files changed (224) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/Manifest.json +11 -8
  3. package/bin/deploy/qx +0 -0
  4. package/lib/compiler/compile-info.json +86 -96
  5. package/lib/compiler/index.js +35547 -47284
  6. package/{source/class/qx/tool/compiler/targets → lib/resource/qx/tool/cli/templates}/TypeScriptWriter-base_declaration.txt +0 -0
  7. package/lib/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +8 -2
  8. package/lib/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +24 -11
  9. package/lib/resource/qx/tool/cli/templates/loader/loader-rhino.tmpl.js +9 -2
  10. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css +1 -1
  11. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -44
  12. package/lib/resource/qx/tool/cli/templates/template_vars.js +1 -1
  13. package/lib/resource/qx/tool/loadsass.js +13 -0
  14. package/lib/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
  15. package/lib/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
  16. package/lib/resource/qx/tool/schema/compile-1-0-0.json +19 -9
  17. package/lib/resource/qx/tool/website/sass/qooxdoo.css +1 -1
  18. package/lib/resource/qx/tool/website/sass/qooxdoo.css.map +1 -9
  19. package/package.json +14 -14
  20. package/source/class/qx/Annotation.js +2 -2
  21. package/source/class/qx/Class.js +20 -4
  22. package/source/class/qx/Interface.js +6 -0
  23. package/source/class/qx/Promise.js +32 -2
  24. package/source/class/qx/bom/Element.js +1 -0
  25. package/source/class/qx/bom/Font.js +17 -2
  26. package/source/class/qx/bom/Iframe.js +10 -5
  27. package/source/class/qx/bom/Label.js +2 -1
  28. package/source/class/qx/bom/Template.js +2 -0
  29. package/source/class/qx/bom/client/Browser.js +11 -2
  30. package/source/class/qx/bom/client/OperatingSystem.js +16 -0
  31. package/source/class/qx/bom/element/Decoration.js +8 -5
  32. package/source/class/qx/bom/element/Dimension.js +46 -0
  33. package/source/class/qx/bom/webfonts/WebFont.js +10 -0
  34. package/source/class/qx/core/BaseInit.js +9 -3
  35. package/source/class/qx/core/Environment.js +1 -0
  36. package/source/class/qx/core/Property.js +2 -2
  37. package/source/class/qx/data/SingleValueBinding.js +6 -3
  38. package/source/class/qx/data/controller/CheckedList.js +18 -9
  39. package/source/class/qx/data/controller/List.js +8 -0
  40. package/source/class/qx/dev/unit/Sinon.js +1 -1
  41. package/source/class/qx/event/Utils.js +1 -1
  42. package/source/class/qx/event/handler/DragDrop.js +1 -1
  43. package/source/class/qx/event/handler/Gesture.js +3 -1
  44. package/source/class/qx/event/handler/Mouse.js +61 -22
  45. package/source/class/qx/event/handler/Video.js +111 -0
  46. package/source/class/qx/html/Element.js +47 -32
  47. package/source/class/qx/html/Image.js +2 -2
  48. package/source/class/qx/html/Node.js +34 -4
  49. package/source/class/qx/lang/Json.js +1 -0
  50. package/source/class/qx/lang/String.js +53 -1
  51. package/source/class/qx/test/Annotation.js +2 -1
  52. package/source/class/qx/test/Promise.js +5 -3
  53. package/source/class/qx/test/bom/Font.js +10 -1
  54. package/source/class/qx/test/core/Property.js +5 -3
  55. package/source/class/qx/test/html/Element.js +3 -3
  56. package/source/class/qx/test/lang/String.js +28 -0
  57. package/source/class/qx/test/type/BaseString.js +7 -0
  58. package/source/class/qx/test/ui/embed/Iframe.js +1 -0
  59. package/source/class/qx/test/ui/form/ComboBox.js +0 -42
  60. package/source/class/qx/test/ui/virtual/performance/AbstractLayerTest.js +6 -2
  61. package/source/class/qx/theme/manager/Decoration.js +0 -0
  62. package/source/class/qx/theme/manager/Font.js +11 -0
  63. package/source/class/qx/theme/tangible/Appearance.js +10 -0
  64. package/source/class/qx/theme/tangible/ColorDark.js +0 -0
  65. package/source/class/qx/theme/tangible/Decoration.js +6 -0
  66. package/source/class/qx/tool/cli/Cli.js +5 -3
  67. package/source/class/qx/tool/cli/Watch.js +52 -0
  68. package/source/class/qx/tool/cli/api/AbstractApi.js +1 -1
  69. package/source/class/qx/tool/cli/api/CompilerApi.js +16 -6
  70. package/source/class/qx/tool/cli/api/LibraryApi.js +1 -1
  71. package/source/class/qx/tool/cli/commands/Command.js +7 -0
  72. package/source/class/qx/tool/cli/commands/Compile.js +28 -9
  73. package/source/class/qx/tool/cli/commands/Lint.js +30 -11
  74. package/source/class/qx/tool/cli/commands/Package.js +1 -2
  75. package/source/class/qx/tool/cli/commands/Run.js +2 -25
  76. package/source/class/qx/tool/cli/commands/Serve.js +9 -0
  77. package/source/class/qx/tool/cli/commands/package/Publish.js +19 -10
  78. package/source/class/qx/tool/compiler/Analyser.js +22 -23
  79. package/source/class/qx/tool/compiler/ClassFile.js +3 -2
  80. package/source/class/qx/tool/compiler/Console.js +17 -1
  81. package/source/class/qx/tool/compiler/Preprocess.js +1 -1
  82. package/source/class/qx/tool/compiler/app/Application.js +4 -2
  83. package/source/class/qx/tool/compiler/app/Cldr.js +1 -1
  84. package/source/class/qx/tool/compiler/app/Library.js +82 -88
  85. package/source/class/qx/tool/compiler/app/Part.js +1 -1
  86. package/source/class/qx/tool/compiler/app/Translation.js +1 -1
  87. package/source/class/qx/tool/compiler/app/WebFont.js +5 -4
  88. package/source/class/qx/tool/compiler/jsdoc/ChildControlParser.js +1 -1
  89. package/source/class/qx/tool/compiler/jsdoc/CommandParser.js +1 -1
  90. package/source/class/qx/tool/compiler/jsdoc/ParamParser.js +1 -1
  91. package/source/class/qx/tool/compiler/jsdoc/Parser.js +1 -1
  92. package/source/class/qx/tool/compiler/jsdoc/ReturnParser.js +1 -1
  93. package/source/class/qx/tool/compiler/jsdoc/ThrowsParser.js +1 -1
  94. package/source/class/qx/tool/compiler/makers/AbstractAppMaker.js +1 -1
  95. package/source/class/qx/tool/compiler/makers/AppMaker.js +14 -14
  96. package/source/class/qx/tool/compiler/makers/Maker.js +1 -1
  97. package/source/class/qx/tool/compiler/resources/AbstractMatcher.js +1 -1
  98. package/source/class/qx/tool/compiler/resources/Asset.js +2 -2
  99. package/source/class/qx/tool/compiler/resources/ImageLoader.js +3 -2
  100. package/source/class/qx/tool/compiler/resources/Manager.js +5 -5
  101. package/source/class/qx/tool/compiler/resources/MetaLoader.js +1 -1
  102. package/source/class/qx/tool/compiler/resources/ResourceConverter.js +1 -1
  103. package/source/class/qx/tool/compiler/resources/ResourceLoader.js +1 -1
  104. package/source/class/qx/tool/compiler/resources/ScssConverter.js +9 -3
  105. package/source/class/qx/tool/compiler/resources/ScssFile.js +13 -12
  106. package/source/class/qx/tool/compiler/resources/ScssIncludeConverter.js +1 -1
  107. package/source/class/qx/tool/compiler/targets/BuildTarget.js +1 -1
  108. package/source/class/qx/tool/compiler/targets/SourceCodeCopier.js +1 -1
  109. package/source/class/qx/tool/compiler/targets/SourceTarget.js +1 -1
  110. package/source/class/qx/tool/compiler/targets/Target.js +70 -32
  111. package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +3 -4
  112. package/source/class/qx/tool/compiler/targets/meta/AbstractJavascriptMeta.js +22 -0
  113. package/source/class/qx/tool/compiler/targets/meta/ApplicationMeta.js +30 -0
  114. package/source/class/qx/tool/compiler/targets/meta/BootJs.js +22 -0
  115. package/source/class/qx/tool/compiler/targets/meta/Javascript.js +22 -0
  116. package/source/class/qx/tool/compiler/targets/meta/Package.js +37 -2
  117. package/source/class/qx/tool/compiler/targets/meta/PackageJavascript.js +22 -0
  118. package/source/class/qx/tool/compiler/targets/meta/Part.js +22 -0
  119. package/source/class/qx/tool/compiler/targets/meta/PolyfillJs.js +29 -7
  120. package/source/class/qx/tool/compiler/targets/meta/Uglify.js +23 -1
  121. package/source/class/qx/tool/config/Abstract.js +3 -3
  122. package/source/class/qx/tool/config/Utils.js +10 -1
  123. package/source/class/qx/tool/utils/IndexedArray.js +1 -1
  124. package/source/class/qx/tool/utils/Json.js +2 -2
  125. package/source/class/qx/tool/utils/LogManager.js +1 -1
  126. package/source/class/qx/tool/utils/Logger.js +1 -1
  127. package/source/class/qx/tool/utils/Promisify.js +1 -1
  128. package/source/class/qx/tool/utils/Utils.js +118 -1
  129. package/source/class/qx/tool/utils/Values.js +1 -1
  130. package/source/class/qx/tool/utils/Website.js +23 -18
  131. package/source/class/qx/tool/utils/files/FindFiles.js +1 -1
  132. package/source/class/qx/tool/utils/files/Utils.js +1 -1
  133. package/source/class/qx/tool/utils/json/Parser.js +1 -1
  134. package/source/class/qx/tool/utils/json/Stringify.js +1 -1
  135. package/source/class/qx/tool/utils/json/Tokenizer.js +1 -1
  136. package/source/class/qx/tool/utils/json/Writer.js +1 -1
  137. package/source/class/qx/type/BaseString.js +2 -1
  138. package/source/class/qx/ui/basic/Image.js +15 -7
  139. package/source/class/qx/ui/basic/Label.js +3 -1
  140. package/source/class/qx/ui/container/SlideBar.js +3 -0
  141. package/source/class/qx/ui/control/DateChooser.js +20 -1
  142. package/source/class/qx/ui/core/scroll/NativeScrollBar.js +3 -0
  143. package/source/class/qx/ui/core/scroll/ScrollBar.js +3 -0
  144. package/source/class/qx/ui/form/AbstractSelectBox.js +38 -6
  145. package/source/class/qx/ui/form/Button.js +3 -0
  146. package/source/class/qx/ui/form/CheckBox.js +25 -1
  147. package/source/class/qx/ui/form/CheckedList.js +2 -1
  148. package/source/class/qx/ui/form/ComboBox.js +36 -27
  149. package/source/class/qx/ui/form/List.js +3 -0
  150. package/source/class/qx/ui/form/MenuButton.js +24 -2
  151. package/source/class/qx/ui/form/RadioButton.js +7 -0
  152. package/source/class/qx/ui/form/RadioButtonGroup.js +3 -0
  153. package/source/class/qx/ui/form/RadioGroup.js +19 -0
  154. package/source/class/qx/ui/form/SelectBox.js +23 -1
  155. package/source/class/qx/ui/form/Slider.js +15 -0
  156. package/source/class/qx/ui/form/SplitButton.js +3 -0
  157. package/source/class/qx/ui/form/ToggleButton.js +8 -0
  158. package/source/class/qx/ui/menu/AbstractButton.js +24 -0
  159. package/source/class/qx/ui/menu/Button.js +3 -0
  160. package/source/class/qx/ui/menu/CheckBox.js +8 -0
  161. package/source/class/qx/ui/menu/Manager.js +2 -0
  162. package/source/class/qx/ui/menu/Menu.js +63 -1
  163. package/source/class/qx/ui/menu/RadioButton.js +10 -1
  164. package/source/class/qx/ui/menubar/Button.js +0 -27
  165. package/source/class/qx/ui/menubar/MenuBar.js +12 -0
  166. package/source/class/qx/ui/splitpane/Blocker.js +3 -0
  167. package/source/class/qx/ui/splitpane/HLayout.js +2 -2
  168. package/source/class/qx/ui/splitpane/Pane.js +4 -1
  169. package/source/class/qx/ui/splitpane/VLayout.js +2 -2
  170. package/source/class/qx/ui/table/Table.js +24 -2
  171. package/source/class/qx/ui/table/cellrenderer/Abstract.js +3 -1
  172. package/source/class/qx/ui/table/cellrenderer/AbstractImage.js +7 -3
  173. package/source/class/qx/ui/table/headerrenderer/HeaderCell.js +3 -0
  174. package/source/class/qx/ui/table/pane/Header.js +3 -0
  175. package/source/class/qx/ui/table/pane/Scroller.js +3 -7
  176. package/source/class/qx/ui/table/rowrenderer/Default.js +1 -1
  177. package/source/class/qx/ui/tabview/Page.js +26 -0
  178. package/source/class/qx/ui/tabview/TabView.js +3 -0
  179. package/source/class/qx/ui/toolbar/Button.js +2 -27
  180. package/source/class/qx/ui/toolbar/CheckBox.js +0 -27
  181. package/source/class/qx/ui/toolbar/RadioButton.js +21 -0
  182. package/source/class/qx/ui/toolbar/SplitButton.js +0 -28
  183. package/source/class/qx/ui/toolbar/ToolBar.js +3 -0
  184. package/source/class/qx/util/ColorUtil.js +2 -1
  185. package/source/class/qx/util/ResourceManager.js +16 -7
  186. package/source/class/qx/util/format/DateFormat.js +9 -0
  187. package/source/class/qxWeb.js +8 -4
  188. package/source/resource/qx/decoration/Indigo/font/JosefinSlab-SemiBold.ttf +0 -0
  189. package/source/resource/qx/decoration/Indigo/font/SIL Open Font License 1.1.txt +0 -0
  190. package/source/resource/qx/iconfont/MaterialIcons/fetch-fonts.sh +0 -0
  191. package/source/resource/qx/mobile/scss/common/_gradients.scss +3 -1
  192. package/source/resource/qx/mobile/scss/theme/indigo/_styles.scss +1 -1
  193. package/source/resource/qx/mobile/scss/ui/_carousel.scss +2 -2
  194. package/source/resource/qx/mobile/scss/ui/_checkbox.scss +3 -3
  195. package/source/resource/qx/mobile/scss/ui/_collapsible.scss +2 -2
  196. package/source/resource/qx/mobile/scss/ui/_picker.scss +4 -4
  197. package/source/resource/qx/mobile/scss/ui/_radiobutton.scss +4 -4
  198. package/source/resource/qx/mobile/scss/ui/_slider.scss +7 -7
  199. package/source/resource/qx/scss/_gradients.scss +3 -1
  200. package/source/resource/qx/scss/_mixins.scss +4 -2
  201. package/source/resource/qx/tool/bin/build-devtools +0 -0
  202. package/source/resource/qx/tool/bin/build-website +0 -0
  203. package/source/resource/qx/tool/bin/download-assets +0 -0
  204. package/source/resource/qx/tool/cli/templates/TypeScriptWriter-base_declaration.txt +13 -0
  205. package/source/resource/qx/tool/cli/templates/loader/loader-browser.tmpl.js +8 -2
  206. package/source/resource/qx/tool/cli/templates/loader/loader-node.tmpl.js +24 -11
  207. package/source/resource/qx/tool/cli/templates/loader/loader-rhino.tmpl.js +9 -2
  208. package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/scss/_styles.scss +1 -1
  209. package/source/resource/qx/tool/cli/templates/template_vars.js +1 -1
  210. package/source/resource/qx/tool/loadsass.js +13 -0
  211. package/source/resource/qx/tool/schema/Manifest-1-0-0.json +1 -2
  212. package/source/resource/qx/tool/schema/Manifest-2-0-0.json +1 -2
  213. package/source/resource/qx/tool/schema/compile-1-0-0.json +19 -9
  214. package/source/resource/qx/website/scss/ui/_carousel.scss +2 -2
  215. package/lib/resource/qx/tool/website/.gitignore +0 -2
  216. package/source/class/qx/io/request/auth/.gitignore +0 -0
  217. package/source/class/qx/test/bom/client/.gitignore +0 -0
  218. package/source/class/qx/test/ui/control/.gitignore +0 -0
  219. package/source/class/qx/tool/compiler/Version.js +0 -20
  220. package/source/resource/qx/decoration/Modern/treevirtual/.gitignore +0 -0
  221. package/source/resource/qx/mobile/css/.gitignore +0 -3
  222. package/source/resource/qx/tool/website/.gitignore +0 -2
  223. package/source/resource/qx/website/.gitignore +0 -1
  224. package/source/resource/qx/website/scss/.gitignore +0 -1
@@ -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",
@@ -121,7 +119,10 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
121
119
  const argv = this.argv;
122
120
 
123
121
  // qooxdoo version
124
- let qxVersion = await this.getAppQxVersion();
122
+ let qxVersion = await this.getQxVersion();
123
+ if (fs.existsSync("Manifest.json")) {
124
+ qxVersion = await this.getAppQxVersion();
125
+ }
125
126
  if (argv.verbose) {
126
127
  this.info(`Using qooxdoo version: ${qxVersion}`);
127
128
  }
@@ -210,6 +211,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
210
211
  }
211
212
 
212
213
  // version
214
+ let old_version = mainManifestModel.getValue("info.version");
213
215
  let new_version;
214
216
  if (argv.useVersion) {
215
217
  // use user-supplied value
@@ -220,10 +222,17 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
220
222
  new_version = new_version.toString();
221
223
  } else {
222
224
  // use version number from manifest and increment it
223
- let old_version = mainManifestModel.getValue("info.version");
224
225
  if (!semver.valid(old_version)) {
225
226
  throw new qx.tool.utils.Utils.UserError("Invalid version number in Manifest. Must be a valid semver version (x.y.z).");
226
227
  }
228
+ if (!argv.type) {
229
+ argv.type = (semver.prerelease(old_version)) ? "prerelease" : "patch";
230
+ }
231
+ argv.prerelease = Boolean(argv.prerelease)
232
+ || (argv.type === "prerelease")
233
+ || (argv.type === "prepatch")
234
+ || (argv.type === "preminor")
235
+ || (argv.type === "premajor");
227
236
  new_version = semver.inc(old_version, argv.type);
228
237
  }
229
238
 
@@ -286,7 +295,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
286
295
  let question = {
287
296
  type: "confirm",
288
297
  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?`,
298
+ 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
299
  default: "y"
291
300
  };
292
301
  let answer = await inquirer.prompt(question);
@@ -306,7 +315,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
306
315
  if (argv.dryrun) {
307
316
  if (!argv.quiet) {
308
317
  qx.tool.compiler.Console.info(`Dry run: Not committing ${manifestModel.getRelativeDataPath()} with the following content:`);
309
- qx.tool.compiler.Console.info(manifestModel.getData());
318
+ qx.tool.compiler.Console.info(JSON.stringify(manifestModel.getData(), null, 2));
310
319
  }
311
320
  } else {
312
321
  manifestModel.save();
@@ -330,7 +339,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
330
339
 
331
340
  if (argv.dryrun) {
332
341
  qx.tool.compiler.Console.info(`Dry run: not creating tag and release '${tag}' of ${repo_name}...`);
333
- process.exit(0);
342
+ return;
334
343
  }
335
344
 
336
345
  // commit message
@@ -368,7 +377,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
368
377
  name: tag,
369
378
  body: message,
370
379
  draft: false,
371
- prerelease: Boolean(argv.prerelease)
380
+ prerelease: argv.prerelease
372
381
  };
373
382
  await octokit.repos.createRelease(release_data);
374
383
  if (!argv.quiet) {
@@ -388,7 +397,7 @@ qx.Class.define("qx.tool.cli.commands.package.Publish", {
388
397
  qx.tool.compiler.Console.info(`Added GitHub topic '${topic}'.`);
389
398
  }
390
399
  }
391
- await run("git", ["pull"]);
400
+ run("git", ["pull"]);
392
401
  },
393
402
 
394
403
  /**
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -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 => jsonlint.parse(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.compiler.Version.VERSION) {
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.compiler.Version.VERSION;
1372
+ db.compilerVersion = qx.tool.config.Utils.getCompilerVersion();
1374
1373
  }
1375
1374
  }
1376
1375
  });
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -403,8 +403,9 @@ qx.Class.define("qx.tool.compiler.ClassFile", {
403
403
  return;
404
404
  }
405
405
  let mappingUrl = name + ".js.map";
406
- if (qx.lang.Array.contains(t.__analyser.getApplicationTypes(), "browser"))
406
+ if (qx.lang.Array.contains(t.__analyser.getApplicationTypes(), "browser")) {
407
407
  mappingUrl += "?dt=" + (new Date().getTime());
408
+ }
408
409
  fs.writeFile(outputPath, result.code + "\n\n//# sourceMappingURL=" + mappingUrl, {encoding: "utf-8"}, function(err) {
409
410
  if (err) {
410
411
  callback(err);
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -139,6 +139,15 @@ qx.Class.define("qx.tool.compiler.Console", {
139
139
  console.info(this.getColorOn() + args.join(" "));
140
140
  },
141
141
 
142
+ /**
143
+ * console.warn equivalent, with colorization, only operates if `verbose` is true
144
+ */
145
+ trace(...args) {
146
+ if (this.isVerbose()) {
147
+ console.warn(this.getColorOn() + args.join(" "));
148
+ }
149
+ },
150
+
142
151
  /**
143
152
  * console.warn equivalent, with colorization
144
153
  */
@@ -282,6 +291,13 @@ qx.Class.define("qx.tool.compiler.Console", {
282
291
  return this.getInstance().warn(...args);
283
292
  },
284
293
 
294
+ /**
295
+ * console.warn equivalent, with colorization, only operates if `verbose` is true
296
+ */
297
+ trace(...args) {
298
+ return this.getInstance().trace(...args);
299
+ },
300
+
285
301
  /**
286
302
  * console.error equivalent, with colorization
287
303
  */
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -820,7 +820,9 @@ qx.Class.define("qx.tool.compiler.app.Application", {
820
820
  getCalculatedEnvironment() {
821
821
  return qx.tool.utils.Values.merge(
822
822
  {
823
- "qx.headless": this.getType() != "browser"
823
+ "qx.headless": this.getType() != "browser",
824
+ "qx.compiler.applicationName": this.getName(),
825
+ "qx.compiler.applicationType": this.getType()
824
826
  },
825
827
  this.getEnvironment());
826
828
  },
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -147,100 +147,94 @@ qx.Class.define("qx.tool.compiler.app.Library", {
147
147
  return this.__promiseLoadManifest = this.__loadManifestImpl(loadFromDir);
148
148
  },
149
149
 
150
- __loadManifestImpl(loadFromDir) {
150
+ async __loadManifestImpl(loadFromDir) {
151
151
  var Console = qx.tool.compiler.Console.getInstance();
152
- var t = this;
153
152
  let rootDir = loadFromDir;
154
153
 
155
- return qx.tool.utils.files.Utils.correctCase(path.resolve(loadFromDir))
156
- .then(tmp => this.setRootDir(rootDir = tmp))
157
- .then(() => qx.tool.utils.Json.loadJsonAsync(rootDir + "/Manifest.json"))
158
- .then(data => {
159
- if (!data) {
160
- throw new Error(Console.decode("qx.tool.compiler.library.emptyManifest", rootDir));
161
- }
162
- t.setNamespace(data.provides.namespace);
163
- t.setVersion(data.info.version);
164
- if (data.provides.environmentChecks) {
165
- for (var key in data.provides.environmentChecks) {
166
- let check = data.provides.environmentChecks[key];
167
- let pos = key.indexOf("*");
168
- if (pos > -1) {
169
- this.__environmentChecks[key] = {
170
- matchString: key.substring(0, pos),
171
- startsWith: true,
172
- className: check
173
- };
174
- } else {
175
- this.__environmentChecks[key] = {
176
- matchString: key,
177
- className: check
178
- };
179
- }
180
- }
154
+ rootDir = await qx.tool.utils.files.Utils.correctCase(path.resolve(loadFromDir));
155
+ this.setRootDir(rootDir);
156
+ let data = await qx.tool.utils.Json.loadJsonAsync(rootDir + "/Manifest.json");
157
+ if (!data) {
158
+ throw new Error(Console.decode("qx.tool.compiler.library.emptyManifest", rootDir));
159
+ }
160
+ this.setNamespace(data.provides.namespace);
161
+ this.setVersion(data.info.version);
162
+ if (data.provides.environmentChecks) {
163
+ for (var key in data.provides.environmentChecks) {
164
+ let check = data.provides.environmentChecks[key];
165
+ let pos = key.indexOf("*");
166
+ if (pos > -1) {
167
+ this.__environmentChecks[key] = {
168
+ matchString: key.substring(0, pos),
169
+ startsWith: true,
170
+ className: check
171
+ };
172
+ } else {
173
+ this.__environmentChecks[key] = {
174
+ matchString: key,
175
+ className: check
176
+ };
181
177
  }
178
+ }
179
+ }
182
180
 
183
- function fixLibraryPath(dir) {
184
- let d = path.resolve(rootDir, dir);
185
- if (!fs.existsSync(d)) {
186
- t.warn(Console.decode("qx.tool.compiler.library.cannotFindPath", t.getNamespace(), dir));
187
- return qx.Promise.resolve(dir);
188
- }
189
- return qx.tool.utils.files.Utils.correctCase(d)
190
- .then(correctedDir => {
191
- if (correctedDir.substring(0, rootDir.length + 1) != rootDir + path.sep) {
192
- t.warn(Console.decode("qx.tool.compiler.library.cannotCorrectCase", rootDir));
193
- return dir;
194
- }
195
- correctedDir = correctedDir.substring(rootDir.length + 1);
196
- return correctedDir;
197
- });
198
- }
181
+ const fixLibraryPath = async dir => {
182
+ let d = path.resolve(rootDir, dir);
183
+ if (!fs.existsSync(d)) {
184
+ this.warn(Console.decode("qx.tool.compiler.library.cannotFindPath", this.getNamespace(), dir));
185
+ return dir;
186
+ }
187
+ let correctedDir = await qx.tool.utils.files.Utils.correctCase(d);
188
+ if (correctedDir.substring(0, rootDir.length + 1) != rootDir + path.sep) {
189
+ this.warn(Console.decode("qx.tool.compiler.library.cannotCorrectCase", rootDir));
190
+ return dir;
191
+ }
192
+ correctedDir = correctedDir.substring(rootDir.length + 1);
193
+ return correctedDir;
194
+ }
199
195
 
200
- return fixLibraryPath(data.provides["class"])
201
- .then(sourcePath => t.setSourcePath(sourcePath))
202
- .then(() => fixLibraryPath(data.provides.resource))
203
- .then(resourcePath => t.setResourcePath(data.provides.resource))
204
- .then(() => {
205
- t.setLibraryInfo(data.info);
206
- if (data.provides.transpiled) {
207
- t.setTranspiledPath(data.provides.transpiled);
208
- } else {
209
- let sourcePath = t.getSourcePath();
210
- var m = sourcePath.match(/^(.*)\/([^/]+)$/);
211
- if (m && m.length == 3) {
212
- t.setTranspiledPath(m[1] + "/transpiled");
213
- } else {
214
- t.setTranspiledPath("transpiled");
215
- }
216
- }
217
- if (data.provides.translation) {
218
- t.setTranslationPath(data.provides.translation);
219
- }
220
- if (data.provides.webfonts) {
221
- var fonts = [];
222
- data.provides.webfonts.forEach(wf => {
223
- var font = new qx.tool.compiler.app.WebFont(t).set(wf);
224
- fonts.push(font);
225
- });
226
- t.setWebFonts(fonts);
227
- }
228
- if (data.externalResources) {
229
- if (data.externalResources.script) {
230
- t.setAddScript(data.externalResources.script);
231
- }
232
- if (data.externalResources.css) {
233
- t.setAddCss(data.externalResources.css);
234
- }
235
- }
236
- if (data.requires) {
237
- t.setRequires(data.requires);
238
- }
239
- if (data.provides && data.provides.boot) {
240
- qx.tool.compiler.Console.print("qx.tool.cli.compile.deprecatedProvidesBoot", rootDir);
241
- }
242
- });
196
+ let sourcePath = await fixLibraryPath(data.provides["class"]);
197
+ this.setSourcePath(sourcePath);
198
+ if (data.provides.resource) {
199
+ let resourcePath = await fixLibraryPath(data.provides.resource);
200
+ this.setResourcePath(resourcePath);
201
+ }
202
+ this.setLibraryInfo(data.info);
203
+ if (data.provides.transpiled) {
204
+ this.setTranspiledPath(data.provides.transpiled);
205
+ } else {
206
+ var m = sourcePath.match(/^(.*)\/([^/]+)$/);
207
+ if (m && m.length == 3) {
208
+ this.setTranspiledPath(m[1] + "/transpiled");
209
+ } else {
210
+ this.setTranspiledPath("transpiled");
211
+ }
212
+ }
213
+ if (data.provides.translation) {
214
+ this.setTranslationPath(data.provides.translation);
215
+ }
216
+ if (data.provides.webfonts) {
217
+ var fonts = [];
218
+ data.provides.webfonts.forEach(wf => {
219
+ var font = new qx.tool.compiler.app.WebFont(this).set(wf);
220
+ fonts.push(font);
243
221
  });
222
+ this.setWebFonts(fonts);
223
+ }
224
+ if (data.externalResources) {
225
+ if (data.externalResources.script) {
226
+ this.setAddScript(data.externalResources.script);
227
+ }
228
+ if (data.externalResources.css) {
229
+ this.setAddCss(data.externalResources.css);
230
+ }
231
+ }
232
+ if (data.requires) {
233
+ this.setRequires(data.requires);
234
+ }
235
+ if (data.provides && data.provides.boot) {
236
+ qx.tool.compiler.Console.print("qx.tool.cli.compile.deprecatedProvidesBoot", rootDir);
237
+ }
244
238
  },
245
239
 
246
240
  /**
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2017 GONICUS GmbH, http://www.gonicus.de
@@ -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
 
@@ -184,7 +184,7 @@ qx.Class.define("qx.tool.compiler.app.WebFont", {
184
184
  let codePoint = parseInt(map[key], 16);
185
185
  let glyph = font.glyphForCodePoint(codePoint);
186
186
  if (!glyph.id) {
187
- qx.tool.compiler.Console.log(`WARN: no glyph found in ${filename} ${key}: ${codePoint}`);
187
+ qx.tool.compiler.Console.trace(`WARN: no glyph found in ${filename} ${key}: ${codePoint}`);
188
188
  return;
189
189
  }
190
190
  resources["@" + this.getName() + "/" + key] = [
@@ -315,8 +315,9 @@ qx.Class.define("qx.tool.compiler.app.WebFont", {
315
315
  * @return {Promise}
316
316
  */
317
317
  generateForTarget: function(target) {
318
- if (this.__generateForTargetPromise)
318
+ if (this.__generateForTargetPromise) {
319
319
  return this.__generateForTargetPromise;
320
+ }
320
321
 
321
322
  this.__generateForTargetPromise = new Promise((resolve, reject) => {
322
323
  for (let resource of this.getResources()) {
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com
@@ -3,7 +3,7 @@
3
3
  * qooxdoo-compiler - node.js based replacement for the Qooxdoo python
4
4
  * toolchain
5
5
  *
6
- * https://github.com/qooxdoo/qooxdoo-compiler
6
+ * https://github.com/qooxdoo/qooxdoo
7
7
  *
8
8
  * Copyright:
9
9
  * 2011-2017 Zenesis Limited, http://www.zenesis.com