@qooxdoo/framework 7.9.2 → 8.0.0-beta.2

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 (600) hide show
  1. package/CHANGELOG.md +224 -33
  2. package/Manifest.json +3 -3
  3. package/bin/tools/utils.js +50 -13
  4. package/lib/compiler/compile-info.json +297 -227
  5. package/lib/compiler/index.js +55319 -47085
  6. package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/default.tmpl.js +6 -7
  7. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/cli/templates/class/singleton.tmpl.js +5 -6
  8. package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-node.tmpl.js +1 -0
  9. package/lib/resource/qx/tool/compiler/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -0
  10. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/cli/templates/template_vars.js +12 -9
  11. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/Manifest-1-0-0.json +2 -2
  12. package/lib/resource/qx/tool/{schema → compiler/schema}/Manifest-2-0-0.json +2 -2
  13. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/compile-1-0-0.json +21 -5
  14. package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/qooxdoo-1-0-0.json +1 -1
  15. package/lib/resource/qx/tool/website/build/404.html +22 -22
  16. package/lib/resource/qx/tool/website/build/about.html +23 -23
  17. package/lib/resource/qx/tool/website/build/assets/common.js +30 -18
  18. package/lib/resource/qx/tool/website/build/assets/custom.css +290 -0
  19. package/lib/resource/qx/tool/website/build/assets/qxWeb.js +28 -0
  20. package/lib/resource/qx/tool/website/build/diagnostics/dependson.html +30 -30
  21. package/lib/resource/qx/tool/website/build/diagnostics/dependson.js +49 -40
  22. package/lib/resource/qx/tool/website/build/diagnostics/requiredby.html +20 -23
  23. package/lib/resource/qx/tool/website/build/diagnostics/requiredby.js +38 -31
  24. package/lib/resource/qx/tool/website/build/index.html +24 -24
  25. package/lib/resource/qx/tool/website/build/scripts/serve.js +63 -65
  26. package/lib/resource/qx/tool/website/partials/footer.html +8 -13
  27. package/lib/resource/qx/tool/website/partials/head.html +9 -7
  28. package/lib/resource/qx/tool/website/partials/header.html +3 -3
  29. package/lib/resource/qx/tool/website/src/assets/common.js +32 -0
  30. package/lib/resource/qx/tool/website/src/assets/custom.css +290 -0
  31. package/lib/resource/qx/tool/website/src/assets/qxWeb.js +28 -0
  32. package/lib/resource/qx/tool/website/src/diagnostics/dependson.js +49 -40
  33. package/lib/resource/qx/tool/website/src/diagnostics/requiredby.js +38 -31
  34. package/lib/resource/qx/tool/website/src/index.html +2 -2
  35. package/lib/resource/qx/tool/website/src/scripts/serve.js +63 -65
  36. package/package.json +23 -24
  37. package/source/boot/index.html +2 -2
  38. package/source/class/qx/Bootstrap.js +931 -705
  39. package/source/class/qx/Class.js +1476 -1451
  40. package/source/class/qx/Interface.js +40 -107
  41. package/source/class/qx/Mixin.js +58 -116
  42. package/source/class/qx/Promise.js +1 -0
  43. package/source/class/qx/Theme.js +1 -1
  44. package/source/class/qx/application/Routing.js +2 -0
  45. package/source/class/qx/bom/Font.js +3 -0
  46. package/source/class/qx/bom/client/Locale.js +5 -0
  47. package/source/class/qx/bom/request/Jsonp.js +5 -13
  48. package/source/class/qx/bom/request/Script.js +11 -35
  49. package/source/class/qx/bom/request/SimpleXhr.js +13 -41
  50. package/source/class/qx/bom/request/Xhr.js +19 -80
  51. package/source/class/qx/bom/storage/Memory.js +2 -0
  52. package/source/class/qx/bom/storage/UserData.js +2 -0
  53. package/source/class/qx/bom/storage/Web.js +2 -0
  54. package/source/class/qx/bom/webfonts/Validator.js +13 -5
  55. package/source/class/qx/core/Assert.js +14 -0
  56. package/source/class/qx/core/BaseInit.js +19 -19
  57. package/source/class/qx/core/Environment.js +23 -20
  58. package/source/class/qx/core/MEvent.js +1 -1
  59. package/source/class/qx/core/MObjectId.js +24 -6
  60. package/source/class/qx/core/MProperty.js +123 -115
  61. package/source/class/qx/core/Object.js +88 -102
  62. package/source/class/qx/core/check/AbstractCheck.js +111 -0
  63. package/source/class/qx/core/check/Any.js +63 -0
  64. package/source/class/qx/core/check/CheckFactory.js +151 -0
  65. package/source/class/qx/core/check/DynamicTypeCheck.js +94 -0
  66. package/source/class/qx/core/check/ICheck.js +75 -0
  67. package/source/class/qx/core/check/IsOneOfCheck.js +63 -0
  68. package/source/class/qx/core/check/JsDocCheck.js +71 -0
  69. package/source/class/qx/core/check/SimpleCheck.js +42 -0
  70. package/source/class/qx/core/check/standard/ArrayCheck.js +49 -0
  71. package/source/class/qx/core/check/standard/BooleanCheck.js +47 -0
  72. package/source/class/qx/core/check/standard/ClassCheck.js +33 -0
  73. package/source/class/qx/core/check/standard/ColorCheck.js +33 -0
  74. package/source/class/qx/core/check/standard/DateCheck.js +49 -0
  75. package/source/class/qx/core/check/standard/DecoratorCheck.js +33 -0
  76. package/source/class/qx/core/check/standard/DocumentCheck.js +40 -0
  77. package/source/class/qx/core/check/standard/ElementCheck.js +40 -0
  78. package/source/class/qx/core/check/standard/ErrorCheck.js +46 -0
  79. package/source/class/qx/core/check/standard/EventCheck.js +40 -0
  80. package/source/class/qx/core/check/standard/FontCheck.js +33 -0
  81. package/source/class/qx/core/check/standard/FunctionCheck.js +49 -0
  82. package/source/class/qx/core/check/standard/IntegerCheck.js +54 -0
  83. package/source/class/qx/core/check/standard/InterfaceCheck.js +33 -0
  84. package/source/class/qx/core/check/standard/MapCheck.js +33 -0
  85. package/source/class/qx/core/check/standard/MixinCheck.js +33 -0
  86. package/source/class/qx/core/check/standard/NodeCheck.js +40 -0
  87. package/source/class/qx/core/check/standard/NumberCheck.js +48 -0
  88. package/source/class/qx/core/check/standard/ObjectCheck.js +33 -0
  89. package/source/class/qx/core/check/standard/PositiveIntegerCheck.js +45 -0
  90. package/source/class/qx/core/check/standard/PositiveNumberCheck.js +45 -0
  91. package/source/class/qx/core/check/standard/PromiseCheck.js +33 -0
  92. package/source/class/qx/core/check/standard/RegExpCheck.js +46 -0
  93. package/source/class/qx/core/check/standard/StringCheck.js +43 -0
  94. package/source/class/qx/core/check/standard/ThemeCheck.js +33 -0
  95. package/source/class/qx/core/check/standard/WindowCheck.js +40 -0
  96. package/source/class/qx/core/property/ExplicitPropertyStorage.js +87 -0
  97. package/source/class/qx/core/property/GroupProperty.js +262 -0
  98. package/source/class/qx/core/property/IProperty.js +46 -0
  99. package/source/class/qx/core/property/IPropertyStorage.js +83 -0
  100. package/source/class/qx/core/property/ImmutableArrayStorage.js +38 -0
  101. package/source/class/qx/core/property/ImmutableDataArrayStorage.js +38 -0
  102. package/source/class/qx/core/property/ImmutableObjectStorage.js +39 -0
  103. package/source/class/qx/core/property/Property.js +1482 -0
  104. package/source/class/qx/core/property/PropertyStorageFactory.js +22 -0
  105. package/source/class/qx/core/property/SimplePropertyStorage.js +105 -0
  106. package/source/class/qx/data/Array.js +102 -57
  107. package/source/class/qx/data/MBinding.js +4 -29
  108. package/source/class/qx/data/SingleValueBinding.js +595 -1496
  109. package/source/class/qx/data/binding/AbstractSegment.js +197 -0
  110. package/source/class/qx/data/binding/ArrayIndexSegment.js +155 -0
  111. package/source/class/qx/data/binding/IInputReceiver.js +14 -0
  112. package/source/class/qx/data/binding/PropNameSegment.js +150 -0
  113. package/source/class/qx/data/controller/CheckedList.js +1 -1
  114. package/source/class/qx/data/controller/Form.js +78 -8
  115. package/source/class/qx/data/controller/Tree.js +27 -117
  116. package/source/class/qx/data/marshal/Json.js +46 -149
  117. package/source/class/qx/data/store/Json.js +0 -2
  118. package/source/class/qx/dev/Debug.js +1 -1
  119. package/source/class/qx/dev/LeakDetector.js +144 -0
  120. package/source/class/qx/dev/unit/AsyncWrapper.js +1 -0
  121. package/source/class/qx/dev/unit/MMock.js +7 -2
  122. package/source/class/qx/dev/unit/Sinon.js +0 -4
  123. package/source/class/qx/dev/unit/TestCase.js +4 -1
  124. package/source/class/qx/dev/unit/TestClass.js +2 -2
  125. package/source/class/qx/dev/unit/TestFunction.js +1 -0
  126. package/source/class/qx/dev/unit/TestLoaderBasic.js +1 -0
  127. package/source/class/qx/dev/unit/TestRunner.js +106 -0
  128. package/source/class/qx/event/IEventDispatcher.js +8 -4
  129. package/source/class/qx/event/Manager.js +4 -0
  130. package/source/class/qx/event/Messaging.js +2 -0
  131. package/source/class/qx/event/Pool.js +7 -0
  132. package/source/class/qx/event/Registration.js +33 -55
  133. package/source/class/qx/event/Timer.js +2 -0
  134. package/source/class/qx/event/Utils.js +25 -8
  135. package/source/class/qx/event/dispatch/AbstractBubbling.js +98 -194
  136. package/source/class/qx/event/dispatch/Direct.js +18 -13
  137. package/source/class/qx/event/handler/Appear.js +20 -24
  138. package/source/class/qx/event/handler/Application.js +4 -0
  139. package/source/class/qx/event/handler/DragDrop.js +182 -385
  140. package/source/class/qx/event/handler/Element.js +3 -0
  141. package/source/class/qx/event/handler/Focus.js +38 -31
  142. package/source/class/qx/event/handler/Input.js +5 -0
  143. package/source/class/qx/event/handler/Keyboard.js +107 -165
  144. package/source/class/qx/event/handler/Pointer.js +39 -68
  145. package/source/class/qx/event/handler/PointerCore.js +7 -25
  146. package/source/class/qx/event/handler/Window.js +5 -0
  147. package/source/class/qx/event/type/Event.js +12 -0
  148. package/source/class/qx/event/type/KeySequence.js +3 -0
  149. package/source/class/qx/event/type/Native.js +3 -0
  150. package/source/class/qx/html/Element.js +26 -91
  151. package/source/class/qx/html/Jsx.js +2 -3
  152. package/source/class/qx/html/Node.js +3 -3
  153. package/source/class/qx/io/jsonrpc/Client.js +2 -2
  154. package/source/class/qx/io/jsonrpc/protocol/Error.js +2 -2
  155. package/source/class/qx/io/jsonrpc/protocol/Parser.js +1 -0
  156. package/source/class/qx/io/jsonrpc/protocol/Result.js +2 -2
  157. package/source/class/qx/io/request/Xhr.js +3 -8
  158. package/source/class/qx/lang/normalize/Array.js +23 -1
  159. package/source/class/qx/locale/Date.js +520 -113
  160. package/source/class/qx/locale/LocalizedString.js +3 -0
  161. package/source/class/qx/locale/Manager.js +14 -3
  162. package/source/class/qx/locale/Number.js +60 -7
  163. package/source/class/qx/log/Logger.js +1 -1
  164. package/source/class/qx/module/Animation.js +2 -0
  165. package/source/class/qx/module/Attribute.js +2 -0
  166. package/source/class/qx/module/Css.js +7 -24
  167. package/source/class/qx/module/Event.js +2 -0
  168. package/source/class/qx/module/Manipulating.js +2 -0
  169. package/source/class/qx/module/Traversing.js +2 -0
  170. package/source/class/qx/promise/NativeWrapper.js +1 -1
  171. package/source/class/qx/test/Bootstrap.js +68 -53
  172. package/source/class/qx/test/Class.js +310 -2
  173. package/source/class/qx/test/Mixin.js +192 -42
  174. package/source/class/qx/test/Promise.js +129 -331
  175. package/source/class/qx/test/Theme.js +11 -0
  176. package/source/class/qx/test/bom/Font.js +2 -5
  177. package/source/class/qx/test/bom/Template.js +1 -1
  178. package/source/class/qx/test/compiler/ClassFile.js +14 -0
  179. package/source/class/qx/test/core/Assert.js +12 -0
  180. package/source/class/qx/test/core/Environment.js +17 -3
  181. package/source/class/qx/test/core/InheritanceDummy.js +10 -1
  182. package/source/class/qx/test/core/Object.js +51 -24
  183. package/source/class/qx/test/core/ObjectId.js +10 -1
  184. package/source/class/qx/test/core/Property.js +1363 -118
  185. package/source/class/qx/test/core/PropertyHelper.js +12 -0
  186. package/source/class/qx/test/core/Target.js +1 -0
  187. package/source/class/qx/test/core/Validation.js +2 -0
  188. package/source/class/qx/test/data/DataArray.js +218 -639
  189. package/source/class/qx/test/data/DataArrayWithChangeBubble.js +45 -215
  190. package/source/class/qx/test/data/MultiBinding.js +42 -0
  191. package/source/class/qx/test/data/async/__init__.js +4 -0
  192. package/source/class/qx/test/data/controller/Form.js +523 -14
  193. package/source/class/qx/test/data/controller/List.js +94 -426
  194. package/source/class/qx/test/data/controller/ListReverse.js +5 -20
  195. package/source/class/qx/test/data/controller/ListWithObjects.js +49 -225
  196. package/source/class/qx/test/data/controller/Object.js +54 -222
  197. package/source/class/qx/test/data/controller/Tree.js +195 -934
  198. package/source/class/qx/test/data/marshal/Json.js +74 -312
  199. package/source/class/qx/test/data/singlevalue/Array.js +55 -279
  200. package/source/class/qx/test/data/singlevalue/Async.js +173 -0
  201. package/source/class/qx/test/data/singlevalue/Deep.js +148 -327
  202. package/source/class/qx/test/data/singlevalue/Resolve.js +8 -28
  203. package/source/class/qx/test/data/singlevalue/Simple.js +130 -359
  204. package/source/class/qx/test/data/store/Json.js +86 -254
  205. package/source/class/qx/test/data/store/Jsonp.js +9 -29
  206. package/source/class/qx/test/data/store/Offline.js +2 -8
  207. package/source/class/qx/test/data/store/Rest.js +3 -3
  208. package/source/class/qx/test/dev/unit/Requirements.js +26 -10
  209. package/source/class/qx/test/event/GlobalError.js +2 -2
  210. package/source/class/qx/test/html/Iframe.js +1 -1
  211. package/source/class/qx/test/io/graphql/Client.js +2 -0
  212. package/source/class/qx/test/io/jsonrpc/Protocol.js +4 -2
  213. package/source/class/qx/test/io/request/MRequest.js +2 -8
  214. package/source/class/qx/test/io/request/Xhr.js +27 -117
  215. package/source/class/qx/test/lang/Function.js +6 -25
  216. package/source/class/qx/test/lang/Type.js +31 -13
  217. package/source/class/qx/test/locale/Date.js +173 -2
  218. package/source/class/qx/test/locale/Locale.js +23 -28
  219. package/source/class/qx/test/locale/Number.js +71 -0
  220. package/source/class/qx/test/log/Logger.js +7 -1
  221. package/source/class/qx/test/log/fixture/ClassA.js +2 -5
  222. package/source/class/qx/test/mobile/basic/Atom.js +3 -3
  223. package/source/class/qx/test/mobile/container/Scroll.js +4 -4
  224. package/source/class/qx/test/mobile/form/CheckBox.js +6 -12
  225. package/source/class/qx/test/performance/Property.js +5 -4
  226. package/source/class/qx/test/performance/widget/WidgetWithDecorator.js +2 -0
  227. package/source/class/qx/test/theme/Simple.js +34 -0
  228. package/source/class/qx/test/{MAppearance.js → theme/SimpleAppearance.js} +5 -4
  229. package/source/class/qx/test/{MDecoration.js → theme/SimpleDecoration.js} +6 -4
  230. package/source/class/qx/test/theme/manager/Meta.js +7 -5
  231. package/source/class/qx/test/tool/__init__.js +3 -0
  232. package/source/class/qx/test/tool/cli/AbstractValue.js +274 -0
  233. package/source/class/qx/test/tool/cli/Argument.js +384 -0
  234. package/source/class/qx/test/tool/cli/Command.js +387 -0
  235. package/source/class/qx/test/tool/cli/Flag.js +413 -0
  236. package/source/class/qx/test/tool/cli/__init__.js +3 -0
  237. package/source/class/qx/test/ui/LayoutTestCase.js +1 -14
  238. package/source/class/qx/test/ui/basic/Label.js +106 -0
  239. package/source/class/qx/test/ui/core/Blocker.js +125 -3
  240. package/source/class/qx/test/ui/form/Form.js +106 -0
  241. package/source/class/qx/test/ui/form/FormManager.js +6 -5
  242. package/source/class/qx/test/ui/form/SplitButton.js +1 -1
  243. package/source/class/qx/test/ui/toolbar/OverflowHandling.js +13 -14
  244. package/source/class/qx/test/ui/toolbar/ToolBar.js +16 -16
  245. package/source/class/qx/test/ui/tree/TreeFolder.js +5 -7
  246. package/source/class/qx/test/ui/tree/virtual/AbstractTreeTest.js +2 -0
  247. package/source/class/qx/test/ui/tree/virtual/Tree.js +36 -0
  248. package/source/class/qx/test/util/DateFormat.js +1 -1
  249. package/source/class/qx/test/util/PropertyUtil.js +0 -36
  250. package/source/class/qx/theme/classic/Appearance.js +22 -1
  251. package/source/class/qx/theme/indigo/ColorDark.js +2 -0
  252. package/source/class/qx/theme/manager/Font.js +6 -1
  253. package/source/class/qx/theme/manager/Meta.js +2 -1
  254. package/source/class/qx/theme/modern/Appearance.js +21 -0
  255. package/source/class/qx/theme/simple/Appearance.js +52 -95
  256. package/source/class/qx/theme/simple/Decoration.js +0 -1
  257. package/source/class/qx/theme/tangible/Appearance.js +3 -1
  258. package/source/class/qx/tool/cli/AbstractCliApp.js +88 -0
  259. package/source/class/qx/tool/cli/AbstractValue.js +186 -0
  260. package/source/class/qx/tool/cli/Argument.js +155 -0
  261. package/source/class/qx/tool/cli/Command.js +518 -0
  262. package/source/class/qx/tool/cli/Flag.js +202 -0
  263. package/source/class/qx/tool/cli/Parser.js +39 -0
  264. package/source/class/qx/tool/cli/__init__.js +26 -1
  265. package/source/class/qx/tool/compiler/Analyser.js +41 -13
  266. package/source/class/qx/tool/compiler/ClassFile.js +37 -13
  267. package/source/class/qx/tool/compiler/Console.js +2 -0
  268. package/source/class/qx/tool/compiler/MetaDatabase.js +47 -0
  269. package/source/class/qx/tool/compiler/MetaExtraction.js +53 -33
  270. package/source/class/qx/tool/compiler/app/Library.js +1 -1
  271. package/source/class/qx/tool/compiler/app/WebFont.js +2 -0
  272. package/source/class/qx/tool/compiler/cli/Application.js +58 -0
  273. package/source/class/qx/tool/{cli/commands → compiler/cli}/Command.js +99 -45
  274. package/source/class/qx/tool/{cli → compiler/cli}/ConfigDb.js +7 -7
  275. package/source/class/qx/tool/compiler/cli/ConfigLoader.js +272 -0
  276. package/source/class/qx/tool/{cli → compiler/cli}/LibraryApplication.js +3 -3
  277. package/source/class/qx/tool/compiler/cli/RootCommand.js +63 -0
  278. package/source/class/qx/tool/{cli → compiler/cli}/Watch.js +49 -24
  279. package/source/class/qx/tool/compiler/cli/__init__.js +3 -0
  280. package/source/class/qx/tool/{cli → compiler/cli}/api/AbstractApi.js +2 -11
  281. package/source/class/qx/tool/{cli → compiler/cli}/api/CompilerApi.js +11 -10
  282. package/source/class/qx/tool/{cli → compiler/cli}/api/LibraryApi.js +13 -4
  283. package/source/class/qx/tool/{cli → compiler/cli}/api/Test.js +1 -1
  284. package/source/class/qx/tool/compiler/cli/commands/Add.js +49 -0
  285. package/source/class/qx/tool/{cli → compiler/cli}/commands/Clean.js +12 -25
  286. package/source/class/qx/tool/{cli → compiler/cli}/commands/Compile.js +630 -590
  287. package/source/class/qx/tool/{cli → compiler/cli}/commands/Config.js +22 -20
  288. package/source/class/qx/tool/{cli → compiler/cli}/commands/Create.js +78 -55
  289. package/source/class/qx/tool/{cli → compiler/cli}/commands/Deploy.js +45 -60
  290. package/source/class/qx/tool/{cli → compiler/cli}/commands/Es6ify.js +57 -41
  291. package/source/class/qx/tool/{cli → compiler/cli}/commands/ExportGlyphs.js +26 -7
  292. package/source/class/qx/tool/compiler/cli/commands/Lint.js +420 -0
  293. package/source/class/qx/tool/{cli → compiler/cli}/commands/Migrate.js +40 -20
  294. package/source/class/qx/tool/{cli → compiler/cli}/commands/Package.js +20 -32
  295. package/source/class/qx/tool/compiler/cli/commands/Pkg.js +36 -0
  296. package/source/class/qx/tool/compiler/cli/commands/Prettier.js +278 -0
  297. package/source/class/qx/tool/{cli → compiler/cli}/commands/Run.js +43 -39
  298. package/source/class/qx/tool/{cli → compiler/cli}/commands/Serve.js +63 -61
  299. package/source/class/qx/tool/{cli → compiler/cli}/commands/Test.js +49 -52
  300. package/source/class/qx/tool/{cli → compiler/cli}/commands/Typescript.js +70 -62
  301. package/source/class/qx/tool/{cli → compiler/cli}/commands/add/Class.js +54 -31
  302. package/source/class/qx/tool/{cli → compiler/cli}/commands/add/Script.js +57 -33
  303. package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Delete.js +19 -13
  304. package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Get.js +19 -13
  305. package/source/class/qx/tool/{cli → compiler/cli}/commands/config/List.js +20 -20
  306. package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Set.js +28 -20
  307. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Install.js +140 -75
  308. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/List.js +119 -80
  309. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Publish.js +196 -179
  310. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Remove.js +18 -21
  311. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Update.js +92 -71
  312. package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Upgrade.js +67 -54
  313. package/source/class/qx/tool/compiler/makers/AbstractAppMaker.js +2 -1
  314. package/source/class/qx/tool/compiler/resources/Manager.js +2 -0
  315. package/source/class/qx/tool/compiler/resources/ScssConverter.js +1 -1
  316. package/source/class/qx/tool/compiler/resources/ScssFile.js +1 -1
  317. package/source/class/qx/tool/compiler/targets/Target.js +5 -10
  318. package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +9 -2
  319. package/source/class/qx/tool/compiler/targets/meta/ApplicationMeta.js +2 -4
  320. package/source/class/qx/tool/compiler/targets/meta/BootJs.js +2 -0
  321. package/source/class/qx/tool/compiler/targets/meta/Browserify.js +142 -80
  322. package/source/class/qx/tool/compiler/targets/meta/PackageJavascript.js +2 -0
  323. package/source/class/qx/tool/config/Abstract.js +5 -5
  324. package/source/class/qx/tool/config/Lockfile.js +1 -1
  325. package/source/class/qx/tool/migration/BaseMigration.js +9 -7
  326. package/source/class/qx/tool/migration/M6_0_0.js +3 -3
  327. package/source/class/qx/tool/migration/M8_0_0.js +958 -0
  328. package/source/class/qx/tool/utils/Debounce.js +0 -1
  329. package/source/class/qx/tool/utils/Http.js +109 -21
  330. package/source/class/qx/tool/utils/LogManager.js +7 -0
  331. package/source/class/qx/tool/utils/Promisify.js +12 -1
  332. package/source/class/qx/tool/utils/QooxdooVersions.js +193 -0
  333. package/source/class/qx/tool/utils/Utils.js +8 -5
  334. package/source/class/qx/tool/utils/Website.js +9 -222
  335. package/source/class/qx/tool/utils/Zip.js +47 -0
  336. package/source/class/qx/tool/utils/files/Utils.js +3 -11
  337. package/source/class/qx/tool/utils/json/Tokenizer.js +5 -0
  338. package/source/class/qx/ui/basic/Atom.js +8 -8
  339. package/source/class/qx/ui/core/Blocker.js +17 -4
  340. package/source/class/qx/ui/core/DragDropCursor.js +2 -1
  341. package/source/class/qx/ui/core/EventHandler.js +13 -21
  342. package/source/class/qx/ui/core/LayoutItem.js +8 -31
  343. package/source/class/qx/ui/core/MExecutable.js +7 -31
  344. package/source/class/qx/ui/core/MNativeOverflow.js +4 -2
  345. package/source/class/qx/ui/core/Widget.js +50 -165
  346. package/source/class/qx/ui/core/scroll/IScrollBar.js +9 -3
  347. package/source/class/qx/ui/core/scroll/ScrollBar.js +7 -1
  348. package/source/class/qx/ui/core/scroll/ScrollPane.js +12 -4
  349. package/source/class/qx/ui/embed/Html.js +6 -2
  350. package/source/class/qx/ui/form/AbstractField.js +4 -12
  351. package/source/class/qx/ui/form/Button.js +6 -4
  352. package/source/class/qx/ui/form/CheckedSelectBox.js +8 -8
  353. package/source/class/qx/ui/form/FileSelectorButton.js +1 -1
  354. package/source/class/qx/ui/form/Form.js +3 -0
  355. package/source/class/qx/ui/form/IListItem.js +3 -1
  356. package/source/class/qx/ui/form/IRadioItem.js +3 -1
  357. package/source/class/qx/ui/form/MForm.js +3 -1
  358. package/source/class/qx/ui/form/Slider.js +6 -2
  359. package/source/class/qx/ui/form/SplitButton.js +5 -5
  360. package/source/class/qx/ui/form/TextField.js +1 -2
  361. package/source/class/qx/ui/form/validation/Manager.js +6 -2
  362. package/source/class/qx/ui/menubar/Button.js +1 -1
  363. package/source/class/qx/ui/mobile/basic/Atom.js +5 -5
  364. package/source/class/qx/ui/mobile/dialog/Menu.js +9 -31
  365. package/source/class/qx/ui/mobile/dialog/Popup.js +13 -1
  366. package/source/class/qx/ui/table/pane/FocusIndicator.js +5 -2
  367. package/source/class/qx/ui/table/pane/Scroller.js +5 -20
  368. package/source/class/qx/ui/table/selection/Model.js +1 -0
  369. package/source/class/qx/ui/toolbar/Button.js +1 -1
  370. package/source/class/qx/ui/toolbar/CheckBox.js +1 -1
  371. package/source/class/qx/ui/toolbar/FileSelectorButton.js +1 -2
  372. package/source/class/qx/ui/toolbar/Part.js +2 -2
  373. package/source/class/qx/ui/toolbar/PartContainer.js +2 -2
  374. package/source/class/qx/ui/toolbar/ToolBar.js +24 -49
  375. package/source/class/qx/ui/tree/VirtualTree.js +6 -4
  376. package/source/class/qx/ui/tree/core/AbstractItem.js +10 -17
  377. package/source/class/qx/ui/tree/core/IVirtualTree.js +4 -2
  378. package/source/class/qx/ui/tree/provider/IVirtualTreeProvider.js +20 -10
  379. package/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js +4 -1
  380. package/source/class/qx/ui/virtual/cell/Cell.js +20 -48
  381. package/source/class/qx/ui/virtual/cell/WidgetCell.js +2 -4
  382. package/source/class/qx/ui/virtual/core/Axis.js +4 -0
  383. package/source/class/qx/ui/virtual/core/ILayer.js +14 -10
  384. package/source/class/qx/ui/virtual/core/Scroller.js +4 -4
  385. package/source/class/qx/ui/virtual/layer/WidgetCell.js +4 -0
  386. package/source/class/qx/ui/virtual/selection/Abstract.js +3 -0
  387. package/source/class/qx/ui/virtual/selection/MModel.js +1 -1
  388. package/source/class/qx/ui/window/IDesktop.js +6 -2
  389. package/source/class/qx/ui/window/IWindowManager.js +10 -4
  390. package/source/class/qx/ui/window/MDesktop.js +2 -1
  391. package/source/class/qx/ui/window/Manager.js +1 -1
  392. package/source/class/qx/ui/window/Window.js +6 -4
  393. package/source/class/qx/util/OOUtil.js +8 -9
  394. package/source/class/qx/util/PropertyUtil.js +34 -154
  395. package/source/class/qx/util/ResponseParser.js +2 -0
  396. package/source/class/qx/util/Serializer.js +69 -114
  397. package/source/class/qx/util/format/DateFormat.js +3 -2
  398. package/source/global.d.ts +4 -0
  399. package/source/resource/qx/tool/bin/download-assets +0 -2
  400. package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/default.tmpl.js +6 -7
  401. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/cli/templates/class/singleton.tmpl.js +5 -6
  402. package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-node.tmpl.js +1 -0
  403. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/cli/templates/template_vars.js +12 -9
  404. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/Manifest-1-0-0.json +2 -2
  405. package/source/resource/qx/tool/{schema → compiler/schema}/Manifest-2-0-0.json +2 -2
  406. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/compile-1-0-0.json +21 -5
  407. package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/qooxdoo-1-0-0.json +1 -1
  408. package/source/resource/qx/tool/website/build/404.html +22 -22
  409. package/source/resource/qx/tool/website/build/about.html +23 -23
  410. package/source/resource/qx/tool/website/build/assets/common.js +30 -18
  411. package/source/resource/qx/tool/website/build/assets/custom.css +290 -0
  412. package/source/resource/qx/tool/website/build/assets/qxWeb.js +28 -0
  413. package/source/resource/qx/tool/website/build/diagnostics/dependson.html +30 -30
  414. package/source/resource/qx/tool/website/build/diagnostics/dependson.js +49 -40
  415. package/source/resource/qx/tool/website/build/diagnostics/requiredby.html +20 -23
  416. package/source/resource/qx/tool/website/build/diagnostics/requiredby.js +38 -31
  417. package/source/resource/qx/tool/website/build/index.html +24 -24
  418. package/source/resource/qx/tool/website/build/scripts/serve.js +63 -65
  419. package/source/resource/qx/tool/website/partials/footer.html +8 -13
  420. package/source/resource/qx/tool/website/partials/head.html +9 -7
  421. package/source/resource/qx/tool/website/partials/header.html +3 -3
  422. package/source/resource/qx/tool/website/src/assets/common.js +32 -0
  423. package/source/resource/qx/tool/website/src/assets/custom.css +290 -0
  424. package/source/resource/qx/tool/website/src/assets/qxWeb.js +28 -0
  425. package/source/resource/qx/tool/website/src/diagnostics/dependson.js +49 -40
  426. package/source/resource/qx/tool/website/src/diagnostics/requiredby.js +38 -31
  427. package/source/resource/qx/tool/website/src/index.html +2 -2
  428. package/source/resource/qx/tool/website/src/scripts/serve.js +63 -65
  429. package/lib/resource/qx/tool/bin/build-devtools +0 -13
  430. package/lib/resource/qx/tool/bin/build-website +0 -15
  431. package/lib/resource/qx/tool/bin/download-assets +0 -23
  432. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +0 -1
  433. package/lib/resource/qx/tool/website/build/assets/bootstrap.css +0 -7
  434. package/lib/resource/qx/tool/website/build/assets/bootstrap.min.css +0 -7
  435. package/lib/resource/qx/tool/website/build/assets/bootstrap.min.css.map +0 -1
  436. package/lib/resource/qx/tool/website/build/assets/jquery.js +0 -5453
  437. package/lib/resource/qx/tool/website/build/qooxdoo.css +0 -21
  438. package/lib/resource/qx/tool/website/sass/qooxdoo.css +0 -3
  439. package/lib/resource/qx/tool/website/sass/qooxdoo.css.map +0 -1
  440. package/lib/resource/qx/tool/website/src/assets/bootstrap.css +0 -7
  441. package/lib/resource/qx/tool/website/src/assets/bootstrap.min.css +0 -7
  442. package/lib/resource/qx/tool/website/src/assets/bootstrap.min.css.map +0 -1
  443. package/lib/resource/qx/tool/website/src/assets/jquery.js +0 -5453
  444. package/source/class/qx/core/Property.js +0 -2100
  445. package/source/class/qx/tool/cli/Application.js +0 -47
  446. package/source/class/qx/tool/cli/Cli.js +0 -713
  447. package/source/class/qx/tool/cli/commands/Add.js +0 -46
  448. package/source/class/qx/tool/cli/commands/Lint.js +0 -255
  449. package/source/class/qx/tool/cli/commands/Pkg.js +0 -56
  450. package/source/class/qx/tool/cli/commands/package/Migrate.js +0 -37
  451. package/source/class/qx/tool/compiler/app/Cldr.js +0 -725
  452. package/source/resource/qx/tool/bin/build-devtools +0 -13
  453. package/source/resource/qx/tool/bin/build-website +0 -15
  454. package/source/resource/qx/tool/website/build/assets/bootstrap.css +0 -7
  455. package/source/resource/qx/tool/website/build/assets/bootstrap.min.css +0 -7
  456. package/source/resource/qx/tool/website/build/assets/bootstrap.min.css.map +0 -1
  457. package/source/resource/qx/tool/website/build/assets/jquery.js +0 -5453
  458. package/source/resource/qx/tool/website/build/qooxdoo.css +0 -21
  459. package/source/resource/qx/tool/website/sass/qooxdoo.scss +0 -31
  460. package/source/resource/qx/tool/website/src/assets/bootstrap.css +0 -7
  461. package/source/resource/qx/tool/website/src/assets/bootstrap.min.css +0 -7
  462. package/source/resource/qx/tool/website/src/assets/bootstrap.min.css.map +0 -1
  463. package/source/resource/qx/tool/website/src/assets/jquery.js +0 -5453
  464. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/TypeScriptWriter-base_declaration.d.ts +0 -0
  465. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/header.tmpl.js +0 -0
  466. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/interface.tmpl.js +0 -0
  467. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/mixin.tmpl.js +0 -0
  468. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-browser.tmpl.js +0 -0
  469. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-rhino.tmpl.js +0 -0
  470. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/.gitignore.tmpl +0 -0
  471. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/Manifest.tmpl.json +0 -0
  472. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/compile.tmpl.json +0 -0
  473. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/readme.tmpl.md +0 -0
  474. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/index.tmpl.html +0 -0
  475. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/nojs.tmpl.html +0 -0
  476. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +0 -0
  477. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/__init__.tmpl.js +0 -0
  478. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +0 -0
  479. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Appearance.tmpl.js +0 -0
  480. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Color.tmpl.js +0 -0
  481. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Decoration.tmpl.js +0 -0
  482. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Font.tmpl.js +0 -0
  483. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Theme.tmpl.js +0 -0
  484. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/app.png +0 -0
  485. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/favicon.png +0 -0
  486. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/js_256x256.png +0 -0
  487. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/test.png +0 -0
  488. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/translation/readme.txt +0 -0
  489. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/.gitignore.tmpl +0 -0
  490. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/Manifest.tmpl.json +0 -0
  491. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/compile.tmpl.json +0 -0
  492. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/readme.tmpl.md +0 -0
  493. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/index.tmpl.html +0 -0
  494. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/nojs.tmpl.html +0 -0
  495. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +0 -0
  496. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/__init__.tmpl.js +0 -0
  497. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +0 -0
  498. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +0 -0
  499. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/__init__.tmpl.js +0 -0
  500. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/app.png +0 -0
  501. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/css/.gitignore.tmpl +0 -0
  502. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/favicon.png +0 -0
  503. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/js_256x256.png +0 -0
  504. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/css/custom.css +0 -0
  505. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/translation/readme.txt +0 -0
  506. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/.gitignore.tmpl +0 -0
  507. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/Manifest.tmpl.json +0 -0
  508. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/compile.tmpl.json +0 -0
  509. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/readme.tmpl.md +0 -0
  510. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/Button.tmpl.js +0 -0
  511. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/__init__.tmpl.js +0 -0
  512. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +0 -0
  513. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/resource/custom/test.png +0 -0
  514. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +0 -0
  515. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Appearance.tmpl.js +0 -0
  516. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Color.tmpl.js +0 -0
  517. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Decoration.tmpl.js +0 -0
  518. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Font.tmpl.js +0 -0
  519. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Theme.tmpl.js +0 -0
  520. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/resource/custom/test.png +0 -0
  521. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/translation/readme.txt +0 -0
  522. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/.gitignore.tmpl +0 -0
  523. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/Manifest.tmpl.json +0 -0
  524. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/compile.tmpl.json +0 -0
  525. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/readme.tmpl.txt +0 -0
  526. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/Application.tmpl.js +0 -0
  527. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/__init__.tmpl.js +0 -0
  528. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +0 -0
  529. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/resource/custom/.gitignore.tmpl +0 -0
  530. /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/translation/readme.txt +0 -0
  531. /package/lib/resource/qx/tool/{loadsass.js → compiler/loadsass.js} +0 -0
  532. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/TypeScriptWriter-base_declaration.d.ts +0 -0
  533. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/header.tmpl.js +0 -0
  534. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/interface.tmpl.js +0 -0
  535. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/mixin.tmpl.js +0 -0
  536. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-browser.tmpl.js +0 -0
  537. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-rhino.tmpl.js +0 -0
  538. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/.gitignore.tmpl +0 -0
  539. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/Manifest.tmpl.json +0 -0
  540. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/compile.tmpl.json +0 -0
  541. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/readme.tmpl.md +0 -0
  542. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/index.tmpl.html +0 -0
  543. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/nojs.tmpl.html +0 -0
  544. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +0 -0
  545. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/__init__.tmpl.js +0 -0
  546. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +0 -0
  547. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Appearance.tmpl.js +0 -0
  548. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Color.tmpl.js +0 -0
  549. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Decoration.tmpl.js +0 -0
  550. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Font.tmpl.js +0 -0
  551. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Theme.tmpl.js +0 -0
  552. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/app.png +0 -0
  553. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/favicon.png +0 -0
  554. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/js_256x256.png +0 -0
  555. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/test.png +0 -0
  556. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/translation/readme.txt +0 -0
  557. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/.gitignore.tmpl +0 -0
  558. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/Manifest.tmpl.json +0 -0
  559. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/compile.tmpl.json +0 -0
  560. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/readme.tmpl.md +0 -0
  561. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/index.tmpl.html +0 -0
  562. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/nojs.tmpl.html +0 -0
  563. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +0 -0
  564. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/__init__.tmpl.js +0 -0
  565. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +0 -0
  566. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +0 -0
  567. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/__init__.tmpl.js +0 -0
  568. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/app.png +0 -0
  569. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/css/.gitignore.tmpl +0 -0
  570. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/favicon.png +0 -0
  571. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/js_256x256.png +0 -0
  572. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/scss/_styles.scss +0 -0
  573. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/scss/custom.scss +0 -0
  574. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/translation/readme.txt +0 -0
  575. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/.gitignore.tmpl +0 -0
  576. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/Manifest.tmpl.json +0 -0
  577. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/compile.tmpl.json +0 -0
  578. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/readme.tmpl.md +0 -0
  579. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/Button.tmpl.js +0 -0
  580. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/__init__.tmpl.js +0 -0
  581. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +0 -0
  582. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/resource/custom/test.png +0 -0
  583. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +0 -0
  584. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Appearance.tmpl.js +0 -0
  585. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Color.tmpl.js +0 -0
  586. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Decoration.tmpl.js +0 -0
  587. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Font.tmpl.js +0 -0
  588. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Theme.tmpl.js +0 -0
  589. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/resource/custom/test.png +0 -0
  590. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/translation/readme.txt +0 -0
  591. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/.gitignore.tmpl +0 -0
  592. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/Manifest.tmpl.json +0 -0
  593. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/compile.tmpl.json +0 -0
  594. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/readme.tmpl.txt +0 -0
  595. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/Application.tmpl.js +0 -0
  596. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/__init__.tmpl.js +0 -0
  597. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +0 -0
  598. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/resource/custom/.gitignore.tmpl +0 -0
  599. /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/translation/readme.txt +0 -0
  600. /package/source/resource/qx/tool/{loadsass.js → compiler/loadsass.js} +0 -0
