diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..2481fa5c2f547840aa7e6a4252b1838e5e47cdde --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +open_collective: haxe +custom: ['https://haxe.org/foundation/support-plans.html', 'https://haxe.org/foundation/donate.html'] diff --git a/.merlin b/.merlin index b303a900ed8bbfa4d03e8e614dcf099e7bea1ad4..7c9eaf64b74868e06a2a8f43afce2b9d88c1cba6 100644 --- a/.merlin +++ b/.merlin @@ -1,4 +1,14 @@ S src/** -B src/** +B _build/src/** S libs/** B libs/** +B +threads +PKG ptmap +PKG sedlex +PKG extlib +PKG camlzip +PKG xml-light +PKG sha +FLG -safe-string +FLG -w -3 +FLG -w -40 \ No newline at end of file diff --git a/.vscode/schemas/define.schema.json b/.vscode/schemas/define.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..1d902d1ab3d90da6ad9f5bd15d5716e95fe66f53 --- /dev/null +++ b/.vscode/schemas/define.schema.json @@ -0,0 +1,68 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "markdownDescription": "OCaml name of the define." + }, + "define": { + "type": "string", + "markdownDescription": "Actual name of the define as it's used in `-D` on the CLI and in Haxe code." + }, + "doc": { + "type": "string", + "markdownDescription": "Documentation for the define that is shown in `--help-defines`." + }, + "platforms": { + "type": "array", + "markdownDescription": "Platforms on which this define has an effect.", + "minItems": 1, + "items": { + "enum": [ + "js", + "lua", + "neko", + "flash", + "php", + "cpp", + "cs", + "java", + "python", + "hl", + "eval" + ] + } + }, + "params": { + "type": "array", + "markdownDescription": "Parameters this define takes.", + "minItems": 1, + "items": { + "type": "string" + } + }, + "devcomment": { + "type": "string", + "markdownDescription": "Internal comment that is not exposed." + }, + "links": { + "type": "array", + "markdownDescription": "Relevant URLs.", + "minItems": 1, + "items": { + "type": "string", + "format": "uri" + } + } + }, + "required": [ + "name", + "define", + "doc" + ] + } +} \ No newline at end of file diff --git a/.vscode/schemas/meta.schema.json b/.vscode/schemas/meta.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..b2dee2053c85c7941e91d2f410eb9322011137e3 --- /dev/null +++ b/.vscode/schemas/meta.schema.json @@ -0,0 +1,90 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "markdownDescription": "OCaml name of the meta." + }, + "metadata": { + "type": "string", + "markdownDescription": "Actual name of the meta as it's used in Haxe code." + }, + "doc": { + "type": "string", + "markdownDescription": "Documentation for the meta that is shown in `--help-metas` and IDE hints." + }, + "platforms": { + "type": "array", + "markdownDescription": "Platforms on which this meta has an effect.", + "minItems": 1, + "items": { + "enum": [ + "js", + "lua", + "neko", + "flash", + "php", + "cpp", + "cs", + "java", + "python", + "hl", + "eval" + ] + } + }, + "params": { + "type": "array", + "markdownDescription": "Parameters this meta takes.", + "minItems": 1, + "items": { + "type": "string" + } + }, + "devcomment": { + "type": "string", + "markdownDescription": "Internal comment that is not exposed." + }, + "internal": { + "type": "boolean", + "markdownDescription": "Whether this define is for internal use only, in which case it is not exposed to the CLI and the `--display` protocol." + }, + "targets": { + "type": "array", + "markdownDescription": "On what the meta can be used.", + "minItems": 1, + "items": { + "enum": [ + "TClass", + "TClassField", + "TAbstract", + "TAbstractField", + "TEnum", + "TTypedef", + "TExpr", + "TTypeParameter", + "TAnyField" + ] + } + }, + "links": { + "type": "array", + "markdownDescription": "Relevant URLs.", + "minItems": 1, + "items": { + "type": "string", + "format": "uri" + } + } + }, + "required": [ + "name", + "metadata", + "doc" + ] + } +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..3b6ceacf28be5e3be1b9a33b977172f2ad4a8e57 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,32 @@ +{ + "files.associations": { + "*.mly": "ocaml", + "*.ml": "ocaml", + "Makefile.*": "makefile" + }, + "[ocaml]": { + "editor.tabSize": 4 + }, + "files.exclude": { + "**/_build": true + }, + "reason.server.languages": [ + "ocaml" + ], + "haxe.diagnosticsPathFilter": "${workspaceRoot}/std", + "npm.autoDetect": "off", + "json.schemas": [ + { + "fileMatch": [ + "src-json/define.json" + ], + "url": "./.vscode/schemas/define.schema.json" + }, + { + "fileMatch": [ + "src-json/meta.json" + ], + "url": "./.vscode/schemas/meta.schema.json" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000000000000000000000000000000000..5e0f5a757b8b460919c3b18e12388f192c387a8a --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,51 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "make: haxe", + "type": "shell", + "command": "make ADD_REVISION=1 -s -j haxe", + "windows": { + "command": "make ADD_REVISION=1 -f Makefile.win -s -j haxe" + }, + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "make: libs", + "type": "shell", + "command": "make -s -j libs", + "windows": { + "command": "make -f Makefile.win -s -j libs" + }, + "problemMatcher": [] + }, + { + "label": "make: haxelib", + "type": "shell", + "command": "make -s haxelib", + "windows": { + "command": "make -f Makefile.win -s haxelib" + }, + "problemMatcher": ["$haxe", "$haxe-absolute"] + }, + { + "label": "make: all", + "type": "shell", + "command": "make s -j libs && make ADD_REVISION=1 -s -j haxe && make -s haxelib", + "windows": { + "command": "make -f Makefile.win -s -j libs && make ADD_REVISION=1 -f Makefile.win -s -j haxe && make -f Makefile.win -s haxelib" + }, + "problemMatcher": ["$haxe", "$haxe-absolute"] + }, + { + "label": "make: clean", + "type": "shell", + "command": "make clean", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6c63e8b0d3d2bbcff81021c17d31a7e98cb40b99..48183c808661f72a690c068b02b99b204ebf9c47 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,6 +15,56 @@ This repository is about the Haxe compiler itself and the Haxe standard library. * Something on api.haxe.org: For content this is probably the right repository. If it's about the representation, try instead. * Something else on haxe.org: +## Submitting a Pull-Request + +Thank you for your interest in contributing to Haxe! Haxe is a +community-driven project and your help is vital and appreciated! + +When preparing to submit a pull-request, please make your PR as easy +as possible for core devs to evaluate and merge. To that end: + + * In your PR comments, include: + + * the reason for your proposed changes (What problem are you fixing?) + * some possible solutions, and rationale for the one you chose + * a summary of the code changes in your PR + * any pros and cons to note about the solution you implemented + * links to any relevant GitHub issues, PR's, and/or forum + discussions + + * If you've found and fixed a bug, have you also included a + corresponding test for it? + * Does your code formatting match that of the rest of the project? + * If your changes require updates to the documentation, does your PR + include those as well? + +Please also bear the following in mind: + + * Evaluating PR's takes time and effort. Even taking a look at a PR + in order to request more info or clarification is not zero-cost. + * Most members of the core team are volunteers too, and at any given time + are typically already busy working on other areas of Haxe. + * It's no fun providing negative feedback to a PR. The better you + can craft and champion your PR, the more likely it is to be + speedily evaluated. + + +## Debugging Hints + +### Using a debugger + +To debug the Haxe compiler, you can use either a system debugger (`gdb`/`lldb`), or [ocamldebug](http://caml.inria.fr/pub/docs/manual-ocaml/debugger.html). `ocamldebug` provides a better debugging experience. To use it, compile with `make BYTECODE=1`. + +### Using printf + +To print information about a type, you can add the following before most lines: + +```ocaml +Printf.printf "%s\n" (s_type_kind t); +``` + +There are lots of other stringifying functions, search for "Printing" in `src/core/type.ml` and scroll down to find them. + ## Other remarks: - Sometimes people try to be particularly helpful by not only including broken parts in their code, but also "similar" code which is working. More often than not this is more distracting than helpful. If you want to highlight something like this, consider adding the working code commented out. diff --git a/Makefile b/Makefile index b846a06976082dd64bc95045aacebfdde5096d3b..15693ee6e2629905eea0f516249edadebc704aac 100644 --- a/Makefile +++ b/Makefile @@ -8,73 +8,69 @@ # - use 'make -f Makefile.win' to build for Windows # - use 'make MSVC=1 -f Makefile.win' to build for Windows with OCaml/MSVC # -.SUFFIXES : .ml .mli .cmo .cmi .cmx .mll .mly +.SUFFIXES : .ml .mli .cmo .cmi .cmx .mly -INSTALL_DIR=$(DESTDIR)/usr +INSTALL_DIR=/usr/local INSTALL_BIN_DIR=$(INSTALL_DIR)/bin INSTALL_LIB_DIR=$(INSTALL_DIR)/lib/haxe -INSTALL_STD_DIR=$(INSTALL_LIB_DIR)/std +INSTALL_STD_DIR=$(INSTALL_DIR)/share/haxe/std PACKAGE_OUT_DIR=out INSTALLER_TMP_DIR=installer PACKAGE_SRC_EXTENSION=.tar.gz +MAKEFILENAME?=Makefile PLATFORM?=unix -OUTPUT=haxe +HAXE_OUTPUT=haxe +HAXELIB_OUTPUT=haxelib +PREBUILD_OUTPUT=prebuild EXTENSION= -OCAMLOPT?=ocamlopt -OCAMLC?=ocamlc LFLAGS= STATICLINK?=0 -CFLAGS= -bin-annot -ALL_CFLAGS= $(CFLAGS) -g -w -3 -I libs/extlib -I libs/extc -I libs/neko -I libs/javalib -I libs/ziplib -I libs/swflib -I libs/xml-light -I libs/ttflib -I libs/ilib -I libs/objsize -I libs/pcre \ - -I src -I src/context -I src/generators -I src/macro -I src/optimization -I src/syntax -I src/typing -I src/display +# Configuration -LIBS=unix str libs/extlib/extLib libs/xml-light/xml-light libs/swflib/swflib \ - libs/extc/extc libs/neko/neko libs/javalib/java libs/ziplib/zip \ - libs/ttflib/ttf libs/ilib/il libs/objsize/objsize libs/pcre/pcre +# Modules in these directories should only depend on modules that are in directories to the left +HAXE_DIRECTORIES=core core/json core/display syntax context context/display codegen codegen/gencommon generators generators/jvm optimization filters macro macro/eval macro/eval/bytes typing compiler +EXTLIB_LIBS=extlib-leftovers extc neko javalib swflib ttflib ilib objsize pcre ziplib +OCAML_LIBS=unix str threads dynlink +OPAM_LIBS=sedlex.ppx xml-light extlib ptmap sha +FINDLIB_LIBS=$(OCAML_LIBS) +FINDLIB_LIBS+=$(OPAM_LIBS) -ifneq ($(STATICLINK),0) -LIB_PARAMS= -cclib '-Wl,-Bstatic -lpcre -lz -Wl,-Bdynamic ' +# Includes, packages and compiler -else -LIB_PARAMS?= -cclib -lpcre -cclib -lz +HAXE_INCLUDES=$(HAXE_DIRECTORIES:%=-I _build/src/%) +EXTLIB_INCLUDES=$(EXTLIB_LIBS:%=-I libs/%) +ALL_INCLUDES=$(EXTLIB_INCLUDES) $(HAXE_INCLUDES) +FINDLIB_PACKAGES=$(FINDLIB_LIBS:%=-package %) +CFLAGS= +ALL_CFLAGS=-bin-annot -safe-string -thread -g -w -3 -w -40 $(CFLAGS) $(ALL_INCLUDES) $(FINDLIB_PACKAGES) -endif - -NATIVE_LIBS=-cclib libs/extc/extc_stubs.o -cclib libs/extc/process_stubs.o -cclib libs/objsize/c_objsize.o -cclib libs/pcre/pcre_stubs.o -ccopt -L/usr/local/lib $(LIB_PARAMS) +MESSAGE_FILTER=sed -e 's/_build\/src\//src\//' tmp.tmp ifeq ($(BYTECODE),1) TARGET_FLAG = bytecode - COMPILER = $(OCAMLC) + COMPILER = ocamlfind ocamlc LIB_EXT = cma MODULE_EXT = cmo NATIVE_LIB_FLAG = -custom else TARGET_FLAG = native - COMPILER = $(OCAMLOPT) + COMPILER = ocamlfind ocamlopt LIB_EXT = cmxa MODULE_EXT = cmx + OCAMLDEP_FLAGS = -native endif -CC_CMD = $(COMPILER) $(ALL_CFLAGS) -c $< - -CC_PARSER_CMD = $(COMPILER) -pp camlp4o $(ALL_CFLAGS) -c src/syntax/parser.ml +CC_CMD = ($(COMPILER) $(ALL_CFLAGS) -c $< 2>tmp.tmp && $(MESSAGE_FILTER)) || ($(MESSAGE_FILTER) && exit 1) -RELDIR=../../.. +# Meta information -MODULES=json version globals path context/meta syntax/ast display/displayTypes typing/type typing/error \ - syntax/lexer context/common generators/genxml \ - syntax/parser typing/abstract typing/typecore display/display optimization/optimizerTexpr \ - optimization/optimizer typing/overloads typing/typeload sourcemaps generators/codegen generators/gencommon generators/genas3 \ - generators/gencpp generators/genjs generators/genneko generators/genphp generators/genphp7 generators/genswf9 \ - generators/genswf generators/genjava generators/gencs generators/genpy macro/macroApi macro/interp generators/hlcode generators/hlopt generators/hlinterp generators/hl2c \ - generators/genlua \ - optimization/dce optimization/analyzerConfig optimization/analyzerTypes optimization/analyzerTexpr \ - optimization/analyzerTexprTransformer optimization/analyzer generators/genhl \ - optimization/filters macro/hlmacro macro/macroContext typing/typer typing/matcher display/displayOutput server main +BUILD_DIRECTORIES := $(HAXE_DIRECTORIES:%=_build/src/%) +HAXE_SRC := $(wildcard $(HAXE_DIRECTORIES:%=src/%/*.ml)) +BUILD_SRC := $(HAXE_SRC:%=_build/%) ADD_REVISION?=0 @@ -88,7 +84,8 @@ COMMIT_DATE=$(shell \ fi \ ) PACKAGE_FILE_NAME=haxe_$(COMMIT_DATE)_$(COMMIT_SHA) -HAXE_VERSION=$(shell $(OUTPUT) -version 2>&1 | awk '{print $$1;}') +HAXE_VERSION=$(shell $(CURDIR)/$(HAXE_OUTPUT) -version 2>&1 | awk '{print $$1;}') +HAXE_VERSION_SHORT=$(shell echo "$(HAXE_VERSION)" | grep -oE "^[0-9]+\.[0-9]+\.[0-9]+") # using $(CURDIR) on Windows will not work since it might be a Cygwin path ifdef SYSTEMROOT @@ -97,188 +94,128 @@ else export HAXE_STD_PATH=$(CURDIR)/std endif -all: libs haxe tools - -libs: - make -C libs/extlib OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/extc OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/neko OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/javalib OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/ilib OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/ziplib OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/swflib OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/xml-light OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/ttflib OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/objsize OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - make -C libs/pcre OCAMLOPT=$(OCAMLOPT) OCAMLC=$(OCAMLC) $(TARGET_FLAG) - -haxe: $(MODULES:%=src/%.$(MODULE_EXT)) - $(COMPILER) -o $(OUTPUT) $(NATIVE_LIBS) $(NATIVE_LIB_FLAG) $(LFLAGS) $(LIBS:=.$(LIB_EXT)) $(MODULES:%=src/%.$(MODULE_EXT)) - -haxelib: - (cd $(CURDIR)/extra/haxelib_src && $(CURDIR)/$(OUTPUT) client.hxml && nekotools boot run.n) - mv extra/haxelib_src/run$(EXTENSION) haxelib$(EXTENSION) +# Native libraries -tools: haxelib - -install: uninstall - mkdir -p $(INSTALL_BIN_DIR) - mkdir -p $(INSTALL_LIB_DIR)/lib - cp -rf std $(INSTALL_STD_DIR) - cp -rf extra $(INSTALL_LIB_DIR) - cp haxe $(INSTALL_LIB_DIR) - ln -s $(INSTALL_LIB_DIR)/haxe $(INSTALL_BIN_DIR)/haxe - cp haxelib $(INSTALL_LIB_DIR) - ln -s $(INSTALL_LIB_DIR)/haxelib $(INSTALL_BIN_DIR)/haxelib - chmod -R a+rx $(INSTALL_LIB_DIR) - chmod 777 $(INSTALL_LIB_DIR)/lib - chmod a+rx $(INSTALL_BIN_DIR)/haxe $(INSTALL_BIN_DIR)/haxelib - -# will install native version of the tools instead of script ones -install_tools: tools - cp haxelib ${INSTALL_BIN_DIR}/haxelib - chmod a+rx $(INSTALL_BIN_DIR)/haxelib - -uninstall: - rm -rf $(INSTALL_BIN_DIR)/haxe $(INSTALL_BIN_DIR)/haxelib - if [ -d "$(INSTALL_LIB_DIR)/lib" ] && find "$(INSTALL_LIB_DIR)/lib" -mindepth 1 -print -quit | grep -q .; then \ - echo "The local haxelib repo at $(INSTALL_LIB_DIR)/lib will not be removed. Remove it manually if you want."; \ - find $(INSTALL_LIB_DIR)/ ! -name 'lib' -mindepth 1 -maxdepth 1 -exec rm -rf {} +; \ - else \ - rm -rf $(INSTALL_LIB_DIR); \ - fi +ifneq ($(STATICLINK),0) + LIB_PARAMS= -cclib '-Wl,-Bstatic -lpcre -lz -Wl,-Bdynamic ' +else + LIB_PARAMS?= -cclib -lpcre -cclib -lz +endif +NATIVE_LIBS=-thread -cclib libs/extc/extc_stubs.o -cclib libs/extc/process_stubs.o -cclib libs/objsize/c_objsize.o -cclib libs/pcre/pcre_stubs.o -ccopt -L/usr/local/lib $(LIB_PARAMS) # Modules -# context - -src/context/common.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/display/displayTypes.$(MODULE_EXT) libs/ilib/il.$(LIB_EXT) - -src/context/meta.$(MODULE_EXT): src/globals.$(MODULE_EXT) - -# display - -src/display/display.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/display/displayTypes.$(MODULE_EXT) - -src/display/displayTypes.$(MODULE_EXT) : src/globals.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/display/displayOutput.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/typing/typer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/display/display.$(MODULE_EXT) - -# sourcemaps - -src/sourcemaps.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -# generators - -src/generators/codegen.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/generators/genxml.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/generators/genas3.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/generators/gencommon.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/typing/overloads.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) libs/ilib/il.$(LIB_EXT) - -src/generators/gencpp.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/generators/gencs.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/generators/gencommon.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) libs/ilib/il.$(LIB_EXT) - -src/generators/genjava.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/generators/gencommon.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/generators/genjs.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/generators/genneko.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) +-include Makefile.modules -src/generators/genlua.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) +# Rules -src/generators/genphp.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/generators/genpy.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/generators/genswf.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/generators/genswf9.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/generators/hlinterp.$(MODULE_EXT): src/context/common.$(MODULE_EXT) src/generators/hlcode.$(MODULE_EXT) src/macro/interp.$(MODULE_EXT) src/generators/hlopt.$(MODULE_EXT) src/macro/macroApi.$(MODULE_EXT) - -src/generators/genphp7.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/sourcemaps.$(MODULE_EXT) - -src/generators/hl2c.$(MODULE_EXT): src/generators/hlcode.$(MODULE_EXT) src/context/common.$(MODULE_EXT) - -src/generators/hlopt.$(MODULE_EXT): src/generators/hlcode.$(MODULE_EXT) - -src/generators/genhl.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/generators/hlcode.$(MODULE_EXT) src/generators/hlinterp.$(MODULE_EXT) src/generators/hl2c.$(MODULE_EXT) src/generators/hlopt.$(MODULE_EXT) - -src/generators/genswf9.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -src/generators/genxml.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - -# macro - -src/macro/interp.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/generators/genneko.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/generators/genswf.$(MODULE_EXT) src/generators/genjava.$(MODULE_EXT) src/generators/gencs.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) libs/ilib/il.$(LIB_EXT) src/macro/macroApi.$(MODULE_EXT) libs/pcre/pcre.$(LIB_EXT) - -src/macro/macroContext.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/optimization/optimizerTexpr.$(MODULE_EXT) src/typing/overloads.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/typeload.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/optimization/optimizer.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/macro/interp.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/optimization/filters.$(MODULE_EXT) src/generators/genjs.$(MODULE_EXT) src/display/display.$(MODULE_EXT) src/macro/hlmacro.$(MODULE_EXT) src/macro/macroApi.$(MODULE_EXT) - -src/macro/hlmacro.$(MODULE_EXT): src/generators/hlinterp.$(MODULE_EXT) src/generators/genhl.$(MODULE_EXT) src/macro/macroApi.$(MODULE_EXT) - -src/macro/macroApi.$(MODULE_EXT): src/generators/genjs.$(MODULE_EXT) src/generators/gencs.$(MODULE_EXT) src/generators/genjava.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) - -# optimization - -src/optimization/analyzer.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/optimization/optimizer.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/optimization/analyzerConfig.$(MODULE_EXT) src/optimization/analyzerTypes.$(MODULE_EXT) src/optimization/analyzerTexpr.$(MODULE_EXT) src/optimization/analyzerTexprTransformer.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) - -src/optimization/analyzerConfig.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/context/common.$(MODULE_EXT) - -src/optimization/analyzerTexpr.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/optimization/analyzerConfig.$(MODULE_EXT) src/optimization/optimizerTexpr.$(MODULE_EXT) src/generators/genphp7.$(MODULE_EXT) +all: libs haxe tools -src/optimization/analyzerTexprTransformer.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/optimization/analyzerConfig.$(MODULE_EXT) src/optimization/analyzerTypes.$(MODULE_EXT) src/optimization/analyzerTexpr.$(MODULE_EXT) +libs: + $(foreach lib,$(EXTLIB_LIBS),$(MAKE) -C libs/$(lib) $(TARGET_FLAG) &&) true -src/optimization/analyzerTypes.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/optimization/analyzerConfig.$(MODULE_EXT) +_build/%:% + mkdir -p $(dir $@) + cp $< $@ -src/optimization/dce.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/path.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) +build_dirs: + @mkdir -p $(BUILD_DIRECTORIES) -src/optimization/filters.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/optimization/analyzer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/optimization/dce.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) +_build/src/syntax/grammar.ml:src/syntax/grammar.mly + camlp5o -impl $< -o $@ -src/optimization/optimizer.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/optimization/optimizerTexpr.$(MODULE_EXT) src/display/display.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) +_build/src/compiler/version.ml: FORCE +ifneq ($(ADD_REVISION),0) + $(MAKE) -f Makefile.version_extra -s --no-print-directory ADD_REVISION=$(ADD_REVISION) BRANCH=$(BRANCH) COMMIT_SHA=$(COMMIT_SHA) COMMIT_DATE=$(COMMIT_DATE) > _build/src/compiler/version.ml +else + echo let version_extra = None > _build/src/compiler/version.ml +endif -src/optimization/optimizerTexpr.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) +_build/src/core/defineList.ml: src-json/define.json prebuild + ./$(PREBUILD_OUTPUT) define $< > $@ -# syntax +_build/src/core/metaList.ml: src-json/meta.json prebuild + ./$(PREBUILD_OUTPUT) meta $< > $@ -src/syntax/ast.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) +build_src: | $(BUILD_SRC) _build/src/syntax/grammar.ml _build/src/compiler/version.ml _build/src/core/defineList.ml _build/src/core/metaList.ml -src/syntax/lexer.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/syntax/lexer.ml src/syntax/ast.$(MODULE_EXT) +prebuild: _build/src/core/json/json.ml _build/src/prebuild/main.ml + $(COMPILER) -safe-string -linkpkg -g -o $(PREBUILD_OUTPUT) -package sedlex.ppx -package extlib -I _build/src/core/json _build/src/core/json/json.ml _build/src/prebuild/main.ml -src/syntax/parser.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/path.$(MODULE_EXT) src/syntax/parser.ml src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) - $(CC_PARSER_CMD) +haxe: build_src + $(MAKE) -f $(MAKEFILENAME) build_pass_1 + $(MAKE) -f $(MAKEFILENAME) build_pass_2 + $(MAKE) -f $(MAKEFILENAME) build_pass_3 + $(MAKE) -f $(MAKEFILENAME) build_pass_4 -# typing +build_pass_1: + printf MODULES= > Makefile.modules + ls -1 $(HAXE_DIRECTORIES:%=_build/src/%/*.ml) | tr '\n' ' ' >> Makefile.modules -src/typing/abstract.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) +build_pass_2: + printf MODULES= > Makefile.modules + ocamlfind ocamldep -sort -slash $(HAXE_INCLUDES) $(MODULES) | sed -e "s/\.ml//g" >> Makefile.modules -src/typing/error.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) +build_pass_3: + ocamlfind ocamldep -slash $(OCAMLDEP_FLAGS) $(HAXE_INCLUDES) $(MODULES:%=%.ml) > Makefile.dependencies -src/typing/matcher.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/optimization/optimizer.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/typing/typer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) +build_pass_4: $(MODULES:%=%.$(MODULE_EXT)) + $(COMPILER) -safe-string -linkpkg -g -o $(HAXE_OUTPUT) $(NATIVE_LIBS) $(NATIVE_LIB_FLAG) $(LFLAGS) $(FINDLIB_PACKAGES) $(EXTLIB_INCLUDES) $(EXTLIB_LIBS:=.$(LIB_EXT)) $(MODULES:%=%.$(MODULE_EXT)) -src/typing/overloads.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) +kill_exe_win: +ifdef SYSTEMROOT + -@taskkill /F /IM haxe.exe 2>/dev/null +endif -src/typing/type.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/json.$(MODULE_EXT) +plugin: +ifeq ($(BYTECODE),1) + $(CC_CMD) $(PLUGIN).ml +else + $(COMPILER) $(ALL_CFLAGS) -shared -o $(PLUGIN).cmxs $(PLUGIN).ml +endif -src/typing/typecore.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) +# Only use if you have only changed gencpp.ml +quickcpp: build_src build_pass_4 copy_haxetoolkit -src/typing/typeload.$(MODULE_EXT): src/globals.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/optimization/optimizerTexpr.$(MODULE_EXT) src/typing/overloads.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/optimization/optimizer.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/json.$(MODULE_EXT) src/display/display.$(MODULE_EXT) +CPP_OS := $(shell uname) +ifeq ($(CPP_OS),Linux) +copy_haxetoolkit: + sudo cp haxe /usr/bin/haxe +else +copy_haxetoolkit: /cygdrive/c/HaxeToolkit/haxe/haxe.exe +/cygdrive/c/HaxeToolkit/haxe/haxe.exe:haxe.exe + cp $< $@ +endif -src/typing/typer.$(MODULE_EXT): src/typing/abstract.$(MODULE_EXT) src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/optimization/optimizerTexpr.$(MODULE_EXT) src/typing/overloads.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/typeload.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/optimization/optimizer.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/macro/interp.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/optimization/filters.$(MODULE_EXT) src/generators/genjs.$(MODULE_EXT) src/display/display.$(MODULE_EXT) src/macro/macroContext.$(MODULE_EXT) +haxelib: + (cd $(CURDIR)/extra/haxelib_src && $(CURDIR)/$(HAXE_OUTPUT) client.hxml && nekotools boot run.n) + mv extra/haxelib_src/run$(EXTENSION) $(HAXELIB_OUTPUT) -# main +tools: haxelib -src/main.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/typing/error.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/path.$(MODULE_EXT) src/optimization/filters.$(MODULE_EXT) src/typing/matcher.$(MODULE_EXT) src/typing/typer.$(MODULE_EXT) src/typing/typeload.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/optimization/optimizer.$(MODULE_EXT) src/syntax/lexer.$(MODULE_EXT) src/macro/interp.$(MODULE_EXT) src/generators/genxml.$(MODULE_EXT) src/generators/genswf.$(MODULE_EXT) src/generators/genphp.$(MODULE_EXT) src/generators/genphp7.$(MODULE_EXT) src/generators/genneko.$(MODULE_EXT) src/generators/genjs.$(MODULE_EXT) src/generators/genlua.$(MODULE_EXT) src/generators/gencpp.$(MODULE_EXT) src/generators/genas3.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/generators/codegen.$(MODULE_EXT) src/generators/genjava.$(MODULE_EXT) src/generators/gencs.$(MODULE_EXT) src/generators/genpy.$(MODULE_EXT) src/generators/genhl.$(MODULE_EXT) src/display/display.$(MODULE_EXT) src/server.$(MODULE_EXT) src/display/displayOutput.$(MODULE_EXT) libs/ilib/il.$(LIB_EXT) +install: uninstall + mkdir -p "$(DESTDIR)$(INSTALL_BIN_DIR)" + cp $(HAXE_OUTPUT) $(HAXELIB_OUTPUT) "$(DESTDIR)$(INSTALL_BIN_DIR)" + mkdir -p "$(DESTDIR)$(INSTALL_STD_DIR)" + cp -r std/* "$(DESTDIR)$(INSTALL_STD_DIR)" -src/globals.$(MODULE_EXT): src/version.$(MODULE_EXT) +uninstall: + rm -rf $(DESTDIR)$(INSTALL_BIN_DIR)/$(HAXE_OUTPUT) $(DESTDIR)$(INSTALL_BIN_DIR)/$(HAXELIB_OUTPUT) + if [ -d "$(DESTDIR)$(INSTALL_LIB_DIR)/lib" ] && find "$(DESTDIR)$(INSTALL_LIB_DIR)/lib" -mindepth 1 -print -quit | grep -q .; then \ + echo "The local haxelib repo at $(DESTDIR)$(INSTALL_LIB_DIR)/lib will not be removed. Remove it manually if you want."; \ + find $(DESTDIR)$(INSTALL_LIB_DIR)/ ! -name 'lib' -mindepth 1 -maxdepth 1 -exec rm -rf {} +; \ + else \ + rm -rf $(DESTDIR)$(INSTALL_LIB_DIR); \ + fi + rm -rf $(DESTDIR)$(INSTALL_STD_DIR) -src/path.$(MODULE_EXT): src/globals.$(MODULE_EXT) +opam_install: + opam install $(OPAM_LIBS) camlp5 ocamlfind --yes -src/server.$(MODULE_EXT): src/context/meta.$(MODULE_EXT) src/globals.$(MODULE_EXT) src/path.$(MODULE_EXT) src/typing/typer.$(MODULE_EXT) src/typing/typeload.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/typing/typecore.$(MODULE_EXT) src/typing/type.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/context/common.$(MODULE_EXT) src/syntax/parser.$(MODULE_EXT) src/syntax/ast.$(MODULE_EXT) src/display/displayOutput.$(MODULE_EXT) +# Dependencies -src/version.$(MODULE_EXT): - $(MAKE) -f Makefile.version_extra -s --no-print-directory ADD_REVISION=$(ADD_REVISION) BRANCH=$(BRANCH) COMMIT_SHA=$(COMMIT_SHA) COMMIT_DATE=$(COMMIT_DATE) > src/version.ml - $(COMPILER) $(ALL_CFLAGS) -c src/version.ml +-include Makefile.dependencies # Package @@ -294,7 +231,7 @@ package_unix: rm -rf $(PACKAGE_FILE_NAME) $(PACKAGE_FILE_NAME).tar.gz # Copy the package contents to $(PACKAGE_FILE_NAME) mkdir -p $(PACKAGE_FILE_NAME) - cp -r $(OUTPUT) haxelib$(EXTENSION) std extra/LICENSE.txt extra/CONTRIB.txt extra/CHANGES.txt $(PACKAGE_FILE_NAME) + cp -r $(HAXE_OUTPUT) $(HAXELIB_OUTPUT) std extra/LICENSE.txt extra/CONTRIB.txt extra/CHANGES.txt $(PACKAGE_FILE_NAME) # archive tar -zcf $(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_bin.tar.gz $(PACKAGE_FILE_NAME) rm -r $(PACKAGE_FILE_NAME) @@ -302,23 +239,25 @@ package_unix: package_bin: package_$(PLATFORM) xmldoc: - haxelib path hxcpp || haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp - haxelib path hxjava || haxelib git hxjava https://github.com/HaxeFoundation/hxjava - haxelib path hxcs || haxelib git hxcs https://github.com/HaxeFoundation/hxcs - cd extra && haxe doc.hxml + cd extra && \ + $(CURDIR)/$(HAXELIB_OUTPUT) newrepo && \ + $(CURDIR)/$(HAXELIB_OUTPUT) git hxcpp https://github.com/HaxeFoundation/hxcpp && \ + $(CURDIR)/$(HAXELIB_OUTPUT) git hxjava https://github.com/HaxeFoundation/hxjava && \ + $(CURDIR)/$(HAXELIB_OUTPUT) git hxcs https://github.com/HaxeFoundation/hxcs && \ + PATH="$(CURDIR):$(PATH)" $(CURDIR)/$(HAXE_OUTPUT) doc.hxml $(INSTALLER_TMP_DIR): mkdir -p $(INSTALLER_TMP_DIR) $(INSTALLER_TMP_DIR)/neko-osx64.tar.gz: $(INSTALLER_TMP_DIR) - wget http://nekovm.org/media/neko-2.1.0-osx64.tar.gz -O installer/neko-osx64.tar.gz + wget -nv http://nekovm.org/media/neko-2.1.0-osx64.tar.gz -O installer/neko-osx64.tar.gz # Installer package_installer_mac: $(INSTALLER_TMP_DIR)/neko-osx64.tar.gz package_unix $(eval OUTFILE := $(shell pwd)/$(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_installer.tar.gz) $(eval PACKFILE := $(shell pwd)/$(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_bin.tar.gz) - $(eval VERSION := $(shell haxe -version 2>&1)) + $(eval VERSION := $(shell $(CURDIR)/$(HAXE_OUTPUT) -version 2>&1)) $(eval NEKOVER := $(shell neko -version 2>&1)) bash -c "rm -rf $(INSTALLER_TMP_DIR)/{resources,pkg,tgz,haxe.tar.gz}" mkdir $(INSTALLER_TMP_DIR)/resources @@ -364,27 +303,19 @@ package_installer_mac: $(INSTALLER_TMP_DIR)/neko-osx64.tar.gz package_unix clean: clean_libs clean_haxe clean_tools clean_package clean_libs: - make -C libs/extlib clean - make -C libs/extc clean - make -C libs/neko clean - make -C libs/ziplib clean - make -C libs/javalib clean - make -C libs/ilib clean - make -C libs/swflib clean - make -C libs/xml-light clean - make -C libs/ttflib clean - make -C libs/objsize clean - make -C libs/pcre clean + $(foreach lib,$(EXTLIB_LIBS),$(MAKE) -C libs/$(lib) clean &&) true clean_haxe: - rm -f -r $(MODULES:%=src/%.obj) $(MODULES:%=src/%.o) $(MODULES:%=src/%.cmx) $(MODULES:%=src/%.cmi) $(MODULES:%=src/%.cmo) $(MODULES:%=src/%.cmt) src/syntax/lexer.ml src/version.ml $(OUTPUT) + rm -f -r _build $(HAXE_OUTPUT) $(PREBUILD_OUTPUT) clean_tools: - rm -f $(OUTPUT) haxelib + rm -f $(HAXE_OUTPUT) $(PREBUILD_OUTPUT) $(HAXELIB_OUTPUT) clean_package: rm -rf $(PACKAGE_OUT_DIR) +FORCE: + # SUFFIXES .ml.cmx: @@ -393,7 +324,4 @@ clean_package: .ml.cmo: $(CC_CMD) -.mll.ml: - ocamllex $< - -.PHONY: haxe libs version.cmx version.cmo haxelib +.PHONY: haxe libs haxelib diff --git a/Makefile.version_extra b/Makefile.version_extra index 991233b6d5698d399daa2c78e991c74f805281f5..f423bf9975158768914fbe4f2b799f1cc915fe3b 100644 --- a/Makefile.version_extra +++ b/Makefile.version_extra @@ -5,7 +5,7 @@ all: ; ifneq ($(ADD_REVISION),0) - $(info let version_extra = Some "(git build $(BRANCH) @ $(COMMIT_SHA))") + $(info let version_extra = Some ("git build $(BRANCH)","$(COMMIT_SHA)")) else $(info let version_extra = None) endif \ No newline at end of file diff --git a/Makefile.win b/Makefile.win index 343e2d550f8be7211d57bb6610071281f41fc411..098d6f462f5ae0e213ddd7e98c8ef90ae05948bd 100644 --- a/Makefile.win +++ b/Makefile.win @@ -1,10 +1,16 @@ PLATFORM=win +MAKEFILENAME=Makefile.win include Makefile -OUTPUT=haxe.exe +HAXE_OUTPUT=haxe.exe +HAXELIB_OUTPUT=haxelib.exe +PREBUILD_OUTPUT=prebuild.exe EXTENSION=.exe PACKAGE_SRC_EXTENSION=.zip +ARCH?=32 -OCAMLOPT=ocamlopt.opt +ifeq ($(ARCH),64) +NEKO_ARCH_STR=64 +endif kill: -@taskkill /F /IM haxe.exe @@ -28,15 +34,17 @@ FILTER=sed 's/File "\([^"]\+\)", line \([0-9]\+\), \(.*\)/\1(\2): \3/' tmp.cmi endif ifeq (${FD_OUTPUT}, 1) -FILTER=sed '/File/{ N; s/File "\([^"]\+\)", line \([0-9]\+\), characters \([0-9-]\+\):[\r\n]*\(.*\)/\1:\2: characters \3 : \4/ }' tmp.cmi +FILTER=sed -e '/File/{ N; s/File "\([^"]\+\)", line \([0-9]\+\), characters \([0-9-]\+\):[\r\n]*\(.*\)/\1:\2: characters \3 : \4/ }' -e 's/_build\/src\//src\//' tmp.cmi endif ifdef FILTER -CC_CMD=($(OCAMLOPT) $(ALL_CFLAGS) -c $< 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1) -CC_PARSER_CMD=($(OCAMLOPT) -pp camlp4o $(ALL_CFLAGS) -c src/syntax/parser.ml 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1) +CC_CMD=($(COMPILER) $(ALL_CFLAGS) -c $< 2>tmp.cmi && $(FILTER)) || ($(FILTER) && exit 1) endif -PACKAGE_FILES=$(OUTPUT) haxelib$(EXTENSION) std "$$(cygpath -w "$$(which zlib1.dll)")" "$$(cygpath -w "$$(which libpcre-1.dll)")" +PACKAGE_FILES=$(HAXE_OUTPUT) $(HAXELIB_OUTPUT) std "$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep zlib1.dll | sed -e 's/^\s*//')" "$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libpcre-1.dll | sed -e 's/^\s*//')" + +echo_package_files: + echo $(PACKAGE_FILES) package_win: mkdir -p out @@ -57,17 +65,16 @@ package_choco: mkdir -p OUTPUT 7z x -y out/$(PACKAGE_FILE_NAME)_bin.zip -oout > log.txt || type log.txt mv out/$(PACKAGE_FILE_NAME) out/choco - sed -e 's/@SNAPSHOT_VERSION@/$(HAXE_VERSION)-SNAP$(COMMIT_DATE)/g' extra/choco/haxe.nuspec > out/choco/haxe.nuspec + sed -e 's/@SNAPSHOT_VERSION@/$(HAXE_VERSION_SHORT)-SNAP$(COMMIT_DATE)/g' extra/choco/haxe.nuspec > out/choco/haxe.nuspec cd out/choco && choco pack mv out/choco/haxe.*.nupkg out rm -rf out/choco $(INSTALLER_TMP_DIR)/neko-win.zip: $(INSTALLER_TMP_DIR) - wget http://nekovm.org/media/neko-2.1.0-win.zip -O installer/neko-win.zip + wget -nv https://nekovm.org/media/neko-2.2.0-win$(NEKO_ARCH_STR).zip -O installer/neko-win.zip package_installer_win: $(INSTALLER_TMP_DIR)/neko-win.zip package_win $(eval OUTFILE := $(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_installer.zip) - $(eval VERSION := $(shell haxe -version 2>&1 | cut -d ' ' -f1)) rm -rf $(INSTALLER_TMP_DIR)/resources # neko mkdir $(INSTALLER_TMP_DIR)/resources @@ -78,17 +85,19 @@ package_installer_win: $(INSTALLER_TMP_DIR)/neko-win.zip package_win 7z x -y $(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_bin.zip -o$(INSTALLER_TMP_DIR)/resources mv $(INSTALLER_TMP_DIR)/resources/haxe* $(INSTALLER_TMP_DIR)/resources/haxe # haxesetup.exe - haxelib path hxcpp || haxelib install hxcpp - cd extra; haxelib run hxcpp build-haxesetup.xml + cd extra && \ + $(CURDIR)/$(HAXELIB_OUTPUT) newrepo && \ + $(CURDIR)/$(HAXELIB_OUTPUT) install hxcpp --quiet && \ + $(CURDIR)/$(HAXELIB_OUTPUT) run hxcpp build-haxesetup.xml cp extra/haxesetup.exe $(INSTALLER_TMP_DIR)/resources/haxe # extra cp extra/*.nsi $(INSTALLER_TMP_DIR) cp extra/*.nsh $(INSTALLER_TMP_DIR) cp -rf extra/images $(INSTALLER_TMP_DIR) # nsis - sed -i "s/%%VERSION%%/$(VERSION)/g" $(INSTALLER_TMP_DIR)/installer.nsi - sed -i "s/%%VERSTRING%%/$(VERSION)/g" $(INSTALLER_TMP_DIR)/installer.nsi - sed -i "s/%%VERLONG%%/$(VERSION)/g" $(INSTALLER_TMP_DIR)/installer.nsi + sed -i "s/%%VERSION%%/$(HAXE_VERSION_SHORT)/g" $(INSTALLER_TMP_DIR)/installer.nsi + sed -i "s/%%VERSTRING%%/$(HAXE_VERSION)/g" $(INSTALLER_TMP_DIR)/installer.nsi + sed -i "s/%%VERLONG%%/$(HAXE_VERSION)/g" $(INSTALLER_TMP_DIR)/installer.nsi cd $(INSTALLER_TMP_DIR) && makensis installer.nsi 7z a -r -tzip $(OUTFILE) $(INSTALLER_TMP_DIR)/*.exe dir $(PACKAGE_OUT_DIR) diff --git a/README.md b/README.md index a85db2d94a2a496328c8b08124a797fa7c7875c4..21c57647dabebd1de96695854119c60031c57622 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,15 @@ +

+ +

-# [Haxe logo](https://haxe.org) - [The Cross-Platform Toolkit](https://haxe.org) -[![TravisCI Build Status](https://travis-ci.org/HaxeFoundation/haxe.svg?branch=development)](https://travis-ci.org/HaxeFoundation/haxe) -[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/HaxeFoundation/haxe?branch=development&svg=true)](https://ci.appveyor.com/project/HaxeFoundation/haxe) -[![SauceLabs Test Status](https://saucelabs.com/buildstatus/haxe)](https://saucelabs.com/u/haxe) -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/HaxeFoundation/haxe?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +

+ Azure Pipelines Build Status + SauceLabs Test Status + Gitter + Discord +

+ +# Haxe is an open source toolkit that allows you to easily build cross-platform tools and applications that target many mainstream platforms. The Haxe toolkit includes: @@ -13,21 +19,22 @@ Haxe is an open source toolkit that allows you to easily build cross-platform to Haxe allows you to compile for the following targets: - * ActionScript 3 + * JavaScript * C++ * C# - * Flash * Java - * JavaScript - * NekoVM - * PHP - * Python * Lua - * [HashLink](http://hashlink.haxe.org/) + * PHP + * Python 3 + * [HashLink](https://hashlink.haxe.org/) + * [NekoVM](https://nekovm.org/) + * Flash (SWF Bytecode) + * ActionScript 3 + * And its own [interpreter](https://haxe.org/blog/eval/) -You can try Haxe directly from your browser at [try.haxe.org](http://try.haxe.org)! +You can try Haxe directly from your browser at [try.haxe.org](https://try.haxe.org)! -For more information about Haxe, head to the [offical Haxe website](https://haxe.org). +For more information about Haxe, head to the [official Haxe website](https://haxe.org). ## License @@ -55,45 +62,45 @@ Automated development builds are available from [build.haxe.org](http://build.ha ## Building from source - 1. Clone the repository using git. Be sure to initialize and fetch the submodules. - - git clone --recursive git://github.com/HaxeFoundation/haxe.git - cd haxe - - 2. Follow the [documentation on building Haxe for your platform](https://haxe.org/documentation/introduction/building-haxe.html). +See [extra/BUILDING.md](extra/BUILDING.md). ## Using Haxe -For information on on using Haxe, consult the [Haxe documentation](https://haxe.org/documentation/): +For information on using Haxe, consult the [Haxe documentation](https://haxe.org/documentation/): * [Haxe Introduction](https://haxe.org/documentation/introduction/), an introduction to the Haxe toolkit * [The Haxe Manual](https://haxe.org/manual/), the reference manual for the Haxe language - * [Haxe Code Cookbook](http://code.haxe.org), code snippets / learning resource - * [Haxe API](http://api.haxe.org), documentation for the Haxe standard and native APIs - * [Haxelib](https://lib.haxe.org), a repository of Haxe libraries for a variety of needs + * [Haxe Code Cookbook](https://code.haxe.org), code snippets / learning resource + * [Haxe API](https://api.haxe.org), documentation for the Haxe standard and native APIs + * [Haxelib](https://lib.haxe.org), Haxelib is the package manager for the Haxe Toolkit. ## Community You can get help and talk with fellow Haxers from around the world via: - * [Haxe on Stack Overflow](http://stackoverflow.com/questions/tagged/haxe) - * the [official Haxe Google Group](https://groups.google.com/forum/#!forum/haxelang) - * [#Haxe on Twitter](https://twitter.com/hashtag/haxe?src=hash) - * the [Haxe IRC chatroom](http://unic0rn.github.io/tiramisu/haxe), #haxe on chat.freenode.net + * [Haxe Community Forum](http://community.haxe.org) + * [Haxe on Stack Overflow](https://stackoverflow.com/questions/tagged/haxe) + * [Haxe Gitter chatroom](https://gitter.im/HaxeFoundation/haxe/) + * [Haxe Discord server](https://discordapp.com/invite/0uEuWH3spjck73Lo) + * [#haxe on Twitter](https://twitter.com/hashtag/haxe?src=hash) -:+1: Get notified of the latest Haxe news, follow us on [Twitter](https://twitter.com/haxelang), [Facebook](https://www.facebook.com/haxe.org) or [Google+](https://plus.google.com/+HaxeOrg) +:+1: Get notified of the latest Haxe news, follow us on [Twitter](https://twitter.com/haxelang), [Facebook](https://www.facebook.com/haxe.org) and don't forget to read the [Haxe roundups](https://haxe.io/). ## Version compatibility -Haxe | neko ----- | ----- -2.* | 1.* -3.0.0 | 2.0.0 -3.1.3 | 2.0.0 -3.2.0 | 2.0.0 -3.3.0 | 2.1.0 -3.4.0 | 2.1.0 - +Haxe | Neko | SWF | Python | HL | PHP | Lua | +---- | ---- | ---- | ---- | ---- | ---- | ---- | +2.* | 1.* | 8-10 | - | - | - | - | +3.0.0 | 2.0.0 | | - | - | 5.1+ | - | +3.2.0 | | 12-14 | 3.2+ | - | | - | +3.3.0 | 2.1.0 | 21 | | - | | 5.1, 5.2, 5.3, LuaJIT 2.0, 2.1 | +3.4.0 | | | | 1.1 | 5.4+ and 7.0+ (with `-D php7`) | | +4.0.0-preview.1 | | | | 1.2 | 7.0+ | | +4.0.0-preview.3 | | | | 1.3 | | | +4.0.0-preview.4 | | | | 1.6 | | | +4.0.0-preview.5 | | | | 1.8 | | | +4.0.0-rc.1 | | | | 1.9 | | | +4.0.0-rc.3 | | | | 1.10 | | | ## Contributing diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000000000000000000000000000000000..9a4326b1de7876ba8c74307737465c3b9f590a82 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,303 @@ +variables: + - group: variables-haxe + - name: AZURE_PIPELINES_REPO_URL + value: $(Build.Repository.Uri) + - name: AZURE_PIPELINES_BRANCH + value: $(Build.SourceBranchName) + +stages: + - stage: StageTest + jobs: + - template: extra/azure-pipelines/build-linux.yml + parameters: + name: BuildLinux + + - template: extra/azure-pipelines/build-mac.yml + parameters: + name: BuildMac + + - template: extra/azure-pipelines/build-windows.yml + parameters: + name: BuildWin64 + arch: '64' + + - template: extra/azure-pipelines/build-windows.yml + parameters: + name: BuildWin32 + arch: '32' + + - job: TestLinux + dependsOn: BuildLinux + pool: + vmImage: 'ubuntu-16.04' + strategy: + matrix: + macro: + TEST: macro + neko: + TEST: neko + hl: + TEST: hl + APT_PACKAGES: cmake ninja-build + cpp: + TEST: cpp + HXCPP_COMPILE_CACHE: ~/hxcache + APT_PACKAGES: gcc-multilib g++-multilib + java: + TEST: java,jvm + cs: + TEST: cs + js: + TEST: js + SAUCE: 1 + SAUCE_TUNNEL_ID: $(Agent.JobName) + SAUCE_BUILD: $(Build.BuildNumber) + php: + TEST: php + flash: + TEST: flash9,as3 + APT_PACKAGES: libglib2.0 libfreetype6 xvfb + DISPLAY: ':99.0' + AUDIODEV: 'null' + python: + TEST: python + lua: + TEST: lua + APT_PACKAGES: ncurses-dev + steps: + - checkout: self + fetchDepth: 20 + - template: extra/azure-pipelines/install-neko-snapshot.yaml + parameters: + platform: linux64 + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'linuxBinaries' + targetPath: linuxBinaries + - script: | + set -ex + tar -xf linuxBinaries/*_bin.tar.gz -C linuxBinaries --strip-components=1 + sudo mkdir -p /usr/local/bin/ + sudo mkdir -p /usr/local/share/haxe/ + sudo ln -s `pwd`/linuxBinaries/haxe /usr/local/bin/haxe + sudo ln -s `pwd`/linuxBinaries/haxelib /usr/local/bin/haxelib + sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std + displayName: Setup Haxe + - script: haxe -version + displayName: Print Haxe version + - script: | + set -ex + mkdir ~/haxelib + haxelib setup ~/haxelib + displayName: Setup haxelib + - script: | + set -ex + sudo apt update -qqy + sudo apt install -qqy $APT_PACKAGES + condition: and(succeeded(), variables['APT_PACKAGES']) + displayName: Install apt packages + - script: haxe RunCi.hxml + workingDirectory: $(Build.SourcesDirectory)/tests + env: + ${{ if variables['SAUCE_ACCESS_KEY'] }}: + SAUCE_ACCESS_KEY: $(SAUCE_ACCESS_KEY) + displayName: Test + + - job: TestMac + dependsOn: BuildMac + pool: + vmImage: 'macOS-10.13' + strategy: + matrix: + macro: + TEST: macro + neko: + TEST: neko + hl: + TEST: hl + BREW_PACKAGES: ninja + cpp: + TEST: cpp + HXCPP_COMPILE_CACHE: ~/hxcache + java: + TEST: java,jvm + cs: + TEST: cs + js: + TEST: js + php: + TEST: php + flash: + TEST: flash9,as3 + python: + TEST: python + lua: + TEST: lua + steps: + - checkout: self + fetchDepth: 20 + - template: extra/azure-pipelines/install-neko-snapshot.yaml + parameters: + platform: mac + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'macBinaries' + targetPath: macBinaries + - script: | + set -ex + tar -xf macBinaries/*_bin.tar.gz -C macBinaries --strip-components=1 + sudo mkdir -p /usr/local/bin/ + sudo mkdir -p /usr/local/share/haxe/ + sudo ln -s `pwd`/macBinaries/haxe /usr/local/bin/haxe + sudo ln -s `pwd`/macBinaries/haxelib /usr/local/bin/haxelib + sudo ln -s `pwd`/macBinaries/std /usr/local/share/haxe/std + displayName: Setup Haxe + - script: haxe -version + displayName: Print Haxe version + - script: | + set -ex + mkdir ~/haxelib + haxelib setup ~/haxelib + displayName: Setup haxelib + - script: brew install $BREW_PACKAGES + condition: and(succeeded(), variables['BREW_PACKAGES']) + displayName: Install homebrew packages + - script: haxe RunCi.hxml + workingDirectory: $(Build.SourcesDirectory)/tests + displayName: Test + + - template: extra/azure-pipelines/test-windows.yml + parameters: + name: TestWin64 + arch: '64' + + - template: extra/azure-pipelines/test-windows.yml + parameters: + name: TestWin32 + arch: '32' + + - stage: StageDeploy + condition: and(succeeded(), not(variables['System.PullRequest.PullRequestId'])) + jobs: + - job: S3 + condition: and(succeeded(), variables['HXBUILDS_AWS_ACCESS_KEY_ID'], variables['HXBUILDS_S3ADDR']) + pool: + vmImage: 'ubuntu-16.04' + steps: + - checkout: self + fetchDepth: 20 + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'linuxBinaries' + targetPath: linuxBinaries + displayName: Download linuxBinaries + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'macBinaries' + targetPath: macBinaries + displayName: Download macBinaries + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'win64Binaries' + targetPath: win64Binaries + displayName: Download win64Binaries + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'win32Binaries' + targetPath: win32Binaries + displayName: Download win32Binaries + - template: extra/azure-pipelines/install-neko-snapshot.yaml + parameters: + platform: linux64 + - script: | + set -ex + tar -xf linuxBinaries/*_bin.tar.gz -C linuxBinaries --strip-components=1 + sudo mkdir -p /usr/local/bin/ + sudo mkdir -p /usr/local/share/haxe/ + sudo ln -s `pwd`/linuxBinaries/haxe /usr/local/bin/haxe + sudo ln -s `pwd`/linuxBinaries/haxelib /usr/local/bin/haxelib + sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std + displayName: Setup Haxe + - script: | + set -ex + sudo apt-get update -qqy + sudo apt-get install -qqy awscli + displayName: "Install awscli" + - script: | + set -ex + COMMIT_HASH=`git rev-parse HEAD` + COMMIT_HASH_SHORT=${COMMIT_HASH:0:7} + COMMIT_DATE=`TZ=UTC git show --quiet --date='format-local:%Y-%m-%d' --format="%cd"` + FILE_NAME=haxe_${COMMIT_DATE}_$(Build.SourceBranchName)_${COMMIT_HASH_SHORT} + aws s3 cp linuxBinaries/*_bin.tar.gz $(HXBUILDS_S3ADDR)/haxe/linux64/${FILE_NAME}.tar.gz + aws s3 cp macBinaries/*_bin.tar.gz $(HXBUILDS_S3ADDR)/haxe/mac/${FILE_NAME}.tar.gz + aws s3 cp macBinaries/*_installer.tar.gz $(HXBUILDS_S3ADDR)/haxe/mac-installer/${FILE_NAME}.tar.gz + aws s3 cp win64Binaries/*_bin.zip $(HXBUILDS_S3ADDR)/haxe/windows64/${FILE_NAME}.zip + aws s3 cp win64Binaries/*_installer.zip $(HXBUILDS_S3ADDR)/haxe/windows64-installer/${FILE_NAME}.zip + aws s3 cp win64Binaries/*.nupkg $(HXBUILDS_S3ADDR)/haxe/windows64-choco/ + aws s3 cp win32Binaries/*_bin.zip $(HXBUILDS_S3ADDR)/haxe/windows/${FILE_NAME}.zip + aws s3 cp win32Binaries/*_installer.zip $(HXBUILDS_S3ADDR)/haxe/windows-installer/${FILE_NAME}.zip + aws s3 cp win32Binaries/*.nupkg $(HXBUILDS_S3ADDR)/haxe/windows-choco/ + env: + AWS_ACCESS_KEY_ID: $(HXBUILDS_AWS_ACCESS_KEY_ID) + AWS_SECRET_ACCESS_KEY: $(HXBUILDS_AWS_SECRET_ACCESS_KEY) + displayName: Upload binaries + - script: | + set -ex + aws s3 cp linuxBinaries/*_bin.tar.gz $(HXBUILDS_S3ADDR)/haxe/linux64/haxe_latest.tar.gz + aws s3 cp macBinaries/*_bin.tar.gz $(HXBUILDS_S3ADDR)/haxe/mac/haxe_latest.tar.gz + aws s3 cp macBinaries/*_installer.tar.gz $(HXBUILDS_S3ADDR)/haxe/mac-installer/haxe_latest.tar.gz + aws s3 cp win64Binaries/*_bin.zip $(HXBUILDS_S3ADDR)/haxe/windows64/haxe_latest.zip + aws s3 cp win64Binaries/*_installer.zip $(HXBUILDS_S3ADDR)/haxe/windows64-installer/haxe_latest.zip + aws s3 cp win32Binaries/*_bin.zip $(HXBUILDS_S3ADDR)/haxe/windows/haxe_latest.zip + aws s3 cp win32Binaries/*_installer.zip $(HXBUILDS_S3ADDR)/haxe/windows-installer/haxe_latest.zip + + # Chocolatey packages have to be named with version number, + # so let's use web redirection to keep the original file name. + [[ "$HXBUILDS_S3ADDR" =~ s3://([^/]+)(.*) ]] && HXBUILDS_S3BUCKET="${BASH_REMATCH[1]}" && HXBUILDS_S3PATH="${BASH_REMATCH[2]}" + [[ `echo win64Binaries/*.nupkg` =~ win64Binaries/(.+) ]] && FILE_NAME="${BASH_REMATCH[1]}" + aws s3 cp $(HXBUILDS_S3ADDR)/haxe/windows64-choco/${FILE_NAME} $(HXBUILDS_S3ADDR)/haxe/windows64-choco/haxe_latest.nupkg --acl public-read --website-redirect "${HXBUILDS_S3PATH}/haxe/windows64-choco/${FILE_NAME}" + [[ `echo win32Binaries/*.nupkg` =~ win32Binaries/(.+) ]] && FILE_NAME="${BASH_REMATCH[1]}" + aws s3 cp $(HXBUILDS_S3ADDR)/haxe/windows-choco/${FILE_NAME} $(HXBUILDS_S3ADDR)/haxe/windows-choco/haxe_latest.nupkg --acl public-read --website-redirect "${HXBUILDS_S3PATH}/haxe/windows-choco/${FILE_NAME}" + env: + AWS_ACCESS_KEY_ID: $(HXBUILDS_AWS_ACCESS_KEY_ID) + AWS_SECRET_ACCESS_KEY: $(HXBUILDS_AWS_SECRET_ACCESS_KEY) + condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'development')) + displayName: Update "latest" + + - job: ApiHaxeOrg + condition: and(succeeded(), variables['GHP_USERNAME'], variables['GHP_EMAIL']) + pool: + vmImage: 'ubuntu-16.04' + steps: + - checkout: none + - template: extra/azure-pipelines/install-neko-snapshot.yaml + parameters: + platform: linux64 + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'linuxBinaries' + targetPath: linuxBinaries + displayName: Download linuxBinaries + - script: | + set -ex + tar -xf linuxBinaries/*_bin.tar.gz -C linuxBinaries --strip-components=1 + sudo mkdir -p /usr/local/bin/ + sudo mkdir -p /usr/local/share/haxe/ + sudo ln -s `pwd`/linuxBinaries/haxe /usr/local/bin/haxe + sudo ln -s `pwd`/linuxBinaries/haxelib /usr/local/bin/haxelib + sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std + displayName: Setup Haxe + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'xmldoc' + targetPath: xmldoc + displayName: Download xmldoc + - script: | + set -ex + LOCAL="`pwd`/extra/api.haxe.org" + git clone "${GHP_REMOTE}" "${LOCAL}" + haxe --cwd "${LOCAL}" --run ImportXml "`pwd`/xmldoc" + env: + GHP_REMOTE: $(GHP_REMOTE) + displayName: Deploy to api.haxe.org \ No newline at end of file diff --git a/extra/BUILDING.md b/extra/BUILDING.md new file mode 100644 index 0000000000000000000000000000000000000000..18c80933b48b3c57fbf92858bf720476a1e9cc5e --- /dev/null +++ b/extra/BUILDING.md @@ -0,0 +1,79 @@ +# Building Haxe from source + +## Obtaining the source + +The Haxe compiler source files are hosted on GitHub under the [HaxeFoundation account](https://github.com/HaxeFoundation). The [Haxe repository](https://github.com/HaxeFoundation/haxe) has several submodules, so cloning it should be done with the `--recursive` flag like so: + +``` +git clone --recursive https://github.com/HaxeFoundation/haxe.git +``` + +Alternatively, source .zip archives or tarballs can be obtained from the [GitHub Haxe release overview](https://github.com/HaxeFoundation/haxe/releases). However, the git submodules are not included, so you will have to manually place the source code of [submodules](https://github.com/HaxeFoundation/haxe/blob/development/.gitmodules) into appropriate sub-folders. + +## Setting up OCaml + +The Haxe compiler is written in OCaml, so you have to set up an OCaml development environment. In addition, we make use of a number of OCaml libraries. We recommend using OPAM, which is an OCaml package manager that can also manage OCaml installations. + +The Haxe compiler requires OCaml version 4.02 or higher. Since some of the OCaml libraries Haxe depends on were uploaded in the OPAM 2 format, you should use OPAM 2.x instead of OPAM 1.x. + +To install OPAM on Unix (e.g. Mac, Linux) systems, follow the [instruction given by OPAM](https://opam.ocaml.org/doc/Install.html). On Windows, we recommend using the [Cygwin/MinGW-based OPAM environment provided by fdopen](https://fdopen.github.io/opam-repository-mingw/installation/), choose the 64-bit versions of everything, also make sure to [use the OPAM 2 version](https://github.com/fdopen/opam-repository-mingw/issues/48). + +In case you messed up the OPAM installation, you can uninstall OPAM and remove `~/.opam`, which contains the OCaml switches (OCaml compilers and libraries), and start over. + +Also note that since OPAM 2 on Linux will try to use bubblewrap, which uses Linux user namespaces, which might not be available on environments like Docker or Windows Subsystem for Linux (WSL). In case of encountering related errors, use `--disable-sandboxing` during `opam init`. + +## Installing dependencies + +You need to install some native libraries as well as some OCaml libraries. + + * Native libraries + * PCRE + * zlib + * Neko (for building haxelib) + * OCaml libraries + * listed in the `opam` file at the repository root + +To install the native libraries, use the appropriate system package manager. + + * Mac OS X + * Use [Homebrew](https://brew.sh/), `brew install zlib pcre`. + * Debian / Ubuntu + * `sudo apt install libpcre3-dev zlib1g-dev`. + * Windows (Cygwin) + * Run the Cygwin [setup-x86_64.exe](https://cygwin.com/install.html) against the Cygwin installation directory. Install `make`, `git`, `zlib-devel`, `libpcre-devel`, `mingw64-x86_64-gcc-core`, `mingw64-x86_64-zlib`, and `mingw64-x86_64-pcre`. You may need to select "Not Installed" in the dropdown list to see the packages. Copy `zlib1.dll` and `libpcre-1.dll` from `path/to/cygwin/usr/x86_64-w64-mingw32/sys-root/mingw/bin` to the checked out Haxe source directory. + * Install Neko by either + * Download the [Neko binaries](https://nekovm.org/download/), and add the extracted directory to the beginning of PATH. + * Install the [Chocolatey Neko package](https://chocolatey.org/packages/neko). + +To install the OCaml libraries, use OPAM as follows: + +```sh +# pin the haxe package to the checked out Haxe source directory +opam pin add haxe path/to/haxe --kind=path --no-action + +# install the haxe package dependencies (as listed in the `opam` file) +opam install haxe --deps-only +``` + +## Compile + +In the checked out Haxe source directory, +```sh +# On Unix +make + +# On Windows (Cygwin) +make -f Makefile.win +``` + +## Install + +Generally, you should remove any existing Haxe installation to avoid conflict. You should at least make sure that the `HAXE_STD_PATH` environment variable is not set. + +To install the freshly built Haxe, + + * On Unix (e.g. Mac and Linux), + ```sh + sudo make install + ``` + * On Windows, add the checked out Haxe source directory to the beginning of PATH. diff --git a/extra/CHANGES.txt b/extra/CHANGES.txt index 9467aad824b034513eb448e143f3b3a0df9ce50c..3ef50ef642bae9b5bc403733d198964f2f8cdf29 100644 --- a/extra/CHANGES.txt +++ b/extra/CHANGES.txt @@ -1,20 +1,519 @@ -2018-02-21: 3.4.7 +2019-10-26: 4.0.0 + + General improvements: + + js : updated externs for `Float32Array` and `Float64Array` (#8864) + php : added array access to `php.NativeStructArray` (#8893) + + Bugfixes: + + cs : fixed "This expression may be invalid" false warning (#8589) + php : fixed iterator fields on maps being removed (#8851) + php : fixed `-2147483648` as init value for static vars (#5289) + python : fixed modulo by a negative number (#8845) + java : fixed backslash escaping on `EReg.replace` (#3430) + lua : fixed `EReg.map` for unicode (#8861) + hl : fixed sqlite connection on OSX/Linux (#8878) + +2019-09-12: 4.0.0-rc.5 + + General improvements and optimizations: + + eval: improved performance of regular expressions (#8693) + + Bugfixes: + + all: fixed regression, which caused compiler to crash on enum abstracts with explicit casting (#8765) + all: fixed regression of macro `@:from` methods on abstracts (#8779) + all: fixed switching on `this` (#8781) + +2019-09-04: 4.0.0-rc.4 + + Standard Library: + + all : added Map.clear (#8681) + all : improved Date API (#8508) + all : added JSON-RPC protocol types to haxe.display package (#8610) + all : added default timeout to HTTP sockets (#8646) + macro : added Context.info (#8478) + macro : added Context.getMessages and Context.filterMessages (#8471) + macro : added function kind to EFunction (#8653) + macro : added string literal kind to CString (#8668) + flash : added flash.AnyType (#8549) + + General improvements and optimizations: + + all : allowed enum constructors without arguments as static inline var (#8187) + all : improved handling of default values when inlining (#8397) + all : made various improvements to the display API as usual + all : detect invalid #tokens in inactive code (#7108) + all : allowed function types in @:generic (#3697) + all : improved --help-defines and --help-metas + all : improved overall file finding (#8202) + all : improved server reaction to added and removed files (#8451) + all : improved memory handling of the compilation server (8727) + all : improved handling of native libraries on the compilation server (#8629) + all : support partial completion results (#8642) + all : improved support of hovering over inactive conditional compilation blocks + all : improved completion support in .platform.hx files + all : support hovering conditional compilation identifiers + all : improved and unified identifier checks for names, fields and types (#8708) + all : improved --times performance (#8733) + all : remove some redundant cast expressions (#8725) + all : added --server-connect (#8730) + lua : improved -D lua-vanilla + js : improved HTML externs + + Bugfixes : + + all : fixed various position and replace ranges in the display API + all : fixed compiler hang related to @:arrayAccess (#5525) + all : fixed bug regarding abstract `this` modification in inline methods (#8454) + all : fixed `from Dynamic` on abstracts (#8425) + all : fixed overeager recursive inline check (#8489) + all : fixed the pattern matcher allowing inexhaustive switches in value-places (#8277) + all : fixed pattern matcher allowing invalid abstract unification (#8579) + all : fixed local variable type information being lost on the compilation server (#8511) + all : don't generate return expressions in Void lambda functions (#6503) + all : fixed unification of recursive typedefs again (#8523) + all : fixed various hangs related to abstracts (#8588) + all : fixed various GADT-related problems (#7672) + all : fixed macro `@:from` methods allowing any return type (#8463) + macro : fixed Sys.programPath assertion failure (#8466) + js : fixed typed array APIs (#8422) + java : fixed Std.is on non-reference and unrelated types (#5168) + java/macro : fixed null-pointer exception in Reflect.getProperty (#4934) + java/jvm : fix switch on null string (#4481) + jvm : fixed boxed vs. unboxed comparison (#8577) + jvm : generate toplevel types to haxe.root like genjava does (#8590) + jvm : improved 32bit support (#8601) + cs/python : fixed various issues with code generation + cs : fixed NativeArray casting (#3949) + +2019-06-13: 4.0.0-rc.3 + + New features: + + all : added JVM target + + General improvements and optimizations: + + all : create temp vars in pattern matcher to avoid duplicate access (#8064) + all : support parsing dots in conditional compilation, e.g. `#if target.sys` + all : added `@:bypassAccessor` + all : improved various aspects of the display API + all : properly error on `@:op(a = b)` (#6903) + all : made `@:using` actually work + all : properly disallowed some modifier combinations related to `final` (#8335) + all : support `@:pure(false)` on variable fields (#8338) + flash : updated Flash externs to version 32.0 (now using `final`, `enum abstract` and `haxe.extern.Rest`) + flash : rework support for native Flash properties (#8241) + php : improved performance of various parser implementations (#8083) + cs : support .NET core target (#8391) + cs : generate native type parameter constraints (#8311, #7863) + + Standard Library: + + all : added StringTools.contains (#7608) + all : turned sys.thread.Thread into abstracts (#8130) + all : introduced `Std.downcast` as replacement for `Std.instance` (#8301) + all : introduced `UnicodeString`, deprecated `haxe.Utf8` (#8298) + java : added java.NativeString (#8163) + cs : added sys.thread implementations (#8166) + js : moved various classes to js.lib (#7390) + + Bugfixes + + all : fixed issue with `@:generic` type parameters not being bound to Dynamic (#8102) + all : fixed various issues related to `@:structInit` + all : fixed top-down inference on abstract setters (#7674) + all : fixed DCE issue related to closures (#8200) + all : fixed and restricted various Unicode-related issues in String literals + all : fixed various priority issues regarding loops and iterators + all : fixed cast handling in try-catch expressions (#8257) + all : fixed `inline new` handling (#8240) + all : fixed pattern matcher issue with wildcards in or-patterns (#8296) + all : fixed `@:allow(package)` allowing too much (#8306) + all : fixed various issues with startIndex handling on String.indexOf and String.lastIndexOf + all : fixed infinite recursion related to printing of objects with circular references (#8113) + sys : fixed various Unicode issues (#8135) + macro : fixed Array.pop handling (#8075) + macro : fixed assertion failure when throwing exception (#8039) + macro : fixed various uncatchable exceptions being thrown + php : error on case-insensitive name clashes (#8219) + lua : fixed issue where Process output occasionally is missing some data + hl : fixed various String Unicode issues + java : fixed null exception in CallStack.exceptionStack (#8322) + js : fixed code generation issue related to negative abstract values (#8318) + flash : fix various issues, including native `protected` handling and method overloading + + Removals: + + all : remove support for `@:fakeEnum` enums + all : disallowed `\x` with values > 0x7F (#8141) + all : consistently disallowed metadata in lambda function arguments (#7800) + all : removed `--gen-hx-classes` (#8237) + +2019-03-22: 4.0.0-rc.2 + + New features: + + all : added strictness settings for the null-safety checker, using loose checking by default (#7811) + js : added ES6 class generation with `-D js-es=6` (#7806) + + General improvements and optimizations: + + all : inherit `@:native` for overriden methods (#7844) + all : standardized identifiers allowed in markup literals (#7558) + all : show typo suggestions when declaring `override` field (#7847) + all : improved parser error messages (#7912) + all : improved diagnostics of syntax errors (#7940) + all : improved positions of `switch` and `case` expressions (#7947) + all : allow parsing `#if (a.b)` (#8005) + eval : improved performance of various string operations (#7982) + eval : fixed many error positions + eval : greatly improved debugger interaction (#7839) + eval : properly support threads when debugging (#7991) + eval : improved handling of capture variables (#8017) + js : generate dot-access for "keyword" field names (#7645) + js : optimized run-time type checking against interfaces (#7834) + js : skip generation of interfaces when no run-time type checking needed (#7843) + + Standard Library: + + all : unified various Thread APIs in sys.thread (#7999) + all : moved typed arrays from `js.html` to `js.lib` (#7894) + all : added `iterator()` to `haxe.DynamicAccess` (#7892) + all : added `keyValueIterator()` to `haxe.DynamicAccess` (#7769) + eval : completed Thread API + + Bugfixes: + + all : fixed argument default value checking for externs (#7752) + all : fixed optional status of overloaded arguments with default values (#7794) + all : fixed DCE compilation server state issue (#7805) + all : fixed compilation server module dependency issue related to macros (#7448) + all : fixed call-site inlining on abstracts (#7886) + all : fixed Constructible not checking constraints properly (#6714) + all : fixed @:structInit not being compatible with `final` fields (#7182) + all : fixed capture variables being allowed in `.match` (#7921) + all : fixed infinite recursion on `@:generic` field access (#6430) + all : fixed `-D no-deprecation-warnings` for typedefs and enums + js : fixed bad stack handling on `Map` constraint checks (#7781) + js : fixed DCE issues related to haxe.CallStack (#7908) + cpp : fixed Socket flags not being preserved (#7989) + lua : fixed broken output when compiling through the compilation server (#7851) + lua : fixed `StringTools.fastCodeAt` with `-D lua-vanilla` (#7589) + lua : fixed `@:expose` for classes inside packages (#7849) + +2019-02-01: 4.0.0-rc.1 + + New features: + + all : added experimental null-safety feature through `--macro nullSafety("package")` (#7717) + + General improvements and optimizations: + + all : improved unification error messages (#7547) + all : added `haxe4` define + all : do not require semicolon for markup literals (#7438) + all : made `@:expose` imply `@:keep` (#7695) + all : unified cast, catch and Std.is behavior of null-values (#7532) + macro : static variables are now always re-initialized when using the compilation server (#5746) + macro : support `@:persistent` to keep macro static values across compilations + js : improve js.Promise extern: now `then` callback argument types can be properly inferred (#7644) + + Bugfixes: + + all : fixed various pattern matching problems + all : fixed various wrong positions when encoding data to macros + all : specified String.indexOf with out-of-bounds indices (#7601) + all : fixed various problems related to DCE and feature-handling (#7694) + all : fixed bad unary operator optimization (#7704) + js : fixed syntax problem related to `instanceof` (#7653) + flash : fixed var field access on interfaces being uncast (#7727) + cpp : fixed various issues related to casts + cpp : fixed some leftover unicode issues + php : fixed class naming conflicts (#7716) + eval : fixed Socket.setTimeout (#7682) + eval : fixed int switch bug related to overflows + + Removals: + + macro : deprecated Context.registerModuleReuseCall and onMacroContextReused (#5746) + +2018-10-13: 4.0.0-preview.5 + New features: + + all : support Unicode strings properly on all targets + all : support `for (key => value in e)` syntax for key-value iterators + all : added keyValueIterator to Map and its implementations + all : support loop-unrolling on `for (i in 0...5)` (#7365) + all : added support for write-mode `@:op(a.b)` + all : support `inline call()` and `inline new` expressions (#7425) + all : support `@:using` on type declarations (#7462) + all : support markup literal strings but require them to be macro-processed (#7438) + all : allow enum values without arguments as default function argument values (#7439) + lua : add -D lua-vanilla, which emits code with reduced functionality but no additional lib dependencies + + General improvements and optimizations: + + all : [breaking] reserved `operator` and `overload` as keywords (#7413) + all : made `final` on structure fields invariant (#7039) + all : [breaking] disallowed static variables that have no type-hint and expression (#6440) + all : added display/typeDefinition to display protocol (#7266) + all : fixed various display-related problems + all : made parser in display mode much more tolerant + all : allowed assigning `[]` where `Map` is expected (#7426) + all : unified various parts of the String API across all targets + php : Optimized haxe.ds.Vector (VectorData is not Array anymore) + php : Optimized `Map.copy()` and `Array.copy()` + php : Optimized iterators of `Map` and native arrays. + php : Support native PHP generators. See `php.Syntax.yield()` and `php.Generator` + js : updated HTML externs + eval : improved object prototype field handling (#7393) + eval : optimized int switches (#7481) + eval : improved IntMap and StringMap performance + eval : improved performance of instance calls + + Removals : + + all : disallowed get_x/set_x property syntax, use get/set instead (#4699) + all : disallowed default values on interface variables (#4087) + all : disallowed `implements Dynamic` on non-extern classes (#6191) + all : warn about expressions in extern non-inline fields (#5898) + all : removed `-D use-rtti-doc`, always store documentation instead (#7493) + all : disallowed macro-in-macro calls (#7496) + js : removed jQuery and swfobject externs (#7494) Bugfixes: - all : fixed a compilation failure if output directory starts with a slash (#6844) + all : fix GC compacting too often in server mode + all : [breaking] `function () { }(e)` is no longer parsed as a call (#5854) + all : fixed various minor inlining issues + all : disallowed `return null` from Void-functions (#7198) + all : fixed various pattern matching problems + all : fixed compiler hang in display mode (#7236) + all : fixed the XML printer trimming CDATA content (#7454) + all : fixed invalid visibility unification with statics (#7527) + php : Escape `$` in field names of anonymous objects (#7230) + php : Generate `switch` as `if...else if...else...` to avoid loose comparison (#7257) + cs : fixed bad evaluation order in structures (#7531) + eval : fixed various problems with the debugger + eval : fixed Vector.fromArrayCopy (#7492) + eval : fixed bad string conversions on invalid + operations + + Standard Library: + + all : [breaking] made Lambda functions return Array instead of List (#7097) + all : added haxe.iterators package + all : improved StringTools.lpad/rpad/htmlEscape implementation + +2018-06-12: 4.0.0-preview.4 + + New features: + + all : added JSON-RPC-based display protocol + all : allow `enum abstract` syntax instead of `@:enum abstract` (#4282) + all : allow `extern` on fields instead of `@:extern` + all : support signature completion on incomplete structures (#5767) + all : support auto-numbering and auto-stringification in enum abstracts (#7139) + all : support `Type1 & Type2` intersection syntax for type parameter constraints and structures (#7127) + + General improvements and optimizations: + + all : reworked CLI usage/help output (#6862) + all : implemented `for` loop unrolling (#3784) + all : metadata can now use `.`, e.g. `@:a.b`. This is represented as a string (#3959) + all : [breaking] disallow static extensions through abstract field casts (#5924) + all : [breaking] disallow static extensions on implicit `this` (#6036) + all : allow true and false expressions as type parameters (#6958) + all : improved display support in many areas + all : support `override |` completion + all : make display/references and display/toplevel actually work sometimes + all : allow `var ?x` and `final ?x` parsing in structures (#6947) + all : improved overall robustness of the parser in display mode + all : allow `@:commutative` on non-static abstract functions (#5599) + js : added externs for js.Date (#6855) + js : respect `-D source-map` flag to generate source maps in release builds + js : enums are now generated as objects instead of arrays (#6350) + eval : improved debugger, support conditional breakpoints + + Removals: + + all : moved haxe.remoting to hx3compat + js : moved js.XMLSocket to hx3compat + neko : moved neko.net to hx3compat + all : removed support for `T:(A, B)` constraint syntax + + Bugfixes: + + all : fixed various issues with diagnostics + all : fixed fields with default values for `@:structInit` classes (#5449) + all : fixed `Null` inconsistency in if/ternary expressions (#6955) + all : fixed visibility check related to private constructors of sibling classes (#6957) + all : fixed @:generic naming (#6968) + all : fixed handling of type parameters in local functions (#6560) + all : fixed resolution order between `untyped` and type parameters (#7113) + all : fixed unification behavior in try/catch expressions (#7120) + all : fixed field type being lost for Int expressions on Float fields (#7132) + all : cleaned up `inline` handling (#7155) + display : fixed completion in packages starting with underscore (#5417) + php : fixed Reflect.callMethod with classes as first argument (#7106) + eval : fixed internal exception surfacing in some context calls (#7007) + eval : fixed Type.enumEq (#6710) + flash : fixed silently swallowing exceptions in getters/setters when invoked with Reflect methods (#5460, #6871) + + Standard Library: + + all : added `resize` to Array (#6869) + all : [breaking] removed `return this` from some haxe.Http methods (#6980) + +2018-02-23: 4.0.0-preview.3 + + See full commit history at https://github.com/HaxeFoundation/haxe/compare/4.0.0-preview.2...4.0.0-preview.3, notable changes below: + + New features: + + all : added new function type syntax (`(a:Int, b:String)->Void`) (#6645) + all : added column to StackItem.FilePos (#6665) + all : added `-D warn-var-shadowing` + all : added haxe.Log.formatOutput (#6738) + js : added js.Syntax class for generating unsupported JavaScript syntax in a type-safe analyzer-friendly way + js : added js.Map and js.Set and js.JsIterator extern definitions (ES6) + hl : added hl.Format.digest, use it for native Sha1/Md5 + + General improvements and optimizations: + + all : made all non-warning/non-error compiler messages output to stdout (#4480) + all : make DCE keep constructor if any instance field is kept (#6690) + all : make `final` in structures use class notation + display : added `this` and `super` to toplevel completion (#6051) + php : implemented direct method comparison. No need to use `Reflect.compareMethods()` + php : added `php.Syntax.code()` instead of deprecated `untyped __php__()` (#6708) + php : added methods to `php.Syntax` for each php operator: `??`, `?:`, `**` etc. (#6708) + python : add ssl support for http requests + python : improve Sys.print(ln) code generation (#6184) + js : generate faster code for `x.iterator()` calls (#6669) + js : rework exception handling, added js.Lib.getOriginalException (#6713) + js : generate `value instanceof MyClass` instead of `Std.is(value, MyClass)` (#6687) + js : use lazy getter for HaxeError.message instead of calling String(val) in the ctor (#6754) + + Removals: + + php : removed `php.Syntax.binop()` (#6708) + + Deprecations: + + php : deprecated support for `untyped __php__`, `untyped __call__` etc. Use `php.Syntax` instead. + + Bugfixes: + + all : delay interface accessor generation properly (#6225, #6672) + all : fixed unbound variable error in anonymous functions (#6674) + all : fixed abstract `@:to` used when `from` is available in a specific case (#6751) + all : sys.Http: fix chunked encoding handling (#6763) + all : fix some invalid Json being accepted by haxe.format.JsonParser (#6734) + all : fixed haxe.format.JsonPrinter for instances of classes to make it produce consistent result across targets (#6801) all : fixed autogenerated constructor for extending @:structInit classes (#6822, #6078) - display : fixed completion in import.hx files (#6022) - php : fixed List.pop() for sequential pops (#6859) + js : fixed saving setter to `tmp` var before invocation (#6672) + lua : fix toString behavior in the case of -0 (#6652) + lua : properly bind field functions when passed as arguments (#6722) + php : don't fail on generating import aliases for classes with the similar names (#6680) + php : fixed `Sys.environment()` to also return variables set by `Sys.putEnv()` + php : fixed `sys.net.Socket.bind()` (#6693) + php : fixed appending "sqlite:" prefix to the names of files created by `sys.db.Sqlite.open()` (#6692) + php : made php.Lib.objectOfAssociativeArray() recursive (#6698) + php : fixed php error on parsing expressions like `a == b == c` (#6720) + php : fixed multiple file uploads in php.Web.parseMultiPart() (#4173) + php : fixed an issue with "Object" used as a class name for PHP 7.2 (it's a new keyword in php) (#6838) + eval : don't lose dynamic function inits from parent classes (#6660) + cs : fix order-dependent enum type parameter issue (#6016) + +2017-10-08: 4.0.0-preview.2 + + New features: + + all : added final keyword (#6596) + + General improvements and optimizations: + + all : replaced some occurrences of List with Array + all : changed haxe.xml.Fast to an abstract + all : improved optimization when comparing against `null` + all : added support for `case var x` syntax and detect possible typos (#6608) + php : changed `--php-prefix`, `--php-front` and `--php-lib` to `-D php-prefix=`, `-D php-front=` and `-D php-lib=` respectively + + Removals: + + all : moved haxe.unit to hx3compat + all : moved haxe.web.Request to hx3compat + php : dropped php5 support; minimum supported php version is 7.0 now + + Bugfixes: + + all : fixed issue with various functions not being displayed in macro context (#6000) + all : fixed invalid static extension lookup on `super` (#3607) + all : fixed typing error when constructing enums with abstracts over functions (#6609) + all : fixed bug that skipped checking @:from typing in some cases (#6564) + all : fixed Int64 parsing of negative numbers that end in a zero (#5493) + all : fixed top-down inference when constructing enums (#6606) + eval : fixed bug with equality handling + eval : fixed issue with file creation not defaulting to binary + eval : fixed invalid override detection (#6583) + eval : fixed infinite recursion when printing arrays/vectors + cs/java : fixed DCE bug that would lose toString method of thrown objects + php/python : fixed some bit operators for Int32 (#5938) + php : fixed accessing `static inline var` via reflection (#6630) + php : fixed Math.min() and Math.max() for NAN on PHP 7.1.9 and 7.1.10 + js : fixed js syntax error for `value.iterator--` (#6637) -2018-02-12: 3.4.6 + Standard Library: + + macro : added have.display.Position and PositionTools.toRange (#6599) + all : moved List to haxe.ds (#6610) + +2017-09-12: 4.0.0-preview.1 + + New features: + + all : reworked macro interpreter + all : added support for arrow functions + + General improvements and optimizations: + + js : improved generation of `break` inside `switch` inside loops (#4964) + cs : improved generation of enum classes (#6119) + sys : the `database` parameter of `Mysql.connect` is now optional + js : updated jQuery extern (js.jquery.*) for jQuery 1.12.4 / 3.2.1 support. + Makefile : default Unix installation location $(INSTALL_DIR) changed from /usr to /usr/local. + Makefile : default Unix std location $(INSTALL_STD_DIR) changed from $(INSTALL_LIB_DIR)/std to $(INSTALL_DIR)/share/haxe/std. + + Removals: + + all : removed --eval command line argument + sys : SPOD (sys.db.Object, sys.db.Manager and friends) was moved into a separate library `record-macros` (https://github.com/HaxeFoundation/record-macros) + js : js.JQuery and js.SWFObject were moved into hx3compat library (https://github.com/HaxeFoundation/hx3compat), + it's recommended to use more modern js.jquery.JQuery and js.swfobject.SWFObject classes. + all : moved haxe.web.Dispatch into hx3compat library (https://github.com/HaxeFoundation/hx3compat). Bugfixes: - all : fixed a bug when Haxe compiler couldn't find std lib on Linux if executed by another program - all : fixed "Unix.Unix_error" compiler failure if output directory contains a trailing slash (#6212, #6768) - php7 : fixed an issue with "Object" used as a class name for PHP 7.2 (it's a new keyword in php) (#6838) - as3 : fixed "inifinite recursion" compiler error for classes named "Object" + php7: fix Reflect.field() for strings (#6276) + php7: fix `@:enum abstract` generation without `-dce full` (#6175) + php7: fix using enum constructor with arguments as a call argument (#6177) + php7: fix `null` property access (#6281) + php7: fix setting values in a map stored in another map (#6257) + php7: fix haxe.io.Input.readAll() with disabled analyzer optimizations (#6387) + php/php7: fixed accessing enum constructors on enum type stored to a variable (#6159) + php/php7: fix "cannot implement previously implemented interface" (#6208) + php: fix invoking functions stored in dynamic static vars (#6158) + php: fix field access on `new MyClass()` expressions wrapped in a `cast` (#6294) + + Standard Library: + + all : added `EReg.escape` (#5098) + all : `BalancedTree implements `haxe.Constraints.IMap` (#6231) 2018-01-31: 3.4.5 @@ -935,7 +1434,7 @@ cpp : Fix socket sellect passing _s cpp : Throw error when match count does not match regex cpp : Improve register capture in GC - cpp : Fix Dynamic interger compare + cpp : Fix Dynamic integer compare cpp : Implement makeVarArgs cpp : Fix toString for nulls in Enums and Arrays cpp : Added initial Android support @@ -1169,7 +1668,7 @@ set all private+protected names from SWF lib to public (allow override+reflect) flash9 : use findprop instead of findpropstrict for 'this' access (allow dynamic) don't allow nullness changes in overrided/implemented - prevent typing hole with overriden polymorphic methods + prevent typing hole with overridden polymorphic methods added neko.vm.Mutex and neko.vm.Deque (included in neko 1.7.1) added package remapping using --remap @@ -1426,7 +1925,7 @@ 2007-01-28: 1.11 changed StringBuf.add implementation added haxe.Firebug - allowed variable return type for overriden/implemented methods + allowed variable return type for overridden/implemented methods display error position in front of each error line improved error messages when optional arguments not matched added neko.io.Path diff --git a/extra/ImportAll.hx b/extra/ImportAll.hx index 5e2ad85348d6655bc45f35194666a724b7f7bf0c..22e3f49a5062333e56bcc460511ee3afd3505ae8 100644 --- a/extra/ImportAll.hx +++ b/extra/ImportAll.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -38,10 +38,8 @@ class ImportAll { haxe.macro.Compiler.define("macro"); } switch( pack ) { - case "php7": - if( !Context.defined("php7") ) return; case "php": - if( !Context.defined("php") || Context.defined("php7") ) return; + if( !Context.defined("php") ) return; case "neko": if( !Context.defined("neko") ) return; case "js": @@ -54,8 +52,12 @@ class ImportAll { return; case "sys": if(!isSysTarget()) return; + case "sys.thread": + if ( !Context.defined("target.threaded") ) return; case "java": if( !Context.defined("java") ) return; + case "jvm": + if( !Context.defined("jvm") ) return; case "cs": if( !Context.defined("cs") ) return; case "python": @@ -68,7 +70,7 @@ class ImportAll { if( !Context.defined("eval") ) return; case "ssl": if (!Context.defined("neko") && !Context.defined("cpp")) return; - case "tools", "build-tool": return; + case "tools", "build-tool", "jar-tool": return; } for( p in Context.getClassPath() ) { if( p == "/" ) @@ -98,9 +100,6 @@ class ImportAll { case "neko.vm.Ui" | "sys.db.Sqlite" | "sys.db.Mysql" if ( Context.defined("interp") ): continue; case "sys.db.Sqlite" | "sys.db.Mysql" | "cs.db.AdoNet" if ( Context.defined("cs") ): continue; } - if( Context.defined("php7") && cl.indexOf("php7.") == 0 ) { - cl = "php." + cl.substr("php7.".length); - } Context.getModule(cl); } else if( sys.FileSystem.isDirectory(p + "/" + file) ) run(full); diff --git a/extra/all.hxml b/extra/all.hxml index 73f38e226aaf84fbc4c7e2fda69154c103753442..1fbb6e39fea4a7e3ad8572100c97ef0c4d13a61d 100644 --- a/extra/all.hxml +++ b/extra/all.hxml @@ -15,13 +15,7 @@ -swf all9.swf -xml flash9.xml --swf-version 11.4 - ---next - --D php7 --php all_php7 --xml php7.xml +--swf-version 11.4 --next @@ -32,19 +26,21 @@ -cpp all_cpp -xml cpp.xml --D xmldoc -D HXCPP_MULTI_THREADED --next -java all_java -xml java.xml --D xmldoc + +--next +-java all_jvm +-D jvm +-xml jvm.xml --next -cs all_cs -D unsafe -xml cs.xml --D xmldoc --next -python all_python @@ -54,6 +50,10 @@ -hl all_hl -xml hl.xml +--next +--interp +-xml interp.xml + --next -xml cross.xml diff --git a/extra/azure-pipelines/build-linux.yml b/extra/azure-pipelines/build-linux.yml new file mode 100644 index 0000000000000000000000000000000000000000..74993edf4cd7838fc6ccafe8af86ca2d1d945dd7 --- /dev/null +++ b/extra/azure-pipelines/build-linux.yml @@ -0,0 +1,61 @@ +parameters: + name: 'BuildLinux' + vmImage: 'ubuntu-16.04' + +jobs: + - job: ${{ parameters.name }} + pool: + vmImage: ${{ parameters.vmImage }} + variables: + OPAMYES: 1 + ADD_REVISION: 1 + steps: + - checkout: self + submodules: recursive + - script: | + set -ex + sudo add-apt-repository ppa:avsm/ppa -y # provides newer version of OCaml and OPAM + sudo apt-get update -qqy + sudo apt-get install -qqy ocaml-nox camlp5 opam libpcre3-dev zlib1g-dev libgtk2.0-dev ninja-build + displayName: Install dependencies + - template: install-neko-snapshot.yaml + parameters: + platform: linux64 + - script: | + set -ex + opam init + opam update + opam pin add haxe . --no-action + opam install haxe --deps-only + opam list + ocamlopt -v + displayName: Install OCaml libraries + - script: | + set -ex + opam config exec -- make -s STATICLINK=1 libs + opam config exec -- make -s STATICLINK=1 prebuild + opam config exec -- make -s -j`nproc` STATICLINK=1 haxe + opam config exec -- make -s haxelib + make -s package_bin + ls -l out + ldd -v ./haxe + ldd -v ./haxelib + displayName: Build Haxe + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'linuxBinaries' + targetPath: out + - script: | + set -ex + make -s xmldoc + cat >extra/doc/info.json <&1') + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'opam update --yes 2>&1') + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam pin add haxe . --kind=path --no-action --yes 2>&1') + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'opam install haxe --deps-only --yes 2>&1') + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'opam list') + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'ocamlopt -v') + displayName: Install OCaml and OCaml libraries + - powershell: Write-Host "##vso[task.prependpath]${env:CYG_ROOT}/usr/$(MINGW_ARCH)-w64-mingw32/sys-root/mingw/bin" + displayName: Expose mingw dll files + - powershell: | + Set-PSDebug -Trace 1 + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win libs prebuild 2>&1') + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win -j`nproc` haxe 2>&1') + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win haxelib 2>&1') + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -f Makefile.win echo_package_files package_bin package_installer_win package_choco 2>&1') + dir out + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxe.exe') + & "$(CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxelib.exe') + displayName: Build Haxe + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'win$(ARCH)Binaries' + targetPath: out \ No newline at end of file diff --git a/extra/azure-pipelines/install-neko-snapshot.yaml b/extra/azure-pipelines/install-neko-snapshot.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7086a28f6b53d13bce9e3fe7ab2dd6abde886dbf --- /dev/null +++ b/extra/azure-pipelines/install-neko-snapshot.yaml @@ -0,0 +1,33 @@ +parameters: + platform: '' # can be linux64, mac, windows, or windows64 + +steps: + - ${{ if startsWith(parameters.platform, 'windows') }}: + - powershell: | + Invoke-WebRequest https://build.haxe.org/builds/neko/${{parameters.platform}}/neko_latest.zip -OutFile $(Agent.TempDirectory)/neko_latest.zip + Expand-Archive $(Agent.TempDirectory)/neko_latest.zip -DestinationPath $(Agent.TempDirectory) + $NEKOPATH = Get-ChildItem $(Agent.TempDirectory)/neko-*-* + Write-Host "##vso[task.prependpath]$NEKOPATH" + Write-Host "##vso[task.setvariable variable=NEKOPATH]$NEKOPATH" + displayName: Install Neko using snapshot from S3 + - ${{ if not(startsWith(parameters.platform, 'windows')) }}: + - bash: | + set -ex + DOWNLOADDIR=$(Agent.TempDirectory) + curl -sSL https://build.haxe.org/builds/neko/${{parameters.platform}}/neko_latest.tar.gz -o $(Agent.TempDirectory)/neko_latest.tar.gz + tar -xf $(Agent.TempDirectory)/neko_latest.tar.gz -C $(Agent.TempDirectory) + NEKOPATH=`echo $(Agent.TempDirectory)/neko-*-*` + sudo mkdir -p /usr/local/bin + sudo mkdir -p /usr/local/lib/neko + sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/ + sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/ + sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/ + set +x + echo "##vso[task.prependpath]$NEKOPATH" + echo "##vso[task.setvariable variable=NEKOPATH]$NEKOPATH" + displayName: Install Neko using snapshot from S3 + - ${{ if eq(parameters.platform, 'linux64') }}: + - bash: sudo ldconfig + displayName: ldconfig + - script: neko -version 2>&1 + displayName: Print Neko version \ No newline at end of file diff --git a/extra/azure-pipelines/test-windows.yml b/extra/azure-pipelines/test-windows.yml new file mode 100644 index 0000000000000000000000000000000000000000..bbb84d66b1edba7929b6e3f852cbd14e88efbd4a --- /dev/null +++ b/extra/azure-pipelines/test-windows.yml @@ -0,0 +1,87 @@ +parameters: + name: 'TestWindows' + vmImage: 'windows-2019' + arch: '64' # or '32' + +jobs: + - job: ${{ parameters.name }} + dependsOn: BuildWin${{ parameters.arch }} + pool: + vmImage: ${{ parameters.vmImage }} + variables: + HAXELIB_ROOT: C:/haxelib + strategy: + matrix: + # https://github.com/HaxeFoundation/haxe/issues/8600 + ${{ if eq(parameters.arch, '64') }}: + macro: + TEST: macro + neko: + TEST: neko + hl: + TEST: hl + cpp: + TEST: cpp + HXCPP_COMPILE_CACHE: C:/hxcache + java: + # https://github.com/HaxeFoundation/haxe/issues/8601 + ${{ if eq(parameters.arch, '64') }}: + TEST: java,jvm + ${{ if eq(parameters.arch, '32') }}: + TEST: java + cs: + TEST: cs + js: + TEST: js + php: + TEST: php + # TODO. flash has never been enabled on our AppVeyor builds. + # flash: + # TEST: flash9,as3 + python: + TEST: python + # TODO. Lua has never been enabled on our AppVeyor builds. + # lua: + # TEST: lua + steps: + - checkout: self + fetchDepth: 20 + - template: install-neko-snapshot.yaml + parameters: + ${{ if eq(parameters.arch, '64') }}: + platform: windows64 + ${{ if eq(parameters.arch, '32') }}: + platform: windows + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'win${{ parameters.arch }}Binaries' + targetPath: win${{ parameters.arch }}Binaries + - powershell: | + Set-PSDebug -Trace 1 + 7z x win${{ parameters.arch }}Binaries/*_bin.zip -owin${{ parameters.arch }}Binaries + $dir = Get-ChildItem win${{ parameters.arch }}Binaries/* -Name -Directory + Rename-Item win${{ parameters.arch }}Binaries/$dir haxe + $dir = '' + ( get-location ) + '\win${{ parameters.arch }}Binaries\haxe' + dir $dir + Set-PSDebug -Trace 0 + Write-Host "##vso[task.prependpath]$dir" + displayName: Setup Haxe + - script: haxe -version + displayName: Print Haxe version + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.7' + - powershell: | + Set-PSDebug -Trace 1 + $pypath = python -c "import sys; print(sys.executable)" + $py3path = $pypath.replace("python.exe","python3.exe") + cmd /c mklink $py3path $pypath + python3 -V + displayName: "Make Python 3 be available as python3 in the cmdline" + - script: | + mkdir "$(HAXELIB_ROOT)" + haxelib setup "$(HAXELIB_ROOT)" + displayName: Setup haxelib + - script: haxe RunCi.hxml + workingDirectory: $(Build.SourcesDirectory)/tests + displayName: Test diff --git a/extra/choco/haxe.nuspec b/extra/choco/haxe.nuspec index e4cf4c794c6d0af3ab368b77be403816138bacf0..b7d3c87e71e2c10e6a682360159b11875e3f61d8 100644 --- a/extra/choco/haxe.nuspec +++ b/extra/choco/haxe.nuspec @@ -18,7 +18,7 @@ Haxe is an open source toolkit based on a modern, high level, strictly typed programming language, a cross-compiler, a complete cross-platform standard library and ways to access each platform's native capabilities. Haxe is an open source toolkit based on a modern, high level, strictly typed programming language, a cross-compiler, a complete cross-platform standard library and ways to access each platform's native capabilities. -This package will install haxe and haxelib. After installation, you should run `haxelib setup <path>`, where `<path>` is the haxelib repository folder for placing third-party libraries. The folder should be created manually before running the command. +This package will install haxe and haxelib. After installation, you should run `haxelib setup %path%;`, where `%path%` is the haxelib repository folder for placing third-party libraries. The folder should be created manually before running the command. https://github.com/HaxeFoundation/haxe/blob/master/extra/CHANGES.txt haxe programming development foss cross-platform diff --git a/extra/doc.hxml b/extra/doc.hxml index 96569b6c0f47a974fa8b733d5d7d228375b32820..fa8b532121ee608c725f530b0da8a53a5837f441 100644 --- a/extra/doc.hxml +++ b/extra/doc.hxml @@ -1,6 +1,6 @@ --no-output --macro ImportAll.run() --dce no +--dce no -D doc-gen --each @@ -17,7 +17,7 @@ -swf all9.swf -xml doc/flash.xml --swf-version 11.4 +--swf-version 11.4 --next @@ -28,24 +28,20 @@ -cpp all_cpp -xml doc/cpp.xml --D xmldoc -D HXCPP_MULTI_THREADED --next -java all_java -xml doc/java.xml --D xmldoc --next -cs all_cs -D unsafe -xml doc/cs.xml --D xmldoc --next -python all_py -xml doc/python.xml --D xmldoc --next --interp diff --git a/extra/extract.hxml b/extra/extract.hxml index e0b3f0770b5ee96ec31f4488fd9fe15970c4e039..427a2d9026a33b3c84edc84d78f857d1ebec34d3 100644 --- a/extra/extract.hxml +++ b/extra/extract.hxml @@ -4,9 +4,9 @@ # - Run haxe extract.hxml # - Restore removed haxe/std/flash/DIR directories # - Copy directories from hxclasses/flash to haxe/std/flash, overwriting restored ones --debug --swf-lib library.swf +--debug +--swf-lib library.swf -swf test.swf --swf-version 15 +--swf-version 15 --macro patchTypes("../extra/extract.patch") ---gen-hx-classes +-D gen-hx-classes diff --git a/extra/haxelib_src/.dockerignore b/extra/haxelib_src/.dockerignore index fb14f4b5ab3a0efaac982fc5ed1cfc65f1d3c26d..21b8b67150c6fc92c5a4a30b39317068b6a326e8 100644 --- a/extra/haxelib_src/.dockerignore +++ b/extra/haxelib_src/.dockerignore @@ -3,4 +3,4 @@ deploy bin test deploy_key -www/bower_components \ No newline at end of file +www/node_modules/ diff --git a/extra/haxelib_src/.ebextensions/autoscaling.config b/extra/haxelib_src/.ebextensions/autoscaling.config new file mode 100644 index 0000000000000000000000000000000000000000..fe2c312f292192d269e2455cdc9eabe1861be42a --- /dev/null +++ b/extra/haxelib_src/.ebextensions/autoscaling.config @@ -0,0 +1,6 @@ +Resources: + AWSEBAutoScalingGroup: + Type: "AWS::AutoScaling::AutoScalingGroup" + Properties: + HealthCheckType: ELB + HealthCheckGracePeriod: 60 diff --git a/extra/haxelib_src/.ebextensions/ignore4xx.config b/extra/haxelib_src/.ebextensions/ignore4xx.config new file mode 100644 index 0000000000000000000000000000000000000000..e974a0fa2db6550d0e622b56c397a3f3edf038e2 --- /dev/null +++ b/extra/haxelib_src/.ebextensions/ignore4xx.config @@ -0,0 +1,58 @@ +# Ignore 4xx errors which we get a bunch of those in +# the file browser version switcher - e.g. when viewing the +# README.md file of version 1.0.0, there are links to the +# same file in other versions, but it may be absent, thus +# a 404 error. +# We don't want elastic beanstalk replace instances because +# of those 404 errors. +# See https://stackoverflow.com/a/49606726/267998 +files: + "/tmp/custom-site-nginx.conf": + mode: "000664" + owner: root + group: root + content: | + map $http_upgrade $connection_upgrade { + default "upgrade"; + "" ""; + } + + # Elastic Beanstalk Modification(EB_INCLUDE) + # Custom config + # HTTP 4xx ignored. + map $status $loggable { + ~^[4] 0; + default 1; + } + + server { + listen 80; + + gzip on; + gzip_comp_level 4; + gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})T(\d{2})") { + set $year $1; + set $month $2; + set $day $3; + set $hour $4; + } + access_log /var/log/nginx/healthd/application.log.$year-$month-$day-$hour healthd if=$loggable; + + access_log /var/log/nginx/access.log; + + location / { + proxy_pass http://docker; + proxy_http_version 1.1; + + proxy_set_header Connection $connection_upgrade; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + } +container_commands: + override_beanstalk_nginx: + command: "mv -f /tmp/custom-site-nginx.conf /etc/nginx/sites-available/elasticbeanstalk-nginx-docker-proxy.conf" \ No newline at end of file diff --git a/extra/haxelib_src/.ebextensions/nginx.config b/extra/haxelib_src/.ebextensions/nginx.config index 45a6a0d9fe69e18f4d078161bf07901a1a6149f2..72e246fdb2dcbc01fe7557898b00c43ceacc7a52 100644 --- a/extra/haxelib_src/.ebextensions/nginx.config +++ b/extra/haxelib_src/.ebextensions/nginx.config @@ -1,7 +1,7 @@ files: "/etc/nginx/conf.d/proxy.conf" : - mode: "000755" + mode: "000664" owner: root group: root content: | - client_max_body_size 800M; \ No newline at end of file + client_max_body_size 800M; diff --git a/extra/haxelib_src/.github/FUNDING.yml b/extra/haxelib_src/.github/FUNDING.yml new file mode 100644 index 0000000000000000000000000000000000000000..2481fa5c2f547840aa7e6a4252b1838e5e47cdde --- /dev/null +++ b/extra/haxelib_src/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +open_collective: haxe +custom: ['https://haxe.org/foundation/support-plans.html', 'https://haxe.org/foundation/donate.html'] diff --git a/extra/haxelib_src/.travis.yml b/extra/haxelib_src/.travis.yml index 1a840eca0bf45cd43f8c706e1ac16b6276ce98a9..58ec6ed9fa91c784a992015b25b2bcd8252537cc 100644 --- a/extra/haxelib_src/.travis.yml +++ b/extra/haxelib_src/.travis.yml @@ -1,5 +1,5 @@ sudo: required -dist: trusty +dist: xenial language: haxe env: @@ -7,14 +7,7 @@ env: # deploy_key_decrypt - secure: "cWYcbB7z97sW4yZtz9qcYrEhFZktNjQMOraPm7Vy0FsCMqb4r314Fk8rJze+yDbOKGdsIz6VNHE8nlsQN3EgGiVFJnF8xv6GAlfHPuaVomP2vO7W0A+l7xVy2/326MQJP8JoMgdebDi71yxKeEhYA+mVliI9qql9yfD2YOBmilQ=" -install_docker: &install_docker - - sudo apt-get update -qq - - docker --version - # https://docs.travis-ci.com/user/docker/#Using-Docker-Compose - - sudo rm -f /usr/local/bin/docker-compose - - curl -L https://github.com/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m` > docker-compose - - chmod +x docker-compose - - sudo mv docker-compose /usr/local/bin +.before_install: &before_install # https://github.com/travis-ci/travis-ci/issues/7008 - sudo /etc/init.d/mysql stop || true @@ -26,7 +19,7 @@ matrix: env: - USE_DOCKER=1 services: [docker] - before_install: *install_docker + before_install: *before_install # haxe 3.4.4 - os: linux haxe: 3.4.4 @@ -34,21 +27,21 @@ matrix: - USE_DOCKER=1 - DEPLOY=1 services: [docker] - before_install: *install_docker + before_install: *before_install # haxe 3.2.1 - os: linux haxe: 3.2.1 env: - USE_DOCKER=1 services: [docker] - before_install: *install_docker + before_install: *before_install # haxe 3.1.3 - os: linux haxe: 3.1.3 env: - USE_DOCKER=1 services: [docker] - before_install: *install_docker + before_install: *before_install # Mac - os: osx haxe: development @@ -58,31 +51,27 @@ matrix: haxe: 3.2.1 - os: osx haxe: 3.1.3 - # Allow Haxe development to fail. - allow_failures: - - haxe: development install: - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew update; fi - - npm -g install bower - - haxelib newrepo || mkdir -p .haxelib && haxelib setup .haxelib - - yes | travis_retry haxelib -notimeout install all - - yes | travis_retry haxelib -notimeout install tora + - neko run.n setup haxelib_global + - haxe libs.hxml # copy aws.ndll to the right place - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then - sudo cp $(haxelib config)/aws-sdk-neko/*/ndll/Mac64/aws.ndll ${NEKOPATH}/aws.ndll; + sudo cp $(neko run.n config)/aws-sdk-neko/*/ndll/Mac64/aws.ndll ${NEKOPATH}/aws.ndll; fi; - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then - sudo cp $(haxelib config)/aws-sdk-neko/*/ndll/Linux64/aws.ndll ${NEKOPATH}/aws.ndll; + sudo cp $(neko run.n config)/aws-sdk-neko/*/ndll/Linux64/aws.ndll ${NEKOPATH}/aws.ndll; fi; - - haxelib list - - haxelib run tora > /dev/null 2>&1 & + - neko run.n list + - neko run.n version + - neko run.n run tora > ~/tora.log 2>&1 & script: # run our CI script - - haxe ci.hxml + - haxe ci.hxml || (echo "[BUILD FAILED]" && echo "Tora log:" && cat ~/tora.log && false) deploy: skip_cleanup: true diff --git a/extra/haxelib_src/.vscode/settings.json b/extra/haxelib_src/.vscode/settings.json index fffce17ae9e616ab00ac2850b407e2540238b139..a1f14056b10425ce51e53cff050457dc9ac46427 100644 --- a/extra/haxelib_src/.vscode/settings.json +++ b/extra/haxelib_src/.vscode/settings.json @@ -1,5 +1,6 @@ { - "haxe.displayConfigurations": [ + "haxe.configurations": [ + ["client_tests.hxml"], ["client.hxml"], ["server_each.hxml", "-neko", "repo.n"] ] diff --git a/extra/haxelib_src/.vscode/tasks.json b/extra/haxelib_src/.vscode/tasks.json index 6a789b94dc2df3ba7bac5f9f523a3ac99f7e9a90..9b6b3ba6135cdae2b7d1a6605f5fef867b1071f1 100644 --- a/extra/haxelib_src/.vscode/tasks.json +++ b/extra/haxelib_src/.vscode/tasks.json @@ -1,18 +1,13 @@ { - "version": "0.1.0", - "command": "haxe", - "args": ["client.hxml"], - "problemMatcher": { - "owner": "haxe", - "pattern": { - "regexp": "^(.+):(\\d+): (?:lines \\d+-(\\d+)|character(?:s (\\d+)-| )(\\d+)) : (?:(Warning) : )?(.*)$", - "file": 1, - "line": 2, - "endLine": 3, - "column": 4, - "endColumn": 5, - "severity": 6, - "message": 7 - } - } -} + "version": "2.0.0", + "tasks": [ + { + "type": "hxml", + "file": "client.hxml", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file diff --git a/extra/haxelib_src/Dockerfile b/extra/haxelib_src/Dockerfile index 944b4f1234347a1e6048a16b9e9b824fb316d4ab..5951e0656ca2d510f2ded6a4ab77178029ebfc0e 100644 --- a/extra/haxelib_src/Dockerfile +++ b/extra/haxelib_src/Dockerfile @@ -1,53 +1,56 @@ # Build haxelib server as a Docker container. -# Note that it doesn't contain a MySQL database, +# Note that it doesn't contain a MySQL database, # which need to be launched seperately. See test/docker-compose.yml on how to launch one. -FROM ubuntu:trusty +FROM ubuntu:bionic -# apt-get dependencies of bower -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python-software-properties software-properties-common \ +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common \ && add-apt-repository ppa:haxe/releases -y \ - && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + && apt-get update && apt-get upgrade -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y \ apache2 \ neko-dev \ haxe \ - npm \ - nodejs-legacy \ + curl \ git \ libcurl4-gnutls-dev \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + nodejs \ && rm -r /var/lib/apt/lists/* # apache httpd RUN rm -rf /var/www/html \ && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html \ - && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html + && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html RUN a2enmod rewrite RUN a2enmod proxy RUN a2enmod proxy_http +RUN a2dismod mpm_event +RUN a2enmod mpm_prefork RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist && rm /etc/apache2/conf-enabled/* /etc/apache2/sites-enabled/* COPY apache2.conf /etc/apache2/apache2.conf RUN { \ - echo 'LoadModule neko_module /usr/lib/neko/mod_neko2.ndll'; \ - echo 'LoadModule tora_module /usr/lib/neko/mod_tora2.ndll'; \ + echo 'LoadModule neko_module /usr/lib/x86_64-linux-gnu/neko/mod_neko2.ndll'; \ + echo 'LoadModule tora_module /usr/lib/x86_64-linux-gnu/neko/mod_tora2.ndll'; \ echo 'AddHandler tora-handler .n'; \ } > /etc/apache2/mods-enabled/tora.conf \ && apachectl stop -RUN npm -g install bower - # haxelib -ENV HAXELIB_PATH /src/.haxelib -RUN mkdir /haxelib && haxelib setup /haxelib +ENV HAXELIB_PATH /src/haxelib_global +RUN mkdir -p ${HAXELIB_PATH} && haxelib setup ${HAXELIB_PATH} WORKDIR /src -COPY .haxelib /src/.haxelib -RUN cp ${HAXELIB_PATH}/aws-sdk-neko/*/ndll/Linux64/aws.ndll /usr/lib/neko/aws.ndll; +COPY libs.hxml run.n /src/ +RUN haxe libs.hxml +RUN cp ${HAXELIB_PATH}/aws-sdk-neko/*/ndll/Linux64/aws.ndll /usr/lib/x86_64-linux-gnu/neko/aws.ndll; COPY server*.hxml /src/ -COPY www/bower.json /src/www/ -WORKDIR /src/www -RUN bower install --allow-root +COPY www/package*.json /src/www/ +WORKDIR /src/www/ +RUN npm install --unsafe-perm COPY www /src/www/ COPY src/legacyhaxelib/.htaccess /src/www/legacy/ diff --git a/extra/haxelib_src/appveyor.yml b/extra/haxelib_src/appveyor.yml index e6871ef502cfb22016244643bda960833a3a8d58..46753b9be001fdab6e1dd0a29d3cc6481e8dd356 100644 --- a/extra/haxelib_src/appveyor.yml +++ b/extra/haxelib_src/appveyor.yml @@ -4,15 +4,14 @@ services: - mysql install: - - npm -g install bower + - ps: Set-Service wuauserv -StartupType Manual - cinst haxe -y - cinst nssm -y - cinst curl -y - RefreshEnv - - haxelib setup %HOME%/haxelib_repo - - haxelib install all --always - - haxelib install tora - - haxelib list + - neko run.n setup haxelib_global + - haxe libs.hxml + - neko run.n list build: off diff --git a/extra/haxelib_src/client.hxml b/extra/haxelib_src/client.hxml index 97b705ed37586770e79369160fa4170d14bcf1a8..832c75d7734f6f3c0cf8bc2f0488e5b349546acd 100644 --- a/extra/haxelib_src/client.hxml +++ b/extra/haxelib_src/client.hxml @@ -1,3 +1,4 @@ -cp src +-cp hx3compat/std -neko run.n -main haxelib.client.Main diff --git a/extra/haxelib_src/client_legacy.hxml b/extra/haxelib_src/client_legacy.hxml index bfd5fd592d397158d9c88de73160e33edde8d638..89e1d10663dfe439224043d32ec14c6204cf2bf0 100644 --- a/extra/haxelib_src/client_legacy.hxml +++ b/extra/haxelib_src/client_legacy.hxml @@ -1,3 +1,4 @@ --cp src --neko bin/legacyhaxelib.n +-cp src +-cp hx3compat/std +-neko bin/legacyhaxelib.n -main legacyhaxelib.Main \ No newline at end of file diff --git a/extra/haxelib_src/client_tests.hxml b/extra/haxelib_src/client_tests.hxml index 756c0943056ecb23e3db2f9c9210a3baff6121b2..3d6871317b7d99bf79763706fdcad9e03fb5b78f 100644 --- a/extra/haxelib_src/client_tests.hxml +++ b/extra/haxelib_src/client_tests.hxml @@ -3,5 +3,4 @@ -lib hx3compat -main HaxelibTests -debug --neko bin/test.n --cmd neko bin/test.n \ No newline at end of file +-neko bin/test.n \ No newline at end of file diff --git a/extra/haxelib_src/deploy.json b/extra/haxelib_src/deploy.json index d064590b71a9509fc291a21b46bc5a7049a85ebb..520ea50b6ba5837cbe3f013bb100b062a550fca1 100644 --- a/extra/haxelib_src/deploy.json +++ b/extra/haxelib_src/deploy.json @@ -1,7 +1,6 @@ { "files": [ "api/", - "bower_components/", "css/", "documentation-files/", "img/", diff --git a/extra/haxelib_src/haxelib.json b/extra/haxelib_src/haxelib.json index e23f974b1a9b846b8d1b2c8cde66a2ebc36e44f7..4f3ba68dc7818db2cc5f25124ccb1954b6a3a1dc 100644 --- a/extra/haxelib_src/haxelib.json +++ b/extra/haxelib_src/haxelib.json @@ -1,11 +1,11 @@ { "name": "haxelib", - "url" : "http://haxe.org/haxelib", + "url" : "https://lib.haxe.org/documentation/", "license": "GPL", "tags": ["haxelib", "core"], "description": "The haxelib client", "classPath": "src", - "version": "3.3.0", - "releasenote": "Initial release for Haxe 3.3", - "contributors": ["back2dos", "ncannasse", "jason", "Simn", "nadako"] + "version": "4.0.0", + "releasenote": " * Added `haxelib libpath` command (#407)\n * Allow forcing proxy configuration if proxy test failed (#411)\n * Use version specified by `-lib library:1.2.3` even if currently active one is `dev`\n * Strip comments from extraParams.hxml for `haxelib path` (#439)\n * Automatically retry failing downloads 3 times\n * Allow environment variables in dev paths using `%VAR_NAME%` syntax. E.g.: `/path/to/%MY_ENV_VAR%/lib`\n * Handle HAXELIB_NO_SSL environment variable to disable https on requests to haxelib server (#448)\n * Added `--skip-dependencies` option (#343)\n * Look for `.haxelib` local repo recursively up along the directories tree (#292)", + "contributors": ["HaxeFoundation", "back2dos", "ncannasse", "jason", "Simn", "nadako", "andyli"] } diff --git a/extra/haxelib_src/hx3compat/README.md b/extra/haxelib_src/hx3compat/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1f3bb03e21668dc40b94f51cc1762bd03b10760e --- /dev/null +++ b/extra/haxelib_src/hx3compat/README.md @@ -0,0 +1,4 @@ +hx3compat +========= + +Haxe 4 compatibility lib for haxe 3 diff --git a/extra/haxelib_src/hx3compat/haxelib.json b/extra/haxelib_src/hx3compat/haxelib.json new file mode 100644 index 0000000000000000000000000000000000000000..18a9ae349aed071609486a4914b1a38dd2716960 --- /dev/null +++ b/extra/haxelib_src/hx3compat/haxelib.json @@ -0,0 +1,14 @@ +{ + "name": "hx3compat", + "url": "https://github.com/HaxeFoundation/hx3compat", + "license": "BSD", + "tags": ["cross"], + "description": "Some haxe 3 types for easier migration to haxe 4.", + "version": "1.0.0", + "releasenote": "Initial", + "contributors": ["Simn"], + "dependencies": { + + }, + "classPath": "std" +} \ No newline at end of file diff --git a/std/haxe/remoting/AMFConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/AMFConnection.hx similarity index 95% rename from std/haxe/remoting/AMFConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/AMFConnection.hx index 984704c10b00ade8498be9c78a323e5dc32baf12..e9acae3e888785dde72cd295f77ac4899274921c 100644 --- a/std/haxe/remoting/AMFConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/AMFConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,7 +24,7 @@ package haxe.remoting; /** Allows a connection to an AMF Remoting server such as Flash Media Server or AMFPHP. */ -class AMFConnection implements AsyncConnection implements Dynamic { +class AMFConnection implements AsyncConnection { var __data : { error : Dynamic -> Void, diff --git a/std/haxe/remoting/AsyncAdapter.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncAdapter.hx similarity index 97% rename from std/haxe/remoting/AsyncAdapter.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncAdapter.hx index abbd2eada5a1cd356572b5cb00d77202a57028a7..530d623dda44c1ad240b75dbec18749b8f127295 100644 --- a/std/haxe/remoting/AsyncAdapter.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncAdapter.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/haxe/remoting/AsyncConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncConnection.hx similarity index 93% rename from std/haxe/remoting/AsyncConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncConnection.hx index 90e515e03f0698241613f27b6c3476d90f0d9078..47acaae75c73efbd67df656c6317b6d103367404 100644 --- a/std/haxe/remoting/AsyncConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,7 +24,7 @@ package haxe.remoting; /** For asynchronous connections, where the results are events that will be resolved later in the execution process. */ -interface AsyncConnection implements Dynamic { +interface AsyncConnection { function resolve( name : String ) : AsyncConnection; function call( params : Array, ?result : Dynamic -> Void ) : Void; diff --git a/std/haxe/remoting/AsyncDebugConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncDebugConnection.hx similarity index 95% rename from std/haxe/remoting/AsyncDebugConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncDebugConnection.hx index f6ae1d50ca1a15215e5c10d7bbcd3d3ba1be73af..ecd6586ed8928374c652dc17f00d2b98c97ce38f 100644 --- a/std/haxe/remoting/AsyncDebugConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncDebugConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,7 +21,7 @@ */ package haxe.remoting; -class AsyncDebugConnection implements AsyncConnection implements Dynamic { +class AsyncDebugConnection implements AsyncConnection { var __path : Array; var __cnx : AsyncConnection; diff --git a/std/haxe/remoting/AsyncProxy.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncProxy.hx similarity index 96% rename from std/haxe/remoting/AsyncProxy.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncProxy.hx index dafa0a26e3fe2d9e5d9d7d55aaa9664e5d498bf5..32e30cd298255eebd88927b681abf4ce8400d1f9 100644 --- a/std/haxe/remoting/AsyncProxy.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/AsyncProxy.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/haxe/remoting/Connection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/Connection.hx similarity index 92% rename from std/haxe/remoting/Connection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/Connection.hx index 91177bb33b0279292b5d62f7822a5b5d5ed3f4fa..70a7ca727889ce05275d0d208f035af838e0fe34 100644 --- a/std/haxe/remoting/Connection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/Connection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,7 +21,7 @@ */ package haxe.remoting; -interface Connection implements Dynamic { +interface Connection { function resolve( name : String ) : Connection; function call( params : Array ) : Dynamic; diff --git a/std/haxe/remoting/Context.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/Context.hx similarity index 98% rename from std/haxe/remoting/Context.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/Context.hx index d42f8e9933d4c551b3d5a897b5bcb6ea6be8fe97..40ba56fa50cb57e2586c6266a8e548b6d5f1d94e 100644 --- a/std/haxe/remoting/Context.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/Context.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/haxe/remoting/ContextAll.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/ContextAll.hx similarity index 97% rename from std/haxe/remoting/ContextAll.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/ContextAll.hx index f8b7c2aa1e51e3d07fec2003af0563a33f327774..a6f182cf1e42d6f0b08e95b2f179f632f103a4fb 100644 --- a/std/haxe/remoting/ContextAll.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/ContextAll.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/haxe/remoting/DelayedConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/DelayedConnection.hx similarity index 94% rename from std/haxe/remoting/DelayedConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/DelayedConnection.hx index ccc84e28d136275c40dfe193c237a73c53b8962f..d5477ce4f690db5bebb8edd6332e79e8b627ba9e 100644 --- a/std/haxe/remoting/DelayedConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/DelayedConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,7 +21,7 @@ */ package haxe.remoting; -class DelayedConnection implements AsyncConnection implements Dynamic { +class DelayedConnection implements AsyncConnection { public var connection(get,set) : AsyncConnection; diff --git a/std/haxe/remoting/ExternalConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/ExternalConnection.hx similarity index 96% rename from std/haxe/remoting/ExternalConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/ExternalConnection.hx index d88015315aaaa6d4824f99d3e5954c811e9613d4..fa1bd34b18b491ed2222b04839c807e1019de08b 100644 --- a/std/haxe/remoting/ExternalConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/ExternalConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,7 +25,7 @@ package haxe.remoting; Synchronous communications between Flash and Javascript. **/ @:expose -class ExternalConnection implements Connection implements Dynamic { +class ExternalConnection implements Connection { var __data : { name : String, ctx : Context, #if js flash : String #end }; var __path : Array; @@ -50,7 +50,7 @@ class ExternalConnection implements Connection implements Dynamic { return s.split("\\").join("\\\\"); } #else - static inline function escapeString(s) { + static inline function escapeString(s:String) { return s; } #end diff --git a/std/haxe/remoting/FlashJsConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/FlashJsConnection.hx similarity index 96% rename from std/haxe/remoting/FlashJsConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/FlashJsConnection.hx index 316732cd610c1600ac2acaa6159813e8f729991f..162a465bfbd3bcf27b3d3eb29aca31a795b2f646 100644 --- a/std/haxe/remoting/FlashJsConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/FlashJsConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,7 +21,7 @@ */ package haxe.remoting; -class FlashJsConnection #if flash implements AsyncConnection implements Dynamic #end { +class FlashJsConnection #if flash implements AsyncConnection #end { #if flash diff --git a/std/haxe/remoting/HttpAsyncConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/HttpAsyncConnection.hx similarity index 94% rename from std/haxe/remoting/HttpAsyncConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/HttpAsyncConnection.hx index 99091f51fc766950ccdefa5cae030dbbe845f9ca..1a0baa3932752f68c7dda25d6d9fc5d10dba414f 100644 --- a/std/haxe/remoting/HttpAsyncConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/HttpAsyncConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,7 +24,7 @@ package haxe.remoting; /** Allows an asynchronous connection to the given URL which should link to a Haxe server application. */ -class HttpAsyncConnection implements AsyncConnection implements Dynamic { +class HttpAsyncConnection implements AsyncConnection { var __data : { url : String, error : Dynamic -> Void }; var __path : Array; diff --git a/std/haxe/remoting/HttpConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/HttpConnection.hx similarity index 96% rename from std/haxe/remoting/HttpConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/HttpConnection.hx index efcbecdc58687542ee8031eaf39b580b45cd724f..22aee3de55f25bb5cc78d696d5c2c5267111afd6 100644 --- a/std/haxe/remoting/HttpConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/HttpConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,7 +24,7 @@ package haxe.remoting; /** Allows a synchronous connection to the given URL which should link to a Haxe server application. */ -class HttpConnection implements Connection implements Dynamic { +class HttpConnection implements Connection { public static var TIMEOUT = 10.; diff --git a/std/haxe/remoting/LocalConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/LocalConnection.hx similarity index 96% rename from std/haxe/remoting/LocalConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/LocalConnection.hx index 7b534976d4add948876e10b2526d0468d097d88b..939ce57b4b59c5b09b1860ba602381f2574c9b51 100644 --- a/std/haxe/remoting/LocalConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/LocalConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,7 +24,7 @@ package haxe.remoting; /** Allows communications to a different application that runs on the same client device */ -class LocalConnection implements AsyncConnection implements Dynamic { +class LocalConnection implements AsyncConnection { static var ID = 0; diff --git a/std/haxe/remoting/Proxy.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/Proxy.hx similarity index 96% rename from std/haxe/remoting/Proxy.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/Proxy.hx index 7a8e54911a4b76943301741f55c35bb75eb3cab2..3b6ffc7c2f3c2b29b81d8f788fe472d3a43d15fe 100644 --- a/std/haxe/remoting/Proxy.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/Proxy.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/haxe/remoting/SocketConnection.hx b/extra/haxelib_src/hx3compat/std/haxe/remoting/SocketConnection.hx similarity index 96% rename from std/haxe/remoting/SocketConnection.hx rename to extra/haxelib_src/hx3compat/std/haxe/remoting/SocketConnection.hx index 2e64f879a87ef3a3a596940654474f4b3ac60b2b..00b8b17e9335f213db2456daaf71c03b28eb3092 100644 --- a/std/haxe/remoting/SocketConnection.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/remoting/SocketConnection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,7 +25,7 @@ import haxe.remoting.SocketProtocol.Socket; /** Allows remoting communications over a socket connection */ -class SocketConnection implements AsyncConnection implements Dynamic { +class SocketConnection implements AsyncConnection { var __path : Array; var __data : { @@ -111,7 +111,7 @@ class SocketConnection implements AsyncConnection implements Dynamic { +class SyncSocketConnection implements Connection { var __path : Array; var __proto : SocketProtocol; diff --git a/std/haxe/unit/TestCase.hx b/extra/haxelib_src/hx3compat/std/haxe/unit/TestCase.hx similarity index 100% rename from std/haxe/unit/TestCase.hx rename to extra/haxelib_src/hx3compat/std/haxe/unit/TestCase.hx diff --git a/std/haxe/unit/TestResult.hx b/extra/haxelib_src/hx3compat/std/haxe/unit/TestResult.hx similarity index 100% rename from std/haxe/unit/TestResult.hx rename to extra/haxelib_src/hx3compat/std/haxe/unit/TestResult.hx diff --git a/std/haxe/unit/TestRunner.hx b/extra/haxelib_src/hx3compat/std/haxe/unit/TestRunner.hx similarity index 99% rename from std/haxe/unit/TestRunner.hx rename to extra/haxelib_src/hx3compat/std/haxe/unit/TestRunner.hx index 7473d780f05ea5dd9110b07e96a726edaae0c396..5bf58728d256db5b0b9190a5e77f75039d4c80aa 100644 --- a/std/haxe/unit/TestRunner.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/unit/TestRunner.hx @@ -24,16 +24,16 @@ import Reflect; /** This class runs unit test cases and prints the result. - + ```haxe var r = new haxe.unit.TestRunner(); r.add(new MyTestCase()); // add other TestCases here - + // finally, run the tests r.run(); ``` - + @see **/ class TestRunner { @@ -50,7 +50,7 @@ class TestRunner { /** Prints the given object/value. - + * Flash outputs the result in a new `TextField` on stage. * JavaScript outputs the result using `console.log`. * Other targets use native `print` to output the result. @@ -96,7 +96,7 @@ class TestRunner { untyped __java__("java.lang.System.out.print(str)"); #elseif python python.Lib.print(v); - #elseif (hl || lua) + #elseif (hl || lua || eval) Sys.print(Std.string(v)); #end } @@ -119,7 +119,7 @@ class TestRunner { /** Runs the unit tests and prints the results. - + @return `true` if the unit test succesfully executed the test cases. **/ public function run() : Bool { diff --git a/std/haxe/unit/TestStatus.hx b/extra/haxelib_src/hx3compat/std/haxe/unit/TestStatus.hx similarity index 100% rename from std/haxe/unit/TestStatus.hx rename to extra/haxelib_src/hx3compat/std/haxe/unit/TestStatus.hx diff --git a/std/haxe/web/Dispatch.hx b/extra/haxelib_src/hx3compat/std/haxe/web/Dispatch.hx similarity index 98% rename from std/haxe/web/Dispatch.hx rename to extra/haxelib_src/hx3compat/std/haxe/web/Dispatch.hx index 47526fb482821b9a8772d5cf81dd98aa0a7e04e2..3cb92e37df7ebb30711d24ba9f6be4b25e87614e 100644 --- a/std/haxe/web/Dispatch.hx +++ b/extra/haxelib_src/hx3compat/std/haxe/web/Dispatch.hx @@ -416,7 +416,7 @@ class Dispatch { var str = serialize(fields); i.meta.add("dispatchConfig", [ { expr : EConst(CString(str)), pos : p } ], p); } - return { expr : EUntyped ({ expr : ECall({ expr : EField(Context.makeExpr(Dispatch,p),"extractConfig"), pos : p },[obj]), pos : p }), pos : p }; + return { expr : EUntyped ({ expr : ECall({ expr : EField(macro haxe.web.Dispatch,"extractConfig"), pos : p },[obj]), pos : p }), pos : p }; default: Context.error("Configuration should be an anonymous object",p); } diff --git a/std/haxe/web/Request.hx b/extra/haxelib_src/hx3compat/std/haxe/web/Request.hx similarity index 100% rename from std/haxe/web/Request.hx rename to extra/haxelib_src/hx3compat/std/haxe/web/Request.hx diff --git a/std/js/JQuery.hx b/extra/haxelib_src/hx3compat/std/js/JQuery.hx similarity index 100% rename from std/js/JQuery.hx rename to extra/haxelib_src/hx3compat/std/js/JQuery.hx diff --git a/std/js/SWFObject.hx b/extra/haxelib_src/hx3compat/std/js/SWFObject.hx similarity index 100% rename from std/js/SWFObject.hx rename to extra/haxelib_src/hx3compat/std/js/SWFObject.hx diff --git a/std/js/XMLSocket.hx b/extra/haxelib_src/hx3compat/std/js/XMLSocket.hx similarity index 98% rename from std/js/XMLSocket.hx rename to extra/haxelib_src/hx3compat/std/js/XMLSocket.hx index db8675307d644694fb5877c2ef86f512e2e962dd..7e6af67c02264004bce254f63380add274c015fb 100644 --- a/std/js/XMLSocket.hx +++ b/extra/haxelib_src/hx3compat/std/js/XMLSocket.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/neko/net/Poll.hx b/extra/haxelib_src/hx3compat/std/neko/net/Poll.hx similarity index 98% rename from std/neko/net/Poll.hx rename to extra/haxelib_src/hx3compat/std/neko/net/Poll.hx index dff7373e1d15611dd367b92407bd9cd54c58bfcb..e388ccc586a6e22cfbc2de921833e9036e66840b 100644 --- a/std/neko/net/Poll.hx +++ b/extra/haxelib_src/hx3compat/std/neko/net/Poll.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/neko/net/ProxyDetect.hx b/extra/haxelib_src/hx3compat/std/neko/net/ProxyDetect.hx similarity index 99% rename from std/neko/net/ProxyDetect.hx rename to extra/haxelib_src/hx3compat/std/neko/net/ProxyDetect.hx index 02cd55f95b0a254564af53d55fe83126cf760d87..8b1b157c6fb08fcc14c55f7581bbe4cee7e6c536 100644 --- a/std/neko/net/ProxyDetect.hx +++ b/extra/haxelib_src/hx3compat/std/neko/net/ProxyDetect.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/neko/net/ServerLoop.hx b/extra/haxelib_src/hx3compat/std/neko/net/ServerLoop.hx similarity index 99% rename from std/neko/net/ServerLoop.hx rename to extra/haxelib_src/hx3compat/std/neko/net/ServerLoop.hx index 60abf8b4c836d58df6bef8969c579544377b7622..07c9853fc524000b5b7b71d42d15b3d893ad089b 100644 --- a/std/neko/net/ServerLoop.hx +++ b/extra/haxelib_src/hx3compat/std/neko/net/ServerLoop.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/neko/net/ThreadRemotingServer.hx b/extra/haxelib_src/hx3compat/std/neko/net/ThreadRemotingServer.hx similarity index 98% rename from std/neko/net/ThreadRemotingServer.hx rename to extra/haxelib_src/hx3compat/std/neko/net/ThreadRemotingServer.hx index 3eb55db28bf91d34e6d081931b60144deb374a54..471315aaafd34c65e7bfe900e97f0143275ef2fd 100644 --- a/std/neko/net/ThreadRemotingServer.hx +++ b/extra/haxelib_src/hx3compat/std/neko/net/ThreadRemotingServer.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/std/neko/net/ThreadServer.hx b/extra/haxelib_src/hx3compat/std/neko/net/ThreadServer.hx similarity index 98% rename from std/neko/net/ThreadServer.hx rename to extra/haxelib_src/hx3compat/std/neko/net/ThreadServer.hx index a5f1ddc11cbec42ea3c3aa612360a3dd6db89ed5..996237d6c27ac3caa1d6b7eb1bc9c41813922678 100644 --- a/std/neko/net/ThreadServer.hx +++ b/extra/haxelib_src/hx3compat/std/neko/net/ThreadServer.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2018 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -37,7 +37,7 @@ private typedef ClientInfos = { } /** - The ThreadServer can be used to easily create a multithreaded server where each thread polls multiple connections. + The ThreadServer can be used to easily create a multithreaded server where each thread polls multiple connections. To use it, at a minimum you must override or rebind clientConnected, readClientMessage, and clientMessage and you must define your Client and Message. **/ class ThreadServer { @@ -174,7 +174,7 @@ class ThreadServer { } } - function doClientDisconnected(s,c) { + function doClientDisconnected(s:sys.net.Socket,c) { try s.close() catch( e : Dynamic ) {}; clientDisconnected(c); } @@ -329,7 +329,7 @@ class ThreadServer { /** Called when data has been read from a socket. This method should try to extract a message from the buffer. - The available data resides in buf, starts at pos, and is len bytes wide. Return the new message and the number of bytes read from the buffer. + The available data resides in buf, starts at pos, and is len bytes wide. Return the new message and the number of bytes read from the buffer. If no message could be read, return null. **/ public dynamic function readClientMessage( c : Client, buf : haxe.io.Bytes, pos : Int, len : Int ) : { msg : Message, bytes : Int } { diff --git a/extra/haxelib_src/integration_tests.hxml b/extra/haxelib_src/integration_tests.hxml index fb1748bbace024de20dcff4f35b7ca2e9d7f9d8c..514501311f1b82147d91f97906fa3c9331aedde9 100644 --- a/extra/haxelib_src/integration_tests.hxml +++ b/extra/haxelib_src/integration_tests.hxml @@ -2,5 +2,4 @@ -cp test -lib hx3compat -main IntegrationTests --neko bin/integration_tests.n --cmd neko bin/integration_tests.n \ No newline at end of file +-neko bin/integration_tests.n \ No newline at end of file diff --git a/extra/haxelib_src/libs.hxml b/extra/haxelib_src/libs.hxml new file mode 100644 index 0000000000000000000000000000000000000000..f4295a01d16a0a2385f22792e0369754ef1cacb6 --- /dev/null +++ b/extra/haxelib_src/libs.hxml @@ -0,0 +1,32 @@ +-cmd curl -sSLk https://lib.haxe.org/files/3.0/tink_core-1,23,0.zip -o haxelib_global/tink_core.zip && neko run.n install --always --skip-dependencies haxelib_global/tink_core.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/tink_core-1,0,0-rc,11.zip -o haxelib_global/tink_core.zip && neko run.n install --always --skip-dependencies haxelib_global/tink_core.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/tink_macro-0,6,4.zip -o haxelib_global/tink_macro.zip && neko run.n install --always --skip-dependencies haxelib_global/tink_macro.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/promhx-1,1,0.zip -o haxelib_global/promhx.zip && neko run.n install --always --skip-dependencies haxelib_global/promhx.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/asynctools-0,1,0.zip -o haxelib_global/asynctools.zip && neko run.n install --always --skip-dependencies haxelib_global/asynctools.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/aws-sdk-neko-0,2,0.zip -o haxelib_global/aws-sdk-neko.zip && neko run.n install --always --skip-dependencies haxelib_global/aws-sdk-neko.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/buddy-2,8,1.zip -o haxelib_global/buddy.zip && neko run.n install --always --skip-dependencies haxelib_global/buddy.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/cleversort-1,0,3.zip -o haxelib_global/cleversort.zip && neko run.n install --always --skip-dependencies haxelib_global/cleversort.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/compiletime-2,6,0.zip -o haxelib_global/compiletime.zip && neko run.n install --always --skip-dependencies haxelib_global/compiletime.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/compiletime-2,8,0.zip -o haxelib_global/compiletime.zip && neko run.n install --always --skip-dependencies haxelib_global/compiletime.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/hscript-2,3,0.zip -o haxelib_global/hscript.zip && neko run.n install --always --skip-dependencies haxelib_global/hscript.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/erazor-1,0,1.zip -o haxelib_global/erazor.zip && neko run.n install --always --skip-dependencies haxelib_global/erazor.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/html-haxe-code-highlighter-0,1,2.zip -o haxelib_global/html-haxe-code-highlighter.zip && neko run.n install --always --skip-dependencies haxelib_global/html-haxe-code-highlighter.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/hx2compat-1,0,2.zip -o haxelib_global/hx2compat.zip && neko run.n install --always --skip-dependencies haxelib_global/hx2compat.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/hx3compat-1,0,3.zip -o haxelib_global/hx3compat.zip && neko run.n install --always --skip-dependencies haxelib_global/hx3compat.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/markdown-1,0,0.zip -o haxelib_global/markdown.zip && neko run.n install --always --skip-dependencies haxelib_global/markdown.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/mcli-0,1,7.zip -o haxelib_global/mcli.zip && neko run.n install --always --skip-dependencies haxelib_global/mcli.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/mconsole-1,6,0.zip -o haxelib_global/mconsole.zip && neko run.n install --always --skip-dependencies haxelib_global/mconsole.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/minject-2,0,0-rc,1.zip -o haxelib_global/minject.zip && neko run.n install --always --skip-dependencies haxelib_global/minject.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/mockatoo-3,2,1.zip -o haxelib_global/mockatoo.zip && neko run.n install --always --skip-dependencies haxelib_global/mockatoo.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/mtwin-1,6,0.zip -o haxelib_global/mtwin.zip && neko run.n install --always --skip-dependencies haxelib_global/mtwin.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/PBKDF2-1,0,0.zip -o haxelib_global/PBKDF2.zip && neko run.n install --always --skip-dependencies haxelib_global/PBKDF2.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/record-macros-1,0,0-alpha.zip -o haxelib_global/record-macros.zip && neko run.n install --always --skip-dependencies haxelib_global/record-macros.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/tora-1,8,1.zip -o haxelib_global/tora.zip && neko run.n install --always --skip-dependencies haxelib_global/tora.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/ufront-mvc-1,1,0.zip -o haxelib_global/ufront-mvc.zip && neko run.n install --always --skip-dependencies haxelib_global/ufront-mvc.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/ufront-orm-1,1,0.zip -o haxelib_global/ufront-orm.zip && neko run.n install --always --skip-dependencies haxelib_global/ufront-orm.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/ufront-easyauth-1,0,0.zip -o haxelib_global/ufront-easyauth.zip && neko run.n install --always --skip-dependencies haxelib_global/ufront-easyauth.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/ufront-mail-1,0,0-rc,4.zip -o haxelib_global/ufront-mail.zip && neko run.n install --always --skip-dependencies haxelib_global/ufront-mail.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/ufront-ufadmin-1,0,0-beta,14.zip -o haxelib_global/ufront-ufadmin.zip && neko run.n install --always --skip-dependencies haxelib_global/ufront-ufadmin.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/ufront-uftasks-1,0,0-beta,15.zip -o haxelib_global/ufront-uftasks.zip && neko run.n install --always --skip-dependencies haxelib_global/ufront-uftasks.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/ufront-2,0,0.zip -o haxelib_global/ufront.zip && neko run.n install --always --skip-dependencies haxelib_global/ufront.zip +-cmd curl -sSLk https://lib.haxe.org/files/3.0/utest-1,9,6.zip -o haxelib_global/utest.zip && neko run.n install --always --skip-dependencies haxelib_global/utest.zip diff --git a/extra/haxelib_src/package.hxml b/extra/haxelib_src/package.hxml index c5e4ebba5f71544b985691233ff12d55a2b85fce..9d6a5186855d93ef87e9a8ff1c9c18a8b2e7d9d2 100755 --- a/extra/haxelib_src/package.hxml +++ b/extra/haxelib_src/package.hxml @@ -1,2 +1,3 @@ -cp src +-cp hx3compat/std --run Package \ No newline at end of file diff --git a/extra/haxelib_src/run.n b/extra/haxelib_src/run.n index 73828aff6d46869062378dcdfd710d53a1aebe7c..9d5147339386a993653abe8022e07e9701ebb08b 100644 Binary files a/extra/haxelib_src/run.n and b/extra/haxelib_src/run.n differ diff --git a/extra/haxelib_src/schema.json b/extra/haxelib_src/schema.json index 6e20db78f3d9abf2e3968cf0c9071efa663d8345..4faf9e657cafa0ad9d92d862a85d3f525e9f099d 100644 --- a/extra/haxelib_src/schema.json +++ b/extra/haxelib_src/schema.json @@ -22,6 +22,10 @@ "description": "Folder in the package which contains the source files for this project", "type": "string" }, + "main": { + "description": "A class to run on `haxelib run libraryname` command.\nRelative to library root. E.g. to run `tools/Main.hx` the value should be `tools.Main`.\nDefault value since Haxe 4: Run", + "type": "string" + }, "contributors": { "description": "List of project contributors that are allowed to upload to haxelib", "type": "array", diff --git a/extra/haxelib_src/server-start.hxml b/extra/haxelib_src/server-start.hxml new file mode 100644 index 0000000000000000000000000000000000000000..08b95fb68d6752ccc9cc65073162a9147c57e602 --- /dev/null +++ b/extra/haxelib_src/server-start.hxml @@ -0,0 +1 @@ +-cmd nekotools server -rewrite -d www \ No newline at end of file diff --git a/extra/haxelib_src/server.hxml b/extra/haxelib_src/server.hxml index 55a1e32b2eccbe4b5a5349ce1bce92d374f62da0..8edfae5f279c985c43a1184d085c1af8d4103ee7 100644 --- a/extra/haxelib_src/server.hxml +++ b/extra/haxelib_src/server.hxml @@ -1,7 +1,9 @@ # The new haxelib website (on the same 3.0 repo) +server_website_highlighter.hxml +--next server_website.hxml --next server_tasks.hxml --next -server_api.hxml \ No newline at end of file +server_api.hxml diff --git a/extra/haxelib_src/server_each.hxml b/extra/haxelib_src/server_each.hxml index 6ad2995a4f858b901baca2b7a83fc131852820c6..94ca08e8e18a6b06fc290d50e5c698ba2477f86a 100644 --- a/extra/haxelib_src/server_each.hxml +++ b/extra/haxelib_src/server_each.hxml @@ -1,4 +1,5 @@ -cp src +-cp hx3compat/std -lib ufront -lib ufront-mail:1.0.0-rc.4 -lib ufront-ufadmin @@ -7,6 +8,7 @@ -lib cleversort -lib aws-sdk-neko:0.2.0 -lib record-macros +-lib html-haxe-code-highlighter:0.1.2 -D server -D getter_support # https://github.com/HaxeFoundation/haxe/issues/4903 diff --git a/extra/haxelib_src/server_website_highlighter.hxml b/extra/haxelib_src/server_website_highlighter.hxml new file mode 100644 index 0000000000000000000000000000000000000000..35db03c673014b60d316e8a033a599fd69400837 --- /dev/null +++ b/extra/haxelib_src/server_website_highlighter.hxml @@ -0,0 +1,7 @@ +# generate code highlighter +-lib html-haxe-code-highlighter:0.1.2 +-js www/js/highlighter.js +-main highlighter.Highlighter +-D highlighter_standalone +-D analyzer-optimize +-dce full \ No newline at end of file diff --git a/extra/haxelib_src/src/Package.hx b/extra/haxelib_src/src/Package.hx index 3703e6e150c0b733c893bfa9517b4cf91b7ca77a..3fdd2d190d68a2c13fb3b6bbda91cb3cf66e331e 100644 --- a/extra/haxelib_src/src/Package.hx +++ b/extra/haxelib_src/src/Package.hx @@ -68,10 +68,15 @@ class Package { v; } var json:Infos = haxe.Json.parse(sys.io.File.getContent("haxelib.json")); - if (!runVersion.startsWith(json.version + " ")) { + + // Version output examples: + // - 3.4.0 + // - 3.4.0 (6b9c8851036fb012c0e188bc27da07999b663b4f - dirty) + if (!runVersion.startsWith(json.version)) { Sys.println('Error: Version in haxelib.json (${json.version}) does not match `neko run.n version` ($runVersion)'); Sys.exit(1); } + if (runVersion.indexOf("dirty") >= 0) { Sys.println('Error: run.n was compiled with dirty source'); Sys.exit(1); diff --git a/extra/haxelib_src/src/haxelib/Data.hx b/extra/haxelib_src/src/haxelib/Data.hx index 98799ae5236659564c6e114c576f9dbacef3ae8f..2f4e2273db185fbf9c0e8226cc2c3099715d759e 100644 --- a/extra/haxelib_src/src/haxelib/Data.hx +++ b/extra/haxelib_src/src/haxelib/Data.hx @@ -49,6 +49,7 @@ typedef ProjectInfos = { var desc : String; var website : String; var owner : String; + var contributors : Array<{ name:String, fullname:String }>; var license : String; var curversion : String; var downloads : Int; diff --git a/extra/haxelib_src/src/haxelib/client/Main.hx b/extra/haxelib_src/src/haxelib/client/Main.hx index 3f0396687796a23eb2d9fcb0d382eceb2796c0bb..997e33c25327aa760c33223bd2cd6276c72bf038 100644 --- a/extra/haxelib_src/src/haxelib/client/Main.hx +++ b/extra/haxelib_src/src/haxelib/client/Main.hx @@ -21,6 +21,7 @@ */ package haxelib.client; +import haxelib.client.Util.*; import haxe.crypto.Md5; import haxe.*; import haxe.ds.*; @@ -54,8 +55,10 @@ class ProgressOut extends haxe.io.Output { var o : haxe.io.Output; var cur : Int; + var curReadable : Float; var startSize : Int; var max : Null; + var maxReadable : Null; var start : Float; public function new(o, currentSize) { @@ -67,10 +70,20 @@ class ProgressOut extends haxe.io.Output { function report(n) { cur += n; + + var tag : String = ((max != null ? max : cur) / 1000000) > 1 ? "MB" : "KB"; + + curReadable = tag == "MB" ? cur / 1000000 : cur / 1000; + curReadable = Math.round( curReadable * 100 ) / 100; // 12.34 precision. + if( max == null ) - Sys.print(cur+" bytes\r"); - else - Sys.print(cur+"/"+max+" ("+Std.int((cur*100.0)/max)+"%)\r"); + Sys.print('${curReadable} ${tag}\r'); + else { + maxReadable = tag == "MB" ? max / 1000000 : max / 1000; + maxReadable = Math.round( maxReadable * 100 ) / 100; // 12.34 precision. + + Sys.print('${curReadable}${tag} / ${maxReadable}${tag} (${Std.int((cur*100.0)/max)}%)\r'); + } } public override function writeByte(c) { @@ -87,12 +100,18 @@ class ProgressOut extends haxe.io.Output { public override function close() { super.close(); o.close(); + var time = Timer.stamp() - start; var downloadedBytes = cur - startSize; - var speed = (downloadedBytes / time) / 1024; + var speed = (downloadedBytes / time) / 1000; time = Std.int(time * 10) / 10; speed = Std.int(speed * 10) / 10; - Sys.print("Download complete : "+downloadedBytes+" bytes in "+time+"s ("+speed+"KB/s)\n"); + + var tag : String = (downloadedBytes / 1000000) > 1 ? "MB" : "KB"; + var readableBytes : Float = (tag == "MB") ? downloadedBytes / 1000000 : downloadedBytes / 1000; + readableBytes = Math.round( readableBytes * 100 ) / 100; // 12.34 precision. + + Sys.println('Download complete: ${readableBytes}${tag} in ${time}s (${speed}KB/s)'); } public override function prepare(m) { @@ -140,11 +159,13 @@ class Main { static var REPNAME = "lib"; static var REPODIR = ".haxelib"; static var SERVER = { + protocol : "https", host : "lib.haxe.org", - port : 80, + port : 443, dir : "", url : "index.n", apiVersion : "3.0", + noSsl : false }; static var IS_WINDOWS = (Sys.systemName() == "Windows"); @@ -156,45 +177,6 @@ class Main { var isHaxelibRun : Bool; var alreadyUpdatedVcsDependencies:Map = new Map(); - macro static function rethrow(e) { - return if (haxe.macro.Context.defined("neko")) - macro neko.Lib.rethrow(e); - else - macro throw e; - } - - macro static function getHaxelibVersion() { - var haxelibJson:Infos = Json.parse(File.getContent("haxelib.json")); - return macro $v{haxelibJson.version}; - } - - macro static function getHaxelibVersionLong() { - var version:String = VERSION; - var p; - try { - //get commit sha - p = new sys.io.Process("git", ["rev-parse", "HEAD"]); - var sha = p.stdout.readAll().toString().trim(); - p.close(); - - //check to see if there is changes, staged or not - p = new sys.io.Process("git", ["status", "--porcelain"]); - var changes = p.stdout.readAll().toString().trim(); - p.close(); - - version += switch(changes) { - case "": - ' ($sha)'; - case _: - ' ($sha - dirty)'; - } - return macro $v{version}; - } catch(e:Dynamic) { - if (p != null) p.close(); - return macro $v{version}; - } - } - function new() { args = Sys.args(); isHaxelibRun = (Sys.getEnv("HAXELIB_RUN_NAME") == HAXELIB_LIBNAME); @@ -213,7 +195,8 @@ class Main { addCommand("info", info, "list information on a given library", Information); addCommand("user", user, "list information on a given user", Information); addCommand("config", config, "print the repository path", Information, false); - addCommand("path", path, "give paths to libraries", Information, false); + addCommand("path", path, "give paths to libraries' sources and necessary build definitions", Information, false); + addCommand("libpath", libpath, "returns the root path of a library", Information, false); addCommand("version", version, "print the currently used haxelib version", Information, false); addCommand("help", usage, "display this list of options", Information, false); @@ -238,16 +221,39 @@ class Main { initSite(); } + function retry(func:Void -> R, numTries:Int = 3) { + var hasRetried = false; + + while (numTries-- > 0) { + try { + var result = func(); + + if (hasRetried) print("retry sucessful"); + + return result; + } catch (e:Dynamic) { + if ( e == "Blocked") { + print("Failed. Triggering retry due to HTTP timeout"); + hasRetried = true; + } + else { + throw 'Failed with error: $e'; + } + } + } + throw 'Failed due to HTTP timeout after multiple retries'; + } + function checkUpdate() { - var latest = try site.getLatestVersion(HAXELIB_LIBNAME) catch (_:Dynamic) null; + var latest = try retry(site.getLatestVersion.bind(HAXELIB_LIBNAME)) catch (_:Dynamic) null; if (latest != null && latest > VERSION) print('\nA new version ($latest) of haxelib is available.\nDo `haxelib --global update $HAXELIB_LIBNAME` to get the latest version.\n'); } function initSite() { - siteUrl = "http://" + SERVER.host + ":" + SERVER.port + "/" + SERVER.dir; + siteUrl = SERVER.protocol + "://" + SERVER.host + ":" + SERVER.port + "/" + SERVER.dir; var remotingUrl = siteUrl + "api/" + SERVER.apiVersion + "/" + SERVER.url; - site = new SiteProxy(haxe.remoting.HttpConnection.urlConnect(remotingUrl).api); + site = new SiteProxy(haxe.remoting.HttpConnection.urlConnect(remotingUrl).resolve("api")); } function param( name, ?passwd ) { @@ -258,6 +264,7 @@ class Main { var s = new StringBuf(); do switch Sys.getChar(false) { case 10, 13: break; + case 0: // ignore (windows bug) case c: s.addChar(c); } while (true); @@ -278,12 +285,23 @@ class Main { } function version() { - print(VERSION_LONG); + var params = paramOpt(); + if ( params == null ) + print(VERSION_LONG); + else { + Sys.stderr().writeString('no parameters expected, got: ${params}\n'); + Sys.exit(1); + } } function usage() { var cats = []; - var maxLength = 0; + var maxLength = Lambda.fold(Reflect.fields(ABOUT_SETTINGS), function(opt, max) { + var fullOption = '--' + ~/([A-Z])/g.replace(opt, "-$1").toLowerCase(); + var len = fullOption.length; + return len > max ? len : max; + }, 0); + for( c in commands ) { if (c.name.length > maxLength) maxLength = c.name.length; if (c.cat.match(Deprecated(_))) continue; @@ -292,7 +310,7 @@ class Main { else cats[i].push(c); } - print('Haxe Library Manager $VERSION - (c)2006-2017 Haxe Foundation'); + print('Haxe Library Manager $VERSION - (c)2006-2019 Haxe Foundation'); print(" Usage: haxelib [command] [options]"); for (cat in cats) { @@ -303,8 +321,10 @@ class Main { } print(" Available switches"); - for (f in Reflect.fields(ABOUT_SETTINGS)) - print(' --' + f.rpad(' ', maxLength-2) + ": " + Reflect.field(ABOUT_SETTINGS, f)); + for (f in Reflect.fields(ABOUT_SETTINGS)) { + var option = ~/([A-Z])/g.replace(f, "-$1").toLowerCase().rpad(' ', maxLength-2); + print(' --' + option + ": " + Reflect.field(ABOUT_SETTINGS, f)); + } } static var ABOUT_SETTINGS = { global : "force global repo if a local one exists", @@ -314,6 +334,7 @@ class Main { always : "answer all questions with yes", never : "answer all questions with no", system : "run bundled haxelib version instead of latest update", + skipDependencies : "do not install dependencies", } var settings: { @@ -324,6 +345,7 @@ class Main { never : Bool, global : Bool, system : Bool, + skipDependencies : Bool, }; function process() { argcur = 0; @@ -336,6 +358,7 @@ class Main { flat: false, global: false, system: false, + skipDependencies: false, }; function parseSwitch(s:String) { @@ -348,6 +371,34 @@ class Main { None; } + var remoteIsSet = false; + function setupRemote(path:String) { + var r = ~/^(?:(https?):\/\/)?([^:\/]+)(?::([0-9]+))?\/?(.*)$/; + if( !r.match(path) ) + throw "Invalid repository format '"+path+"'"; + SERVER.protocol = switch (r.matched(1)) { + case null: + SERVER.noSsl ? "http" : "https"; + case protocol: + protocol; + } + SERVER.host = r.matched(2); + SERVER.port = switch (r.matched(3)) { + case null: + switch (SERVER.protocol) { + case "https": 443; + case "http": 80; + case protocol: throw 'unknown default port for $protocol'; + } + case portStr: + Std.parseInt(portStr); + } + SERVER.dir = r.matched(4); + if (SERVER.dir.length > 0 && !SERVER.dir.endsWith("/")) SERVER.dir += "/"; + initSite(); + remoteIsSet = true; + } + while ( argcur < args.length) { var a = args[argcur++]; switch( a ) { @@ -369,22 +420,15 @@ class Main { case "-notimeout": haxe.remoting.HttpConnection.TIMEOUT = 0; case "-R": - var path = args[argcur++]; - var r = ~/^(http:\/\/)?([^:\/]+)(:[0-9]+)?\/?(.*)$/; - if( !r.match(path) ) - throw "Invalid repository format '"+path+"'"; - SERVER.host = r.matched(2); - if( r.matched(3) != null ) - SERVER.port = Std.parseInt(r.matched(3).substr(1)); - SERVER.dir = r.matched(4); - if (SERVER.dir.length > 0 && !SERVER.dir.endsWith("/")) SERVER.dir += "/"; - initSite(); + setupRemote(args[argcur++]); case "--debug": settings.debug = true; settings.quiet = false; case "--quiet": settings.debug = false; settings.quiet = true; + case "--skip-dependencies": + settings.skipDependencies = true; case parseSwitch(_) => Some(s) if (Reflect.hasField(settings, s)): //if (!Reflect.hasField(settings, s)) { //print('unknown switch $a'); @@ -398,13 +442,24 @@ class Main { rest.push(a); } } + if(!remoteIsSet) { + switch(Sys.getEnv("HAXELIB_REMOTE")) { + case null: + case path: setupRemote(path); + } + } if (!isHaxelibRun && !settings.system) { var rep = try getGlobalRepository() catch (_:Dynamic) null; if (rep != null && FileSystem.exists(rep + HAXELIB_LIBNAME)) { argcur = 0; // send all arguments - doRun(rep, HAXELIB_LIBNAME, null); - return; + try { + doRun(rep, HAXELIB_LIBNAME, null); + return; + } catch(e:Dynamic) { + Sys.println('Warning: failed to run updated haxelib: $e'); + Sys.println('Warning: resorting to system haxelib...'); + } } } @@ -446,9 +501,10 @@ class Main { print("Host "+SERVER.host+" was not found"); print("Please ensure that your internet connection is on"); print("If you don't have an internet connection or if you are behing a proxy"); - print("please download manually the file from http://lib.haxe.org/files/3.0/"); + print("please download manually the file from https://lib.haxe.org/files/3.0/"); print("and run 'haxelib local ' to install the Library."); print("You can also setup the proxy with 'haxelib proxy'."); + print(haxe.CallStack.toString(haxe.CallStack.exceptionStack())); Sys.exit(1); } if( e == "Blocked" ) { @@ -483,7 +539,7 @@ class Main { function search() { var word = param("Search word"); - var l = site.search(word); + var l = retry(site.search.bind(word)); for( s in l ) print(s.name); print(l.length+" libraries found"); @@ -491,7 +547,7 @@ class Main { function info() { var prj = param("Library name"); - var inf = site.infos(prj); + var inf = retry(site.infos.bind(prj)); print("Name: "+inf.name); print("Tags: "+inf.tags.join(", ")); print("Desc: "+inf.desc); @@ -508,7 +564,7 @@ class Main { function user() { var uname = param("User name"); - var inf = site.user(uname); + var inf = retry(site.user.bind(uname)); print("Id: "+inf.name); print("Name: "+inf.fullname); print("Mail: "+inf.email); @@ -532,7 +588,7 @@ class Main { if( pass != pass2 ) throw "Password does not match"; pass = Md5.encode(pass); - site.register(name,pass,email,fullname); + retry(site.register.bind(name,pass,email,fullname)); return pass; } @@ -588,18 +644,18 @@ class Main { } while ( infos.contributors.indexOf(user) == -1 ); var password; - if( site.isNewUser(user) ) { + if( retry(site.isNewUser.bind(user)) ) { print("This is your first submission as '"+user+"'"); print("Please enter the following information for registration"); password = doRegister(user); } else { password = readPassword(user); } - site.checkDeveloper(infos.name,user); + retry(site.checkDeveloper.bind(infos.name,user)); // check dependencies validity for( d in infos.dependencies ) { - var infos = site.infos(d.name); + var infos = retry(site.infos.bind(d.name)); if( d.version == "" ) continue; var found = false; @@ -614,17 +670,17 @@ class Main { // check if this version already exists - var sinfos = try site.infos(infos.name) catch( _ : Dynamic ) null; + var sinfos = try retry(site.infos.bind(infos.name)) catch( _ : Dynamic ) null; if( sinfos != null ) for( v in sinfos.versions ) if( v.name == infos.version && !ask("You're about to overwrite existing version '"+v.name+"', please confirm") ) throw "Aborted"; // query a submit id that will identify the file - var id = site.getSubmitId(); + var id = retry(site.getSubmitId.bind()); // directly send the file data over Http - var h = createHttpRequest("http://"+SERVER.host+":"+SERVER.port+"/"+SERVER.url); + var h = createHttpRequest(SERVER.protocol+"://"+SERVER.host+":"+SERVER.port+"/"+SERVER.url); h.onError = function(e) throw e; h.onData = print; @@ -642,14 +698,14 @@ class Main { if (haxe.remoting.HttpConnection.TIMEOUT != 0) // don't ignore -notimeout haxe.remoting.HttpConnection.TIMEOUT = 1000; // ask the server to register the sent file - var msg = site.processSubmit(id,user,password); + var msg = retry(site.processSubmit.bind(id,user,password)); print(msg); } function readPassword(user:String, prompt = "Password"):String { var password = Md5.encode(param(prompt,true)); var attempts = 5; - while (!site.checkPassword(user, password)) { + while (!retry(site.checkPassword.bind(user, password))) { print('Invalid password for $user'); if (--attempts == 0) throw 'Failed to input correct password'; @@ -680,7 +736,7 @@ class Main { doInstallFile(rep, prj, true, true); return; } - + if ( prj.endsWith("haxelib.json") ) { installFromHaxelibJson( rep, prj); @@ -689,7 +745,7 @@ class Main { } // Name provided that wasn't a local hxml or zip, so try to install it from server - var inf = site.infos(prj); + var inf = retry(site.infos.bind(prj)); var reqversion = paramOpt(); var version = getVersion(inf, reqversion); doInstall(rep,inf.name,version,version == inf.getLatest()); @@ -720,10 +776,11 @@ class Main { var libsToInstall = new Map(); function processHxml(path) { - var hxml = sys.io.File.getContent(path); + var hxml = normalizeHxml(sys.io.File.getContent(path)); var lines = hxml.split("\n"); for (l in lines) { l = l.trim(); + for (target in targets.keys()) if (l.startsWith(target)) { var lib = targets[target]; @@ -731,9 +788,10 @@ class Main { libsToInstall[lib] = { name: lib, version: null, type:"haxelib", url: null, branch: null, subDir: null } } - if (l.startsWith("-lib")) + var libraryFlagEReg = ~/^(-lib|-L|--library)\b/; + if (libraryFlagEReg.match(l)) { - var key = l.substr(5).trim(); + var key = libraryFlagEReg.matchedRight().trim(); var parts = ~/:/.split(key); var libName = parts[0]; var libVersion:String = null; @@ -741,12 +799,12 @@ class Main { var url:String = null; var subDir:String = null; var type:String; - + if ( parts.length > 1 ) { if ( parts[1].startsWith("git:") ) { - + type = "git"; var urlParts = parts[1].substr(4).split("#"); url = urlParts[0]; @@ -776,7 +834,7 @@ class Main { } processHxml(path); - if (libsToInstall.empty()) + if (Lambda.empty(libsToInstall)) return; // Check the version numbers are all good @@ -789,7 +847,7 @@ class Main { // Do not check git repository infos continue; } - var inf = site.infos(l.name); + var inf = retry(site.infos.bind(l.name)); l.version = getVersion(inf, l.version); } @@ -812,7 +870,7 @@ class Main { } } } - + function installFromHaxelibJson( rep:String, path:String ) { doInstallDependencies(rep, Data.readData(File.getContent(path), false).dependencies); @@ -831,51 +889,99 @@ class Main { } } - function doInstall( rep, project, version, setcurrent ) { - // check if exists already - if( FileSystem.exists(rep+Data.safe(project)+"/"+Data.safe(version)) ) { - print("You already have "+project+" version "+version+" installed"); - setCurrent(rep,project,version,true); - return; - } + // strip comments, trim whitespace from each line and remove empty lines + function normalizeHxml(hxmlContents: String) { + return ~/\r?\n/g.split(hxmlContents).map(StringTools.trim).filter(function(line) { + return line != "" && !line.startsWith("#"); + }).join('\n'); + } - // download to temporary file - var filename = Data.fileName(project,version); - var filepath = rep+filename; - var out = try File.append(filepath,true) catch (e:Dynamic) throw 'Failed to write to $filepath: $e'; + // maxRedirect set to 20, which is most browsers' default value according to https://stackoverflow.com/a/36041063/267998 + function download(fileUrl:String, outPath:String, maxRedirect = 20):Void { + var out = try File.append(outPath,true) catch (e:Dynamic) throw 'Failed to write to $outPath: $e'; out.seek(0, SeekEnd); - var h = createHttpRequest(siteUrl+Data.REPOSITORY+"/"+filename); + var h = createHttpRequest(fileUrl); var currentSize = out.tell(); if (currentSize > 0) h.addHeader("range", "bytes="+currentSize + "-"); - var progress = if (settings.quiet == false ) + var progress = if (settings != null && settings.quiet == false ) new ProgressOut(out, currentSize); else out; - var has416Status = false; + var httpStatus = -1; + var redirectedLocation = null; h.onStatus = function(status) { - // 416 Requested Range Not Satisfiable, which means that we probably have a fully downloaded file already - if (status == 416) has416Status = true; + httpStatus = status; + switch (httpStatus) { + case 301, 302, 307, 308: + switch (h.responseHeaders.get("Location")) { + case null: + throw 'Request to $fileUrl responded with $httpStatus, ${h.responseHeaders}'; + case location: + redirectedLocation = location; + } + default: + // TODO? + } }; h.onError = function(e) { progress.close(); - // if we reached onError, because of 416 status code, it's probably okay and we should try unzipping the file - if (!has416Status) { - FileSystem.deleteFile(filepath); - throw e; + switch(httpStatus) { + case 416: + // 416 Requested Range Not Satisfiable, which means that we probably have a fully downloaded file already + // if we reached onError, because of 416 status code, it's probably okay and we should try unzipping the file + default: + FileSystem.deleteFile(outPath); + throw e; } }; + h.customRequest(false, progress); + + if (redirectedLocation != null) { + FileSystem.deleteFile(outPath); + + if (maxRedirect > 0) { + download(redirectedLocation, outPath, maxRedirect - 1); + } else { + throw "Too many redirects."; + } + } + } + + function doInstall( rep, project, version, setcurrent ) { + // check if exists already + if( FileSystem.exists(Path.join([rep, Data.safe(project), Data.safe(version)])) ) { + print("You already have "+project+" version "+version+" installed"); + setCurrent(rep,project,version,true); + return; + } + + // download to temporary file + var filename = Data.fileName(project,version); + var filepath = Path.join([rep, filename]); + print("Downloading "+filename+"..."); - h.customRequest(false,progress); - doInstallFile(rep,filepath, setcurrent); + var maxRetry = 3; + var fileUrl = Path.join([siteUrl, Data.REPOSITORY, filename]); + for (i in 0...maxRetry) { + try { + download(fileUrl, filepath); + break; + } catch (e:Dynamic) { + print('Failed to download ${fileUrl}. (${i+1}/${maxRetry})\n${e}'); + Sys.sleep(1); + } + } + + doInstallFile(rep, filepath, setcurrent); try { - site.postInstall(project, version); + retry(site.postInstall.bind(project, version)); } catch (e:Dynamic) {} } @@ -958,6 +1064,8 @@ class Main { } function doInstallDependencies( rep:String, dependencies:Array ) { + if( settings.skipDependencies ) return; + for( d in dependencies ) { if( d.version == "" ) { var pdir = rep + Data.safe(d.name); @@ -969,12 +1077,13 @@ class Main { } if( d.version == "" && d.type == DependencyType.Haxelib ) - d.version = site.getLatestVersion(d.name); + d.version = retry(site.getLatestVersion.bind(d.name)); print("Installing dependency "+d.name+" "+d.version); switch d.type { case Haxelib: - doInstall(rep, d.name, d.version, false); + var info = retry(site.infos.bind(d.name)); + doInstall(rep, info.name, d.version, false); case Git: useVcs(VcsID.Git, function(vcs) doVcsInstall(rep, vcs, d.name, d.url, d.branch, d.subDir, d.version)); case Mercurial: @@ -983,8 +1092,8 @@ class Main { } } - static public function getConfigFile():String { - var home = null; + static public function getHomePath():String{ + var home:String = null; if (IS_WINDOWS) { home = Sys.getEnv("USERPROFILE"); if (home == null) { @@ -1000,7 +1109,11 @@ class Main { if (home == null) throw "Could not determine home path. Please ensure that HOME environment variable is set."; } - return Path.addTrailingSlash(home) + ".haxelib"; + return home; + } + + static public function getConfigFile():String { + return Path.addTrailingSlash( getHomePath() ) + ".haxelib"; } function getGlobalRepositoryPath(create = false):String { @@ -1052,12 +1165,28 @@ class Main { } function getRepository():String { - if (!settings.global && FileSystem.exists(REPODIR) && FileSystem.isDirectory(REPODIR)) - return Path.addTrailingSlash(FileSystem.fullPath(REPODIR)); + if (!settings.global) + return switch getLocalRepository() { + case null: getGlobalRepository(); + case repo: Path.addTrailingSlash(FileSystem.fullPath(repo)); + } else return getGlobalRepository(); } + function getLocalRepository():Null { + var dir = Path.removeTrailingSlashes(Sys.getCwd()); + while (dir != null) { + var repo = Path.addTrailingSlash(dir) + REPODIR; + if(FileSystem.exists(repo) && FileSystem.isDirectory(repo)) { + return repo; + } else { + dir = new Path(dir).dir; + } + } + return null; + } + function getGlobalRepository():String { var rep = getGlobalRepositoryPath(true); if (!FileSystem.exists(rep)) @@ -1080,10 +1209,22 @@ class Main { } var line = param("Path"); - if (line != "") + if (line != "") { + var splitLine = line.split("/"); + if(splitLine[0] == "~") { + var home = getHomePath(); + + for(i in 1...splitLine.length) { + home += "/" + splitLine[i]; + } + line = home; + } + rep = line; + } + - rep = try FileSystem.fullPath(rep) catch (_:Dynamic) rep; + rep = try absolutePath(rep) catch (e:Dynamic) rep; if (isSamePath(rep, configFile)) throw "Can't use "+rep+" because it is reserved for config file"; @@ -1098,12 +1239,20 @@ class Main { print(getRepository()); } - function getCurrent( dir ) { - return (FileSystem.exists(dir+"/.dev")) ? "dev" : File.getContent(dir + "/.current").trim(); + function getCurrent( proj, dir ) { + return try { getDev(dir); return "dev"; } catch( e : Dynamic ) try File.getContent(dir + "/.current").trim() catch( e : Dynamic ) throw "Library "+proj+" is not installed : run 'haxelib install "+proj+"'"; } function getDev( dir ) { - return File.getContent(dir + "/.dev").trim(); + var path = File.getContent(dir + "/.dev").trim(); + path = ~/%([A-Za-z0-9_]+)%/g.map(path,function(r) { + var env = Sys.getEnv(r.matched(1)); + return env == null ? "" : env; + }); + var filters = try Sys.getEnv("HAXELIB_DEV_FILTER").split(";") catch( e : Dynamic ) null; + if( filters != null && !filters.exists(function(flt) return StringTools.startsWith(path.toLowerCase().split("\\").join("/"),flt.toLowerCase().split("\\").join("/"))) ) + throw "This .dev is filtered"; + return path; } function list() { @@ -1117,7 +1266,7 @@ class Main { if( p.charAt(0) == "." ) continue; - var current = try getCurrent(rep + p) catch(e:Dynamic) continue; + var current = try getCurrent("", rep + p) catch(e:Dynamic) continue; var dev = try getDev(rep + p) catch( e : Dynamic ) null; var semvers = []; @@ -1220,16 +1369,19 @@ class Main { var success = vcs.update(p); state.updated = success; + if(success) + print(p + " was updated"); Sys.setCwd(oldCwd); } else { - var latest = try site.getLatestVersion(p) catch( e : Dynamic ) { Sys.println(e); return; }; + var latest = try retry(site.getLatestVersion.bind(p)) catch( e : Dynamic ) { Sys.println(e); return; }; if( !FileSystem.exists(pdir+"/"+Data.safe(latest)) ) { if( state.prompt ) { if (!ask("Update "+p+" to "+latest)) return; } - doInstall(state.rep, p, latest,true); + var info = retry(site.infos.bind(p)); + doInstall(state.rep, info.name, latest,true); state.updated = true; } else setCurrent(state.rep, p, latest, true); @@ -1278,8 +1430,10 @@ class Main { var vdir = pdir + "/" + Data.safe(version); if( !FileSystem.exists(vdir) ){ print("Library "+prj+" version "+version+" is not installed"); - if(ask("Would you like to install it?")) - doInstall(rep, prj, version, true); + if(ask("Would you like to install it?")) { + var info = retry(site.infos.bind(prj)); + doInstall(rep, info.name, version, true); + } return; } if( File.getContent(pdir + "/.current").trim() == version ) @@ -1290,14 +1444,16 @@ class Main { print("Library "+prj+" current version is now "+version); } - function checkRec( rep : String, prj : String, version : String, l : List<{ project : String, version : String, dir : String, info : Infos }> ) { + function checkRec( rep : String, prj : String, version : String, l : List<{ project : String, version : String, dir : String, info : Infos }>, ?returnDependencies : Bool = true ) { var pdir = rep + Data.safe(prj); - if( !FileSystem.exists(pdir) ) - throw "Library "+prj+" is not installed : run 'haxelib install "+prj+"'"; - var version = if( version != null ) version else getCurrent(pdir); + var explicitVersion = version != null; + var version = if( version != null ) version else getCurrent(prj, pdir); var dev = try getDev(pdir) catch (_:Dynamic) null; - var vdir = if (dev != null) dev else pdir + "/" + Data.safe(version); + var vdir = pdir + "/" + Data.safe(version); + + if( dev != null && (!explicitVersion || !FileSystem.exists(vdir)) ) + vdir = dev; if( !FileSystem.exists(vdir) ) throw "Library "+prj+" version "+version+" is not installed"; @@ -1306,14 +1462,16 @@ class Main { if( p.project == prj ) { if( p.version == version ) return; - throw "Library "+prj+" has two version included "+version+" and "+p.version; + throw "Library "+prj+" has two versions included : "+version+" and "+p.version; } var json = try File.getContent(vdir+"/"+Data.JSON) catch( e : Dynamic ) null; - var inf = Data.readData(json,false); + var inf = Data.readData(json, json != null); l.add({ project : prj, version : version, dir : Path.addTrailingSlash(vdir), info: inf }); - for( d in inf.dependencies ) - if( !Lambda.exists(l, function(e) return e.project == d.name) ) - checkRec(rep,d.name,if( d.version == "" ) null else d.version,l); + if( returnDependencies ) { + for( d in inf.dependencies ) + if( !Lambda.exists(l, function(e) return e.project == d.name) ) + checkRec(rep,d.name,if( d.version == "" ) null else d.version,l); + } } function path() { @@ -1321,7 +1479,11 @@ class Main { var list = new List(); while( argcur < args.length ) { var a = args[argcur++].split(":"); - checkRec(rep, a[0],a[1],list); + try { + checkRec(rep, a[0], a[1], list); + } catch(e:Dynamic) { + throw 'Cannot process $a: $e'; + } } for( d in list ) { var ndir = d.dir + "ndll"; @@ -1329,8 +1491,7 @@ class Main { Sys.println('-L $ndir/'); try { - var f = File.getContent(d.dir + "extraParams.hxml"); - Sys.println(f.trim()); + Sys.println(normalizeHxml(File.getContent(d.dir + "extraParams.hxml"))); } catch(_:Dynamic) {} var dir = d.dir; @@ -1344,6 +1505,16 @@ class Main { } } + function libpath( ) { + var rep = getRepository(); + while( argcur < args.length ) { + var a = args[argcur++].split(":"); + var results = new List(); + checkRec(rep, a[0], a[1], results, false); + if( !results.isEmpty() ) Sys.println(results.first().dir); + } + } + function dev() { var rep = getRepository(); var project = param("Library"); @@ -1405,58 +1576,50 @@ class Main { } function doVcsInstall(rep:String, vcs:Vcs, libName:String, url:String, branch:String, subDir:String, version:String) { - + var proj = rep + Data.safe(libName); var libPath = proj + "/" + vcs.directory; - - var jsonPath = libPath + "/haxelib.json"; - + + function doVcsClone() { + print("Installing " +libName + " from " +url + ( branch != null ? " branch: " + branch : "" )); + try { + vcs.clone(libPath, url, branch, version); + } catch(error:VcsError) { + deleteRec(libPath); + var message = switch(error) { + case VcsUnavailable(vcs): + 'Could not use ${vcs.executable}, please make sure it is installed and available in your PATH.'; + case CantCloneRepo(vcs, repo, stderr): + 'Could not clone ${vcs.name} repository' + (stderr != null ? ":\n" + stderr : "."); + case CantCheckoutBranch(vcs, branch, stderr): + 'Could not checkout branch, tag or path "$branch": ' + stderr; + case CantCheckoutVersion(vcs, version, stderr): + 'Could not checkout tag "$version": ' + stderr; + }; + throw message; + } + } + if ( FileSystem.exists(proj + "/" + Data.safe(vcs.directory)) ) { print("You already have "+libName+" version "+vcs.directory+" installed."); - + var wasUpdated = this.alreadyUpdatedVcsDependencies.exists(libName); var currentBranch = if (wasUpdated) this.alreadyUpdatedVcsDependencies.get(libName) else null; - + if (branch != null && (!wasUpdated || (wasUpdated && currentBranch != branch)) && ask("Overwrite branch: " + (currentBranch == null?"":"\"" + currentBranch + "\"") + " with \"" + branch + "\"")) { deleteRec(libPath); - this.alreadyUpdatedVcsDependencies.set(libName, branch); + doVcsClone(); } - else + else if (!wasUpdated) { - if (!wasUpdated) - { - print("Updating " + libName+" version " + vcs.directory + " ..."); - this.alreadyUpdatedVcsDependencies.set(libName, branch); - updateByName(rep, libName); - setCurrent(rep, libName, vcs.directory, true); - - if(FileSystem.exists(jsonPath)) - doInstallDependencies(rep, Data.readData(File.getContent(jsonPath), false).dependencies); - } - return; + print("Updating " + libName+" version " + vcs.directory + " ..."); + updateByName(rep, libName); } - } - - print("Installing " +libName + " from " +url + ( branch != null ? " branch: " + branch : "" )); - - try { - vcs.clone(libPath, url, branch, version); - } catch(error:VcsError) { - deleteRec(libPath); - var message = switch(error) { - case VcsUnavailable(vcs): - 'Could not use ${vcs.executable}, please make sure it is installed and available in your PATH.'; - case CantCloneRepo(vcs, repo, stderr): - 'Could not clone ${vcs.name} repository' + (stderr != null ? ":\n" + stderr : "."); - case CantCheckoutBranch(vcs, branch, stderr): - 'Could not checkout branch, tag or path "$branch": ' + stderr; - case CantCheckoutVersion(vcs, version, stderr): - 'Could not checkout tag "$version": ' + stderr; - }; - throw message; + } else { + doVcsClone(); } // finish it! @@ -1471,6 +1634,7 @@ class Main { this.alreadyUpdatedVcsDependencies.set(libName, branch); + var jsonPath = libPath + "/haxelib.json"; if(FileSystem.exists(jsonPath)) doInstallDependencies(rep, Data.readData(File.getContent(jsonPath), false).dependencies); } @@ -1483,13 +1647,26 @@ class Main { doRun(rep, temp[0], temp[1]); } + function haxeVersion():SemVer { + if(__haxeVersion == null) { + var p = new Process('haxe', ['--version']); + if(p.exitCode() != 0) { + throw 'Cannot get haxe version: ${p.stderr.readAll().toString()}'; + } + var str = p.stdout.readAll().toString(); + __haxeVersion = SemVer.ofString(str.split('+')[0]); + } + return __haxeVersion; + } + static var __haxeVersion:SemVer; + function doRun( rep:String, project:String, version:String ) { var pdir = rep + Data.safe(project); if( !FileSystem.exists(pdir) ) throw "Library "+project+" is not installed"; pdir += "/"; if (version == null) - version = getCurrent(pdir); + version = getCurrent(project, pdir); var dev = try getDev(pdir) catch ( e : Dynamic ) null; var vdir = dev != null ? dev : pdir + Data.safe(version); @@ -1503,24 +1680,15 @@ class Main { Sys.setCwd(vdir); var callArgs = - if (infos.main == null) { - if( !FileSystem.exists('$vdir/run.n') ) - throw 'Library $project version $version does not have a run script'; + if (infos.main != null) { + runScriptArgs(project, infos.main, infos.dependencies); + } else if(FileSystem.exists('$vdir/run.n')) { ["neko", vdir + "/run.n"]; + } else if(FileSystem.exists('$vdir/Run.hx')) { + runScriptArgs(project, 'Run', infos.dependencies); } else { - var deps = infos.dependencies.toArray(); - deps.push( { name: project, version: DependencyVersion.DEFAULT } ); - var args = []; - for (d in deps) { - args.push('-lib'); - args.push(d.name + if (d.version == '') '' else ':${d.version}'); - } - args.unshift('haxe'); - args.push('--run'); - args.push(infos.main); - args; + throw 'Library $project version $version does not have a run script'; } - for (i in argcur...args.length) callArgs.push(args[i]); @@ -1530,6 +1698,24 @@ class Main { Sys.exit(Sys.command(cmd, callArgs)); } + function runScriptArgs(project:String, main:String, dependencies:Dependencies):Array { + var deps = dependencies.toArray(); + deps.push( { name: project, version: DependencyVersion.DEFAULT } ); + var args = []; + // TODO: change comparison to '4.0.0' upon Haxe 4.0 release + if(settings.global && SemVer.compare(haxeVersion(), SemVer.ofString('4.0.0-rc.5')) >= 0) { + args.push('--haxelib-global'); + } + for (d in deps) { + args.push('-lib'); + args.push(d.name + if (d.version == '') '' else ':${d.version}'); + } + args.unshift('haxe'); + args.push('--run'); + args.push(main); + return args; + } + function proxy() { var rep = getRepository(); var host = param("Proxy host"); @@ -1551,9 +1737,10 @@ class Main { }; Http.PROXY = proxy; print("Testing proxy..."); - try Http.requestUrl("http://www.google.com") catch( e : Dynamic ) { - print("Proxy connection failed"); - return; + try Http.requestUrl(SERVER.protocol + "://lib.haxe.org") catch( e : Dynamic ) { + if(!ask("Proxy connection failed. Use it anyway")) { + return; + } } File.saveContent(rep + "/.proxy", haxe.Serializer.run(proxy)); print("Proxy setup done"); @@ -1583,7 +1770,7 @@ class Main { } function newRepo() { - var path = #if (haxe_ver >= 3.2) FileSystem.absolutePath(REPODIR) #else REPODIR #end; + var path = absolutePath(REPODIR); var created = FsUtils.safeDir(path, true); if (created) print('Local repository created ($path)'); @@ -1592,7 +1779,7 @@ class Main { } function deleteRepo() { - var path = #if (haxe_ver >= 3.2) FileSystem.absolutePath(REPODIR) #else REPODIR #end; + var path = absolutePath(REPODIR); var deleted = FsUtils.deleteRec(path); if (deleted) print('Local repository deleted ($path)'); @@ -1606,9 +1793,31 @@ class Main { Sys.println(str); static function main() { - new Main().process(); + switch(Sys.getEnv("HAXELIB_NO_SSL")) { + case "1", "true": + SERVER.noSsl = true; + SERVER.protocol = "http"; + case _: + } + try { + new Main().process(); + } catch(e:Dynamic) { + for(arg in Sys.args()) { + if(arg == '--debug') { + Util.rethrow(e); + } + } + Sys.stderr().writeString(Std.string(e) + '\n'); + } } + // haxe 3.1.3 doesn't have FileSystem.absolutePath() + static function absolutePath(path:String) { + if (StringTools.startsWith(path, '/') || path.charAt(1) == ':' || StringTools.startsWith(path, '\\\\')) { + return path; + } + return haxe.io.Path.join([Sys.getCwd(), path]); + } // deprecated commands function local() { diff --git a/extra/haxelib_src/src/haxelib/client/Util.hx b/extra/haxelib_src/src/haxelib/client/Util.hx new file mode 100644 index 0000000000000000000000000000000000000000..9eb5165bcf7c681ca4fe19e3fff5cd931b850ebd --- /dev/null +++ b/extra/haxelib_src/src/haxelib/client/Util.hx @@ -0,0 +1,55 @@ +package haxelib.client; + +using StringTools; + +class Util { + + macro static public function rethrow(e) { + return if (haxe.macro.Context.defined("neko")) + macro neko.Lib.rethrow(e); + else + macro throw e; + } + + #if macro + static function readVersionFromHaxelibJson() { + return haxe.Json.parse(sys.io.File.getContent("haxelib.json")).version; + } + #end + + macro static public function getHaxelibVersion() { + return macro $v{readVersionFromHaxelibJson()}; + } + + macro static public function getHaxelibVersionLong() { + var version:String = readVersionFromHaxelibJson(); + var p; + try { + //check if the .git folder exist + //prevent getting the git info of a parent directory + if (!sys.FileSystem.isDirectory(".git")) + throw "Not a git repo."; + + //get commit sha + p = new sys.io.Process("git", ["rev-parse", "HEAD"]); + var sha = p.stdout.readAll().toString().trim(); + p.close(); + + //check to see if there is changes, staged or not + p = new sys.io.Process("git", ["status", "--porcelain"]); + var changes = p.stdout.readAll().toString().trim(); + p.close(); + + version += switch(changes) { + case "": + ' ($sha)'; + case _: + ' ($sha - dirty)'; + } + return macro $v{version}; + } catch(e:Dynamic) { + if (p != null) p.close(); + return macro $v{version}; + } + } +} \ No newline at end of file diff --git a/extra/haxelib_src/src/haxelib/client/Vcs.hx b/extra/haxelib_src/src/haxelib/client/Vcs.hx index 31c393e3fdb9c8045bae6f983b7e30e0244958e8..9abd59410170f3b1775b37af37da85f6cc931ef2 100644 --- a/extra/haxelib_src/src/haxelib/client/Vcs.hx +++ b/extra/haxelib_src/src/haxelib/client/Vcs.hx @@ -134,7 +134,7 @@ class Vcs implements IVcs { switch (commandResult) { case {code: 0}: //pass case {code: code, out:out}: - if (!settings.debug) + if (!settings.debug) Sys.stderr().writeString(out); Sys.exit(code); } @@ -243,11 +243,11 @@ class Git extends Vcs { override public function update(libName:String):Bool { if ( - command(executable, ["diff", "--exit-code"]).code != 0 + command(executable, ["diff", "--exit-code", "--no-ext-diff"]).code != 0 || - command(executable, ["diff", "--cached", "--exit-code"]).code != 0 + command(executable, ["diff", "--cached", "--exit-code", "--no-ext-diff"]).code != 0 ) { - if (Cli.ask("Reset changes to " + libName + " " + name + " repo so we can pull latest version?")) { + if (Cli.ask("Reset changes to " + libName + " " + name + " repo so we can pull latest version")) { sure(command(executable, ["reset", "--hard"])); } else { if (!settings.quiet) @@ -286,7 +286,7 @@ class Git extends Vcs { Sys.setCwd(libPath); - + if (version != null && version != "") { var ret = command(executable, ["checkout", "tags/" + version]); if (ret.code != 0) @@ -328,7 +328,7 @@ class Mercurial extends Vcs { override public function update(libName:String):Bool { command(executable, ["pull"]); var summary = command(executable, ["summary"]).out; - var diff = command(executable, ["diff", "-U", "2", "--git", "--subrepos"]); + var diff = command(executable, ["diff", "-U", "2", "--git", "--subrepos", "--no-ext-diff"]); var status = command(executable, ["status"]); // get new pulled changesets: @@ -345,7 +345,7 @@ class Mercurial extends Vcs { if (diff.code + status.code + diff.out.length + status.out.length != 0) { if (!settings.quiet) Sys.println(diff.out); - if (Cli.ask("Reset changes to " + libName + " " + name + " repo so we can update to latest version?")) { + if (Cli.ask("Reset changes to " + libName + " " + name + " repo so we can update to latest version")) { sure(command(executable, ["update", "--clean"])); } else { changed = false; diff --git a/extra/haxelib_src/src/haxelib/server/FileStorage.hx b/extra/haxelib_src/src/haxelib/server/FileStorage.hx index 97922d68eb54eac9645a0882e20484bf3a22541d..371b686072384309e10661df0ef9dba114b55e61 100644 --- a/extra/haxelib_src/src/haxelib/server/FileStorage.hx +++ b/extra/haxelib_src/src/haxelib/server/FileStorage.hx @@ -210,16 +210,17 @@ class S3FileStorage extends FileStorage { assertRelative(file); var s3Path = Path.join(['s3://${bucketName}', file]); var localFile:AbsPath = Path.join([localPath, file]); + FileSystem.createDirectory(Path.directory(localFile)); if (!FileSystem.exists(localFile)) { var request = transferClient.downloadFile(localFile, bucketName, file); while (!request.isDone()) { Sys.sleep(0.01); } - switch (request.getFailure()) { - case null: - //pass - case failure: - throw 'failed to download ${s3Path} to ${localPath}\n${failure}'; + if (!request.completedSuccessfully()) { + throw 'failed to download ${s3Path} to ${localFile}\n${request.getFailure()}'; + } + if (!FileSystem.exists(localFile)) { + throw 'failed to download ${s3Path} to ${localFile}'; } } return f(localFile); diff --git a/extra/haxelib_src/src/haxelib/server/Repo.hx b/extra/haxelib_src/src/haxelib/server/Repo.hx index 2bbf2faca2e91284d7316b4e2e1edaa3a24789c2..b9d3abcc3a3173b514e298aba114989965d3fd0f 100644 --- a/extra/haxelib_src/src/haxelib/server/Repo.hx +++ b/extra/haxelib_src/src/haxelib/server/Repo.hx @@ -73,6 +73,7 @@ class Repo implements SiteApi { date : v.date }], owner : p.ownerObj.name, + contributors : [for (d in Developer.manager.search( $project==p.id)) {name: d.userObj.name, fullname: d.userObj.fullname}], website : p.website, license : p.license, downloads : totalDownloads, @@ -171,6 +172,10 @@ class Repo implements SiteApi { // create project if needed if( p == null ) { + if( devs[0].name != user ) { + throw 'A new project should be submitted by its owner, which is the first user in the contributors field (${devs[0].name})'; + } + p = new Project(); p.name = infos.name; p.description = infos.description; @@ -206,6 +211,7 @@ class Repo implements SiteApi { var otags = Tag.manager.search({ project : p.id }); var curtags = otags.map(function(t) return t.tag).join(":"); + var ownerChanged = devs[0].id != p.ownerObj.id; var devsChanged = (pdevs.length != devs.length); if (!devsChanged) { // same length, check whether elements are the same for (d in pdevs) { @@ -218,12 +224,15 @@ class Repo implements SiteApi { } // update public infos - if( devsChanged || infos.description != p.description || p.website != infos.url || p.license != infos.license || tags.join(":") != curtags ) { + if( ownerChanged || devsChanged || infos.description != p.description || p.website != infos.url || p.license != infos.license || tags.join(":") != curtags ) { if( u.id != p.ownerObj.id ) throw "Only project owner can modify project infos"; p.description = infos.description; p.website = infos.url; p.license = infos.license; + if( ownerChanged ) { + p.ownerObj = devs[0]; + } p.update(); if( devsChanged ) { for( d in pdevs ) diff --git a/extra/haxelib_src/src/legacyhaxelib/Main.hx b/extra/haxelib_src/src/legacyhaxelib/Main.hx index 45c04f386fd278e6eb61c4b3a7899c42c6f6dde5..5286c605c76a9b40aac512eff2e84ffe91991e15 100644 --- a/extra/haxelib_src/src/legacyhaxelib/Main.hx +++ b/extra/haxelib_src/src/legacyhaxelib/Main.hx @@ -154,7 +154,7 @@ class Main { function initSite() { siteUrl = "http://"+SERVER.host+":"+SERVER.port+"/"+SERVER.dir+'/'; - site = new SiteProxy(haxe.remoting.HttpConnection.urlConnect(siteUrl+SERVER.url).api); + site = new SiteProxy(haxe.remoting.HttpConnection.urlConnect(siteUrl+SERVER.url).resolve("api")); } function param( name, ?passwd ) { @@ -952,7 +952,7 @@ class Main { var code = p.exitCode(); return { code:code, out: code == 0 ? p.stdout.readAll().toString() : p.stderr.readAll().toString() }; } - + function proxy() { var rep = getRepository(); var host = param("Proxy host"); diff --git a/extra/haxelib_src/src/website/Util.hx b/extra/haxelib_src/src/website/Util.hx new file mode 100644 index 0000000000000000000000000000000000000000..f77737db7ae8465b99ecb071b2e51a0e85cdef7b --- /dev/null +++ b/extra/haxelib_src/src/website/Util.hx @@ -0,0 +1,65 @@ +package website; + +/** + * @author Mark Knol + */ +class Util { + private static var _MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + + public static function escape(str:String) return StringTools.htmlEscape(str, true); + + /** + Outputs to "xx-Jan 2019" (accurate=true) or "xx days/weeks ago" (accurate=false) + @param date should be format "yyyy-mm-dd" + **/ + public static function formatDate(date:String, accurate:Bool = false) { + var split = date.split("-"); + var target:Date = new Date(Std.parseInt(split[0]), Std.parseInt(split[1]) - 1, Std.parseInt(split[2]), 0, 0, 0); + + if (!accurate) { // loose date format + var minuteInMs = 1000 * 60; + var hourInMs = minuteInMs * 60; + var dayInMs = hourInMs * 24; + + var targetTime = target.getTime(); + + var now = Date.now().getTime(); + var remainingMs = now - targetTime; + + var days = Math.floor(remainingMs / dayInMs); + var years = Std.int(days / 356); + var months = Std.int(days / 30.4167); // should be accurate enough + var weeks = Std.int(days / 7); + + if (years == 0) { + if (months < 2) { + if (weeks < 1) { + if (days == 0) return 'today'; + if (days == 1) return '$days day ago'; + return '$days days ago'; + } else { + if (weeks == 1) return '$weeks week ago'; + else return '$weeks weeks ago'; + } + } else { + return '$months months ago'; + } + } else { + return years > 1 ? '$years years ago' : '$years year ago'; + } + } else { + var month = _MONTHS[target.getMonth()]; + var date = target.getDate(); + var day = if (date < 10) '0$date' else '$date'; + return '$day-$month ${target.getFullYear()}'; + } + } + + public static function syntaxHighlightHTML(code:String):String { + var html = code; + html = ~/(("|')(.+?)?\2)/g.replace(html, "$1"); + html = ~/(<\\?)(.+?)(\/|\s|>)/g.replace(html, "$1$2$3"); + + return html; + } +} \ No newline at end of file diff --git a/extra/haxelib_src/src/website/api/ProjectApi.hx b/extra/haxelib_src/src/website/api/ProjectApi.hx index 095e78bc0d540f5b6b60fe9496cc41dafe0e089c..c47d1b97ea368fed13744586bb960e6188d74946 100644 --- a/extra/haxelib_src/src/website/api/ProjectApi.hx +++ b/extra/haxelib_src/src/website/api/ProjectApi.hx @@ -31,8 +31,8 @@ class ProjectApi extends UFApi { @inject public var cacheCnx:UFCacheConnectionSync; /** Extensions that should be loaded as a text file. **/ - public static var textExtensions:Array = ["md","txt","hx","hxml","json","xml","htaccess"]; - public static var imgExtensions:Array = ["jpg","jpeg","gif","png"]; + public static var textExtensions:Array = ["md","txt","hx","hxml","json","xml","htaccess","yml","gitignore","conf","html","mtt","htm","js","css","less","scss"]; + public static var imgExtensions:Array = ["jpg","jpeg","gif","png","svg","ico"]; /** Load the ProjectInfos for the given project. @@ -69,9 +69,9 @@ class ProjectApi extends UFApi { // Exact match! It's a file, not a directory. Now, check the type and load it. fileInfo = if ( textExtensions.indexOf(extension)>-1 ) - Text( Reader.unzip(entry).toString(), extension ); + Text( Reader.unzip(entry).toString(), extension, entry.fileSize ); else if ( imgExtensions.indexOf(extension)>-1 ) - Image( Reader.unzip(entry), extension ); + Image( Reader.unzip(entry), extension, entry.fileSize ); else Binary( entry.fileSize ); break; @@ -97,7 +97,11 @@ class ProjectApi extends UFApi { if ( fileInfo!=null ) Success( fileInfo ); else Failure( HttpError.pageNotFound() ); } - catch ( e:Dynamic ) return Failure( Error.withData('Failed to get file information for $path in $projectName ($version)',e) ); + catch ( e:Dynamic ) return Failure( Error.withData( + 'Failed to get file information for $path in $projectName ($version)', + Std.string(e) + "\n" + + haxe.CallStack.toString(haxe.CallStack.exceptionStack()) + ) ); } /** @@ -227,9 +231,9 @@ class ProjectApi extends UFApi { **/ enum FileInformation { /** A text file, with it's String content and extension. **/ - Text( content:String, extension:String ); + Text( content:String, extension:String, size:Int ); /** A text file, with it's Bytes content and extension. **/ - Image( content:Bytes, extension:String ); + Image( content:Bytes, extension:String, size:Int ); /** A binary file that we can't display, together with it's size. **/ Binary( size:Int ); /** A directory listing, with separate arrays for subdirs and files. **/ diff --git a/extra/haxelib_src/src/website/api/UserApi.hx b/extra/haxelib_src/src/website/api/UserApi.hx index f156d5103ea0ffa20acfe3cb915ef021d136639e..7a23051d2a54c4f89699dc26f6abc3258bcd68b6 100644 --- a/extra/haxelib_src/src/website/api/UserApi.hx +++ b/extra/haxelib_src/src/website/api/UserApi.hx @@ -25,7 +25,7 @@ class UserApi extends UFApi { var projects = [for (j in projectJoins) j.projectObj]; projects.cleverSort( -_.downloads ); - return Success( new Pair(user,projects) ); + return Success( new Pair(user, projects) ); } catch ( e:Dynamic ) return Failure( Error.withData('Failed to fetch user profile for $username', e) ); } diff --git a/extra/haxelib_src/src/website/controller/DocumentationController.hx b/extra/haxelib_src/src/website/controller/DocumentationController.hx index 3017caf2f8a85c03ded18d9351d1a68c5bfb6d1f..528fa0a3cf91b9a7dfc4bca07ab0090528d5f286 100644 --- a/extra/haxelib_src/src/website/controller/DocumentationController.hx +++ b/extra/haxelib_src/src/website/controller/DocumentationController.hx @@ -29,7 +29,9 @@ class DocumentationController extends Controller { pages.set( "/documentation/", "Getting Started" ); pages.set( "/documentation/using-haxelib/", "Using Haxelib" ); pages.set( "/documentation/creating-a-haxelib-package/", "Creating a Haxelib" ); - // pages.set( "/documentation/faq/", "FAQ" ); + pages.set( "/documentation/per-project-setup/", "Per project setup" ); + pages.set( "/documentation/haxelibs-in-projects/", "Adding libraries to projects" ); + pages.set( "/documentation/faq/", "FAQ" ); // pages.set( "/documentation/api/", "API" ); return pages; } diff --git a/extra/haxelib_src/src/website/controller/HomeController.hx b/extra/haxelib_src/src/website/controller/HomeController.hx index f35faafa7ef97350e237f66f2c835630e09159a0..c60ee4ca09b77fb5a9e64914fe2fc794d3cddd36 100644 --- a/extra/haxelib_src/src/website/controller/HomeController.hx +++ b/extra/haxelib_src/src/website/controller/HomeController.hx @@ -20,7 +20,7 @@ class HomeController extends Controller { @inject public function init( ctx:HttpContext ) { // All MVC actions come through HomeController (our index controller) first, so this is a good place to set global template variables. var r = ctx.request; - var url = 'http://'+r.hostName+r.uri; + var url = 'https://'+r.hostName+r.uri; if ( r.queryString!="" ) { url += '?'+r.queryString; } @@ -31,20 +31,38 @@ class HomeController extends Controller { ViewResult.globalValues.set( "documentationPages", DocumentationController.getDocumentationPages() ); ViewResult.globalValues.set( "description", "Haxe is an open source toolkit based on a modern, high level, strictly typed programming language." ); ViewResult.globalValues.set( "searchTerm", ctx.session.get('searchTerm') ); + ViewResult.globalValues.set( "escape", Util.escape); + ViewResult.globalValues.set( "formatDate", Util.formatDate); + ViewResult.globalValues.set( "extension", Path.extension); + ViewResult.globalValues.set( "min", Math.min); + ViewResult.globalValues.set( "max", Math.max); } @:route("/") public function homepage() { - var latestProjects = projectListApi.latest( 7 ).sure(); - var users = userApi.getUserList().sure().splice(0, 10); - var tags = projectListApi.getTagList( 20 ).sure(); + var allProjects = projectListApi.all().sure(); + + var latestProjects = projectListApi.latest( 12 * 3 ).sure() ; + var popularProjects = prepareProjectList( projectListApi.all().sure() ); + var users = userApi.getUserList().sure(); + var tags = projectListApi.getTagList( 25 ).sure(); + + var hasRecentProject = new Map(); + latestProjects = [for (p in latestProjects) { + if (p.p !=null && !hasRecentProject.exists(p.p.name)) { + hasRecentProject.set(p.p.name, true); + p; + } + }]; + return new ViewResult({ title: "Haxelib - the Haxe package manager", description: "Haxelib is a tool that enables sharing libraries and code in the Haxe ecosystem.", pageUrl: context.request.uri, - latestProjects: latestProjects, - users: users, - escape: function(str:String) return StringTools.htmlEscape(str, true), + latestProjects: function(offset:Int, total:Int) return [for (i in offset...offset+total) latestProjects[i]], + popularProjects: function(offset:Int, total:Int) return [for (i in offset...offset+total) popularProjects[i]], + users: function(offset:Int, total:Int) return [for (i in offset...offset+total) users[i]], + tags: tags, exampleCode: CompileTime.readFile( "website/homepage-example.txt" ), useWrapper: false, @@ -54,6 +72,19 @@ class HomeController extends Controller { @:route("/p/*") public var projectController:ProjectController; + @:route("/recent/") + public function recent() { + var latestProjects = projectListApi.latest( 100 ).sure(); + + latestProjects = [for (p in latestProjects) if (p.p != null ) p]; + + return new ViewResult({ + title: "Recent updates - the Haxe package manager", + description: "List of the most recent changes of Haxe libraries.", + projects: latestProjects, + }); + } + @:route("/u/*") public var userController:UserController; @@ -107,10 +138,13 @@ class HomeController extends Controller { return new ViewResult({ title: 'Haxelib Tags', - description: 'The 50 most popular tags for projects on Haxelib, sorted by the number of projects', + description: 'Projects of popular tags on Haxelib', tags: tagList, - escape: function(str:String) return StringTools.htmlEscape(str, true), tagCloud: tagCloud, + taggedProjects: function(tagName:String, offset:Int, total:Int) { + var projects = prepareProjectList( projectListApi.byTag( tagName ).sure() ); + return [for (i in offset...offset + total) projects[i]]; + } }); } @@ -171,13 +205,14 @@ class HomeController extends Controller { return result; } - static function prepareProjectList( list:Array ):Array<{ name:String, author:String, description:String, version:String, downloads:Int }> { + static function prepareProjectList( list:Array ):Array<{ name:String, user:User, author:String, description:String, version:Version, downloads:Int }> { return [for (p in list) if (p != null && p.ownerObj != null && p.versionObj != null) { name: p.name, + user: p.ownerObj, author: p.ownerObj.name, description: p.description, - version: p.versionObj.toSemver(), - downloads: p.downloads + version: p.versionObj, + downloads: p.downloads, }]; } diff --git a/extra/haxelib_src/src/website/controller/ProjectController.hx b/extra/haxelib_src/src/website/controller/ProjectController.hx index d199fe382f68d5ddf0a1a3f971cd6eee018fa06f..22eff9941b3efcac39607ea3a0fd5c71fe1126c1 100644 --- a/extra/haxelib_src/src/website/controller/ProjectController.hx +++ b/extra/haxelib_src/src/website/controller/ProjectController.hx @@ -1,8 +1,11 @@ package website.controller; +import haxe.DynamicAccess; +import haxe.Json; import haxelib.SemVer; import ufront.MVC; import website.api.ProjectApi; +import highlighter.Highlighter; import haxe.ds.Option; import markdown.AST; import Markdown; @@ -11,6 +14,7 @@ using haxe.io.Path; using CleverSort; using Lambda; using DateTools; +using StringTools; class ProjectController extends Controller { @@ -26,6 +30,7 @@ class ProjectController extends Controller { public function versionList( projectName:String ) { var info = projectApi.projectInfo( projectName ).sure(); info.versions.sort(function(v1, v2) return SemVer.compare(v2.name, v1.name)); + return new ViewResult({ title: 'All versions of $projectName', description: info.desc, @@ -35,41 +40,9 @@ class ProjectController extends Controller { info: info, }); } - - @:route("/$projectName/$semver") - public function version( projectName:String, ?semver:String ) { - var info = projectApi.projectInfo( projectName ).sure(); - if ( semver==null ) - semver = info.curversion; - var currentVersion = info.versions.find( function(v) return v.name==semver ); - if ( currentVersion==null ) - throw HttpError.pageNotFound(); - - var downloadUrl = '/p/$projectName/$semver/download/'; - - var readmeHTML = switch projectApi.readContentFromZip( projectName, semver, "README.md" ) { - case Success(Some(readme)): markdownToHtml(readme, '/p/$projectName/$semver/raw-files/'); - case Success(None): ""; // No README. - case Failure(err): - ufError( err.message ); - ufError( err.toString() ); - ""; - } - - return new ViewResult({ - title: '$projectName ($semver)', - project: projectName, - description: '${currentVersion.comments} - ${info.desc}', - allVersions: info.versions, - version: semver, - versionDate: Date.fromString(currentVersion.date).format('%F'), - info: info, - downloadUrl: downloadUrl, - readme: readmeHTML, - }, "version.html"); - } - + function markdownToHtml(markdown:String, prefix:String) { + // this function is basically a copy of Markdown.markdownToHtml // default md->html rendering function, but it adds a filter that // fixes relative URLs in IMG tags @@ -80,7 +53,17 @@ class ProjectController extends Controller { document.parseRefLinks(lines); var blocks = document.parseLines(lines); for (block in blocks) block.accept(imgSrcfixer); // fix relative image links - return Markdown.renderHtml(blocks); + + var html = Markdown.renderHtml(blocks); + + // prefix relative image urls in generated html (for plain -tags) + var regexp = ~/$e'; } @@ -106,48 +89,102 @@ class ProjectController extends Controller { var filePath = rest.join("/"); var downloadLink = baseUri+'$projectName/$semver/raw-files/$filePath'; var info = projectApi.projectInfo( projectName ).sure(); + + if ( semver==null ) + semver = info.curversion; + var currentVersion = info.versions.find( function(v) return v.name==semver ); + if ( currentVersion==null ) + throw HttpError.pageNotFound(); + var data:TemplateData = { title: 'Viewing $filePath on $projectName:$semver', project: projectName, description: info.desc, info: info, + allVersions: info.versions, + versionDate: Date.fromString(currentVersion.date).format('%F'), version: semver, + size: null, fileParts: rest, filePath: filePath, + fileExt: Path.extension(filePath), downloadLink: downloadLink, + icon: function(file:String) { + return switch Path.extension(file) { + case "zip"|"rar"|"tar.gx": "file-archive-o"; + case "pdf": "file-pdf-o"; + case "hx"|"hxml": "file-code-o"; + case "jpg"|"jpeg"|"gif"|"png"|"svg"|"ico": "file-image-o"; + case "txt"|"md"|"mdown"|"markdown": "file-text-o"; + case other: "file-o"; + } + }, type: "download", }; - + switch projectApi.getInfoForPath( projectName, semver, filePath ).sure() { case Directory(dirs,files): data["type"] = "directory"; data["dirListing"] = dirs; data["fileListing"] = files; data["currentDir"] = baseUri+'$projectName/$semver/files/$filePath'.removeTrailingSlashes(); - case Text(str,ext): + case Text(str,ext,size): if ( ["md","mdown","markdown"].indexOf(ext)>-1 ) { - str = Markdown.markdownToHtml( str ); + str = markdownToHtml( str, '/p/$projectName/$semver/raw-files/' ); + str = str.replace("", ">"); + + try { + str = switch (ext) { + case "xml","html","htm","mtt": + Util.syntaxHighlightHTML(str); + case "hx": + Highlighter.syntaxHighlightHaxe(str); + case "hxml": + Highlighter.syntaxHighlightHXML(str); + default: + str; + }; + } catch(e:Dynamic) { + // don't throw error when there is highlighting issue + // just don't highlight it + } } + data["fileContent"] = str; - data["extension"] = ext; + data["size"] = getSize(size); data["highlightLanguage"] = ext; - case Image(bytes,ext): + + case Image(bytes,ext,size): data["filename"] = rest[rest.length-1]; data["type"] = "img"; + data["size"] = getSize(size); + case Binary(size): data["filename"] = rest[rest.length-1]; - var sizeInKb = Math.round(size/1024*10) / 10; - data["size"] = sizeInKb + "kb"; + data["size"] = getSize(size); } var vr = new ViewResult( data ); vr.helpers["extensionAllowed"] = function(file:String) return ProjectApi.textExtensions.has(file.extension().toLowerCase()); return vr; } + + static function getSize(size:Int) { + if (size == null) return null; + var kb = Math.round(size / 1024 * 10) / 10; + if (kb > 1000) { + return (Math.round(kb / 100) / 10) + "mb"; + } else { + return kb + "kb"; + } + } // TODO: write some tests... @:route("/$projectName/$semver/raw-files/*") @@ -161,6 +198,116 @@ class ProjectController extends Controller { throw HttpError.pageNotFound(); } } + + @:route("/$projectName/$semver/readme/") + public function readme( projectName:String, semver:String ) { + return getVersion(projectName, semver, "readme"); + } + + @:route("/$projectName/$semver/license/") + public function license( projectName:String, semver:String ) { + return getVersion(projectName, semver, "license"); + } + + @:route("/$projectName/$semver/releasenotes/") + public function releasenotes( projectName:String, semver:String ) { + return getVersion(projectName, semver, "releasenotes"); + } + + @:route("/$projectName/$semver/changelog/") + public function changelog( projectName:String, semver:String ) { + return getVersion(projectName, semver, "changelog"); + } + + @:route("/$projectName/$semver/") + public function version( projectName:String, ?semver:String ) { + return getVersion(projectName, semver); + } + + private function getVersion( projectName:String, ?semver:String, ?type:String ) { + var info = projectApi.projectInfo( projectName ).sure(); + if ( semver==null ) + semver = info.curversion; + var currentVersion = info.versions.find( function(v) return v.name==semver ); + if ( currentVersion==null ) + throw HttpError.pageNotFound(); + + var downloadUrl = '/p/$projectName/$semver/download/'; + + function getHTML(files:Array) { + for(file in files) { + switch projectApi.readContentFromZip( projectName, semver, file, false ) { + case Success(Some(readme)): return markdownToHtml(readme, '/p/$projectName/$semver/raw-files/'); + case Success(None): // No file found. + case Failure(err): + // ufError( err.message ); + // ufError( err.toString() ); + }; + } + return null; + } + + // TODO: would be nice to have this data in database instead of from the zip + var haxeLibJson:Any = switch (projectApi.readContentFromZip(projectName, semver, "haxelib.json", false)) { + case Success(Some(haxelibJson)): Json.parse(haxelibJson); // it + case _: null; + } + var dependencies:DynamicAccess = haxeLibJson != null && Reflect.hasField(haxeLibJson, "dependencies") ? Reflect.field(haxeLibJson, "dependencies") : { }; + var dependencies = [for (dep in dependencies.keys()) { + name: dep, + version: if (dependencies.get(dep).length > 0) dependencies.get(dep) else null, + }]; + + var semverCommas = semver.replace(".", ","); + + var changelog = getHTML([ + for (changelog in ["releases", "changelog"]) + for (extension in [".md", ".txt", ""]) + for (p in ['$changelog$extension', '$projectName/$changelog$extension', '$semverCommas/$changelog$extension']) + p + ]); + + var readme = getHTML([for (extension in [".md", ".txt", ""]) + for (p in ['README$extension', '$projectName/README$extension', '$semverCommas/README$extension']) + p + ]); + + var license = getHTML([ + for (extension in [".md", ".txt", ""]) + for (p in ['LICENSE$extension', '$projectName/LICENSE$extension', '$semverCommas/LICENSE$extension']) + p + ]); + + var releaseNotes = currentVersion.comments; + + // whitelist type, fall back to readme. unless there is no readme, then go to releasenotes tab + if (!(type == 'license' || type == 'changelog' || type == 'releasenotes' || type == 'changelog' || type == 'readme')) { + type = "readme"; + if (readme == null) type = "releasenotes"; + } + + return new ViewResult({ + title: '$projectName ($semver)', + project: projectName, + description: '${currentVersion.comments} - ${info.desc}', + allVersions: info.versions, + version: semver, + versionDate: Date.fromString(currentVersion.date).format('%F'), + info: info, + downloadUrl: downloadUrl, + type: type, + changelog:changelog, + readme:readme, + license:license, + releaseNotes:releaseNotes, + hasReleaseNotes: currentVersion.comments != null && currentVersion.comments.length > 0, + hasReadme: readme != null, + hasChangelog: changelog != null, + hasLicense: license != null, + dependencies: dependencies, + }, "version.html"); + } + } private class MarkdownImgRelativeSrcFixer implements NodeVisitor { @@ -184,3 +331,4 @@ private class MarkdownImgRelativeSrcFixer implements NodeVisitor { public function visitText(text:TextNode):Void {} public function visitElementAfter(element:ElementNode):Void {} } + diff --git a/extra/haxelib_src/src/website/controller/RSSController.hx b/extra/haxelib_src/src/website/controller/RSSController.hx index 1f6cd8e14acff51882f35a3e00964c341a7c3882..222cf145f5fe0993350477ccbb254c1b0d9e787c 100644 --- a/extra/haxelib_src/src/website/controller/RSSController.hx +++ b/extra/haxelib_src/src/website/controller/RSSController.hx @@ -46,7 +46,7 @@ class RSSController extends Controller { // Set some variables we'll use. Sys.setTimeLocale( "en_US.UTF8" ); var hostName = context.request.hostName; - var url = "http://"+hostName; + var url = "https://"+hostName; var num = releases.length; // Create the RSS document and headers. @@ -56,7 +56,7 @@ class RSSController extends Controller { rss.set( "xmlns:dc", "http://purl.org/dc/elements/1.1/" ); var channel = createChild( rss, "channel" ); var link = createChild( channel, "atom:link" ); - link.set( "href", 'http://$hostName/rss/' ); + link.set( "href", 'https://$hostName/rss/' ); link.set( "rel", "self" ); link.set( "type", "application/rss+xml" ); createChildWithContent( channel, "title", 'Latest Haxelib Releases ($hostName)' ); diff --git a/extra/haxelib_src/test/HaxelibTests.hx b/extra/haxelib_src/test/HaxelibTests.hx index 51306f9535f4557a090521ab05e297ffbb0c0d26..a5ec9acbffdbb4ecf9180986d8c7dec193ab2b7a 100644 --- a/extra/haxelib_src/test/HaxelibTests.hx +++ b/extra/haxelib_src/test/HaxelibTests.hx @@ -1,3 +1,4 @@ +import haxe.io.Path; import haxelib.client.Vcs.VcsID; import haxe.unit.TestRunner; import sys.*; @@ -29,6 +30,19 @@ class HaxelibTests { return exitCode == 0; } + static public function deleteDirectory(dir:String) { + if (!FileSystem.exists(dir)) return; + var exitCode = switch (Sys.systemName()) { + case "Windows": + Sys.command("rmdir", ["/S", "/Q", StringTools.replace(FileSystem.fullPath(dir), "/", "\\")]); + case _: + Sys.command("rm", ["-rf", dir]); + } + if (exitCode != 0) { + throw 'unable to delete $dir'; + } + } + static function main():Void { var r = new TestRunner(); @@ -41,12 +55,14 @@ class HaxelibTests { if (isCI || cmdSucceed("hg", ["version"])) { // Hg impl. suports tags & revs. Here "78edb4b" is a first revision "initial import" at that repo: + TestHg.init(); r.add(new TestHg()); } else { Sys.println("hg not found."); } if (isCI || cmdSucceed("git", ["version"])) { // Git impl. suports only tags. Here "0.9.2" is a first revision too ("initial import"): + TestGit.init(); r.add(new TestGit()); } else { Sys.println("git not found."); diff --git a/extra/haxelib_src/test/IntegrationTests.hx b/extra/haxelib_src/test/IntegrationTests.hx index a12645d2bbb26ef227ec1ad8c44a20a04a0dfc13..c3b1e3194ece1fa7172b3d365a2d1d126adc6b11 100644 --- a/extra/haxelib_src/test/IntegrationTests.hx +++ b/extra/haxelib_src/test/IntegrationTests.hx @@ -7,6 +7,13 @@ import haxelib.*; using StringTools; using IntegrationTests; +typedef UserRegistration = { + user:String, + email:String, + fullname:String, + pw:String +} + class IntegrationTests extends TestBase { static var projectRoot:String = Sys.getCwd(); var haxelibBin:String = Path.join([projectRoot, "run.n"]); @@ -35,18 +42,30 @@ class IntegrationTests extends TestBase { originalRepo; }; static public var repo(default, never) = "repo_integration_tests"; - static public var bar(default, never) = { + static public var bar(default, never):UserRegistration = { user: "Bar", email: "bar@haxe.org", fullname: "Bar", pw: "barpassword", }; - static public var foo(default, never) = { + static public var foo(default, never):UserRegistration = { user: "Foo", email: "foo@haxe.org", fullname: "Foo", pw: "foopassword", }; + static public var deepAuthor(default, never):UserRegistration = { + user: "DeepAuthor", + email: "deep@haxe.org", + fullname: "Jonny Deep", + pw: "deep thought" + } + static public var anotherGuy(default, never):UserRegistration = { + user: "AnotherGuy", + email: "another@email.com", + fullname: "Another Guy", + pw: "some other pw" + } public var clientVer(get, null):SemVer; var clientVer_inited = false; function get_clientVer() { @@ -57,7 +76,7 @@ class IntegrationTests extends TestBase { var r = haxelib(["version"]).result(); if (r.code == 0) SemVer.ofString(switch(r.out.trim()) { - case _.split(" ") => [v] | [v, _]: v; + case _.split(" ") => parts: parts[0]; case v: v; }); else if (r.out.indexOf("3.1.0-rc.4") >= 0) @@ -92,6 +111,10 @@ class IntegrationTests extends TestBase { assertEquals(0, r.code, pos); } + function assertFail(r:{out:String, err:String, code:Int}, ?pos:haxe.PosInfos):Void { + assertTrue(r.code != 0, pos); + } + function assertNoError(f:Void->Void):Void { f(); assertTrue(true); @@ -158,10 +181,7 @@ class IntegrationTests extends TestBase { } static public function haxelibSetup(path:String):Void { - var p = new Process("haxelib", ["setup", path]); - if (p.exitCode() != 0) - throw "unable to set haxelib repo to " + path; - p.close(); + HaxelibTests.runCommand("haxelib", ["setup", path]); } static function main():Void { @@ -177,7 +197,10 @@ class IntegrationTests extends TestBase { runner.add(new tests.integration.TestSet()); runner.add(new tests.integration.TestInfo()); runner.add(new tests.integration.TestUser()); + runner.add(new tests.integration.TestOwner()); runner.add(new tests.integration.TestDev()); + runner.add(new tests.integration.TestRun()); + runner.add(new tests.integration.TestPath()); var success = runner.run(); if (!success) { diff --git a/extra/haxelib_src/test/Prepare.hx b/extra/haxelib_src/test/Prepare.hx index d17a4aadcdfb33e579beb736e7534470df781f97..cc12b5baeb39d4db1eba6431f6cb784c96a886e1 100644 --- a/extra/haxelib_src/test/Prepare.hx +++ b/extra/haxelib_src/test/Prepare.hx @@ -45,6 +45,7 @@ class Prepare { for (item in FileSystem.readDirectory(libsPath)) { var path = Path.join([libsPath, item]); if (FileSystem.isDirectory(path)) { + trace('Preparing $item'); zipDir(path, 'test/libraries/${item}.zip'); } } diff --git a/extra/haxelib_src/test/RunCi.hx b/extra/haxelib_src/test/RunCi.hx index 13504c7dca4f62ad1babbd8ebb625838fc6ee76a..078381638b8785f5e11a28fe036db556f31b92d6 100644 --- a/extra/haxelib_src/test/RunCi.hx +++ b/extra/haxelib_src/test/RunCi.hx @@ -84,6 +84,7 @@ class RunCi { static function testClient():Void { runCommand("haxe", ["client_tests.hxml"]); + runCommand("neko", ["bin/test.n"]); } static function testServer():Void { @@ -157,8 +158,12 @@ Listen 2000 Options Indexes FollowSymLinks AllowOverride All +' + (switch (systemName()) { + case "Windows": ''; + case _: ' Order allow,deny - Allow from all + Allow from all'; +}) + ' Require all granted '; @@ -184,7 +189,7 @@ Listen 2000 pass: user.pass, host: "localhost", port: 3306, - #if (haxe_ver < 4.0) database: "", #end + #if (haxe_ver < 4.0) database: "mysql", #end }); cnx.request('create user if not exists \'${dbConfig.user}\'@\'localhost\' identified by \'${dbConfig.pass}\';'); cnx.request('create database if not exists ${dbConfig.database};'); @@ -202,7 +207,7 @@ Listen 2000 case "Windows": configDb(); - download("https://www.apachelounge.com/download/VC15/binaries/httpd-2.4.29-Win32-VC15.zip", "bin/httpd.zip"); + download("https://home.apache.org/~steffenal/VC15/binaries/httpd-2.4.41-win32-VC15.zip", "bin/httpd.zip"); runCommand("7z", ["x", "bin\\httpd.zip", "-obin\\httpd"]); writeApacheConf("bin\\httpd\\Apache24\\conf\\httpd.conf"); @@ -238,9 +243,9 @@ Listen 2000 println("===================="); } case "Mac": - runCommand("brew", ["install", "httpd", "mysql"]); + runCommand("brew", ["install", "httpd", "mysql@5.7"]); - runCommand("mysql.server", ["start"]); + runCommand("brew", ["services", "start", "mysql@5.7"]); configDb(); @@ -273,7 +278,7 @@ Listen 2000 writeApacheConf("haxelib.conf"); runCommand("sudo", ["ln", "-s", Path.join([Sys.getCwd(), "haxelib.conf"]), "/etc/apache2/conf-enabled/haxelib.conf"]); - + runCommand("sudo", ["service", "apache2", "restart"]); Sys.sleep(2.5); @@ -297,7 +302,7 @@ Listen 2000 } Sys.setCwd("www"); - runCommand("bower", ["install"]); + runCommand("npm", ["install"]); Sys.setCwd(".."); Sys.putEnv("HAXELIB_SERVER", HAXELIB_SERVER); @@ -308,7 +313,7 @@ Listen 2000 switch (systemName()) { case "Mac": runCommand("apachectl", ["stop"]); - runCommand("mysql.server", ["stop"]); + runCommand("brew", ["services", "stop", "mysql@5.7"]); case _: //pass } @@ -347,7 +352,7 @@ Listen 2000 break; } - if (Timer.stamp() - t > 120) { + if (Timer.stamp() - t > 9 * 60) { throw "server is not reachable..."; } @@ -370,8 +375,10 @@ Listen 2000 runCommand("haxe", ["integration_tests.hxml", "-D", "system_haxelib"]); case _: runCommand("haxe", ["integration_tests.hxml"]); + runCommand("neko", ["bin/integration_tests.n"]); runCommand("haxe", ["integration_tests.hxml", "-D", "system_haxelib"]); } + runCommand("neko", ["bin/integration_tests.n"]); } if (Sys.getEnv("CI") != null && Sys.getEnv("USE_DOCKER") == null) { runWithLocalServer(test); @@ -464,16 +471,15 @@ Listen 2000 compileLegacyClient(); compileLegacyServer(); - // the server can only be compiled with haxe 3.2+ + // the server can only be compiled with haxe 3.4+ // haxe 3.1.3 bundles haxelib client 3.1.0-rc.4, which is not upgradable to later haxelib // so there is no need to test the client either #if (haxe_ver >= 3.2) compileClient(); testClient(); - compileServer(); #end - // buddy is only compatiable with haxe 3.4+ - #if (haxe_ver >= 3.4) + #if ((haxe_ver >= 3.4) && (haxe_ver < 4)) + compileServer(); testServer(); #end @@ -482,7 +488,7 @@ Listen 2000 case "Windows", "Linux": integrationTests(); case "Mac": - #if (haxe_ver >= 3.2) + #if ((haxe_ver >= 3.4) && (haxe_ver < 4)) integrationTests(); #end case _: diff --git a/extra/haxelib_src/test/TestBase.hx b/extra/haxelib_src/test/TestBase.hx index 56674e45bdb7fa4308ef398540edf240bf9d4f36..e22ff837894a84dacc78b967b19c69d0e5a8603c 100644 --- a/extra/haxelib_src/test/TestBase.hx +++ b/extra/haxelib_src/test/TestBase.hx @@ -5,10 +5,33 @@ import haxe.unit.*; class TestBase extends TestCase { static var haxelibPath = FileSystem.fullPath("run.n"); - public function runHaxelib(args:Array) { + public function runHaxelib(args:Array, printProgress = false) { var p = new Process("neko", [haxelibPath].concat(args)); - var stdout = p.stdout.readAll().toString(); - var stderr = p.stderr.readAll().toString(); + var stdout = ''; + var stderr = ''; + var eofCount = 0; + var c; + while (eofCount < 2) { + eofCount = 0; + try { + c = p.stdout.readByte(); + if (printProgress) Sys.stdout().writeByte(c); + stdout += String.fromCharCode(c); + } catch(e:Eof) { + eofCount++; + } + try { + c = p.stderr.readByte(); + if (printProgress) Sys.stderr().writeByte(c); + stderr += String.fromCharCode(c); + } catch(e:Eof) { + eofCount++; + } + } + if (printProgress) { + Sys.stdout().flush(); + Sys.stderr().flush(); + } var exitCode = p.exitCode(); p.close(); return { @@ -19,15 +42,6 @@ class TestBase extends TestCase { } public function deleteDirectory(dir:String):Void { - if (!FileSystem.exists(dir)) return; - var exitCode = switch (Sys.systemName()) { - case "Windows": - Sys.command("rmdir", ["/S", "/Q", StringTools.replace(FileSystem.fullPath(dir), "/", "\\")]); - case _: - Sys.command("rm", ["-rf", dir]); - } - if (exitCode != 0) { - throw 'unable to delete $dir'; - } + HaxelibTests.deleteDirectory(dir); } } diff --git a/extra/haxelib_src/test/libraries/UseGitDep/git-deps.hxml b/extra/haxelib_src/test/libraries/UseGitDep/git-deps.hxml new file mode 100644 index 0000000000000000000000000000000000000000..b1906d6869e20c98020c2eff66430af999d16aeb --- /dev/null +++ b/extra/haxelib_src/test/libraries/UseGitDep/git-deps.hxml @@ -0,0 +1 @@ +-lib hx.signal:git:https://github.com/fzzr-/hx.signal.git#0.9.3 \ No newline at end of file diff --git a/extra/haxelib_src/test/libraries/libBadHaxelibJson/haxelib.json b/extra/haxelib_src/test/libraries/libBadHaxelibJson/haxelib.json new file mode 100644 index 0000000000000000000000000000000000000000..d70772fcd5f88727c132dd9a107b343994de47ff --- /dev/null +++ b/extra/haxelib_src/test/libraries/libBadHaxelibJson/haxelib.json @@ -0,0 +1,11 @@ +{ + "name": "BadHaxelibJson", + "url" : "http://example.org", + "license": "GPL", + "tags": ["bar", "test"], + "description": "This project is an example of an haxelib project", + "version": "1.0.0", + "releasenote": "Initial release, everything is working correctly", + "contributors": ["BadHaxelibJson"], + "dependencies": {,} +} \ No newline at end of file diff --git a/extra/haxelib_src/test/libraries/libBar/Run.hx b/extra/haxelib_src/test/libraries/libBar/Run.hx new file mode 100644 index 0000000000000000000000000000000000000000..278db81752fec3a023e88339adb7944117a63bdc --- /dev/null +++ b/extra/haxelib_src/test/libraries/libBar/Run.hx @@ -0,0 +1,6 @@ +class Run { + static public function main() { + Sys.print('Bar Run.hx script'); + } +} + diff --git a/extra/haxelib_src/test/libraries/libBar2/Run.hx b/extra/haxelib_src/test/libraries/libBar2/Run.hx new file mode 100644 index 0000000000000000000000000000000000000000..8e73f6c5166449d456ff8bc4dafd4da6ea8a1cbd --- /dev/null +++ b/extra/haxelib_src/test/libraries/libBar2/Run.hx @@ -0,0 +1,6 @@ +class Run { + static public function main() { + Sys.print('Bar2 Run.hx script'); + } +} + diff --git a/extra/haxelib_src/test/libraries/libBar2/RunN.hx b/extra/haxelib_src/test/libraries/libBar2/RunN.hx new file mode 100644 index 0000000000000000000000000000000000000000..6fcce336a9d5aa8ea1884a7329988ab536e4f8fb --- /dev/null +++ b/extra/haxelib_src/test/libraries/libBar2/RunN.hx @@ -0,0 +1,6 @@ +class Run { + static public function main() { + Sys.print('Bar2 run.n script'); + } +} + diff --git a/extra/haxelib_src/test/libraries/libBar2/run.n b/extra/haxelib_src/test/libraries/libBar2/run.n new file mode 100644 index 0000000000000000000000000000000000000000..fc02bdfb55df39beb0db5d88247eaff9e4657da5 Binary files /dev/null and b/extra/haxelib_src/test/libraries/libBar2/run.n differ diff --git a/extra/haxelib_src/test/libraries/libBaz/haxelib.json b/extra/haxelib_src/test/libraries/libBaz/haxelib.json new file mode 100644 index 0000000000000000000000000000000000000000..367e91d43bccfd6862aaa5ba71c29abc918ee319 --- /dev/null +++ b/extra/haxelib_src/test/libraries/libBaz/haxelib.json @@ -0,0 +1,11 @@ +{ + "name": "Baz", + "url" : "http://example.org", + "license": "GPL", + "tags": ["baz", "test"], + "description": "This project is an example of an haxelib project", + "version": "0.1.0-alpha.0", + "releasenote": "Initial release, everything is working correctly", + "contributors": ["Baz"], + "main": "tools.Main" +} \ No newline at end of file diff --git a/extra/haxelib_src/test/libraries/libBaz/haxelib.xml b/extra/haxelib_src/test/libraries/libBaz/haxelib.xml new file mode 100644 index 0000000000000000000000000000000000000000..f3b38c975c6f0719f69e31a359c8f58ffd799be8 --- /dev/null +++ b/extra/haxelib_src/test/libraries/libBaz/haxelib.xml @@ -0,0 +1,7 @@ + + + + + This project is an example of an haxelib project + Initial release, everything is working correctly + \ No newline at end of file diff --git a/extra/haxelib_src/test/libraries/libBaz/tools/Main.hx b/extra/haxelib_src/test/libraries/libBaz/tools/Main.hx new file mode 100644 index 0000000000000000000000000000000000000000..9bd8887517d74446e2da1239444ce871bea7ceb8 --- /dev/null +++ b/extra/haxelib_src/test/libraries/libBaz/tools/Main.hx @@ -0,0 +1,7 @@ +package tools; + +class Main { + static function main() { + Sys.print('Baz tools.Main script'); + } +} \ No newline at end of file diff --git a/extra/haxelib_src/test/libraries/libDeep2/libDeep/bar/Bar.hx b/extra/haxelib_src/test/libraries/libDeep2/libDeep/bar/Bar.hx new file mode 100644 index 0000000000000000000000000000000000000000..2936374c09fd9ec3ac752b23c93de783ce5e94fc --- /dev/null +++ b/extra/haxelib_src/test/libraries/libDeep2/libDeep/bar/Bar.hx @@ -0,0 +1,9 @@ +package bar; + +class Bar { + + static function new() { + trace("new Bar"); + } + +} \ No newline at end of file diff --git a/extra/haxelib_src/test/libraries/libDeep2/libDeep/haxelib.json b/extra/haxelib_src/test/libraries/libDeep2/libDeep/haxelib.json new file mode 100644 index 0000000000000000000000000000000000000000..826f0be4c15fd77dbcca5e393b3e104694f12f80 --- /dev/null +++ b/extra/haxelib_src/test/libraries/libDeep2/libDeep/haxelib.json @@ -0,0 +1,10 @@ +{ + "name": "Deep", + "url" : "http://example.org", + "license": "Public", + "tags": ["deep", "test"], + "description": "This project's zip contains a folder that holds the lib.", + "version": "1.0.1", + "releasenote": "AnotherGuy took over the ownership.", + "contributors": ["AnotherGuy", "DeepAuthor"] +} \ No newline at end of file diff --git a/extra/haxelib_src/test/libraries/libDeep3/libDeep/bar/Bar.hx b/extra/haxelib_src/test/libraries/libDeep3/libDeep/bar/Bar.hx new file mode 100644 index 0000000000000000000000000000000000000000..2936374c09fd9ec3ac752b23c93de783ce5e94fc --- /dev/null +++ b/extra/haxelib_src/test/libraries/libDeep3/libDeep/bar/Bar.hx @@ -0,0 +1,9 @@ +package bar; + +class Bar { + + static function new() { + trace("new Bar"); + } + +} \ No newline at end of file diff --git a/extra/haxelib_src/test/libraries/libDeep3/libDeep/haxelib.json b/extra/haxelib_src/test/libraries/libDeep3/libDeep/haxelib.json new file mode 100644 index 0000000000000000000000000000000000000000..1c2d7486536ddf37bb07f5267207121002ffe082 --- /dev/null +++ b/extra/haxelib_src/test/libraries/libDeep3/libDeep/haxelib.json @@ -0,0 +1,10 @@ +{ + "name": "Deep", + "url" : "http://example.org", + "license": "Public", + "tags": ["deep", "test"], + "description": "This project's zip contains a folder that holds the lib.", + "version": "1.0.2", + "releasenote": "Removed DeepAuthor in contributors, add Foo.", + "contributors": ["AnotherGuy", "Foo"] +} \ No newline at end of file diff --git a/extra/haxelib_src/test/tests/TestGit.hx b/extra/haxelib_src/test/tests/TestGit.hx index 6cceea46321910e9d7101d3150d0bcebd123fa41..4417ee7d37174b37c895c32a8e8ee968c9ce8474 100644 --- a/extra/haxelib_src/test/tests/TestGit.hx +++ b/extra/haxelib_src/test/tests/TestGit.hx @@ -1,9 +1,17 @@ package tests; +import sys.FileSystem; import haxelib.client.Vcs; class TestGit extends TestVcs { + static inline var REPO_PATH = 'test/repo/git'; + + static public function init() { + HaxelibTests.deleteDirectory(REPO_PATH); + HaxelibTests.runCommand('git', ['clone', 'https://github.com/fzzr-/hx.signal.git', REPO_PATH]); + } + public function new():Void { - super(VcsID.Git, "Git", "https://github.com/fzzr-/hx.signal.git", "0.9.2"); + super(VcsID.Git, "Git", FileSystem.fullPath(REPO_PATH), "0.9.2"); } } \ No newline at end of file diff --git a/extra/haxelib_src/test/tests/TestHg.hx b/extra/haxelib_src/test/tests/TestHg.hx index c4c8c2d0981738a7254f5f9fe922503064c6f927..d5a953f107f4e91355c62b9ef896c85ee698ba21 100644 --- a/extra/haxelib_src/test/tests/TestHg.hx +++ b/extra/haxelib_src/test/tests/TestHg.hx @@ -1,9 +1,17 @@ package tests; +import sys.FileSystem; import haxelib.client.Vcs; class TestHg extends TestVcs { + static inline var REPO_PATH = 'test/repo/hg'; + + static public function init() { + HaxelibTests.deleteDirectory(REPO_PATH); + HaxelibTests.runCommand('hg', ['clone', 'https://bitbucket.org/fzzr/hx.signal', REPO_PATH]); + } + public function new():Void { - super(VcsID.Hg, "Mercurial", "https://bitbucket.org/fzzr/hx.signal", "78edb4b"); + super(VcsID.Hg, "Mercurial", FileSystem.fullPath(REPO_PATH), "78edb4b"); } } \ No newline at end of file diff --git a/extra/haxelib_src/test/tests/TestInstall.hx b/extra/haxelib_src/test/tests/TestInstall.hx index 9cb6bdd7250e40283ff1e3456a05a006afd21bf5..3b726b87a624fbeb703e46710d8b9d8932f72633 100644 --- a/extra/haxelib_src/test/tests/TestInstall.hx +++ b/extra/haxelib_src/test/tests/TestInstall.hx @@ -20,7 +20,7 @@ class TestInstall extends TestBase //--------------- constructor ---------------// - public function new() + public function new() { super(); this.repo = Path.join([Sys.getCwd(), "test", REPO]); @@ -33,11 +33,11 @@ class TestInstall extends TestBase { origRepo = ~/\r?\n/.split(runHaxelib(["config"]).stdout)[0]; origRepo = Path.normalize(origRepo); - + if (runHaxelib(["setup", repo]).exitCode != 0) { throw "haxelib setup failed"; } - + CWD = Sys.getCwd(); var dir = Path.join([CWD, REPO_ROOT, PROJECT_FOLDER]); Sys.setCwd(dir); @@ -47,12 +47,12 @@ class TestInstall extends TestBase { // restore original CWD: Sys.setCwd(CWD); - + if (runHaxelib(["setup", origRepo]).exitCode != 0) { throw "haxelib setup failed"; } deleteDirectory(repo); - + } //----------------- tests -------------------// @@ -61,22 +61,31 @@ class TestInstall extends TestBase { var r = runHaxelib(["install", "haxelib.json"]); assertTrue(r.exitCode == 0); - + checkLibrary(getLibraryName()); } - + public function testInstallHaxelibDependencyWithTag():Void { var r = runHaxelib(["install", "tag_haxelib.json"]); assertTrue(r.exitCode == 0); - + var lib = getLibraryName(); checkLibrary(lib); - + // if that repo "README.md" was added in tag/rev.: "0.9.3" assertFalse(FileSystem.exists(Path.join([lib, "git", "README.md"]))); } - + + public function testReinstallHxml() { + var r = runHaxelib(["install", "git-deps.hxml", "--always"]); + assertEquals(0, r.exitCode); + var r = runHaxelib(["install", "git-deps.hxml", "--always"]); + assertEquals(0, r.exitCode); + var r = runHaxelib(["path", "hx.signal"]); + assertEquals(0, r.exitCode); + } + function getLibraryName():String { var haxelibFile = File.read("haxelib.json", false); @@ -84,14 +93,14 @@ class TestInstall extends TestBase haxelibFile.close(); return details.dependencies.toArray()[0].name; } - + function checkLibrary(lib:String):Void { // Library folder exists var libFolder = Path.join([repo, lib]); assertTrue(FileSystem.exists(libFolder)); assertTrue(FileSystem.isDirectory(libFolder)); - + // Library version is set to git var current = File.read(Path.join([libFolder, ".current"]), false); assertTrue(current.readAll().toString() == "git"); diff --git a/extra/haxelib_src/test/tests/integration/TestOwner.hx b/extra/haxelib_src/test/tests/integration/TestOwner.hx new file mode 100644 index 0000000000000000000000000000000000000000..ab78daae116f47e025693c8f9b50af5190d69aa1 --- /dev/null +++ b/extra/haxelib_src/test/tests/integration/TestOwner.hx @@ -0,0 +1,65 @@ +package tests.integration; + +import haxe.io.*; +import IntegrationTests.*; +using IntegrationTests; + +class TestOwner extends IntegrationTests { + function test():Void { + { + var r = haxelib(["register", deepAuthor.user, deepAuthor.email, deepAuthor.fullname, deepAuthor.pw, deepAuthor.pw]).result(); + assertSuccess(r); + } + { + var r = haxelib(["register", anotherGuy.user, anotherGuy.email, anotherGuy.fullname, anotherGuy.pw, anotherGuy.pw]).result(); + assertSuccess(r); + } + { + var r = haxelib(["register", foo.user, foo.email, foo.fullname, foo.pw, foo.pw]).result(); + assertSuccess(r); + } + + + /* + Only the owner can submit the first version. + */ + + { + var r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libDeep.zip"]), anotherGuy.user, anotherGuy.pw]).result(); + assertFail(r); + } + + { + var r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libDeep.zip"]), deepAuthor.user, deepAuthor.pw]).result(); + assertSuccess(r); + } + + /* + Only the owner can change ownership. + */ + + { + var r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libDeep2.zip"]), anotherGuy.user, anotherGuy.pw]).result(); + assertFail(r); + } + + { + var r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libDeep2.zip"]), deepAuthor.user, deepAuthor.pw]).result(); + assertSuccess(r); + } + + /* + Only the owner can change contributors. + */ + + { + var r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libDeep3.zip"]), foo.user, foo.pw]).result(); + assertFail(r); + } + + { + var r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libDeep3.zip"]), anotherGuy.user, anotherGuy.pw]).result(); + assertSuccess(r); + } + } +} \ No newline at end of file diff --git a/extra/haxelib_src/test/tests/integration/TestPath.hx b/extra/haxelib_src/test/tests/integration/TestPath.hx new file mode 100644 index 0000000000000000000000000000000000000000..58d14c374ff2427acb0c6c8e25e0fd9d19266735 --- /dev/null +++ b/extra/haxelib_src/test/tests/integration/TestPath.hx @@ -0,0 +1,15 @@ +package tests.integration; + +import haxe.io.Path; +using IntegrationTests; + +class TestPath extends IntegrationTests { +#if !system_haxelib + function testMain():Void { + var r = haxelib(["dev", "BadHaxelibJson", Path.join([IntegrationTests.projectRoot, "test/libraries/libBadHaxelibJson"])]).result(); + assertSuccess(r); + var r = haxelib(["path", "BadHaxelibJson"]).result(); + assertFail(r); + } +#end +} \ No newline at end of file diff --git a/extra/haxelib_src/test/tests/integration/TestRun.hx b/extra/haxelib_src/test/tests/integration/TestRun.hx new file mode 100644 index 0000000000000000000000000000000000000000..c226859a5f7331ded6dfe2030bff1d91155baa76 --- /dev/null +++ b/extra/haxelib_src/test/tests/integration/TestRun.hx @@ -0,0 +1,31 @@ +package tests.integration; + +import haxe.io.Path; +using IntegrationTests; + +class TestRun extends IntegrationTests { +#if (haxe_ver >= 4.0) + function testMain():Void { + var r = haxelib(["dev", "Baz", Path.join([IntegrationTests.projectRoot, "test/libraries/libBaz"])]).result(); + assertSuccess(r); + var r = haxelib(["run", "Baz"]).result(); + assertSuccess(r); + assertEquals('Baz tools.Main script', r.out); + } + + function testMain_noValueButRunHxExists():Void { + var r = haxelib(["dev", "Bar", Path.join([IntegrationTests.projectRoot, "test/libraries/libBar"])]).result(); + assertSuccess(r); + var r = haxelib(["run", "Bar"]).result(); + assertSuccess(r); + assertEquals('Bar Run.hx script', r.out); + } +#end + function testRunN_preferredOverRunHx():Void { + var r = haxelib(["dev", "Bar2", Path.join([IntegrationTests.projectRoot, "test/libraries/libBar2"])]).result(); + assertSuccess(r); + var r = haxelib(["run", "Bar2"]).result(); + assertSuccess(r); + assertEquals('Bar2 run.n script', r.out); + } +} \ No newline at end of file diff --git a/extra/haxelib_src/www/.htaccess b/extra/haxelib_src/www/.htaccess index b9b20dd820cefc98d01aac266c66d0faf80a97a7..48acf19563fb6f45389e1f840bdf03db85cd8d06 100644 --- a/extra/haxelib_src/www/.htaccess +++ b/extra/haxelib_src/www/.htaccess @@ -4,19 +4,37 @@ DirectoryIndex index.n index.php index.html RewriteEngine On +# Redirect http to https +RewriteBase / +RewriteCond %{HTTPS} !=on +RewriteCond %{HTTP:X-Forwarded-Proto} !https +RewriteCond %{HTTP_HOST} !^localhost(:[0-9]+)?$ +RewriteCond %{REQUEST_URI} !index\.n/?$ +RewriteCond %{REQUEST_URI} !^/api/ +RewriteCond %{REQUEST_URI} !^/files/ +RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L,QSA] + # /files are stored in S3 +# for recent versions of haxelib client, which send UA, use https, and support redirection +RewriteBase / +RewriteCond %{HTTPS} =on [OR] +RewriteCond %{HTTP:X-Forwarded-Proto} =https +RewriteCond %{ENV:HAXELIB_CDN} !^$ +RewriteCond %{HTTP_USER_AGENT} !^$ +RewriteRule "^files/(.*)$" "https://%{ENV:HAXELIB_CDN}/files/$1" [L,R=302] + +# for older versions of haxelib client RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{ENV:HAXELIB_S3BUCKET} !^$ -RewriteCond %{ENV:AWS_DEFAULT_REGION} !^$ -RewriteRule "^files/(.*)$" "http://%{ENV:HAXELIB_S3BUCKET}.s3-%{ENV:AWS_DEFAULT_REGION}.amazonaws.com/files/$1" [P] +RewriteCond %{ENV:HAXELIB_CDN} !^$ +RewriteRule "^files/(.*)$" "http://%{ENV:HAXELIB_CDN}/files/$1" [P] # Rewrite rules to send Haxe remoting calls on "/" to "haxelib1/". If it matches, that's [L], the last rule - go their immediately. RewriteBase / RewriteCond %{HTTP:X-Haxe-Remoting}: 1 -RewriteRule ^index.n$ legacy/index.n [L] +RewriteRule ^index\.n$ legacy/index.n [L] # Enable rewrite for the new site's pages, only if the file or dir doesn't exist diff --git a/extra/haxelib_src/www/bower.json b/extra/haxelib_src/www/bower.json deleted file mode 100644 index 730bbc82c1035808b942601431f5490eb06300de..0000000000000000000000000000000000000000 --- a/extra/haxelib_src/www/bower.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "haxelib-server", - "homepage": "https://github.com/HaxeFoundation/haxelib", - "description": "Haxelib server", - "keywords": [ - "haxe", - "haxelib" - ], - "license": "MIT", - "private": true, - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "jquery": "^1.12.2", - "bootstrap": "^3.3.6", - "font-awesome": "^4.5.0" - } -} diff --git a/extra/haxelib_src/www/css/style.css b/extra/haxelib_src/www/css/style.css index 07a68efcc779cab2568445b38dc9617b3ae9e3c4..2aafc3655cae94283c60f5da9e6f1dbc1ec0606d 100644 --- a/extra/haxelib_src/www/css/style.css +++ b/extra/haxelib_src/www/css/style.css @@ -3,13 +3,14 @@ **/ * { margin: 0; + box-sizing:border-box; } html, body { height: 100%; } .page-wrap { margin-bottom: 0; /* equal to footer height */ - flex: 1 0 auto; + flex: 1 0 auto; } .page-wrap:after { content: ""; @@ -233,6 +234,13 @@ a.anch { } } +/** + Error page +**/ +.error-data { + white-space: pre; +} + /** Billboard / head on homepage **/ @@ -383,30 +391,35 @@ html pre, html pre code { line-height: 20px; white-space: pre; overflow-x: auto; + tab-size: 20px; } -pre, div.pre { - color: #333; - background-color: #f3f3f3; - border: 1px solid #bbb; - margin: 15px; - padding: 5px; - padding-left: 20px; +code.prettyprint { + display: block; + color: #333; + padding: 0.5em; +} +code.prettyprint .type { + color: #0086b3; } -pre .kwd, div.pre .kwd { - color: #008; +code.prettyprint .kwd { + color: #00a; } -pre .val, div.pre .val { - color: #448; +code.prettyprint .val { + color: #44a; } -pre .str, div.pre .str { - color: #800; +code.prettyprint .str, code.prettyprint .str .kwd, code.prettyprint .str .val, code.prettyprint .str .type { + color: #a00; } -pre .cmt, div.pre .cmt { - color: #080; +code.prettyprint .cmt { + color: #998; + font-style: italic; } -/* Make sure keywords inside comments are not highlighted*/ -pre .cmt .kwd, pre .cmt .str, pre .cmt .val { - color: #080; +code.prettyprint .ereg, code.prettyprint .ereg .type { + color: #f01; +} +/* Make sure keywords inside comments are not highlighted */ +code.prettyprint .cmt .kwd, code.prettyprint .cmt .str, code.prettyprint .cmt .val, code.prettyprint .cmt .type { + color: #998; } /** @@ -682,17 +695,47 @@ h2 i.fa, h3 i.fa, h4 i.fa, h5 i.fa { margin: 0; padding-left: 0; } -.breadcrumb > li:first-child { - padding-left: 0; +.panel.file-list { + margin-bottom: 20px; + border: 1px solid #ddd; + border-radius: 4px; + box-shadow: 0 1px 1px rgba(0,0,0,.05); } -pre.panel-body { - margin: 0; +.panel .btn-toolbar.pull-right { + margin-right:10px; + margin-top: 5px; +} +.panel .btn-toolbar li{ + padding-left:0; +} +.panel-disabled.panel-body { + background-color:#f5f5f5; + padding:1em 2em 2em 2em; +} + +.breadcrumb li:not(:first-child):before { + content: "/"; + display:inline-block; + padding-right: 10px; +} + +.panel-body { border: none; background: white; + width:100%; + padding:1em; +} +.panel-body pre { + border-color:#ddd; + background:#fcfcfc; } + /** Project lists. **/ .project-list small { font-weight: normal; + color:#999; + display:inline-block; + width:100px; } /** Homepage Banner **/ .section.homepage-banner { @@ -748,6 +791,17 @@ pre.panel-body { } } +.project-details table td { + padding-top:0.5em; + padding-bottom:0.5em; + word-break:break-all; +} + +.project-details table tr:first-child td { + border:0; + padding-top:0; +} + table .img-circle { max-width:none; } @@ -784,6 +838,38 @@ pre.example .comment { float:left; margin-right:10px; } -.user { - clear:both; + +.popular-libs-list .title, .popular-libs-list .title { + font-size:21px; +} + +.well form, .well .control-group { + margin:0; +} + +.file-list .dropdown-menu { + max-height: 20em; + overflow-y: auto; +} + +.file-list .list-group a { + display:block; + padding: 6px 3px; + line-height: 20px; +} +.file-list .list-group a:not(:first-child) { + border-top: 1px solid #eaecef; } +.file-list .list-group .fa { + padding-right:10px; +} +.file-list .list-group a:hover { + background:#f0f0f0; +} +.tag-list h3 a { + text-decoration:none; +} + +.description { + word-break: break-word; +} \ No newline at end of file diff --git a/extra/haxelib_src/www/documentation-files/creating-a-haxelib-package.md b/extra/haxelib_src/www/documentation-files/creating-a-haxelib-package.md index 5589f8afd0e3519eb2b7684c7b2f179fa796ed0a..1684d036b0082a56ab3b260f72371dd804c16024 100644 --- a/extra/haxelib_src/www/documentation-files/creating-a-haxelib-package.md +++ b/extra/haxelib_src/www/documentation-files/creating-a-haxelib-package.md @@ -14,8 +14,9 @@ Each Haxe library requires a `haxelib.json` file in which the following attribut * version: The version string of the library. This is detailed in [Versioning](#versioning). * classPath: The path string to the source files. * releasenote: The release notes of the current version. -* contributors: An array of user names which identify contributors to the library that are allowed to upload to haxelib. -* dependencies: An object describing the dependencies of the library. This is detailed in [Dependencies](haxelib-json-dependencies.md). +* contributors: An array of user names which identify contributors to the library that are allowed to upload to haxelib. The first user will be defined as the owner, who is the only one that can change description, url, license, contributors, and ownership (by changing who come first in contributors). +* dependencies (optional): An object describing the dependencies of the library. This is detailed in [Dependencies](#dependencies). +* main (optional): A class to run on `haxelib run libraryname` command. Relative to library root. E.g. to run `tools/Main.hx` the value should be `tools.Main`. Default value since Haxe 4: `Run` The following JSON is a simple example of a haxelib.json: @@ -33,7 +34,8 @@ The following JSON is a simple example of a haxelib.json: "dependencies": { "tink_macro": "", "nme": "3.5.5" - } + }, + "main": "tools.Main" } ``` @@ -80,6 +82,26 @@ Examples: * "1.0.0-rc.2": The 2nd release candidate for 1.0.0 * "1.0.0": The final release! + + +### Dependencies + +As of Haxe 3.1.0, haxelib supports only exact version matching for dependencies. Dependencies are defined as part of the [haxelib.json](haxelib-json.md), with the library name serving as key and the expected version (if required) as value in the format described in [Versioning](#versioning). + +We have seen an example of this when introducing haxelib.json: + +```haxe +"dependencies": { + "tink_macros": "", + "nme": "3.5.5" +} +``` + +This adds two dependencies to the given Haxe library: + +1. The library "tink_macros" can be used in any version. Haxelib will then always try to use the latest version. +2. The library "nme" is required in version "3.5.5". Haxelib will make sure that this exact version is used, avoiding potential breaking changes with future versions. + ### extraParams.hxml If you add a file named `extraParams.hxml` to your library root (at the same level as `haxelib.json`), these parameters will be automatically added to the compilation parameters when someone use your library with `-lib`. diff --git a/extra/haxelib_src/www/documentation-files/faq.md b/extra/haxelib_src/www/documentation-files/faq.md index 5be8f1bba8d29bb56ad46f671ec77b6ec98ab560..f17a9555435d5ee7ccea2bc6bd9773f344576929 100644 --- a/extra/haxelib_src/www/documentation-files/faq.md +++ b/extra/haxelib_src/www/documentation-files/faq.md @@ -1,3 +1,50 @@ # FAQ -More information to go here... + +### How do I change my password? +At the moment there is no way to change your password using the website or command-line. Please contact contact@haxe.org with the emailaddress of your account. + +--- + +### How to use `haxelib` on the command line +Check out [using haxelib](/documentation/using-haxelib/). + +--- + +### Can a project have multiple contributors? +Yes, just add multiple usernames in the contributors list (`"contributors": ["Juraj","Jason","Nicolas"],`) and make a new release. This will allow multiple users to submit. + +--- + +### How do I transfer ownership of a haxelib? +Haxelib only sees contributors, so you can add the new "owner" and remove the old one and make a new release. + +--- + +### How to make a haxelib.json file? +Check out [creating a haxelib package](/documentation/creating-a-haxelib-package/). + +--- + +### How do I validate my haxelib.json file? +If you want to be sure if the haxelib json file is correct, try using `haxelib submit`. This will validate if the data is correct. Press ctrl+c to terminate the actual submission. + +--- + +### How do I get a readme/changelog/license tab on my haxelib project page? +Add a "README.md", "CHANGELOG.md" and/or "LICENSE.md" markdown file in your zip file that is submitted. + +--- + +### Why doesn't my project have stats graph? +The project stats graph is only shown when the project has more than one release. + +--- + +### How do I remove my haxelib? +At the moment there is no way to remove a library from the registry, because this could break existing projects. If there serious issues like vulnerabilities or copyright infringements, please contact contact@haxe.orgs with the emailaddress of your account. + +--- + +### Where can I report haxelib issues? +Go to . diff --git a/extra/haxelib_src/www/documentation-files/haxelibs-in-projects.md b/extra/haxelib_src/www/documentation-files/haxelibs-in-projects.md new file mode 100644 index 0000000000000000000000000000000000000000..8bc3148f6144f550e32064701e594d2d08744726 --- /dev/null +++ b/extra/haxelib_src/www/documentation-files/haxelibs-in-projects.md @@ -0,0 +1,30 @@ +# Adding libraries to Haxe projects + +When the haxelib is installed, it is ready to be used it code. This is a matter of adding `--library libraryname` (or `-L libraryname`) to the [compiler arguments](https://haxe.org/manual/compiler-usage.html). + +``` +haxe --main Main --library libraryname --js bin/main.js +``` + +The same parameters you pass to the compiler can be stored in a [hxml file](https://haxe.org/manual/compiler-usage-hxml.html): + +``` +--main Main +--library libraryname +--js bin/main.js +``` +
+ +## Using Haxelib in OpenFL + +When using OpenFL, add `` tags in the project.xml to include Haxe libraries: + +```xml + +``` + +To specify a version: + +```xml + +``` diff --git a/extra/haxelib_src/www/documentation-files/index.md b/extra/haxelib_src/www/documentation-files/index.md index 6445b5b20ad6b495e51c44f12a4d7930fe386197..7f78691eb385d682a7941363fb8c36a995bf4f58 100644 --- a/extra/haxelib_src/www/documentation-files/index.md +++ b/extra/haxelib_src/www/documentation-files/index.md @@ -6,7 +6,7 @@ A basic Haxe library is a collection of `.hx` files. That is, libraries are dist ### Using with Haxe -Any installed Haxe library can be made available to the compiler through the `-lib ` argument. This is very similiar to the `-cp ` argument, but expects a library name instead of a directory path. These commands are explained thoroughly in [Compiler Usage](http://haxe.org/manual/compiler-usage.html). +Any installed Haxe library can be made available to the compiler through the `--library ` (or `-L `) argument. This is very similiar to the `--class-path ` argument, but expects a library name instead of a directory path. These commands are explained thoroughly in [Compiler Usage](http://haxe.org/manual/compiler-usage.html). For our exemplary usage we chose a very simple Haxe library called "random". It provides a set of static convenience methods to achieve various random effects, such as picking a random element from an array. @@ -19,6 +19,6 @@ class Main { } ``` -Compiling this without any `-lib` argument causes an error message along the lines of `Unknown identifier : Random`. This shows that installed Haxe libraries are not available to the compiler by default unless they are explicitly added. A working command line for above program is `haxe -lib random -main Main --interp`. +Compiling this without any `--library` argument causes an error message along the lines of `Unknown identifier : Random`. This shows that installed Haxe libraries are not available to the compiler by default unless they are explicitly added. A working command line for above program is `haxe --library random --main Main --interp`. If the compiler emits an error `Error: Library random is not installed : run 'haxelib install random'` the library has to be installed via the `haxelib` command first. As the error message suggests, this is achieved through `haxelib install random`. We will learn more about the `haxelib` command in [Using Haxelib](/documentation/using-haxelib/). diff --git a/extra/haxelib_src/www/documentation-files/per-project-setup.md b/extra/haxelib_src/www/documentation-files/per-project-setup.md index d8fcf99ba5d439c7bd5f8c0f4a8461b0f21ed12e..bd0306c5b009209857c9b4bbc250b7aaa6aa603c 100644 --- a/extra/haxelib_src/www/documentation-files/per-project-setup.md +++ b/extra/haxelib_src/www/documentation-files/per-project-setup.md @@ -1,7 +1,3 @@ -TODO: this needs editing and adding to the website - - - ## Per-project setup Currently haxelib has two ways to have project local setups. @@ -11,16 +7,15 @@ Currently haxelib has two ways to have project local setups. ### Using haxelib newrepo -When using `haxelib newrepo` you can have a project-local haxelib repository. This feature is quite new and a little rough around the edges. +When using `haxelib newrepo` you can have a project-local haxelib repository. Caveats: - libraries get downloaded for each project -- if you mistakenly run a haxelib command in a subdirectory of your project, it will be executed on the global repo ([to be fixed](https://github.com/HaxeFoundation/haxelib/issues/292)) ### Using haxelib install all -Haxe allows you to define specific versions of the libraries you want to use with `-lib :`. If you make sure to use this in all your hxmls, then `haxelib install all --always` (the `--always` avoiding you being prompted for confirmation) will be able to ensure the libraries your project needs are available in the necessary versions. If in fact you run this in a checkout hook, your get to track your dependencies in your git repo (some other VCSs should allow for a similar setup), allowing you to have a well defined and replicable setup for any state (commit/branch/etc.). +Haxe allows you to define specific versions of the libraries you want to use with `--library :`. If you make sure to use this in all your hxmls, then `haxelib install all --always` (the `--always` avoiding you being prompted for confirmation) will be able to ensure the libraries your project needs are available in the necessary versions. If in fact you run this in a checkout hook, your get to track your dependencies in your git repo (some other VCSs should allow for a similar setup), allowing you to have a well defined and replicable setup for any state (commit/branch/etc.). Disadvantages: @@ -32,9 +27,10 @@ Advantages: - as pointed out above, this approach allows defining a *versionable* and *replicable* state. - you don't have to download libraries for each project, which does make a difference for heavy weights like openfl and hxcpp -#### Sidestepping haxelib git issues +#### Using haxelib with git versions -Because you cannot specify git versions with `-lib` paremeters, we suggest using git submodules instead, as again they provide an adequate way of definining a *versionable* and *replicable* state. +You can specify git versions with `--library libname:git:https://github.com/user/repo#branch` branch can be a branch or a specific commit SHA. +As alternative, you might use git submodules instead, they also provide an adequate way of definining a *versionable* and *replicable* state. ### Combining both approaches diff --git a/extra/haxelib_src/www/documentation-files/using-haxelib.md b/extra/haxelib_src/www/documentation-files/using-haxelib.md index cf5251f58fb25825a0bb3a963b0d8fd653eec2ce..72bc75f9028b09c1c7a76c626b4e35da239d5b93 100644 --- a/extra/haxelib_src/www/documentation-files/using-haxelib.md +++ b/extra/haxelib_src/www/documentation-files/using-haxelib.md @@ -1,6 +1,6 @@ # Using Haxelib -If the `haxelib` command is executed without any arguments, it prints an exhaustive list of all available arguments. +If the `haxelib` command is executed without any arguments, it prints an exhaustive list of all available arguments. The following commands are available: @@ -24,6 +24,7 @@ The following commands are available:
  • user
  • config
  • path
  • +
  • libpath
  • version
  • help
  • @@ -77,98 +78,123 @@ The following commands are available: +Also, following environment variables affect haxelib behavior if set: - - -## Basic + + +# Basic -#### `haxelib install` +## haxelib install +Installs the given project. You can optionally specify a specific version to be installed. By default, latest released version will be installed. +### haxelib install [project-name] +Installs latests released version of the library. ``` -haxelib install [project-name] [version] -haxelib install actuate # Install latest version -haxelib install actuate 1.8.2 # Install specific version +haxelib install actuate ``` -> Install the given project. You can optionally specify a specific version to be installed. By default, latest released version will be installed. - +### haxelib install [project-name] [version] +Installs a specific version of the library. ``` -haxelib install [library-file] -haxelib install actuate.zip # Install from zip file +haxelib install actuate 1.8.2 ``` -> Install the project contained in the zip file. - +### haxelib install all +Install all dependencies in all hxml files ``` -haxelib install [hxml-file] -haxelib install build.hxml # Install all dependencies listed in hxml file +haxelib install all ``` -> Install all the dependencies from a hxml file. +### haxelib install [hxml-file] +Install all dependencies listed in hxml file ``` -haxelib install all # Install all dependencies in all hxml files +haxelib install build.hxml ``` -> Install all the dependencies from all hxml files in the current directory. - +### haxelib install [library-file] +Install the project contained in the zip file. +``` +haxelib install actuate.zip +``` -#### `haxelib update` +## haxelib update [project-name] +Update a single library to the latest version. ``` -haxelib update [project-name] haxelib update minject ``` -> Update a single library to the latest version. +### haxelib update +Update all the installed projects to their latest version. This command prompts a confirmation for each updating project. ``` haxelib update ``` -> Update all the installed projects to their latest version. This command prompts a confirmation for each updating project. + +## haxelib remove - +Remove a complete project or only a specified version if specified. +Note: this doesn't remove the library from the registry but from the machine it is installed on. -#### `haxelib remove` +### haxelib remove [project-name] +Remove all versions of the project ``` -haxelib remove [project-name] [version] -haxelib remove format # Remove all versions -haxelib remove format 3.1.2 # Remove the specified version +haxelib remove format ``` -> Remove a complete project or only a specified version if specified. - +### haxelib remove [project-name] [version] +Remove the specified version +``` +haxelib remove format 3.1.2 +``` -#### `haxelib list` +## haxelib list [search] + +List all the installed projects and their versions. For each project, the version surrounded by brackets is the current one. + +### haxelib list + +List all installed projects ``` -haxelib list [search] -haxelib list # List all installed projects -haxelib list ufront # List all projects with "ufront" in their name +haxelib list ``` -> List all the installed projects and their versions. For each project, the version surrounded by brackets is the current one. +### haxelib list [search] +List all projects with "ufront" in their name +``` +haxelib list ufront +``` -#### `haxelib set` +### haxelib set ``` haxelib set [project-name] [version] @@ -181,13 +207,13 @@ haxelib set tink_core 1.0.0-rc.8 -## Information +# Information -#### `haxelib search` +### haxelib search ``` haxelib search [word] @@ -200,7 +226,7 @@ haxelib search tween -#### `haxelib info` +### haxelib info ``` haxelib info [project-name] @@ -213,7 +239,7 @@ haxelib info openfl -#### `haxelib user` +### haxelib user ``` haxelib user [user-name] @@ -226,7 +252,7 @@ haxelib user jason -#### `haxelib config` +### haxelib config ``` haxelib config @@ -240,7 +266,7 @@ haxelib config -#### `haxelib path` +### haxelib path ``` haxelib path [project-name[:version]...] @@ -249,8 +275,19 @@ haxelib path hscript:2.0.0 haxelib path hscript erazor buddy haxelib path hscript erazor buddy:1.0.0 ``` +Example output : +``` +haxelib path openfl hxcpp format +--macro openfl._internal.utils.ExtraParams.include() +/usr/local/lib/haxe/lib/openfl/6.5.3/ +-D openfl=6.5.3 +/usr/local/lib/haxe/lib/hxcpp/git/ +-D hxcpp=3.4.0 +/usr/local/lib/haxe/lib/format/3,3,0/ +-D format=3.3.0 +``` -> Prints the path to one or more libraries, as well as any dependencies and compiler definitions required by those libraries. +> Prints the source paths to one or more libraries, as well as any dependencies and compiler definitions required by those libraries. > > You can specify a version by appending `:version` to the library name. If no version is specified the set version is used. > @@ -260,9 +297,36 @@ haxelib path hscript erazor buddy:1.0.0 + + +### haxelib libpath + +``` +haxelib libpath [project-name[:version]...] +haxelib libpath hscript +haxelib libpath hscript:2.0.0 +haxelib libpath hscript erazor buddy +haxelib libpath hscript erazor buddy:1.0.0 +``` +Example output : +``` +haxelib libpath hxcpp format hscript +/usr/local/lib/haxe/lib/hxcpp/git/ +/usr/local/lib/haxe/lib/format/3,3,0/ +/usr/local/lib/haxe/lib/hxcpp/2,1,1/ +``` + +> Prints the root path of one or more libraries. Will output 1 path per line. +> +> You can specify a version by appending `:version` to the library name. If no version is specified the set version is used. +> +> If a [development](#dev) version is set it'll be used even if a version is specified. + + + -#### `haxelib version` +### haxelib version ``` haxelib version @@ -276,7 +340,7 @@ haxelib version -#### `haxelib help` +### haxelib help ``` haxelib help @@ -288,18 +352,18 @@ haxelib help -## Development +# Development -#### `haxelib submit` +## haxelib submit ``` haxelib submit [project.zip] haxelib submit detox.zip -haxelib sumbit +haxelib submit ``` > Submits a zip package to Haxelib so other users can install it. @@ -316,7 +380,7 @@ haxelib sumbit -#### `haxelib register` +### haxelib register ``` haxelib register [username] [email] [fullname] [password] [passwordconfirmation] @@ -330,7 +394,7 @@ haxelib register [username] [email] [fullname] [password] [passwordconfirmation] -#### `haxelib dev` +### haxelib dev ``` haxelib dev [project-name] [directory] @@ -348,7 +412,7 @@ haxelib dev starling # Cancel dev, use installed version. -#### `haxelib git` +### haxelib git ``` haxelib git [project-name] [git-clone-path] [branch] @@ -367,7 +431,7 @@ haxelib git minject git@github.com:massiveinteractive/minject.git v2 # -#### `haxelib hg` +### haxelib hg ``` haxelib hg [project-name] [mercurial-clone-path] [branch] @@ -381,13 +445,13 @@ haxelib hg [project-name] [mercurial-clone-path] [branch] -## Miscellaneous +# Miscellaneous -#### `haxelib setup` +### haxelib setup ``` haxelib setup [path] @@ -401,7 +465,7 @@ haxelib setup [path] -#### `haxelib newrepo` +### haxelib newrepo ``` haxelib newrepo @@ -417,7 +481,7 @@ haxelib newrepo -#### `haxelib deleterepo` +### haxelib deleterepo ``` haxelib deleterepo @@ -431,7 +495,7 @@ haxelib deleterepo -#### `haxelib convertxml` +### haxelib convertxml ``` haxelib convertxml @@ -442,7 +506,7 @@ haxelib convertxml -#### `haxelib run` +### haxelib run ``` haxelib run [project-name[:version]] [parameters] @@ -461,7 +525,7 @@ haxelib run openfl create DisplayingABitmap -#### `haxelib proxy` +### haxelib proxy ``` haxelib proxy [host port [username password]] @@ -488,7 +552,7 @@ otherwise they'll be passed as arguments to the library. -#### `haxelib --flat` +### haxelib --flat ``` haxelib --flat @@ -500,7 +564,7 @@ haxelib --flat -#### `haxelib --always` +### haxelib --always ``` haxelib --always @@ -512,7 +576,7 @@ haxelib --always -#### `haxelib --system` +### haxelib --system ``` haxelib --system @@ -526,7 +590,7 @@ haxelib --system -#### `haxelib --debug` +### haxelib --debug ``` haxelib --debug @@ -538,7 +602,7 @@ haxelib --debug -#### `haxelib --quiet` +### haxelib --quiet ``` haxelib --quiet @@ -550,7 +614,7 @@ haxelib --quiet -#### `haxelib --never` +### haxelib --never ``` haxelib --never @@ -562,7 +626,7 @@ haxelib --never -#### `haxelib --global` +### haxelib --global ``` haxelib --global @@ -574,7 +638,7 @@ haxelib --global -## Parameters +# Parameters @@ -585,7 +649,7 @@ otherwise they'll be passed as arguments to the library. -#### `haxelib -cwd` +### haxelib -cwd ``` haxelib -cwd [dir] @@ -597,7 +661,7 @@ haxelib -cwd [dir] -#### `haxelib -no-timeout` +### haxelib -no-timeout ``` haxelib -no-timeout @@ -609,10 +673,25 @@ haxelib -no-timeout -#### `haxelib -R` +### haxelib -R ``` haxelib -R [host:port[/dir]] ``` > Allow the usage of a custom Haxelib server instead of `lib.haxe.org`. + + + +# Environment Variables + + + +## HAXELIB_NO_SSL + +If `HAXELIB_NO_SSL` is set to `1` or `true`, then haxelib client will use http instead of https. + +## HAXELIB_REMOTE + +`HAXELIB_REMOTE` may contain a url to a custom Haxelib server instead of `https://lib.haxe.org/`. +However, if -R command line argument is provided, then `HAXELIB_REMOTE` is ignored. \ No newline at end of file diff --git a/extra/haxelib_src/www/package-lock.json b/extra/haxelib_src/www/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..19e76d732fd17662acd17a32e41909315bb599a5 --- /dev/null +++ b/extra/haxelib_src/www/package-lock.json @@ -0,0 +1,1686 @@ +{ + "name": "haxelib-server", + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base64-js": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", + "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=", + "dev": true + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "requires": { + "readable-stream": "2.3.6", + "safe-buffer": "5.1.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz", + "integrity": "sha1-pyyTb3e5a/UvX357RnGAYoVR3vs=", + "dev": true, + "requires": { + "base64-js": "0.0.8", + "ieee754": "1.1.12", + "isarray": "1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "1.1.0", + "buffer-fill": "1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "2.1.1", + "map-obj": "1.0.1" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + } + } + }, + "caw": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", + "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", + "dev": true, + "requires": { + "get-proxy": "2.1.0", + "isurl": "1.0.0", + "tunnel-agent": "0.6.0", + "url-to-options": "1.0.1" + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "wrap-ansi": "2.1.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "commander": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", + "dev": true, + "requires": { + "graceful-readlink": "1.0.1" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "config-chain": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.11.tgz", + "integrity": "sha1-q6CXR9++TD5w52am5BWG4YWfxvI=", + "dev": true, + "requires": { + "ini": "1.3.5", + "proto-list": "1.2.4" + } + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "dev": true + }, + "copyfiles": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.0.0.tgz", + "integrity": "sha512-NSSJdwCH27/hEiBlhkXYWh3AaPo8IATxLX5XtJQgknOvOehrREtETsGd/BNr2vuj0URgKBC/50PNRM3yShQGJQ==", + "dev": true, + "requires": { + "glob": "7.1.2", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "noms": "0.0.0", + "through2": "2.0.3", + "yargs": "11.1.0" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.3", + "shebang-command": "1.2.0", + "which": "1.3.1" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "1.0.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decompress": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.0.tgz", + "integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=", + "dev": true, + "requires": { + "decompress-tar": "4.1.1", + "decompress-tarbz2": "4.1.1", + "decompress-targz": "4.1.1", + "decompress-unzip": "4.0.1", + "graceful-fs": "4.1.11", + "make-dir": "1.3.0", + "pify": "2.3.0", + "strip-dirs": "2.1.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "1.0.1" + } + }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dev": true, + "requires": { + "file-type": "5.2.0", + "is-stream": "1.1.0", + "tar-stream": "1.6.1" + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dev": true, + "requires": { + "decompress-tar": "4.1.1", + "file-type": "6.2.0", + "is-stream": "1.1.0", + "seek-bzip": "1.0.5", + "unbzip2-stream": "1.2.5" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "dev": true + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dev": true, + "requires": { + "decompress-tar": "4.1.1", + "file-type": "5.2.0", + "is-stream": "1.1.0" + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "dev": true, + "requires": { + "file-type": "3.9.0", + "get-stream": "2.3.1", + "pify": "2.3.0", + "yauzl": "2.10.0" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "dev": true, + "requires": { + "object-assign": "4.1.1", + "pinkie-promise": "2.0.1" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "download": { + "version": "6.2.5", + "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", + "integrity": "sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==", + "dev": true, + "requires": { + "caw": "2.0.1", + "content-disposition": "0.5.2", + "decompress": "4.2.0", + "ext-name": "5.0.0", + "file-type": "5.2.0", + "filenamify": "2.1.0", + "get-stream": "3.0.0", + "got": "7.1.0", + "make-dir": "1.3.0", + "p-event": "1.3.0", + "pify": "3.0.0" + } + }, + "download-cli": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/download-cli/-/download-cli-1.1.1.tgz", + "integrity": "sha512-Q8NPjnYKGYLKTzmS8QyrLz9QbDat17WKkIc21lzNxhUotsAweaSSjh1f/Lp50k1Tpc86/6ikFtGoHRrsuWFAfA==", + "dev": true, + "requires": { + "download": "6.2.5", + "meow": "3.7.0" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "dev": true, + "requires": { + "mime-db": "1.35.0" + } + }, + "ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "dev": true, + "requires": { + "ext-list": "2.2.2", + "sort-keys-length": "1.0.1" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "requires": { + "pend": "1.2.0" + } + }, + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + }, + "filename-reserved-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", + "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", + "dev": true + }, + "filenamify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", + "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", + "dev": true, + "requires": { + "filename-reserved-regex": "2.0.0", + "strip-outer": "1.0.1", + "trim-repeated": "1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-proxy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", + "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", + "dev": true, + "requires": { + "npm-conf": "1.1.3" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "requires": { + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-plain-obj": "1.1.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.1", + "p-cancelable": "0.3.0", + "p-timeout": "1.2.1", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "url-parse-lax": "1.0.0", + "url-to-options": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "1.4.2" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", + "dev": true + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "1.4.1", + "is-object": "1.0.1" + } + }, + "jquery": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-1.12.4.tgz", + "integrity": "sha1-AeHfuikP5z3rp3zurLD5ui/sngw=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "3.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "1.2.0" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "mime-db": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", + "dev": true + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "1.0.34" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.7.1", + "is-builtin-module": "1.0.0", + "semver": "5.5.0", + "validate-npm-package-license": "3.0.3" + } + }, + "npm-conf": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", + "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", + "dev": true, + "requires": { + "config-chain": "1.1.11", + "pify": "3.0.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "0.7.0", + "lcid": "1.0.0", + "mem": "1.1.0" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "p-event": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", + "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", + "dev": true, + "requires": { + "p-timeout": "1.2.1" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.3.0" + } + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "requires": { + "p-finally": "1.0.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.2" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + } + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "2.1.0", + "strip-indent": "1.0.1" + } + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "seek-bzip": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", + "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", + "dev": true, + "requires": { + "commander": "2.8.1" + } + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "dev": true, + "requires": { + "is-plain-obj": "1.1.0" + } + }, + "sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", + "dev": true, + "requires": { + "sort-keys": "1.1.2" + } + }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "3.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dev": true, + "requires": { + "is-natural-number": "4.0.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "4.0.1" + } + }, + "strip-outer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "tar-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", + "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", + "dev": true, + "requires": { + "bl": "1.2.2", + "buffer-alloc": "1.2.0", + "end-of-stream": "1.4.1", + "fs-constants": "1.0.0", + "readable-stream": "2.3.6", + "to-buffer": "1.1.1", + "xtend": "4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + } + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "dev": true, + "requires": { + "readable-stream": "2.3.6", + "xtend": "4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + } + } + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "trim-repeated": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", + "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "unbzip2-stream": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.2.5.tgz", + "integrity": "sha512-izD3jxT8xkzwtXRUZjtmRwKnZoeECrfZ8ra/ketwOcusbZEp4mjULMnJOCfTDZBgGQAAY1AJ/IgxcwkavcX9Og==", + "dev": true, + "requires": { + "buffer": "3.6.0", + "through": "2.3.8" + } + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "1.0.4" + } + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "dev": true, + "requires": { + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "dev": true, + "requires": { + "cliui": "4.1.0", + "decamelize": "1.2.0", + "find-up": "2.1.0", + "get-caller-file": "1.0.2", + "os-locale": "2.1.0", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "2.1.1", + "which-module": "2.0.0", + "y18n": "3.2.1", + "yargs-parser": "9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "4.1.0" + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "requires": { + "buffer-crc32": "0.2.13", + "fd-slicer": "1.1.0" + } + } + } +} diff --git a/extra/haxelib_src/www/package.json b/extra/haxelib_src/www/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ce9831a6e7612e10e847a929a995309c36935172 --- /dev/null +++ b/extra/haxelib_src/www/package.json @@ -0,0 +1,17 @@ +{ + "name": "haxelib-server", + "description": "Haxelib server", + "scripts": { + "postinstall": "download https://stackpath.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js --out js && download https://stackpath.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css --out css && copyfiles -f node_modules/jquery/dist/jquery.min.js js" + }, + "keywords": [], + "author": "Haxe Foundation", + "license": "MIT", + "private": true, + "devDependencies": { + "copyfiles": "^2.0.0", + "download-cli": "^1.1.1", + "jquery": "^1.12.4" + }, + "dependencies": {} +} diff --git a/extra/haxelib_src/www/robots.txt b/extra/haxelib_src/www/robots.txt index 27a4026cc864b002397e8402be430eaf3cc0a9d1..bee18f1e091eeab38e5343ff2506ff6f140bf62d 100644 --- a/extra/haxelib_src/www/robots.txt +++ b/extra/haxelib_src/www/robots.txt @@ -1,7 +1,1078 @@ User-agent: * Disallow: /api/ -Disallow: /bower_components/ Disallow: /files/ Disallow: /tmp/ Disallow: /p/*/*/files/ +Disallow: /p/*/*/raw-files/ Disallow: /p/*/*/download/ + + +# https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/blob/V3.2018.06.1119/robots.txt/robots.txt + +### Version Information # +################################################### +### Version: V3.2018.06.1119 +### Updated: Thu Jun 28 16:29:29 SAST 2018 +### Bad Bot Count: 528 +################################################### +### Version Information ## + +User-agent: * +Disallow: /wp-admin/ +Allow: /wp-admin/admin-ajax.php +User-agent: 360Spider +Disallow:/ +User-agent: 404checker +Disallow:/ +User-agent: 404enemy +Disallow:/ +User-agent: 80legs +Disallow:/ +User-agent: Abonti +Disallow:/ +User-agent: Aboundex +Disallow:/ +User-agent: Acunetix +Disallow:/ +User-agent: ADmantX +Disallow:/ +User-agent: AfD-Verbotsverfahren +Disallow:/ +User-agent: AhrefsBot +Disallow:/ +User-agent: AIBOT +Disallow:/ +User-agent: AiHitBot +Disallow:/ +User-agent: Aipbot +Disallow:/ +User-agent: Alexibot +Disallow:/ +User-agent: Alligator +Disallow:/ +User-agent: AllSubmitter +Disallow:/ +User-agent: AlphaBot +Disallow:/ +User-agent: Anarchie +Disallow:/ +User-agent: Apexoo +Disallow:/ +User-agent: ASPSeek +Disallow:/ +User-agent: Asterias +Disallow:/ +User-agent: Attach +Disallow:/ +User-agent: autoemailspider +Disallow:/ +User-agent: BackDoorBot +Disallow:/ +User-agent: Backlink-Ceck +Disallow:/ +User-agent: backlink-check +Disallow:/ +User-agent: BacklinkCrawler +Disallow:/ +User-agent: BackStreet +Disallow:/ +User-agent: BackWeb +Disallow:/ +User-agent: Badass +Disallow:/ +User-agent: Bandit +Disallow:/ +User-agent: Barkrowler +Disallow:/ +User-agent: BatchFTP +Disallow:/ +User-agent: Battleztar Bazinga +Disallow:/ +User-agent: BBBike +Disallow:/ +User-agent: BDCbot +Disallow:/ +User-agent: BDFetch +Disallow:/ +User-agent: BetaBot +Disallow:/ +User-agent: Bigfoot +Disallow:/ +User-agent: Bitacle +Disallow:/ +User-agent: Blackboard +Disallow:/ +User-agent: Black Hole +Disallow:/ +User-agent: BlackWidow +Disallow:/ +User-agent: BLEXBot +Disallow:/ +User-agent: Blow +Disallow:/ +User-agent: BlowFish +Disallow:/ +User-agent: Boardreader +Disallow:/ +User-agent: Bolt +Disallow:/ +User-agent: BotALot +Disallow:/ +User-agent: Brandprotect +Disallow:/ +User-agent: Brandwatch +Disallow:/ +User-agent: Bubing +Disallow:/ +User-agent: Buddy +Disallow:/ +User-agent: BuiltBotTough +Disallow:/ +User-agent: BuiltWith +Disallow:/ +User-agent: Bullseye +Disallow:/ +User-agent: BunnySlippers +Disallow:/ +User-agent: BuzzSumo +Disallow:/ +User-agent: Calculon +Disallow:/ +User-agent: CATExplorador +Disallow:/ +User-agent: CazoodleBot +Disallow:/ +User-agent: CCBot +Disallow:/ +User-agent: Cegbfeieh +Disallow:/ +User-agent: CheeseBot +Disallow:/ +User-agent: CherryPicker +Disallow:/ +User-agent: ChinaClaw +Disallow:/ +User-agent: Chlooe +Disallow:/ +User-agent: Claritybot +Disallow:/ +User-agent: Cliqzbot +Disallow:/ +User-agent: Cloud mapping +Disallow:/ +User-agent: coccocbot-web +Disallow:/ +User-agent: Cogentbot +Disallow:/ +User-agent: cognitiveseo +Disallow:/ +User-agent: Collector +Disallow:/ +User-agent: com.plumanalytics +Disallow:/ +User-agent: Copier +Disallow:/ +User-agent: CopyRightCheck +Disallow:/ +User-agent: Copyscape +Disallow:/ +User-agent: Cosmos +Disallow:/ +User-agent: Craftbot +Disallow:/ +User-agent: crawler4j +Disallow:/ +User-agent: crawler.feedback +Disallow:/ +User-agent: CrazyWebCrawler +Disallow:/ +User-agent: Crescent +Disallow:/ +User-agent: CSHttp +Disallow:/ +User-agent: Curious +Disallow:/ +User-agent: Custo +Disallow:/ +User-agent: DatabaseDriverMysqli +Disallow:/ +User-agent: DataCha0s +Disallow:/ +User-agent: DBLBot +Disallow:/ +User-agent: demandbase-bot +Disallow:/ +User-agent: Demon +Disallow:/ +User-agent: Deusu +Disallow:/ +User-agent: Devil +Disallow:/ +User-agent: Digincore +Disallow:/ +User-agent: DigitalPebble +Disallow:/ +User-agent: DIIbot +Disallow:/ +User-agent: Dirbuster +Disallow:/ +User-agent: Disco +Disallow:/ +User-agent: Discobot +Disallow:/ +User-agent: Discoverybot +Disallow:/ +User-agent: DittoSpyder +Disallow:/ +User-agent: DnyzBot +Disallow:/ +User-agent: DomainAppender +Disallow:/ +User-agent: DomainCrawler +Disallow:/ +User-agent: DomainSigmaCrawler +Disallow:/ +User-agent: DomainStatsBot +Disallow:/ +User-agent: Dotbot +Disallow:/ +User-agent: Download Wonder +Disallow:/ +User-agent: Dragonfly +Disallow:/ +User-agent: Drip +Disallow:/ +User-agent: DTS Agent +Disallow:/ +User-agent: EasyDL +Disallow:/ +User-agent: Ebingbong +Disallow:/ +User-agent: eCatch +Disallow:/ +User-agent: ECCP/1.0 +Disallow:/ +User-agent: Ecxi +Disallow:/ +User-agent: EirGrabber +Disallow:/ +User-agent: EMail Siphon +Disallow:/ +User-agent: EMail Wolf +Disallow:/ +User-agent: EroCrawler +Disallow:/ +User-agent: evc-batch +Disallow:/ +User-agent: Evil +Disallow:/ +User-agent: Exabot +Disallow:/ +User-agent: Express WebPictures +Disallow:/ +User-agent: ExtLinksBot +Disallow:/ +User-agent: Extractor +Disallow:/ +User-agent: ExtractorPro +Disallow:/ +User-agent: Extreme Picture Finder +Disallow:/ +User-agent: EyeNetIE +Disallow:/ +User-agent: Ezooms +Disallow:/ +User-agent: FDM +Disallow:/ +User-agent: FemtosearchBot +Disallow:/ +User-agent: FHscan +Disallow:/ +User-agent: Fimap +Disallow:/ +User-agent: Firefox/7.0 +Disallow:/ +User-agent: FlashGet +Disallow:/ +User-agent: Flunky +Disallow:/ +User-agent: Foobot +Disallow:/ +User-agent: Freeuploader +Disallow:/ +User-agent: FrontPage +Disallow:/ +User-agent: Fyrebot +Disallow:/ +User-agent: GalaxyBot +Disallow:/ +User-agent: Genieo +Disallow:/ +User-agent: GermCrawler +Disallow:/ +User-agent: Getintent +Disallow:/ +User-agent: GetRight +Disallow:/ +User-agent: GetWeb +Disallow:/ +User-agent: Gigablast +Disallow:/ +User-agent: Gigabot +Disallow:/ +User-agent: G-i-g-a-b-o-t +Disallow:/ +User-agent: Go-Ahead-Got-It +Disallow:/ +User-agent: Gotit +Disallow:/ +User-agent: GoZilla +Disallow:/ +User-agent: Go!Zilla +Disallow:/ +User-agent: Grabber +Disallow:/ +User-agent: GrabNet +Disallow:/ +User-agent: Grafula +Disallow:/ +User-agent: GrapeFX +Disallow:/ +User-agent: GrapeshotCrawler +Disallow:/ +User-agent: GridBot +Disallow:/ +User-agent: GT::WWW +Disallow:/ +User-agent: Haansoft +Disallow:/ +User-agent: HaosouSpider +Disallow:/ +User-agent: Harvest +Disallow:/ +User-agent: Havij +Disallow:/ +User-agent: HEADMasterSEO +Disallow:/ +User-agent: Heritrix +Disallow:/ +User-agent: Hloader +Disallow:/ +User-agent: HMView +Disallow:/ +User-agent: HTMLparser +Disallow:/ +User-agent: HTTP::Lite +Disallow:/ +User-agent: HTTrack +Disallow:/ +User-agent: Humanlinks +Disallow:/ +User-agent: HybridBot +Disallow:/ +User-agent: Iblog +Disallow:/ +User-agent: IDBot +Disallow:/ +User-agent: Id-search +Disallow:/ +User-agent: IlseBot +Disallow:/ +User-agent: Image Fetch +Disallow:/ +User-agent: Image Sucker +Disallow:/ +User-agent: IndeedBot +Disallow:/ +User-agent: Indy Library +Disallow:/ +User-agent: InfoNaviRobot +Disallow:/ +User-agent: InfoTekies +Disallow:/ +User-agent: instabid +Disallow:/ +User-agent: Intelliseek +Disallow:/ +User-agent: InterGET +Disallow:/ +User-agent: Internet Ninja +Disallow:/ +User-agent: InternetSeer +Disallow:/ +User-agent: internetVista monitor +Disallow:/ +User-agent: ips-agent +Disallow:/ +User-agent: Iria +Disallow:/ +User-agent: IRLbot +Disallow:/ +User-agent: Iskanie +Disallow:/ +User-agent: IstellaBot +Disallow:/ +User-agent: JamesBOT +Disallow:/ +User-agent: Jbrofuzz +Disallow:/ +User-agent: JennyBot +Disallow:/ +User-agent: JetCar +Disallow:/ +User-agent: JikeSpider +Disallow:/ +User-agent: JOC Web Spider +Disallow:/ +User-agent: Joomla +Disallow:/ +User-agent: Jorgee +Disallow:/ +User-agent: JustView +Disallow:/ +User-agent: Jyxobot +Disallow:/ +User-agent: Kenjin Spider +Disallow:/ +User-agent: Keyword Density +Disallow:/ +User-agent: Kozmosbot +Disallow:/ +User-agent: Lanshanbot +Disallow:/ +User-agent: Larbin +Disallow:/ +User-agent: LeechFTP +Disallow:/ +User-agent: LeechGet +Disallow:/ +User-agent: LexiBot +Disallow:/ +User-agent: Lftp +Disallow:/ +User-agent: LibWeb +Disallow:/ +User-agent: Libwhisker +Disallow:/ +User-agent: Lightspeedsystems +Disallow:/ +User-agent: Likse +Disallow:/ +User-agent: Linkdexbot +Disallow:/ +User-agent: LinkextractorPro +Disallow:/ +User-agent: LinkpadBot +Disallow:/ +User-agent: LinkScan +Disallow:/ +User-agent: LinksManager +Disallow:/ +User-agent: LinkWalker +Disallow:/ +User-agent: LinqiaMetadataDownloaderBot +Disallow:/ +User-agent: LinqiaRSSBot +Disallow:/ +User-agent: LinqiaScrapeBot +Disallow:/ +User-agent: Lipperhey +Disallow:/ +User-agent: Litemage_walker +Disallow:/ +User-agent: Lmspider +Disallow:/ +User-agent: LNSpiderguy +Disallow:/ +User-agent: Ltx71 +Disallow:/ +User-agent: lwp-request +Disallow:/ +User-agent: LWP::Simple +Disallow:/ +User-agent: lwp-trivial +Disallow:/ +User-agent: Magnet +Disallow:/ +User-agent: Mag-Net +Disallow:/ +User-agent: magpie-crawler +Disallow:/ +User-agent: Mail.RU_Bot +Disallow:/ +User-agent: Majestic12 +Disallow:/ +User-agent: MarkMonitor +Disallow:/ +User-agent: MarkWatch +Disallow:/ +User-agent: Masscan +Disallow:/ +User-agent: Mass Downloader +Disallow:/ +User-agent: Mata Hari +Disallow:/ +User-agent: MauiBot +Disallow:/ +User-agent: Meanpathbot +Disallow:/ +User-agent: mediawords +Disallow:/ +User-agent: MegaIndex.ru +Disallow:/ +User-agent: Metauri +Disallow:/ +User-agent: MFC_Tear_Sample +Disallow:/ +User-agent: Microsoft Data Access +Disallow:/ +User-agent: Microsoft URL Control +Disallow:/ +User-agent: MIDown tool +Disallow:/ +User-agent: MIIxpc +Disallow:/ +User-agent: Mister PiX +Disallow:/ +User-agent: MJ12bot +Disallow:/ +User-agent: Mojeek +Disallow:/ +User-agent: Morfeus Fucking Scanner +Disallow:/ +User-agent: Mr.4x3 +Disallow:/ +User-agent: MSFrontPage +Disallow:/ +User-agent: MSIECrawler +Disallow:/ +User-agent: Msrabot +Disallow:/ +User-agent: MS Web Services Client Protocol +Disallow:/ +User-agent: muhstik-scan +Disallow:/ +User-agent: Musobot +Disallow:/ +User-agent: Name Intelligence +Disallow:/ +User-agent: Nameprotect +Disallow:/ +User-agent: Navroad +Disallow:/ +User-agent: NearSite +Disallow:/ +User-agent: Needle +Disallow:/ +User-agent: Nessus +Disallow:/ +User-agent: NetAnts +Disallow:/ +User-agent: Netcraft +Disallow:/ +User-agent: netEstate NE Crawler +Disallow:/ +User-agent: NetLyzer +Disallow:/ +User-agent: NetMechanic +Disallow:/ +User-agent: NetSpider +Disallow:/ +User-agent: Nettrack +Disallow:/ +User-agent: Net Vampire +Disallow:/ +User-agent: Netvibes +Disallow:/ +User-agent: NetZIP +Disallow:/ +User-agent: NextGenSearchBot +Disallow:/ +User-agent: Nibbler +Disallow:/ +User-agent: NICErsPRO +Disallow:/ +User-agent: Niki-bot +Disallow:/ +User-agent: Nikto +Disallow:/ +User-agent: NimbleCrawler +Disallow:/ +User-agent: Ninja +Disallow:/ +User-agent: Nmap +Disallow:/ +User-agent: NPbot +Disallow:/ +User-agent: Nutch +Disallow:/ +User-agent: oBot +Disallow:/ +User-agent: Octopus +Disallow:/ +User-agent: Offline Explorer +Disallow:/ +User-agent: Offline Navigator +Disallow:/ +User-agent: Openfind +Disallow:/ +User-agent: OpenLinkProfiler +Disallow:/ +User-agent: Openvas +Disallow:/ +User-agent: OrangeBot +Disallow:/ +User-agent: OrangeSpider +Disallow:/ +User-agent: OutclicksBot +Disallow:/ +User-agent: OutfoxBot +Disallow:/ +User-agent: PageAnalyzer +Disallow:/ +User-agent: Page Analyzer +Disallow:/ +User-agent: PageGrabber +Disallow:/ +User-agent: page scorer +Disallow:/ +User-agent: PageScorer +Disallow:/ +User-agent: Panscient +Disallow:/ +User-agent: Papa Foto +Disallow:/ +User-agent: Pavuk +Disallow:/ +User-agent: pcBrowser +Disallow:/ +User-agent: PECL::HTTP +Disallow:/ +User-agent: PeoplePal +Disallow:/ +User-agent: PHPCrawl +Disallow:/ +User-agent: Picscout +Disallow:/ +User-agent: Picsearch +Disallow:/ +User-agent: PictureFinder +Disallow:/ +User-agent: Pimonster +Disallow:/ +User-agent: Pi-Monster +Disallow:/ +User-agent: Pixray +Disallow:/ +User-agent: PleaseCrawl +Disallow:/ +User-agent: plumanalytics +Disallow:/ +User-agent: Pockey +Disallow:/ +User-agent: POE-Component-Client-HTTP +Disallow:/ +User-agent: Probethenet +Disallow:/ +User-agent: ProPowerBot +Disallow:/ +User-agent: ProWebWalker +Disallow:/ +User-agent: Psbot +Disallow:/ +User-agent: Pump +Disallow:/ +User-agent: PxBroker +Disallow:/ +User-agent: PyCurl +Disallow:/ +User-agent: QueryN Metasearch +Disallow:/ +User-agent: Quick-Crawler +Disallow:/ +User-agent: RankActive +Disallow:/ +User-agent: RankActiveLinkBot +Disallow:/ +User-agent: RankFlex +Disallow:/ +User-agent: RankingBot +Disallow:/ +User-agent: RankingBot2 +Disallow:/ +User-agent: Rankivabot +Disallow:/ +User-agent: RankurBot +Disallow:/ +User-agent: RealDownload +Disallow:/ +User-agent: Reaper +Disallow:/ +User-agent: RebelMouse +Disallow:/ +User-agent: Recorder +Disallow:/ +User-agent: RedesScrapy +Disallow:/ +User-agent: ReGet +Disallow:/ +User-agent: RepoMonkey +Disallow:/ +User-agent: Ripper +Disallow:/ +User-agent: RocketCrawler +Disallow:/ +User-agent: Rogerbot +Disallow:/ +User-agent: SalesIntelligent +Disallow:/ +User-agent: SBIder +Disallow:/ +User-agent: ScanAlert +Disallow:/ +User-agent: Scanbot +Disallow:/ +User-agent: scan.lol +Disallow:/ +User-agent: Scrapy +Disallow:/ +User-agent: Screaming +Disallow:/ +User-agent: ScreenerBot +Disallow:/ +User-agent: Searchestate +Disallow:/ +User-agent: SearchmetricsBot +Disallow:/ +User-agent: Semrush +Disallow:/ +User-agent: SemrushBot +Disallow:/ +User-agent: SEOkicks +Disallow:/ +User-agent: SEOlyticsCrawler +Disallow:/ +User-agent: Seomoz +Disallow:/ +User-agent: SEOprofiler +Disallow:/ +User-agent: seoscanners +Disallow:/ +User-agent: SEOstats +Disallow:/ +User-agent: sexsearcher +Disallow:/ +User-agent: Seznam +Disallow:/ +User-agent: SeznamBot +Disallow:/ +User-agent: Shodan +Disallow:/ +User-agent: Siphon +Disallow:/ +User-agent: SISTRIX +Disallow:/ +User-agent: Sitebeam +Disallow:/ +User-agent: SiteExplorer +Disallow:/ +User-agent: Siteimprove +Disallow:/ +User-agent: SiteLockSpider +Disallow:/ +User-agent: SiteSnagger +Disallow:/ +User-agent: SiteSucker +Disallow:/ +User-agent: Site Sucker +Disallow:/ +User-agent: Sitevigil +Disallow:/ +User-agent: Slackbot-LinkExpanding +Disallow:/ +User-agent: SlySearch +Disallow:/ +User-agent: SmartDownload +Disallow:/ +User-agent: SMTBot +Disallow:/ +User-agent: Snake +Disallow:/ +User-agent: Snapbot +Disallow:/ +User-agent: Snoopy +Disallow:/ +User-agent: SocialRankIOBot +Disallow:/ +User-agent: Sogou web spider +Disallow:/ +User-agent: Sosospider +Disallow:/ +User-agent: Sottopop +Disallow:/ +User-agent: SpaceBison +Disallow:/ +User-agent: Spammen +Disallow:/ +User-agent: SpankBot +Disallow:/ +User-agent: Spanner +Disallow:/ +User-agent: Spbot +Disallow:/ +User-agent: Spinn3r +Disallow:/ +User-agent: SputnikBot +Disallow:/ +User-agent: Sqlmap +Disallow:/ +User-agent: Sqlworm +Disallow:/ +User-agent: Sqworm +Disallow:/ +User-agent: Steeler +Disallow:/ +User-agent: Stripper +Disallow:/ +User-agent: Sucker +Disallow:/ +User-agent: Sucuri +Disallow:/ +User-agent: SuperBot +Disallow:/ +User-agent: SuperHTTP +Disallow:/ +User-agent: Surfbot +Disallow:/ +User-agent: SurveyBot +Disallow:/ +User-agent: Suzuran +Disallow:/ +User-agent: Swiftbot +Disallow:/ +User-agent: sysscan +Disallow:/ +User-agent: Szukacz +Disallow:/ +User-agent: T0PHackTeam +Disallow:/ +User-agent: T8Abot +Disallow:/ +User-agent: tAkeOut +Disallow:/ +User-agent: Teleport +Disallow:/ +User-agent: TeleportPro +Disallow:/ +User-agent: Telesoft +Disallow:/ +User-agent: Telesphoreo +Disallow:/ +User-agent: Telesphorep +Disallow:/ +User-agent: The Intraformant +Disallow:/ +User-agent: TheNomad +Disallow:/ +User-agent: TightTwatBot +Disallow:/ +User-agent: Titan +Disallow:/ +User-agent: Toata +Disallow:/ +User-agent: Toweyabot +Disallow:/ +User-agent: Trendiction +Disallow:/ +User-agent: Trendictionbot +Disallow:/ +User-agent: trendiction.com +Disallow:/ +User-agent: trendiction.de +Disallow:/ +User-agent: True_Robot +Disallow:/ +User-agent: Turingos +Disallow:/ +User-agent: Turnitin +Disallow:/ +User-agent: TurnitinBot +Disallow:/ +User-agent: TwengaBot +Disallow:/ +User-agent: Twice +Disallow:/ +User-agent: Typhoeus +Disallow:/ +User-agent: UnisterBot +Disallow:/ +User-agent: URLy.Warning +Disallow:/ +User-agent: URLy Warning +Disallow:/ +User-agent: Vacuum +Disallow:/ +User-agent: Vagabondo +Disallow:/ +User-agent: VB Project +Disallow:/ +User-agent: VCI +Disallow:/ +User-agent: VeriCiteCrawler +Disallow:/ +User-agent: VidibleScraper +Disallow:/ +User-agent: Virusdie +Disallow:/ +User-agent: VoidEYE +Disallow:/ +User-agent: Voil +Disallow:/ +User-agent: Voltron +Disallow:/ +User-agent: Wallpapers/3.0 +Disallow:/ +User-agent: WallpapersHD +Disallow:/ +User-agent: WASALive-Bot +Disallow:/ +User-agent: WBSearchBot +Disallow:/ +User-agent: Webalta +Disallow:/ +User-agent: WebAuto +Disallow:/ +User-agent: Web Auto +Disallow:/ +User-agent: WebBandit +Disallow:/ +User-agent: WebCollage +Disallow:/ +User-agent: Web Collage +Disallow:/ +User-agent: WebCopier +Disallow:/ +User-agent: WEBDAV +Disallow:/ +User-agent: WebEnhancer +Disallow:/ +User-agent: Web Enhancer +Disallow:/ +User-agent: WebFetch +Disallow:/ +User-agent: Web Fetch +Disallow:/ +User-agent: WebFuck +Disallow:/ +User-agent: Web Fuck +Disallow:/ +User-agent: WebGo IS +Disallow:/ +User-agent: WebImageCollector +Disallow:/ +User-agent: WebLeacher +Disallow:/ +User-agent: WebmasterWorldForumBot +Disallow:/ +User-agent: webmeup-crawler +Disallow:/ +User-agent: WebPix +Disallow:/ +User-agent: Web Pix +Disallow:/ +User-agent: WebReaper +Disallow:/ +User-agent: WebSauger +Disallow:/ +User-agent: Web Sauger +Disallow:/ +User-agent: Webshag +Disallow:/ +User-agent: WebsiteExtractor +Disallow:/ +User-agent: WebsiteQuester +Disallow:/ +User-agent: Website Quester +Disallow:/ +User-agent: Webster +Disallow:/ +User-agent: WebStripper +Disallow:/ +User-agent: WebSucker +Disallow:/ +User-agent: Web Sucker +Disallow:/ +User-agent: WebWhacker +Disallow:/ +User-agent: WebZIP +Disallow:/ +User-agent: WeSEE +Disallow:/ +User-agent: Whack +Disallow:/ +User-agent: Whacker +Disallow:/ +User-agent: Whatweb +Disallow:/ +User-agent: Who.is Bot +Disallow:/ +User-agent: Widow +Disallow:/ +User-agent: WinHTTrack +Disallow:/ +User-agent: WiseGuys Robot +Disallow:/ +User-agent: WISENutbot +Disallow:/ +User-agent: Wonderbot +Disallow:/ +User-agent: Woobot +Disallow:/ +User-agent: Wotbox +Disallow:/ +User-agent: Wprecon +Disallow:/ +User-agent: WPScan +Disallow:/ +User-agent: WWW-Collector-E +Disallow:/ +User-agent: WWW-Mechanize +Disallow:/ +User-agent: WWW::Mechanize +Disallow:/ +User-agent: WWWOFFLE +Disallow:/ +User-agent: x09Mozilla +Disallow:/ +User-agent: x22Mozilla +Disallow:/ +User-agent: Xaldon_WebSpider +Disallow:/ +User-agent: Xaldon WebSpider +Disallow:/ +User-agent: Xenu +Disallow:/ +User-agent: xpymep1.exe +Disallow:/ +User-agent: YoudaoBot +Disallow:/ +User-agent: Zade +Disallow:/ +User-agent: Zauba +Disallow:/ +User-agent: zauba.io +Disallow:/ +User-agent: Zermelo +Disallow:/ +User-agent: Zeus +Disallow:/ +User-agent: zgrab +Disallow:/ +User-agent: Zitebot +Disallow:/ +User-agent: ZmEu +Disallow:/ +User-agent: ZumBot +Disallow:/ +User-agent: ZyBorg +Disallow:/ diff --git a/extra/haxelib_src/www/view/home/homepage.html b/extra/haxelib_src/www/view/home/homepage.html index d2b11ddd48e0f55529d43eb2c4bdf7e9a4a4bfc9..eefb07fd16508ea7e18cfac749f30f223cb0a2ac 100644 --- a/extra/haxelib_src/www/view/home/homepage.html +++ b/extra/haxelib_src/www/view/home/homepage.html @@ -7,13 +7,13 @@

    @@ -26,92 +26,97 @@

    - -
    - -
    -
    -

    Popular tags

    - + }
    -
    -

    Recently updated

    -
    - @for( update in latestProjects ) { + } +
    + + See more recent updates + +
    + +

    Popular libraries

    + -
    -

    Popular contributors

    -
    - @for( u in users ) { + } +
    + + See all haxelibs +
    + +

    Popular contributors

    +
    +
    + @for( i in 0...4) { +
    + @for( u in users(i*4, 4) ) { + @if (u != null){

    - Avatar of @u.user.name + Avatar of @u.user.name @u.user.fullname
    (@u.projects.length projects)

    } + }
    -
    - -
    - -
    - -

    Many libraries are just one haxelib install away. This example demonstrates some of all haxelib commands.

    - -
    @exampleCode
    - -
    -
    -
    -
    -
    - -
    -
    -

    All libraries are free

    -

    Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. - Enjoy Haxe; It is great!

    -
    -
    -

    Explore Haxe

    -

    -

    Haxe Manual

    -

    Haxe Code Cookbook

    -

    Haxe API documentation

    -

    You can try Haxe in the browser! try.haxe.org

    -

    -
    -
    -

    Join us on Github!

    -

    Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

    -

    Haxe on Github

    + }
    + See all contributors + +
    + +

    Many libraries are just one haxelib install away. This example demonstrates some of all haxelib commands.

    + +
    @exampleCode
    +
    - - -
    \ No newline at end of file diff --git a/extra/haxelib_src/www/view/home/projectList.html b/extra/haxelib_src/www/view/home/projectList.html index 9121cbcd566bb3bfe53ede0dd4511e909eb0421a..c181af9ca6983bd23f5faf00aab2a0f6dbef8e1a 100644 --- a/extra/haxelib_src/www/view/home/projectList.html +++ b/extra/haxelib_src/www/view/home/projectList.html @@ -1,6 +1,18 @@

    @title

    @description

    +
    + +
    + @@ -18,7 +30,7 @@
    @@@p.author - + } diff --git a/extra/haxelib_src/www/view/home/recent.html b/extra/haxelib_src/www/view/home/recent.html new file mode 100644 index 0000000000000000000000000000000000000000..25a3f8099b1c8f5d83ba76087f0c34950a0fa064 --- /dev/null +++ b/extra/haxelib_src/www/view/home/recent.html @@ -0,0 +1,39 @@ +

    Latest updates

    +

    @description

    + +
    + +
    +
    + + + +
    +
    + +
    + +@{ var prevDate = null;} +
    @p.description@p.version@p.version.name
    @formatDate(p.version.date)
    @p.downloads
    +@for (update in projects) { + @{ var curDate = formatDate(update.v.date); } + @if(prevDate != curDate) { + + + + + + + } + + + + + + + @{prevDate = curDate;} +} +

    @curDate

    ProjectChangesVersion
    + @update.p.name + + @if (update.v.comments != null && update.v.comments.length > 0){@escape(update.v.comments)}@update.v.name
    @formatDate(update.v.date, true)
    diff --git a/extra/haxelib_src/www/view/home/search.html b/extra/haxelib_src/www/view/home/search.html index 133421e9bbbfe276b4d25c012b90ee8c6f3a9834..d5a2efda2bda10e7cbe1048d8ebe4ac59008e379 100644 --- a/extra/haxelib_src/www/view/home/search.html +++ b/extra/haxelib_src/www/view/home/search.html @@ -1,19 +1,18 @@

    @title

    - - - - -

    @description

    +
    + +
    + @if (projects!=null && projects.length>0) { @@ -32,7 +31,7 @@
    (By @@@p.author) - + } @@ -41,8 +40,7 @@ } else if (projects!=null && projects.length==0) { -

    No search results found.

    -
    +

    No search results found.

    }
    @@ -53,4 +51,7 @@ else if (projects!=null && projects.length==0) {


    -
    + +@if (projects!=null && projects.length==0) { +

     

    +} diff --git a/extra/haxelib_src/www/view/home/tagList.html b/extra/haxelib_src/www/view/home/tagList.html index 59f069d7111e2844e33255072a33e79eb33a040f..81e2697b49e51980afc14d3cb5fe0326faf41cc8 100644 --- a/extra/haxelib_src/www/view/home/tagList.html +++ b/extra/haxelib_src/www/view/home/tagList.html @@ -1,21 +1,51 @@ +

    @title

    +

    @description

    +
    + +
    +
    + + + +
    +
    + +
    +

    All Tags

    -

    @title

    -

    @description

    -
    - @for (t in tagCloud) { - @escape(t.tag) +
    + @for (i in 0...min(tags.length, 10)) { + @{var t = tags[i];} +

    @escape(t.tag)

    +
    + @for( i in 0...3) { +
    + @for( p in taggedProjects(t.tag, i * 3, 3) ) { +

    + @p.name
    + + @p.version.name  updated @formatDate(p.version.date) + +

    + } +
    + } +
    + More haxelibs tagged with "@escape(t.tag)" (@t.count) +
    }
    + \ No newline at end of file diff --git a/extra/haxelib_src/www/view/home/tagProjectList.html b/extra/haxelib_src/www/view/home/tagProjectList.html index 8684d1f3fffd53fcc8671f4b88daf60b815c9bd4..eb1d675e7fb65e1712a5ed434f3eb954e74c8bed 100644 --- a/extra/haxelib_src/www/view/home/tagProjectList.html +++ b/extra/haxelib_src/www/view/home/tagProjectList.html @@ -1,4 +1,19 @@ +

    Tagged with @currentTag

    +

    @description

    + +
    + +
    +
    + + + +
    +
    + +
    +

    All Tags

    @@ -9,8 +24,6 @@
    -

    Tagged with @currentTag

    -

    @description

    @p.description@p.version@p.version.name
    @formatDate(p.version.date)
    @p.downloads
    @@ -29,7 +42,7 @@
    @@@p.author - + } diff --git a/extra/haxelib_src/www/view/layout.html b/extra/haxelib_src/www/view/layout.html index f9648efa8df53fb3fe9c62363c7feaec0d1af496..bc23baeb3fdbde3f05bb6a86add90cf0f08576f8 100644 --- a/extra/haxelib_src/www/view/layout.html +++ b/extra/haxelib_src/www/view/layout.html @@ -5,34 +5,34 @@ @title - + - - - + + + - - - + + + - + - - + + - + - - + + @@ -41,62 +41,75 @@ + +
    @if( useWrapper ) { @@ -111,19 +124,47 @@ }
    +
    +
    + +
    +
    +

    All libraries are free

    +

    Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. + Enjoy Haxe; It is great!

    +
    +
    +

    Explore Haxe

    +

    +

    Haxe Manual

    +

    Haxe Code Cookbook

    +

    Haxe API documentation

    +

    You can try Haxe in the browser! try.haxe.org

    +

    +
    +
    +

    Join us on GitHub!

    +

    Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

    +

    Haxe on GitHub

    +
    +
    +
    +
    + - - - + + + diff --git a/extra/haxelib_src/www/view/project/file.html b/extra/haxelib_src/www/view/project/file.html index 2998406898a1a3b0bff105577648953b94973e16..e5e4be1b0751f9eed577bbe198ba81a1800f32b6 100644 --- a/extra/haxelib_src/www/view/project/file.html +++ b/extra/haxelib_src/www/view/project/file.html @@ -1,11 +1,19 @@ -

    @project @version

    -

    @info.desc

    -
    +
    +

    @project

    +

    @info.desc
    @info.website

    +
    + + + +
    - @if( type=="text" && extension=="hx" ) { View API Docs } - @if( type!="directory" ) { Download } + @if( type!="directory" && (type=="text" || type=="markdown" || type=="img")) { Download }
    - @if ( type=="directory" ) { - - -
    - @for (dir in dirListing) { @dir/ } - @for (file in fileListing) { @file } -
    - } - else if ( type=="text" ) { - -
    @fileContent
    - - - } - else if ( type=="markdown" ) { -
    - @fileContent -
    - } - else if ( type=="img" ) { - -
    - Viewing image @filename... sorry we don't have a better description -
    - } - else { - - - } + @if ( type=="directory" ) { +
    + +
    + @for (dir in dirListing) { @dir/ } + @for (file in fileListing) { @file} +
    +
    + } + else if ( type=="text" ) { +
    +

    @fileParts[fileParts.length-1]

    + +
    @fileContent
    + +
    + } + else if ( type=="markdown" ) { +
    @fileContent
    + } + else if ( type=="img" ) { +
    +

    @fileParts[fileParts.length-1]

    + + @filename +
    + } + else { +
    +

    @fileParts[fileParts.length-1]

    +

    This file cannot be viewed

    + + Download @filename (@size) +
    + } +
    diff --git a/extra/haxelib_src/www/view/project/version.html b/extra/haxelib_src/www/view/project/version.html index 7c3518423fded662c197b10c145619d9cc511d46..82487b3fa5bc4a820201c1e25f339e4907779544 100644 --- a/extra/haxelib_src/www/view/project/version.html +++ b/extra/haxelib_src/www/view/project/version.html @@ -1,66 +1,150 @@ +
    +

    @project

    +

    @info.desc
    @info.website

    +
    - +
    - - -

    @project @version

    -

    @info.desc

    -

    Released @versionDate.

    - - -

    + + @if (false) {} + @if( version!=info.curversion ) { +

    This is not the latest stable version of @project. See version @info.curversion for the latest version.

    + } + + @if (false) {}

    To install, run:

    -
    haxelib install @project @version
    +
    haxelib install @project @version 

    See using Haxelib in Haxelib documentation for more information.

    +
    - - + - -

    - @if( version!=info.curversion ) { -

    This is not the latest stable version of @project. See version @info.curversion for the latest version.

    + @if (type == "readme") { + @if (false) {} + @if (hasReadme) { +
    +
    +

    README.md

    +
    +
    + @readme +
    +
    + } + } + + @if (type == "releasenotes") { +
    + @if (hasReleaseNotes) { +

    @project @version Release notes

    +

    @escape(releaseNotes)

    + } +
    + } + + @if (type == "changelog") { + @if (false) {} + @if (hasChangelog) { +
    +
    +

    CHANGELOG.md

    +
    +
    + @changelog +
    +
    + } + } + + + @if (type == "license") { + @if (false) {} + @if (hasLicense) { +
    +
    +

    LICENSE.md

    +
    +
    + @license +
    +
    + } } -
    - - -
    + @if (false) {} +
    @p.description@p.version@p.version.name @p.downloads
    - - - - + + - - - + + + + + @if (dependencies.length > 0) { + + + + } + + + + @if (info.tags != null && info.tags.length > 0) { - + + + } + +
    Maintainer@info.owner
    Website@info.website
    + Contributors
    +
    - + @for(d in info.contributors) { + @d.name
    + }
    Current version@info.curversion
    StatisticsInstalled @info.downloads times
    License@info.license
    Version
    @version
    Published
    @formatDate(versionDate)
    + Dependencies +
      + @for (dep in dependencies) { + @if (dep.version != null) { +
    • @dep.name (@dep.version)
    • + } + else { +
    • @dep.name
    • + } + } +
    +
    License
    @info.license
    Tags +
      + @for( t in info.tags ) { +
    • @t
    • + } +
    +
    @@ -69,28 +153,29 @@
    -
    +@if (info.website.indexOf("github.com") > -1) { +@{var githubInfo = info.website.split("github.com/").pop().split("/");} +@{var githubUser = githubInfo[0];} +@{var githubRepo = githubInfo[1];} + } + + diff --git a/extra/haxelib_src/www/view/project/versionList.html b/extra/haxelib_src/www/view/project/versionList.html index 3404d05ec2b49cb5dc6fa1581028b7e5c069b1fd..a8368d9a8efa888498303b8d1d8487a8032b2afa 100644 --- a/extra/haxelib_src/www/view/project/versionList.html +++ b/extra/haxelib_src/www/view/project/versionList.html @@ -1,21 +1,70 @@ +
    -

    @project All Versions

    -

    @info.desc

    - -

    -

    @info.website

    +

    @project

    +

    @info.desc
    @info.website

    + + +@if (allVersions.length > 1) { +
    + + + +} + - + - - + + @@ -23,19 +72,13 @@ - - - - - - - }
    VersionVersion Release NotesInstallDownloadsInstallDownloads
    @v.name -
    @v.date.substr(0,10) +
    @formatDate(v.date)
    @escape(v.comments) haxelib install @project @v.name @v.downloads
    + \ No newline at end of file diff --git a/extra/haxelib_src/www/view/user/list.html b/extra/haxelib_src/www/view/user/list.html index 2d0cdf1e94e88424efc0ef1cace730b75aa2ce1b..f55a99ba126d6c2ea1e916a1f6cb371a4df75c2c 100644 --- a/extra/haxelib_src/www/view/user/list.html +++ b/extra/haxelib_src/www/view/user/list.html @@ -1,6 +1,6 @@

    @title

    - +
    @@ -8,7 +8,7 @@ - @for (u in list) { + @for (u in list) { diff --git a/extra/haxelib_src/www/view/user/profile.html b/extra/haxelib_src/www/view/user/profile.html index 72ac08bb0de344c48b2fb63f6ae6d367bbf46c22..9e775a47f53a98d304d1c9c9de5575dbe12abcf6 100644 --- a/extra/haxelib_src/www/view/user/profile.html +++ b/extra/haxelib_src/www/view/user/profile.html @@ -1,3 +1,7 @@ + +
    User
    Avatar of @u.user.name @u.user.name
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ConstantDescription
    CSS_ATTRThe value is an attr() function. The value can be obtained by using the getStringValue() method.
    CSS_CMThe value is a length in centimeters. The value can be obtained by using the getFloatValue() method.
    CSS_COUNTERThe value is a counter or counters function. The value can be obtained by using the getCounterValue() method.
    CSS_DEGThe value is an angle in degrees. The value can be obtained by using the getFloatValue() method.
    CSS_DIMENSIONThe value is a number with an unknown dimension. The value can be obtained by using the getFloatValue() method.
    CSS_EMSThe value is a length in em units. The value can be obtained by using the getFloatValue() method.
    CSS_EXSThe value is a length in ex units. The value can be obtained by using the getFloatValue() method.
    CSS_GRADThe value is an angle in grads. The value can be obtained by using the getFloatValue() method.
    CSS_HZThe value is a frequency in Hertz. The value can be obtained by using the getFloatValue method.
    CSS_IDENTThe value is an identifier. The value can be obtained by using the getStringValue() method.
    CSS_INThe value is a length in inches. The value can be obtained by using the getFloatValue() method.
    CSS_KHZThe value is a frequency in Kilohertz. The value can be obtained by using the getFloatValue() method.
    CSS_MMThe value is a length in millimeters. The value can be obtained by using the getFloatValue() method.
    CSS_MSThe value is a time in milliseconds. The value can be obtained by using the getFloatValue() method.
    CSS_NUMBERThe value is a simple number. The value can be obtained by using the getFloatValue() method.
    CSS_PCThe value is a length in picas. The value can be obtained by using the getFloatValue() method.
    CSS_PERCENTAGEThe value is a percentage. The value can be obtained by using the getFloatValue() method.
    CSS_PTThe value is a length in points. The value can be obtained by using the getFloatValue() method.
    CSS_PXThe value is a length in pixels. The value can be obtained by using the getFloatValue() method.
    CSS_RADThe value is an angle in radians. The value can be obtained by using the getFloatValue() method.
    CSS_RECTThe value is a shape function. The value can be obtained by using the getRectValue() method.
    CSS_RGBCOLORThe value is an color. The value can be obtained by using the getRGBColorValue() method.
    CSS_SThe value is a time in seconds. The value can be obtained by using the getFloatValue() method.
    CSS_STRINGThe value is a string. The value can be obtained by using the getStringValue() method.
    CSS_UNKNOWNThe value is not a recognized CSS2 value. The value can only be obtained by using the CSSValue.cssText attribute.
    CSS_URIThe value is a uri. The value can be obtained by using the getStringValue() method.
    - - **/ - var primitiveType(default,null) : Int; - - /** @throws DOMError */ - - /** - A method to set the float value with a specified unit. If the property attached with this value can not accept the specified unit or the float value, the value will be unchanged and a `DOMException` will be raised. - **/ - function setFloatValue( unitType : Int, floatValue : Float ) : Void; - /** @throws DOMError */ - - /** - This method is used to get a float value in a specified unit. If this CSS value doesn't contain a float value or can't be converted into the specified unit, a `DOMException` is raised. - **/ - function getFloatValue( unitType : Int ) : Float; - /** @throws DOMError */ - - /** - A method to set the string value with the specified unit. If the property attached to this value can't accept the specified unit or the string value, the value will be unchanged and a `DOMException` will be raised. - **/ - function setStringValue( stringType : Int, stringValue : String ) : Void; - /** @throws DOMError */ - - /** - This method is used to get the string value. If the CSS value doesn't contain a string value, a `DOMException` is raised. - **/ - function getStringValue() : String; - /** @throws DOMError */ - - /** - This method is used to get the counter value. If this CSS value doesn't contain a counter value, a `DOMException` is raised. Modification to the corresponding style property can be achieved using the `Counter` interface. - **/ - function getCounterValue() : Dynamic/*MISSING Counter*/; - /** @throws DOMError */ - - /** - This method is used to get the Rect value. If this CSS value doesn't contain a rect value, a `DOMException` is raised. Modification to the corresponding style property can be achieved using the `Rect` interface. - **/ - function getRectValue() : Rect; - /** @throws DOMError */ - - /** - This method is used to get the RGB color. If this CSS value doesn't contain a RGB color value, a `DOMException` is raised. Modification to the corresponding style property can be achieved using the `RGBColor` interface. - **/ - function getRGBColorValue() : RGBColor; -} \ No newline at end of file diff --git a/std/js/html/CSSPseudoElement.hx b/std/js/html/CSSPseudoElement.hx index 5a72edc0592b6f1d9e556767c6731af6b4c6e603..0ac3c8ea81fc4d63a820511f151cf4a0421f00c2 100644 --- a/std/js/html/CSSPseudoElement.hx +++ b/std/js/html/CSSPseudoElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,12 +25,12 @@ package js.html; @:native("CSSPseudoElement") -extern class CSSPseudoElement -{ +extern class CSSPseudoElement { var type(default,null) : String; var parentElement(default,null) : Element; /** @throws DOMError */ - function animate( frames : Dynamic, ?options : haxe.extern.EitherType ) : Animation; - function getAnimations() : Array; + @:overload( function( keyframes : Dynamic, ?options : KeyframeAnimationOptions) : Animation {} ) + function animate( keyframes : Dynamic, ?options : Float ) : Animation; + function getAnimations( ?filter : AnimationFilter ) : Array; } \ No newline at end of file diff --git a/std/js/html/CSSRule.hx b/std/js/html/CSSRule.hx index fefc8aab81d104913bb5658e4e99e3719590b290..acd7e888538a7a7996b60c09747acca0ad5cf4d2 100644 --- a/std/js/html/CSSRule.hx +++ b/std/js/html/CSSRule.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,7 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from cssrule.webidl. Do not edit! +// This file is generated from mozilla\CSSRule.webidl. Do not edit! package js.html; @@ -32,19 +32,23 @@ package js.html; @see **/ @:native("CSSRule") -extern class CSSRule -{ - static inline var UNKNOWN_RULE : Int = 0; +extern class CSSRule { static inline var STYLE_RULE : Int = 1; static inline var CHARSET_RULE : Int = 2; static inline var IMPORT_RULE : Int = 3; static inline var MEDIA_RULE : Int = 4; static inline var FONT_FACE_RULE : Int = 5; static inline var PAGE_RULE : Int = 6; + static inline var NAMESPACE_RULE : Int = 10; + static inline var KEYFRAMES_RULE : Int = 7; + static inline var KEYFRAME_RULE : Int = 8; + static inline var COUNTER_STYLE_RULE : Int = 11; + static inline var SUPPORTS_RULE : Int = 12; + static inline var FONT_FEATURE_VALUES_RULE : Int = 14; var type(default,null) : Int; var cssText : String; - var parentStyleSheet(default,null) : CSSStyleSheet; var parentRule(default,null) : CSSRule; + var parentStyleSheet(default,null) : CSSStyleSheet; } \ No newline at end of file diff --git a/std/js/html/CSSRuleList.hx b/std/js/html/CSSRuleList.hx index 9f77b36af0d755b1c7b47e55fc19bfcb0c29616a..78a6f47700d98ad409a0c8e27d69384a219ac408 100644 --- a/std/js/html/CSSRuleList.hx +++ b/std/js/html/CSSRuleList.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("CSSRuleList") -extern class CSSRuleList implements ArrayAccess -{ +extern class CSSRuleList implements ArrayAccess { var length(default,null) : Int; function item( index : Int ) : CSSRule; diff --git a/std/js/html/CSSStyleDeclaration.hx b/std/js/html/CSSStyleDeclaration.hx index b44b68bdcb95c8ae1bc95a9ca9db89e3c997f56a..22a1cc071aa1fb055ea87374e71b984d121035ce 100644 --- a/std/js/html/CSSStyleDeclaration.hx +++ b/std/js/html/CSSStyleDeclaration.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("CSSStyleDeclaration") -extern class CSSStyleDeclaration implements ArrayAccess -{ +extern class CSSStyleDeclaration implements ArrayAccess { var cssText : String; var length(default,null) : Int; var parentRule(default,null) : CSSRule; @@ -78,6 +77,8 @@ extern class CSSStyleDeclaration implements ArrayAccess var background :String; /** Shorthand for the "background-attachment" CSS property. */ var backgroundAttachment :String; + /** Shorthand for the "background-blend-mode" CSS property. */ + var backgroundBlendMode :String; /** Shorthand for the "background-clip" CSS property. */ var backgroundClip :String; /** Shorthand for the "background-color" CSS property. */ @@ -88,8 +89,16 @@ extern class CSSStyleDeclaration implements ArrayAccess var backgroundOrigin :String; /** Shorthand for the "background-position" CSS property. */ var backgroundPosition :String; + /** Shorthand for the "background-position-x" CSS property. */ + var backgroundPositionX :String; + /** Shorthand for the "background-position-y" CSS property. */ + var backgroundPositionY :String; /** Shorthand for the "background-repeat" CSS property. */ var backgroundRepeat :String; + /** Shorthand for the "background-repeat-x" CSS property. */ + var backgroundRepeatX :String; + /** Shorthand for the "background-repeat-y" CSS property. */ + var backgroundRepeatY :String; /** Shorthand for the "background-size" CSS property. */ var backgroundSize :String; /** Shorthand for the "baseline-shift" CSS property. */ @@ -98,6 +107,8 @@ extern class CSSStyleDeclaration implements ArrayAccess var binding :String; /** Shorthand for the "bleed" CSS property. */ var bleed :String; + /** Shorthand for the "block-size" CSS property. */ + var blockSize :String; /** Shorthand for the "bookmark-label" CSS property. */ var bookmarkLabel :String; /** Shorthand for the "bookmark-level" CSS property. */ @@ -106,6 +117,22 @@ extern class CSSStyleDeclaration implements ArrayAccess var bookmarkState :String; /** Shorthand for the "border" CSS property. */ var border :String; + /** Shorthand for the "border-block-end" CSS property. */ + var borderBlockEnd :String; + /** Shorthand for the "border-block-end-color" CSS property. */ + var borderBlockEndColor :String; + /** Shorthand for the "border-block-end-style" CSS property. */ + var borderBlockEndStyle :String; + /** Shorthand for the "border-block-end-width" CSS property. */ + var borderBlockEndWidth :String; + /** Shorthand for the "border-block-start" CSS property. */ + var borderBlockStart :String; + /** Shorthand for the "border-block-start-color" CSS property. */ + var borderBlockStartColor :String; + /** Shorthand for the "border-block-start-style" CSS property. */ + var borderBlockStartStyle :String; + /** Shorthand for the "border-block-start-width" CSS property. */ + var borderBlockStartWidth :String; /** Shorthand for the "border-bottom" CSS property. */ var borderBottom :String; /** Shorthand for the "border-bottom-color" CSS property. */ @@ -134,6 +161,22 @@ extern class CSSStyleDeclaration implements ArrayAccess var borderImageSource :String; /** Shorthand for the "border-image-width" CSS property. */ var borderImageWidth :String; + /** Shorthand for the "border-inline-end" CSS property. */ + var borderInlineEnd :String; + /** Shorthand for the "border-inline-end-color" CSS property. */ + var borderInlineEndColor :String; + /** Shorthand for the "border-inline-end-style" CSS property. */ + var borderInlineEndStyle :String; + /** Shorthand for the "border-inline-end-width" CSS property. */ + var borderInlineEndWidth :String; + /** Shorthand for the "border-inline-start" CSS property. */ + var borderInlineStart :String; + /** Shorthand for the "border-inline-start-color" CSS property. */ + var borderInlineStartColor :String; + /** Shorthand for the "border-inline-start-style" CSS property. */ + var borderInlineStartStyle :String; + /** Shorthand for the "border-inline-start-width" CSS property. */ + var borderInlineStartWidth :String; /** Shorthand for the "border-left" CSS property. */ var borderLeft :String; /** Shorthand for the "border-left-color" CSS property. */ @@ -188,8 +231,12 @@ extern class CSSStyleDeclaration implements ArrayAccess var breakBefore :String; /** Shorthand for the "break-inside" CSS property. */ var breakInside :String; + /** Shorthand for the "buffered-rendering" CSS property. */ + var bufferedRendering :String; /** Shorthand for the "caption-side" CSS property. */ var captionSide :String; + /** Shorthand for the "caret-color" CSS property. */ + var caretColor :String; /** Shorthand for the "chains" CSS property. */ var chains :String; /** Shorthand for the "clear" CSS property. */ @@ -202,8 +249,14 @@ extern class CSSStyleDeclaration implements ArrayAccess var clipRule :String; /** Shorthand for the "color" CSS property. */ var color :String; + /** Shorthand for the "color-adjust" CSS property. */ + var colorAdjust :String; + /** Shorthand for the "color-interpolation" CSS property. */ + var colorInterpolation :String; /** Shorthand for the "color-interpolation-filters" CSS property. */ var colorInterpolationFilters :String; + /** Shorthand for the "color-rendering" CSS property. */ + var colorRendering :String; /** Shorthand for the "column-count" CSS property. */ var columnCount :String; /** Shorthand for the "column-fill" CSS property. */ @@ -236,6 +289,8 @@ extern class CSSStyleDeclaration implements ArrayAccess var counterSet :String; /** Shorthand for the "crop" CSS property. */ var crop :String; + /** Shorthand for the "css-float" CSS property. */ + var cssFloat :String; /** Shorthand for the "cue" CSS property. */ var cue :String; /** Shorthand for the "cue-after" CSS property. */ @@ -244,6 +299,12 @@ extern class CSSStyleDeclaration implements ArrayAccess var cueBefore :String; /** Shorthand for the "cursor" CSS property. */ var cursor :String; + /** Shorthand for the "cx" CSS property. */ + var cx :String; + /** Shorthand for the "cy" CSS property. */ + var cy :String; + /** Shorthand for the "d" CSS property. */ + var d :String; /** Shorthand for the "direction" CSS property. */ var direction :String; /** Shorthand for the "display" CSS property. */ @@ -260,6 +321,12 @@ extern class CSSStyleDeclaration implements ArrayAccess var elevation :String; /** Shorthand for the "empty-cells" CSS property. */ var emptyCells :String; + /** Shorthand for the "fill" CSS property. */ + var fill :String; + /** Shorthand for the "fill-opacity" CSS property. */ + var fillOpacity :String; + /** Shorthand for the "fill-rule" CSS property. */ + var fillRule :String; /** Shorthand for the "filter" CSS property. */ var filter :String; /** Shorthand for the "flex" CSS property. */ @@ -290,6 +357,8 @@ extern class CSSStyleDeclaration implements ArrayAccess var flowInto :String; /** Shorthand for the "font" CSS property. */ var font :String; + /** Shorthand for the "font-display" CSS property. */ + var fontDisplay :String; /** Shorthand for the "font-family" CSS property. */ var fontFamily :String; /** Shorthand for the "font-feature-settings" CSS property. */ @@ -298,6 +367,8 @@ extern class CSSStyleDeclaration implements ArrayAccess var fontKerning :String; /** Shorthand for the "font-language-override" CSS property. */ var fontLanguageOverride :String; + /** Shorthand for the "font-optical-sizing" CSS property. */ + var fontOpticalSizing :String; /** Shorthand for the "font-size" CSS property. */ var fontSize :String; /** Shorthand for the "font-size-adjust" CSS property. */ @@ -322,8 +393,12 @@ extern class CSSStyleDeclaration implements ArrayAccess var fontVariantNumeric :String; /** Shorthand for the "font-variant-position" CSS property. */ var fontVariantPosition :String; + /** Shorthand for the "font-variation-settings" CSS property. */ + var fontVariationSettings :String; /** Shorthand for the "font-weight" CSS property. */ var fontWeight :String; + /** Shorthand for the "gap" CSS property. */ + var gap :String; /** Shorthand for the "grid" CSS property. */ var grid :String; /** Shorthand for the "grid-area" CSS property. */ @@ -338,12 +413,18 @@ extern class CSSStyleDeclaration implements ArrayAccess var gridColumn :String; /** Shorthand for the "grid-column-end" CSS property. */ var gridColumnEnd :String; + /** Shorthand for the "grid-column-gap" CSS property. */ + var gridColumnGap :String; /** Shorthand for the "grid-column-start" CSS property. */ var gridColumnStart :String; + /** Shorthand for the "grid-gap" CSS property. */ + var gridGap :String; /** Shorthand for the "grid-row" CSS property. */ var gridRow :String; /** Shorthand for the "grid-row-end" CSS property. */ var gridRowEnd :String; + /** Shorthand for the "grid-row-gap" CSS property. */ + var gridRowGap :String; /** Shorthand for the "grid-row-start" CSS property. */ var gridRowStart :String; /** Shorthand for the "grid-template" CSS property. */ @@ -364,6 +445,8 @@ extern class CSSStyleDeclaration implements ArrayAccess var icon :String; /** Shorthand for the "image-orientation" CSS property. */ var imageOrientation :String; + /** Shorthand for the "image-rendering" CSS property. */ + var imageRendering :String; /** Shorthand for the "image-resolution" CSS property. */ var imageResolution :String; /** Shorthand for the "ime-mode" CSS property. */ @@ -372,6 +455,10 @@ extern class CSSStyleDeclaration implements ArrayAccess var initialLetters :String; /** Shorthand for the "inline-box-align" CSS property. */ var inlineBoxAlign :String; + /** Shorthand for the "inline-size" CSS property. */ + var inlineSize :String; + /** Shorthand for the "isolation" CSS property. */ + var isolation :String; /** Shorthand for the "justify-content" CSS property. */ var justifyContent :String; /** Shorthand for the "justify-items" CSS property. */ @@ -412,18 +499,34 @@ extern class CSSStyleDeclaration implements ArrayAccess var listStyleType :String; /** Shorthand for the "margin" CSS property. */ var margin :String; + /** Shorthand for the "margin-block-end" CSS property. */ + var marginBlockEnd :String; + /** Shorthand for the "margin-block-start" CSS property. */ + var marginBlockStart :String; /** Shorthand for the "margin-bottom" CSS property. */ var marginBottom :String; + /** Shorthand for the "margin-inline-end" CSS property. */ + var marginInlineEnd :String; + /** Shorthand for the "margin-inline-start" CSS property. */ + var marginInlineStart :String; /** Shorthand for the "margin-left" CSS property. */ var marginLeft :String; /** Shorthand for the "margin-right" CSS property. */ var marginRight :String; /** Shorthand for the "margin-top" CSS property. */ var marginTop :String; + /** Shorthand for the "marker" CSS property. */ + var marker :String; + /** Shorthand for the "marker-end" CSS property. */ + var markerEnd :String; + /** Shorthand for the "marker-mid" CSS property. */ + var markerMid :String; /** Shorthand for the "marker-offset" CSS property. */ var markerOffset :String; /** Shorthand for the "marker-side" CSS property. */ var markerSide :String; + /** Shorthand for the "marker-start" CSS property. */ + var markerStart :String; /** Shorthand for the "marks" CSS property. */ var marks :String; /** Shorthand for the "mask" CSS property. */ @@ -442,12 +545,20 @@ extern class CSSStyleDeclaration implements ArrayAccess var maskBoxWidth :String; /** Shorthand for the "mask-clip" CSS property. */ var maskClip :String; + /** Shorthand for the "mask-composite" CSS property. */ + var maskComposite :String; /** Shorthand for the "mask-image" CSS property. */ var maskImage :String; + /** Shorthand for the "mask-mode" CSS property. */ + var maskMode :String; /** Shorthand for the "mask-origin" CSS property. */ var maskOrigin :String; /** Shorthand for the "mask-position" CSS property. */ var maskPosition :String; + /** Shorthand for the "mask-position-x" CSS property. */ + var maskPositionX :String; + /** Shorthand for the "mask-position-y" CSS property. */ + var maskPositionY :String; /** Shorthand for the "mask-repeat" CSS property. */ var maskRepeat :String; /** Shorthand for the "mask-size" CSS property. */ @@ -456,16 +567,30 @@ extern class CSSStyleDeclaration implements ArrayAccess var maskSourceType :String; /** Shorthand for the "mask-type" CSS property. */ var maskType :String; + /** Shorthand for the "max-block-size" CSS property. */ + var maxBlockSize :String; /** Shorthand for the "max-height" CSS property. */ var maxHeight :String; + /** Shorthand for the "max-inline-size" CSS property. */ + var maxInlineSize :String; /** Shorthand for the "max-lines" CSS property. */ var maxLines :String; /** Shorthand for the "max-width" CSS property. */ var maxWidth :String; + /** Shorthand for the "max-zoom" CSS property. */ + var maxZoom :String; + /** Shorthand for the "min-block-size" CSS property. */ + var minBlockSize :String; /** Shorthand for the "min-height" CSS property. */ var minHeight :String; + /** Shorthand for the "min-inline-size" CSS property. */ + var minInlineSize :String; /** Shorthand for the "min-width" CSS property. */ var minWidth :String; + /** Shorthand for the "min-zoom" CSS property. */ + var minZoom :String; + /** Shorthand for the "mix-blend-mode" CSS property. */ + var mixBlendMode :String; /** Shorthand for the "move-to" CSS property. */ var moveTo :String; /** Shorthand for the "nav-down" CSS property. */ @@ -482,10 +607,28 @@ extern class CSSStyleDeclaration implements ArrayAccess var objectFit :String; /** Shorthand for the "object-position" CSS property. */ var objectPosition :String; + /** Shorthand for the "offset" CSS property. */ + var offset :String; + /** Shorthand for the "offset-block-end" CSS property. */ + var offsetBlockEnd :String; + /** Shorthand for the "offset-block-start" CSS property. */ + var offsetBlockStart :String; + /** Shorthand for the "offset-distance" CSS property. */ + var offsetDistance :String; + /** Shorthand for the "offset-inline-end" CSS property. */ + var offsetInlineEnd :String; + /** Shorthand for the "offset-inline-start" CSS property. */ + var offsetInlineStart :String; + /** Shorthand for the "offset-path" CSS property. */ + var offsetPath :String; + /** Shorthand for the "offset-rotate" CSS property. */ + var offsetRotate :String; /** Shorthand for the "opacity" CSS property. */ var opacity :String; /** Shorthand for the "order" CSS property. */ var order :String; + /** Shorthand for the "orientation" CSS property. */ + var orientation :String; /** Shorthand for the "orphans" CSS property. */ var orphans :String; /** Shorthand for the "outline" CSS property. */ @@ -500,16 +643,32 @@ extern class CSSStyleDeclaration implements ArrayAccess var outlineWidth :String; /** Shorthand for the "overflow" CSS property. */ var overflow :String; + /** Shorthand for the "overflow-anchor" CSS property. */ + var overflowAnchor :String; /** Shorthand for the "overflow-wrap" CSS property. */ var overflowWrap :String; /** Shorthand for the "overflow-x" CSS property. */ var overflowX :String; /** Shorthand for the "overflow-y" CSS property. */ var overflowY :String; + /** Shorthand for the "overscroll-behavior" CSS property. */ + var overscrollBehavior :String; + /** Shorthand for the "overscroll-behavior-x" CSS property. */ + var overscrollBehaviorX :String; + /** Shorthand for the "overscroll-behavior-y" CSS property. */ + var overscrollBehaviorY :String; /** Shorthand for the "padding" CSS property. */ var padding :String; + /** Shorthand for the "padding-block-end" CSS property. */ + var paddingBlockEnd :String; + /** Shorthand for the "padding-block-start" CSS property. */ + var paddingBlockStart :String; /** Shorthand for the "padding-bottom" CSS property. */ var paddingBottom :String; + /** Shorthand for the "padding-inline-end" CSS property. */ + var paddingInlineEnd :String; + /** Shorthand for the "padding-inline-start" CSS property. */ + var paddingInlineStart :String; /** Shorthand for the "padding-left" CSS property. */ var paddingLeft :String; /** Shorthand for the "padding-right" CSS property. */ @@ -526,6 +685,8 @@ extern class CSSStyleDeclaration implements ArrayAccess var pageBreakInside :String; /** Shorthand for the "page-policy" CSS property. */ var pagePolicy :String; + /** Shorthand for the "paint-order" CSS property. */ + var paintOrder :String; /** Shorthand for the "pause" CSS property. */ var pause :String; /** Shorthand for the "pause-after" CSS property. */ @@ -540,14 +701,24 @@ extern class CSSStyleDeclaration implements ArrayAccess var pitch :String; /** Shorthand for the "pitch-range" CSS property. */ var pitchRange :String; + /** Shorthand for the "place-content" CSS property. */ + var placeContent :String; + /** Shorthand for the "place-items" CSS property. */ + var placeItems :String; + /** Shorthand for the "place-self" CSS property. */ + var placeSelf :String; /** Shorthand for the "play-during" CSS property. */ var playDuring :String; + /** Shorthand for the "pointer-events" CSS property. */ + var pointerEvents :String; /** Shorthand for the "position" CSS property. */ var position :String; /** Shorthand for the "presentation-level" CSS property. */ var presentationLevel :String; /** Shorthand for the "quotes" CSS property. */ var quotes :String; + /** Shorthand for the "r" CSS property. */ + var r :String; /** Shorthand for the "region-fragment" CSS property. */ var regionFragment :String; /** Shorthand for the "resize" CSS property. */ @@ -566,18 +737,42 @@ extern class CSSStyleDeclaration implements ArrayAccess var rotation :String; /** Shorthand for the "rotation-point" CSS property. */ var rotationPoint :String; + /** Shorthand for the "row-gap" CSS property. */ + var rowGap :String; /** Shorthand for the "ruby-align" CSS property. */ var rubyAlign :String; /** Shorthand for the "ruby-merge" CSS property. */ var rubyMerge :String; /** Shorthand for the "ruby-position" CSS property. */ var rubyPosition :String; + /** Shorthand for the "rx" CSS property. */ + var rx :String; + /** Shorthand for the "ry" CSS property. */ + var ry :String; + /** Shorthand for the "scroll-behavior" CSS property. */ + var scrollBehavior :String; + /** Shorthand for the "scroll-snap-coordinate" CSS property. */ + var scrollSnapCoordinate :String; + /** Shorthand for the "scroll-snap-destination" CSS property. */ + var scrollSnapDestination :String; + /** Shorthand for the "scroll-snap-points-x" CSS property. */ + var scrollSnapPointsX :String; + /** Shorthand for the "scroll-snap-points-y" CSS property. */ + var scrollSnapPointsY :String; + /** Shorthand for the "scroll-snap-type" CSS property. */ + var scrollSnapType :String; + /** Shorthand for the "scroll-snap-type-x" CSS property. */ + var scrollSnapTypeX :String; + /** Shorthand for the "scroll-snap-type-y" CSS property. */ + var scrollSnapTypeY :String; /** Shorthand for the "shape-image-threshold" CSS property. */ var shapeImageThreshold :String; - /** Shorthand for the "shape-outside" CSS property. */ - var shapeOutside :String; /** Shorthand for the "shape-margin" CSS property. */ var shapeMargin :String; + /** Shorthand for the "shape-outside" CSS property. */ + var shapeOutside :String; + /** Shorthand for the "shape-rendering" CSS property. */ + var shapeRendering :String; /** Shorthand for the "size" CSS property. */ var size :String; /** Shorthand for the "speak" CSS property. */ @@ -592,10 +787,32 @@ extern class CSSStyleDeclaration implements ArrayAccess var speakPunctuation :String; /** Shorthand for the "speech-rate" CSS property. */ var speechRate :String; + /** Shorthand for the "src" CSS property. */ + var src :String; + /** Shorthand for the "stop-color" CSS property. */ + var stopColor :String; + /** Shorthand for the "stop-opacity" CSS property. */ + var stopOpacity :String; /** Shorthand for the "stress" CSS property. */ var stress :String; /** Shorthand for the "string-set" CSS property. */ var stringSet :String; + /** Shorthand for the "stroke" CSS property. */ + var stroke :String; + /** Shorthand for the "stroke-dasharray" CSS property. */ + var strokeDasharray :String; + /** Shorthand for the "stroke-dashoffset" CSS property. */ + var strokeDashoffset :String; + /** Shorthand for the "stroke-linecap" CSS property. */ + var strokeLinecap :String; + /** Shorthand for the "stroke-linejoin" CSS property. */ + var strokeLinejoin :String; + /** Shorthand for the "stroke-miterlimit" CSS property. */ + var strokeMiterlimit :String; + /** Shorthand for the "stroke-opacity" CSS property. */ + var strokeOpacity :String; + /** Shorthand for the "stroke-width" CSS property. */ + var strokeWidth :String; /** Shorthand for the "tab-size" CSS property. */ var tabSize :String; /** Shorthand for the "table-layout" CSS property. */ @@ -604,6 +821,8 @@ extern class CSSStyleDeclaration implements ArrayAccess var textAlign :String; /** Shorthand for the "text-align-last" CSS property. */ var textAlignLast :String; + /** Shorthand for the "text-anchor" CSS property. */ + var textAnchor :String; /** Shorthand for the "text-combine-upright" CSS property. */ var textCombineUpright :String; /** Shorthand for the "text-decoration" CSS property. */ @@ -614,6 +833,8 @@ extern class CSSStyleDeclaration implements ArrayAccess var textDecorationLine :String; /** Shorthand for the "text-decoration-skip" CSS property. */ var textDecorationSkip :String; + /** Shorthand for the "text-decoration-skip-ink" CSS property. */ + var textDecorationSkipInk :String; /** Shorthand for the "text-decoration-style" CSS property. */ var textDecorationStyle :String; /** Shorthand for the "text-emphasis" CSS property. */ @@ -634,8 +855,12 @@ extern class CSSStyleDeclaration implements ArrayAccess var textOrientation :String; /** Shorthand for the "text-overflow" CSS property. */ var textOverflow :String; + /** Shorthand for the "text-rendering" CSS property. */ + var textRendering :String; /** Shorthand for the "text-shadow" CSS property. */ var textShadow :String; + /** Shorthand for the "text-size-adjust" CSS property. */ + var textSizeAdjust :String; /** Shorthand for the "text-space-collapse" CSS property. */ var textSpaceCollapse :String; /** Shorthand for the "text-transform" CSS property. */ @@ -646,8 +871,12 @@ extern class CSSStyleDeclaration implements ArrayAccess var textWrap :String; /** Shorthand for the "top" CSS property. */ var top :String; + /** Shorthand for the "touch-action" CSS property. */ + var touchAction :String; /** Shorthand for the "transform" CSS property. */ var transform :String; + /** Shorthand for the "transform-box" CSS property. */ + var transformBox :String; /** Shorthand for the "transform-origin" CSS property. */ var transformOrigin :String; /** Shorthand for the "transform-style" CSS property. */ @@ -664,6 +893,14 @@ extern class CSSStyleDeclaration implements ArrayAccess var transitionTimingFunction :String; /** Shorthand for the "unicode-bidi" CSS property. */ var unicodeBidi :String; + /** Shorthand for the "unicode-range" CSS property. */ + var unicodeRange :String; + /** Shorthand for the "user-select" CSS property. */ + var userSelect :String; + /** Shorthand for the "user-zoom" CSS property. */ + var userZoom :String; + /** Shorthand for the "vector-effect" CSS property. */ + var vectorEffect :String; /** Shorthand for the "vertical-align" CSS property. */ var verticalAlign :String; /** Shorthand for the "visibility" CSS property. */ @@ -706,17 +943,21 @@ extern class CSSStyleDeclaration implements ArrayAccess var wrapThrough :String; /** Shorthand for the "writing-mode" CSS property. */ var writingMode :String; + /** Shorthand for the "x" CSS property. */ + var x :String; + /** Shorthand for the "y" CSS property. */ + var y :String; /** Shorthand for the "z-index" CSS property. */ var zIndex :String; + /** Shorthand for the "zoom" CSS property. */ + var zoom :String; function item( index : Int ) : String; /** @throws DOMError */ function getPropertyValue( property : String ) : String; - /** @throws DOMError */ - function getPropertyCSSValue( property : String ) : CSSValue; function getPropertyPriority( property : String ) : String; /** @throws DOMError */ - function setProperty( property : String, value : String, ?priority : String = "" ) : Void; + function setProperty( property : String, value : String, priority : String = "" ) : Void; /** @throws DOMError */ function removeProperty( property : String ) : String; } \ No newline at end of file diff --git a/std/js/html/CSSStyleRule.hx b/std/js/html/CSSStyleRule.hx index f94707ef0bf7c7afb6639f7788db98e1d403a058..1fc1d7c92694c6f3d69d8f96831adc81ecbd14ef 100644 --- a/std/js/html/CSSStyleRule.hx +++ b/std/js/html/CSSStyleRule.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,7 +20,7 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from cssrule.webidl. Do not edit! +// This file is generated from mozilla\CSSStyleRule.webidl. Do not edit! package js.html; @@ -32,9 +32,16 @@ package js.html; @see **/ @:native("CSSStyleRule") -extern class CSSStyleRule extends CSSRule -{ +extern class CSSStyleRule extends CSSRule { + + /** + Gets the textual representation of the selector for this rule, e.g. `"h1,h2"`. + **/ var selectorText : String; + + /** + Returns the `CSSStyleDeclaration` object for the rule. + **/ var style(default,null) : CSSStyleDeclaration; } \ No newline at end of file diff --git a/std/js/html/CSSStyleSheet.hx b/std/js/html/CSSStyleSheet.hx index d6a03461b94a826ce02d66aa5995a629b55b310c..6ed72d4474b5d9449a6c618c85482b7bb33ff654 100644 --- a/std/js/html/CSSStyleSheet.hx +++ b/std/js/html/CSSStyleSheet.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,13 +32,34 @@ package js.html; @see **/ @:native("CSSStyleSheet") -extern class CSSStyleSheet extends StyleSheet -{ +extern class CSSStyleSheet extends StyleSheet { + + /** + If this style sheet is imported into the document using an `@import` rule, the `ownerRule` property will return that `CSSImportRule`, otherwise it returns `null`. + **/ var ownerRule(default,null) : CSSRule; + + /** + Returns a live `CSSRuleList`, listing the `CSSRule` objects in the style sheet. + + This is normally used to access individual rules like this: + + `   styleSheet.cssRules[i] // where i = 0..cssRules.length-1` + + To add or remove items in `cssRules`, use the `CSSStyleSheet`'s `deleteRule()` and `insertRule()` methods, described below. + **/ var cssRules(default,null) : CSSRuleList; - /** @throws DOMError */ - function insertRule( rule : String, index : Int ) : Int; - /** @throws DOMError */ + + /** + Inserts a new rule at the specified position in the style sheet, given the textual representation of the rule. + @throws DOMError + **/ + function insertRule( rule : String, index : Int = 0 ) : Int; + + /** + Deletes a rule at the specified position from the style sheet. + @throws DOMError + **/ function deleteRule( index : Int ) : Void; } \ No newline at end of file diff --git a/std/js/html/CSSSupportsRule.hx b/std/js/html/CSSSupportsRule.hx new file mode 100644 index 0000000000000000000000000000000000000000..e708dd47dcac06d46c73bd91e819dd2fe610ce79 --- /dev/null +++ b/std/js/html/CSSSupportsRule.hx @@ -0,0 +1,36 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\CSSSupportsRule.webidl. Do not edit! + +package js.html; + +/** + The `CSSSupportsRule` interface describes an object representing a single CSS `@supports` at-rule. It implements the `CSSConditionRule` interface, and therefore the `CSSRule` and `CSSGroupingRule` interfaces with a type value of `12` (`CSSRule.SUPPORTS_RULE`). + + Documentation [CSSSupportsRule](https://developer.mozilla.org/en-US/docs/Web/API/CSSSupportsRule) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/CSSSupportsRule$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("CSSSupportsRule") +extern class CSSSupportsRule extends CSSConditionRule { +} \ No newline at end of file diff --git a/std/js/html/CSSTransition.hx b/std/js/html/CSSTransition.hx index 0fc880834d40b85ac1e2effa1bfcdbecbd3620af..336547aa2ac9a612972e2d0166029df0649ab749 100644 --- a/std/js/html/CSSTransition.hx +++ b/std/js/html/CSSTransition.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,8 +25,7 @@ package js.html; @:native("CSSTransition") -extern class CSSTransition extends Animation -{ +extern class CSSTransition extends Animation { var transitionProperty(default,null) : String; } \ No newline at end of file diff --git a/std/js/html/CSSValue.hx b/std/js/html/CSSValue.hx deleted file mode 100644 index 0f3aea68306919dfeddf541223c8cf0cd6a930b2..0000000000000000000000000000000000000000 --- a/std/js/html/CSSValue.hx +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (C)2005-2017 Haxe Foundation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -// This file is generated from mozilla\CSSValue.webidl. Do not edit! - -package js.html; - -/** - The `CSSValue` interface represents the current computed value of a CSS property. - - Documentation [CSSValue](https://developer.mozilla.org/en-US/docs/Web/API/CSSValue) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/CSSValue$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). - - @see -**/ -@:native("CSSValue") -extern class CSSValue -{ - static inline var CSS_INHERIT : Int = 0; - static inline var CSS_PRIMITIVE_VALUE : Int = 1; - static inline var CSS_VALUE_LIST : Int = 2; - static inline var CSS_CUSTOM : Int = 3; - - - /** - A `DOMString` representing the current value. - **/ - var cssText : String; - - /** - An unsigned short representing a code defining the type of the value. Possible values are: - - - - - - - - - - - - - - - - - - - - - - - -
    ConstantDescription
    CSS_CUSTOMThe value is a custom value.
    CSS_INHERITThe value is inherited and the cssText contains "inherit".
    CSS_PRIMITIVE_VALUEThe value is a primitive value and an instance of the CSSPrimitiveValue interface can be obtained by using binding-specific casting methods on this instance of the CSSValue interface.
    CSS_VALUE_LISTThe value is a CSSValue list and an instance of the CSSValueList interface can be obtained by using binding-specific casting methods on this instance of the CSSValue interface.
    - - **/ - var cssValueType(default,null) : Int; - -} \ No newline at end of file diff --git a/std/js/html/Cache.hx b/std/js/html/Cache.hx new file mode 100644 index 0000000000000000000000000000000000000000..93b9bd6d39d7f5402790e9ebb256625bdcc47298 --- /dev/null +++ b/std/js/html/Cache.hx @@ -0,0 +1,51 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\Cache.webidl. Do not edit! + +package js.html; + +import js.lib.Promise; + +/** + The `Cache` interface provides a storage mechanism for `Request` / `Response` object pairs that are cached, for example as part of the `ServiceWorker` life cycle. Note that the `Cache` interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. + + Documentation [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Cache$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("Cache") +extern class Cache { + @:overload( function( request : String, ?options : CacheQueryOptions) : Promise {} ) + function match( request : Request, ?options : CacheQueryOptions ) : Promise; + @:overload( function( ?request : String, ?options : CacheQueryOptions) : Promise> {} ) + function matchAll( ?request : Request, ?options : CacheQueryOptions ) : Promise>; + @:overload( function( request : String) : Promise {} ) + function add( request : Request ) : Promise; + function addAll( requests : Array> ) : Promise; + @:overload( function( request : String, response : Response) : Promise {} ) + function put( request : Request, response : Response ) : Promise; + @:overload( function( request : String, ?options : CacheQueryOptions) : Promise {} ) + function delete( request : Request, ?options : CacheQueryOptions ) : Promise; + @:overload( function( ?request : String, ?options : CacheQueryOptions) : Promise> {} ) + function keys( ?request : Request, ?options : CacheQueryOptions ) : Promise>; +} \ No newline at end of file diff --git a/std/js/html/CacheQueryOptions.hx b/std/js/html/CacheQueryOptions.hx new file mode 100644 index 0000000000000000000000000000000000000000..95ff29369809853e74cd25f0d2eef41d41835cd7 --- /dev/null +++ b/std/js/html/CacheQueryOptions.hx @@ -0,0 +1,32 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\Cache.webidl. Do not edit! + +package js.html; + +typedef CacheQueryOptions = { + var ?cacheName : String; + var ?ignoreMethod : Bool; + var ?ignoreSearch : Bool; + var ?ignoreVary : Bool; +} \ No newline at end of file diff --git a/std/js/html/CacheStorage.hx b/std/js/html/CacheStorage.hx new file mode 100644 index 0000000000000000000000000000000000000000..8a7546b07f062d1579e028577a2bded832761e23 --- /dev/null +++ b/std/js/html/CacheStorage.hx @@ -0,0 +1,66 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\CacheStorage.webidl. Do not edit! + +package js.html; + +import js.lib.Promise; + +/** + The `CacheStorage` interface represents the storage for `Cache` objects. + + Documentation [CacheStorage](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("CacheStorage") +extern class CacheStorage { + /** @throws DOMError */ + function new( namespace : CacheStorageNamespace, principal : Dynamic/*MISSING Principal*/ ) : Void; + + /** + Checks if a given `Request` is a key in any of the `Cache` objects that the `CacheStorage` object tracks, and returns a `Promise` that resolves to that match. + **/ + @:overload( function( request : String, ?options : CacheQueryOptions) : Promise {} ) + function match( request : Request, ?options : CacheQueryOptions ) : Promise; + + /** + Returns a `Promise` that resolves to `true` if a `Cache` object matching the `cacheName` exists. + **/ + function has( cacheName : String ) : Promise; + + /** + Returns a `Promise` that resolves to the `Cache` object matching the `cacheName` (a new cache is created if it doesn't already exist.) + **/ + function open( cacheName : String ) : Promise; + + /** + Finds the `Cache` object matching the `cacheName`, and if found, deletes the `Cache` object and returns a `Promise` that resolves to `true`. If no `Cache` object is found, it returns `false`. + **/ + function delete( cacheName : String ) : Promise; + + /** + Returns a `Promise` that will resolve with an array containing strings corresponding to all of the named `Cache` objects tracked by the `CacheStorage`. Use this method to iterate over a list of all the `Cache` objects. + **/ + function keys() : Promise>; +} \ No newline at end of file diff --git a/std/js/html/CacheStorageNamespace.hx b/std/js/html/CacheStorageNamespace.hx new file mode 100644 index 0000000000000000000000000000000000000000..4a5ed31e90e3bf4f780df2e12a36cbd71b2c1061 --- /dev/null +++ b/std/js/html/CacheStorageNamespace.hx @@ -0,0 +1,30 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\CacheStorage.webidl. Do not edit! + +package js.html; + +enum abstract CacheStorageNamespace(String) { + var CONTENT = "content"; + var CHROME = "chrome"; +} \ No newline at end of file diff --git a/std/js/html/CanvasCaptureMediaStream.hx b/std/js/html/CanvasCaptureMediaStream.hx new file mode 100644 index 0000000000000000000000000000000000000000..935314fbe7aaa0723dcf0b47777a5aaee696c32e --- /dev/null +++ b/std/js/html/CanvasCaptureMediaStream.hx @@ -0,0 +1,32 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\CanvasCaptureMediaStream.webidl. Do not edit! + +package js.html; + +@:native("CanvasCaptureMediaStream") +extern class CanvasCaptureMediaStream extends MediaStream { + var canvas(default,null) : CanvasElement; + + function requestFrame() : Void; +} \ No newline at end of file diff --git a/std/js/html/CanvasElement.hx b/std/js/html/CanvasElement.hx index ca6b006a449dd3e1ca54e2e155d7c03fa9c57937..205485fce294b5f189d1514d0b34d5849117ce9a 100644 --- a/std/js/html/CanvasElement.hx +++ b/std/js/html/CanvasElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("HTMLCanvasElement") -extern class CanvasElement extends Element -{ +extern class CanvasElement extends Element { /** Is a positive `integer` reflecting the `width` HTML attribute of the `canvas` element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of `300` is used. @@ -45,24 +44,30 @@ extern class CanvasElement extends Element **/ var height : Int; - /** @throws DOMError */ /** - Returns a drawing context on the canvas, or null if the context ID is not supported. A drawing context lets you draw on the canvas. Calling getContext with `"2d"` returns a `CanvasRenderingContext2D` object, whereas calling it with `"experimental-webgl"` (or `"webgl"`) returns a `WebGLRenderingContext` object. This context is only available on browsers that implement WebGL. + Returns a drawing context on the canvas, or null if the context ID is not supported. A drawing context lets you draw on the canvas. Calling getContext with `"2d"` returns a `CanvasRenderingContext2D` object, whereas calling it with `"webgl"` (or `"experimental-webgl"`) returns a `WebGLRenderingContext` object. This context is only available on browsers that implement WebGL. + @throws DOMError **/ - function getContext( contextId : String, ?contextOptions : Dynamic ) : Dynamic/*MISSING nsISupports*/; - /** @throws DOMError */ + function getContext( contextId : String, ?contextOptions : Dynamic ) : Dynamic; /** Returns a data-URL containing a representation of the image in the format specified by the `type` parameter (defaults to `png`). The returned image is in a resolution of 96dpi. + @throws DOMError **/ - function toDataURL( ?type : String = "", ?encoderOptions : Dynamic ) : String; - /** @throws DOMError */ + function toDataURL( type : String = "", ?encoderOptions : Dynamic ) : String; /** Creates a `Blob` object representing the image contained in the canvas; this file may be cached on the disk or stored in memory at the discretion of the user agent. + @throws DOMError **/ - function toBlob( callback : Blob -> Void, ?type : String = "", ?encoderOptions : Dynamic ) : Void; + function toBlob( callback : Blob -> Void, type : String = "", ?encoderOptions : Dynamic ) : Void; + + /** + Returns a `CanvasCaptureMediaStream` that is a real-time video capture of the surface of the canvas. + @throws DOMError + **/ + function captureStream( ?frameRate : Float ) : CanvasCaptureMediaStream; /** Shorthand for getting a CanvasRenderingContext2D. */ inline function getContext2d( ?attribs : {} ) : CanvasRenderingContext2D { @@ -72,6 +77,10 @@ extern class CanvasElement extends Element inline function getContextWebGL( ?attribs : js.html.webgl.ContextAttributes ) : js.html.webgl.RenderingContext { return CanvasUtil.getContextWebGL(this, attribs); } + /** Shorthand for getting a js.html.webgl.WebGL2RenderingContext. */ + inline function getContextWebGL2( ?attribs : js.html.webgl.ContextAttributes ) : js.html.webgl.WebGL2RenderingContext { + return this.getContext('webgl2', attribs); + } } private class CanvasUtil { diff --git a/std/js/html/CanvasGradient.hx b/std/js/html/CanvasGradient.hx index 55e9da094dbdf27c5eca586337890ee06c8f3e4e..7934def18dc40ed860f7ba86c594dbeeec9ca3f5 100644 --- a/std/js/html/CanvasGradient.hx +++ b/std/js/html/CanvasGradient.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,12 +32,11 @@ package js.html; @see **/ @:native("CanvasGradient") -extern class CanvasGradient -{ - /** @throws DOMError */ +extern class CanvasGradient { /** Adds a new stop, defined by an `offset` and a `color`, to the gradient. If the offset is not between `0` and `1` an `INDEX_SIZE_ERR` is raised, if the color can't be parsed as a CSS `color`, a `SYNTAX_ERR` is raised. + @throws DOMError **/ function addColorStop( offset : Float, color : String ) : Void; } \ No newline at end of file diff --git a/std/js/html/CanvasPattern.hx b/std/js/html/CanvasPattern.hx index b7f4bcecd86bd05aba08fae8dc949adb77dac87d..560b10dfebdc0711d29888bcd3c8ce10eef2feea 100644 --- a/std/js/html/CanvasPattern.hx +++ b/std/js/html/CanvasPattern.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,15 +25,14 @@ package js.html; /** - The `CanvasPattern` interface represents an opaque object describing a pattern, based on an image, a canvas or a video, created by the `CanvasRenderingContext2D.createPattern()` method. + The `CanvasPattern` interface represents an opaque object describing a pattern, based on an image, a canvas, or a video, created by the `CanvasRenderingContext2D.createPattern()` method. Documentation [CanvasPattern](https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("CanvasPattern") -extern class CanvasPattern -{ +extern class CanvasPattern { /** Applies an `SVGMatrix` representing a linear transform to the pattern. diff --git a/std/js/html/CanvasRenderingContext2D.hx b/std/js/html/CanvasRenderingContext2D.hx index 2f57327e227dcc6485c99abb8e26456526ad6bba..810444c00044b02da63ffd2eabfffda52ae09586 100644 --- a/std/js/html/CanvasRenderingContext2D.hx +++ b/std/js/html/CanvasRenderingContext2D.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,17 +32,12 @@ package js.html; @see **/ @:native("CanvasRenderingContext2D") -extern class CanvasRenderingContext2D -{ +extern class CanvasRenderingContext2D { var canvas(default,null) : CanvasElement; var globalAlpha : Float; var globalCompositeOperation : String; var strokeStyle : haxe.extern.EitherType>; var fillStyle : haxe.extern.EitherType>; - var shadowOffsetX : Float; - var shadowOffsetY : Float; - var shadowBlur : Float; - var shadowColor : String; var filter : String; var imageSmoothingEnabled : Bool; var lineWidth : Float; @@ -50,56 +45,50 @@ extern class CanvasRenderingContext2D var lineJoin : String; var miterLimit : Float; var lineDashOffset : Float; + var shadowOffsetX : Float; + var shadowOffsetY : Float; + var shadowBlur : Float; + var shadowColor : String; var font : String; var textAlign : String; var textBaseline : String; - function save() : Void; - function restore() : Void; - /** @throws DOMError */ - function scale( x : Float, y : Float ) : Void; - /** @throws DOMError */ - function rotate( angle : Float ) : Void; - /** @throws DOMError */ - function translate( x : Float, y : Float ) : Void; /** @throws DOMError */ - function transform( a : Float, b : Float, c : Float, d : Float, e : Float, f : Float ) : Void; - /** @throws DOMError */ - function setTransform( a : Float, b : Float, c : Float, d : Float, e : Float, f : Float ) : Void; - /** @throws DOMError */ - function resetTransform() : Void; - function createLinearGradient( x0 : Float, y0 : Float, x1 : Float, y1 : Float ) : CanvasGradient; - /** @throws DOMError */ - function createRadialGradient( x0 : Float, y0 : Float, r0 : Float, x1 : Float, y1 : Float, r1 : Float ) : CanvasGradient; - /** @throws DOMError */ - function createPattern( image : haxe.extern.EitherType>>, repetition : String ) : CanvasPattern; - function clearRect( x : Float, y : Float, w : Float, h : Float ) : Void; - function fillRect( x : Float, y : Float, w : Float, h : Float ) : Void; - function strokeRect( x : Float, y : Float, w : Float, h : Float ) : Void; + @:overload( function( image : js.html.svg.ImageElement, dx : Float, dy : Float) : Void {} ) + @:overload( function( image : CanvasElement, dx : Float, dy : Float) : Void {} ) + @:overload( function( image : VideoElement, dx : Float, dy : Float) : Void {} ) + @:overload( function( image : ImageBitmap, dx : Float, dy : Float) : Void {} ) + @:overload( function( image : js.html.svg.ImageElement, dx : Float, dy : Float, dw : Float, dh : Float) : Void {} ) + @:overload( function( image : CanvasElement, dx : Float, dy : Float, dw : Float, dh : Float) : Void {} ) + @:overload( function( image : VideoElement, dx : Float, dy : Float, dw : Float, dh : Float) : Void {} ) + @:overload( function( image : ImageBitmap, dx : Float, dy : Float, dw : Float, dh : Float) : Void {} ) + @:overload( function( image : js.html.svg.ImageElement, sx : Float, sy : Float, sw : Float, sh : Float, dx : Float, dy : Float, dw : Float, dh : Float) : Void {} ) + @:overload( function( image : CanvasElement, sx : Float, sy : Float, sw : Float, sh : Float, dx : Float, dy : Float, dw : Float, dh : Float) : Void {} ) + @:overload( function( image : VideoElement, sx : Float, sy : Float, sw : Float, sh : Float, dx : Float, dy : Float, dw : Float, dh : Float) : Void {} ) + @:overload( function( image : ImageBitmap, sx : Float, sy : Float, sw : Float, sh : Float, dx : Float, dy : Float, dw : Float, dh : Float) : Void {} ) + @:overload( function( image : ImageElement, dx : Float, dy : Float ) : Void {} ) + @:overload( function( image : ImageElement, dx : Float, dy : Float, dw : Float, dh : Float ) : Void {} ) + function drawImage( image : ImageElement, sx : Float, sy : Float, sw : Float, sh : Float, dx : Float, dy : Float, dw : Float, dh : Float ) : Void; function beginPath() : Void; - @:overload( function( ?winding : CanvasWindingRule = "nonzero" ) : Void {} ) - function fill( path : Path2D, ?winding : CanvasWindingRule = "nonzero" ) : Void; + @:overload( function( winding : CanvasWindingRule = NONZERO ) : Void {} ) + function fill( path : Path2D, winding : CanvasWindingRule = NONZERO ) : Void; @:overload( function() : Void {} ) function stroke( path : Path2D ) : Void; - /** @throws DOMError */ - function drawFocusIfNeeded( element : Element ) : Void; - function drawCustomFocusRing( element : Element ) : Bool; - @:overload( function( ?winding : CanvasWindingRule = "nonzero" ) : Void {} ) - function clip( path : Path2D, ?winding : CanvasWindingRule = "nonzero" ) : Void; - @:overload( function( x : Float, y : Float, ?winding : CanvasWindingRule = "nonzero" ) : Bool {} ) - function isPointInPath( path : Path2D, x : Float, y : Float, ?winding : CanvasWindingRule = "nonzero" ) : Bool; + @:overload( function( winding : CanvasWindingRule = NONZERO ) : Void {} ) + function clip( path : Path2D, winding : CanvasWindingRule = NONZERO ) : Void; + @:overload( function( x : Float, y : Float, winding : CanvasWindingRule = NONZERO ) : Bool {} ) + function isPointInPath( path : Path2D, x : Float, y : Float, winding : CanvasWindingRule = NONZERO ) : Bool; @:overload( function( x : Float, y : Float ) : Bool {} ) function isPointInStroke( path : Path2D, x : Float, y : Float ) : Bool; + function createLinearGradient( x0 : Float, y0 : Float, x1 : Float, y1 : Float ) : CanvasGradient; /** @throws DOMError */ - function fillText( text : String, x : Float, y : Float, ?maxWidth : Float ) : Void; - /** @throws DOMError */ - function strokeText( text : String, x : Float, y : Float, ?maxWidth : Float ) : Void; - /** @throws DOMError */ - function measureText( text : String ) : TextMetrics; + function createRadialGradient( x0 : Float, y0 : Float, r0 : Float, x1 : Float, y1 : Float, r1 : Float ) : CanvasGradient; /** @throws DOMError */ - @:overload( function( image : haxe.extern.EitherType>>, dx : Float, dy : Float ) : Void {} ) - @:overload( function( image : haxe.extern.EitherType>>, dx : Float, dy : Float, dw : Float, dh : Float ) : Void {} ) - function drawImage( image : haxe.extern.EitherType>>, sx : Float, sy : Float, sw : Float, sh : Float, dx : Float, dy : Float, dw : Float, dh : Float ) : Void; + @:overload( function( image : js.html.svg.ImageElement, repetition : String) : CanvasPattern {} ) + @:overload( function( image : CanvasElement, repetition : String) : CanvasPattern {} ) + @:overload( function( image : VideoElement, repetition : String) : CanvasPattern {} ) + @:overload( function( image : ImageBitmap, repetition : String) : CanvasPattern {} ) + function createPattern( image : ImageElement, repetition : String ) : CanvasPattern; /** @throws DOMError */ function addHitRegion( ?options : HitRegionOptions ) : Void; function removeHitRegion( id : String ) : Void; @@ -124,7 +113,33 @@ extern class CanvasRenderingContext2D function arcTo( x1 : Float, y1 : Float, x2 : Float, y2 : Float, radius : Float ) : Void; function rect( x : Float, y : Float, w : Float, h : Float ) : Void; /** @throws DOMError */ - function arc( x : Float, y : Float, radius : Float, startAngle : Float, endAngle : Float, ?anticlockwise : Bool = false ) : Void; + function arc( x : Float, y : Float, radius : Float, startAngle : Float, endAngle : Float, anticlockwise : Bool = false ) : Void; + /** @throws DOMError */ + function ellipse( x : Float, y : Float, radiusX : Float, radiusY : Float, rotation : Float, startAngle : Float, endAngle : Float, anticlockwise : Bool = false ) : Void; + function clearRect( x : Float, y : Float, w : Float, h : Float ) : Void; + function fillRect( x : Float, y : Float, w : Float, h : Float ) : Void; + function strokeRect( x : Float, y : Float, w : Float, h : Float ) : Void; + function save() : Void; + function restore() : Void; + /** @throws DOMError */ + function fillText( text : String, x : Float, y : Float, ?maxWidth : Float ) : Void; + /** @throws DOMError */ + function strokeText( text : String, x : Float, y : Float, ?maxWidth : Float ) : Void; + /** @throws DOMError */ + function measureText( text : String ) : TextMetrics; + /** @throws DOMError */ + function scale( x : Float, y : Float ) : Void; + /** @throws DOMError */ + function rotate( angle : Float ) : Void; + /** @throws DOMError */ + function translate( x : Float, y : Float ) : Void; + /** @throws DOMError */ + function transform( a : Float, b : Float, c : Float, d : Float, e : Float, f : Float ) : Void; + /** @throws DOMError */ + function setTransform( a : Float, b : Float, c : Float, d : Float, e : Float, f : Float ) : Void; + /** @throws DOMError */ + function resetTransform() : Void; /** @throws DOMError */ - function ellipse( x : Float, y : Float, radiusX : Float, radiusY : Float, rotation : Float, startAngle : Float, endAngle : Float, ?anticlockwise : Bool = false ) : Void; + function drawFocusIfNeeded( element : Element ) : Void; + function drawCustomFocusRing( element : Element ) : Bool; } \ No newline at end of file diff --git a/std/js/html/CanvasWindingRule.hx b/std/js/html/CanvasWindingRule.hx index c0b6c6c26b29f7d79865c058ff077261179bade2..4d7c643746acec624616227c0740c8e7bc588902 100644 --- a/std/js/html/CanvasWindingRule.hx +++ b/std/js/html/CanvasWindingRule.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -@:enum abstract CanvasWindingRule(String) -{ +enum abstract CanvasWindingRule(String) { var NONZERO = "nonzero"; var EVENODD = "evenodd"; } \ No newline at end of file diff --git a/std/js/html/CaretPosition.hx b/std/js/html/CaretPosition.hx index 45f5fede00341a4c100953570501a9f94d7ffa5e..aaa5d77eae49b1988441a391e9f69f30d8ce12d3 100644 --- a/std/js/html/CaretPosition.hx +++ b/std/js/html/CaretPosition.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("CaretPosition") -extern class CaretPosition -{ +extern class CaretPosition { /** Returns a `Node` containing the found node at the caret's position. diff --git a/std/js/html/ChannelPixelLayout.hx b/std/js/html/ChannelPixelLayout.hx new file mode 100644 index 0000000000000000000000000000000000000000..62671b1f5402804409b17abef8bf871b176f69b2 --- /dev/null +++ b/std/js/html/ChannelPixelLayout.hx @@ -0,0 +1,34 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\ImageBitmap.webidl. Do not edit! + +package js.html; + +typedef ChannelPixelLayout = { + var dataType : ChannelPixelLayoutDataType; + var height : Int; + var offset : Int; + var skip : Int; + var stride : Int; + var width : Int; +} \ No newline at end of file diff --git a/std/js/html/CommandEvent.hx b/std/js/html/ChannelPixelLayoutDataType.hx similarity index 75% rename from std/js/html/CommandEvent.hx rename to std/js/html/ChannelPixelLayoutDataType.hx index 39b76356e9fcf5764911ef371a77997f29f3a362..66d6cb77dd30fcccfcf2694cb67cb8435f3a9426 100644 --- a/std/js/html/CommandEvent.hx +++ b/std/js/html/ChannelPixelLayoutDataType.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,14 +20,17 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\CommandEvent.webidl. Do not edit! +// This file is generated from mozilla\ImageBitmap.webidl. Do not edit! package js.html; -@:native("CommandEvent") -extern class CommandEvent extends Event -{ - var command(default,null) : String; - - function initCommandEvent( type : String, canBubble : Bool, cancelable : Bool, command : String ) : Void; +enum abstract ChannelPixelLayoutDataType(String) { + var UINT8 = "uint8"; + var INT8 = "int8"; + var UINT16 = "uint16"; + var INT16 = "int16"; + var UINT32 = "uint32"; + var INT32 = "int32"; + var FLOAT32 = "float32"; + var FLOAT64 = "float64"; } \ No newline at end of file diff --git a/std/js/html/CharacterData.hx b/std/js/html/CharacterData.hx index a74569586f0f8f7769486aeb230849ef589a525e..a6ba5aa189964794d1bcb1d6ba8884c93bc362fb 100644 --- a/std/js/html/CharacterData.hx +++ b/std/js/html/CharacterData.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,15 +25,14 @@ package js.html; /** - The `CharacterData` abstract interface represents a `Node` object that contains characters. This is an abstract interface, meaning there aren't any object of type `CharacterData`: it is implemented by other interfaces, like `Text`, `Comment`, or `ProcessingInstruction` which aren't abstract. + The `CharacterData` abstract interface represents a `Node` object that contains characters. This is an abstract interface, meaning there aren't any object of type `CharacterData`: it is implemented by other interfaces, like `Text`, '. In XML, the character sequence '--' cannot be used within a comment.">`Comment`, or `ProcessingInstruction` which aren't abstract. Documentation [CharacterData](https://developer.mozilla.org/en-US/docs/Web/API/CharacterData) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/CharacterData$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("CharacterData") -extern class CharacterData extends Node -{ +extern class CharacterData extends Node { /** Is a `DOMString` representing the textual data contained in this object. @@ -47,35 +46,44 @@ extern class CharacterData extends Node var previousElementSibling(default,null) : Element; var nextElementSibling(default,null) : Element; - /** @throws DOMError */ /** Returns a `DOMString` containing the part of `CharacterData.data` of the specified length and starting at the specified offset. + @throws DOMError **/ function substringData( offset : Int, count : Int ) : String; - /** @throws DOMError */ /** Appends the given `DOMString` to the `CharacterData.data` string; when this method returns, `data` contains the concatenated `DOMString`. + @throws DOMError **/ function appendData( data : String ) : Void; - /** @throws DOMError */ /** Inserts the specified characters, at the specified offset, in the `CharacterData.data` string; when this method returns, `data` contains the modified `DOMString`. + @throws DOMError **/ function insertData( offset : Int, data : String ) : Void; - /** @throws DOMError */ /** Removes the specified amount of characters, starting at the specified offset, from the `CharacterData.data` string; when this method returns, `data` contains the shortened `DOMString`. + @throws DOMError **/ function deleteData( offset : Int, count : Int ) : Void; - /** @throws DOMError */ /** Replaces the specified amount of characters, starting at the specified offset, with the specified `DOMString`; when this method returns, `data` contains the modified `DOMString`. + @throws DOMError **/ function replaceData( offset : Int, count : Int, data : String ) : Void; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function before( nodes : haxe.extern.Rest ) : Void; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function after( nodes : haxe.extern.Rest ) : Void; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function replaceWith( nodes : haxe.extern.Rest ) : Void; function remove() : Void; } \ No newline at end of file diff --git a/std/js/html/Client.hx b/std/js/html/Client.hx index 3018a17cfbdb067d27f9285c3a55188be16421e0..7074b7cf37a70ff80aff99b5cd229f366ae0d089 100644 --- a/std/js/html/Client.hx +++ b/std/js/html/Client.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,35 +25,35 @@ package js.html; /** - The `Client` interface of the ServiceWorker API represents the scope of a service worker client. A service worker client is either a document in a browser context or a `SharedWorker`, which is controlled by an active worker. A client object acts as a snapshot representation of its associated service worker client in the scope of a service worker. + The `Client` interface represents an executable context such as a `Worker`, or a `SharedWorker`. `Window` clients are represented by the more-specific `WindowClient`. You can get `Client`/`WindowClient` objects from methods such as `Clients.matchAll()` and `Clients.get()`. Documentation [Client](https://developer.mozilla.org/en-US/docs/Web/API/Client) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Client$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("Client") -extern class Client -{ +extern class Client { /** - The URL of the current service worker client. + The URL of the client as a string. **/ var url(default,null) : String; + var frameType(default,null) : FrameType; /** - Indicates the type of browsing context of the current client. This value can be one of `auxiliary`, `top-level`, `nested`, or `none`. + The client's type as a string. It can be "`window"`, "`worker"`, or "`sharedworker"`. **/ - var frameType(default,null) : FrameType; + var type(default,null) : ClientType; /** - Returns the universally unique identifier of the `Client` object. + The universally unique identifier of the client as a string. **/ var id(default,null) : String; - /** @throws DOMError */ /** - Allows a service worker to send a message to a `ServiceWorkerClient`. + Sends a message to the client. + @throws DOMError **/ function postMessage( message : Dynamic, ?transfer : Array ) : Void; } \ No newline at end of file diff --git a/std/js/html/ClientQueryOptions.hx b/std/js/html/ClientQueryOptions.hx index cea59eb22aff7cbe8d1b2b66f960901b31fd18aa..9bccf19ab0046ae24bd732f8e9be8acde5eee091 100644 --- a/std/js/html/ClientQueryOptions.hx +++ b/std/js/html/ClientQueryOptions.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -typedef ClientQueryOptions = -{ - @:optional var includeUncontrolled : Bool; - @:optional var type : Dynamic/*MISSING ClientType*/; +typedef ClientQueryOptions = { + var ?includeUncontrolled : Bool; + var ?type : ClientType; } \ No newline at end of file diff --git a/std/js/html/ClientType.hx b/std/js/html/ClientType.hx new file mode 100644 index 0000000000000000000000000000000000000000..444f2510b40895b64fa3fd54621e02140b4430a8 --- /dev/null +++ b/std/js/html/ClientType.hx @@ -0,0 +1,33 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\Clients.webidl. Do not edit! + +package js.html; + +enum abstract ClientType(String) { + var WINDOW = "window"; + var WORKER = "worker"; + var SHAREDWORKER = "sharedworker"; + var SERVICEWORKER = "serviceworker"; + var ALL = "all"; +} \ No newline at end of file diff --git a/std/js/html/Clients.hx b/std/js/html/Clients.hx index ba9535c14142fcab397b4f51f5a6c0bad5a80ea0..2d5d53099e7456982dbfa9baa5ca2e593e4d8c32 100644 --- a/std/js/html/Clients.hx +++ b/std/js/html/Clients.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,29 +24,35 @@ package js.html; +import js.lib.Promise; + /** - The `Clients` interface of the Service Workers API represents a container for a list of `Client` objects. + The `Clients` interface provides access to `Client` objects. Access it via ``self`.clients` within a service worker. Documentation [Clients](https://developer.mozilla.org/en-US/docs/Web/API/Clients) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Clients$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("Clients") -extern class Clients -{ - +extern class Clients { + /** - Gets a service worker client matching a given `id` and returns it in a `Promise`. + Returns a `Promise` for a `Client` matching a given `Client.id`. **/ function get( id : String ) : Promise; - + /** - Gets a list of service worker clients and returns them in a `Promise`. Include the `options` parameter to return all service worker clients whose origin is the same as the associated service worker's origin. If `options` are not included, the method returns only the service worker clients controlled by the service worker.  + Returns a `Promise` for an array of `Client` objects. An options argument allows you to control the types of clients returned.  **/ function matchAll( ?options : ClientQueryOptions ) : Promise>; - + + /** + Opens a new browser window for a given url and returns a `Promise` for the new `WindowClient`. + **/ + function openWindow( url : String ) : Promise; + /** - Allows an active Service Worker to set itself as the active worker for a client page when the worker and the page are in the same scope.  + Allows an active service worker to set itself as the `ServiceWorkerContainer.controller` for all clients within its `ServiceWorkerRegistration.scope`.  **/ function claim() : Promise; } \ No newline at end of file diff --git a/std/js/html/Clipboard.hx b/std/js/html/Clipboard.hx new file mode 100644 index 0000000000000000000000000000000000000000..ee00461d1be98a9c1aa97858eb62e29903f36289 --- /dev/null +++ b/std/js/html/Clipboard.hx @@ -0,0 +1,62 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\Clipboard.webidl. Do not edit! + +package js.html; + +import js.lib.Promise; + +/** + The `Clipboard` interface implements the Clipboard API, providing—if the user grants permission—both read and write access to the contents of the system clipboard. + + Documentation [Clipboard](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("Clipboard") +extern class Clipboard extends EventTarget { + + /** + Requests arbitrary data (such as images) from the clipboard, returning a `Promise`. When the data has been retrieved, the promise is resolved with a `DataTransfer` object that provides the data. + @throws DOMError + **/ + function read() : Promise; + + /** + Requests text from the system clipboard; returns a `Promise` which is resolved with a `DOMString` containing the clipboard's text once it's available. + @throws DOMError + **/ + function readText() : Promise; + + /** + Writes arbitrary data to the system clipboard. This asynchronous operation signals that it's finished by resolving the returned `Promise`. + @throws DOMError + **/ + function write( data : DataTransfer ) : Promise; + + /** + Writes text to the system clipboard, returning a `Promise` which is resolved once the text is fully copied into the clipboard. + @throws DOMError + **/ + function writeText( data : String ) : Promise; +} \ No newline at end of file diff --git a/std/js/html/ClipboardEvent.hx b/std/js/html/ClipboardEvent.hx index da5f9c61bcb30f3ec6f6fc7d3f912aec8237c07c..6e52531a24882044fcdc189ad2929e0a2d7b4c0e 100644 --- a/std/js/html/ClipboardEvent.hx +++ b/std/js/html/ClipboardEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("ClipboardEvent") -extern class ClipboardEvent extends Event -{ +extern class ClipboardEvent extends Event { /** Is a `DataTransfer` object containing the data affected by the user-initiated `cut`, `copy`, or `paste` operation, along with its MIME type. diff --git a/std/js/html/ClipboardEventInit.hx b/std/js/html/ClipboardEventInit.hx index 87ffbc32f8c97b47aa3d0eac42a2e4a3a7057e42..07cece3fd76ba1fb2791fc5c8d8876b6202e9580 100644 --- a/std/js/html/ClipboardEventInit.hx +++ b/std/js/html/ClipboardEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,9 +24,7 @@ package js.html; -typedef ClipboardEventInit = -{ - > EventInit, - @:optional var data : String; - @:optional var dataType : String; +typedef ClipboardEventInit = EventInit & { + var ?data : String; + var ?dataType : String; } \ No newline at end of file diff --git a/std/js/html/CloseEvent.hx b/std/js/html/CloseEvent.hx index 752e41facdd09a728d5a4ea2dc96033e6fcf35cb..0ee0a7e24fff9b7248a00f4224d1a0ceea8d9e79 100644 --- a/std/js/html/CloseEvent.hx +++ b/std/js/html/CloseEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("CloseEvent") -extern class CloseEvent extends Event -{ +extern class CloseEvent extends Event { /** Returns a `Boolean` that Indicates whether or not the connection was cleanly closed. @@ -41,122 +40,122 @@ extern class CloseEvent extends Event var wasClean(default,null) : Bool; /** - Returns an unsigned short containing the close code send by the server. The following values are permitted status codes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Status codeNameDescription
    0999 Reserved and not used.
    1000CLOSE_NORMALNormal closure; the connection successfully completed whatever purpose for which it was created.
    1001CLOSE_GOING_AWAYThe endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.
    1002CLOSE_PROTOCOL_ERRORThe endpoint is terminating the connection due to a protocol error.
    1003CLOSE_UNSUPPORTEDThe connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).
    1004 Reserved. A meaning might be defined in the future.
    1005CLOSE_NO_STATUSReserved.  Indicates that no status code was provided even though one was expected.
    1006CLOSE_ABNORMALReserved. Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected.
    1007Unsupported DataThe endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message).
    1008Policy ViolationThe endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable.
    1009CLOSE_TOO_LARGEThe endpoint is terminating the connection because a data frame was received that is too large.
    1010Missing ExtensionThe client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't.
    1011Internal ErrorThe server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
    1012Service RestartThe server is terminating the connection because it is restarting. [Ref]
    1013Try Again LaterThe server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients. [Ref]
    1014 Reserved for future use by the WebSocket standard.
    1015TLS HandshakeReserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).
    10161999 Reserved for future use by the WebSocket standard.
    20002999 Reserved for use by WebSocket extensions.
    30003999 Available for use by libraries and frameworks. May not be used by applications. Available for registration at the IANA via first-come, first-serve.
    40004999 Available for use by applications.
    - + Returns an unsigned short containing the close code send by the server. The following values are permitted status codes. The following definitions are sourced from the IANA website [Ref]. Note that the 1xxx codes are only WebSocket-internal and not for the same meaning by the transported data (like when the application-layer protocol is invalid). The only permitted codes to be specified in Firefox are 1000 and 3000 to 4999 [Source, Bug]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Status codeNameDescription
    0999 Reserved and not used.
    1000Normal ClosureNormal closure; the connection successfully completed whatever purpose for which it was created.
    1001Going AwayThe endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.
    1002Protocol ErrorThe endpoint is terminating the connection due to a protocol error.
    1003Unsupported DataThe connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).
    1004 Reserved. A meaning might be defined in the future.
    1005No Status RecvdReserved.  Indicates that no status code was provided even though one was expected.
    1006Abnormal ClosureReserved. Used to indicate that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected.
    1007Invalid frame payload dataThe endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message).
    1008Policy ViolationThe endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable.
    1009Message too bigThe endpoint is terminating the connection because a data frame was received that is too large.
    1010Missing ExtensionThe client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't.
    1011Internal ErrorThe server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
    1012Service RestartThe server is terminating the connection because it is restarting. [Ref]
    1013Try Again LaterThe server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients. [Ref]
    1014Bad GatewayThe server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code.
    1015TLS HandshakeReserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified).
    10161999 Reserved for future use by the WebSocket standard.
    20002999 Reserved for use by WebSocket extensions.
    30003999 Available for use by libraries and frameworks. May not be used by applications. Available for registration at the IANA via first-come, first-serve.
    40004999 Available for use by applications.
    + **/ var code(default,null) : Int; diff --git a/std/js/html/CloseEventInit.hx b/std/js/html/CloseEventInit.hx index 11bcd080cfa0263a383f5f2ba97c4bfc6792b80c..7a33c7e50702212469667ce31d7d4664a5f11551 100644 --- a/std/js/html/CloseEventInit.hx +++ b/std/js/html/CloseEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,10 +24,8 @@ package js.html; -typedef CloseEventInit = -{ - > EventInit, - @:optional var code : Int; - @:optional var reason : String; - @:optional var wasClean : Bool; +typedef CloseEventInit = EventInit & { + var ?code : Int; + var ?reason : String; + var ?wasClean : Bool; } \ No newline at end of file diff --git a/std/js/html/Comment.hx b/std/js/html/Comment.hx index 675e435a46b36873216aea3ee054a8b3ca749090..4042b115ed1c58073de09671b014f37f70b0b418 100644 --- a/std/js/html/Comment.hx +++ b/std/js/html/Comment.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("Comment") -extern class Comment extends CharacterData -{ +extern class Comment extends CharacterData { /** @throws DOMError */ - function new( ?data : String = "" ) : Void; + function new( data : String = "" ) : Void; } \ No newline at end of file diff --git a/std/js/html/CompositeOperation.hx b/std/js/html/CompositeOperation.hx index 4190eadb470643ef540ea5b11e7acf3fb70f1517..5dcdb0bd9860b76588065f4fe5ed416f6111f90b 100644 --- a/std/js/html/CompositeOperation.hx +++ b/std/js/html/CompositeOperation.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,12 +20,11 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\Keyframe.webidl. Do not edit! +// This file is generated from mozilla\BaseKeyframeTypes.webidl. Do not edit! package js.html; -@:enum abstract CompositeOperation(String) -{ +enum abstract CompositeOperation(String) { var REPLACE = "replace"; var ADD = "add"; var ACCUMULATE = "accumulate"; diff --git a/std/js/html/CompositionEvent.hx b/std/js/html/CompositionEvent.hx index c09a9ede880fa64744c00395652111ac9eab9cd8..77f24ef7dd0b89d9e65b0d4089e353ae8da07ffa 100644 --- a/std/js/html/CompositionEvent.hx +++ b/std/js/html/CompositionEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,10 +32,23 @@ package js.html; @see **/ @:native("CompositionEvent") -extern class CompositionEvent extends UIEvent -{ +extern class CompositionEvent extends UIEvent { + + /** + Returns the characters generated by the input method that raised the event; its varies depending on the type of event that generated the `CompositionEvent` object. + **/ var data(default,null) : String; + + /** + Returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with IME). + **/ var locale(default,null) : String; - function initCompositionEvent( typeArg : String, canBubbleArg : Bool, cancelableArg : Bool, viewArg : Window, dataArg : String, localeArg : String ) : Void; + /** @throws DOMError */ + function new( type : String, ?eventInitDict : CompositionEventInit ) : Void; + + /** + Initializes the attributes of a `CompositionEvent` object. + **/ + function initCompositionEvent( typeArg : String, canBubbleArg : Bool = false, cancelableArg : Bool = false, ?viewArg : Window, ?dataArg : String, localeArg : String = "" ) : Void; } \ No newline at end of file diff --git a/std/js/html/RecordErrorEventInit.hx b/std/js/html/CompositionEventInit.hx similarity index 85% rename from std/js/html/RecordErrorEventInit.hx rename to std/js/html/CompositionEventInit.hx index fafd0143e8fa92b5d82f2d7887c5c1116115453e..37134c2607087915ca5136fa5d0ec036734a6ee4 100644 --- a/std/js/html/RecordErrorEventInit.hx +++ b/std/js/html/CompositionEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,12 +20,10 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\RecordErrorEvent.webidl. Do not edit! +// This file is generated from mozilla\CompositionEvent.webidl. Do not edit! package js.html; -typedef RecordErrorEventInit = -{ - > EventInit, - @:optional var name : String; +typedef CompositionEventInit = UIEventInit & { + var ?data : String; } \ No newline at end of file diff --git a/std/js/html/MessagePortList.hx b/std/js/html/ComputedEffectTiming.hx similarity index 79% rename from std/js/html/MessagePortList.hx rename to std/js/html/ComputedEffectTiming.hx index 7982e9a1ace69e0fc3e87d758a53f44c2c3879d9..ba542df6121bbc68deafd6655a22eeb2ae4241fb 100644 --- a/std/js/html/MessagePortList.hx +++ b/std/js/html/ComputedEffectTiming.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,14 +20,14 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\MessagePortList.webidl. Do not edit! +// This file is generated from mozilla\AnimationEffect.webidl. Do not edit! package js.html; -@:native("MessagePortList") -extern class MessagePortList implements ArrayAccess -{ - var length(default,null) : Int; - - function item( index : Int ) : MessagePort; +typedef ComputedEffectTiming = EffectTiming & { + var ?activeDuration : Float; + var ?currentIteration : Float; + var ?endTime : Float; + var ?localTime : Float; + var ?progress : Float; } \ No newline at end of file diff --git a/std/js/html/Console.hx b/std/js/html/Console.hx index 893c25a7b0bce4a8bc6be9942763c5e7dec47dc3..4f265ad1e55120ab036eb655ae7ea74aa5428af0 100644 --- a/std/js/html/Console.hx +++ b/std/js/html/Console.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,123 +25,131 @@ package js.html; /** - The `Console` object provides access to the browser's debugging console (e.g., the Web Console in Firefox). The specifics of how it works vary from browser to browser, but there is a de facto set of features that are typically provided. + The `Console` object provides access to the browser's debugging console (e.g. the Web Console in Firefox). The specifics of how it works varies from browser to browser, but there is a de facto set of features that are typically provided. - Documentation [Console](https://developer.mozilla.org/en-US/docs/Web/API/Console) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Console$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + Documentation [console](https://developer.mozilla.org/en-US/docs/Web/API/console) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/console$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). - @see + @see **/ -@:native("Console") -extern class Console -{ +@:native("console") +extern class Console { /** - For general output of logging information. You may use string substitution and additional arguments with this method. + Log a message and stack trace to console if the first argument is `false`. **/ - function log( data : haxe.extern.Rest ) : Void; + static function assert( condition : Bool = false, data : haxe.extern.Rest ) : Void; /** - Informative logging information. You may use string substitution and additional arguments with this method. + Clear the console. **/ - function info( data : haxe.extern.Rest ) : Void; + static function clear() : Void; /** - Outputs a warning message. You may use string substitution and additional arguments with this method. + Log the number of times this line has been called with the given label. + **/ + static function count( label : String = "default" ) : Void; + + /** + Resets the value of the counter with the given label. **/ - function warn( data : haxe.extern.Rest ) : Void; + static function countReset( label : String = "default" ) : Void; + + /** + Outputs a message to the console with the log level `"debug"`. + Note: Starting with Chromium 58 this method only appears in Chromium browser consoles when level "Verbose" is selected. + + **/ + static function debug( data : haxe.extern.Rest ) : Void; /** Outputs an error message. You may use string substitution and additional arguments with this method. **/ - function error( data : haxe.extern.Rest ) : Void; + static function error( data : haxe.extern.Rest ) : Void; /** - An alias for `error()` + Informative logging of information. You may use string substitution and additional arguments with this method. **/ - function exception( data : haxe.extern.Rest ) : Void; + static function info( data : haxe.extern.Rest ) : Void; /** - An alias for `log()` + For general output of logging information. You may use string substitution and additional arguments with this method. **/ - function debug( data : haxe.extern.Rest ) : Void; + static function log( data : haxe.extern.Rest ) : Void; /** Displays tabular data as a table. **/ - function table( data : haxe.extern.Rest ) : Void; + static function table( data : haxe.extern.Rest ) : Void; /** Outputs a stack trace. **/ - function trace() : Void; + static function trace( data : haxe.extern.Rest ) : Void; + + /** + Outputs a warning message. You may use string substitution and additional arguments with this method. + **/ + static function warn( data : haxe.extern.Rest ) : Void; /** Displays an interactive listing of the properties of a specified JavaScript object. This listing lets you use disclosure triangles to examine the contents of child objects. **/ - function dir( data : haxe.extern.Rest ) : Void; + static function dir( data : haxe.extern.Rest ) : Void; /** - Displays an XML/HTML Element representation of the specified object if possible or the JavaScript Object view if it is not. + Displays an XML/HTML Element representation of the specified object if possible or the JavaScript Object view if it is not possible. **/ - function dirxml( data : haxe.extern.Rest ) : Void; + static function dirxml( data : haxe.extern.Rest ) : Void; /** Creates a new inline group, indenting all following output by another level. To move back out a level, call `groupEnd()`. **/ - function group( data : haxe.extern.Rest ) : Void; + static function group( data : haxe.extern.Rest ) : Void; /** - Creates a new inline group, indenting all following output by another level; unlike `group()`, this starts with the inline group collapsed, requiring the use of a disclosure button to expand it. To move back out a level, call `groupEnd()`. + Creates a new inline group, indenting all following output by another level. However, unlike `group()` this starts with the inline group collapsed requiring the use of a disclosure button to expand it. To move back out a level, call `groupEnd()`. **/ - function groupCollapsed( data : haxe.extern.Rest ) : Void; + static function groupCollapsed( data : haxe.extern.Rest ) : Void; /** Exits the current inline group. **/ - function groupEnd( data : haxe.extern.Rest ) : Void; + static function groupEnd() : Void; /** Starts a timer with a name specified as an input parameter. Up to 10,000 simultaneous timers can run on a given page. **/ - function time( ?time : Dynamic ) : Void; - - /** - Stops the specified timer and logs the elapsed time in seconds since its start. - **/ - function timeEnd( ?time : Dynamic ) : Void; + static function time( label : String = "default" ) : Void; /** - Adds a marker to the browser's Timeline or Waterfall tool. + Logs the value of the specified timer to the console. **/ - function timeStamp( ?data : Dynamic ) : Void; + static function timeLog( label : String = "default", data : haxe.extern.Rest ) : Void; /** - Starts the browser's build-in profiler (for example, the Firefox performance tool). You can specify an optional name for the profile. + Stops the specified timer and logs the elapsed time in seconds since it started. **/ - function profile( data : haxe.extern.Rest ) : Void; + static function timeEnd( label : String = "default" ) : Void; /** - Stops the profiler. You can see the resulting profile in the browser's performance tool (for example, the Firefox performance tool). + An alias for `error()`. **/ - function profileEnd( data : haxe.extern.Rest ) : Void; + static function exception( data : haxe.extern.Rest ) : Void; /** - Log a message and stack trace to console if first argument is `false`. + Adds a marker to the browser's Timeline or Waterfall tool. **/ - function assert( condition : Bool, data : haxe.extern.Rest ) : Void; + static function timeStamp( ?data : Dynamic ) : Void; /** - Log the number of times this line has been called with the given label. + Starts the browser's built-in profiler (for example, the Firefox performance tool). You can specify an optional name for the profile. **/ - function count( data : haxe.extern.Rest ) : Void; + static function profile( data : haxe.extern.Rest ) : Void; /** - Clear the console. + Stops the profiler. You can see the resulting profile in the browser's performance tool (for example, the Firefox performance tool). **/ - function clear() : Void; - function markTimeline() : Void; - function timeline() : Void; - function timelineEnd() : Void; + static function profileEnd( data : haxe.extern.Rest ) : Void; } \ No newline at end of file diff --git a/std/js/html/ConsoleInstance.hx b/std/js/html/ConsoleInstance.hx new file mode 100644 index 0000000000000000000000000000000000000000..cded8ec89f9ffb0a718d902849377ef54b70470b --- /dev/null +++ b/std/js/html/ConsoleInstance.hx @@ -0,0 +1,154 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\Console.webidl. Do not edit! + +package js.html; + +/** + The `Console` object provides access to the browser's debugging console (e.g. the Web Console in Firefox). The specifics of how it works varies from browser to browser, but there is a de facto set of features that are typically provided. + + Documentation [Console](https://developer.mozilla.org/en-US/docs/Web/API/Console) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Console$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +extern interface ConsoleInstance { + + /** + Log a message and stack trace to console if the first argument is `false`. + **/ + function assert( condition : Bool = false, data : haxe.extern.Rest ) : Void; + + /** + Clear the console. + **/ + function clear() : Void; + + /** + Log the number of times this line has been called with the given label. + **/ + function count( label : String = "default" ) : Void; + + /** + Resets the value of the counter with the given label. + **/ + function countReset( label : String = "default" ) : Void; + + /** + Outputs a message to the console with the log level `"debug"`. + Note: Starting with Chromium 58 this method only appears in Chromium browser consoles when level "Verbose" is selected. + + **/ + function debug( data : haxe.extern.Rest ) : Void; + + /** + Outputs an error message. You may use string substitution and additional arguments with this method. + **/ + function error( data : haxe.extern.Rest ) : Void; + + /** + Informative logging of information. You may use string substitution and additional arguments with this method. + **/ + function info( data : haxe.extern.Rest ) : Void; + + /** + For general output of logging information. You may use string substitution and additional arguments with this method. + **/ + function log( data : haxe.extern.Rest ) : Void; + + /** + Displays tabular data as a table. + **/ + function table( data : haxe.extern.Rest ) : Void; + + /** + Outputs a stack trace. + **/ + function trace( data : haxe.extern.Rest ) : Void; + + /** + Outputs a warning message. You may use string substitution and additional arguments with this method. + **/ + function warn( data : haxe.extern.Rest ) : Void; + + /** + Displays an interactive listing of the properties of a specified JavaScript object. This listing lets you use disclosure triangles to examine the contents of child objects. + **/ + function dir( data : haxe.extern.Rest ) : Void; + + /** + + Displays an XML/HTML Element representation of the specified object if possible or the JavaScript Object view if it is not possible. + + **/ + function dirxml( data : haxe.extern.Rest ) : Void; + + /** + Creates a new inline group, indenting all following output by another level. To move back out a level, call `groupEnd()`. + **/ + function group( data : haxe.extern.Rest ) : Void; + + /** + Creates a new inline group, indenting all following output by another level. However, unlike `group()` this starts with the inline group collapsed requiring the use of a disclosure button to expand it. To move back out a level, call `groupEnd()`. + **/ + function groupCollapsed( data : haxe.extern.Rest ) : Void; + + /** + Exits the current inline group. + **/ + function groupEnd() : Void; + + /** + Starts a timer with a name specified as an input parameter. Up to 10,000 simultaneous timers can run on a given page. + **/ + function time( label : String = "default" ) : Void; + + /** + Logs the value of the specified timer to the console. + **/ + function timeLog( label : String = "default", data : haxe.extern.Rest ) : Void; + + /** + Stops the specified timer and logs the elapsed time in seconds since it started. + **/ + function timeEnd( label : String = "default" ) : Void; + + /** + An alias for `error()`. + **/ + function exception( data : haxe.extern.Rest ) : Void; + + /** + Adds a marker to the browser's Timeline or Waterfall tool. + **/ + function timeStamp( ?data : Dynamic ) : Void; + + /** + Starts the browser's built-in profiler (for example, the Firefox performance tool). You can specify an optional name for the profile. + **/ + function profile( data : haxe.extern.Rest ) : Void; + + /** + Stops the profiler. You can see the resulting profile in the browser's performance tool (for example, the Firefox performance tool). + **/ + function profileEnd( data : haxe.extern.Rest ) : Void; +} \ No newline at end of file diff --git a/std/js/html/ConstrainBooleanParameters.hx b/std/js/html/ConstrainBooleanParameters.hx new file mode 100644 index 0000000000000000000000000000000000000000..c1c731337f9c1b697bd49a13a731fdedd60a4c26 --- /dev/null +++ b/std/js/html/ConstrainBooleanParameters.hx @@ -0,0 +1,30 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\MediaTrackConstraintSet.webidl. Do not edit! + +package js.html; + +typedef ConstrainBooleanParameters = { + var ?exact : Bool; + var ?ideal : Bool; +} \ No newline at end of file diff --git a/std/js/html/ConstrainDOMStringParameters.hx b/std/js/html/ConstrainDOMStringParameters.hx new file mode 100644 index 0000000000000000000000000000000000000000..9bc81a67f9af26e9f7e5095d88d242594c04e4fa --- /dev/null +++ b/std/js/html/ConstrainDOMStringParameters.hx @@ -0,0 +1,30 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\MediaTrackConstraintSet.webidl. Do not edit! + +package js.html; + +typedef ConstrainDOMStringParameters = { + var ?exact : haxe.extern.EitherType>; + var ?ideal : haxe.extern.EitherType>; +} \ No newline at end of file diff --git a/std/js/html/ConstrainDoubleRange.hx b/std/js/html/ConstrainDoubleRange.hx new file mode 100644 index 0000000000000000000000000000000000000000..7b96869918c5d9c71be284b20f46f3c34ae32dd4 --- /dev/null +++ b/std/js/html/ConstrainDoubleRange.hx @@ -0,0 +1,32 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\MediaTrackConstraintSet.webidl. Do not edit! + +package js.html; + +typedef ConstrainDoubleRange = { + var ?exact : Float; + var ?ideal : Float; + var ?max : Float; + var ?min : Float; +} \ No newline at end of file diff --git a/std/js/html/ConstrainLongRange.hx b/std/js/html/ConstrainLongRange.hx new file mode 100644 index 0000000000000000000000000000000000000000..a83229a4d6692a8c6d3801a22ef205a509f25bb1 --- /dev/null +++ b/std/js/html/ConstrainLongRange.hx @@ -0,0 +1,32 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\MediaTrackConstraintSet.webidl. Do not edit! + +package js.html; + +typedef ConstrainLongRange = { + var ?exact : Int; + var ?ideal : Int; + var ?max : Int; + var ?min : Int; +} \ No newline at end of file diff --git a/std/js/html/ConvertCoordinateOptions.hx b/std/js/html/ConvertCoordinateOptions.hx index 438ff08069b57b4220eaf543c1c99819aade6337..f620587c143f756956a7cc8f74c0fbb1da4a1ddd 100644 --- a/std/js/html/ConvertCoordinateOptions.hx +++ b/std/js/html/ConvertCoordinateOptions.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -typedef ConvertCoordinateOptions = -{ - @:optional var fromBox : Dynamic/*MISSING CSSBoxType*/; - @:optional var toBox : Dynamic/*MISSING CSSBoxType*/; +typedef ConvertCoordinateOptions = { + var ?fromBox : CSSBoxType; + var ?toBox : CSSBoxType; } \ No newline at end of file diff --git a/std/js/html/Coordinates.hx b/std/js/html/Coordinates.hx index a8e23a028f628d5e49affb2c3b0390ce33753aa6..e0d3677b13691c812ff61ca64674748d57cae1e7 100644 --- a/std/js/html/Coordinates.hx +++ b/std/js/html/Coordinates.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -31,9 +31,7 @@ package js.html; @see **/ -@:native("Coordinates") -extern class Coordinates -{ +typedef Coordinates = { /** Returns a `double` representing the position's latitude in decimal degrees. @@ -46,7 +44,7 @@ extern class Coordinates var longitude(default,null) : Float; /** - Returns a `double` representing the position's altitude in metres, relative to sea level. This value can be `null` if the implementation cannot provide the data. + Returns a `double` representing the position's altitude in meters, relative to sea level. This value can be `null` if the implementation cannot provide the data. **/ var altitude(default,null) : Float; diff --git a/std/js/html/Crypto.hx b/std/js/html/Crypto.hx index 5ab5ababa245659294bcfb6a53f2f8d57473fec9..ad52941e37e5a77b1aca641f3f60ddca60902823 100644 --- a/std/js/html/Crypto.hx +++ b/std/js/html/Crypto.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,14 +32,17 @@ package js.html; @see **/ @:native("Crypto") -extern class Crypto -{ +extern class Crypto { /** Returns a `SubtleCrypto` object providing access to common cryptographic primitives, like hashing, signing, encryption or decryption. **/ var subtle(default,null) : SubtleCrypto; - /** @throws DOMError */ - function getRandomValues( array : ArrayBufferView ) : ArrayBufferView; + + /** + Fills the passed `TypedArray` with cryptographically sound random values. + @throws DOMError + **/ + function getRandomValues( array : js.lib.ArrayBufferView ) : js.lib.ArrayBufferView; } \ No newline at end of file diff --git a/std/js/html/CryptoKey.hx b/std/js/html/CryptoKey.hx index ba143b1c7ab932c6b6a06b754e04a388b8e20e7c..9ad095cca5a34d1b8f1dc0168164dd64ab36270b 100644 --- a/std/js/html/CryptoKey.hx +++ b/std/js/html/CryptoKey.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("CryptoKey") -extern class CryptoKey -{ +extern class CryptoKey { /** Returns an enumerated value representing the type of the key, a secret key (for symmetric algorithm), a public or a private key (for an asymmetric algorithm) diff --git a/std/js/html/CustomEvent.hx b/std/js/html/CustomEvent.hx index 9d74ae097d939a247a8b0cf6a1a39400ccbc1352..665a10993d3b5c32b354dee95570abe93c9ca331 100644 --- a/std/js/html/CustomEvent.hx +++ b/std/js/html/CustomEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("CustomEvent") -extern class CustomEvent extends Event -{ +extern class CustomEvent extends Event { /** Any data passed when initializing the event. @@ -42,12 +41,11 @@ extern class CustomEvent extends Event /** @throws DOMError */ function new( type : String, ?eventInitDict : CustomEventInit ) : Void; - /** @throws DOMError */ /** Initializes a `CustomEvent` object. If the event has already being dispatched, this method does nothing. **/ - function initCustomEvent( type : String, canBubble : Bool, cancelable : Bool, detail : Dynamic ) : Void; + function initCustomEvent( type : String, canBubble : Bool = false, cancelable : Bool = false, ?detail : Dynamic ) : Void; } \ No newline at end of file diff --git a/std/js/html/CustomEventInit.hx b/std/js/html/CustomEventInit.hx index 381f111c4bb0246b65d93f0d248fb8e4d0479b92..f7300598bb608b40b1de8976968c617c81844b95 100644 --- a/std/js/html/CustomEventInit.hx +++ b/std/js/html/CustomEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,6 @@ package js.html; -typedef CustomEventInit = -{ - > EventInit, - @:optional var detail : Dynamic; +typedef CustomEventInit = EventInit & { + var ?detail : Dynamic; } \ No newline at end of file diff --git a/std/js/html/DListElement.hx b/std/js/html/DListElement.hx index 05a76ec29a5ecf5cf88d1c3123a1de64b0eabd33..540a6411fc7e834a4579e0cab40cf02a4eca8be7 100644 --- a/std/js/html/DListElement.hx +++ b/std/js/html/DListElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("HTMLDListElement") -extern class DListElement extends Element -{ +extern class DListElement extends Element { /** Is a `Boolean` indicating that spacing between list items should be reduced. diff --git a/std/js/html/DOMElement.hx b/std/js/html/DOMElement.hx index eb6dd65b12aa5d671fda1aac1592e9d9c36ffc9b..8b3c31e9ad7bd02544acbd085f7988811b432455 100644 --- a/std/js/html/DOMElement.hx +++ b/std/js/html/DOMElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,21 +25,58 @@ package js.html; /** - The `Element` interface represents an object of a `Document`. This interface describes methods and properties common to all kinds of elements. Specific behaviors are described in interfaces which inherit from `Element` but add additional functionality. + `Element` is the most general base class from which all objects in a `Document` inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from `Element`. Documentation [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Element$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("Element") -extern class DOMElement extends Node -{ +extern class DOMElement extends Node { + + /** + The namespace URI of the element, or `null` if it is no namespace. + + Note: In Firefox 3.5 and earlier, HTML elements are in no namespace. In later versions, HTML elements are in the `http://www.w3.org/1999/xhtml` namespace in both HTML and XML trees. `1.9.2` + + + **/ + var namespaceURI(default,null) : String; + + /** + A `DOMString` representing the namespace prefix of the element, or `null` if no prefix is specified. + **/ + var prefix(default,null) : String; + + /** + A `DOMString` representing the local part of the qualified name of the element. + **/ + var localName(default,null) : String; + + /** + Returns a `String` with the name of the tag for the given element. + **/ var tagName(default,null) : String; + + /** + Is a `DOMString` representing the id of the element. + **/ var id : String; + + /** + Is a `DOMString` representing the class of the element. + **/ var className : String; + + /** + Returns a `DOMTokenList` containing the list of class attributes. + **/ var classList(default,null) : DOMTokenList; + + /** + Returns a `NamedNodeMap` object containing the assigned attributes of the corresponding HTML element. + **/ var attributes(default,null) : NamedNodeMap; - var onwheel : haxe.Constraints.Function; var title : String; var lang : String; var dir : String; @@ -70,31 +107,92 @@ extern class DOMElement extends Node var offsetLeft(default,null) : Int; var offsetWidth(default,null) : Int; var offsetHeight(default,null) : Int; + + /** + A `Number` representing number of pixels the top of the document is scrolled vertically. + **/ var scrollTop : Int; + + /** + Is a `Number` representing the left scroll offset of the element. + **/ var scrollLeft : Int; + + /** + Returns a `Number` representing the scroll view width of the element. + **/ var scrollWidth(default,null) : Int; + + /** + Returns a `Number` representing the scroll view height of an element. + **/ var scrollHeight(default,null) : Int; + + /** + Returns a `Number` representing the width of the top border of the element. + **/ var clientTop(default,null) : Int; + + /** + Returns a `Number` representing the width of the left border of the element. + **/ var clientLeft(default,null) : Int; + + /** + Returns a `Number` representing the inner width of the element. + **/ var clientWidth(default,null) : Int; + + /** + Returns a `Number` representing the inner height of the element. + **/ var clientHeight(default,null) : Int; + + /** + Returns a `Number` representing the maximum top scroll offset possible for the element. + **/ var scrollTopMax(default,null) : Int; + + /** + Returns a `Number` representing the maximum left scroll offset possible for the element. + **/ var scrollLeftMax(default,null) : Int; + + /** + Is a `DOMString` representing the markup of the element's content. + **/ var innerHTML : String; + + /** + Is a `DOMString` representing the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string. + **/ var outerHTML : String; + + /** + Returns the open shadow root that is hosted by the element, or null if no open shadow root is present. + **/ var shadowRoot(default,null) : ShadowRoot; + var assignedSlot(default,null) : SlotElement; + + /** + Returns the name of the shadow DOM slot the element is inserted in. + **/ + var slot : String; var onabort : haxe.Constraints.Function; var onblur : haxe.Constraints.Function; var onfocus : haxe.Constraints.Function; + var onauxclick : haxe.Constraints.Function; var oncanplay : haxe.Constraints.Function; var oncanplaythrough : haxe.Constraints.Function; var onchange : haxe.Constraints.Function; var onclick : haxe.Constraints.Function; + var onclose : haxe.Constraints.Function; var oncontextmenu : haxe.Constraints.Function; var ondblclick : haxe.Constraints.Function; var ondrag : haxe.Constraints.Function; var ondragend : haxe.Constraints.Function; var ondragenter : haxe.Constraints.Function; + var ondragexit : haxe.Constraints.Function; var ondragleave : haxe.Constraints.Function; var ondragover : haxe.Constraints.Function; var ondragstart : haxe.Constraints.Function; @@ -110,6 +208,7 @@ extern class DOMElement extends Node var onload : haxe.Constraints.Function; var onloadeddata : haxe.Constraints.Function; var onloadedmetadata : haxe.Constraints.Function; + var onloadend : haxe.Constraints.Function; var onloadstart : haxe.Constraints.Function; var onmousedown : haxe.Constraints.Function; var onmouseenter : haxe.Constraints.Function; @@ -118,6 +217,11 @@ extern class DOMElement extends Node var onmouseout : haxe.Constraints.Function; var onmouseover : haxe.Constraints.Function; var onmouseup : haxe.Constraints.Function; + + /** + Returns the event handling code for the `wheel` event. This is now implemented on `GlobalEventHandlers.onwheel`. + **/ + var onwheel : haxe.Constraints.Function; var onpause : haxe.Constraints.Function; var onplay : haxe.Constraints.Function; var onplaying : haxe.Constraints.Function; @@ -136,6 +240,8 @@ extern class DOMElement extends Node var ontimeupdate : haxe.Constraints.Function; var onvolumechange : haxe.Constraints.Function; var onwaiting : haxe.Constraints.Function; + var onselectstart : haxe.Constraints.Function; + var ontoggle : haxe.Constraints.Function; var onpointercancel : haxe.Constraints.Function; var onpointerdown : haxe.Constraints.Function; var onpointerup : haxe.Constraints.Function; @@ -144,12 +250,28 @@ extern class DOMElement extends Node var onpointerover : haxe.Constraints.Function; var onpointerenter : haxe.Constraints.Function; var onpointerleave : haxe.Constraints.Function; + + /** + Returns the event handler for the `gotpointercapture` event type. + **/ var ongotpointercapture : haxe.Constraints.Function; + + /** + Returns the event handler for the `lostpointercapture` event type. + **/ var onlostpointercapture : haxe.Constraints.Function; - var onfullscreenchange : haxe.Constraints.Function; - var onfullscreenerror : haxe.Constraints.Function; - var onpointerlockchange : haxe.Constraints.Function; - var onpointerlockerror : haxe.Constraints.Function; + var onanimationcancel : haxe.Constraints.Function; + var onanimationend : haxe.Constraints.Function; + var onanimationiteration : haxe.Constraints.Function; + var onanimationstart : haxe.Constraints.Function; + var ontransitioncancel : haxe.Constraints.Function; + var ontransitionend : haxe.Constraints.Function; + var ontransitionrun : haxe.Constraints.Function; + var ontransitionstart : haxe.Constraints.Function; + var onwebkitanimationend : haxe.Constraints.Function; + var onwebkitanimationiteration : haxe.Constraints.Function; + var onwebkitanimationstart : haxe.Constraints.Function; + var onwebkittransitionend : haxe.Constraints.Function; var previousElementSibling(default,null) : Element; var nextElementSibling(default,null) : Element; var onerror : haxe.Constraints.Function; @@ -162,95 +284,270 @@ extern class DOMElement extends Node var ontouchmove : haxe.Constraints.Function; var ontouchcancel : haxe.Constraints.Function; + + /** + Returns an array of attribute names from the current element. + **/ + @:pure function getAttributeNames() : Array; + + /** + Retrieves the value of the named attribute from the current node and returns it as an `Object`. + **/ + @:pure function getAttribute( name : String ) : String; - function getAttributeNS( namespace_ : String, localName : String ) : String; - /** @throws DOMError */ + + /** + Retrieves the value of the attribute with the specified name and namespace, from the current node and returns it as an `Object`. + **/ + @:pure + function getAttributeNS( namespace : String, localName : String ) : String; + + /** + Toggles a boolean attribute, removing it if it is present and adding it if it is not present, on the specified element. + @throws DOMError + **/ + function toggleAttribute( name : String, ?force : Bool ) : Bool; + + /** + Sets the value of a named attribute of the current node. + @throws DOMError + **/ function setAttribute( name : String, value : String ) : Void; - /** @throws DOMError */ - function setAttributeNS( namespace_ : String, name : String, value : String ) : Void; - /** @throws DOMError */ + + /** + Sets the value of the attribute with the specified name and namespace, from the current node. + @throws DOMError + **/ + function setAttributeNS( namespace : String, name : String, value : String ) : Void; + + /** + Removes the named attribute from the current node. + @throws DOMError + **/ function removeAttribute( name : String ) : Void; - /** @throws DOMError */ - function removeAttributeNS( namespace_ : String, localName : String ) : Void; + + /** + Removes the attribute with the specified name and namespace, from the current node. + @throws DOMError + **/ + function removeAttributeNS( namespace : String, localName : String ) : Void; + + /** + Returns a `Boolean` indicating if the element has the specified attribute or not. + **/ + @:pure function hasAttribute( name : String ) : Bool; - function hasAttributeNS( namespace_ : String, localName : String ) : Bool; + + /** + Returns a `Boolean` indicating if the element has the specified attribute, in the specified namespace, or not. + **/ + @:pure + function hasAttributeNS( namespace : String, localName : String ) : Bool; + + /** + Returns a `Boolean` indicating if the element has one or more HTML attributes present. + **/ + @:pure function hasAttributes() : Bool; - /** @throws DOMError */ + + /** + Returns the `Element` which is the closest ancestor of the current element (or the current element itself) which matches the selectors given in parameter. + @throws DOMError + **/ + @:pure function closest( selector : String ) : Element; - /** @throws DOMError */ + + /** + Returns a `Boolean` indicating whether or not the element would be selected by the specified selector string. + @throws DOMError + **/ + @:pure function matches( selector : String ) : Bool; /** @throws DOMError */ + @:pure function webkitMatchesSelector( selector : String ) : Bool; + + /** + Returns a live `HTMLCollection` containing all descendant elements, of a particular tag name, from the current element. + **/ + @:pure function getElementsByTagName( localName : String ) : HTMLCollection; - /** @throws DOMError */ - function getElementsByTagNameNS( namespace_ : String, localName : String ) : HTMLCollection; + + /** + Returns a live `HTMLCollection` containing all descendant elements, of a particular tag name and namespace, from the current element. + @throws DOMError + **/ + @:pure + function getElementsByTagNameNS( namespace : String, localName : String ) : HTMLCollection; + + /** + Returns a live `HTMLCollection` that contains all descendants of the current element that possess the list of classes given in the parameter. + **/ + @:pure function getElementsByClassName( classNames : String ) : HTMLCollection; - /** @throws DOMError */ /** - Designates a specific element as the capture target of future `PointerEvent`. + Inserts a given element node at a given position relative to the element it is invoked upon. + @throws DOMError + **/ + @:pure + function insertAdjacentElement( where : String, element : Element ) : Element; + + /** + Inserts a given text node at a given position relative to the element it is invoked upon. + @throws DOMError + **/ + function insertAdjacentText( where : String, data : String ) : Void; + + /** + Designates a specific element as the capture target of future pointer events. + @throws DOMError **/ function setPointerCapture( pointerId : Int ) : Void; - /** @throws DOMError */ + + /** + Releases (stops) pointer capture that was previously set for a specific `PointerEvent`. + @throws DOMError + **/ function releasePointerCapture( pointerId : Int ) : Void; - function setCapture( ?retargetToElement : Bool = false ) : Void; + function hasPointerCapture( pointerId : Int ) : Bool; + + /** + Sets up mouse event capture, redirecting all mouse events to this element. + **/ + function setCapture( retargetToElement : Bool = false ) : Void; function releaseCapture() : Void; - function requestPointerLock() : Void; + + /** + Retrieves the node representation of the named attribute from the current node and returns it as an `Attr`. + **/ function getAttributeNode( name : String ) : Attr; - /** @throws DOMError */ + + /** + Sets the node representation of the named attribute from the current node. + @throws DOMError + **/ function setAttributeNode( newAttr : Attr ) : Attr; - /** @throws DOMError */ + + /** + Removes the node representation of the named attribute from the current node. + @throws DOMError + **/ function removeAttributeNode( oldAttr : Attr ) : Attr; + + /** + Retrieves the node representation of the attribute with the specified name and namespace, from the current node and returns it as an `Attr`. + **/ function getAttributeNodeNS( namespaceURI : String, localName : String ) : Attr; - /** @throws DOMError */ + + /** + Sets the node representation of the attribute with the specified name and namespace, from the current node. + @throws DOMError + **/ function setAttributeNodeNS( newAttr : Attr ) : Attr; function click() : Void; /** @throws DOMError */ function focus() : Void; /** @throws DOMError */ function blur() : Void; + + /** + Returns a collection of rectangles that indicate the bounding rectangles for each line of text in a client. + **/ function getClientRects() : DOMRectList; + + /** + Returns the size of an element and its position relative to the viewport. + **/ function getBoundingClientRect() : DOMRect; - @:overload( function( top : Bool ) : Void {} ) - function scrollIntoView( ?options : ScrollIntoViewOptions ) : Void; + + /** + Scrolls the page until the element gets into the view. + **/ + @:overload( function( ?arg : ScrollIntoViewOptions) : Void {} ) + function scrollIntoView( ?arg : Bool ) : Void; @:overload( function( x : Float, y : Float ) : Void {} ) function scroll( ?options : ScrollToOptions ) : Void; @:overload( function( x : Float, y : Float ) : Void {} ) function scrollTo( ?options : ScrollToOptions ) : Void; @:overload( function( x : Float, y : Float ) : Void {} ) function scrollBy( ?options : ScrollToOptions ) : Void; - /** @throws DOMError */ + + /** + Parses the text as HTML or XML and inserts the resulting nodes into the tree in the position given. + @throws DOMError + **/ function insertAdjacentHTML( position : String, text : String ) : Void; - /** @throws DOMError */ + + /** + Returns the first `Node` which matches the specified selector string relative to the element. + @throws DOMError + **/ + @:pure function querySelector( selectors : String ) : Element; - /** @throws DOMError */ + + /** + Returns a `NodeList` of nodes which match the specified selector string relative to the element. + @throws DOMError + **/ + @:pure function querySelectorAll( selectors : String ) : NodeList; - /** @throws DOMError */ - function createShadowRoot() : ShadowRoot; /** - … + Attatches a shadow DOM tree to the specified element and returns a reference to its `ShadowRoot`. + @throws DOMError **/ - function getDestinationInsertionPoints() : NodeList; - /** @throws DOMError */ - function requestFullscreen( ?options : Dynamic ) : Void; - /** @throws DOMError */ + function attachShadow( shadowRootInitDict : ShadowRootInit ) : ShadowRoot; + + /** + Asynchronously asks the browser to make the element full-screen. + @throws DOMError + **/ + function requestFullscreen() : Void; + + /** + Allows to asynchronously ask for the pointer to be locked on the given element. + **/ + function requestPointerLock() : Void; /** A shortcut method to create and run an animation on an element. Returns the created Animation object instance. + @throws DOMError **/ - function animate( frames : Dynamic, ?options : haxe.extern.EitherType ) : Animation; + @:overload( function( keyframes : Dynamic, ?options : KeyframeAnimationOptions) : Animation {} ) + function animate( keyframes : Dynamic, ?options : Float ) : Animation; /** Returns an array of Animation objects currently active on the element. **/ - function getAnimations() : Array; + function getAnimations( ?filter : AnimationFilter ) : Array; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function before( nodes : haxe.extern.Rest ) : Void; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function after( nodes : haxe.extern.Rest ) : Void; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function replaceWith( nodes : haxe.extern.Rest ) : Void; function remove() : Void; /** @throws DOMError */ - function convertQuadFromNode( quad : DOMQuad, from : haxe.extern.EitherType>, ?options : ConvertCoordinateOptions ) : DOMQuad; + @:overload( function( quad : DOMQuad, from : Element, ?options : ConvertCoordinateOptions) : DOMQuad {} ) + @:overload( function( quad : DOMQuad, from : HTMLDocument, ?options : ConvertCoordinateOptions) : DOMQuad {} ) + function convertQuadFromNode( quad : DOMQuad, from : Text, ?options : ConvertCoordinateOptions ) : DOMQuad; + /** @throws DOMError */ + @:overload( function( rect : DOMRectReadOnly, from : Element, ?options : ConvertCoordinateOptions) : DOMQuad {} ) + @:overload( function( rect : DOMRectReadOnly, from : HTMLDocument, ?options : ConvertCoordinateOptions) : DOMQuad {} ) + function convertRectFromNode( rect : DOMRectReadOnly, from : Text, ?options : ConvertCoordinateOptions ) : DOMQuad; + /** @throws DOMError */ + @:overload( function( point : DOMPointInit, from : Element, ?options : ConvertCoordinateOptions) : DOMPoint {} ) + @:overload( function( point : DOMPointInit, from : HTMLDocument, ?options : ConvertCoordinateOptions) : DOMPoint {} ) + function convertPointFromNode( point : DOMPointInit, from : Text, ?options : ConvertCoordinateOptions ) : DOMPoint; /** @throws DOMError */ - function convertRectFromNode( rect : DOMRectReadOnly, from : haxe.extern.EitherType>, ?options : ConvertCoordinateOptions ) : DOMQuad; + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function prepend( nodes : haxe.extern.Rest ) : Void; /** @throws DOMError */ - function convertPointFromNode( point : DOMPointInit, from : haxe.extern.EitherType>, ?options : ConvertCoordinateOptions ) : DOMPoint; + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function append( nodes : haxe.extern.Rest ) : Void; } \ No newline at end of file diff --git a/std/js/html/DOMError.hx b/std/js/html/DOMError.hx index 620d181d5b57a858fd6f496fa367f6fd980040aa..d2d100a38872ddc9f9d02af0757c7db50bfd2568 100644 --- a/std/js/html/DOMError.hx +++ b/std/js/html/DOMError.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,15 +32,18 @@ package js.html; @see **/ @:native("DOMError") -extern class DOMError -{ +extern class DOMError { /** Returns a `DOMString` representing one of the error type names (see below). **/ var name(default,null) : String; + + /** + Returns a `DOMString` representing a message or description associated with the given error type name. + **/ var message(default,null) : String; /** @throws DOMError */ - function new( name : String, ?message : String = "" ) : Void; + function new( name : String, message : String = "" ) : Void; } \ No newline at end of file diff --git a/std/js/html/DOMException.hx b/std/js/html/DOMException.hx index f916d101df83df82786a52fb21033350ce6d051a..5729e027d9f0d7a2b19befe77b81bd88dcfaf244 100644 --- a/std/js/html/DOMException.hx +++ b/std/js/html/DOMException.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,15 +25,14 @@ package js.html; /** - The `DOMException` interface represents an abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. This is basically how error conditions are described in web APIs. + The `DOMException` interface represents an abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. Documentation [DOMException](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMException$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("DOMException") -extern class DOMException -{ +extern class DOMException { static inline var INDEX_SIZE_ERR : Int = 1; static inline var DOMSTRING_SIZE_ERR : Int = 2; static inline var HIERARCHY_REQUEST_ERR : Int = 3; @@ -60,16 +59,28 @@ extern class DOMException static inline var INVALID_NODE_TYPE_ERR : Int = 24; static inline var DATA_CLONE_ERR : Int = 25; - var code(default,null) : Int; + + /** + Returns a `DOMString` that contains one of the strings associated with an error name. + **/ + var name(default,null) : String; + + /** + Returns a `DOMString` representing a message or description associated with the given error name. + **/ var message(default,null) : String; + + /** + Returns a `short` that contains one of the `Error codes`, or `0` if none match. This field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the `DOMException.name` attribute. + **/ + var code(default,null) : Int; var result(default,null) : Int; - var name(default,null) : String; var filename(default,null) : String; var lineNumber(default,null) : Int; var columnNumber(default,null) : Int; - var data(default,null) : Dynamic/*MISSING nsISupports*/; + var data(default,null) : Dynamic; var stack(default,null) : String; /** @throws DOMError */ - function new( ?message : String = "", ?name : String ) : Void; + function new( message : String = "", ?name : String ) : Void; } \ No newline at end of file diff --git a/std/js/html/DOMImplementation.hx b/std/js/html/DOMImplementation.hx index 23b8178d2932dbd76dd254008c1fb374de840dbf..ae021c85f65cc6b27ee9283a37f82b21549e651d 100644 --- a/std/js/html/DOMImplementation.hx +++ b/std/js/html/DOMImplementation.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,29 +32,28 @@ package js.html; @see **/ @:native("DOMImplementation") -extern class DOMImplementation -{ +extern class DOMImplementation { /** Returns a `Boolean` indicating if a given feature is supported or not. This function is unreliable and kept for compatibility purpose alone: except for SVG-related queries, it always returns `true`. Old browsers are very inconsistent in their behavior. **/ - function hasFeature( feature : String, version : String ) : Bool; - /** @throws DOMError */ + function hasFeature() : Bool; /** Creates and returns a `DocumentType`. + @throws DOMError **/ function createDocumentType( qualifiedName : String, publicId : String, systemId : String ) : DocumentType; - /** @throws DOMError */ /** Creates and returns an `XMLDocument`. + @throws DOMError **/ - function createDocument( namespace_ : String, qualifiedName : String, ?doctype : DocumentType ) : HTMLDocument; - /** @throws DOMError */ + function createDocument( namespace : String, qualifiedName : String, ?doctype : DocumentType ) : HTMLDocument; /** Creates and returns an HTML `Document`. + @throws DOMError **/ function createHTMLDocument( ?title : String ) : HTMLDocument; } \ No newline at end of file diff --git a/std/js/html/DOMMatrix.hx b/std/js/html/DOMMatrix.hx index 2382e8b08bd6e65e75ada6f08793252f9974b29a..988908c430c5d69910a3b9a8b57e4ef53ebc95b8 100644 --- a/std/js/html/DOMMatrix.hx +++ b/std/js/html/DOMMatrix.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,14 +32,13 @@ package js.html; @see **/ @:native("DOMMatrix") -extern class DOMMatrix extends DOMMatrixReadOnly -{ +extern class DOMMatrix extends DOMMatrixReadOnly { /** @throws DOMError */ @:overload( function() : Void {} ) @:overload( function( transformList : String ) : Void {} ) @:overload( function( other : DOMMatrixReadOnly ) : Void {} ) - @:overload( function( array32 : Float32Array ) : Void {} ) - @:overload( function( array64 : Float64Array ) : Void {} ) + @:overload( function( array32 : js.lib.Float32Array ) : Void {} ) + @:overload( function( array64 : js.lib.Float64Array ) : Void {} ) function new( numberSequence : Array ) : Void; function multiplySelf( other : DOMMatrix ) : DOMMatrix; function preMultiplySelf( other : DOMMatrix ) : DOMMatrix; @@ -47,27 +46,27 @@ extern class DOMMatrix extends DOMMatrixReadOnly /** Returns itself, a `DOMMatrix`, with its new content being the result of the matrix being translated by the given vector. **/ - function translateSelf( tx : Float, ty : Float, ?tz : Float = 0.0 ) : DOMMatrix; + function translateSelf( tx : Float, ty : Float, tz : Float = 0.0 ) : DOMMatrix; /** Returns itself, a `DOMMatrix`, with its new content being the result of the matrix x and y dimensions being scaled by the given factor, centered on the origin given. **/ - function scaleSelf( scale : Float, ?originX : Float = 0.0, ?originY : Float = 0.0 ) : DOMMatrix; + function scaleSelf( scale : Float, originX : Float = 0.0, originY : Float = 0.0 ) : DOMMatrix; /** Returns itself, a `DOMMatrix`, with its new content being the result of the matrix x, y and z dimension being scaled by the given factor, centered on the origin given. **/ - function scale3dSelf( scale : Float, ?originX : Float = 0.0, ?originY : Float = 0.0, ?originZ : Float = 0.0 ) : DOMMatrix; + function scale3dSelf( scale : Float, originX : Float = 0.0, originY : Float = 0.0, originZ : Float = 0.0 ) : DOMMatrix; /** Returns itself, a `DOMMatrix`, with its new content being the result of the matrix x, y and z dimension being scaled by the given factor for each dimension, centered on the origin given. **/ - function scaleNonUniformSelf( scaleX : Float, ?scaleY : Float = 1.0, ?scaleZ : Float = 1.0, ?originX : Float = 0.0, ?originY : Float = 0.0, ?originZ : Float = 0.0 ) : DOMMatrix; + function scaleNonUniformSelf( scaleX : Float, scaleY : Float = 1.0, scaleZ : Float = 1.0, originX : Float = 0.0, originY : Float = 0.0, originZ : Float = 0.0 ) : DOMMatrix; /** Returns itself, a `DOMMatrix`, with its new content being the result of the original matrix being rotated by the given angle, with the rotation centered on the origin given. **/ - function rotateSelf( angle : Float, ?originX : Float = 0.0, ?originY : Float = 0.0 ) : DOMMatrix; + function rotateSelf( angle : Float, originX : Float = 0.0, originY : Float = 0.0 ) : DOMMatrix; /** Returns itself, a `DOMMatrix`, with its new content being the result of the original matrix being rotated by the angle between the given vector and (1,0), centered on the origin given. @@ -93,10 +92,10 @@ extern class DOMMatrix extends DOMMatrixReadOnly Returns itself,  a `DOMMatrix`, with its new content being the result of the original matrix being inverted. If the matrix cannot be inverted, all its components are set to `NaN` and `is2D()` returns `false`. **/ function invertSelf() : DOMMatrix; - /** @throws DOMError */ /** Returns itself, a `DOMMatrix`, with its describing the matrix representing the same transformation as the CSS `transform` functions given in parameter. + @throws DOMError **/ function setMatrixValue( transformList : String ) : DOMMatrix; } \ No newline at end of file diff --git a/std/js/html/DOMMatrixReadOnly.hx b/std/js/html/DOMMatrixReadOnly.hx index 840621a43010b5a35a66e02c575a6d922323992c..9d53f6584e235ca93091c8f86ae38d7e04141d0e 100644 --- a/std/js/html/DOMMatrixReadOnly.hx +++ b/std/js/html/DOMMatrixReadOnly.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,46 +32,45 @@ package js.html; @see **/ @:native("DOMMatrixReadOnly") -extern class DOMMatrixReadOnly -{ +extern class DOMMatrixReadOnly { /** Are double representing each component of a 4x4 matrix needed for 2D rotations and translations. They are aliases for some components of the 4x4 matrix: - - - - 2D - 3D equivalent - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    am11
    bm12
    cm21
    dm22
    em41
    fm42
    - They are read-only, but their counterpart, with the same name, in DOMMatrix aren't. + + + + 2D + 3D equivalent + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    am11
    bm12
    cm21
    dm22
    em41
    fm42
    + They are read-only, but their counterpart, with the same name, in DOMMatrix aren't. **/ var a(default,null) : Float; var b(default,null) : Float; @@ -104,33 +103,40 @@ extern class DOMMatrixReadOnly Is a `Boolean` indicating if the matrix contains a 2D matrix and only accept 2D transformations. **/ var is2D(default,null) : Bool; - var identity(default,null) : Bool; + /** + Is a `Boolean` indincating if the matrix identity, that is a matrix with `1` on the components of its diagonal, and `0` elsewhere. + **/ + var isIdentity(default,null) : Bool; + + /** @throws DOMError */ + @:overload( function( ?init : Array) : DOMMatrixReadOnly {} ) + function new( ?init : String ) : Void; /** Returns a `DOMMatrix` containing a new matrix being the result of the matrix being translated by the given vector. The original matrix is not modified. **/ - function translate( tx : Float, ty : Float, ?tz : Float = 0.0 ) : DOMMatrix; + function translate( tx : Float, ty : Float, tz : Float = 0.0 ) : DOMMatrix; /** Returns a `DOMMatrix` containing a new matrix being the result of the matrix x and y dimensions being scaled by the given factor, centered on the origin given. The original matrix is not modified. **/ - function scale( scale : Float, ?originX : Float = 0.0, ?originY : Float = 0.0 ) : DOMMatrix; + function scale( scale : Float, originX : Float = 0.0, originY : Float = 0.0 ) : DOMMatrix; /** Returns a `DOMMatrix` containing a new matrix being the result of the matrix x, y and z dimension being scaled by the given factor, centered on the origin given. The original matrix is not modified. **/ - function scale3d( scale : Float, ?originX : Float = 0.0, ?originY : Float = 0.0, ?originZ : Float = 0.0 ) : DOMMatrix; + function scale3d( scale : Float, originX : Float = 0.0, originY : Float = 0.0, originZ : Float = 0.0 ) : DOMMatrix; /** Returns a `DOMMatrix` containing a new matrix being the result of the matrix x, y and z dimension being scaled by the given factor for each dimension, centered on the origin given. The original matrix is not modified. **/ - function scaleNonUniform( scaleX : Float, ?scaleY : Float = 1.0, ?scaleZ : Float = 1.0, ?originX : Float = 0.0, ?originY : Float = 0.0, ?originZ : Float = 0.0 ) : DOMMatrix; + function scaleNonUniform( scaleX : Float, scaleY : Float = 1.0, scaleZ : Float = 1.0, originX : Float = 0.0, originY : Float = 0.0, originZ : Float = 0.0 ) : DOMMatrix; /** Returns a `DOMMatrix` containing a new matrix being the result of the original matrix being rotated by the given angle, with the rotation centered on the origin given. The original matrix is not modified. **/ - function rotate( angle : Float, ?originX : Float = 0.0, ?originY : Float = 0.0 ) : DOMMatrix; + function rotate( angle : Float, originX : Float = 0.0, originY : Float = 0.0 ) : DOMMatrix; /** Returns a `DOMMatrix` containing a new matrix being the result of the original matrix being rotated by the angle between the given vector and (1,0), centered on the origin given. The original matrix is not modified. @@ -138,7 +144,7 @@ extern class DOMMatrixReadOnly function rotateFromVector( x : Float, y : Float ) : DOMMatrix; /** - Returns a `DOMMatrix` containing a new matrix being the result of the original matrix being rotated by the given angle and the give vector. The original matrix is not modified. + Returns a `DOMMatrix` containing a new matrix being the result of the original matrix being rotated by the given angle and the given vector. The original matrix is not modified. **/ function rotateAxisAngle( x : Float, y : Float, z : Float, angle : Float ) : DOMMatrix; @@ -166,22 +172,31 @@ extern class DOMMatrixReadOnly Returns a `DOMMatrix` containing a new matrix being the result of the original matrix being flipped around the y-axis, that is multiplied by the `DOMMatrix(1, 0, 0, -1, 0, 0)`. The original matrix is not modified. **/ function flipY() : DOMMatrix; + + /** + Returns a `DOMMatrix` containing a new matrix being the result of the original matrix being inverted. The original matrix is not modified. If the matrix cannot be inverted, all its components are set to `NaN` and `is2D()` returns `false`. + **/ function inverse() : DOMMatrix; /** - Returns a `DOMPoint` that is the point given in parameter multiplied by the matrix. Bot the original point and the matrix aren't modified. + Returns a `DOMPoint` that is the point given in parameter multiplied by the matrix. But the original point and the matrix aren't modified. **/ function transformPoint( ?point : DOMPointInit ) : DOMPoint; - /** @throws DOMError */ /** Returns a `Float32Array` containing the 6 components (`a`, `b`, `c`, `d`, `e`, `f`) in the case of a 2D matrix or the 16 components (`m11`, `m12`, `m13`, `m14`, `m21`, `m22`, `m23`, `m24`, `m31`, `m32`, `m33`, `m34`, `m41`, `m42`, `m43`, `m44`) for a 3D matrix. + @throws DOMError **/ - function toFloat32Array() : Float32Array; - /** @throws DOMError */ + function toFloat32Array() : js.lib.Float32Array; /** Returns a `Float64Array` containing the 6 components (`a`, `b`, `c`, `d`, `e`, `f`) in the case of a 2D matrix or the 16 components (`m11`, `m12`, `m13`, `m14`, `m21`, `m22`, `m23`, `m24`, `m31`, `m32`, `m33`, `m34`, `m41`, `m42`, `m43`, `m44`) for a 3D matrix. + @throws DOMError + **/ + function toFloat64Array() : js.lib.Float64Array; + + /** + Returns a JSON representation of the `DOMMatrixReadOnly` object. **/ - function toFloat64Array() : Float64Array; + function toJSON() : Dynamic; } \ No newline at end of file diff --git a/std/js/html/DOMParser.hx b/std/js/html/DOMParser.hx index c194a513938c14964059539e92067c282765b4e5..23ac2fa4723ff4614769dac5be9a98cc96d996d1 100644 --- a/std/js/html/DOMParser.hx +++ b/std/js/html/DOMParser.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,18 +25,16 @@ package js.html; /** - `DOMParser` can parse XML or HTML source stored in a string into a DOM Document. `DOMParser` is specified in DOM Parsing and Serialization. + The `DOMParser` interface provides the ability to parse XML or HTML source code from a string into a DOM `Document`. Documentation [DOMParser](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("DOMParser") -extern class DOMParser -{ +extern class DOMParser { /** @throws DOMError */ - @:overload( function() : Void {} ) - function new( prin : Dynamic/*MISSING Principal*/, ?documentURI : Dynamic/*MISSING URI*/, ?baseURI : Dynamic/*MISSING URI*/ ) : Void; + function new() : Void; /** @throws DOMError */ function parseFromString( str : String, type : SupportedType ) : HTMLDocument; } \ No newline at end of file diff --git a/std/js/html/DOMPoint.hx b/std/js/html/DOMPoint.hx index 6608b2bb5493d7958ba5fb7c70dac925f532d0cc..efc7962ca7103c5cc02a4f63edd3357f8cb4836f 100644 --- a/std/js/html/DOMPoint.hx +++ b/std/js/html/DOMPoint.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,16 +25,15 @@ package js.html; /** - A `DOMPoint` represents a 2D or 3D point in a coordinate system. + A `DOMPoint` object represents a 2D or 3D point in a coordinate system; it includes values for the coordinates in up to three dimensions, as well as an optional perspective value. Documentation [DOMPoint](https://developer.mozilla.org/en-US/docs/Web/API/DOMPoint) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMPoint$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("DOMPoint") -extern class DOMPoint extends DOMPointReadOnly -{ +extern class DOMPoint extends DOMPointReadOnly { + static function fromPoint( ?other : DOMPointInit ) : DOMPoint; /** @throws DOMError */ - @:overload( function( ?point : DOMPointInit ) : Void {} ) - function new( x : Float, y : Float, ?z : Float = 0.0, ?w : Float = 1.0 ) : Void; + function new( x : Float = 0.0, y : Float = 0.0, z : Float = 0.0, w : Float = 1.0 ) : Void; } \ No newline at end of file diff --git a/std/js/html/DOMPointInit.hx b/std/js/html/DOMPointInit.hx index 54dee931c2ed3b84bb432f1c1e65fb1352644488..0c013b6d0cf276030edbefa422058d2a9ca2eaa8 100644 --- a/std/js/html/DOMPointInit.hx +++ b/std/js/html/DOMPointInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,10 +24,32 @@ package js.html; -typedef DOMPointInit = -{ - @:optional var w : Float; - @:optional var x : Float; - @:optional var y : Float; - @:optional var z : Float; +/** + The `DOMPointInit` dictionary is used to provide the values of the coordinates and perspective when creating and JSONifying a `DOMPoint` or `DOMPointReadOnly` object. + + Documentation [DOMPointInit](https://developer.mozilla.org/en-US/docs/Web/API/DOMPointInit) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMPointInit$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +typedef DOMPointInit = { + + /** + The point's w perspective value given as an unrestricted floating-point number. The default is 1. + **/ + var ?w : Float; + + /** + An unrestricted floating-point value indicating the x-coordinate of the point in space. This is generally the horizontal coordinate, with positive values being to the right and negative values to the left. The default value is 0. + **/ + var ?x : Float; + + /** + An unrestricted floating-point number providing the point's y-coordinate. This is the vertical coordinate, and barring any transforms applied to the coordinate system, positive values are downward and negative values upward toward the top of the screen. The default is 0. + **/ + var ?y : Float; + + /** + An unrestricted floating-point value which gives the point's z-coordinate, which is (assuming no transformations that alter the situation) the depth coordinate; positive values are closer to the user and negative values retreat back into the screen. The default value is 0. + **/ + var ?z : Float; } \ No newline at end of file diff --git a/std/js/html/DOMPointReadOnly.hx b/std/js/html/DOMPointReadOnly.hx index 9a4f7c882dfe9b3ea8fd920bcbd50aeba22ba15b..ea0d32ab852e6bd11886f62f3e60a68709cc9673 100644 --- a/std/js/html/DOMPointReadOnly.hx +++ b/std/js/html/DOMPointReadOnly.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,34 +25,41 @@ package js.html; /** - The `DOMPointReadOnly` interface specifies the standard properties used by `DOMPoint` to define a 2D or 3D point in a coordinate system. + The `DOMPointReadOnly` interface specifies the coordinate and perspective fields used by `DOMPoint` to define a 2D or 3D point in a coordinate system. Documentation [DOMPointReadOnly](https://developer.mozilla.org/en-US/docs/Web/API/DOMPointReadOnly) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMPointReadOnly$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("DOMPointReadOnly") -extern class DOMPointReadOnly -{ +extern class DOMPointReadOnly { + static function fromPoint( ?other : DOMPointInit ) : DOMPointReadOnly; /** - The x coordinate of the `DOMPoint`. + The point's horizontal coordinate, `x`. **/ var x(default,null) : Float; /** - The y coordinate of the `DOMPoint`. + The point's vertical coordinate, `y`. **/ var y(default,null) : Float; /** - The z coordinate of the `DOMPoint`. + The point's depth coordinate, `z`. **/ var z(default,null) : Float; /** - The perspective value of the `DOMPoint`. + The point's perspective value, `w`. **/ var w(default,null) : Float; + /** @throws DOMError */ + function new( x : Float = 0.0, y : Float = 0.0, z : Float = 0.0, w : Float = 1.0 ) : Void; + + /** + Returns a JSON representation of the `DOMPointReadOnly` object. + **/ + function toJSON() : Dynamic; } \ No newline at end of file diff --git a/std/js/html/DOMQuad.hx b/std/js/html/DOMQuad.hx index 9915a5d748f2f8f3e7406efd4180fadb071a0e25..003bf1f20465baf1dc153fd97fff208779434fa0 100644 --- a/std/js/html/DOMQuad.hx +++ b/std/js/html/DOMQuad.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,9 +24,19 @@ package js.html; +/** + A `DOMQuad` is a collection of four `DOMPoint`s defining the corners of an arbitrary quadrilateral. Returning `DOMQuad`s lets `getBoxQuads()` return accurate information even when arbitrary 2D or 3D transforms are present. It has a handy `bounds` attribute returning a `DOMRectReadOnly` for those cases where you just want an axis-aligned bounding rectangle. + + Documentation [DOMQuad](https://developer.mozilla.org/en-US/docs/Web/API/DOMQuad) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMQuad$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ @:native("DOMQuad") -extern class DOMQuad -{ +extern class DOMQuad { + + /** + are `DOMPoint` objects for each of the `DOMQuad` object's four corners. + **/ var p1(default,null) : DOMPoint; var p2(default,null) : DOMPoint; var p3(default,null) : DOMPoint; @@ -36,4 +46,14 @@ extern class DOMQuad /** @throws DOMError */ @:overload( function( ?p1 : DOMPointInit, ?p2 : DOMPointInit, ?p3 : DOMPointInit, ?p4 : DOMPointInit ) : Void {} ) function new( rect : DOMRectReadOnly ) : Void; + + /** + Returns a `DOMRect` object with the coordinates and dimensions of the `DOMQuad` object. + **/ + function getBounds() : DOMRectReadOnly; + + /** + Returns a JSON representation of the `DOMQuad` object. + **/ + function toJSON() : DOMQuadJSON; } \ No newline at end of file diff --git a/std/js/html/DOMQuadJSON.hx b/std/js/html/DOMQuadJSON.hx new file mode 100644 index 0000000000000000000000000000000000000000..7f934fe77fa1fb7a1af8ec55fe3ca5c42633fea6 --- /dev/null +++ b/std/js/html/DOMQuadJSON.hx @@ -0,0 +1,32 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\DOMQuad.webidl. Do not edit! + +package js.html; + +typedef DOMQuadJSON = { + var ?p1 : DOMPoint; + var ?p2 : DOMPoint; + var ?p3 : DOMPoint; + var ?p4 : DOMPoint; +} \ No newline at end of file diff --git a/std/js/html/DOMRect.hx b/std/js/html/DOMRect.hx index 5e3de87d4834b099279519ef3aa0f49d00f8cc7d..ee6a154a2d090c54af37525ede55cfab2470a712 100644 --- a/std/js/html/DOMRect.hx +++ b/std/js/html/DOMRect.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,9 +32,7 @@ package js.html; @see **/ @:native("DOMRect") -extern class DOMRect extends DOMRectReadOnly -{ +extern class DOMRect extends DOMRectReadOnly { /** @throws DOMError */ - @:overload( function() : Void {} ) - function new( x : Float, y : Float, width : Float, height : Float ) : Void; + function new( x : Float = 0.0, y : Float = 0.0, width : Float = 0.0, height : Float = 0.0 ) : Void; } \ No newline at end of file diff --git a/std/js/html/DOMRectList.hx b/std/js/html/DOMRectList.hx index 01be0eb5b71993bcdeaf4530a4e9a77e8c70334a..582a84973dfcfaaafbdd2677ac23d90dbbbc4838 100644 --- a/std/js/html/DOMRectList.hx +++ b/std/js/html/DOMRectList.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,8 +25,7 @@ package js.html; @:native("DOMRectList") -extern class DOMRectList implements ArrayAccess -{ +extern class DOMRectList implements ArrayAccess { var length(default,null) : Int; function item( index : Int ) : DOMRect; diff --git a/std/js/html/DOMRectReadOnly.hx b/std/js/html/DOMRectReadOnly.hx index 66f743e3ba14eaf9d26883488753300c70c5cf4a..f12cbe65b6630deb000fb3fa52ac76e70da20727 100644 --- a/std/js/html/DOMRectReadOnly.hx +++ b/std/js/html/DOMRectReadOnly.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("DOMRectReadOnly") -extern class DOMRectReadOnly -{ +extern class DOMRectReadOnly { /** The x coordinate of the `DOMRect`'s origin. @@ -75,4 +74,7 @@ extern class DOMRectReadOnly **/ var left(default,null) : Float; + /** @throws DOMError */ + function new( x : Float = 0.0, y : Float = 0.0, width : Float = 0.0, height : Float = 0.0 ) : Void; + function toJSON() : Dynamic; } \ No newline at end of file diff --git a/std/js/html/DOMRequest.hx b/std/js/html/DOMRequest.hx index 21b498227102ac7548a8b20ac8143146e7696948..630bc86fb90143dec23bcb899dd40660bf119691 100644 --- a/std/js/html/DOMRequest.hx +++ b/std/js/html/DOMRequest.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,11 +25,10 @@ package js.html; @:native("DOMRequest") -extern class DOMRequest extends EventTarget -{ +extern class DOMRequest extends EventTarget { var readyState(default,null) : DOMRequestReadyState; var result(default,null) : Dynamic; - var error(default,null) : DOMError; + var error(default,null) : DOMException; var onsuccess : haxe.Constraints.Function; var onerror : haxe.Constraints.Function; diff --git a/std/js/html/DOMRequestReadyState.hx b/std/js/html/DOMRequestReadyState.hx index 6935f2302ce16b4c45c83fa4f031a138089e1cf8..0fbe5ccaf9b28ebd75b48eb0ea143335f92fb1fc 100644 --- a/std/js/html/DOMRequestReadyState.hx +++ b/std/js/html/DOMRequestReadyState.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -@:enum abstract DOMRequestReadyState(String) -{ +enum abstract DOMRequestReadyState(String) { var PENDING = "pending"; var DONE = "done"; } \ No newline at end of file diff --git a/std/js/html/DOMStringList.hx b/std/js/html/DOMStringList.hx index 2b8c6bd9f3f13a641eda048f8d006ac906e46b79..199603a5166e1b586ae101b82f327e55c7eb00d7 100644 --- a/std/js/html/DOMStringList.hx +++ b/std/js/html/DOMStringList.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("DOMStringList") -extern class DOMStringList implements ArrayAccess -{ +extern class DOMStringList implements ArrayAccess { /** Returns the length of the list, diff --git a/std/js/html/DOMStringMap.hx b/std/js/html/DOMStringMap.hx index b4fed2b3acc4f9b770e460eea65492eeaae5aa4e..d80115f9ee0ddf02b526a146f5cb26293bd16f8b 100644 --- a/std/js/html/DOMStringMap.hx +++ b/std/js/html/DOMStringMap.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,6 +32,5 @@ package js.html; @see **/ @:native("DOMStringMap") -extern class DOMStringMap implements Dynamic -{ +extern class DOMStringMap implements Dynamic { } \ No newline at end of file diff --git a/std/js/html/DOMTokenList.hx b/std/js/html/DOMTokenList.hx index 438d4fff6a7e6f45748942708d6816c0385577aa..4c2423cf379e9d5d9f5f5acbd1af827bfa23bd9f 100644 --- a/std/js/html/DOMTokenList.hx +++ b/std/js/html/DOMTokenList.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,49 +25,63 @@ package js.html; /** - The `DOMTokenList` interface represents a set of space-separated tokens. Such a set is returned by `Element.classList`, `HTMLLinkElement.relList`, `HTMLAnchorElement.relList` or `HTMLAreaElement.relList`. It is indexed beginning with `0` as with JavaScript `Array` objects. `DOMTokenList` is always case-sensitive. + The `DOMTokenList` interface represents a set of space-separated tokens. Such a set is returned by `Element.classList`, `HTMLLinkElement.relList`, `HTMLAnchorElement.relList`, `HTMLAreaElement.relList`, `HTMLIframeElement.sandbox`, or `HTMLOutputElement.htmlFor`. It is indexed beginning with `0` as with JavaScript `Array` objects. `DOMTokenList` is always case-sensitive. Documentation [DOMTokenList](https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("DOMTokenList") -extern class DOMTokenList implements ArrayAccess -{ +extern class DOMTokenList implements ArrayAccess { /** Is an `integer` representing the number of objects stored in the object. **/ var length(default,null) : Int; + + /** + The value of the list as a `DOMString`. + **/ var value : String; /** - Returns an item in the list by its index (or undefined if the number is greater than or equal to the length of the list, prior to `7.0` returned null) + Returns an item in the list by its index (returns undefined if the number is greater than or equal to the length of the list). **/ function item( index : Int ) : String; - /** @throws DOMError */ /** - Returns `true` if the underlying string contains token, otherwise `false` + Returns `true` if the list contains the given token, otherwise `false`. **/ function contains( token : String ) : Bool; - /** @throws DOMError */ /** - Adds token to the underlying string + Adds the given token to the list. + @throws DOMError **/ function add( tokens : haxe.extern.Rest ) : Void; - /** @throws DOMError */ /** - Removes token from the underlying string + Removes the specified token from the list. + @throws DOMError **/ function remove( tokens : haxe.extern.Rest ) : Void; - /** @throws DOMError */ /** - Removes token from string and returns false. If token doesn't exist it's added and the function returns true + Replaces an existing token with a new token. + @throws DOMError + **/ + function replace( token : String, newToken : String ) : Bool; + + /** + Removes a given token from the list and returns false. If token doesn't exist it's added and the function returns `true`. + @throws DOMError **/ function toggle( token : String, ?force : Bool ) : Bool; + + /** + Returns `true` if a given token is in the associated attribute's supported tokens. + @throws DOMError + **/ + function supports( token : String ) : Bool; } \ No newline at end of file diff --git a/std/js/html/DataElement.hx b/std/js/html/DataElement.hx index 2ee7b221b9f0ead3cec1b15e4788476efba08b5a..ac53859ae69646869fdee6b0f95bbd55b92edcef 100644 --- a/std/js/html/DataElement.hx +++ b/std/js/html/DataElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("HTMLDataElement") -extern class DataElement extends Element -{ +extern class DataElement extends Element { /** Is a `DOMString` reflecting the `value` HTML attribute, containing a machine-readable form of the element's value. diff --git a/std/js/html/DataListElement.hx b/std/js/html/DataListElement.hx index fa26bd177b1da18955beb40b1af482bf5bcf999c..f29888d35baccc1efe2c22dd3cce70383f9f1f95 100644 --- a/std/js/html/DataListElement.hx +++ b/std/js/html/DataListElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("HTMLDataListElement") -extern class DataListElement extends Element -{ +extern class DataListElement extends Element { /** Is a `HTMLCollection` representing a collection of the contained option elements. diff --git a/std/js/html/DataTransfer.hx b/std/js/html/DataTransfer.hx index 22ae84110c1a60a1baedc651ffa816669eccae50..c296a87ede93cb76240d0e4e426b3d005322a73e 100644 --- a/std/js/html/DataTransfer.hx +++ b/std/js/html/DataTransfer.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("DataTransfer") -extern class DataTransfer -{ +extern class DataTransfer { /** Gets the type of drag-and-drop operation currently selected or sets the operation to a new type. The value must be `none`, `copy`, `link` or `move`. @@ -45,10 +44,15 @@ extern class DataTransfer **/ var effectAllowed : String; + /** + Gives a `DataTransferItemList` object which is a list of all of the drag data. + **/ + var items(default,null) : DataTransferItemList; + /** An array of `DOMString` giving the formats that were set in the `dragstart` event. **/ - var types(default,null) : DOMStringList; + var types(default,null) : Array; /** Contains a list of all the local files available on the data transfer. If the drag operation doesn't involve dragging files, this property is an empty list. @@ -56,35 +60,34 @@ extern class DataTransfer var files(default,null) : FileList; /** @throws DOMError */ - function new( eventType : String, isExternal : Bool ) : Void; - /** @throws DOMError */ + function new() : Void; /** Set the image to be used for dragging if a custom one is desired. **/ function setDragImage( image : Element, x : Int, y : Int ) : Void; - /** @throws DOMError */ /** Retrieves the data for a given type, or an empty string if data for that type does not exist or the data transfer contains no data. + @throws DOMError **/ function getData( format : String ) : String; - /** @throws DOMError */ /** Set the data for a given type. If data for the type does not exist, it is added at the end, such that the last item in the types list will be the new format. If data for the type already exists, the existing data is replaced in the same position. + @throws DOMError **/ function setData( format : String, data : String ) : Void; - /** @throws DOMError */ /** Remove the data associated with a given type. The type argument is optional. If the type is empty or not specified, the data associated with all types is removed. If data for the specified type does not exist, or the data transfer contains no data, this method will have no effect. + @throws DOMError **/ function clearData( ?format : String ) : Void; - /** @throws DOMError */ /** Sets the drag source to the given element. + @throws DOMError **/ function addElement( element : Element ) : Void; } \ No newline at end of file diff --git a/std/js/html/DataTransferItem.hx b/std/js/html/DataTransferItem.hx new file mode 100644 index 0000000000000000000000000000000000000000..294fbf0cb7c882222a67994d8d509847c0993fe6 --- /dev/null +++ b/std/js/html/DataTransferItem.hx @@ -0,0 +1,59 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\DataTransferItem.webidl. Do not edit! + +package js.html; + +/** + The `DataTransferItem` object represents one drag data item. During a drag operation, each `drag event` has a `dataTransfer` property which contains a `list` of drag data items. Each item in the list is a `DataTransferItem` object. + + Documentation [DataTransferItem](https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("DataTransferItem") +extern class DataTransferItem { + + /** + The kind of drag data item, `string` or `file`. + **/ + var kind(default,null) : String; + + /** + The drag data item's type, typically a MIME type. + **/ + var type(default,null) : String; + + + /** + Invokes the specified callback with the drag data item string as its argument. + @throws DOMError + **/ + function getAsString( callback : String -> Void ) : Void; + + /** + Returns the `File` object associated with the drag data item (or null if the drag item is not a file). + @throws DOMError + **/ + function getAsFile() : File; +} \ No newline at end of file diff --git a/std/js/html/DataTransferItemList.hx b/std/js/html/DataTransferItemList.hx new file mode 100644 index 0000000000000000000000000000000000000000..74ca82687a281e09a1cead933121bfecd8bab96b --- /dev/null +++ b/std/js/html/DataTransferItemList.hx @@ -0,0 +1,61 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\DataTransferItemList.webidl. Do not edit! + +package js.html; + +/** + The `DataTransferItemList` object is a list of `DataTransferItem` objects representing items being dragged. During a drag operation, each `DragEvent` has a `dataTransfer` property and that property is a `DataTransferItemList`. + + Documentation [DataTransferItemList](https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("DataTransferItemList") +extern class DataTransferItemList implements ArrayAccess { + + /** + An `unsigned long` that is the number of drag items in the list. + **/ + var length(default,null) : Int; + + + /** + Adds an item (either a `File` object or a `DOMString`) to the drag item list and returns a `DataTransferItem` object for the new item. + @throws DOMError + **/ + @:overload( function( data : String, type : String ) : DataTransferItem {} ) + function add( data : File ) : DataTransferItem; + + /** + Removes the drag item from the list at the given index. + @throws DOMError + **/ + function remove( index : Int ) : Void; + + /** + Removes all of the drag items from the list. + @throws DOMError + **/ + function clear() : Void; +} \ No newline at end of file diff --git a/std/js/html/DataView.hx b/std/js/html/DataView.hx index 5e7643db4f156035da36a3d85418c71072b9a015..9c7af11538bc5827c63319347fbaef4f7b34fc4f 100644 --- a/std/js/html/DataView.hx +++ b/std/js/html/DataView.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,32 +20,6 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from typedarray.webidl. Do not edit! - package js.html; -// Explicitly include the compatibility class -import js.html.compat.DataView; - -@:native("DataView") -extern class DataView extends ArrayBufferView -{ - /** @throws DOMError */ - function new( buffer : ArrayBuffer, ?byteOffset : Int, ?byteLength : Int ) : Void; - @:pure function getInt8( byteOffset : Int ) : Int; - @:pure function getUint8( byteOffset : Int ) : Int; - @:pure function getInt16( byteOffset : Int, ?littleEndian : Bool ) : Int; - @:pure function getUint16( byteOffset : Int, ?littleEndian : Bool ) : Int; - @:pure function getInt32( byteOffset : Int, ?littleEndian : Bool ) : Int; - @:pure function getUint32( byteOffset : Int, ?littleEndian : Bool ) : Int; - @:pure function getFloat32( byteOffset : Int, ?littleEndian : Bool ) : Float; - @:pure function getFloat64( byteOffset : Int, ?littleEndian : Bool ) : Float; - function setInt8( byteOffset : Int, value : Int ) : Void; - function setUint8( byteOffset : Int, value : Int ) : Void; - function setInt16( byteOffset : Int, value : Int, ?littleEndian : Bool ) : Void; - function setUint16( byteOffset : Int, value : Int, ?littleEndian : Bool ) : Void; - function setInt32( byteOffset : Int, value : Int, ?littleEndian : Bool ) : Void; - function setUint32( byteOffset : Int, value : Int, ?littleEndian : Bool ) : Void; - function setFloat32( byteOffset : Int, value : Float, ?littleEndian : Bool ) : Void; - function setFloat64( byteOffset : Int, value : Float, ?littleEndian : Bool ) : Void; -} \ No newline at end of file +@:deprecated typedef DataView = js.lib.DataView; diff --git a/std/js/html/DedicatedWorkerGlobalScope.hx b/std/js/html/DedicatedWorkerGlobalScope.hx index 944cb1d5157bcd59c1f66349f01389a4f5bc93a0..fc9e709457c8586c29f8cd51463a57776e1cb3d9 100644 --- a/std/js/html/DedicatedWorkerGlobalScope.hx +++ b/std/js/html/DedicatedWorkerGlobalScope.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,14 +32,32 @@ package js.html; @see **/ @:native("DedicatedWorkerGlobalScope") -extern class DedicatedWorkerGlobalScope extends WorkerGlobalScope -{ +extern class DedicatedWorkerGlobalScope extends WorkerGlobalScope { + + /** + The name that the `Worker` was (optionally) given when it was created using the `Worker.Worker` constructor. This is mainly useful for debugging purposes. + **/ + var name(default,null) : String; /** Is an `EventHandler` representing the code to be called when the `message` event is raised. These events are of type `MessageEvent` and will be called when the worker receives a message from the document that started it (i.e. from the `Worker.postMessage` method.) **/ var onmessage : haxe.Constraints.Function; - /** @throws DOMError */ + /** + Is an `EventHandler` representing the code to be called when the `messageerror` event is raised. + **/ + var onmessageerror : haxe.Constraints.Function; + + + /** + Sends a message — which can consist of `any` JavaScript object — to the parent document that first spawned the worker. + @throws DOMError + **/ function postMessage( message : Dynamic, ?transfer : Array ) : Void; + + /** + Discards any tasks queued in the `WorkerGlobalScope`'s event loop, effectively closing this particular scope. + **/ + function close() : Void; } \ No newline at end of file diff --git a/std/js/html/ContentElement.hx b/std/js/html/DetailsElement.hx similarity index 57% rename from std/js/html/ContentElement.hx rename to std/js/html/DetailsElement.hx index eaade2108c14491d752f976487b68bca40035da5..6f2461188498cc0aefa2fb01ff24f459f9db8e0e 100644 --- a/std/js/html/ContentElement.hx +++ b/std/js/html/DetailsElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,29 +20,23 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\HTMLContentElement.webidl. Do not edit! +// This file is generated from mozilla\HTMLDetailsElement.webidl. Do not edit! package js.html; /** - The `HTMLContentElement` interface represents a `content` HTML Element, which is used in Shadow DOM. + The `HTMLDetailsElement` interface provides special properties (beyond the regular `HTMLElement` interface it also has available to it by inheritance) for manipulating `details` elements. - Documentation [HTMLContentElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLContentElement) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/HTMLContentElement$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + Documentation [HTMLDetailsElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDetailsElement) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDetailsElement$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). - @see + @see **/ -@:native("HTMLContentElement") -extern class ContentElement extends Element -{ +@:native("HTMLDetailsElement") +extern class DetailsElement extends Element { /** - Is a `DOMString` that reflects the `select` HTML attribute. The value is a comma-separated list of CSS selectors that select the content to insert in place of the `content` element. + Is a `boolean` reflecting the `open` HTML attribute, indicating whether or not the element’s contents (not counting the `summary`) is to be shown to the user. **/ - var select : String; + var open : Bool; - - /** - Returns a static `NodeList` of the `distributed nodes` associated with this `content` element.  - **/ - function getDistributedNodes() : NodeList; } \ No newline at end of file diff --git a/std/js/html/DeviceAcceleration.hx b/std/js/html/DeviceAcceleration.hx index ae83f1ac40a7c69a3477c4d347db78025cc75b9f..9b82d24d18a868b92c49bebacb86ee62560c8a7a 100644 --- a/std/js/html/DeviceAcceleration.hx +++ b/std/js/html/DeviceAcceleration.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -31,9 +31,7 @@ package js.html; @see **/ -@:native("DeviceAcceleration") -extern class DeviceAcceleration -{ +typedef DeviceAcceleration = { /** The amount of acceleration along the X axis. Read only. diff --git a/std/js/html/DeviceAccelerationInit.hx b/std/js/html/DeviceAccelerationInit.hx index 3f9043392368ca044923fc953458a307deff2647..6407388b82a08cfb210223a1901476c16a254819 100644 --- a/std/js/html/DeviceAccelerationInit.hx +++ b/std/js/html/DeviceAccelerationInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,9 +24,8 @@ package js.html; -typedef DeviceAccelerationInit = -{ - @:optional var x : Float; - @:optional var y : Float; - @:optional var z : Float; +typedef DeviceAccelerationInit = { + var ?x : Float; + var ?y : Float; + var ?z : Float; } \ No newline at end of file diff --git a/std/js/html/DeviceMotionEvent.hx b/std/js/html/DeviceMotionEvent.hx index 6be1a83e831d190d676527ea26fc7b107917981a..9b2fd0ee02224cb27d0b4fee828ebc18b66ebf54 100644 --- a/std/js/html/DeviceMotionEvent.hx +++ b/std/js/html/DeviceMotionEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("DeviceMotionEvent") -extern class DeviceMotionEvent extends Event -{ +extern class DeviceMotionEvent extends Event { /** An object giving the acceleration of the device on the three axis X, Y and Z. Acceleration is expressed in m/s2. @@ -46,7 +45,7 @@ extern class DeviceMotionEvent extends Event var accelerationIncludingGravity(default,null) : DeviceAcceleration; /** - An object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma. Rotation rate is express in degrees per seconds. + An object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma. Rotation rate is expressed in degrees per seconds. **/ var rotationRate(default,null) : DeviceRotationRate; @@ -57,5 +56,5 @@ extern class DeviceMotionEvent extends Event /** @throws DOMError */ function new( type : String, ?eventInitDict : DeviceMotionEventInit ) : Void; - function initDeviceMotionEvent( type : String, canBubble : Bool, cancelable : Bool, acceleration : DeviceAccelerationInit, accelerationIncludingGravity : DeviceAccelerationInit, rotationRate : DeviceRotationRateInit, interval : Float ) : Void; + function initDeviceMotionEvent( type : String, canBubble : Bool = false, cancelable : Bool = false, ?acceleration : DeviceAccelerationInit, ?accelerationIncludingGravity : DeviceAccelerationInit, ?rotationRate : DeviceRotationRateInit, ?interval : Float ) : Void; } \ No newline at end of file diff --git a/std/js/html/DeviceMotionEventInit.hx b/std/js/html/DeviceMotionEventInit.hx index ba1c89a0412a7e73c97b1dc74048ccdf87fe6a21..a12ba420adb547dd89ec6c3f3d201615f736ea88 100644 --- a/std/js/html/DeviceMotionEventInit.hx +++ b/std/js/html/DeviceMotionEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,11 +24,9 @@ package js.html; -typedef DeviceMotionEventInit = -{ - > EventInit, - @:optional var acceleration : DeviceAccelerationInit; - @:optional var accelerationIncludingGravity : DeviceAccelerationInit; - @:optional var interval : Float; - @:optional var rotationRate : DeviceRotationRateInit; +typedef DeviceMotionEventInit = EventInit & { + var ?acceleration : DeviceAccelerationInit; + var ?accelerationIncludingGravity : DeviceAccelerationInit; + var ?interval : Float; + var ?rotationRate : DeviceRotationRateInit; } \ No newline at end of file diff --git a/std/js/html/DeviceOrientationEvent.hx b/std/js/html/DeviceOrientationEvent.hx index 31c6735da1808b035a9d8a70b9cb98b2ad16d4a9..abd17758ce3528ae3ecdf5b49a3d7d61611fdf0b 100644 --- a/std/js/html/DeviceOrientationEvent.hx +++ b/std/js/html/DeviceOrientationEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,11 +32,10 @@ package js.html; @see **/ @:native("DeviceOrientationEvent") -extern class DeviceOrientationEvent extends Event -{ +extern class DeviceOrientationEvent extends Event { /** - A number representing the motion of the device around the z axis, express in degrees with values ranging from 0 to 360 + A number representing the motion of the device around the z axis, express in degrees with values ranging from 0 to 360. **/ var alpha(default,null) : Float; @@ -57,5 +56,5 @@ extern class DeviceOrientationEvent extends Event /** @throws DOMError */ function new( type : String, ?eventInitDict : DeviceOrientationEventInit ) : Void; - function initDeviceOrientationEvent( type : String, canBubble : Bool, cancelable : Bool, alpha : Float, beta : Float, gamma : Float, absolute : Bool ) : Void; + function initDeviceOrientationEvent( type : String, canBubble : Bool = false, cancelable : Bool = false, ?alpha : Float, ?beta : Float, ?gamma : Float, absolute : Bool = false ) : Void; } \ No newline at end of file diff --git a/std/js/html/DeviceOrientationEventInit.hx b/std/js/html/DeviceOrientationEventInit.hx index a47d594902ce40cdfca8b3cf36149f7674d886ab..34d7f7b0c966fe6d0c69a61051a4d3af8f2b28cd 100644 --- a/std/js/html/DeviceOrientationEventInit.hx +++ b/std/js/html/DeviceOrientationEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,11 +24,9 @@ package js.html; -typedef DeviceOrientationEventInit = -{ - > EventInit, - @:optional var absolute : Bool; - @:optional var alpha : Float; - @:optional var beta : Float; - @:optional var gamma : Float; +typedef DeviceOrientationEventInit = EventInit & { + var ?absolute : Bool; + var ?alpha : Float; + var ?beta : Float; + var ?gamma : Float; } \ No newline at end of file diff --git a/std/js/html/DeviceRotationRate.hx b/std/js/html/DeviceRotationRate.hx index 17d6d18355aac45182ddd2d2e6d7108426c108a5..dd6d6f5d4718d532c2423c65617a2815b549e0ba 100644 --- a/std/js/html/DeviceRotationRate.hx +++ b/std/js/html/DeviceRotationRate.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -31,11 +31,21 @@ package js.html; @see **/ -@:native("DeviceRotationRate") -extern class DeviceRotationRate -{ +typedef DeviceRotationRate = { + + /** + The amount of rotation around the Z axis, in degrees per second. + **/ var alpha(default,null) : Float; + + /** + The amount of rotation around the X axis, in degrees per second. + **/ var beta(default,null) : Float; + + /** + The amount of rotation around the Y axis, in degrees per second. + **/ var gamma(default,null) : Float; } \ No newline at end of file diff --git a/std/js/html/DeviceRotationRateInit.hx b/std/js/html/DeviceRotationRateInit.hx index 180cb1023a30c35f3e81bbaeca2ec36c35aaa3b1..1cc295efd3c9a7ea629f6b43119dde7b1804c636 100644 --- a/std/js/html/DeviceRotationRateInit.hx +++ b/std/js/html/DeviceRotationRateInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,9 +24,8 @@ package js.html; -typedef DeviceRotationRateInit = -{ - @:optional var alpha : Float; - @:optional var beta : Float; - @:optional var gamma : Float; +typedef DeviceRotationRateInit = { + var ?alpha : Float; + var ?beta : Float; + var ?gamma : Float; } \ No newline at end of file diff --git a/std/js/html/DirectionSetting.hx b/std/js/html/DirectionSetting.hx index b9027c701581b60b17516a865b25a30a29051478..8a4cb3eec3762620154e214e3fc2d34717d2175d 100644 --- a/std/js/html/DirectionSetting.hx +++ b/std/js/html/DirectionSetting.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -@:enum abstract DirectionSetting(String) -{ +enum abstract DirectionSetting(String) { var NONE = ""; var RL = "rl"; var LR = "lr"; diff --git a/std/js/html/Directory.hx b/std/js/html/Directory.hx index 149e7cb1c817f24fca7b6271c870ba2413cf33f7..719d35597271bca24cb811742e27b836e87a1d0d 100644 --- a/std/js/html/Directory.hx +++ b/std/js/html/Directory.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,11 +24,17 @@ package js.html; +import js.lib.Promise; + @:native("Directory") -extern class Directory -{ +extern class Directory { var name(default,null) : String; var path(default,null) : String; - + + /** @throws DOMError */ + function new( path : String ) : Void; + /** @throws DOMError */ function getFilesAndDirectories() : Promise>>; + /** @throws DOMError */ + function getFiles( recursiveFlag : Bool = false ) : Promise>; } \ No newline at end of file diff --git a/std/js/html/DirectoryElement.hx b/std/js/html/DirectoryElement.hx index 0e54e1dc455b1ae71fd2437718093305cab59490..35b993f0495542f785c9b73413ff010eaae37093 100644 --- a/std/js/html/DirectoryElement.hx +++ b/std/js/html/DirectoryElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,8 +25,7 @@ package js.html; @:native("HTMLDirectoryElement") -extern class DirectoryElement extends Element -{ +extern class DirectoryElement extends Element { var compact : Bool; } \ No newline at end of file diff --git a/std/js/html/DisplayNameOptions.hx b/std/js/html/DisplayNameOptions.hx new file mode 100644 index 0000000000000000000000000000000000000000..b91e0e11cc6e1c75c97b0a50f10c164524005e41 --- /dev/null +++ b/std/js/html/DisplayNameOptions.hx @@ -0,0 +1,30 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\IntlUtils.webidl. Do not edit! + +package js.html; + +typedef DisplayNameOptions = { + var ?keys : Array; + var ?style : String; +} \ No newline at end of file diff --git a/std/js/html/DisplayNameResult.hx b/std/js/html/DisplayNameResult.hx new file mode 100644 index 0000000000000000000000000000000000000000..d5e8a60ff43ec4bbdbfa627fe3775da497fb8ee5 --- /dev/null +++ b/std/js/html/DisplayNameResult.hx @@ -0,0 +1,31 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\IntlUtils.webidl. Do not edit! + +package js.html; + +typedef DisplayNameResult = { + var ?locale : String; + var ?style : String; + var ?values : haxe.DynamicAccess; +} \ No newline at end of file diff --git a/std/js/html/DivElement.hx b/std/js/html/DivElement.hx index 85598fa3bb5efd7e8792bbb59a95441b28bf1232..ac1adbaf7c8cc7a3e8a04342ac6dc15df3ddf07f 100644 --- a/std/js/html/DivElement.hx +++ b/std/js/html/DivElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("HTMLDivElement") -extern class DivElement extends Element -{ +extern class DivElement extends Element { /** Is a `DOMString` representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are `"left"`, `"right"`, `"justify"`, and `"center"`. diff --git a/std/js/html/Document.hx b/std/js/html/Document.hx index c1362995fcd12f1307f6c60f00354db5116e3fd9..8085da99d97212a40b52ffe88457a6d4fe410dd4 100644 --- a/std/js/html/Document.hx +++ b/std/js/html/Document.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,15 +25,14 @@ package js.html; /** - The `Document` interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree. The DOM tree includes elements such as `body` and `table`, among many others. It provides functionality global to the document, like how to obtain the page's URL and create new elements in the document. + The `Document` interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree.`HTMLElement` Documentation [Document](https://developer.mozilla.org/en-US/docs/Web/API/Document) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Document$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("Document") -extern class Document extends Node -{ +extern class Document extends Node { /** Returns the DOM implementation associated with the current document. @@ -81,7 +80,7 @@ extern class Document extends Node var doctype(default,null) : DocumentType; /** - Returns the `Element` that is a direct child of the document. For HTML documents, this is normally the `html` element. + Returns the `Element` that is a direct child of the document. For HTML documents, this is normally the `HTMLElement` element. **/ var documentElement(default,null) : Element; @@ -106,7 +105,7 @@ extern class Document extends Node var readyState(default,null) : String; /** - Sets or gets title of the current document. + Sets or gets the title of the current document. **/ var title : String; @@ -116,39 +115,54 @@ extern class Document extends Node var dir : String; /** - Returns a reference to the window object. + Returns the `body` or `frameset` node of the current document. **/ - var defaultView(default,null) : Window; + var body : Element; /** - Returns the currently focused element. + Returns the `head` element of the current document. **/ - var activeElement(default,null) : Element; + var head(default,null) : HeadElement; /** - Represents the event handling code for the `readystatechange` event. + Returns a list of the images in the current document. **/ - var onreadystatechange : haxe.Constraints.Function; + var images(default,null) : HTMLCollection; /** - Represents the event handling code for the `wheel` event. + Returns a list of the embedded `embed` elements within the current document. **/ - var onwheel : haxe.Constraints.Function; + var embeds(default,null) : HTMLCollection; /** - Represents the event handling code for the `copy` event. + Returns a list of the available plugins. **/ - var oncopy : haxe.Constraints.Function; + var plugins(default,null) : HTMLCollection; /** - Represents the event handling code for the `cut` event. + Returns a list of all the hyperlinks in the document. **/ - var oncut : haxe.Constraints.Function; + var links(default,null) : HTMLCollection; /** - Represents the event handling code for the `paste` event. + Returns a list of the `form` elements within the current document. **/ - var onpaste : haxe.Constraints.Function; + var forms(default,null) : HTMLCollection; + + /** + Returns all the `script` elements on the document. + **/ + var scripts(default,null) : HTMLCollection; + + /** + Returns a reference to the window object. + **/ + var defaultView(default,null) : Window; + + /** + Represents the event handling code for the `readystatechange` event. + **/ + var onreadystatechange : haxe.Constraints.Function; /** Represents the event handling code for the `beforescriptexecute` event. @@ -159,14 +173,48 @@ extern class Document extends Node Represents the event handling code for the `afterscriptexecute` event. **/ var onafterscriptexecute : haxe.Constraints.Function; + + /** + Is an `EventHandler` representing the code to be called when the `selectionchange` event is raised. + **/ + var onselectionchange : haxe.Constraints.Function; var currentScript(default,null) : Element; + + /** + Returns a list of all of the anchors in the document. + **/ + var anchors(default,null) : HTMLCollection; + + /** + Returns an ordered list of the applets within a document. + **/ + var applets(default,null) : HTMLCollection; + + /** + `true` when the document is in `Using_full-screen_mode`. + **/ + var fullscreen(default,null) : Bool; var fullscreenEnabled(default,null) : Bool; - var fullscreenElement(default,null) : Element; /** - Returns the element set as the target for mouse events while the pointer is locked. `null` if lock is pending, pointer is unlocked, or if the target is in another document. + Is an `EventHandler` representing the code to be called when the `fullscreenchange` event is raised. **/ - var pointerLockElement(default,null) : Element; + var onfullscreenchange : haxe.Constraints.Function; + + /** + Is an `EventHandler` representing the code to be called when the `fullscreenerror` event is raised. + **/ + var onfullscreenerror : haxe.Constraints.Function; + + /** + Represents the event handling code for the `pointerlockchange` event. + **/ + var onpointerlockchange : haxe.Constraints.Function; + + /** + Represents the event handling code for the `pointerlockerror` event. + **/ + var onpointerlockerror : haxe.Constraints.Function; /** … @@ -174,16 +222,14 @@ extern class Document extends Node var hidden(default,null) : Bool; /** - - Returns a `string` denoting the visibility state of the document. Possible values are `visible`,  `hidden`,  `prerender`, and `unloaded`. - + Returns a `string` denoting the visibility state of the document. Possible values are `visible`,  `hidden`,  `prerender`, and `unloaded`. **/ var visibilityState(default,null) : VisibilityState; /** - Returns a list of the style sheet objects on the current document. + Is an `EventHandler` representing the code to be called when the `visibilitychange` event is raised. **/ - var styleSheets(default,null) : StyleSheetList; + var onvisibilitychange : haxe.Constraints.Function; /** Returns which style sheet set is currently in use. @@ -205,23 +251,55 @@ extern class Document extends Node **/ var styleSheetSets(default,null) : DOMStringList; + /** + Returns a reference to the `Element` that scrolls the document. + **/ + var scrollingElement(default,null) : Element; + /** … **/ var timeline(default,null) : DocumentTimeline; + var rootElement(default,null) : js.html.svg.SVGElement; + + /** + Represents the event handling code for the `copy` event. + **/ + var oncopy : haxe.Constraints.Function; + + /** + Represents the event handling code for the `cut` event. + **/ + var oncut : haxe.Constraints.Function; + + /** + Represents the event handling code for the `paste` event. + **/ + var onpaste : haxe.Constraints.Function; + var activeElement(default,null) : Element; + var styleSheets(default,null) : StyleSheetList; + var pointerLockElement(default,null) : Element; + + /** + The element that's currently in full screen mode for this document. + **/ + var fullscreenElement(default,null) : Element; var fonts(default,null) : FontFaceSet; var onabort : haxe.Constraints.Function; var onblur : haxe.Constraints.Function; var onfocus : haxe.Constraints.Function; + var onauxclick : haxe.Constraints.Function; var oncanplay : haxe.Constraints.Function; var oncanplaythrough : haxe.Constraints.Function; var onchange : haxe.Constraints.Function; var onclick : haxe.Constraints.Function; + var onclose : haxe.Constraints.Function; var oncontextmenu : haxe.Constraints.Function; var ondblclick : haxe.Constraints.Function; var ondrag : haxe.Constraints.Function; var ondragend : haxe.Constraints.Function; var ondragenter : haxe.Constraints.Function; + var ondragexit : haxe.Constraints.Function; var ondragleave : haxe.Constraints.Function; var ondragover : haxe.Constraints.Function; var ondragstart : haxe.Constraints.Function; @@ -237,6 +315,7 @@ extern class Document extends Node var onload : haxe.Constraints.Function; var onloadeddata : haxe.Constraints.Function; var onloadedmetadata : haxe.Constraints.Function; + var onloadend : haxe.Constraints.Function; var onloadstart : haxe.Constraints.Function; var onmousedown : haxe.Constraints.Function; var onmouseenter : haxe.Constraints.Function; @@ -245,6 +324,11 @@ extern class Document extends Node var onmouseout : haxe.Constraints.Function; var onmouseover : haxe.Constraints.Function; var onmouseup : haxe.Constraints.Function; + + /** + Represents the event handling code for the `wheel` event. + **/ + var onwheel : haxe.Constraints.Function; var onpause : haxe.Constraints.Function; var onplay : haxe.Constraints.Function; var onplaying : haxe.Constraints.Function; @@ -263,6 +347,8 @@ extern class Document extends Node var ontimeupdate : haxe.Constraints.Function; var onvolumechange : haxe.Constraints.Function; var onwaiting : haxe.Constraints.Function; + var onselectstart : haxe.Constraints.Function; + var ontoggle : haxe.Constraints.Function; var onpointercancel : haxe.Constraints.Function; var onpointerdown : haxe.Constraints.Function; var onpointerup : haxe.Constraints.Function; @@ -273,26 +359,18 @@ extern class Document extends Node var onpointerleave : haxe.Constraints.Function; var ongotpointercapture : haxe.Constraints.Function; var onlostpointercapture : haxe.Constraints.Function; - - /** - Is an `EventHandler` representing the code to be called when the `fullscreenchange` event is raised. - **/ - var onfullscreenchange : haxe.Constraints.Function; - - /** - Is an `EventHandler` representing the code to be called when the `fullscreenerror` event is raised. - **/ - var onfullscreenerror : haxe.Constraints.Function; - - /** - Represents the event handling code for the `pointerlockchange` event. - **/ - var onpointerlockchange : haxe.Constraints.Function; - - /** - Represetnts the event handling code for the `pointerlockerror` event. - **/ - var onpointerlockerror : haxe.Constraints.Function; + var onanimationcancel : haxe.Constraints.Function; + var onanimationend : haxe.Constraints.Function; + var onanimationiteration : haxe.Constraints.Function; + var onanimationstart : haxe.Constraints.Function; + var ontransitioncancel : haxe.Constraints.Function; + var ontransitionend : haxe.Constraints.Function; + var ontransitionrun : haxe.Constraints.Function; + var ontransitionstart : haxe.Constraints.Function; + var onwebkitanimationend : haxe.Constraints.Function; + var onwebkitanimationiteration : haxe.Constraints.Function; + var onwebkitanimationstart : haxe.Constraints.Function; + var onwebkittransitionend : haxe.Constraints.Function; var onerror : haxe.Constraints.Function; var children(default,null) : HTMLCollection; var firstElementChild(default,null) : Element; @@ -309,33 +387,37 @@ extern class Document extends Node /** Returns a list of elements with the given tag name. **/ + @:pure function getElementsByTagName( localName : String ) : HTMLCollection; - /** @throws DOMError */ /** Returns a list of elements with the given tag name and namespace. + @throws DOMError **/ - function getElementsByTagNameNS( namespace_ : String, localName : String ) : HTMLCollection; + @:pure + function getElementsByTagNameNS( namespace : String, localName : String ) : HTMLCollection; /** Returns a list of elements with the given class name. **/ + @:pure function getElementsByClassName( classNames : String ) : HTMLCollection; + @:pure function getElementById( elementId : String ) : Element; - /** @throws DOMError */ - @:overload( function( localName : String ) : Element {} ) /** Creates a new element with the given tag name. + @throws DOMError **/ - function createElement( localName : String, typeExtension : String ) : Element; - /** @throws DOMError */ - @:overload( function( namespace_ : String, qualifiedName : String ) : Element {} ) + @:overload( function( localName : String, ?options : String) : Element {} ) + function createElement( localName : String, ?options : ElementCreationOptions ) : Element; /** Creates a new element with the given tag name and namespace URI. + @throws DOMError **/ - function createElementNS( namespace_ : String, qualifiedName : String, typeExtension : String ) : Element; + @:overload( function( namespace : String, qualifiedName : String, ?options : String) : Element {} ) + function createElementNS( namespace : String, qualifiedName : String, ?options : ElementCreationOptions ) : Element; /** Creates a new document fragment. @@ -351,67 +433,77 @@ extern class Document extends Node Creates a new comment node and returns it. **/ function createComment( data : String ) : Comment; - /** @throws DOMError */ /** Creates a new `ProcessingInstruction` object. + @throws DOMError **/ function createProcessingInstruction( target : String, data : String ) : ProcessingInstruction; - /** @throws DOMError */ /** Returns a clone of a node from an external document. + @throws DOMError **/ - function importNode( node : Node, ?deep : Bool = false ) : Node; - /** @throws DOMError */ + function importNode( node : Node, deep : Bool = false ) : Node; /** Adopt node from an external document. + @throws DOMError **/ function adoptNode( node : Node ) : Node; - /** @throws DOMError */ /** Creates an event object. + @throws DOMError **/ function createEvent( interface_ : String ) : Event; - /** @throws DOMError */ /** Creates a `Range` object. + @throws DOMError **/ function createRange() : Range; - /** @throws DOMError */ /** Creates a `NodeIterator` object. + @throws DOMError **/ - function createNodeIterator( root : Node, ?whatToShow : Int = cast 4294967295, ?filter : NodeFilter ) : NodeIterator; - /** @throws DOMError */ + @:overload( function( root : Node, whatToShow : Int = cast 4294967295, ?filter : haxe.Constraints.Function) : NodeIterator {} ) + @:overload( function( root : Node, whatToShow : Int = cast 4294967295, ?filter : NodeFilter) : NodeIterator {} ) + function createNodeIterator( root : Node, whatToShow : Int = cast 4294967295, ?filter : Node -> Int ) : NodeIterator; /** Creates a `TreeWalker` object. + @throws DOMError **/ - function createTreeWalker( root : Node, ?whatToShow : Int = cast 4294967295, ?filter : NodeFilter ) : TreeWalker; - /** @throws DOMError */ + @:overload( function( root : Node, whatToShow : Int = cast 4294967295, ?filter : haxe.Constraints.Function) : TreeWalker {} ) + @:overload( function( root : Node, whatToShow : Int = cast 4294967295, ?filter : NodeFilter) : TreeWalker {} ) + function createTreeWalker( root : Node, whatToShow : Int = cast 4294967295, ?filter : Node -> Int ) : TreeWalker; /** Creates a new CDATA node and returns it. + @throws DOMError **/ function createCDATASection( data : String ) : CDATASection; - /** @throws DOMError */ /** Creates a new `Attr` object and returns it. + @throws DOMError **/ function createAttribute( name : String ) : Attr; - /** @throws DOMError */ /** Creates a new attribute node in a given namespace and returns it. + @throws DOMError + **/ + function createAttributeNS( namespace : String, name : String ) : Attr; + @:pure + function getElementsByName( elementName : String ) : NodeList; + + /** + Returns `true` if the focus is currently located anywhere inside the specified document. + @throws DOMError **/ - function createAttributeNS( namespace_ : String, name : String ) : Attr; - /** @throws DOMError */ function hasFocus() : Bool; /** @@ -424,62 +516,65 @@ extern class Document extends Node Release the pointer lock. **/ function exitPointerLock() : Void; - /** @throws DOMError */ - - /** - Registers a web component. - **/ - function registerElement( name : String, ?options : ElementRegistrationOptions ) : Dynamic; /** Enables the style sheets for the specified style sheet set. **/ function enableStyleSheetsForSet( name : String ) : Void; - - /** - Returns the topmost element at the specified coordinates.  - **/ - function elementFromPoint( x : Float, y : Float ) : Element; - - /** - Returns an array of all elements at the specified coordinates. - **/ - function elementsFromPoint( x : Float, y : Float ) : Array; - - /** - Gets the `CaretPosition` at or near the specified coordinates. - **/ function caretPositionFromPoint( x : Float, y : Float ) : CaretPosition; /** @throws DOMError */ + @:pure function querySelector( selectors : String ) : Element; /** @throws DOMError */ + @:pure function querySelectorAll( selectors : String ) : NodeList; /** - Returns an array of all `Animation` objects currently in effect whose target elements are descendants of the `document`. + Returns an array of all `Animation` objects currently in effect, whose target elements are descendants of the `document`. **/ function getAnimations() : Array; /** Creates a `Touch` object. **/ - function createTouch( ?view : Window, ?target : EventTarget, ?identifier : Int = 0, ?pageX : Int = 0, ?pageY : Int = 0, ?screenX : Int = 0, ?screenY : Int = 0, ?clientX : Int = 0, ?clientY : Int = 0, ?radiusX : Int = 0, ?radiusY : Int = 0, ?rotationAngle : Float = 0.0, ?force : Float = 0.0 ) : Touch; - @:overload( function( touch : Touch, touches : haxe.extern.Rest ) : TouchList {} ) - @:overload( function() : TouchList {} ) + function createTouch( ?view : Window, ?target : EventTarget, identifier : Int = 0, pageX : Int = 0, pageY : Int = 0, screenX : Int = 0, screenY : Int = 0, clientX : Int = 0, clientY : Int = 0, radiusX : Int = 0, radiusY : Int = 0, rotationAngle : Float = 0.0, force : Float = 0.0 ) : Touch; /** Creates a `TouchList` object. **/ + @:overload( function( touch : Touch, touches : haxe.extern.Rest ) : TouchList {} ) + @:overload( function() : TouchList {} ) function createTouchList( touches : Array ) : TouchList; /** @throws DOMError */ - function convertQuadFromNode( quad : DOMQuad, from : haxe.extern.EitherType>, ?options : ConvertCoordinateOptions ) : DOMQuad; + function getSelection() : Selection; + function elementFromPoint( x : Float, y : Float ) : Element; + function elementsFromPoint( x : Float, y : Float ) : Array; + /** @throws DOMError */ + @:overload( function( quad : DOMQuad, from : Element, ?options : ConvertCoordinateOptions) : DOMQuad {} ) + @:overload( function( quad : DOMQuad, from : HTMLDocument, ?options : ConvertCoordinateOptions) : DOMQuad {} ) + function convertQuadFromNode( quad : DOMQuad, from : Text, ?options : ConvertCoordinateOptions ) : DOMQuad; + /** @throws DOMError */ + @:overload( function( rect : DOMRectReadOnly, from : Element, ?options : ConvertCoordinateOptions) : DOMQuad {} ) + @:overload( function( rect : DOMRectReadOnly, from : HTMLDocument, ?options : ConvertCoordinateOptions) : DOMQuad {} ) + function convertRectFromNode( rect : DOMRectReadOnly, from : Text, ?options : ConvertCoordinateOptions ) : DOMQuad; + /** @throws DOMError */ + @:overload( function( point : DOMPointInit, from : Element, ?options : ConvertCoordinateOptions) : DOMPoint {} ) + @:overload( function( point : DOMPointInit, from : HTMLDocument, ?options : ConvertCoordinateOptions) : DOMPoint {} ) + function convertPointFromNode( point : DOMPointInit, from : Text, ?options : ConvertCoordinateOptions ) : DOMPoint; /** @throws DOMError */ - function convertRectFromNode( rect : DOMRectReadOnly, from : haxe.extern.EitherType>, ?options : ConvertCoordinateOptions ) : DOMQuad; + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function prepend( nodes : haxe.extern.Rest ) : Void; /** @throws DOMError */ - function convertPointFromNode( point : DOMPointInit, from : haxe.extern.EitherType>, ?options : ConvertCoordinateOptions ) : DOMPoint; + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function append( nodes : haxe.extern.Rest ) : Void; /** @throws DOMError */ - function createExpression( expression : String, resolver : XPathNSResolver ) : XPathExpression; + @:overload( function( expression : String, ?resolver : haxe.Constraints.Function) : XPathExpression {} ) + @:overload( function( expression : String, ?resolver : XPathNSResolver) : XPathExpression {} ) + function createExpression( expression : String, ?resolver : String -> Null ) : XPathExpression; + @:pure function createNSResolver( nodeResolver : Node ) : Node; /** @throws DOMError */ - function evaluate( expression : String, contextNode : Node, resolver : XPathNSResolver, type : Int, result : Dynamic ) : XPathResult; + @:overload( function( expression : String, contextNode : Node, ?resolver : haxe.Constraints.Function, type : Int = 0, ?result : Dynamic) : XPathResult {} ) + @:overload( function( expression : String, contextNode : Node, ?resolver : XPathNSResolver, type : Int = 0, ?result : Dynamic) : XPathResult {} ) + function evaluate( expression : String, contextNode : Node, ?resolver : String -> Null, type : Int = 0, ?result : Dynamic ) : XPathResult; } \ No newline at end of file diff --git a/std/js/html/DocumentFragment.hx b/std/js/html/DocumentFragment.hx index 9b070b880fe8a5e52d513aee2cdf312b1bc86a85..9919b323844c114fdaf88e97569611dfaa938846 100644 --- a/std/js/html/DocumentFragment.hx +++ b/std/js/html/DocumentFragment.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,15 +25,14 @@ package js.html; /** - The `DocumentFragment` interface represents a minimal document object that has no parent. It is used as a light-weight version of `Document` to store well-formed or potentially non-well-formed fragments of XML. + The `DocumentFragment` interface represents a minimal document object that has no parent. It is used as a lightweight version of `Document` that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. Documentation [DocumentFragment](https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("DocumentFragment") -extern class DocumentFragment extends Node -{ +extern class DocumentFragment extends Node { var children(default,null) : HTMLCollection; var firstElementChild(default,null) : Element; var lastElementChild(default,null) : Element; @@ -46,16 +45,22 @@ extern class DocumentFragment extends Node Returns the first `Element` node within the DocumentFragment`, in document order, that matches the specified ID. **/ function getElementById( elementId : String ) : Element; - /** @throws DOMError */ /** Returns the first `Element` node within the `DocumentFragment`, in document order, that matches the specified selectors. + @throws DOMError **/ function querySelector( selectors : String ) : Element; - /** @throws DOMError */ /** Returns a `NodeList` of all the `Element` nodes within the `DocumentFragment` that match the specified selectors. + @throws DOMError **/ function querySelectorAll( selectors : String ) : NodeList; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function prepend( nodes : haxe.extern.Rest ) : Void; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function append( nodes : haxe.extern.Rest ) : Void; } \ No newline at end of file diff --git a/std/js/html/DocumentTimeline.hx b/std/js/html/DocumentTimeline.hx index b804bdaf5af4d19a7f49af8683118f00cb035007..d2fdae952d1d8dccba4872acd4a0ff1f91e9fba7 100644 --- a/std/js/html/DocumentTimeline.hx +++ b/std/js/html/DocumentTimeline.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,6 +32,7 @@ package js.html; @see **/ @:native("DocumentTimeline") -extern class DocumentTimeline extends AnimationTimeline -{ +extern class DocumentTimeline extends AnimationTimeline { + /** @throws DOMError */ + function new( ?options : DocumentTimelineOptions ) : Void; } \ No newline at end of file diff --git a/std/js/html/DocumentTimelineOptions.hx b/std/js/html/DocumentTimelineOptions.hx new file mode 100644 index 0000000000000000000000000000000000000000..5edd9968eedeaccc37986dbaa86e0aa386c4ef9e --- /dev/null +++ b/std/js/html/DocumentTimelineOptions.hx @@ -0,0 +1,29 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\DocumentTimeline.webidl. Do not edit! + +package js.html; + +typedef DocumentTimelineOptions = { + var ?originTime : Float; +} \ No newline at end of file diff --git a/std/js/html/DocumentType.hx b/std/js/html/DocumentType.hx index 7c341350c52ff151f5c97b077743f1ecabcf6c83..5c17b217a01e2c6346b1805ea7a7fe785a4bf572 100644 --- a/std/js/html/DocumentType.hx +++ b/std/js/html/DocumentType.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,23 +32,31 @@ package js.html; @see **/ @:native("DocumentType") -extern class DocumentType extends Node -{ +extern class DocumentType extends Node { /** - ... + A `DOMString`, eg `"html"` for `!DOCTYPE HTML`. **/ var name(default,null) : String; /** - ... + A `DOMString`, eg `"-//W3C//DTD HTML 4.01//EN"`, empty string for HTML5. **/ var publicId(default,null) : String; /** - ... + A `DOMString`, eg `"http://www.w3.org/TR/html4/strict.dtd"`, empty string for HTML5. **/ var systemId(default,null) : String; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function before( nodes : haxe.extern.Rest ) : Void; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function after( nodes : haxe.extern.Rest ) : Void; + /** @throws DOMError */ + @:overload( function( nodes : haxe.extern.Rest) : Void {} ) + function replaceWith( nodes : haxe.extern.Rest ) : Void; function remove() : Void; } \ No newline at end of file diff --git a/std/js/html/DragEvent.hx b/std/js/html/DragEvent.hx index 424bec01c4f80c5c9c95988dde88daaa84396aa2..775c60ccaf17d2037a18c4a360cf3f6f1ca80937 100644 --- a/std/js/html/DragEvent.hx +++ b/std/js/html/DragEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,11 +32,14 @@ package js.html; @see **/ @:native("DragEvent") -extern class DragEvent extends MouseEvent -{ +extern class DragEvent extends MouseEvent { + + /** + The data that is transferred during a drag and drop interaction. + **/ var dataTransfer(default,null) : DataTransfer; /** @throws DOMError */ function new( type : String, ?eventInitDict : DragEventInit ) : Void; - function initDragEvent( type : String, canBubble : Bool, cancelable : Bool, aView : Window, aDetail : Int, aScreenX : Int, aScreenY : Int, aClientX : Int, aClientY : Int, aCtrlKey : Bool, aAltKey : Bool, aShiftKey : Bool, aMetaKey : Bool, aButton : Int, aRelatedTarget : EventTarget, aDataTransfer : DataTransfer ) : Void; + function initDragEvent( type : String, canBubble : Bool = false, cancelable : Bool = false, ?aView : Window, aDetail : Int = 0, aScreenX : Int = 0, aScreenY : Int = 0, aClientX : Int = 0, aClientY : Int = 0, aCtrlKey : Bool = false, aAltKey : Bool = false, aShiftKey : Bool = false, aMetaKey : Bool = false, aButton : Int = 0, ?aRelatedTarget : EventTarget, ?aDataTransfer : DataTransfer ) : Void; } \ No newline at end of file diff --git a/std/js/html/DragEventInit.hx b/std/js/html/DragEventInit.hx index 4dce79cce3646cc3d5b82dcd04f3cb4f206677fe..77c25e41ce9a6fee63f1e63ced5ee53996bad8b8 100644 --- a/std/js/html/DragEventInit.hx +++ b/std/js/html/DragEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,6 @@ package js.html; -typedef DragEventInit = -{ - > MouseEventInit, - @:optional var dataTransfer : DataTransfer; +typedef DragEventInit = MouseEventInit & { + var ?dataTransfer : DataTransfer; } \ No newline at end of file diff --git a/std/js/html/EffectTiming.hx b/std/js/html/EffectTiming.hx new file mode 100644 index 0000000000000000000000000000000000000000..b23e0ff12d87ba6f5958ecf531ba4a2d656bf119 --- /dev/null +++ b/std/js/html/EffectTiming.hx @@ -0,0 +1,75 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\AnimationEffect.webidl. Do not edit! + +package js.html; + +/** + The `EffectTiming` dictionary, part of the Web Animations API, is used by `Element.animate()`, `KeyframeEffectReadOnly()`, and `KeyframeEffect()` to describe timing properties for animation effects. These properties are all optional, although without setting a `duration` the animation will not play. + + Documentation [EffectTiming](https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/EffectTiming$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +typedef EffectTiming = { + + /** + The number of milliseconds to delay the start of the animation. Defaults to 0. + **/ + var ?delay : Float; + + /** + Whether the animation runs forwards (`normal`), backwards (`reverse`), switches direction after each iteration (`alternate`), or runs backwards and switches direction after each iteration (`alternate-reverse`). Defaults to `"normal"`. + **/ + var ?direction : PlaybackDirection; + + /** + The number of milliseconds each iteration of the animation takes to complete. Defaults to 0. Although this is technically optional, keep in mind that your animation will not run if this value is 0. + **/ + var ?duration : haxe.extern.EitherType; + + /** + The rate of the animation's change over time. Accepts the pre-defined values `"linear"`, `"ease"`, `"ease-in"`, `"ease-out"`, and `"ease-in-out"`, or a custom `"cubic-bezier"` value like `"cubic-bezier(0.42, 0, 0.58, 1)"`. Defaults to `"linear"`. + **/ + var ?easing : String; + + /** + The number of milliseconds to delay after the end of an animation. This is primarily of use when sequencing animations based on the end time of another animation. Defaults to 0.  + **/ + var ?endDelay : Float; + + /** + Dictates whether the animation's effects should be reflected by the element(s) prior to playing (`"backwards"`), retained after the animation has completed playing (`"forwards"`), or `both`. Defaults to `"none"`. + **/ + var ?fill : FillMode; + + /** + Describes at what point in the iteration the animation should start. 0.5 would indicate starting halfway through the first iteration for example, and with this value set, an animation with 2 iterations would end halfway through a third iteration. Defaults to 0.0. + **/ + var ?iterationStart : Float; + + /** + The number of times the animation should repeat. Defaults to `1`, and can also take a value of `Infinity` to make it repeat for as long as the element exists. + **/ + var ?iterations : Float; +} \ No newline at end of file diff --git a/std/js/html/Element.hx b/std/js/html/Element.hx index ac44555cfecc5c88b098d677afcac213084ee26b..e50498bd7df26f9432576f2c7612087afa70276d 100644 --- a/std/js/html/Element.hx +++ b/std/js/html/Element.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,6 +32,22 @@ package js.html; @see **/ @:native("HTMLElement") -extern class Element extends DOMElement -{ +extern class Element extends DOMElement { + + /** + Sends a mouse click event to the element. + **/ + function click() : Void; + + /** + Makes the element the current keyboard focus. + @throws DOMError + **/ + function focus() : Void; + + /** + Removes keyboard focus from the currently focused element. + @throws DOMError + **/ + function blur() : Void; } \ No newline at end of file diff --git a/std/js/html/ElementCreationOptions.hx b/std/js/html/ElementCreationOptions.hx new file mode 100644 index 0000000000000000000000000000000000000000..d9ced8054bf362529c11f46c44d217d7b3ec0241 --- /dev/null +++ b/std/js/html/ElementCreationOptions.hx @@ -0,0 +1,29 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\Document.webidl. Do not edit! + +package js.html; + +typedef ElementCreationOptions = { + var ?is : String; +} \ No newline at end of file diff --git a/std/js/html/EmbedElement.hx b/std/js/html/EmbedElement.hx index e05f22868d8126f895ddb6250d2195d1cc5cb28f..3512746679e053d4865f9fb85775f8bfa9711454 100644 --- a/std/js/html/EmbedElement.hx +++ b/std/js/html/EmbedElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("HTMLEmbedElement") -extern class EmbedElement extends Element -{ +extern class EmbedElement extends Element { /** Is a `DOMString` that reflects the `src` HTML attribute, containing the address of the resource. @@ -51,12 +50,12 @@ extern class EmbedElement extends Element var width : String; /** - Is a `DOMString` representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are `"left"`, `"right"`, `"center"`, and `"justify"`. + Is a `DOMString` reflecting the `height` HTML attribute, containing the displayed height of the resource. **/ var height : String; /** - Is a `DOMString` reflecting the `height` HTML attribute, containing the displayed height of the resource. + Is a `DOMString` representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are `"left"`, `"right"`, `"center"`, and `"justify"`. **/ var align : String; diff --git a/std/js/html/CSSCharsetRule.hx b/std/js/html/EndingTypes.hx similarity index 84% rename from std/js/html/CSSCharsetRule.hx rename to std/js/html/EndingTypes.hx index b8066e426289e3b83780f6ce5a42c9a8c48d8c8e..ea6f6f1300553bd178606af4d80bb1a69590d797 100644 --- a/std/js/html/CSSCharsetRule.hx +++ b/std/js/html/EndingTypes.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,13 +20,11 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from cssrule.webidl. Do not edit! +// This file is generated from mozilla\Blob.webidl. Do not edit! package js.html; -@:native("CSSCharsetRule") -extern class CSSCharsetRule extends CSSRule -{ - var encoding : String; - +enum abstract EndingTypes(String) { + var TRANSPARENT = "transparent"; + var NATIVE = "native"; } \ No newline at end of file diff --git a/std/js/html/ErrorCallback.hx b/std/js/html/ErrorCallback.hx new file mode 100644 index 0000000000000000000000000000000000000000..ca229f8c46e917c905e512d376c8453156350432 --- /dev/null +++ b/std/js/html/ErrorCallback.hx @@ -0,0 +1,29 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FileSystem.webidl. Do not edit! + +package js.html; + +typedef ErrorCallback = { + function handleEvent( err : DOMException ) : Void; +} \ No newline at end of file diff --git a/std/js/html/ErrorEvent.hx b/std/js/html/ErrorEvent.hx index 1221553bda2b5374bb7e1ff6a83d152140f13aab..193aa6a379f19840b7964d530c0f20f2b530182b 100644 --- a/std/js/html/ErrorEvent.hx +++ b/std/js/html/ErrorEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("ErrorEvent") -extern class ErrorEvent extends Event -{ +extern class ErrorEvent extends Event { /** Is a `DOMString` containing a human-readable error message describing the problem. diff --git a/std/js/html/ErrorEventInit.hx b/std/js/html/ErrorEventInit.hx index 7c3711923e5d2361602e86cd324185ecbabb161a..adc9889acfba561e7564642283e3b53e99db8320 100644 --- a/std/js/html/ErrorEventInit.hx +++ b/std/js/html/ErrorEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,12 +24,10 @@ package js.html; -typedef ErrorEventInit = -{ - > EventInit, - @:optional var colno : Int; - @:optional var error : Dynamic; - @:optional var filename : String; - @:optional var lineno : Int; - @:optional var message : String; +typedef ErrorEventInit = EventInit & { + var ?colno : Int; + var ?error : Dynamic; + var ?filename : String; + var ?lineno : Int; + var ?message : String; } \ No newline at end of file diff --git a/std/js/html/Event.hx b/std/js/html/Event.hx index 6c29755dc019107176d3029c7eb9ae6e8eea7d2f..4a3a9ecd63a132312d830e04c40e2d494d742883 100644 --- a/std/js/html/Event.hx +++ b/std/js/html/Event.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,15 +25,14 @@ package js.html; /** - The `Event` interface represents any event which takes place in the DOM; some are user-generated (such as mouse or keyboard events), while others are generated by APIs (such as events that indicate an animation has finished running, a video has been paused, and so forth). There are many types of event, some of which use are other interfaces based on the main `Event` interface. `Event` itself contains the properties and methods which are common to all events. + The `Event` interface represents any event which takes place in the DOM; some are user-generated (such as mouse or keyboard events), while others are generated by APIs (such as events that indicate an animation has finished running, a video has been paused, and so forth). There are many types of events, some of which use other interfaces based on the main `Event` interface. `Event` itself contains the properties and methods which are common to all events. Documentation [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/Event$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("Event") -extern class Event -{ +extern class Event { static inline var NONE : Int = 0; static inline var CAPTURING_PHASE : Int = 1; static inline var AT_TARGET : Int = 2; @@ -55,7 +54,7 @@ extern class Event var target(default,null) : EventTarget; /** - A reference to the currently registered target for the event. This is the object to which the event is currently slated to be sent to; it's possible this has been changed along the way through retargeting. + A reference to the currently registered target for the event. This is the object to which the event is currently slated to be sent; it's possible this has been changed along the way through retargeting. **/ var currentTarget(default,null) : EventTarget; @@ -74,21 +73,36 @@ extern class Event **/ var cancelable(default,null) : Bool; + /** + A historical property introduced by Internet Explorer and eventually adopted into the DOM specification in order to ensure existing sites continue to work. Ideally, you should try to use `Event.preventDefault()` and `Event.defaultPrevented` instead, but you can use `returnValue` if you choose to do so. + **/ + var returnValue : Bool; + /** Indicates whether or not `event.preventDefault()` has been called on the event. **/ var defaultPrevented(default,null) : Bool; /** - Indicates whether or not the event was initiated by the browser (after a user click for instance) or by a script (using an event creation method, like event.initEvent) + A Boolean value indicating whether or not the event can bubble across the boundary between the shadow DOM and the regular DOM. + **/ + var composed(default,null) : Bool; + + /** + Indicates whether or not the event was initiated by the browser (after a user click for instance) or by a script (using an event creation method, like event.initEvent). **/ var isTrusted(default,null) : Bool; /** - The time at which the event was created, in milliseconds. By specification, this value is time since epoch, but in reality browsers' definitions vary; in addition, work is underway to change this to be a `DOMHighResTimeStamp` instead. + The time at which the event was created (in milliseconds). By specification, this value is time since epoch, but in reality browsers' definitions vary; in addition, work is underway to change this to be a `DOMHighResTimeStamp` instead. **/ var timeStamp(default,null) : Float; + /** + A historical alias to `Event.stopPropagation()`. Setting its value to `true` before returning from an event handler prevents propagation of the event. + **/ + var cancelBubble : Bool; + /** The original target of the event, before any retargetings (Mozilla-specific). **/ @@ -102,6 +116,11 @@ extern class Event /** @throws DOMError */ function new( type : String, ?eventInitDict : EventInit ) : Void; + /** + Returns the event’s path (objects on which listeners will be invoked). This does not include nodes in shadow trees if the shadow root was created with its `ShadowRoot.mode` closed. + **/ + function composedPath() : Array; + /** Stops the propagation of events further along in the DOM. **/ @@ -120,10 +139,5 @@ extern class Event /** Initializes the value of an Event created. If the event has already being dispatched, this method does nothing. **/ - function initEvent( type : String, bubbles : Bool, cancelable : Bool ) : Void; - - /** - Non-standard. Returns the value of `Event.defaultPrevented`. Use `Event.defaultPrevented` instead. - **/ - function getPreventDefault() : Bool; + function initEvent( type : String, bubbles : Bool = false, cancelable : Bool = false ) : Void; } \ No newline at end of file diff --git a/std/js/html/EventInit.hx b/std/js/html/EventInit.hx index 48d932555bd66691f7119a97a8d348602085d36f..0b8d1f28daf7758c108e12df17e658dd23545e13 100644 --- a/std/js/html/EventInit.hx +++ b/std/js/html/EventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,8 @@ package js.html; -typedef EventInit = -{ - @:optional var bubbles : Bool; - @:optional var cancelable : Bool; +typedef EventInit = { + var ?bubbles : Bool; + var ?cancelable : Bool; + var ?composed : Bool; } \ No newline at end of file diff --git a/std/js/html/EventListener.hx b/std/js/html/EventListener.hx index 09ff04ac200f132fa7300325fc2bb9f37e843610..c8e2e85b4c8c9e2f4c213865f10a4080090bea08 100644 --- a/std/js/html/EventListener.hx +++ b/std/js/html/EventListener.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,19 +20,21 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from events.webidl. Do not edit! +// This file is generated from mozilla\EventListener.webidl. Do not edit! package js.html; /** - This method is called whenever an event occurs of the type for which the `EventListener` interface was registered. + The `EventListener` interface represents an object that can handle an event dispatched by an `EventTarget` object. Documentation [EventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventListener) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/EventListener$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ -@:native("EventListener") -extern class EventListener -{ +typedef EventListener = { + + /** + A function that is called whenever an event of the specified type occurs. + **/ function handleEvent( event : Event ) : Void; } \ No newline at end of file diff --git a/std/js/html/EventListenerOptions.hx b/std/js/html/EventListenerOptions.hx new file mode 100644 index 0000000000000000000000000000000000000000..6cedd9db14079242090a329953334e20141e982d --- /dev/null +++ b/std/js/html/EventListenerOptions.hx @@ -0,0 +1,29 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\EventTarget.webidl. Do not edit! + +package js.html; + +typedef EventListenerOptions = { + var ?capture : Bool; +} \ No newline at end of file diff --git a/std/js/html/EventModifierInit.hx b/std/js/html/EventModifierInit.hx index 8f83f27401b0ded78b97843e5880316b808540bb..8cef40a20eacb21f11cb1bea8040e5d35d0d19f7 100644 --- a/std/js/html/EventModifierInit.hx +++ b/std/js/html/EventModifierInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,20 +24,18 @@ package js.html; -typedef EventModifierInit = -{ - > UIEventInit, - @:optional var altKey : Bool; - @:optional var ctrlKey : Bool; - @:optional var metaKey : Bool; - @:optional var modifierAltGraph : Bool; - @:optional var modifierCapsLock : Bool; - @:optional var modifierFn : Bool; - @:optional var modifierFnLock : Bool; - @:optional var modifierNumLock : Bool; - @:optional var modifierOS : Bool; - @:optional var modifierScrollLock : Bool; - @:optional var modifierSymbol : Bool; - @:optional var modifierSymbolLock : Bool; - @:optional var shiftKey : Bool; +typedef EventModifierInit = UIEventInit & { + var ?altKey : Bool; + var ?ctrlKey : Bool; + var ?metaKey : Bool; + var ?modifierAltGraph : Bool; + var ?modifierCapsLock : Bool; + var ?modifierFn : Bool; + var ?modifierFnLock : Bool; + var ?modifierNumLock : Bool; + var ?modifierOS : Bool; + var ?modifierScrollLock : Bool; + var ?modifierSymbol : Bool; + var ?modifierSymbolLock : Bool; + var ?shiftKey : Bool; } \ No newline at end of file diff --git a/std/js/html/EventSource.hx b/std/js/html/EventSource.hx index a56297b46947f3328fe9da40394c86fe6b5a66fe..d688283ef0e98fd3c8ed57a121e7566fccf162ed 100644 --- a/std/js/html/EventSource.hx +++ b/std/js/html/EventSource.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,15 +25,14 @@ package js.html; /** - The `EventSource` interface is used to receive server-sent events. It connects to a server over HTTP and receives events in `text/event-stream` format without closing the connection. + The `EventSource` interface is web content's interface to server-sent events. An `EventSource` instance opens a persistent connection to an HTTP server, which sends events in `text/event-stream` format. Documentation [EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/EventSource$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("EventSource") -extern class EventSource extends EventTarget -{ +extern class EventSource extends EventTarget { static inline var CONNECTING : Int = 0; static inline var OPEN : Int = 1; static inline var CLOSED : Int = 2; @@ -43,25 +42,29 @@ extern class EventSource extends EventTarget A `DOMString` representing the URL of the source. **/ var url(default,null) : String; + + /** + A `Boolean` indicating whether the `EventSource` object was instantiated with cross-origin (CORS) credentials set (`true`), or not (`false`, the default). + **/ var withCredentials(default,null) : Bool; /** - An `unsigned short` representing the state of the connection. Possible values are `CONNECTING` (`0`), `OPEN` (`1`), or `CLOSED` (`2`). + A number representing the state of the connection. Possible values are `CONNECTING` (`0`), `OPEN` (`1`), or `CLOSED` (`2`). **/ var readyState(default,null) : Int; /** - Is an `EventHandler` being called when an `open` event is received, that is when the connection was just opened. + Is an `EventHandler` called when an `open` event is received, that is when the connection was just opened. **/ var onopen : haxe.Constraints.Function; /** - Is an `EventHandler` being called when a `message` event is received, that is when a message is coming from the source. + Is an `EventHandler` called when a `message` event is received, that is when a message is coming from the source. **/ var onmessage : haxe.Constraints.Function; /** - Is an `EventHandler` being called when an error occurs and the `error` event is dispatched on this object. + Is an `EventHandler` called when an error occurs and the `error` event is dispatched on an `EventSource` object. **/ var onerror : haxe.Constraints.Function; diff --git a/std/js/html/EventSourceInit.hx b/std/js/html/EventSourceInit.hx index f3fd6bc38d239bf19e70b12e33a08d4d6bb04e30..1013710002d67eda59567742f1cb394e852a8d93 100644 --- a/std/js/html/EventSourceInit.hx +++ b/std/js/html/EventSourceInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,7 +24,6 @@ package js.html; -typedef EventSourceInit = -{ - @:optional var withCredentials : Bool; +typedef EventSourceInit = { + var ?withCredentials : Bool; } \ No newline at end of file diff --git a/std/js/html/EventTarget.hx b/std/js/html/EventTarget.hx index f2e6d949058e4d79c581881350aea39c3362caab..8e70448ff863f8dc93779bcd21f03718f8ee44b1 100644 --- a/std/js/html/EventTarget.hx +++ b/std/js/html/EventTarget.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,26 +32,27 @@ package js.html; @see **/ @:native("EventTarget") -extern class EventTarget -{ +extern class EventTarget { /** @throws DOMError */ - @:overload( function( type : String, listener : EventListener, ?capture : Bool = false, ?wantsUntrusted : Bool ) : Void {} ) + function new() : Void; /** Register an event handler of a specific event type on the `EventTarget`. + @throws DOMError **/ - function addEventListener( type : String, listener : haxe.Constraints.Function, ?capture : Bool = false ) : Void; - /** @throws DOMError */ - @:overload( function( type : String, listener : EventListener, ?capture : Bool = false ) : Void {} ) + @:overload( function( type : String, listener : EventListener, ?options : haxe.extern.EitherType, ?wantsUntrusted : Bool ) : Void {} ) + function addEventListener( type: String, listener: haxe.Constraints.Function, ?options : haxe.extern.EitherType, ?wantsUntrusted : Bool ) : Void; /** Removes an event listener from the `EventTarget`. + @throws DOMError **/ - function removeEventListener( type : String, listener : haxe.Constraints.Function, ?capture : Bool = false ) : Void; - /** @throws DOMError */ + @:overload( function( type : String, listener : EventListener, ?options : haxe.extern.EitherType) : Void {} ) + function removeEventListener( type : String, listener : haxe.Constraints.Function, ?options : haxe.extern.EitherType ) : Void; /** Dispatch an event to this `EventTarget`. + @throws DOMError **/ function dispatchEvent( event : Event ) : Bool; } \ No newline at end of file diff --git a/std/js/html/Exception.hx b/std/js/html/Exception.hx index aeeb454519a63eec87153827eb3c9fb46702cfd6..8462ae0f97efcd9b0296492aaf22d2f62250628b 100644 --- a/std/js/html/Exception.hx +++ b/std/js/html/Exception.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,16 +24,14 @@ package js.html; -@:native("Exception") -extern class Exception -{ +typedef Exception = { + var name(default,null) : String; var message(default,null) : String; var result(default,null) : Int; - var name(default,null) : String; var filename(default,null) : String; var lineNumber(default,null) : Int; var columnNumber(default,null) : Int; - var data(default,null) : Dynamic/*MISSING nsISupports*/; + var data(default,null) : Dynamic; var stack(default,null) : String; } \ No newline at end of file diff --git a/std/js/html/ExtendableEvent.hx b/std/js/html/ExtendableEvent.hx index a99f2cc2d0f85a78c675840af1b5a3c0013eb97b..903e0eaad9ca9f739effc81beaf2607a74461ed0 100644 --- a/std/js/html/ExtendableEvent.hx +++ b/std/js/html/ExtendableEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,6 +24,8 @@ package js.html; +import js.lib.Promise; + /** The `ExtendableEvent` interface extends the lifetime of the `install` and `activate` events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like `FetchEvent`) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. @@ -32,8 +34,7 @@ package js.html; @see **/ @:native("ExtendableEvent") -extern class ExtendableEvent extends Event -{ +extern class ExtendableEvent extends Event { /** @throws DOMError */ function new( type : String, ?eventInitDict : ExtendableEventInit ) : Void; /** @throws DOMError */ diff --git a/std/js/html/ExtendableEventInit.hx b/std/js/html/ExtendableEventInit.hx index 826fda5bc241d427a55d5a2958df021edbe1f7c5..825c6ee2a395a6eebfe5475dd85d1baa2bd1bb02 100644 --- a/std/js/html/ExtendableEventInit.hx +++ b/std/js/html/ExtendableEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,7 +24,5 @@ package js.html; -typedef ExtendableEventInit = -{ - > EventInit, +typedef ExtendableEventInit = EventInit & { } \ No newline at end of file diff --git a/std/js/html/ExtendableMessageEvent.hx b/std/js/html/ExtendableMessageEvent.hx index a269066a79b26fbfd3b5d511cdb3785d1bb0224f..59b1d07dbb672a0f4a741d7ec99af01f0db09d93 100644 --- a/std/js/html/ExtendableMessageEvent.hx +++ b/std/js/html/ExtendableMessageEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("ExtendableMessageEvent") -extern class ExtendableMessageEvent extends ExtendableEvent -{ +extern class ExtendableMessageEvent extends ExtendableEvent { /** Returns the event's data. It can be any data type. @@ -58,7 +57,7 @@ extern class ExtendableMessageEvent extends ExtendableEvent /** Returns the array containing the `MessagePort` objects representing the ports of the associated message channel. **/ - var ports(default,null) : MessagePortList; + var ports(default,null) : Array; /** @throws DOMError */ function new( type : String, ?eventInitDict : ExtendableMessageEventInit ) : Void; diff --git a/std/js/html/ExtendableMessageEventInit.hx b/std/js/html/ExtendableMessageEventInit.hx index 9bf184e0e98782abe09ff52569c39ba2863721df..309541255964a364eb44371c3523b8333429d9da 100644 --- a/std/js/html/ExtendableMessageEventInit.hx +++ b/std/js/html/ExtendableMessageEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,12 +24,10 @@ package js.html; -typedef ExtendableMessageEventInit = -{ - > ExtendableEventInit, - @:optional var data : Dynamic; - @:optional var lastEventId : String; - @:optional var origin : String; - @:optional var ports : Array; - @:optional var source : haxe.extern.EitherType>; +typedef ExtendableMessageEventInit = ExtendableEventInit & { + var ?data : Dynamic; + var ?lastEventId : String; + var ?origin : String; + var ?ports : Array; + var ?source : haxe.extern.EitherType>; } \ No newline at end of file diff --git a/std/js/html/External.hx b/std/js/html/External.hx index b5f8f20795f2d77fa063a5a8e3645b16cb5273ab..85470c248910f96ea7eaaa5ba77dd968e641ec22 100644 --- a/std/js/html/External.hx +++ b/std/js/html/External.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,10 +24,7 @@ package js.html; -@:native("External") -extern class External -{ +typedef External = { function AddSearchProvider( aDescriptionURL : String ) : Void; function IsSearchProviderInstalled( aSearchURL : String ) : Int; - function addSearchEngine( engineURL : String, iconURL : String, suggestedTitle : String, suggestedCategory : String ) : Void; } \ No newline at end of file diff --git a/std/js/html/FetchEvent.hx b/std/js/html/FetchEvent.hx index 6682fc09f8817603a51df036075ce42eb29cdee3..7abb7db9cef5227c6f7d60502743ec5fcb889c36 100644 --- a/std/js/html/FetchEvent.hx +++ b/std/js/html/FetchEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,38 +24,35 @@ package js.html; +import js.lib.Promise; + /** - The parameter passed into the `ServiceWorkerGlobalScope.onfetch` handler, `FetchEvent` represents a fetch action that is dispatched on the `ServiceWorkerGlobalScope` of a `ServiceWorker`. It contains information about the request and resulting response, and provides the `FetchEvent.respondWith()` method, which allows us to provide an arbitrary response back to the controlled page. + This is the event type for `fetch` events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the `event.respondWith()` method, which allows us to provide a response to this fetch. Documentation [FetchEvent](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("FetchEvent") -extern class FetchEvent extends ExtendableEvent -{ - +extern class FetchEvent extends ExtendableEvent { + /** - Returns the `Request` that triggered the event handler. + The `Request` the browser intends to make. **/ var request(default,null) : Request; - + /** - Returns the id of the client that the current service worker is controlling. + The `Client.id` of the same-origin `Client` that initiated the fetch. **/ var clientId(default,null) : String; - - /** - Returns a `Boolean` that is `true` if the event was dispatched with the user's intention for the page to reload, and `false` otherwise. Typically, pressing the refresh button in a browser is a reload, while clicking a link and pressing the back button is not. - **/ var isReload(default,null) : Bool; - + /** @throws DOMError */ function new( type : String, eventInitDict : FetchEventInit ) : Void; - /** @throws DOMError */ - + /** - Resolves by returning a `Response` or a network error  to Fetch`. + Prevent the browser's default fetch handling, and provide (a promise for) a response yourself. + @throws DOMError **/ function respondWith( r : Promise ) : Void; } \ No newline at end of file diff --git a/std/js/html/FetchEventInit.hx b/std/js/html/FetchEventInit.hx index 9592ae473b60a0e980b686ad9c080bb46457c99d..1bf3aac2fca422fe40876de98794e35b81c114b9 100644 --- a/std/js/html/FetchEventInit.hx +++ b/std/js/html/FetchEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,10 +24,8 @@ package js.html; -typedef FetchEventInit = -{ - > EventInit, - @:optional var clientId : String; - @:optional var isReload : Bool; +typedef FetchEventInit = EventInit & { + var ?clientId : String; + var ?isReload : Bool; var request : Request; } \ No newline at end of file diff --git a/std/js/html/LifecycleCallbacks.hx b/std/js/html/FetchObserver.hx similarity index 74% rename from std/js/html/LifecycleCallbacks.hx rename to std/js/html/FetchObserver.hx index cc0d09a9e762f1ecc2b96a44b30e4b934aa3153c..e3379442588c0821c69d8c6ac4c7549d974ee6c0 100644 --- a/std/js/html/LifecycleCallbacks.hx +++ b/std/js/html/FetchObserver.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,14 +20,15 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\WebComponents.webidl. Do not edit! +// This file is generated from mozilla\FetchObserver.webidl. Do not edit! package js.html; -typedef LifecycleCallbacks = -{ - @:optional var attachedCallback : Void -> Void; - @:optional var attributeChangedCallback : String -> String -> String -> Void; - @:optional var createdCallback : Void -> Void; - @:optional var detachedCallback : Void -> Void; +@:native("FetchObserver") +extern class FetchObserver extends EventTarget { + var state(default,null) : FetchState; + var onstatechange : haxe.Constraints.Function; + var onrequestprogress : haxe.Constraints.Function; + var onresponseprogress : haxe.Constraints.Function; + } \ No newline at end of file diff --git a/std/js/html/FetchState.hx b/std/js/html/FetchState.hx new file mode 100644 index 0000000000000000000000000000000000000000..a8ae5c3831f3519cdabe2b87b088a40b3d291348 --- /dev/null +++ b/std/js/html/FetchState.hx @@ -0,0 +1,33 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FetchObserver.webidl. Do not edit! + +package js.html; + +enum abstract FetchState(String) { + var REQUESTING = "requesting"; + var RESPONDING = "responding"; + var ABORTED = "aborted"; + var ERRORED = "errored"; + var COMPLETE = "complete"; +} \ No newline at end of file diff --git a/std/js/html/FieldSetElement.hx b/std/js/html/FieldSetElement.hx index c5251b81f91a307e136ec4b9e0da5bd6901fc17b..75a2d7034031dc6bb930165e7cdb651b1364af4a 100644 --- a/std/js/html/FieldSetElement.hx +++ b/std/js/html/FieldSetElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,17 +32,59 @@ package js.html; @see **/ @:native("HTMLFieldSetElement") -extern class FieldSetElement extends Element -{ +extern class FieldSetElement extends Element { + + /** + A `Boolean` reflecting the `disabled` HTML attribute, indicating whether the user can interact with the control. + **/ var disabled : Bool; + + /** + An `HTMLFormControlsCollection` or `HTMLCollection` referencing the containing form element, if this element is in a form. + + If the field set is not a descendant of a form element, then the attribute can be the ID of any form element in the same document it is related to, or the `null` value if none matches. + **/ var form(default,null) : FormElement; + + /** + A `DOMString` reflecting the `name` HTML attribute, containing the name of the field set, used for submitting the form. + **/ var name : String; + + /** + The `DOMString` `"fieldset"`. + **/ var type(default,null) : String; + + /** + The elements belonging to this field set. The type of this property depends on the version of the spec that is implemented by the browser. + **/ var elements(default,null) : HTMLCollection; + + /** + A `Boolean` `false`, because `fieldset` objects are never candidates for constraint validation. + **/ var willValidate(default,null) : Bool; + + /** + A `ValidityState` representing the validity states that this element is in. + **/ var validity(default,null) : ValidityState; + + /** + A `DOMString` representing a localized message that describes the validation constraints that the element does not satisfy (if any). This is the empty string if the element is not a candidate for constraint validation (`willValidate` is `false`), or it satisfies its constraints. + **/ var validationMessage(default,null) : String; + + /** + Always returns `true` because `fieldset` objects are never candidates for constraint validation. + **/ function checkValidity() : Bool; + function reportValidity() : Bool; + + /** + Sets a custom validity message for the field set. If this message is not the empty string, then the field set is suffering from a custom validity error, and does not validate. + **/ function setCustomValidity( error : String ) : Void; } \ No newline at end of file diff --git a/std/js/html/File.hx b/std/js/html/File.hx index 7e7b2c7cdf654c7abfdc47987f2d7ac20e302ed9..addade816114c2d5a8f3a63feb5ef9e786557262 100644 --- a/std/js/html/File.hx +++ b/std/js/html/File.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("File") -extern class File extends Blob -{ +extern class File extends Blob { /** Returns the name of the file referenced by the `File` object. @@ -45,14 +44,6 @@ extern class File extends Blob **/ var lastModified(default,null) : Int; - /** - Returns the last modified `Date` of the file referenced by the `File` object. - **/ - var lastModifiedDate(default,null) : Date; - /** @throws DOMError */ - @:overload( function( fileBits : Array>>>, fileName : String, ?options : FilePropertyBag ) : Void {} ) - @:overload( function( fileBits : Blob, ?options : ChromeFilePropertyBag ) : Void {} ) - @:overload( function( fileBits : Dynamic/*MISSING nsIFile*/, ?options : ChromeFilePropertyBag ) : Void {} ) - function new( fileBits : String, ?options : ChromeFilePropertyBag ) : Void; + function new( fileBits : Array,haxe.extern.EitherType>>, fileName : String, ?options : FilePropertyBag ) : Void; } \ No newline at end of file diff --git a/std/js/html/DOMTransactionEventInit.hx b/std/js/html/FileCallback.hx similarity index 85% rename from std/js/html/DOMTransactionEventInit.hx rename to std/js/html/FileCallback.hx index fa6c9f4f7aa43940e81a061fce578ff4bc84f9e4..85e46311053a874601167fc756d08b4f084c7871 100644 --- a/std/js/html/DOMTransactionEventInit.hx +++ b/std/js/html/FileCallback.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,12 +20,10 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\DOMTransactionEvent.webidl. Do not edit! +// This file is generated from mozilla\FileSystemFileEntry.webidl. Do not edit! package js.html; -typedef DOMTransactionEventInit = -{ - > EventInit, - @:optional var transactions : Dynamic; +typedef FileCallback = { + function handleEvent( file : File ) : Void; } \ No newline at end of file diff --git a/std/js/html/FileList.hx b/std/js/html/FileList.hx index 558bafbeae68c2048411b7406e2b09717bed22af..f30481e78ae281792fde314452644f6d1d013a84 100644 --- a/std/js/html/FileList.hx +++ b/std/js/html/FileList.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("FileList") -extern class FileList implements ArrayAccess -{ +extern class FileList implements ArrayAccess { var length(default,null) : Int; function item( index : Int ) : File; diff --git a/std/js/html/FileMode.hx b/std/js/html/FileMode.hx index 9452e3506560ed0d57a5ea0fc3cc783431caa8f4..61dee0136228c46af264dfe1febe3807a4b5efc2 100644 --- a/std/js/html/FileMode.hx +++ b/std/js/html/FileMode.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -@:enum abstract FileMode(String) -{ +enum abstract FileMode(String) { var READONLY = "readonly"; var READWRITE = "readwrite"; } \ No newline at end of file diff --git a/std/js/html/FilePropertyBag.hx b/std/js/html/FilePropertyBag.hx index 6a1af2adbda0f248d4a22d85841c45c6b2ace8fa..a3994d96a15c212e0e1612fa3e660e4836f70615 100644 --- a/std/js/html/FilePropertyBag.hx +++ b/std/js/html/FilePropertyBag.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -typedef FilePropertyBag = -{ - @:optional var lastModified : Int; - @:optional var type : String; +typedef FilePropertyBag = { + var ?lastModified : Int; + var ?type : String; } \ No newline at end of file diff --git a/std/js/html/FileReader.hx b/std/js/html/FileReader.hx index c9002b789f39fd25ec999ee2dce7fd546a8c794a..261c3de7fcc2032c9cd7d6975510fba074af729d 100644 --- a/std/js/html/FileReader.hx +++ b/std/js/html/FileReader.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("FileReader") -extern class FileReader extends EventTarget -{ +extern class FileReader extends EventTarget { static inline var EMPTY : Int = 0; static inline var LOADING : Int = 1; static inline var DONE : Int = 2; @@ -70,9 +69,9 @@ extern class FileReader extends EventTarget var result(default,null) : Dynamic; /** - A `DOMError` representing the error that occurred while reading the file. + A `DOMException` representing the error that occurred while reading the file. **/ - var error(default,null) : DOMError; + var error(default,null) : DOMException; /** A handler for the `loadstart` event. This event is triggered each time the reading is starting. @@ -106,34 +105,33 @@ extern class FileReader extends EventTarget /** @throws DOMError */ function new() : Void; - /** @throws DOMError */ /** Starts reading the contents of the specified `Blob`, once finished, the `result` attribute contains an `ArrayBuffer` representing the file's data. + @throws DOMError **/ function readAsArrayBuffer( blob : Blob ) : Void; - /** @throws DOMError */ + + /** + Starts reading the contents of the specified `Blob`, once finished, the `result` attribute contains the raw binary data from the file as a string. + @throws DOMError + **/ + function readAsBinaryString( filedata : Blob ) : Void; /** Starts reading the contents of the specified `Blob`, once finished, the `result` attribute contains the contents of the file as a text string. + @throws DOMError **/ - function readAsText( blob : Blob, ?label : String = "" ) : Void; - /** @throws DOMError */ + function readAsText( blob : Blob, ?label : String ) : Void; /** Starts reading the contents of the specified `Blob`, once finished, the `result` attribute contains a `data:` URL representing the file's data. + @throws DOMError **/ function readAsDataURL( blob : Blob ) : Void; - /** @throws DOMError */ /** Aborts the read operation. Upon return, the `readyState` will be `DONE`. **/ function abort() : Void; - /** @throws DOMError */ - - /** - Starts reading the contents of the specified `Blob`, once finished, the `result` attribute contains the raw binary data from the file as a string. - **/ - function readAsBinaryString( filedata : Blob ) : Void; } \ No newline at end of file diff --git a/std/js/html/FileReaderSync.hx b/std/js/html/FileReaderSync.hx index 986dc54295f58363e6a132bb3cde44ecaedf0a51..a5c0f4541fdf00d238e35b78781216056f074ab9 100644 --- a/std/js/html/FileReaderSync.hx +++ b/std/js/html/FileReaderSync.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,12 +32,11 @@ package js.html; @see **/ @:native("FileReaderSync") -extern class FileReaderSync -{ +extern class FileReaderSync { /** @throws DOMError */ function new() : Void; /** @throws DOMError */ - function readAsArrayBuffer( blob : Blob ) : ArrayBuffer; + function readAsArrayBuffer( blob : Blob ) : js.lib.ArrayBuffer; /** @throws DOMError */ function readAsBinaryString( blob : Blob ) : String; /** @throws DOMError */ diff --git a/std/js/html/FileSystem.hx b/std/js/html/FileSystem.hx new file mode 100644 index 0000000000000000000000000000000000000000..c23ee3ff41dd87fcab853562d9926767c22f3ccf --- /dev/null +++ b/std/js/html/FileSystem.hx @@ -0,0 +1,47 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FileSystem.webidl. Do not edit! + +package js.html; + +/** + The File and Directory Entries API interface `FileSystem` is used to represent a file system. These objects can be obtained from the `filesystem` property on any file system entry. Some browsers offer additional APIs to create and manage file systems, such as Chrome's `requestFileSystem()` method. + + Documentation [FileSystem](https://developer.mozilla.org/en-US/docs/Web/API/FileSystem) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/FileSystem$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("FileSystem") +extern class FileSystem { + + /** + A `USVString` representing the file system's name. This name is unique among the entire list of exposed file systems. + **/ + var name(default,null) : String; + + /** + A `FileSystemDirectoryEntry` object which represents the file system's root directory. Through this object, you can gain access to all files and directories in the file system. + **/ + var root(default,null) : FileSystemDirectoryEntry; + +} \ No newline at end of file diff --git a/std/js/html/FileSystemDirectoryEntry.hx b/std/js/html/FileSystemDirectoryEntry.hx new file mode 100644 index 0000000000000000000000000000000000000000..675448bf1bcd6ff2d4f00b3f68bd24f3047ecd81 --- /dev/null +++ b/std/js/html/FileSystemDirectoryEntry.hx @@ -0,0 +1,43 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FileSystemDirectoryEntry.webidl. Do not edit! + +package js.html; + +/** + The `FileSystemDirectoryEntry` interface of the File and Directory Entries API represents a directory in a file system. It provides methods which make it possible to access and manipulate the files in a directory, as well as to access the entries within the directory. + + Documentation [FileSystemDirectoryEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("FileSystemDirectoryEntry") +extern class FileSystemDirectoryEntry extends FileSystemEntry { + function createReader() : FileSystemDirectoryReader; + @:overload( function( ?path : String, ?options : FileSystemFlags, ?successCallback : haxe.Constraints.Function, ?errorCallback : haxe.Constraints.Function) : Void {} ) + @:overload( function( ?path : String, ?options : FileSystemFlags, ?successCallback : FileSystemEntryCallback, ?errorCallback : ErrorCallback) : Void {} ) + function getFile( ?path : String, ?options : FileSystemFlags, ?successCallback : FileSystemEntry -> Void, ?errorCallback : DOMException -> Void ) : Void; + @:overload( function( ?path : String, ?options : FileSystemFlags, ?successCallback : haxe.Constraints.Function, ?errorCallback : haxe.Constraints.Function) : Void {} ) + @:overload( function( ?path : String, ?options : FileSystemFlags, ?successCallback : FileSystemEntryCallback, ?errorCallback : ErrorCallback) : Void {} ) + function getDirectory( ?path : String, ?options : FileSystemFlags, ?successCallback : FileSystemEntry -> Void, ?errorCallback : DOMException -> Void ) : Void; +} \ No newline at end of file diff --git a/std/js/html/FileSystemDirectoryReader.hx b/std/js/html/FileSystemDirectoryReader.hx new file mode 100644 index 0000000000000000000000000000000000000000..097468b714f7ac2f9043c7ce155cbb91de5d9493 --- /dev/null +++ b/std/js/html/FileSystemDirectoryReader.hx @@ -0,0 +1,40 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FileSystemDirectoryReader.webidl. Do not edit! + +package js.html; + +/** + The `FileSystemDirectoryReader` interface of the File and Directory Entries API lets you access the `FileEntry`-based objects (generally `FileSystemFileEntry` or `FileSystemDirectoryEntry`) representing each entry in a directory. + + Documentation [FileSystemDirectoryReader](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("FileSystemDirectoryReader") +extern class FileSystemDirectoryReader { + /** @throws DOMError */ + @:overload( function( successCallback : haxe.Constraints.Function, ?errorCallback : haxe.Constraints.Function) : Void {} ) + @:overload( function( successCallback : FileSystemEntriesCallback, ?errorCallback : ErrorCallback) : Void {} ) + function readEntries( successCallback : Array -> Void, ?errorCallback : DOMException -> Void ) : Void; +} \ No newline at end of file diff --git a/std/js/html/FileSystemEntriesCallback.hx b/std/js/html/FileSystemEntriesCallback.hx new file mode 100644 index 0000000000000000000000000000000000000000..8ff8dd3695fb0245f8115d341398b39389b7f3b5 --- /dev/null +++ b/std/js/html/FileSystemEntriesCallback.hx @@ -0,0 +1,29 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FileSystemDirectoryReader.webidl. Do not edit! + +package js.html; + +typedef FileSystemEntriesCallback = { + function handleEvent( entries : Array ) : Void; +} \ No newline at end of file diff --git a/std/js/html/FileSystemEntry.hx b/std/js/html/FileSystemEntry.hx new file mode 100644 index 0000000000000000000000000000000000000000..1dbfc34de886751d62976e426b660c331da89e75 --- /dev/null +++ b/std/js/html/FileSystemEntry.hx @@ -0,0 +1,65 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FileSystemEntry.webidl. Do not edit! + +package js.html; + +/** + The `FileSystemEntry` interface of the File and Directory Entries API represents a single in a file system. The entry can be a file or a directory (directories are represented by the `DirectoryEntry` interface). It includes methods for working with files—including copying, moving, removing, and reading files—as well as information about a file it points to—including the file name and its path from the root to the entry. + + Documentation [FileSystemEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("FileSystemEntry") +extern class FileSystemEntry { + + /** + A Boolean which is `true` if the entry represents a file. If it's not a file, this value is `false`. + **/ + var isFile(default,null) : Bool; + + /** + A `Boolean` which is `true` if the entry represents a directory; otherwise, it's `false`. + **/ + var isDirectory(default,null) : Bool; + + /** + A `USVString` containing the name of the entry (the final part of the path, after the last "/" character). + **/ + var name(default,null) : String; + + /** + A `USVString` object which provides the full, absolute path from the file system's root to the entry; it can also be thought of as a path which is relative to the root directory, prepended with a "/" character. + **/ + var fullPath(default,null) : String; + + /** + A `FileSystem` object representing the file system in which the entry is located. + **/ + var filesystem(default,null) : FileSystem; + + @:overload( function( ?successCallback : haxe.Constraints.Function, ?errorCallback : haxe.Constraints.Function) : Void {} ) + @:overload( function( ?successCallback : FileSystemEntryCallback, ?errorCallback : ErrorCallback) : Void {} ) + function getParent( ?successCallback : FileSystemEntry -> Void, ?errorCallback : DOMException -> Void ) : Void; +} \ No newline at end of file diff --git a/std/js/html/FileSystemEntryCallback.hx b/std/js/html/FileSystemEntryCallback.hx new file mode 100644 index 0000000000000000000000000000000000000000..ee0e494118612eb2ec024c02b86896a54f129848 --- /dev/null +++ b/std/js/html/FileSystemEntryCallback.hx @@ -0,0 +1,29 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FileSystem.webidl. Do not edit! + +package js.html; + +typedef FileSystemEntryCallback = { + function handleEvent( entry : FileSystemEntry ) : Void; +} \ No newline at end of file diff --git a/std/js/html/FileSystemFileEntry.hx b/std/js/html/FileSystemFileEntry.hx new file mode 100644 index 0000000000000000000000000000000000000000..8fb5e40be5a0b38d60c3b68e98ef260aa0c112c7 --- /dev/null +++ b/std/js/html/FileSystemFileEntry.hx @@ -0,0 +1,39 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FileSystemFileEntry.webidl. Do not edit! + +package js.html; + +/** + The `FileSystemFileEntry` interface of the File System API represents a file in a file system. It offers properties describing the file's attributes, as well as the `file()` method, which creates a `File` object that can be used to read the file. + + Documentation [FileSystemFileEntry](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("FileSystemFileEntry") +extern class FileSystemFileEntry extends FileSystemEntry { + @:overload( function( successCallback : haxe.Constraints.Function, ?errorCallback : haxe.Constraints.Function) : Void {} ) + @:overload( function( successCallback : FileCallback, ?errorCallback : ErrorCallback) : Void {} ) + function file( successCallback : File -> Void, ?errorCallback : DOMException -> Void ) : Void; +} \ No newline at end of file diff --git a/std/js/html/FileSystemFlags.hx b/std/js/html/FileSystemFlags.hx new file mode 100644 index 0000000000000000000000000000000000000000..979d8247dddad368ef6707c3709fc6d5ff19a1f4 --- /dev/null +++ b/std/js/html/FileSystemFlags.hx @@ -0,0 +1,45 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FileSystem.webidl. Do not edit! + +package js.html; + +/** + The `FileSystemFlags` dictionary defines a set of values which are used when specifying option flags when calling certain methods in the File and Directory Entries API. Methods which accept an options parameter of this type may specify zero or more of these flags as fields in an object, like this: + + Documentation [FileSystemFlags](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFlags) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFlags$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +typedef FileSystemFlags = { + + /** + If this property is `true`, and the requested file or directory doesn't exist, the user agent should create it. The default is `false`. The parent directory must already exist. + **/ + var ?create : Bool; + + /** + If `true`, and the `create` option is also `true`, the file must not exist prior to issuing the call. Instead, it must be possible for it to be created newly at call time. The default is `false`. + **/ + var ?exclusive : Bool; +} \ No newline at end of file diff --git a/std/js/html/FillMode.hx b/std/js/html/FillMode.hx index 19b8ba1c7b64415fc78d3005742ecd76818c3677..57b14a9295c92b1ae778078baa877ab36391bc3e 100644 --- a/std/js/html/FillMode.hx +++ b/std/js/html/FillMode.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,12 +20,11 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\AnimationEffectReadOnly.webidl. Do not edit! +// This file is generated from mozilla\AnimationEffect.webidl. Do not edit! package js.html; -@:enum abstract FillMode(String) -{ +enum abstract FillMode(String) { var NONE = "none"; var FORWARDS = "forwards"; var BACKWARDS = "backwards"; diff --git a/std/js/html/Float32Array.hx b/std/js/html/Float32Array.hx index 6f8336c0498db058cf65bf7acd624acb6e3aa8fb..3a9b21c5022fb382c8dad991f989af3165f5ef05 100644 --- a/std/js/html/Float32Array.hx +++ b/std/js/html/Float32Array.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,26 +20,6 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from typedarray.webidl. Do not edit! - package js.html; -// Explicitly include the compatibility class -import js.html.compat.Float32Array; - -@:native("Float32Array") -extern class Float32Array extends ArrayBufferView implements ArrayAccess -{ - static inline var BYTES_PER_ELEMENT : Int = 4; - - var length(default,null) : Int; - - /** @throws DOMError */ - @:overload( function( length : Int ) : Void {} ) - @:overload( function( array : Float32Array ) : Void {} ) - @:overload( function( array : Array ) : Void {} ) - function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void; - @:overload( function( array : Float32Array, ?offset : Int ) : Void {} ) - function set( array : Array, ?offset : Int ) : Void; - function subarray( start : Int, ?end : Int ) : Float32Array; -} \ No newline at end of file +@:deprecated typedef Float32Array = js.lib.Float32Array; diff --git a/std/js/html/Float64Array.hx b/std/js/html/Float64Array.hx index 0fa72c2ff9774bc884fab0897b4d808a047a6732..e1249aa1712969d59e8f13328da9721a46ea0632 100644 --- a/std/js/html/Float64Array.hx +++ b/std/js/html/Float64Array.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,26 +20,6 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from typedarray.webidl. Do not edit! - package js.html; -// Explicitly include the compatibility class -import js.html.compat.Float64Array; - -@:native("Float64Array") -extern class Float64Array extends ArrayBufferView implements ArrayAccess -{ - static inline var BYTES_PER_ELEMENT : Int = 8; - - var length(default,null) : Int; - - /** @throws DOMError */ - @:overload( function( length : Int ) : Void {} ) - @:overload( function( array : Float64Array ) : Void {} ) - @:overload( function( array : Array ) : Void {} ) - function new( buffer : ArrayBuffer, ?byteOffset : Int, ?length : Int ) : Void; - @:overload( function( array : Float64Array, ?offset : Int ) : Void {} ) - function set( array : Array, ?offset : Int ) : Void; - function subarray( start : Int, ?end : Int ) : Float64Array; -} \ No newline at end of file +@:deprecated typedef Float64Array = js.lib.Float64Array; diff --git a/std/js/html/FocusEvent.hx b/std/js/html/FocusEvent.hx index 5193ceaf53915fc6423c42592720d72abc78ddfd..33bf935752f7fad9a15c7f54e19e712769e2b07a 100644 --- a/std/js/html/FocusEvent.hx +++ b/std/js/html/FocusEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("FocusEvent") -extern class FocusEvent extends UIEvent -{ +extern class FocusEvent extends UIEvent { /** Is an `EventTarget` representing a secondary target for this event. As in some cases (like when tabbing in or out a page), this property may be set to `null` for security reasons. diff --git a/std/js/html/FocusEventInit.hx b/std/js/html/FocusEventInit.hx index ae2dd7ad7444bce6ab3199ba68f261bf84497f36..3e6d60c0f897112b2000221d1635502c9e39ca20 100644 --- a/std/js/html/FocusEventInit.hx +++ b/std/js/html/FocusEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,6 @@ package js.html; -typedef FocusEventInit = -{ - > UIEventInit, - @:optional var relatedTarget : EventTarget; +typedef FocusEventInit = UIEventInit & { + var ?relatedTarget : EventTarget; } \ No newline at end of file diff --git a/std/js/html/FontElement.hx b/std/js/html/FontElement.hx index 1e669db035d84ee2cd787325db346d17f0d43d4b..15d7ffbfae195097552fca679e174da6c33ccce1 100644 --- a/std/js/html/FontElement.hx +++ b/std/js/html/FontElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,11 +24,29 @@ package js.html; +/** + Implements the document object model (DOM) representation of the font element. The HTML Font Element `font` defines the font size, font face and color of text. + + Documentation [HTMLFontElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFontElement) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFontElement$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ @:native("HTMLFontElement") -extern class FontElement extends Element -{ +extern class FontElement extends Element { + + /** + Is a `DOMString` that reflects the `color` HTML attribute, containing either a named color or a color specified in the hexadecimal #RRGGBB format. + **/ var color : String; + + /** + Is a `DOMString` that reflects the `face` HTML attribute, containing a comma-separated list of one or more font names. + **/ var face : String; + + /** + Is a `DOMString` that reflects the `size` HTML attribute, containing either a font size number ranging from 1 to 7 or a relative size to the `size` attribute of the `basefont` element, for example -2 or +1. + **/ var size : String; } \ No newline at end of file diff --git a/std/js/html/FontFace.hx b/std/js/html/FontFace.hx index 953a5d7049614b1cbc685ca272b762f6ffc2516d..7110e6a38455031db21f396aa8b0447222894e93 100644 --- a/std/js/html/FontFace.hx +++ b/std/js/html/FontFace.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,6 +24,8 @@ package js.html; +import js.lib.Promise; + /** The `FontFace` interface represents a single usable font face. It allows control of the source of the font face, being a URL to an external resource, or a buffer; it also allows control of when the font face is loaded and its current status. @@ -32,60 +34,61 @@ package js.html; @see **/ @:native("FontFace") -extern class FontFace -{ - +extern class FontFace { + /** - Is a `DOMString` that contains the family of the font. It is equivalent to the `@font-face/family` descriptor. + Is a `CSSOMString` that contains the family of the font. It is equivalent to the `@font-face/font-family` descriptor. **/ var family : String; - + /** - Is a `DOMString` that contains the style of the font. It is equivalent to the `@font-face/style` descriptor. + Is a `CSSOMString` that contains the style of the font. It is equivalent to the `@font-face/font-style` descriptor. **/ var style : String; - + /** - Is a `DOMString` that contains the weight of the font. It is equivalent to the `@font-face/weight` descriptor. + Is a `CSSOMString` that contains the weight of the font. It is equivalent to the `@font-face/font-weight` descriptor. **/ var weight : String; - + /** - Is a `DOMString` that contains how the font stretches. It is equivalent to the `@font-face/stretch` descriptor. + Is a `CSSOMString` that contains how the font stretches. It is equivalent to the `@font-face/font-stretch` descriptor. **/ var stretch : String; - + /** - Is a `DOMString` that contains the range of code encompassed the font. It is equivalent to the `@font-face/unicode-range` descriptor. + Is a `CSSOMString` that contains the range of code encompassed the font. It is equivalent to the `@font-face/unicode-range` descriptor. **/ var unicodeRange : String; - + /** - Is a `DOMString` that contains the variant of the font. It is equivalent to the `@font-face/range` descriptor. + Is a `CSSOMString` that contains the variant of the font. It is equivalent to the `@font-face/font-variant` descriptor. **/ var variant : String; - + /** - Is a `DOMString` that contains the features of the font. It is equivalent to the `@font-face/feature-settings` descriptor. + Is a `CSSOMString` that contains the features of the font. It is equivalent to the `@font-face/font-feature-settings`descriptor. **/ var featureSettings : String; - + /** Returns an enumerated value indicating the status of the font. It can be one of the following: `"unloaded"`, `"loading"`, `"loaded"`, or `"error"`. **/ var status(default,null) : FontFaceLoadStatus; - + /** Returns a `Promise` to a `FontFace` that fulfills when the font is completely loaded and rejects when an error happens. **/ var loaded(default,null) : Promise; - - /** @throws DOMError */ - function new( family : String, source : haxe.extern.EitherType>, ?descriptors : FontFaceDescriptors ) : Void; + /** @throws DOMError */ - + @:overload( function( family : String, source : js.lib.ArrayBuffer, ?descriptors : FontFaceDescriptors) : FontFace {} ) + @:overload( function( family : String, source : js.lib.ArrayBufferView, ?descriptors : FontFaceDescriptors) : FontFace {} ) + function new( family : String, source : String, ?descriptors : FontFaceDescriptors ) : Void; + /** Loads the font, returning a `Promise` to a `FontFace` that fulfills when the font is completely loaded and rejects when an error happens. + @throws DOMError **/ function load() : Promise; } \ No newline at end of file diff --git a/std/js/html/FontFaceDescriptors.hx b/std/js/html/FontFaceDescriptors.hx index 609299f2eeab3c6ba5d23970f25acbf40488ff91..d42f979d0ae8225b0b6c75cd704c2d3e88712c3e 100644 --- a/std/js/html/FontFaceDescriptors.hx +++ b/std/js/html/FontFaceDescriptors.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,13 +24,13 @@ package js.html; -typedef FontFaceDescriptors = -{ - @:optional var display : String; - @:optional var featureSettings : String; - @:optional var stretch : String; - @:optional var style : String; - @:optional var unicodeRange : String; - @:optional var variant : String; - @:optional var weight : String; +typedef FontFaceDescriptors = { + var ?display : String; + var ?featureSettings : String; + var ?stretch : String; + var ?style : String; + var ?unicodeRange : String; + var ?variant : String; + var ?variationSettings : String; + var ?weight : String; } \ No newline at end of file diff --git a/std/js/html/FontFaceLoadStatus.hx b/std/js/html/FontFaceLoadStatus.hx index 178e14e648be272d1f6aa39f7031e23fbeaf6cbd..5fec36d2817edcbeef6795b3bffd6748b40e5c81 100644 --- a/std/js/html/FontFaceLoadStatus.hx +++ b/std/js/html/FontFaceLoadStatus.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -@:enum abstract FontFaceLoadStatus(String) -{ +enum abstract FontFaceLoadStatus(String) { var UNLOADED = "unloaded"; var LOADING = "loading"; var LOADED = "loaded"; diff --git a/std/js/html/FontFaceSet.hx b/std/js/html/FontFaceSet.hx index 2f8bf66965e70f62714ecb4d6e1a34317427f7af..85f5de5169055e1648e44626a5ec7a008543df51 100644 --- a/std/js/html/FontFaceSet.hx +++ b/std/js/html/FontFaceSet.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,50 +24,50 @@ package js.html; +import js.lib.Promise; + /** - The `FontFaceSet` interface of the CSS Font Loading API is an interface for loading font faces and checking their download statuses. + The `FontFaceSet` interface of the CSS Font Loading API manages the loading of font-faces and querying of their download status. Documentation [FontFaceSet](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("FontFaceSet") -extern class FontFaceSet extends EventTarget -{ +extern class FontFaceSet extends EventTarget { var size(default,null) : Int; - + /** - An `EventListener` property called whenever an event of type `loading` is fired, indicating that a font face set has started to load. + An `EventListener` called whenever an event of type `loading` is fired, indicating a font-face set has started loading. **/ var onloading : haxe.Constraints.Function; - + /** - An `EventListener` property called whenever an event of type `loadingdone` is fired, indicating that a font face set has finished loading. + An `EventListener` called whenever an event of type `loadingdone` is fired, indicating that a font face set has finished loading. **/ var onloadingdone : haxe.Constraints.Function; - + /** - An `EventListener` property called whenever an event of type `loadingerror` is fired, indicating that an error occurred during the loading of a font face set. + An `EventListener` called whenever an event of type `loadingerror` is fired, indicating that an error occurred whilst loading a font-face set. **/ var onloadingerror : haxe.Constraints.Function; var ready(default,null) : Promise; - + /** - Indicates the font face's loading status. It will be one of `'loading'` or `'loaded'`. + Indicates the font-face's loading status. It will be one of `'loading'` or `'loaded'`. **/ var status(default,null) : FontFaceSetLoadStatus; - + /** @throws DOMError */ function add( font : FontFace ) : Void; function has( font : FontFace ) : Bool; - @:native("delete") - function delete_( font : FontFace ) : Bool; + function delete( font : FontFace ) : Bool; function clear() : Void; function entries() : FontFaceSetIterator; function values() : FontFaceSetIterator; /** @throws DOMError */ function forEach( cb : FontFace -> FontFace -> FontFaceSet -> Void, ?thisArg : Dynamic ) : Void; - function load( font : String, ?text : String = " " ) : Promise>; + function load( font : String, text : String = " " ) : Promise>; /** @throws DOMError */ - function check( font : String, ?text : String = " " ) : Bool; + function check( font : String, text : String = " " ) : Bool; } \ No newline at end of file diff --git a/std/js/html/FontFaceSetIterator.hx b/std/js/html/FontFaceSetIterator.hx index 2ecf87aa5e947cb44d885e882bc58daef2dc9c2b..972b78ffffa3b1e1e58dc2899215f3e8ac2d68ef 100644 --- a/std/js/html/FontFaceSetIterator.hx +++ b/std/js/html/FontFaceSetIterator.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,9 +24,7 @@ package js.html; -@:native("FontFaceSetIterator") -extern class FontFaceSetIterator -{ +typedef FontFaceSetIterator = { /** @throws DOMError */ function next() : FontFaceSetIteratorResult; } \ No newline at end of file diff --git a/std/js/html/FontFaceSetIteratorResult.hx b/std/js/html/FontFaceSetIteratorResult.hx index 686f4613a32a192d7320ef640607a477487f0af6..219b0ff1e657e0ea7a85aa4f66a4fecb44f92fee 100644 --- a/std/js/html/FontFaceSetIteratorResult.hx +++ b/std/js/html/FontFaceSetIteratorResult.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -typedef FontFaceSetIteratorResult = -{ +typedef FontFaceSetIteratorResult = { var done : Bool; var value : Dynamic; } \ No newline at end of file diff --git a/std/js/html/FontFaceSetLoadEvent.hx b/std/js/html/FontFaceSetLoadEvent.hx new file mode 100644 index 0000000000000000000000000000000000000000..c445f1c8cf8a6e469f5502686dcb81be5f8d8225 --- /dev/null +++ b/std/js/html/FontFaceSetLoadEvent.hx @@ -0,0 +1,44 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FontFaceSetLoadEvent.webidl. Do not edit! + +package js.html; + +/** + The `FontFaceSetLoadEvent` interface of the the Css Font Loading API is fired whenever a `FontFaceSet` loads. + + Documentation [FontFaceSetLoadEvent](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSetLoadEvent) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSetLoadEvent$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + + @see +**/ +@:native("FontFaceSetLoadEvent") +extern class FontFaceSetLoadEvent extends Event { + + /** + Returns an array of `FontFace` instances each of which represents a single usable font. + **/ + var fontfaces(default,null) : Array; + + /** @throws DOMError */ + function new( type : String, ?eventInitDict : FontFaceSetLoadEventInit ) : Void; +} \ No newline at end of file diff --git a/std/js/html/FontFaceSetLoadEventInit.hx b/std/js/html/FontFaceSetLoadEventInit.hx new file mode 100644 index 0000000000000000000000000000000000000000..5cfe37a23edc391a142093b8d3903e260e1dffd4 --- /dev/null +++ b/std/js/html/FontFaceSetLoadEventInit.hx @@ -0,0 +1,29 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\FontFaceSetLoadEvent.webidl. Do not edit! + +package js.html; + +typedef FontFaceSetLoadEventInit = EventInit & { + var ?fontfaces : Array; +} \ No newline at end of file diff --git a/std/js/html/FontFaceSetLoadStatus.hx b/std/js/html/FontFaceSetLoadStatus.hx index c2fbc3178c38a9b9594334356e200ccc1e509305..9180e1fdbcc31e333704e0864892d93af97b0ca8 100644 --- a/std/js/html/FontFaceSetLoadStatus.hx +++ b/std/js/html/FontFaceSetLoadStatus.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -@:enum abstract FontFaceSetLoadStatus(String) -{ +enum abstract FontFaceSetLoadStatus(String) { var LOADING = "loading"; var LOADED = "loaded"; } \ No newline at end of file diff --git a/std/js/html/FormData.hx b/std/js/html/FormData.hx index 80f6966aa6b70d0e01e7ddd57c5b7448c7b2ef12..0ac334cff00feecbdf89f89b87e850f6f4312073 100644 --- a/std/js/html/FormData.hx +++ b/std/js/html/FormData.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,57 +32,59 @@ package js.html; @see **/ @:native("FormData") -extern class FormData -{ +extern class FormData { /** @throws DOMError */ function new( ?form : FormElement ) : Void; - /** @throws DOMError */ - @:overload( function( name : String, value : Blob, ?filename : String ) : Void {} ) /** Appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist. + @throws DOMError **/ + @:overload( function( name : String, value : Blob, ?filename : String ) : Void {} ) function append( name : String, value : String ) : Void; - @:native("delete") - function delete_( name : String ) : Void; + + /** + Deletes a key/value pair from a `FormData` object. + **/ + function delete( name : String ) : Void; /** Returns the first value associated with a given key from within a `FormData` object. **/ - function get( name : String ) : haxe.extern.EitherType; + function get( name : String ) : haxe.extern.EitherType>; /** Returns an array of all the values associated with a given key from within a `FormData`. **/ - function getAll( name : String ) : Array>; + function getAll( name : String ) : Array>>; /** Returns a boolean stating whether a `FormData` object contains a certain key/value pair. **/ function has( name : String ) : Bool; - /** @throws DOMError */ - @:overload( function( name : String, value : Blob, ?filename : String ) : Void {} ) /** Sets a new value for an existing key inside a `FormData `object, or adds the key/value if it does not already exist. + @throws DOMError **/ + @:overload( function( name : String, value : Blob, ?filename : String ) : Void {} ) function set( name : String, value : String ) : Void; - /** @throws DOMError */ /** Returns an `Iteration_protocols` allowing to go through all key/value pairs contained in this object. + @throws DOMError **/ function entries() : FormDataIterator; - /** @throws DOMError */ /** Returns an `Iteration_protocols` allowing to go through all keys of the key/value pairs contained in this object. + @throws DOMError **/ function keys() : FormDataIterator; - /** @throws DOMError */ /** Returns an `Iteration_protocols` allowing to go through all values of the key/value pairs contained in this object. + @throws DOMError **/ function values() : FormDataIterator; /** @throws DOMError */ diff --git a/std/js/html/FormDataIterator.hx b/std/js/html/FormDataIterator.hx index 2738acda31651c182e941267a014ce8095fb3b60..1af87400fd4501ee0e672105ceadf3753ef2d9ff 100644 --- a/std/js/html/FormDataIterator.hx +++ b/std/js/html/FormDataIterator.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,9 +24,7 @@ package js.html; -@:native("FormDataIterator") -extern class FormDataIterator -{ +typedef FormDataIterator = { /** @throws DOMError */ function next() : Dynamic; } \ No newline at end of file diff --git a/std/js/html/FormElement.hx b/std/js/html/FormElement.hx index 062e78b26e13f4e55b44cc738e549b9d22b9339f..bfc9d015b434cec87d35618b01e12e5c2f444ae2 100644 --- a/std/js/html/FormElement.hx +++ b/std/js/html/FormElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,33 +25,89 @@ package js.html; /** - The `HTMLFormElement` interface provides methods to create and modify `form` elements. - document.forms - returns an array of HTMLFormElement objects referencing all forms on the page. - document.forms[index] - returns an HTMLFormElement object referencing the form at the specified index. - document.forms['id'] - returns an HTMLFormElement object referencing the form with the specified id. - document.forms['name'] - returns an HTMLFormElement object referencing the form with the specified name. + The `HTMLFormElement` interface represents a `form` element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements. Documentation [HTMLFormElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("HTMLFormElement") -extern class FormElement extends Element implements ArrayAccess -{ +extern class FormElement extends Element implements ArrayAccess { + + /** + A `DOMString` reflecting the value of the form's `accept-charset` HTML attribute, representing the character encoding that the server accepts. + **/ var acceptCharset : String; + + /** + A `DOMString` reflecting the value of the form's `action` HTML attribute, containing the URI of a program that processes the information submitted by the form. + **/ var action : String; + + /** + A `DOMString` reflecting the value of the form's `autocomplete` HTML attribute, indicating whether the controls in this form can have their values automatically populated by the browser. + **/ var autocomplete : String; + + /** + A `DOMString` reflecting the value of the form's `enctype` HTML attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two properties are synonyms. + **/ var enctype : String; + + /** + A `DOMString` reflecting the value of the form's `enctype` HTML attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two properties are synonyms. + **/ var encoding : String; + + /** + A `DOMString` reflecting the value of the form's `method` HTML attribute, indicating the HTTP method used to submit the form. Only specified values can be set. + **/ var method : String; + + /** + A `DOMString` reflecting the value of the form's `name` HTML attribute, containing the name of the form. + **/ var name : String; + + /** + A `Boolean` reflecting the value of the form's  `novalidate` HTML attribute, indicating whether the form should not be validated. + **/ var noValidate : Bool; + + /** + A `DOMString` reflecting the value of the form's `target` HTML attribute, indicating where to display the results received from submitting the form. + **/ var target : String; + + /** + A `HTMLFormControlsCollection` holding all form controls belonging to this form element. + **/ var elements(default,null) : HTMLCollection; + + /** + A `long` reflecting  the number of controls in the form. + **/ var length(default,null) : Int; - /** @throws DOMError */ + + /** + Submits the form to the server. + @throws DOMError + **/ function submit() : Void; + + /** + Resets the form to its initial state. + **/ function reset() : Void; + + /** + Returns `true` if the element's child controls are subject to constraint validation and satisfy those contraints; returns `false` if some controls do not satisfy their constraints. Fires an event named `invalid` at any control that does not satisfy its constraints; such controls are considered invalid if the event is not canceled. It is up to the programmer to decide how to respond to `false`. + **/ function checkValidity() : Bool; + + /** + Returns `true` if the element's child controls satisfy their validation constraints. When `false` is returned, cancelable `invalid` events are fired for each invalid child and validation problems are reported to the user. + **/ + function reportValidity() : Bool; } \ No newline at end of file diff --git a/std/js/html/FrameElement.hx b/std/js/html/FrameElement.hx index 204f617c423b89749e7ed36118c3937419666fc3..f4844c9ef8842613b40210e73a2401a7d1c6d206 100644 --- a/std/js/html/FrameElement.hx +++ b/std/js/html/FrameElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,8 +25,7 @@ package js.html; @:native("HTMLFrameElement") -extern class FrameElement extends Element -{ +extern class FrameElement extends Element { var name : String; var scrolling : String; var src : String; diff --git a/std/js/html/FrameSetElement.hx b/std/js/html/FrameSetElement.hx index 7ddbb9a7979ba501a7f5826f4d3d8c0e7484eb35..b9732572d95b8dfc9ddeb1ddee9ca95235afb75a 100644 --- a/std/js/html/FrameSetElement.hx +++ b/std/js/html/FrameSetElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,24 +32,24 @@ package js.html; @see **/ @:native("HTMLFrameSetElement") -extern class FrameSetElement extends Element -{ +extern class FrameSetElement extends Element { /** - Is a `DOMString` that represents the foreground color of text. + Is a `DOMString` structured as a comma-seperated list specifing the width of each column inside a frameset. **/ var cols : String; /** - Is a `DOMString` that represents the color of visited links. + Is a `DOMString` structured as a comma-seperated list specifing the height of each column inside a frameset. **/ var rows : String; var onafterprint : haxe.Constraints.Function; var onbeforeprint : haxe.Constraints.Function; - var onbeforeunload : Event -> String; + var onbeforeunload : Event -> Null; var onhashchange : haxe.Constraints.Function; var onlanguagechange : haxe.Constraints.Function; var onmessage : haxe.Constraints.Function; + var onmessageerror : haxe.Constraints.Function; var onoffline : haxe.Constraints.Function; var ononline : haxe.Constraints.Function; var onpagehide : haxe.Constraints.Function; diff --git a/std/js/html/FrameType.hx b/std/js/html/FrameType.hx index e196fccb4871f799dc28821e364b0cad927f2b3d..9d1860084a6e1974137c6ea58ae5b66cabfd24fc 100644 --- a/std/js/html/FrameType.hx +++ b/std/js/html/FrameType.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -@:enum abstract FrameType(String) -{ +enum abstract FrameType(String) { var AUXILIARY = "auxiliary"; var TOP_LEVEL = "top-level"; var NESTED = "nested"; diff --git a/std/js/html/Gamepad.hx b/std/js/html/Gamepad.hx index 0036ee3ba18f98cfcb66ef0b98d9b1a9f3e81aae..47b9cba5e819aab90ce4820ba87b8cfc429b96c4 100644 --- a/std/js/html/Gamepad.hx +++ b/std/js/html/Gamepad.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("Gamepad") -extern class Gamepad -{ +extern class Gamepad { /** A `DOMString` containing identifying information about the controller. @@ -66,7 +65,7 @@ extern class Gamepad var axes(default,null) : Array; /** - A `DOMHighResTimeStamp` representing the last time the data for this gamepad was updated. Note that this property is not currently supported anywhere. + A `DOMHighResTimeStamp` representing the last time the data for this gamepad was updated. **/ var timestamp(default,null) : Float; diff --git a/std/js/html/GamepadButton.hx b/std/js/html/GamepadButton.hx index 1aa6f3dfbd8a22faa0908317ac3897d774ccb926..2511dd78df1edf8b0f82705f3add8e33256009e7 100644 --- a/std/js/html/GamepadButton.hx +++ b/std/js/html/GamepadButton.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,13 +32,13 @@ package js.html; @see **/ @:native("GamepadButton") -extern class GamepadButton -{ +extern class GamepadButton { /** A boolean value indicating whether the button is currently pressed (`true`) or unpressed (`false`). **/ var pressed(default,null) : Bool; + var touched(default,null) : Bool; /** A double value used to represent the current state of analog buttons, such as the triggers on many modern gamepads. The values are normalized to the range 0.0 —1.0, with 0.0 representing a button that is not pressed, and 1.0 representing a button that is fully pressed. diff --git a/std/js/html/CSSValueList.hx b/std/js/html/GamepadEvent.hx similarity index 54% rename from std/js/html/CSSValueList.hx rename to std/js/html/GamepadEvent.hx index dac04577373e0e88f2fe670497625b8446f71b4f..b6d927d4a44314eeb29a7d71e19bf71dbb8a5ce4 100644 --- a/std/js/html/CSSValueList.hx +++ b/std/js/html/GamepadEvent.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,29 +20,25 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\CSSValueList.webidl. Do not edit! +// This file is generated from mozilla\GamepadEvent.webidl. Do not edit! package js.html; /** - The `CSSValueList` interface derives from the `CSSValue` interface and provides the abstraction of an ordered collection of CSS values. + The GamepadEvent interface of the Gamepad API contains references to gamepads connected to the system, which is what the gamepad events `Window.gamepadconnected` and `Window.gamepaddisconnected` are fired in response to. - Documentation [CSSValueList](https://developer.mozilla.org/en-US/docs/Web/API/CSSValueList) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/CSSValueList$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). + Documentation [GamepadEvent](https://developer.mozilla.org/en-US/docs/Web/API/GamepadEvent) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/GamepadEvent$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). - @see + @see **/ -@:native("CSSValueList") -extern class CSSValueList extends CSSValue implements ArrayAccess -{ +@:native("GamepadEvent") +extern class GamepadEvent extends Event { /** - An `unsigned long` representing the number of `CSSValues` in the list. + Returns a `Gamepad` object, providing access to the associated gamepad data for the event fired. **/ - var length(default,null) : Int; + var gamepad(default,null) : Gamepad; - - /** - This method is used to retrieve a `CSSValue` by ordinal index. The order in this collection represents the order of the values in the CSS style property. If index is greater than or equal to the number of values in the list, this returns `null`. - **/ - function item( index : Int ) : CSSValue; + /** @throws DOMError */ + function new( type : String, ?eventInitDict : GamepadEventInit ) : Void; } \ No newline at end of file diff --git a/std/js/html/DummyInterfaceWorkers.hx b/std/js/html/GamepadEventInit.hx similarity index 86% rename from std/js/html/DummyInterfaceWorkers.hx rename to std/js/html/GamepadEventInit.hx index a1a298611d17762166e05a300fe06854e6a64c6e..25769491dadd82c711acd1b7baf2d25da17de9ff 100644 --- a/std/js/html/DummyInterfaceWorkers.hx +++ b/std/js/html/GamepadEventInit.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -20,11 +20,10 @@ * DEALINGS IN THE SOFTWARE. */ -// This file is generated from mozilla\DummyBinding.webidl. Do not edit! +// This file is generated from mozilla\GamepadEvent.webidl. Do not edit! package js.html; -@:native("DummyInterfaceWorkers") -extern class DummyInterfaceWorkers -{ +typedef GamepadEventInit = EventInit & { + var ?gamepad : Gamepad; } \ No newline at end of file diff --git a/std/js/html/GamepadMappingType.hx b/std/js/html/GamepadMappingType.hx index 28c6e77cffe90bf75d4dfb4e0779d4274f03ea3e..60fc84fe08fd46f45b6b2bc18b7593b914640e40 100644 --- a/std/js/html/GamepadMappingType.hx +++ b/std/js/html/GamepadMappingType.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,8 +24,7 @@ package js.html; -@:enum abstract GamepadMappingType(String) -{ +enum abstract GamepadMappingType(String) { var NONE = ""; var STANDARD = "standard"; } \ No newline at end of file diff --git a/std/js/html/Geolocation.hx b/std/js/html/Geolocation.hx index 7da368a13b8331c2c89cde69b0d94c42afc741c0..5697251e87cdc5c04b092038ef90ca20380658d3 100644 --- a/std/js/html/Geolocation.hx +++ b/std/js/html/Geolocation.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -31,19 +31,17 @@ package js.html; @see **/ -@:native("Geolocation") -extern class Geolocation -{ - /** @throws DOMError */ +typedef Geolocation = { /** Determines the device's current location and gives back a `Position` object with the data. + @throws DOMError **/ function getCurrentPosition( successCallback : Position -> Void, ?errorCallback : PositionError -> Void, ?options : PositionOptions ) : Void; - /** @throws DOMError */ /** Returns a `long` value representing the newly established callback function to be invoked whenever the device location changes. + @throws DOMError **/ function watchPosition( successCallback : Position -> Void, ?errorCallback : PositionError -> Void, ?options : PositionOptions ) : Int; diff --git a/std/js/html/GetNotificationOptions.hx b/std/js/html/GetNotificationOptions.hx new file mode 100644 index 0000000000000000000000000000000000000000..313c924928d0ecbe59b1730383f320dac2723e5c --- /dev/null +++ b/std/js/html/GetNotificationOptions.hx @@ -0,0 +1,29 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\Notification.webidl. Do not edit! + +package js.html; + +typedef GetNotificationOptions = { + var ?tag : String; +} \ No newline at end of file diff --git a/std/js/html/GetRootNodeOptions.hx b/std/js/html/GetRootNodeOptions.hx new file mode 100644 index 0000000000000000000000000000000000000000..1547721d836ae7a4bea193643c7aa5b7553ad442 --- /dev/null +++ b/std/js/html/GetRootNodeOptions.hx @@ -0,0 +1,29 @@ +/* + * Copyright (C)2005-2019 Haxe Foundation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +// This file is generated from mozilla\Node.webidl. Do not edit! + +package js.html; + +typedef GetRootNodeOptions = { + var ?composed : Bool; +} \ No newline at end of file diff --git a/std/js/html/GetUserMediaRequest.hx b/std/js/html/GetUserMediaRequest.hx index ab01b4c38d51e4b4999582cecd73c4602338fecc..34b30f133f8b72cf76f186a1c1384c078cb4b31e 100644 --- a/std/js/html/GetUserMediaRequest.hx +++ b/std/js/html/GetUserMediaRequest.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -24,13 +24,14 @@ package js.html; -@:native("GetUserMediaRequest") -extern class GetUserMediaRequest -{ +typedef GetUserMediaRequest = { var windowID(default,null) : Int; var innerWindowID(default,null) : Int; var callID(default,null) : String; + var rawID(default,null) : String; + var mediaSource(default,null) : String; var isSecure(default,null) : Bool; + var isHandlingUserInput(default,null) : Bool; function getConstraints() : MediaStreamConstraints; } \ No newline at end of file diff --git a/std/js/html/HRElement.hx b/std/js/html/HRElement.hx index a2309eac1aa4e0362cc07af2d80caa5c350ce5dd..b3ad0f67f7826426fb831c352d66e79195c87309 100644 --- a/std/js/html/HRElement.hx +++ b/std/js/html/HRElement.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("HTMLHRElement") -extern class HRElement extends Element -{ +extern class HRElement extends Element { var align : String; var color : String; var noShade : Bool; diff --git a/std/js/html/HTMLAllCollection.hx b/std/js/html/HTMLAllCollection.hx index 466b12dd81fdcc23496f954ed5368fe3c91445ec..93eace7d0c9296f65f4dabac82cb19a809583e68 100644 --- a/std/js/html/HTMLAllCollection.hx +++ b/std/js/html/HTMLAllCollection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,8 +25,7 @@ package js.html; @:native("HTMLAllCollection") -extern class HTMLAllCollection implements ArrayAccess -{ +extern class HTMLAllCollection implements ArrayAccess { var length(default,null) : Int; @:overload( function( index : Int ) : Node {} ) diff --git a/std/js/html/HTMLCollection.hx b/std/js/html/HTMLCollection.hx index 756e731d310b54dd5afa1d03ff71868cb4617dd9..50ad111aed90f7d6bb93663700038e5c02e72259 100644 --- a/std/js/html/HTMLCollection.hx +++ b/std/js/html/HTMLCollection.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -32,8 +32,7 @@ package js.html; @see **/ @:native("HTMLCollection") -extern class HTMLCollection implements ArrayAccess -{ +extern class HTMLCollection implements ArrayAccess { /** Returns the number of items in the collection. diff --git a/std/js/html/HTMLDocument.hx b/std/js/html/HTMLDocument.hx index eb88f85cbb7bea4a6f420fe2e6d61364ba08e345..8d9d04868c10c7764eb0ec9f921df273601a5573 100644 --- a/std/js/html/HTMLDocument.hx +++ b/std/js/html/HTMLDocument.hx @@ -1,5 +1,5 @@ /* - * Copyright (C)2005-2017 Haxe Foundation + * Copyright (C)2005-2019 Haxe Foundation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -25,40 +25,27 @@ package js.html; /** - `HTMLDocument` is an abstract interface of the DOM which provides access to special properties and methods not present by default on a regular (XML) document. + `HTMLDocument` is an abstract interface which extends the `Document` interface to add HTML-specific features to the document object. It represents the root of the HTML document, within which its entire DOM hierarchy resides. Documentation [HTMLDocument](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDocument) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDocument$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/). @see **/ @:native("HTMLDocument") -extern class HTMLDocument extends Document -{ +extern class HTMLDocument extends Document { var domain : String; var cookie : String; - var body : BodyElement; - var head(default,null) : HeadElement; - var images(default,null) : HTMLCollection; - var embeds(default,null) : HTMLCollection; - var plugins(default,null) : HTMLCollection; - var links(default,null) : HTMLCollection; - var forms(default,null) : HTMLCollection; - var scripts(default,null) : HTMLCollection; var designMode : String; var fgColor : String; var linkColor : String; var vlinkColor : String; var alinkColor : String; var bgColor : String; - var anchors(default,null) : HTMLCollection; - var applets(default,null) : HTMLCollection; var all(default,null) : HTMLAllCollection; - function getElementsByName( elementName : String ) : NodeList; - function getItems( ?typeNames : String = "" ) : NodeList; /** @throws DOMError */ - @:overload( function( ?type : String = "text/html", ?replace : String = "" ) : HTMLDocument {} ) - function open( url : String, name : String, features : String, ?replace : Bool = false ) : Window; + @:overload( function( ?type : String, replace : String = "" ) : HTMLDocument {} ) + function open( url : String, name : String, features : String, replace : Bool = false ) : Window; /** @throws DOMError */ function close() : Void; /** @throws DOMError */ @@ -66,7 +53,7 @@ extern class HTMLDocument extends Document /** @throws DOMError */ function writeln( text : haxe.extern.Rest ) : Void; /** @throws DOMError */ - function execCommand( commandId : String, ?showUI : Bool = false, ?value : String = "" ) : Bool; + function execCommand( commandId : String, showUI : Bool = false, value : String = "" ) : Bool; /** @throws DOMError */ function queryCommandEnabled( commandId : String ) : Bool; /** @throws DOMError */ @@ -77,80 +64,38 @@ extern class HTMLDocument extends Document /** @throws DOMError */ function queryCommandValue( commandId : String ) : String; function clear() : Void; - /** @throws DOMError */ - function getSelection() : Selection; function captureEvents() : Void; function releaseEvents() : Void; /** Shorthand for creating an HTML `` element. */ inline function createTableCellElement() : TableCellElement { return cast createElement("td"); } - /** Shorthand for creating an HTML `
    ` element. */ - inline function createHRElement() : HRElement { return cast createElement("hr"); } /** Shorthand for creating an HTML `` element. */ - inline function createInputElement() : InputElement { return cast createElement("input"); } + /** Shorthand for creating an HTML `