From 4b77ad81c5f367e480a8c7df6fff0e9a0ce8d991 Mon Sep 17 00:00:00 2001 From: "Silvio J. Gutierrez" Date: Wed, 8 Aug 2018 22:14:24 -0400 Subject: [PATCH 01/14] First pass. --- .gitignore | 2 ++ LICENSE | 0 README.md | 1 + django_react/__init__.py | 1 + django_react/__init__.pyi | 0 django_react/conf/mypy.ini | 0 django_react/py.typed | 0 scripts/to-be-renamed.py | 2 ++ setup.py | 30 ++++++++++++++++++++++++++++++ 9 files changed, 36 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 django_react/__init__.py create mode 100644 django_react/__init__.pyi create mode 100644 django_react/conf/mypy.ini create mode 100644 django_react/py.typed create mode 100644 scripts/to-be-renamed.py create mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 88eb4b9ea..91ead9ab8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ node_modules .mypy_cache client/exports.tsx server/settings/__init__.py +dist/ +build/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..e69de29bb diff --git a/README.md b/README.md new file mode 100644 index 000000000..3ba5b13c4 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Coming soon. diff --git a/django_react/__init__.py b/django_react/__init__.py new file mode 100644 index 000000000..1970c9ebf --- /dev/null +++ b/django_react/__init__.py @@ -0,0 +1 @@ +name = "django_react" diff --git a/django_react/__init__.pyi b/django_react/__init__.pyi new file mode 100644 index 000000000..e69de29bb diff --git a/django_react/conf/mypy.ini b/django_react/conf/mypy.ini new file mode 100644 index 000000000..e69de29bb diff --git a/django_react/py.typed b/django_react/py.typed new file mode 100644 index 000000000..e69de29bb diff --git a/scripts/to-be-renamed.py b/scripts/to-be-renamed.py new file mode 100644 index 000000000..47a1e0a2b --- /dev/null +++ b/scripts/to-be-renamed.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python +print('ok') diff --git a/setup.py b/setup.py new file mode 100644 index 000000000..9e52f2052 --- /dev/null +++ b/setup.py @@ -0,0 +1,30 @@ +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name="django_react", + version="0.0.2", + author="Silvio Gutierrez", + author_email="silviogutierrez@gmail.com", + description="A statically typed framework to create Django sites with a React frontend.", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/silviogutierrez/django-react", + packages=setuptools.find_packages(), + package_data={ + 'django_react': [ + 'conf/mypy.ini', + 'py.typed', + ], + }, + scripts=[ + 'scripts/to-be-renamed.py', + ], + classifiers=( + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ), +) From 1a6830af6af71289ab4fd437a72b6ba993e24d45 Mon Sep 17 00:00:00 2001 From: "Silvio J. Gutierrez" Date: Wed, 8 Aug 2018 23:03:23 -0400 Subject: [PATCH 02/14] Correct structure. --- .gitignore | 1 + django_react/__init__.py | 422 +++++++++++++++++- django_react/__init__.pyi | 0 {server/apps/ssr => django_react}/admin.py | 0 {server/apps/ssr => django_react}/apps.py | 0 django_react/conf/mypy.ini | 18 + .../management/__init__.py | 0 .../management/commands/__init__.py | 0 .../commands/generate_types_schema.py | 0 .../apps/ssr => django_react}/middleware.py | 0 .../migrations/__init__.py | 0 {server/apps/ssr => django_react}/models.py | 0 {server/apps/ssr => django_react}/template.py | 4 +- {server/apps/ssr => django_react}/tests.py | 0 {server/apps/ssr => django_react}/views.py | 0 mypy.ini | 18 - server/apps/ssr/__init__.py | 421 ----------------- 17 files changed, 441 insertions(+), 443 deletions(-) delete mode 100644 django_react/__init__.pyi rename {server/apps/ssr => django_react}/admin.py (100%) rename {server/apps/ssr => django_react}/apps.py (100%) rename {server/apps/ssr => django_react}/management/__init__.py (100%) rename {server/apps/ssr => django_react}/management/commands/__init__.py (100%) rename {server/apps/ssr => django_react}/management/commands/generate_types_schema.py (100%) rename {server/apps/ssr => django_react}/middleware.py (100%) rename {server/apps/ssr => django_react}/migrations/__init__.py (100%) rename {server/apps/ssr => django_react}/models.py (100%) rename {server/apps/ssr => django_react}/template.py (95%) rename {server/apps/ssr => django_react}/tests.py (100%) rename {server/apps/ssr => django_react}/views.py (100%) delete mode 100644 mypy.ini delete mode 100644 server/apps/ssr/__init__.py diff --git a/.gitignore b/.gitignore index 91ead9ab8..2d229029f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ client/exports.tsx server/settings/__init__.py dist/ build/ +*.egg-info diff --git a/django_react/__init__.py b/django_react/__init__.py index 1970c9ebf..50e6197b9 100644 --- a/django_react/__init__.py +++ b/django_react/__init__.py @@ -1 +1,421 @@ -name = "django_react" +from django import forms +from django.contrib import messages +from django.http import HttpRequest, HttpResponse +from django.middleware.csrf import get_token + +from typing import Any, Dict, Tuple, Union, Sequence, Mapping, TypeVar, Callable, Type, overload, Optional, cast, List, NamedTuple + +from mypy_extensions import TypedDict, Arg, KwArg + +import abc +import datetime +import simplejson + + +type_registry: Dict[str, Tuple] = {} + + +Serializable = Tuple[ + Union[ + None, + str, + bool, + Dict[str, Union[str, int, float, bool, None]], + forms.Form, + Sequence[ + Tuple[ + Union[ + Sequence[ + Tuple[ + Union[ + str, + bool, + int, + ], + ... + ], + ], + str, + bool, + int, + Dict[str, Union[str, int, float, bool, None]], + ], + ... + ] + ], + + Tuple[ + Union[ + str, + int, + float, + bool, + + Sequence[ + Tuple[ + Union[ + str, + int, + float, + bool, + 'TypeHint', + ], + ... + ] + ], + + Mapping[str, Union[ + str, + int, + float, + bool, + Sequence[str], + None + ]], + 'TypeHint', + ], + ... + ] + ], + ... +] + + +K = TypeVar('K') +P = TypeVar('P', bound=Serializable) + +View = Callable[[HttpRequest, K], Union[P, HttpResponse]] +NoArgsView = Callable[[HttpRequest], Union[P, HttpResponse]] + + +def to_camel_case(snake_str: str) -> str: + components = snake_str.split('_') + return ''.join(x.title() for x in components) + + + reveal_type(form_view) + + +class Message(NamedTuple): + level: int + level_tag: str + message: str + + +def encode_complex_types(obj: Any) -> Serializable: + """ + Handles dates, forms, and other types. + From: https://stackoverflow.com/a/22238613 + """ + if isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, forms.Form): + return serialize_form(obj) + + raise TypeError("Type %s not serializable" % type(obj)) + + +class JSXResponse: + def __init__(self, *, csrf_token: str, template_name: str, props: P, messages: List[Message]) -> None: + + self.props = { + 'csrf_token': csrf_token, + 'template_name': template_name, + 'messages': messages, + **(props if isinstance(props, dict) else props._asdict()), # type: ignore + } + + def as_json(self) -> Any: + return simplejson.dumps(self.props, default=encode_complex_types) #, use_decimal=False) + + +def render_jsx(request: HttpRequest, template_name: str, props: Union[P, HttpResponse]) -> HttpResponse: + if isinstance(props, HttpResponse): + return props + + + current_messages = messages.get_messages(request) + + response = JSXResponse( + template_name=template_name, + csrf_token=get_token(request), + messages=[ + Message( + level=m.level, + level_tag=m.level_tag, + message=m.message, + ) for m in current_messages + ], + props=props, + ) + return HttpResponse(response.as_json(), content_type='application/ssr+json') + + +@overload +def ssr(*, + props: Type[P], + params: None = None) -> Callable[[NoArgsView[P]], Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]]: ... + + +@overload +def ssr(*, + props: Type[P], + params: Type[K]) -> Callable[[View[K, P]], Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]]: ... + + +def ssr(*, + props: Type[P], + params: Optional[Type[K]] = None) -> Union[ + Callable[[NoArgsView[P]], Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]], + Callable[[View[K, P]], Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]], + ]: + type_registry[props.__name__] = props # type: ignore + + def no_args_wrap_with_jsx(original: NoArgsView[P]) -> Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]: + def wrapper(request: HttpRequest, **kwargs: Any) -> HttpResponse: + props = original(request) + template_name = to_camel_case(original.__name__) + + return render_jsx(request, template_name, props) + + return wrapper + + def wrap_with_jsx(original: View[K, P]) -> Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]: + def wrapper(request: HttpRequest, **kwargs: Any) -> HttpResponse: + props = original(request, cast(Any, params)(**kwargs)) + template_name = to_camel_case(original.__name__) + + return render_jsx(request, template_name, props) + return wrapper + + if params is None: + return no_args_wrap_with_jsx + else: + return wrap_with_jsx + + +class TypeHint(abc.ABC): + @property + @abc.abstractmethod + def name(self) -> str: + pass + + +def create_schema(Type: Any, definitions: Dict, ref: bool = True) -> Any: + if (getattr(Type, '__origin__', None) == Union or + str(Type.__class__) == 'typing.Union'): # TODO: find a better way to do this. + return { + 'anyOf': [ + create_schema(field, definitions) for field in Type.__args__ + ], + } + elif str(Type.__class__) == 'typing.Any': # TODO: find a better way to do this. + return { + } + elif getattr(Type, '_name', None) == 'Dict': + return { + 'type': 'object', + 'additionalProperties': create_schema(Type.__args__[1], definitions), + } + elif getattr(Type, '_name', None) == 'List': + return { + 'type': 'array', + 'items': create_schema(Type.__args__[0], definitions), + } + elif issubclass(Type, List): + return { + 'type': 'array', + 'items': create_schema(Type.__args__[0], definitions), + } + elif issubclass(Type, Dict): + return { + 'type': 'object', + 'additionalProperties': create_schema(Type.__args__[1], definitions), + } + elif issubclass(Type, bool): + return { + 'type': 'bool', + } + elif issubclass(Type, int): + return { + 'type': 'number', + } + elif issubclass(Type, str): + return { + 'type': 'string', + } + elif Type is type(None): + return { + 'type': 'null', + } + elif hasattr(Type, '_asdict'): + definition_name = f'{Type.__module__}.{Type.__qualname__}' + + if ref is False or definition_name not in definitions: + required = [] + properties = {} + + for field_name, SubType in Type.__annotations__.items(): + field_schema = create_schema(SubType, definitions) + + if field_schema is not None: + + required.append(field_name) + properties[field_name] = field_schema + + definition = { + 'title': Type.__name__, + 'type': 'object', + 'additionalProperties': False, + 'properties': properties, + 'required': required, + } + + if ref is False: + return definition + definitions[definition_name] = definition + + return { + '$ref': f'#/definitions/{definition_name}', + } + elif issubclass(Type, forms.Form): + definition_name = f'{Type.__module__}.{Type.__qualname__}' + required = [] + properties = {} + field_schema = create_schema(FieldType, definitions) + error_schema = create_schema(FormErrors, definitions) + + for field_name, SubType in Type.base_fields.items(): + required.append(field_name) + properties[field_name] = field_schema + + definitions['Form'] = { + 'title': 'Form', + 'type': 'object', + 'additionalProperties': False, + } + definitions[definition_name] = { + 'title': Type.__name__, + 'allOf': [ + { + '$ref': '#/definitions/Form', + }, + { + 'type': 'object', + 'properties': { + 'errors': error_schema, + 'fields': { + 'type': 'object', + 'properties': properties, + 'required': required, + 'additionalProperties': False, + }, + }, + 'additionalProperties': False, + 'required': [ + 'fields', + 'errors', + ], + }, + ], + } + + return { + '$ref': f'#/definitions/{definition_name}', + } + + elif issubclass(Type, TypeHint): + return None + """ + return { + 'title': Type().name, + 'type': 'object', + 'additionalProperties': False, + } + """ + assert False + + +def wrap_with_globals(props: Any, definitions: Dict) -> Any: + message_schema = create_schema(Message, definitions) + + return { + **props, + 'properties': { + **props['properties'], + 'template_name': {'type': 'string'}, + 'csrf_token': {'type': 'string'}, + 'messages': { + 'type': 'array', + 'items': message_schema, + }, + }, + 'required': [ + *props['required'], + 'template_name', + 'csrf_token', + 'messages', + ], + } + + +def generate_schema() -> str: + definitions = {} + + schema = { + 'title': 'Schema', + 'type': 'object', + 'definitions': definitions, + 'properties': { + name: wrap_with_globals(create_schema(Props, definitions, ref=False), definitions) + for name, Props in type_registry.items() + }, + 'additionalProperties': False, + 'required': [name for name in type_registry.keys()], + } + + return simplejson.dumps(schema, indent=4) + + +class WidgetType(TypeHint): + name = 'WidgetType' + + +class FieldType(NamedTuple): + name: str + label: str + widget: WidgetType + + +FormErrors = Dict[str, Optional[List[str]]] + + +class FormType(NamedTuple): + errors: FormErrors + fields: Dict[str, FieldType] + iterator: List[str] + + +class SSRFormRenderer: + def render(self, template_name, context, request=None): + return simplejson.dumps(context) + + +def serialize_form(form: Optional[forms.BaseForm]) -> Optional[FormType]: + if form is None: + return None + + form.renderer = SSRFormRenderer() + fields = { + field.name: FieldType( + widget=simplejson.loads(str(field))['widget'], + name=field.name, + label=str(field.label), # This can be a lazy proxy, so we must call str on it. + ) for field in form + } + + return FormType( + errors=form.errors, + fields=fields, + iterator=list(fields.keys()), + ) diff --git a/django_react/__init__.pyi b/django_react/__init__.pyi deleted file mode 100644 index e69de29bb..000000000 diff --git a/server/apps/ssr/admin.py b/django_react/admin.py similarity index 100% rename from server/apps/ssr/admin.py rename to django_react/admin.py diff --git a/server/apps/ssr/apps.py b/django_react/apps.py similarity index 100% rename from server/apps/ssr/apps.py rename to django_react/apps.py diff --git a/django_react/conf/mypy.ini b/django_react/conf/mypy.ini index e69de29bb..b3871da46 100644 --- a/django_react/conf/mypy.ini +++ b/django_react/conf/mypy.ini @@ -0,0 +1,18 @@ +[mypy] +ignore_missing_imports=True +follow_imports=silent + +disallow_untyped_calls=True +check_untyped_defs=True +disallow_subclassing_any=True +warn_redundant_casts=True +warn_return_any=True +warn_unused_ignores=True +no_implicit_optional=True +strict_optional=True + +[mypy-server.apps.*.migrations.*] +ignore_errors=True + +[mypy-server.apps.ssr.*] +ignore_errors=True diff --git a/server/apps/ssr/management/__init__.py b/django_react/management/__init__.py similarity index 100% rename from server/apps/ssr/management/__init__.py rename to django_react/management/__init__.py diff --git a/server/apps/ssr/management/commands/__init__.py b/django_react/management/commands/__init__.py similarity index 100% rename from server/apps/ssr/management/commands/__init__.py rename to django_react/management/commands/__init__.py diff --git a/server/apps/ssr/management/commands/generate_types_schema.py b/django_react/management/commands/generate_types_schema.py similarity index 100% rename from server/apps/ssr/management/commands/generate_types_schema.py rename to django_react/management/commands/generate_types_schema.py diff --git a/server/apps/ssr/middleware.py b/django_react/middleware.py similarity index 100% rename from server/apps/ssr/middleware.py rename to django_react/middleware.py diff --git a/server/apps/ssr/migrations/__init__.py b/django_react/migrations/__init__.py similarity index 100% rename from server/apps/ssr/migrations/__init__.py rename to django_react/migrations/__init__.py diff --git a/server/apps/ssr/models.py b/django_react/models.py similarity index 100% rename from server/apps/ssr/models.py rename to django_react/models.py diff --git a/server/apps/ssr/template.py b/django_react/template.py similarity index 95% rename from server/apps/ssr/template.py rename to django_react/template.py index 275c18655..c30251937 100644 --- a/server/apps/ssr/template.py +++ b/django_react/template.py @@ -53,11 +53,9 @@ def __init__(self, jsx_template_name): self.jsx_template_name = jsx_template_name def get_props(self, context=None, request=None): - from server.apps.ssr import serialize_form - if self.jsx_template_name == 'registration/login.tsx': return { - 'form': serialize_form(context['form']), + 'form': context['form'], } elif self.jsx_template_name == 'flatpages/default.tsx': flatpage = context['flatpage'] diff --git a/server/apps/ssr/tests.py b/django_react/tests.py similarity index 100% rename from server/apps/ssr/tests.py rename to django_react/tests.py diff --git a/server/apps/ssr/views.py b/django_react/views.py similarity index 100% rename from server/apps/ssr/views.py rename to django_react/views.py diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index b3871da46..000000000 --- a/mypy.ini +++ /dev/null @@ -1,18 +0,0 @@ -[mypy] -ignore_missing_imports=True -follow_imports=silent - -disallow_untyped_calls=True -check_untyped_defs=True -disallow_subclassing_any=True -warn_redundant_casts=True -warn_return_any=True -warn_unused_ignores=True -no_implicit_optional=True -strict_optional=True - -[mypy-server.apps.*.migrations.*] -ignore_errors=True - -[mypy-server.apps.ssr.*] -ignore_errors=True diff --git a/server/apps/ssr/__init__.py b/server/apps/ssr/__init__.py deleted file mode 100644 index 50e6197b9..000000000 --- a/server/apps/ssr/__init__.py +++ /dev/null @@ -1,421 +0,0 @@ -from django import forms -from django.contrib import messages -from django.http import HttpRequest, HttpResponse -from django.middleware.csrf import get_token - -from typing import Any, Dict, Tuple, Union, Sequence, Mapping, TypeVar, Callable, Type, overload, Optional, cast, List, NamedTuple - -from mypy_extensions import TypedDict, Arg, KwArg - -import abc -import datetime -import simplejson - - -type_registry: Dict[str, Tuple] = {} - - -Serializable = Tuple[ - Union[ - None, - str, - bool, - Dict[str, Union[str, int, float, bool, None]], - forms.Form, - Sequence[ - Tuple[ - Union[ - Sequence[ - Tuple[ - Union[ - str, - bool, - int, - ], - ... - ], - ], - str, - bool, - int, - Dict[str, Union[str, int, float, bool, None]], - ], - ... - ] - ], - - Tuple[ - Union[ - str, - int, - float, - bool, - - Sequence[ - Tuple[ - Union[ - str, - int, - float, - bool, - 'TypeHint', - ], - ... - ] - ], - - Mapping[str, Union[ - str, - int, - float, - bool, - Sequence[str], - None - ]], - 'TypeHint', - ], - ... - ] - ], - ... -] - - -K = TypeVar('K') -P = TypeVar('P', bound=Serializable) - -View = Callable[[HttpRequest, K], Union[P, HttpResponse]] -NoArgsView = Callable[[HttpRequest], Union[P, HttpResponse]] - - -def to_camel_case(snake_str: str) -> str: - components = snake_str.split('_') - return ''.join(x.title() for x in components) - - - reveal_type(form_view) - - -class Message(NamedTuple): - level: int - level_tag: str - message: str - - -def encode_complex_types(obj: Any) -> Serializable: - """ - Handles dates, forms, and other types. - From: https://stackoverflow.com/a/22238613 - """ - if isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - elif isinstance(obj, forms.Form): - return serialize_form(obj) - - raise TypeError("Type %s not serializable" % type(obj)) - - -class JSXResponse: - def __init__(self, *, csrf_token: str, template_name: str, props: P, messages: List[Message]) -> None: - - self.props = { - 'csrf_token': csrf_token, - 'template_name': template_name, - 'messages': messages, - **(props if isinstance(props, dict) else props._asdict()), # type: ignore - } - - def as_json(self) -> Any: - return simplejson.dumps(self.props, default=encode_complex_types) #, use_decimal=False) - - -def render_jsx(request: HttpRequest, template_name: str, props: Union[P, HttpResponse]) -> HttpResponse: - if isinstance(props, HttpResponse): - return props - - - current_messages = messages.get_messages(request) - - response = JSXResponse( - template_name=template_name, - csrf_token=get_token(request), - messages=[ - Message( - level=m.level, - level_tag=m.level_tag, - message=m.message, - ) for m in current_messages - ], - props=props, - ) - return HttpResponse(response.as_json(), content_type='application/ssr+json') - - -@overload -def ssr(*, - props: Type[P], - params: None = None) -> Callable[[NoArgsView[P]], Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]]: ... - - -@overload -def ssr(*, - props: Type[P], - params: Type[K]) -> Callable[[View[K, P]], Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]]: ... - - -def ssr(*, - props: Type[P], - params: Optional[Type[K]] = None) -> Union[ - Callable[[NoArgsView[P]], Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]], - Callable[[View[K, P]], Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]], - ]: - type_registry[props.__name__] = props # type: ignore - - def no_args_wrap_with_jsx(original: NoArgsView[P]) -> Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]: - def wrapper(request: HttpRequest, **kwargs: Any) -> HttpResponse: - props = original(request) - template_name = to_camel_case(original.__name__) - - return render_jsx(request, template_name, props) - - return wrapper - - def wrap_with_jsx(original: View[K, P]) -> Callable[[Arg(HttpRequest, 'request'), KwArg(Any)], HttpResponse]: - def wrapper(request: HttpRequest, **kwargs: Any) -> HttpResponse: - props = original(request, cast(Any, params)(**kwargs)) - template_name = to_camel_case(original.__name__) - - return render_jsx(request, template_name, props) - return wrapper - - if params is None: - return no_args_wrap_with_jsx - else: - return wrap_with_jsx - - -class TypeHint(abc.ABC): - @property - @abc.abstractmethod - def name(self) -> str: - pass - - -def create_schema(Type: Any, definitions: Dict, ref: bool = True) -> Any: - if (getattr(Type, '__origin__', None) == Union or - str(Type.__class__) == 'typing.Union'): # TODO: find a better way to do this. - return { - 'anyOf': [ - create_schema(field, definitions) for field in Type.__args__ - ], - } - elif str(Type.__class__) == 'typing.Any': # TODO: find a better way to do this. - return { - } - elif getattr(Type, '_name', None) == 'Dict': - return { - 'type': 'object', - 'additionalProperties': create_schema(Type.__args__[1], definitions), - } - elif getattr(Type, '_name', None) == 'List': - return { - 'type': 'array', - 'items': create_schema(Type.__args__[0], definitions), - } - elif issubclass(Type, List): - return { - 'type': 'array', - 'items': create_schema(Type.__args__[0], definitions), - } - elif issubclass(Type, Dict): - return { - 'type': 'object', - 'additionalProperties': create_schema(Type.__args__[1], definitions), - } - elif issubclass(Type, bool): - return { - 'type': 'bool', - } - elif issubclass(Type, int): - return { - 'type': 'number', - } - elif issubclass(Type, str): - return { - 'type': 'string', - } - elif Type is type(None): - return { - 'type': 'null', - } - elif hasattr(Type, '_asdict'): - definition_name = f'{Type.__module__}.{Type.__qualname__}' - - if ref is False or definition_name not in definitions: - required = [] - properties = {} - - for field_name, SubType in Type.__annotations__.items(): - field_schema = create_schema(SubType, definitions) - - if field_schema is not None: - - required.append(field_name) - properties[field_name] = field_schema - - definition = { - 'title': Type.__name__, - 'type': 'object', - 'additionalProperties': False, - 'properties': properties, - 'required': required, - } - - if ref is False: - return definition - definitions[definition_name] = definition - - return { - '$ref': f'#/definitions/{definition_name}', - } - elif issubclass(Type, forms.Form): - definition_name = f'{Type.__module__}.{Type.__qualname__}' - required = [] - properties = {} - field_schema = create_schema(FieldType, definitions) - error_schema = create_schema(FormErrors, definitions) - - for field_name, SubType in Type.base_fields.items(): - required.append(field_name) - properties[field_name] = field_schema - - definitions['Form'] = { - 'title': 'Form', - 'type': 'object', - 'additionalProperties': False, - } - definitions[definition_name] = { - 'title': Type.__name__, - 'allOf': [ - { - '$ref': '#/definitions/Form', - }, - { - 'type': 'object', - 'properties': { - 'errors': error_schema, - 'fields': { - 'type': 'object', - 'properties': properties, - 'required': required, - 'additionalProperties': False, - }, - }, - 'additionalProperties': False, - 'required': [ - 'fields', - 'errors', - ], - }, - ], - } - - return { - '$ref': f'#/definitions/{definition_name}', - } - - elif issubclass(Type, TypeHint): - return None - """ - return { - 'title': Type().name, - 'type': 'object', - 'additionalProperties': False, - } - """ - assert False - - -def wrap_with_globals(props: Any, definitions: Dict) -> Any: - message_schema = create_schema(Message, definitions) - - return { - **props, - 'properties': { - **props['properties'], - 'template_name': {'type': 'string'}, - 'csrf_token': {'type': 'string'}, - 'messages': { - 'type': 'array', - 'items': message_schema, - }, - }, - 'required': [ - *props['required'], - 'template_name', - 'csrf_token', - 'messages', - ], - } - - -def generate_schema() -> str: - definitions = {} - - schema = { - 'title': 'Schema', - 'type': 'object', - 'definitions': definitions, - 'properties': { - name: wrap_with_globals(create_schema(Props, definitions, ref=False), definitions) - for name, Props in type_registry.items() - }, - 'additionalProperties': False, - 'required': [name for name in type_registry.keys()], - } - - return simplejson.dumps(schema, indent=4) - - -class WidgetType(TypeHint): - name = 'WidgetType' - - -class FieldType(NamedTuple): - name: str - label: str - widget: WidgetType - - -FormErrors = Dict[str, Optional[List[str]]] - - -class FormType(NamedTuple): - errors: FormErrors - fields: Dict[str, FieldType] - iterator: List[str] - - -class SSRFormRenderer: - def render(self, template_name, context, request=None): - return simplejson.dumps(context) - - -def serialize_form(form: Optional[forms.BaseForm]) -> Optional[FormType]: - if form is None: - return None - - form.renderer = SSRFormRenderer() - fields = { - field.name: FieldType( - widget=simplejson.loads(str(field))['widget'], - name=field.name, - label=str(field.label), # This can be a lazy proxy, so we must call str on it. - ) for field in form - } - - return FormType( - errors=form.errors, - fields=fields, - iterator=list(fields.keys()), - ) From bde2bf8682b3d52290bbbe082f9d98f1f141742f Mon Sep 17 00:00:00 2001 From: "Silvio J. Gutierrez" Date: Wed, 8 Aug 2018 23:10:38 -0400 Subject: [PATCH 03/14] Script. --- scripts/to-be-renamed.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/to-be-renamed.py b/scripts/to-be-renamed.py index 47a1e0a2b..20a9d848a 100644 --- a/scripts/to-be-renamed.py +++ b/scripts/to-be-renamed.py @@ -1,2 +1,11 @@ #!/usr/bin/env python -print('ok') +import sys +import os + +import django_react + +module_directory = os.path.dirname(django_react.__file__) +conf_directory = os.path.join(module_directory, 'conf') +mypy = os.path.join(conf_directory, 'mypy.ini') + +os.symlink(mypy, 'mypy.ini') From 4309ab9b13031455e995a15bbed53dfcb97a7bf0 Mon Sep 17 00:00:00 2001 From: "Silvio J. Gutierrez" Date: Thu, 9 Aug 2018 13:47:40 -0400 Subject: [PATCH 04/14] Packaging fixes. --- .gitignore | 1 + django_react/conf/tsconfig.json | 19 + index.tsx | 3 - package-lock.json | 1502 ++++++++++-------- package.json | 4 +- scripts/to-be-renamed.py | 11 +- tsconfig.json | 9 +- client/app.tsx => typescript/client.tsx | 2 +- {client => typescript}/components/Form.tsx | 10 +- {client => typescript}/components/Layout.tsx | 0 {client => typescript}/components/Widget.tsx | 0 typescript/index.tsx | 2 + server/app.tsx => typescript/server.tsx | 12 +- 13 files changed, 873 insertions(+), 702 deletions(-) create mode 100644 django_react/conf/tsconfig.json delete mode 100644 index.tsx rename client/app.tsx => typescript/client.tsx (81%) rename {client => typescript}/components/Form.tsx (85%) rename {client => typescript}/components/Layout.tsx (100%) rename {client => typescript}/components/Widget.tsx (100%) create mode 100644 typescript/index.tsx rename server/app.tsx => typescript/server.tsx (90%) diff --git a/.gitignore b/.gitignore index 2d229029f..bd7c5bf16 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ client/exports.tsx server/settings/__init__.py dist/ build/ +lib/ *.egg-info diff --git a/django_react/conf/tsconfig.json b/django_react/conf/tsconfig.json new file mode 100644 index 000000000..17e05ca8f --- /dev/null +++ b/django_react/conf/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "types": [ + "node" + ], + "strict": true, + "sourceMap": true, + "module": "commonjs", + "moduleResolution": "node", + "target": "es5", + "jsx": "react", + // "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "lib": ["dom", "es6"] + }, + "files": [ + "client/app.tsx" + ] +} diff --git a/index.tsx b/index.tsx deleted file mode 100644 index 080fcffed..000000000 --- a/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import app from './server/app'; - -app.listen({node: 3000, django: 8000}, () => console.log('Example app listening on port 3000!')) diff --git a/package-lock.json b/package-lock.json index 0aee54656..e0b86ed43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,34 +1,9 @@ { - "name": "ssr", + "name": "django_react", "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { - "@shellscape/koa-send": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@shellscape/koa-send/-/koa-send-4.1.3.tgz", - "integrity": "sha512-akNxJetq2ak8aj7U6ys+EYXfWY4k8keleDZJbHWvpuVDj0/PUbbOuPkeBYaie7C6d5fRNLK+0M1Puu8ywTlj3w==", - "requires": { - "debug": "^2.6.3", - "http-errors": "^1.6.1", - "mz": "^2.6.0", - "resolve-path": "^1.3.3" - } - }, - "@shellscape/koa-static": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@shellscape/koa-static/-/koa-static-4.0.5.tgz", - "integrity": "sha512-0T2g2NtaO2zhbqR8EBACIGtBy+haodKb8PuJ17RGDXAJwhjkgghUKLrLEnm05zuiwupfYm2APIax6D2TwLoflA==", - "requires": { - "@shellscape/koa-send": "^4.1.0", - "debug": "^2.6.8" - } - }, - "@sindresorhus/is": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", - "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==" - }, "@types/body-parser": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz", @@ -161,6 +136,14 @@ "@types/react": "*" } }, + "@types/react-helmet": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-5.0.7.tgz", + "integrity": "sha512-FbDibfkcGsD/N+3k47bfLcr5uAzSi64LJ2OOILz/P5vtBwT5A92KZAU5H9/7OjhUN6au5k+BbNplhVfp6IXDcQ==", + "requires": { + "@types/react": "*" + } + }, "@types/serve-static": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.2.tgz", @@ -439,81 +422,6 @@ "long": "^3.2.0" } }, - "@webpack-contrib/cli-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@webpack-contrib/cli-utils/-/cli-utils-1.0.2.tgz", - "integrity": "sha512-ZuV0pTi7x0Xd8MVZPIcDXbu7pg5+sNdrkdpmiW8mVto8+ru2+E0n8Opx36UxlDchBSiI6HouvaYcxmGOIS5yQA==", - "requires": { - "@webpack-contrib/schema-utils": "^1.0.0-beta.0", - "camelize": "^1.0.0", - "chalk": "^2.4.1", - "decamelize": "^2.0.0", - "loader-utils": "^1.1.0", - "meant": "^1.0.1", - "strip-ansi": "^4.0.0", - "text-table": "^0.2.0", - "webpack-log": "^1.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "@webpack-contrib/config-loader": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@webpack-contrib/config-loader/-/config-loader-1.2.1.tgz", - "integrity": "sha512-C7XsS6bXft0aRlyt7YCLg+fm97Mb3tWd+i5fVVlEl0NW5HKy8LoXVKj3mB7ECcEHNEEdHhgzg8gxP+Or8cMj8Q==", - "requires": { - "@webpack-contrib/schema-utils": "^1.0.0-beta.0", - "chalk": "^2.1.0", - "cosmiconfig": "^5.0.2", - "is-plain-obj": "^1.1.0", - "loud-rejection": "^1.6.0", - "merge-options": "^1.0.1", - "minimist": "^1.2.0", - "resolve": "^1.6.0", - "webpack-log": "^1.1.2" - } - }, - "@webpack-contrib/schema-utils": { - "version": "1.0.0-beta.0", - "resolved": "https://registry.npmjs.org/@webpack-contrib/schema-utils/-/schema-utils-1.0.0-beta.0.tgz", - "integrity": "sha512-LonryJP+FxQQHsjGBi6W786TQB1Oym+agTpY0c+Kj8alnIw+DLUJb6SI8Y1GHGhLCH1yPRrucjObUmxNICQ1pg==", - "requires": { - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "chalk": "^2.3.2", - "strip-ansi": "^4.0.0", - "text-table": "^0.2.0", - "webpack-log": "^1.1.2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -570,6 +478,11 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==" }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -594,21 +507,11 @@ "normalize-path": "^2.1.1" } }, - "app-root-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.1.0.tgz", - "integrity": "sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo=" - }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=" }, - "arch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==" - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -642,6 +545,28 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", @@ -695,21 +620,36 @@ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" - }, "atob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, + "awesome-typescript-loader": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/awesome-typescript-loader/-/awesome-typescript-loader-5.2.0.tgz", + "integrity": "sha512-3v5MEUgRz1n90u61UGYbhFxiFq1tK/HBdoY/ScBX1srOiZVo4iF9b6hyP2ZsRp1ewHKYwlEo0OaHUXJVQHv6dw==", + "requires": { + "chalk": "^2.4.1", + "enhanced-resolve": "^4.0.0", + "loader-utils": "^1.1.0", + "lodash": "^4.17.5", + "micromatch": "^3.1.9", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.3", + "webpack-log": "^1.2.0" + } + }, "axios": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", @@ -803,6 +743,11 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", "integrity": "sha1-yrHmEY8FEJXli1KBrqjBzSK/wOM=" }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" + }, "big.js": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", @@ -840,6 +785,26 @@ "type-is": "~1.6.15" } }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + }, + "dependencies": { + "array-flatten": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", + "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=" + } + } + }, "boxen": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", @@ -974,6 +939,11 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", "integrity": "sha1-h/yqOimDWOCt5uRCz86EB0DRrQQ=" }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" + }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", @@ -1030,15 +1000,6 @@ "unset-value": "^1.0.0" } }, - "cache-content-type": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz", - "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==", - "requires": { - "mime-types": "^2.1.18", - "ylru": "^1.2.0" - } - }, "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", @@ -1049,21 +1010,6 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", - "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" - } - }, - "camelize": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", - "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" - }, "capture-stack-trace": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", @@ -1201,31 +1147,6 @@ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" }, - "clipboardy": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz", - "integrity": "sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA==", - "requires": { - "arch": "^2.1.0", - "execa": "^0.8.0" - }, - "dependencies": { - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - } - } - }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -1251,11 +1172,6 @@ } } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -1298,6 +1214,42 @@ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, + "compressible": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.14.tgz", + "integrity": "sha1-MmxfUH+7BV9UEWeCuWmoG2einac=", + "requires": { + "mime-db": ">= 1.34.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==" + } + } + }, + "compression": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", + "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.14", + "debug": "2.6.9", + "on-headers": "~1.0.1", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "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==" + } + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1327,6 +1279,11 @@ "xdg-basedir": "^3.0.0" } }, + "connect-history-api-fallback": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz", + "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo=" + }, "console-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", @@ -1360,15 +1317,6 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, - "cookies": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.7.1.tgz", - "integrity": "sha1-fIphX1SBxhq58WyDNzG8uPZjuZs=", - "requires": { - "depd": "~1.1.1", - "keygrip": "~1.0.2" - } - }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -1397,16 +1345,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "cosmiconfig": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.5.tgz", - "integrity": "sha512-94j37OtvxS5w7qr7Ta6dt67tWdnOxigBVN4VnSxNXFez9o18PGQ0D33SchKP17r9LAcWVTYV72G6vDayAUBFIg==", - "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0" - } - }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", @@ -1513,6 +1451,11 @@ "es5-ext": "^0.10.9" } }, + "date-fns": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", + "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==" + }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", @@ -1534,27 +1477,6 @@ "xregexp": "4.0.0" } }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - } - } - }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -1616,10 +1538,18 @@ } } }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "requires": { + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" + } }, "depd": { "version": "1.1.2", @@ -1640,6 +1570,11 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, + "detect-node": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz", + "integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=" + }, "diff": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", @@ -1655,6 +1590,28 @@ "randombytes": "^2.0.0" } }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "requires": { + "buffer-indexof": "^1.0.0" + } + }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -1760,10 +1717,27 @@ "is-arrayish": "^0.2.1" } }, - "error-inject": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/error-inject/-/error-inject-1.0.0.tgz", - "integrity": "sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc=" + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "requires": { + "is-callable": "^1.1.1", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.1" + } }, "es5-ext": { "version": "0.10.45", @@ -1885,6 +1859,14 @@ "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" }, + "eventsource": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", + "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", + "requires": { + "original": ">=0.0.5" + } + }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", @@ -1908,6 +1890,11 @@ "strip-eof": "^1.0.0" } }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=" + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -2085,6 +2072,14 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "requires": { + "websocket-driver": ">=0.5.1" + } + }, "fbjs": { "version": "0.8.17", "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", @@ -2727,10 +2722,10 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, - "get-port": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", - "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" }, "get-stream": { "version": "3.0.0", @@ -2787,6 +2782,25 @@ "resolved": "https://registry.npmjs.org/global-modules-path/-/global-modules-path-2.3.0.tgz", "integrity": "sha512-HchvMJNYh9dGSCy8pOQ2O8u/hoXaL+0XhnrwH0RyLiSXMMTl9W3N6KUU73+JFOg5PGjtzl6VZzUQsnrpm7Szag==" }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, "got": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", @@ -2810,6 +2824,19 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, + "handle-thing": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", + "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=" + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -2890,15 +2917,27 @@ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" }, - "http-assert": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.3.0.tgz", - "integrity": "sha1-oxpc+IyHPsu1eWkH1NbxMujAHko=", + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", "requires": { - "deep-equal": "~1.0.1", - "http-errors": "~1.6.1" + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" } }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" + }, "http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", @@ -2910,6 +2949,11 @@ "statuses": ">= 1.4.0 < 2" } }, + "http-parser-js": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.13.tgz", + "integrity": "sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc=" + }, "http-proxy": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", @@ -2920,6 +2964,17 @@ "requires-port": "^1.0.0" } }, + "http-proxy-middleware": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", + "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "requires": { + "http-proxy": "^1.16.2", + "is-glob": "^4.0.0", + "lodash": "^4.17.5", + "micromatch": "^3.1.9" + } + }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", @@ -2964,11 +3019,6 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" - }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", @@ -3028,32 +3078,197 @@ } } }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" - }, - "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=" - }, - "ipaddr.js": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", - "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "internal-ip": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", + "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", "requires": { - "kind-of": "^3.0.2" + "meow": "^3.3.0" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "requires": { + "repeating": "^2.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=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.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=", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "requires": { + "get-stdin": "^4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" + } + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" + }, + "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=" + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, + "ipaddr.js": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.6.0.tgz", + "integrity": "sha1-4/o1e3c9phnybpXwSdBVxyeW+Gs=" + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" @@ -3087,6 +3302,11 @@ "builtin-modules": "^1.0.0" } }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + }, "is-ci": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", @@ -3113,6 +3333,11 @@ } } }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", @@ -3130,11 +3355,6 @@ } } }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" - }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -3145,16 +3365,19 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, "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=" }, - "is-generator-function": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz", - "integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw==" - }, "is-glob": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", @@ -3200,6 +3423,19 @@ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" + }, + "is-path-in-cwd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", + "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "requires": { + "is-path-inside": "^1.0.0" + } + }, "is-path-inside": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", @@ -3208,11 +3444,6 @@ "path-is-inside": "^1.0.1" } }, - "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=" - }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -3231,6 +3462,14 @@ "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=" }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "^1.0.1" + } + }, "is-retry-allowed": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", @@ -3241,6 +3480,16 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -3354,16 +3603,16 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=" + }, "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" }, - "keygrip": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.2.tgz", - "integrity": "sha1-rTKXxVcGneqLz+ek+kkbdcXd65E=" - }, "killable": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.0.tgz", @@ -3374,95 +3623,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=" }, - "koa": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/koa/-/koa-2.5.2.tgz", - "integrity": "sha512-MoVGWre9g3p35pCqXNhOT/a4trwK5CGvalIoPi7qOA2RCZaep3GCsa/G/tD9QMjQI7bmVWn3XF3SOau8RkPh6w==", - "requires": { - "accepts": "^1.3.5", - "cache-content-type": "^1.0.0", - "content-disposition": "~0.5.2", - "content-type": "^1.0.4", - "cookies": "~0.7.1", - "debug": "^3.1.0", - "delegates": "^1.0.0", - "depd": "^1.1.2", - "destroy": "^1.0.4", - "error-inject": "^1.0.0", - "escape-html": "^1.0.3", - "fresh": "~0.5.2", - "http-assert": "^1.3.0", - "http-errors": "^1.6.3", - "is-generator-function": "^1.0.7", - "koa-compose": "^4.1.0", - "koa-convert": "^1.2.0", - "koa-is-json": "^1.0.0", - "on-finished": "^2.3.0", - "only": "~0.0.2", - "parseurl": "^1.3.2", - "statuses": "^1.5.0", - "type-is": "^1.6.16", - "vary": "^1.1.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - } - } - }, - "koa-compose": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz", - "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==" - }, - "koa-convert": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz", - "integrity": "sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA=", - "requires": { - "co": "^4.6.0", - "koa-compose": "^3.0.0" - }, - "dependencies": { - "koa-compose": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-3.2.1.tgz", - "integrity": "sha1-qFzLQLfZhtjlo0Wzoazo6rz1Tec=", - "requires": { - "any-promise": "^1.1.0" - } - } - } - }, - "koa-is-json": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/koa-is-json/-/koa-is-json-1.0.0.tgz", - "integrity": "sha1-JzwH7c3Ljfaiwat9We52SRRR7BQ=" - }, - "koa-webpack": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/koa-webpack/-/koa-webpack-5.1.0.tgz", - "integrity": "sha512-XNqqtPpMvccXK3tAs0vW6YoO4+uYaxarutsgCZjNi3NyvmmVBvIH6l6xGk0NtiJR1m0oa53gFHLSiT19ZseOCw==", - "requires": { - "@webpack-contrib/schema-utils": "^1.0.0-beta.0", - "app-root-path": "^2.0.1", - "loud-rejection": "^1.6.0", - "merge-options": "^1.0.0", - "webpack-dev-middleware": "^3.0.0", - "webpack-hot-client": "^4.1.0", - "webpack-log": "^1.1.1" - } - }, "latest-version": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", @@ -3479,17 +3639,6 @@ "invert-kv": "^1.0.0" } }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, "loader-runner": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", @@ -3532,6 +3681,11 @@ "chalk": "^2.0.1" } }, + "loglevel": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", + "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=" + }, "loglevelnext": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz", @@ -3608,11 +3762,6 @@ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" - }, "map-stream": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", @@ -3635,11 +3784,6 @@ "inherits": "^2.0.1" } }, - "meant": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/meant/-/meant-1.0.1.tgz", - "integrity": "sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg==" - }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -3677,35 +3821,11 @@ "readable-stream": "^2.0.1" } }, - "meow": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0", - "yargs-parser": "^10.0.0" - } - }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, - "merge-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-1.0.1.tgz", - "integrity": "sha512-iuPV41VWKWBIOpBsjoxjDZw8/GbSfZ2mk7N1453bwMrfzdrIk7EzBd+8UVR6rkw67th7xnk9Dytl3J+lHPdxvg==", - "requires": { - "is-plain-obj": "^1.1" - } - }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -3786,15 +3906,6 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" - } - }, "mississippi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz", @@ -3864,6 +3975,20 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "requires": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" + }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", @@ -3885,20 +4010,6 @@ "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=", "optional": true }, - "nanoassert": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", - "integrity": "sha1-TzFS4JVA/eKMdvRLGbvNHVpCR40=" - }, - "nanobus": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/nanobus/-/nanobus-4.3.3.tgz", - "integrity": "sha512-4/uzl+LkMGoVv/9eMzH2QFvefmlJErT0KR7EmuYbmht2QvxSEqTjhFFOZ/KHE6chH58fKL3njrOcEwbYV0h9Yw==", - "requires": { - "nanotiming": "^7.2.0", - "remove-array-items": "^1.0.0" - } - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -3917,23 +4028,6 @@ "to-regex": "^3.0.1" } }, - "nanoscheduler": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/nanoscheduler/-/nanoscheduler-1.0.3.tgz", - "integrity": "sha512-jBbrF3qdU9321r8n9X7yu18DjP31Do2ItJm3mWrt90wJTrnDO+HXpoV7ftaUglAtjgj9s+OaCxGufbvx6pvbEQ==", - "requires": { - "nanoassert": "^1.1.0" - } - }, - "nanotiming": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/nanotiming/-/nanotiming-7.3.1.tgz", - "integrity": "sha512-l3lC7v/PfOuRWQa8vV29Jo6TG10wHtnthLElFXs4Te4Aas57Fo4n1Q8LH9n+NDh9riOzTVvb2QNBhTS4JUKNjw==", - "requires": { - "nanoassert": "^1.1.0", - "nanoscheduler": "^1.0.2" - } - }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", @@ -3963,6 +4057,11 @@ "is-stream": "^1.0.1" } }, + "node-forge": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", + "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" + }, "node-libs-browser": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", @@ -4000,11 +4099,6 @@ } } }, - "node-version": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/node-version/-/node-version-1.2.0.tgz", - "integrity": "sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ==" - }, "nodemon": { "version": "1.17.5", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.17.5.tgz", @@ -4145,6 +4239,11 @@ "isobject": "^3.0.1" } }, + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -4153,6 +4252,11 @@ "ee-first": "1.1.1" } }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4169,11 +4273,6 @@ "mimic-fn": "^1.0.0" } }, - "only": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz", - "integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=" - }, "ono": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/ono/-/ono-4.0.5.tgz", @@ -4190,6 +4289,14 @@ "is-wsl": "^1.1.0" } }, + "original": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", + "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", + "requires": { + "url-parse": "^1.4.3" + } + }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -4210,21 +4317,11 @@ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, - "p-is-promise": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", - "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=" - }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -4241,19 +4338,10 @@ "p-limit": "^1.1.0" } }, - "p-reduce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", - "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=" - }, - "p-series": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-series/-/p-series-1.1.0.tgz", - "integrity": "sha512-356covArc9UCfj2twY/sxCJKGMzzO+pJJtucizsPC6aS1xKSTBc9PQrQhvFR3+7F+fa2KBKdJjdIcv6NEWDcIQ==", - "requires": { - "@sindresorhus/is": "^0.7.0", - "p-reduce": "^1.0.0" - } + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" }, "p-try": { "version": "1.0.0", @@ -4298,15 +4386,6 @@ "pbkdf2": "^3.0.3" } }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, "parseurl": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", @@ -4357,14 +4436,6 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "^3.0.0" - } - }, "pause-stream": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", @@ -4390,6 +4461,19 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", @@ -4398,6 +4482,16 @@ "find-up": "^2.1.0" } }, + "portfinder": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.16.tgz", + "integrity": "sha512-icBXCFQxzlK2PMepOM0QeEdPPFSLAaXXeuKOv5AClJlMy1oVCBrkDGJ12IZYesI/BF8mpeVco3vRCmgeBb4+hw==", + "requires": { + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" + } + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -4531,10 +4625,10 @@ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=" + "querystringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.0.0.tgz", + "integrity": "sha512-eTPo5t/4bgaMNZxyjWx6N2a6AuE0mq51KWvpc7nU/MAqixcI6v6KrGUKES0HaomdnolQBBXU/++X6/QQ9KL4tw==" }, "randombytes": { "version": "2.0.6", @@ -4625,23 +4719,24 @@ "prop-types": "^15.6.0" } }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "react-helmet": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-5.2.0.tgz", + "integrity": "sha1-qBgR3yExOm1VxfBYxK66XW89l6c=", "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "deep-equal": "^1.0.1", + "object-assign": "^4.1.1", + "prop-types": "^15.5.4", + "react-side-effect": "^1.1.0" } }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "react-side-effect": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-1.1.5.tgz", + "integrity": "sha512-Z2ZJE4p/jIfvUpiUMRydEVpQRf2f8GMHczT6qLcARmX7QRb28JDBTpnM2g/i5y/p7ZDEXYGHWg0RbhikE+hJRw==", "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" + "exenv": "^1.2.1", + "shallowequal": "^1.0.1" } }, "readable-stream": { @@ -4669,15 +4764,6 @@ "set-immediate-shim": "^1.0.1" } }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" - } - }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -4704,11 +4790,6 @@ "rc": "^1.0.1" } }, - "remove-array-items": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/remove-array-items/-/remove-array-items-1.0.0.tgz", - "integrity": "sha1-B79CyzMvTPboXq2DteToltIyayE=" - }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -4724,6 +4805,14 @@ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "^1.0.0" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4760,15 +4849,6 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" }, - "resolve-path": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz", - "integrity": "sha1-xL2p9e+y/OZSR4c6s2u02DT+Fvc=", - "requires": { - "http-errors": "~1.6.2", - "path-is-absolute": "1.0.1" - } - }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -4856,6 +4936,19 @@ "ajv-keywords": "^3.1.0" } }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" + }, + "selfsigned": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.3.tgz", + "integrity": "sha512-vmZenZ+8Al3NLHkWnhBQ0x6BkML1eCP2xEi3JE+f3D9wW9fipD9NNJHYtE9XJM4TsPaHGZJIamrSI6MTg1dU2Q==", + "requires": { + "node-forge": "0.7.5" + } + }, "semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", @@ -4894,6 +4987,20 @@ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.5.0.tgz", "integrity": "sha1-GqM2FiyIqJDdrVOEuuvJOmVRYf4=" }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + } + }, "serve-static": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", @@ -4955,6 +5062,11 @@ "safe-buffer": "^5.0.1" } }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -5075,6 +5187,38 @@ } } }, + "sockjs": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", + "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^3.0.1" + } + }, + "sockjs-client": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz", + "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=", + "requires": { + "debug": "^2.6.6", + "eventsource": "0.1.6", + "faye-websocket": "~0.11.0", + "inherits": "^2.0.1", + "json3": "^3.3.2", + "url-parse": "^1.1.8" + }, + "dependencies": { + "faye-websocket": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz", + "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=", + "requires": { + "websocket-driver": ">=0.5.1" + } + } + } + }, "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", @@ -5139,6 +5283,33 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" }, + "spdy": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", + "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "requires": { + "debug": "^2.6.8", + "handle-thing": "^1.2.5", + "http-deceiver": "^1.2.7", + "safe-buffer": "^5.0.1", + "select-hose": "^2.0.0", + "spdy-transport": "^2.0.18" + } + }, + "spdy-transport": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", + "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", + "requires": { + "debug": "^2.6.8", + "detect-node": "^2.0.3", + "hpack.js": "^2.1.6", + "obuf": "^1.1.1", + "readable-stream": "^2.2.9", + "safe-buffer": "^5.0.1", + "wbuf": "^1.7.2" + } + }, "split": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", @@ -5280,21 +5451,11 @@ "ansi-regex": "^2.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" - }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -5318,11 +5479,6 @@ "execa": "^0.7.0" } }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, "thenify": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", @@ -5353,10 +5509,10 @@ "xtend": "~4.0.1" } }, - "time-fix-plugin": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/time-fix-plugin/-/time-fix-plugin-2.0.3.tgz", - "integrity": "sha512-5StGdiXCiBsq2+RdBQ0NrunFeKqVX0f2Myn8s1YqOxRS+kmuiHcdpPm27ucbM6FYawBKGTOOYxPnqxIBZyiqEg==" + "thunky": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz", + "integrity": "sha1-qGLgGOP7HqLsP85dVWBc9X8kc3E=" }, "timed-out": { "version": "4.0.1", @@ -5439,23 +5595,6 @@ "nopt": "~1.0.10" } }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" - }, - "ts-loader": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-4.4.2.tgz", - "integrity": "sha1-d41EZLJENoc8ePf56RTYgZTCokg=", - "requires": { - "chalk": "^2.3.0", - "enhanced-resolve": "^4.0.0", - "loader-utils": "^1.0.2", - "micromatch": "^3.1.4", - "semver": "^5.0.1" - } - }, "ts-node": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.0.tgz", @@ -5738,6 +5877,15 @@ "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz", "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo=" }, + "url-parse": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz", + "integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==", + "requires": { + "querystringify": "^2.0.0", + "requires-port": "^1.0.0" + } + }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", @@ -5814,6 +5962,14 @@ "neo-async": "^2.5.0" } }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, "webpack": { "version": "4.15.1", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.15.1.tgz", @@ -5907,90 +6063,41 @@ } } }, - "webpack-hot-client": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/webpack-hot-client/-/webpack-hot-client-4.1.1.tgz", - "integrity": "sha512-Gu3hEkFJIsvC+2Dg86FvAzIL8KSR88Ptk0QnV4wEucObB0c9aMIYbjSA9oPTV4X5OZRH6ftrk4FcSGsZmTLiWA==", + "webpack-dev-server": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.5.tgz", + "integrity": "sha512-LVHg+EPwZLHIlfvokSTgtJqO/vI5CQi89fASb5JEDtVMDjY0yuIEqPPdMiKaBJIB/Ab7v/UN/sYZ7WsZvntQKw==", "requires": { - "@webpack-contrib/schema-utils": "^1.0.0-beta.0", - "json-stringify-safe": "^5.0.1", - "loglevelnext": "^1.0.2", - "merge-options": "^1.0.1", - "strip-ansi": "^4.0.0", - "uuid": "^3.1.0", - "webpack-log": "^1.1.1", - "ws": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "webpack-log": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz", - "integrity": "sha1-pLNM2msitRjbsKsy5WeWLVxypD0=", - "requires": { - "chalk": "^2.1.0", - "log-symbols": "^2.1.0", - "loglevelnext": "^1.0.1", - "uuid": "^3.1.0" - } - }, - "webpack-serve": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/webpack-serve/-/webpack-serve-2.0.2.tgz", - "integrity": "sha512-KQra2vayPKE2gooZRr2jF0Cs9AcQrS60Dmc6gMlFn4DmPkk/EmCuCODiAw008XedjwMBt8kUapDXJVu4gDH9Mg==", - "requires": { - "@shellscape/koa-static": "^4.0.4", - "@webpack-contrib/cli-utils": "^1.0.2", - "@webpack-contrib/config-loader": "^1.1.1", - "@webpack-contrib/schema-utils": "^1.0.0-beta.0", - "chalk": "^2.3.0", - "clipboardy": "^1.2.2", - "cosmiconfig": "^5.0.2", + "ansi-html": "0.0.7", + "array-includes": "^3.0.3", + "bonjour": "^3.5.0", + "chokidar": "^2.0.0", + "compression": "^1.5.2", + "connect-history-api-fallback": "^1.3.0", "debug": "^3.1.0", - "decamelize": "^2.0.0", - "get-port": "^3.2.0", + "del": "^3.0.0", + "express": "^4.16.2", + "html-entities": "^1.2.0", + "http-proxy-middleware": "~0.18.0", "import-local": "^1.0.0", - "is-plain-obj": "^1.1.0", + "internal-ip": "1.2.0", + "ip": "^1.1.5", "killable": "^1.0.0", - "koa": "^2.4.1", - "koa-webpack": "^5.1.0", - "loud-rejection": "^1.6.0", - "mem": "^3.0.0", - "meow": "^5.0.0", - "merge-options": "^1.0.1", - "nanobus": "^4.3.1", - "node-version": "^1.1.3", + "loglevel": "^1.4.1", "opn": "^5.1.0", - "p-defer": "^1.0.0", - "p-series": "^1.1.0", - "resolve": "^1.6.0", - "strip-ansi": "^4.0.0", - "time-fix-plugin": "^2.0.0", - "update-notifier": "^2.3.0", - "url-join": "^4.0.0", - "v8-compile-cache": "^2.0.0", - "webpack-log": "^1.1.2" + "portfinder": "^1.0.9", + "selfsigned": "^1.9.1", + "serve-index": "^1.7.2", + "sockjs": "0.3.19", + "sockjs-client": "1.1.5", + "spdy": "^3.4.1", + "strip-ansi": "^3.0.0", + "supports-color": "^5.1.0", + "webpack-dev-middleware": "3.1.3", + "webpack-log": "^1.1.2", + "yargs": "11.0.0" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -5999,25 +6106,64 @@ "ms": "2.0.0" } }, - "mem": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mem/-/mem-3.0.1.tgz", - "integrity": "sha512-QKs47bslvOE0NbXOqG6lMxn6Bk0Iuw0vfrIeLykmQle2LkCw1p48dZDdzE+D88b/xqRJcZGcMNeDvSVma+NuIQ==", + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "requires": { - "mimic-fn": "^1.0.0", - "p-is-promise": "^1.1.0" + "has-flag": "^3.0.0" } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yargs": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz", + "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==", "requires": { - "ansi-regex": "^3.0.0" + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "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=", + "requires": { + "camelcase": "^4.1.0" } } } }, + "webpack-log": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz", + "integrity": "sha1-pLNM2msitRjbsKsy5WeWLVxypD0=", + "requires": { + "chalk": "^2.1.0", + "log-symbols": "^2.1.0", + "loglevelnext": "^1.0.1", + "uuid": "^3.1.0" + } + }, "webpack-sources": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", @@ -6027,6 +6173,20 @@ "source-map": "~0.6.1" } }, + "websocket-driver": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", + "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", + "requires": { + "http-parser-js": ">=0.4.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==" + }, "whatwg-fetch": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", @@ -6105,15 +6265,6 @@ "signal-exit": "^3.0.2" } }, - "ws": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-4.1.0.tgz", - "integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==", - "requires": { - "async-limiter": "~1.0.0", - "safe-buffer": "~5.1.0" - } - }, "xdg-basedir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", @@ -6206,11 +6357,6 @@ "camelcase": "^4.1.0" } }, - "ylru": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.2.1.tgz", - "integrity": "sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ==" - }, "yn": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", diff --git a/package.json b/package.json index 4b7156df1..1b19e1c71 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,7 @@ { - "name": "ssr", + "name": "django_react", "version": "1.0.0", "description": "", - "main": "index.js", "dependencies": { "@types/express": "^4.16.0", "@types/http-proxy": "^1.16.2", @@ -33,6 +32,7 @@ "webpack-dev-server": "^3.1.5" }, "devDependencies": {}, + "main": "lib/index.js", "scripts": { "build:schema": "../../bin/python manage.py generate_types_schema | json2ts > client/exports.tsx", "build": "npm run build:schema && webpack -p", diff --git a/scripts/to-be-renamed.py b/scripts/to-be-renamed.py index 20a9d848a..d71fbedd9 100644 --- a/scripts/to-be-renamed.py +++ b/scripts/to-be-renamed.py @@ -6,6 +6,15 @@ module_directory = os.path.dirname(django_react.__file__) conf_directory = os.path.join(module_directory, 'conf') + mypy = os.path.join(conf_directory, 'mypy.ini') +tsconfig = os.path.join(conf_directory, 'tsconfig.json') + +def create_symlink(path: str, name: str) -> None: + if os.path.isfile(name): + os.remove(name) + os.symlink(path, name) + -os.symlink(mypy, 'mypy.ini') +create_symlink(mypy, 'mypy.ini') +create_symlink(mypy, 'mypy.ini') diff --git a/tsconfig.json b/tsconfig.json index 17e05ca8f..6821bf3f1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,9 +11,10 @@ "jsx": "react", // "allowSyntheticDefaultImports": true, "esModuleInterop": true, - "lib": ["dom", "es6"] + "lib": ["dom", "es6"], + "outDir": "./lib", + "declaration": true }, - "files": [ - "client/app.tsx" - ] + "include": ["typescript/**/*"], + "exclude": ["node_modules"] } diff --git a/client/app.tsx b/typescript/client.tsx similarity index 81% rename from client/app.tsx rename to typescript/client.tsx index 4b6d570d7..b667ab613 100644 --- a/client/app.tsx +++ b/typescript/client.tsx @@ -8,7 +8,7 @@ if ((module as any).hot) { (module as any).hot.accept() } -const Template = require('./templates/' + props.template_name + '.tsx').default; +const Template = require('templates/' + props.template_name + '.tsx').default; hydrate(