@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.
- package/CHANGELOG.md +224 -33
- package/Manifest.json +3 -3
- package/bin/tools/utils.js +50 -13
- package/lib/compiler/compile-info.json +297 -227
- package/lib/compiler/index.js +55319 -47085
- package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/default.tmpl.js +6 -7
- package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/cli/templates/class/singleton.tmpl.js +5 -6
- package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-node.tmpl.js +1 -0
- package/lib/resource/qx/tool/compiler/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -0
- package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/cli/templates/template_vars.js +12 -9
- package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/Manifest-1-0-0.json +2 -2
- package/lib/resource/qx/tool/{schema → compiler/schema}/Manifest-2-0-0.json +2 -2
- package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/compile-1-0-0.json +21 -5
- package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/qooxdoo-1-0-0.json +1 -1
- package/lib/resource/qx/tool/website/build/404.html +22 -22
- package/lib/resource/qx/tool/website/build/about.html +23 -23
- package/lib/resource/qx/tool/website/build/assets/common.js +30 -18
- package/lib/resource/qx/tool/website/build/assets/custom.css +290 -0
- package/lib/resource/qx/tool/website/build/assets/qxWeb.js +28 -0
- package/lib/resource/qx/tool/website/build/diagnostics/dependson.html +30 -30
- package/lib/resource/qx/tool/website/build/diagnostics/dependson.js +49 -40
- package/lib/resource/qx/tool/website/build/diagnostics/requiredby.html +20 -23
- package/lib/resource/qx/tool/website/build/diagnostics/requiredby.js +38 -31
- package/lib/resource/qx/tool/website/build/index.html +24 -24
- package/lib/resource/qx/tool/website/build/scripts/serve.js +63 -65
- package/lib/resource/qx/tool/website/partials/footer.html +8 -13
- package/lib/resource/qx/tool/website/partials/head.html +9 -7
- package/lib/resource/qx/tool/website/partials/header.html +3 -3
- package/lib/resource/qx/tool/website/src/assets/common.js +32 -0
- package/lib/resource/qx/tool/website/src/assets/custom.css +290 -0
- package/lib/resource/qx/tool/website/src/assets/qxWeb.js +28 -0
- package/lib/resource/qx/tool/website/src/diagnostics/dependson.js +49 -40
- package/lib/resource/qx/tool/website/src/diagnostics/requiredby.js +38 -31
- package/lib/resource/qx/tool/website/src/index.html +2 -2
- package/lib/resource/qx/tool/website/src/scripts/serve.js +63 -65
- package/package.json +23 -24
- package/source/boot/index.html +2 -2
- package/source/class/qx/Bootstrap.js +931 -705
- package/source/class/qx/Class.js +1476 -1451
- package/source/class/qx/Interface.js +40 -107
- package/source/class/qx/Mixin.js +58 -116
- package/source/class/qx/Promise.js +1 -0
- package/source/class/qx/Theme.js +1 -1
- package/source/class/qx/application/Routing.js +2 -0
- package/source/class/qx/bom/Font.js +3 -0
- package/source/class/qx/bom/client/Locale.js +5 -0
- package/source/class/qx/bom/request/Jsonp.js +5 -13
- package/source/class/qx/bom/request/Script.js +11 -35
- package/source/class/qx/bom/request/SimpleXhr.js +13 -41
- package/source/class/qx/bom/request/Xhr.js +19 -80
- package/source/class/qx/bom/storage/Memory.js +2 -0
- package/source/class/qx/bom/storage/UserData.js +2 -0
- package/source/class/qx/bom/storage/Web.js +2 -0
- package/source/class/qx/bom/webfonts/Validator.js +13 -5
- package/source/class/qx/core/Assert.js +14 -0
- package/source/class/qx/core/BaseInit.js +19 -19
- package/source/class/qx/core/Environment.js +23 -20
- package/source/class/qx/core/MEvent.js +1 -1
- package/source/class/qx/core/MObjectId.js +24 -6
- package/source/class/qx/core/MProperty.js +123 -115
- package/source/class/qx/core/Object.js +88 -102
- package/source/class/qx/core/check/AbstractCheck.js +111 -0
- package/source/class/qx/core/check/Any.js +63 -0
- package/source/class/qx/core/check/CheckFactory.js +151 -0
- package/source/class/qx/core/check/DynamicTypeCheck.js +94 -0
- package/source/class/qx/core/check/ICheck.js +75 -0
- package/source/class/qx/core/check/IsOneOfCheck.js +63 -0
- package/source/class/qx/core/check/JsDocCheck.js +71 -0
- package/source/class/qx/core/check/SimpleCheck.js +42 -0
- package/source/class/qx/core/check/standard/ArrayCheck.js +49 -0
- package/source/class/qx/core/check/standard/BooleanCheck.js +47 -0
- package/source/class/qx/core/check/standard/ClassCheck.js +33 -0
- package/source/class/qx/core/check/standard/ColorCheck.js +33 -0
- package/source/class/qx/core/check/standard/DateCheck.js +49 -0
- package/source/class/qx/core/check/standard/DecoratorCheck.js +33 -0
- package/source/class/qx/core/check/standard/DocumentCheck.js +40 -0
- package/source/class/qx/core/check/standard/ElementCheck.js +40 -0
- package/source/class/qx/core/check/standard/ErrorCheck.js +46 -0
- package/source/class/qx/core/check/standard/EventCheck.js +40 -0
- package/source/class/qx/core/check/standard/FontCheck.js +33 -0
- package/source/class/qx/core/check/standard/FunctionCheck.js +49 -0
- package/source/class/qx/core/check/standard/IntegerCheck.js +54 -0
- package/source/class/qx/core/check/standard/InterfaceCheck.js +33 -0
- package/source/class/qx/core/check/standard/MapCheck.js +33 -0
- package/source/class/qx/core/check/standard/MixinCheck.js +33 -0
- package/source/class/qx/core/check/standard/NodeCheck.js +40 -0
- package/source/class/qx/core/check/standard/NumberCheck.js +48 -0
- package/source/class/qx/core/check/standard/ObjectCheck.js +33 -0
- package/source/class/qx/core/check/standard/PositiveIntegerCheck.js +45 -0
- package/source/class/qx/core/check/standard/PositiveNumberCheck.js +45 -0
- package/source/class/qx/core/check/standard/PromiseCheck.js +33 -0
- package/source/class/qx/core/check/standard/RegExpCheck.js +46 -0
- package/source/class/qx/core/check/standard/StringCheck.js +43 -0
- package/source/class/qx/core/check/standard/ThemeCheck.js +33 -0
- package/source/class/qx/core/check/standard/WindowCheck.js +40 -0
- package/source/class/qx/core/property/ExplicitPropertyStorage.js +87 -0
- package/source/class/qx/core/property/GroupProperty.js +262 -0
- package/source/class/qx/core/property/IProperty.js +46 -0
- package/source/class/qx/core/property/IPropertyStorage.js +83 -0
- package/source/class/qx/core/property/ImmutableArrayStorage.js +38 -0
- package/source/class/qx/core/property/ImmutableDataArrayStorage.js +38 -0
- package/source/class/qx/core/property/ImmutableObjectStorage.js +39 -0
- package/source/class/qx/core/property/Property.js +1482 -0
- package/source/class/qx/core/property/PropertyStorageFactory.js +22 -0
- package/source/class/qx/core/property/SimplePropertyStorage.js +105 -0
- package/source/class/qx/data/Array.js +102 -57
- package/source/class/qx/data/MBinding.js +4 -29
- package/source/class/qx/data/SingleValueBinding.js +595 -1496
- package/source/class/qx/data/binding/AbstractSegment.js +197 -0
- package/source/class/qx/data/binding/ArrayIndexSegment.js +155 -0
- package/source/class/qx/data/binding/IInputReceiver.js +14 -0
- package/source/class/qx/data/binding/PropNameSegment.js +150 -0
- package/source/class/qx/data/controller/CheckedList.js +1 -1
- package/source/class/qx/data/controller/Form.js +78 -8
- package/source/class/qx/data/controller/Tree.js +27 -117
- package/source/class/qx/data/marshal/Json.js +46 -149
- package/source/class/qx/data/store/Json.js +0 -2
- package/source/class/qx/dev/Debug.js +1 -1
- package/source/class/qx/dev/LeakDetector.js +144 -0
- package/source/class/qx/dev/unit/AsyncWrapper.js +1 -0
- package/source/class/qx/dev/unit/MMock.js +7 -2
- package/source/class/qx/dev/unit/Sinon.js +0 -4
- package/source/class/qx/dev/unit/TestCase.js +4 -1
- package/source/class/qx/dev/unit/TestClass.js +2 -2
- package/source/class/qx/dev/unit/TestFunction.js +1 -0
- package/source/class/qx/dev/unit/TestLoaderBasic.js +1 -0
- package/source/class/qx/dev/unit/TestRunner.js +106 -0
- package/source/class/qx/event/IEventDispatcher.js +8 -4
- package/source/class/qx/event/Manager.js +4 -0
- package/source/class/qx/event/Messaging.js +2 -0
- package/source/class/qx/event/Pool.js +7 -0
- package/source/class/qx/event/Registration.js +33 -55
- package/source/class/qx/event/Timer.js +2 -0
- package/source/class/qx/event/Utils.js +25 -8
- package/source/class/qx/event/dispatch/AbstractBubbling.js +98 -194
- package/source/class/qx/event/dispatch/Direct.js +18 -13
- package/source/class/qx/event/handler/Appear.js +20 -24
- package/source/class/qx/event/handler/Application.js +4 -0
- package/source/class/qx/event/handler/DragDrop.js +182 -385
- package/source/class/qx/event/handler/Element.js +3 -0
- package/source/class/qx/event/handler/Focus.js +38 -31
- package/source/class/qx/event/handler/Input.js +5 -0
- package/source/class/qx/event/handler/Keyboard.js +107 -165
- package/source/class/qx/event/handler/Pointer.js +39 -68
- package/source/class/qx/event/handler/PointerCore.js +7 -25
- package/source/class/qx/event/handler/Window.js +5 -0
- package/source/class/qx/event/type/Event.js +12 -0
- package/source/class/qx/event/type/KeySequence.js +3 -0
- package/source/class/qx/event/type/Native.js +3 -0
- package/source/class/qx/html/Element.js +26 -91
- package/source/class/qx/html/Jsx.js +2 -3
- package/source/class/qx/html/Node.js +3 -3
- package/source/class/qx/io/jsonrpc/Client.js +2 -2
- package/source/class/qx/io/jsonrpc/protocol/Error.js +2 -2
- package/source/class/qx/io/jsonrpc/protocol/Parser.js +1 -0
- package/source/class/qx/io/jsonrpc/protocol/Result.js +2 -2
- package/source/class/qx/io/request/Xhr.js +3 -8
- package/source/class/qx/lang/normalize/Array.js +23 -1
- package/source/class/qx/locale/Date.js +520 -113
- package/source/class/qx/locale/LocalizedString.js +3 -0
- package/source/class/qx/locale/Manager.js +14 -3
- package/source/class/qx/locale/Number.js +60 -7
- package/source/class/qx/log/Logger.js +1 -1
- package/source/class/qx/module/Animation.js +2 -0
- package/source/class/qx/module/Attribute.js +2 -0
- package/source/class/qx/module/Css.js +7 -24
- package/source/class/qx/module/Event.js +2 -0
- package/source/class/qx/module/Manipulating.js +2 -0
- package/source/class/qx/module/Traversing.js +2 -0
- package/source/class/qx/promise/NativeWrapper.js +1 -1
- package/source/class/qx/test/Bootstrap.js +68 -53
- package/source/class/qx/test/Class.js +310 -2
- package/source/class/qx/test/Mixin.js +192 -42
- package/source/class/qx/test/Promise.js +129 -331
- package/source/class/qx/test/Theme.js +11 -0
- package/source/class/qx/test/bom/Font.js +2 -5
- package/source/class/qx/test/bom/Template.js +1 -1
- package/source/class/qx/test/compiler/ClassFile.js +14 -0
- package/source/class/qx/test/core/Assert.js +12 -0
- package/source/class/qx/test/core/Environment.js +17 -3
- package/source/class/qx/test/core/InheritanceDummy.js +10 -1
- package/source/class/qx/test/core/Object.js +51 -24
- package/source/class/qx/test/core/ObjectId.js +10 -1
- package/source/class/qx/test/core/Property.js +1363 -118
- package/source/class/qx/test/core/PropertyHelper.js +12 -0
- package/source/class/qx/test/core/Target.js +1 -0
- package/source/class/qx/test/core/Validation.js +2 -0
- package/source/class/qx/test/data/DataArray.js +218 -639
- package/source/class/qx/test/data/DataArrayWithChangeBubble.js +45 -215
- package/source/class/qx/test/data/MultiBinding.js +42 -0
- package/source/class/qx/test/data/async/__init__.js +4 -0
- package/source/class/qx/test/data/controller/Form.js +523 -14
- package/source/class/qx/test/data/controller/List.js +94 -426
- package/source/class/qx/test/data/controller/ListReverse.js +5 -20
- package/source/class/qx/test/data/controller/ListWithObjects.js +49 -225
- package/source/class/qx/test/data/controller/Object.js +54 -222
- package/source/class/qx/test/data/controller/Tree.js +195 -934
- package/source/class/qx/test/data/marshal/Json.js +74 -312
- package/source/class/qx/test/data/singlevalue/Array.js +55 -279
- package/source/class/qx/test/data/singlevalue/Async.js +173 -0
- package/source/class/qx/test/data/singlevalue/Deep.js +148 -327
- package/source/class/qx/test/data/singlevalue/Resolve.js +8 -28
- package/source/class/qx/test/data/singlevalue/Simple.js +130 -359
- package/source/class/qx/test/data/store/Json.js +86 -254
- package/source/class/qx/test/data/store/Jsonp.js +9 -29
- package/source/class/qx/test/data/store/Offline.js +2 -8
- package/source/class/qx/test/data/store/Rest.js +3 -3
- package/source/class/qx/test/dev/unit/Requirements.js +26 -10
- package/source/class/qx/test/event/GlobalError.js +2 -2
- package/source/class/qx/test/html/Iframe.js +1 -1
- package/source/class/qx/test/io/graphql/Client.js +2 -0
- package/source/class/qx/test/io/jsonrpc/Protocol.js +4 -2
- package/source/class/qx/test/io/request/MRequest.js +2 -8
- package/source/class/qx/test/io/request/Xhr.js +27 -117
- package/source/class/qx/test/lang/Function.js +6 -25
- package/source/class/qx/test/lang/Type.js +31 -13
- package/source/class/qx/test/locale/Date.js +173 -2
- package/source/class/qx/test/locale/Locale.js +23 -28
- package/source/class/qx/test/locale/Number.js +71 -0
- package/source/class/qx/test/log/Logger.js +7 -1
- package/source/class/qx/test/log/fixture/ClassA.js +2 -5
- package/source/class/qx/test/mobile/basic/Atom.js +3 -3
- package/source/class/qx/test/mobile/container/Scroll.js +4 -4
- package/source/class/qx/test/mobile/form/CheckBox.js +6 -12
- package/source/class/qx/test/performance/Property.js +5 -4
- package/source/class/qx/test/performance/widget/WidgetWithDecorator.js +2 -0
- package/source/class/qx/test/theme/Simple.js +34 -0
- package/source/class/qx/test/{MAppearance.js → theme/SimpleAppearance.js} +5 -4
- package/source/class/qx/test/{MDecoration.js → theme/SimpleDecoration.js} +6 -4
- package/source/class/qx/test/theme/manager/Meta.js +7 -5
- package/source/class/qx/test/tool/__init__.js +3 -0
- package/source/class/qx/test/tool/cli/AbstractValue.js +274 -0
- package/source/class/qx/test/tool/cli/Argument.js +384 -0
- package/source/class/qx/test/tool/cli/Command.js +387 -0
- package/source/class/qx/test/tool/cli/Flag.js +413 -0
- package/source/class/qx/test/tool/cli/__init__.js +3 -0
- package/source/class/qx/test/ui/LayoutTestCase.js +1 -14
- package/source/class/qx/test/ui/basic/Label.js +106 -0
- package/source/class/qx/test/ui/core/Blocker.js +125 -3
- package/source/class/qx/test/ui/form/Form.js +106 -0
- package/source/class/qx/test/ui/form/FormManager.js +6 -5
- package/source/class/qx/test/ui/form/SplitButton.js +1 -1
- package/source/class/qx/test/ui/toolbar/OverflowHandling.js +13 -14
- package/source/class/qx/test/ui/toolbar/ToolBar.js +16 -16
- package/source/class/qx/test/ui/tree/TreeFolder.js +5 -7
- package/source/class/qx/test/ui/tree/virtual/AbstractTreeTest.js +2 -0
- package/source/class/qx/test/ui/tree/virtual/Tree.js +36 -0
- package/source/class/qx/test/util/DateFormat.js +1 -1
- package/source/class/qx/test/util/PropertyUtil.js +0 -36
- package/source/class/qx/theme/classic/Appearance.js +22 -1
- package/source/class/qx/theme/indigo/ColorDark.js +2 -0
- package/source/class/qx/theme/manager/Font.js +6 -1
- package/source/class/qx/theme/manager/Meta.js +2 -1
- package/source/class/qx/theme/modern/Appearance.js +21 -0
- package/source/class/qx/theme/simple/Appearance.js +52 -95
- package/source/class/qx/theme/simple/Decoration.js +0 -1
- package/source/class/qx/theme/tangible/Appearance.js +3 -1
- package/source/class/qx/tool/cli/AbstractCliApp.js +88 -0
- package/source/class/qx/tool/cli/AbstractValue.js +186 -0
- package/source/class/qx/tool/cli/Argument.js +155 -0
- package/source/class/qx/tool/cli/Command.js +518 -0
- package/source/class/qx/tool/cli/Flag.js +202 -0
- package/source/class/qx/tool/cli/Parser.js +39 -0
- package/source/class/qx/tool/cli/__init__.js +26 -1
- package/source/class/qx/tool/compiler/Analyser.js +41 -13
- package/source/class/qx/tool/compiler/ClassFile.js +37 -13
- package/source/class/qx/tool/compiler/Console.js +2 -0
- package/source/class/qx/tool/compiler/MetaDatabase.js +47 -0
- package/source/class/qx/tool/compiler/MetaExtraction.js +53 -33
- package/source/class/qx/tool/compiler/app/Library.js +1 -1
- package/source/class/qx/tool/compiler/app/WebFont.js +2 -0
- package/source/class/qx/tool/compiler/cli/Application.js +58 -0
- package/source/class/qx/tool/{cli/commands → compiler/cli}/Command.js +99 -45
- package/source/class/qx/tool/{cli → compiler/cli}/ConfigDb.js +7 -7
- package/source/class/qx/tool/compiler/cli/ConfigLoader.js +272 -0
- package/source/class/qx/tool/{cli → compiler/cli}/LibraryApplication.js +3 -3
- package/source/class/qx/tool/compiler/cli/RootCommand.js +63 -0
- package/source/class/qx/tool/{cli → compiler/cli}/Watch.js +49 -24
- package/source/class/qx/tool/compiler/cli/__init__.js +3 -0
- package/source/class/qx/tool/{cli → compiler/cli}/api/AbstractApi.js +2 -11
- package/source/class/qx/tool/{cli → compiler/cli}/api/CompilerApi.js +11 -10
- package/source/class/qx/tool/{cli → compiler/cli}/api/LibraryApi.js +13 -4
- package/source/class/qx/tool/{cli → compiler/cli}/api/Test.js +1 -1
- package/source/class/qx/tool/compiler/cli/commands/Add.js +49 -0
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Clean.js +12 -25
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Compile.js +630 -590
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Config.js +22 -20
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Create.js +78 -55
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Deploy.js +45 -60
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Es6ify.js +57 -41
- package/source/class/qx/tool/{cli → compiler/cli}/commands/ExportGlyphs.js +26 -7
- package/source/class/qx/tool/compiler/cli/commands/Lint.js +420 -0
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Migrate.js +40 -20
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Package.js +20 -32
- package/source/class/qx/tool/compiler/cli/commands/Pkg.js +36 -0
- package/source/class/qx/tool/compiler/cli/commands/Prettier.js +278 -0
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Run.js +43 -39
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Serve.js +63 -61
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Test.js +49 -52
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Typescript.js +70 -62
- package/source/class/qx/tool/{cli → compiler/cli}/commands/add/Class.js +54 -31
- package/source/class/qx/tool/{cli → compiler/cli}/commands/add/Script.js +57 -33
- package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Delete.js +19 -13
- package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Get.js +19 -13
- package/source/class/qx/tool/{cli → compiler/cli}/commands/config/List.js +20 -20
- package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Set.js +28 -20
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Install.js +140 -75
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/List.js +119 -80
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Publish.js +196 -179
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Remove.js +18 -21
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Update.js +92 -71
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Upgrade.js +67 -54
- package/source/class/qx/tool/compiler/makers/AbstractAppMaker.js +2 -1
- package/source/class/qx/tool/compiler/resources/Manager.js +2 -0
- package/source/class/qx/tool/compiler/resources/ScssConverter.js +1 -1
- package/source/class/qx/tool/compiler/resources/ScssFile.js +1 -1
- package/source/class/qx/tool/compiler/targets/Target.js +5 -10
- package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +9 -2
- package/source/class/qx/tool/compiler/targets/meta/ApplicationMeta.js +2 -4
- package/source/class/qx/tool/compiler/targets/meta/BootJs.js +2 -0
- package/source/class/qx/tool/compiler/targets/meta/Browserify.js +142 -80
- package/source/class/qx/tool/compiler/targets/meta/PackageJavascript.js +2 -0
- package/source/class/qx/tool/config/Abstract.js +5 -5
- package/source/class/qx/tool/config/Lockfile.js +1 -1
- package/source/class/qx/tool/migration/BaseMigration.js +9 -7
- package/source/class/qx/tool/migration/M6_0_0.js +3 -3
- package/source/class/qx/tool/migration/M8_0_0.js +958 -0
- package/source/class/qx/tool/utils/Debounce.js +0 -1
- package/source/class/qx/tool/utils/Http.js +109 -21
- package/source/class/qx/tool/utils/LogManager.js +7 -0
- package/source/class/qx/tool/utils/Promisify.js +12 -1
- package/source/class/qx/tool/utils/QooxdooVersions.js +193 -0
- package/source/class/qx/tool/utils/Utils.js +8 -5
- package/source/class/qx/tool/utils/Website.js +9 -222
- package/source/class/qx/tool/utils/Zip.js +47 -0
- package/source/class/qx/tool/utils/files/Utils.js +3 -11
- package/source/class/qx/tool/utils/json/Tokenizer.js +5 -0
- package/source/class/qx/ui/basic/Atom.js +8 -8
- package/source/class/qx/ui/core/Blocker.js +17 -4
- package/source/class/qx/ui/core/DragDropCursor.js +2 -1
- package/source/class/qx/ui/core/EventHandler.js +13 -21
- package/source/class/qx/ui/core/LayoutItem.js +8 -31
- package/source/class/qx/ui/core/MExecutable.js +7 -31
- package/source/class/qx/ui/core/MNativeOverflow.js +4 -2
- package/source/class/qx/ui/core/Widget.js +50 -165
- package/source/class/qx/ui/core/scroll/IScrollBar.js +9 -3
- package/source/class/qx/ui/core/scroll/ScrollBar.js +7 -1
- package/source/class/qx/ui/core/scroll/ScrollPane.js +12 -4
- package/source/class/qx/ui/embed/Html.js +6 -2
- package/source/class/qx/ui/form/AbstractField.js +4 -12
- package/source/class/qx/ui/form/Button.js +6 -4
- package/source/class/qx/ui/form/CheckedSelectBox.js +8 -8
- package/source/class/qx/ui/form/FileSelectorButton.js +1 -1
- package/source/class/qx/ui/form/Form.js +3 -0
- package/source/class/qx/ui/form/IListItem.js +3 -1
- package/source/class/qx/ui/form/IRadioItem.js +3 -1
- package/source/class/qx/ui/form/MForm.js +3 -1
- package/source/class/qx/ui/form/Slider.js +6 -2
- package/source/class/qx/ui/form/SplitButton.js +5 -5
- package/source/class/qx/ui/form/TextField.js +1 -2
- package/source/class/qx/ui/form/validation/Manager.js +6 -2
- package/source/class/qx/ui/menubar/Button.js +1 -1
- package/source/class/qx/ui/mobile/basic/Atom.js +5 -5
- package/source/class/qx/ui/mobile/dialog/Menu.js +9 -31
- package/source/class/qx/ui/mobile/dialog/Popup.js +13 -1
- package/source/class/qx/ui/table/pane/FocusIndicator.js +5 -2
- package/source/class/qx/ui/table/pane/Scroller.js +5 -20
- package/source/class/qx/ui/table/selection/Model.js +1 -0
- package/source/class/qx/ui/toolbar/Button.js +1 -1
- package/source/class/qx/ui/toolbar/CheckBox.js +1 -1
- package/source/class/qx/ui/toolbar/FileSelectorButton.js +1 -2
- package/source/class/qx/ui/toolbar/Part.js +2 -2
- package/source/class/qx/ui/toolbar/PartContainer.js +2 -2
- package/source/class/qx/ui/toolbar/ToolBar.js +24 -49
- package/source/class/qx/ui/tree/VirtualTree.js +6 -4
- package/source/class/qx/ui/tree/core/AbstractItem.js +10 -17
- package/source/class/qx/ui/tree/core/IVirtualTree.js +4 -2
- package/source/class/qx/ui/tree/provider/IVirtualTreeProvider.js +20 -10
- package/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js +4 -1
- package/source/class/qx/ui/virtual/cell/Cell.js +20 -48
- package/source/class/qx/ui/virtual/cell/WidgetCell.js +2 -4
- package/source/class/qx/ui/virtual/core/Axis.js +4 -0
- package/source/class/qx/ui/virtual/core/ILayer.js +14 -10
- package/source/class/qx/ui/virtual/core/Scroller.js +4 -4
- package/source/class/qx/ui/virtual/layer/WidgetCell.js +4 -0
- package/source/class/qx/ui/virtual/selection/Abstract.js +3 -0
- package/source/class/qx/ui/virtual/selection/MModel.js +1 -1
- package/source/class/qx/ui/window/IDesktop.js +6 -2
- package/source/class/qx/ui/window/IWindowManager.js +10 -4
- package/source/class/qx/ui/window/MDesktop.js +2 -1
- package/source/class/qx/ui/window/Manager.js +1 -1
- package/source/class/qx/ui/window/Window.js +6 -4
- package/source/class/qx/util/OOUtil.js +8 -9
- package/source/class/qx/util/PropertyUtil.js +34 -154
- package/source/class/qx/util/ResponseParser.js +2 -0
- package/source/class/qx/util/Serializer.js +69 -114
- package/source/class/qx/util/format/DateFormat.js +3 -2
- package/source/global.d.ts +4 -0
- package/source/resource/qx/tool/bin/download-assets +0 -2
- package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/default.tmpl.js +6 -7
- package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/cli/templates/class/singleton.tmpl.js +5 -6
- package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-node.tmpl.js +1 -0
- package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/cli/templates/template_vars.js +12 -9
- package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/Manifest-1-0-0.json +2 -2
- package/source/resource/qx/tool/{schema → compiler/schema}/Manifest-2-0-0.json +2 -2
- package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/compile-1-0-0.json +21 -5
- package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/qooxdoo-1-0-0.json +1 -1
- package/source/resource/qx/tool/website/build/404.html +22 -22
- package/source/resource/qx/tool/website/build/about.html +23 -23
- package/source/resource/qx/tool/website/build/assets/common.js +30 -18
- package/source/resource/qx/tool/website/build/assets/custom.css +290 -0
- package/source/resource/qx/tool/website/build/assets/qxWeb.js +28 -0
- package/source/resource/qx/tool/website/build/diagnostics/dependson.html +30 -30
- package/source/resource/qx/tool/website/build/diagnostics/dependson.js +49 -40
- package/source/resource/qx/tool/website/build/diagnostics/requiredby.html +20 -23
- package/source/resource/qx/tool/website/build/diagnostics/requiredby.js +38 -31
- package/source/resource/qx/tool/website/build/index.html +24 -24
- package/source/resource/qx/tool/website/build/scripts/serve.js +63 -65
- package/source/resource/qx/tool/website/partials/footer.html +8 -13
- package/source/resource/qx/tool/website/partials/head.html +9 -7
- package/source/resource/qx/tool/website/partials/header.html +3 -3
- package/source/resource/qx/tool/website/src/assets/common.js +32 -0
- package/source/resource/qx/tool/website/src/assets/custom.css +290 -0
- package/source/resource/qx/tool/website/src/assets/qxWeb.js +28 -0
- package/source/resource/qx/tool/website/src/diagnostics/dependson.js +49 -40
- package/source/resource/qx/tool/website/src/diagnostics/requiredby.js +38 -31
- package/source/resource/qx/tool/website/src/index.html +2 -2
- package/source/resource/qx/tool/website/src/scripts/serve.js +63 -65
- package/lib/resource/qx/tool/bin/build-devtools +0 -13
- package/lib/resource/qx/tool/bin/build-website +0 -15
- package/lib/resource/qx/tool/bin/download-assets +0 -23
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +0 -1
- package/lib/resource/qx/tool/website/build/assets/bootstrap.css +0 -7
- package/lib/resource/qx/tool/website/build/assets/bootstrap.min.css +0 -7
- package/lib/resource/qx/tool/website/build/assets/bootstrap.min.css.map +0 -1
- package/lib/resource/qx/tool/website/build/assets/jquery.js +0 -5453
- package/lib/resource/qx/tool/website/build/qooxdoo.css +0 -21
- package/lib/resource/qx/tool/website/sass/qooxdoo.css +0 -3
- package/lib/resource/qx/tool/website/sass/qooxdoo.css.map +0 -1
- package/lib/resource/qx/tool/website/src/assets/bootstrap.css +0 -7
- package/lib/resource/qx/tool/website/src/assets/bootstrap.min.css +0 -7
- package/lib/resource/qx/tool/website/src/assets/bootstrap.min.css.map +0 -1
- package/lib/resource/qx/tool/website/src/assets/jquery.js +0 -5453
- package/source/class/qx/core/Property.js +0 -2100
- package/source/class/qx/tool/cli/Application.js +0 -47
- package/source/class/qx/tool/cli/Cli.js +0 -713
- package/source/class/qx/tool/cli/commands/Add.js +0 -46
- package/source/class/qx/tool/cli/commands/Lint.js +0 -255
- package/source/class/qx/tool/cli/commands/Pkg.js +0 -56
- package/source/class/qx/tool/cli/commands/package/Migrate.js +0 -37
- package/source/class/qx/tool/compiler/app/Cldr.js +0 -725
- package/source/resource/qx/tool/bin/build-devtools +0 -13
- package/source/resource/qx/tool/bin/build-website +0 -15
- package/source/resource/qx/tool/website/build/assets/bootstrap.css +0 -7
- package/source/resource/qx/tool/website/build/assets/bootstrap.min.css +0 -7
- package/source/resource/qx/tool/website/build/assets/bootstrap.min.css.map +0 -1
- package/source/resource/qx/tool/website/build/assets/jquery.js +0 -5453
- package/source/resource/qx/tool/website/build/qooxdoo.css +0 -21
- package/source/resource/qx/tool/website/sass/qooxdoo.scss +0 -31
- package/source/resource/qx/tool/website/src/assets/bootstrap.css +0 -7
- package/source/resource/qx/tool/website/src/assets/bootstrap.min.css +0 -7
- package/source/resource/qx/tool/website/src/assets/bootstrap.min.css.map +0 -1
- package/source/resource/qx/tool/website/src/assets/jquery.js +0 -5453
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/TypeScriptWriter-base_declaration.d.ts +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/header.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/interface.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/mixin.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-browser.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-rhino.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/Manifest.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/compile.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/readme.tmpl.md +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/index.tmpl.html +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/nojs.tmpl.html +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Appearance.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Color.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Decoration.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Font.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Theme.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/app.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/favicon.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/js_256x256.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/test.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/translation/readme.txt +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/Manifest.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/compile.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/readme.tmpl.md +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/index.tmpl.html +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/nojs.tmpl.html +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/app.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/css/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/favicon.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/js_256x256.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/css/custom.css +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/translation/readme.txt +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/Manifest.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/compile.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/readme.tmpl.md +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/Button.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/resource/custom/test.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Appearance.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Color.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Decoration.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Font.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Theme.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/resource/custom/test.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/translation/readme.txt +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/Manifest.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/compile.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/readme.tmpl.txt +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/Application.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/resource/custom/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/translation/readme.txt +0 -0
- /package/lib/resource/qx/tool/{loadsass.js → compiler/loadsass.js} +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/TypeScriptWriter-base_declaration.d.ts +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/header.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/interface.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/mixin.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-browser.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-rhino.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/Manifest.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/compile.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/readme.tmpl.md +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/index.tmpl.html +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/nojs.tmpl.html +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Appearance.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Color.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Decoration.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Font.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Theme.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/app.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/favicon.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/js_256x256.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/test.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/translation/readme.txt +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/Manifest.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/compile.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/readme.tmpl.md +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/index.tmpl.html +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/nojs.tmpl.html +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/app.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/css/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/favicon.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/js_256x256.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/scss/_styles.scss +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/scss/custom.scss +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/translation/readme.txt +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/Manifest.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/compile.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/readme.tmpl.md +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/Button.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/resource/custom/test.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Appearance.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Color.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Decoration.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Font.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Theme.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/resource/custom/test.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/translation/readme.txt +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/Manifest.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/compile.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/readme.tmpl.txt +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/Application.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/resource/custom/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/translation/readme.txt +0 -0
- /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.
|
|
32
|
+
qx.Class.define("qx.tool.compiler.cli.commands.Compile", {
|
|
33
|
+
extend: qx.tool.compiler.cli.Command,
|
|
34
34
|
|
|
35
35
|
statics: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
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
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
|
|
228
|
-
|
|
229
|
-
"
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
this.
|
|
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.
|
|
515
|
+
this.__progressBar.stop();
|
|
434
516
|
qx.tool.compiler.Console.log(
|
|
435
517
|
colorOn + TYPES[(msgId || {}).type || "error"] + ": " + str
|
|
436
518
|
);
|
|
437
|
-
|
|
438
|
-
|
|
519
|
+
this.__progressBar.start(100, this.__progressBar.value || 0, {
|
|
520
|
+
status: this.__progressBar.payload?.status || 'Compiling'
|
|
521
|
+
});
|
|
439
522
|
} else {
|
|
440
|
-
this.
|
|
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
|
-
|
|
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.
|
|
592
|
+
this.__progressBar.update(0, { status: "Writing Applications" })
|
|
449
593
|
);
|
|
450
594
|
|
|
451
595
|
this.addListener("writtenApplications", () =>
|
|
452
|
-
this.
|
|
596
|
+
this.__progressBar.update(100, { status: "Writing Applications" })
|
|
453
597
|
);
|
|
454
598
|
|
|
455
599
|
this.addListener("writingApplication", evt =>
|
|
456
|
-
this.
|
|
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.
|
|
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.
|
|
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.
|
|
495
|
-
this.
|
|
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.
|
|
503
|
-
this.
|
|
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
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
588
|
-
|
|
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
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
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
|
-
|
|
605
|
-
|
|
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
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
);
|
|
750
|
+
analyser.addListener("saveDatabase", e =>
|
|
751
|
+
this.dispatchEvent(e.clone())
|
|
752
|
+
);
|
|
616
753
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
754
|
+
target.addListener("checkEnvironment", e =>
|
|
755
|
+
this.dispatchEvent(e.clone())
|
|
756
|
+
);
|
|
620
757
|
|
|
621
|
-
|
|
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("
|
|
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
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
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
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
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("
|
|
648
|
-
|
|
649
|
-
|
|
810
|
+
maker.addListener("made", () => {
|
|
811
|
+
countMaking--;
|
|
812
|
+
if (countMaking == 0) {
|
|
813
|
+
this.fireEvent("made");
|
|
814
|
+
}
|
|
650
815
|
});
|
|
816
|
+
}
|
|
651
817
|
|
|
652
|
-
|
|
653
|
-
|
|
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
|
-
|
|
691
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
880
|
+
* Processes the configuration from a JSON data structure and creates Makers
|
|
861
881
|
*
|
|
862
|
-
* @param data {
|
|
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 (
|
|
893
|
-
this.__typescriptEnabled =
|
|
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
|
|
1006
|
-
for (
|
|
1007
|
-
|
|
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.
|
|
1167
|
+
? this.__resolveTargetClass(targetConfig.targetClass)
|
|
1150
1168
|
: null;
|
|
1151
1169
|
if (!targetClass && targetConfig.type) {
|
|
1152
|
-
targetClass = this.
|
|
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
|
-
|
|
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
|
|
1354
|
-
maker.getAnalyser().addLibrary(
|
|
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
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
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
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
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
|
|
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 {
|
|
1800
|
+
* @returns {Function|null}
|
|
1746
1801
|
*/
|
|
1747
|
-
|
|
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 {
|
|
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 {
|
|
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
|
|