@@ -13,12 +13,13 @@
13
13
 
14
14
  Authors:
15
15
  * John Spackman (john.spackman@zenesis.com, @johnspackman)
16
+ * Henner Kollmann (Henner.Kollmann@gmx.de, @hkollmann)
16
17
 
17
18
  ************************************************************************ */
18
19
 
19
- const process = require("process");
20
- const Gauge = require("gauge");
21
20
  const semver = require("semver");
21
+ const process = require("process");
22
+ const cliProgress = require("cli-progress");
22
23
  const path = require("upath");
23
24
  const consoleControl = require("console-control-strings");
24
25
  const fs = qx.tool.utils.Promisify.fs;
@@ -27,224 +28,292 @@ require("app-module-path").addPath(process.cwd() + "/node_modules");
27
28
 
28
29
  /**
29
30
  * Handles compilation of the project
30
- * @ignore(setImmediate)
31
31
  */
32
- qx.Class.define("qx.tool.cli.commands.Compile", {
33
- extend: qx.tool.cli.commands.Command,
32
+ qx.Class.define("qx.tool.compiler.cli.commands.Compile", {
33
+ extend: qx.tool.compiler.cli.Command,
34
34
 
35
35
  statics: {
36
- YARGS_BUILDER: {
37
- target: {
38
- alias: "t",
39
- describe:
40
- "Set the target type: source or build or class name. Default is first target in config file",
41
- requiresArg: true,
42
- type: "string"
43
- },
36
+ /**
37
+ * Creates and configures the CLI command for the compile subcommand
38
+ * @param clazz {Function} the class to instantiate as the command handler
39
+ * @return {Promise<qx.tool.cli.Command>} the configured command
40
+ */
41
+ async createCliCommand(clazz = this) {
42
+ let cmd = await qx.tool.compiler.cli.Command.createCliCommand(clazz);
43
+ cmd.set({
44
+ name: "compile",
45
+ description: "compiles the current application, using compile.json"
46
+ });
44
47
 
45
- "output-path-prefix": {
46
- describe:
47
- "Sets a prefix for the output path of the target - used to compile a version into a non-standard directory",
48
- type: "string"
49
- },
48
+ cmd.addFlag(
49
+ new qx.tool.cli.Flag("download").set({
50
+ shortCode: "d",
51
+ description: "Whether to automatically download missing libraries",
52
+ type: "boolean",
53
+ value: true
54
+ })
55
+ );
50
56
 
51
- download: {
52
- alias: "d",
53
- describe: "Whether to automatically download missing libraries",
54
- type: "boolean",
55
- default: true
56
- },
57
+ cmd.addFlag(
58
+ new qx.tool.cli.Flag("update-po-files").set({
59
+ shortCode: "u",
60
+ description:
61
+ "enables detection of translations and writing them out into .po files",
62
+ type: "boolean",
63
+ value: false
64
+ })
65
+ );
57
66
 
58
- locale: {
59
- alias: "l",
60
- describe: "Compile for a given locale",
61
- nargs: 1,
62
- requiresArg: true,
63
- type: "string",
64
- array: true
65
- },
67
+ cmd.addFlag(
68
+ new qx.tool.cli.Flag("library-po").set({
69
+ description: "The policy for updating translations in libraries",
70
+ type: ["ignore", "untranslated", "all"],
71
+ value: "ignore"
72
+ })
73
+ );
66
74
 
67
- "update-po-files": {
68
- alias: "u",
69
- describe:
70
- "enables detection of translations and writing them out into .po files",
71
- type: "boolean",
72
- default: false
73
- },
75
+ cmd.addFlag(
76
+ new qx.tool.cli.Flag("write-all-translations").set({
77
+ description:
78
+ "enables output of all translations, not just those that are explicitly referenced",
79
+ type: "boolean"
80
+ })
81
+ );
74
82
 
75
- "library-po": {
76
- describe: "The policy for updating translations in libraries",
77
- type: ["ignore", "untranslated", "all"],
78
- default: "ignore"
79
- },
83
+ cmd.addFlag(
84
+ new qx.tool.cli.Flag("target").set({
85
+ shortCode: "t",
86
+ description:
87
+ "Set the target type: source or build or class name. Default is first target in config file",
88
+ required: true,
89
+ type: "string",
90
+ value: "source"
91
+ })
92
+ );
80
93
 
81
- "write-all-translations": {
82
- describe:
83
- "enables output of all translations, not just those that are explicitly referenced",
84
- type: "boolean"
85
- },
94
+ cmd.addFlag(
95
+ new qx.tool.cli.Flag("output-path-prefix").set({
96
+ description:
97
+ "Sets a prefix for the output path of the target - used to compile a version into a non-standard directory",
98
+ type: "string"
99
+ })
100
+ );
86
101
 
87
- "app-class": {
88
- describe: "sets the application class",
89
- nargs: 1,
90
- requiresArg: true,
91
- type: "string"
92
- },
102
+ cmd.addFlag(
103
+ new qx.tool.cli.Flag("locale").set({
104
+ shortCode: "l",
105
+ description: "Compile for a given locale",
106
+ array: true,
107
+ type: "string",
108
+ value: ["en"]
109
+ })
110
+ );
93
111
 
94
- "app-theme": {
95
- describe: "sets the theme class for the current application",
96
- nargs: 1,
97
- requiresArg: true,
98
- type: "string"
99
- },
112
+ cmd.addFlag(
113
+ new qx.tool.cli.Flag("app-class").set({
114
+ description: "sets the application class",
115
+ array: true,
116
+ type: "string"
117
+ })
118
+ );
100
119
 
101
- "app-name": {
102
- describe: "sets the name of the current application",
103
- nargs: 1,
104
- requiresArg: true,
105
- type: "string"
106
- },
120
+ cmd.addFlag(
121
+ new qx.tool.cli.Flag("app-theme").set({
122
+ description: "sets the theme class for the current application",
123
+ array: true,
124
+ type: "string"
125
+ })
126
+ );
107
127
 
108
- "app-group": {
109
- describe: "which application groups to compile (defaults to all)",
110
- nargs: 1,
111
- requiresArg: true,
112
- type: "string"
113
- },
128
+ cmd.addFlag(
129
+ new qx.tool.cli.Flag("app-name").set({
130
+ description: "sets the name of the current application",
131
+ array: true,
132
+ type: "string"
133
+ })
134
+ );
114
135
 
115
- "local-fonts": {
116
- describe: "whether to prefer local font files over CDN",
117
- type: "boolean"
118
- },
136
+ cmd.addFlag(
137
+ new qx.tool.cli.Flag("app-group").set({
138
+ description: "which application groups to compile (defaults to all)",
139
+ type: "string"
140
+ })
141
+ );
119
142
 
120
- watch: {
121
- describe: "enables watching for changes and continuous compilation",
122
- type: "boolean",
123
- alias: "w"
124
- },
143
+ cmd.addFlag(
144
+ new qx.tool.cli.Flag("watch").set({
145
+ description:
146
+ "enables watching for changes and continuous compilation",
147
+ type: "boolean",
148
+ shortCode: "w",
149
+ value: false
150
+ })
151
+ );
125
152
 
126
- "watch-debug": {
127
- describe: "enables debug messages for watching",
128
- type: "boolean"
129
- },
153
+ cmd.addFlag(
154
+ new qx.tool.cli.Flag("watch-debug").set({
155
+ description: "enables debug messages for watching",
156
+ type: "boolean",
157
+ value: false
158
+ })
159
+ );
160
+
161
+ cmd.addFlag(
162
+ new qx.tool.cli.Flag("machine-readable").set({
163
+ shortCode: "M",
164
+ description: "output compiler messages in machine-readable format",
165
+ type: "boolean",
166
+ value: false
167
+ })
168
+ );
130
169
 
131
- "machine-readable": {
132
- alias: "M",
133
- describe: "output compiler messages in machine-readable format",
134
- type: "boolean"
135
- },
170
+ cmd.addFlag(
171
+ new qx.tool.cli.Flag("minify").set({
172
+ shortCode: "m",
173
+ description: "disables minification (build targets only)",
174
+ type: ["off", "minify", "mangle", "beautify"],
175
+ value: "mangle"
176
+ })
177
+ );
136
178
 
137
- minify: {
138
- alias: "m",
139
- describe: "disables minification (build targets only)",
140
- choices: ["off", "minify", "mangle", "beautify"],
141
- default: "mangle"
142
- },
179
+ cmd.addFlag(
180
+ new qx.tool.cli.Flag("mangle-privates").set({
181
+ description: "Whether to mangle private variables",
182
+ type: "boolean"
183
+ })
184
+ );
143
185
 
144
- "mangle-privates": {
145
- describe: "Whether to mangle private variables",
146
- default: true,
147
- type: "boolean"
148
- },
186
+ cmd.addFlag(
187
+ new qx.tool.cli.Flag("save-source-in-map").set({
188
+ description:
189
+ "Saves the source code in the map file (build target only)",
190
+ type: "boolean"
191
+ })
192
+ );
149
193
 
150
- "save-source-in-map": {
151
- describe: "Saves the source code in the map file (build target only)",
152
- type: "boolean",
153
- default: false
154
- },
194
+ cmd.addFlag(
195
+ new qx.tool.cli.Flag("source-map-relative-paths").set({
196
+ description:
197
+ "If true, the source file will be saved in the map file if the target supports it. Can be overridden on a per application basis.",
198
+ type: "boolean"
199
+ })
200
+ );
155
201
 
156
- "source-map-relative-paths": {
157
- describe:
158
- "If true, the source file will be saved in the map file if the target supports it. Can be overridden on a per application basis.",
159
- type: "boolean",
160
- default: false
161
- },
202
+ cmd.addFlag(
203
+ new qx.tool.cli.Flag("save-unminified").set({
204
+ shortCode: "u",
205
+ description:
206
+ "Saves a copy of the unminified version of output files (build target only)",
207
+ type: "boolean"
208
+ })
209
+ );
162
210
 
163
- "save-unminified": {
164
- alias: "u",
165
- describe:
166
- "Saves a copy of the unminified version of output files (build target only)",
167
- type: "boolean",
168
- default: false
169
- },
211
+ cmd.addFlag(
212
+ new qx.tool.cli.Flag("inline-external-scripts").set({
213
+ description: "Inlines external Javascript",
214
+ type: "boolean"
215
+ })
216
+ );
170
217
 
171
- "inline-external-scripts": {
172
- describe: "Inlines external Javascript",
173
- type: "boolean"
174
- },
218
+ cmd.addFlag(
219
+ new qx.tool.cli.Flag("erase").set({
220
+ shortCode: "e",
221
+ description:
222
+ "Enabled automatic deletion of the output directory when compiler version or environment variables change",
223
+ type: "boolean",
224
+ value: true
225
+ })
226
+ );
175
227
 
176
- erase: {
177
- alias: "e",
178
- describe:
179
- "Enabled automatic deletion of the output directory when compiler version or environment variables change",
180
- type: "boolean",
181
- default: true
182
- },
228
+ cmd.addFlag(
229
+ new qx.tool.cli.Flag("feedback").set({
230
+ description: "Shows progress bar feedback",
231
+ type: "boolean",
232
+ shortCode: "f",
233
+ value: false
234
+ })
235
+ );
183
236
 
184
- feedback: {
185
- describe: "Shows gas-gauge feedback",
186
- type: "boolean",
187
- alias: "f"
188
- },
237
+ cmd.addFlag(
238
+ new qx.tool.cli.Flag("typescript").set({
239
+ shortCode: "T",
240
+ description: "Outputs typescript definitions in qooxdoo.d.ts",
241
+ type: "boolean",
242
+ value: false
243
+ })
244
+ );
189
245
 
190
- typescript: {
191
- alias: "T",
192
- describe: "Outputs typescript definitions in qooxdoo.d.ts",
193
- type: "boolean",
194
- default: null
195
- },
246
+ cmd.addFlag(
247
+ new qx.tool.cli.Flag("add-created-at").set({
248
+ description: "Adds code to populate object's $$createdAt",
249
+ type: "boolean",
250
+ value: false
251
+ })
252
+ );
196
253
 
197
- "add-created-at": {
198
- describe: "Adds code to populate object's $$createdAt",
199
- type: "boolean"
200
- },
254
+ cmd.addFlag(
255
+ new qx.tool.cli.Flag("clean").set({
256
+ shortCode: "D",
257
+ description: "Deletes the target dir before compile",
258
+ type: "boolean",
259
+ value: false
260
+ })
261
+ );
201
262
 
202
- "verbose-created-at": {
203
- describe: "Adds additional detail to $$createdAt",
204
- type: "boolean"
205
- },
263
+ cmd.addFlag(
264
+ new qx.tool.cli.Flag("warn-as-error").set({
265
+ shortCode: "w",
266
+ description: "Handle compiler warnings as error",
267
+ type: "boolean",
268
+ value: false
269
+ })
270
+ );
206
271
 
207
- clean: {
208
- alias: "D",
209
- describe: "Deletes the target dir before compile",
210
- type: "boolean"
211
- },
272
+ cmd.addFlag(
273
+ new qx.tool.cli.Flag("write-library-info").set({
274
+ shortCode: "I",
275
+ description:
276
+ "Write library information to the script, for reflection",
277
+ type: "boolean",
278
+ value: true
279
+ })
280
+ );
212
281
 
213
- "warn-as-error": {
214
- alias: "E",
215
- describe: "Handle compiler warnings as error",
216
- type: "boolean",
217
- default: false
218
- },
282
+ cmd.addFlag(
283
+ new qx.tool.cli.Flag("write-compile-info").set({
284
+ description:
285
+ "Write application summary information to the script, used mostly for unit tests",
286
+ type: "boolean",
287
+ value: false
288
+ })
289
+ );
219
290
 
220
- "write-library-info": {
221
- alias: "I",
222
- describe: "Write library information to the script, for reflection",
223
- type: "boolean",
224
- default: true
225
- },
291
+ cmd.addFlag(
292
+ new qx.tool.cli.Flag("bundling").set({
293
+ shortCode: "b",
294
+ description: "Whether bundling is enabled",
295
+ type: "boolean",
296
+ value: true
297
+ })
298
+ );
226
299
 
227
- "write-compile-info": {
228
- describe:
229
- "Write application summary information to the script, used mostly for unit tests",
230
- type: "boolean",
231
- default: false
232
- },
300
+ cmd.addFlag(
301
+ new qx.tool.cli.Flag("set").set({
302
+ description: "sets an environment value for the compiler",
303
+ type: "string",
304
+ array: true
305
+ })
306
+ );
233
307
 
234
- bundling: {
235
- alias: "b",
236
- describe: "Whether bundling is enabled",
237
- type: "boolean",
238
- default: true
239
- }
240
- },
308
+ cmd.addFlag(
309
+ new qx.tool.cli.Flag("set-env").set({
310
+ description: "sets an environment value for the application",
311
+ type: "string",
312
+ array: true
313
+ })
314
+ );
241
315
 
242
- getYargsCommand() {
243
- return {
244
- command: "compile",
245
- describe: "compiles the current application, using compile.json",
246
- builder: qx.tool.cli.commands.Compile.YARGS_BUILDER
247
- };
316
+ return cmd;
248
317
  }
249
318
  },
250
319
 
@@ -281,13 +350,8 @@ qx.Class.define("qx.tool.cli.commands.Compile", {
281
350
  *
282
351
  * Note that target.getAppMeta() will return null after this event has been fired
283
352
  */
284
- writtenApplications: "qx.event.type.Data",
285
353
 
286
- /**
287
- * Fired after writing of all meta data; data is an object containing:
288
- * maker {qx.tool.compiler.makers.Maker}
289
- */
290
- writtenMetaData: "qx.event.type.Data",
354
+ writtenApplications: "qx.event.type.Data",
291
355
 
292
356
  /**
293
357
  * Fired when a class is about to be compiled.
@@ -358,11 +422,19 @@ qx.Class.define("qx.tool.cli.commands.Compile", {
358
422
  minifiedApplication: "qx.event.type.Data"
359
423
  },
360
424
 
425
+ properties: {},
426
+
361
427
  members: {
362
- __gauge: null,
428
+ /** @type{cliProgress.SingleBar|null} progress bar instance */
429
+ __progressBar: null,
430
+ /** @type{qx.tool.compiler.makers.Maker[]|null} list of makers created from config */
363
431
  __makers: null,
432
+ /** @type{Object} map of namespace to Library instance */
364
433
  __libraries: null,
434
+ /** @type{Boolean} true if the output directory was created during this run */
365
435
  __outputDirWasCreated: false,
436
+ /** @type {Boolean} Whether libraries have had their `.load()` method called yet */
437
+ __librariesNotified: false,
366
438
 
367
439
  /** @type{String} the path to the root of the meta files by classname */
368
440
  __metaDir: null,
@@ -370,16 +442,32 @@ qx.Class.define("qx.tool.cli.commands.Compile", {
370
442
  /** @type{Boolean} whether the typescript output is enabled */
371
443
  __typescriptEnabled: false,
372
444
 
373
- /** @type{String} the name of the typescript file to generate */
445
+ /** @type{String} the name of the typescript file to generate, null = use default */
374
446
  __typescriptFile: null,
375
447
 
376
- /*
448
+ /** @type{Boolean} whether the typescript watcher has already been attached (watch mode) */
449
+ __typescriptWatcherAttached: false,
450
+
451
+ /**
377
452
  * @Override
378
453
  */
379
454
  async process() {
380
- await super.process();
455
+ let configDb = await qx.tool.compiler.cli.ConfigDb.getInstance();
456
+ if (this.argv.set) {
457
+ this.argv.set.forEach(function (kv) {
458
+ var m = kv.match(/^([^=\s]+)(=(.+))?$/);
459
+ if (m) {
460
+ var key = m[1];
461
+ var value = m[3];
462
+ configDb.setOverride(key, value);
463
+ } else {
464
+ throw new qx.tool.utils.Utils.UserError(
465
+ `Failed to parse environment setting commandline option '--set ${kv}'`
466
+ );
467
+ }
468
+ });
469
+ }
381
470
 
382
- let configDb = await qx.tool.cli.ConfigDb.getInstance();
383
471
  if (this.argv["feedback"] === null) {
384
472
  this.argv["feedback"] = configDb.db("qx.default.feedback", true);
385
473
  }
@@ -393,7 +481,6 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
393
481
  if (this.argv["machine-readable"]) {
394
482
  qx.tool.compiler.Console.getInstance().setMachineReadable(true);
395
483
  } else {
396
- let configDb = await qx.tool.cli.ConfigDb.getInstance();
397
484
  let color = configDb.db("qx.default.color", null);
398
485
  if (color) {
399
486
  let colorOn = consoleControl.color(color.split(" "));
@@ -408,20 +495,15 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
408
495
  }
409
496
 
410
497
  if (this.argv["feedback"]) {
411
- var themes = require("gauge/themes");
412
- var ourTheme = themes.newTheme(
413
- themes({ hasUnicode: true, hasColor: true })
414
- );
415
-
416
498
  let colorOn = qx.tool.compiler.Console.getInstance().getColorOn();
417
- ourTheme.preProgressbar = colorOn + ourTheme.preProgressbar;
418
- ourTheme.preSubsection = colorOn + ourTheme.preSubsection;
419
- ourTheme.progressbarTheme.postComplete += colorOn;
420
- ourTheme.progressbarTheme.postRemaining += colorOn;
421
-
422
- this.__gauge = new Gauge();
423
- this.__gauge.setTheme(ourTheme);
424
- this.__gauge.show("Compiling", 0);
499
+
500
+ this.__progressBar = new cliProgress.SingleBar({
501
+ format: colorOn + 'Progress |{bar}| {percentage}% | {status}',
502
+ barCompleteChar: '\u2588',
503
+ barIncompleteChar: '\u2591',
504
+ hideCursor: true
505
+ });
506
+ this.__progressBar.start(100, 0, { status: 'Compiling' });
425
507
  const TYPES = {
426
508
  error: "ERROR",
427
509
  warning: "Warning"
@@ -430,60 +512,122 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
430
512
  qx.tool.compiler.Console.getInstance().setWriter((str, msgId) => {
431
513
  msgId = qx.tool.compiler.Console.MESSAGE_IDS[msgId];
432
514
  if (!msgId || msgId.type !== "message") {
433
- this.__gauge.hide();
515
+ this.__progressBar.stop();
434
516
  qx.tool.compiler.Console.log(
435
517
  colorOn + TYPES[(msgId || {}).type || "error"] + ": " + str
436
518
  );
437
-
438
- this.__gauge.show();
519
+ this.__progressBar.start(100, this.__progressBar.value || 0, {
520
+ status: this.__progressBar.payload?.status || 'Compiling'
521
+ });
439
522
  } else {
440
- this.__gauge.show(colorOn + str);
523
+ this.__progressBar.update(this.__progressBar.value || 0, { status: colorOn + str });
441
524
  }
442
525
  });
443
526
  }
444
527
  }
528
+ let parsedArgs = {
529
+ target: this.argv.target,
530
+ outputPath: null,
531
+ locales: null,
532
+ writeAllTranslations: this.argv.writeAllTranslations,
533
+ environment: {},
534
+ verbose: this.argv.verbose
535
+ };
536
+
537
+ if (this.argv.locale && this.argv.locale.length) {
538
+ parsedArgs.locales = this.argv.locale;
539
+ }
540
+
541
+ if (this.argv["set-env"]) {
542
+ this.argv["set-env"].forEach(function (kv) {
543
+ var m = kv.match(/^([^=\s]+)(=(.+))?$/);
544
+ var key = m[1];
545
+ var value = m[3];
546
+ parsedArgs.environment[key] = value;
547
+ });
548
+ }
549
+
550
+ let targetType = this.getCompilerApi().getCommand().getTargetType();
551
+ let config = this.getCompilerApi().getConfiguration();
552
+
553
+ if (!config.locales) {
554
+ config.locales = [];
555
+ }
556
+ if (typeof parsedArgs.writeAllTranslations == "boolean") {
557
+ config.writeAllTranslations = parsedArgs.writeAllTranslations;
558
+ }
559
+
560
+ if (!config.environment) {
561
+ config.environment = {};
562
+ }
445
563
 
446
- if (this.__gauge) {
564
+ // Set the environment variables coming from command line arguments
565
+ // in target's environment object. If that object doesn't exist create
566
+ // one and assign it to the target.
567
+ if (config.targets) {
568
+ const target = config.targets.find(
569
+ target => target.type === targetType
570
+ );
571
+
572
+ target.environment = target.environment || {};
573
+ qx.lang.Object.mergeWith(
574
+ target.environment,
575
+ parsedArgs.environment,
576
+ true
577
+ );
578
+ }
579
+
580
+ if (config.sass && config.sass.compiler !== undefined) {
581
+ qx.tool.compiler.resources.ScssConverter.USE_V6_COMPILER =
582
+ config.sass.compiler == "latest";
583
+ } else {
584
+ qx.tool.compiler.resources.ScssConverter.USE_V6_COMPILER = null;
585
+ }
586
+ if (config.sass && config.sass.copyOriginal) {
587
+ qx.tool.compiler.resources.ScssConverter.COPY_ORIGINAL_FILES = true;
588
+ }
589
+
590
+ if (this.__progressBar) {
447
591
  this.addListener("writingApplications", () =>
448
- this.__gauge.show("Writing Applications", 0)
592
+ this.__progressBar.update(0, { status: "Writing Applications" })
449
593
  );
450
594
 
451
595
  this.addListener("writtenApplications", () =>
452
- this.__gauge.show("Writing Applications", 1)
596
+ this.__progressBar.update(100, { status: "Writing Applications" })
453
597
  );
454
598
 
455
599
  this.addListener("writingApplication", evt =>
456
- this.__gauge.pulse(
457
- "Writing Application " +
600
+ this.__progressBar.increment({
601
+ status: "Writing Application " +
458
602
  evt.getData().appMeta.getApplication().getName()
459
- )
603
+ })
460
604
  );
461
605
 
462
606
  this.addListener("compilingClass", evt =>
463
- this.__gauge.pulse(
464
- "Compiling " + evt.getData().classFile.getClassName()
465
- )
607
+ this.__progressBar.increment({
608
+ status: "Compiling " + evt.getData().classFile.getClassName()
609
+ })
466
610
  );
467
611
 
468
612
  this.addListener("minifyingApplication", evt =>
469
- this.__gauge.pulse(
470
- "Minifying " +
613
+ this.__progressBar.increment({
614
+ status: "Minifying " +
471
615
  evt.getData().application.getName() +
472
616
  " " +
473
617
  evt.getData().filename
474
- )
618
+ })
475
619
  );
476
620
  } else {
477
621
  this.addListener("writingApplication", evt => {
478
622
  let appInfo = evt.getData();
479
623
  qx.tool.compiler.Console.print(
480
- "qx.tool.cli.compile.writingApplication",
624
+ "qx.tool.compiler.cli.compile.writingApplication",
481
625
  appInfo.appMeta.getApplication().getName()
482
626
  );
483
627
  });
484
628
  this.addListener("minifyingApplication", evt =>
485
629
  qx.tool.compiler.Console.print(
486
- "qx.tool.cli.compile.minifyingApplication",
630
+ "qx.tool.compiler.cli.compile.minifyingApplication",
487
631
  evt.getData().application.getName(),
488
632
  evt.getData().filename
489
633
  )
@@ -491,18 +635,18 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
491
635
  }
492
636
 
493
637
  this.addListener("making", evt => {
494
- if (this.__gauge) {
495
- this.__gauge.show("Compiling", 1);
638
+ if (this.__progressBar) {
639
+ this.__progressBar.update(100, { status: "Compiling" });
496
640
  } else {
497
- qx.tool.compiler.Console.print("qx.tool.cli.compile.makeBegins");
641
+ qx.tool.compiler.Console.print("qx.tool.compiler.cli.compile.makeBegins");
498
642
  }
499
643
  });
500
644
 
501
645
  this.addListener("made", evt => {
502
- if (this.__gauge) {
503
- this.__gauge.show("Compiling", 1);
646
+ if (this.__progressBar) {
647
+ this.__progressBar.update(100, { status: "Compiling" });
504
648
  } else {
505
- qx.tool.compiler.Console.print("qx.tool.cli.compile.makeEnds");
649
+ qx.tool.compiler.Console.print("qx.tool.compiler.cli.compile.makeEnds");
506
650
  }
507
651
  });
508
652
 
@@ -537,17 +681,17 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
537
681
  ) {
538
682
  qx.tool.compiler.Console.warn(
539
683
  " *******************************************************************************************\n" +
540
- " ** **\n" +
541
- " ** Your compilation will include temporary files that are only necessary during **\n" +
542
- " ** development; these files speed up the compilation, but take up space that you would **\n" +
543
- " ** probably not want to put on a production server. **\n" +
544
- " ** **\n" +
545
- " ** When you are ready to deploy, try running `qx deploy` to get a minimised version **\n" +
546
- " ** **\n" +
547
- " *******************************************************************************************"
684
+ " ** **\n" +
685
+ " ** Your compilation will include temporary files that are only necessary during **\n" +
686
+ " ** development; these files speed up the compilation, but take up space that you would **\n" +
687
+ " ** probably not want to put on a production server. **\n" +
688
+ " ** **\n" +
689
+ " ** When you are ready to deploy, try running `qx deploy` to get a minimised version **\n" +
690
+ " ** **\n" +
691
+ " *******************************************************************************************"
548
692
  );
549
693
  }
550
- process.exitCode = success ? 0 : 1;
694
+ return success ? 0 : 1;
551
695
  }
552
696
  },
553
697
 
@@ -557,16 +701,6 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
557
701
  * @return {Boolean} true if all makers succeeded
558
702
  */
559
703
  async _loadConfigAndStartMaking() {
560
- if (
561
- !this.getCompilerApi().compileJsonExists() &&
562
- !qx.tool.cli.Cli.getInstance().compileJsExists()
563
- ) {
564
- qx.tool.compiler.Console.error(
565
- "Cannot find either compile.json nor compile.js"
566
- );
567
-
568
- process.exit(1);
569
- }
570
704
  var config = this.getCompilerApi().getConfiguration();
571
705
  var makers = (this.__makers = await this.createMakersFromConfig(config));
572
706
  if (!makers || !makers.length) {
@@ -581,120 +715,115 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
581
715
  this.dispatchEvent(evt.clone());
582
716
  }
583
717
  };
718
+ let waiters = [];
719
+ for await (const maker of makers) {
720
+ var analyser = maker.getAnalyser();
721
+ let cfg = await qx.tool.compiler.cli.ConfigDb.getInstance();
722
+ analyser.setWritePoLineNumbers(
723
+ cfg.db("qx.translation.strictPoCompatibility", false)
724
+ );
584
725
 
585
- let isFirstWatcher = true;
726
+ if (!(await fs.existsAsync(maker.getOutputDir()))) {
727
+ this.__outputDirWasCreated = true;
728
+ }
729
+ if (this.argv["clean"]) {
730
+ await maker.eraseOutputDir();
731
+ await qx.tool.utils.files.Utils.safeUnlink(analyser.getDbFilename());
586
732
 
587
- await qx.Promise.all(
588
- makers.map(async maker => {
589
- var analyser = maker.getAnalyser();
590
- let cfg = await qx.tool.cli.ConfigDb.getInstance();
591
- analyser.setWritePoLineNumbers(
592
- cfg.db("qx.translation.strictPoCompatibility", false)
733
+ await qx.tool.utils.files.Utils.safeUnlink(
734
+ analyser.getResDbFilename()
593
735
  );
736
+ }
737
+ if (config.ignores) {
738
+ analyser.setIgnores(config.ignores);
739
+ }
594
740
 
595
- if (!(await fs.existsAsync(maker.getOutputDir()))) {
596
- this.__outputDirWasCreated = true;
597
- }
598
- if (this.argv["clean"]) {
599
- await maker.eraseOutputDir();
600
- await qx.tool.utils.files.Utils.safeUnlink(
601
- analyser.getDbFilename()
602
- );
741
+ var target = maker.getTarget();
742
+ analyser.addListener("compilingClass", e =>
743
+ this.dispatchEvent(e.clone())
744
+ );
603
745
 
604
- await qx.tool.utils.files.Utils.safeUnlink(
605
- analyser.getResDbFilename()
606
- );
607
- }
608
- if (config.ignores) {
609
- analyser.setIgnores(config.ignores);
610
- }
746
+ analyser.addListener("compiledClass", e =>
747
+ this.dispatchEvent(e.clone())
748
+ );
611
749
 
612
- var target = maker.getTarget();
613
- analyser.addListener("compilingClass", e =>
614
- this.dispatchEvent(e.clone())
615
- );
750
+ analyser.addListener("saveDatabase", e =>
751
+ this.dispatchEvent(e.clone())
752
+ );
616
753
 
617
- analyser.addListener("compiledClass", e =>
618
- this.dispatchEvent(e.clone())
619
- );
754
+ target.addListener("checkEnvironment", e =>
755
+ this.dispatchEvent(e.clone())
756
+ );
620
757
 
621
- analyser.addListener("saveDatabase", e =>
758
+ let appInfos = [];
759
+ target.addListener("writingApplication", async () => {
760
+ let appInfo = {
761
+ maker,
762
+ target,
763
+ appMeta: target.getAppMeta()
764
+ };
765
+
766
+ appInfos.push(appInfo);
767
+ await this.fireDataEventAsync("writingApplication", appInfo);
768
+ });
769
+ target.addListener("writtenApplication", async () => {
770
+ await this.fireDataEventAsync("writtenApplication", {
771
+ maker,
772
+ target,
773
+ appMeta: target.getAppMeta()
774
+ });
775
+ });
776
+ maker.addListener("writingApplications", collateDispatchEvent);
777
+ maker.addListener("writtenApplications", async () => {
778
+ await this.fireDataEventAsync("writtenApplications", appInfos);
779
+ });
780
+
781
+ if (target instanceof qx.tool.compiler.targets.BuildTarget) {
782
+ target.addListener("minifyingApplication", e =>
622
783
  this.dispatchEvent(e.clone())
623
784
  );
624
785
 
625
- target.addListener("checkEnvironment", e =>
786
+ target.addListener("minifiedApplication", e =>
626
787
  this.dispatchEvent(e.clone())
627
788
  );
789
+ }
790
+
791
+ let stat = await qx.tool.utils.files.Utils.safeStat(
792
+ "source/index.html"
793
+ );
628
794
 
629
- let appInfos = [];
630
- target.addListener("writingApplication", async () => {
631
- let appInfo = {
632
- maker,
633
- target,
634
- appMeta: target.getAppMeta()
635
- };
795
+ if (stat) {
796
+ qx.tool.compiler.Console.print(
797
+ "qx.tool.compiler.cli.compile.legacyFiles",
798
+ "source/index.html"
799
+ );
800
+ }
636
801
 
637
- appInfos.push(appInfo);
638
- await this.fireDataEventAsync("writingApplication", appInfo);
639
- });
640
- target.addListener("writtenApplication", async () => {
641
- await this.fireDataEventAsync("writtenApplication", {
642
- maker,
643
- target,
644
- appMeta: target.getAppMeta()
645
- });
802
+ // Setup event listeners for non-watch mode
803
+ if (!this.argv.watch) {
804
+ maker.addListener("making", () => {
805
+ countMaking++;
806
+ if (countMaking == 1) {
807
+ this.fireEvent("making");
808
+ }
646
809
  });
647
- maker.addListener("writingApplications", collateDispatchEvent);
648
- maker.addListener("writtenApplications", async () => {
649
- await this.fireDataEventAsync("writtenApplications", appInfos);
810
+ maker.addListener("made", () => {
811
+ countMaking--;
812
+ if (countMaking == 0) {
813
+ this.fireEvent("made");
814
+ }
650
815
  });
816
+ }
651
817
 
652
- if (target instanceof qx.tool.compiler.targets.BuildTarget) {
653
- target.addListener("minifyingApplication", e =>
654
- this.dispatchEvent(e.clone())
655
- );
656
-
657
- target.addListener("minifiedApplication", e =>
658
- this.dispatchEvent(e.clone())
659
- );
660
- }
661
-
662
- let stat =
663
- await qx.tool.utils.files.Utils.safeStat("source/index.html");
664
-
665
- if (stat) {
666
- qx.tool.compiler.Console.print(
667
- "qx.tool.cli.compile.legacyFiles",
668
- "source/index.html"
669
- );
670
- }
671
-
672
- // Simple one of make
673
- if (!this.argv.watch) {
674
- maker.addListener("making", () => {
675
- countMaking++;
676
- if (countMaking == 1) {
677
- this.fireEvent("making");
678
- }
679
- });
680
- maker.addListener("made", () => {
681
- countMaking--;
682
- if (countMaking == 0) {
683
- this.fireEvent("made");
684
- }
685
- });
686
-
687
- return await maker.make();
688
- }
818
+ // Always make first
819
+ await maker.make();
689
820
 
690
- // Continuous make
691
- let watch = new qx.tool.cli.Watch(maker);
821
+ // Watch mode setup
822
+ if (this.argv.watch) {
823
+ let watch = new qx.tool.compiler.cli.Watch(maker);
692
824
  config.applications.forEach(appConfig => {
693
825
  if (appConfig.runWhenWatching) {
694
- watch.setRunWhenWatching(
695
- appConfig.name,
696
- appConfig.runWhenWatching
697
- );
826
+ watch.setRunWhenWatching(appConfig.name, appConfig.runWhenWatching);
698
827
  }
699
828
  });
700
829
  if (this.argv["watch-debug"]) {
@@ -723,11 +852,8 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
723
852
 
724
853
  watch.setConfigFilenames(arr);
725
854
 
726
- if (
727
- target instanceof qx.tool.compiler.targets.SourceTarget &&
728
- isFirstWatcher
729
- ) {
730
- isFirstWatcher = false;
855
+ if (this.__typescriptEnabled && target instanceof qx.tool.compiler.targets.SourceTarget && !this.__typescriptWatcherAttached) {
856
+ this.__typescriptWatcherAttached = true;
731
857
  try {
732
858
  await this.__attachTypescriptWatcher(watch);
733
859
  } catch (ex) {
@@ -735,132 +861,26 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
735
861
  }
736
862
  }
737
863
 
738
- return watch.start();
739
- })
740
- );
864
+ waiters.push(watch.start());
865
+ }
866
+ }
741
867
 
742
- if (!this.argv.watch) {
868
+ if (!this.argv.watch && this.__typescriptEnabled) {
743
869
  try {
744
870
  await this.__attachTypescriptWatcher(null);
745
871
  } catch (ex) {
746
872
  qx.tool.compiler.Console.error(ex);
747
873
  }
748
874
  }
749
- },
750
-
751
- async __attachTypescriptWatcher(watch) {
752
- let classFiles = [];
753
-
754
- // Scans a directory recursively to find all .js files
755
- const scanImpl = async filename => {
756
- let basename = path.basename(filename);
757
- let stat = await fs.promises.stat(filename);
758
- if (stat.isFile() && basename.match(/\.js$/)) {
759
- classFiles.push(filename);
760
- } else if (
761
- stat.isDirectory() &&
762
- (basename == "." || basename[0] != ".")
763
- ) {
764
- let files = await fs.promises.readdir(filename);
765
- for (let i = 0; i < files.length; i++) {
766
- let subname = path.join(filename, files[i]);
767
- await scanImpl(subname);
768
- }
769
- }
770
- };
771
-
772
- // Do the initial scan
773
- qx.tool.compiler.Console.info(`Loading meta data ...`);
774
- let metaDb = new qx.tool.compiler.MetaDatabase().set({
775
- rootDir: this.__metaDir
776
- });
777
-
778
- await metaDb.load();
779
-
780
- // Scan all library directories
781
- metaDb.getDatabase().libraries = {};
782
- for (let lib of Object.values(this.__libraries)) {
783
- let dir = path.join(lib.getRootDir(), lib.getSourcePath());
784
- metaDb.getDatabase().libraries[lib.getNamespace()] = {
785
- sourceDir: dir
786
- };
787
-
788
- await scanImpl(dir);
789
- }
790
-
791
- for (let filename of classFiles) {
792
- await metaDb.addFile(filename, !!this.argv.clean);
793
- }
794
- await metaDb.reparseAll();
795
- await metaDb.save();
796
- await this.fireDataEventAsync("writtenMetaData", metaDb);
797
875
 
798
- // Do the inital write
799
- let tsWriter = null;
800
- if (this.__typescriptEnabled) {
801
- qx.tool.compiler.Console.info(`Generating typescript output ...`);
802
- tsWriter = new qx.tool.compiler.targets.TypeScriptWriter(metaDb);
803
- if (this.__typescriptFile) {
804
- tsWriter.setOutputTo(this.__typescriptFile);
805
- } else {
806
- tsWriter.setOutputTo(path.join(this.__metaDir, "..", "qooxdoo.d.ts"));
807
- }
808
- await tsWriter.process();
809
- }
810
-
811
- if (!watch) {
812
- return;
813
- }
814
-
815
- // Redo the files that change, as they change
816
- classFiles = {};
817
- let debounce = new qx.tool.utils.Debounce(async () => {
818
- let filesParsed = false;
819
- qx.tool.compiler.Console.info(`Loading meta data ...`);
820
- let addFilePromises = [];
821
- while (true) {
822
- let arr = Object.keys(classFiles);
823
- if (arr.length == 0) {
824
- break;
825
- }
826
- filesParsed = true;
827
- classFiles = {};
828
- arr.forEach(filename => {
829
- if (this.argv.verbose) {
830
- qx.tool.compiler.Console.info(
831
- `Processing meta for ${filename} ...`
832
- );
833
- }
834
- addFilePromises.push(metaDb.addFile(filename));
835
- });
836
- }
837
- if (filesParsed) {
838
- qx.tool.compiler.Console.info(`Generating typescript output ...`);
839
- await Promise.all(addFilePromises);
840
- await metaDb.reparseAll();
841
- await metaDb.save();
842
- if (this.__typescriptEnabled) {
843
- await tsWriter.process();
844
- }
845
- }
846
- });
847
-
848
- // Watch for changes
849
- watch.addListener("fileChanged", evt => {
850
- let data = evt.getData();
851
- if (data.fileType == "source") {
852
- let filename = data.library.getFilename(data.filename);
853
- classFiles[filename] = true;
854
- debounce.run();
855
- }
856
- });
876
+ return qx.Promise.all(waiters);
857
877
  },
858
878
 
859
879
  /**
860
- * Processes the configuration from a JSON data structure and creates a Maker
880
+ * Processes the configuration from a JSON data structure and creates Makers
861
881
  *
862
- * @param data {Map}
863
- * @return {qx.tool.compiler.makers.Maker}
882
+ * @param data {Object} the compile.json configuration data
883
+ * @return {Promise<qx.tool.compiler.makers.Maker[]>}
864
884
  */
865
885
  async createMakersFromConfig(data) {
866
886
  const Console = qx.tool.compiler.Console.getInstance();
@@ -870,11 +890,11 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
870
890
  data.babel = data.babel || {};
871
891
  data.babel.options = data.babelOptions;
872
892
  qx.tool.compiler.Console.print(
873
- "qx.tool.cli.compile.deprecatedBabelOptions"
893
+ "qx.tool.compiler.cli.compile.deprecatedBabelOptions"
874
894
  );
875
895
  } else {
876
896
  qx.tool.compiler.Console.print(
877
- "qx.tool.cli.compile.deprecatedBabelOptionsConflicting"
897
+ "qx.tool.compiler.cli.compile.deprecatedBabelOptionsConflicting"
878
898
  );
879
899
  }
880
900
  delete data.babelOptions;
@@ -884,26 +904,25 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
884
904
  this.__typescriptEnabled = data.meta.typescript;
885
905
  } else if (qx.lang.Type.isString(data?.meta?.typescript)) {
886
906
  this.__typescriptEnabled = true;
887
- this.__typescriptFile = path.relative(
888
- process.cwd(),
889
- path.resolve(data?.meta?.typescript)
890
- );
907
+ this.__typescriptFile = path.relative(process.cwd(), path.resolve(data.meta.typescript));
891
908
  }
892
- if (qx.lang.Type.isBoolean(this.argv.typescript)) {
893
- this.__typescriptEnabled = this.argv.typescript;
909
+ if (this.argv.typescript === true) {
910
+ this.__typescriptEnabled = true;
894
911
  }
895
912
 
896
913
  var argvAppNames = null;
897
914
  if (t.argv["app-name"]) {
898
915
  argvAppNames = {};
899
- t.argv["app-name"]
916
+ let appNameStr = String(t.argv["app-name"]);
917
+ appNameStr
900
918
  .split(",")
901
919
  .forEach(name => (argvAppNames[name] = true));
902
920
  }
903
921
  var argvAppGroups = null;
904
922
  if (t.argv["app-group"]) {
905
923
  argvAppGroups = {};
906
- t.argv["app-group"]
924
+ let appGroupStr = String(t.argv["app-group"]);
925
+ appGroupStr
907
926
  .split(",")
908
927
  .forEach(name => (argvAppGroups[name] = true));
909
928
  }
@@ -929,7 +948,7 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
929
948
  ) {
930
949
  if (defaultTargetConfig) {
931
950
  qx.tool.compiler.Console.print(
932
- "qx.tool.cli.compile.multipleDefaultTargets"
951
+ "qx.tool.compiler.cli.compile.multipleDefaultTargets"
933
952
  );
934
953
  } else {
935
954
  defaultTargetConfig = targetConfig;
@@ -979,8 +998,7 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
979
998
  appTargetConfigs = [defaultTargetConfig];
980
999
  } else {
981
1000
  throw new qx.tool.utils.Utils.UserError(
982
- `Cannot find any suitable targets for application #${index} (named ${
983
- appConfig.name || "unnamed"
1001
+ `Cannot find any suitable targets for application #${index} (named ${appConfig.name || "unnamed"
984
1002
  })`
985
1003
  );
986
1004
  }
@@ -1002,12 +1020,13 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1002
1020
  }
1003
1021
 
1004
1022
  let libraries = (this.__libraries = {});
1005
- let librariesArray = [];
1006
- for (let libPath of data.libraries) {
1007
- let library = await qx.tool.compiler.app.Library.createLibrary(libPath);
1023
+ let libs = this.getCompilerApi().getLibraryApis();
1024
+ for await (const lib of libs) {
1025
+ var library = await qx.tool.compiler.app.Library.createLibrary(
1026
+ lib.getRootDir()
1027
+ );
1008
1028
 
1009
1029
  libraries[library.getNamespace()] = library;
1010
- librariesArray.push(library);
1011
1030
  }
1012
1031
 
1013
1032
  // Search for Qooxdoo library if not already provided
@@ -1016,7 +1035,6 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1016
1035
  let qxPath = await qx.tool.config.Utils.getQxPath();
1017
1036
  var library = await qx.tool.compiler.app.Library.createLibrary(qxPath);
1018
1037
  libraries[library.getNamespace()] = library;
1019
- librariesArray.push(library);
1020
1038
  qxLib = libraries["qx"];
1021
1039
  }
1022
1040
  if (this.argv.verbose) {
@@ -1051,7 +1069,7 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1051
1069
  let setDefault;
1052
1070
  if (appConfig.writeIndexHtmlToRoot !== undefined) {
1053
1071
  qx.tool.compiler.Console.print(
1054
- "qx.tool.cli.compile.deprecatedCompileSeeOther",
1072
+ "qx.tool.compiler.cli.compile.deprecatedCompileSeeOther",
1055
1073
  "application.writeIndexHtmlToRoot",
1056
1074
  "application.default"
1057
1075
  );
@@ -1081,24 +1099,24 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1081
1099
  }
1082
1100
  });
1083
1101
 
1084
- /*
1085
- * There is still only one target per maker, so convert our list of targetConfigs into an array of makers
1086
- */
1087
- let targetOutputPaths = {};
1088
- let makers = [];
1089
-
1090
1102
  this.__metaDir = data.meta?.output;
1091
- if (!this.__metaDir) {
1103
+ if (!this.__metaDir && targetConfigs.length > 0) {
1092
1104
  this.__metaDir = path.relative(
1093
1105
  process.cwd(),
1094
1106
  path.resolve(targetConfigs[0].outputPath, "../meta")
1095
1107
  );
1096
1108
  }
1097
1109
 
1110
+ /*
1111
+ * There is still only one target per maker, so convert our list of targetConfigs into an array of makers
1112
+ */
1113
+ let targetOutputPaths = {};
1114
+ let makers = [];
1115
+
1098
1116
  targetConfigs.forEach(targetConfig => {
1099
1117
  if (!targetConfig.appConfigs) {
1100
1118
  qx.tool.compiler.Console.print(
1101
- "qx.tool.cli.compile.unusedTarget",
1119
+ "qx.tool.compiler.cli.compile.unusedTarget",
1102
1120
  targetConfig.type,
1103
1121
  targetConfig.index
1104
1122
  );
@@ -1146,15 +1164,15 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1146
1164
  }
1147
1165
 
1148
1166
  var targetClass = targetConfig.targetClass
1149
- ? this.resolveTargetClass(targetConfig.targetClass)
1167
+ ? this.__resolveTargetClass(targetConfig.targetClass)
1150
1168
  : null;
1151
1169
  if (!targetClass && targetConfig.type) {
1152
- targetClass = this.resolveTargetClass(targetConfig.type);
1170
+ targetClass = this.__resolveTargetClass(targetConfig.type);
1153
1171
  }
1154
1172
  if (!targetClass) {
1155
1173
  throw new qx.tool.utils.Utils.UserError(
1156
1174
  "Cannot find target class: " +
1157
- (targetConfig.targetClass || targetConfig.type)
1175
+ (targetConfig.targetClass || targetConfig.type)
1158
1176
  );
1159
1177
  }
1160
1178
  /* eslint-disable new-cap */
@@ -1162,7 +1180,7 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1162
1180
  /* eslint-enable new-cap */
1163
1181
  if (targetConfig.uri) {
1164
1182
  qx.tool.compiler.Console.print(
1165
- "qx.tool.cli.compile.deprecatedUri",
1183
+ "qx.tool.compiler.cli.compile.deprecatedUri",
1166
1184
  "target.uri",
1167
1185
  targetConfig.uri
1168
1186
  );
@@ -1184,18 +1202,6 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1184
1202
  target.setUpdatePoFiles(this.argv.updatePoFiles);
1185
1203
  target.setLibraryPoPolicy(this.argv.libraryPo);
1186
1204
 
1187
- let fontsConfig = targetConfig.fonts || {};
1188
- let preferLocalFonts = true;
1189
-
1190
- if (this.argv.localFonts !== undefined) {
1191
- preferLocalFonts = this.argv.localFonts;
1192
- } else if (fontsConfig.local !== undefined) {
1193
- preferLocalFonts = fontsConfig.local;
1194
- }
1195
- target.setPreferLocalFonts(preferLocalFonts);
1196
- if (fontsConfig.fontTypes !== undefined) {
1197
- target.setFontTypes(fontsConfig.fontTypes);
1198
- }
1199
1205
  // Take the command line for `minify` as most precedent only if provided
1200
1206
  var minify;
1201
1207
  if (process.argv.indexOf("--minify") > -1) {
@@ -1321,26 +1327,6 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1321
1327
  maker.setWriteAllTranslations(data.writeAllTranslations);
1322
1328
  }
1323
1329
 
1324
- if (typeof targetConfig.typescript == "string") {
1325
- Console.warn(
1326
- "The 'typescript' property inside a target definition is deprecated - please see top level 'meta.typescript' property"
1327
- );
1328
-
1329
- if (this.__typescriptFile) {
1330
- Console.warn(
1331
- "Multiple conflicting locations for the Typescript output - choosing to write to " +
1332
- this.__typescriptFile +
1333
- " and NOT " +
1334
- targetConfig.typescript
1335
- );
1336
- } else {
1337
- this.__typescriptEnabled = true;
1338
- this.__typescriptFile = path.relative(
1339
- process.cwd(),
1340
- path.resolve(targetConfig.typescript)
1341
- );
1342
- }
1343
- }
1344
1330
 
1345
1331
  if (data.environment) {
1346
1332
  maker.setEnvironment(data.environment);
@@ -1350,8 +1336,8 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1350
1336
  Libraries have to be added first because there is qx library
1351
1337
  which includes a framework version
1352
1338
  */
1353
- for (let library of librariesArray) {
1354
- maker.getAnalyser().addLibrary(library);
1339
+ for (let ns in libraries) {
1340
+ maker.getAnalyser().addLibrary(libraries[ns]);
1355
1341
  }
1356
1342
 
1357
1343
  let targetEnvironment = {
@@ -1412,16 +1398,12 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1412
1398
  );
1413
1399
  maker.getAnalyser().setBrowserifyConfig(browserifyConfig);
1414
1400
 
1401
+
1415
1402
  var addCreatedAt =
1416
1403
  targetConfig["addCreatedAt"] || t.argv["addCreatedAt"];
1417
1404
  if (addCreatedAt) {
1418
1405
  maker.getAnalyser().setAddCreatedAt(true);
1419
1406
  }
1420
- const verboseCreatedAt =
1421
- targetConfig["verboseCreatedAt"] || t.argv["verboseCreatedAt"];
1422
- if (verboseCreatedAt) {
1423
- maker.getAnalyser().setVerboseCreatedAt(true);
1424
- }
1425
1407
 
1426
1408
  let allApplicationTypes = {};
1427
1409
  appConfigs.forEach(appConfig => {
@@ -1452,7 +1434,7 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1452
1434
  allApplicationTypes[app.getType()] = true;
1453
1435
  if (appConfig.uri) {
1454
1436
  qx.tool.compiler.Console.print(
1455
- "qx.tool.cli.compile.deprecatedUri",
1437
+ "qx.tool.compiler.cli.compile.deprecatedUri",
1456
1438
  "application.uri",
1457
1439
  appConfig.uri
1458
1440
  );
@@ -1479,9 +1461,9 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1479
1461
  if (!parts.boot) {
1480
1462
  throw new qx.tool.utils.Utils.UserError(
1481
1463
  "Cannot determine a boot part for application " +
1482
- (appConfig.index + 1) +
1483
- " " +
1484
- (appConfig.name || "")
1464
+ (appConfig.index + 1) +
1465
+ " " +
1466
+ (appConfig.name || "")
1485
1467
  );
1486
1468
  }
1487
1469
  for (var partName in parts) {
@@ -1592,6 +1574,80 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1592
1574
  return makers;
1593
1575
  },
1594
1576
 
1577
+ /**
1578
+ * Loads class metadata, generates TypeScript definitions, and (in watch mode) sets up a
1579
+ * debounced file watcher that re-runs metadata parsing and TypeScript generation whenever
1580
+ * a source file changes. When `watch` is null the method performs a single one-shot run
1581
+ * and returns immediately after writing the output.
1582
+ *
1583
+ * @param watch {qx.tool.compiler.cli.Watch|null} watcher instance in watch mode, or null for a one-shot compile
1584
+ */
1585
+ async __attachTypescriptWatcher(watch) {
1586
+ qx.tool.compiler.Console.info(`Loading meta data ...`);
1587
+ let metaDb = new qx.tool.compiler.MetaDatabase().set({ rootDir: this.__metaDir });
1588
+ await metaDb.load(); // hydrates existing class metadata from disk; library map is rebuilt fresh below
1589
+
1590
+ metaDb.getDatabase().libraries = {};
1591
+ const dirs = [];
1592
+ for (let lib of Object.values(this.__libraries)) {
1593
+ let dir = path.join(lib.getRootDir(), lib.getSourcePath());
1594
+ metaDb.getDatabase().libraries[lib.getNamespace()] = { sourceDir: dir };
1595
+ dirs.push(dir);
1596
+ }
1597
+ await metaDb.loadFromDirectories(dirs, { force: !!this.argv.clean });
1598
+ await metaDb.save();
1599
+
1600
+ let tsWriter = null;
1601
+ if (this.__typescriptEnabled) {
1602
+ qx.tool.compiler.Console.info(`Generating typescript output ...`);
1603
+ tsWriter = new qx.tool.compiler.targets.TypeScriptWriter(metaDb);
1604
+ if (this.__typescriptFile) {
1605
+ tsWriter.setOutputTo(this.__typescriptFile);
1606
+ } else {
1607
+ tsWriter.setOutputTo(path.join(this.__metaDir, "..", "qooxdoo.d.ts"));
1608
+ }
1609
+ await tsWriter.process();
1610
+ }
1611
+
1612
+ if (!watch) {
1613
+ return;
1614
+ }
1615
+
1616
+ // Watch mode: re-run metadata and typescript on file changes
1617
+ let classFiles = {};
1618
+ let debounce = new qx.tool.utils.Debounce(async () => {
1619
+ let filesParsed = false;
1620
+ qx.tool.compiler.Console.info(`Loading meta data ...`);
1621
+ let addFilePromises = [];
1622
+ let arr = Object.keys(classFiles);
1623
+ if (arr.length > 0) {
1624
+ filesParsed = true;
1625
+ classFiles = {};
1626
+ arr.forEach(filename => {
1627
+ addFilePromises.push(metaDb.addFile(filename));
1628
+ });
1629
+ }
1630
+ if (filesParsed) {
1631
+ qx.tool.compiler.Console.info(`Generating typescript output ...`);
1632
+ await Promise.all(addFilePromises);
1633
+ await metaDb.reparseAll();
1634
+ await metaDb.save();
1635
+ if (this.__typescriptEnabled) {
1636
+ await tsWriter.process();
1637
+ }
1638
+ }
1639
+ });
1640
+
1641
+ watch.addListener("fileChanged", evt => {
1642
+ let data = evt.getData();
1643
+ if (data.fileType == "source") {
1644
+ let filename = data.library.getFilename(data.filename);
1645
+ classFiles[filename] = true;
1646
+ debounce.run();
1647
+ }
1648
+ });
1649
+ },
1650
+
1595
1651
  /**
1596
1652
  * Checks the dependencies of the current library
1597
1653
  * @param {qx.tool.compiler.app.Library[]} libs
@@ -1643,11 +1699,11 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1643
1699
  if (!fs.existsSync(qx.tool.config.Manifest.config.fileName)) {
1644
1700
  Console.error(
1645
1701
  "Libraries are missing and there is no Manifest.json in the current directory so we cannot attempt to install them; the missing libraries are: \n " +
1646
- urisToInstall.join("\n ") +
1647
- "\nThe library which refers to the missing libraries is " +
1648
- lib.getNamespace() +
1649
- " in " +
1650
- lib.getRootDir()
1702
+ urisToInstall.join("\n ") +
1703
+ "\nThe library which refers to the missing libraries is " +
1704
+ lib.getNamespace() +
1705
+ " in " +
1706
+ lib.getRootDir()
1651
1707
  );
1652
1708
 
1653
1709
  process.exit(1);
@@ -1660,11 +1716,11 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1660
1716
  )}...`
1661
1717
  );
1662
1718
  }
1663
- const installer = new qx.tool.cli.commands.package.Install({
1719
+ const installer = new qx.tool.compiler.cli.commands.package.Install();
1720
+ await installer.process({
1664
1721
  verbose: this.argv.verbose,
1665
1722
  save: false // save to lockfile only, not to manifest
1666
1723
  });
1667
- await installer.process();
1668
1724
  throw new qx.tool.utils.Utils.UserError(
1669
1725
  `Library ${lib.getNamespace()} requires ${urisToInstall.join(
1670
1726
  ","
@@ -1739,12 +1795,11 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1739
1795
  },
1740
1796
 
1741
1797
  /**
1742
- * Resolves the target class instance from the type name; accepts "source" or "build" or
1743
- * a class name
1798
+ * Resolves the target class from the type name; accepts "source", "build", or a class
1744
1799
  * @param type {String}
1745
- * @returns {qx.tool.compiler.makers.Maker}
1800
+ * @returns {Function|null}
1746
1801
  */
1747
- resolveTargetClass(type) {
1802
+ __resolveTargetClass(type) {
1748
1803
  if (!type) {
1749
1804
  return null;
1750
1805
  }
@@ -1757,6 +1812,11 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1757
1812
  if (type == "source") {
1758
1813
  return qx.tool.compiler.targets.SourceTarget;
1759
1814
  }
1815
+ if (type == "typescript") {
1816
+ throw new qx.tool.utils.Utils.UserError(
1817
+ "Typescript targets are no longer supported - please use `typescript: true` in source target instead"
1818
+ );
1819
+ }
1760
1820
  if (type) {
1761
1821
  var targetClass;
1762
1822
  if (type.indexOf(".") < 0) {
@@ -1772,37 +1832,17 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1772
1832
  /**
1773
1833
  * Returns the list of makers to make
1774
1834
  *
1775
- * @return {qx.tool.compiler.makers.Maker[]}
1835
+ * @return {Maker[]}
1776
1836
  */
1777
1837
  getMakers() {
1778
1838
  return this.__makers;
1779
1839
  },
1780
1840
 
1781
- /**
1782
- * Returns the one maker; this is for backwards compatibility with the compiler API, because it is
1783
- * possible to define multiple targets and therefore have multiple makers. This method will return
1784
- * the one maker, when there is only one maker defined (ie one target), which is fine for any existing
1785
- * configurations.
1786
- *
1787
- * @deprected
1788
- * @return {qx.tool.compiler.makers.Maker}
1789
- */
1790
- getMaker() {
1791
- if (this.__makers.length == 1) {
1792
- return this.__makers[0];
1793
- }
1794
- throw new Error(
1795
- "Cannot get a single maker - there are " +
1796
- this.__makers.length +
1797
- " available"
1798
- );
1799
- },
1800
-
1801
1841
  /**
1802
1842
  * Returns the makers for a given application name
1803
1843
  *
1804
1844
  * @param appName {String} the name of the application
1805
- * @return {qx.tool.compiler.makers.Maker}
1845
+ * @return {qx.tool.compiler.makers.Maker[]}
1806
1846
  */
1807
1847
  getMakersForApp(appName) {
1808
1848
  return this.__makers.filter(maker => {
@@ -1814,7 +1854,7 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1814
1854
  /**
1815
1855
  * Returns a list of libraries which are used
1816
1856
  *
1817
- * @return {qx.tool.compiler.app.Library[]}
1857
+ * @return {Library[]}
1818
1858
  */
1819
1859
  getLibraries() {
1820
1860
  return this.__libraries;
@@ -1823,35 +1863,35 @@ Framework: v${await this.getQxVersion()} in ${await this.getQxPath()}`);
1823
1863
 
1824
1864
  defer(statics) {
1825
1865
  qx.tool.compiler.Console.addMessageIds({
1826
- "qx.tool.cli.compile.writingApplication": "Writing application %1",
1827
- "qx.tool.cli.compile.minifyingApplication": "Minifying %1 %2",
1828
- "qx.tool.cli.compile.compilingClass": "Compiling class %1",
1829
- "qx.tool.cli.compile.compiledClass": "Compiled class %1 in %2s",
1830
- "qx.tool.cli.compile.makeBegins": "Making applications...",
1831
- "qx.tool.cli.compile.makeEnds": "Applications are made"
1866
+ "qx.tool.compiler.cli.compile.writingApplication": "Writing application %1",
1867
+ "qx.tool.compiler.cli.compile.minifyingApplication": "Minifying %1 %2",
1868
+ "qx.tool.compiler.cli.compile.compilingClass": "Compiling class %1",
1869
+ "qx.tool.compiler.cli.compile.compiledClass": "Compiled class %1 in %2s",
1870
+ "qx.tool.compiler.cli.compile.makeBegins": "Making applications...",
1871
+ "qx.tool.compiler.cli.compile.makeEnds": "Applications are made"
1832
1872
  });
1833
1873
 
1834
1874
  qx.tool.compiler.Console.addMessageIds(
1835
1875
  {
1836
- "qx.tool.cli.compile.multipleDefaultTargets":
1876
+ "qx.tool.compiler.cli.compile.multipleDefaultTargets":
1837
1877
  "Multiple default targets found!",
1838
- "qx.tool.cli.compile.unusedTarget":
1878
+ "qx.tool.compiler.cli.compile.unusedTarget":
1839
1879
  "Target type %1, index %2 is unused",
1840
- "qx.tool.cli.compile.selectingDefaultApp":
1880
+ "qx.tool.compiler.cli.compile.selectingDefaultApp":
1841
1881
  "You have multiple applications, none of which are marked as 'default'; the first application named %1 has been chosen as the default application",
1842
- "qx.tool.cli.compile.legacyFiles":
1882
+ "qx.tool.compiler.cli.compile.legacyFiles":
1843
1883
  "File %1 exists but is no longer used",
1844
- "qx.tool.cli.compile.deprecatedCompile":
1884
+ "qx.tool.compiler.cli.compile.deprecatedCompile":
1845
1885
  "The configuration setting %1 in compile.json is deprecated",
1846
- "qx.tool.cli.compile.deprecatedCompileSeeOther":
1886
+ "qx.tool.compiler.cli.compile.deprecatedCompileSeeOther":
1847
1887
  "The configuration setting %1 in compile.json is deprecated (see %2)",
1848
- "qx.tool.cli.compile.deprecatedUri":
1888
+ "qx.tool.compiler.cli.compile.deprecatedUri":
1849
1889
  "URIs are no longer set in compile.json, the configuration setting %1=%2 in compile.json is ignored (it's auto detected)",
1850
- "qx.tool.cli.compile.deprecatedProvidesBoot":
1890
+ "qx.tool.compiler.cli.compile.deprecatedProvidesBoot":
1851
1891
  "Manifest.Json no longer supports provides.boot - only Applications can have boot; specified in %1",
1852
- "qx.tool.cli.compile.deprecatedBabelOptions":
1892
+ "qx.tool.compiler.cli.compile.deprecatedBabelOptions":
1853
1893
  "Deprecated use of `babelOptions` - these should be moved to `babel.options`",
1854
- "qx.tool.cli.compile.deprecatedBabelOptionsConflicting":
1894
+ "qx.tool.compiler.cli.compile.deprecatedBabelOptionsConflicting":
1855
1895
  "Conflicting use of `babel.options` and the deprecated `babelOptions` (ignored)"
1856
1896
  },
1857
1897