From f460f630c315fb1d9908dfb74c16459f82b081c2 Mon Sep 17 00:00:00 2001 From: Qstick Date: Wed, 20 Sep 2017 22:05:00 -0400 Subject: [PATCH] Target to .NET 4.6.1, Update SignalR, Owin, Nancy (#84) * Target .net 4.6.1 * Update to SignalR 2.2.2 * Fix Socks Reference in NZBDrone.Common * UI Fixes, Build Fixes * Update Nancy to 1.4.4 * Upgrade Microsoft Owin to 3.1.0 * Delete npm-shrinkwrap.json * Fix SignalR Messages --- frontend/.eslintrc | 2 +- frontend/gulp/webpack.js | 8 +- frontend/src/App/AppUpdatedModal.js | 1 - frontend/src/App/AppUpdatedModalConnector.js | 14 +- frontend/src/App/AppUpdatedModalContent.js | 4 +- .../App/AppUpdatedModalContentConnector.js | 9 +- frontend/src/Components/SignalRConnector.js | 6 +- frontend/src/JsLibraries/jquery.js | 9842 ----------------- frontend/src/JsLibraries/jquery.signalR.js | 2177 ---- frontend/src/Shims/jquery.js | 12 +- frontend/src/Shims/signalR.js | 4 - frontend/src/jQuery/jquery.ajax.js | 10 +- frontend/src/preload.js | 2 + npm-shrinkwrap.json | 5242 --------- package-lock.json | 8409 ++++++++++++++ package.json | 2 + src/Lidarr.Api.V3/Lidarr.Api.V3.csproj | 25 +- src/Lidarr.Api.V3/app.config | 10 +- src/Lidarr.Api.V3/packages.config | 14 +- src/Lidarr.Http/Lidarr.Http.csproj | 10 +- src/Lidarr.Http/app.config | 10 +- src/Lidarr.Http/packages.config | 12 +- src/Lidarr.sln | 20 +- src/LogentriesCore/LogentriesCore.csproj | 3 + .../AuthorizeAttribute.cs | 160 - .../Configuration/ConfigurationExtensions.cs | 61 - .../DefaultConfigurationManager.cs | 89 - .../Configuration/IConfigurationManager.cs | 33 - .../ConnectionConfiguration.cs | 24 - .../ConnectionExtensions.cs | 60 - .../ConnectionMessage.cs | 51 - src/Microsoft.AspNet.SignalR.Core/Cookie.cs | 28 - .../DefaultDependencyResolver.cs | 231 - .../DependencyResolverExtensions.cs | 61 - .../GlobalHost.cs | 66 - .../GroupManager.cs | 117 - .../Hosting/HostConstants.cs | 26 - .../Hosting/HostContext.cs | 21 - .../Hosting/HostContextExtensions.cs | 53 - .../HostDependencyResolverExtensions.cs | 55 - .../Hosting/IResponse.cs | 49 - .../Hosting/IWebSocket.cs | 48 - .../Hosting/IWebSocketRequest.cs | 17 - .../Hosting/PersistentConnectionFactory.cs | 52 - .../Hosting/RequestExtensions.cs | 22 - .../Hosting/ResponseExtensions.cs | 32 - src/Microsoft.AspNet.SignalR.Core/Hub.cs | 72 - .../HubConfiguration.cs | 24 - .../Hubs/ClientHubInvocation.cs | 47 - .../Hubs/ClientProxy.cs | 44 - .../Hubs/ConnectionIdProxy.cs | 18 - .../Hubs/DefaultAssemblyLocator.cs | 16 - .../Hubs/DefaultHubActivator.cs | 32 - .../Hubs/DefaultJavaScriptProxyGenerator.cs | 211 - .../Hubs/DynamicDictionary.cs | 144 - .../Hubs/EmptyJavaScriptProxyGenerator.cs | 15 - .../Hubs/Extensions/HubManagerExtensions.cs | 63 - .../Hubs/Extensions/HubTypeExtensions.cs | 30 - .../Hubs/Extensions/MethodExtensions.cs | 29 - .../Hubs/GroupProxy.cs | 18 - .../Hubs/HubCallerContext.cs | 71 - .../Hubs/HubConnectionContext.cs | 111 - .../Hubs/HubContext.cs | 66 - .../Hubs/HubDispatcher.cs | 522 - .../Hubs/HubMethodNameAttribute.cs | 25 - .../Hubs/HubNameAttribute.cs | 25 - .../Hubs/HubRequest.cs | 20 - .../Hubs/HubRequestParser.cs | 69 - .../Hubs/HubResponse.cs | 45 - .../Hubs/IAssemblyLocator.cs | 14 - .../Hubs/IClientProxy.cs | 20 - .../Hubs/IHub.cs | 41 - .../Hubs/IHubActivator.cs | 9 - .../Hubs/IHubConnectionContext.cs | 15 - .../Hubs/IHubRequestParser.cs | 17 - .../Hubs/IJavaScriptMinifier.cs | 9 - .../Hubs/IJavaScriptProxyGenerator.cs | 9 - .../Hubs/Lookup/DefaultHubManager.cs | 95 - .../Hubs/Lookup/DefaultParameterResolver.cs | 54 - .../Hubs/Lookup/Descriptors/Descriptor.cs | 17 - .../Hubs/Lookup/Descriptors/HubDescriptor.cs | 22 - .../Lookup/Descriptors/MethodDescriptor.cs | 42 - .../Descriptors/NullMethodDescriptor.cs | 40 - .../Lookup/Descriptors/ParameterDescriptor.cs | 23 - .../Hubs/Lookup/HubMethodDispatcher.cs | 79 - .../Hubs/Lookup/IHubDescriptorProvider.cs | 28 - .../Hubs/Lookup/IHubManager.cs | 57 - .../Hubs/Lookup/IMethodDescriptorProvider.cs | 32 - .../Hubs/Lookup/IParameterResolver.cs | 21 - .../Lookup/ReflectedHubDescriptorProvider.cs | 87 - .../ReflectedMethodDescriptorProvider.cs | 150 - .../Hubs/NullClientProxy.cs | 21 - .../Hubs/NullJavaScriptMinifier.cs | 17 - .../Hubs/Pipeline/Auth/AuthorizeModule.cs | 125 - .../Pipeline/Auth/IAuthorizeHubConnection.cs | 18 - .../Auth/IAuthorizeHubMethodInvocation.cs | 18 - .../Pipeline/Auth/NotAuthorizedException.cs | 18 - .../Hubs/Pipeline/HubInvokerContext.cs | 42 - .../Pipeline/HubOutgoingInvokerContext.cs | 41 - .../Hubs/Pipeline/HubPipeline.cs | 103 - .../Hubs/Pipeline/HubPipelineExtensions.cs | 28 - .../Hubs/Pipeline/HubPipelineModule.cs | 311 - .../Pipeline/IHubIncomingInvokerContext.cs | 34 - .../Pipeline/IHubOutgoingInvokerContext.cs | 34 - .../Hubs/Pipeline/IHubPipeline.cs | 29 - .../Hubs/Pipeline/IHubPipelineInvoker.cs | 76 - .../Hubs/Pipeline/IHubPipelineModule.cs | 87 - .../Hubs/ReflectionHelper.cs | 69 - .../Hubs/SignalProxy.cs | 62 - .../Hubs/StateChangeTracker.cs | 66 - .../Hubs/StatefulSignalProxy.cs | 48 - .../IConnection.cs | 24 - .../IConnectionGroupManager.cs | 21 - .../IDependencyResolver.cs | 15 - .../IGroupManager.cs | 28 - .../IHubContext.cs | 22 - .../IPersistentConnectionContext.cs | 20 - src/Microsoft.AspNet.SignalR.Core/IRequest.cs | 50 - .../Infrastructure/AckHandler.cs | 112 - .../Infrastructure/ArraySegmentTextReader.cs | 33 - .../Infrastructure/BinaryTextWriter.cs | 34 - .../Infrastructure/BufferTextWriter.cs | 187 - .../CancellationTokenExtensions.cs | 89 - .../Infrastructure/Connection.cs | 345 - .../Infrastructure/ConnectionManager.cs | 110 - .../Infrastructure/DefaultProtectedData.cs | 35 - .../Infrastructure/DiffPair.cs | 20 - .../Infrastructure/DiffSet.cs | 65 - .../Infrastructure/DisposableAction.cs | 43 - .../Infrastructure/Disposer.cs | 61 - .../Infrastructure/ExceptionsExtensions.cs | 28 - .../Infrastructure/IAckHandler.cs | 13 - .../Infrastructure/IBinaryWriter.cs | 14 - .../Infrastructure/IConnectionManager.cs | 36 - .../Infrastructure/IPerformanceCounter.cs | 18 - .../IPerformanceCounterManager.cs | 193 - .../Infrastructure/IProtectedData.cs | 10 - .../Infrastructure/IServerCommandHandler.cs | 25 - .../Infrastructure/IServerIdManager.cs | 15 - .../Infrastructure/IStringMinifier.cs | 39 - .../Infrastructure/InterlockedHelper.cs | 16 - .../Infrastructure/ListHelper.cs | 12 - .../Infrastructure/MonoUtility.cs | 31 - .../PerformanceCounterAttribute.cs | 15 - .../PerformanceCounterManager.cs | 418 - .../PerformanceCounterWrapper.cs | 68 - .../PersistentConnectionContext.cs | 17 - .../Infrastructure/PrefixHelper.cs | 96 - .../Infrastructure/Purposes.cs | 11 - .../SafeCancellationTokenSource.cs | 103 - .../Infrastructure/SafeSet.cs | 60 - .../Infrastructure/ServerCommand.cs | 30 - .../Infrastructure/ServerCommandHandler.cs | 148 - .../Infrastructure/ServerCommandType.cs | 9 - .../Infrastructure/ServerIdManager.cs | 26 - .../SipHashBasedStringEqualityComparer.cs | 242 - .../Infrastructure/StringMinifier.cs | 97 - .../Infrastructure/TaskQueue.cs | 128 - .../Json/IJsonSerializer.cs | 28 - .../Json/IJsonValue.cs | 26 - .../Json/IJsonWritable.cs | 18 - .../Json/JRawValue.cs | 42 - .../Json/JsonNetSerializer.cs | 69 - .../Json/JsonSerializerExtensions.cs | 77 - .../Json/JsonUtility.cs | 124 - .../Json/SipHashBasedDictionaryConverter.cs | 113 - .../Messaging/Command.cs | 19 - .../Messaging/CommandType.cs | 12 - .../Messaging/Cursor.cs | 264 - .../Messaging/DefaultSubscription.cs | 239 - .../Messaging/IMessageBus.cs | 28 - .../Messaging/ISubscriber.cs | 23 - .../Messaging/ISubscription.cs | 16 - .../Messaging/LocalEventKeyInfo.cs | 29 - .../Messaging/Message.cs | 155 - .../Messaging/MessageBroker.cs | 330 - .../Messaging/MessageBus.cs | 588 - .../Messaging/MessageBusExtensions.cs | 88 - .../Messaging/MessageResult.cs | 46 - .../Messaging/MessageStore.cs | 209 - .../Messaging/MessageStoreResult.cs | 53 - .../Messaging/ScaleoutConfiguration.cs | 39 - .../Messaging/ScaleoutMapping.cs | 37 - .../Messaging/ScaleoutMappingStore.cs | 123 - .../Messaging/ScaleoutMessage.cs | 74 - .../Messaging/ScaleoutMessageBus.cs | 232 - .../Messaging/ScaleoutStore.cs | 440 - .../Messaging/ScaleoutStream.cs | 316 - .../Messaging/ScaleoutStreamManager.cs | 97 - .../Messaging/ScaleoutSubscription.cs | 282 - .../Messaging/Subscription.cs | 338 - .../Messaging/Topic.cs | 119 - .../Messaging/TopicLookup.cs | 98 - .../Messaging/TopicState.cs | 12 - .../Messaging/Volatile.cs | 16 - .../Microsoft.AspNet.SignalR.Core.csproj | 284 - ...oft.AspNet.SignalR.Core.csproj.DotSettings | 2 - .../PersistentConnection.cs | 522 - .../Properties/AssemblyInfo.cs | 16 - .../Resources.Designer.cs | 375 - .../Resources.resx | 225 - .../Scripts/hubs.js | 90 - .../TaskAsyncHelper.cs | 1115 -- .../Tracing/ITraceManager.cs | 12 - .../Tracing/TraceManager.cs | 31 - .../Tracing/TraceSourceExtensions.cs | 50 - .../Transports/ForeverFrameTransport.cs | 188 - .../Transports/ForeverTransport.cs | 405 - .../Transports/HttpRequestLifeTime.cs | 94 - .../Transports/ITrackingConnection.cs | 76 - .../Transports/ITransport.cs | 57 - .../Transports/ITransportConnection.cs | 14 - .../Transports/ITransportHeartBeat.cs | 38 - .../Transports/ITransportManager.cs | 25 - .../Transports/LongPollingTransport.cs | 400 - .../Transports/PersistentResponse.cs | 181 - .../Transports/ServerSentEventsTransport.cs | 93 - .../TransportConnectionExtensions.cs | 34 - .../Transports/TransportConnectionStates.cs | 19 - .../Transports/TransportDisconnectBase.cs | 344 - .../Transports/TransportHeartBeat.cs | 384 - .../Transports/TransportManager.cs | 113 - .../Transports/WebSocketTransport.cs | 175 - src/Microsoft.AspNet.SignalR.Core/app.config | 11 - .../packages.config | 4 - .../Handlers/CallHandler.cs | 110 - .../Handlers/HubDispatcherHandler.cs | 40 - .../Handlers/PersistentConnectionHandler.cs | 43 - .../Infrastructure/Headers.cs | 47 - .../Infrastructure/OwinConstants.cs | 46 - .../OwinEnvironmentExtensions.cs | 69 - .../Infrastructure/ParamDictionary.cs | 35 - .../Infrastructure/PrefixMatcher.cs | 50 - .../Infrastructure/UrlDecoder.cs | 150 - .../Microsoft.AspNet.SignalR.Owin.csproj | 112 - ...oft.AspNet.SignalR.Owin.csproj.DotSettings | 2 - .../OwinExtensions.cs | 86 - .../Properties/AssemblyInfo.cs | 6 - .../RequestExtensions.cs | 29 - .../Resources.Designer.cs | 96 - .../Resources.resx | 132 - .../ServerRequest.Owin.cs | 237 - .../ServerRequest.cs | 155 - .../ServerResponse.cs | 90 - src/Microsoft.AspNet.SignalR.Owin/app.config | 11 - .../packages.config | 4 - .../NzbDrone.Api.Test.csproj | 18 +- src/NzbDrone.Api.Test/packages.config | 8 +- src/NzbDrone.Api/NzbDrone.Api.csproj | 33 +- src/NzbDrone.Api/app.config | 10 +- src/NzbDrone.Api/packages.config | 14 +- .../NzbDrone.Host.Test.csproj | 22 +- src/NzbDrone.App.Test/packages.config | 10 +- .../NzbDrone.Automation.Test.csproj | 15 +- src/NzbDrone.Automation.Test/app.config | 6 +- src/NzbDrone.Automation.Test/packages.config | 10 +- .../NzbDrone.Common.Test.csproj | 21 +- src/NzbDrone.Common.Test/packages.config | 8 +- src/NzbDrone.Common/NzbDrone.Common.csproj | 31 +- src/NzbDrone.Common/Serializer/Json.cs | 39 +- src/NzbDrone.Common/app.config | 2 +- src/NzbDrone.Common/packages.config | 10 +- src/NzbDrone.Console/NzbDrone.Console.csproj | 35 +- src/NzbDrone.Console/packages.config | 10 +- .../NzbDrone.Core.Test.csproj | 30 +- src/NzbDrone.Core.Test/packages.config | 28 +- src/NzbDrone.Core/App.config | 2 +- src/NzbDrone.Core/NzbDrone.Core.csproj | 33 +- src/NzbDrone.Core/packages.config | 24 +- src/NzbDrone.Host/NzbDrone.Host.csproj | 61 +- .../MiddleWare/NzbDroneVersionMiddleWare.cs | 8 +- .../Owin/MiddleWare/SignalRMiddleWare.cs | 5 +- src/NzbDrone.Host/app.config | 8 +- src/NzbDrone.Host/packages.config | 23 +- .../NzbDrone.Integration.Test.csproj | 60 +- src/NzbDrone.Integration.Test/packages.config | 28 +- .../NzbDrone.Libraries.Test.csproj | 16 +- src/NzbDrone.Libraries.Test/app.config | 6 +- src/NzbDrone.Libraries.Test/packages.config | 6 +- .../NzbDrone.Mono.Test.csproj | 16 +- src/NzbDrone.Mono.Test/app.config | 12 +- src/NzbDrone.Mono.Test/packages.config | 6 +- src/NzbDrone.Mono/NzbDrone.Mono.csproj | 10 +- src/NzbDrone.Mono/app.config | 2 +- src/NzbDrone.Mono/packages.config | 2 +- .../NoOpPerformanceCounter.cs | 7 +- src/NzbDrone.SignalR/NzbDrone.SignalR.csproj | 45 +- src/NzbDrone.SignalR/Serializer.cs | 29 - .../SignalRContractResolver.cs | 28 + src/NzbDrone.SignalR/SignalRJsonSerializer.cs | 22 + .../SignalrDependencyResolver.cs | 21 +- .../SonarrPerformanceCounterManager.cs | 4 + src/NzbDrone.SignalR/app.config | 10 +- src/NzbDrone.SignalR/packages.config | 11 +- src/NzbDrone.Test.Common/App.config | 10 +- .../NzbDrone.Test.Common.csproj | 36 +- src/NzbDrone.Test.Common/packages.config | 17 +- .../NzbDrone.Test.Dummy.csproj | 8 +- src/NzbDrone.Test.Dummy/app.config | 2 +- .../NzbDrone.Update.Test.csproj | 21 +- src/NzbDrone.Update.Test/packages.config | 10 +- src/NzbDrone.Update/NzbDrone.Update.csproj | 11 +- src/NzbDrone.Update/app.config | 4 +- src/NzbDrone.Update/packages.config | 4 +- .../NzbDrone.Windows.Test.csproj | 15 +- src/NzbDrone.Windows.Test/app.config | 12 +- src/NzbDrone.Windows.Test/packages.config | 4 +- src/NzbDrone.Windows/NzbDrone.Windows.csproj | 11 +- src/NzbDrone.Windows/app.config | 2 +- src/NzbDrone.Windows/packages.config | 2 +- src/NzbDrone/NzbDrone.csproj | 35 +- src/NzbDrone/Properties/Resources.Designer.cs | 5 +- src/NzbDrone/packages.config | 10 +- .../ServiceInstall/ServiceInstall.csproj | 10 +- src/ServiceHelpers/ServiceInstall/app.config | 2 +- .../ServiceUninstall/ServiceUninstall.csproj | 10 +- .../ServiceUninstall/app.config | 2 +- 317 files changed, 9123 insertions(+), 38012 deletions(-) delete mode 100644 frontend/src/JsLibraries/jquery.js delete mode 100644 frontend/src/JsLibraries/jquery.signalR.js delete mode 100644 frontend/src/Shims/signalR.js delete mode 100644 npm-shrinkwrap.json create mode 100644 package-lock.json delete mode 100644 src/Microsoft.AspNet.SignalR.Core/AuthorizeAttribute.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Configuration/ConfigurationExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Configuration/DefaultConfigurationManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Configuration/IConfigurationManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/ConnectionConfiguration.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/ConnectionExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/ConnectionMessage.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Cookie.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/DefaultDependencyResolver.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/DependencyResolverExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/GlobalHost.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/GroupManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/HostConstants.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/HostContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/HostContextExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/HostDependencyResolverExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/IResponse.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/IWebSocket.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/IWebSocketRequest.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/PersistentConnectionFactory.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/RequestExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hosting/ResponseExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hub.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/HubConfiguration.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/ClientHubInvocation.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/ClientProxy.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/ConnectionIdProxy.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultAssemblyLocator.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultHubActivator.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultJavaScriptProxyGenerator.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/DynamicDictionary.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/EmptyJavaScriptProxyGenerator.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/HubManagerExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/HubTypeExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/MethodExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/GroupProxy.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/HubCallerContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/HubConnectionContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/HubContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/HubDispatcher.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/HubMethodNameAttribute.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/HubNameAttribute.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/HubRequest.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/HubRequestParser.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/HubResponse.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/IAssemblyLocator.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/IClientProxy.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/IHub.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/IHubActivator.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/IHubConnectionContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/IHubRequestParser.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/IJavaScriptMinifier.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/IJavaScriptProxyGenerator.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/DefaultHubManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/DefaultParameterResolver.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/Descriptor.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/HubDescriptor.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/MethodDescriptor.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/NullMethodDescriptor.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/ParameterDescriptor.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/HubMethodDispatcher.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IHubDescriptorProvider.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IHubManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IMethodDescriptorProvider.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IParameterResolver.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/ReflectedHubDescriptorProvider.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/ReflectedMethodDescriptorProvider.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/NullClientProxy.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/NullJavaScriptMinifier.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/AuthorizeModule.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/IAuthorizeHubConnection.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/IAuthorizeHubMethodInvocation.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/NotAuthorizedException.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubInvokerContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubOutgoingInvokerContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipeline.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipelineExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipelineModule.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubIncomingInvokerContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubOutgoingInvokerContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipeline.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipelineInvoker.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipelineModule.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/ReflectionHelper.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/SignalProxy.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/StateChangeTracker.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Hubs/StatefulSignalProxy.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/IConnection.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/IConnectionGroupManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/IDependencyResolver.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/IGroupManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/IHubContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/IPersistentConnectionContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/IRequest.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/AckHandler.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/ArraySegmentTextReader.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/BinaryTextWriter.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/BufferTextWriter.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/CancellationTokenExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/Connection.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/ConnectionManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/DefaultProtectedData.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/DiffPair.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/DiffSet.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/DisposableAction.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/Disposer.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/ExceptionsExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/IAckHandler.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/IBinaryWriter.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/IConnectionManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/IPerformanceCounter.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/IPerformanceCounterManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/IProtectedData.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/IServerCommandHandler.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/IServerIdManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/IStringMinifier.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/InterlockedHelper.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/ListHelper.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/MonoUtility.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterAttribute.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterWrapper.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/PersistentConnectionContext.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/PrefixHelper.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/Purposes.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/SafeCancellationTokenSource.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/SafeSet.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommand.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommandHandler.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommandType.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerIdManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/SipHashBasedStringEqualityComparer.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/StringMinifier.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Infrastructure/TaskQueue.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Json/IJsonSerializer.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Json/IJsonValue.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Json/IJsonWritable.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Json/JRawValue.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Json/JsonNetSerializer.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Json/JsonSerializerExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Json/JsonUtility.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Json/SipHashBasedDictionaryConverter.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/Command.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/CommandType.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/Cursor.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/DefaultSubscription.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/IMessageBus.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ISubscriber.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ISubscription.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/LocalEventKeyInfo.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/Message.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBroker.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBus.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBusExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/MessageResult.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/MessageStore.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/MessageStoreResult.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutConfiguration.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMapping.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMappingStore.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMessage.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMessageBus.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStore.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStream.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStreamManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutSubscription.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/Subscription.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/Topic.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/TopicLookup.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/TopicState.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Messaging/Volatile.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj.DotSettings delete mode 100644 src/Microsoft.AspNet.SignalR.Core/PersistentConnection.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Properties/AssemblyInfo.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Resources.Designer.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Resources.resx delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Scripts/hubs.js delete mode 100644 src/Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Tracing/ITraceManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Tracing/TraceManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Tracing/TraceSourceExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/ForeverFrameTransport.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/ForeverTransport.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/HttpRequestLifeTime.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/ITrackingConnection.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/ITransport.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/ITransportConnection.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/ITransportHeartBeat.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/ITransportManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/LongPollingTransport.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/PersistentResponse.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/ServerSentEventsTransport.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/TransportConnectionExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/TransportConnectionStates.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/TransportDisconnectBase.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/TransportHeartBeat.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/TransportManager.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/Transports/WebSocketTransport.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Core/app.config delete mode 100644 src/Microsoft.AspNet.SignalR.Core/packages.config delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Handlers/CallHandler.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Handlers/HubDispatcherHandler.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Handlers/PersistentConnectionHandler.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Infrastructure/Headers.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Infrastructure/OwinConstants.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Infrastructure/OwinEnvironmentExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Infrastructure/ParamDictionary.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Infrastructure/PrefixMatcher.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Infrastructure/UrlDecoder.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Microsoft.AspNet.SignalR.Owin.csproj delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Microsoft.AspNet.SignalR.Owin.csproj.DotSettings delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/OwinExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Properties/AssemblyInfo.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/RequestExtensions.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Resources.Designer.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/Resources.resx delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/ServerRequest.Owin.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/ServerRequest.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/ServerResponse.cs delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/app.config delete mode 100644 src/Microsoft.AspNet.SignalR.Owin/packages.config rename src/{Microsoft.AspNet.SignalR.Core/Infrastructure => NzbDrone.SignalR}/NoOpPerformanceCounter.cs (79%) delete mode 100644 src/NzbDrone.SignalR/Serializer.cs create mode 100644 src/NzbDrone.SignalR/SignalRContractResolver.cs create mode 100644 src/NzbDrone.SignalR/SignalRJsonSerializer.cs diff --git a/frontend/.eslintrc b/frontend/.eslintrc index 574918d05..b4d4187e3 100644 --- a/frontend/.eslintrc +++ b/frontend/.eslintrc @@ -241,7 +241,7 @@ operator-assignment: ["off", "never"], operator-linebreak: ["error", "after"], padded-blocks: ["error", "never"], - quote-props: ["error", "consistent"], + quote-props: ["error", "as-needed"], quotes: ["error", "single"], require-jsdoc: "off", semi: "error", diff --git a/frontend/gulp/webpack.js b/frontend/gulp/webpack.js index f0c017aea..aa238d271 100644 --- a/frontend/gulp/webpack.js +++ b/frontend/gulp/webpack.js @@ -41,9 +41,11 @@ const config = { resolve: { root: [ root, - path.join(root, 'Shims'), - path.join(root, 'JsLibraries') - ] + path.join(root, 'Shims') + ], + alias: { + jquery: 'jquery/src/jquery' + } }, output: { filename: path.join('_output', uiFolder, '[name].js'), diff --git a/frontend/src/App/AppUpdatedModal.js b/frontend/src/App/AppUpdatedModal.js index fe48e67f4..285b87ec8 100644 --- a/frontend/src/App/AppUpdatedModal.js +++ b/frontend/src/App/AppUpdatedModal.js @@ -23,7 +23,6 @@ function AppUpdatedModal(props) { AppUpdatedModal.propTypes = { isOpen: PropTypes.bool.isRequired, - version: PropTypes.string.isRequired, onModalClose: PropTypes.func.isRequired }; diff --git a/frontend/src/App/AppUpdatedModalConnector.js b/frontend/src/App/AppUpdatedModalConnector.js index bfa0bde38..a21afbc5a 100644 --- a/frontend/src/App/AppUpdatedModalConnector.js +++ b/frontend/src/App/AppUpdatedModalConnector.js @@ -1,18 +1,6 @@ import { connect } from 'react-redux'; -import { createSelector } from 'reselect'; import AppUpdatedModal from './AppUpdatedModal'; -function createMapStateToProps() { - return createSelector( - (state) => state.app.version, - (version) => { - return { - version - }; - } - ); -} - function createMapDispatchToProps(dispatch, props) { return { onModalClose() { @@ -21,4 +9,4 @@ function createMapDispatchToProps(dispatch, props) { }; } -export default connect(createMapStateToProps, createMapDispatchToProps)(AppUpdatedModal); +export default connect(null, createMapDispatchToProps)(AppUpdatedModal); diff --git a/frontend/src/App/AppUpdatedModalContent.js b/frontend/src/App/AppUpdatedModalContent.js index 493c68a01..9597d538f 100644 --- a/frontend/src/App/AppUpdatedModalContent.js +++ b/frontend/src/App/AppUpdatedModalContent.js @@ -1,7 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; import { kinds } from 'Helpers/Props'; -import FieldSet from 'Components/FieldSet'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import Button from 'Components/Link/Button'; import ModalContent from 'Components/Modal/ModalContent'; @@ -88,10 +87,9 @@ function AppUpdatedModalContent(props) { } AppUpdatedModalContent.propTypes = { - isOpen: PropTypes.bool.isRequired, version: PropTypes.string.isRequired, isPopulated: PropTypes.bool.isRequired, - error: PropTypes.object.isRequired, + error: PropTypes.object, items: PropTypes.arrayOf(PropTypes.object).isRequired, onSeeChangesPress: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired diff --git a/frontend/src/App/AppUpdatedModalContentConnector.js b/frontend/src/App/AppUpdatedModalContentConnector.js index 7acd56f41..b252868ce 100644 --- a/frontend/src/App/AppUpdatedModalContentConnector.js +++ b/frontend/src/App/AppUpdatedModalContentConnector.js @@ -43,10 +43,16 @@ class AppUpdatedModalContentConnector extends Component { // // Lifecycle - componentDidUpdate() { + componentDidMount() { this.props.dispatchFetchUpdates(); } + componentDidUpdate(prevProps) { + if (prevProps.version !== this.props.version) { + this.props.dispatchFetchUpdates(); + } + } + // // Render @@ -63,6 +69,7 @@ class AppUpdatedModalContentConnector extends Component { } AppUpdatedModalContentConnector.propTypes = { + version: PropTypes.string.isRequired, dispatchFetchUpdates: PropTypes.func.isRequired }; diff --git a/frontend/src/Components/SignalRConnector.js b/frontend/src/Components/SignalRConnector.js index 8ff1c4ce8..7d84bdab2 100644 --- a/frontend/src/Components/SignalRConnector.js +++ b/frontend/src/Components/SignalRConnector.js @@ -1,4 +1,5 @@ import $ from 'jquery'; +import 'signalr'; import PropTypes from 'prop-types'; import { Component } from 'react'; import { connect } from 'react-redux'; @@ -8,7 +9,6 @@ import { setAppValue, setVersion } from 'Store/Actions/appActions'; import { update, updateItem, removeItem } from 'Store/Actions/baseActions'; import { fetchHealth } from 'Store/Actions/systemActions'; import { fetchQueue, fetchQueueDetails } from 'Store/Actions/queueActions'; -require('signalR'); function getState(status) { switch (status) { @@ -59,7 +59,7 @@ class SignalRConnector extends Component { constructor(props, context) { super(props, context); - this.signalRconnectionOptions = { transport: ['longPolling'] }; + this.signalRconnectionOptions = { transport: ['webSockets', 'longPolling'] }; this.signalRconnection = null; this.retryInterval = 5; this.retryTimeoutId = null; @@ -230,7 +230,7 @@ class SignalRConnector extends Component { } handleVersion = (body) => { - const version = body.version; + const version = body.Version; this.props.setVersion({ version }); } diff --git a/frontend/src/JsLibraries/jquery.js b/frontend/src/JsLibraries/jquery.js deleted file mode 100644 index aa4d89cb6..000000000 --- a/frontend/src/JsLibraries/jquery.js +++ /dev/null @@ -1,9842 +0,0 @@ -/*! - * jQuery JavaScript Library v2.2.2 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-03-17T17:51Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Support: Firefox 18+ -// Can't be in strict mode, several libs including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -//"use strict"; -var arr = []; - -var document = window.document; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - version = "2.2.2", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = jQuery.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - // adding 1 corrects loss of precision from parseFloat (#15100) - var realStringObj = obj && obj.toString(); - return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0; - }, - - isPlainObject: function( obj ) { - var key; - - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call( obj, "constructor" ) && - !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) { - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android<4.0, iOS<6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf( "use strict" ) === 1 ) { - script = document.createElement( "script" ); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE9-11+ - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android<4.1 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only isSaving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -// JSHint would error on this code due to the Symbol not being defined in ES5. -// Defining this global in .jshintrc would create a danger of using the global -// unguarded in another place, it seems safer to just disable JSHint for these -// three lines. -/* jshint ignore: start */ -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} -/* jshint ignore: end */ - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: iOS 8.2 (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.2.1 - * http://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2015-10-17 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // http://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, nidselect, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']"; - while ( i-- ) { - groups[i] = nidselect + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * isDeleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, parent, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9-11, Edge - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( (parent = document.defaultView) && parent.top !== parent ) { - // Support: IE 11 - if ( parent.addEventListener ) { - parent.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", unloadHandler ); - } - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( document.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var m = context.getElementById( id ); - return m ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - docElem.appendChild( div ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibing-combinator selector` fails - if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - !compilerCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - // Use previously-cached element index if available - if ( useCache ) { - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); - - if ( (oldCache = uniqueCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context === document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - if ( !context && elem.ownerDocument !== document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ ); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - } ); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - // Support: Blackberry 4.6 - // gEBID returns nodes no longer in the document (#6963) - if ( elem && elem.parentNode ) { - - // Inject the element directly into the jQuery object - this.length = 1; - this[ 0 ] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( pos ? - pos.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnotwhite = ( /\S+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ], - [ "notify", "progress", jQuery.Callbacks( "memory" ) ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this === promise ? newDefer.promise() : this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( function() { - - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || - ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. - // If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // Add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .progress( updateFunc( i, progressContexts, progressValues ) ) - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ); - } else { - --remaining; - } - } - } - - // If we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -} ); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -} ); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called - // after the browser event has already occurred. - // Support: IE9-10 only - // Older IE sometimes signals "interactive" too soon - if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[ 0 ], key ) : emptyGet; -}; -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - register: function( owner, initial ) { - var value = initial || {}; - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable, non-writable property - // configurability must be true to allow the property to be - // deleted with the delete operator - } else { - Object.defineProperty( owner, this.expando, { - value: value, - writable: true, - configurable: true - } ); - } - return owner[ this.expando ]; - }, - cache: function( owner ) { - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( !acceptData( owner ) ) { - return {}; - } - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - owner[ this.expando ] && owner[ this.expando ][ key ]; - }, - access: function( owner, key, value ) { - var stored; - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase( key ) ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key === undefined ) { - this.register( owner ); - - } else { - - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <= 35-45+ - // Webkit & Blink performance suffers when isDeleting properties - // from DOM nodes, so set to undefined instead - // https://code.google.com/p/chromium/issues/detail?id=378607 - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data, camelKey; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // with the key as-is - data = dataUser.get( elem, key ) || - - // Try to find dashed key if it exists (gh-2779) - // This is for 2.2.x only - dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() ); - - if ( data !== undefined ) { - return data; - } - - camelKey = jQuery.camelCase( key ); - - // Attempt to get data from the cache - // with the key camelized - data = dataUser.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - camelKey = jQuery.camelCase( key ); - this.each( function() { - - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = dataUser.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - dataUser.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf( "-" ) > -1 && data !== undefined ) { - dataUser.set( this, key, value ); - } - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || - !jQuery.contains( elem.ownerDocument, elem ); - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, - scale = 1, - maxIterations = 20, - currentValue = tween ? - function() { return tween.cur(); } : - function() { return jQuery.css( elem, prop, "" ); }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - do { - - // If previous iteration zeroed out, double until we get *something*. - // Use string for doubling so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - initialInUnit = initialInUnit / scale; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Update scale, tolerating zero or NaN from tween.cur() - // Break the loop if scale is unchanged or perfect, or if we've just had enough. - } while ( - scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations - ); - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([\w:-]+)/ ); - -var rscriptType = ( /^$|\/(?:java|ecma)script/i ); - - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // Support: IE9 - option: [ 1, "" ], - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -// Support: IE9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - - -function getAll( context, tag ) { - - // Support: IE9-11+ - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== "undefined" ? - context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0-4.3, Safari<=5.1 - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari<=5.1, Android<4.2 - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<=11+ - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE9 -// See #13393 for more info -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = {}; - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Support (at least): Chrome, IE9 - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // - // Support: Firefox<=42+ - // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343) - if ( delegateCount && cur.nodeType && - ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push( { elem: cur, handlers: matches } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " + - "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split( " " ), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " + - "screenX screenY toElement" ).split( " " ), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + - ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + - ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome<28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android<4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://code.google.com/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, - - // Support: IE 10-11, Edge 10240+ - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName( "tbody" )[ 0 ] || - elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android<4.1, PhantomJS<2 - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <= 35-45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <= 35-45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - - // Keep domManip exposed until 3.0 (gh-2225) - domManip: domManip, - - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); - - -var iframe, - elemdisplay = { - - // Support: Firefox - // We have to pre-define these values for FF (#10227) - HTML: "block", - BODY: "block" - }; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ - -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - display = jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = ( iframe || jQuery( ""); - - $("body").append(tempFrame); - tempFrame.remove(); - tempFrame = null; - }, loadingFixInterval); - } - - attachedTo++; - } - }, - cancel: function() { - // Only clear the interval if there's only one more object that the loadPreventer is attachedTo - if (attachedTo === 1) { - window.clearInterval(loadingFixIntervalId); - } - - if (attachedTo > 0) { - attachedTo--; - } - } - }; - })(); - - signalR.transports.foreverFrame = { - name: "foreverFrame", - - supportsKeepAlive: true, - - timeOut: 3000, - - start: function(connection, onSuccess, onFailed) { - var that = this, - frameId = (transportLogic.foreverFrame.count += 1), - url, - frame = $(""); - - if (window.EventSource) { - // If the browser supports SSE, don't use Forever Frame - if (onFailed) { - connection.log("This browser supports SSE, skipping Forever Frame."); - onFailed(); - } - return; - } - - // Start preventing loading icon - // This will only perform work if the loadPreventer is not attached to another connection. - loadPreventer.prevent(); - - // Build the url - url = transportLogic.getUrl(connection, this.name); - url += "&frameId=" + frameId; - - // Set body prior to setting URL to avoid caching issues. - $("body").append(frame); - - frame.prop("src", url); - transportLogic.foreverFrame.connections[frameId] = connection; - - connection.log("Binding to iframe's readystatechange event."); - frame.bind("readystatechange", function() { - if ($.inArray(this.readyState, ["loaded", "complete"]) >= 0) { - connection.log("Forever frame iframe readyState changed to " + this.readyState + ", reconnecting"); - - that.reconnect(connection); - } - }); - - connection.frame = frame[0]; - connection.frameId = frameId; - - if (onSuccess) { - connection.onSuccess = onSuccess; - } - - // After connecting, if after the specified timeout there's no response stop the connection - // and raise on failed - window.setTimeout(function() { - if (connection.onSuccess) { - connection.log("Failed to connect using forever frame source, it timed out after " + that.timeOut + "ms."); - that.stop(connection); - - if (onFailed) { - onFailed(); - } - } - }, that.timeOut); - }, - - reconnect: function(connection) { - var that = this; - window.setTimeout(function() { - if (connection.frame && transportLogic.ensureReconnectingState(connection)) { - var frame = connection.frame, - src = transportLogic.getUrl(connection, that.name, true) + "&frameId=" + connection.frameId; - connection.log("Updating iframe src to '" + src + "'."); - frame.src = src; - } - }, connection.reconnectDelay); - }, - - lostConnection: function(connection) { - this.reconnect(connection); - }, - - send: function(connection, data) { - transportLogic.ajaxSend(connection, data); - }, - - receive: function(connection, data) { - var cw; - - transportLogic.processMessages(connection, data); - // Delete the script & div elements - connection.frameMessageCount = (connection.frameMessageCount || 0) + 1; - if (connection.frameMessageCount > 50) { - connection.frameMessageCount = 0; - cw = connection.frame.contentWindow || connection.frame.contentDocument; - if (cw && cw.document) { - $("body", cw.document).empty(); - } - } - }, - - stop: function(connection) { - var cw = null; - - // Stop attempting to prevent loading icon - loadPreventer.cancel(); - - if (connection.frame) { - if (connection.frame.stop) { - connection.frame.stop(); - } else { - try { - cw = connection.frame.contentWindow || connection.frame.contentDocument; - if (cw.document && cw.document.execCommand) { - cw.document.execCommand("Stop"); - } - } catch (e) { - connection.log("SignalR: Error occured when stopping foreverFrame transport. Message = " + e.message); - } - } - $(connection.frame).remove(); - delete transportLogic.foreverFrame.connections[connection.frameId] - ; - connection.frame = null; - connection.frameId = null; - delete connection.frame; - delete connection.frameId; - connection.log("Stopping forever frame"); - } - }, - - abort: function(connection, async) { - transportLogic.ajaxAbort(connection, async); - }, - - getConnection: function(id) { - return transportLogic.foreverFrame.connections[id]; - }, - - started: function(connection) { - if (connection.onSuccess) { - connection.onSuccess(); - connection.onSuccess = null; - delete connection.onSuccess; - } else if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - // If there's no onSuccess handler we assume this is a reconnect - $(connection).triggerHandler(events.onReconnect); - } - } - }; -}(window.jQuery, window)); -/* jquery.signalR.transports.longPolling.js */ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -/*global window:false */ -/// - -( function($, window) { - "use strict"; - - var signalR = $.signalR, - events = $.signalR.events, - changeState = $.signalR.changeState, - isDisconnecting = $.signalR.isDisconnecting, - transportLogic = signalR.transports._logic; - - signalR.transports.longPolling = { - name: "longPolling", - - supportsKeepAlive: false, - - reconnectDelay: 3000, - - init: function(connection, onComplete) { - /// Pings the server to ensure availability - /// Connection associated with the server ping - /// Callback to call once initialization has completed - - var that = this, - pingLoop, - // pingFail is used to loop the re-ping behavior. When we fail we want to re-try. - pingFail = function(reason) { - if (isDisconnecting(connection) === false) { - connection.log("SignalR: Server ping failed because '" + reason + "', re-trying ping."); - window.setTimeout(pingLoop, that.reconnectDelay); - } - }; - - connection.log("SignalR: Initializing long polling connection with server."); - pingLoop = function() { - // Ping the server, on successful ping call the onComplete method, otherwise if we fail call the pingFail - transportLogic.pingServer(connection, that.name).done(onComplete).fail(pingFail); - }; - - pingLoop(); - }, - - start: function(connection, onSuccess, onFailed) { - /// Starts the long polling connection - /// The SignalR connection to start - var that = this, - initialConnectedFired = false, - fireConnect = function() { - if (initialConnectedFired) { - return; - } - initialConnectedFired = true; - onSuccess(); - connection.log("Longpolling connected"); - }, - reconnectErrors = 0, - reconnectTimeoutId = null, - fireReconnected = function(instance) { - window.clearTimeout(reconnectTimeoutId); - reconnectTimeoutId = null; - - if (changeState(connection, - signalR.connectionState.reconnecting, - signalR.connectionState.connected) === true) { - // Successfully reconnected! - connection.log("Raising the reconnect event"); - $(instance).triggerHandler(events.onReconnect); - } - }, - // 1 hour - maxFireReconnectedTimeout = 3600000; - - if (connection.pollXhr) { - connection.log("Polling xhr requests already exists, aborting."); - connection.stop(); - } - - // We start with an initialization procedure which pings the server to verify that it is there. - // On scucessful initialization we'll then proceed with starting the transport. - that.init(connection, function() { - connection.messageId = null; - - window.setTimeout(function() { - ( function poll(instance, raiseReconnect) { - var messageId = instance.messageId, - connect = (messageId === null), - reconnecting = !connect, - polling = !raiseReconnect, - url = transportLogic.getUrl(instance, that.name, reconnecting, polling); - - // If we've disconnected during the time we've tried to re-instantiate the poll then stop. - if (isDisconnecting(instance) === true) { - return; - } - - connection.log("Attempting to connect to '" + url + "' using longPolling."); - instance.pollXhr = $.ajax({ - url: url, - global: true, - cache: false, - type: "GET", - dataType: connection.ajaxDataType, - contentType: connection.contentType, - success: function(minData) { - var delay = 0, - data; - - // Reset our reconnect errors so if we transition into a reconnecting state again we trigger - // reconnected quickly - reconnectErrors = 0; - - // If there's currently a timeout to trigger reconnect, fire it now before processing messages - if (reconnectTimeoutId !== null) { - fireReconnected(); - } - - fireConnect(); - - if (minData) { - data = transportLogic.maximizePersistentResponse(minData); - } - - transportLogic.processMessages(instance, minData); - - if (data && - $.type(data.LongPollDelay) === "number") { - delay = data.LongPollDelay; - } - - if (data && data.Disconnect) { - return; - } - - if (isDisconnecting(instance) === true) { - return; - } - - // We never want to pass a raiseReconnect flag after a successful poll. This is handled via the error function - if (delay > 0) { - window.setTimeout(function() { - poll(instance, false); - }, delay); - } else { - poll(instance, false); - } - }, - - error: function(data, textStatus) { - // Stop trying to trigger reconnect, connection is in an error state - // If we're not in the reconnect state this will noop - window.clearTimeout(reconnectTimeoutId); - reconnectTimeoutId = null; - - if (textStatus === "abort") { - connection.log("Aborted xhr requst."); - return; - } - - // Increment our reconnect errors, we assume all errors to be reconnect errors - // In the case that it's our first error this will cause Reconnect to be fired - // after 1 second due to reconnectErrors being = 1. - reconnectErrors++; - - if (connection.state !== signalR.connectionState.reconnecting) { - connection.log("An error occurred using longPolling. Status = " + textStatus + ". " + data.responseText); - $(instance).triggerHandler(events.onError, [data.responseText]); - } - - // Transition into the reconnecting state - transportLogic.ensureReconnectingState(instance); - - // If we've errored out we need to verify that the server is still there, so re-start initialization process - // This will ping the server until it successfully gets a response. - that.init(instance, function() { - // Call poll with the raiseReconnect flag as true - poll(instance, true); - }); - } - }); - - - // This will only ever pass after an error has occured via the poll ajax procedure. - if (reconnecting && raiseReconnect === true) { - // We wait to reconnect depending on how many times we've failed to reconnect. - // This is essentially a heuristic that will exponentially increase in wait time before - // triggering reconnected. This depends on the "error" handler of Poll to cancel this - // timeout if it triggers before the Reconnected event fires. - // The Math.min at the end is to ensure that the reconnect timeout does not overflow. - reconnectTimeoutId = window.setTimeout(function() { - fireReconnected(instance); - }, Math.min(1000 * (Math.pow(2, reconnectErrors) - 1), maxFireReconnectedTimeout)); - } - }(connection)); - - // Set an arbitrary timeout to trigger onSuccess, this will alot for enough time on the server to wire up the connection. - // Will be fixed by #1189 and this code can be modified to not be a timeout - window.setTimeout(function() { - // Trigger the onSuccess() method because we've now instantiated a connection - fireConnect(); - }, 250); - }, 250); // Have to delay initial poll so Chrome doesn't show loader spinner in tab - }); - }, - - lostConnection: function(connection) { - throw new Error("Lost Connection not handled for LongPolling"); - }, - - send: function(connection, data) { - transportLogic.ajaxSend(connection, data); - }, - - stop: function(connection) { - /// Stops the long polling connection - /// The SignalR connection to stop - if (connection.pollXhr) { - connection.pollXhr.abort(); - connection.pollXhr = null; - delete connection.pollXhr; - } - }, - - abort: function(connection, async) { - transportLogic.ajaxAbort(connection, async); - } - }; -}(window.jQuery, window)); -/* jquery.signalR.hubs.js */ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -/*global window:false */ -/// - -( function($, window) { - "use strict"; - - // we use a global id for tracking callbacks so the server doesn't have to send extra info like hub name - var eventNamespace = ".hubProxy"; - - function makeEventName(event) { - return event + eventNamespace; - } - - // Equivalent to Array.prototype.map - function map(arr, fun, thisp) { - var i, - length = arr.length, - result = []; - for (i = 0; i < length; i += 1) { - if (arr.hasOwnProperty(i)) { - result[i] = fun.call(thisp, arr[i], i, arr); - } - } - return result; - } - - function getArgValue(a) { - return $.isFunction(a) ? null : ($.type(a) === "undefined" ? null : a); - } - - function hasMembers(obj) { - for (var key in obj) { - // If we have any properties in our callback map then we have callbacks and can exit the loop via return - if (obj.hasOwnProperty(key)) { - return true; - } - } - - return false; - } - - function clearInvocationCallbacks(connection, error) { - /// - var callbacks = connection._.invocationCallbacks, - callback; - - connection.log("Clearing hub invocation callbacks with error: " + error); - - // Reset the callback cache now as we have a local var referencing it - connection._.invocationCallbackId = 0; - delete connection._.invocationCallbacks; - connection._.invocationCallbacks = {}; - - // Loop over the callbacks and invoke them. - // We do this using a local var reference and *after* we've cleared the cache - // so that if a fail callback itself tries to invoke another method we don't - // end up with its callback in the list we're looping over. - for (var callbackId in callbacks) { - callback = callbacks[callbackId]; - callback.method.call(callback.scope, { E: error }); - } - } - - // hubProxy - function hubProxy(hubConnection, hubName) { - /// - /// Creates a new proxy object for the given hub connection that can be used to invoke - /// methods on server hubs and handle client method invocation requests from the server. - /// - return new hubProxy.fn.init(hubConnection, hubName); - } - - hubProxy.fn = hubProxy.prototype = { - init: function(connection, hubName) { - this.state = {}; - this.connection = connection; - this.hubName = hubName; - this._ = { - callbackMap: {} - }; - }, - - hasSubscriptions: function() { - return hasMembers(this._.callbackMap); - }, - - on: function(eventName, callback) { - /// Wires up a callback to be invoked when a invocation request is received from the server hub. - /// The name of the hub event to register the callback for. - /// The callback to be invoked. - var self = this, - callbackMap = self._.callbackMap; - - // Normalize the event name to lowercase - eventName = eventName.toLowerCase(); - - // If there is not an event registered for this callback yet we want to create its event space in the callback map. - if (!callbackMap[eventName]) { - callbackMap[eventName] = {}; - } - - // Map the callback to our encompassed function - callbackMap[eventName][callback] = function(e, data) { - callback.apply(self, data); - }; - - $(self).bind(makeEventName(eventName), callbackMap[eventName][callback]); - - return self; - }, - - off: function(eventName, callback) { - /// Removes the callback invocation request from the server hub for the given event name. - /// The name of the hub event to unregister the callback for. - /// The callback to be invoked. - var self = this, - callbackMap = self._.callbackMap, - callbackSpace; - - // Normalize the event name to lowercase - eventName = eventName.toLowerCase(); - - callbackSpace = callbackMap[eventName]; - - // Verify that there is an event space to unbind - if (callbackSpace) { - // Only unbind if there's an event bound with eventName and a callback with the specified callback - if (callbackSpace[callback]) { - $(self).unbind(makeEventName(eventName), callbackSpace[callback]); - - // Remove the callback from the callback map - delete callbackSpace[callback] - ; - - // Check if there are any members left on the event, if not we need to destroy it. - if (!hasMembers(callbackSpace)) { - delete callbackMap[eventName] - ; - } - } else if (!callback) { // Check if we're removing the whole event and we didn't error because of an invalid callback - $(self).unbind(makeEventName(eventName)); - - delete callbackMap[eventName] - ; - } - } - - return self; - }, - - invoke: function(methodName) { - /// Invokes a server hub method with the given arguments. - /// The name of the server hub method. - - var self = this, - connection = self.connection, - args = $.makeArray(arguments).slice(1), - argValues = map(args, getArgValue), - data = { H: self.hubName, M: methodName, A: argValues, I: connection._.invocationCallbackId }, - d = $.Deferred(), - callback = function(minResult) { - var result = self._maximizeHubResponse(minResult); - - // Update the hub state - $.extend(self.state, result.State); - - if (result.Error) { - // Server hub method threw an exception, log it & reject the deferred - if (result.StackTrace) { - connection.log(result.Error + "\n" + result.StackTrace); - } - d.rejectWith(self, [result.Error]); - } else { - // Server invocation succeeded, resolve the deferred - d.resolveWith(self, [result.Result]); - } - }; - - connection._.invocationCallbacks[connection._.invocationCallbackId.toString()] = { scope: self, method: callback }; - connection._.invocationCallbackId += 1; - - if (!$.isEmptyObject(self.state)) { - data.S = self.state; - } - - connection.send(window.JSON.stringify(data)); - - return d.promise(); - }, - - _maximizeHubResponse: function(minHubResponse) { - return { - State: minHubResponse.S, - Result: minHubResponse.R, - Id: minHubResponse.I, - Error: minHubResponse.E, - StackTrace: minHubResponse.T - }; - } - }; - - hubProxy.fn.init.prototype = hubProxy.fn; - - // hubConnection - function hubConnection(url, options) { - /// Creates a new hub connection. - /// [Optional] The hub route url, defaults to "/signalr". - /// [Optional] Settings to use when creating the hubConnection. - var settings = { - qs: null, - logging: false, - useDefaultPath: true - }; - - $.extend(settings, options); - - if (!url || settings.useDefaultPath) { - url = (url || "") + "/signalr"; - } - return new hubConnection.fn.init(url, settings); - } - - hubConnection.fn = hubConnection.prototype = $.connection(); - - hubConnection.fn.init = function(url, options) { - var settings = { - qs: null, - logging: false, - useDefaultPath: true - }, - connection = this; - - $.extend(settings, options); - - // Call the base constructor - $.signalR.fn.init.call(connection, url, settings.qs, settings.logging); - - // Object to store hub proxies for this connection - connection.proxies = {}; - - connection._.invocationCallbackId = 0; - connection._.invocationCallbacks = {}; - - // Wire up the received handler - connection.received(function(minData) { - var data, proxy, dataCallbackId, callback, hubName, eventName; - if (!minData) { - return; - } - - if (typeof (minData.I) !== "undefined") { - // We received the return value from a server method invocation, look up callback by id and call it - dataCallbackId = minData.I.toString(); - callback = connection._.invocationCallbacks[dataCallbackId]; - if (callback) { - // Delete the callback from the proxy - connection._.invocationCallbacks[dataCallbackId] = null; - delete connection._.invocationCallbacks[dataCallbackId] - ; - - // Invoke the callback - callback.method.call(callback.scope, minData); - } - } else { - data = this._maximizeClientHubInvocation(minData); - - // We received a client invocation request, i.e. broadcast from server hub - connection.log("Triggering client hub event '" + data.Method + "' on hub '" + data.Hub + "'."); - - // Normalize the names to lowercase - hubName = data.Hub.toLowerCase(); - eventName = data.Method.toLowerCase(); - - // Trigger the local invocation event - proxy = this.proxies[hubName]; - - // Update the hub state - $.extend(proxy.state, data.State); - $(proxy).triggerHandler(makeEventName(eventName), [data.Args]); - } - }); - - connection.error(function(errData, origData) { - var data, callbackId, callback; - - if (connection.transport && connection.transport.name === "webSockets") { - // WebSockets connections have all callbacks removed on reconnect instead - // as WebSockets sends are fire & forget - return; - } - - if (!origData) { - // No original data passed so this is not a send error - return; - } - - try { - data = window.JSON.parse(origData); - if (!data.I) { - // The original data doesn't have a callback ID so not a send error - return; - } - } catch (e) { - // The original data is not a JSON payload so this is not a send error - return; - } - - callbackId = data.I; - callback = connection._.invocationCallbacks[callbackId]; - - // Invoke the callback with an error to reject the promise - callback.method.call(callback.scope, { E: errData }); - - // Delete the callback - connection._.invocationCallbacks[callbackId] = null; - delete connection._.invocationCallbacks[callbackId] - ; - }); - - connection.reconnecting(function() { - if (connection.transport && connection.transport.name === "webSockets") { - clearInvocationCallbacks(connection, "Connection started reconnecting before invocation result was received."); - } - }); - - connection.disconnected(function() { - clearInvocationCallbacks(connection, "Connection was disconnected before invocation result was received."); - }); - }; - - hubConnection.fn._maximizeClientHubInvocation = function(minClientHubInvocation) { - return { - Hub: minClientHubInvocation.H, - Method: minClientHubInvocation.M, - Args: minClientHubInvocation.A, - State: minClientHubInvocation.S - }; - }; - - hubConnection.fn._registerSubscribedHubs = function() { - /// - /// Sets the starting event to loop through the known hubs and register any new hubs - /// that have been added to the proxy. - /// - - if (!this._subscribedToHubs) { - this._subscribedToHubs = true; - this.starting(function() { - // Set the connection's data object with all the hub proxies with active subscriptions. - // These proxies will receive notifications from the server. - var subscribedHubs = []; - - $.each(this.proxies, function(key) { - if (this.hasSubscriptions()) { - subscribedHubs.push({ name: key }); - } - }); - - this.data = window.JSON.stringify(subscribedHubs); - }); - } - }; - - hubConnection.fn.createHubProxy = function(hubName) { - /// - /// Creates a new proxy object for the given hub connection that can be used to invoke - /// methods on server hubs and handle client method invocation requests from the server. - /// - /// - /// The name of the hub on the server to create the proxy for. - /// - - // Normalize the name to lowercase - hubName = hubName.toLowerCase(); - - var proxy = this.proxies[hubName]; - if (!proxy) { - proxy = hubProxy(this, hubName); - this.proxies[hubName] = proxy; - } - - this._registerSubscribedHubs(); - - return proxy; - }; - - hubConnection.fn.init.prototype = hubConnection.fn; - - $.hubConnection = hubConnection; -}(window.jQuery, window)); -/* jquery.signalR.version.js */ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -/*global window:false */ -/// -( function($) { - $.signalR.version = "1.1.3"; -}(window.jQuery)); diff --git a/frontend/src/Shims/jquery.js b/frontend/src/Shims/jquery.js index 1d32f35f3..224ef27e3 100644 --- a/frontend/src/Shims/jquery.js +++ b/frontend/src/Shims/jquery.js @@ -1,8 +1,8 @@ -var jquery = require('JsLibraries/jquery'); -var ajax = require('jQuery/jquery.ajax'); +import $ from 'jquery'; +import ajax from 'jQuery/jquery.ajax'; -ajax(jquery); +ajax($); -window.$ = jquery; -window.jQuery = jquery; -module.exports = jquery; +window.$ = $; +window.jQuery = $; +export default $; diff --git a/frontend/src/Shims/signalR.js b/frontend/src/Shims/signalR.js deleted file mode 100644 index 22fb16b91..000000000 --- a/frontend/src/Shims/signalR.js +++ /dev/null @@ -1,4 +0,0 @@ -require('jquery'); -const signalR = require('JsLibraries/jquery.signalR'); - -module.exports = signalR; diff --git a/frontend/src/jQuery/jquery.ajax.js b/frontend/src/jQuery/jquery.ajax.js index 8acc1897d..9b217801e 100644 --- a/frontend/src/jQuery/jquery.ajax.js +++ b/frontend/src/jQuery/jquery.ajax.js @@ -1,4 +1,4 @@ -const $ = require('JsLibraries/jquery'); +import $ from 'jquery'; const absUrlRegex = /^(https?:)?\/\//i; const apiRoot = window.Sonarr.apiRoot; @@ -34,9 +34,9 @@ function addApiKey(xhr) { xhr.headers['X-Api-Key'] = window.Sonarr.apiKey; } -module.exports = function(jQuery) { - const originalAjax = jQuery.ajax; - jQuery.ajax = function(xhr) { +export default function() { + const originalAjax = $.ajax; + $.ajax = function(xhr) { if (xhr && isRelative(xhr)) { moveBodyToQuery(xhr); addRootUrl(xhr); @@ -44,4 +44,4 @@ module.exports = function(jQuery) { } return originalAjax.apply(this, arguments); }; -}; +} diff --git a/frontend/src/preload.js b/frontend/src/preload.js index f8ec3c40e..0deb3bbe6 100644 --- a/frontend/src/preload.js +++ b/frontend/src/preload.js @@ -1 +1,3 @@ +import 'Shims/jquery'; + __webpack_public_path__ = `${window.Sonarr.urlBase}/`; diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json deleted file mode 100644 index b2797228b..000000000 --- a/npm-shrinkwrap.json +++ /dev/null @@ -1,5242 +0,0 @@ -{ - "name": "lidarr", - "version": "1.0.0", - "dependencies": { - "acorn": { - "version": "3.1.0", - "from": "acorn@>=3.1.0 <4.0.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.1.0.tgz" - }, - "acorn-jsx": { - "version": "3.0.1", - "from": "acorn-jsx@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz" - }, - "acorn-to-esprima": { - "version": "2.0.8", - "from": "acorn-to-esprima@>=2.0.6 <3.0.0", - "resolved": "https://registry.npmjs.org/acorn-to-esprima/-/acorn-to-esprima-2.0.8.tgz" - }, - "add-px-to-style": { - "version": "1.0.0", - "from": "add-px-to-style@1.0.0", - "resolved": "https://registry.npmjs.org/add-px-to-style/-/add-px-to-style-1.0.0.tgz" - }, - "ajv": { - "version": "4.11.8", - "from": "ajv@>=4.7.0 <5.0.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz" - }, - "ajv-keywords": { - "version": "1.5.1", - "from": "ajv-keywords@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz" - }, - "align-text": { - "version": "0.1.4", - "from": "align-text@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz" - }, - "alphanum-sort": { - "version": "1.0.2", - "from": "alphanum-sort@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz" - }, - "amdefine": { - "version": "1.0.0", - "from": "amdefine@>=0.0.4", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.0.tgz" - }, - "ansi-escapes": { - "version": "1.4.0", - "from": "ansi-escapes@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz" - }, - "ansi-regex": { - "version": "2.0.0", - "from": "ansi-regex@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.0.0.tgz" - }, - "ansi-styles": { - "version": "2.2.1", - "from": "ansi-styles@>=2.2.1 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" - }, - "anymatch": { - "version": "1.3.0", - "from": "anymatch@>=1.3.0 <2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz" - }, - "archy": { - "version": "1.0.0", - "from": "archy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" - }, - "argparse": { - "version": "1.0.7", - "from": "argparse@>=1.0.7 <2.0.0", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.7.tgz" - }, - "arr-diff": { - "version": "2.0.0", - "from": "arr-diff@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz" - }, - "arr-flatten": { - "version": "1.0.1", - "from": "arr-flatten@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz" - }, - "array-differ": { - "version": "1.0.0", - "from": "array-differ@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz" - }, - "array-find-index": { - "version": "1.0.1", - "from": "array-find-index@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz" - }, - "array-union": { - "version": "1.0.1", - "from": "array-union@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.1.tgz" - }, - "array-uniq": { - "version": "1.0.2", - "from": "array-uniq@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz" - }, - "array-unique": { - "version": "0.2.1", - "from": "array-unique@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz" - }, - "arrify": { - "version": "1.0.1", - "from": "arrify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" - }, - "asap": { - "version": "2.0.4", - "from": "asap@>=2.0.3 <2.1.0", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.4.tgz" - }, - "assert": { - "version": "1.4.0", - "from": "assert@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.0.tgz" - }, - "assertion-error": { - "version": "1.0.1", - "from": "assertion-error@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.1.tgz" - }, - "async-each": { - "version": "1.0.0", - "from": "async-each@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.0.tgz" - }, - "autoprefixer": { - "version": "6.3.6", - "from": "autoprefixer@6.3.6", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.3.6.tgz" - }, - "babel-code-frame": { - "version": "6.8.0", - "from": "babel-code-frame@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.8.0.tgz" - }, - "babel-core": { - "version": "6.9.0", - "from": "babel-core@6.9.0", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.9.0.tgz" - }, - "babel-eslint": { - "version": "7.1.0", - "from": "babel-eslint@7.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.1.0.tgz", - "dependencies": { - "babel-code-frame": { - "version": "6.16.0", - "from": "babel-code-frame@>=6.16.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.16.0.tgz" - }, - "babel-traverse": { - "version": "6.18.0", - "from": "babel-traverse@>=6.15.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.18.0.tgz" - }, - "babel-types": { - "version": "6.18.0", - "from": "babel-types@>=6.15.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.18.0.tgz", - "dependencies": { - "babel-runtime": { - "version": "6.18.0", - "from": "babel-runtime@>=6.9.1 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.18.0.tgz" - } - } - }, - "babylon": { - "version": "6.13.1", - "from": "babylon@>=6.11.2 <7.0.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.13.1.tgz" - }, - "globals": { - "version": "9.12.0", - "from": "globals@>=9.0.0 <10.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.12.0.tgz" - }, - "js-tokens": { - "version": "2.0.0", - "from": "js-tokens@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-2.0.0.tgz" - } - } - }, - "babel-generator": { - "version": "6.9.0", - "from": "babel-generator@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.9.0.tgz" - }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.8.0", - "from": "babel-helper-builder-binary-assignment-operator-visitor@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.8.0.tgz" - }, - "babel-helper-builder-react-jsx": { - "version": "6.22.0", - "from": "babel-helper-builder-react-jsx@>=6.22.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.22.0.tgz", - "dependencies": { - "babel-runtime": { - "version": "6.22.0", - "from": "babel-runtime@^6.22.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.22.0.tgz" - }, - "babel-types": { - "version": "6.22.0", - "from": "babel-types@>=6.22.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.22.0.tgz" - }, - "regenerator-runtime": { - "version": "0.10.1", - "from": "regenerator-runtime@^0.10.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz" - } - } - }, - "babel-helper-call-delegate": { - "version": "6.8.0", - "from": "babel-helper-call-delegate@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.8.0.tgz" - }, - "babel-helper-define-map": { - "version": "6.9.0", - "from": "babel-helper-define-map@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.9.0.tgz" - }, - "babel-helper-explode-assignable-expression": { - "version": "6.8.0", - "from": "babel-helper-explode-assignable-expression@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.8.0.tgz" - }, - "babel-helper-function-name": { - "version": "6.8.0", - "from": "babel-helper-function-name@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.8.0.tgz" - }, - "babel-helper-get-function-arity": { - "version": "6.8.0", - "from": "babel-helper-get-function-arity@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.8.0.tgz" - }, - "babel-helper-hoist-variables": { - "version": "6.8.0", - "from": "babel-helper-hoist-variables@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.8.0.tgz" - }, - "babel-helper-optimise-call-expression": { - "version": "6.8.0", - "from": "babel-helper-optimise-call-expression@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.8.0.tgz" - }, - "babel-helper-regex": { - "version": "6.9.0", - "from": "babel-helper-regex@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.9.0.tgz" - }, - "babel-helper-remap-async-to-generator": { - "version": "6.11.2", - "from": "babel-helper-remap-async-to-generator@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.11.2.tgz" - }, - "babel-helper-replace-supers": { - "version": "6.8.0", - "from": "babel-helper-replace-supers@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.8.0.tgz" - }, - "babel-helpers": { - "version": "6.8.0", - "from": "babel-helpers@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.8.0.tgz" - }, - "babel-loader": { - "version": "6.2.4", - "from": "babel-loader@6.2.4", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-6.2.4.tgz" - }, - "babel-messages": { - "version": "6.8.0", - "from": "babel-messages@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.8.0.tgz" - }, - "babel-plugin-check-es2015-constants": { - "version": "6.8.0", - "from": "babel-plugin-check-es2015-constants@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.8.0.tgz" - }, - "babel-plugin-syntax-async-functions": { - "version": "6.8.0", - "from": "babel-plugin-syntax-async-functions@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.8.0.tgz" - }, - "babel-plugin-syntax-class-properties": { - "version": "6.13.0", - "from": "babel-plugin-syntax-class-properties@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz" - }, - "babel-plugin-syntax-decorators": { - "version": "6.8.0", - "from": "babel-plugin-syntax-decorators@>=6.1.18 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.8.0.tgz" - }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.8.0", - "from": "babel-plugin-syntax-exponentiation-operator@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.8.0.tgz" - }, - "babel-plugin-syntax-flow": { - "version": "6.18.0", - "from": "babel-plugin-syntax-flow@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz" - }, - "babel-plugin-syntax-jsx": { - "version": "6.18.0", - "from": "babel-plugin-syntax-jsx@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz" - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.8.0", - "from": "babel-plugin-syntax-object-rest-spread@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.8.0.tgz" - }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.8.0", - "from": "babel-plugin-syntax-trailing-function-commas@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.8.0.tgz" - }, - "babel-plugin-transform-async-to-generator": { - "version": "6.8.0", - "from": "babel-plugin-transform-async-to-generator@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.8.0.tgz" - }, - "babel-plugin-transform-class-properties": { - "version": "6.16.0", - "from": "babel-plugin-transform-class-properties@6.16.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.16.0.tgz", - "dependencies": { - "babel-runtime": { - "version": "6.11.6", - "from": "babel-runtime@>=6.9.1 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.11.6.tgz" - } - } - }, - "babel-plugin-transform-decorators-legacy": { - "version": "1.3.4", - "from": "babel-plugin-transform-decorators-legacy@>=1.3.4 <2.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators-legacy/-/babel-plugin-transform-decorators-legacy-1.3.4.tgz" - }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-arrow-functions@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-block-scoped-functions@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.9.0", - "from": "babel-plugin-transform-es2015-block-scoping@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.9.0.tgz" - }, - "babel-plugin-transform-es2015-classes": { - "version": "6.9.0", - "from": "babel-plugin-transform-es2015-classes@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.9.0.tgz" - }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-computed-properties@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.9.0", - "from": "babel-plugin-transform-es2015-destructuring@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.9.0.tgz" - }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-duplicate-keys@>=6.6.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-for-of@>=6.6.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.9.0", - "from": "babel-plugin-transform-es2015-function-name@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.9.0.tgz" - }, - "babel-plugin-transform-es2015-literals": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-literals@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-modules-commonjs@>=6.6.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-object-super@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.9.0", - "from": "babel-plugin-transform-es2015-parameters@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.9.0.tgz" - }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-shorthand-properties@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-spread": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-spread@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-sticky-regex@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-template-literals@>=6.6.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-typeof-symbol@>=6.6.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.8.0.tgz" - }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.8.0", - "from": "babel-plugin-transform-es2015-unicode-regex@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.8.0.tgz" - }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.8.0", - "from": "babel-plugin-transform-exponentiation-operator@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.8.0.tgz" - }, - "babel-plugin-transform-flow-strip-types": { - "version": "6.22.0", - "from": "babel-plugin-transform-flow-strip-types@>=6.22.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", - "dependencies": { - "babel-runtime": { - "version": "6.22.0", - "from": "babel-runtime@>=6.22.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.22.0.tgz" - }, - "regenerator-runtime": { - "version": "0.10.1", - "from": "regenerator-runtime@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz" - } - } - }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.8.0", - "from": "babel-plugin-transform-object-rest-spread@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.8.0.tgz" - }, - "babel-plugin-transform-react-display-name": { - "version": "6.22.0", - "from": "babel-plugin-transform-react-display-name@>=6.22.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.22.0.tgz", - "dependencies": { - "babel-runtime": { - "version": "6.22.0", - "from": "babel-runtime@^6.22.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.22.0.tgz" - }, - "regenerator-runtime": { - "version": "0.10.1", - "from": "regenerator-runtime@^0.10.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz" - } - } - }, - "babel-plugin-transform-react-jsx": { - "version": "6.22.0", - "from": "babel-plugin-transform-react-jsx@>=6.22.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.22.0.tgz", - "dependencies": { - "babel-runtime": { - "version": "6.22.0", - "from": "babel-runtime@^6.22.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.22.0.tgz" - }, - "regenerator-runtime": { - "version": "0.10.1", - "from": "regenerator-runtime@^0.10.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz" - } - } - }, - "babel-plugin-transform-react-jsx-self": { - "version": "6.22.0", - "from": "babel-plugin-transform-react-jsx-self@>=6.22.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", - "dependencies": { - "babel-runtime": { - "version": "6.22.0", - "from": "babel-runtime@^6.22.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.22.0.tgz" - }, - "regenerator-runtime": { - "version": "0.10.1", - "from": "regenerator-runtime@^0.10.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz" - } - } - }, - "babel-plugin-transform-react-jsx-source": { - "version": "6.22.0", - "from": "babel-plugin-transform-react-jsx-source@>=6.22.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", - "dependencies": { - "babel-runtime": { - "version": "6.22.0", - "from": "babel-runtime@^6.22.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.22.0.tgz" - }, - "regenerator-runtime": { - "version": "0.10.1", - "from": "regenerator-runtime@^0.10.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz" - } - } - }, - "babel-plugin-transform-regenerator": { - "version": "6.9.0", - "from": "babel-plugin-transform-regenerator@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.9.0.tgz" - }, - "babel-plugin-transform-strict-mode": { - "version": "6.8.0", - "from": "babel-plugin-transform-strict-mode@>=6.8.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.8.0.tgz" - }, - "babel-preset-decorators-legacy": { - "version": "1.0.0", - "from": "babel-preset-decorators-legacy@1.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-decorators-legacy/-/babel-preset-decorators-legacy-1.0.0.tgz" - }, - "babel-preset-es2015": { - "version": "6.9.0", - "from": "babel-preset-es2015@6.9.0", - "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.9.0.tgz" - }, - "babel-preset-react": { - "version": "6.22.0", - "from": "babel-preset-react@6.22.0", - "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.22.0.tgz" - }, - "babel-preset-stage-2": { - "version": "6.5.0", - "from": "babel-preset-stage-2@6.5.0", - "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.5.0.tgz" - }, - "babel-preset-stage-3": { - "version": "6.11.0", - "from": "babel-preset-stage-3@>=6.3.13 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.11.0.tgz" - }, - "babel-register": { - "version": "6.9.0", - "from": "babel-register@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.9.0.tgz" - }, - "babel-runtime": { - "version": "6.9.0", - "from": "babel-runtime@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.9.0.tgz" - }, - "babel-template": { - "version": "6.9.0", - "from": "babel-template@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.9.0.tgz" - }, - "babel-traverse": { - "version": "6.9.0", - "from": "babel-traverse@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.9.0.tgz" - }, - "babel-types": { - "version": "6.9.0", - "from": "babel-types@>=6.9.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.9.0.tgz" - }, - "babylon": { - "version": "6.8.0", - "from": "babylon@>=6.7.0 <7.0.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.8.0.tgz" - }, - "balanced-match": { - "version": "0.4.1", - "from": "balanced-match@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz" - }, - "Base64": { - "version": "0.2.1", - "from": "Base64@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz" - }, - "base64-js": { - "version": "0.0.8", - "from": "base64-js@0.0.8", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz" - }, - "beeper": { - "version": "1.1.0", - "from": "beeper@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.0.tgz" - }, - "big.js": { - "version": "3.1.3", - "from": "big.js@>=3.1.3 <4.0.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.1.3.tgz" - }, - "binary-extensions": { - "version": "1.4.0", - "from": "binary-extensions@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.4.0.tgz" - }, - "bl": { - "version": "0.7.0", - "from": "bl@>=0.7.0 <0.8.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-0.7.0.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.2 <1.1.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - } - } - }, - "block-stream": { - "version": "0.0.9", - "from": "block-stream@*", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz" - }, - "bluebird": { - "version": "3.4.0", - "from": "bluebird@>=3.1.1 <4.0.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.0.tgz" - }, - "body-parser": { - "version": "1.14.2", - "from": "body-parser@>=1.14.0 <1.15.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz", - "dependencies": { - "qs": { - "version": "5.2.0", - "from": "qs@5.2.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz" - } - } - }, - "brace-expansion": { - "version": "1.1.4", - "from": "brace-expansion@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.4.tgz" - }, - "braces": { - "version": "1.8.5", - "from": "braces@>=1.8.2 <2.0.0", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz" - }, - "browserify-zlib": { - "version": "0.1.4", - "from": "browserify-zlib@>=0.1.4 <0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz" - }, - "browserslist": { - "version": "1.3.4", - "from": "browserslist@>=1.3.1 <1.4.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.3.4.tgz" - }, - "buffer": { - "version": "3.6.0", - "from": "buffer@>=3.0.3 <4.0.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz" - }, - "buffer-shims": { - "version": "1.0.0", - "from": "buffer-shims@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz" - }, - "bufferstreams": { - "version": "1.0.1", - "from": "bufferstreams@1.0.1", - "resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-1.0.1.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.1.14", - "from": "readable-stream@>=1.0.33 <2.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - } - } - }, - "builtin-modules": { - "version": "1.1.1", - "from": "builtin-modules@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz" - }, - "bytes": { - "version": "2.2.0", - "from": "bytes@2.2.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz" - }, - "caller-path": { - "version": "0.1.0", - "from": "caller-path@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz" - }, - "callsites": { - "version": "0.2.0", - "from": "callsites@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz" - }, - "camelcase": { - "version": "2.1.1", - "from": "camelcase@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz" - }, - "camelcase-keys": { - "version": "2.1.0", - "from": "camelcase-keys@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz" - }, - "caniuse-db": { - "version": "1.0.30000492", - "from": "caniuse-db@>=1.0.30000444 <2.0.0", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000492.tgz" - }, - "caniuse-lite": { - "version": "1.0.30000708", - "from": "caniuse-lite@>=1.0.30000697 <2.0.0", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000708.tgz" - }, - "center-align": { - "version": "0.1.3", - "from": "center-align@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz" - }, - "chai": { - "version": "3.5.0", - "from": "chai@>=3.2.0 <4.0.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz" - }, - "chalk": { - "version": "1.1.3", - "from": "chalk@>=1.1.3 <2.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "dependencies": { - "supports-color": { - "version": "2.0.0", - "from": "supports-color@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - } - } - }, - "chokidar": { - "version": "1.5.1", - "from": "chokidar@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.5.1.tgz" - }, - "circular-json": { - "version": "0.3.1", - "from": "circular-json@>=0.3.1 <0.4.0", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz" - }, - "clap": { - "version": "1.1.1", - "from": "clap@>=1.0.9 <2.0.0", - "resolved": "https://registry.npmjs.org/clap/-/clap-1.1.1.tgz" - }, - "classnames": { - "version": "2.2.5", - "from": "classnames@2.2.5", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.5.tgz" - }, - "clean-css": { - "version": "4.1.2", - "from": "clean-css@4.1.2", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.2.tgz" - }, - "cli-cursor": { - "version": "1.0.2", - "from": "cli-cursor@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz" - }, - "cli-width": { - "version": "2.1.0", - "from": "cli-width@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz" - }, - "clipboard": { - "version": "1.7.1", - "from": "clipboard@latest", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-1.7.1.tgz" - }, - "cliui": { - "version": "2.1.0", - "from": "cliui@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" - } - } - }, - "clone": { - "version": "1.0.2", - "from": "clone@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz" - }, - "clone-regexp": { - "version": "1.0.0", - "from": "clone-regexp@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.0.tgz" - }, - "clone-stats": { - "version": "0.0.1", - "from": "clone-stats@>=0.0.1 <0.0.2", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz" - }, - "co": { - "version": "4.6.0", - "from": "co@>=4.6.0 <5.0.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz" - }, - "coa": { - "version": "1.0.1", - "from": "coa@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.1.tgz" - }, - "code-point-at": { - "version": "1.0.0", - "from": "code-point-at@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.0.0.tgz" - }, - "color": { - "version": "0.11.3", - "from": "color@>=0.11.0 <0.12.0", - "resolved": "https://registry.npmjs.org/color/-/color-0.11.3.tgz" - }, - "color-convert": { - "version": "1.3.1", - "from": "color-convert@>=1.3.0 <2.0.0", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.3.1.tgz" - }, - "color-diff": { - "version": "0.1.7", - "from": "color-diff@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/color-diff/-/color-diff-0.1.7.tgz" - }, - "color-name": { - "version": "1.1.1", - "from": "color-name@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz" - }, - "color-string": { - "version": "0.3.0", - "from": "color-string@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz" - }, - "colorguard": { - "version": "1.2.0", - "from": "colorguard@>=1.2.0 <2.0.0", - "resolved": "https://registry.npmjs.org/colorguard/-/colorguard-1.2.0.tgz", - "dependencies": { - "yargs": { - "version": "1.3.3", - "from": "yargs@>=1.2.6 <2.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.3.3.tgz" - } - } - }, - "colormin": { - "version": "1.1.0", - "from": "colormin@>=1.0.5 <2.0.0", - "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.0.tgz" - }, - "colors": { - "version": "1.1.2", - "from": "colors@>=1.1.2 <1.2.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz" - }, - "commander": { - "version": "2.9.0", - "from": "commander@>=2.2.0 <3.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz" - }, - "concat-map": { - "version": "0.0.1", - "from": "concat-map@0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - }, - "concat-stream": { - "version": "1.5.1", - "from": "concat-stream@>=1.4.7 <2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz", - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "from": "readable-stream@>=2.0.0 <2.1.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz" - } - } - }, - "concat-with-sourcemaps": { - "version": "1.0.4", - "from": "concat-with-sourcemaps@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz" - }, - "console-browserify": { - "version": "1.1.0", - "from": "console-browserify@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz" - }, - "consolidate": { - "version": "0.14.1", - "from": "consolidate@>=0.14.1 <0.15.0", - "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.14.1.tgz" - }, - "constants-browserify": { - "version": "0.0.1", - "from": "constants-browserify@0.0.1", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz" - }, - "content-type": { - "version": "1.0.2", - "from": "content-type@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz" - }, - "convert-source-map": { - "version": "1.5.0", - "from": "convert-source-map@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz" - }, - "core-js": { - "version": "2.4.0", - "from": "core-js@>=2.4.0 <3.0.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.0.tgz" - }, - "core-util-is": { - "version": "1.0.2", - "from": "core-util-is@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" - }, - "cosmiconfig": { - "version": "1.1.0", - "from": "cosmiconfig@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-1.1.0.tgz" - }, - "create-react-class": { - "version": "15.6.0", - "from": "create-react-class@>=15.6.0 <16.0.0", - "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.0.tgz", - "dependencies": { - "core-js": { - "version": "1.2.7", - "from": "core-js@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz" - }, - "fbjs": { - "version": "0.8.12", - "from": "fbjs@^0.8.9", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.12.tgz" - }, - "js-tokens": { - "version": "3.0.1", - "from": "js-tokens@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz" - }, - "loose-envify": { - "version": "1.3.1", - "from": "loose-envify@>=1.3.1 <2.0.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz" - } - } - }, - "crypto-browserify": { - "version": "3.2.8", - "from": "crypto-browserify@>=3.2.6 <3.3.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.2.8.tgz" - }, - "css-color-names": { - "version": "0.0.3", - "from": "css-color-names@0.0.3", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.3.tgz" - }, - "css-loader": { - "version": "0.23.1", - "from": "css-loader@0.23.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.23.1.tgz" - }, - "css-rule-stream": { - "version": "1.1.0", - "from": "css-rule-stream@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/css-rule-stream/-/css-rule-stream-1.1.0.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.3 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - } - } - }, - "css-selector-tokenizer": { - "version": "0.5.4", - "from": "css-selector-tokenizer@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.5.4.tgz" - }, - "css-tokenize": { - "version": "1.0.1", - "from": "css-tokenize@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/css-tokenize/-/css-tokenize-1.0.1.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.1.14", - "from": "readable-stream@>=1.0.33 <2.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - } - } - }, - "cssesc": { - "version": "0.1.0", - "from": "cssesc@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz" - }, - "cssnano": { - "version": "3.7.1", - "from": "cssnano@>=2.6.1 <4.0.0", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.7.1.tgz" - }, - "csso": { - "version": "2.0.0", - "from": "csso@>=2.0.0 <2.1.0", - "resolved": "https://registry.npmjs.org/csso/-/csso-2.0.0.tgz" - }, - "d": { - "version": "0.1.1", - "from": "d@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz" - }, - "date-now": { - "version": "0.1.4", - "from": "date-now@>=0.1.4 <0.2.0", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz" - }, - "dateformat": { - "version": "1.0.12", - "from": "dateformat@>=1.0.11 <2.0.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz" - }, - "debug": { - "version": "2.2.0", - "from": "debug@>=2.1.1 <3.0.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz" - }, - "decamelize": { - "version": "1.2.0", - "from": "decamelize@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" - }, - "deep-eql": { - "version": "0.1.3", - "from": "deep-eql@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", - "dependencies": { - "type-detect": { - "version": "0.1.1", - "from": "type-detect@0.1.1", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz" - } - } - }, - "deep-is": { - "version": "0.1.3", - "from": "deep-is@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" - }, - "defaults": { - "version": "1.0.3", - "from": "defaults@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz" - }, - "defined": { - "version": "1.0.0", - "from": "defined@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz" - }, - "del": { - "version": "2.2.0", - "from": "del@2.2.0", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.0.tgz" - }, - "delegate": { - "version": "3.1.3", - "from": "delegate@>=3.1.2 <4.0.0", - "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.1.3.tgz" - }, - "depd": { - "version": "1.1.0", - "from": "depd@>=1.1.0 <1.2.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz" - }, - "deprecated": { - "version": "0.0.1", - "from": "deprecated@>=0.0.1 <0.0.2", - "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz" - }, - "detect-indent": { - "version": "3.0.1", - "from": "detect-indent@>=3.0.1 <4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-3.0.1.tgz" - }, - "diff": { - "version": "1.4.0", - "from": "diff@>=1.3.2 <2.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz" - }, - "disparity": { - "version": "2.0.0", - "from": "disparity@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/disparity/-/disparity-2.0.0.tgz" - }, - "disposables": { - "version": "1.0.1", - "from": "disposables@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/disposables/-/disposables-1.0.1.tgz" - }, - "dnd-core": { - "version": "2.4.0", - "from": "dnd-core@>=2.4.0 <3.0.0", - "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-2.4.0.tgz" - }, - "doctrine": { - "version": "1.2.2", - "from": "doctrine@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.2.2.tgz", - "dependencies": { - "esutils": { - "version": "1.1.6", - "from": "esutils@>=1.1.6 <2.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz" - } - } - }, - "doiuse": { - "version": "2.4.1", - "from": "doiuse@>=2.4.1 <3.0.0", - "resolved": "https://registry.npmjs.org/doiuse/-/doiuse-2.4.1.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "source-map": { - "version": "0.4.4", - "from": "source-map@>=0.4.2 <0.5.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz" - }, - "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.3 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - } - } - }, - "dom-css": { - "version": "2.1.0", - "from": "dom-css@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/dom-css/-/dom-css-2.1.0.tgz" - }, - "dom-helpers": { - "version": "3.2.1", - "from": "dom-helpers@>=2.4.0 <3.0.0||>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.2.1.tgz" - }, - "domain-browser": { - "version": "1.1.7", - "from": "domain-browser@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz" - }, - "duplexer": { - "version": "0.1.1", - "from": "duplexer@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz" - }, - "duplexer2": { - "version": "0.0.2", - "from": "duplexer2@0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.1.14", - "from": "readable-stream@>=1.1.9 <1.2.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - } - } - }, - "ee-first": { - "version": "1.1.1", - "from": "ee-first@1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" - }, - "electron-to-chromium": { - "version": "1.3.16", - "from": "electron-to-chromium@>=1.3.16 <2.0.0", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.16.tgz" - }, - "element-class": { - "version": "0.2.2", - "from": "element-class@latest", - "resolved": "https://registry.npmjs.org/element-class/-/element-class-0.2.2.tgz" - }, - "emojis-list": { - "version": "2.0.1", - "from": "emojis-list@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.0.1.tgz" - }, - "encoding": { - "version": "0.1.12", - "from": "encoding@>=0.1.11 <0.2.0", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz" - }, - "end-of-stream": { - "version": "0.1.5", - "from": "end-of-stream@>=0.1.5 <0.2.0", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz" - }, - "enhanced-resolve": { - "version": "0.9.1", - "from": "enhanced-resolve@>=0.9.0 <0.10.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", - "dependencies": { - "memory-fs": { - "version": "0.2.0", - "from": "memory-fs@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz" - } - } - }, - "errno": { - "version": "0.1.4", - "from": "errno@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz" - }, - "error-ex": { - "version": "1.3.0", - "from": "error-ex@>=1.2.0 <2.0.0", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.0.tgz" - }, - "es5-ext": { - "version": "0.10.11", - "from": "es5-ext@>=0.10.8 <0.11.0", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.11.tgz" - }, - "es6-iterator": { - "version": "2.0.0", - "from": "es6-iterator@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.0.tgz" - }, - "es6-map": { - "version": "0.1.4", - "from": "es6-map@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.4.tgz", - "dependencies": { - "es6-symbol": { - "version": "3.1.0", - "from": "es6-symbol@>=3.1.0 <3.2.0", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.0.tgz" - } - } - }, - "es6-promise": { - "version": "3.2.1", - "from": "es6-promise@>=3.1.2 <4.0.0", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz" - }, - "es6-set": { - "version": "0.1.4", - "from": "es6-set@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.4.tgz" - }, - "es6-symbol": { - "version": "3.0.2", - "from": "es6-symbol@>=3.0.1 <3.1.0", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.0.2.tgz" - }, - "es6-weak-map": { - "version": "2.0.1", - "from": "es6-weak-map@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.1.tgz" - }, - "escape-string-regexp": { - "version": "1.0.5", - "from": "escape-string-regexp@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - }, - "escope": { - "version": "3.6.0", - "from": "escope@>=3.6.0 <4.0.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz" - }, - "esformatter": { - "version": "0.9.3", - "from": "esformatter@0.9.3", - "resolved": "https://registry.npmjs.org/esformatter/-/esformatter-0.9.3.tgz", - "dependencies": { - "debug": { - "version": "0.7.4", - "from": "debug@>=0.7.4 <0.8.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz" - }, - "glob": { - "version": "5.0.15", - "from": "glob@>=5.0.3 <6.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" - }, - "supports-color": { - "version": "1.3.1", - "from": "supports-color@>=1.3.1 <2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.3.1.tgz" - }, - "user-home": { - "version": "2.0.0", - "from": "user-home@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz" - } - } - }, - "eslint": { - "version": "2.10.2", - "from": "eslint@2.10.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-2.10.2.tgz", - "dependencies": { - "glob": { - "version": "7.1.1", - "from": "glob@>=7.0.3 <8.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz" - }, - "globals": { - "version": "9.14.0", - "from": "globals@>=9.2.0 <10.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.14.0.tgz" - }, - "minimatch": { - "version": "3.0.3", - "from": "minimatch@>=3.0.2 <4.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" - }, - "strip-json-comments": { - "version": "1.0.4", - "from": "strip-json-comments@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz" - }, - "user-home": { - "version": "2.0.0", - "from": "user-home@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz" - } - } - }, - "eslint-loader": { - "version": "1.3.0", - "from": "eslint-loader@1.3.0", - "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-1.3.0.tgz" - }, - "eslint-plugin-filenames": { - "version": "1.0.0", - "from": "eslint-plugin-filenames@1.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-filenames/-/eslint-plugin-filenames-1.0.0.tgz" - }, - "eslint-plugin-react": { - "version": "5.2.2", - "from": "eslint-plugin-react@5.2.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-5.2.2.tgz" - }, - "espree": { - "version": "3.1.4", - "from": "espree@3.1.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.4.tgz" - }, - "esprima": { - "version": "2.7.2", - "from": "esprima@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.2.tgz" - }, - "esrecurse": { - "version": "4.1.0", - "from": "esrecurse@>=4.1.0 <5.0.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz", - "dependencies": { - "estraverse": { - "version": "4.1.1", - "from": "estraverse@>=4.1.0 <4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz" - } - } - }, - "estraverse": { - "version": "4.2.0", - "from": "estraverse@>=4.2.0 <5.0.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz" - }, - "esutils": { - "version": "2.0.2", - "from": "esutils@>=2.0.2 <3.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" - }, - "event-emitter": { - "version": "0.3.4", - "from": "event-emitter@>=0.3.4 <0.4.0", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.4.tgz" - }, - "event-stream": { - "version": "3.3.2", - "from": "event-stream@>=3.1.7 <4.0.0", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.2.tgz" - }, - "events": { - "version": "1.1.0", - "from": "events@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.0.tgz" - }, - "execall": { - "version": "1.0.0", - "from": "execall@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/execall/-/execall-1.0.0.tgz" - }, - "exenv": { - "version": "1.2.2", - "from": "exenv@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz" - }, - "exit-hook": { - "version": "1.1.1", - "from": "exit-hook@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz" - }, - "expand-brackets": { - "version": "0.1.5", - "from": "expand-brackets@>=0.1.4 <0.2.0", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz" - }, - "expand-range": { - "version": "1.8.2", - "from": "expand-range@>=1.8.1 <2.0.0", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz" - }, - "extend": { - "version": "2.0.1", - "from": "extend@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/extend/-/extend-2.0.1.tgz" - }, - "extglob": { - "version": "0.3.2", - "from": "extglob@>=0.3.1 <0.4.0", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz" - }, - "extract-text-webpack-plugin": { - "version": "1.0.1", - "from": "extract-text-webpack-plugin@1.0.1", - "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-1.0.1.tgz", - "dependencies": { - "async": { - "version": "1.5.2", - "from": "async@>=1.5.0 <2.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" - } - } - }, - "fancy-log": { - "version": "1.2.0", - "from": "fancy-log@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.2.0.tgz" - }, - "fast-levenshtein": { - "version": "2.0.5", - "from": "fast-levenshtein@>=2.0.4 <2.1.0", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz" - }, - "fastparse": { - "version": "1.1.1", - "from": "fastparse@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz" - }, - "faye-websocket": { - "version": "0.7.3", - "from": "faye-websocket@>=0.7.2 <0.8.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.3.tgz" - }, - "fbjs": { - "version": "0.8.12", - "from": "fbjs@>=0.8.4 <0.9.0", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.12.tgz", - "dependencies": { - "core-js": { - "version": "1.2.7", - "from": "core-js@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz" - } - } - }, - "figures": { - "version": "1.7.0", - "from": "figures@>=1.3.5 <2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz" - }, - "file-entry-cache": { - "version": "1.3.1", - "from": "file-entry-cache@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz" - }, - "file-loader": { - "version": "0.9.0", - "from": "file-loader@0.9.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-0.9.0.tgz" - }, - "filename-regex": { - "version": "2.0.0", - "from": "filename-regex@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz" - }, - "filesize": { - "version": "3.5.4", - "from": "filesize@latest", - "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.5.4.tgz" - }, - "fill-range": { - "version": "2.2.3", - "from": "fill-range@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz" - }, - "find-index": { - "version": "0.1.1", - "from": "find-index@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz" - }, - "find-up": { - "version": "1.1.2", - "from": "find-up@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "dependencies": { - "path-exists": { - "version": "2.1.0", - "from": "path-exists@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz" - } - } - }, - "findup-sync": { - "version": "0.3.0", - "from": "findup-sync@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "dependencies": { - "glob": { - "version": "5.0.15", - "from": "glob@>=5.0.0 <5.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" - } - } - }, - "first-chunk-stream": { - "version": "1.0.0", - "from": "first-chunk-stream@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz" - }, - "flagged-respawn": { - "version": "0.3.2", - "from": "flagged-respawn@>=0.3.2 <0.4.0", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz" - }, - "flat-cache": { - "version": "1.2.1", - "from": "flat-cache@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.1.tgz" - }, - "flatten": { - "version": "1.0.2", - "from": "flatten@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz" - }, - "for-in": { - "version": "0.1.5", - "from": "for-in@>=0.1.5 <0.2.0", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.5.tgz" - }, - "for-own": { - "version": "0.1.4", - "from": "for-own@>=0.1.4 <0.2.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.4.tgz" - }, - "from": { - "version": "0.1.3", - "from": "from@>=0.0.0 <1.0.0", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.3.tgz" - }, - "fs-readfile-promise": { - "version": "2.0.1", - "from": "fs-readfile-promise@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/fs-readfile-promise/-/fs-readfile-promise-2.0.1.tgz" - }, - "fs.realpath": { - "version": "1.0.0", - "from": "fs.realpath@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - }, - "fstream": { - "version": "1.0.9", - "from": "fstream@>=1.0.7 <2.0.0", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.9.tgz" - }, - "gather-stream": { - "version": "1.0.0", - "from": "gather-stream@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/gather-stream/-/gather-stream-1.0.0.tgz" - }, - "gaze": { - "version": "0.5.2", - "from": "gaze@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz" - }, - "generate-function": { - "version": "2.0.0", - "from": "generate-function@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz" - }, - "generate-object-property": { - "version": "1.2.0", - "from": "generate-object-property@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz" - }, - "get-node-dimensions": { - "version": "1.2.0", - "from": "get-node-dimensions@>=1.2.0 <2.0.0", - "resolved": "https://registry.npmjs.org/get-node-dimensions/-/get-node-dimensions-1.2.0.tgz" - }, - "get-stdin": { - "version": "4.0.1", - "from": "get-stdin@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" - }, - "glob": { - "version": "6.0.4", - "from": "glob@>=6.0.1 <7.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz" - }, - "glob-base": { - "version": "0.3.0", - "from": "glob-base@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz" - }, - "glob-parent": { - "version": "2.0.0", - "from": "glob-parent@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz" - }, - "glob-stream": { - "version": "3.1.18", - "from": "glob-stream@>=3.1.5 <4.0.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", - "dependencies": { - "glob": { - "version": "4.5.3", - "from": "glob@>=4.3.1 <5.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz" - }, - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.1 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - } - } - }, - "glob-watcher": { - "version": "0.0.6", - "from": "glob-watcher@>=0.0.6 <0.0.7", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz" - }, - "glob2base": { - "version": "0.0.12", - "from": "glob2base@>=0.0.12 <0.0.13", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz" - }, - "globals": { - "version": "8.18.0", - "from": "globals@>=8.3.0 <9.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz" - }, - "globby": { - "version": "4.1.0", - "from": "globby@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-4.1.0.tgz" - }, - "globjoin": { - "version": "0.1.4", - "from": "globjoin@>=0.1.4 <0.2.0", - "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz" - }, - "globule": { - "version": "0.1.0", - "from": "globule@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", - "dependencies": { - "glob": { - "version": "3.1.21", - "from": "glob@>=3.1.21 <3.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz" - }, - "graceful-fs": { - "version": "1.2.3", - "from": "graceful-fs@>=1.2.0 <1.3.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz" - }, - "inherits": { - "version": "1.0.2", - "from": "inherits@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz" - }, - "lodash": { - "version": "1.0.2", - "from": "lodash@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz" - }, - "minimatch": { - "version": "0.2.14", - "from": "minimatch@>=0.2.11 <0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz" - } - } - }, - "glogg": { - "version": "1.0.0", - "from": "glogg@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz" - }, - "good-listener": { - "version": "1.2.2", - "from": "good-listener@>=1.2.2 <2.0.0", - "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz" - }, - "graceful-fs": { - "version": "4.1.4", - "from": "graceful-fs@>=4.1.2 <5.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz" - }, - "graceful-readlink": { - "version": "1.0.1", - "from": "graceful-readlink@>=1.0.0", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" - }, - "growl": { - "version": "1.8.1", - "from": "growl@1.8.1", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.8.1.tgz" - }, - "gulp": { - "version": "3.9.1", - "from": "gulp@3.9.1", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", - "dependencies": { - "semver": { - "version": "4.3.6", - "from": "semver@>=4.1.0 <5.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz" - } - } - }, - "gulp-cached": { - "version": "1.1.0", - "from": "gulp-cached@1.1.0", - "resolved": "https://registry.npmjs.org/gulp-cached/-/gulp-cached-1.1.0.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.17 <1.1.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "through2": { - "version": "0.5.1", - "from": "through2@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz" - }, - "xtend": { - "version": "3.0.0", - "from": "xtend@>=3.0.0 <3.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - } - } - }, - "gulp-clean-css": { - "version": "3.3.1", - "from": "gulp-clean-css@3.3.1", - "resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-3.3.1.tgz", - "dependencies": { - "dateformat": { - "version": "2.0.0", - "from": "dateformat@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz" - }, - "gulp-util": { - "version": "3.0.8", - "from": "gulp-util@3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz" - }, - "object-assign": { - "version": "3.0.0", - "from": "object-assign@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" - } - } - }, - "gulp-concat": { - "version": "2.6.0", - "from": "gulp-concat@2.6.0", - "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.0.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.3 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - } - } - }, - "gulp-declare": { - "version": "0.3.0", - "from": "gulp-declare@0.3.0", - "resolved": "https://registry.npmjs.org/gulp-declare/-/gulp-declare-0.3.0.tgz" - }, - "gulp-livereload": { - "version": "3.8.1", - "from": "gulp-livereload@3.8.1", - "resolved": "https://registry.npmjs.org/gulp-livereload/-/gulp-livereload-3.8.1.tgz", - "dependencies": { - "ansi-regex": { - "version": "0.2.1", - "from": "ansi-regex@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz" - }, - "ansi-styles": { - "version": "1.1.0", - "from": "ansi-styles@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz" - }, - "chalk": { - "version": "0.5.1", - "from": "chalk@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz" - }, - "has-ansi": { - "version": "0.1.0", - "from": "has-ansi@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz" - }, - "lodash.assign": { - "version": "3.2.0", - "from": "lodash.assign@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz" - }, - "lodash.keys": { - "version": "3.1.2", - "from": "lodash.keys@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz" - }, - "strip-ansi": { - "version": "0.3.0", - "from": "strip-ansi@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz" - }, - "supports-color": { - "version": "0.2.0", - "from": "supports-color@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz" - } - } - }, - "gulp-postcss": { - "version": "6.1.1", - "from": "gulp-postcss@6.1.1", - "resolved": "https://registry.npmjs.org/gulp-postcss/-/gulp-postcss-6.1.1.tgz" - }, - "gulp-print": { - "version": "2.0.1", - "from": "gulp-print@2.0.1", - "resolved": "https://registry.npmjs.org/gulp-print/-/gulp-print-2.0.1.tgz", - "dependencies": { - "map-stream": { - "version": "0.0.6", - "from": "map-stream@>=0.0.6 <0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.6.tgz" - } - } - }, - "gulp-sourcemaps": { - "version": "1.6.0", - "from": "gulp-sourcemaps@1.6.0", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", - "dependencies": { - "vinyl": { - "version": "1.1.1", - "from": "vinyl@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.1.1.tgz" - } - } - }, - "gulp-stripbom": { - "version": "1.0.4", - "from": "gulp-stripbom@1.0.4", - "resolved": "https://registry.npmjs.org/gulp-stripbom/-/gulp-stripbom-1.0.4.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.17 <1.1.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "strip-bom": { - "version": "1.0.0", - "from": "strip-bom@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz" - }, - "through2": { - "version": "0.5.1", - "from": "through2@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz" - }, - "xtend": { - "version": "3.0.0", - "from": "xtend@>=3.0.0 <3.1.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz" - } - } - }, - "gulp-util": { - "version": "3.0.7", - "from": "gulp-util@3.0.7", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.7.tgz", - "dependencies": { - "object-assign": { - "version": "3.0.0", - "from": "object-assign@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" - } - } - }, - "gulp-watch": { - "version": "4.3.5", - "from": "gulp-watch@4.3.5", - "resolved": "https://registry.npmjs.org/gulp-watch/-/gulp-watch-4.3.5.tgz", - "dependencies": { - "glob": { - "version": "5.0.15", - "from": "glob@>=5.0.13 <6.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz" - } - } - }, - "gulp-wrap": { - "version": "0.13.0", - "from": "gulp-wrap@0.13.0", - "resolved": "https://registry.npmjs.org/gulp-wrap/-/gulp-wrap-0.13.0.tgz" - }, - "gulplog": { - "version": "1.0.0", - "from": "gulplog@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz" - }, - "has-ansi": { - "version": "2.0.0", - "from": "has-ansi@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" - }, - "has-flag": { - "version": "1.0.0", - "from": "has-flag@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz" - }, - "has-gulplog": { - "version": "0.1.0", - "from": "has-gulplog@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz" - }, - "has-own": { - "version": "1.0.0", - "from": "has-own@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/has-own/-/has-own-1.0.0.tgz" - }, - "history": { - "version": "4.6.3", - "from": "history@latest", - "resolved": "https://registry.npmjs.org/history/-/history-4.6.3.tgz" - }, - "hoist-non-react-statics": { - "version": "1.2.0", - "from": "hoist-non-react-statics@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz" - }, - "home-or-tmp": { - "version": "1.0.0", - "from": "home-or-tmp@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-1.0.0.tgz" - }, - "hosted-git-info": { - "version": "2.1.5", - "from": "hosted-git-info@>=2.1.4 <3.0.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz" - }, - "html-comment-regex": { - "version": "1.1.0", - "from": "html-comment-regex@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.0.tgz" - }, - "html-tags": { - "version": "1.1.1", - "from": "html-tags@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-1.1.1.tgz" - }, - "http-browserify": { - "version": "1.7.0", - "from": "http-browserify@>=1.3.2 <2.0.0", - "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz" - }, - "http-errors": { - "version": "1.3.1", - "from": "http-errors@>=1.3.1 <1.4.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz" - }, - "https-browserify": { - "version": "0.0.0", - "from": "https-browserify@0.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.0.tgz" - }, - "iconv-lite": { - "version": "0.4.13", - "from": "iconv-lite@0.4.13", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz" - }, - "icss-replace-symbols": { - "version": "1.0.2", - "from": "icss-replace-symbols@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.0.2.tgz" - }, - "ieee754": { - "version": "1.1.6", - "from": "ieee754@>=1.1.4 <2.0.0", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.6.tgz" - }, - "ignore": { - "version": "3.2.0", - "from": "ignore@>=3.1.2 <4.0.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.2.0.tgz" - }, - "imurmurhash": { - "version": "0.1.4", - "from": "imurmurhash@>=0.1.4 <0.2.0", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - }, - "indent-string": { - "version": "2.1.0", - "from": "indent-string@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "dependencies": { - "repeating": { - "version": "2.0.1", - "from": "repeating@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz" - } - } - }, - "indexes-of": { - "version": "1.0.1", - "from": "indexes-of@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz" - }, - "indexof": { - "version": "0.0.1", - "from": "indexof@0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" - }, - "inflight": { - "version": "1.0.5", - "from": "inflight@>=1.0.4 <2.0.0", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz" - }, - "inherits": { - "version": "2.0.1", - "from": "inherits@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" - }, - "inquirer": { - "version": "0.12.0", - "from": "inquirer@>=0.12.0 <0.13.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz" - }, - "interpret": { - "version": "1.0.1", - "from": "interpret@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.1.tgz" - }, - "invariant": { - "version": "2.2.1", - "from": "invariant@>=2.2.0 <3.0.0", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.1.tgz" - }, - "irregular-plurals": { - "version": "1.2.0", - "from": "irregular-plurals@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.2.0.tgz" - }, - "is": { - "version": "3.1.0", - "from": "is@>=3.0.1 <4.0.0", - "resolved": "https://registry.npmjs.org/is/-/is-3.1.0.tgz" - }, - "is-absolute-url": { - "version": "2.0.0", - "from": "is-absolute-url@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.0.0.tgz" - }, - "is-arrayish": { - "version": "0.2.1", - "from": "is-arrayish@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" - }, - "is-binary-path": { - "version": "1.0.1", - "from": "is-binary-path@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz" - }, - "is-buffer": { - "version": "1.1.3", - "from": "is-buffer@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.3.tgz" - }, - "is-builtin-module": { - "version": "1.0.0", - "from": "is-builtin-module@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz" - }, - "is-directory": { - "version": "0.3.1", - "from": "is-directory@>=0.3.1 <0.4.0", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz" - }, - "is-dotfile": { - "version": "1.0.2", - "from": "is-dotfile@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz" - }, - "is-equal-shallow": { - "version": "0.1.3", - "from": "is-equal-shallow@>=0.1.3 <0.2.0", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz" - }, - "is-extendable": { - "version": "0.1.1", - "from": "is-extendable@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" - }, - "is-extglob": { - "version": "1.0.0", - "from": "is-extglob@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz" - }, - "is-finite": { - "version": "1.0.1", - "from": "is-finite@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.1.tgz" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "from": "is-fullwidth-code-point@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" - }, - "is-glob": { - "version": "2.0.1", - "from": "is-glob@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz" - }, - "is-my-json-valid": { - "version": "2.15.0", - "from": "is-my-json-valid@>=2.10.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz" - }, - "is-number": { - "version": "2.1.0", - "from": "is-number@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz" - }, - "is-path-cwd": { - "version": "1.0.0", - "from": "is-path-cwd@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz" - }, - "is-path-in-cwd": { - "version": "1.0.0", - "from": "is-path-in-cwd@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz" - }, - "is-path-inside": { - "version": "1.0.0", - "from": "is-path-inside@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz" - }, - "is-plain-obj": { - "version": "1.1.0", - "from": "is-plain-obj@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz" - }, - "is-posix-bracket": { - "version": "0.1.1", - "from": "is-posix-bracket@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz" - }, - "is-primitive": { - "version": "2.0.0", - "from": "is-primitive@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz" - }, - "is-property": { - "version": "1.0.2", - "from": "is-property@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz" - }, - "is-regexp": { - "version": "1.0.0", - "from": "is-regexp@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz" - }, - "is-resolvable": { - "version": "1.0.0", - "from": "is-resolvable@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz" - }, - "is-stream": { - "version": "1.1.0", - "from": "is-stream@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" - }, - "is-supported-regexp-flag": { - "version": "1.0.0", - "from": "is-supported-regexp-flag@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.0.tgz" - }, - "is-svg": { - "version": "2.0.1", - "from": "is-svg@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.0.1.tgz" - }, - "is-utf8": { - "version": "0.2.1", - "from": "is-utf8@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz" - }, - "isarray": { - "version": "1.0.0", - "from": "isarray@1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - }, - "isexe": { - "version": "1.1.2", - "from": "isexe@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz" - }, - "isobject": { - "version": "2.1.0", - "from": "isobject@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz" - }, - "isomorphic-fetch": { - "version": "2.2.1", - "from": "isomorphic-fetch@>=2.1.1 <3.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz" - }, - "isstream": { - "version": "0.1.2", - "from": "isstream@>=0.1.2 <0.2.0", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" - }, - "jade": { - "version": "0.26.3", - "from": "jade@0.26.3", - "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", - "dependencies": { - "commander": { - "version": "0.6.1", - "from": "commander@0.6.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz" - }, - "mkdirp": { - "version": "0.3.0", - "from": "mkdirp@0.3.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz" - } - } - }, - "jdu": { - "version": "1.0.0", - "from": "https://registry.npmjs.org/jdu/-/jdu-1.0.0.tgz", - "resolved": "https://registry.npmjs.org/jdu/-/jdu-1.0.0.tgz" - }, - "js-base64": { - "version": "2.1.9", - "from": "js-base64@>=2.1.9 <3.0.0", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.1.9.tgz" - }, - "js-tokens": { - "version": "1.0.3", - "from": "js-tokens@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.3.tgz" - }, - "js-yaml": { - "version": "3.6.1", - "from": "js-yaml@>=3.6.1 <3.7.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz" - }, - "jsesc": { - "version": "0.5.0", - "from": "jsesc@>=0.5.0 <0.6.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" - }, - "json-stable-stringify": { - "version": "1.0.1", - "from": "json-stable-stringify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" - }, - "json-stringify-safe": { - "version": "5.0.1", - "from": "json-stringify-safe@>=5.0.1 <6.0.0", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - }, - "json5": { - "version": "0.4.0", - "from": "json5@>=0.4.0 <0.5.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz" - }, - "jsonfilter": { - "version": "1.1.2", - "from": "jsonfilter@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/jsonfilter/-/jsonfilter-1.1.2.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "stream-combiner": { - "version": "0.2.2", - "from": "stream-combiner@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz" - }, - "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.3 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - } - } - }, - "jsonify": { - "version": "0.0.0", - "from": "jsonify@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" - }, - "jsonparse": { - "version": "0.0.5", - "from": "jsonparse@0.0.5", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz" - }, - "jsonpointer": { - "version": "4.0.0", - "from": "jsonpointer@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.0.tgz" - }, - "JSONStream": { - "version": "0.8.4", - "from": "JSONStream@>=0.8.4 <0.9.0", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz" - }, - "jsx-ast-utils": { - "version": "1.3.1", - "from": "jsx-ast-utils@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.3.1.tgz" - }, - "kind-of": { - "version": "3.0.3", - "from": "kind-of@>=3.0.2 <4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.0.3.tgz" - }, - "known-css-properties": { - "version": "0.0.4", - "from": "known-css-properties@>=0.0.4 <0.0.5", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.0.4.tgz" - }, - "lazy-cache": { - "version": "1.0.4", - "from": "lazy-cache@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" - }, - "ldjson-stream": { - "version": "1.2.1", - "from": "ldjson-stream@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/ldjson-stream/-/ldjson-stream-1.2.1.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.1 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - } - } - }, - "levn": { - "version": "0.3.0", - "from": "levn@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz" - }, - "liftoff": { - "version": "2.2.1", - "from": "liftoff@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.2.1.tgz" - }, - "livereload-js": { - "version": "2.2.2", - "from": "livereload-js@>=2.2.0 <3.0.0", - "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.2.2.tgz" - }, - "load-json-file": { - "version": "1.1.0", - "from": "load-json-file@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz" - }, - "loader-utils": { - "version": "0.2.15", - "from": "loader-utils@>=0.2.11 <0.3.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.15.tgz", - "dependencies": { - "json5": { - "version": "0.5.0", - "from": "json5@>=0.5.0 <0.6.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.0.tgz" - } - } - }, - "lodash": { - "version": "4.17.4", - "from": "lodash@4.17.4", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" - }, - "lodash-es": { - "version": "4.13.1", - "from": "lodash-es@>=4.2.1 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.13.1.tgz" - }, - "lodash._arraycopy": { - "version": "3.0.0", - "from": "lodash._arraycopy@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz" - }, - "lodash._arrayeach": { - "version": "3.0.0", - "from": "lodash._arrayeach@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz" - }, - "lodash._baseassign": { - "version": "3.2.0", - "from": "lodash._baseassign@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", - "dependencies": { - "lodash.keys": { - "version": "3.1.2", - "from": "lodash.keys@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz" - } - } - }, - "lodash._baseclone": { - "version": "3.3.0", - "from": "lodash._baseclone@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz", - "dependencies": { - "lodash.keys": { - "version": "3.1.2", - "from": "lodash.keys@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz" - } - } - }, - "lodash._basecopy": { - "version": "3.0.1", - "from": "lodash._basecopy@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" - }, - "lodash._basefor": { - "version": "3.0.3", - "from": "lodash._basefor@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz" - }, - "lodash._basevalues": { - "version": "3.0.0", - "from": "lodash._basevalues@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz" - }, - "lodash._bindcallback": { - "version": "3.0.1", - "from": "lodash._bindcallback@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz" - }, - "lodash._createassigner": { - "version": "3.1.1", - "from": "lodash._createassigner@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz" - }, - "lodash._createcompounder": { - "version": "3.0.0", - "from": "lodash._createcompounder@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._createcompounder/-/lodash._createcompounder-3.0.0.tgz" - }, - "lodash._getnative": { - "version": "3.9.1", - "from": "lodash._getnative@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "from": "lodash._isiterateecall@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" - }, - "lodash._isnative": { - "version": "2.4.1", - "from": "lodash._isnative@>=2.4.1 <2.5.0", - "resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz" - }, - "lodash._objecttypes": { - "version": "2.4.1", - "from": "lodash._objecttypes@>=2.4.1 <2.5.0", - "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz" - }, - "lodash._reescape": { - "version": "3.0.0", - "from": "lodash._reescape@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz" - }, - "lodash._reevaluate": { - "version": "3.0.0", - "from": "lodash._reevaluate@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz" - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "from": "lodash._reinterpolate@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz" - }, - "lodash._root": { - "version": "3.0.1", - "from": "lodash._root@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz" - }, - "lodash._shimkeys": { - "version": "2.4.1", - "from": "lodash._shimkeys@>=2.4.1 <2.5.0", - "resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz" - }, - "lodash.camelcase": { - "version": "3.0.1", - "from": "lodash.camelcase@>=3.0.1 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-3.0.1.tgz" - }, - "lodash.clone": { - "version": "3.0.3", - "from": "lodash.clone@>=3.0.0 <3.1.0-0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-3.0.3.tgz" - }, - "lodash.deburr": { - "version": "3.2.0", - "from": "lodash.deburr@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-3.2.0.tgz" - }, - "lodash.defaults": { - "version": "2.4.1", - "from": "lodash.defaults@>=2.4.1 <3.0.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz", - "dependencies": { - "lodash.keys": { - "version": "2.4.1", - "from": "lodash.keys@>=2.4.1 <2.5.0", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz" - } - } - }, - "lodash.escape": { - "version": "3.2.0", - "from": "lodash.escape@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz" - }, - "lodash.isarguments": { - "version": "3.0.8", - "from": "lodash.isarguments@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.0.8.tgz" - }, - "lodash.isarray": { - "version": "3.0.4", - "from": "lodash.isarray@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" - }, - "lodash.isobject": { - "version": "2.4.1", - "from": "lodash.isobject@>=2.4.1 <2.5.0", - "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz" - }, - "lodash.pickby": { - "version": "4.6.0", - "from": "lodash.pickby@>=4.6.0 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz" - }, - "lodash.restparam": { - "version": "3.6.1", - "from": "lodash.restparam@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz" - }, - "lodash.template": { - "version": "3.6.2", - "from": "lodash.template@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "dependencies": { - "lodash._basetostring": { - "version": "3.0.1", - "from": "lodash._basetostring@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz" - }, - "lodash.keys": { - "version": "3.1.2", - "from": "lodash.keys@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz" - } - } - }, - "lodash.templatesettings": { - "version": "3.1.1", - "from": "lodash.templatesettings@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz" - }, - "lodash.words": { - "version": "3.2.0", - "from": "lodash.words@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/lodash.words/-/lodash.words-3.2.0.tgz" - }, - "log-symbols": { - "version": "1.0.2", - "from": "log-symbols@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz" - }, - "longest": { - "version": "1.0.1", - "from": "longest@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz" - }, - "loose-envify": { - "version": "1.2.0", - "from": "loose-envify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.2.0.tgz" - }, - "loud-rejection": { - "version": "1.3.0", - "from": "loud-rejection@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.3.0.tgz" - }, - "lru-cache": { - "version": "2.7.3", - "from": "lru-cache@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz" - }, - "map-obj": { - "version": "1.0.1", - "from": "map-obj@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz" - }, - "map-stream": { - "version": "0.1.0", - "from": "map-stream@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz" - }, - "mathml-tag-names": { - "version": "2.0.1", - "from": "mathml-tag-names@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.0.1.tgz" - }, - "media-typer": { - "version": "0.3.0", - "from": "media-typer@0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" - }, - "memory-fs": { - "version": "0.3.0", - "from": "memory-fs@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz" - }, - "meow": { - "version": "3.7.0", - "from": "meow@>=3.3.0 <4.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz" - }, - "micromatch": { - "version": "2.3.8", - "from": "micromatch@>=2.1.5 <3.0.0", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.8.tgz" - }, - "mime-db": { - "version": "1.23.0", - "from": "mime-db@>=1.23.0 <1.24.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz" - }, - "mime-types": { - "version": "2.1.11", - "from": "mime-types@>=2.1.11 <2.2.0", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz" - }, - "mini-lr": { - "version": "0.1.9", - "from": "mini-lr@>=0.1.8 <0.2.0", - "resolved": "https://registry.npmjs.org/mini-lr/-/mini-lr-0.1.9.tgz" - }, - "minimatch": { - "version": "2.0.10", - "from": "minimatch@>=2.0.3 <3.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" - }, - "minimist": { - "version": "1.2.0", - "from": "minimist@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz" - }, - "mkdirp": { - "version": "0.5.1", - "from": "mkdirp@>=0.5.1 <0.6.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "dependencies": { - "minimist": { - "version": "0.0.8", - "from": "minimist@0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" - } - } - }, - "mobile-detect": { - "version": "1.3.6", - "from": "mobile-detect@latest", - "resolved": "https://registry.npmjs.org/mobile-detect/-/mobile-detect-1.3.6.tgz" - }, - "mocha": { - "version": "2.4.5", - "from": "mocha@>=2.2.5 <3.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.4.5.tgz", - "dependencies": { - "commander": { - "version": "2.3.0", - "from": "commander@2.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz" - }, - "escape-string-regexp": { - "version": "1.0.2", - "from": "escape-string-regexp@1.0.2", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz" - }, - "glob": { - "version": "3.2.3", - "from": "glob@3.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz" - }, - "graceful-fs": { - "version": "2.0.3", - "from": "graceful-fs@>=2.0.0 <2.1.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz" - }, - "minimatch": { - "version": "0.2.14", - "from": "minimatch@>=0.2.11 <0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz" - }, - "supports-color": { - "version": "1.2.0", - "from": "supports-color@1.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz" - } - } - }, - "moment": { - "version": "2.17.1", - "from": "moment@latest", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.17.1.tgz" - }, - "mousetrap": { - "version": "1.6.0", - "from": "mousetrap@latest", - "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.0.tgz" - }, - "mout": { - "version": "1.0.0", - "from": "mout@>=0.9.0 <2.0.0", - "resolved": "https://registry.npmjs.org/mout/-/mout-1.0.0.tgz" - }, - "ms": { - "version": "0.7.1", - "from": "ms@0.7.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz" - }, - "multimatch": { - "version": "2.1.0", - "from": "multimatch@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "dependencies": { - "minimatch": { - "version": "3.0.3", - "from": "minimatch@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" - } - } - }, - "multipipe": { - "version": "0.1.2", - "from": "multipipe@>=0.1.2 <0.2.0", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz" - }, - "mute-stream": { - "version": "0.0.5", - "from": "mute-stream@0.0.5", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz" - }, - "new-from": { - "version": "0.0.3", - "from": "new-from@0.0.3", - "resolved": "https://registry.npmjs.org/new-from/-/new-from-0.0.3.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.1.14", - "from": "readable-stream@>=1.1.8 <1.2.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - } - } - }, - "node-fetch": { - "version": "1.6.3", - "from": "node-fetch@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz" - }, - "node-libs-browser": { - "version": "0.5.3", - "from": "node-libs-browser@>=0.4.0 <=0.6.0", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.5.3.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.1.14", - "from": "readable-stream@>=1.1.13 <2.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - } - } - }, - "node.extend": { - "version": "1.1.5", - "from": "node.extend@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.5.tgz" - }, - "normalize-package-data": { - "version": "2.3.5", - "from": "normalize-package-data@>=2.3.4 <3.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.5.tgz" - }, - "normalize-path": { - "version": "2.0.1", - "from": "normalize-path@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" - }, - "normalize-range": { - "version": "0.1.2", - "from": "normalize-range@>=0.1.2 <0.2.0", - "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz" - }, - "normalize-selector": { - "version": "0.2.0", - "from": "normalize-selector@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz" - }, - "normalize-url": { - "version": "1.5.3", - "from": "normalize-url@>=1.4.0 <2.0.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.5.3.tgz" - }, - "normalize.css": { - "version": "5.0.0", - "from": "normalize.css@5.0.0", - "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-5.0.0.tgz" - }, - "npm-path": { - "version": "1.1.0", - "from": "npm-path@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-1.1.0.tgz" - }, - "npm-run": { - "version": "2.0.0", - "from": "npm-run@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/npm-run/-/npm-run-2.0.0.tgz" - }, - "npm-which": { - "version": "2.0.0", - "from": "npm-which@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-2.0.0.tgz" - }, - "nsdeclare": { - "version": "0.1.0", - "from": "nsdeclare@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/nsdeclare/-/nsdeclare-0.1.0.tgz" - }, - "num2fraction": { - "version": "1.2.2", - "from": "num2fraction@>=1.2.2 <2.0.0", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz" - }, - "number-is-nan": { - "version": "1.0.0", - "from": "number-is-nan@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.0.tgz" - }, - "object-assign": { - "version": "4.1.1", - "from": "object-assign@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - }, - "object-keys": { - "version": "0.4.0", - "from": "object-keys@>=0.4.0 <0.5.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" - }, - "object.omit": { - "version": "2.0.0", - "from": "object.omit@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.0.tgz" - }, - "on-finished": { - "version": "2.3.0", - "from": "on-finished@>=2.3.0 <2.4.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" - }, - "once": { - "version": "1.3.3", - "from": "once@>=1.3.0 <2.0.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz" - }, - "onecolor": { - "version": "3.0.4", - "from": "onecolor@>=3.0.4 <4.0.0", - "resolved": "https://registry.npmjs.org/onecolor/-/onecolor-3.0.4.tgz" - }, - "onetime": { - "version": "1.1.0", - "from": "onetime@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz" - }, - "optimist": { - "version": "0.6.1", - "from": "optimist@>=0.6.0 <0.7.0", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "dependencies": { - "minimist": { - "version": "0.0.10", - "from": "minimist@>=0.0.1 <0.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz" - }, - "wordwrap": { - "version": "0.0.3", - "from": "wordwrap@>=0.0.2 <0.1.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" - } - } - }, - "optionator": { - "version": "0.8.2", - "from": "optionator@>=0.8.1 <0.9.0", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz" - }, - "orchestrator": { - "version": "0.3.7", - "from": "orchestrator@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.7.tgz" - }, - "ordered-read-streams": { - "version": "0.1.0", - "from": "ordered-read-streams@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz" - }, - "os-browserify": { - "version": "0.1.2", - "from": "os-browserify@>=0.1.2 <0.2.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz" - }, - "os-homedir": { - "version": "1.0.1", - "from": "os-homedir@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.1.tgz" - }, - "os-shim": { - "version": "0.1.3", - "from": "os-shim@>=0.1.2 <0.2.0", - "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz" - }, - "os-tmpdir": { - "version": "1.0.1", - "from": "os-tmpdir@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz" - }, - "pako": { - "version": "0.2.8", - "from": "pako@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.8.tgz" - }, - "parse-glob": { - "version": "3.0.4", - "from": "parse-glob@>=3.0.4 <4.0.0", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz" - }, - "parse-json": { - "version": "2.2.0", - "from": "parse-json@>=2.2.0 <3.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz" - }, - "parseurl": { - "version": "1.3.1", - "from": "parseurl@>=1.3.0 <1.4.0", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz" - }, - "path-browserify": { - "version": "0.0.0", - "from": "path-browserify@0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz" - }, - "path-exists": { - "version": "1.0.0", - "from": "path-exists@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz" - }, - "path-is-absolute": { - "version": "1.0.0", - "from": "path-is-absolute@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" - }, - "path-is-inside": { - "version": "1.0.1", - "from": "path-is-inside@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz" - }, - "path-to-regexp": { - "version": "1.7.0", - "from": "path-to-regexp@>=1.5.3 <2.0.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - } - } - }, - "path-type": { - "version": "1.1.0", - "from": "path-type@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz" - }, - "pause-stream": { - "version": "0.0.11", - "from": "pause-stream@0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz" - }, - "pbkdf2-compat": { - "version": "2.0.1", - "from": "pbkdf2-compat@2.0.1", - "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz" - }, - "performance-now": { - "version": "2.1.0", - "from": "performance-now@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" - }, - "pify": { - "version": "2.3.0", - "from": "pify@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - }, - "pinkie": { - "version": "2.0.4", - "from": "pinkie@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" - }, - "pinkie-promise": { - "version": "2.0.1", - "from": "pinkie-promise@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz" - }, - "pipetteur": { - "version": "2.0.3", - "from": "pipetteur@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pipetteur/-/pipetteur-2.0.3.tgz" - }, - "plur": { - "version": "2.1.2", - "from": "plur@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz" - }, - "pluralize": { - "version": "1.2.1", - "from": "pluralize@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz" - }, - "postcss": { - "version": "5.0.21", - "from": "postcss@>=5.0.19 <6.0.0", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.0.21.tgz" - }, - "postcss-calc": { - "version": "5.2.1", - "from": "postcss-calc@>=5.2.0 <6.0.0", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.2.1.tgz" - }, - "postcss-colormin": { - "version": "2.2.0", - "from": "postcss-colormin@>=2.1.8 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.0.tgz" - }, - "postcss-convert-values": { - "version": "2.4.0", - "from": "postcss-convert-values@>=2.3.4 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.4.0.tgz" - }, - "postcss-discard-comments": { - "version": "2.0.4", - "from": "postcss-discard-comments@>=2.0.4 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz" - }, - "postcss-discard-duplicates": { - "version": "2.0.1", - "from": "postcss-discard-duplicates@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.0.1.tgz" - }, - "postcss-discard-empty": { - "version": "2.1.0", - "from": "postcss-discard-empty@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz" - }, - "postcss-discard-overridden": { - "version": "0.1.1", - "from": "postcss-discard-overridden@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz" - }, - "postcss-discard-unused": { - "version": "2.2.1", - "from": "postcss-discard-unused@>=2.2.1 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.1.tgz" - }, - "postcss-filter-plugins": { - "version": "2.0.0", - "from": "postcss-filter-plugins@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.0.tgz" - }, - "postcss-less": { - "version": "0.14.0", - "from": "postcss-less@>=0.14.0 <0.15.0", - "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-0.14.0.tgz" - }, - "postcss-loader": { - "version": "0.9.1", - "from": "postcss-loader@0.9.1", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-0.9.1.tgz" - }, - "postcss-media-query-parser": { - "version": "0.2.1", - "from": "postcss-media-query-parser@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.1.tgz" - }, - "postcss-merge-idents": { - "version": "2.1.6", - "from": "postcss-merge-idents@>=2.1.5 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.6.tgz" - }, - "postcss-merge-longhand": { - "version": "2.0.1", - "from": "postcss-merge-longhand@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.1.tgz" - }, - "postcss-merge-rules": { - "version": "2.0.9", - "from": "postcss-merge-rules@>=2.0.3 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.0.9.tgz" - }, - "postcss-message-helpers": { - "version": "2.0.0", - "from": "postcss-message-helpers@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz" - }, - "postcss-minify-font-values": { - "version": "1.0.5", - "from": "postcss-minify-font-values@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz" - }, - "postcss-minify-gradients": { - "version": "1.0.3", - "from": "postcss-minify-gradients@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.3.tgz" - }, - "postcss-minify-params": { - "version": "1.0.4", - "from": "postcss-minify-params@>=1.0.4 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.0.4.tgz" - }, - "postcss-minify-selectors": { - "version": "2.0.5", - "from": "postcss-minify-selectors@>=2.0.4 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.0.5.tgz" - }, - "postcss-modules-extract-imports": { - "version": "1.0.1", - "from": "postcss-modules-extract-imports@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.0.1.tgz" - }, - "postcss-modules-local-by-default": { - "version": "1.1.0", - "from": "postcss-modules-local-by-default@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.1.0.tgz" - }, - "postcss-modules-scope": { - "version": "1.0.1", - "from": "postcss-modules-scope@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.0.1.tgz" - }, - "postcss-modules-values": { - "version": "1.1.3", - "from": "postcss-modules-values@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.1.3.tgz" - }, - "postcss-nested": { - "version": "1.0.0", - "from": "postcss-nested@1.0.0", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-1.0.0.tgz" - }, - "postcss-normalize-charset": { - "version": "1.1.0", - "from": "postcss-normalize-charset@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.0.tgz" - }, - "postcss-normalize-url": { - "version": "3.0.7", - "from": "postcss-normalize-url@>=3.0.7 <4.0.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.7.tgz" - }, - "postcss-ordered-values": { - "version": "2.2.1", - "from": "postcss-ordered-values@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.1.tgz" - }, - "postcss-reduce-idents": { - "version": "2.3.0", - "from": "postcss-reduce-idents@>=2.2.2 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.3.0.tgz" - }, - "postcss-reduce-initial": { - "version": "1.0.0", - "from": "postcss-reduce-initial@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.0.tgz" - }, - "postcss-reduce-transforms": { - "version": "1.0.3", - "from": "postcss-reduce-transforms@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.3.tgz" - }, - "postcss-reporter": { - "version": "1.4.1", - "from": "postcss-reporter@>=1.3.0 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-1.4.1.tgz" - }, - "postcss-resolve-nested-selector": { - "version": "0.1.1", - "from": "postcss-resolve-nested-selector@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz" - }, - "postcss-scss": { - "version": "0.3.0", - "from": "postcss-scss@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-0.3.0.tgz", - "dependencies": { - "postcss": { - "version": "5.2.0", - "from": "postcss@>=5.2.0 <6.0.0", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.0.tgz" - } - } - }, - "postcss-selector-parser": { - "version": "2.1.0", - "from": "postcss-selector-parser@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.1.0.tgz" - }, - "postcss-simple-vars": { - "version": "3.0.0", - "from": "postcss-simple-vars@3.0.0", - "resolved": "https://registry.npmjs.org/postcss-simple-vars/-/postcss-simple-vars-3.0.0.tgz" - }, - "postcss-sorting": { - "version": "3.0.1", - "from": "postcss-sorting@>=3.0.1 <4.0.0", - "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-3.0.1.tgz", - "dependencies": { - "ansi-styles": { - "version": "3.2.0", - "from": "ansi-styles@^3.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz" - }, - "chalk": { - "version": "2.0.1", - "from": "chalk@^2.0.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz" - }, - "color-convert": { - "version": "1.9.0", - "from": "color-convert@^1.9.0", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz" - }, - "has-flag": { - "version": "2.0.0", - "from": "has-flag@^2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz" - }, - "postcss": { - "version": "6.0.8", - "from": "postcss@^6.0.1", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.8.tgz" - }, - "supports-color": { - "version": "4.2.1", - "from": "supports-color@^4.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.1.tgz" - } - } - }, - "postcss-svgo": { - "version": "2.1.3", - "from": "postcss-svgo@>=2.1.1 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.3.tgz" - }, - "postcss-unique-selectors": { - "version": "2.0.2", - "from": "postcss-unique-selectors@>=2.0.2 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz" - }, - "postcss-value-parser": { - "version": "3.3.0", - "from": "postcss-value-parser@>=3.2.3 <4.0.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz" - }, - "postcss-zindex": { - "version": "2.1.1", - "from": "postcss-zindex@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.1.1.tgz" - }, - "prefix-style": { - "version": "2.0.1", - "from": "prefix-style@2.0.1", - "resolved": "https://registry.npmjs.org/prefix-style/-/prefix-style-2.0.1.tgz" - }, - "prelude-ls": { - "version": "1.1.2", - "from": "prelude-ls@>=1.1.2 <1.2.0", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" - }, - "prepend-http": { - "version": "1.0.4", - "from": "prepend-http@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz" - }, - "preserve": { - "version": "0.2.0", - "from": "preserve@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz" - }, - "pretty-hrtime": { - "version": "1.0.2", - "from": "pretty-hrtime@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.2.tgz" - }, - "private": { - "version": "0.1.6", - "from": "private@>=0.1.6 <0.2.0", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz" - }, - "process": { - "version": "0.11.3", - "from": "process@>=0.11.0 <0.12.0", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.3.tgz" - }, - "process-nextick-args": { - "version": "1.0.7", - "from": "process-nextick-args@>=1.0.6 <1.1.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" - }, - "progress": { - "version": "1.1.8", - "from": "progress@>=1.1.8 <2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz" - }, - "promise": { - "version": "7.1.1", - "from": "promise@>=7.1.1 <8.0.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.1.1.tgz" - }, - "prop-types": { - "version": "15.5.10", - "from": "prop-types@latest", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.5.10.tgz", - "dependencies": { - "core-js": { - "version": "1.2.7", - "from": "core-js@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz" - }, - "fbjs": { - "version": "0.8.12", - "from": "fbjs@>=0.8.9 <0.9.0", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.12.tgz" - }, - "js-tokens": { - "version": "3.0.1", - "from": "js-tokens@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz" - }, - "loose-envify": { - "version": "1.3.1", - "from": "loose-envify@>=1.3.1 <2.0.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz" - } - } - }, - "protochain": { - "version": "1.0.3", - "from": "protochain@>=1.0.3 <2.0.0", - "resolved": "https://registry.npmjs.org/protochain/-/protochain-1.0.3.tgz" - }, - "prr": { - "version": "0.0.0", - "from": "prr@>=0.0.0 <0.1.0", - "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz" - }, - "punycode": { - "version": "1.4.1", - "from": "punycode@>=1.4.1 <2.0.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" - }, - "q": { - "version": "1.4.1", - "from": "q@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz" - }, - "qs": { - "version": "2.2.5", - "from": "qs@>=2.2.3 <2.3.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-2.2.5.tgz" - }, - "query-string": { - "version": "4.2.2", - "from": "https://registry.npmjs.org/query-string/-/query-string-4.2.2.tgz", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.2.2.tgz" - }, - "querystring": { - "version": "0.2.0", - "from": "querystring@0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz" - }, - "querystring-es3": { - "version": "0.2.1", - "from": "querystring-es3@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz" - }, - "raf": { - "version": "3.3.2", - "from": "raf@>=3.1.0 <4.0.0", - "resolved": "https://registry.npmjs.org/raf/-/raf-3.3.2.tgz" - }, - "randomatic": { - "version": "1.1.5", - "from": "randomatic@>=1.1.3 <2.0.0", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.5.tgz" - }, - "raven-for-redux": { - "version": "1.0.0", - "from": "raven-for-redux@latest", - "resolved": "https://registry.npmjs.org/raven-for-redux/-/raven-for-redux-1.0.0.tgz" - }, - "raven-js": { - "version": "3.17.0", - "from": "raven-js@>=3.1.1 <4.0.0", - "resolved": "https://registry.npmjs.org/raven-js/-/raven-js-3.17.0.tgz" - }, - "raw-body": { - "version": "2.1.6", - "from": "raw-body@>=2.1.5 <2.2.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.6.tgz", - "dependencies": { - "bytes": { - "version": "2.3.0", - "from": "bytes@2.3.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.3.0.tgz" - } - } - }, - "react": { - "version": "15.6.1", - "from": "react@15.6.1", - "resolved": "https://registry.npmjs.org/react/-/react-15.6.1.tgz", - "dependencies": { - "core-js": { - "version": "1.2.7", - "from": "core-js@^1.0.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz" - }, - "fbjs": { - "version": "0.8.12", - "from": "fbjs@>=0.8.9 <0.9.0", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.12.tgz" - } - } - }, - "react-addons-shallow-compare": { - "version": "15.6.0", - "from": "react-addons-shallow-compare@15.6.0", - "resolved": "https://registry.npmjs.org/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.0.tgz" - }, - "react-async-script": { - "version": "0.9.1", - "from": "react-async-script@0.9.1", - "resolved": "https://registry.npmjs.org/react-async-script/-/react-async-script-0.9.1.tgz" - }, - "react-autosuggest": { - "version": "9.3.0", - "from": "react-autosuggest@9.3.0", - "resolved": "https://registry.npmjs.org/react-autosuggest/-/react-autosuggest-9.3.0.tgz" - }, - "react-autowhatever": { - "version": "10.1.0", - "from": "react-autowhatever@>=10.1.0 <11.0.0", - "resolved": "https://registry.npmjs.org/react-autowhatever/-/react-autowhatever-10.1.0.tgz" - }, - "react-custom-scrollbars": { - "version": "4.1.2", - "from": "react-custom-scrollbars@latest", - "resolved": "https://registry.npmjs.org/react-custom-scrollbars/-/react-custom-scrollbars-4.1.2.tgz" - }, - "react-dnd": { - "version": "2.4.0", - "from": "react-dnd@2.4.0", - "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-2.4.0.tgz" - }, - "react-dnd-html5-backend": { - "version": "2.4.1", - "from": "react-dnd-html5-backend@2.4.1", - "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-2.4.1.tgz" - }, - "react-document-title": { - "version": "2.0.3", - "from": "react-document-title@2.0.3", - "resolved": "https://registry.npmjs.org/react-document-title/-/react-document-title-2.0.3.tgz" - }, - "react-dom": { - "version": "15.6.1", - "from": "react-dom@15.6.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.6.1.tgz", - "dependencies": { - "core-js": { - "version": "1.2.7", - "from": "core-js@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz" - }, - "fbjs": { - "version": "0.8.12", - "from": "fbjs@>=0.8.9 <0.9.0", - "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.12.tgz" - } - } - }, - "react-google-recaptcha": { - "version": "0.9.6", - "from": "react-google-recaptcha@0.9.6", - "resolved": "https://registry.npmjs.org/react-google-recaptcha/-/react-google-recaptcha-0.9.6.tgz" - }, - "react-lazyload": { - "version": "2.2.7", - "from": "react-lazyload@2.2.7", - "resolved": "https://registry.npmjs.org/react-lazyload/-/react-lazyload-2.2.7.tgz" - }, - "react-measure": { - "version": "1.4.7", - "from": "react-measure@1.4.7", - "resolved": "https://registry.npmjs.org/react-measure/-/react-measure-1.4.7.tgz" - }, - "react-portal": { - "version": "3.1.0", - "from": "react-portal@3.1.0", - "resolved": "https://registry.npmjs.org/react-portal/-/react-portal-3.1.0.tgz" - }, - "react-redux": { - "version": "5.0.5", - "from": "react-redux@5.0.5", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.5.tgz" - }, - "react-router": { - "version": "4.1.1", - "from": "react-router@>=4.1.1 <5.0.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.1.1.tgz", - "dependencies": { - "invariant": { - "version": "2.2.2", - "from": "invariant@>=2.2.2 <3.0.0", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz" - }, - "js-tokens": { - "version": "3.0.2", - "from": "js-tokens@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz" - }, - "loose-envify": { - "version": "1.3.1", - "from": "loose-envify@>=1.3.1 <2.0.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz" - } - } - }, - "react-router-dom": { - "version": "4.1.1", - "from": "react-router-dom@latest", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.1.1.tgz", - "dependencies": { - "history": { - "version": "4.6.3", - "from": "history@>=4.5.1 <5.0.0", - "resolved": "https://registry.npmjs.org/history/-/history-4.6.3.tgz" - }, - "js-tokens": { - "version": "3.0.2", - "from": "js-tokens@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz" - }, - "loose-envify": { - "version": "1.3.1", - "from": "loose-envify@>=1.3.1 <2.0.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz" - }, - "react-router": { - "version": "4.1.1", - "from": "react-router@>=4.1.1 <5.0.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.1.1.tgz", - "dependencies": { - "invariant": { - "version": "2.2.2", - "from": "invariant@>=2.2.2 <3.0.0", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz" - } - } - } - } - }, - "react-router-redux": { - "version": "5.0.0-alpha.6", - "from": "react-router-redux@next", - "resolved": "https://registry.npmjs.org/react-router-redux/-/react-router-redux-5.0.0-alpha.6.tgz" - }, - "react-side-effect": { - "version": "1.1.3", - "from": "react-side-effect@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-1.1.3.tgz" - }, - "react-slider": { - "version": "0.8.0", - "from": "react-slider@0.8.0", - "resolved": "https://registry.npmjs.org/react-slider/-/react-slider-0.8.0.tgz" - }, - "react-tabs": { - "version": "1.1.0", - "from": "react-tabs@1.1.0", - "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-1.1.0.tgz" - }, - "react-tag-autocomplete": { - "version": "5.4.0", - "from": "react-tag-autocomplete@5.4.0", - "resolved": "https://registry.npmjs.org/react-tag-autocomplete/-/react-tag-autocomplete-5.4.0.tgz" - }, - "react-tether": { - "version": "0.5.7", - "from": "react-tether@0.5.7", - "resolved": "https://registry.npmjs.org/react-tether/-/react-tether-0.5.7.tgz" - }, - "react-themeable": { - "version": "1.1.0", - "from": "react-themeable@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/react-themeable/-/react-themeable-1.1.0.tgz", - "dependencies": { - "object-assign": { - "version": "3.0.0", - "from": "object-assign@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz" - } - } - }, - "react-virtualized": { - "version": "9.8.0", - "from": "react-virtualized@9.8.0", - "resolved": "https://registry.npmjs.org/react-virtualized/-/react-virtualized-9.8.0.tgz", - "dependencies": { - "babel-runtime": { - "version": "6.23.0", - "from": "babel-runtime@>=6.11.6 <7.0.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz" - }, - "js-tokens": { - "version": "3.0.2", - "from": "js-tokens@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz" - }, - "loose-envify": { - "version": "1.3.1", - "from": "loose-envify@>=1.3.0 <2.0.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz" - }, - "regenerator-runtime": { - "version": "0.10.5", - "from": "regenerator-runtime@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz" - } - } - }, - "read-file-stdin": { - "version": "0.2.1", - "from": "read-file-stdin@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/read-file-stdin/-/read-file-stdin-0.2.1.tgz" - }, - "read-pkg": { - "version": "1.1.0", - "from": "read-pkg@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz" - }, - "read-pkg-up": { - "version": "1.0.1", - "from": "read-pkg-up@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz" - }, - "readable-stream": { - "version": "2.2.9", - "from": "readable-stream@>=2.0.2 <3.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", - "dependencies": { - "string_decoder": { - "version": "1.0.0", - "from": "string_decoder@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz" - } - } - }, - "readdirp": { - "version": "2.0.0", - "from": "readdirp@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.0.0.tgz" - }, - "readline2": { - "version": "1.0.1", - "from": "readline2@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz" - }, - "rechoir": { - "version": "0.6.2", - "from": "rechoir@>=0.6.2 <0.7.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz" - }, - "redent": { - "version": "1.0.0", - "from": "redent@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz" - }, - "reduce-css-calc": { - "version": "1.2.4", - "from": "reduce-css-calc@>=1.2.0 <2.0.0", - "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.2.4.tgz", - "dependencies": { - "balanced-match": { - "version": "0.1.0", - "from": "balanced-match@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.1.0.tgz" - } - } - }, - "reduce-function-call": { - "version": "1.0.1", - "from": "reduce-function-call@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.1.tgz", - "dependencies": { - "balanced-match": { - "version": "0.1.0", - "from": "balanced-match@~0.1.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.1.0.tgz" - } - } - }, - "reduce-reducers": { - "version": "0.1.2", - "from": "reduce-reducers@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-0.1.2.tgz" - }, - "redux": { - "version": "3.7.0", - "from": "redux@3.7.0", - "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.0.tgz" - }, - "redux-actions": { - "version": "2.0.3", - "from": "redux-actions@2.0.3", - "resolved": "https://registry.npmjs.org/redux-actions/-/redux-actions-2.0.3.tgz", - "dependencies": { - "lodash-es": { - "version": "4.17.4", - "from": "lodash-es@>=4.17.4 <5.0.0", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.4.tgz" - } - } - }, - "redux-batched-actions": { - "version": "0.2.0", - "from": "redux-batched-actions@0.2.0", - "resolved": "https://registry.npmjs.org/redux-batched-actions/-/redux-batched-actions-0.2.0.tgz" - }, - "redux-localstorage": { - "version": "0.4.1", - "from": "redux-localstorage@0.4.1", - "resolved": "https://registry.npmjs.org/redux-localstorage/-/redux-localstorage-0.4.1.tgz" - }, - "redux-thunk": { - "version": "2.2.0", - "from": "redux-thunk@2.2.0", - "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.2.0.tgz" - }, - "regenerate": { - "version": "1.2.1", - "from": "regenerate@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.2.1.tgz" - }, - "regenerator-runtime": { - "version": "0.9.5", - "from": "regenerator-runtime@>=0.9.5 <0.10.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.5.tgz" - }, - "regex-cache": { - "version": "0.4.3", - "from": "regex-cache@>=0.4.2 <0.5.0", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz" - }, - "regexpu-core": { - "version": "1.0.0", - "from": "regexpu-core@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz" - }, - "regjsgen": { - "version": "0.2.0", - "from": "regjsgen@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz" - }, - "regjsparser": { - "version": "0.1.5", - "from": "regjsparser@>=0.1.4 <0.2.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz" - }, - "repeat-element": { - "version": "1.1.2", - "from": "repeat-element@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz" - }, - "repeat-string": { - "version": "1.5.4", - "from": "repeat-string@>=1.5.0 <2.0.0", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.5.4.tgz" - }, - "repeating": { - "version": "1.1.3", - "from": "repeating@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz" - }, - "replace-ext": { - "version": "0.0.1", - "from": "replace-ext@0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz" - }, - "require-from-string": { - "version": "1.2.0", - "from": "require-from-string@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.0.tgz" - }, - "require-nocache": { - "version": "1.0.0", - "from": "require-nocache@latest", - "resolved": "https://registry.npmjs.org/require-nocache/-/require-nocache-1.0.0.tgz" - }, - "require-uncached": { - "version": "1.0.3", - "from": "require-uncached@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz" - }, - "reselect": { - "version": "3.0.1", - "from": "reselect@3.0.1", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-3.0.1.tgz" - }, - "resize-observer-polyfill": { - "version": "1.4.2", - "from": "resize-observer-polyfill@>=1.4.2 <2.0.0", - "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.4.2.tgz" - }, - "resolve": { - "version": "1.1.7", - "from": "resolve@>=1.1.5 <2.0.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz" - }, - "resolve-from": { - "version": "1.0.1", - "from": "resolve-from@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz" - }, - "resolve-pathname": { - "version": "2.1.0", - "from": "resolve-pathname@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.1.0.tgz" - }, - "restore-cursor": { - "version": "1.0.1", - "from": "restore-cursor@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz" - }, - "right-align": { - "version": "0.1.3", - "from": "right-align@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz" - }, - "rimraf": { - "version": "2.5.2", - "from": "rimraf@>=2.2.8 <3.0.0", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz", - "dependencies": { - "glob": { - "version": "7.0.3", - "from": "glob@>=7.0.0 <8.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.3.tgz" - } - } - }, - "ripemd160": { - "version": "0.2.0", - "from": "ripemd160@0.2.0", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz" - }, - "rocambole": { - "version": "0.7.0", - "from": "rocambole@>=0.7.0 <2.0.0", - "resolved": "https://registry.npmjs.org/rocambole/-/rocambole-0.7.0.tgz" - }, - "rocambole-indent": { - "version": "2.0.4", - "from": "rocambole-indent@>=2.0.4 <3.0.0", - "resolved": "https://registry.npmjs.org/rocambole-indent/-/rocambole-indent-2.0.4.tgz", - "dependencies": { - "mout": { - "version": "0.11.1", - "from": "mout@>=0.11.0 <0.12.0", - "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz" - } - } - }, - "rocambole-linebreak": { - "version": "1.0.1", - "from": "rocambole-linebreak@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/rocambole-linebreak/-/rocambole-linebreak-1.0.1.tgz", - "dependencies": { - "semver": { - "version": "4.3.6", - "from": "semver@>=4.3.1 <5.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz" - } - } - }, - "rocambole-node": { - "version": "1.0.0", - "from": "rocambole-node@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/rocambole-node/-/rocambole-node-1.0.0.tgz" - }, - "rocambole-token": { - "version": "1.2.1", - "from": "rocambole-token@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/rocambole-token/-/rocambole-token-1.2.1.tgz" - }, - "rocambole-whitespace": { - "version": "1.0.0", - "from": "rocambole-whitespace@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/rocambole-whitespace/-/rocambole-whitespace-1.0.0.tgz" - }, - "run-async": { - "version": "0.1.0", - "from": "run-async@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz" - }, - "run-sequence": { - "version": "1.2.0", - "from": "run-sequence@1.2.0", - "resolved": "https://registry.npmjs.org/run-sequence/-/run-sequence-1.2.0.tgz" - }, - "rx-lite": { - "version": "3.1.2", - "from": "rx-lite@>=3.1.2 <4.0.0", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz" - }, - "sax": { - "version": "1.2.1", - "from": "sax@>=1.2.1 <1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz" - }, - "section-iterator": { - "version": "2.0.0", - "from": "section-iterator@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/section-iterator/-/section-iterator-2.0.0.tgz" - }, - "select": { - "version": "1.1.2", - "from": "select@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz" - }, - "semver": { - "version": "5.3.0", - "from": "semver@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0||>=4.0.0 <5.0.0||>=5.0.0 <6.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" - }, - "sequencify": { - "version": "0.0.7", - "from": "sequencify@>=0.0.7 <0.1.0", - "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz" - }, - "serializerr": { - "version": "1.0.2", - "from": "serializerr@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/serializerr/-/serializerr-1.0.2.tgz" - }, - "setimmediate": { - "version": "1.0.5", - "from": "setimmediate@>=1.0.5 <2.0.0", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" - }, - "sha.js": { - "version": "2.2.6", - "from": "sha.js@2.2.6", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz" - }, - "shallow-equal": { - "version": "1.0.0", - "from": "shallow-equal@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.0.0.tgz" - }, - "shallowequal": { - "version": "1.0.1", - "from": "shallowequal@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.0.1.tgz" - }, - "shebang-regex": { - "version": "1.0.0", - "from": "shebang-regex@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" - }, - "shelljs": { - "version": "0.6.1", - "from": "shelljs@>=0.6.0 <0.7.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.1.tgz" - }, - "sigmund": { - "version": "1.0.1", - "from": "sigmund@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz" - }, - "signal-exit": { - "version": "2.1.2", - "from": "signal-exit@>=2.1.2 <3.0.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-2.1.2.tgz" - }, - "slash": { - "version": "1.0.0", - "from": "slash@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz" - }, - "slice-ansi": { - "version": "0.0.4", - "from": "slice-ansi@0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz" - }, - "sort-keys": { - "version": "1.1.2", - "from": "sort-keys@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz" - }, - "source-list-map": { - "version": "0.1.6", - "from": "source-list-map@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.6.tgz" - }, - "source-map": { - "version": "0.5.6", - "from": "source-map@>=0.5.5 <0.6.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz" - }, - "source-map-support": { - "version": "0.2.10", - "from": "source-map-support@>=0.2.10 <0.3.0", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.2.10.tgz", - "dependencies": { - "source-map": { - "version": "0.1.32", - "from": "source-map@0.1.32", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz" - } - } - }, - "sparkles": { - "version": "1.0.0", - "from": "sparkles@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz" - }, - "spawn-sync": { - "version": "1.0.15", - "from": "spawn-sync@>=1.0.5 <2.0.0", - "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz" - }, - "spdx-correct": { - "version": "1.0.2", - "from": "spdx-correct@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz" - }, - "spdx-exceptions": { - "version": "1.0.4", - "from": "spdx-exceptions@>=1.0.4 <2.0.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-1.0.4.tgz" - }, - "spdx-expression-parse": { - "version": "1.0.2", - "from": "spdx-expression-parse@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.2.tgz" - }, - "spdx-license-ids": { - "version": "1.2.1", - "from": "spdx-license-ids@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.1.tgz" - }, - "specificity": { - "version": "0.2.1", - "from": "specificity@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.2.1.tgz" - }, - "split": { - "version": "0.3.3", - "from": "split@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz" - }, - "split2": { - "version": "0.2.1", - "from": "split2@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-0.2.1.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.1 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - } - } - }, - "sprintf-js": { - "version": "1.0.3", - "from": "sprintf-js@>=1.0.2 <1.1.0", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - }, - "statuses": { - "version": "1.3.0", - "from": "statuses@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.0.tgz" - }, - "stdin": { - "version": "0.0.1", - "from": "stdin@*", - "resolved": "https://registry.npmjs.org/stdin/-/stdin-0.0.1.tgz" - }, - "stream-browserify": { - "version": "1.0.0", - "from": "stream-browserify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.1.14", - "from": "readable-stream@>=1.0.27-1 <2.0.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" - } - } - }, - "stream-combiner": { - "version": "0.0.4", - "from": "stream-combiner@>=0.0.4 <0.1.0", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz" - }, - "stream-consume": { - "version": "0.1.0", - "from": "stream-consume@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz" - }, - "streamqueue": { - "version": "1.1.1", - "from": "streamqueue@1.1.1", - "resolved": "https://registry.npmjs.org/streamqueue/-/streamqueue-1.1.1.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33 <1.1.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - } - } - }, - "strict-uri-encode": { - "version": "1.1.0", - "from": "strict-uri-encode@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz" - }, - "string_decoder": { - "version": "0.10.31", - "from": "string_decoder@>=0.10.0 <0.11.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - }, - "string-width": { - "version": "1.0.1", - "from": "string-width@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz" - }, - "strip-ansi": { - "version": "3.0.1", - "from": "strip-ansi@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" - }, - "strip-bom": { - "version": "2.0.0", - "from": "strip-bom@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz" - }, - "strip-bom-stream": { - "version": "1.0.0", - "from": "strip-bom-stream@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz" - }, - "strip-indent": { - "version": "1.0.1", - "from": "strip-indent@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz" - }, - "strip-json-comments": { - "version": "0.1.3", - "from": "strip-json-comments@>=0.1.1 <0.2.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz" - }, - "style-loader": { - "version": "0.13.1", - "from": "style-loader@0.13.1", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.13.1.tgz" - }, - "style-search": { - "version": "0.1.0", - "from": "style-search@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz" - }, - "stylehacks": { - "version": "2.3.1", - "from": "stylehacks@>=2.3.0 <3.0.0", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-2.3.1.tgz" - }, - "stylelint": { - "version": "7.3.1", - "from": "stylelint@7.3.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-7.3.1.tgz", - "dependencies": { - "get-stdin": { - "version": "5.0.1", - "from": "get-stdin@>=5.0.0 <6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz" - }, - "glob": { - "version": "7.1.0", - "from": "glob@>=7.0.3 <8.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.0.tgz" - }, - "globby": { - "version": "6.0.0", - "from": "globby@>=6.0.0 <7.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.0.0.tgz" - }, - "ignore": { - "version": "3.1.5", - "from": "ignore@>=3.1.3 <4.0.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.1.5.tgz" - }, - "minimatch": { - "version": "3.0.3", - "from": "minimatch@^3.0.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz" - }, - "postcss-selector-parser": { - "version": "2.2.1", - "from": "postcss-selector-parser@>=2.1.1 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.1.tgz" - }, - "resolve-from": { - "version": "2.0.0", - "from": "resolve-from@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz" - } - } - }, - "stylelint-order": { - "version": "0.6.0", - "from": "stylelint-order@latest", - "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-0.6.0.tgz", - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "from": "ansi-regex@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz" - }, - "ansi-styles": { - "version": "3.2.0", - "from": "ansi-styles@>=3.1.0 <4.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz" - }, - "autoprefixer": { - "version": "7.1.2", - "from": "autoprefixer@>=7.1.2 <8.0.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.1.2.tgz" - }, - "balanced-match": { - "version": "1.0.0", - "from": "balanced-match@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" - }, - "brace-expansion": { - "version": "1.1.8", - "from": "brace-expansion@>=1.1.7 <2.0.0", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz" - }, - "browserslist": { - "version": "2.2.2", - "from": "browserslist@>=2.1.5 <3.0.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.2.2.tgz" - }, - "chalk": { - "version": "2.0.1", - "from": "chalk@>=2.0.1 <3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.0.1.tgz" - }, - "color-convert": { - "version": "1.9.0", - "from": "color-convert@>=1.9.0 <2.0.0", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz" - }, - "cosmiconfig": { - "version": "2.2.2", - "from": "cosmiconfig@>=2.1.3 <3.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz" - }, - "debug": { - "version": "2.6.8", - "from": "debug@>=2.6.8 <3.0.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz" - }, - "file-entry-cache": { - "version": "2.0.0", - "from": "file-entry-cache@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz" - }, - "get-stdin": { - "version": "5.0.1", - "from": "get-stdin@>=5.0.1 <6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz" - }, - "glob": { - "version": "7.1.2", - "from": "glob@>=7.0.3 <8.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz" - }, - "globby": { - "version": "6.1.0", - "from": "globby@>=6.1.0 <7.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "dependencies": { - "pify": { - "version": "2.3.0", - "from": "pify@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - } - } - }, - "has-flag": { - "version": "2.0.0", - "from": "has-flag@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz" - }, - "html-tags": { - "version": "2.0.0", - "from": "html-tags@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz" - }, - "ignore": { - "version": "3.3.3", - "from": "ignore@>=3.3.3 <4.0.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.3.tgz" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "from": "is-fullwidth-code-point@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" - }, - "known-css-properties": { - "version": "0.2.0", - "from": "known-css-properties@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.2.0.tgz" - }, - "micromatch": { - "version": "2.3.11", - "from": "micromatch@>=2.3.11 <3.0.0", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz" - }, - "minimatch": { - "version": "3.0.4", - "from": "minimatch@>=3.0.4 <4.0.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" - }, - "ms": { - "version": "2.0.0", - "from": "ms@2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" - }, - "pify": { - "version": "3.0.0", - "from": "pify@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz" - }, - "postcss": { - "version": "6.0.8", - "from": "postcss@>=6.0.7 <7.0.0", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.8.tgz" - }, - "postcss-less": { - "version": "1.1.0", - "from": "postcss-less@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-1.1.0.tgz", - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "from": "ansi-styles@>=2.2.1 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" - }, - "chalk": { - "version": "1.1.3", - "from": "chalk@>=1.1.3 <2.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "dependencies": { - "supports-color": { - "version": "2.0.0", - "from": "supports-color@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - } - } - }, - "has-flag": { - "version": "1.0.0", - "from": "has-flag@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz" - }, - "postcss": { - "version": "5.2.17", - "from": "postcss@>=5.2.16 <6.0.0", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz" - }, - "supports-color": { - "version": "3.2.3", - "from": "supports-color@>=3.2.3 <4.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz" - } - } - }, - "postcss-media-query-parser": { - "version": "0.2.3", - "from": "postcss-media-query-parser@>=0.2.3 <0.3.0", - "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz" - }, - "postcss-reporter": { - "version": "4.0.0", - "from": "postcss-reporter@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-4.0.0.tgz", - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "from": "ansi-styles@>=2.2.1 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" - }, - "chalk": { - "version": "1.1.3", - "from": "chalk@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" - }, - "supports-color": { - "version": "2.0.0", - "from": "supports-color@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - } - } - }, - "postcss-scss": { - "version": "1.0.2", - "from": "postcss-scss@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-1.0.2.tgz" - }, - "postcss-selector-parser": { - "version": "2.2.3", - "from": "postcss-selector-parser@>=2.2.3 <3.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz" - }, - "resolve-from": { - "version": "3.0.0", - "from": "resolve-from@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz" - }, - "specificity": { - "version": "0.3.1", - "from": "specificity@>=0.3.1 <0.4.0", - "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.3.1.tgz" - }, - "string-width": { - "version": "2.1.1", - "from": "string-width@>=2.1.0 <3.0.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "from": "strip-ansi@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz" - } - } - }, - "stylelint": { - "version": "8.0.0", - "from": "stylelint@>=8.0.0 <9.0.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-8.0.0.tgz" - }, - "sugarss": { - "version": "1.0.0", - "from": "sugarss@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-1.0.0.tgz" - }, - "supports-color": { - "version": "4.2.1", - "from": "supports-color@>=4.2.0 <5.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.2.1.tgz" - }, - "table": { - "version": "4.0.1", - "from": "table@>=4.0.1 <5.0.0", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.1.tgz", - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "from": "ansi-styles@>=2.2.1 <3.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" - }, - "chalk": { - "version": "1.1.3", - "from": "chalk@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" - }, - "supports-color": { - "version": "2.0.0", - "from": "supports-color@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" - } - } - } - } - }, - "sugarss": { - "version": "0.1.6", - "from": "sugarss@>=0.1.2 <0.2.0", - "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-0.1.6.tgz", - "dependencies": { - "postcss": { - "version": "5.2.0", - "from": "postcss@^5.2.0", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.0.tgz" - } - } - }, - "supports-color": { - "version": "3.1.2", - "from": "supports-color@>=3.1.2 <4.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz" - }, - "svg-tags": { - "version": "1.0.0", - "from": "svg-tags@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz" - }, - "svgo": { - "version": "0.6.6", - "from": "svgo@>=0.6.1 <0.7.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.6.6.tgz" - }, - "symbol-observable": { - "version": "1.0.4", - "from": "symbol-observable@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz" - }, - "sync-exec": { - "version": "0.5.0", - "from": "sync-exec@>=0.5.0 <0.6.0", - "resolved": "https://registry.npmjs.org/sync-exec/-/sync-exec-0.5.0.tgz" - }, - "synesthesia": { - "version": "1.0.1", - "from": "synesthesia@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/synesthesia/-/synesthesia-1.0.1.tgz" - }, - "table": { - "version": "3.7.8", - "from": "table@>=3.7.8 <4.0.0", - "resolved": "https://registry.npmjs.org/table/-/table-3.7.8.tgz" - }, - "tapable": { - "version": "0.1.10", - "from": "tapable@>=0.1.8 <0.2.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz" - }, - "tar": { - "version": "2.2.1", - "from": "tar@>=2.1.1 <3.0.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz" - }, - "tar.gz": { - "version": "1.0.3", - "from": "tar.gz@1.0.3", - "resolved": "https://registry.npmjs.org/tar.gz/-/tar.gz-1.0.3.tgz", - "dependencies": { - "bluebird": { - "version": "2.10.2", - "from": "bluebird@>=2.9.34 <3.0.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz" - }, - "mout": { - "version": "0.11.1", - "from": "mout@>=0.11.0 <0.12.0", - "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz" - } - } - }, - "tether": { - "version": "1.4.0", - "from": "tether@>=1.3.7 <2.0.0", - "resolved": "https://registry.npmjs.org/tether/-/tether-1.4.0.tgz" - }, - "text-table": { - "version": "0.2.0", - "from": "text-table@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - }, - "through": { - "version": "2.3.8", - "from": "through@>=2.3.6 <3.0.0", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - }, - "through2": { - "version": "2.0.3", - "from": "through2@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz" - }, - "tildify": { - "version": "1.2.0", - "from": "tildify@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz" - }, - "time-stamp": { - "version": "1.0.1", - "from": "time-stamp@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.0.1.tgz" - }, - "timers-browserify": { - "version": "1.4.2", - "from": "timers-browserify@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz" - }, - "tiny-emitter": { - "version": "2.0.0", - "from": "tiny-emitter@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.0.tgz" - }, - "to-camel-case": { - "version": "1.0.0", - "from": "to-camel-case@1.0.0", - "resolved": "https://registry.npmjs.org/to-camel-case/-/to-camel-case-1.0.0.tgz" - }, - "to-fast-properties": { - "version": "1.0.2", - "from": "to-fast-properties@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.2.tgz" - }, - "to-no-case": { - "version": "1.0.2", - "from": "to-no-case@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz" - }, - "to-space-case": { - "version": "1.0.0", - "from": "to-space-case@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-1.0.0.tgz" - }, - "trim-newlines": { - "version": "1.0.0", - "from": "trim-newlines@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz" - }, - "tryit": { - "version": "1.0.2", - "from": "tryit@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.2.tgz" - }, - "tty-browserify": { - "version": "0.0.0", - "from": "tty-browserify@0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz" - }, - "tv4": { - "version": "1.2.7", - "from": "tv4@>=1.2.7 <2.0.0", - "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.2.7.tgz" - }, - "type-check": { - "version": "0.3.2", - "from": "type-check@>=0.3.2 <0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" - }, - "type-detect": { - "version": "1.0.0", - "from": "type-detect@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz" - }, - "type-is": { - "version": "1.6.13", - "from": "type-is@>=1.6.10 <1.7.0", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.13.tgz" - }, - "typedarray": { - "version": "0.0.6", - "from": "typedarray@>=0.0.6 <0.0.7", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" - }, - "ua-parser-js": { - "version": "0.7.12", - "from": "ua-parser-js@>=0.7.9 <0.8.0", - "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.12.tgz" - }, - "uglify-to-browserify": { - "version": "1.0.2", - "from": "uglify-to-browserify@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz" - }, - "uniq": { - "version": "1.0.1", - "from": "uniq@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz" - }, - "uniqid": { - "version": "1.0.0", - "from": "uniqid@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/uniqid/-/uniqid-1.0.0.tgz" - }, - "uniqs": { - "version": "2.0.0", - "from": "uniqs@>=2.0.0 <3.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz" - }, - "unique-stream": { - "version": "1.0.0", - "from": "unique-stream@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz" - }, - "unpipe": { - "version": "1.0.0", - "from": "unpipe@1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" - }, - "url": { - "version": "0.10.3", - "from": "url@>=0.10.1 <0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "dependencies": { - "punycode": { - "version": "1.3.2", - "from": "punycode@1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz" - } - } - }, - "url-loader": { - "version": "0.5.7", - "from": "url-loader@0.5.7", - "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-0.5.7.tgz", - "dependencies": { - "mime": { - "version": "1.2.11", - "from": "mime@>=1.2.0 <1.3.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz" - } - } - }, - "user-home": { - "version": "1.1.1", - "from": "user-home@>=1.1.1 <2.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz" - }, - "util": { - "version": "0.10.3", - "from": "util@>=0.10.3 <0.11.0", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz" - }, - "util-deprecate": { - "version": "1.0.2", - "from": "util-deprecate@>=1.0.1 <1.1.0", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - }, - "v8flags": { - "version": "2.0.11", - "from": "v8flags@>=2.0.2 <3.0.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.0.11.tgz" - }, - "validate-npm-package-license": { - "version": "3.0.1", - "from": "validate-npm-package-license@>=3.0.1 <4.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz" - }, - "value-equal": { - "version": "0.2.1", - "from": "value-equal@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.2.1.tgz" - }, - "vinyl": { - "version": "0.5.3", - "from": "vinyl@>=0.5.0 <0.6.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz" - }, - "vinyl-bufferstream": { - "version": "1.0.1", - "from": "vinyl-bufferstream@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/vinyl-bufferstream/-/vinyl-bufferstream-1.0.1.tgz" - }, - "vinyl-file": { - "version": "1.3.0", - "from": "vinyl-file@>=1.2.1 <2.0.0", - "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-1.3.0.tgz", - "dependencies": { - "vinyl": { - "version": "1.1.1", - "from": "vinyl@>=1.1.0 <2.0.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.1.1.tgz" - } - } - }, - "vinyl-fs": { - "version": "0.3.14", - "from": "vinyl-fs@>=0.3.0 <0.4.0", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", - "dependencies": { - "clone": { - "version": "0.2.0", - "from": "clone@>=0.2.0 <0.3.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz" - }, - "graceful-fs": { - "version": "3.0.8", - "from": "graceful-fs@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.8.tgz" - }, - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.33-1 <1.1.0-0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "strip-bom": { - "version": "1.0.0", - "from": "strip-bom@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz" - }, - "through2": { - "version": "0.6.5", - "from": "through2@>=0.6.1 <0.7.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz" - }, - "vinyl": { - "version": "0.4.6", - "from": "vinyl@>=0.4.0 <0.5.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz" - } - } - }, - "vinyl-map": { - "version": "1.0.1", - "from": "vinyl-map@>=1.0.1 <2.0.0", - "resolved": "https://registry.npmjs.org/vinyl-map/-/vinyl-map-1.0.1.tgz", - "dependencies": { - "isarray": { - "version": "0.0.1", - "from": "isarray@0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - }, - "readable-stream": { - "version": "1.0.34", - "from": "readable-stream@>=1.0.17 <1.1.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" - }, - "through2": { - "version": "0.4.2", - "from": "through2@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz" - }, - "xtend": { - "version": "2.1.2", - "from": "xtend@>=2.1.1 <2.2.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" - } - } - }, - "vinyl-sourcemaps-apply": { - "version": "0.2.1", - "from": "vinyl-sourcemaps-apply@0.2.1", - "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz" - }, - "vm-browserify": { - "version": "0.0.4", - "from": "vm-browserify@0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz" - }, - "warning": { - "version": "3.0.0", - "from": "warning@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz" - }, - "watchpack": { - "version": "0.2.9", - "from": "watchpack@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", - "dependencies": { - "async": { - "version": "0.9.2", - "from": "async@>=0.9.0 <0.10.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz" - } - } - }, - "webpack": { - "version": "1.13.1", - "from": "webpack@1.13.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.13.1.tgz", - "dependencies": { - "async": { - "version": "1.5.2", - "from": "async@>=1.3.0 <2.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz" - }, - "interpret": { - "version": "0.6.6", - "from": "interpret@>=0.6.4 <0.7.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz" - }, - "uglify-js": { - "version": "2.6.2", - "from": "uglify-js@>=2.6.0 <2.7.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.2.tgz", - "dependencies": { - "async": { - "version": "0.2.10", - "from": "async@>=0.2.6 <0.3.0", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" - } - } - } - } - }, - "webpack-core": { - "version": "0.6.8", - "from": "webpack-core@>=0.6.0 <0.7.0", - "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.8.tgz", - "dependencies": { - "source-map": { - "version": "0.4.4", - "from": "source-map@>=0.4.1 <0.5.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz" - } - } - }, - "webpack-sources": { - "version": "0.1.3", - "from": "webpack-sources@>=0.1.0 <0.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-0.1.3.tgz" - }, - "webpack-stream": { - "version": "2.1.1", - "from": "webpack-stream@2.1.1", - "resolved": "https://registry.npmjs.org/webpack-stream/-/webpack-stream-2.1.1.tgz", - "dependencies": { - "memory-fs": { - "version": "0.2.0", - "from": "memory-fs@>=0.2.0 <0.3.0-0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz" - } - } - }, - "websocket-driver": { - "version": "0.6.5", - "from": "websocket-driver@>=0.3.6", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz" - }, - "websocket-extensions": { - "version": "0.1.1", - "from": "websocket-extensions@>=0.1.1", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz" - }, - "whatwg-fetch": { - "version": "2.0.2", - "from": "whatwg-fetch@>=0.10.0", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.2.tgz" - }, - "whet.extend": { - "version": "0.9.9", - "from": "whet.extend@>=0.9.9 <0.10.0", - "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz" - }, - "which": { - "version": "1.2.9", - "from": "which@>=1.2.4 <2.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.9.tgz" - }, - "window-size": { - "version": "0.1.0", - "from": "window-size@0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz" - }, - "wordwrap": { - "version": "1.0.0", - "from": "wordwrap@>=1.0.0 <1.1.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" - }, - "wrappy": { - "version": "1.0.2", - "from": "wrappy@>=1.0.0 <2.0.0", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - }, - "write": { - "version": "0.2.1", - "from": "write@>=0.2.1 <0.3.0", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz" - }, - "write-file-stdout": { - "version": "0.0.2", - "from": "write-file-stdout@0.0.2", - "resolved": "https://registry.npmjs.org/write-file-stdout/-/write-file-stdout-0.0.2.tgz" - }, - "xregexp": { - "version": "3.1.1", - "from": "xregexp@>=3.0.0 <4.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-3.1.1.tgz" - }, - "xtend": { - "version": "4.0.1", - "from": "xtend@>=4.0.0 <5.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" - }, - "yargs": { - "version": "3.10.0", - "from": "yargs@>=3.10.0 <3.11.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "dependencies": { - "camelcase": { - "version": "1.2.1", - "from": "camelcase@>=1.0.2 <2.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz" - } - } - } - } -} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..6ec7adadf --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8409 @@ +{ + "name": "lidarr", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "requires": { + "acorn": "3.3.0" + } + }, + "acorn-to-esprima": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/acorn-to-esprima/-/acorn-to-esprima-2.0.8.tgz", + "integrity": "sha1-AD8MZC65ITL0F9NwjxStqCrfLrE=" + }, + "add-px-to-style": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/add-px-to-style/-/add-px-to-style-1.0.0.tgz", + "integrity": "sha1-0ME1RB+oAUqBN5BFMQlvZ/KPJjo=" + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=" + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" + }, + "array-slice": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz", + "integrity": "sha1-5zA08A3MH0CHYAj9IP6ud71LfC8=" + }, + "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.3" + } + }, + "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.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "requires": { + "util": "0.10.3" + } + }, + "assertion-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", + "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=" + }, + "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=" + }, + "autoprefixer": { + "version": "6.3.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.3.6.tgz", + "integrity": "sha1-3ncuH82gjc4OmSzs95JS1fAI42c=", + "requires": { + "browserslist": "1.3.6", + "caniuse-db": "1.0.30000721", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-core": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.9.0.tgz", + "integrity": "sha1-04wiGw7QLmKKGxDaqSAVGCEnLUE=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.0", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.0", + "debug": "2.6.8", + "json5": "0.4.0", + "lodash": "4.17.4", + "minimatch": "2.0.10", + "path-exists": "1.0.0", + "path-is-absolute": "1.0.1", + "private": "0.1.7", + "shebang-regex": "1.0.0", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, + "babel-eslint": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.1.0.tgz", + "integrity": "sha1-1QalF0uiJOJaLRfhKOK6iYcTndw=", + "requires": { + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash.pickby": "4.6.0" + } + }, + "babel-generator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "babel-helper-builder-binary-assignment-operator-visitor": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", + "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", + "requires": { + "babel-helper-explode-assignable-expression": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-builder-react-jsx": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz", + "integrity": "sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "esutils": "2.0.2" + } + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "requires": { + "babel-helper-hoist-variables": "6.24.1", + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.4" + } + }, + "babel-helper-explode-assignable-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", + "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "requires": { + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.4" + } + }, + "babel-helper-remap-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", + "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "requires": { + "babel-helper-optimise-call-expression": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-loader": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-6.2.4.tgz", + "integrity": "sha1-qnCv+N3CI6WVLoOaQ6bDpMi/oek=", + "requires": { + "loader-utils": "0.2.17", + "mkdirp": "0.5.1", + "object-assign": "4.1.1" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=" + }, + "babel-plugin-syntax-async-generators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=" + }, + "babel-plugin-syntax-class-properties": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=" + }, + "babel-plugin-syntax-decorators": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=" + }, + "babel-plugin-syntax-exponentiation-operator": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=" + }, + "babel-plugin-syntax-flow": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=" + }, + "babel-plugin-syntax-jsx": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", + "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=" + }, + "babel-plugin-syntax-trailing-function-commas": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", + "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=" + }, + "babel-plugin-transform-async-generator-functions": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", + "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", + "requires": { + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-generators": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-async-to-generator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", + "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", + "requires": { + "babel-helper-remap-async-to-generator": "6.24.1", + "babel-plugin-syntax-async-functions": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-class-properties": { + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.16.0.tgz", + "integrity": "sha1-lpvKJNNOQB0hTza4r1wTRoWbyQQ=", + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-plugin-syntax-class-properties": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-decorators-legacy": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators-legacy/-/babel-plugin-transform-decorators-legacy-1.3.4.tgz", + "integrity": "sha1-dBtY9sW86eYCfgiC2cmU8E82aSU=", + "requires": { + "babel-plugin-syntax-decorators": "6.13.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "lodash": "4.17.4" + } + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "requires": { + "babel-helper-define-map": "6.26.0", + "babel-helper-function-name": "6.24.1", + "babel-helper-optimise-call-expression": "6.24.1", + "babel-helper-replace-supers": "6.24.1", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "requires": { + "babel-helper-function-name": "6.24.1", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", + "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "requires": { + "babel-plugin-transform-strict-mode": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "requires": { + "babel-helper-replace-supers": "6.24.1", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "requires": { + "babel-helper-call-delegate": "6.24.1", + "babel-helper-get-function-arity": "6.24.1", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "requires": { + "babel-helper-regex": "6.26.0", + "babel-runtime": "6.26.0", + "regexpu-core": "2.0.0" + } + }, + "babel-plugin-transform-exponentiation-operator": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", + "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", + "requires": { + "babel-helper-builder-binary-assignment-operator-visitor": "6.24.1", + "babel-plugin-syntax-exponentiation-operator": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-flow-strip-types": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", + "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "requires": { + "babel-plugin-syntax-flow": "6.18.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "requires": { + "babel-plugin-syntax-object-rest-spread": "6.13.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-react-display-name": { + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz", + "integrity": "sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-react-jsx": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz", + "integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=", + "requires": { + "babel-helper-builder-react-jsx": "6.26.0", + "babel-plugin-syntax-jsx": "6.18.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-react-jsx-self": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", + "integrity": "sha1-322AqdomEqEh5t3XVYvL7PBuY24=", + "requires": { + "babel-plugin-syntax-jsx": "6.18.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-react-jsx-source": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", + "integrity": "sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY=", + "requires": { + "babel-plugin-syntax-jsx": "6.18.0", + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "requires": { + "regenerator-transform": "0.10.1" + } + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0" + } + }, + "babel-preset-decorators-legacy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-decorators-legacy/-/babel-preset-decorators-legacy-1.0.0.tgz", + "integrity": "sha1-h3cuxTA8Wjt0jORQyEAJdWYtFzE=", + "requires": { + "babel-plugin-transform-decorators-legacy": "1.3.4" + } + }, + "babel-preset-es2015": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.9.0.tgz", + "integrity": "sha1-leRxasRIHfswmZy1wRGBThraD0E=", + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-regenerator": "6.26.0" + } + }, + "babel-preset-react": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.22.0.tgz", + "integrity": "sha1-e8l+LXPuxLmA+2tOTgiE6BzNwWU=", + "requires": { + "babel-plugin-syntax-flow": "6.18.0", + "babel-plugin-syntax-jsx": "6.18.0", + "babel-plugin-transform-flow-strip-types": "6.22.0", + "babel-plugin-transform-react-display-name": "6.25.0", + "babel-plugin-transform-react-jsx": "6.24.1", + "babel-plugin-transform-react-jsx-self": "6.22.0", + "babel-plugin-transform-react-jsx-source": "6.22.0" + } + }, + "babel-preset-stage-2": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.5.0.tgz", + "integrity": "sha1-BMkh987hdqlmmacYX1OYmNjDdNc=", + "requires": { + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-object-rest-spread": "6.26.0", + "babel-preset-stage-3": "6.24.1" + } + }, + "babel-preset-stage-3": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", + "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "requires": { + "babel-plugin-syntax-trailing-function-commas": "6.22.0", + "babel-plugin-transform-async-generator-functions": "6.24.1", + "babel-plugin-transform-async-to-generator": "6.24.1", + "babel-plugin-transform-exponentiation-operator": "6.24.1", + "babel-plugin-transform-object-rest-spread": "6.26.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "requires": { + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.1", + "home-or-tmp": "2.0.0", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "source-map-support": "0.4.17" + }, + "dependencies": { + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.0", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.0", + "debug": "2.6.8", + "json5": "0.5.1", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.7", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "2.5.1", + "regenerator-runtime": "0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.8", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" + }, + "base64-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", + "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==" + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=" + }, + "big.js": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.1.3.tgz", + "integrity": "sha1-TK2iGTZS6zyp7I5VyQFWacmAaXg=" + }, + "binary-extensions": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.10.0.tgz", + "integrity": "sha1-muuabF6IY4qtFx4Wf1kAq+JINdA=" + }, + "bl": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", + "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", + "requires": { + "readable-stream": "2.3.3" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "requires": { + "inherits": "2.0.3" + } + }, + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + }, + "body-parser": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz", + "integrity": "sha1-EBXLH+LEQ4WCWVgdtTMy+NDPUPk=", + "requires": { + "bytes": "2.2.0", + "content-type": "1.0.2", + "debug": "2.2.0", + "depd": "1.1.1", + "http-errors": "1.3.1", + "iconv-lite": "0.4.13", + "on-finished": "2.3.0", + "qs": "5.2.0", + "raw-body": "2.1.7", + "type-is": "1.6.15" + }, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "requires": { + "ms": "0.7.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=" + }, + "qs": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz", + "integrity": "sha1-qfMRQq9GjLcrJbMBNrokVoNJFr4=" + } + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "browserify-zlib": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", + "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", + "requires": { + "pako": "0.2.9" + } + }, + "browserslist": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.3.6.tgz", + "integrity": "sha1-lS/0jVZGPTtTj4XvL46t39KEsTM=", + "requires": { + "caniuse-db": "1.0.30000721" + } + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "requires": { + "base64-js": "1.2.1", + "ieee754": "1.1.8", + "isarray": "1.0.0" + } + }, + "bufferstreams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-1.0.1.tgz", + "integrity": "sha1-z7GtlWjTujz+k1upq92VLeiKqyo=", + "requires": { + "readable-stream": "1.1.14" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "bytes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz", + "integrity": "sha1-/TVGSkA/b5EXwt42Cez/nK4ABYg=" + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "requires": { + "callsites": "0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" + }, + "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.1.1", + "map-obj": "1.0.1" + } + }, + "caniuse-api": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz", + "integrity": "sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=", + "requires": { + "browserslist": "1.3.6", + "caniuse-db": "1.0.30000721", + "lodash.memoize": "4.1.2", + "lodash.uniq": "4.5.0" + } + }, + "caniuse-db": { + "version": "1.0.30000721", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000721.tgz", + "integrity": "sha1-zcUu/o+C3RORZhW3job3BOzmGAI=" + }, + "caniuse-lite": { + "version": "1.0.30000721", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000721.tgz", + "integrity": "sha1-kxohp72FAWMAMo0h8SbYS3NDfTU=" + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chai": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz", + "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=", + "requires": { + "assertion-error": "1.0.2", + "deep-eql": "0.1.3", + "type-detect": "1.0.0" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" + }, + "clap": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.0.tgz", + "integrity": "sha1-WckP4+E3EEdG/xlGmiemNP9oyFc=", + "requires": { + "chalk": "1.1.3" + } + }, + "classnames": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.5.tgz", + "integrity": "sha1-+zgB1FNGdknvNgPH1hoCvRKb3m0=" + }, + "clean-css": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.2.tgz", + "integrity": "sha1-YCmuowsdlSCpaKPK7g2rsRhONTo=", + "requires": { + "source-map": "0.5.7" + } + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" + }, + "clipboard": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-1.7.1.tgz", + "integrity": "sha1-Ng1taUbpmnof7zleQrqStem1oWs=", + "requires": { + "good-listener": "1.2.2", + "select": "1.1.2", + "tiny-emitter": "2.0.2" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "clone": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", + "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=" + }, + "clone-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.0.tgz", + "integrity": "sha1-6uCiQT9VwJQvgYwin+/OhF1/Oxw=", + "requires": { + "is-regexp": "1.0.0", + "is-supported-regexp-flag": "1.0.0" + } + }, + "clone-stats": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", + "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "coa": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/coa/-/coa-1.0.4.tgz", + "integrity": "sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=", + "requires": { + "q": "1.5.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", + "requires": { + "clone": "1.0.2", + "color-convert": "1.9.0", + "color-string": "0.3.0" + } + }, + "color-convert": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "requires": { + "color-name": "1.1.3" + } + }, + "color-diff": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/color-diff/-/color-diff-0.1.7.tgz", + "integrity": "sha1-bbeM2UgqjkWdQIIer0tQMoPcuOI=" + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "color-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "requires": { + "color-name": "1.1.3" + } + }, + "colorguard": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/colorguard/-/colorguard-1.2.0.tgz", + "integrity": "sha1-8/rK9cquuk71RlPZ+yW7cxd8DYQ=", + "requires": { + "chalk": "1.1.3", + "color-diff": "0.1.7", + "log-symbols": "1.0.2", + "object-assign": "4.1.1", + "pipetteur": "2.0.3", + "plur": "2.1.2", + "postcss": "5.2.17", + "postcss-reporter": "1.4.1", + "text-table": "0.2.0", + "yargs": "1.3.3" + } + }, + "colormin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", + "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", + "requires": { + "color": "0.11.4", + "css-color-names": "0.0.4", + "has": "1.0.1" + } + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3", + "typedarray": "0.0.6" + } + }, + "concat-with-sourcemaps": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.0.4.tgz", + "integrity": "sha1-9Vs74q60dgGxCi1SWcz7cP0vHdY=", + "requires": { + "source-map": "0.5.7" + } + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "requires": { + "date-now": "0.1.4" + } + }, + "consolidate": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.14.5.tgz", + "integrity": "sha1-WiUEe8dvcwcmZ8jLUsmJiI9JTGM=", + "requires": { + "bluebird": "3.5.0" + } + }, + "constants-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", + "integrity": "sha1-kld9tSe6bEzwpFaNhLwDH0QeIfI=" + }, + "content-type": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz", + "integrity": "sha1-t9ETrueo3Se9IRM8TcJSnfFyHu0=" + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=" + }, + "core-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cosmiconfig": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-1.1.0.tgz", + "integrity": "sha1-DeoPmATv37kp+7GxiOJVU+oFPTc=", + "requires": { + "graceful-fs": "4.1.11", + "js-yaml": "3.7.0", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "os-homedir": "1.0.2", + "parse-json": "2.2.0", + "pinkie-promise": "2.0.1", + "require-from-string": "1.2.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "create-react-class": { + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.0.tgz", + "integrity": "sha1-q0SEl8JlZuHilBPogyB9V8/nvtQ=", + "requires": { + "fbjs": "0.8.14", + "loose-envify": "1.3.1", + "object-assign": "4.1.1" + } + }, + "crypto-browserify": { + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.2.8.tgz", + "integrity": "sha1-ubEdvm2WUd2IKgHmzEZ99xjs8Yk=", + "requires": { + "pbkdf2-compat": "2.0.1", + "ripemd160": "0.2.0", + "sha.js": "2.2.6" + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=" + }, + "css-loader": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-0.23.1.tgz", + "integrity": "sha1-n6I/K1wJZSNZEK1ezvO4o2OQ/lA=", + "requires": { + "css-selector-tokenizer": "0.5.4", + "cssnano": "3.10.0", + "loader-utils": "0.2.17", + "lodash.camelcase": "3.0.1", + "object-assign": "4.1.1", + "postcss": "5.2.17", + "postcss-modules-extract-imports": "1.1.0", + "postcss-modules-local-by-default": "1.2.0", + "postcss-modules-scope": "1.1.0", + "postcss-modules-values": "1.3.0", + "source-list-map": "0.1.8" + } + }, + "css-rule-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/css-rule-stream/-/css-rule-stream-1.1.0.tgz", + "integrity": "sha1-N4bnGYmD2WWibjGVfgkHjLt3BaI=", + "requires": { + "css-tokenize": "1.0.1", + "duplexer2": "0.0.2", + "ldjson-stream": "1.2.1", + "through2": "0.6.5" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "css-selector-tokenizer": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.5.4.tgz", + "integrity": "sha1-E5uv00o1/QwUKEhwSeBpnm9qLCE=", + "requires": { + "cssesc": "0.1.0", + "fastparse": "1.1.1" + } + }, + "css-tokenize": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/css-tokenize/-/css-tokenize-1.0.1.tgz", + "integrity": "sha1-RiXLHtohwUOFi3+B1oA8HSb8FL4=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "1.1.14" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "cssesc": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", + "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=" + }, + "cssnano": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz", + "integrity": "sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=", + "requires": { + "autoprefixer": "6.3.6", + "decamelize": "1.2.0", + "defined": "1.0.0", + "has": "1.0.1", + "object-assign": "4.1.1", + "postcss": "5.2.17", + "postcss-calc": "5.3.1", + "postcss-colormin": "2.2.2", + "postcss-convert-values": "2.6.1", + "postcss-discard-comments": "2.0.4", + "postcss-discard-duplicates": "2.1.0", + "postcss-discard-empty": "2.1.0", + "postcss-discard-overridden": "0.1.1", + "postcss-discard-unused": "2.2.3", + "postcss-filter-plugins": "2.0.2", + "postcss-merge-idents": "2.1.7", + "postcss-merge-longhand": "2.0.2", + "postcss-merge-rules": "2.1.2", + "postcss-minify-font-values": "1.0.5", + "postcss-minify-gradients": "1.0.5", + "postcss-minify-params": "1.2.2", + "postcss-minify-selectors": "2.1.1", + "postcss-normalize-charset": "1.1.1", + "postcss-normalize-url": "3.0.8", + "postcss-ordered-values": "2.2.3", + "postcss-reduce-idents": "2.4.0", + "postcss-reduce-initial": "1.0.1", + "postcss-reduce-transforms": "1.0.4", + "postcss-svgo": "2.1.6", + "postcss-unique-selectors": "2.0.2", + "postcss-value-parser": "3.3.0", + "postcss-zindex": "2.2.0" + } + }, + "csso": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/csso/-/csso-2.3.2.tgz", + "integrity": "sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=", + "requires": { + "clap": "1.2.0", + "source-map": "0.5.7" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "requires": { + "array-find-index": "1.0.2" + } + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "0.10.30" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "requires": { + "get-stdin": "4.0.1", + "meow": "3.7.0" + } + }, + "debug": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", + "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "requires": { + "type-detect": "0.1.1" + }, + "dependencies": { + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=" + } + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "requires": { + "clone": "1.0.2" + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, + "del": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.0.tgz", + "integrity": "sha1-mlDwS/NzJeKDtPROmFM2wlJFa9U=", + "requires": { + "globby": "4.1.0", + "is-path-cwd": "1.0.0", + "is-path-in-cwd": "1.0.0", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "rimraf": "2.6.1" + } + }, + "delegate": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.1.3.tgz", + "integrity": "sha1-moJRp3fXAl+qVXN7w7BxdCEnqf0=" + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "deprecated": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", + "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=" + }, + "detect-file": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", + "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=", + "requires": { + "fs-exists-sync": "0.1.0" + } + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "requires": { + "repeating": "2.0.1" + } + }, + "diff": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", + "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=" + }, + "disparity": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/disparity/-/disparity-2.0.0.tgz", + "integrity": "sha1-V92stHMkrl9Y0swNqIbbTOnutxg=", + "requires": { + "ansi-styles": "2.2.1", + "diff": "1.4.0" + } + }, + "disposables": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/disposables/-/disposables-1.0.1.tgz", + "integrity": "sha1-BkcnoltU9QK9griaot+4358bOeM=" + }, + "dnd-core": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-2.4.0.tgz", + "integrity": "sha1-xKW8Kup1Fk+KKV12nV9VGBDn1BE=", + "requires": { + "asap": "2.0.6", + "invariant": "2.2.2", + "lodash": "4.17.4", + "redux": "3.7.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "requires": { + "esutils": "2.0.2", + "isarray": "1.0.0" + } + }, + "doiuse": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/doiuse/-/doiuse-2.6.0.tgz", + "integrity": "sha1-GJLRC2Gpo1at2/K2FJM+gfi7ODQ=", + "requires": { + "browserslist": "1.3.6", + "caniuse-db": "1.0.30000721", + "css-rule-stream": "1.1.0", + "duplexer2": "0.0.2", + "jsonfilter": "1.1.2", + "ldjson-stream": "1.2.1", + "lodash": "4.17.4", + "multimatch": "2.1.0", + "postcss": "5.2.17", + "source-map": "0.4.4", + "through2": "0.6.5", + "yargs": "3.32.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" + } + } + } + }, + "dom-css": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/dom-css/-/dom-css-2.1.0.tgz", + "integrity": "sha1-/bwtWgFdCj4YcuEUcrvQ57nmogI=", + "requires": { + "add-px-to-style": "1.0.0", + "prefix-style": "2.0.1", + "to-camel-case": "1.0.0" + } + }, + "dom-helpers": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.2.1.tgz", + "integrity": "sha1-MgPgf+0he9H0JLAZc1WC/Deyglo=" + }, + "domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=" + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + }, + "duplexer2": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", + "requires": { + "readable-stream": "1.1.14" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "electron-to-chromium": { + "version": "1.3.20", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.20.tgz", + "integrity": "sha1-Lu3VzLrn3cVX9orR/OnBcukV5OU=" + }, + "element-class": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/element-class/-/element-class-0.2.2.tgz", + "integrity": "sha1-nTu9B2f5AT744cjr5yLBQCpgBQ4=" + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "0.4.13" + } + }, + "end-of-stream": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", + "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", + "requires": { + "once": "1.3.3" + }, + "dependencies": { + "once": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", + "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", + "requires": { + "wrappy": "1.0.2" + } + } + } + }, + "enhanced-resolve": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz", + "integrity": "sha1-TW5omzcl+GCQknzMhs2fFjW4ni4=", + "requires": { + "graceful-fs": "4.1.11", + "memory-fs": "0.2.0", + "tapable": "0.1.10" + }, + "dependencies": { + "memory-fs": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", + "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=" + } + } + }, + "errno": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", + "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", + "requires": { + "prr": "0.0.0" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es5-ext": { + "version": "0.10.30", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.30.tgz", + "integrity": "sha1-cUGhaDZpfbq/qq7uQUlc4p9SyTk=", + "requires": { + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "es6-iterator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz", + "integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30", + "es6-symbol": "3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30", + "es6-iterator": "2.0.1", + "es6-set": "0.1.5", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30", + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30", + "es6-iterator": "2.0.1", + "es6-symbol": "3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "requires": { + "es6-map": "0.1.5", + "es6-weak-map": "2.0.2", + "esrecurse": "4.2.0", + "estraverse": "4.2.0" + } + }, + "esformatter": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/esformatter/-/esformatter-0.9.3.tgz", + "integrity": "sha1-LUFaDF6y5yxD3fupA1riwEZwC1M=", + "requires": { + "acorn-to-esprima": "2.0.8", + "babel-traverse": "6.26.0", + "babylon": "6.18.0", + "debug": "0.7.4", + "disparity": "2.0.0", + "glob": "5.0.15", + "minimist": "1.2.0", + "mout": "1.0.0", + "npm-run": "2.0.0", + "resolve": "1.4.0", + "rocambole": "0.7.0", + "rocambole-indent": "2.0.4", + "rocambole-linebreak": "1.0.2", + "rocambole-node": "1.0.0", + "rocambole-token": "1.2.1", + "rocambole-whitespace": "1.0.0", + "stdin": "0.0.1", + "strip-json-comments": "0.1.3", + "supports-color": "1.3.1", + "user-home": "2.0.0" + }, + "dependencies": { + "debug": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz", + "integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk=" + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "supports-color": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.3.1.tgz", + "integrity": "sha1-FXWN8J2P87SswwdTn6vicJXhBC0=" + } + } + }, + "eslint": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-2.10.2.tgz", + "integrity": "sha1-sjCUgv7wQ9MgM2WjIShebM4Bw9c=", + "requires": { + "chalk": "1.1.3", + "concat-stream": "1.6.0", + "debug": "2.6.8", + "doctrine": "1.5.0", + "es6-map": "0.1.5", + "escope": "3.6.0", + "espree": "3.1.4", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "file-entry-cache": "1.3.1", + "glob": "7.1.2", + "globals": "9.18.0", + "ignore": "3.3.5", + "imurmurhash": "0.1.4", + "inquirer": "0.12.0", + "is-my-json-valid": "2.16.1", + "is-resolvable": "1.0.0", + "js-yaml": "3.7.0", + "json-stable-stringify": "1.0.1", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "optionator": "0.8.2", + "path-is-absolute": "1.0.1", + "path-is-inside": "1.0.2", + "pluralize": "1.2.1", + "progress": "1.1.8", + "require-uncached": "1.0.3", + "shelljs": "0.6.1", + "strip-json-comments": "1.0.4", + "table": "3.8.3", + "text-table": "0.2.0", + "user-home": "2.0.0" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=" + } + } + }, + "eslint-loader": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-1.3.0.tgz", + "integrity": "sha1-AuKI1hQ0EXwmAAdYyHaMm/kiSnY=", + "requires": { + "loader-utils": "0.2.17", + "object-assign": "4.1.1" + } + }, + "eslint-plugin-filenames": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-filenames/-/eslint-plugin-filenames-1.0.0.tgz", + "integrity": "sha1-qEKP1UnoBG5M6djL81efr2mub3w=" + }, + "eslint-plugin-react": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-5.2.2.tgz", + "integrity": "sha1-fbBo4fVIf2hx5N7vNqOBwwPqwWE=", + "requires": { + "doctrine": "1.5.0", + "jsx-ast-utils": "1.4.1" + } + }, + "espree": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.4.tgz", + "integrity": "sha1-BybXrIOvl6fISY2ps2OjYJ0qaKE=", + "requires": { + "acorn": "3.3.0", + "acorn-jsx": "3.0.1" + } + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" + }, + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "requires": { + "estraverse": "4.2.0", + "object-assign": "4.1.1" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1.0.0", + "es5-ext": "0.10.30" + } + }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "requires": { + "duplexer": "0.1.1", + "from": "0.1.7", + "map-stream": "0.1.0", + "pause-stream": "0.0.11", + "split": "0.3.3", + "stream-combiner": "0.0.4", + "through": "2.3.8" + } + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" + }, + "execall": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execall/-/execall-1.0.0.tgz", + "integrity": "sha1-c9CQTjlbPKsGWLCNCewlMH8pu3M=", + "requires": { + "clone-regexp": "1.0.0" + } + }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=" + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "2.2.3" + } + }, + "expand-tilde": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", + "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", + "requires": { + "os-homedir": "1.0.2" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "extract-text-webpack-plugin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-1.0.1.tgz", + "integrity": "sha1-yVvzy6rEnclvHcbgclSfu2VMzSw=", + "requires": { + "async": "1.5.2", + "loader-utils": "0.2.17", + "webpack-sources": "0.1.5" + } + }, + "fancy-log": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", + "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", + "requires": { + "chalk": "1.1.3", + "time-stamp": "1.1.0" + } + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "fastparse": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", + "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=" + }, + "faye-websocket": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.7.3.tgz", + "integrity": "sha1-zEB0x/Sk39A69U3WXDVLE1EyzhE=", + "requires": { + "websocket-driver": "0.6.5" + } + }, + "fbjs": { + "version": "0.8.14", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.14.tgz", + "integrity": "sha1-0dviviVMNakeCfMfnNUKQLKg7Rw=", + "requires": { + "core-js": "1.2.7", + "isomorphic-fetch": "2.2.1", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "promise": "7.3.1", + "setimmediate": "1.0.5", + "ua-parser-js": "0.7.14" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + } + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "file-entry-cache": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz", + "integrity": "sha1-RMYepgeuS+nBQC9B9EJwy/4zT/g=", + "requires": { + "flat-cache": "1.2.2", + "object-assign": "4.1.1" + } + }, + "file-loader": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-0.9.0.tgz", + "integrity": "sha1-HS2t3UJM5tGwfP4/eXMb7TYXq0I=", + "requires": { + "loader-utils": "0.2.17" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" + }, + "filesize": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.5.4.tgz", + "integrity": "sha1-dC/H+2rvTuOHhoJgDCL4QHMeH9o=" + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-index": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", + "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=" + }, + "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.1.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "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.1" + } + } + } + }, + "findup-sync": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", + "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=", + "requires": { + "detect-file": "0.1.0", + "is-glob": "2.0.1", + "micromatch": "2.3.11", + "resolve-dir": "0.1.1" + } + }, + "fined": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz", + "integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=", + "requires": { + "expand-tilde": "2.0.2", + "is-plain-object": "2.0.4", + "object.defaults": "1.1.0", + "object.pick": "1.3.0", + "parse-filepath": "1.0.1" + }, + "dependencies": { + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "requires": { + "homedir-polyfill": "1.0.1" + } + } + } + }, + "first-chunk-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", + "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=" + }, + "flagged-respawn": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", + "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=" + }, + "flat-cache": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz", + "integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=", + "requires": { + "circular-json": "0.3.3", + "del": "2.2.0", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "flatten": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "1.0.2" + } + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" + }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=" + }, + "fs-readfile-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fs-readfile-promise/-/fs-readfile-promise-2.0.1.tgz", + "integrity": "sha1-gAI4I5gfn//+AWCei+Zo9prknnA=", + "requires": { + "graceful-fs": "4.1.11" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", + "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "gather-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gather-stream/-/gather-stream-1.0.0.tgz", + "integrity": "sha1-szmUr0V6gRVwDUEPMXczy+egkEs=" + }, + "gaze": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", + "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", + "requires": { + "globule": "0.1.0" + } + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "requires": { + "is-property": "1.0.2" + } + }, + "get-node-dimensions": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-node-dimensions/-/get-node-dimensions-1.2.0.tgz", + "integrity": "sha1-lSmOMqdSoVXynrcQ4GlVe0p/6Yw=" + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" + }, + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "2.0.1" + } + }, + "glob-stream": { + "version": "3.1.18", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", + "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", + "requires": { + "glob": "4.5.3", + "glob2base": "0.0.12", + "minimatch": "2.0.10", + "ordered-read-streams": "0.1.0", + "through2": "0.6.5", + "unique-stream": "1.0.0" + }, + "dependencies": { + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "glob-watcher": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", + "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", + "requires": { + "gaze": "0.5.2" + } + }, + "glob2base": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", + "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "requires": { + "find-index": "0.1.1" + } + }, + "global-modules": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", + "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", + "requires": { + "global-prefix": "0.1.5", + "is-windows": "0.2.0" + } + }, + "global-prefix": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", + "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", + "requires": { + "homedir-polyfill": "1.0.1", + "ini": "1.3.4", + "is-windows": "0.2.0", + "which": "1.3.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "globby": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-4.1.0.tgz", + "integrity": "sha1-CA9UVJ7BuCpsYOYx/ILhIR2+lfg=", + "requires": { + "array-union": "1.0.2", + "arrify": "1.0.1", + "glob": "6.0.4", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "globjoin": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", + "integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=" + }, + "globule": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", + "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", + "requires": { + "glob": "3.1.21", + "lodash": "1.0.2", + "minimatch": "0.2.14" + }, + "dependencies": { + "glob": { + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", + "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", + "requires": { + "graceful-fs": "1.2.3", + "inherits": "1.0.2", + "minimatch": "0.2.14" + } + }, + "graceful-fs": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=" + }, + "inherits": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", + "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=" + }, + "lodash": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=" + }, + "minimatch": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", + "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + } + } + }, + "glogg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", + "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", + "requires": { + "sparkles": "1.0.0" + } + }, + "good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", + "requires": { + "delegate": "3.1.3" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=" + }, + "gulp": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", + "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", + "requires": { + "archy": "1.0.0", + "chalk": "1.1.3", + "deprecated": "0.0.1", + "gulp-util": "3.0.7", + "interpret": "1.0.3", + "liftoff": "2.3.0", + "minimist": "1.2.0", + "orchestrator": "0.3.8", + "pretty-hrtime": "1.0.3", + "semver": "4.3.6", + "tildify": "1.2.0", + "v8flags": "2.1.1", + "vinyl-fs": "0.3.14" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "gulp-cached": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/gulp-cached/-/gulp-cached-1.1.0.tgz", + "integrity": "sha1-1VmdvZIGIgGp0qutOmSl68JzknA=", + "requires": { + "lodash.defaults": "2.4.1", + "through2": "0.5.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "3.0.0" + } + }, + "xtend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=" + } + } + }, + "gulp-clean-css": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-3.3.1.tgz", + "integrity": "sha1-dvvGLOcHWzN1NmJhjia8BS2rFPY=", + "requires": { + "clean-css": "4.1.2", + "gulp-util": "3.0.8", + "through2": "2.0.3", + "vinyl-sourcemaps-apply": "0.2.1" + }, + "dependencies": { + "dateformat": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", + "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=" + }, + "gulp-util": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", + "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", + "requires": { + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "2.0.0", + "fancy-log": "1.3.0", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", + "replace-ext": "0.0.1", + "through2": "2.0.3", + "vinyl": "0.5.3" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" + } + } + }, + "gulp-concat": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.0.tgz", + "integrity": "sha1-WFz7EVQR80h3MTEUBWa2qBxpy5E=", + "requires": { + "concat-with-sourcemaps": "1.0.4", + "gulp-util": "3.0.7", + "through2": "0.6.5" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "gulp-declare": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/gulp-declare/-/gulp-declare-0.3.0.tgz", + "integrity": "sha1-hoMPxvqojgY4IWLIZkuOlJV6/Nk=", + "requires": { + "nsdeclare": "0.1.0", + "vinyl-map": "1.0.2", + "xtend": "4.0.1" + } + }, + "gulp-livereload": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/gulp-livereload/-/gulp-livereload-3.8.1.tgz", + "integrity": "sha1-APdEstdJ0+njdGWJyKRKysd5tQ8=", + "requires": { + "chalk": "0.5.1", + "debug": "2.6.8", + "event-stream": "3.3.4", + "gulp-util": "3.0.7", + "lodash.assign": "3.2.0", + "mini-lr": "0.1.9" + }, + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=" + }, + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=" + }, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", + "requires": { + "ansi-styles": "1.1.0", + "escape-string-regexp": "1.0.5", + "has-ansi": "0.1.0", + "strip-ansi": "0.3.0", + "supports-color": "0.2.0" + } + }, + "has-ansi": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", + "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", + "requires": { + "ansi-regex": "0.2.1" + } + }, + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", + "requires": { + "ansi-regex": "0.2.1" + } + }, + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=" + } + } + }, + "gulp-postcss": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/gulp-postcss/-/gulp-postcss-6.1.1.tgz", + "integrity": "sha1-h01E6f9srd3VfOPJVSAuVy0mkBU=", + "requires": { + "gulp-util": "3.0.7", + "postcss": "5.2.17", + "vinyl-sourcemaps-apply": "0.2.1" + } + }, + "gulp-print": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/gulp-print/-/gulp-print-2.0.1.tgz", + "integrity": "sha1-Gs7ljqyK8tPErTMp2+RldYOTxBQ=", + "requires": { + "gulp-util": "3.0.7", + "map-stream": "0.0.7" + }, + "dependencies": { + "map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=" + } + } + }, + "gulp-sourcemaps": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz", + "integrity": "sha1-uG/zSdgBzrVuHZ59x7vLS33uYAw=", + "requires": { + "convert-source-map": "1.5.0", + "graceful-fs": "4.1.11", + "strip-bom": "2.0.0", + "through2": "2.0.3", + "vinyl": "1.2.0" + }, + "dependencies": { + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "gulp-stripbom": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/gulp-stripbom/-/gulp-stripbom-1.0.4.tgz", + "integrity": "sha1-WMHQPoXgCKeqtH2BsSl8jBvIKOs=", + "requires": { + "gulp-util": "3.0.7", + "log-symbols": "1.0.2", + "strip-bom": "1.0.0", + "through2": "0.5.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "requires": { + "first-chunk-stream": "1.0.0", + "is-utf8": "0.2.1" + } + }, + "through2": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", + "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "3.0.0" + } + }, + "xtend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=" + } + } + }, + "gulp-util": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.7.tgz", + "integrity": "sha1-eJJcS4+LSQBawBoBHFV+YhiUHLs=", + "requires": { + "array-differ": "1.0.0", + "array-uniq": "1.0.3", + "beeper": "1.1.1", + "chalk": "1.1.3", + "dateformat": "1.0.12", + "fancy-log": "1.3.0", + "gulplog": "1.0.0", + "has-gulplog": "0.1.0", + "lodash._reescape": "3.0.0", + "lodash._reevaluate": "3.0.0", + "lodash._reinterpolate": "3.0.0", + "lodash.template": "3.6.2", + "minimist": "1.2.0", + "multipipe": "0.1.2", + "object-assign": "3.0.0", + "replace-ext": "0.0.1", + "through2": "2.0.3", + "vinyl": "0.5.3" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" + } + } + }, + "gulp-watch": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/gulp-watch/-/gulp-watch-4.3.5.tgz", + "integrity": "sha1-OpRYTWU/XH8ardjXeRF0tfqwSK8=", + "requires": { + "anymatch": "1.3.2", + "chokidar": "1.7.0", + "glob": "5.0.15", + "glob2base": "0.0.12", + "gulp-util": "3.0.7", + "path-is-absolute": "1.0.1", + "readable-stream": "2.3.3", + "vinyl": "0.5.3", + "vinyl-file": "1.3.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "2.0.10", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } + } + }, + "gulp-wrap": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/gulp-wrap/-/gulp-wrap-0.13.0.tgz", + "integrity": "sha1-kPsLSieiZkM4Mv98YSLbXB7olMY=", + "requires": { + "consolidate": "0.14.5", + "es6-promise": "3.3.1", + "fs-readfile-promise": "2.0.1", + "gulp-util": "3.0.7", + "js-yaml": "3.7.0", + "lodash": "4.17.4", + "node.extend": "1.1.6", + "through2": "2.0.3", + "tryit": "1.0.3", + "vinyl-bufferstream": "1.0.1" + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "requires": { + "glogg": "1.0.0" + } + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "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", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" + }, + "has-gulplog": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", + "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", + "requires": { + "sparkles": "1.0.0" + } + }, + "history": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/history/-/history-4.6.3.tgz", + "integrity": "sha1-bXI6hxLFgda+836MJvSu3G64aWc=", + "requires": { + "invariant": "2.2.2", + "loose-envify": "1.3.1", + "resolve-pathname": "2.2.0", + "value-equal": "0.2.1", + "warning": "3.0.0" + } + }, + "hoist-non-react-statics": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz", + "integrity": "sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs=" + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "homedir-polyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", + "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "requires": { + "parse-passwd": "1.0.0" + } + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" + }, + "html-comment-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", + "integrity": "sha1-ZouTd26q5V696POtRkswekljYl4=" + }, + "html-tags": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-1.2.0.tgz", + "integrity": "sha1-x43mW1Zjqll5id0rerSSANfk25g=" + }, + "http-browserify": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz", + "integrity": "sha1-M3la3nLfiKz7/TZ3PO/tp2RzWyA=", + "requires": { + "Base64": "0.2.1", + "inherits": "2.0.3" + } + }, + "http-errors": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz", + "integrity": "sha1-GX4izevUGYWF6GlO9nhhl7ke2UI=", + "requires": { + "inherits": "2.0.3", + "statuses": "1.3.1" + } + }, + "https-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.0.tgz", + "integrity": "sha1-s//f5zSyo9Sp79WOhlTJH86G6v0=" + }, + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=" + }, + "icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=" + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=" + }, + "ignore": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.5.tgz", + "integrity": "sha512-JLH93mL8amZQhh/p6mfQgVBH3M6epNq3DfsXsTSuSrInVjwyYlFE1nv2AgfRCC8PoOhM0jwQ5v8s9LgbK7yGDw==" + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "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.1" + } + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", + "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + }, + "inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "requires": { + "ansi-escapes": "1.4.0", + "ansi-regex": "2.1.1", + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-width": "2.2.0", + "figures": "1.7.0", + "lodash": "4.17.4", + "readline2": "1.0.1", + "run-async": "0.1.0", + "rx-lite": "3.1.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "through": "2.3.8" + } + }, + "interpret": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", + "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=" + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "requires": { + "loose-envify": "1.3.1" + } + }, + "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=" + }, + "irregular-plurals": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-1.3.0.tgz", + "integrity": "sha512-njf5A+Mxb3kojuHd1DzISjjIl+XhyzovXEOyPPSzdQozq/Lf2tN27mOrAAsxEPZxpn6I4MGzs1oo9TxXxPFpaA==" + }, + "is": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", + "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=" + }, + "is-absolute": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", + "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", + "requires": { + "is-relative": "0.2.1", + "is-windows": "0.2.0" + } + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "1.10.0" + } + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "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.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-my-json-valid": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", + "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", + "requires": { + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "3.2.2" + } + }, + "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.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "requires": { + "is-path-inside": "1.0.0" + } + }, + "is-path-inside": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz", + "integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=", + "requires": { + "path-is-inside": "1.0.2" + } + }, + "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", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" + }, + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=" + }, + "is-relative": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", + "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", + "requires": { + "is-unc-path": "0.1.2" + } + }, + "is-resolvable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", + "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", + "requires": { + "tryit": "1.0.3" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-supported-regexp-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.0.tgz", + "integrity": "sha1-i1IMhfrnolM4LUsCZS4EVXbhO7g=" + }, + "is-svg": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz", + "integrity": "sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=", + "requires": { + "html-comment-regex": "1.1.1" + } + }, + "is-unc-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", + "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", + "requires": { + "unc-path-regex": "0.1.2" + } + }, + "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": "0.2.0", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", + "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "requires": { + "node-fetch": "1.7.2", + "whatwg-fetch": "2.0.3" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jade": { + "version": "0.26.3", + "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", + "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=", + "requires": { + "commander": "0.6.1", + "mkdirp": "0.3.0" + }, + "dependencies": { + "commander": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz", + "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY=" + }, + "mkdirp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", + "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4=" + } + } + }, + "jdu": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/jdu/-/jdu-1.0.0.tgz", + "integrity": "sha1-KPHjiFAXha4KHZPpPtCxTdQeUc4=" + }, + "jquery": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz", + "integrity": "sha1-LInWiJterFIqfuoywUUhVZxsvwI=" + }, + "js-base64": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.1.9.tgz", + "integrity": "sha1-8OgK4DmkvWVLXygfyT8EqRSn/M4=" + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", + "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "requires": { + "argparse": "1.0.9", + "esprima": "2.7.3" + } + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "0.0.0" + } + }, + "json5": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz", + "integrity": "sha1-BUNS5MTIDIbAkjh31EneF2pzLI0=" + }, + "jsonfilter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/jsonfilter/-/jsonfilter-1.1.2.tgz", + "integrity": "sha1-Ie987cdRk4E8dZMulqmL4gW6WhE=", + "requires": { + "JSONStream": "0.8.4", + "minimist": "1.2.0", + "stream-combiner": "0.2.2", + "through2": "0.6.5" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "stream-combiner": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", + "integrity": "sha1-rsjLrBd7Vrb0+kec7YwZEs7lKFg=", + "requires": { + "duplexer": "0.1.1", + "through": "2.3.8" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsonparse": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz", + "integrity": "sha1-MwVCrT8KZUZlt3jz6y2an6UHrGQ=" + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" + }, + "JSONStream": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.8.4.tgz", + "integrity": "sha1-kWV9/m/4V0gwZhMrRhi2Lo9Ih70=", + "requires": { + "jsonparse": "0.0.5", + "through": "2.3.8" + } + }, + "jsx-ast-utils": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", + "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=" + }, + "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" + } + }, + "known-css-properties": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.0.4.tgz", + "integrity": "sha1-eFCzihGobZ9Jx2Qh4evpxdNWLC8=" + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "ldjson-stream": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ldjson-stream/-/ldjson-stream-1.2.1.tgz", + "integrity": "sha1-kb7O2lrE7SsX5kn7d356v6AYnCs=", + "requires": { + "split2": "0.2.1", + "through2": "0.6.5" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "liftoff": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", + "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=", + "requires": { + "extend": "3.0.1", + "findup-sync": "0.4.3", + "fined": "1.1.0", + "flagged-respawn": "0.3.2", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", + "lodash.mapvalues": "4.6.0", + "rechoir": "0.6.2", + "resolve": "1.4.0" + } + }, + "livereload-js": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.2.2.tgz", + "integrity": "sha1-bIclfmSKtHW8JOoldFftzB+NC8I=" + }, + "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.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "requires": { + "big.js": "3.1.3", + "emojis-list": "2.1.0", + "json5": "0.5.1", + "object-assign": "4.1.1" + }, + "dependencies": { + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + } + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "lodash-es": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.4.tgz", + "integrity": "sha1-3MHXVS4VCgZABzupyzHXDwMpUOc=" + }, + "lodash._arraycopy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz", + "integrity": "sha1-due3wfH7klRzdIeKVi7Qaj5Q9uE=" + }, + "lodash._arrayeach": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz", + "integrity": "sha1-urFWsqkNPxu9XGU0AzSeXlkz754=" + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "requires": { + "lodash._basecopy": "3.0.1", + "lodash.keys": "3.1.2" + } + }, + "lodash._baseclone": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz", + "integrity": "sha1-MDUZv2OT/n5C802LYw73eU41Qrc=", + "requires": { + "lodash._arraycopy": "3.0.0", + "lodash._arrayeach": "3.0.0", + "lodash._baseassign": "3.2.0", + "lodash._basefor": "3.0.3", + "lodash.isarray": "3.0.4", + "lodash.keys": "3.1.2" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=" + }, + "lodash._basefor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz", + "integrity": "sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI=" + }, + "lodash._basetostring": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", + "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=" + }, + "lodash._basevalues": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", + "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=" + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=" + }, + "lodash._createassigner": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", + "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", + "requires": { + "lodash._bindcallback": "3.0.1", + "lodash._isiterateecall": "3.0.9", + "lodash.restparam": "3.6.1" + } + }, + "lodash._createcompounder": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._createcompounder/-/lodash._createcompounder-3.0.0.tgz", + "integrity": "sha1-XdLLVTctbnDg4jkvsjBNZjEJEHU=", + "requires": { + "lodash.deburr": "3.2.0", + "lodash.words": "3.2.0" + } + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=" + }, + "lodash._isnative": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._isnative/-/lodash._isnative-2.4.1.tgz", + "integrity": "sha1-PqZAS3hKe+g2x7V1gOHN95sUgyw=" + }, + "lodash._objecttypes": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz", + "integrity": "sha1-fAt/admKH3ZSn4kLDNsbTf7BHBE=" + }, + "lodash._reescape": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", + "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=" + }, + "lodash._reevaluate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", + "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=" + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=" + }, + "lodash._shimkeys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._shimkeys/-/lodash._shimkeys-2.4.1.tgz", + "integrity": "sha1-bpzJZm/wgfC1psl4uD4kLmlJ0gM=", + "requires": { + "lodash._objecttypes": "2.4.1" + } + }, + "lodash.assign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", + "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", + "requires": { + "lodash._baseassign": "3.2.0", + "lodash._createassigner": "3.1.1", + "lodash.keys": "3.1.2" + } + }, + "lodash.camelcase": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-3.0.1.tgz", + "integrity": "sha1-kyyLh/ikN3iXxnGXUzKC+Xrqwpg=", + "requires": { + "lodash._createcompounder": "3.0.0" + } + }, + "lodash.clone": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-3.0.3.tgz", + "integrity": "sha1-hGiMc9MrWpDKJWFpY/GJJSqZcEM=", + "requires": { + "lodash._baseclone": "3.3.0", + "lodash._bindcallback": "3.0.1", + "lodash._isiterateecall": "3.0.9" + } + }, + "lodash.deburr": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-3.2.0.tgz", + "integrity": "sha1-baj1QzSjZqfPTEx2742Aqhs2XtU=", + "requires": { + "lodash._root": "3.0.1" + } + }, + "lodash.defaults": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz", + "integrity": "sha1-p+iIXwXmiFEUS24SqPNngCa8TFQ=", + "requires": { + "lodash._objecttypes": "2.4.1", + "lodash.keys": "2.4.1" + }, + "dependencies": { + "lodash.keys": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-2.4.1.tgz", + "integrity": "sha1-SN6kbfj/djKxDXBrissmWR4rNyc=", + "requires": { + "lodash._isnative": "2.4.1", + "lodash._shimkeys": "2.4.1", + "lodash.isobject": "2.4.1" + } + } + } + }, + "lodash.escape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", + "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", + "requires": { + "lodash._root": "3.0.1" + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=" + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" + }, + "lodash.isobject": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz", + "integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=", + "requires": { + "lodash._objecttypes": "2.4.1" + } + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "requires": { + "lodash._getnative": "3.9.1", + "lodash.isarguments": "3.1.0", + "lodash.isarray": "3.0.4" + } + }, + "lodash.mapvalues": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=" + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=" + }, + "lodash.pickby": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz", + "integrity": "sha1-feoh2MGNdwOifHBMFdO4SmfjOv8=" + }, + "lodash.restparam": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=" + }, + "lodash.template": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", + "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", + "requires": { + "lodash._basecopy": "3.0.1", + "lodash._basetostring": "3.0.1", + "lodash._basevalues": "3.0.0", + "lodash._isiterateecall": "3.0.9", + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0", + "lodash.keys": "3.1.2", + "lodash.restparam": "3.6.1", + "lodash.templatesettings": "3.1.1" + } + }, + "lodash.templatesettings": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", + "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", + "requires": { + "lodash._reinterpolate": "3.0.0", + "lodash.escape": "3.2.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" + }, + "lodash.words": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash.words/-/lodash.words-3.2.0.tgz", + "integrity": "sha1-TiqGSbwIdFsXxpWxo86P7llmI7M=", + "requires": { + "lodash._root": "3.0.1" + } + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "requires": { + "chalk": "1.1.3" + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "3.0.2" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "requires": { + "currently-unhandled": "0.4.1", + "signal-exit": "3.0.2" + } + }, + "lru-cache": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", + "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" + }, + "macaddress": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.2.8.tgz", + "integrity": "sha1-WQTcU3w57G2+/q6QIycTX6hRHxI=" + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + }, + "map-stream": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", + "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=" + }, + "math-expression-evaluator": { + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", + "integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=" + }, + "mathml-tag-names": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.0.1.tgz", + "integrity": "sha1-jUEmgWi/htEQK5gQnijlMeejRXg=" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "memory-fs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.3.0.tgz", + "integrity": "sha1-e8xrYp46Q+hx1+Kaymrop/FcuyA=", + "requires": { + "errno": "0.1.4", + "readable-stream": "2.3.3" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "requires": { + "camelcase-keys": "2.1.0", + "decamelize": "1.2.0", + "loud-rejection": "1.6.0", + "map-obj": "1.0.1", + "minimist": "1.2.0", + "normalize-package-data": "2.4.0", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "redent": "1.0.0", + "trim-newlines": "1.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mime": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "integrity": "sha1-WCA+7Ybjpe8XrtK32evUfwpg3RA=" + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + }, + "mini-lr": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/mini-lr/-/mini-lr-0.1.9.tgz", + "integrity": "sha1-AhmdJzR5U9H9HW297UJh8Yey0PY=", + "requires": { + "body-parser": "1.14.2", + "debug": "2.6.8", + "faye-websocket": "0.7.3", + "livereload-js": "2.2.2", + "parseurl": "1.3.1", + "qs": "2.2.5" + } + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "mobile-detect": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/mobile-detect/-/mobile-detect-1.3.6.tgz", + "integrity": "sha1-gB9SAQmBD1CQp0HO1JFPcG59++g=" + }, + "mocha": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz", + "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=", + "requires": { + "commander": "2.3.0", + "debug": "2.2.0", + "diff": "1.4.0", + "escape-string-regexp": "1.0.2", + "glob": "3.2.11", + "growl": "1.9.2", + "jade": "0.26.3", + "mkdirp": "0.5.1", + "supports-color": "1.2.0", + "to-iso-string": "0.0.2" + }, + "dependencies": { + "commander": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz", + "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM=" + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "requires": { + "ms": "0.7.1" + } + }, + "escape-string-regexp": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz", + "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE=" + }, + "glob": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", + "requires": { + "inherits": "2.0.3", + "minimatch": "0.3.0" + } + }, + "minimatch": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", + "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", + "requires": { + "lru-cache": "2.7.3", + "sigmund": "1.0.1" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=" + }, + "supports-color": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz", + "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4=" + } + } + }, + "moment": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.17.1.tgz", + "integrity": "sha1-/tlQYGPzaxDwZsi1mhRNf66+HYI=" + }, + "mousetrap": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.0.tgz", + "integrity": "sha1-AWj8q7EdB2aeh0kDJMmBIIEhrE0=" + }, + "mout": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mout/-/mout-1.0.0.tgz", + "integrity": "sha1-m98dSvV9ZtR8s1OmM1oygQmOFQE=" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "requires": { + "array-differ": "1.0.0", + "array-union": "1.0.2", + "arrify": "1.0.1", + "minimatch": "3.0.4" + }, + "dependencies": { + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, + "multipipe": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", + "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", + "requires": { + "duplexer2": "0.0.2" + } + }, + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=" + }, + "natives": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", + "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=" + }, + "new-from": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/new-from/-/new-from-0.0.3.tgz", + "integrity": "sha1-HErRNhPePhXWMhtw7Vwjk36iXmc=", + "requires": { + "readable-stream": "1.1.14" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "node-fetch": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.2.tgz", + "integrity": "sha512-xZZUq2yDhKMIn/UgG5q//IZSNLJIwW2QxS14CNH5spuiXkITM2pUitjdq58yLSaU7m4M0wBNaM2Gh/ggY4YJig==", + "requires": { + "encoding": "0.1.12", + "is-stream": "1.1.0" + } + }, + "node-libs-browser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.6.0.tgz", + "integrity": "sha1-JEgG1E0xngSLyGB7XMTq+aKdLjw=", + "requires": { + "assert": "1.4.1", + "browserify-zlib": "0.1.4", + "buffer": "4.9.1", + "console-browserify": "1.1.0", + "constants-browserify": "0.0.1", + "crypto-browserify": "3.2.8", + "domain-browser": "1.1.7", + "events": "1.1.1", + "http-browserify": "1.7.0", + "https-browserify": "0.0.0", + "os-browserify": "0.1.2", + "path-browserify": "0.0.0", + "process": "0.11.10", + "punycode": "1.4.1", + "querystring-es3": "0.2.1", + "readable-stream": "1.1.14", + "stream-browserify": "1.0.0", + "string_decoder": "0.10.31", + "timers-browserify": "1.4.2", + "tty-browserify": "0.0.0", + "url": "0.10.3", + "util": "0.10.3", + "vm-browserify": "0.0.4" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "node.extend": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.6.tgz", + "integrity": "sha1-p7iCyC1sk6SGOlUEvV3o7IYli5Y=", + "requires": { + "is": "3.2.1" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "4.3.6", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" + }, + "normalize-selector": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", + "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=" + }, + "normalize-url": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", + "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "requires": { + "object-assign": "4.1.1", + "prepend-http": "1.0.4", + "query-string": "https://registry.npmjs.org/query-string/-/query-string-4.2.2.tgz", + "sort-keys": "1.1.2" + } + }, + "normalize.css": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-5.0.0.tgz", + "integrity": "sha1-fOyHXOgXilMzxN6Ato6pwYudfDc=" + }, + "npm-path": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/npm-path/-/npm-path-1.1.0.tgz", + "integrity": "sha1-BHSuAEGcMn1UcBt88s0F3Ii+EUA=", + "requires": { + "which": "1.3.0" + } + }, + "npm-run": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/npm-run/-/npm-run-2.0.0.tgz", + "integrity": "sha1-KN/ArV4uRv4ISOK9WN3wAue3PBU=", + "requires": { + "minimist": "1.2.0", + "npm-path": "1.1.0", + "npm-which": "2.0.0", + "serializerr": "1.0.3", + "spawn-sync": "1.0.15", + "sync-exec": "0.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "npm-which": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/npm-which/-/npm-which-2.0.0.tgz", + "integrity": "sha1-DEaYIWC3gwk2YdHQG9RJbS/qu6w=", + "requires": { + "commander": "2.11.0", + "npm-path": "1.1.0", + "which": "1.3.0" + } + }, + "nsdeclare": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/nsdeclare/-/nsdeclare-0.1.0.tgz", + "integrity": "sha1-ENqhU2QjgtPPLAGpFvTrIKEosZ8=" + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=" + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "requires": { + "array-each": "1.0.1", + "array-slice": "1.0.0", + "for-own": "1.0.0", + "isobject": "3.0.1" + }, + "dependencies": { + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "requires": { + "for-in": "1.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "onecolor": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/onecolor/-/onecolor-3.0.4.tgz", + "integrity": "sha1-daRvgNpseqpbTarhekcZi9llJJQ=" + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + } + }, + "orchestrator": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", + "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", + "requires": { + "end-of-stream": "0.1.5", + "sequencify": "0.0.7", + "stream-consume": "0.1.0" + } + }, + "ordered-read-streams": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", + "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=" + }, + "os-browserify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", + "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=" + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "os-shim": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", + "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=" + }, + "parse-filepath": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", + "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=", + "requires": { + "is-absolute": "0.2.6", + "map-cache": "0.2.2", + "path-root": "0.1.1" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "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.3.1" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "parseurl": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", + "integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY=" + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" + }, + "path-exists": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-1.0.0.tgz", + "integrity": "sha1-1aiZjrce83p0w06w2eum6HjuoIE=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "requires": { + "path-root-regex": "0.1.2" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=" + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + } + } + }, + "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.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "requires": { + "through": "2.3.8" + } + }, + "pbkdf2-compat": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz", + "integrity": "sha1-tuDI+plJTZTgURV1gCpZpcFC8og=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "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.4" + } + }, + "pipetteur": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pipetteur/-/pipetteur-2.0.3.tgz", + "integrity": "sha1-GVV2CVno0aEcsqUOyD7sRwYz5J8=", + "requires": { + "onecolor": "3.0.4", + "synesthesia": "1.0.1" + } + }, + "plur": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "requires": { + "irregular-plurals": "1.3.0" + } + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=" + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.1.9", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "postcss-calc": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz", + "integrity": "sha1-d7rnypKK2FcW4v2kLyYb98HWW14=", + "requires": { + "postcss": "5.2.17", + "postcss-message-helpers": "2.0.0", + "reduce-css-calc": "1.3.0" + } + }, + "postcss-colormin": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz", + "integrity": "sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=", + "requires": { + "colormin": "1.1.2", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-convert-values": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz", + "integrity": "sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=", + "requires": { + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-discard-comments": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz", + "integrity": "sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-discard-duplicates": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz", + "integrity": "sha1-uavye4isGIFYpesSq8riAmO5GTI=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-discard-empty": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz", + "integrity": "sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-discard-overridden": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz", + "integrity": "sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "requires": { + "postcss": "5.2.17", + "uniqs": "2.0.0" + } + }, + "postcss-filter-plugins": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz", + "integrity": "sha1-bYWGJTTXNaxCDkqFgG4fXUKG2Ew=", + "requires": { + "postcss": "5.2.17", + "uniqid": "4.1.1" + } + }, + "postcss-less": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-0.14.0.tgz", + "integrity": "sha1-xjGwicbM5CK5oQ86lY0r7dOBkyQ=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-loader": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-0.9.1.tgz", + "integrity": "sha1-h6PnD1jkbWinW63Gcl2epHc/0dc=", + "requires": { + "loader-utils": "0.2.17", + "postcss": "5.2.17" + } + }, + "postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=" + }, + "postcss-merge-idents": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz", + "integrity": "sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=", + "requires": { + "has": "1.0.1", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-merge-longhand": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz", + "integrity": "sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-merge-rules": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz", + "integrity": "sha1-0d9d+qexrMO+VT8OnhDofGG19yE=", + "requires": { + "browserslist": "1.7.7", + "caniuse-api": "1.6.1", + "postcss": "5.2.17", + "postcss-selector-parser": "2.2.3", + "vendors": "1.0.1" + }, + "dependencies": { + "browserslist": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz", + "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", + "requires": { + "caniuse-db": "1.0.30000721", + "electron-to-chromium": "1.3.20" + } + } + } + }, + "postcss-message-helpers": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz", + "integrity": "sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=" + }, + "postcss-minify-font-values": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz", + "integrity": "sha1-S1jttWZB66fIR0qzUmyv17vey2k=", + "requires": { + "object-assign": "4.1.1", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-minify-gradients": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz", + "integrity": "sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=", + "requires": { + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-minify-params": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz", + "integrity": "sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=", + "requires": { + "alphanum-sort": "1.0.2", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0", + "uniqs": "2.0.0" + } + }, + "postcss-minify-selectors": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz", + "integrity": "sha1-ssapjAByz5G5MtGkllCBFDEXNb8=", + "requires": { + "alphanum-sort": "1.0.2", + "has": "1.0.1", + "postcss": "5.2.17", + "postcss-selector-parser": "2.2.3" + } + }, + "postcss-modules-extract-imports": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz", + "integrity": "sha1-thTJcgvmgW6u41+zpfqh26agXds=", + "requires": { + "postcss": "6.0.10" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "postcss": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.10.tgz", + "integrity": "sha512-7WOpqea/cQHH1XUXdN1mqoFFmhigW3KAXJ+ssMOk/f6mKmwqFgqqdwsnjLGH+wuY+kwaJvT4whHcfKt5kWga0A==", + "requires": { + "chalk": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.4.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "postcss-modules-local-by-default": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz", + "integrity": "sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=", + "requires": { + "css-selector-tokenizer": "0.7.0", + "postcss": "6.0.10" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "css-selector-tokenizer": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", + "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", + "requires": { + "cssesc": "0.1.0", + "fastparse": "1.1.1", + "regexpu-core": "1.0.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "postcss": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.10.tgz", + "integrity": "sha512-7WOpqea/cQHH1XUXdN1mqoFFmhigW3KAXJ+ssMOk/f6mKmwqFgqqdwsnjLGH+wuY+kwaJvT4whHcfKt5kWga0A==", + "requires": { + "chalk": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.4.0" + } + }, + "regexpu-core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", + "requires": { + "regenerate": "1.3.2", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "postcss-modules-scope": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz", + "integrity": "sha1-1upkmUx5+XtipytCb75gVqGUu5A=", + "requires": { + "css-selector-tokenizer": "0.7.0", + "postcss": "6.0.10" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "css-selector-tokenizer": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz", + "integrity": "sha1-5piEdK6MlTR3v15+/s/OzNnPTIY=", + "requires": { + "cssesc": "0.1.0", + "fastparse": "1.1.1", + "regexpu-core": "1.0.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "postcss": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.10.tgz", + "integrity": "sha512-7WOpqea/cQHH1XUXdN1mqoFFmhigW3KAXJ+ssMOk/f6mKmwqFgqqdwsnjLGH+wuY+kwaJvT4whHcfKt5kWga0A==", + "requires": { + "chalk": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.4.0" + } + }, + "regexpu-core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", + "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", + "requires": { + "regenerate": "1.3.2", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "postcss-modules-values": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz", + "integrity": "sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=", + "requires": { + "icss-replace-symbols": "1.1.0", + "postcss": "6.0.10" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "postcss": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.10.tgz", + "integrity": "sha512-7WOpqea/cQHH1XUXdN1mqoFFmhigW3KAXJ+ssMOk/f6mKmwqFgqqdwsnjLGH+wuY+kwaJvT4whHcfKt5kWga0A==", + "requires": { + "chalk": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.4.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "postcss-nested": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-1.0.0.tgz", + "integrity": "sha1-0Ta9S1dr1WMt8ULBKyGYqcz3lN8=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-normalize-charset": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz", + "integrity": "sha1-757nEhLX/nWceO0WL2HtYrXLk/E=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-normalize-url": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz", + "integrity": "sha1-EI90s/L82viRov+j6kWSJ5/HgiI=", + "requires": { + "is-absolute-url": "2.1.0", + "normalize-url": "1.9.1", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-ordered-values": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz", + "integrity": "sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=", + "requires": { + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-reduce-idents": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz", + "integrity": "sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=", + "requires": { + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-reduce-initial": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz", + "integrity": "sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-reduce-transforms": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz", + "integrity": "sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=", + "requires": { + "has": "1.0.1", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0" + } + }, + "postcss-reporter": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-1.4.1.tgz", + "integrity": "sha1-wTbwpbFhkV83ndN2XGEHX357mvI=", + "requires": { + "chalk": "1.1.3", + "lodash": "4.17.4", + "log-symbols": "1.0.2", + "postcss": "5.2.17" + } + }, + "postcss-resolve-nested-selector": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", + "integrity": "sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=" + }, + "postcss-scss": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-0.3.1.tgz", + "integrity": "sha1-ZcYQ2OKn7g5isYNbcbiHBzSBbks=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=", + "requires": { + "flatten": "1.0.2", + "indexes-of": "1.0.1", + "uniq": "1.0.1" + } + }, + "postcss-simple-vars": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-simple-vars/-/postcss-simple-vars-3.0.0.tgz", + "integrity": "sha1-H6TMtLcVHZ8NUvuOoZoVwTGVmdY=", + "requires": { + "postcss": "5.2.17" + } + }, + "postcss-sorting": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/postcss-sorting/-/postcss-sorting-3.0.1.tgz", + "integrity": "sha1-E9QrJV54gfsz0Z3KpAhVgL6QZkw=", + "requires": { + "lodash": "4.17.4", + "postcss": "6.0.10" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "requires": { + "color-convert": "1.9.0" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "postcss": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.10.tgz", + "integrity": "sha512-7WOpqea/cQHH1XUXdN1mqoFFmhigW3KAXJ+ssMOk/f6mKmwqFgqqdwsnjLGH+wuY+kwaJvT4whHcfKt5kWga0A==", + "requires": { + "chalk": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.4.0" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "requires": { + "has-flag": "2.0.0" + } + } + } + }, + "postcss-svgo": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz", + "integrity": "sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=", + "requires": { + "is-svg": "2.1.0", + "postcss": "5.2.17", + "postcss-value-parser": "3.3.0", + "svgo": "0.7.2" + } + }, + "postcss-unique-selectors": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz", + "integrity": "sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=", + "requires": { + "alphanum-sort": "1.0.2", + "postcss": "5.2.17", + "uniqs": "2.0.0" + } + }, + "postcss-value-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", + "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=" + }, + "postcss-zindex": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz", + "integrity": "sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=", + "requires": { + "has": "1.0.1", + "postcss": "5.2.17", + "uniqs": "2.0.0" + } + }, + "prefix-style": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/prefix-style/-/prefix-style-2.0.1.tgz", + "integrity": "sha1-ZrupqHDP2jCKXcIOhekSCTLJWgY=" + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" + }, + "private": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz", + "integrity": "sha1-aM5eih7woju1cMwoU3tTMqumPvE=" + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "2.0.6" + } + }, + "prop-types": { + "version": "15.5.10", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.5.10.tgz", + "integrity": "sha1-J5ffwxJhguOpXj37suiT3ddFYVQ=", + "requires": { + "fbjs": "0.8.14", + "loose-envify": "1.3.1" + } + }, + "protochain": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/protochain/-/protochain-1.0.5.tgz", + "integrity": "sha1-mRxAfpneJkqt+PgVBLXn+ve/omA=" + }, + "prr": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", + "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "q": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz", + "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=" + }, + "qs": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.2.5.tgz", + "integrity": "sha1-EIirr53MCuWuRbcJ5sa1iIsjkjw=" + }, + "query-string": { + "version": "https://registry.npmjs.org/query-string/-/query-string-4.2.2.tgz", + "integrity": "sha1-iIpvy292Bwujny8wJchwmd76FkU=", + "requires": { + "object-assign": "4.1.1", + "strict-uri-encode": "1.1.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" + }, + "raf": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.3.2.tgz", + "integrity": "sha1-DBO+C1tJtG921maSSNUnzysC/ic=", + "requires": { + "performance-now": "2.1.0" + } + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.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" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "raven-js": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/raven-js/-/raven-js-3.17.0.tgz", + "integrity": "sha1-d5RXrHkQUSw8LMm7bQqe61mpaew=" + }, + "raw-body": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz", + "integrity": "sha1-rf6s4uT7MJgFgBTQjActzFl1h3Q=", + "requires": { + "bytes": "2.4.0", + "iconv-lite": "0.4.13", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", + "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=" + } + } + }, + "react": { + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/react/-/react-15.6.1.tgz", + "integrity": "sha1-uqhDTsZ4C96ZfNw4C3nNM7ljk98=", + "requires": { + "create-react-class": "15.6.0", + "fbjs": "0.8.14", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "prop-types": "15.5.10" + } + }, + "react-addons-shallow-compare": { + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.0.tgz", + "integrity": "sha1-t6Tl/58nBMIM9obdigXdCLJt4lI=", + "requires": { + "fbjs": "0.8.14", + "object-assign": "4.1.1" + } + }, + "react-async-script": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/react-async-script/-/react-async-script-0.9.1.tgz", + "integrity": "sha1-1KSWxyb6sMbvBZmKsW5Qx0KCC2A=", + "requires": { + "prop-types": "15.5.10" + } + }, + "react-autosuggest": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/react-autosuggest/-/react-autosuggest-9.3.0.tgz", + "integrity": "sha512-PQuDTscoy3zjbQZnGtW3ZI70CVnxrzPNqX5Q7pJbn1QsyRA8UqnJtpuYwEyBxsvq3BaEiUeZca9IGBAlcKjsFg==", + "requires": { + "prop-types": "15.5.10", + "react-autowhatever": "10.1.0", + "shallow-equal": "1.0.0" + } + }, + "react-autowhatever": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/react-autowhatever/-/react-autowhatever-10.1.0.tgz", + "integrity": "sha512-LMZggoRgcmldAMyABY3Dz/DRiTQViMsQllXtOsDrZeBRwPIfn0RAOySaQMUNyECrHaCB5pm66jgQvkyNSh/BjA==", + "requires": { + "prop-types": "15.5.10", + "react-themeable": "1.1.0", + "section-iterator": "2.0.0" + } + }, + "react-custom-scrollbars": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/react-custom-scrollbars/-/react-custom-scrollbars-4.1.2.tgz", + "integrity": "sha1-DmDEpGxKYfnkmUp2Y+K5y7xRh6M=", + "requires": { + "dom-css": "2.1.0", + "prop-types": "15.5.10", + "raf": "3.3.2" + } + }, + "react-dnd": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-2.4.0.tgz", + "integrity": "sha1-lvAELNTNN1tPDDQT9uyE0me315I=", + "requires": { + "disposables": "1.0.1", + "dnd-core": "2.4.0", + "hoist-non-react-statics": "1.2.0", + "invariant": "2.2.2", + "lodash": "4.17.4", + "prop-types": "15.5.10" + } + }, + "react-dnd-html5-backend": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-2.4.1.tgz", + "integrity": "sha1-Q50ryvi9i4elE4a+tRwSiCYYLd0=", + "requires": { + "lodash": "4.17.4" + } + }, + "react-document-title": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/react-document-title/-/react-document-title-2.0.3.tgz", + "integrity": "sha1-u/kioNcUEvyUgkXkKDskEt9w8rk=", + "requires": { + "prop-types": "15.5.10", + "react-side-effect": "1.1.3" + } + }, + "react-dom": { + "version": "15.6.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.6.1.tgz", + "integrity": "sha1-LLDtQZEDjlPCCes6eaI+Kkz5lHA=", + "requires": { + "fbjs": "0.8.14", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "prop-types": "15.5.10" + } + }, + "react-google-recaptcha": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/react-google-recaptcha/-/react-google-recaptcha-0.9.6.tgz", + "integrity": "sha1-RcoMFuL1J78TITa8p3ouNF9j9LY=", + "requires": { + "prop-types": "15.5.10" + } + }, + "react-lazyload": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/react-lazyload/-/react-lazyload-2.2.7.tgz", + "integrity": "sha1-at8HE/MiQKIcYwq10ejPYtDCZK8=", + "requires": { + "prop-types": "15.5.10" + } + }, + "react-measure": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/react-measure/-/react-measure-1.4.7.tgz", + "integrity": "sha1-odLKDc/vBJeLesJjp2XctqCTb9s=", + "requires": { + "get-node-dimensions": "1.2.0", + "prop-types": "15.5.10", + "resize-observer-polyfill": "1.4.2" + } + }, + "react-portal": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/react-portal/-/react-portal-3.1.0.tgz", + "integrity": "sha1-hlxE+3Kh2hBsZJIGk2VZzoke6Jk=", + "requires": { + "prop-types": "15.5.10" + } + }, + "react-redux": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.5.tgz", + "integrity": "sha1-+OjHsjlCJXblLWt9sGQ5RpvphGo=", + "requires": { + "create-react-class": "15.6.0", + "hoist-non-react-statics": "1.2.0", + "invariant": "2.2.2", + "lodash": "4.17.4", + "lodash-es": "4.17.4", + "loose-envify": "1.3.1", + "prop-types": "15.5.10" + } + }, + "react-router": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.2.0.tgz", + "integrity": "sha512-DY6pjwRhdARE4TDw7XjxjZsbx9lKmIcyZoZ+SDO7SBJ1KUeWNxT22Kara2AC7u6/c2SYEHlEDLnzBCcNhLE8Vg==", + "requires": { + "history": "4.7.2", + "hoist-non-react-statics": "2.3.1", + "invariant": "2.2.2", + "loose-envify": "1.3.1", + "path-to-regexp": "1.7.0", + "prop-types": "15.5.10", + "warning": "3.0.0" + }, + "dependencies": { + "history": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/history/-/history-4.7.2.tgz", + "integrity": "sha512-1zkBRWW6XweO0NBcjiphtVJVsIQ+SXF29z9DVkceeaSLVMFXHool+fdCZD4spDCfZJCILPILc3bm7Bc+HRi0nA==", + "requires": { + "invariant": "2.2.2", + "loose-envify": "1.3.1", + "resolve-pathname": "2.2.0", + "value-equal": "0.4.0", + "warning": "3.0.0" + } + }, + "hoist-non-react-statics": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz", + "integrity": "sha1-ND24TGAYxlB3iJgkATWhQg7iLOA=" + }, + "value-equal": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.4.0.tgz", + "integrity": "sha512-x+cYdNnaA3CxvMaTX0INdTCN8m8aF2uY9BvEqmxuYp8bL09cs/kWVQPVGcA35fMktdOsP69IgU7wFj/61dJHEw==" + } + } + }, + "react-router-dom": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.1.1.tgz", + "integrity": "sha1-MCGt4fLBYK+Xz5TiVZTF8pRYMCU=", + "requires": { + "history": "4.6.3", + "loose-envify": "1.3.1", + "prop-types": "15.5.10", + "react-router": "4.2.0" + } + }, + "react-router-redux": { + "version": "5.0.0-alpha.6", + "resolved": "https://registry.npmjs.org/react-router-redux/-/react-router-redux-5.0.0-alpha.6.tgz", + "integrity": "sha1-dBhmPC7NPFG+hW/PKPPR3uzBpXY=", + "requires": { + "history": "4.6.3", + "prop-types": "15.5.10", + "react-router": "4.2.0" + } + }, + "react-side-effect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-1.1.3.tgz", + "integrity": "sha1-USwlq+DewXKDTEAB7FxR4E1BvFw=", + "requires": { + "exenv": "1.2.2", + "shallowequal": "1.0.2" + } + }, + "react-slider": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/react-slider/-/react-slider-0.8.0.tgz", + "integrity": "sha1-IdsEjt8ovfQh2wUolbrmHR66nn4=" + }, + "react-tabs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-1.1.0.tgz", + "integrity": "sha1-8ePWE24difcPXviDVGii8DpUd3o=", + "requires": { + "classnames": "2.2.5", + "prop-types": "15.5.10" + } + }, + "react-tag-autocomplete": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/react-tag-autocomplete/-/react-tag-autocomplete-5.4.0.tgz", + "integrity": "sha1-l1f0DnuNJeXgWwN+ozGKhueVd3U=" + }, + "react-tether": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/react-tether/-/react-tether-0.5.7.tgz", + "integrity": "sha1-QY6mEEG2W5WCcUeEibcaNXLwFCI=", + "requires": { + "prop-types": "15.5.10", + "tether": "1.4.0" + } + }, + "react-themeable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/react-themeable/-/react-themeable-1.1.0.tgz", + "integrity": "sha1-fURm3ZsrX6dQWHJ4JenxUro3mg4=", + "requires": { + "object-assign": "3.0.0" + }, + "dependencies": { + "object-assign": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", + "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" + } + } + }, + "react-virtualized": { + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/react-virtualized/-/react-virtualized-9.8.0.tgz", + "integrity": "sha512-XTMLpb9pyV1CKqa57uEv70oKMDZfDCJ2WTBwwSmkVjcww/AipN672nKLdL0D7FMhYFxqiKl6t1pPoJxV5QFxsg==", + "requires": { + "babel-runtime": "6.26.0", + "classnames": "2.2.5", + "dom-helpers": "3.2.1", + "loose-envify": "1.3.1", + "prop-types": "15.5.10" + } + }, + "read-file-stdin": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/read-file-stdin/-/read-file-stdin-0.2.1.tgz", + "integrity": "sha1-JezP86FTtoCa+ssj7hU4fbng7mE=", + "requires": { + "gather-stream": "1.0.0" + } + }, + "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.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.3", + "set-immediate-shim": "1.0.1" + }, + "dependencies": { + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, + "readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "mute-stream": "0.0.5" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "1.4.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" + } + }, + "reduce-css-calc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", + "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", + "requires": { + "balanced-match": "0.4.2", + "math-expression-evaluator": "1.2.17", + "reduce-function-call": "1.0.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + } + } + }, + "reduce-function-call": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz", + "integrity": "sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=", + "requires": { + "balanced-match": "0.4.2" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + } + } + }, + "reduce-reducers": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-0.1.2.tgz", + "integrity": "sha1-+htHGLxSkqcd3R5dg5yb6pdw8Us=" + }, + "redux": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.0.tgz", + "integrity": "sha512-GHjaOkEQtQnnuLoYPFkRKHIqs1i1tdTlisu/xUHfk2juzCobSy4STxs4Lz5bPkc07Owb6BeGKx/r76c9IVTkOw==", + "requires": { + "lodash": "4.17.4", + "lodash-es": "4.17.4", + "loose-envify": "1.3.1", + "symbol-observable": "1.0.4" + } + }, + "redux-actions": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/redux-actions/-/redux-actions-2.0.3.tgz", + "integrity": "sha1-FVCrqd7xeRZszSNNB2chBKc22Ik=", + "requires": { + "invariant": "2.2.2", + "lodash": "4.17.4", + "lodash-es": "4.17.4", + "reduce-reducers": "0.1.2" + } + }, + "redux-batched-actions": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/redux-batched-actions/-/redux-batched-actions-0.2.0.tgz", + "integrity": "sha1-2gAAyIKw5shhqW1YI702rfXZwN0=" + }, + "redux-localstorage": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/redux-localstorage/-/redux-localstorage-0.4.1.tgz", + "integrity": "sha1-+vbXGcWBOXKU2BFHP/zt7gZckzw=" + }, + "redux-raven-middleware": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redux-raven-middleware/-/redux-raven-middleware-1.2.0.tgz", + "integrity": "sha1-UNAt1lPPk9LfGMRlIUnxAJu74z0=", + "requires": { + "raven-js": "3.17.0" + } + }, + "redux-thunk": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.2.0.tgz", + "integrity": "sha1-5hWhbha0ehmlFXZhM9Hj6Zt4UuU=" + }, + "regenerate": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz", + "integrity": "sha1-0ZQcZ7rUN+G+dkM63Vs4X5WxkmA=" + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "requires": { + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "private": "0.1.7" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "requires": { + "regenerate": "1.3.2", + "regjsgen": "0.2.0", + "regjsparser": "0.1.5" + } + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "requires": { + "jsesc": "0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "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.2" + } + }, + "replace-ext": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", + "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=" + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + }, + "require-nocache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/require-nocache/-/require-nocache-1.0.0.tgz", + "integrity": "sha1-pmXQtgoH6CSYdXkKTTUCGdPIX6M=" + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "requires": { + "caller-path": "0.1.0", + "resolve-from": "1.0.1" + } + }, + "reselect": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-3.0.1.tgz", + "integrity": "sha1-79qpjqdFEyTQkrKyFjpqHXqaIUc=" + }, + "resize-observer-polyfill": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.4.2.tgz", + "integrity": "sha1-o3GY5iCeiIrLFTKplo4G04tniOU=" + }, + "resolve": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "requires": { + "path-parse": "1.0.5" + } + }, + "resolve-dir": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", + "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", + "requires": { + "expand-tilde": "1.2.2", + "global-modules": "0.2.3" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" + }, + "resolve-pathname": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz", + "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg==" + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", + "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", + "requires": { + "glob": "7.1.2" + }, + "dependencies": { + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + } + } + }, + "ripemd160": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz", + "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84=" + }, + "rocambole": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rocambole/-/rocambole-0.7.0.tgz", + "integrity": "sha1-9seVBVF9xCtvuECEK4uVOw+WhYU=", + "requires": { + "esprima": "2.7.3" + } + }, + "rocambole-indent": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/rocambole-indent/-/rocambole-indent-2.0.4.tgz", + "integrity": "sha1-oYokl3ygQAuGHapGMehh3LUtCFw=", + "requires": { + "debug": "2.6.8", + "mout": "0.11.1", + "rocambole-token": "1.2.1" + }, + "dependencies": { + "mout": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz", + "integrity": "sha1-ujYR318OWx/7/QEWa48C0fX6K5k=" + } + } + }, + "rocambole-linebreak": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/rocambole-linebreak/-/rocambole-linebreak-1.0.2.tgz", + "integrity": "sha1-A2IVFbQ7RyHJflocG8paA2Y2jy8=", + "requires": { + "debug": "2.6.8", + "rocambole-token": "1.2.1", + "semver": "4.3.6" + } + }, + "rocambole-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rocambole-node/-/rocambole-node-1.0.0.tgz", + "integrity": "sha1-21tJ3nQHsAgN1RSHLyjjk9D3/z8=" + }, + "rocambole-token": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/rocambole-token/-/rocambole-token-1.2.1.tgz", + "integrity": "sha1-x4XfdCjcPLJ614lwR71SOMwHDTU=" + }, + "rocambole-whitespace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rocambole-whitespace/-/rocambole-whitespace-1.0.0.tgz", + "integrity": "sha1-YzMJSSVrKZQfWbGQRZ+ZnGsdO/k=", + "requires": { + "debug": "2.6.8", + "repeat-string": "1.6.1", + "rocambole-token": "1.2.1" + } + }, + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "requires": { + "once": "1.4.0" + } + }, + "run-sequence": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-sequence/-/run-sequence-1.2.0.tgz", + "integrity": "sha1-bUZNi7PwIb4JDD9iDo6nWd+d8eA=", + "requires": { + "chalk": "1.1.3", + "gulp-util": "3.0.7" + } + }, + "rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "section-iterator": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/section-iterator/-/section-iterator-2.0.0.tgz", + "integrity": "sha1-v0RNev7rlK1Dw5rS+yYVFifMuio=" + }, + "select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=" + }, + "sequencify": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", + "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=" + }, + "serializerr": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/serializerr/-/serializerr-1.0.3.tgz", + "integrity": "sha1-EtTFqhw/+49tHcXzlaqUVVacP5E=", + "requires": { + "protochain": "1.0.5" + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "sha.js": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz", + "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=" + }, + "shallow-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.0.0.tgz", + "integrity": "sha1-UI0YOLPeWQq4dXsBGyXkMJAJRfc=" + }, + "shallowequal": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.0.2.tgz", + "integrity": "sha512-zlVXeVUKvo+HEv1e2KQF/csyeMKx2oHvatQ9l6XjCUj3agvC8XGf6R9HvIPDSmp8FNPvx7b5kaEJTRi7CqxtEw==" + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "shelljs": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.1.tgz", + "integrity": "sha1-7GIRvtGSBEIIj+D3Cyg3Iy7SyKg=" + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "signalr": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/signalr/-/signalr-2.2.2.tgz", + "integrity": "sha1-ugeRXrXgjPvId2UEfsaXJpTQCOI=", + "requires": { + "jquery": "2.2.4" + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" + }, + "sort-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", + "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", + "requires": { + "is-plain-obj": "1.1.0" + } + }, + "source-list-map": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-0.1.8.tgz", + "integrity": "sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-support": { + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.17.tgz", + "integrity": "sha512-30c1Ch8FSjV0FwC253iftbbj0dU/OXoSg1LAEGZJUlGgjTNj6cu+DVqJWWIZJY5RXLWV4eFtR+4ouo0VIOYOTg==", + "requires": { + "source-map": "0.5.7" + } + }, + "sparkles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", + "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=" + }, + "spawn-sync": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", + "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "requires": { + "concat-stream": "1.6.0", + "os-shim": "0.1.3" + } + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + }, + "specificity": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.2.1.tgz", + "integrity": "sha1-OnBHwqF581Ni45kHRc6lOfFRYbg=" + }, + "split": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", + "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", + "requires": { + "through": "2.3.8" + } + }, + "split2": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/split2/-/split2-0.2.1.tgz", + "integrity": "sha1-At2smtwD7Au3jBKC7Aecpuha6QA=", + "requires": { + "through2": "0.6.5" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + } + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + }, + "stdin": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/stdin/-/stdin-0.0.1.tgz", + "integrity": "sha1-0wQZgarsPf28d6GzjWNy449ftx4=" + }, + "stream-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz", + "integrity": "sha1-v5tKv7QrJ011FHnkTg/yZWtvEZM=", + "requires": { + "inherits": "2.0.3", + "readable-stream": "1.1.14" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "stream-combiner": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", + "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", + "requires": { + "duplexer": "0.1.1" + } + }, + "stream-consume": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", + "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=" + }, + "streamqueue": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/streamqueue/-/streamqueue-1.1.1.tgz", + "integrity": "sha1-0612aGvpJLv5yix0qBSiGCR11tc=", + "requires": { + "isstream": "0.1.2", + "readable-stream": "1.0.34" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.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.1" + } + }, + "strip-bom-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz", + "integrity": "sha1-5xRDmFd9Uaa+0PoZlPoF9D/ZiO4=", + "requires": { + "first-chunk-stream": "1.0.0", + "strip-bom": "2.0.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" + } + }, + "strip-json-comments": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz", + "integrity": "sha1-Fkxk43Coo8wAyeAbU55WmCPw7lQ=" + }, + "style-loader": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.13.1.tgz", + "integrity": "sha1-RoKA77wEcwI806bNVuM7Wh1/w6k=", + "requires": { + "loader-utils": "0.2.17" + } + }, + "style-search": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", + "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=" + }, + "stylehacks": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-2.3.2.tgz", + "integrity": "sha1-ZMg+BDimjJ7fRJ6MVSp9mrYAmws=", + "requires": { + "browserslist": "1.3.6", + "chalk": "1.1.3", + "log-symbols": "1.0.2", + "minimist": "1.2.0", + "plur": "2.1.2", + "postcss": "5.2.17", + "postcss-reporter": "1.4.1", + "postcss-selector-parser": "2.2.3", + "read-file-stdin": "0.2.1", + "text-table": "0.2.0", + "write-file-stdout": "0.0.2" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "stylelint": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-7.3.1.tgz", + "integrity": "sha1-3O+igdCIgN+1J1ayc31huB2YUwM=", + "requires": { + "autoprefixer": "6.3.6", + "balanced-match": "0.4.2", + "chalk": "1.1.3", + "colorguard": "1.2.0", + "cosmiconfig": "1.1.0", + "doiuse": "2.6.0", + "execall": "1.0.0", + "get-stdin": "5.0.1", + "globby": "6.1.0", + "globjoin": "0.1.4", + "html-tags": "1.2.0", + "ignore": "3.3.5", + "known-css-properties": "0.0.4", + "lodash": "4.17.4", + "log-symbols": "1.0.2", + "meow": "3.7.0", + "multimatch": "2.1.0", + "normalize-selector": "0.2.0", + "postcss": "5.2.17", + "postcss-less": "0.14.0", + "postcss-media-query-parser": "0.2.3", + "postcss-reporter": "1.4.1", + "postcss-resolve-nested-selector": "0.1.1", + "postcss-scss": "0.3.1", + "postcss-selector-parser": "2.2.3", + "postcss-value-parser": "3.3.0", + "resolve-from": "2.0.0", + "specificity": "0.2.1", + "string-width": "1.0.2", + "style-search": "0.1.0", + "stylehacks": "2.3.2", + "sugarss": "0.1.6", + "svg-tags": "1.0.0", + "table": "3.8.3" + }, + "dependencies": { + "balanced-match": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", + "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=" + }, + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + } + } + }, + "stylelint-order": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/stylelint-order/-/stylelint-order-0.6.0.tgz", + "integrity": "sha1-ciIr4MZNh4Ky/CN9DZrJdAOflos=", + "requires": { + "lodash": "4.17.4", + "postcss": "6.0.10", + "postcss-sorting": "3.0.1", + "stylelint": "8.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=" + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "requires": { + "color-convert": "1.9.0" + } + }, + "autoprefixer": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-7.1.3.tgz", + "integrity": "sha512-zGy6aRrZjWhR+25n89jYkpLXutg6xdDGKKnVNzkfamnnhK3mYchkKj5GJR14aJiU0x4UqZ1+N728tkFNUL5N2g==", + "requires": { + "browserslist": "2.4.0", + "caniuse-lite": "1.0.30000721", + "normalize-range": "0.1.2", + "num2fraction": "1.2.2", + "postcss": "6.0.10", + "postcss-value-parser": "3.3.0" + } + }, + "browserslist": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.4.0.tgz", + "integrity": "sha512-aM2Gt4x9bVlCUteADBS6JP0F+2tMWKM1jQzUulVROtdFWFIcIVvY76AJbr7GDqy0eDhn+PcnpzzivGxY4qiaKQ==", + "requires": { + "caniuse-lite": "1.0.30000721", + "electron-to-chromium": "1.3.20" + } + }, + "chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "requires": { + "ansi-styles": "3.2.0", + "escape-string-regexp": "1.0.5", + "supports-color": "4.4.0" + } + }, + "cosmiconfig": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", + "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "requires": { + "is-directory": "0.3.1", + "js-yaml": "3.7.0", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "os-homedir": "1.0.2", + "parse-json": "2.2.0", + "require-from-string": "1.2.1" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "requires": { + "flat-cache": "1.2.2", + "object-assign": "4.1.1" + } + }, + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "1.0.2", + "glob": "7.1.2", + "object-assign": "4.1.1", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "html-tags": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz", + "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=" + }, + "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=" + }, + "known-css-properties": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.2.0.tgz", + "integrity": "sha512-UTCzU28rRI9wkb8qSGoZa9pgWvxr4LjP2MEhi9XHb/1XMOJy0uTnIxaxzj8My/PORG+kQG6VzAcGvRw66eIOfA==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "postcss": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.10.tgz", + "integrity": "sha512-7WOpqea/cQHH1XUXdN1mqoFFmhigW3KAXJ+ssMOk/f6mKmwqFgqqdwsnjLGH+wuY+kwaJvT4whHcfKt5kWga0A==", + "requires": { + "chalk": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.4.0" + } + }, + "postcss-less": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-1.1.0.tgz", + "integrity": "sha1-vcx2vmTEMk2HP7xc2foueZ5DBfo=", + "requires": { + "postcss": "5.2.17" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" + }, + "postcss": { + "version": "5.2.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.17.tgz", + "integrity": "sha1-z09Ze4ZNZcikkrLqvp1wbIecOIs=", + "requires": { + "chalk": "1.1.3", + "js-base64": "2.1.9", + "source-map": "0.5.7", + "supports-color": "3.2.3" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "postcss-reporter": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-4.0.0.tgz", + "integrity": "sha512-IEVx20y277AIs3bZ6sUdzdq0YOE2RRbwnjUvTMfYYZmws0mE7YgqxZd0J8j60Byaf/QbjxyLfFJEQHH2bb+ecA==", + "requires": { + "chalk": "1.1.3", + "lodash": "4.17.4", + "log-symbols": "1.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "postcss-scss": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-1.0.2.tgz", + "integrity": "sha1-/0XPM1S4ee6JpOtoaA9GrJuxT5Q=", + "requires": { + "postcss": "6.0.10" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + }, + "specificity": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.3.1.tgz", + "integrity": "sha1-8bBoQkzjF64HR42V3jwhz4Xo1Wc=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + }, + "dependencies": { + "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" + } + } + } + }, + "stylelint": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-8.0.0.tgz", + "integrity": "sha512-k1GkRhOtghvYu5PWCdec7SNN22KZZLq4TL1vVyykBvHr91oUS7eVfX2IAZJjBpYKh9Gdep+AnSZCwuUn+J76Bw==", + "requires": { + "autoprefixer": "7.1.3", + "balanced-match": "1.0.0", + "chalk": "2.1.0", + "cosmiconfig": "2.2.2", + "debug": "2.6.8", + "execall": "1.0.0", + "file-entry-cache": "2.0.0", + "get-stdin": "5.0.1", + "globby": "6.1.0", + "globjoin": "0.1.4", + "html-tags": "2.0.0", + "ignore": "3.3.5", + "imurmurhash": "0.1.4", + "known-css-properties": "0.2.0", + "lodash": "4.17.4", + "log-symbols": "1.0.2", + "mathml-tag-names": "2.0.1", + "meow": "3.7.0", + "micromatch": "2.3.11", + "normalize-selector": "0.2.0", + "pify": "3.0.0", + "postcss": "6.0.10", + "postcss-less": "1.1.0", + "postcss-media-query-parser": "0.2.3", + "postcss-reporter": "4.0.0", + "postcss-resolve-nested-selector": "0.1.1", + "postcss-scss": "1.0.2", + "postcss-selector-parser": "2.2.3", + "postcss-value-parser": "3.3.0", + "resolve-from": "3.0.0", + "specificity": "0.3.1", + "string-width": "2.1.1", + "style-search": "0.1.0", + "sugarss": "1.0.0", + "svg-tags": "1.0.0", + "table": "4.0.1" + } + }, + "sugarss": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-1.0.0.tgz", + "integrity": "sha1-ZeUbOVhDL7cNVFGmi7M+MtDPHvc=", + "requires": { + "postcss": "6.0.10" + } + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "requires": { + "has-flag": "2.0.0" + } + }, + "table": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.1.tgz", + "integrity": "sha1-qBFsEz+sLGH0pCCrbN9cTWHw5DU=", + "requires": { + "ajv": "4.11.8", + "ajv-keywords": "1.5.1", + "chalk": "1.1.3", + "lodash": "4.17.4", + "slice-ansi": "0.0.4", + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + } + } + }, + "sugarss": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-0.1.6.tgz", + "integrity": "sha1-/jrA4eBygq7x3oSoC3I4b/Tn6jc=", + "requires": { + "postcss": "5.2.17" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "requires": { + "has-flag": "1.0.0" + } + }, + "svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=" + }, + "svgo": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz", + "integrity": "sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=", + "requires": { + "coa": "1.0.4", + "colors": "1.1.2", + "csso": "2.3.2", + "js-yaml": "3.7.0", + "mkdirp": "0.5.1", + "sax": "1.2.4", + "whet.extend": "0.9.9" + } + }, + "symbol-observable": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", + "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" + }, + "sync-exec": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/sync-exec/-/sync-exec-0.5.0.tgz", + "integrity": "sha1-P3JY5KW6FyRTgZCfpqb2z1BuFmE=" + }, + "synesthesia": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/synesthesia/-/synesthesia-1.0.1.tgz", + "integrity": "sha1-XvlepUjA1cbm+btLDQcx3/hkp3c=", + "requires": { + "css-color-names": "0.0.3" + }, + "dependencies": { + "css-color-names": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.3.tgz", + "integrity": "sha1-3gzvFvTYqoIioyDVttfpu62nufY=" + } + } + }, + "table": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", + "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "requires": { + "ajv": "4.11.8", + "ajv-keywords": "1.5.1", + "chalk": "1.1.3", + "lodash": "4.17.4", + "slice-ansi": "0.0.4", + "string-width": "2.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "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=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "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" + } + } + } + }, + "tapable": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz", + "integrity": "sha1-KcNXB8K3DlDQdIK10gLo7URtr9Q=" + }, + "tar": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar.gz": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tar.gz/-/tar.gz-1.0.3.tgz", + "integrity": "sha1-32CWJlT4aQS2PEKcrOrIbcrS4VA=", + "requires": { + "bluebird": "2.11.0", + "chai": "3.5.0", + "commander": "2.11.0", + "fstream": "1.0.11", + "mocha": "2.5.3", + "mout": "0.11.1", + "tar": "2.2.1" + }, + "dependencies": { + "bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" + }, + "mout": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/mout/-/mout-0.11.1.tgz", + "integrity": "sha1-ujYR318OWx/7/QEWa48C0fX6K5k=" + } + } + }, + "tether": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/tether/-/tether-1.4.0.tgz", + "integrity": "sha1-D5+hcfdb9YSF2BSelHmdeudNHBo=" + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", + "requires": { + "readable-stream": "2.3.3", + "xtend": "4.0.1" + } + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "requires": { + "os-homedir": "1.0.2" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=" + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "requires": { + "process": "0.11.10" + } + }, + "tiny-emitter": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.2.tgz", + "integrity": "sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow==" + }, + "to-camel-case": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-camel-case/-/to-camel-case-1.0.0.tgz", + "integrity": "sha1-GlYFSy+daWKYzmamCJcyK29CPkY=", + "requires": { + "to-space-case": "1.0.0" + } + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "to-iso-string": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz", + "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE=" + }, + "to-no-case": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz", + "integrity": "sha1-xyKQcWTvaxeBMsjmmTAhLRtKoWo=" + }, + "to-space-case": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-1.0.0.tgz", + "integrity": "sha1-sFLar7Gysp3HcM6gFj5ewOvJ/Bc=", + "requires": { + "to-no-case": "1.0.2" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, + "tryit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", + "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=" + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-detect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz", + "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI=" + }, + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.17" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "ua-parser-js": { + "version": "0.7.14", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.14.tgz", + "integrity": "sha1-EQ1T+kw/MmwSEpK76skE0uAzh8o=" + }, + "uglify-js": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.4.tgz", + "integrity": "sha1-ZeovswWck5RpLxX+2HwrNsFrmt8=", + "requires": { + "async": "0.2.10", + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=" + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + }, + "uniqid": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/uniqid/-/uniqid-4.1.1.tgz", + "integrity": "sha1-iSIN32t1GuUrX3JISGNShZa7hME=", + "requires": { + "macaddress": "0.2.8" + } + }, + "uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=" + }, + "unique-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "url": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", + "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "url-loader": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-0.5.7.tgz", + "integrity": "sha1-Z+h3l1n4AA2nSZSQZoDJQ6mwkl0=", + "requires": { + "loader-utils": "0.2.17", + "mime": "1.2.11" + } + }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "requires": { + "os-homedir": "1.0.2" + } + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "requires": { + "user-home": "1.1.1" + }, + "dependencies": { + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=" + } + } + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "value-equal": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.2.1.tgz", + "integrity": "sha1-wiCjBDYfzmmU277ao8fhobiVhx0=" + }, + "vendors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.1.tgz", + "integrity": "sha1-N61zyO5Bf7PVgOeFMSMH0nSEfyI=" + }, + "vinyl": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", + "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + }, + "vinyl-bufferstream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vinyl-bufferstream/-/vinyl-bufferstream-1.0.1.tgz", + "integrity": "sha1-BTeGn1gO/6TKRay0dXnkuf5jCBo=", + "requires": { + "bufferstreams": "1.0.1" + } + }, + "vinyl-file": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-1.3.0.tgz", + "integrity": "sha1-qgVjTTqGe6kUR77bs0r8sm9E9uc=", + "requires": { + "graceful-fs": "4.1.11", + "strip-bom": "2.0.0", + "strip-bom-stream": "1.0.0", + "vinyl": "1.2.0" + }, + "dependencies": { + "vinyl": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", + "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", + "requires": { + "clone": "1.0.2", + "clone-stats": "0.0.1", + "replace-ext": "0.0.1" + } + } + } + }, + "vinyl-fs": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", + "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", + "requires": { + "defaults": "1.0.3", + "glob-stream": "3.1.18", + "glob-watcher": "0.0.6", + "graceful-fs": "3.0.11", + "mkdirp": "0.5.1", + "strip-bom": "1.0.0", + "through2": "0.6.5", + "vinyl": "0.4.6" + }, + "dependencies": { + "clone": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", + "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=" + }, + "graceful-fs": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", + "requires": { + "natives": "1.1.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "strip-bom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", + "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", + "requires": { + "first-chunk-stream": "1.0.0", + "is-utf8": "0.2.1" + } + }, + "through2": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "4.0.1" + } + }, + "vinyl": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", + "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", + "requires": { + "clone": "0.2.0", + "clone-stats": "0.0.1" + } + } + } + }, + "vinyl-map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/vinyl-map/-/vinyl-map-1.0.2.tgz", + "integrity": "sha1-qLKWAl+XP6fK1igXlnpI8dF2v3w=", + "requires": { + "bl": "1.2.1", + "new-from": "0.0.3", + "through2": "0.4.2" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "through2": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", + "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "2.1.2" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "requires": { + "object-keys": "0.4.0" + } + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "requires": { + "source-map": "0.5.7" + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "requires": { + "indexof": "0.0.1" + } + }, + "warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", + "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", + "requires": { + "loose-envify": "1.3.1" + } + }, + "watchpack": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-0.2.9.tgz", + "integrity": "sha1-Yuqkq15bo1/fwBgnVibjwPXj+ws=", + "requires": { + "async": "0.9.2", + "chokidar": "1.7.0", + "graceful-fs": "4.1.11" + }, + "dependencies": { + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + } + } + }, + "webpack": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-1.13.1.tgz", + "integrity": "sha1-CmnojlvcWTk5NS1dd94PmsnQhx4=", + "requires": { + "acorn": "3.3.0", + "async": "1.5.2", + "clone": "1.0.2", + "enhanced-resolve": "0.9.1", + "interpret": "0.6.6", + "loader-utils": "0.2.17", + "memory-fs": "0.3.0", + "mkdirp": "0.5.1", + "node-libs-browser": "0.6.0", + "optimist": "0.6.1", + "supports-color": "3.2.3", + "tapable": "0.1.10", + "uglify-js": "2.6.4", + "watchpack": "0.2.9", + "webpack-core": "0.6.9" + }, + "dependencies": { + "interpret": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz", + "integrity": "sha1-/s16GOfOXKar+5U+H4YhOknxYls=" + } + } + }, + "webpack-core": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/webpack-core/-/webpack-core-0.6.9.tgz", + "integrity": "sha1-/FcViMhVjad76e+23r3Fo7FyvcI=", + "requires": { + "source-list-map": "0.1.8", + "source-map": "0.4.4" + }, + "dependencies": { + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "webpack-sources": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-0.1.5.tgz", + "integrity": "sha1-qh86vw8NdNtxEcQOUAuE+WZkB1A=", + "requires": { + "source-list-map": "0.1.8", + "source-map": "0.5.7" + } + }, + "webpack-stream": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/webpack-stream/-/webpack-stream-2.1.1.tgz", + "integrity": "sha1-gUItWGPCjHDAEQNvUYWDrZVylBA=", + "requires": { + "gulp-util": "3.0.7", + "lodash.clone": "3.0.3", + "memory-fs": "0.2.0", + "through": "2.3.8", + "vinyl": "0.5.3", + "webpack": "1.13.1" + }, + "dependencies": { + "memory-fs": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.2.0.tgz", + "integrity": "sha1-8rslNovBIeORwlIN6Slpyu4KApA=" + } + } + }, + "websocket-driver": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz", + "integrity": "sha1-XLJVbOuF9Dc8bYI4qmkchFThOjY=", + "requires": { + "websocket-extensions": "0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz", + "integrity": "sha1-domUmcGEtu91Q3fC27DNbLVdKec=" + }, + "whatwg-fetch": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", + "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=" + }, + "whet.extend": { + "version": "0.9.9", + "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz", + "integrity": "sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=" + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "requires": { + "isexe": "2.0.0" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "requires": { + "mkdirp": "0.5.1" + } + }, + "write-file-stdout": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/write-file-stdout/-/write-file-stdout-0.0.2.tgz", + "integrity": "sha1-wlLXx8WxtAKJdjDjRTx7/mkNnKE=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yargs": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.3.3.tgz", + "integrity": "sha1-BU3oth8i7v23IHBZ6u+da4P7kxo=" + } + } +} diff --git a/package.json b/package.json index b98759107..cd1c62a21 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "gulp-wrap": "0.13.0", "history": "4.6.3", "jdu": "1.0.0", + "jquery": "2.2.4", "lodash": "4.17.4", "mobile-detect": "1.3.6", "moment": "2.17.1", @@ -92,6 +93,7 @@ "require-nocache": "1.0.0", "reselect": "3.0.1", "run-sequence": "1.2.0", + "signalr": "2.2.2", "streamqueue": "1.1.1", "style-loader": "0.13.1", "stylelint": "7.3.1", diff --git a/src/Lidarr.Api.V3/Lidarr.Api.V3.csproj b/src/Lidarr.Api.V3/Lidarr.Api.V3.csproj index c23c2c12a..71265644c 100644 --- a/src/Lidarr.Api.V3/Lidarr.Api.V3.csproj +++ b/src/Lidarr.Api.V3/Lidarr.Api.V3.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,7 +9,7 @@ Properties Lidarr.Api.V3 Lidarr.Api.V3 - v4.0 + v4.6.1 512 ..\ true @@ -28,6 +28,7 @@ MinimumRecommendedRules.ruleset 4 false + false ..\..\_output\ @@ -38,6 +39,7 @@ prompt MinimumRecommendedRules.ruleset 4 + false @@ -53,9 +55,8 @@ ..\packages\Ical.Net.2.2.32\lib\net40\Ical.Net.Collections.dll - - ..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True + + ..\packages\Nancy.1.4.4\lib\net40\Nancy.dll ..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll @@ -213,22 +214,22 @@ {F6FC6BE7-0847-4817-A1ED-223DC647C3D7} Marr.Data + + {5370BFF7-1BD7-46BC-AF06-7D9EA5CDA1D6} + Lidarr.Http + - {F2BE0FDF-6E47-4827-A420-DD4EF82407F8} + {f2be0fdf-6e47-4827-a420-dd4ef82407f8} NzbDrone.Common - {FF5EE3B6-913B-47CE-9CEB-11C51B4E1205} + {ff5ee3b6-913b-47ce-9ceb-11c51b4e1205} NzbDrone.Core - {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36} + {7c2cc69f-5ca0-4e5c-85cb-983f9f6c3b36} NzbDrone.SignalR - - {5370BFF7-1BD7-46BC-AF06-7D9EA5CDA1D6} - Lidarr.Http - diff --git a/src/Lidarr.Api.V3/app.config b/src/Lidarr.Api.V3/app.config index c1684a7be..d4d6857aa 100644 --- a/src/Lidarr.Api.V3/app.config +++ b/src/Lidarr.Api.V3/app.config @@ -10,6 +10,14 @@ + + + + + + + + - \ No newline at end of file + diff --git a/src/Lidarr.Api.V3/packages.config b/src/Lidarr.Api.V3/packages.config index f68f69f6b..245f86276 100644 --- a/src/Lidarr.Api.V3/packages.config +++ b/src/Lidarr.Api.V3/packages.config @@ -1,10 +1,10 @@  - - - - - - - + + + + + + + \ No newline at end of file diff --git a/src/Lidarr.Http/Lidarr.Http.csproj b/src/Lidarr.Http/Lidarr.Http.csproj index 480aad86f..2f6c17074 100644 --- a/src/Lidarr.Http/Lidarr.Http.csproj +++ b/src/Lidarr.Http/Lidarr.Http.csproj @@ -9,8 +9,9 @@ Properties Lidarr.Http Lidarr.Http - v4.0 + v4.6.1 512 + true @@ -20,6 +21,7 @@ x86 prompt MinimumRecommendedRules.ruleset + false bin\x86\Release\ @@ -29,15 +31,15 @@ x86 prompt MinimumRecommendedRules.ruleset + false ..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll True - - ..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True + + ..\packages\Nancy.1.4.4\lib\net40\Nancy.dll ..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll diff --git a/src/Lidarr.Http/app.config b/src/Lidarr.Http/app.config index 8460dd432..c6693bd88 100644 --- a/src/Lidarr.Http/app.config +++ b/src/Lidarr.Http/app.config @@ -6,6 +6,14 @@ + + + + + + + + - \ No newline at end of file + diff --git a/src/Lidarr.Http/packages.config b/src/Lidarr.Http/packages.config index 1d49009e6..71b4cc636 100644 --- a/src/Lidarr.Http/packages.config +++ b/src/Lidarr.Http/packages.config @@ -1,9 +1,9 @@  - - - - - - + + + + + + \ No newline at end of file diff --git a/src/Lidarr.sln b/src/Lidarr.sln index 8d8d24bc3..ba01b4c9c 100644 --- a/src/Lidarr.sln +++ b/src/Lidarr.sln @@ -61,10 +61,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.SignalR", "NzbDron EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{F6E3A728-AE77-4D02-BAC8-82FBC1402DDA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.SignalR.Core", "Microsoft.AspNet.SignalR.Core\Microsoft.AspNet.SignalR.Core.csproj", "{1B9A82C4-BCA1-4834-A33E-226F17BE070B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.SignalR.Owin", "Microsoft.AspNet.SignalR.Owin\Microsoft.AspNet.SignalR.Owin.csproj", "{2B8C6DAD-4D85-41B1-83FD-248D9F347522}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Marr.Data", "Marr.Data\Marr.Data.csproj", "{F6FC6BE7-0847-4817-A1ED-223DC647C3D7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NzbDrone.Mono", "NzbDrone.Mono\NzbDrone.Mono.csproj", "{15AD7579-A314-4626-B556-663F51D97CD1}" @@ -218,18 +214,6 @@ Global {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Mono|x86.Build.0 = Debug|x86 {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|x86.ActiveCfg = Release|x86 {7C2CC69F-5CA0-4E5C-85CB-983F9F6C3B36}.Release|x86.Build.0 = Release|x86 - {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|x86.ActiveCfg = Debug|x86 - {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Debug|x86.Build.0 = Debug|x86 - {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Mono|x86.ActiveCfg = Debug|x86 - {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Mono|x86.Build.0 = Debug|x86 - {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|x86.ActiveCfg = Release|x86 - {1B9A82C4-BCA1-4834-A33E-226F17BE070B}.Release|x86.Build.0 = Release|x86 - {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|x86.ActiveCfg = Debug|x86 - {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Debug|x86.Build.0 = Debug|x86 - {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Mono|x86.ActiveCfg = Release|x86 - {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Mono|x86.Build.0 = Release|x86 - {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|x86.ActiveCfg = Release|x86 - {2B8C6DAD-4D85-41B1-83FD-248D9F347522}.Release|x86.Build.0 = Release|x86 {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Debug|x86.ActiveCfg = Debug|x86 {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Debug|x86.Build.0 = Debug|x86 {F6FC6BE7-0847-4817-A1ED-223DC647C3D7}.Mono|x86.ActiveCfg = Release|x86 @@ -313,8 +297,6 @@ Global {3DCA7B58-B8B3-49AC-9D9E-56F4A0460976} = {486ADF86-DD89-4E19-B805-9D94F19800D9} {95C11A9E-56ED-456A-8447-2C89C1139266} = {486ADF86-DD89-4E19-B805-9D94F19800D9} {D12F7F2F-8A3C-415F-88FA-6DD061A84869} = {486ADF86-DD89-4E19-B805-9D94F19800D9} - {1B9A82C4-BCA1-4834-A33E-226F17BE070B} = {F6E3A728-AE77-4D02-BAC8-82FBC1402DDA} - {2B8C6DAD-4D85-41B1-83FD-248D9F347522} = {F6E3A728-AE77-4D02-BAC8-82FBC1402DDA} {F6FC6BE7-0847-4817-A1ED-223DC647C3D7} = {F6E3A728-AE77-4D02-BAC8-82FBC1402DDA} {15AD7579-A314-4626-B556-663F51D97CD1} = {0F0D4998-8F5D-4467-A909-BB192C4B3B4B} {911284D3-F130-459E-836C-2430B6FBF21D} = {0F0D4998-8F5D-4467-A909-BB192C4B3B4B} @@ -327,8 +309,8 @@ Global {74420A79-CC16-442C-8B1E-7C1B913844F0} = {F6E3A728-AE77-4D02-BAC8-82FBC1402DDA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {2C047BC5-490F-4DCE-962F-141370D23765} EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.0\lib\NET35;packages\Unity.2.1.505.2\lib\NET35 + SolutionGuid = {2C047BC5-490F-4DCE-962F-141370D23765} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = NzbDrone.Console\NzbDrone.Console.csproj diff --git a/src/LogentriesCore/LogentriesCore.csproj b/src/LogentriesCore/LogentriesCore.csproj index 4f6c66677..eb2d0c560 100644 --- a/src/LogentriesCore/LogentriesCore.csproj +++ b/src/LogentriesCore/LogentriesCore.csproj @@ -51,6 +51,9 @@ MinimumRecommendedRules.ruleset + + ..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.1.0\lib\net40\Microsoft.WindowsAzure.Configuration.dll + diff --git a/src/Microsoft.AspNet.SignalR.Core/AuthorizeAttribute.cs b/src/Microsoft.AspNet.SignalR.Core/AuthorizeAttribute.cs deleted file mode 100644 index 05caef0a0..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/AuthorizeAttribute.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Security.Principal; -using Microsoft.AspNet.SignalR.Hubs; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// Apply to Hubs and Hub methods to authorize client connections to Hubs and authorize client invocations of Hub methods. - /// - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)] - [SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes", Justification = "MVC and WebAPI don't seal their AuthorizeAttributes")] - public class AuthorizeAttribute : Attribute, IAuthorizeHubConnection, IAuthorizeHubMethodInvocation - { - private string _roles; - private string[] _rolesSplit = new string[0]; - private string _users; - private string[] _usersSplit = new string[0]; - - [SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Justification = "Already somewhat represented by set-only RequiredOutgoing property.")] - protected bool? _requireOutgoing; - - /// - /// Set to false to apply authorization only to the invocations of any of the Hub's server-side methods. - /// This property only affects attributes applied to the Hub class. - /// This property cannot be read. - /// - [SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations", Justification = "Must be property because this is an attribute parameter.")] - public bool RequireOutgoing - { - // It is impossible to tell here whether the attribute is being applied to a method or class. This makes - // it impossible to determine whether the value should be true or false when _requireOutgoing is null. - // It is also impossible to have a Nullable attribute parameter type. - get { throw new NotImplementedException(Resources.Error_DoNotReadRequireOutgoing); } - set { _requireOutgoing = value; } - } - - /// - /// Gets or sets the user roles. - /// - public string Roles - { - get { return _roles ?? String.Empty; } - set - { - _roles = value; - _rolesSplit = SplitString(value); - } - } - - /// - /// Gets or sets the authorized users. - /// - public string Users - { - get { return _users ?? String.Empty; } - set - { - _users = value; - _usersSplit = SplitString(value); - } - } - - /// - /// Determines whether client is authorized to connect to . - /// - /// Description of the hub client is attempting to connect to. - /// The (re)connect request from the client. - /// true if the caller is authorized to connect to the hub; otherwise, false. - public virtual bool AuthorizeHubConnection(HubDescriptor hubDescriptor, IRequest request) - { - if (request == null) - { - throw new ArgumentNullException("request"); - } - - // If RequireOutgoing is explicitly set to false, authorize all connections. - if (_requireOutgoing.HasValue && !_requireOutgoing.Value) - { - return true; - } - - return UserAuthorized(request.User); - } - - /// - /// Determines whether client is authorized to invoke the method. - /// - /// An providing details regarding the method invocation. - /// Indicates whether the interface instance is an attribute applied directly to a method. - /// true if the caller is authorized to invoke the method; otherwise, false. - public virtual bool AuthorizeHubMethodInvocation(IHubIncomingInvokerContext hubIncomingInvokerContext, bool appliesToMethod) - { - if (hubIncomingInvokerContext == null) - { - throw new ArgumentNullException("hubIncomingInvokerContext"); - } - - // It is impossible to require outgoing auth at the method level with SignalR's current design. - // Even though this isn't the stage at which outgoing auth would be applied, we want to throw a runtime error - // to indicate when the attribute is being used with obviously incorrect expectations. - - // We must explicitly check if _requireOutgoing is true since it is a Nullable type. - if (appliesToMethod && (_requireOutgoing == true)) - { - throw new ArgumentException(Resources.Error_MethodLevelOutgoingAuthorization); - } - - return UserAuthorized(hubIncomingInvokerContext.Hub.Context.User); - } - - /// - /// When overridden, provides an entry point for custom authorization checks. - /// Called by and . - /// - /// The for the client being authorize - /// true if the user is authorized, otherwise, false - protected virtual bool UserAuthorized(IPrincipal user) - { - if (user == null) - { - return false; - } - - if (!user.Identity.IsAuthenticated) - { - return false; - } - - if (_usersSplit.Length > 0 && !_usersSplit.Contains(user.Identity.Name, StringComparer.OrdinalIgnoreCase)) - { - return false; - } - - if (_rolesSplit.Length > 0 && !_rolesSplit.Any(user.IsInRole)) - { - return false; - } - - return true; - } - - private static string[] SplitString(string original) - { - if (String.IsNullOrEmpty(original)) - { - return new string[0]; - } - - var split = from piece in original.Split(',') - let trimmed = piece.Trim() - where !String.IsNullOrEmpty(trimmed) - select trimmed; - return split.ToArray(); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Configuration/ConfigurationExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Configuration/ConfigurationExtensions.cs deleted file mode 100644 index 630fad897..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Configuration/ConfigurationExtensions.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Configuration -{ - internal static class ConfigurationExtensions - { - public const int MissedTimeoutsBeforeClientReconnect = 2; - public const int HeartBeatsPerKeepAlive = 2; - public const int HeartBeatsPerDisconnectTimeout = 6; - - /// - /// The amount of time the client should wait without seeing a keep alive before trying to reconnect. - /// - public static TimeSpan? KeepAliveTimeout(this IConfigurationManager config) - { - if (config.KeepAlive != null) - { - return TimeSpan.FromTicks(config.KeepAlive.Value.Ticks * MissedTimeoutsBeforeClientReconnect); - } - else - { - return null; - } - } - - /// - /// The interval between successively checking connection states. - /// - public static TimeSpan HeartbeatInterval(this IConfigurationManager config) - { - if (config.KeepAlive != null) - { - return TimeSpan.FromTicks(config.KeepAlive.Value.Ticks / HeartBeatsPerKeepAlive); - } - else - { - // If KeepAlives are disabled, have the heartbeat run at the same rate it would if the KeepAlive was - // kept at the default value. - return TimeSpan.FromTicks(config.DisconnectTimeout.Ticks / HeartBeatsPerDisconnectTimeout); - } - } - - /// - /// The amount of time a Topic should stay in memory after its last subscriber is removed. - /// - /// - /// - public static TimeSpan TopicTtl(this IConfigurationManager config) - { - // If the deep-alive is disabled, don't take it into account when calculating the topic TTL. - var keepAliveTimeout = config.KeepAliveTimeout() ?? TimeSpan.Zero; - - // Keep topics alive for twice as long as we let connections to reconnect. (The DisconnectTimeout) - // Also add twice the keep-alive timeout since clients might take a while to notice they are disconnected. - // This should be a very conservative estimate for how long we must wait before considering a topic dead. - return TimeSpan.FromTicks((config.DisconnectTimeout.Ticks + keepAliveTimeout.Ticks) * 2); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Configuration/DefaultConfigurationManager.cs b/src/Microsoft.AspNet.SignalR.Core/Configuration/DefaultConfigurationManager.cs deleted file mode 100644 index af49f1978..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Configuration/DefaultConfigurationManager.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Configuration -{ - public class DefaultConfigurationManager : IConfigurationManager - { - // The below effectively sets the minimum heartbeat to once per second. - // if _minimumKeepAlive != 2 seconds, update the ArguementOutOfRanceExceptionMessage below - private static readonly TimeSpan _minimumKeepAlive = TimeSpan.FromSeconds(2); - - // if _minimumKeepAlivesPerDisconnectTimeout != 3, update the ArguementOutOfRanceExceptionMessage below - private const int _minimumKeepAlivesPerDisconnectTimeout = 3; - - // if _minimumDisconnectTimeout != 6 seconds, update the ArguementOutOfRanceExceptionMessage below - private static readonly TimeSpan _minimumDisconnectTimeout = TimeSpan.FromTicks(_minimumKeepAlive.Ticks * _minimumKeepAlivesPerDisconnectTimeout); - - private bool _keepAliveConfigured; - private TimeSpan? _keepAlive; - private TimeSpan _disconnectTimeout; - - public DefaultConfigurationManager() - { - ConnectionTimeout = TimeSpan.FromSeconds(110); - DisconnectTimeout = TimeSpan.FromSeconds(30); - DefaultMessageBufferSize = 1000; - } - - // TODO: Should we guard against negative TimeSpans here like everywhere else? - public TimeSpan ConnectionTimeout - { - get; - set; - } - - public TimeSpan DisconnectTimeout - { - get - { - return _disconnectTimeout; - } - set - { - if (value < _minimumDisconnectTimeout) - { - throw new ArgumentOutOfRangeException("value", Resources.Error_DisconnectTimeoutMustBeAtLeastSixSeconds); - } - - if (_keepAliveConfigured) - { - throw new InvalidOperationException(Resources.Error_DisconnectTimeoutCannotBeConfiguredAfterKeepAlive); - } - - _disconnectTimeout = value; - _keepAlive = TimeSpan.FromTicks(_disconnectTimeout.Ticks / _minimumKeepAlivesPerDisconnectTimeout); - } - } - - public TimeSpan? KeepAlive - { - get - { - return _keepAlive; - } - set - { - if (value < _minimumKeepAlive) - { - throw new ArgumentOutOfRangeException("value", Resources.Error_KeepAliveMustBeGreaterThanTwoSeconds); - } - - if (value > TimeSpan.FromTicks(_disconnectTimeout.Ticks / _minimumKeepAlivesPerDisconnectTimeout)) - { - throw new ArgumentOutOfRangeException("value", Resources.Error_KeepAliveMustBeNoMoreThanAThirdOfTheDisconnectTimeout); - } - - _keepAlive = value; - _keepAliveConfigured = true; - } - } - - public int DefaultMessageBufferSize - { - get; - set; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Configuration/IConfigurationManager.cs b/src/Microsoft.AspNet.SignalR.Core/Configuration/IConfigurationManager.cs deleted file mode 100644 index 9dd79a241..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Configuration/IConfigurationManager.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Configuration -{ - /// - /// Provides access to server configuration. - /// - public interface IConfigurationManager - { - /// - /// Gets or sets a representing the amount of time to leave a connection open before timing out. - /// - TimeSpan ConnectionTimeout { get; set; } - - /// - /// Gets or sets a representing the amount of time to wait after a connection goes away before raising the disconnect event. - /// - TimeSpan DisconnectTimeout { get; set; } - - /// - /// Gets or sets a representing the amount of time between send keep alive messages. - /// If enabled, this value must be at least two seconds. Set to null to disable. - /// - TimeSpan? KeepAlive { get; set; } - - /// - /// Gets of sets the number of messages to buffer for a specific signal. - /// - int DefaultMessageBufferSize { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/ConnectionConfiguration.cs b/src/Microsoft.AspNet.SignalR.Core/ConnectionConfiguration.cs deleted file mode 100644 index eef56241e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/ConnectionConfiguration.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR -{ - public class ConnectionConfiguration - { - // Resolver isn't set to GlobalHost.DependencyResolver in the ctor because it is lazily created. - private IDependencyResolver _resolver; - - /// - /// The dependency resolver to use for the hub connection. - /// - public IDependencyResolver Resolver - { - get { return _resolver ?? GlobalHost.DependencyResolver; } - set { _resolver = value; } - } - - /// - /// Determines if browsers can make cross domain requests to SignalR endpoints. - /// - public bool EnableCrossDomain { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/ConnectionExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/ConnectionExtensions.cs deleted file mode 100644 index 07cc587e1..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/ConnectionExtensions.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR -{ - public static class ConnectionExtensions - { - /// - /// Sends a message to all connections subscribed to the specified signal. An example of signal may be a - /// specific connection id. - /// - /// The connection - /// The connectionId to send to. - /// The value to publish. - /// The list of connection ids to exclude - /// A task that represents when the broadcast is complete. - public static Task Send(this IConnection connection, string connectionId, object value, params string[] excludeConnectionIds) - { - if (connection == null) - { - throw new ArgumentNullException("connection"); - } - - if (string.IsNullOrEmpty(connectionId)) - { - throw new ArgumentException(Resources.Error_ArgumentNullOrEmpty, "connectionId"); - } - - var message = new ConnectionMessage(PrefixHelper.GetConnectionId(connectionId), - value, - PrefixHelper.GetPrefixedConnectionIds(excludeConnectionIds)); - - return connection.Send(message); - } - - /// - /// Broadcasts a value to all connections, excluding the connection ids specified. - /// - /// The connection - /// The value to broadcast. - /// The list of connection ids to exclude - /// A task that represents when the broadcast is complete. - public static Task Broadcast(this IConnection connection, object value, params string[] excludeConnectionIds) - { - if (connection == null) - { - throw new ArgumentNullException("connection"); - } - - var message = new ConnectionMessage(connection.DefaultSignal, - value, - PrefixHelper.GetPrefixedConnectionIds(excludeConnectionIds)); - - return connection.Send(message); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/ConnectionMessage.cs b/src/Microsoft.AspNet.SignalR.Core/ConnectionMessage.cs deleted file mode 100644 index 6c632c9f6..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/ConnectionMessage.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// A message sent to one more connections. - /// - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "Messags are never compared, just used as data.")] - public struct ConnectionMessage - { - /// - /// The signal to this message should be sent to. Connections subscribed to this signal - /// will receive the message payload. - /// - public string Signal { get; private set; } - - /// - /// The payload of the message. - /// - public object Value { get; private set; } - - /// - /// Represents a list of signals that should be used to filter what connections - /// receive this message. - /// - public IList ExcludedSignals { get; private set; } - - public ConnectionMessage(string signal, object value) - : this(signal, value, ListHelper.Empty) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The signal - /// The payload of the message - /// The signals to exclude. - public ConnectionMessage(string signal, object value, IList excludedSignals) - : this() - { - Signal = signal; - Value = value; - ExcludedSignals = excludedSignals; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Cookie.cs b/src/Microsoft.AspNet.SignalR.Core/Cookie.cs deleted file mode 100644 index b251da93d..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Cookie.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR -{ - public class Cookie - { - public Cookie(string name, string value) - : this(name, value, String.Empty, String.Empty) - { - - } - - public Cookie(string name, string value, string domain, string path) - { - Name = name; - Value = value; - Domain = domain; - Path = path; - } - - public string Name { get; private set; } - public string Domain { get; private set; } - public string Path { get; private set; } - public string Value { get; private set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/DefaultDependencyResolver.cs b/src/Microsoft.AspNet.SignalR.Core/DefaultDependencyResolver.cs deleted file mode 100644 index da8cb14fc..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/DefaultDependencyResolver.cs +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.Linq; -using System.Threading; -using Microsoft.AspNet.SignalR.Configuration; -using Microsoft.AspNet.SignalR.Hubs; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Json; -using Microsoft.AspNet.SignalR.Messaging; -using Microsoft.AspNet.SignalR.Tracing; -using Microsoft.AspNet.SignalR.Transports; - -namespace Microsoft.AspNet.SignalR -{ - public class DefaultDependencyResolver : IDependencyResolver - { - private readonly Dictionary>> _resolvers = new Dictionary>>(); - private readonly HashSet _trackedDisposables = new HashSet(); - private int _disposed; - - [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Justification = "It's easiest")] - public DefaultDependencyResolver() - { - RegisterDefaultServices(); - - // Hubs - RegisterHubExtensions(); - } - - [SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "The resolver is the class that does the most coupling by design.")] - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The resolver disposes dependencies on Dispose.")] - private void RegisterDefaultServices() - { - var traceManager = new Lazy(() => new TraceManager()); - Register(typeof(ITraceManager), () => traceManager.Value); - - var serverIdManager = new ServerIdManager(); - Register(typeof(IServerIdManager), () => serverIdManager); - - var serverMessageHandler = new Lazy(() => new ServerCommandHandler(this)); - Register(typeof(IServerCommandHandler), () => serverMessageHandler.Value); - - var newMessageBus = new Lazy(() => new MessageBus(this)); - Register(typeof(IMessageBus), () => newMessageBus.Value); - - var stringMinifier = new Lazy(() => new StringMinifier()); - Register(typeof(IStringMinifier), () => stringMinifier.Value); - - var serializer = new Lazy(); - Register(typeof(IJsonSerializer), () => serializer.Value); - - var transportManager = new Lazy(() => new TransportManager(this)); - Register(typeof(ITransportManager), () => transportManager.Value); - - var configurationManager = new DefaultConfigurationManager(); - Register(typeof(IConfigurationManager), () => configurationManager); - - var transportHeartbeat = new Lazy(() => new TransportHeartbeat(this)); - Register(typeof(ITransportHeartbeat), () => transportHeartbeat.Value); - - var connectionManager = new Lazy(() => new ConnectionManager(this)); - Register(typeof(IConnectionManager), () => connectionManager.Value); - - var ackHandler = new Lazy(); - Register(typeof(IAckHandler), () => ackHandler.Value); - - var perfCounterWriter = new Lazy(() => new PerformanceCounterManager(this)); - Register(typeof(IPerformanceCounterManager), () => perfCounterWriter.Value); - - var protectedData = new DefaultProtectedData(); - Register(typeof(IProtectedData), () => protectedData); - } - - private void RegisterHubExtensions() - { - var methodDescriptorProvider = new Lazy(); - Register(typeof(IMethodDescriptorProvider), () => methodDescriptorProvider.Value); - - var hubDescriptorProvider = new Lazy(() => new ReflectedHubDescriptorProvider(this)); - Register(typeof(IHubDescriptorProvider), () => hubDescriptorProvider.Value); - - var parameterBinder = new Lazy(); - Register(typeof(IParameterResolver), () => parameterBinder.Value); - - var activator = new Lazy(() => new DefaultHubActivator(this)); - Register(typeof(IHubActivator), () => activator.Value); - - var hubManager = new Lazy(() => new DefaultHubManager(this)); - Register(typeof(IHubManager), () => hubManager.Value); - - var proxyGenerator = new Lazy(() => new DefaultJavaScriptProxyGenerator(this)); - Register(typeof(IJavaScriptProxyGenerator), () => proxyGenerator.Value); - - var requestParser = new Lazy(); - Register(typeof(IHubRequestParser), () => requestParser.Value); - - var assemblyLocator = new Lazy(() => new DefaultAssemblyLocator()); - Register(typeof(IAssemblyLocator), () => assemblyLocator.Value); - - // Setup the default hub pipeline - var dispatcher = new Lazy(() => new HubPipeline().AddModule(new AuthorizeModule())); - Register(typeof(IHubPipeline), () => dispatcher.Value); - Register(typeof(IHubPipelineInvoker), () => dispatcher.Value); - } - - public virtual object GetService(Type serviceType) - { - if (serviceType == null) - { - throw new ArgumentNullException("serviceType"); - } - - IList> activators; - if (_resolvers.TryGetValue(serviceType, out activators)) - { - if (activators.Count == 0) - { - return null; - } - if (activators.Count > 1) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_MultipleActivatorsAreaRegisteredCallGetServices, serviceType.FullName)); - } - return Track(activators[0]); - } - return null; - } - - public virtual IEnumerable GetServices(Type serviceType) - { - IList> activators; - if (_resolvers.TryGetValue(serviceType, out activators)) - { - if (activators.Count == 0) - { - return null; - } - return activators.Select(Track).ToList(); - } - return null; - } - - public virtual void Register(Type serviceType, Func activator) - { - IList> activators; - if (!_resolvers.TryGetValue(serviceType, out activators)) - { - activators = new List>(); - _resolvers.Add(serviceType, activators); - } - else - { - activators.Clear(); - } - activators.Add(activator); - } - - public virtual void Register(Type serviceType, IEnumerable> activators) - { - if (activators == null) - { - throw new ArgumentNullException("activators"); - } - - IList> list; - if (!_resolvers.TryGetValue(serviceType, out list)) - { - list = new List>(); - _resolvers.Add(serviceType, list); - } - else - { - list.Clear(); - } - foreach (var a in activators) - { - list.Add(a); - } - } - - private object Track(Func creator) - { - object obj = creator(); - - if (_disposed == 0) - { - var disposable = obj as IDisposable; - if (disposable != null) - { - lock (_trackedDisposables) - { - if (_disposed == 0) - { - _trackedDisposables.Add(disposable); - } - } - } - } - - return obj; - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - if (Interlocked.Exchange(ref _disposed, 1) == 0) - { - lock (_trackedDisposables) - { - foreach (var d in _trackedDisposables) - { - d.Dispose(); - } - - _trackedDisposables.Clear(); - } - } - } - } - - public void Dispose() - { - Dispose(true); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/DependencyResolverExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/DependencyResolverExtensions.cs deleted file mode 100644 index d579634b1..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/DependencyResolverExtensions.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Microsoft.AspNet.SignalR -{ - public static class DependencyResolverExtensions - { - public static T Resolve(this IDependencyResolver resolver) - { - if (resolver == null) - { - throw new ArgumentNullException("resolver"); - } - - return (T)resolver.GetService(typeof(T)); - } - - public static object Resolve(this IDependencyResolver resolver, Type type) - { - if (resolver == null) - { - throw new ArgumentNullException("resolver"); - } - - if (type == null) - { - throw new ArgumentNullException("type"); - } - - return resolver.GetService(type); - } - - public static IEnumerable ResolveAll(this IDependencyResolver resolver) - { - if (resolver == null) - { - throw new ArgumentNullException("resolver"); - } - - return resolver.GetServices(typeof(T)).Cast(); - } - - public static IEnumerable ResolveAll(this IDependencyResolver resolver, Type type) - { - if (resolver == null) - { - throw new ArgumentNullException("resolver"); - } - - if (type == null) - { - throw new ArgumentNullException("type"); - } - - return resolver.GetServices(type); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/GlobalHost.cs b/src/Microsoft.AspNet.SignalR.Core/GlobalHost.cs deleted file mode 100644 index 7571495fc..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/GlobalHost.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using Microsoft.AspNet.SignalR.Configuration; -using Microsoft.AspNet.SignalR.Hubs; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// Provides access to default host information. - /// - public static class GlobalHost - { - private static readonly Lazy _defaultResolver = new Lazy(() => new DefaultDependencyResolver()); - private static IDependencyResolver _resolver; - - /// - /// Gets or sets the the default - /// - public static IDependencyResolver DependencyResolver - { - get - { - return _resolver ?? _defaultResolver.Value; - } - set - { - _resolver = value; - } - } - - /// - /// Gets the default - /// - public static IConfigurationManager Configuration - { - get - { - return DependencyResolver.Resolve(); - } - } - - /// - /// Gets the default - /// - public static IConnectionManager ConnectionManager - { - get - { - return DependencyResolver.Resolve(); - } - } - - /// - /// - /// - public static IHubPipeline HubPipeline - { - get - { - return DependencyResolver.Resolve(); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/GroupManager.cs b/src/Microsoft.AspNet.SignalR.Core/GroupManager.cs deleted file mode 100644 index c57476f70..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/GroupManager.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Messaging; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// The default implementation. - /// - public class GroupManager : IConnectionGroupManager - { - private readonly IConnection _connection; - private readonly string _groupPrefix; - - /// - /// Initializes a new instance of the class. - /// - /// The this group resides on. - /// The prefix for this group. Either a name or type name. - public GroupManager(IConnection connection, string groupPrefix) - { - if (connection == null) - { - throw new ArgumentNullException("connection"); - } - - _connection = connection; - _groupPrefix = groupPrefix; - } - - /// - /// Sends a value to the specified group. - /// - /// The name of the group. - /// The value to send. - /// The list of connection ids to exclude - /// A task that represents when send is complete. - public Task Send(string groupName, object value, params string[] excludeConnectionIds) - { - if (string.IsNullOrEmpty(groupName)) - { - throw new ArgumentException((Resources.Error_ArgumentNullOrEmpty), "groupName"); - } - - var qualifiedName = CreateQualifiedName(groupName); - var message = new ConnectionMessage(qualifiedName, - value, - PrefixHelper.GetPrefixedConnectionIds(excludeConnectionIds)); - - return _connection.Send(message); - } - - /// - /// Adds a connection to the specified group. - /// - /// The connection id to add to the group. - /// The name of the group - /// A task that represents the connection id being added to the group. - public Task Add(string connectionId, string groupName) - { - if (connectionId == null) - { - throw new ArgumentNullException("connectionId"); - } - - if (groupName == null) - { - throw new ArgumentNullException("groupName"); - } - - var command = new Command - { - CommandType = CommandType.AddToGroup, - Value = CreateQualifiedName(groupName), - WaitForAck = true - }; - - return _connection.Send(connectionId, command); - } - - /// - /// Removes a connection from the specified group. - /// - /// The connection id to remove from the group. - /// The name of the group - /// A task that represents the connection id being removed from the group. - public Task Remove(string connectionId, string groupName) - { - if (connectionId == null) - { - throw new ArgumentNullException("connectionId"); - } - - if (groupName == null) - { - throw new ArgumentNullException("groupName"); - } - - var command = new Command - { - CommandType = CommandType.RemoveFromGroup, - Value = CreateQualifiedName(groupName), - WaitForAck = true - }; - - return _connection.Send(connectionId, command); - } - - private string CreateQualifiedName(string groupName) - { - return _groupPrefix + "." + groupName; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/HostConstants.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/HostConstants.cs deleted file mode 100644 index 9cb8b132a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/HostConstants.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hosting -{ - public static class HostConstants - { - /// - /// The host should set this if they need to enable debug mode - /// - public static readonly string DebugMode = "debugMode"; - - /// - /// The host should set this is web sockets can be supported - /// - public static readonly string SupportsWebSockets = "supportsWebSockets"; - - /// - /// The host should set this if the web socket url is different - /// - public static readonly string WebSocketServerUrl = "webSocketServerUrl"; - - public static readonly string ShutdownToken = "shutdownToken"; - - public static readonly string InstanceName = "instanceName"; - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/HostContext.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/HostContext.cs deleted file mode 100644 index cd5324f90..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/HostContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; - -namespace Microsoft.AspNet.SignalR.Hosting -{ - public class HostContext - { - public IRequest Request { get; private set; } - public IResponse Response { get; private set; } - public IDictionary Items { get; private set; } - - public HostContext(IRequest request, IResponse response) - { - Request = request; - Response = response; - Items = new Dictionary(StringComparer.OrdinalIgnoreCase); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/HostContextExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/HostContextExtensions.cs deleted file mode 100644 index d40d9e5ac..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/HostContextExtensions.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Hosting -{ - public static class HostContextExtensions - { - public static T GetValue(this HostContext context, string key) - { - if (context == null) - { - throw new ArgumentNullException("context"); - } - - object value; - if (context.Items.TryGetValue(key, out value)) - { - return (T)value; - } - return default(T); - } - - public static bool IsDebuggingEnabled(this HostContext context) - { - return context.GetValue(HostConstants.DebugMode); - } - - public static bool SupportsWebSockets(this HostContext context) - { - // The server needs to implement IWebSocketRequest for websockets to be supported. - // It also needs to set the flag in the items collection. - return context.GetValue(HostConstants.SupportsWebSockets) && - context.Request is IWebSocketRequest; - } - - public static string WebSocketServerUrl(this HostContext context) - { - return context.GetValue(HostConstants.WebSocketServerUrl); - } - - public static CancellationToken HostShutdownToken(this HostContext context) - { - return context.GetValue(HostConstants.ShutdownToken); - } - - public static string InstanceName(this HostContext context) - { - return context.GetValue(HostConstants.InstanceName); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/HostDependencyResolverExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/HostDependencyResolverExtensions.cs deleted file mode 100644 index c674b317b..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/HostDependencyResolverExtensions.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Hosting -{ - public static class HostDependencyResolverExtensions - { - public static void InitializeHost(this IDependencyResolver resolver, string instanceName, CancellationToken hostShutdownToken) - { - if (resolver == null) - { - throw new ArgumentNullException("resolver"); - } - - if (String.IsNullOrEmpty(instanceName)) - { - throw new ArgumentNullException("instanceName"); - } - - // Performance counters are broken on mono so just skip this step - if (!MonoUtility.IsRunningMono) - { - // Initialize the performance counters - resolver.InitializePerformanceCounters(instanceName, hostShutdownToken); - } - - // Dispose the dependency resolver on host shut down (cleanly) - resolver.InitializeResolverDispose(hostShutdownToken); - } - - private static void InitializePerformanceCounters(this IDependencyResolver resolver, string instanceName, CancellationToken hostShutdownToken) - { - var counters = resolver.Resolve(); - if (counters != null) - { - counters.Initialize(instanceName, hostShutdownToken); - } - } - - private static void InitializeResolverDispose(this IDependencyResolver resolver, CancellationToken hostShutdownToken) - { - // TODO: Guard against multiple calls to this - - // When the host triggers the shutdown token, dispose the resolver - hostShutdownToken.SafeRegister(state => - { - ((IDependencyResolver)state).Dispose(); - }, - resolver); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/IResponse.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/IResponse.cs deleted file mode 100644 index 3d26f0e61..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/IResponse.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hosting -{ - /// - /// Represents a connection to the client. - /// - public interface IResponse - { - /// - /// Gets a cancellation token that represents the client's lifetime. - /// - CancellationToken CancellationToken { get; } - - /// - /// Gets or sets the status code of the response. - /// - int StatusCode { get; set; } - - /// - /// Gets or sets the content type of the response. - /// - string ContentType { get; set; } - - /// - /// Writes buffered data. - /// - /// The data to write to the buffer. - void Write(ArraySegment data); - - /// - /// Flushes the buffered response to the client. - /// - /// A task that represents when the data has been flushed. - Task Flush(); - - /// - /// Closes the connection to the client. - /// - /// A task that represents when the connection is closed. - [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "End", Justification = "Ends the response thus the name is appropriate.")] - Task End(); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/IWebSocket.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/IWebSocket.cs deleted file mode 100644 index 60c448f2a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/IWebSocket.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hosting -{ - /// - /// Represents a web socket. - /// - public interface IWebSocket - { - /// - /// Invoked when data is sent over the websocket - /// - Action OnMessage { get; set; } - - /// - /// Invoked when the websocket closes - /// - Action OnClose { get; set; } - - /// - /// Invoked when there is an error - /// - Action OnError { get; set; } - - /// - /// Sends data over the websocket. - /// - /// The value to send. - /// A that represents the send is complete. - Task Send(string value); - - /// - /// Sends a chunk of data over the websocket ("endOfMessage" flag set to false.) - /// - /// - /// A that represents the send is complete. - Task SendChunk(ArraySegment message); - - /// - /// Sends a zero byte data chunk with the "endOfMessage" flag set to true. - /// - /// A that represents the flush is complete. - Task Flush(); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/IWebSocketRequest.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/IWebSocketRequest.cs deleted file mode 100644 index 95f5438f2..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/IWebSocketRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hosting -{ - public interface IWebSocketRequest : IRequest - { - /// - /// Accepts an websocket request using the specified user function. - /// - /// The callback that fires when the websocket is ready. - /// The task that completes when the websocket transport is ready. - Task AcceptWebSocketRequest(Func callback, Task initTask); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/PersistentConnectionFactory.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/PersistentConnectionFactory.cs deleted file mode 100644 index 33d9aeee1..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/PersistentConnectionFactory.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Globalization; - -namespace Microsoft.AspNet.SignalR.Hosting -{ - /// - /// Responsible for creating instances. - /// - public class PersistentConnectionFactory - { - private readonly IDependencyResolver _resolver; - - /// - /// Creates a new instance of the class. - /// - /// The dependency resolver to use for when creating the . - public PersistentConnectionFactory(IDependencyResolver resolver) - { - if (resolver == null) - { - throw new ArgumentNullException("resolver"); - } - - _resolver = resolver; - } - - /// - /// Creates an instance of the specified type using the dependency resolver or the type's default constructor. - /// - /// The type of to create. - /// An instance of a . - public PersistentConnection CreateInstance(Type connectionType) - { - if (connectionType == null) - { - throw new ArgumentNullException("connectionType"); - } - - var connection = (_resolver.Resolve(connectionType) ?? - Activator.CreateInstance(connectionType)) as PersistentConnection; - - if (connection == null) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_IsNotA, connectionType.FullName, typeof(PersistentConnection).FullName)); - } - - return connection; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/RequestExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/RequestExtensions.cs deleted file mode 100644 index 52cba0096..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/RequestExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Hosting -{ - internal static class RequestExtensions - { - /// - /// Gets a value from the QueryString, and if it's null or empty, gets it from the Form instead. - /// - public static string QueryStringOrForm(this IRequest request, string key) - { - var value = request.QueryString[key]; - if (String.IsNullOrEmpty(value)) - { - value = request.Form[key]; - } - return value; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hosting/ResponseExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Hosting/ResponseExtensions.cs deleted file mode 100644 index a8f79a922..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hosting/ResponseExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Text; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hosting -{ - /// - /// Extension methods for . - /// - public static class ResponseExtensions - { - /// - /// Closes the connection to a client with optional data. - /// - /// The . - /// The data to write to the connection. - /// A task that represents when the connection is closed. - public static Task End(this IResponse response, string data) - { - if (response == null) - { - throw new ArgumentNullException("response"); - } - - var bytes = Encoding.UTF8.GetBytes(data); - response.Write(new ArraySegment(bytes, 0, bytes.Length)); - return response.End(); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hub.cs b/src/Microsoft.AspNet.SignalR.Core/Hub.cs deleted file mode 100644 index ca86f39e9..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hub.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hubs; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// Provides methods that communicate with SignalR connections that connected to a . - /// - public abstract class Hub : IHub - { - protected Hub() - { - Clients = new HubConnectionContext(); - Clients.All = new NullClientProxy(); - Clients.Others = new NullClientProxy(); - Clients.Caller = new NullClientProxy(); - } - - /// - /// - /// - public HubConnectionContext Clients { get; set; } - - /// - /// Provides information about the calling client. - /// - public HubCallerContext Context { get; set; } - - /// - /// The group manager for this hub instance. - /// - public IGroupManager Groups { get; set; } - - /// - /// Called when a connection disconnects from this hub instance. - /// - /// A - public virtual Task OnDisconnected() - { - return TaskAsyncHelper.Empty; - } - - /// - /// Called when the connection connects to this hub instance. - /// - /// A - public virtual Task OnConnected() - { - return TaskAsyncHelper.Empty; - } - - /// - /// Called when the connection reconnects to this hub instance. - /// - /// A - public virtual Task OnReconnected() - { - return TaskAsyncHelper.Empty; - } - - protected virtual void Dispose(bool disposing) - { - } - - public void Dispose() - { - Dispose(true); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/HubConfiguration.cs b/src/Microsoft.AspNet.SignalR.Core/HubConfiguration.cs deleted file mode 100644 index 13abdc5bc..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/HubConfiguration.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR -{ - public class HubConfiguration : ConnectionConfiguration - { - /// - /// Determines whether JavaScript proxies for the server-side hubs should be auto generated at {Path}/hubs. - /// Defaults to true. - /// - public bool EnableJavaScriptProxies { get; set; } - - /// - /// Determines whether detailed exceptions thrown in Hub methods get reported back the invoking client. - /// Defaults to false. - /// - public bool EnableDetailedErrors { get; set; } - - public HubConfiguration() - { - EnableJavaScriptProxies = true; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/ClientHubInvocation.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/ClientHubInvocation.cs deleted file mode 100644 index 37dd52233..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/ClientHubInvocation.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using Newtonsoft.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// A description of a client-side hub method invocation. - /// - public class ClientHubInvocation - { - /// - /// The signal that clients receiving this invocation are subscribed to. - /// - [JsonIgnore] - public string Target { get; set; } - - /// - /// The name of the hub that the method being invoked belongs to. - /// - [JsonProperty("H")] - public string Hub { get; set; } - - /// - /// The name of the client-side hub method be invoked. - /// - [JsonProperty("M")] - public string Method { get; set; } - - /// - /// The argument list the client-side hub method will be called with. - /// - [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Type is used for serialization.")] - [JsonProperty("A")] - public object[] Args { get; set; } - - /// - /// A key-value store representing the hub state on the server that has changed since the last time the hub - /// state was sent to the client. - /// - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Type is used for serialization.")] - [JsonProperty("S", NullValueHandling = NullValueHandling.Ignore)] - public IDictionary State { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/ClientProxy.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/ClientProxy.cs deleted file mode 100644 index df87a13f1..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/ClientProxy.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Dynamic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class ClientProxy : DynamicObject, IClientProxy - { - private readonly Func, Task> _send; - private readonly string _hubName; - private readonly IList _exclude; - - public ClientProxy(Func, Task> send, string hubName, IList exclude) - { - _send = send; - _hubName = hubName; - _exclude = exclude; - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "Binder is passed in by the DLR")] - public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) - { - result = Invoke(binder.Name, args); - return true; - } - - public Task Invoke(string method, params object[] args) - { - var invocation = new ClientHubInvocation - { - Hub = _hubName, - Method = method, - Args = args - }; - - return _send(PrefixHelper.GetHubName(_hubName), invocation, _exclude); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/ConnectionIdProxy.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/ConnectionIdProxy.cs deleted file mode 100644 index cf3520fb8..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/ConnectionIdProxy.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class ConnectionIdProxy : SignalProxy - { - public ConnectionIdProxy(Func, Task> send, string signal, string hubName, params string[] exclude) : - base(send, signal, hubName, PrefixHelper.HubConnectionIdPrefix, exclude) - { - - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultAssemblyLocator.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultAssemblyLocator.cs deleted file mode 100644 index b25b1985d..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultAssemblyLocator.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Reflection; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class DefaultAssemblyLocator : IAssemblyLocator - { - public virtual IList GetAssemblies() - { - return AppDomain.CurrentDomain.GetAssemblies(); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultHubActivator.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultHubActivator.cs deleted file mode 100644 index 8f160d09a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultHubActivator.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class DefaultHubActivator : IHubActivator - { - private readonly IDependencyResolver _resolver; - - public DefaultHubActivator(IDependencyResolver resolver) - { - _resolver = resolver; - } - - public IHub Create(HubDescriptor descriptor) - { - if (descriptor == null) - { - throw new ArgumentNullException("descriptor"); - } - - if(descriptor.HubType == null) - { - return null; - } - - object hub = _resolver.Resolve(descriptor.HubType) ?? Activator.CreateInstance(descriptor.HubType); - return hub as IHub; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultJavaScriptProxyGenerator.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultJavaScriptProxyGenerator.cs deleted file mode 100644 index 7e84b318e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/DefaultJavaScriptProxyGenerator.cs +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Text; -using Microsoft.AspNet.SignalR.Json; -using Newtonsoft.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class DefaultJavaScriptProxyGenerator : IJavaScriptProxyGenerator - { - private static readonly Lazy _templateFromResource = new Lazy(GetTemplateFromResource); - - private static readonly Type[] _numberTypes = new[] { typeof(byte), typeof(short), typeof(int), typeof(long), typeof(float), typeof(decimal), typeof(double) }; - private static readonly Type[] _dateTypes = new[] { typeof(DateTime), typeof(DateTimeOffset) }; - - private const string ScriptResource = "Microsoft.AspNet.SignalR.Scripts.hubs.js"; - - private readonly IHubManager _manager; - private readonly IJavaScriptMinifier _javaScriptMinifier; - private readonly Lazy _generatedTemplate; - - public DefaultJavaScriptProxyGenerator(IDependencyResolver resolver) : - this(resolver.Resolve(), - resolver.Resolve()) - { - } - - public DefaultJavaScriptProxyGenerator(IHubManager manager, IJavaScriptMinifier javaScriptMinifier) - { - _manager = manager; - _javaScriptMinifier = javaScriptMinifier ?? NullJavaScriptMinifier.Instance; - _generatedTemplate = new Lazy(() => GenerateProxy(_manager, _javaScriptMinifier, includeDocComments: false)); - } - - public string GenerateProxy(string serviceUrl) - { - serviceUrl = JavaScriptEncode(serviceUrl); - - var generateProxy = _generatedTemplate.Value; - - return generateProxy.Replace("{serviceUrl}", serviceUrl); - } - - public string GenerateProxy(string serviceUrl, bool includeDocComments) - { - serviceUrl = JavaScriptEncode(serviceUrl); - - string generateProxy = GenerateProxy(_manager, _javaScriptMinifier, includeDocComments); - - return generateProxy.Replace("{serviceUrl}", serviceUrl); - } - - private static string GenerateProxy(IHubManager hubManager, IJavaScriptMinifier javaScriptMinifier, bool includeDocComments) - { - string script = _templateFromResource.Value; - - var hubs = new StringBuilder(); - var first = true; - foreach (var descriptor in hubManager.GetHubs().OrderBy(h => h.Name)) - { - if (!first) - { - hubs.AppendLine(";"); - hubs.AppendLine(); - hubs.Append(" "); - } - GenerateType(hubManager, hubs, descriptor, includeDocComments); - first = false; - } - - if (hubs.Length > 0) - { - hubs.Append(";"); - } - - script = script.Replace("/*hubs*/", hubs.ToString()); - - return javaScriptMinifier.Minify(script); - } - - private static void GenerateType(IHubManager hubManager, StringBuilder sb, HubDescriptor descriptor, bool includeDocComments) - { - // Get only actions with minimum number of parameters. - var methods = GetMethods(hubManager, descriptor); - var hubName = GetDescriptorName(descriptor); - - sb.AppendFormat(" proxies.{0} = this.createHubProxy('{1}'); ", hubName, hubName).AppendLine(); - sb.AppendFormat(" proxies.{0}.client = {{ }};", hubName).AppendLine(); - sb.AppendFormat(" proxies.{0}.server = {{", hubName); - - bool first = true; - - foreach (var method in methods) - { - if (!first) - { - sb.Append(",").AppendLine(); - } - GenerateMethod(sb, method, includeDocComments, hubName); - first = false; - } - sb.AppendLine(); - sb.Append(" }"); - } - - private static string GetDescriptorName(Descriptor descriptor) - { - if (descriptor == null) - { - throw new ArgumentNullException("descriptor"); - } - - string name = descriptor.Name; - - // If the name was not specified then do not camel case - if (!descriptor.NameSpecified) - { - name = JsonUtility.CamelCase(name); - } - - return name; - } - - private static IEnumerable GetMethods(IHubManager manager, HubDescriptor descriptor) - { - return from method in manager.GetHubMethods(descriptor.Name) - group method by method.Name into overloads - let oload = (from overload in overloads - orderby overload.Parameters.Count - select overload).FirstOrDefault() - orderby oload.Name - select oload; - } - - private static void GenerateMethod(StringBuilder sb, MethodDescriptor method, bool includeDocComments, string hubName) - { - var parameterNames = method.Parameters.Select(p => p.Name).ToList(); - sb.AppendLine(); - sb.AppendFormat(" {0}: function ({1}) {{", GetDescriptorName(method), Commas(parameterNames)).AppendLine(); - if (includeDocComments) - { - sb.AppendFormat(Resources.DynamicComment_CallsMethodOnServerSideDeferredPromise, method.Name, method.Hub.Name).AppendLine(); - var parameterDoc = method.Parameters.Select(p => String.Format(CultureInfo.CurrentCulture, Resources.DynamicComment_ServerSideTypeIs, p.Name, MapToJavaScriptType(p.ParameterType), p.ParameterType)).ToList(); - if (parameterDoc.Any()) - { - sb.AppendLine(String.Join(Environment.NewLine, parameterDoc)); - } - } - sb.AppendFormat(" return proxies.{0}.invoke.apply(proxies.{0}, $.merge([\"{1}\"], $.makeArray(arguments)));", hubName, method.Name).AppendLine(); - sb.Append(" }"); - } - - private static string MapToJavaScriptType(Type type) - { - if (!type.IsPrimitive && !(type == typeof(string))) - { - return "Object"; - } - if (type == typeof(string)) - { - return "String"; - } - if (_numberTypes.Contains(type)) - { - return "Number"; - } - if (typeof(IEnumerable).IsAssignableFrom(type)) - { - return "Array"; - } - if (_dateTypes.Contains(type)) - { - return "Date"; - } - return String.Empty; - } - - private static string Commas(IEnumerable values) - { - return Commas(values, v => v); - } - - private static string Commas(IEnumerable values, Func selector) - { - return String.Join(", ", values.Select(selector)); - } - - private static string GetTemplateFromResource() - { - using (Stream resourceStream = typeof(DefaultJavaScriptProxyGenerator).Assembly.GetManifestResourceStream(ScriptResource)) - { - var reader = new StreamReader(resourceStream); - return reader.ReadToEnd(); - } - } - - private static string JavaScriptEncode(string value) - { - value = JsonConvert.SerializeObject(value); - - // Remove the quotes - return value.Substring(1, value.Length - 2); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/DynamicDictionary.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/DynamicDictionary.cs deleted file mode 100644 index 0a9963108..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/DynamicDictionary.cs +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Dynamic; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class DynamicDictionary : DynamicObject, IDictionary - { - private readonly IDictionary _obj; - - public DynamicDictionary(IDictionary obj) - { - _obj = obj; - } - - public object this[string key] - { - get - { - object result; - _obj.TryGetValue(key, out result); - return Wrap(result); - } - set - { - _obj[key] = Unwrap(value); - } - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "The compiler generates calls to invoke this")] - public override bool TryGetMember(GetMemberBinder binder, out object result) - { - result = this[binder.Name]; - return true; - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "The compiler generates calls to invoke this")] - public override bool TrySetMember(SetMemberBinder binder, object value) - { - this[binder.Name] = value; - return true; - } - - public static object Wrap(object value) - { - var obj = value as IDictionary; - if (obj != null) - { - return new DynamicDictionary(obj); - } - - return value; - } - - public static object Unwrap(object value) - { - var dictWrapper = value as DynamicDictionary; - if (dictWrapper != null) - { - return dictWrapper._obj; - } - - return value; - } - - public void Add(string key, object value) - { - _obj.Add(key, value); - } - - public bool ContainsKey(string key) - { - return _obj.ContainsKey(key); - } - - public ICollection Keys - { - get { return _obj.Keys; } - } - - public bool Remove(string key) - { - return _obj.Remove(key); - } - - public bool TryGetValue(string key, out object value) - { - return _obj.TryGetValue(key, out value); - } - - public ICollection Values - { - get { return _obj.Values; } - } - - public void Add(KeyValuePair item) - { - _obj.Add(item); - } - - public void Clear() - { - _obj.Clear(); - } - - public bool Contains(KeyValuePair item) - { - return _obj.Contains(item); - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - _obj.CopyTo(array, arrayIndex); - } - - public int Count - { - get { return _obj.Count; } - } - - public bool IsReadOnly - { - get { return _obj.IsReadOnly; } - } - - public bool Remove(KeyValuePair item) - { - return _obj.Remove(item); - } - - public IEnumerator> GetEnumerator() - { - return _obj.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/EmptyJavaScriptProxyGenerator.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/EmptyJavaScriptProxyGenerator.cs deleted file mode 100644 index d0ed9055e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/EmptyJavaScriptProxyGenerator.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Globalization; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class EmptyJavaScriptProxyGenerator : IJavaScriptProxyGenerator - { - public string GenerateProxy(string serviceUrl) - { - return String.Format(CultureInfo.InvariantCulture, "throw new Error('{0}');", Resources.Error_JavaScriptProxyDisabled); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/HubManagerExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/HubManagerExtensions.cs deleted file mode 100644 index bc5455b59..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/HubManagerExtensions.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Globalization; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public static class HubManagerExtensions - { - public static HubDescriptor EnsureHub(this IHubManager hubManager, string hubName, params IPerformanceCounter[] counters) - { - if (hubManager == null) - { - throw new ArgumentNullException("hubManager"); - } - - if (String.IsNullOrEmpty(hubName)) - { - throw new ArgumentNullException("hubName"); - } - - if (counters == null) - { - throw new ArgumentNullException("counters"); - } - - var descriptor = hubManager.GetHub(hubName); - - if (descriptor == null) - { - for (var i = 0; i < counters.Length; i++) - { - counters[i].Increment(); - } - throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_HubCouldNotBeResolved, hubName)); - } - - return descriptor; - } - - public static IEnumerable GetHubs(this IHubManager hubManager) - { - if (hubManager == null) - { - throw new ArgumentNullException("hubManager"); - } - - return hubManager.GetHubs(d => true); - } - - public static IEnumerable GetHubMethods(this IHubManager hubManager, string hubName) - { - if (hubManager == null) - { - throw new ArgumentNullException("hubManager"); - } - - return hubManager.GetHubMethods(hubName, m => true); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/HubTypeExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/HubTypeExtensions.cs deleted file mode 100644 index 1bf73da42..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/HubTypeExtensions.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - internal static class HubTypeExtensions - { - internal static string GetHubName(this Type type) - { - if (!typeof(IHub).IsAssignableFrom(type)) - { - return null; - } - - return GetHubAttributeName(type) ?? type.Name; - } - - internal static string GetHubAttributeName(this Type type) - { - if (!typeof(IHub).IsAssignableFrom(type)) - { - return null; - } - - // We can still return null if there is no attribute name - return ReflectionHelper.GetAttributeValue(type, attr => attr.HubName); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/MethodExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/MethodExtensions.cs deleted file mode 100644 index 3418e8566..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Extensions/MethodExtensions.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using Microsoft.AspNet.SignalR.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public static class MethodExtensions - { - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "1", Justification = "The condition checks for null parameters")] - public static bool Matches(this MethodDescriptor methodDescriptor, IList parameters) - { - if (methodDescriptor == null) - { - throw new ArgumentNullException("methodDescriptor"); - } - - if ((methodDescriptor.Parameters.Count > 0 && parameters == null) - || methodDescriptor.Parameters.Count != parameters.Count) - { - return false; - } - - return true; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/GroupProxy.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/GroupProxy.cs deleted file mode 100644 index 9ca86d5ce..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/GroupProxy.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class GroupProxy : SignalProxy - { - public GroupProxy(Func, Task> send, string signal, string hubName, IList exclude) : - base(send, signal, hubName, PrefixHelper.HubGroupPrefix, exclude) - { - - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubCallerContext.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/HubCallerContext.cs deleted file mode 100644 index 2413da7da..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubCallerContext.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Security.Principal; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class HubCallerContext - { - /// - /// Gets the connection id of the calling client. - /// - public string ConnectionId { get; private set; } - - /// - /// Gets the cookies for the request. - /// - public IDictionary RequestCookies - { - get - { - return Request.Cookies; - } - } - - /// - /// Gets the headers for the request. - /// - public NameValueCollection Headers - { - get - { - return Request.Headers; - } - } - - /// - /// Gets the querystring for the request. - /// - public NameValueCollection QueryString - { - get - { - return Request.QueryString; - } - } - - /// - /// Gets the for the request. - /// - public IPrincipal User - { - get - { - return Request.User; - } - } - - /// - /// Gets the for the current HTTP request. - /// - public IRequest Request { get; private set; } - - public HubCallerContext(IRequest request, string connectionId) - { - ConnectionId = connectionId; - Request = request; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubConnectionContext.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/HubConnectionContext.cs deleted file mode 100644 index fded4874b..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubConnectionContext.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Encapsulates all information about an individual SignalR connection for an . - /// - public class HubConnectionContext : IHubConnectionContext - { - private readonly string _hubName; - private readonly string _connectionId; - private readonly Func, Task> _send; - - /// - /// Initializes a new instance of the . - /// - public HubConnectionContext() - { - } - - /// - /// Initializes a new instance of the . - /// - /// The pipeline invoker. - /// The connection. - /// The hub name. - /// The connection id. - /// The connection hub state. - public HubConnectionContext(IHubPipelineInvoker pipelineInvoker, IConnection connection, string hubName, string connectionId, StateChangeTracker tracker) - { - _send = (signal, invocation, exclude) => pipelineInvoker.Send(new HubOutgoingInvokerContext(connection, signal, invocation, exclude)); - _connectionId = connectionId; - _hubName = hubName; - - Caller = new StatefulSignalProxy(_send, connectionId, PrefixHelper.HubConnectionIdPrefix, hubName, tracker); - All = AllExcept(); - Others = AllExcept(connectionId); - } - - /// - /// All connected clients. - /// - public dynamic All { get; set; } - - /// - /// All connected clients except the calling client. - /// - public dynamic Others { get; set; } - - /// - /// Represents the calling client. - /// - public dynamic Caller { get; set; } - - /// - /// Returns a dynamic representation of all clients except the calling client ones specified. - /// - /// The list of connection ids to exclude - /// A dynamic representation of all clients except the calling client ones specified. - public dynamic AllExcept(params string[] excludeConnectionIds) - { - return new ClientProxy(_send, _hubName, PrefixHelper.GetPrefixedConnectionIds(excludeConnectionIds)); - } - - /// - /// Returns a dynamic representation of all clients in a group except the calling client. - /// - /// The name of the group - /// A dynamic representation of all clients in a group except the calling client. - public dynamic OthersInGroup(string groupName) - { - return Group(groupName, _connectionId); - } - - /// - /// Returns a dynamic representation of the specified group. - /// - /// The name of the group - /// The list of connection ids to exclude - /// A dynamic representation of the specified group. - public dynamic Group(string groupName, params string[] excludeConnectionIds) - { - if (string.IsNullOrEmpty(groupName)) - { - throw new ArgumentException(Resources.Error_ArgumentNullOrEmpty, "groupName"); - } - - return new GroupProxy(_send, groupName, _hubName, PrefixHelper.GetPrefixedConnectionIds(excludeConnectionIds)); - } - - /// - /// Returns a dynamic representation of the connection with the specified connectionid. - /// - /// The connection id - /// A dynamic representation of the specified client. - public dynamic Client(string connectionId) - { - if (string.IsNullOrEmpty(connectionId)) - { - throw new ArgumentException(Resources.Error_ArgumentNullOrEmpty, "connectionId"); - } - - return new ConnectionIdProxy(_send, connectionId, _hubName); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubContext.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/HubContext.cs deleted file mode 100644 index 37a295dcf..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubContext.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - internal class HubContext : IHubContext - { - public HubContext(Func, Task> send, string hubName, IConnection connection) - { - Clients = new ExternalHubConnectionContext(send, hubName); - Groups = new GroupManager(connection, PrefixHelper.GetHubGroupName(hubName)); - } - - public IHubConnectionContext Clients { get; private set; } - - public IGroupManager Groups { get; private set; } - - private class ExternalHubConnectionContext : IHubConnectionContext - { - private readonly Func, Task> _send; - private readonly string _hubName; - - public ExternalHubConnectionContext(Func, Task> send, string hubName) - { - _send = send; - _hubName = hubName; - All = AllExcept(); - } - - public dynamic All - { - get; - private set; - } - - public dynamic AllExcept(params string[] exclude) - { - return new ClientProxy(_send, _hubName, exclude); - } - - public dynamic Group(string groupName, params string[] exclude) - { - if (string.IsNullOrEmpty(groupName)) - { - throw new ArgumentException(Resources.Error_ArgumentNullOrEmpty, "groupName"); - } - - return new GroupProxy(_send, groupName, _hubName, exclude); - } - - public dynamic Client(string connectionId) - { - if (string.IsNullOrEmpty(connectionId)) - { - throw new ArgumentException(Resources.Error_ArgumentNullOrEmpty, "connectionId"); - } - - return new ConnectionIdProxy(_send, connectionId, _hubName); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubDispatcher.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/HubDispatcher.cs deleted file mode 100644 index b97aa74c5..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubDispatcher.cs +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.Linq; -using System.Linq.Expressions; -using System.Reflection; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Handles all communication over the hubs persistent connection. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "This dispatcher makes use of many interfaces.")] - public class HubDispatcher : PersistentConnection - { - private const string HubsSuffix = "/hubs"; - - private readonly List _hubs = new List(); - private readonly bool _enableJavaScriptProxies; - private readonly bool _enableDetailedErrors; - - private IJavaScriptProxyGenerator _proxyGenerator; - private IHubManager _manager; - private IHubRequestParser _requestParser; - private IParameterResolver _binder; - private IHubPipelineInvoker _pipelineInvoker; - private IPerformanceCounterManager _counters; - private bool _isDebuggingEnabled; - - private static readonly MethodInfo _continueWithMethod = typeof(HubDispatcher).GetMethod("ContinueWith", BindingFlags.NonPublic | BindingFlags.Static); - - /// - /// Initializes an instance of the class. - /// - /// Configuration settings determining whether to enable JS proxies and provide clients with detailed hub errors. - public HubDispatcher(HubConfiguration configuration) - { - if (configuration == null) - { - throw new ArgumentNullException("configuration"); - } - - _enableJavaScriptProxies = configuration.EnableJavaScriptProxies; - _enableDetailedErrors = configuration.EnableDetailedErrors; - } - - protected override TraceSource Trace - { - get - { - return TraceManager["SignalR.HubDispatcher"]; - } - } - - internal override string GroupPrefix - { - get - { - return PrefixHelper.HubGroupPrefix; - } - } - - public override void Initialize(IDependencyResolver resolver, HostContext context) - { - if (resolver == null) - { - throw new ArgumentNullException("resolver"); - } - - if (context == null) - { - throw new ArgumentNullException("context"); - } - - _proxyGenerator = _enableJavaScriptProxies ? resolver.Resolve() - : new EmptyJavaScriptProxyGenerator(); - - _manager = resolver.Resolve(); - _binder = resolver.Resolve(); - _requestParser = resolver.Resolve(); - _pipelineInvoker = resolver.Resolve(); - _counters = resolver.Resolve(); - - base.Initialize(resolver, context); - } - - protected override bool AuthorizeRequest(IRequest request) - { - // Populate _hubs - string data = request.QueryStringOrForm("connectionData"); - - if (!String.IsNullOrEmpty(data)) - { - var clientHubInfo = JsonSerializer.Parse>(data); - - // If there's any hubs then perform the auth check - if (clientHubInfo != null && clientHubInfo.Any()) - { - var hubCache = new Dictionary(StringComparer.OrdinalIgnoreCase); - - foreach (var hubInfo in clientHubInfo) - { - if (hubCache.ContainsKey(hubInfo.Name)) - { - throw new InvalidOperationException(Resources.Error_DuplicateHubs); - } - - // Try to find the associated hub type - HubDescriptor hubDescriptor = _manager.EnsureHub(hubInfo.Name, - _counters.ErrorsHubResolutionTotal, - _counters.ErrorsHubResolutionPerSec, - _counters.ErrorsAllTotal, - _counters.ErrorsAllPerSec); - - if (_pipelineInvoker.AuthorizeConnect(hubDescriptor, request)) - { - // Add this to the list of hub descriptors this connection is interested in - hubCache.Add(hubDescriptor.Name, hubDescriptor); - } - } - - _hubs.AddRange(hubCache.Values); - - // If we have any hubs in the list then we're authorized - return _hubs.Count > 0; - } - } - - return base.AuthorizeRequest(request); - } - - /// - /// Processes the hub's incoming method calls. - /// - protected override Task OnReceived(IRequest request, string connectionId, string data) - { - HubRequest hubRequest = _requestParser.Parse(data); - - // Create the hub - HubDescriptor descriptor = _manager.EnsureHub(hubRequest.Hub, - _counters.ErrorsHubInvocationTotal, - _counters.ErrorsHubInvocationPerSec, - _counters.ErrorsAllTotal, - _counters.ErrorsAllPerSec); - - IJsonValue[] parameterValues = hubRequest.ParameterValues; - - // Resolve the method - MethodDescriptor methodDescriptor = _manager.GetHubMethod(descriptor.Name, hubRequest.Method, parameterValues); - - if (methodDescriptor == null) - { - _counters.ErrorsHubInvocationTotal.Increment(); - _counters.ErrorsHubInvocationPerSec.Increment(); - - // Empty (noop) method descriptor - // Use: Forces the hub pipeline module to throw an error. This error is encapsulated in the HubDispatcher. - // Encapsulating it in the HubDispatcher prevents the error from bubbling up to the transport level. - // Specifically this allows us to return a faulted task (call .fail on client) and to not cause the - // transport to unintentionally fail. - methodDescriptor = new NullMethodDescriptor(hubRequest.Method); - } - - // Resolving the actual state object - var tracker = new StateChangeTracker(hubRequest.State); - var hub = CreateHub(request, descriptor, connectionId, tracker, throwIfFailedToCreate: true); - - return InvokeHubPipeline(hub, parameterValues, methodDescriptor, hubRequest, tracker) - .ContinueWith(task => hub.Dispose(), TaskContinuationOptions.ExecuteSynchronously); - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flown to the caller.")] - private Task InvokeHubPipeline(IHub hub, - IJsonValue[] parameterValues, - MethodDescriptor methodDescriptor, - HubRequest hubRequest, - StateChangeTracker tracker) - { - Task piplineInvocation; - - try - { - var args = _binder.ResolveMethodParameters(methodDescriptor, parameterValues); - var context = new HubInvokerContext(hub, tracker, methodDescriptor, args); - - // Invoke the pipeline and save the task - piplineInvocation = _pipelineInvoker.Invoke(context); - } - catch (Exception ex) - { - piplineInvocation = TaskAsyncHelper.FromError(ex); - } - - // Determine if we have a faulted task or not and handle it appropriately. - return piplineInvocation.ContinueWith(task => - { - if (task.IsFaulted) - { - return ProcessResponse(tracker, result: null, request: hubRequest, error: task.Exception); - } - else if (task.IsCanceled) - { - return ProcessResponse(tracker, result: null, request: hubRequest, error: new OperationCanceledException()); - } - else - { - return ProcessResponse(tracker, task.Result, hubRequest, error: null); - } - }) - .FastUnwrap(); - } - - public override Task ProcessRequest(HostContext context) - { - if (context == null) - { - throw new ArgumentNullException("context"); - } - - // Trim any trailing slashes - string normalized = context.Request.Url.LocalPath.TrimEnd('/'); - - if (normalized.EndsWith(HubsSuffix, StringComparison.OrdinalIgnoreCase)) - { - // Generate the proper hub url - string hubUrl = normalized.Substring(0, normalized.Length - HubsSuffix.Length); - - // Generate the proxy - context.Response.ContentType = JsonUtility.JavaScriptMimeType; - return context.Response.End(_proxyGenerator.GenerateProxy(hubUrl)); - } - - _isDebuggingEnabled = context.IsDebuggingEnabled(); - - return base.ProcessRequest(context); - } - - internal static Task Connect(IHub hub) - { - return hub.OnConnected(); - } - - internal static Task Reconnect(IHub hub) - { - return hub.OnReconnected(); - } - - internal static Task Disconnect(IHub hub) - { - return hub.OnDisconnected(); - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "A faulted task is returned.")] - internal static Task Incoming(IHubIncomingInvokerContext context) - { - var tcs = new TaskCompletionSource(); - - try - { - object result = context.MethodDescriptor.Invoker(context.Hub, context.Args.ToArray()); - Type returnType = context.MethodDescriptor.ReturnType; - - if (typeof(Task).IsAssignableFrom(returnType)) - { - var task = (Task)result; - if (!returnType.IsGenericType) - { - task.ContinueWith(tcs); - } - else - { - // Get the in Task - Type resultType = returnType.GetGenericArguments().Single(); - - Type genericTaskType = typeof(Task<>).MakeGenericType(resultType); - - // Get the correct ContinueWith overload - var parameter = Expression.Parameter(typeof(object)); - - // TODO: Cache this whole thing - // Action callback = result => ContinueWith((Task)result, tcs); - MethodInfo continueWithMethod = _continueWithMethod.MakeGenericMethod(resultType); - - Expression body = Expression.Call(continueWithMethod, - Expression.Convert(parameter, genericTaskType), - Expression.Constant(tcs)); - - var continueWithInvoker = Expression.Lambda>(body, parameter).Compile(); - continueWithInvoker.Invoke(result); - } - } - else - { - tcs.TrySetResult(result); - } - } - catch (Exception ex) - { - tcs.TrySetUnwrappedException(ex); - } - - return tcs.Task; - } - - internal static Task Outgoing(IHubOutgoingInvokerContext context) - { - var message = new ConnectionMessage(context.Signal, context.Invocation, context.ExcludedSignals); - - return context.Connection.Send(message); - } - - protected override Task OnConnected(IRequest request, string connectionId) - { - return ExecuteHubEvent(request, connectionId, hub => _pipelineInvoker.Connect(hub)); - } - - protected override Task OnReconnected(IRequest request, string connectionId) - { - return ExecuteHubEvent(request, connectionId, hub => _pipelineInvoker.Reconnect(hub)); - } - - protected override IList OnRejoiningGroups(IRequest request, IList groups, string connectionId) - { - return _hubs.Select(hubDescriptor => - { - string groupPrefix = hubDescriptor.Name + "."; - - var hubGroups = groups.Where(g => g.StartsWith(groupPrefix, StringComparison.OrdinalIgnoreCase)) - .Select(g => g.Substring(groupPrefix.Length)) - .ToList(); - - return _pipelineInvoker.RejoiningGroups(hubDescriptor, request, hubGroups) - .Select(g => groupPrefix + g); - - }).SelectMany(groupsToRejoin => groupsToRejoin).ToList(); - } - - protected override Task OnDisconnected(IRequest request, string connectionId) - { - return ExecuteHubEvent(request, connectionId, hub => _pipelineInvoker.Disconnect(hub)); - } - - protected override IList GetSignals(string connectionId) - { - return _hubs.SelectMany(info => new[] { PrefixHelper.GetHubName(info.Name), PrefixHelper.GetHubConnectionId(info.CreateQualifiedName(connectionId)) }) - .Concat(new[] { PrefixHelper.GetConnectionId(connectionId), PrefixHelper.GetAck(connectionId) }) - .ToList(); - } - - private Task ExecuteHubEvent(IRequest request, string connectionId, Func action) - { - var hubs = GetHubs(request, connectionId).ToList(); - var operations = hubs.Select(instance => action(instance).OrEmpty().Catch()).ToArray(); - - if (operations.Length == 0) - { - DisposeHubs(hubs); - return TaskAsyncHelper.Empty; - } - - var tcs = new TaskCompletionSource(); - Task.Factory.ContinueWhenAll(operations, tasks => - { - DisposeHubs(hubs); - var faulted = tasks.FirstOrDefault(t => t.IsFaulted); - if (faulted != null) - { - tcs.SetUnwrappedException(faulted.Exception); - } - else if (tasks.Any(t => t.IsCanceled)) - { - tcs.SetCanceled(); - } - else - { - tcs.SetResult(null); - } - }); - - return tcs.Task; - } - - private IHub CreateHub(IRequest request, HubDescriptor descriptor, string connectionId, StateChangeTracker tracker = null, bool throwIfFailedToCreate = false) - { - try - { - var hub = _manager.ResolveHub(descriptor.Name); - - if (hub != null) - { - tracker = tracker ?? new StateChangeTracker(); - - hub.Context = new HubCallerContext(request, connectionId); - hub.Clients = new HubConnectionContext(_pipelineInvoker, Connection, descriptor.Name, connectionId, tracker); - hub.Groups = new GroupManager(Connection, PrefixHelper.GetHubGroupName(descriptor.Name)); - } - - return hub; - } - catch (Exception ex) - { - Trace.TraceInformation(String.Format(CultureInfo.CurrentCulture, Resources.Error_ErrorCreatingHub + ex.Message, descriptor.Name)); - - if (throwIfFailedToCreate) - { - throw; - } - - return null; - } - } - - private IEnumerable GetHubs(IRequest request, string connectionId) - { - return from descriptor in _hubs - select CreateHub(request, descriptor, connectionId) into hub - where hub != null - select hub; - } - - private static void DisposeHubs(IEnumerable hubs) - { - foreach (var hub in hubs) - { - hub.Dispose(); - } - } - - private Task ProcessResponse(StateChangeTracker tracker, object result, HubRequest request, Exception error) - { - var hubResult = new HubResponse - { - State = tracker.GetChanges(), - Result = result, - Id = request.Id, - }; - - if (error != null) - { - _counters.ErrorsHubInvocationTotal.Increment(); - _counters.ErrorsHubInvocationPerSec.Increment(); - _counters.ErrorsAllTotal.Increment(); - _counters.ErrorsAllPerSec.Increment(); - - if (_enableDetailedErrors) - { - var exception = error.InnerException ?? error; - hubResult.StackTrace = _isDebuggingEnabled ? exception.StackTrace : null; - hubResult.Error = exception.Message; - } - else - { - hubResult.Error = String.Format(CultureInfo.CurrentCulture, Resources.Error_HubInvocationFailed, request.Hub, request.Method); - } - } - - return Transport.Send(hubResult); - } - - private static void ContinueWith(Task task, TaskCompletionSource tcs) - { - if (task.IsCompleted) - { - // Fast path for tasks that completed synchronously - ContinueSync(task, tcs); - } - else - { - ContinueAsync(task, tcs); - } - } - - private static void ContinueSync(Task task, TaskCompletionSource tcs) - { - if (task.IsFaulted) - { - tcs.TrySetUnwrappedException(task.Exception); - } - else if (task.IsCanceled) - { - tcs.TrySetCanceled(); - } - else - { - tcs.TrySetResult(task.Result); - } - } - - private static void ContinueAsync(Task task, TaskCompletionSource tcs) - { - task.ContinueWith(t => - { - if (t.IsFaulted) - { - tcs.TrySetUnwrappedException(t.Exception); - } - else if (t.IsCanceled) - { - tcs.TrySetCanceled(); - } - else - { - tcs.TrySetResult(t.Result); - } - }); - } - - [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "It is instantiated through JSON deserialization.")] - private class ClientHubInfo - { - public string Name { get; set; } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubMethodNameAttribute.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/HubMethodNameAttribute.cs deleted file mode 100644 index 49166ce07..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubMethodNameAttribute.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)] - public sealed class HubMethodNameAttribute : Attribute - { - public HubMethodNameAttribute(string methodName) - { - if (String.IsNullOrEmpty(methodName)) - { - throw new ArgumentNullException("methodName"); - } - MethodName = methodName; - } - - public string MethodName - { - get; - private set; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubNameAttribute.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/HubNameAttribute.cs deleted file mode 100644 index 942c88706..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubNameAttribute.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] - public sealed class HubNameAttribute : Attribute - { - public HubNameAttribute(string hubName) - { - if (String.IsNullOrEmpty(hubName)) - { - throw new ArgumentNullException("hubName"); - } - HubName = hubName; - } - - public string HubName - { - get; - private set; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubRequest.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/HubRequest.cs deleted file mode 100644 index 083d855cb..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubRequest.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using Microsoft.AspNet.SignalR.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class HubRequest - { - public string Hub { get; set; } - public string Method { get; set; } - [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "This type is used for de-serialization.")] - public IJsonValue[] ParameterValues { get; set; } - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "This type is used for de-serialization.")] - [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "This type is used for de-serialization.")] - public IDictionary State { get; set; } - public string Id { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubRequestParser.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/HubRequestParser.cs deleted file mode 100644 index f5f361f41..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubRequestParser.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using Microsoft.AspNet.SignalR.Json; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - internal class HubRequestParser : IHubRequestParser - { - private static readonly IJsonValue[] _emptyArgs = new IJsonValue[0]; - - public HubRequest Parse(string data) - { - var serializer = new JsonNetSerializer(); - var deserializedData = serializer.Parse(data); - - var request = new HubRequest(); - - request.Hub = deserializedData.Hub; - request.Method = deserializedData.Method; - request.Id = deserializedData.Id; - request.State = GetState(deserializedData); - request.ParameterValues = (deserializedData.Args != null) ? deserializedData.Args.Select(value => new JRawValue(value)).ToArray() : _emptyArgs; - - return request; - } - - [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "This type is used for deserialzation")] - private class HubInvocation - { - [JsonProperty("H")] - public string Hub { get; set; } - [JsonProperty("M")] - public string Method { get; set; } - [JsonProperty("I")] - public string Id { get; set; } - [JsonProperty("S")] - public JRaw State { get; set; } - [JsonProperty("A")] - public JRaw[] Args { get; set; } - } - - private static IDictionary GetState(HubInvocation deserializedData) - { - if (deserializedData.State == null) - { - return new Dictionary(); - } - - // Get the raw JSON string and check if it's over 4K - string json = deserializedData.State.ToString(); - - if (json.Length > 4096) - { - throw new InvalidOperationException(Resources.Error_StateExceededMaximumLength); - } - - var settings = new JsonSerializerSettings(); - settings.Converters.Add(new SipHashBasedDictionaryConverter()); - var serializer = new JsonNetSerializer(settings); - return serializer.Parse>(json); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubResponse.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/HubResponse.cs deleted file mode 100644 index a1305eb9a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/HubResponse.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using Newtonsoft.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// The response returned from an incoming hub request. - /// - public class HubResponse - { - /// - /// The changes made the the round tripped state. - /// - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Type is used for serialization")] - [JsonProperty("S", NullValueHandling = NullValueHandling.Ignore)] - public IDictionary State { get; set; } - - /// - /// The result of the invocation. - /// - [JsonProperty("R", NullValueHandling = NullValueHandling.Ignore)] - public object Result { get; set; } - - /// - /// The id of the operation. - /// - [JsonProperty("I")] - public string Id { get; set; } - - /// - /// The exception that occurs as a result of invoking the hub method. - /// - [JsonProperty("E", NullValueHandling = NullValueHandling.Ignore)] - public string Error { get; set; } - - /// - /// The stack trace of the exception that occurs as a result of invoking the hub method. - /// - [JsonProperty("T", NullValueHandling = NullValueHandling.Ignore)] - public string StackTrace { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/IAssemblyLocator.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/IAssemblyLocator.cs deleted file mode 100644 index 5e98096fb..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/IAssemblyLocator.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Reflection; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public interface IAssemblyLocator - { - [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Might be expensive.")] - IList GetAssemblies(); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/IClientProxy.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/IClientProxy.cs deleted file mode 100644 index 71c9bc69c..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/IClientProxy.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// A server side proxy for the client side hub. - /// - public interface IClientProxy - { - /// - /// Invokes a method on the connection(s) represented by the instance. - /// - /// name of the method to invoke - /// argumetns to pass to the client - /// A task that represents when the data has been sent to the client. - Task Invoke(string method, params object[] args); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/IHub.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/IHub.cs deleted file mode 100644 index 1b7ef0ff8..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/IHub.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public interface IHub : IDisposable - { - /// - /// Gets a . Which contains information about the calling client. - /// - HubCallerContext Context { get; set; } - - /// - /// Gets a dynamic object that represents all clients connected to this hub (not hub instance). - /// - HubConnectionContext Clients { get; set; } - - /// - /// Gets the the hub instance. - /// - IGroupManager Groups { get; set; } - - /// - /// Called when a new connection is made to the . - /// - Task OnConnected(); - - /// - /// Called when a connection reconnects to the after a timeout. - /// - Task OnReconnected(); - - /// - /// Called when a connection is disconnected from the . - /// - Task OnDisconnected(); - } -} - diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/IHubActivator.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/IHubActivator.cs deleted file mode 100644 index 9a606a8a5..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/IHubActivator.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public interface IHubActivator - { - IHub Create(HubDescriptor descriptor); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/IHubConnectionContext.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/IHubConnectionContext.cs deleted file mode 100644 index fa468dd47..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/IHubConnectionContext.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Encapsulates all information about a SignalR connection for an . - /// - public interface IHubConnectionContext - { - dynamic All { get; } - dynamic AllExcept(params string[] excludeConnectionIds); - dynamic Client(string connectionId); - dynamic Group(string groupName, params string[] excludeConnectionIds); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/IHubRequestParser.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/IHubRequestParser.cs deleted file mode 100644 index dd798dd5f..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/IHubRequestParser.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Handles parsing incoming requests through the . - /// - public interface IHubRequestParser - { - /// - /// Parses the incoming hub payload into a . - /// - /// The raw hub payload. - /// The resulting . - HubRequest Parse(string data); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/IJavaScriptMinifier.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/IJavaScriptMinifier.cs deleted file mode 100644 index 05690b5d7..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/IJavaScriptMinifier.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public interface IJavaScriptMinifier - { - string Minify(string source); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/IJavaScriptProxyGenerator.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/IJavaScriptProxyGenerator.cs deleted file mode 100644 index 49abbe3ea..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/IJavaScriptProxyGenerator.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public interface IJavaScriptProxyGenerator - { - string GenerateProxy(string serviceUrl); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/DefaultHubManager.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/DefaultHubManager.cs deleted file mode 100644 index f572b91e3..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/DefaultHubManager.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.AspNet.SignalR.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class DefaultHubManager : IHubManager - { - private readonly IEnumerable _methodProviders; - private readonly IHubActivator _activator; - private readonly IEnumerable _hubProviders; - - public DefaultHubManager(IDependencyResolver resolver) - { - _hubProviders = resolver.ResolveAll(); - _methodProviders = resolver.ResolveAll(); - _activator = resolver.Resolve(); - } - - public HubDescriptor GetHub(string hubName) - { - HubDescriptor descriptor = null; - if (_hubProviders.FirstOrDefault(p => p.TryGetHub(hubName, out descriptor)) != null) - { - return descriptor; - } - - return null; - } - - public IEnumerable GetHubs(Func predicate) - { - var hubs = _hubProviders.SelectMany(p => p.GetHubs()); - - if (predicate != null) - { - return hubs.Where(predicate); - } - - return hubs; - } - - public MethodDescriptor GetHubMethod(string hubName, string method, IList parameters) - { - HubDescriptor hub = GetHub(hubName); - - if (hub == null) - { - return null; - } - - MethodDescriptor descriptor = null; - if (_methodProviders.FirstOrDefault(p => p.TryGetMethod(hub, method, out descriptor, parameters)) != null) - { - return descriptor; - } - - return null; - } - - public IEnumerable GetHubMethods(string hubName, Func predicate) - { - HubDescriptor hub = GetHub(hubName); - - if (hub == null) - { - return null; - } - - var methods = _methodProviders.SelectMany(p => p.GetMethods(hub)); - - if (predicate != null) - { - return methods.Where(predicate); - } - - return methods; - - } - - public IHub ResolveHub(string hubName) - { - HubDescriptor hub = GetHub(hubName); - return hub == null ? null : _activator.Create(hub); - } - - public IEnumerable ResolveHubs() - { - return GetHubs(predicate: null).Select(hub => _activator.Create(hub)); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/DefaultParameterResolver.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/DefaultParameterResolver.cs deleted file mode 100644 index 5b31a57f9..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/DefaultParameterResolver.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.AspNet.SignalR.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class DefaultParameterResolver : IParameterResolver - { - /// - /// Resolves a parameter value based on the provided object. - /// - /// Parameter descriptor. - /// Value to resolve the parameter value from. - /// The parameter value. - public virtual object ResolveParameter(ParameterDescriptor descriptor, IJsonValue value) - { - if (descriptor == null) - { - throw new ArgumentNullException("descriptor"); - } - - if (value == null) - { - throw new ArgumentNullException("value"); - } - - if (value.GetType() == descriptor.ParameterType) - { - return value; - } - - return value.ConvertTo(descriptor.ParameterType); - } - - /// - /// Resolves method parameter values based on provided objects. - /// - /// Method descriptor. - /// List of values to resolve parameter values from. - /// Array of parameter values. - public virtual IList ResolveMethodParameters(MethodDescriptor method, IList values) - { - if (method == null) - { - throw new ArgumentNullException("method"); - } - - return method.Parameters.Zip(values, ResolveParameter).ToArray(); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/Descriptor.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/Descriptor.cs deleted file mode 100644 index 750a70965..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/Descriptor.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public abstract class Descriptor - { - /// - /// Name of Descriptor. - /// - public virtual string Name { get; set; } - - /// - /// Flags whether the name was specified. - /// - public virtual bool NameSpecified { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/HubDescriptor.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/HubDescriptor.cs deleted file mode 100644 index c4271eaef..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/HubDescriptor.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Holds information about a single hub. - /// - public class HubDescriptor : Descriptor - { - /// - /// Hub type. - /// - public virtual Type HubType { get; set; } - - public string CreateQualifiedName(string unqualifiedName) - { - return Name + "." + unqualifiedName; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/MethodDescriptor.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/MethodDescriptor.cs deleted file mode 100644 index 971f54f01..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/MethodDescriptor.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Holds information about a single hub method. - /// - public class MethodDescriptor : Descriptor - { - /// - /// The return type of this method. - /// - public virtual Type ReturnType { get; set; } - - /// - /// Hub descriptor object, target to this method. - /// - public virtual HubDescriptor Hub { get; set; } - - /// - /// Available method parameters. - /// - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "This is supposed to be mutable")] - public virtual IList Parameters { get; set; } - - /// - /// Method invocation delegate. - /// Takes a target hub and an array of invocation arguments as it's arguments. - /// - public virtual Func Invoker { get; set; } - - /// - /// Attributes attached to this method. - /// - public virtual IEnumerable Attributes { get; set; } - } -} - diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/NullMethodDescriptor.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/NullMethodDescriptor.cs deleted file mode 100644 index d1617dbfb..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/NullMethodDescriptor.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class NullMethodDescriptor : MethodDescriptor - { - private static readonly IEnumerable _attributes = new List(); - private static readonly IList _parameters = new List(); - - private string _methodName; - - public NullMethodDescriptor(string methodName) - { - _methodName = methodName; - } - - public override Func Invoker - { - get - { - return (emptyHub, emptyParameters) => - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_MethodCouldNotBeResolved, _methodName)); - }; - } - } - - public override IList Parameters - { - get { return _parameters; } - } - - public override IEnumerable Attributes - { - get { return _attributes; } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/ParameterDescriptor.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/ParameterDescriptor.cs deleted file mode 100644 index 4e32d3a8b..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/Descriptors/ParameterDescriptor.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Holds information about a single hub method parameter. - /// - public class ParameterDescriptor - { - /// - /// Parameter name. - /// - public virtual string Name { get; set; } - - /// - /// Parameter type. - /// - public virtual Type ParameterType { get; set; } - } -} - diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/HubMethodDispatcher.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/HubMethodDispatcher.cs deleted file mode 100644 index c52b5e760..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/HubMethodDispatcher.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Reflection; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - internal class HubMethodDispatcher - { - private HubMethodExecutor _executor; - - public HubMethodDispatcher(MethodInfo methodInfo) - { - _executor = GetExecutor(methodInfo); - MethodInfo = methodInfo; - } - - private delegate object HubMethodExecutor(IHub hub, object[] parameters); - - private delegate void VoidHubMethodExecutor(IHub hub, object[] parameters); - - public MethodInfo MethodInfo { get; private set; } - - public object Execute(IHub hub, object[] parameters) - { - return _executor(hub, parameters); - } - - private static HubMethodExecutor GetExecutor(MethodInfo methodInfo) - { - // Parameters to executor - ParameterExpression hubParameter = Expression.Parameter(typeof(IHub), "hub"); - ParameterExpression parametersParameter = Expression.Parameter(typeof(object[]), "parameters"); - - // Build parameter list - List parameters = new List(); - ParameterInfo[] paramInfos = methodInfo.GetParameters(); - for (int i = 0; i < paramInfos.Length; i++) - { - ParameterInfo paramInfo = paramInfos[i]; - BinaryExpression valueObj = Expression.ArrayIndex(parametersParameter, Expression.Constant(i)); - UnaryExpression valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); - - // valueCast is "(Ti) parameters[i]" - parameters.Add(valueCast); - } - - // Call method - UnaryExpression instanceCast = (!methodInfo.IsStatic) ? Expression.Convert(hubParameter, methodInfo.ReflectedType) : null; - MethodCallExpression methodCall = Expression.Call(instanceCast, methodInfo, parameters); - - // methodCall is "((TController) hub) method((T0) parameters[0], (T1) parameters[1], ...)" - // Create function - if (methodCall.Type == typeof(void)) - { - Expression lambda = Expression.Lambda(methodCall, hubParameter, parametersParameter); - VoidHubMethodExecutor voidExecutor = lambda.Compile(); - return WrapVoidAction(voidExecutor); - } - else - { - // must coerce methodCall to match HubMethodExecutor signature - UnaryExpression castMethodCall = Expression.Convert(methodCall, typeof(object)); - Expression lambda = Expression.Lambda(castMethodCall, hubParameter, parametersParameter); - return lambda.Compile(); - } - } - - private static HubMethodExecutor WrapVoidAction(VoidHubMethodExecutor executor) - { - return delegate(IHub hub, object[] parameters) - { - executor(hub, parameters); - return null; - }; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IHubDescriptorProvider.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IHubDescriptorProvider.cs deleted file mode 100644 index e439d0b92..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IHubDescriptorProvider.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Describes hub descriptor provider, which provides information about available hubs. - /// - public interface IHubDescriptorProvider - { - /// - /// Retrieve all avaiable hubs. - /// - /// Collection of hub descriptors. - [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "This call might be expensive")] - IList GetHubs(); - - /// - /// Tries to retrieve hub with a given name. - /// - /// Name of the hub. - /// Retrieved descriptor object. - /// True, if hub has been found - bool TryGetHub(string hubName, out HubDescriptor descriptor); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IHubManager.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IHubManager.cs deleted file mode 100644 index 99da9b351..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IHubManager.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using Microsoft.AspNet.SignalR.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Describes a hub manager - main point in the whole hub and method lookup process. - /// - public interface IHubManager - { - /// - /// Retrieves a single hub descriptor. - /// - /// Name of the hub. - /// Hub descriptor, if found. Null, otherwise. - HubDescriptor GetHub(string hubName); - - /// - /// Retrieves all available hubs matching the given predicate. - /// - /// List of hub descriptors. - IEnumerable GetHubs(Func predicate); - - /// - /// Resolves a given hub name to a concrete object. - /// - /// Name of the hub. - /// Hub implementation instance, if found. Null otherwise. - IHub ResolveHub(string hubName); - - /// - /// Resolves all available hubs to their concrete objects. - /// - /// List of hub instances. - IEnumerable ResolveHubs(); - - /// - /// Retrieves a method with a given name on a given hub. - /// - /// Name of the hub. - /// Name of the method to find. - /// Method parameters to match. - /// Descriptor of the method, if found. Null otherwise. - MethodDescriptor GetHubMethod(string hubName, string method, IList parameters); - - /// - /// Gets all methods available to call on a given hub. - /// - /// Name of the hub, - /// Optional predicate for filtering results. - /// List of available methods. - IEnumerable GetHubMethods(string hubName, Func predicate); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IMethodDescriptorProvider.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IMethodDescriptorProvider.cs deleted file mode 100644 index ae0700f36..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IMethodDescriptorProvider.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using Microsoft.AspNet.SignalR.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Describes a hub method provider that builds a collection of available methods on a given hub. - /// - public interface IMethodDescriptorProvider - { - /// - /// Retrieve all methods on a given hub. - /// - /// Hub descriptor object. - /// Available methods. - IEnumerable GetMethods(HubDescriptor hub); - - /// - /// Tries to retrieve a method. - /// - /// Hub descriptor object - /// Name of the method. - /// Descriptor of the method, if found. Null otherwise. - /// Method parameters to match. - /// True, if a method has been found. - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Justification = "This is a well known pattern for efficient lookup")] - bool TryGetMethod(HubDescriptor hub, string method, out MethodDescriptor descriptor, IList parameters); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IParameterResolver.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IParameterResolver.cs deleted file mode 100644 index e1ed36d61..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/IParameterResolver.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using Microsoft.AspNet.SignalR.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Describes a parameter resolver for resolving parameter-matching values based on provided information. - /// - public interface IParameterResolver - { - /// - /// Resolves method parameter values based on provided objects. - /// - /// Method descriptor. - /// List of values to resolve parameter values from. - /// Array of parameter values. - IList ResolveMethodParameters(MethodDescriptor method, IList values); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/ReflectedHubDescriptorProvider.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/ReflectedHubDescriptorProvider.cs deleted file mode 100644 index 49b1e1d44..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/ReflectedHubDescriptorProvider.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class ReflectedHubDescriptorProvider : IHubDescriptorProvider - { - private readonly Lazy> _hubs; - private readonly Lazy _locator; - - public ReflectedHubDescriptorProvider(IDependencyResolver resolver) - { - _locator = new Lazy(resolver.Resolve); - _hubs = new Lazy>(BuildHubsCache); - } - - public IList GetHubs() - { - return _hubs.Value - .Select(kv => kv.Value) - .Distinct() - .ToList(); - } - - public bool TryGetHub(string hubName, out HubDescriptor descriptor) - { - return _hubs.Value.TryGetValue(hubName, out descriptor); - } - - protected IDictionary BuildHubsCache() - { - // Getting all IHub-implementing types that apply - var types = _locator.Value.GetAssemblies() - .SelectMany(GetTypesSafe) - .Where(IsHubType); - - // Building cache entries for each descriptor - // Each descriptor is stored in dictionary under a key - // that is it's name or the name provided by an attribute - var cacheEntries = types - .Select(type => new HubDescriptor - { - NameSpecified = (type.GetHubAttributeName() != null), - Name = type.GetHubName(), - HubType = type - }) - .ToDictionary(hub => hub.Name, - hub => hub, - StringComparer.OrdinalIgnoreCase); - - return cacheEntries; - } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "If we throw then it's not a hub type")] - private static bool IsHubType(Type type) - { - try - { - return typeof(IHub).IsAssignableFrom(type) && - !type.IsAbstract && - (type.Attributes.HasFlag(TypeAttributes.Public) || - type.Attributes.HasFlag(TypeAttributes.NestedPublic)); - } - catch - { - return false; - } - } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "If we throw then we have an empty type")] - private static IEnumerable GetTypesSafe(Assembly a) - { - try - { - return a.GetTypes(); - } - catch - { - return Enumerable.Empty(); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/ReflectedMethodDescriptorProvider.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/ReflectedMethodDescriptorProvider.cs deleted file mode 100644 index db6b95756..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Lookup/ReflectedMethodDescriptorProvider.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Reflection; -using Microsoft.AspNet.SignalR.Json; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class ReflectedMethodDescriptorProvider : IMethodDescriptorProvider - { - private readonly ConcurrentDictionary>> _methods; - private readonly ConcurrentDictionary _executableMethods; - - public ReflectedMethodDescriptorProvider() - { - _methods = new ConcurrentDictionary>>(StringComparer.OrdinalIgnoreCase); - _executableMethods = new ConcurrentDictionary(StringComparer.OrdinalIgnoreCase); - } - - public IEnumerable GetMethods(HubDescriptor hub) - { - return FetchMethodsFor(hub) - .SelectMany(kv => kv.Value) - .ToList(); - } - - /// - /// Retrieves an existing dictionary of all available methods for a given hub from cache. - /// If cache entry does not exist - it is created automatically by BuildMethodCacheFor. - /// - /// - /// - private IDictionary> FetchMethodsFor(HubDescriptor hub) - { - return _methods.GetOrAdd( - hub.Name, - key => BuildMethodCacheFor(hub)); - } - - /// - /// Builds a dictionary of all possible methods on a given hub. - /// Single entry contains a collection of available overloads for a given method name (key). - /// This dictionary is being cached afterwards. - /// - /// Hub to build cache for - /// Dictionary of available methods - private static IDictionary> BuildMethodCacheFor(HubDescriptor hub) - { - return ReflectionHelper.GetExportedHubMethods(hub.HubType) - .GroupBy(GetMethodName, StringComparer.OrdinalIgnoreCase) - .ToDictionary(group => group.Key, - group => group.Select(oload => - new MethodDescriptor - { - ReturnType = oload.ReturnType, - Name = group.Key, - NameSpecified = (GetMethodAttributeName(oload) != null), - Invoker = new HubMethodDispatcher(oload).Execute, - Hub = hub, - Attributes = oload.GetCustomAttributes(typeof(Attribute), inherit: true).Cast(), - Parameters = oload.GetParameters() - .Select(p => new ParameterDescriptor - { - Name = p.Name, - ParameterType = p.ParameterType, - }) - .ToList() - }), - StringComparer.OrdinalIgnoreCase); - } - - /// - /// Searches the specified Hub for the specified . - /// - /// - /// In the case that there are multiple overloads of the specified , the parameter set helps determine exactly which instance of the overload should be resolved. - /// If there are multiple overloads found with the same number of matching parameters, none of the methods will be returned because it is not possible to determine which overload of the method was intended to be resolved. - /// - /// Hub to search for the specified on. - /// The method name to search for. - /// If successful, the that was resolved. - /// The set of parameters that will be used to help locate a specific overload of the specified . - /// True if the method matching the name/parameter set is found on the hub, otherwise false. - public bool TryGetMethod(HubDescriptor hub, string method, out MethodDescriptor descriptor, IList parameters) - { - string hubMethodKey = BuildHubExecutableMethodCacheKey(hub, method, parameters); - - if (!_executableMethods.TryGetValue(hubMethodKey, out descriptor)) - { - IEnumerable overloads; - - if (FetchMethodsFor(hub).TryGetValue(method, out overloads)) - { - var matches = overloads.Where(o => o.Matches(parameters)).ToList(); - - // If only one match is found, that is the "executable" version, otherwise none of the methods can be returned because we don't know which one was actually being targeted - descriptor = matches.Count == 1 ? matches[0] : null; - } - else - { - descriptor = null; - } - - // If an executable method was found, cache it for future lookups (NOTE: we don't cache null instances because it could be a surface area for DoS attack by supplying random method names to flood the cache) - if (descriptor != null) - { - _executableMethods.TryAdd(hubMethodKey, descriptor); - } - } - - return descriptor != null; - } - - private static string BuildHubExecutableMethodCacheKey(HubDescriptor hub, string method, IList parameters) - { - string normalizedParameterCountKeyPart; - - if (parameters != null) - { - normalizedParameterCountKeyPart = parameters.Count.ToString(CultureInfo.InvariantCulture); - } - else - { - // NOTE: we normalize a null parameter array to be the same as an empty (i.e. Length == 0) parameter array - normalizedParameterCountKeyPart = "0"; - } - - // NOTE: we always normalize to all uppercase since method names are case insensitive and could theoretically come in diff. variations per call - string normalizedMethodName = method.ToUpperInvariant(); - - string methodKey = hub.Name + "::" + normalizedMethodName + "(" + normalizedParameterCountKeyPart + ")"; - - return methodKey; - } - - private static string GetMethodName(MethodInfo method) - { - return GetMethodAttributeName(method) ?? method.Name; - } - - private static string GetMethodAttributeName(MethodInfo method) - { - return ReflectionHelper.GetAttributeValue(method, a => a.MethodName); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/NullClientProxy.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/NullClientProxy.cs deleted file mode 100644 index 4d944017e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/NullClientProxy.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Dynamic; -using System.Globalization; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - internal class NullClientProxy : DynamicObject - { - public override bool TryGetMember(GetMemberBinder binder, out object result) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_UsingHubInstanceNotCreatedUnsupported)); - } - - public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_UsingHubInstanceNotCreatedUnsupported)); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/NullJavaScriptMinifier.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/NullJavaScriptMinifier.cs deleted file mode 100644 index 932d38d0a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/NullJavaScriptMinifier.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Diagnostics.CodeAnalysis; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class NullJavaScriptMinifier : IJavaScriptMinifier - { - [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Justification = "This is a singleton")] - public static readonly NullJavaScriptMinifier Instance = new NullJavaScriptMinifier(); - - public string Minify(string source) - { - return source; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/AuthorizeModule.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/AuthorizeModule.cs deleted file mode 100644 index 046e45cba..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/AuthorizeModule.cs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// This module is added the the HubPipeline by default. - /// - /// Hub level attributes that implement such as are applied to determine - /// whether to allow potential clients to receive messages sent from that hub using a or a - /// All applicable hub attributes must allow hub connection for the connection to be authorized. - /// - /// Hub and method level attributes that implement such as are applied - /// to determine whether to allow callers to invoke hub methods. - /// All applicable hub level AND method level attributes must allow hub method invocation for the invocation to be authorized. - /// - /// Optionally, this module may be instantiated with and - /// authorizers that will be applied globally to all hubs and hub methods. - /// - public class AuthorizeModule : HubPipelineModule - { - // Global authorizers - private readonly IAuthorizeHubConnection _globalConnectionAuthorizer; - private readonly IAuthorizeHubMethodInvocation _globalInvocationAuthorizer; - - // Attribute authorizer caches - private readonly ConcurrentDictionary> _connectionAuthorizersCache; - private readonly ConcurrentDictionary> _classInvocationAuthorizersCache; - private readonly ConcurrentDictionary> _methodInvocationAuthorizersCache; - - // By default, this module does not include any authorizers that are applied globally. - // This module will always apply authorizers attached to hubs or hub methods - public AuthorizeModule() - : this(globalConnectionAuthorizer: null, globalInvocationAuthorizer: null) - { - } - - public AuthorizeModule(IAuthorizeHubConnection globalConnectionAuthorizer, IAuthorizeHubMethodInvocation globalInvocationAuthorizer) - { - // Set global authorizers - _globalConnectionAuthorizer = globalConnectionAuthorizer; - _globalInvocationAuthorizer = globalInvocationAuthorizer; - - // Initialize attribute authorizer caches - _connectionAuthorizersCache = new ConcurrentDictionary>(); - _classInvocationAuthorizersCache = new ConcurrentDictionary>(); - _methodInvocationAuthorizersCache = new ConcurrentDictionary>(); - } - - public override Func BuildAuthorizeConnect(Func authorizeConnect) - { - return base.BuildAuthorizeConnect((hubDescriptor, request) => - { - // Execute custom modules first and short circuit if any deny authorization. - if (!authorizeConnect(hubDescriptor, request)) - { - return false; - } - - // Execute the global hub connection authorizer if there is one next and short circuit if it denies authorization. - if (_globalConnectionAuthorizer != null && !_globalConnectionAuthorizer.AuthorizeHubConnection(hubDescriptor, request)) - { - return false; - } - - // Get hub attributes implementing IAuthorizeHubConnection from the cache - // If the attributes do not exist in the cache, retrieve them using reflection and add them to the cache - var attributeAuthorizers = _connectionAuthorizersCache.GetOrAdd(hubDescriptor.HubType, - hubType => hubType.GetCustomAttributes(typeof(IAuthorizeHubConnection), inherit: true).Cast()); - - // Every attribute (if any) implementing IAuthorizeHubConnection attached to the relevant hub MUST allow the connection - return attributeAuthorizers.All(a => a.AuthorizeHubConnection(hubDescriptor, request)); - }); - } - - public override Func> BuildIncoming(Func> invoke) - { - return base.BuildIncoming(context => - { - // Execute the global method invocation authorizer if there is one and short circuit if it denies authorization. - if (_globalInvocationAuthorizer == null || _globalInvocationAuthorizer.AuthorizeHubMethodInvocation(context, appliesToMethod: false)) - { - // Get hub attributes implementing IAuthorizeHubMethodInvocation from the cache - // If the attributes do not exist in the cache, retrieve them using reflection and add them to the cache - var classLevelAuthorizers = _classInvocationAuthorizersCache.GetOrAdd(context.Hub.GetType(), - hubType => hubType.GetCustomAttributes(typeof(IAuthorizeHubMethodInvocation), inherit: true).Cast()); - - // Execute all hub level authorizers and short circuit if ANY deny authorization. - if (classLevelAuthorizers.All(a => a.AuthorizeHubMethodInvocation(context, appliesToMethod: false))) - { - // If the MethodDescriptor is a NullMethodDescriptor, we don't want to cache it since a new one is created - // for each invocation with an invalid method name. #1801 - if (context.MethodDescriptor is NullMethodDescriptor) - { - return invoke(context); - } - - // Get method attributes implementing IAuthorizeHubMethodInvocation from the cache - // If the attributes do not exist in the cache, retrieve them from the MethodDescriptor and add them to the cache - var methodLevelAuthorizers = _methodInvocationAuthorizersCache.GetOrAdd(context.MethodDescriptor, - methodDescriptor => methodDescriptor.Attributes.OfType()); - - // Execute all method level authorizers. If ALL provide authorization, continue executing the invocation pipeline. - if (methodLevelAuthorizers.All(a => a.AuthorizeHubMethodInvocation(context, appliesToMethod: true))) - { - return invoke(context); - } - } - } - - // Send error back to the client - return TaskAsyncHelper.FromError( - new NotAuthorizedException(String.Format(CultureInfo.CurrentCulture, Resources.Error_CallerNotAuthorizedToInvokeMethodOn, - context.MethodDescriptor.Name, - context.MethodDescriptor.Hub.Name))); - }); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/IAuthorizeHubConnection.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/IAuthorizeHubConnection.cs deleted file mode 100644 index c89e60014..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/IAuthorizeHubConnection.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Interface to be implemented by s that can authorize client to connect to a . - /// - public interface IAuthorizeHubConnection - { - /// - /// Given a , determine whether client is authorized to connect to . - /// - /// Description of the hub client is attempting to connect to. - /// The connection request from the client. - /// true if the caller is authorized to connect to the hub; otherwise, false. - bool AuthorizeHubConnection(HubDescriptor hubDescriptor, IRequest request); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/IAuthorizeHubMethodInvocation.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/IAuthorizeHubMethodInvocation.cs deleted file mode 100644 index 4d1eee752..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/IAuthorizeHubMethodInvocation.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Interface to be implemented by s that can authorize the invocation of methods. - /// - public interface IAuthorizeHubMethodInvocation - { - /// - /// Given a , determine whether client is authorized to invoke the method. - /// - /// An providing details regarding the method invocation. - /// Indicates whether the interface instance is an attribute applied directly to a method. - /// true if the caller is authorized to invoke the method; otherwise, false. - bool AuthorizeHubMethodInvocation(IHubIncomingInvokerContext hubIncomingInvokerContext, bool appliesToMethod); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/NotAuthorizedException.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/NotAuthorizedException.cs deleted file mode 100644 index 10d32b649..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/Auth/NotAuthorizedException.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - [Serializable] - public class NotAuthorizedException : Exception - { - public NotAuthorizedException() { } - public NotAuthorizedException(string message) : base(message) { } - public NotAuthorizedException(string message, Exception inner) : base(message, inner) { } - protected NotAuthorizedException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) - : base(info, context) { } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubInvokerContext.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubInvokerContext.cs deleted file mode 100644 index eea40b052..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubInvokerContext.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - internal class HubInvokerContext : IHubIncomingInvokerContext - { - public HubInvokerContext(IHub hub, StateChangeTracker tracker, MethodDescriptor methodDescriptor, IList args) - { - Hub = hub; - MethodDescriptor = methodDescriptor; - Args = args; - StateTracker = tracker; - } - - public IHub Hub - { - get; - private set; - } - - public MethodDescriptor MethodDescriptor - { - get; - private set; - } - - public IList Args - { - get; - private set; - } - - - public StateChangeTracker StateTracker - { - get; - private set; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubOutgoingInvokerContext.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubOutgoingInvokerContext.cs deleted file mode 100644 index 8de9851f7..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubOutgoingInvokerContext.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - internal class HubOutgoingInvokerContext : IHubOutgoingInvokerContext - { - public HubOutgoingInvokerContext(IConnection connection, string signal, ClientHubInvocation invocation, IList excludedSignals) - { - Connection = connection; - Signal = signal; - Invocation = invocation; - ExcludedSignals = excludedSignals; - } - - public IConnection Connection - { - get; - private set; - } - - public ClientHubInvocation Invocation - { - get; - private set; - } - - public string Signal - { - get; - private set; - } - - public IList ExcludedSignals - { - get; - private set; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipeline.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipeline.cs deleted file mode 100644 index 9cf6eccd4..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipeline.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - internal class HubPipeline : IHubPipeline, IHubPipelineInvoker - { - private readonly Stack _modules; - private readonly Lazy _pipeline; - - public HubPipeline() - { - _modules = new Stack(); - _pipeline = new Lazy(() => new ComposedPipeline(_modules)); - } - - public IHubPipeline AddModule(IHubPipelineModule pipelineModule) - { - if (_pipeline.IsValueCreated) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_UnableToAddModulePiplineAlreadyInvoked)); - } - _modules.Push(pipelineModule); - return this; - } - - private ComposedPipeline Pipeline - { - get { return _pipeline.Value; } - } - - public Task Invoke(IHubIncomingInvokerContext context) - { - return Pipeline.Invoke(context); - } - - public Task Connect(IHub hub) - { - return Pipeline.Connect(hub); - } - - public Task Reconnect(IHub hub) - { - return Pipeline.Reconnect(hub); - } - - public Task Disconnect(IHub hub) - { - return Pipeline.Disconnect(hub); - } - - public bool AuthorizeConnect(HubDescriptor hubDescriptor, IRequest request) - { - return Pipeline.AuthorizeConnect(hubDescriptor, request); - } - - public IList RejoiningGroups(HubDescriptor hubDescriptor, IRequest request, IList groups) - { - return Pipeline.RejoiningGroups(hubDescriptor, request, groups); - } - - public Task Send(IHubOutgoingInvokerContext context) - { - return Pipeline.Send(context); - } - - private class ComposedPipeline - { - - public Func> Invoke; - public Func Connect; - public Func Reconnect; - public Func Disconnect; - public Func AuthorizeConnect; - public Func, IList> RejoiningGroups; - public Func Send; - - public ComposedPipeline(Stack modules) - { - // This wouldn't look nearly as gnarly if C# had better type inference, but now we don't need the ComposedModule or PassThroughModule. - Invoke = Compose>>(modules, (m, f) => m.BuildIncoming(f))(HubDispatcher.Incoming); - Connect = Compose>(modules, (m, f) => m.BuildConnect(f))(HubDispatcher.Connect); - Reconnect = Compose>(modules, (m, f) => m.BuildReconnect(f))(HubDispatcher.Reconnect); - Disconnect = Compose>(modules, (m, f) => m.BuildDisconnect(f))(HubDispatcher.Disconnect); - AuthorizeConnect = Compose>(modules, (m, f) => m.BuildAuthorizeConnect(f))((h, r) => true); - RejoiningGroups = Compose, IList>>(modules, (m, f) => m.BuildRejoiningGroups(f))((h, r, g) => g); - Send = Compose>(modules, (m, f) => m.BuildOutgoing(f))(HubDispatcher.Outgoing); - } - - // IHubPipelineModule could be turned into a second generic parameter, but it would make the above invocations even longer than they currently are. - private static Func Compose(IEnumerable modules, Func method) - { - // Notice we are reversing and aggregating in one step. (Function composition is associative) - return modules.Aggregate>(x => x, (a, b) => (x => method(b, a(x)))); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipelineExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipelineExtensions.cs deleted file mode 100644 index 0eaac77b8..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipelineExtensions.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using Microsoft.AspNet.SignalR.Hubs; - -namespace Microsoft.AspNet.SignalR -{ - public static class HubPipelineExtensions - { - /// - /// Requiring Authentication adds an to the with - /// and authorizers that will be applied globally to all hubs and hub methods. - /// These authorizers require that the 's - /// IsAuthenticated for any clients that invoke server-side hub methods or receive client-side hub method invocations. - /// - /// The to which the will be added. - public static void RequireAuthentication(this IHubPipeline pipeline) - { - if (pipeline == null) - { - throw new ArgumentNullException("pipeline"); - } - - var authorizer = new AuthorizeAttribute(); - pipeline.AddModule(new AuthorizeModule(globalConnectionAuthorizer: authorizer, globalInvocationAuthorizer: authorizer)); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipelineModule.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipelineModule.cs deleted file mode 100644 index d914c34f0..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/HubPipelineModule.cs +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Common base class to simplify the implementation of IHubPipelineModules. - /// A module can intercept and customize various stages of hub processing such as connecting, reconnecting, disconnecting, - /// invoking server-side hub methods, invoking client-side hub methods, authorizing hub clients and rejoining hub groups. - /// A module can be activated by calling . - /// The combined modules added to the are invoked via the - /// interface. - /// - public abstract class HubPipelineModule : IHubPipelineModule - { - /// - /// Wraps a function that invokes a server-side hub method. Even if a client has not been authorized to connect - /// to a hub, it will still be authorized to invoke server-side methods on that hub unless it is prevented in - /// by not executing the invoke parameter. - /// - /// A function that invokes a server-side hub method. - /// A wrapped function that invokes a server-side hub method. - public virtual Func> BuildIncoming(Func> invoke) - { - return context => - { - if (OnBeforeIncoming(context)) - { - return invoke(context).OrEmpty() - .Then(result => OnAfterIncoming(result, context)) - .Catch(ex => OnIncomingError(ex, context)); - } - - return TaskAsyncHelper.FromResult(null); - }; - } - - /// - /// Wraps a function that is called when a client connects to the for each - /// the client connects to. By default, this results in the 's - /// OnConnected method being invoked. - /// - /// A function to be called when a client connects to a hub. - /// A wrapped function to be called when a client connects to a hub. - public virtual Func BuildConnect(Func connect) - { - return hub => - { - if (OnBeforeConnect(hub)) - { - return connect(hub).OrEmpty().Then(h => OnAfterConnect(h), hub); - } - - return TaskAsyncHelper.Empty; - }; - } - - /// - /// Wraps a function that is called when a client reconnects to the for each - /// the client connects to. By default, this results in the 's - /// OnReconnected method being invoked. - /// - /// A function to be called when a client reconnects to a hub. - /// A wrapped function to be called when a client reconnects to a hub. - public virtual Func BuildReconnect(Func reconnect) - { - return (hub) => - { - if (OnBeforeReconnect(hub)) - { - return reconnect(hub).OrEmpty().Then(h => OnAfterReconnect(h), hub); - } - return TaskAsyncHelper.Empty; - }; - } - - /// - /// Wraps a function that is called when a client disconnects from the for each - /// the client was connected to. By default, this results in the 's - /// OnDisconnected method being invoked. - /// - /// A function to be called when a client disconnects from a hub. - /// A wrapped function to be called when a client disconnects from a hub. - public virtual Func BuildDisconnect(Func disconnect) - { - return hub => - { - if (OnBeforeDisconnect(hub)) - { - return disconnect(hub).OrEmpty().Then(h => OnAfterDisconnect(h), hub); - } - - return TaskAsyncHelper.Empty; - }; - } - - /// - /// Wraps a function to be called before a client subscribes to signals belonging to the hub described by the - /// . By default, the will look for attributes on the - /// to help determine if the client is authorized to subscribe to method invocations for the - /// described hub. - /// The function returns true if the client is authorized to subscribe to client-side hub method - /// invocations; false, otherwise. - /// - /// - /// A function that dictates whether or not the client is authorized to connect to the described Hub. - /// - /// - /// A wrapped function that dictates whether or not the client is authorized to connect to the described Hub. - /// - public virtual Func BuildAuthorizeConnect(Func authorizeConnect) - { - return (hubDescriptor, request) => - { - if (OnBeforeAuthorizeConnect(hubDescriptor, request)) - { - return authorizeConnect(hubDescriptor, request); - } - return false; - }; - } - - /// - /// Wraps a function that determines which of the groups belonging to the hub described by the - /// the client should be allowed to rejoin. - /// By default, clients will rejoin all the groups they were in prior to reconnecting. - /// - /// A function that determines which groups the client should be allowed to rejoin. - /// A wrapped function that determines which groups the client should be allowed to rejoin. - public virtual Func, IList> BuildRejoiningGroups(Func, IList> rejoiningGroups) - { - return rejoiningGroups; - } - - /// - /// Wraps a function that invokes a client-side hub method. - /// - /// A function that invokes a client-side hub method. - /// A wrapped function that invokes a client-side hub method. - public virtual Func BuildOutgoing(Func send) - { - return context => - { - if (OnBeforeOutgoing(context)) - { - return send(context).OrEmpty().Then(ctx => OnAfterOutgoing(ctx), context); - } - - return TaskAsyncHelper.Empty; - }; - } - - /// - /// This method is called before the AuthorizeConnect components of any modules added later to the - /// are executed. If this returns false, then those later-added modules will not run and the client will not be allowed - /// to subscribe to client-side invocations of methods belonging to the hub defined by the . - /// - /// A description of the hub the client is trying to subscribe to. - /// The connect request of the client trying to subscribe to the hub. - /// true, if the client is authorized to connect to the hub, false otherwise. - protected virtual bool OnBeforeAuthorizeConnect(HubDescriptor hubDescriptor, IRequest request) - { - return true; - } - - /// - /// This method is called before the connect components of any modules added later to the are - /// executed. If this returns false, then those later-added modules and the method will - /// not be run. - /// - /// The hub the client has connected to. - /// - /// true, if the connect components of later added modules and the method should be executed; - /// false, otherwise. - /// - protected virtual bool OnBeforeConnect(IHub hub) - { - return true; - } - - /// - /// This method is called after the connect components of any modules added later to the are - /// executed and after is executed, if at all. - /// - /// The hub the client has connected to. - protected virtual void OnAfterConnect(IHub hub) - { - - } - - /// - /// This method is called before the reconnect components of any modules added later to the are - /// executed. If this returns false, then those later-added modules and the method will - /// not be run. - /// - /// The hub the client has reconnected to. - /// - /// true, if the reconnect components of later added modules and the method should be executed; - /// false, otherwise. - /// - protected virtual bool OnBeforeReconnect(IHub hub) - { - return true; - } - - /// - /// This method is called after the reconnect components of any modules added later to the are - /// executed and after is executed, if at all. - /// - /// The hub the client has reconnected to. - protected virtual void OnAfterReconnect(IHub hub) - { - - } - - /// - /// This method is called before the outgoing components of any modules added later to the are - /// executed. If this returns false, then those later-added modules and the client-side hub method invocation(s) will not - /// be executed. - /// - /// A description of the client-side hub method invocation. - /// - /// true, if the outgoing components of later added modules and the client-side hub method invocation(s) should be executed; - /// false, otherwise. - /// - protected virtual bool OnBeforeOutgoing(IHubOutgoingInvokerContext context) - { - return true; - } - - /// - /// This method is called after the outgoing components of any modules added later to the are - /// executed. This does not mean that all the clients have received the hub method invocation, but it does indicate indicate - /// a hub invocation message has successfully been published to a message bus. - /// - /// A description of the client-side hub method invocation. - protected virtual void OnAfterOutgoing(IHubOutgoingInvokerContext context) - { - - } - - /// - /// This method is called before the disconnect components of any modules added later to the are - /// executed. If this returns false, then those later-added modules and the method will - /// not be run. - /// - /// The hub the client has disconnected from. - /// - /// true, if the disconnect components of later added modules and the method should be executed; - /// false, otherwise. - /// - protected virtual bool OnBeforeDisconnect(IHub hub) - { - return true; - } - - /// - /// This method is called after the disconnect components of any modules added later to the are - /// executed and after is executed, if at all. - /// - /// The hub the client has disconnected from. - protected virtual void OnAfterDisconnect(IHub hub) - { - - } - - /// - /// This method is called before the incoming components of any modules added later to the are - /// executed. If this returns false, then those later-added modules and the server-side hub method invocation will not - /// be executed. Even if a client has not been authorized to connect to a hub, it will still be authorized to invoke - /// server-side methods on that hub unless it is prevented in by not - /// executing the invoke parameter or prevented in by returning false. - /// - /// A description of the server-side hub method invocation. - /// - /// true, if the incoming components of later added modules and the server-side hub method invocation should be executed; - /// false, otherwise. - /// - protected virtual bool OnBeforeIncoming(IHubIncomingInvokerContext context) - { - return true; - } - - /// - /// This method is called after the incoming components of any modules added later to the - /// and the server-side hub method have completed execution. - /// - /// The return value of the server-side hub method - /// A description of the server-side hub method invocation. - /// The possibly new or updated return value of the server-side hub method - protected virtual object OnAfterIncoming(object result, IHubIncomingInvokerContext context) - { - return result; - } - - /// - /// This is called when an uncaught exception is thrown by a server-side hub method or the incoming component of a - /// module added later to the . Observing the exception using this method will not prevent - /// it from bubbling up to other modules. - /// - /// The exception that was thrown during the server-side invocation. - /// A description of the server-side hub method invocation. - protected virtual void OnIncomingError(Exception ex, IHubIncomingInvokerContext context) - { - - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubIncomingInvokerContext.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubIncomingInvokerContext.cs deleted file mode 100644 index a57d92b36..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubIncomingInvokerContext.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// A description of a server-side hub method invocation originating from a client. - /// - public interface IHubIncomingInvokerContext - { - /// - /// A hub instance that contains the invoked method as a member. - /// - IHub Hub { get; } - - /// - /// A description of the method being invoked by the client. - /// - MethodDescriptor MethodDescriptor { get; } - - /// - /// The arguments to be passed to the invoked method. - /// - [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "This represents an ordered list of parameter values")] - IList Args { get; } - - /// - /// A key-value store representing the hub state on the client at the time of the invocation. - /// - StateChangeTracker StateTracker { get; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubOutgoingInvokerContext.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubOutgoingInvokerContext.cs deleted file mode 100644 index 9f69af582..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubOutgoingInvokerContext.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// A description of a client-side hub method invocation originating from the server. - /// - public interface IHubOutgoingInvokerContext - { - /// - /// The , if any, corresponding to the client that invoked the server-side hub method - /// that is invoking the client-side hub method. - /// - IConnection Connection { get; } - - /// - /// A description of the method call to be made on the client. - /// - ClientHubInvocation Invocation { get; } - - /// - /// The signal (ConnectionId, hub type name or hub type name + "." + group name) belonging to clients that - /// receive the method invocation. - /// - string Signal { get; } - - /// - /// The signals (ConnectionId, hub type name or hub type name + "." + group name) belonging to clients that should - /// not receive the method invocation regardless of the . - /// - IList ExcludedSignals { get; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipeline.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipeline.cs deleted file mode 100644 index d0f4c58eb..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipeline.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// A collection of modules that can intercept and customize various stages of hub processing such as connecting, - /// reconnecting, disconnecting, invoking server-side hub methods, invoking client-side hub methods, authorizing - /// hub clients and rejoining hub groups. - /// - public interface IHubPipeline - { - /// - /// Adds an to the hub pipeline. Modules added to the pipeline first will wrap - /// modules that are added to the pipeline later. All modules must be added to the pipeline before any methods - /// on the are invoked. - /// - /// - /// A module that may intercept and customize various stages of hub processing such as connecting, - /// reconnecting, disconnecting, invoking server-side hub methods, invoking client-side hub methods, authorizing - /// hub clients and rejoining hub groups. - /// - /// - /// The itself with the newly added module allowing - /// calls to be chained. - /// This method mutates the pipeline it is invoked on so it is not necessary to store its result. - /// - IHubPipeline AddModule(IHubPipelineModule pipelineModule); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipelineInvoker.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipelineInvoker.cs deleted file mode 100644 index 499e9c972..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipelineInvoker.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// Implementations of this interface are responsible for executing operation required to complete various stages - /// hub processing such as connecting, reconnecting, disconnecting, invoking server-side hub methods, invoking - /// client-side hub methods, authorizing hub clients and rejoining hub groups. - /// - public interface IHubPipelineInvoker - { - /// - /// Invokes a server-side hub method. - /// - /// A description of the server-side hub method invocation. - /// An asynchronous operation giving the return value of the server-side hub method invocation. - Task Invoke(IHubIncomingInvokerContext context); - - /// - /// Invokes a client-side hub method. - /// - /// A description of the client-side hub method invocation. - Task Send(IHubOutgoingInvokerContext context); - - /// - /// To be called when a client connects to the for each the client - /// connects to. By default, this results in the 's OnConnected method being invoked. - /// - /// A the client is connected to. - Task Connect(IHub hub); - - /// - /// To be called when a client reconnects to the for each the client - /// connects to. By default, this results in the 's OnReconnected method being invoked. - /// - /// A the client is reconnected to. - Task Reconnect(IHub hub); - - /// - /// To be called when a client disconnects from the for each the client - /// was connected to. By default, this results in the 's OnDisconnected method being invoked. - /// - /// A the client was disconnected from. - Task Disconnect(IHub hub); - - /// - /// To be called before a client subscribes to signals belonging to the hub described by the . - /// By default, the will look for attributes on the to help determine if - /// the client is authorized to subscribe to method invocations for the described hub. - /// - /// A description of the hub the client is attempting to connect to. - /// - /// The connect request being made by the client which should include the client's - /// User. - /// - /// true, if the client is authorized to subscribe to client-side hub method invocations; false, otherwise. - bool AuthorizeConnect(HubDescriptor hubDescriptor, IRequest request); - - /// - /// This method determines which of the groups belonging to the hub described by the the client should be - /// allowed to rejoin. - /// By default, clients that are reconnecting to the server will be removed from all groups they may have previously been a member of, - /// because untrusted clients may claim to be a member of groups they were never authorized to join. - /// - /// A description of the hub for which the client is attempting to rejoin groups. - /// The reconnect request being made by the client that is attempting to rejoin groups. - /// - /// The list of groups belonging to the relevant hub that the client claims to have been a member of before the reconnect. - /// - /// A list of groups the client is allowed to rejoin. - IList RejoiningGroups(HubDescriptor hubDescriptor, IRequest request, IList groups); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipelineModule.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipelineModule.cs deleted file mode 100644 index 79a01717c..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/Pipeline/IHubPipelineModule.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// An can intercept and customize various stages of hub processing such as connecting, - /// reconnecting, disconnecting, invoking server-side hub methods, invoking client-side hub methods, authorizing hub - /// clients and rejoining hub groups. - /// Modules can be be activated by calling . - /// The combined modules added to the are invoked via the - /// interface. - /// - public interface IHubPipelineModule - { - /// - /// Wraps a function that invokes a server-side hub method. Even if a client has not been authorized to connect - /// to a hub, it will still be authorized to invoke server-side methods on that hub unless it is prevented in - /// by not executing the invoke parameter. - /// - /// A function that invokes a server-side hub method. - /// A wrapped function that invokes a server-side hub method. - Func> BuildIncoming(Func> invoke); - - /// - /// Wraps a function that invokes a client-side hub method. - /// - /// A function that invokes a client-side hub method. - /// A wrapped function that invokes a client-side hub method. - Func BuildOutgoing(Func send); - - /// - /// Wraps a function that is called when a client connects to the for each - /// the client connects to. By default, this results in the 's - /// OnConnected method being invoked. - /// - /// A function to be called when a client connects to a hub. - /// A wrapped function to be called when a client connects to a hub. - Func BuildConnect(Func connect); - - /// - /// Wraps a function that is called when a client reconnects to the for each - /// the client connects to. By default, this results in the 's - /// OnReconnected method being invoked. - /// - /// A function to be called when a client reconnects to a hub. - /// A wrapped function to be called when a client reconnects to a hub. - Func BuildReconnect(Func reconnect); - - /// - /// Wraps a function that is called when a client disconnects from the for each - /// the client was connected to. By default, this results in the 's - /// OnDisconnected method being invoked. - /// - /// A function to be called when a client disconnects from a hub. - /// A wrapped function to be called when a client disconnects from a hub. - Func BuildDisconnect(Func disconnect); - - /// - /// Wraps a function to be called before a client subscribes to signals belonging to the hub described by the - /// . By default, the will look for attributes on the - /// to help determine if the client is authorized to subscribe to method invocations for the - /// described hub. - /// The function returns true if the client is authorized to subscribe to client-side hub method - /// invocations; false, otherwise. - /// - /// - /// A function that dictates whether or not the client is authorized to connect to the described Hub. - /// - /// - /// A wrapped function that dictates whether or not the client is authorized to connect to the described Hub. - /// - Func BuildAuthorizeConnect(Func authorizeConnect); - - /// - /// Wraps a function that determines which of the groups belonging to the hub described by the - /// the client should be allowed to rejoin. - /// By default, clients will rejoin all the groups they were in prior to reconnecting. - /// - /// A function that determines which groups the client should be allowed to rejoin. - /// A wrapped function that determines which groups the client should be allowed to rejoin. - Func, IList> BuildRejoiningGroups(Func, IList> rejoiningGroups); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/ReflectionHelper.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/ReflectionHelper.cs deleted file mode 100644 index 6819ed97a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/ReflectionHelper.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public static class ReflectionHelper - { - private static readonly Type[] _excludeTypes = new[] { typeof(Hub), typeof(object) }; - private static readonly Type[] _excludeInterfaces = new[] { typeof(IHub), typeof(IDisposable) }; - - public static IEnumerable GetExportedHubMethods(Type type) - { - if (!typeof(IHub).IsAssignableFrom(type)) - { - return Enumerable.Empty(); - } - - var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Instance); - var allInterfaceMethods = _excludeInterfaces.SelectMany(i => GetInterfaceMethods(type, i)); - - return methods.Except(allInterfaceMethods).Where(IsValidHubMethod); - - } - - private static bool IsValidHubMethod(MethodInfo methodInfo) - { - return !(_excludeTypes.Contains(methodInfo.GetBaseDefinition().DeclaringType) || - methodInfo.IsSpecialName); - } - - private static IEnumerable GetInterfaceMethods(Type type, Type iface) - { - if (!iface.IsAssignableFrom(type)) - { - return Enumerable.Empty(); - } - - return type.GetInterfaceMap(iface).TargetMethods; - } - - public static TResult GetAttributeValue(ICustomAttributeProvider source, Func valueGetter) - where TAttribute : Attribute - { - if (source == null) - { - throw new ArgumentNullException("source"); - } - - if (valueGetter == null) - { - throw new ArgumentNullException("valueGetter"); - } - - var attributes = source.GetCustomAttributes(typeof(TAttribute), false) - .Cast() - .ToList(); - if (attributes.Any()) - { - return valueGetter(attributes[0]); - } - return default(TResult); - } - - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/SignalProxy.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/SignalProxy.cs deleted file mode 100644 index 1a54997ef..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/SignalProxy.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Dynamic; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public abstract class SignalProxy : DynamicObject, IClientProxy - { - private readonly IList _exclude; - private readonly string _prefix; - - protected SignalProxy(Func, Task> send, string signal, string hubName, string prefix, IList exclude) - { - Send = send; - Signal = signal; - HubName = hubName; - _prefix = prefix; - _exclude = exclude; - } - - protected Func, Task> Send { get; private set; } - protected string Signal { get; private set; } - protected string HubName { get; private set; } - - public override bool TryGetMember(GetMemberBinder binder, out object result) - { - result = null; - return false; - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "The compiler generates calls to invoke this")] - public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) - { - result = Invoke(binder.Name, args); - return true; - } - - public Task Invoke(string method, params object[] args) - { - var invocation = GetInvocationData(method, args); - - string signal = _prefix + HubName + "." + Signal; - - return Send(signal, invocation, _exclude); - } - - protected virtual ClientHubInvocation GetInvocationData(string method, object[] args) - { - return new ClientHubInvocation - { - Hub = HubName, - Method = method, - Args = args, - Target = Signal - }; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/StateChangeTracker.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/StateChangeTracker.cs deleted file mode 100644 index 5c7075e31..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/StateChangeTracker.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Linq; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - /// - /// A change tracking dictionary. - /// - public class StateChangeTracker - { - private readonly IDictionary _values; - // Keep track of everyting that changed since creation - private readonly IDictionary _oldValues = new Dictionary(StringComparer.OrdinalIgnoreCase); - - public StateChangeTracker() - { - _values = new Dictionary(StringComparer.OrdinalIgnoreCase); - } - - public StateChangeTracker(IDictionary values) - { - _values = values; - } - - public object this[string key] - { - get - { - object result; - _values.TryGetValue(key, out result); - return DynamicDictionary.Wrap(result); - } - set - { - if (!_oldValues.ContainsKey(key)) - { - object oldValue; - _values.TryGetValue(key, out oldValue); - _oldValues[key] = oldValue; - } - - _values[key] = value; - } - } - - [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "This might be expensive")] - public IDictionary GetChanges() - { - var changes = (from key in _oldValues.Keys - let oldValue = _oldValues[key] - let newValue = _values[key] - where !Object.Equals(oldValue, newValue) - select new - { - Key = key, - Value = newValue - }).ToDictionary(p => p.Key, p => p.Value); - - return changes.Count > 0 ? changes : null; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Hubs/StatefulSignalProxy.cs b/src/Microsoft.AspNet.SignalR.Core/Hubs/StatefulSignalProxy.cs deleted file mode 100644 index 8fbac0f32..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Hubs/StatefulSignalProxy.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Dynamic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Hubs -{ - public class StatefulSignalProxy : SignalProxy - { - private readonly StateChangeTracker _tracker; - - public StatefulSignalProxy(Func, Task> send, string signal, string hubName, string prefix, StateChangeTracker tracker) - : base(send, signal, prefix, hubName, ListHelper.Empty) - { - _tracker = tracker; - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "The compiler generates calls to invoke this")] - public override bool TrySetMember(SetMemberBinder binder, object value) - { - _tracker[binder.Name] = value; - return true; - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "The compiler generates calls to invoke this")] - public override bool TryGetMember(GetMemberBinder binder, out object result) - { - result = _tracker[binder.Name]; - return true; - } - - protected override ClientHubInvocation GetInvocationData(string method, object[] args) - { - return new ClientHubInvocation - { - Hub = HubName, - Method = method, - Args = args, - Target = Signal, - State = _tracker.GetChanges() - }; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/IConnection.cs b/src/Microsoft.AspNet.SignalR.Core/IConnection.cs deleted file mode 100644 index a6283c259..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/IConnection.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// A communication channel for a and its connections. - /// - public interface IConnection - { - /// - /// The main signal for this connection. This is the main signalr for a . - /// - string DefaultSignal { get; } - - /// - /// Sends a message to connections subscribed to the signal. - /// - /// The message to send. - /// A task that returns when the message has be sent. - Task Send(ConnectionMessage message); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/IConnectionGroupManager.cs b/src/Microsoft.AspNet.SignalR.Core/IConnectionGroupManager.cs deleted file mode 100644 index 93688901f..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/IConnectionGroupManager.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// Manages groups for a connection and allows sending messages to the group. - /// - public interface IConnectionGroupManager : IGroupManager - { - /// - /// Sends a value to the specified group. - /// - /// The name of the group. - /// The value to send. - /// The list of connection ids to exclude - /// A task that represents when send is complete. - Task Send(string groupName, object value, params string[] excludeConnectionIds); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/IDependencyResolver.cs b/src/Microsoft.AspNet.SignalR.Core/IDependencyResolver.cs deleted file mode 100644 index a897d2139..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/IDependencyResolver.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; - -namespace Microsoft.AspNet.SignalR -{ - public interface IDependencyResolver : IDisposable - { - object GetService(Type serviceType); - IEnumerable GetServices(Type serviceType); - void Register(Type serviceType, Func activator); - void Register(Type serviceType, IEnumerable> activators); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/IGroupManager.cs b/src/Microsoft.AspNet.SignalR.Core/IGroupManager.cs deleted file mode 100644 index 3b23e1bb6..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/IGroupManager.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// Manages groups for a connection. - /// - public interface IGroupManager - { - /// - /// Adds a connection to the specified group. - /// - /// The connection id to add to the group. - /// The name of the group - /// A task that represents the connection id being added to the group. - Task Add(string connectionId, string groupName); - - /// - /// Removes a connection from the specified group. - /// - /// The connection id to remove from the group. - /// The name of the group - /// A task that represents the connection id being removed from the group. - Task Remove(string connectionId, string groupName); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/IHubContext.cs b/src/Microsoft.AspNet.SignalR.Core/IHubContext.cs deleted file mode 100644 index db33cc64d..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/IHubContext.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using Microsoft.AspNet.SignalR.Hubs; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// Provides access to information about a . - /// - public interface IHubContext - { - /// - /// Encapsulates all information about a SignalR connection for an . - /// - IHubConnectionContext Clients { get; } - - /// - /// Gets the the hub. - /// - IGroupManager Groups { get; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/IPersistentConnectionContext.cs b/src/Microsoft.AspNet.SignalR.Core/IPersistentConnectionContext.cs deleted file mode 100644 index da291fa98..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/IPersistentConnectionContext.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR -{ - /// - /// Provides access to information about a . - /// - public interface IPersistentConnectionContext - { - /// - /// Gets the for the . - /// - IConnection Connection { get; } - - /// - /// Gets the for the . - /// - IConnectionGroupManager Groups { get; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/IRequest.cs b/src/Microsoft.AspNet.SignalR.Core/IRequest.cs deleted file mode 100644 index da5859f51..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/IRequest.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Security.Principal; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// Represents a SignalR request - /// - public interface IRequest - { - /// - /// Gets the url for this request. - /// - Uri Url { get; } - - /// - /// Gets the querystring for this request. - /// - NameValueCollection QueryString { get; } - - /// - /// Gets the headers for this request. - /// - NameValueCollection Headers { get; } - - /// - /// Gets the form for this request. - /// - NameValueCollection Form { get; } - - /// - /// Gets the cookies for this request. - /// - IDictionary Cookies { get; } - - /// - /// Gets security information for the current HTTP request. - /// - IPrincipal User { get; } - - /// - /// Gets state for the current HTTP request. - /// - IDictionary Items { get; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/AckHandler.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/AckHandler.cs deleted file mode 100644 index 18479ec4c..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/AckHandler.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Concurrent; -using System.Diagnostics.CodeAnalysis; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - public class AckHandler : IAckHandler, IDisposable - { - private readonly ConcurrentDictionary _acks = new ConcurrentDictionary(); - - // REVIEW: Consider making this pluggable - private readonly TimeSpan _ackThreshold; - - // REVIEW: Consider moving this logic to the transport heartbeat - private Timer _timer; - - public AckHandler() - : this(completeAcksOnTimeout: true, - ackThreshold: TimeSpan.FromSeconds(30), - ackInterval: TimeSpan.FromSeconds(5)) - { - } - - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Acks", Justification = "Ack is a well known term")] - public AckHandler(bool completeAcksOnTimeout, TimeSpan ackThreshold, TimeSpan ackInterval) - { - if (completeAcksOnTimeout) - { - _timer = new Timer(_ => CheckAcks(), state: null, dueTime: ackInterval, period: ackInterval); - } - - _ackThreshold = ackThreshold; - } - - public Task CreateAck(string id) - { - return _acks.GetOrAdd(id, _ => new AckInfo()).Tcs.Task; - } - - public bool TriggerAck(string id) - { - AckInfo info; - if (_acks.TryRemove(id, out info)) - { - info.Tcs.TrySetResult(null); - return true; - } - - return false; - } - - private void CheckAcks() - { - foreach (var pair in _acks) - { - TimeSpan elapsed = DateTime.UtcNow - pair.Value.Created; - if (elapsed > _ackThreshold) - { - AckInfo info; - if (_acks.TryRemove(pair.Key, out info)) - { - // If we have a pending ack for longer than the threshold - // cancel it. - info.Tcs.TrySetCanceled(); - } - } - } - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - if (_timer != null) - { - _timer.Dispose(); - } - - // Trip all pending acks - foreach (var pair in _acks) - { - AckInfo info; - if (_acks.TryRemove(pair.Key, out info)) - { - info.Tcs.TrySetCanceled(); - } - } - } - } - - public void Dispose() - { - Dispose(true); - } - - private class AckInfo - { - public TaskCompletionSource Tcs { get; private set; } - public DateTime Created { get; private set; } - - public AckInfo() - { - Tcs = new TaskCompletionSource(); - Created = DateTime.UtcNow; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ArraySegmentTextReader.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ArraySegmentTextReader.cs deleted file mode 100644 index 08dfb1f97..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ArraySegmentTextReader.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.IO; -using System.Text; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - public class ArraySegmentTextReader : TextReader - { - private readonly ArraySegment _buffer; - private readonly Encoding _encoding; - private int _offset; - - public ArraySegmentTextReader(ArraySegment buffer, Encoding encoding) - { - _buffer = buffer; - _encoding = encoding; - _offset = _buffer.Offset; - } - - public override int Read(char[] buffer, int index, int count) - { - int bytesCount = _encoding.GetByteCount(buffer, index, count); - int bytesToRead = Math.Min(_buffer.Count - _offset, bytesCount); - - int read = _encoding.GetChars(_buffer.Array, _offset, bytesToRead, buffer, index); - _offset += bytesToRead; - - return read; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/BinaryTextWriter.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/BinaryTextWriter.cs deleted file mode 100644 index a5f958b47..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/BinaryTextWriter.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using Microsoft.AspNet.SignalR.Hosting; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// A buffering text writer that supports writing binary directly as well - /// - internal unsafe class BinaryTextWriter : BufferTextWriter, IBinaryWriter - { - public BinaryTextWriter(IResponse response) : - base((data, state) => ((IResponse)state).Write(data), response, reuseBuffers: true, bufferSize: 128) - { - - } - - public BinaryTextWriter(IWebSocket socket) : - base((data, state) => ((IWebSocket)state).SendChunk(data), socket, reuseBuffers: false, bufferSize: 1024) - { - - } - - - public BinaryTextWriter(Action, object> write, object state, bool reuseBuffers, int bufferSize) : - base(write, state, reuseBuffers, bufferSize) - { - } - - public void Write(ArraySegment data) - { - Writer.Write(data); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/BufferTextWriter.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/BufferTextWriter.cs deleted file mode 100644 index 6334f3533..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/BufferTextWriter.cs +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Text; -using Microsoft.AspNet.SignalR.Hosting; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// TextWriter implementation over a write delegate optimized for writing in small chunks - /// we don't need to write to a long lived buffer. This saves massive amounts of memory - /// as the number of connections grows. - /// - internal abstract unsafe class BufferTextWriter : TextWriter - { - private readonly Encoding _encoding; - - private readonly Action, object> _write; - private readonly object _writeState; - private readonly bool _reuseBuffers; - - private ChunkedWriter _writer; - private int _bufferSize; - - public BufferTextWriter(IResponse response) : - this((data, state) => ((IResponse)state).Write(data), response, reuseBuffers: true, bufferSize: 128) - { - - } - - public BufferTextWriter(IWebSocket socket) : - this((data, state) => ((IWebSocket)state).SendChunk(data), socket, reuseBuffers: false, bufferSize: 1024 * 4) - { - - } - - [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.IO.TextWriter.#ctor", Justification = "It won't be used")] - protected BufferTextWriter(Action, object> write, object state, bool reuseBuffers, int bufferSize) - { - _write = write; - _writeState = state; - _encoding = new UTF8Encoding(); - _reuseBuffers = reuseBuffers; - _bufferSize = bufferSize; - } - - protected internal ChunkedWriter Writer - { - get - { - if (_writer == null) - { - _writer = new ChunkedWriter(_write, _writeState, _bufferSize, _encoding, _reuseBuffers); - } - - return _writer; - } - } - - public override Encoding Encoding - { - get { return _encoding; } - } - - public override void Write(string value) - { - Writer.Write(value); - } - - public override void WriteLine(string value) - { - Writer.Write(value); - } - - public override void Write(char value) - { - Writer.Write(value); - } - - public override void Flush() - { - Writer.Flush(); - } - - internal class ChunkedWriter - { - private int _charPos; - private int _charLen; - - private readonly Encoder _encoder; - private readonly char[] _charBuffer; - private readonly byte[] _byteBuffer; - private readonly Action, object> _write; - private readonly object _writeState; - - public ChunkedWriter(Action, object> write, object state, int chunkSize, Encoding encoding, bool reuseBuffers) - { - _charLen = chunkSize; - _charBuffer = new char[chunkSize]; - _write = write; - _writeState = state; - _encoder = encoding.GetEncoder(); - - if (reuseBuffers) - { - _byteBuffer = new byte[encoding.GetMaxByteCount(chunkSize)]; - } - } - - public void Write(char value) - { - if (_charPos == _charLen) - { - Flush(flushEncoder: false); - } - - _charBuffer[_charPos++] = value; - } - - public void Write(string value) - { - int length = value.Length; - int sourceIndex = 0; - - while (length > 0) - { - if (_charPos == _charLen) - { - Flush(flushEncoder: false); - } - - int count = _charLen - _charPos; - if (count > length) - { - count = length; - } - - value.CopyTo(sourceIndex, _charBuffer, _charPos, count); - _charPos += count; - sourceIndex += count; - length -= count; - } - } - - public void Write(ArraySegment data) - { - Flush(); - _write(data, _writeState); - } - - public void Flush() - { - Flush(flushEncoder: true); - } - - private void Flush(bool flushEncoder) - { - // If it's safe to reuse the buffer then do so - if (_byteBuffer != null) - { - Flush(_byteBuffer, flushEncoder); - } - else - { - // Allocate a byte array of the right size for this char buffer - int byteCount = _encoder.GetByteCount(_charBuffer, 0, _charPos, flush: false); - var byteBuffer = new byte[byteCount]; - Flush(byteBuffer, flushEncoder); - } - } - - private void Flush(byte[] byteBuffer, bool flushEncoder) - { - int count = _encoder.GetBytes(_charBuffer, 0, _charPos, byteBuffer, 0, flush: flushEncoder); - - _charPos = 0; - - if (count > 0) - { - _write(new ArraySegment(byteBuffer, 0, count), _writeState); - } - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/CancellationTokenExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/CancellationTokenExtensions.cs deleted file mode 100644 index dff2ecc46..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/CancellationTokenExtensions.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal static class CancellationTokenExtensions - { - public static IDisposable SafeRegister(this CancellationToken cancellationToken, Action callback, object state) - { - var callbackWrapper = new CancellationCallbackWrapper(callback, state); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - CancellationTokenRegistration registration = cancellationToken.Register(s => Cancel(s), - callbackWrapper, - useSynchronizationContext: false); - - var disposeCancellationState = new DiposeCancellationState(callbackWrapper, registration); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return new DisposableAction(s => Dispose(s), disposeCancellationState); - } - - private static void Cancel(object state) - { - ((CancellationCallbackWrapper)state).TryInvoke(); - } - - private static void Dispose(object state) - { - ((DiposeCancellationState)state).TryDispose(); - } - - private class DiposeCancellationState - { - private readonly CancellationCallbackWrapper _callbackWrapper; - private readonly CancellationTokenRegistration _registration; - - public DiposeCancellationState(CancellationCallbackWrapper callbackWrapper, CancellationTokenRegistration registration) - { - _callbackWrapper = callbackWrapper; - _registration = registration; - } - - public void TryDispose() - { - // This normally waits until the callback is finished invoked but we don't care - if (_callbackWrapper.TrySetInvoked()) - { - try - { - _registration.Dispose(); - } - catch (ObjectDisposedException) - { - // Bug #1549, .NET 4.0 has a bug where this throws if the CTS is disposed. - } - } - } - } - - private class CancellationCallbackWrapper - { - private readonly Action _callback; - private readonly object _state; - private int _callbackInvoked; - - public CancellationCallbackWrapper(Action callback, object state) - { - _callback = callback; - _state = state; - } - - public bool TrySetInvoked() - { - return Interlocked.Exchange(ref _callbackInvoked, 1) == 0; - } - - public void TryInvoke() - { - if (TrySetInvoked()) - { - _callback(_state); - } - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Connection.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Connection.cs deleted file mode 100644 index a938c87f0..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Connection.cs +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Linq; -using System.Runtime.Serialization; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Json; -using Microsoft.AspNet.SignalR.Messaging; -using Microsoft.AspNet.SignalR.Tracing; -using Microsoft.AspNet.SignalR.Transports; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - public class Connection : IConnection, ITransportConnection, ISubscriber - { - private readonly IMessageBus _bus; - private readonly IJsonSerializer _serializer; - private readonly string _baseSignal; - private readonly string _connectionId; - private readonly IList _signals; - private readonly DiffSet _groups; - private readonly IPerformanceCounterManager _counters; - - private bool _disconnected; - private bool _aborted; - private readonly TraceSource _traceSource; - private readonly IAckHandler _ackHandler; - private readonly IProtectedData _protectedData; - - public Connection(IMessageBus newMessageBus, - IJsonSerializer jsonSerializer, - string baseSignal, - string connectionId, - IList signals, - IList groups, - ITraceManager traceManager, - IAckHandler ackHandler, - IPerformanceCounterManager performanceCounterManager, - IProtectedData protectedData) - { - if (traceManager == null) - { - throw new ArgumentNullException("traceManager"); - } - - _bus = newMessageBus; - _serializer = jsonSerializer; - _baseSignal = baseSignal; - _connectionId = connectionId; - _signals = new List(signals.Concat(groups)); - _groups = new DiffSet(groups); - _traceSource = traceManager["SignalR.Connection"]; - _ackHandler = ackHandler; - _counters = performanceCounterManager; - _protectedData = protectedData; - } - - public string DefaultSignal - { - get - { - return _baseSignal; - } - } - - IList ISubscriber.EventKeys - { - get - { - return _signals; - } - } - - public event Action EventKeyAdded; - - public event Action EventKeyRemoved; - - public Action WriteCursor { get; set; } - - public string Identity - { - get - { - return _connectionId; - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Used for debugging purposes.")] - private TraceSource Trace - { - get - { - return _traceSource; - } - } - - public Subscription Subscription - { - get; - set; - } - - public Task Send(ConnectionMessage message) - { - Message busMessage = CreateMessage(message.Signal, message.Value); - - if (message.ExcludedSignals != null) - { - busMessage.Filter = String.Join("|", message.ExcludedSignals); - } - - if (busMessage.WaitForAck) - { - Task ackTask = _ackHandler.CreateAck(busMessage.CommandId); - return _bus.Publish(busMessage).Then(task => task, ackTask); - } - - return _bus.Publish(busMessage); - } - - private Message CreateMessage(string key, object value) - { - var command = value as Command; - - ArraySegment messageBuffer = GetMessageBuffer(value); - - var message = new Message(_connectionId, key, messageBuffer); - - if (command != null) - { - // Set the command id - message.CommandId = command.Id; - message.WaitForAck = command.WaitForAck; - } - - return message; - } - - private ArraySegment GetMessageBuffer(object value) - { - using (var stream = new MemoryStream(128)) - { - var bufferWriter = new BinaryTextWriter((buffer, state) => - { - ((MemoryStream)state).Write(buffer.Array, buffer.Offset, buffer.Count); - }, - stream, - reuseBuffers: true, - bufferSize: 1024); - - using (bufferWriter) - { - _serializer.Serialize(value, bufferWriter); - bufferWriter.Flush(); - - return new ArraySegment(stream.ToArray()); - } - } - } - - public IDisposable Receive(string messageId, Func> callback, int maxMessages, object state) - { - var receiveContext = new ReceiveContext(this, callback, state); - - return _bus.Subscribe(this, - messageId, - (result, s) => MessageBusCallback(result, s), - maxMessages, - receiveContext); - } - - private static Task MessageBusCallback(MessageResult result, object state) - { - var context = (ReceiveContext)state; - - return context.InvokeCallback(result); - } - - private PersistentResponse GetResponse(MessageResult result) - { - // Do a single sweep through the results to process commands and extract values - ProcessResults(result); - - Debug.Assert(WriteCursor != null, "Unable to resolve the cursor since the method is null"); - - var response = new PersistentResponse(ExcludeMessage, WriteCursor); - response.Terminal = result.Terminal; - - if (!result.Terminal) - { - // Only set these properties if the message isn't terminal - response.Messages = result.Messages; - response.Disconnect = _disconnected; - response.Aborted = _aborted; - response.TotalCount = result.TotalCount; - } - - PopulateResponseState(response); - - _counters.ConnectionMessagesReceivedTotal.IncrementBy(result.TotalCount); - _counters.ConnectionMessagesReceivedPerSec.IncrementBy(result.TotalCount); - - return response; - } - - private bool ExcludeMessage(Message message) - { - if (String.IsNullOrEmpty(message.Filter)) - { - return false; - } - - string[] exclude = message.Filter.Split('|'); - - return exclude.Any(signal => Identity.Equals(signal, StringComparison.OrdinalIgnoreCase) || - _signals.Contains(signal) || - _groups.Contains(signal)); - } - - private void ProcessResults(MessageResult result) - { - result.Messages.Enumerate(message => message.IsAck || message.IsCommand, - (state, message) => - { - if (message.IsAck) - { - _ackHandler.TriggerAck(message.CommandId); - } - else if (message.IsCommand) - { - var command = _serializer.Parse(message.Value, message.Encoding); - - if (command == null) - { - if (MonoUtility.IsRunningMono) - { - return; - } - - throw new SerializationException("Couldn't parse message " + message.Value); - } - - ProcessCommand(command); - - // Only send the ack if this command is waiting for it - if (message.WaitForAck) - { - // If we're on the same box and there's a pending ack for this command then - // just trip it - if (!_ackHandler.TriggerAck(message.CommandId)) - { - _bus.Ack(_connectionId, message.CommandId).Catch(); - } - } - } - }, null); - } - - private void ProcessCommand(Command command) - { - switch (command.CommandType) - { - case CommandType.AddToGroup: - { - var name = command.Value; - - if (EventKeyAdded != null) - { - _groups.Add(name); - EventKeyAdded(this, name); - } - } - break; - case CommandType.RemoveFromGroup: - { - var name = command.Value; - - if (EventKeyRemoved != null) - { - _groups.Remove(name); - EventKeyRemoved(this, name); - } - } - break; - case CommandType.Disconnect: - _disconnected = true; - break; - case CommandType.Abort: - _aborted = true; - break; - } - } - - private void PopulateResponseState(PersistentResponse response) - { - PopulateResponseState(response, _groups, _serializer, _protectedData, _connectionId); - } - - internal static void PopulateResponseState(PersistentResponse response, - DiffSet groupSet, - IJsonSerializer serializer, - IProtectedData protectedData, - string connectionId) - { - bool anyChanges = groupSet.DetectChanges(); - - if (anyChanges) - { - // Create a protected payload of the sorted list - IEnumerable groups = groupSet.GetSnapshot(); - - // Remove group prefixes before any thing goes over the wire - string groupsString = connectionId + ':' + serializer.Stringify(PrefixHelper.RemoveGroupPrefixes(groups)); ; - - // The groups token - response.GroupsToken = protectedData.Protect(groupsString, Purposes.Groups); - } - } - - private class ReceiveContext - { - private readonly Connection _connection; - private readonly Func> _callback; - private readonly object _callbackState; - - public ReceiveContext(Connection connection, Func> callback, object callbackState) - { - _connection = connection; - _callback = callback; - _callbackState = callbackState; - } - - public Task InvokeCallback(MessageResult result) - { - var response = _connection.GetResponse(result); - - return _callback(response, _callbackState); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ConnectionManager.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ConnectionManager.cs deleted file mode 100644 index 9f74ff10e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ConnectionManager.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hubs; -using Microsoft.AspNet.SignalR.Json; -using Microsoft.AspNet.SignalR.Messaging; -using Microsoft.AspNet.SignalR.Tracing; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Default implementation. - /// - public class ConnectionManager : IConnectionManager - { - private readonly IDependencyResolver _resolver; - private readonly IPerformanceCounterManager _counters; - - /// - /// Initializes a new instance of the class. - /// - /// The . - public ConnectionManager(IDependencyResolver resolver) - { - _resolver = resolver; - _counters = _resolver.Resolve(); - } - - /// - /// Returns a for the . - /// - /// Type of the - /// A for the . - public IPersistentConnectionContext GetConnectionContext() where T : PersistentConnection - { - return GetConnection(typeof(T)); - } - - /// - /// Returns a for the . - /// - /// Type of the - /// A for the . - public IPersistentConnectionContext GetConnection(Type type) - { - if (type == null) - { - throw new ArgumentNullException("type"); - } - - string rawConnectionName = type.FullName; - string connectionName = PrefixHelper.GetPersistentConnectionName(rawConnectionName); - IConnection connection = GetConnectionCore(connectionName); - - return new PersistentConnectionContext(connection, new GroupManager(connection, PrefixHelper.GetPersistentConnectionGroupName(rawConnectionName))); - } - - /// - /// Returns a for the specified . - /// - /// Type of the - /// a for the specified - public IHubContext GetHubContext() where T : IHub - { - return GetHubContext(typeof(T).GetHubName()); - } - - /// - /// Returns a for the specified hub. - /// - /// Name of the hub - /// a for the specified hub - public IHubContext GetHubContext(string hubName) - { - var connection = GetConnectionCore(connectionName: null); - var hubManager = _resolver.Resolve(); - var pipelineInvoker = _resolver.Resolve(); - - hubManager.EnsureHub(hubName, - _counters.ErrorsHubResolutionTotal, - _counters.ErrorsHubResolutionPerSec, - _counters.ErrorsAllTotal, - _counters.ErrorsAllPerSec); - - Func, Task> send = (signal, value, exclude) => pipelineInvoker.Send(new HubOutgoingInvokerContext(connection, signal, value, exclude)); - - return new HubContext(send, hubName, connection); - } - - internal Connection GetConnectionCore(string connectionName) - { - IList signals = connectionName == null ? ListHelper.Empty : new[] { connectionName }; - - // Give this a unique id - var connectionId = Guid.NewGuid().ToString(); - return new Connection(_resolver.Resolve(), - _resolver.Resolve(), - connectionName, - connectionId, - signals, - ListHelper.Empty, - _resolver.Resolve(), - _resolver.Resolve(), - _resolver.Resolve(), - _resolver.Resolve()); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DefaultProtectedData.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DefaultProtectedData.cs deleted file mode 100644 index 686f33abf..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DefaultProtectedData.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Security.Cryptography; -using System.Text; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - public class DefaultProtectedData : IProtectedData - { - private static readonly UTF8Encoding _encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); - - public string Protect(string data, string purpose) - { - byte[] purposeBytes = _encoding.GetBytes(purpose); - - byte[] unprotectedBytes = _encoding.GetBytes(data); - - byte[] protectedBytes = ProtectedData.Protect(unprotectedBytes, purposeBytes, DataProtectionScope.CurrentUser); - - return Convert.ToBase64String(protectedBytes); - } - - public string Unprotect(string protectedValue, string purpose) - { - byte[] purposeBytes = _encoding.GetBytes(purpose); - - byte[] protectedBytes = Convert.FromBase64String(protectedValue); - - byte[] unprotectedBytes = ProtectedData.Unprotect(protectedBytes, purposeBytes, DataProtectionScope.CurrentUser); - - return _encoding.GetString(unprotectedBytes); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DiffPair.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DiffPair.cs deleted file mode 100644 index f7a92b81e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DiffPair.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal struct DiffPair - { - public ICollection Added; - public ICollection Removed; - - public bool AnyChanges - { - get - { - return Added.Count > 0 || Removed.Count > 0; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DiffSet.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DiffSet.cs deleted file mode 100644 index 0d322bf13..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DiffSet.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal class DiffSet - { - private readonly HashSet _items; - private readonly HashSet _addedItems; - private readonly HashSet _removedItems; - - public DiffSet(IEnumerable items) - { - _addedItems = new HashSet(); - _removedItems = new HashSet(); - - _items = new HashSet(items); - } - - public bool Add(T item) - { - if (_items.Add(item)) - { - if (!_removedItems.Remove(item)) - { - _addedItems.Add(item); - } - return true; - } - return false; - } - - public bool Remove(T item) - { - if (_items.Remove(item)) - { - if (!_addedItems.Remove(item)) - { - _removedItems.Add(item); - } - return true; - } - return false; - } - - public bool Contains(T item) - { - return _items.Contains(item); - } - - public ICollection GetSnapshot() - { - return _items; - } - - public bool DetectChanges() - { - bool anyChanges = _addedItems.Count > 0 || _removedItems.Count > 0; - _addedItems.Clear(); - _removedItems.Clear(); - return anyChanges; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DisposableAction.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DisposableAction.cs deleted file mode 100644 index ab336d604..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/DisposableAction.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading; -using System.Diagnostics.CodeAnalysis; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal class DisposableAction : IDisposable - { - [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "The client projects use this.")] - public static readonly DisposableAction Empty = new DisposableAction(() => { }); - - private Action _action; - private readonly object _state; - - public DisposableAction(Action action) - : this(state => ((Action)state).Invoke(), state: action) - { - - } - - public DisposableAction(Action action, object state) - { - _action = action; - _state = state; - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - Interlocked.Exchange(ref _action, (state) => { }).Invoke(_state); - } - } - - public void Dispose() - { - Dispose(true); - } - } - -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Disposer.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Disposer.cs deleted file mode 100644 index ab0155acd..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Disposer.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Helper class to manage disposing a resource at an arbirtary time - /// - internal class Disposer : IDisposable - { - private static readonly object _disposedSentinel = new object(); - - private object _disposable; - - public void Set(IDisposable disposable) - { - if (disposable == null) - { - throw new ArgumentNullException("disposable"); - } - - object originalFieldValue = Interlocked.CompareExchange(ref _disposable, disposable, null); - if (originalFieldValue == null) - { - // this is the first call to Set() and Dispose() hasn't yet been called; do nothing - } - else if (originalFieldValue == _disposedSentinel) - { - // Dispose() has already been called, so we need to dispose of the object that was just added - disposable.Dispose(); - } - else - { -#if !NET35 && !SILVERLIGHT && !NETFX_CORE - // Set has been called multiple times, fail - Debug.Fail("Multiple calls to Disposer.Set(IDisposable) without calling Disposer.Dispose()"); -#endif - } - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - var disposable = Interlocked.Exchange(ref _disposable, _disposedSentinel) as IDisposable; - if (disposable != null) - { - disposable.Dispose(); - } - } - } - - public void Dispose() - { - Dispose(true); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ExceptionsExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ExceptionsExtensions.cs deleted file mode 100644 index 5545f2f81..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ExceptionsExtensions.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal static class ExceptionsExtensions - { - internal static Exception Unwrap(this Exception ex) - { - if (ex == null) - { - return null; - } - - var next = ex.GetBaseException(); - while (next.InnerException != null) - { - // On mono GetBaseException() doesn't seem to do anything - // so just walk the inner exception chain. - next = next.InnerException; - } - - return next; - } - } -} - diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IAckHandler.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IAckHandler.cs deleted file mode 100644 index 977b2385f..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IAckHandler.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - public interface IAckHandler - { - Task CreateAck(string id); - - bool TriggerAck(string id); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IBinaryWriter.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IBinaryWriter.cs deleted file mode 100644 index 06be2531d..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IBinaryWriter.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Implemented on anything that has the ability to write raw binary data - /// - public interface IBinaryWriter - { - void Write(ArraySegment data); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IConnectionManager.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IConnectionManager.cs deleted file mode 100644 index bd783d12e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IConnectionManager.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Diagnostics.CodeAnalysis; -using Microsoft.AspNet.SignalR.Hubs; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Provides access to hubs and persistent connections references. - /// - public interface IConnectionManager - { - /// - /// Returns a for the specified . - /// - /// Type of the - /// a for the specified - [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "The hub type needs to be specified")] - IHubContext GetHubContext() where T : IHub; - - /// - /// Returns a for the specified hub. - /// - /// Name of the hub - /// a for the specified hub - IHubContext GetHubContext(string hubName); - - /// - /// Returns a for the . - /// - /// Type of the - /// A for the . - [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "The connection type needs to be specified")] - IPersistentConnectionContext GetConnectionContext() where T : PersistentConnection; - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IPerformanceCounter.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IPerformanceCounter.cs deleted file mode 100644 index 3f90659e4..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IPerformanceCounter.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Diagnostics; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - public interface IPerformanceCounter - { - string CounterName { get; } - long Decrement(); - long Increment(); - long IncrementBy(long value); - CounterSample NextSample(); - long RawValue { get; set; } - void Close(); - void RemoveInstance(); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IPerformanceCounterManager.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IPerformanceCounterManager.cs deleted file mode 100644 index c2d6b73e9..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IPerformanceCounterManager.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Provides access to performance counters. - /// - public interface IPerformanceCounterManager - { - /// - /// Initializes the performance counters. - /// - /// The host instance name. - /// The CancellationToken representing the host shutdown. - void Initialize(string instanceName, CancellationToken hostShutdownToken); - - /// - /// Loads a performance counter. - /// - /// The category name. - /// The counter name. - /// The instance name. - /// Whether the counter is read-only. - IPerformanceCounter LoadCounter(string categoryName, string counterName, string instanceName, bool isReadOnly); - - /// - /// Gets the performance counter representing the total number of connection Connect events since the application was started. - /// - IPerformanceCounter ConnectionsConnected { get; } - - /// - /// Gets the performance counter representing the total number of connection Reconnect events since the application was started. - /// - IPerformanceCounter ConnectionsReconnected { get; } - - /// - /// Gets the performance counter representing the total number of connection Disconnect events since the application was started. - /// - IPerformanceCounter ConnectionsDisconnected { get; } - - /// - /// Gets the performance counter representing the number of connections currently connected. - /// - IPerformanceCounter ConnectionsCurrent { get; } - - /// - /// Gets the performance counter representing the total number of messages received by connections (server to client) since the application was started. - /// - IPerformanceCounter ConnectionMessagesReceivedTotal { get; } - - /// - /// Gets the performance counter representing the total number of messages received by connections (server to client) since the application was started. - /// - IPerformanceCounter ConnectionMessagesSentTotal { get; } - - /// - /// Gets the performance counter representing the number of messages received by connections (server to client) per second. - /// - IPerformanceCounter ConnectionMessagesReceivedPerSec { get; } - - /// - /// Gets the performance counter representing the number of messages sent by connections (client to server) per second. - /// - IPerformanceCounter ConnectionMessagesSentPerSec { get; } - - /// - /// Gets the performance counter representing the total number of messages received by subscribers since the application was started. - /// - IPerformanceCounter MessageBusMessagesReceivedTotal { get; } - - /// - /// Gets the performance counter representing the number of messages received by a subscribers per second. - /// - IPerformanceCounter MessageBusMessagesReceivedPerSec { get; } - - /// - /// Gets the performance counter representing the number of messages received by the scaleout message bus per second. - /// - IPerformanceCounter ScaleoutMessageBusMessagesReceivedPerSec { get; } - - /// - /// Gets the performance counter representing the total number of messages published to the message bus since the application was started. - /// - IPerformanceCounter MessageBusMessagesPublishedTotal { get; } - - /// - /// Gets the performance counter representing the number of messages published to the message bus per second. - /// - IPerformanceCounter MessageBusMessagesPublishedPerSec { get; } - - /// - /// Gets the performance counter representing the current number of subscribers to the message bus. - /// - IPerformanceCounter MessageBusSubscribersCurrent { get; } - - /// - /// Gets the performance counter representing the total number of subscribers to the message bus since the application was started. - /// - IPerformanceCounter MessageBusSubscribersTotal { get; } - - /// - /// Gets the performance counter representing the number of new subscribers to the message bus per second. - /// - IPerformanceCounter MessageBusSubscribersPerSec { get; } - - /// - /// Gets the performance counter representing the number of workers allocated to deliver messages in the message bus. - /// - IPerformanceCounter MessageBusAllocatedWorkers { get; } - - /// - /// Gets the performance counter representing the number of workers currently busy delivering messages in the message bus. - /// - IPerformanceCounter MessageBusBusyWorkers { get; } - - /// - /// Gets the performance counter representing representing the current number of topics in the message bus. - /// - IPerformanceCounter MessageBusTopicsCurrent { get; } - - /// - /// Gets the performance counter representing the total number of all errors processed since the application was started. - /// - IPerformanceCounter ErrorsAllTotal { get; } - - /// - /// Gets the performance counter representing the number of all errors processed per second. - /// - IPerformanceCounter ErrorsAllPerSec { get; } - - /// - /// Gets the performance counter representing the total number of hub resolution errors processed since the application was started. - /// - IPerformanceCounter ErrorsHubResolutionTotal { get; } - - /// - /// Gets the performance counter representing the number of hub resolution errors per second. - /// - IPerformanceCounter ErrorsHubResolutionPerSec { get; } - - /// - /// Gets the performance counter representing the total number of hub invocation errors processed since the application was started. - /// - IPerformanceCounter ErrorsHubInvocationTotal { get; } - - /// - /// Gets the performance counter representing the number of hub invocation errors per second. - /// - IPerformanceCounter ErrorsHubInvocationPerSec { get; } - - /// - /// Gets the performance counter representing the total number of transport errors processed since the application was started. - /// - IPerformanceCounter ErrorsTransportTotal { get; } - - /// - /// Gets the performance counter representing the number of transport errors per second. - /// - IPerformanceCounter ErrorsTransportPerSec { get; } - - /// - /// Gets the performance counter representing the number of logical streams in the currently configured scaleout message bus provider. - /// - IPerformanceCounter ScaleoutStreamCountTotal { get; } - - /// - /// Gets the performance counter representing the number of logical streams in the currently configured scaleout message bus provider that are in the open state. - /// - IPerformanceCounter ScaleoutStreamCountOpen { get; } - - /// - /// Gets the performance counter representing the number of logical streams in the currently configured scaleout message bus provider that are in the buffering state. - /// - IPerformanceCounter ScaleoutStreamCountBuffering { get; } - - /// - /// Gets the performance counter representing the total number of scaleout errors since the application was started. - /// - IPerformanceCounter ScaleoutErrorsTotal { get; } - - /// - /// Gets the performance counter representing the number of scaleout errors per second. - /// - IPerformanceCounter ScaleoutErrorsPerSec { get; } - - /// - /// Gets the performance counter representing the current scaleout send queue length. - /// - IPerformanceCounter ScaleoutSendQueueLength { get; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IProtectedData.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IProtectedData.cs deleted file mode 100644 index 8f46d2145..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IProtectedData.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - public interface IProtectedData - { - string Protect(string data, string purpose); - string Unprotect(string protectedValue, string purpose); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IServerCommandHandler.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IServerCommandHandler.cs deleted file mode 100644 index 9db7f16fc..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IServerCommandHandler.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Handles commands from server to server. - /// - internal interface IServerCommandHandler - { - /// - /// Sends a command to all connected servers. - /// - /// - /// - Task SendCommand(ServerCommand command); - - /// - /// Gets or sets a callback that is invoked when a command is received. - /// - Action Command { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IServerIdManager.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IServerIdManager.cs deleted file mode 100644 index a7637b70a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IServerIdManager.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Generates a server id - /// - public interface IServerIdManager - { - /// - /// The id of the server. - /// - string ServerId { get; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IStringMinifier.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IStringMinifier.cs deleted file mode 100644 index 6ff5a7941..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/IStringMinifier.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - public interface IStringMinifier - { - /// - /// Minifies a string in a way that can be reversed by this instance of . - /// - /// The string to be minified - /// A minified representation of the without the following characters:,|\ - string Minify(string value); - - /// - /// Reverses a call that was executed at least once previously on this instance of - /// without any subsequent calls to sharing the - /// same argument as the call that returned . - /// - /// - /// A minified string that was returned by a previous call to . - /// - /// - /// The argument of all previous calls to that returned . - /// If every call to on this instance of has never - /// returned or if the most recent call to that did - /// return was followed by a call to sharing - /// the same argument, may return null but must not throw. - /// - string Unminify(string value); - - /// - /// A call to this function indicates that any future attempt to unminify strings that were previously minified - /// from may be met with a null return value. This provides an opportunity clean up - /// any internal data structures that reference . - /// - /// The string that may have previously have been minified. - void RemoveUnminified(string value); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/InterlockedHelper.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/InterlockedHelper.cs deleted file mode 100644 index 3f4044dd7..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/InterlockedHelper.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - - public static class InterlockedHelper - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "0#", Justification="This is an interlocked helper...")] - public static bool CompareExchangeOr(ref int location, int value, int comparandA, int comparandB) - { - return Interlocked.CompareExchange(ref location, value, comparandA) == comparandA || - Interlocked.CompareExchange(ref location, value, comparandB) == comparandB; - } - } - -} \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ListHelper.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ListHelper.cs deleted file mode 100644 index 12e8b8dce..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ListHelper.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Collections.ObjectModel; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal class ListHelper - { - public static readonly IList Empty = new ReadOnlyCollection(new List()); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/MonoUtility.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/MonoUtility.cs deleted file mode 100644 index ea1d80127..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/MonoUtility.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Diagnostics.CodeAnalysis; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal static class MonoUtility - { - private static readonly Lazy _isRunningMono = new Lazy(() => CheckRunningOnMono()); - - internal static bool IsRunningMono - { - get - { - return _isRunningMono.Value; - } - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "This should never fail")] - private static bool CheckRunningOnMono() - { - try - { - return Type.GetType("Mono.Runtime") != null; - } - catch - { - return false; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterAttribute.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterAttribute.cs deleted file mode 100644 index 7a2cb0682..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterAttribute.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - [AttributeUsage(AttributeTargets.Property, AllowMultiple=false)] - internal sealed class PerformanceCounterAttribute : Attribute - { - public string Name { get; set; } - public string Description { get; set; } - public PerformanceCounterType CounterType { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterManager.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterManager.cs deleted file mode 100644 index 11b9a3577..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterManager.cs +++ /dev/null @@ -1,418 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Reflection; -using System.Threading; -#if !UTILS -using Microsoft.AspNet.SignalR.Tracing; -#endif - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Manages performance counters using Windows performance counters. - /// - public class PerformanceCounterManager : IPerformanceCounterManager - { - /// - /// The performance counter category name for SignalR counters. - /// - public const string CategoryName = "SignalR"; - - private readonly static PropertyInfo[] _counterProperties = GetCounterPropertyInfo(); - private readonly static IPerformanceCounter _noOpCounter = new NoOpPerformanceCounter(); - private volatile bool _initialized; - private object _initLocker = new object(); - -#if !UTILS - private readonly TraceSource _trace; - - public PerformanceCounterManager(DefaultDependencyResolver resolver) - : this(resolver.Resolve()) - { - - } - - /// - /// Creates a new instance. - /// - public PerformanceCounterManager(ITraceManager traceManager) - : this() - { - if (traceManager == null) - { - throw new ArgumentNullException("traceManager"); - } - - _trace = traceManager["SignalR.PerformanceCounterManager"]; - } -#endif - - public PerformanceCounterManager() - { - InitNoOpCounters(); - } - - /// - /// Gets the performance counter representing the total number of connection Connect events since the application was started. - /// - [PerformanceCounter(Name = "Connections Connected", Description = "The total number of connection Connect events since the application was started.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ConnectionsConnected { get; private set; } - - /// - /// Gets the performance counter representing the total number of connection Reconnect events since the application was started. - /// - [PerformanceCounter(Name = "Connections Reconnected", Description = "The total number of connection Reconnect events since the application was started.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ConnectionsReconnected { get; private set; } - - /// - /// Gets the performance counter representing the total number of connection Disconnect events since the application was started. - /// - [PerformanceCounter(Name = "Connections Disconnected", Description = "The total number of connection Disconnect events since the application was started.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ConnectionsDisconnected { get; private set; } - - /// - /// Gets the performance counter representing the number of connections currently connected. - /// - [PerformanceCounter(Name = "Connections Current", Description = "The number of connections currently connected.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ConnectionsCurrent { get; private set; } - - /// - /// Gets the performance counter representing the toal number of messages received by connections (server to client) since the application was started. - /// - [PerformanceCounter(Name = "Connection Messages Received Total", Description = "The toal number of messages received by connections (server to client) since the application was started.", CounterType = PerformanceCounterType.NumberOfItems64)] - public IPerformanceCounter ConnectionMessagesReceivedTotal { get; private set; } - - /// - /// Gets the performance counter representing the total number of messages sent by connections (client to server) since the application was started. - /// - [PerformanceCounter(Name = "Connection Messages Sent Total", Description = "The total number of messages sent by connections (client to server) since the application was started.", CounterType = PerformanceCounterType.NumberOfItems64)] - public IPerformanceCounter ConnectionMessagesSentTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of messages received by connections (server to client) per second. - /// - [PerformanceCounter(Name = "Connection Messages Received/Sec", Description = "The number of messages received by connections (server to client) per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter ConnectionMessagesReceivedPerSec { get; private set; } - - /// - /// Gets the performance counter representing the number of messages sent by connections (client to server) per second. - /// - [PerformanceCounter(Name = "Connection Messages Sent/Sec", Description = "The number of messages sent by connections (client to server) per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter ConnectionMessagesSentPerSec { get; private set; } - - /// - /// Gets the performance counter representing the total number of messages received by subscribers since the application was started. - /// - [PerformanceCounter(Name = "Message Bus Messages Received Total", Description = "The total number of messages received by subscribers since the application was started.", CounterType = PerformanceCounterType.NumberOfItems64)] - public IPerformanceCounter MessageBusMessagesReceivedTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of messages received by a subscribers per second. - /// - [PerformanceCounter(Name = "Message Bus Messages Received/Sec", Description = "The number of messages received by subscribers per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter MessageBusMessagesReceivedPerSec { get; private set; } - - /// - /// Gets the performance counter representing the number of messages received by the scaleout message bus per second. - /// - [PerformanceCounter(Name = "Scaleout Message Bus Messages Received/Sec", Description = "The number of messages received by the scaleout message bus per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter ScaleoutMessageBusMessagesReceivedPerSec { get; private set; } - - - /// - /// Gets the performance counter representing the total number of messages published to the message bus since the application was started. - /// - [PerformanceCounter(Name = "Messages Bus Messages Published Total", Description = "The total number of messages published to the message bus since the application was started.", CounterType = PerformanceCounterType.NumberOfItems64)] - public IPerformanceCounter MessageBusMessagesPublishedTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of messages published to the message bus per second. - /// - [PerformanceCounter(Name = "Messages Bus Messages Published/Sec", Description = "The number of messages published to the message bus per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter MessageBusMessagesPublishedPerSec { get; private set; } - - /// - /// Gets the performance counter representing the current number of subscribers to the message bus. - /// - [PerformanceCounter(Name = "Message Bus Subscribers Current", Description = "The current number of subscribers to the message bus.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter MessageBusSubscribersCurrent { get; private set; } - - /// - /// Gets the performance counter representing the total number of subscribers to the message bus since the application was started. - /// - [PerformanceCounter(Name = "Message Bus Subscribers Total", Description = "The total number of subscribers to the message bus since the application was started.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter MessageBusSubscribersTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of new subscribers to the message bus per second. - /// - [PerformanceCounter(Name = "Message Bus Subscribers/Sec", Description = "The number of new subscribers to the message bus per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter MessageBusSubscribersPerSec { get; private set; } - - /// - /// Gets the performance counter representing the number of workers allocated to deliver messages in the message bus. - /// - [PerformanceCounter(Name = "Message Bus Allocated Workers", Description = "The number of workers allocated to deliver messages in the message bus.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter MessageBusAllocatedWorkers { get; private set; } - - /// - /// Gets the performance counter representing the number of workers currently busy delivering messages in the message bus. - /// - [PerformanceCounter(Name = "Message Bus Busy Workers", Description = "The number of workers currently busy delivering messages in the message bus.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter MessageBusBusyWorkers { get; private set; } - - /// - /// Gets the performance counter representing representing the current number of topics in the message bus. - /// - [PerformanceCounter(Name = "Message Bus Topics Current", Description = "The number of topics in the message bus.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter MessageBusTopicsCurrent { get; private set; } - - /// - /// Gets the performance counter representing the total number of all errors processed since the application was started. - /// - [PerformanceCounter(Name = "Errors: All Total", Description = "The total number of all errors processed since the application was started.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ErrorsAllTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of all errors processed per second. - /// - [PerformanceCounter(Name = "Errors: All/Sec", Description = "The number of all errors processed per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter ErrorsAllPerSec { get; private set; } - - /// - /// Gets the performance counter representing the total number of hub resolution errors processed since the application was started. - /// - [PerformanceCounter(Name = "Errors: Hub Resolution Total", Description = "The total number of hub resolution errors processed since the application was started.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ErrorsHubResolutionTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of hub resolution errors per second. - /// - [PerformanceCounter(Name = "Errors: Hub Resolution/Sec", Description = "The number of hub resolution errors per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter ErrorsHubResolutionPerSec { get; private set; } - - /// - /// Gets the performance counter representing the total number of hub invocation errors processed since the application was started. - /// - [PerformanceCounter(Name = "Errors: Hub Invocation Total", Description = "The total number of hub invocation errors processed since the application was started.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ErrorsHubInvocationTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of hub invocation errors per second. - /// - [PerformanceCounter(Name = "Errors: Hub Invocation/Sec", Description = "The number of hub invocation errors per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter ErrorsHubInvocationPerSec { get; private set; } - - /// - /// Gets the performance counter representing the total number of transport errors processed since the application was started. - /// - [PerformanceCounter(Name = "Errors: Tranport Total", Description = "The total number of transport errors processed since the application was started.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ErrorsTransportTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of transport errors per second. - /// - [PerformanceCounter(Name = "Errors: Transport/Sec", Description = "The number of transport errors per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter ErrorsTransportPerSec { get; private set; } - - - /// - /// Gets the performance counter representing the number of logical streams in the currently configured scaleout message bus provider. - /// - [PerformanceCounter(Name = "Scaleout Streams Total", Description = "The number of logical streams in the currently configured scaleout message bus provider.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ScaleoutStreamCountTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of logical streams in the currently configured scaleout message bus provider that are in the open state. - /// - [PerformanceCounter(Name = "Scaleout Streams Open", Description = "The number of logical streams in the currently configured scaleout message bus provider that are in the open state", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ScaleoutStreamCountOpen { get; private set; } - - /// - /// Gets the performance counter representing the number of logical streams in the currently configured scaleout message bus provider that are in the buffering state. - /// - [PerformanceCounter(Name = "Scaleout Streams Buffering", Description = "The number of logical streams in the currently configured scaleout message bus provider that are in the buffering state", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ScaleoutStreamCountBuffering { get; private set; } - - /// - /// Gets the performance counter representing the total number of scaleout errors since the application was started. - /// - [PerformanceCounter(Name = "Scaleout Errors Total", Description = "The total number of scaleout errors since the application was started.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ScaleoutErrorsTotal { get; private set; } - - /// - /// Gets the performance counter representing the number of scaleout errors per second. - /// - [PerformanceCounter(Name = "Scaleout Errors/Sec", Description = "The number of scaleout errors per second.", CounterType = PerformanceCounterType.RateOfCountsPerSecond32)] - public IPerformanceCounter ScaleoutErrorsPerSec { get; private set; } - - /// - /// Gets the performance counter representing the current scaleout send queue length. - /// - [PerformanceCounter(Name = "Scaleout Send Queue Length", Description = "The current scaleout send queue length.", CounterType = PerformanceCounterType.NumberOfItems32)] - public IPerformanceCounter ScaleoutSendQueueLength { get; private set; } - - /// - /// Initializes the performance counters. - /// - /// The host instance name. - /// The CancellationToken representing the host shutdown. - public void Initialize(string instanceName, CancellationToken hostShutdownToken) - { - if (_initialized) - { - return; - } - - var needToRegisterWithShutdownToken = false; - lock (_initLocker) - { - if (!_initialized) - { - instanceName = instanceName ?? Guid.NewGuid().ToString(); - SetCounterProperties(instanceName); - // The initializer ran, so let's register the shutdown cleanup - if (hostShutdownToken != CancellationToken.None) - { - needToRegisterWithShutdownToken = true; - } - _initialized = true; - } - } - - if (needToRegisterWithShutdownToken) - { - hostShutdownToken.Register(UnloadCounters); - } - } - - private void UnloadCounters() - { - lock (_initLocker) - { - if (!_initialized) - { - // We were never initalized - return; - } - } - - var counterProperties = this.GetType() - .GetProperties() - .Where(p => p.PropertyType == typeof(IPerformanceCounter)); - - foreach (var property in counterProperties) - { - var counter = property.GetValue(this, null) as IPerformanceCounter; - counter.Close(); - counter.RemoveInstance(); - } - } - - private void InitNoOpCounters() - { - // Set all the counter properties to no-op by default. - // These will get reset to real counters when/if the Initialize method is called. - foreach (var property in _counterProperties) - { - property.SetValue(this, new NoOpPerformanceCounter(), null); - } - } - - private void SetCounterProperties(string instanceName) - { - var loadCounters = true; - - foreach (var property in _counterProperties) - { - PerformanceCounterAttribute attribute = GetPerformanceCounterAttribute(property); - - if (attribute == null) - { - continue; - } - - IPerformanceCounter counter = null; - - if (loadCounters) - { - counter = LoadCounter(CategoryName, attribute.Name, instanceName, isReadOnly:false); - - if (counter == null) - { - // We failed to load the counter so skip the rest - loadCounters = false; - } - } - - counter = counter ?? _noOpCounter; - - property.SetValue(this, counter, null); - } - } - - internal static PropertyInfo[] GetCounterPropertyInfo() - { - return typeof(PerformanceCounterManager) - .GetProperties() - .Where(p => p.PropertyType == typeof(IPerformanceCounter)) - .ToArray(); - } - - internal static PerformanceCounterAttribute GetPerformanceCounterAttribute(PropertyInfo property) - { - return property.GetCustomAttributes(typeof(PerformanceCounterAttribute), false) - .Cast() - .SingleOrDefault(); - } - - [SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "This file is shared")] - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Counters are disposed later")] - public IPerformanceCounter LoadCounter(string categoryName, string counterName, string instanceName, bool isReadOnly) - { - // See http://msdn.microsoft.com/en-us/library/356cx381.aspx for the list of exceptions - // and when they are thrown. - try - { - var counter = new PerformanceCounter(categoryName, counterName, instanceName, isReadOnly); - - // Initialize the counter sample - counter.NextSample(); - - return new PerformanceCounterWrapper(counter); - } -#if UTILS - catch (InvalidOperationException) { return null; } - catch (UnauthorizedAccessException) { return null; } - catch (Win32Exception) { return null; } - catch (PlatformNotSupportedException) { return null; } -#else - catch (InvalidOperationException ex) - { - _trace.TraceEvent(TraceEventType.Error, 0, "Performance counter failed to load: " + ex.GetBaseException()); - return null; - } - catch (UnauthorizedAccessException ex) - { - _trace.TraceEvent(TraceEventType.Error, 0, "Performance counter failed to load: " + ex.GetBaseException()); - return null; - } - catch (Win32Exception ex) - { - _trace.TraceEvent(TraceEventType.Error, 0, "Performance counter failed to load: " + ex.GetBaseException()); - return null; - } - catch (PlatformNotSupportedException ex) - { - _trace.TraceEvent(TraceEventType.Error, 0, "Performance counter failed to load: " + ex.GetBaseException()); - return null; - } -#endif - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterWrapper.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterWrapper.cs deleted file mode 100644 index f455158bf..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PerformanceCounterWrapper.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal class PerformanceCounterWrapper : IPerformanceCounter - { - private readonly PerformanceCounter _counter; - - public PerformanceCounterWrapper(PerformanceCounter counter) - { - _counter = counter; - } - - public string CounterName - { - get - { - return _counter.CounterName; - } - } - - public long RawValue - { - get { return _counter.RawValue; } - set { _counter.RawValue = value; } - } - - public long Decrement() - { - return _counter.Decrement(); - } - - public long Increment() - { - return _counter.Increment(); - } - - public long IncrementBy(long value) - { - return _counter.IncrementBy(value); - } - - public void Close() - { - _counter.Close(); - } - - public void RemoveInstance() - { - try - { - _counter.RemoveInstance(); - } - catch(NotImplementedException) - { - // This happens on mono - } - } - - public CounterSample NextSample() - { - return _counter.NextSample(); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PersistentConnectionContext.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PersistentConnectionContext.cs deleted file mode 100644 index b27334591..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PersistentConnectionContext.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal class PersistentConnectionContext : IPersistentConnectionContext - { - public PersistentConnectionContext(IConnection connection, IConnectionGroupManager groupManager) - { - Connection = connection; - Groups = groupManager; - } - - public IConnection Connection { get; private set; } - - public IConnectionGroupManager Groups { get; private set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PrefixHelper.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PrefixHelper.cs deleted file mode 100644 index b734952e5..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/PrefixHelper.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal static class PrefixHelper - { - // Hubs - internal const string HubPrefix = "h-"; - internal const string HubGroupPrefix = "hg-"; - internal const string HubConnectionIdPrefix = "hc-"; - - // Persistent Connections - internal const string PersistentConnectionPrefix = "pc-"; - internal const string PersistentConnectionGroupPrefix = "pcg-"; - - // Both - internal const string ConnectionIdPrefix = "c-"; - internal const string AckPrefix = "ack-"; - - public static bool HasGroupPrefix(string value) - { - return value.StartsWith(HubGroupPrefix, StringComparison.Ordinal) || - value.StartsWith(PersistentConnectionGroupPrefix, StringComparison.Ordinal); - } - - public static string GetConnectionId(string connectionId) - { - return ConnectionIdPrefix + connectionId; - } - - public static string GetHubConnectionId(string connectionId) - { - return HubConnectionIdPrefix + connectionId; - } - - public static string GetHubName(string connectionId) - { - return HubPrefix + connectionId; - } - - public static string GetHubGroupName(string groupName) - { - return HubGroupPrefix + groupName; - } - - public static string GetPersistentConnectionGroupName(string groupName) - { - return PersistentConnectionGroupPrefix + groupName; - } - - public static string GetPersistentConnectionName(string connectionName) - { - return PersistentConnectionPrefix + connectionName; - } - - public static string GetAck(string connectionId) - { - return AckPrefix + connectionId; - } - - public static IList GetPrefixedConnectionIds(IList connectionIds) - { - if (connectionIds.Count == 0) - { - return ListHelper.Empty; - } - - return connectionIds.Select(PrefixHelper.GetConnectionId).ToList(); - } - - public static IEnumerable RemoveGroupPrefixes(IEnumerable groups) - { - return groups.Select(PrefixHelper.RemoveGroupPrefix); - } - - public static string RemoveGroupPrefix(string name) - { - if (name.StartsWith(HubGroupPrefix, StringComparison.Ordinal)) - { - return name.Substring(HubGroupPrefix.Length); - } - - if (name.StartsWith(PersistentConnectionGroupPrefix, StringComparison.Ordinal)) - { - return name.Substring(PersistentConnectionGroupPrefix.Length); - } - - return name; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Purposes.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Purposes.cs deleted file mode 100644 index c2d87415e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/Purposes.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - // These need to change when the format changes - public static class Purposes - { - public const string ConnectionToken = "SignalR.ConnectionToken"; - public const string Groups = "SignalR.Groups.v1.1"; - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/SafeCancellationTokenSource.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/SafeCancellationTokenSource.cs deleted file mode 100644 index e2506de52..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/SafeCancellationTokenSource.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Thread safe cancellation token source. Allows the following: - /// - Cancel will no-op if the token is disposed. - /// - Dispose may be called after Cancel. - /// - internal class SafeCancellationTokenSource : IDisposable - { - private CancellationTokenSource _cts; - private int _state; - - public SafeCancellationTokenSource() - { - _cts = new CancellationTokenSource(); - Token = _cts.Token; - } - - public CancellationToken Token { get; private set; } - - public void Cancel() - { - var value = Interlocked.CompareExchange(ref _state, State.Cancelling, State.Initial); - - if (value == State.Initial) - { - // Because cancellation tokens are so poorly behaved, always invoke the cancellation token on - // another thread. Don't capture any of the context (execution context or sync context) - // while doing this. -#if WINDOWS_PHONE || SILVERLIGHT - ThreadPool.QueueUserWorkItem(_ => -#elif NETFX_CORE - Task.Run(() => -#else - ThreadPool.UnsafeQueueUserWorkItem(_ => -#endif - { - try - { - _cts.Cancel(); - } - finally - { - if (Interlocked.CompareExchange(ref _state, State.Cancelled, State.Cancelling) == State.Disposing) - { - _cts.Dispose(); - Interlocked.Exchange(ref _state, State.Disposed); - } - } - } -#if !NETFX_CORE - , state: null -#endif -); - } - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - var value = Interlocked.Exchange(ref _state, State.Disposing); - - switch (value) - { - case State.Initial: - case State.Cancelled: - _cts.Dispose(); - Interlocked.Exchange(ref _state, State.Disposed); - break; - case State.Cancelling: - case State.Disposing: - // No-op - break; - case State.Disposed: - Interlocked.Exchange(ref _state, State.Disposed); - break; - default: - break; - } - } - } - - public void Dispose() - { - Dispose(true); - } - - private static class State - { - public const int Initial = 0; - public const int Cancelling = 1; - public const int Cancelled = 2; - public const int Disposing = 3; - public const int Disposed = 4; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/SafeSet.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/SafeSet.cs deleted file mode 100644 index ae9827a27..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/SafeSet.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal class SafeSet - { - private readonly ConcurrentDictionary _items; - - public SafeSet() - { - _items = new ConcurrentDictionary(); - } - - public SafeSet(IEqualityComparer comparer) - { - _items = new ConcurrentDictionary(comparer); - } - - public SafeSet(IEnumerable items) - { - _items = new ConcurrentDictionary(items.Select(x => new KeyValuePair(x, null))); - } - - public ICollection GetSnapshot() - { - // The Keys property locks, so Select instead - return _items.Keys; - } - - public bool Contains(T item) - { - return _items.ContainsKey(item); - } - - public bool Add(T item) - { - return _items.TryAdd(item, null); - } - - public bool Remove(T item) - { - object _; - return _items.TryRemove(item, out _); - } - - public bool Any() - { - return _items.Any(); - } - - public long Count - { - get { return _items.Count; } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommand.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommand.cs deleted file mode 100644 index 604144187..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommand.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// A server to server command. - /// - internal class ServerCommand - { - /// - /// Gets or sets the id of the command where this message originated from. - /// - public string ServerId { get; set; } - - /// - /// Gets of sets the command type. - /// - public ServerCommandType ServerCommandType { get; set; } - - /// - /// Gets or sets the value for this command. - /// - public object Value { get; set; } - - internal bool IsFromSelf(string serverId) - { - return serverId.Equals(ServerId); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommandHandler.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommandHandler.cs deleted file mode 100644 index aecdfa28a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommandHandler.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Json; -using Microsoft.AspNet.SignalR.Messaging; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Default implementation. - /// - internal class ServerCommandHandler : IServerCommandHandler, ISubscriber, IDisposable - { - private readonly IMessageBus _messageBus; - private readonly IServerIdManager _serverIdManager; - private readonly IJsonSerializer _serializer; - private IDisposable _subscription; - - private const int MaxMessages = 10; - - // The signal for all signalr servers - private const string ServerSignal = "__SIGNALR__SERVER__"; - private static readonly string[] ServerSignals = new[] { ServerSignal }; - - public ServerCommandHandler(IDependencyResolver resolver) : - this(resolver.Resolve(), - resolver.Resolve(), - resolver.Resolve()) - { - - } - - public ServerCommandHandler(IMessageBus messageBus, IServerIdManager serverIdManager, IJsonSerializer serializer) - { - _messageBus = messageBus; - _serverIdManager = serverIdManager; - _serializer = serializer; - - ProcessMessages(); - } - - public Action Command - { - get; - set; - } - - - public IList EventKeys - { - get - { - return ServerSignals; - } - } - - event Action ISubscriber.EventKeyAdded - { - add - { - } - remove - { - } - } - - event Action ISubscriber.EventKeyRemoved - { - add - { - } - remove - { - } - } - - public Action WriteCursor { get; set; } - - public string Identity - { - get - { - return _serverIdManager.ServerId; - } - } - - public Subscription Subscription - { - get; - set; - } - - public Task SendCommand(ServerCommand command) - { - // Store where the message originated from - command.ServerId = _serverIdManager.ServerId; - - // Send the command to the all servers - return _messageBus.Publish(_serverIdManager.ServerId, ServerSignal, _serializer.Stringify(command)); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - if (_subscription != null) - { - _subscription.Dispose(); - } - } - } - - public void Dispose() - { - Dispose(true); - } - - private void ProcessMessages() - { - // Process messages that come from the bus for servers - _subscription = _messageBus.Subscribe(this, cursor: null, callback: HandleServerCommands, maxMessages: MaxMessages, state: null); - } - - private Task HandleServerCommands(MessageResult result, object state) - { - result.Messages.Enumerate(m => ServerSignal.Equals(m.Key), - (s, m) => - { - var command = _serializer.Parse(m.Value, m.Encoding); - OnCommand(command); - }, - state: null); - - return TaskAsyncHelper.True; - } - - private void OnCommand(ServerCommand command) - { - if (Command != null) - { - Command(command); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommandType.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommandType.cs deleted file mode 100644 index 058164117..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerCommandType.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - public enum ServerCommandType - { - RemoveConnection - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerIdManager.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerIdManager.cs deleted file mode 100644 index e80d5cae1..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/ServerIdManager.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - /// - /// Default implementation. - /// - public class ServerIdManager : IServerIdManager - { - public ServerIdManager() - { - ServerId = Guid.NewGuid().ToString(); - } - - /// - /// The id of the server. - /// - public string ServerId - { - get; - private set; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/SipHashBasedStringEqualityComparer.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/SipHashBasedStringEqualityComparer.cs deleted file mode 100644 index bf86a93f3..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/SipHashBasedStringEqualityComparer.cs +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Security.Cryptography; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - // A string equality comparer based on the SipHash-2-4 algorithm. Key differences: - // (a) we output 32-bit hashes instead of 64-bit hashes, and - // (b) we don't care about endianness since hashes are used only in hash tables - // and aren't returned to user code. - // - // Meant to serve as a replacement for StringComparer.Ordinal. - // Derivative work of https://github.com/tanglebones/ch-siphash. - internal unsafe sealed class SipHashBasedStringEqualityComparer : IEqualityComparer - { - private static readonly RNGCryptoServiceProvider _rng = new RNGCryptoServiceProvider(); - - // the 128-bit secret key - private readonly ulong _k0; - private readonly ulong _k1; - - public SipHashBasedStringEqualityComparer() - : this(GenerateRandomKeySegment(), GenerateRandomKeySegment()) - { - } - - // for unit testing - internal SipHashBasedStringEqualityComparer(ulong k0, ulong k1) - { - _k0 = k0; - _k1 = k1; - } - - public bool Equals(string x, string y) - { - return String.Equals(x, y); - } - - private static ulong GenerateRandomKeySegment() - { - byte[] bytes = new byte[sizeof(ulong)]; - _rng.GetBytes(bytes); - return (ulong)BitConverter.ToInt64(bytes, 0); - } - - public int GetHashCode(string obj) - { - if (obj == null) - { - return 0; - } - - fixed (char* pChars = obj) - { - // treat input as an opaque blob, convert char count to byte count - return GetHashCode((byte*)pChars, checked((uint)obj.Length * sizeof(char))); - } - } - - // for unit testing - internal int GetHashCode(byte* bytes, uint len) - { - // Assume SipHash-2-4 is a strong PRF, therefore truncation to 32 bits is acceptable. - return (int)SipHash_2_4_UlongCast_ForcedInline(bytes, len, _k0, _k1); - } - - private static unsafe ulong SipHash_2_4_UlongCast_ForcedInline(byte* finb, uint inlen, ulong k0, ulong k1) - { - var v0 = 0x736f6d6570736575 ^ k0; - var v1 = 0x646f72616e646f6d ^ k1; - var v2 = 0x6c7967656e657261 ^ k0; - var v3 = 0x7465646279746573 ^ k1; - - var b = ((ulong)inlen) << 56; - - if (inlen > 0) - { - var inb = finb; - var left = inlen & 7; - var end = inb + inlen - left; - var linb = (ulong*)finb; - var lend = (ulong*)end; - for (; linb < lend; ++linb) - { - v3 ^= *linb; - - v0 += v1; - v1 = (v1 << 13) | (v1 >> (64 - 13)); - v1 ^= v0; - v0 = (v0 << 32) | (v0 >> (64 - 32)); - - v2 += v3; - v3 = (v3 << 16) | (v3 >> (64 - 16)); - v3 ^= v2; - - v0 += v3; - v3 = (v3 << 21) | (v3 >> (64 - 21)); - v3 ^= v0; - - v2 += v1; - v1 = (v1 << 17) | (v1 >> (64 - 17)); - v1 ^= v2; - v2 = (v2 << 32) | (v2 >> (64 - 32)); - v0 += v1; - v1 = (v1 << 13) | (v1 >> (64 - 13)); - v1 ^= v0; - v0 = (v0 << 32) | (v0 >> (64 - 32)); - - v2 += v3; - v3 = (v3 << 16) | (v3 >> (64 - 16)); - v3 ^= v2; - - v0 += v3; - v3 = (v3 << 21) | (v3 >> (64 - 21)); - v3 ^= v0; - - v2 += v1; - v1 = (v1 << 17) | (v1 >> (64 - 17)); - v1 ^= v2; - v2 = (v2 << 32) | (v2 >> (64 - 32)); - - v0 ^= *linb; - } - for (var i = 0; i < left; ++i) - { - b |= ((ulong)end[i]) << (8 * i); - } - } - - v3 ^= b; - v0 += v1; - v1 = (v1 << 13) | (v1 >> (64 - 13)); - v1 ^= v0; - v0 = (v0 << 32) | (v0 >> (64 - 32)); - - v2 += v3; - v3 = (v3 << 16) | (v3 >> (64 - 16)); - v3 ^= v2; - - v0 += v3; - v3 = (v3 << 21) | (v3 >> (64 - 21)); - v3 ^= v0; - - v2 += v1; - v1 = (v1 << 17) | (v1 >> (64 - 17)); - v1 ^= v2; - v2 = (v2 << 32) | (v2 >> (64 - 32)); - v0 += v1; - v1 = (v1 << 13) | (v1 >> (64 - 13)); - v1 ^= v0; - v0 = (v0 << 32) | (v0 >> (64 - 32)); - - v2 += v3; - v3 = (v3 << 16) | (v3 >> (64 - 16)); - v3 ^= v2; - - v0 += v3; - v3 = (v3 << 21) | (v3 >> (64 - 21)); - v3 ^= v0; - - v2 += v1; - v1 = (v1 << 17) | (v1 >> (64 - 17)); - v1 ^= v2; - v2 = (v2 << 32) | (v2 >> (64 - 32)); - v0 ^= b; - v2 ^= 0xff; - - v0 += v1; - v1 = (v1 << 13) | (v1 >> (64 - 13)); - v1 ^= v0; - v0 = (v0 << 32) | (v0 >> (64 - 32)); - - v2 += v3; - v3 = (v3 << 16) | (v3 >> (64 - 16)); - v3 ^= v2; - - v0 += v3; - v3 = (v3 << 21) | (v3 >> (64 - 21)); - v3 ^= v0; - - v2 += v1; - v1 = (v1 << 17) | (v1 >> (64 - 17)); - v1 ^= v2; - v2 = (v2 << 32) | (v2 >> (64 - 32)); - v0 += v1; - v1 = (v1 << 13) | (v1 >> (64 - 13)); - v1 ^= v0; - v0 = (v0 << 32) | (v0 >> (64 - 32)); - - v2 += v3; - v3 = (v3 << 16) | (v3 >> (64 - 16)); - v3 ^= v2; - - v0 += v3; - v3 = (v3 << 21) | (v3 >> (64 - 21)); - v3 ^= v0; - - v2 += v1; - v1 = (v1 << 17) | (v1 >> (64 - 17)); - v1 ^= v2; - v2 = (v2 << 32) | (v2 >> (64 - 32)); - v0 += v1; - v1 = (v1 << 13) | (v1 >> (64 - 13)); - v1 ^= v0; - v0 = (v0 << 32) | (v0 >> (64 - 32)); - - v2 += v3; - v3 = (v3 << 16) | (v3 >> (64 - 16)); - v3 ^= v2; - - v0 += v3; - v3 = (v3 << 21) | (v3 >> (64 - 21)); - v3 ^= v0; - - v2 += v1; - v1 = (v1 << 17) | (v1 >> (64 - 17)); - v1 ^= v2; - v2 = (v2 << 32) | (v2 >> (64 - 32)); - v0 += v1; - v1 = (v1 << 13) | (v1 >> (64 - 13)); - v1 ^= v0; - v0 = (v0 << 32) | (v0 >> (64 - 32)); - - v2 += v3; - v3 = (v3 << 16) | (v3 >> (64 - 16)); - v3 ^= v2; - - v0 += v3; - v3 = (v3 << 21) | (v3 >> (64 - 21)); - v3 ^= v0; - - v2 += v1; - v1 = (v1 << 17) | (v1 >> (64 - 17)); - v1 ^= v2; - v2 = (v2 << 32) | (v2 >> (64 - 32)); - - return v0 ^ v1 ^ v2 ^ v3; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/StringMinifier.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/StringMinifier.cs deleted file mode 100644 index ecbb249ef..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/StringMinifier.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Concurrent; -using System.Diagnostics.CodeAnalysis; -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - internal class StringMinifier : IStringMinifier - { - private readonly ConcurrentDictionary _stringMinifier = new ConcurrentDictionary(); - private readonly ConcurrentDictionary _stringMaximizer = new ConcurrentDictionary(); - private int _lastMinifiedKey = -1; - - private readonly Func _createMinifiedString; - - public StringMinifier() - { - _createMinifiedString = CreateMinifiedString; - } - - public string Minify(string fullString) - { - return _stringMinifier.GetOrAdd(fullString, _createMinifiedString); - } - - public string Unminify(string minifiedString) - { - string result; - _stringMaximizer.TryGetValue(minifiedString, out result); - return result; - } - - public void RemoveUnminified(string fullString) - { - string minifiedString; - if (_stringMinifier.TryRemove(fullString, out minifiedString)) - { - string value; - _stringMaximizer.TryRemove(minifiedString, out value); - } - } - - private string CreateMinifiedString(string fullString) - { - var minString = GetStringFromInt((uint)Interlocked.Increment(ref _lastMinifiedKey)); - _stringMaximizer.TryAdd(minString, fullString); - return minString; - } - - [SuppressMessage("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes", Justification = "This is a valid exception to throw.")] - private static char GetCharFromSixBitInt(uint num) - { - if (num < 26) - { - return (char)(num + 'A'); - } - if (num < 52) - { - return (char)(num - 26 + 'a'); - } - if (num < 62) - { - return (char)(num - 52 + '0'); - } - if (num == 62) - { - return '_'; - } - if (num == 63) - { - return ':'; - } - throw new IndexOutOfRangeException(); - } - - private static string GetStringFromInt(uint num) - { - const int maxSize = 6; - - // Buffer must be large enough to store any 32 bit uint at 6 bits per character - var buffer = new char[maxSize]; - var index = maxSize; - do - { - // Append next 6 bits of num - buffer[--index] = GetCharFromSixBitInt(num & 0x3f); - num >>= 6; - - // Don't pad output string, but ensure at least one character is written - } while (num != 0); - - return new string(buffer, index, maxSize - index); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/TaskQueue.cs b/src/Microsoft.AspNet.SignalR.Core/Infrastructure/TaskQueue.cs deleted file mode 100644 index 1c3d63489..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/TaskQueue.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - // Allows serial queuing of Task instances - // The tasks are not called on the current synchronization context - - internal sealed class TaskQueue - { - private readonly object _lockObj = new object(); - private Task _lastQueuedTask; - private volatile bool _drained; - private readonly int? _maxSize; - private long _size; - - public TaskQueue() - : this(TaskAsyncHelper.Empty) - { - } - - public TaskQueue(Task initialTask) - { - _lastQueuedTask = initialTask; - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is shared code")] - public TaskQueue(Task initialTask, int maxSize) - { - _lastQueuedTask = initialTask; - _maxSize = maxSize; - } - -#if !CLIENT_NET45 && !CLIENT_NET4 && !NETFX_CORE && !SILVERLIGHT - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is shared code.")] - public IPerformanceCounter QueueSizeCounter { get; set; } -#endif - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is shared code")] - public bool IsDrained - { - get - { - return _drained; - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is shared code")] - public Task Enqueue(Func taskFunc, object state) - { - // Lock the object for as short amount of time as possible - lock (_lockObj) - { - if (_drained) - { - return _lastQueuedTask; - } - - if (_maxSize != null) - { - // Increment the size if the queue - if (Interlocked.Increment(ref _size) > _maxSize) - { - Interlocked.Decrement(ref _size); - - // We failed to enqueue because the size limit was reached - return null; - } - -#if !CLIENT_NET45 && !CLIENT_NET4 && !NETFX_CORE && !SILVERLIGHT - var counter = QueueSizeCounter; - if (counter != null) - { - counter.Increment(); - } -#endif - } - - Task newTask = _lastQueuedTask.Then((next, nextState) => - { - return next(nextState).Finally(s => - { - var queue = (TaskQueue)s; - if (queue._maxSize != null) - { - // Decrement the number of items left in the queue - Interlocked.Decrement(ref queue._size); - -#if !CLIENT_NET45 && !CLIENT_NET4 && !NETFX_CORE && !SILVERLIGHT - var counter = QueueSizeCounter; - if (counter != null) - { - counter.Decrement(); - } -#endif - } - }, - this); - }, - taskFunc, state); - - _lastQueuedTask = newTask; - return newTask; - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is shared code")] - public Task Enqueue(Func taskFunc) - { - return Enqueue(state => ((Func)state).Invoke(), taskFunc); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is shared code")] - public Task Drain() - { - lock (_lockObj) - { - _drained = true; - - return _lastQueuedTask; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Json/IJsonSerializer.cs b/src/Microsoft.AspNet.SignalR.Core/Json/IJsonSerializer.cs deleted file mode 100644 index d2ee8705d..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Json/IJsonSerializer.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.IO; - -namespace Microsoft.AspNet.SignalR.Json -{ - /// - /// Used to serialize and deserialize outgoing/incoming data. - /// - public interface IJsonSerializer - { - /// - /// Serializes the specified object to a . - /// - /// The object to serialize - /// The to serialize the object to. - void Serialize(object value, TextWriter writer); - - /// - /// Deserializes the JSON to a .NET object. - /// - /// The to deserialize the object from. - /// The of object being deserialized. - /// The deserialized object from the JSON string. - object Parse(TextReader reader, Type targetType); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Json/IJsonValue.cs b/src/Microsoft.AspNet.SignalR.Core/Json/IJsonValue.cs deleted file mode 100644 index 4e462abb7..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Json/IJsonValue.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Json -{ - /// - /// Represents a JSON value. - /// - public interface IJsonValue - { - /// - /// Converts the parameter value to the specified . - /// - /// The to convert the parameter to. - /// The converted parameter value. - object ConvertTo(Type type); - - /// - /// Determines if the parameter can be converted to the specified . - /// - /// The to check. - /// True if the parameter can be converted to the specified , false otherwise. - bool CanConvertTo(Type type); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Json/IJsonWritable.cs b/src/Microsoft.AspNet.SignalR.Core/Json/IJsonWritable.cs deleted file mode 100644 index d1b73ab37..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Json/IJsonWritable.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.IO; - -namespace Microsoft.AspNet.SignalR.Json -{ - /// - /// Implementations handle their own serialization to JSON. - /// - public interface IJsonWritable - { - /// - /// Serializes itself to JSON via a . - /// - /// The that receives the JSON serialized object. - void WriteJson(TextWriter writer); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Json/JRawValue.cs b/src/Microsoft.AspNet.SignalR.Core/Json/JRawValue.cs deleted file mode 100644 index df22e7078..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Json/JRawValue.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.IO; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Microsoft.AspNet.SignalR.Json -{ - /// - /// An implementation of IJsonValue over JSON.NET - /// - internal class JRawValue : IJsonValue - { - private readonly string _value; - - public JRawValue(JRaw value) - { - _value = value.ToString(); - } - - public object ConvertTo(Type type) - { - // A non generic implementation of ToObject on JToken - using (var jsonReader = new StringReader(_value)) - { - var settings = new JsonSerializerSettings - { - MaxDepth = 20 - }; - var serializer = JsonSerializer.Create(settings); - return serializer.Deserialize(jsonReader, type); - } - } - - public bool CanConvertTo(Type type) - { - // TODO: Implement when we implement better method overload resolution - return true; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Json/JsonNetSerializer.cs b/src/Microsoft.AspNet.SignalR.Core/Json/JsonNetSerializer.cs deleted file mode 100644 index 4b0f53cf5..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Json/JsonNetSerializer.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.IO; -using Newtonsoft.Json; - -namespace Microsoft.AspNet.SignalR.Json -{ - /// - /// Default implementation over Json.NET. - /// - public class JsonNetSerializer : IJsonSerializer - { - private readonly JsonSerializer _serializer; - - /// - /// Initializes a new instance of the class. - /// - public JsonNetSerializer() - : this(new JsonSerializerSettings()) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The to use when serializing and deserializing. - public JsonNetSerializer(JsonSerializerSettings settings) - { - if (settings == null) - { - throw new ArgumentNullException("settings"); - } - - // Just override it anyways (we're saving the user) - settings.MaxDepth = 20; - _serializer = JsonSerializer.Create(settings); - } - - /// - /// Deserializes the JSON to a .NET object. - /// - /// The JSON to deserialize. - /// The of object being deserialized. - /// The deserialized object from the JSON string. - public object Parse(TextReader reader, Type targetType) - { - return _serializer.Deserialize(reader, targetType); - } - - /// - /// Serializes the specified object to a . - /// - /// The object to serialize - /// The to serialize the object to. - public void Serialize(object value, TextWriter writer) - { - var selfSerializer = value as IJsonWritable; - if (selfSerializer != null) - { - selfSerializer.WriteJson(writer); - } - else - { - _serializer.Serialize(writer, value); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Json/JsonSerializerExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Json/JsonSerializerExtensions.cs deleted file mode 100644 index 2a34ad264..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Json/JsonSerializerExtensions.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Globalization; -using System.IO; -using System.Text; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Json -{ - /// - /// Extensions for . - /// - public static class JsonSerializerExtensions - { - /// - /// Deserializes the JSON to a .NET object. - /// - /// The serializer - /// The of object being deserialized. - /// The JSON to deserialize - /// The deserialized object from the JSON string. - public static T Parse(this IJsonSerializer serializer, string json) - { - if (serializer == null) - { - throw new ArgumentNullException("serializer"); - } - - using (var reader = new StringReader(json)) - { - return (T)serializer.Parse(reader, typeof(T)); - } - } - - /// - /// Deserializes the JSON to a .NET object. - /// - /// The serializer - /// The of object being deserialized. - /// The JSON buffer to deserialize - /// The encoding to use. - /// The deserialized object from the JSON string. - public static T Parse(this IJsonSerializer serializer, ArraySegment jsonBuffer, Encoding encoding) - { - if (serializer == null) - { - throw new ArgumentNullException("serializer"); - } - - using (var reader = new ArraySegmentTextReader(jsonBuffer, encoding)) - { - return (T)serializer.Parse(reader, typeof(T)); - } - } - - /// - /// Serializes the specified object to a JSON string. - /// - /// The serializer - /// The object to serailize. - /// A JSON string representation of the object. - public static string Stringify(this IJsonSerializer serializer, object value) - { - if (serializer == null) - { - throw new ArgumentNullException("serializer"); - } - - using (var writer = new StringWriter(CultureInfo.InvariantCulture)) - { - serializer.Serialize(value, writer); - return writer.ToString(); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Json/JsonUtility.cs b/src/Microsoft.AspNet.SignalR.Core/Json/JsonUtility.cs deleted file mode 100644 index 534b261ba..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Json/JsonUtility.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Globalization; -using System.Linq; -using System.Text; - -namespace Microsoft.AspNet.SignalR.Json -{ - /// - /// Helper class for common JSON operations. - /// - public static class JsonUtility - { - // JavaScript keywords taken from http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf - // Sections: 7.6.1.1, 7.6.1.2 - // Plus the implicity globals "NaN", "undefined", "Infinity" - private static readonly string[] _jsKeywords = new[] { "break", "do", "instanceof", "typeof", "case", "else", "new", "var", "catch", "finally", "return", "void", "continue", "for", "switch", "while", "debugger", "function", "this", "with", "default", "if", "throw", "delete", "in", "try", "class", "enum", "extends", "super", "const", "export", "import", "implements", "let", "private", "public", "yield", "interface", "package", "protected", "static", "NaN", "undefined", "Infinity" }; - - /// - /// Converts the specified name to camel case. - /// - /// The name to convert. - /// A camel cased version of the specified name. - public static string CamelCase(string name) - { - if (name == null) - { - throw new ArgumentNullException("name"); - } - - return String.Join(".", name.Split('.').Select(n => Char.ToLower(n[0], CultureInfo.InvariantCulture) + n.Substring(1))); - } - - /// - /// Gets a string that returns JSON mime type "application/json; charset=UTF-8". - /// - public static string JsonMimeType - { - get { return "application/json; charset=UTF-8"; } - } - - /// - /// Gets a string that returns JSONP mime type "application/javascript; charset=UTF-8". - /// - public static string JavaScriptMimeType - { - get { return "application/javascript; charset=UTF-8"; } - } - - public static string CreateJsonpCallback(string callback, string payload) - { - var sb = new StringBuilder(); - if (!IsValidJavaScriptCallback(callback)) - { - throw new InvalidOperationException(); - } - sb.AppendFormat("{0}(", callback).Append(payload).Append(");"); - return sb.ToString(); - } - - internal static bool IsValidJavaScriptCallback(string callback) - { - if (String.IsNullOrWhiteSpace(callback)) - { - return false; - } - - var identifiers = callback.Split('.'); - - // Check each identifier to ensure it's a valid JS identifier - foreach (var identifier in identifiers) - { - if (!IsValidJavaScriptFunctionName(identifier)) - { - return false; - } - } - - return true; - } - - internal static bool IsValidJavaScriptFunctionName(string name) - { - if (String.IsNullOrWhiteSpace(name) || IsJavaScriptReservedWord(name)) - { - return false; - } - - // JavaScript identifier must start with a letter or a '$' or an '_' char - var firstChar = name[0]; - if (!IsValidJavaScriptIdentifierStartChar(firstChar)) - { - return false; - } - - for (var i = 1; i < name.Length; i++) - { - // Characters can be a letter, digit, '$' or '_' - if (!IsValidJavaScriptIdenfitierNonStartChar(name[i])) - { - return false; - } - } - - return true; - } - - private static bool IsValidJavaScriptIdentifierStartChar(char startChar) - { - return Char.IsLetter(startChar) || startChar == '$' || startChar == '_'; - } - - private static bool IsValidJavaScriptIdenfitierNonStartChar(char identifierChar) - { - return Char.IsLetterOrDigit(identifierChar) || identifierChar == '$' || identifierChar == '_'; - } - - private static bool IsJavaScriptReservedWord(string word) - { - return _jsKeywords.Contains(word); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Json/SipHashBasedDictionaryConverter.cs b/src/Microsoft.AspNet.SignalR.Core/Json/SipHashBasedDictionaryConverter.cs deleted file mode 100644 index 418d53cf2..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Json/SipHashBasedDictionaryConverter.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using Microsoft.AspNet.SignalR.Infrastructure; -using Newtonsoft.Json; - -namespace Microsoft.AspNet.SignalR.Json -{ - /// - /// A converter for dictionaries that uses a SipHash comparer - /// - internal class SipHashBasedDictionaryConverter : JsonConverter - { - public override bool CanWrite - { - get - { - return false; - } - } - - public override bool CanConvert(Type objectType) - { - return objectType == typeof(IDictionary); - } - - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - return ReadJsonObject(reader); - } - - private object ReadJsonObject(JsonReader reader) - { - switch (reader.TokenType) - { - case JsonToken.StartObject: - return ReadObject(reader); - case JsonToken.StartArray: - return ReadArray(reader); - case JsonToken.Integer: - case JsonToken.Float: - case JsonToken.String: - case JsonToken.Boolean: - case JsonToken.Undefined: - case JsonToken.Null: - case JsonToken.Date: - case JsonToken.Bytes: - return reader.Value; - default: - throw new NotSupportedException(); - - } - } - - private object ReadArray(JsonReader reader) - { - var array = new List(); - - while (reader.Read()) - { - switch (reader.TokenType) - { - default: - object value = ReadJsonObject(reader); - - array.Add(value); - break; - case JsonToken.EndArray: - return array; - } - } - - throw new JsonSerializationException(Resources.Error_ParseObjectFailed); - } - - private object ReadObject(JsonReader reader) - { - var obj = new Dictionary(new SipHashBasedStringEqualityComparer()); - - while (reader.Read()) - { - switch (reader.TokenType) - { - case JsonToken.PropertyName: - string propertyName = reader.Value.ToString(); - - if (!reader.Read()) - { - throw new JsonSerializationException(Resources.Error_ParseObjectFailed); - } - - object value = ReadJsonObject(reader); - - obj[propertyName] = value; - break; - case JsonToken.EndObject: - return obj; - default: - throw new JsonSerializationException(Resources.Error_ParseObjectFailed); - - } - } - - throw new JsonSerializationException(Resources.Error_ParseObjectFailed); - } - - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - throw new NotImplementedException(); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/Command.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/Command.cs deleted file mode 100644 index c14c97af9..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/Command.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public class Command - { - public Command() - { - Id = Guid.NewGuid().ToString(); - } - - public bool WaitForAck { get; set; } - public string Id { get; private set; } - public CommandType CommandType { get; set; } - public string Value { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/CommandType.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/CommandType.cs deleted file mode 100644 index 12bff330b..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/CommandType.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public enum CommandType - { - AddToGroup, - RemoveFromGroup, - Disconnect, - Abort - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/Cursor.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/Cursor.cs deleted file mode 100644 index ad915b562..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/Cursor.cs +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Text; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - internal unsafe class Cursor - { - private static char[] _escapeChars = new[] { '\\', '|', ',' }; - private string _escapedKey; - - public string Key { get; private set; } - public ulong Id { get; set; } - - public static Cursor Clone(Cursor cursor) - { - return new Cursor(cursor.Key, cursor.Id, cursor._escapedKey); - } - - public Cursor(string key, ulong id) - : this(key, id, Escape(key)) - { - } - - public Cursor(string key, ulong id, string minifiedKey) - { - Key = key; - Id = id; - _escapedKey = minifiedKey; - } - - public static void WriteCursors(TextWriter textWriter, IList cursors, string prefix) - { - textWriter.Write(prefix); - - for (int i = 0; i < cursors.Count; i++) - { - if (i > 0) - { - textWriter.Write('|'); - } - Cursor cursor = cursors[i]; - textWriter.Write(cursor._escapedKey); - textWriter.Write(','); - WriteUlongAsHexToBuffer(cursor.Id, textWriter); - } - } - - internal static void WriteUlongAsHexToBuffer(ulong value, TextWriter textWriter) - { - // This tracks the length of the output and serves as the index for the next character to be written into the pBuffer. - // The length could reach up to 16 characters, so at least that much space should remain in the pBuffer. - int length = 0; - - // Write the hex value from left to right into the buffer without zero padding. - for (int i = 0; i < 16; i++) - { - // Convert the first 4 bits of the value to a valid hex character. - char hexChar = Int32ToHex((int)(value >> 60)); - value <<= 4; - - // Don't increment length if it would just add zero padding - if (length != 0 || hexChar != '0') - { - textWriter.Write(hexChar); - length++; - } - } - - if (length == 0) - { - textWriter.Write('0'); - } - } - - private static char Int32ToHex(int value) - { - return (value < 10) ? (char)(value + '0') : (char)(value - 10 + 'A'); - } - - private static string Escape(string value) - { - // Nothing to do, so bail - if (value.IndexOfAny(_escapeChars) == -1) - { - return value; - } - - var sb = new StringBuilder(); - // \\ = \ - // \| = | - // \, = , - foreach (var ch in value) - { - switch (ch) - { - case '\\': - sb.Append('\\').Append(ch); - break; - case '|': - sb.Append('\\').Append(ch); - break; - case ',': - sb.Append('\\').Append(ch); - break; - default: - sb.Append(ch); - break; - } - } - - return sb.ToString(); - } - - public static List GetCursors(string cursor, string prefix) - { - return GetCursors(cursor, prefix, s => s); - } - - public static List GetCursors(string cursor, string prefix, Func keyMaximizer) - { - return GetCursors(cursor, prefix, (key, state) => ((Func)state).Invoke(key), keyMaximizer); - } - - public static List GetCursors(string cursor, string prefix, Func keyMaximizer, object state) - { - // Technically GetCursors should never be called with a null value, so this is extra cautious - if (String.IsNullOrEmpty(cursor)) - { - throw new FormatException(Resources.Error_InvalidCursorFormat); - } - - // If the cursor does not begin with the prefix stream, it isn't necessarily a formatting problem. - // The cursor with a different prefix might have had different, but also valid, formatting. - // Null should be returned so new cursors will be generated - if (!cursor.StartsWith(prefix, StringComparison.Ordinal)) - { - return null; - } - - var signals = new HashSet(); - var cursors = new List(); - string currentKey = null; - string currentEscapedKey = null; - ulong currentId; - bool escape = false; - bool consumingKey = true; - var sb = new StringBuilder(); - var sbEscaped = new StringBuilder(); - Cursor parsedCursor; - - for (int i = prefix.Length; i < cursor.Length; i++) - { - var ch = cursor[i]; - - // escape can only be true if we are consuming the key - if (escape) - { - if (ch != '\\' && ch != ',' && ch != '|') - { - throw new FormatException(Resources.Error_InvalidCursorFormat); - } - - sb.Append(ch); - sbEscaped.Append(ch); - escape = false; - } - else - { - if (ch == '\\') - { - if (!consumingKey) - { - throw new FormatException(Resources.Error_InvalidCursorFormat); - } - - sbEscaped.Append('\\'); - escape = true; - } - else if (ch == ',') - { - if (!consumingKey) - { - throw new FormatException(Resources.Error_InvalidCursorFormat); - } - - // For now String.Empty is an acceptable key, but this should change once we verify - // that empty keys cannot be created legitimately. - currentKey = keyMaximizer(sb.ToString(), state); - - // If the keyMap cannot find a key, we cannot create an array of cursors. - // This most likely means there was an AppDomain restart or a misbehaving client. - if (currentKey == null) - { - return null; - } - // Don't allow duplicate keys - if (!signals.Add(currentKey)) - { - throw new FormatException(Resources.Error_InvalidCursorFormat); - } - - currentEscapedKey = sbEscaped.ToString(); - - sb.Clear(); - sbEscaped.Clear(); - consumingKey = false; - } - else if (ch == '|') - { - if (consumingKey) - { - throw new FormatException(Resources.Error_InvalidCursorFormat); - } - - ParseCursorId(sb, out currentId); - - parsedCursor = new Cursor(currentKey, currentId, currentEscapedKey); - - cursors.Add(parsedCursor); - sb.Clear(); - consumingKey = true; - } - else - { - sb.Append(ch); - if (consumingKey) - { - sbEscaped.Append(ch); - } - } - } - } - - if (consumingKey) - { - throw new FormatException(Resources.Error_InvalidCursorFormat); - } - - ParseCursorId(sb, out currentId); - - parsedCursor = new Cursor(currentKey, currentId, currentEscapedKey); - - cursors.Add(parsedCursor); - - return cursors; - } - - private static void ParseCursorId(StringBuilder sb, out ulong id) - { - string value = sb.ToString(); - id = UInt64.Parse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture); - } - - public override string ToString() - { - return Key; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/DefaultSubscription.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/DefaultSubscription.cs deleted file mode 100644 index 08e4b8049..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/DefaultSubscription.cs +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.IO; -using System.Security.Cryptography; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - internal class DefaultSubscription : Subscription - { - internal static string _defaultCursorPrefix = GetCursorPrefix(); - - private List _cursors; - private List _cursorTopics; - - private readonly IStringMinifier _stringMinifier; - - public DefaultSubscription(string identity, - IList eventKeys, - TopicLookup topics, - string cursor, - Func> callback, - int maxMessages, - IStringMinifier stringMinifier, - IPerformanceCounterManager counters, - object state) : - base(identity, eventKeys, callback, maxMessages, counters, state) - { - _stringMinifier = stringMinifier; - - if (String.IsNullOrEmpty(cursor)) - { - _cursors = GetCursorsFromEventKeys(EventKeys, topics); - } - else - { - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - _cursors = Cursor.GetCursors(cursor, _defaultCursorPrefix, (k, s) => UnminifyCursor(k, s), stringMinifier) ?? GetCursorsFromEventKeys(EventKeys, topics); - } - - _cursorTopics = new List(); - - if (!String.IsNullOrEmpty(cursor)) - { - // Update all of the cursors so we're within the range - for (int i = _cursors.Count - 1; i >= 0; i--) - { - Cursor c = _cursors[i]; - Topic topic; - if (!EventKeys.Contains(c.Key)) - { - _cursors.Remove(c); - } - else if (!topics.TryGetValue(_cursors[i].Key, out topic) || _cursors[i].Id > topic.Store.GetMessageCount()) - { - UpdateCursor(c.Key, 0); - } - } - } - - // Add dummy entries so they can be filled in - for (int i = 0; i < _cursors.Count; i++) - { - _cursorTopics.Add(null); - } - } - - private static string UnminifyCursor(string key, object state) - { - return ((IStringMinifier)state).Unminify(key); - } - - public override bool AddEvent(string eventKey, Topic topic) - { - base.AddEvent(eventKey, topic); - - lock (_cursors) - { - // O(n), but small n and it's not common - var index = _cursors.FindIndex(c => c.Key == eventKey); - if (index == -1) - { - _cursors.Add(new Cursor(eventKey, GetMessageId(topic), _stringMinifier.Minify(eventKey))); - - _cursorTopics.Add(topic); - - return true; - } - - return false; - } - } - - public override void RemoveEvent(string eventKey) - { - base.RemoveEvent(eventKey); - - lock (_cursors) - { - var index = _cursors.FindIndex(c => c.Key == eventKey); - if (index != -1) - { - _cursors.RemoveAt(index); - _cursorTopics.RemoveAt(index); - } - } - } - - public override void SetEventTopic(string eventKey, Topic topic) - { - base.SetEventTopic(eventKey, topic); - - lock (_cursors) - { - // O(n), but small n and it's not common - var index = _cursors.FindIndex(c => c.Key == eventKey); - if (index != -1) - { - _cursorTopics[index] = topic; - } - } - } - - public override void WriteCursor(TextWriter textWriter) - { - lock (_cursors) - { - Cursor.WriteCursors(textWriter, _cursors, _defaultCursorPrefix); - } - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "It is called from the base class")] - protected override void PerformWork(IList> items, out int totalCount, out object state) - { - totalCount = 0; - - lock (_cursors) - { - var cursors = new ulong[_cursors.Count]; - for (int i = 0; i < _cursors.Count; i++) - { - MessageStoreResult storeResult = _cursorTopics[i].Store.GetMessages(_cursors[i].Id, MaxMessages); - cursors[i] = storeResult.FirstMessageId + (ulong)storeResult.Messages.Count; - - if (storeResult.Messages.Count > 0) - { - items.Add(storeResult.Messages); - totalCount += storeResult.Messages.Count; - } - } - - // Return the state as a list of cursors - state = cursors; - } - } - - protected override void BeforeInvoke(object state) - { - lock (_cursors) - { - // Update the list of cursors before invoking anything - var nextCursors = (ulong[])state; - for (int i = 0; i < _cursors.Count; i++) - { - _cursors[i].Id = nextCursors[i]; - } - } - } - - private bool UpdateCursor(string key, ulong id) - { - lock (_cursors) - { - // O(n), but small n and it's not common - var index = _cursors.FindIndex(c => c.Key == key); - if (index != -1) - { - _cursors[index].Id = id; - return true; - } - - return false; - } - } - - private List GetCursorsFromEventKeys(IList eventKeys, TopicLookup topics) - { - var list = new List(eventKeys.Count); - foreach (var eventKey in eventKeys) - { - var cursor = new Cursor(eventKey, GetMessageId(topics, eventKey), _stringMinifier.Minify(eventKey)); - list.Add(cursor); - } - - return list; - } - - private static string GetCursorPrefix() - { - using (var rng = new RNGCryptoServiceProvider()) - { - var data = new byte[4]; - rng.GetBytes(data); - - using (var writer = new StringWriter(CultureInfo.InvariantCulture)) - { - var randomValue = (ulong)BitConverter.ToUInt32(data, 0); - Cursor.WriteUlongAsHexToBuffer(randomValue, writer); - return "d-" + writer.ToString() + "-"; - } - } - } - - private static ulong GetMessageId(TopicLookup topics, string key) - { - Topic topic; - if (topics.TryGetValue(key, out topic)) - { - return GetMessageId(topic); - } - return 0; - } - - private static ulong GetMessageId(Topic topic) - { - if (topic == null) - { - return 0; - } - - return topic.Store.GetMessageCount(); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/IMessageBus.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/IMessageBus.cs deleted file mode 100644 index e229d739d..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/IMessageBus.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public interface IMessageBus - { - /// - /// - /// - /// - /// - Task Publish(Message message); - - /// - /// - /// - /// - /// - /// - /// - /// - /// - IDisposable Subscribe(ISubscriber subscriber, string cursor, Func> callback, int maxMessages, object state); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ISubscriber.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ISubscriber.cs deleted file mode 100644 index 317ab4d5f..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ISubscriber.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.IO; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public interface ISubscriber - { - IList EventKeys { get; } - - Action WriteCursor { get; set; } - - string Identity { get; } - - event Action EventKeyAdded; - - event Action EventKeyRemoved; - - Subscription Subscription { get; set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ISubscription.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ISubscription.cs deleted file mode 100644 index fa941ff74..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ISubscription.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public interface ISubscription - { - string Identity { get; } - - bool SetQueued(); - bool UnsetQueued(); - - Task Work(); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/LocalEventKeyInfo.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/LocalEventKeyInfo.cs deleted file mode 100644 index 81ef9c362..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/LocalEventKeyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public class LocalEventKeyInfo - { - private readonly WeakReference _storeReference; - - public LocalEventKeyInfo(string key, ulong id, MessageStore store) - { - // Don't hold onto MessageStores that would otherwise be GC'd - _storeReference = new WeakReference(store); - Key = key; - Id = id; - } - - public string Key { get; private set; } - public ulong Id { get; private set; } - public MessageStore MessageStore - { - get - { - return _storeReference.Target as MessageStore; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/Message.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/Message.cs deleted file mode 100644 index bb1dbffd0..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/Message.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Text; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public class Message - { - private static readonly byte[] _zeroByteBuffer = new byte[0]; - private static readonly UTF8Encoding _encoding = new UTF8Encoding(); - - public Message() - { - Encoding = _encoding; - } - - public Message(string source, string key, string value) - { - if (source == null) - { - throw new ArgumentNullException("source"); - } - - if (key == null) - { - throw new ArgumentNullException("key"); - } - - Source = source; - Key = key; - Encoding = _encoding; - Value = value == null ? new ArraySegment(_zeroByteBuffer) : new ArraySegment(Encoding.GetBytes(value)); - } - - public Message(string source, string key, ArraySegment value) - : this() - { - if (source == null) - { - throw new ArgumentNullException("source"); - } - - if (key == null) - { - throw new ArgumentNullException("key"); - } - - Source = source; - Key = key; - Value = value; - } - - /// - /// Which connection the message originated from - /// - public string Source { get; set; } - - /// - /// The signal for the message (connection id, group, etc) - /// - public string Key { get; set; } - - /// - /// The message payload - /// - public ArraySegment Value { get; set; } - - /// - /// The command id if this message is a command - /// - public string CommandId { get; set; } - - /// - /// Determines if the caller should wait for acknowledgement for this message - /// - public bool WaitForAck { get; set; } - - /// - /// Determines if this message is itself an ACK - /// - public bool IsAck { get; set; } - - /// - /// A list of connection ids to filter out - /// - public string Filter { get; set; } - - /// - /// The encoding of the message - /// - public Encoding Encoding { get; private set; } - - /// - /// The payload id. Only used in scaleout scenarios - /// - public ulong MappingId { get; set; } - - /// - /// The stream index this message came from. Only used the scaleout scenarios. - /// - public int StreamIndex { get; set; } - - public bool IsCommand - { - get - { - return !String.IsNullOrEmpty(CommandId); - } - } - - [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "This may be expensive")] - public string GetString() - { - // If there's no encoding this is a raw binary payload - if (Encoding == null) - { - throw new NotSupportedException(); - } - - return Encoding.GetString(Value.Array, Value.Offset, Value.Count); - } - - public void WriteTo(Stream stream) - { - var binaryWriter = new BinaryWriter(stream); - binaryWriter.Write(Source); - binaryWriter.Write(Key); - binaryWriter.Write(Value.Count); - binaryWriter.Write(Value.Array, Value.Offset, Value.Count); - binaryWriter.Write(CommandId ?? String.Empty); - binaryWriter.Write(WaitForAck); - binaryWriter.Write(IsAck); - binaryWriter.Write(Filter ?? String.Empty); - } - - public static Message ReadFrom(Stream stream) - { - var message = new Message(); - var binaryReader = new BinaryReader(stream); - message.Source = binaryReader.ReadString(); - message.Key = binaryReader.ReadString(); - int bytes = binaryReader.ReadInt32(); - message.Value = new ArraySegment(binaryReader.ReadBytes(bytes)); - message.CommandId = binaryReader.ReadString(); - message.WaitForAck = binaryReader.ReadBoolean(); - message.IsAck = binaryReader.ReadBoolean(); - message.Filter = binaryReader.ReadString(); - - return message; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBroker.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBroker.cs deleted file mode 100644 index a87b90a33..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBroker.cs +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - /// - /// This class is the main coordinator. It schedules work to be done for a particular subscription - /// and has an algorithm for choosing a number of workers (thread pool threads), to handle - /// the scheduled work. - /// - public class MessageBroker : IDisposable - { - private readonly Queue _queue = new Queue(); - - private readonly IPerformanceCounterManager _counters; - - // The maximum number of workers (threads) allowed to process all incoming messages - private readonly int _maxWorkers; - - // The maximum number of workers that can be left to idle (not busy but allocated) - private readonly int _maxIdleWorkers; - - // The number of allocated workers (currently running) - private int _allocatedWorkers; - - // The number of workers that are *actually* doing work - private int _busyWorkers; - - // Determines if the broker was disposed and should stop doing all work. - private bool _disposed; - - public MessageBroker(IPerformanceCounterManager performanceCounterManager) - : this(performanceCounterManager, 3 * Environment.ProcessorCount, Environment.ProcessorCount) - { - } - - public MessageBroker(IPerformanceCounterManager performanceCounterManager, int maxWorkers, int maxIdleWorkers) - { - _counters = performanceCounterManager; - _maxWorkers = maxWorkers; - _maxIdleWorkers = maxIdleWorkers; - } - - public TraceSource Trace - { - get; - set; - } - - public int AllocatedWorkers - { - get - { - return _allocatedWorkers; - } - } - - public int BusyWorkers - { - get - { - return _busyWorkers; - } - } - - public void Schedule(ISubscription subscription) - { - if (subscription == null) - { - throw new ArgumentNullException("subscription"); - } - - if (_disposed) - { - // Don't queue up new work if we've disposed the broker - return; - } - - if (subscription.SetQueued()) - { - lock (_queue) - { - _queue.Enqueue(subscription); - Monitor.Pulse(_queue); - AddWorker(); - } - } - } - - private void AddWorker() - { - // Only create a new worker if everyone is busy (up to the max) - if (_allocatedWorkers < _maxWorkers) - { - if (_allocatedWorkers == _busyWorkers) - { - _counters.MessageBusAllocatedWorkers.RawValue = Interlocked.Increment(ref _allocatedWorkers); - - Trace.TraceEvent(TraceEventType.Verbose, 0, "Creating a worker, allocated={0}, busy={1}", _allocatedWorkers, _busyWorkers); - - ThreadPool.QueueUserWorkItem(ProcessWork); - } - else - { - Trace.TraceEvent(TraceEventType.Verbose, 0, "No need to add a worker because all allocated workers are not busy, allocated={0}, busy={1}", _allocatedWorkers, _busyWorkers); - } - } - else - { - Trace.TraceEvent(TraceEventType.Verbose, 0, "Already at max workers, allocated={0}, busy={1}", _allocatedWorkers, _busyWorkers); - } - } - - private void ProcessWork(object state) - { - Task pumpTask = PumpAsync(); - - if (pumpTask.IsCompleted) - { - ProcessWorkSync(pumpTask); - } - else - { - ProcessWorkAsync(pumpTask); - } - - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "We want to avoid user code taking the process down.")] - private void ProcessWorkSync(Task pumpTask) - { - try - { - pumpTask.Wait(); - } - catch (Exception ex) - { - Trace.TraceEvent(TraceEventType.Error, 0, "Failed to process work - " + ex.GetBaseException()); - } - finally - { - // After the pump runs decrement the number of workers in flight - _counters.MessageBusAllocatedWorkers.RawValue = Interlocked.Decrement(ref _allocatedWorkers); - } - } - - private void ProcessWorkAsync(Task pumpTask) - { - pumpTask.ContinueWith(task => - { - // After the pump runs decrement the number of workers in flight - _counters.MessageBusAllocatedWorkers.RawValue = Interlocked.Decrement(ref _allocatedWorkers); - - if (task.IsFaulted) - { - Trace.TraceEvent(TraceEventType.Error, 0, "Failed to process work - " + task.Exception.GetBaseException()); - } - }); - } - - private Task PumpAsync() - { - var tcs = new TaskCompletionSource(); - PumpImpl(tcs); - return tcs.Task; - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "We want to avoid user code taking the process down.")] - private void PumpImpl(TaskCompletionSource taskCompletionSource, ISubscription subscription = null) - { - - Process: - // If we were doing work before and now we've been disposed just kill this worker early - if (_disposed) - { - taskCompletionSource.TrySetResult(null); - return; - } - - Debug.Assert(_allocatedWorkers <= _maxWorkers, "How did we pass the max?"); - - // If we're withing the acceptable limit of idleness, just keep running - int idleWorkers = _allocatedWorkers - _busyWorkers; - - if (subscription != null || idleWorkers <= _maxIdleWorkers) - { - // We already have a subscription doing work so skip the queue - if (subscription == null) - { - lock (_queue) - { - while (_queue.Count == 0) - { - Monitor.Wait(_queue); - - // When disposing, all workers are pulsed so that they can quit - // if they're waiting for things to do (idle) - if (_disposed) - { - taskCompletionSource.TrySetResult(null); - return; - } - } - - subscription = _queue.Dequeue(); - } - } - - _counters.MessageBusBusyWorkers.RawValue = Interlocked.Increment(ref _busyWorkers); - - Task workTask = subscription.Work(); - - if (workTask.IsCompleted) - { - try - { - workTask.Wait(); - - goto Process; - } - catch (Exception ex) - { - Trace.TraceEvent(TraceEventType.Error, 0, "Work failed for " + subscription.Identity + ": " + ex.GetBaseException()); - - goto Process; - } - finally - { - if (!subscription.UnsetQueued() || workTask.IsFaulted || workTask.IsCanceled) - { - // If we don't have more work to do just make the subscription null - subscription = null; - } - - _counters.MessageBusBusyWorkers.RawValue = Interlocked.Decrement(ref _busyWorkers); - - Debug.Assert(_busyWorkers >= 0, "The number of busy workers has somehow gone negative"); - } - } - else - { - PumpImplAsync(workTask, subscription, taskCompletionSource); - } - } - else - { - taskCompletionSource.TrySetResult(null); - } - } - - private void PumpImplAsync(Task workTask, ISubscription subscription, TaskCompletionSource taskCompletionSource) - { - // Async path - workTask.ContinueWith(task => - { - bool moreWork = subscription.UnsetQueued(); - - _counters.MessageBusBusyWorkers.RawValue = Interlocked.Decrement(ref _busyWorkers); - - Debug.Assert(_busyWorkers >= 0, "The number of busy workers has somehow gone negative"); - - if (task.IsFaulted) - { - Trace.TraceEvent(TraceEventType.Error, 0, "Work failed for " + subscription.Identity + ": " + task.Exception.GetBaseException()); - } - - if (moreWork && !task.IsFaulted && !task.IsCanceled) - { - PumpImpl(taskCompletionSource, subscription); - } - else - { - // Don't reference the subscription anymore - subscription = null; - - PumpImpl(taskCompletionSource); - } - }); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - if (!_disposed) - { - _disposed = true; - - Trace.TraceEvent(TraceEventType.Verbose, 0, "Dispoing the broker"); - - if (MonoUtility.IsRunningMono) - { - return; - } - - // Wait for all threads to stop working - WaitForDrain(); - - Trace.TraceEvent(TraceEventType.Verbose, 0, "Disposed the broker"); - } - } - } - - public void Dispose() - { - Dispose(true); - } - - private void WaitForDrain() - { - while (_allocatedWorkers > 0) - { - lock (_queue) - { - // Tell all workers we're done - Monitor.PulseAll(_queue); - } - - Thread.Sleep(250); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBus.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBus.cs deleted file mode 100644 index c9692b03e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBus.cs +++ /dev/null @@ -1,588 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Configuration; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Tracing; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - /// - /// - /// - public class MessageBus : IMessageBus, IDisposable - { - private readonly MessageBroker _broker; - - // The size of the messages store we allocate per topic. - private readonly uint _messageStoreSize; - - // By default, topics are cleaned up after having no subscribers and after - // an interval based on the disconnect timeout has passed. While this works in normal cases - // it's an issue when the rate of incoming connections is too high. - // This is the maximum number of un-expired topics with no subscribers - // we'll leave hanging around. The rest will be cleaned up on an the gc interval. - private readonly int _maxTopicsWithNoSubscriptions; - - private readonly IStringMinifier _stringMinifier; - - private readonly ITraceManager _traceManager; - private readonly TraceSource _trace; - - private Timer _gcTimer; - private int _gcRunning; - private static readonly TimeSpan _gcInterval = TimeSpan.FromSeconds(5); - - private readonly TimeSpan _topicTtl; - - // For unit testing - internal Action BeforeTopicGarbageCollected; - internal Action AfterTopicGarbageCollected; - internal Action BeforeTopicMarked; - internal Action BeforeTopicCreated; - internal Action AfterTopicMarkedSuccessfully; - internal Action AfterTopicMarked; - - private const int DefaultMaxTopicsWithNoSubscriptions = 1000; - - private readonly Func _createTopic; - private readonly Action _addEvent; - private readonly Action _removeEvent; - private readonly Action _disposeSubscription; - - /// - /// - /// - /// - public MessageBus(IDependencyResolver resolver) - : this(resolver.Resolve(), - resolver.Resolve(), - resolver.Resolve(), - resolver.Resolve(), - DefaultMaxTopicsWithNoSubscriptions) - { - } - - /// - /// - /// - /// - /// - /// - /// - /// - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The message broker is disposed when the bus is disposed.")] - public MessageBus(IStringMinifier stringMinifier, - ITraceManager traceManager, - IPerformanceCounterManager performanceCounterManager, - IConfigurationManager configurationManager, - int maxTopicsWithNoSubscriptions) - { - if (stringMinifier == null) - { - throw new ArgumentNullException("stringMinifier"); - } - - if (traceManager == null) - { - throw new ArgumentNullException("traceManager"); - } - - if (performanceCounterManager == null) - { - throw new ArgumentNullException("performanceCounterManager"); - } - - if (configurationManager == null) - { - throw new ArgumentNullException("configurationManager"); - } - - if (configurationManager.DefaultMessageBufferSize < 0) - { - throw new ArgumentOutOfRangeException(Resources.Error_BufferSizeOutOfRange); - } - - _stringMinifier = stringMinifier; - _traceManager = traceManager; - Counters = performanceCounterManager; - _trace = _traceManager["SignalR." + typeof(MessageBus).Name]; - _maxTopicsWithNoSubscriptions = maxTopicsWithNoSubscriptions; - - _gcTimer = new Timer(_ => GarbageCollectTopics(), state: null, dueTime: _gcInterval, period: _gcInterval); - - _broker = new MessageBroker(Counters) - { - Trace = _trace - }; - - // The default message store size - _messageStoreSize = (uint)configurationManager.DefaultMessageBufferSize; - - _topicTtl = configurationManager.TopicTtl(); - _createTopic = CreateTopic; - _addEvent = AddEvent; - _removeEvent = RemoveEvent; - _disposeSubscription = DisposeSubscription; - - Topics = new TopicLookup(); - } - - protected virtual TraceSource Trace - { - get - { - return _trace; - } - } - - protected internal TopicLookup Topics { get; private set; } - protected IPerformanceCounterManager Counters { get; private set; } - - public int AllocatedWorkers - { - get - { - return _broker.AllocatedWorkers; - } - } - - public int BusyWorkers - { - get - { - return _broker.BusyWorkers; - } - } - - /// - /// Publishes a new message to the specified event on the bus. - /// - /// The message to publish. - public virtual Task Publish(Message message) - { - if (message == null) - { - throw new ArgumentNullException("message"); - } - - Topic topic; - if (Topics.TryGetValue(message.Key, out topic)) - { - topic.Store.Add(message); - ScheduleTopic(topic); - } - - Counters.MessageBusMessagesPublishedTotal.Increment(); - Counters.MessageBusMessagesPublishedPerSec.Increment(); - - - return TaskAsyncHelper.Empty; - } - - protected ulong Save(Message message) - { - if (message == null) - { - throw new ArgumentNullException("message"); - } - - // GetTopic will return a topic for the given key. If topic exists and is Dying, - // it will revive it and mark it as NoSubscriptions - Topic topic = GetTopic(message.Key); - // Mark the topic as used so it doesn't immediately expire (if it was in that state before). - topic.MarkUsed(); - - return topic.Store.Add(message); - } - - /// - /// - /// - /// - /// - /// - /// - /// - /// - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The disposable object is returned to the caller")] - public virtual IDisposable Subscribe(ISubscriber subscriber, string cursor, Func> callback, int maxMessages, object state) - { - if (subscriber == null) - { - throw new ArgumentNullException("subscriber"); - } - - if (callback == null) - { - throw new ArgumentNullException("callback"); - } - - Subscription subscription = CreateSubscription(subscriber, cursor, callback, maxMessages, state); - - // Set the subscription for this subscriber - subscriber.Subscription = subscription; - - var topics = new HashSet(); - - foreach (var key in subscriber.EventKeys) - { - // Create or retrieve topic and set it as HasSubscriptions - Topic topic = SubscribeTopic(key); - - // Set the subscription for this topic - subscription.SetEventTopic(key, topic); - - topics.Add(topic); - } - - subscriber.EventKeyAdded += _addEvent; - subscriber.EventKeyRemoved += _removeEvent; - subscriber.WriteCursor = subscription.WriteCursor; - - var subscriptionState = new SubscriptionState(subscriber); - var disposable = new DisposableAction(_disposeSubscription, subscriptionState); - - // When the subscription itself is disposed then dispose it - subscription.Disposable = disposable; - - // Add the subscription when it's all set and can be scheduled - // for work. It's important to do this after everything is wired up for the - // subscription so that publishes can schedule work at the right time. - foreach (var topic in topics) - { - topic.AddSubscription(subscription); - } - - subscriptionState.Initialized.Set(); - - // If there's a cursor then schedule work for this subscription - if (!String.IsNullOrEmpty(cursor)) - { - _broker.Schedule(subscription); - } - - return disposable; - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "Called from derived class")] - protected virtual Subscription CreateSubscription(ISubscriber subscriber, string cursor, Func> callback, int messageBufferSize, object state) - { - return new DefaultSubscription(subscriber.Identity, subscriber.EventKeys, Topics, cursor, callback, messageBufferSize, _stringMinifier, Counters, state); - } - - protected void ScheduleEvent(string eventKey) - { - Topic topic; - if (Topics.TryGetValue(eventKey, out topic)) - { - ScheduleTopic(topic); - } - } - - private void ScheduleTopic(Topic topic) - { - try - { - topic.SubscriptionLock.EnterReadLock(); - - for (int i = 0; i < topic.Subscriptions.Count; i++) - { - ISubscription subscription = topic.Subscriptions[i]; - _broker.Schedule(subscription); - } - } - finally - { - topic.SubscriptionLock.ExitReadLock(); - } - } - - /// - /// Creates a topic for the specified key. - /// - /// The key to create the topic for. - /// A for the specified key. - protected virtual Topic CreateTopic(string key) - { - // REVIEW: This can be called multiple times, should we guard against it? - Counters.MessageBusTopicsCurrent.Increment(); - - return new Topic(_messageStoreSize, _topicTtl); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - // Stop the broker from doing any work - _broker.Dispose(); - - // Spin while we wait for the timer to finish if it's currently running - while (Interlocked.Exchange(ref _gcRunning, 1) == 1) - { - Thread.Sleep(250); - } - - // Remove all topics - Topics.Clear(); - - if (_gcTimer != null) - { - _gcTimer.Dispose(); - } - } - } - - public void Dispose() - { - Dispose(true); - } - - internal void GarbageCollectTopics() - { - if (Interlocked.Exchange(ref _gcRunning, 1) == 1) - { - return; - } - - int topicsWithNoSubs = 0; - - foreach (var pair in Topics) - { - if (pair.Value.IsExpired) - { - if (BeforeTopicGarbageCollected != null) - { - BeforeTopicGarbageCollected(pair.Key, pair.Value); - } - - // Mark the topic as dead - DestroyTopic(pair.Key, pair.Value); - } - else if (pair.Value.State == TopicState.NoSubscriptions) - { - // Keep track of the number of topics with no subscriptions - topicsWithNoSubs++; - } - } - - int overflow = topicsWithNoSubs - _maxTopicsWithNoSubscriptions; - if (overflow > 0) - { - // If we've overflowed the max the collect topics that don't have - // subscribers - var candidates = new List>(); - foreach (var pair in Topics) - { - if (pair.Value.State == TopicState.NoSubscriptions) - { - candidates.Add(pair); - } - } - - // We want to remove the overflow but oldest first - candidates.Sort((leftPair, rightPair) => leftPair.Value.LastUsed.CompareTo(rightPair.Value.LastUsed)); - - // Clear up to the overflow and stay within bounds - for (int i = 0; i < overflow && i < candidates.Count; i++) - { - var pair = candidates[i]; - // We only want to kill the topic if it's in the NoSubscriptions or Dying state. - if (InterlockedHelper.CompareExchangeOr(ref pair.Value.State, TopicState.Dead, TopicState.NoSubscriptions, TopicState.Dying)) - { - // Kill it - DestroyTopicCore(pair.Key, pair.Value); - } - } - } - - Interlocked.Exchange(ref _gcRunning, 0); - } - - private void DestroyTopic(string key, Topic topic) - { - // The goal of this function is to destroy topics after 2 garbage collect cycles - // This first if statement will transition a topic into the dying state on the first GC cycle - // but it will prevent the code path from hitting the second if statement - if (Interlocked.CompareExchange(ref topic.State, TopicState.Dying, TopicState.NoSubscriptions) == TopicState.Dying) - { - // If we've hit this if statement we're on the second GC cycle with this soon to be - // destroyed topic. At this point we move the Topic State into the Dead state as - // long as it has not been revived from the dying state. We check if the state is - // still dying again to ensure that the topic has not been transitioned into a new - // state since we've decided to destroy it. - if (Interlocked.CompareExchange(ref topic.State, TopicState.Dead, TopicState.Dying) == TopicState.Dying) - { - DestroyTopicCore(key, topic); - } - } - } - - private void DestroyTopicCore(string key, Topic topic) - { - Topics.TryRemove(key); - _stringMinifier.RemoveUnminified(key); - - Counters.MessageBusTopicsCurrent.Decrement(); - - Trace.TraceInformation("RemoveTopic(" + key + ")"); - - if (AfterTopicGarbageCollected != null) - { - AfterTopicGarbageCollected(key, topic); - } - } - - internal Topic GetTopic(string key) - { - Topic topic; - int oldState; - - do - { - if (BeforeTopicCreated != null) - { - BeforeTopicCreated(key); - } - - topic = Topics.GetOrAdd(key, _createTopic); - - if (BeforeTopicMarked != null) - { - BeforeTopicMarked(key, topic); - } - - // If the topic was dying revive it to the NoSubscriptions state. This is used to ensure - // that in the scaleout case that even if we're publishing to a topic with no subscriptions - // that we keep it around in case a user hops nodes. - oldState = Interlocked.CompareExchange(ref topic.State, TopicState.NoSubscriptions, TopicState.Dying); - - if (AfterTopicMarked != null) - { - AfterTopicMarked(key, topic, topic.State); - } - - // If the topic is currently dead then we're racing with the DestroyTopicCore function, therefore - // loop around until we're able to create a new topic - } while (oldState == TopicState.Dead); - - if (AfterTopicMarkedSuccessfully != null) - { - AfterTopicMarkedSuccessfully(key, topic); - } - - return topic; - } - - internal Topic SubscribeTopic(string key) - { - Topic topic; - - do - { - if (BeforeTopicCreated != null) - { - BeforeTopicCreated(key); - } - - topic = Topics.GetOrAdd(key, _createTopic); - - if (BeforeTopicMarked != null) - { - BeforeTopicMarked(key, topic); - } - - // Transition into the HasSubscriptions state as long as the topic is not dead - InterlockedHelper.CompareExchangeOr(ref topic.State, TopicState.HasSubscriptions, TopicState.NoSubscriptions, TopicState.Dying); - - if (AfterTopicMarked != null) - { - AfterTopicMarked(key, topic, topic.State); - } - - // If we were unable to transition into the HasSubscription state that means we're in the Dead state. - // Loop around until we're able to create the topic new - } while (topic.State != TopicState.HasSubscriptions); - - if (AfterTopicMarkedSuccessfully != null) - { - AfterTopicMarkedSuccessfully(key, topic); - } - - return topic; - } - - private void AddEvent(ISubscriber subscriber, string eventKey) - { - Topic topic = SubscribeTopic(eventKey); - - // Add or update the cursor (in case it already exists) - if (subscriber.Subscription.AddEvent(eventKey, topic)) - { - // Add it to the list of subs - topic.AddSubscription(subscriber.Subscription); - } - } - - private void RemoveEvent(ISubscriber subscriber, string eventKey) - { - Topic topic; - if (Topics.TryGetValue(eventKey, out topic)) - { - topic.RemoveSubscription(subscriber.Subscription); - subscriber.Subscription.RemoveEvent(eventKey); - } - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Failure to invoke the callback should be ignored")] - private void DisposeSubscription(object state) - { - var subscriptionState = (SubscriptionState)state; - var subscriber = subscriptionState.Subscriber; - - // This will stop work from continuting to happen - subscriber.Subscription.Dispose(); - - try - { - // Invoke the terminal callback - subscriber.Subscription.Invoke(MessageResult.TerminalMessage).Wait(); - } - catch - { - // We failed to talk to the subscriber because they are already gone - // so the terminal message isn't required. - } - - subscriptionState.Initialized.Wait(); - - subscriber.EventKeyAdded -= _addEvent; - subscriber.EventKeyRemoved -= _removeEvent; - subscriber.WriteCursor = null; - - for (int i = subscriber.EventKeys.Count - 1; i >= 0; i--) - { - string eventKey = subscriber.EventKeys[i]; - RemoveEvent(subscriber, eventKey); - } - } - - private class SubscriptionState - { - public ISubscriber Subscriber { get; private set; } - public ManualResetEventSlim Initialized { get; private set; } - - public SubscriptionState(ISubscriber subscriber) - { - Initialized = new ManualResetEventSlim(); - Subscriber = subscriber; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBusExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBusExtensions.cs deleted file mode 100644 index 6da8de78f..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageBusExtensions.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public static class MessageBusExtensions - { - public static Task Publish(this IMessageBus bus, string source, string key, string value) - { - if (bus == null) - { - throw new ArgumentNullException("bus"); - } - - if (source == null) - { - throw new ArgumentNullException("source"); - } - - if (String.IsNullOrEmpty(key)) - { - throw new ArgumentNullException("key"); - } - - return bus.Publish(new Message(source, key, value)); - } - - internal static Task Ack(this IMessageBus bus, string connectionId, string commandId) - { - // Prepare the ack - var message = new Message(connectionId, PrefixHelper.GetAck(connectionId), null); - message.CommandId = commandId; - message.IsAck = true; - return bus.Publish(message); - } - - public static void Enumerate(this IList> messages, Action onMessage) - { - if (messages == null) - { - throw new ArgumentNullException("messages"); - } - - if (onMessage == null) - { - throw new ArgumentNullException("onMessage"); - } - - Enumerate(messages, message => true, (state, message) => onMessage(message), state: null); - } - - public static void Enumerate(this IList> messages, Func filter, Action onMessage, T state) - { - if (messages == null) - { - throw new ArgumentNullException("messages"); - } - - if (filter == null) - { - throw new ArgumentNullException("filter"); - } - - if (onMessage == null) - { - throw new ArgumentNullException("onMessage"); - } - - for (int i = 0; i < messages.Count; i++) - { - ArraySegment segment = messages[i]; - for (int j = segment.Offset; j < segment.Offset + segment.Count; j++) - { - Message message = segment.Array[j]; - - if (filter(message)) - { - onMessage(state, message); - } - } - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageResult.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageResult.cs deleted file mode 100644 index f29f86097..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageResult.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - /// - /// - /// - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "Messages are never compared")] - public struct MessageResult - { - private static readonly List> _emptyList = new List>(); - public readonly static MessageResult TerminalMessage = new MessageResult(terminal: true); - - /// - /// Gets an associated with the result. - /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "This is an optimization to avoid allocations.")] - public IList> Messages { get; private set; } - - public int TotalCount { get; private set; } - - public bool Terminal { get; set; } - - public MessageResult(bool terminal) - : this(_emptyList, 0) - { - Terminal = terminal; - } - - /// - /// Initializes a new instance of the struct. - /// - /// The array of messages associated with this . - /// The amount of messages populated in the messages array. - public MessageResult(IList> messages, int totalCount) - : this() - { - Messages = messages; - TotalCount = totalCount; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageStore.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageStore.cs deleted file mode 100644 index 565907f4a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageStore.cs +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - // Represents a message store that is backed by a ring buffer. - public sealed class MessageStore where T : class - { - private static readonly uint _minFragmentCount = 4; - private static readonly uint _maxFragmentSize = (IntPtr.Size == 4) ? (uint)16384 : (uint)8192; // guarantees that fragments never end up in the LOH - private static readonly ArraySegment _emptyArraySegment = new ArraySegment(new T[0]); - private readonly uint _offset; - - private Fragment[] _fragments; - private readonly uint _fragmentSize; - - private long _nextFreeMessageId; - - // Creates a message store with the specified capacity. The actual capacity will be *at least* the - // specified value. That is, GetMessages may return more data than 'capacity'. - public MessageStore(uint capacity, uint offset) - { - // set a minimum capacity - if (capacity < 32) - { - capacity = 32; - } - - _offset = offset; - - // Dynamically choose an appropriate number of fragments and the size of each fragment. - // This is chosen to avoid allocations on the large object heap and to minimize contention - // in the store. We allocate a small amount of additional space to act as an overflow - // buffer; this increases throughput of the data structure. - checked - { - uint fragmentCount = Math.Max(_minFragmentCount, capacity / _maxFragmentSize); - _fragmentSize = Math.Min((capacity + fragmentCount - 1) / fragmentCount, _maxFragmentSize); - _fragments = new Fragment[fragmentCount + 1]; // +1 for the overflow buffer - } - } - - public MessageStore(uint capacity) - : this(capacity, offset: 0) - { - } - - // only for testing purposes - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Only for testing")] - public ulong GetMessageCount() - { - return (ulong)Volatile.Read(ref _nextFreeMessageId); - } - - // Adds a message to the store. Returns the ID of the newly added message. - public ulong Add(T message) - { - // keep looping in TryAddImpl until it succeeds - ulong newMessageId; - while (!TryAddImpl(message, out newMessageId)) ; - - // When TryAddImpl succeeds, record the fact that a message was just added to the - // store. We increment the next free id rather than set it explicitly since - // multiple threads might be trying to write simultaneously. There is a nifty - // side effect to this: _nextFreeMessageId will *always* return the total number - // of messages that *all* threads agree have ever been added to the store. (The - // actual number may be higher, but this field will eventually catch up as threads - // flush data.) - Interlocked.Increment(ref _nextFreeMessageId); - return newMessageId; - } - - private void GetFragmentOffsets(ulong messageId, out ulong fragmentNum, out int idxIntoFragmentsArray, out int idxIntoFragment) - { - fragmentNum = messageId / _fragmentSize; - - // from the bucket number, we can figure out where in _fragments this data sits - idxIntoFragmentsArray = (int)(fragmentNum % (uint)_fragments.Length); - idxIntoFragment = (int)(messageId % _fragmentSize); - } - - private ulong GetMessageId(ulong fragmentNum, uint offset) - { - return fragmentNum * _fragmentSize + offset; - } - - // Gets the next batch of messages, beginning with the specified ID. - // This function may return an empty array or an array of length greater than the capacity - // specified in the ctor. The client may also miss messages. See MessageStoreResult. - public MessageStoreResult GetMessages(ulong firstMessageId, int maxMessages) - { - return GetMessagesImpl(firstMessageId, maxMessages); - } - - private MessageStoreResult GetMessagesImpl(ulong firstMessageIdRequestedByClient, int maxMessages) - { - ulong nextFreeMessageId = (ulong)Volatile.Read(ref _nextFreeMessageId); - - // Case 1: - // The client is already up-to-date with the message store, so we return no data. - if (nextFreeMessageId <= firstMessageIdRequestedByClient) - { - return new MessageStoreResult(firstMessageIdRequestedByClient, _emptyArraySegment, hasMoreData: false); - } - - // look for the fragment containing the start of the data requested by the client - ulong fragmentNum; - int idxIntoFragmentsArray, idxIntoFragment; - GetFragmentOffsets(firstMessageIdRequestedByClient, out fragmentNum, out idxIntoFragmentsArray, out idxIntoFragment); - Fragment thisFragment = _fragments[idxIntoFragmentsArray]; - ulong firstMessageIdInThisFragment = GetMessageId(thisFragment.FragmentNum, offset: _offset); - ulong firstMessageIdInNextFragment = firstMessageIdInThisFragment + _fragmentSize; - - // Case 2: - // This fragment contains the first part of the data the client requested. - if (firstMessageIdInThisFragment <= firstMessageIdRequestedByClient && firstMessageIdRequestedByClient < firstMessageIdInNextFragment) - { - int count = (int)(Math.Min(nextFreeMessageId, firstMessageIdInNextFragment) - firstMessageIdRequestedByClient); - - // Limit the number of messages the caller sees - count = Math.Min(count, maxMessages); - - ArraySegment retMessages = new ArraySegment(thisFragment.Data, idxIntoFragment, count); - - return new MessageStoreResult(firstMessageIdRequestedByClient, retMessages, hasMoreData: (nextFreeMessageId > firstMessageIdInNextFragment)); - } - - // Case 3: - // The client has missed messages, so we need to send him the earliest fragment we have. - while (true) - { - GetFragmentOffsets(nextFreeMessageId, out fragmentNum, out idxIntoFragmentsArray, out idxIntoFragment); - Fragment tailFragment = _fragments[(idxIntoFragmentsArray + 1) % _fragments.Length]; - if (tailFragment.FragmentNum < fragmentNum) - { - firstMessageIdInThisFragment = GetMessageId(tailFragment.FragmentNum, offset: _offset); - int count = Math.Min(maxMessages, tailFragment.Data.Length); - return new MessageStoreResult(firstMessageIdInThisFragment, new ArraySegment(tailFragment.Data, 0, count), hasMoreData: true); - } - nextFreeMessageId = (ulong)Volatile.Read(ref _nextFreeMessageId); - } - } - - private bool TryAddImpl(T message, out ulong newMessageId) - { - ulong nextFreeMessageId = (ulong)Volatile.Read(ref _nextFreeMessageId); - - // locate the fragment containing the next free id, which is where we should write - ulong fragmentNum; - int idxIntoFragmentsArray, idxIntoFragment; - GetFragmentOffsets(nextFreeMessageId, out fragmentNum, out idxIntoFragmentsArray, out idxIntoFragment); - Fragment fragment = _fragments[idxIntoFragmentsArray]; - - if (fragment == null || fragment.FragmentNum < fragmentNum) - { - // the fragment is outdated (or non-existent) and must be replaced - - if (idxIntoFragment == 0) - { - // this thread is responsible for creating the fragment - Fragment newFragment = new Fragment(fragmentNum, _fragmentSize); - newFragment.Data[0] = message; - Fragment existingFragment = Interlocked.CompareExchange(ref _fragments[idxIntoFragmentsArray], newFragment, fragment); - if (existingFragment == fragment) - { - newMessageId = GetMessageId(fragmentNum, offset: _offset); - return true; - } - } - - // another thread is responsible for updating the fragment, so fall to bottom of method - } - else if (fragment.FragmentNum == fragmentNum) - { - // the fragment is valid, and we can just try writing into it until we reach the end of the fragment - T[] fragmentData = fragment.Data; - for (int i = idxIntoFragment; i < fragmentData.Length; i++) - { - T originalMessage = Interlocked.CompareExchange(ref fragmentData[i], message, null); - if (originalMessage == null) - { - newMessageId = GetMessageId(fragmentNum, offset: (uint)i); - return true; - } - } - - // another thread used the last open space in this fragment, so fall to bottom of method - } - - // failure; caller will retry operation - newMessageId = 0; - return false; - } - - private sealed class Fragment - { - public readonly ulong FragmentNum; - public readonly T[] Data; - - public Fragment(ulong fragmentNum, uint fragmentSize) - { - FragmentNum = fragmentNum; - Data = new T[fragmentSize]; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageStoreResult.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageStoreResult.cs deleted file mode 100644 index 665c887d4..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/MessageStoreResult.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - // Represents the result of a call to MessageStore.GetMessages. - [SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes", Justification = "This is never compared")] - public struct MessageStoreResult where T : class - { - // The first message ID in the result set. Messages in the result set have sequentually increasing IDs. - // If FirstMessageId = 20 and Messages.Length = 4, then the messages have IDs { 20, 21, 22, 23 }. - private readonly ulong _firstMessageId; - - // If this is true, the backing MessageStore contains more messages, and the client should call GetMessages again. - private readonly bool _hasMoreData; - - // The actual result set. May be empty. - private readonly ArraySegment _messages; - - public MessageStoreResult(ulong firstMessageId, ArraySegment messages, bool hasMoreData) - { - _firstMessageId = firstMessageId; - _messages = messages; - _hasMoreData = hasMoreData; - } - - public ulong FirstMessageId - { - get - { - return _firstMessageId; - } - } - - public bool HasMoreData - { - get - { - return _hasMoreData; - } - } - - public ArraySegment Messages - { - get - { - return _messages; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutConfiguration.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutConfiguration.cs deleted file mode 100644 index 1ac31f354..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutConfiguration.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - /// - /// Common settings for scale-out message bus implementations. - /// - public class ScaleoutConfiguration - { - public static readonly int DisableQueuing = 0; - - private int _maxQueueLength; - - /// - /// The maximum length of the outgoing send queue. Messages being sent to the backplane are queued - /// up to this length. After the max length is reached, further sends will throw an InvalidOperationException. - /// Set to ScaleoutConfiguration.DisableQueuing to disable queing. - /// Defaults to disabled. - /// - public virtual int MaxQueueLength - { - get - { - return _maxQueueLength; - } - set - { - if (value < 0) - { - throw new ArgumentOutOfRangeException("value"); - } - - _maxQueueLength = value; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMapping.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMapping.cs deleted file mode 100644 index 15fefa51c..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMapping.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public class ScaleoutMapping - { - public ScaleoutMapping(ulong id, ScaleoutMessage message) - : this(id, message, ListHelper.Empty) - { - } - - public ScaleoutMapping(ulong id, ScaleoutMessage message, IList localKeyInfo) - { - if (message == null) - { - throw new ArgumentNullException("message"); - } - - if (localKeyInfo == null) - { - throw new ArgumentNullException("localKeyInfo"); - } - - Id = id; - LocalKeyInfo = localKeyInfo; - ServerCreationTime = message.ServerCreationTime; - } - - public ulong Id { get; private set; } - public IList LocalKeyInfo { get; private set; } - public DateTime ServerCreationTime { get; private set; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMappingStore.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMappingStore.cs deleted file mode 100644 index 4c70376fb..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMappingStore.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public class ScaleoutMappingStore - { - private const int MaxMessages = 1000000; - - private ScaleoutStore _store; - - public ScaleoutMappingStore() - { - _store = new ScaleoutStore(MaxMessages); - } - - public void Add(ulong id, ScaleoutMessage message, IList localKeyInfo) - { - if (MaxMapping != null && id < MaxMapping.Id) - { - _store = new ScaleoutStore(MaxMessages); - } - - _store.Add(new ScaleoutMapping(id, message, localKeyInfo)); - } - - public ScaleoutMapping MaxMapping - { - get - { - return _store.MaxMapping; - } - } - - public IEnumerator GetEnumerator(ulong id) - { - MessageStoreResult result = _store.GetMessagesByMappingId(id); - - return new ScaleoutStoreEnumerator(_store, result); - } - - private struct ScaleoutStoreEnumerator : IEnumerator, IEnumerator - { - private readonly WeakReference _storeReference; - private MessageStoreResult _result; - private int _offset; - private int _length; - private ulong _nextId; - - public ScaleoutStoreEnumerator(ScaleoutStore store, MessageStoreResult result) - : this() - { - _storeReference = new WeakReference(store); - Initialize(result); - } - - public ScaleoutMapping Current - { - get - { - return _result.Messages.Array[_offset]; - } - } - - public void Dispose() - { - - } - - object IEnumerator.Current - { - get { return Current; } - } - - public bool MoveNext() - { - _offset++; - - if (_offset < _length) - { - return true; - } - - if (!_result.HasMoreData) - { - return false; - } - - // If the store falls out of scope - var store = (ScaleoutStore)_storeReference.Target; - - if (store == null) - { - return false; - } - - // Get the next result - MessageStoreResult result = store.GetMessages(_nextId); - Initialize(result); - - _offset++; - - return _offset < _length; - } - - public void Reset() - { - throw new NotSupportedException(); - } - - private void Initialize(MessageStoreResult result) - { - _result = result; - _offset = _result.Messages.Offset - 1; - _length = _result.Messages.Offset + _result.Messages.Count; - _nextId = _result.FirstMessageId + (ulong)_result.Messages.Count; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMessage.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMessage.cs deleted file mode 100644 index c1aa3993a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMessage.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.IO; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - /// - /// Represents a message to the scaleout backplane - /// - public class ScaleoutMessage - { - public ScaleoutMessage(IList messages) - { - Messages = messages; - ServerCreationTime = DateTime.UtcNow; - } - - public ScaleoutMessage() - { - } - - /// - /// The messages from SignalR - /// - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "This type is used for serialization")] - public IList Messages { get; set; } - - /// - /// The time the message was created on the origin server - /// - public DateTime ServerCreationTime { get; set; } - - public byte[] ToBytes() - { - using (var ms = new MemoryStream()) - { - var binaryWriter = new BinaryWriter(ms); - - binaryWriter.Write(Messages.Count); - for (int i = 0; i < Messages.Count; i++) - { - Messages[i].WriteTo(ms); - } - binaryWriter.Write(ServerCreationTime.Ticks); - - return ms.ToArray(); - } - } - - public static ScaleoutMessage FromBytes(byte[] data) - { - if (data == null) - { - throw new ArgumentNullException("data"); - } - - using (var stream = new MemoryStream(data)) - { - var binaryReader = new BinaryReader(stream); - var message = new ScaleoutMessage(); - message.Messages = new List(); - int count = binaryReader.ReadInt32(); - for (int i = 0; i < count; i++) - { - message.Messages.Add(Message.ReadFrom(stream)); - } - message.ServerCreationTime = new DateTime(binaryReader.ReadInt64()); - - return message; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMessageBus.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMessageBus.cs deleted file mode 100644 index 9c5c5d944..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutMessageBus.cs +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Tracing; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - /// - /// Common base class for scaleout message bus implementations. - /// - public abstract class ScaleoutMessageBus : MessageBus - { - private readonly SipHashBasedStringEqualityComparer _sipHashBasedComparer = new SipHashBasedStringEqualityComparer(0, 0); - private readonly TraceSource _trace; - private readonly Lazy _streamManager; - private readonly IPerformanceCounterManager _perfCounters; - - protected ScaleoutMessageBus(IDependencyResolver resolver, ScaleoutConfiguration configuration) - : base(resolver) - { - if (configuration == null) - { - throw new ArgumentNullException("configuration"); - } - - var traceManager = resolver.Resolve(); - _trace = traceManager["SignalR." + typeof(ScaleoutMessageBus).Name]; - _perfCounters = resolver.Resolve(); - _streamManager = new Lazy(() => new ScaleoutStreamManager(Send, OnReceivedCore, StreamCount, _trace, _perfCounters, configuration)); - } - - /// - /// The number of streams can't change for the lifetime of this instance. - /// - protected virtual int StreamCount - { - get - { - return 1; - } - } - - private ScaleoutStreamManager StreamManager - { - get - { - return _streamManager.Value; - } - } - - /// - /// Opens the specified queue for sending messages. - /// The index of the stream to open. - /// - protected void Open(int streamIndex) - { - StreamManager.Open(streamIndex); - } - - /// - /// Closes the specified queue. - /// The index of the stream to close. - /// - protected void Close(int streamIndex) - { - StreamManager.Close(streamIndex); - } - - /// - /// Closes the specified queue for sending messages making all sends fail asynchronously. - /// - /// The index of the stream to close. - /// The error that occurred. - protected void OnError(int streamIndex, Exception exception) - { - StreamManager.OnError(streamIndex, exception); - } - - /// - /// Sends messages to the backplane - /// - /// The list of messages to send - /// - protected virtual Task Send(IList messages) - { - // If we're only using a single stream then just send - if (StreamCount == 1) - { - return StreamManager.Send(0, messages); - } - - var taskCompletionSource = new TaskCompletionSource(); - - // Group messages by source (connection id) - var messagesBySource = messages.GroupBy(m => m.Source); - - SendImpl(messagesBySource.GetEnumerator(), taskCompletionSource); - - return taskCompletionSource.Task; - } - - protected virtual Task Send(int streamIndex, IList messages) - { - throw new NotImplementedException(); - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "We return a faulted tcs")] - private void SendImpl(IEnumerator> enumerator, TaskCompletionSource taskCompletionSource) - { - send: - - if (!enumerator.MoveNext()) - { - taskCompletionSource.TrySetResult(null); - } - else - { - IGrouping group = enumerator.Current; - - // Get the channel index we're going to use for this message - int index = (int)((uint)_sipHashBasedComparer.GetHashCode(group.Key) % StreamCount); - - Debug.Assert(index >= 0, "Hash function resulted in an index < 0."); - - Task sendTask = StreamManager.Send(index, group.ToArray()).Catch(); - - if (sendTask.IsCompleted) - { - try - { - sendTask.Wait(); - - goto send; - - } - catch (Exception ex) - { - taskCompletionSource.SetUnwrappedException(ex); - } - } - else - { - sendTask.Then((enumer, tcs) => SendImpl(enumer, tcs), enumerator, taskCompletionSource) - .ContinueWithNotComplete(taskCompletionSource); - } - } - } - - /// - /// Invoked when a payload is received from the backplane. There should only be one active call at any time. - /// - /// id of the stream. - /// id of the payload within that stream. - /// The scaleout message. - /// - protected virtual void OnReceived(int streamIndex, ulong id, ScaleoutMessage message) - { - StreamManager.OnReceived(streamIndex, id, message); - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "2", Justification = "Called from derived class")] - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "Called from derived class")] - private void OnReceivedCore(int streamIndex, ulong id, ScaleoutMessage scaleoutMessage) - { - Counters.ScaleoutMessageBusMessagesReceivedPerSec.IncrementBy(scaleoutMessage.Messages.Count); - - _trace.TraceInformation("OnReceived({0}, {1}, {2})", streamIndex, id, scaleoutMessage.Messages.Count); - - var localMapping = new LocalEventKeyInfo[scaleoutMessage.Messages.Count]; - var keys = new HashSet(); - - for (var i = 0; i < scaleoutMessage.Messages.Count; ++i) - { - Message message = scaleoutMessage.Messages[i]; - - // Remember where this message came from - message.MappingId = id; - message.StreamIndex = streamIndex; - - keys.Add(message.Key); - ulong localId = Save(message); - MessageStore messageStore = Topics[message.Key].Store; - - localMapping[i] = new LocalEventKeyInfo(message.Key, localId, messageStore); - } - - // Get the stream for this payload - ScaleoutMappingStore store = StreamManager.Streams[streamIndex]; - - // Publish only after we've setup the mapping fully - store.Add(id, scaleoutMessage, localMapping); - - // Schedule after we're done - foreach (var eventKey in keys) - { - ScheduleEvent(eventKey); - } - } - - public override Task Publish(Message message) - { - Counters.MessageBusMessagesPublishedTotal.Increment(); - Counters.MessageBusMessagesPublishedPerSec.Increment(); - - // TODO: Implement message batching here - return Send(new[] { message }); - } - - protected override void Dispose(bool disposing) - { - // Close all streams - for (int i = 0; i < StreamCount; i++) - { - Close(i); - } - - base.Dispose(disposing); - } - - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "Called from derived class")] - protected override Subscription CreateSubscription(ISubscriber subscriber, string cursor, Func> callback, int messageBufferSize, object state) - { - return new ScaleoutSubscription(subscriber.Identity, subscriber.EventKeys, cursor, StreamManager.Streams, callback, messageBufferSize, Counters, state); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStore.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStore.cs deleted file mode 100644 index 605447d82..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStore.cs +++ /dev/null @@ -1,440 +0,0 @@ -using System; -using System.Diagnostics.CodeAnalysis; -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - // Represents a message store that is backed by a ring buffer. - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "The rate sampler doesn't need to be disposed")] - public sealed class ScaleoutStore - { - private const uint _minFragmentCount = 4; - - [SuppressMessage("Microsoft.Performance", "CA1802:UseLiteralsWhereAppropriate", Justification = "It's conditional based on architecture")] - private static readonly uint _maxFragmentSize = (IntPtr.Size == 4) ? (uint)16384 : (uint)8192; // guarantees that fragments never end up in the LOH - - private static readonly ArraySegment _emptyArraySegment = new ArraySegment(new ScaleoutMapping[0]); - - private Fragment[] _fragments; - private readonly uint _fragmentSize; - - private long _minMessageId; - private long _nextFreeMessageId; - - private ulong _minMappingId; - private ScaleoutMapping _maxMapping; - - // Creates a message store with the specified capacity. The actual capacity will be *at least* the - // specified value. That is, GetMessages may return more data than 'capacity'. - public ScaleoutStore(uint capacity) - { - // set a minimum capacity - if (capacity < 32) - { - capacity = 32; - } - - // Dynamically choose an appropriate number of fragments and the size of each fragment. - // This is chosen to avoid allocations on the large object heap and to minimize contention - // in the store. We allocate a small amount of additional space to act as an overflow - // buffer; this increases throughput of the data structure. - checked - { - uint fragmentCount = Math.Max(_minFragmentCount, capacity / _maxFragmentSize); - _fragmentSize = Math.Min((capacity + fragmentCount - 1) / fragmentCount, _maxFragmentSize); - _fragments = new Fragment[fragmentCount + 1]; // +1 for the overflow buffer - } - } - - internal ulong MinMappingId - { - get - { - return _minMappingId; - } - } - - public ScaleoutMapping MaxMapping - { - get - { - return _maxMapping; - } - } - - public uint FragmentSize - { - get - { - return _fragmentSize; - } - } - - public int FragmentCount - { - get - { - return _fragments.Length; - } - } - - // Adds a message to the store. Returns the ID of the newly added message. - public ulong Add(ScaleoutMapping mapping) - { - // keep looping in TryAddImpl until it succeeds - ulong newMessageId; - while (!TryAddImpl(mapping, out newMessageId)) ; - - // When TryAddImpl succeeds, record the fact that a message was just added to the - // store. We increment the next free id rather than set it explicitly since - // multiple threads might be trying to write simultaneously. There is a nifty - // side effect to this: _nextFreeMessageId will *always* return the total number - // of messages that *all* threads agree have ever been added to the store. (The - // actual number may be higher, but this field will eventually catch up as threads - // flush data.) - Interlocked.Increment(ref _nextFreeMessageId); - return newMessageId; - } - - private void GetFragmentOffsets(ulong messageId, out ulong fragmentNum, out int idxIntoFragmentsArray, out int idxIntoFragment) - { - fragmentNum = messageId / _fragmentSize; - - // from the bucket number, we can figure out where in _fragments this data sits - idxIntoFragmentsArray = (int)(fragmentNum % (uint)_fragments.Length); - idxIntoFragment = (int)(messageId % _fragmentSize); - } - - private int GetFragmentOffset(ulong messageId) - { - ulong fragmentNum = messageId / _fragmentSize; - - return (int)(fragmentNum % (uint)_fragments.Length); - } - - private ulong GetMessageId(ulong fragmentNum, uint offset) - { - return fragmentNum * _fragmentSize + offset; - } - - private bool TryAddImpl(ScaleoutMapping mapping, out ulong newMessageId) - { - ulong nextFreeMessageId = (ulong)Volatile.Read(ref _nextFreeMessageId); - - // locate the fragment containing the next free id, which is where we should write - ulong fragmentNum; - int idxIntoFragmentsArray, idxIntoFragment; - GetFragmentOffsets(nextFreeMessageId, out fragmentNum, out idxIntoFragmentsArray, out idxIntoFragment); - Fragment fragment = _fragments[idxIntoFragmentsArray]; - - if (fragment == null || fragment.FragmentNum < fragmentNum) - { - // the fragment is outdated (or non-existent) and must be replaced - bool overwrite = fragment != null && fragment.FragmentNum < fragmentNum; - - if (idxIntoFragment == 0) - { - // this thread is responsible for creating the fragment - Fragment newFragment = new Fragment(fragmentNum, _fragmentSize); - newFragment.Data[0] = mapping; - Fragment existingFragment = Interlocked.CompareExchange(ref _fragments[idxIntoFragmentsArray], newFragment, fragment); - if (existingFragment == fragment) - { - newMessageId = GetMessageId(fragmentNum, offset: 0); - newFragment.MinId = newMessageId; - newFragment.Length = 1; - newFragment.MaxId = GetMessageId(fragmentNum, offset: _fragmentSize - 1); - _maxMapping = mapping; - - // Move the minimum id when we overwrite - if (overwrite) - { - _minMessageId = (long)(existingFragment.MaxId + 1); - _minMappingId = existingFragment.MaxId; - } - else if (idxIntoFragmentsArray == 0) - { - _minMappingId = mapping.Id; - } - - return true; - } - } - - // another thread is responsible for updating the fragment, so fall to bottom of method - } - else if (fragment.FragmentNum == fragmentNum) - { - // the fragment is valid, and we can just try writing into it until we reach the end of the fragment - ScaleoutMapping[] fragmentData = fragment.Data; - for (int i = idxIntoFragment; i < fragmentData.Length; i++) - { - ScaleoutMapping originalMapping = Interlocked.CompareExchange(ref fragmentData[i], mapping, null); - if (originalMapping == null) - { - newMessageId = GetMessageId(fragmentNum, offset: (uint)i); - fragment.Length++; - _maxMapping = fragmentData[i]; - return true; - } - } - - // another thread used the last open space in this fragment, so fall to bottom of method - } - - // failure; caller will retry operation - newMessageId = 0; - return false; - } - - public MessageStoreResult GetMessages(ulong firstMessageIdRequestedByClient) - { - ulong nextFreeMessageId = (ulong)Volatile.Read(ref _nextFreeMessageId); - - // Case 1: - // The client is already up-to-date with the message store, so we return no data. - if (nextFreeMessageId <= firstMessageIdRequestedByClient) - { - return new MessageStoreResult(firstMessageIdRequestedByClient, _emptyArraySegment, hasMoreData: false); - } - - // look for the fragment containing the start of the data requested by the client - ulong fragmentNum; - int idxIntoFragmentsArray, idxIntoFragment; - GetFragmentOffsets(firstMessageIdRequestedByClient, out fragmentNum, out idxIntoFragmentsArray, out idxIntoFragment); - Fragment thisFragment = _fragments[idxIntoFragmentsArray]; - ulong firstMessageIdInThisFragment = GetMessageId(thisFragment.FragmentNum, offset: 0); - ulong firstMessageIdInNextFragment = firstMessageIdInThisFragment + _fragmentSize; - - // Case 2: - // This fragment contains the first part of the data the client requested. - if (firstMessageIdInThisFragment <= firstMessageIdRequestedByClient && firstMessageIdRequestedByClient < firstMessageIdInNextFragment) - { - int count = (int)(Math.Min(nextFreeMessageId, firstMessageIdInNextFragment) - firstMessageIdRequestedByClient); - - var retMessages = new ArraySegment(thisFragment.Data, idxIntoFragment, count); - - return new MessageStoreResult(firstMessageIdRequestedByClient, retMessages, hasMoreData: (nextFreeMessageId > firstMessageIdInNextFragment)); - } - - // Case 3: - // The client has missed messages, so we need to send him the earliest fragment we have. - while (true) - { - GetFragmentOffsets(nextFreeMessageId, out fragmentNum, out idxIntoFragmentsArray, out idxIntoFragment); - Fragment tailFragment = _fragments[(idxIntoFragmentsArray + 1) % _fragments.Length]; - if (tailFragment.FragmentNum < fragmentNum) - { - firstMessageIdInThisFragment = GetMessageId(tailFragment.FragmentNum, offset: 0); - - return new MessageStoreResult(firstMessageIdInThisFragment, new ArraySegment(tailFragment.Data, 0, tailFragment.Length), hasMoreData: true); - } - nextFreeMessageId = (ulong)Volatile.Read(ref _nextFreeMessageId); - } - } - - public MessageStoreResult GetMessagesByMappingId(ulong mappingId) - { - var minMessageId = (ulong)Volatile.Read(ref _minMessageId); - - int idxIntoFragment; - // look for the fragment containing the start of the data requested by the client - Fragment thisFragment; - if (TryGetFragmentFromMappingId(mappingId, out thisFragment)) - { - int lastSearchIndex; - ulong lastSearchId; - if (thisFragment.TrySearch(mappingId, - out idxIntoFragment, - out lastSearchIndex, - out lastSearchId)) - { - // Skip the first message - idxIntoFragment++; - ulong firstMessageIdRequestedByClient = GetMessageId(thisFragment.FragmentNum, (uint)idxIntoFragment); - - return GetMessages(firstMessageIdRequestedByClient); - } - else - { - if (mappingId > lastSearchId) - { - lastSearchIndex++; - } - - var segment = new ArraySegment(thisFragment.Data, - lastSearchIndex, - thisFragment.Length - lastSearchIndex); - - var firstMessageIdInThisFragment = GetMessageId(thisFragment.FragmentNum, offset: (uint)lastSearchIndex); - - return new MessageStoreResult(firstMessageIdInThisFragment, - segment, - hasMoreData: true); - } - } - - // If we're expired or we're at the first mapping or we're lower than the - // min then get everything - if (mappingId < _minMappingId || mappingId == UInt64.MaxValue) - { - return GetAllMessages(minMessageId); - } - - // We're up to date so do nothing - return new MessageStoreResult(0, _emptyArraySegment, hasMoreData: false); - } - - private MessageStoreResult GetAllMessages(ulong minMessageId) - { - ulong fragmentNum; - int idxIntoFragmentsArray, idxIntoFragment; - GetFragmentOffsets(minMessageId, out fragmentNum, out idxIntoFragmentsArray, out idxIntoFragment); - - Fragment fragment = _fragments[idxIntoFragmentsArray]; - - if (fragment == null) - { - return new MessageStoreResult(minMessageId, _emptyArraySegment, hasMoreData: false); - } - - var firstMessageIdInThisFragment = GetMessageId(fragment.FragmentNum, offset: 0); - - var messages = new ArraySegment(fragment.Data, 0, fragment.Length); - - return new MessageStoreResult(firstMessageIdInThisFragment, messages, hasMoreData: true); - } - - internal bool TryGetFragmentFromMappingId(ulong mappingId, out Fragment fragment) - { - long low = _minMessageId; - long high = _nextFreeMessageId; - - while (low <= high) - { - var mid = (ulong)((low + high) / 2); - - int midOffset = GetFragmentOffset(mid); - - fragment = _fragments[midOffset]; - - if (fragment == null) - { - return false; - } - - if (mappingId < fragment.MinValue) - { - high = (long)(fragment.MinId - 1); - } - else if (mappingId > fragment.MaxValue) - { - low = (long)(fragment.MaxId + 1); - } - else if (fragment.HasValue(mappingId)) - { - return true; - } - } - - fragment = null; - return false; - } - - internal sealed class Fragment - { - public readonly ulong FragmentNum; - public readonly ScaleoutMapping[] Data; - public int Length; - public ulong MinId; - public ulong MaxId; - - public Fragment(ulong fragmentNum, uint fragmentSize) - { - FragmentNum = fragmentNum; - Data = new ScaleoutMapping[fragmentSize]; - } - - public ulong? MinValue - { - get - { - var mapping = Data[0]; - if (mapping != null) - { - return mapping.Id; - } - - return null; - } - } - - public ulong? MaxValue - { - get - { - ScaleoutMapping mapping = null; - - if (Length == 0) - { - mapping = Data[Length]; - } - else - { - mapping = Data[Length - 1]; - } - - if (mapping != null) - { - return mapping.Id; - } - - return null; - } - } - - public bool HasValue(ulong id) - { - return id >= MinValue && id <= MaxValue; - } - - public bool TrySearch(ulong id, out int index, out int lastSearchIndex, out ulong lastSearchId) - { - lastSearchIndex = 0; - lastSearchId = id; - - var low = 0; - var high = Length; - - - while (low <= high) - { - int mid = (low + high) / 2; - - ScaleoutMapping mapping = Data[mid]; - - lastSearchIndex = mid; - lastSearchId = mapping.Id; - - if (id < mapping.Id) - { - high = mid - 1; - } - else if (id > mapping.Id) - { - low = mid + 1; - } - else if (id == mapping.Id) - { - index = mid; - return true; - } - } - - index = -1; - return false; - } - } - } - -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStream.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStream.cs deleted file mode 100644 index 29c359a77..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStream.cs +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - internal class ScaleoutStream - { - private TaskCompletionSource _taskCompletionSource; - private TaskQueue _queue; - private StreamState _state; - private Exception _error; - - private readonly int _size; - private readonly TraceSource _trace; - private readonly string _tracePrefix; - private readonly IPerformanceCounterManager _perfCounters; - - private readonly object _lockObj = new object(); - - public ScaleoutStream(TraceSource trace, string tracePrefix, int size, IPerformanceCounterManager performanceCounters) - { - if (trace == null) - { - throw new ArgumentNullException("trace"); - } - - _trace = trace; - _tracePrefix = tracePrefix; - _size = size; - _perfCounters = performanceCounters; - - InitializeCore(); - } - - private bool UsingTaskQueue - { - get - { - return _size > 0; - } - } - - public void Open() - { - lock (_lockObj) - { - if (ChangeState(StreamState.Open)) - { - _perfCounters.ScaleoutStreamCountOpen.Increment(); - _perfCounters.ScaleoutStreamCountBuffering.Decrement(); - - _error = null; - - if (UsingTaskQueue) - { - _taskCompletionSource.TrySetResult(null); - } - } - } - } - - public Task Send(Func send, object state) - { - lock (_lockObj) - { - if (_error != null) - { - throw _error; - } - - // If the queue is closed then stop sending - if (_state == StreamState.Closed) - { - throw new InvalidOperationException(Resources.Error_StreamClosed); - } - - if (_state == StreamState.Initial) - { - throw new InvalidOperationException(Resources.Error_StreamNotOpen); - } - - var context = new SendContext(this, send, state); - - if (UsingTaskQueue) - { - Task task = _queue.Enqueue(Send, context); - - if (task == null) - { - // The task is null if the queue is full - throw new InvalidOperationException(Resources.Error_TaskQueueFull); - } - - // Always observe the task in case the user doesn't handle it - return task.Catch(); - } - - _perfCounters.ScaleoutSendQueueLength.Increment(); - return Send(context).Finally(counter => - { - ((IPerformanceCounter)counter).Decrement(); - }, - _perfCounters.ScaleoutSendQueueLength); - } - } - - public void SetError(Exception error) - { - Trace("Error has happened with the following exception: {0}.", error); - - lock (_lockObj) - { - _perfCounters.ScaleoutErrorsTotal.Increment(); - _perfCounters.ScaleoutErrorsPerSec.Increment(); - - Buffer(); - - _error = error; - } - } - - public void Close() - { - Task task = TaskAsyncHelper.Empty; - - lock (_lockObj) - { - if (ChangeState(StreamState.Closed)) - { - _perfCounters.ScaleoutStreamCountOpen.RawValue = 0; - _perfCounters.ScaleoutStreamCountBuffering.RawValue = 0; - - if (UsingTaskQueue) - { - // Ensure the queue is started - EnsureQueueStarted(); - - // Drain the queue to stop all sends - task = Drain(_queue); - } - } - } - - if (UsingTaskQueue) - { - // Block until the queue is drained so no new work can be done - task.Wait(); - } - } - - private static Task Send(object state) - { - var context = (SendContext)state; - - context.InvokeSend().Then(tcs => - { - // Complete the task if the send is successful - tcs.TrySetResult(null); - }, - context.TaskCompletionSource) - .Catch((ex, obj) => - { - var ctx = (SendContext)obj; - - ctx.Stream.Trace("Send failed: {0}", ex); - - lock (ctx.Stream._lockObj) - { - // Set the queue into buffering state - ctx.Stream.SetError(ex.InnerException); - - // Otherwise just set this task as failed - ctx.TaskCompletionSource.TrySetUnwrappedException(ex); - } - }, - context); - - return context.TaskCompletionSource.Task; - } - - private void Buffer() - { - lock (_lockObj) - { - if (ChangeState(StreamState.Buffering)) - { - _perfCounters.ScaleoutStreamCountOpen.Decrement(); - _perfCounters.ScaleoutStreamCountBuffering.Increment(); - - InitializeCore(); - } - } - } - - private void InitializeCore() - { - if (UsingTaskQueue) - { - Task task = DrainQueue(); - _queue = new TaskQueue(task, _size); - _queue.QueueSizeCounter = _perfCounters.ScaleoutSendQueueLength; - } - } - - private Task DrainQueue() - { - // If the tcs is null or complete then create a new one - if (_taskCompletionSource == null || - _taskCompletionSource.Task.IsCompleted) - { - _taskCompletionSource = new TaskCompletionSource(); - } - - if (_queue != null) - { - // Drain the queue when the new queue is open - return _taskCompletionSource.Task.Then(q => Drain(q), _queue); - } - - // Nothing to drain - return _taskCompletionSource.Task; - } - - private void EnsureQueueStarted() - { - if (_taskCompletionSource != null) - { - _taskCompletionSource.TrySetResult(null); - } - } - - private bool ChangeState(StreamState newState) - { - // Do nothing if the state is closed - if (_state == StreamState.Closed) - { - return false; - } - - if (_state != newState) - { - Trace("Changed state from {0} to {1}", _state, newState); - - _state = newState; - return true; - } - - return false; - } - - private static Task Drain(TaskQueue queue) - { - if (queue == null) - { - return TaskAsyncHelper.Empty; - } - - var tcs = new TaskCompletionSource(); - - queue.Drain().Catch().ContinueWith(task => - { - tcs.SetResult(null); - }); - - return tcs.Task; - } - - private void Trace(string value, params object[] args) - { - _trace.TraceInformation(_tracePrefix + " - " + value, args); - } - - private class SendContext - { - private readonly Func _send; - private readonly object _state; - - public readonly ScaleoutStream Stream; - public readonly TaskCompletionSource TaskCompletionSource; - - public SendContext(ScaleoutStream stream, Func send, object state) - { - Stream = stream; - TaskCompletionSource = new TaskCompletionSource(); - _send = send; - _state = state; - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The exception flows to the caller")] - public Task InvokeSend() - { - try - { - return _send(_state); - } - catch (Exception ex) - { - return TaskAsyncHelper.FromError(ex); - } - } - } - - private enum StreamState - { - Initial, - Open, - Buffering, - Closed - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStreamManager.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStreamManager.cs deleted file mode 100644 index 003822377..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutStreamManager.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - internal class ScaleoutStreamManager - { - private readonly Func, Task> _send; - private readonly Action _receive; - private readonly ScaleoutStream[] _streams; - - public ScaleoutStreamManager(Func, Task> send, - Action receive, - int streamCount, - TraceSource trace, - IPerformanceCounterManager performanceCounters, - ScaleoutConfiguration configuration) - { - _streams = new ScaleoutStream[streamCount]; - _send = send; - _receive = receive; - - var receiveMapping = new ScaleoutMappingStore[streamCount]; - - performanceCounters.ScaleoutStreamCountTotal.RawValue = streamCount; - performanceCounters.ScaleoutStreamCountBuffering.RawValue = streamCount; - performanceCounters.ScaleoutStreamCountOpen.RawValue = 0; - - for (int i = 0; i < streamCount; i++) - { - _streams[i] = new ScaleoutStream(trace, "Stream(" + i + ")", configuration.MaxQueueLength, performanceCounters); - receiveMapping[i] = new ScaleoutMappingStore(); - } - - Streams = new ReadOnlyCollection(receiveMapping); - } - - public IList Streams { get; private set; } - - public void Open(int streamIndex) - { - _streams[streamIndex].Open(); - } - - public void Close(int streamIndex) - { - _streams[streamIndex].Close(); - } - - public void OnError(int streamIndex, Exception exception) - { - _streams[streamIndex].SetError(exception); - } - - public Task Send(int streamIndex, IList messages) - { - var context = new SendContext(this, streamIndex, messages); - - return _streams[streamIndex].Send(state => Send(state), context); - } - - public void OnReceived(int streamIndex, ulong id, ScaleoutMessage message) - { - _receive(streamIndex, id, message); - - // We assume if a message has come in then the stream is open - Open(streamIndex); - } - - private static Task Send(object state) - { - var context = (SendContext)state; - - return context.StreamManager._send(context.Index, context.Messages); - } - - private class SendContext - { - public ScaleoutStreamManager StreamManager; - public int Index; - public IList Messages; - - public SendContext(ScaleoutStreamManager scaleoutStream, int index, IList messages) - { - StreamManager = scaleoutStream; - Index = index; - Messages = messages; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutSubscription.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutSubscription.cs deleted file mode 100644 index d426f7a37..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/ScaleoutSubscription.cs +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public class ScaleoutSubscription : Subscription - { - private const string _scaleoutCursorPrefix = "s-"; - - private readonly IList _streams; - private readonly List _cursors; - - public ScaleoutSubscription(string identity, - IList eventKeys, - string cursor, - IList streams, - Func> callback, - int maxMessages, - IPerformanceCounterManager counters, - object state) - : base(identity, eventKeys, callback, maxMessages, counters, state) - { - if (streams == null) - { - throw new ArgumentNullException("streams"); - } - - _streams = streams; - - List cursors = null; - - if (String.IsNullOrEmpty(cursor)) - { - cursors = new List(); - } - else - { - cursors = Cursor.GetCursors(cursor, _scaleoutCursorPrefix); - - // If the cursor had a default prefix, "d-", cursors might be null - if (cursors == null) - { - cursors = new List(); - } - // If the streams don't match the cursors then throw it out - else if (cursors.Count != _streams.Count) - { - cursors.Clear(); - } - } - - // No cursors so we need to populate them from the list of streams - if (cursors.Count == 0) - { - for (int streamIndex = 0; streamIndex < _streams.Count; streamIndex++) - { - AddCursorForStream(streamIndex, cursors); - } - } - - _cursors = cursors; - } - - public override void WriteCursor(TextWriter textWriter) - { - Cursor.WriteCursors(textWriter, _cursors, _scaleoutCursorPrefix); - } - - [SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists", Justification = "The list needs to be populated")] - [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "It is called from the base class")] - protected override void PerformWork(IList> items, out int totalCount, out object state) - { - // The list of cursors represent (streamid, payloadid) - var nextCursors = new ulong?[_cursors.Count]; - totalCount = 0; - - // Get the enumerator so that we can extract messages for this subscription - IEnumerator> enumerator = GetMappings().GetEnumerator(); - - while (totalCount < MaxMessages && enumerator.MoveNext()) - { - ScaleoutMapping mapping = enumerator.Current.Item1; - int streamIndex = enumerator.Current.Item2; - - ulong? nextCursor = nextCursors[streamIndex]; - - // Only keep going with this stream if the cursor we're looking at is bigger than - // anything we already processed - if (nextCursor == null || mapping.Id > nextCursor) - { - ulong mappingId = ExtractMessages(streamIndex, mapping, items, ref totalCount); - - // Update the cursor id - nextCursors[streamIndex] = mappingId; - } - } - - state = nextCursors; - } - - protected override void BeforeInvoke(object state) - { - // Update the list of cursors before invoking anything - var nextCursors = (ulong?[])state; - for (int i = 0; i < _cursors.Count; i++) - { - // Only update non-null entries - ulong? nextCursor = nextCursors[i]; - - if (nextCursor.HasValue) - { - Cursor cursor = _cursors[i]; - - cursor.Id = nextCursor.Value; - } - } - } - - private IEnumerable> GetMappings() - { - var enumerators = new List(); - - for (var streamIndex = 0; streamIndex < _streams.Count; ++streamIndex) - { - // Get the mapping for this stream - ScaleoutMappingStore store = _streams[streamIndex]; - - Cursor cursor = _cursors[streamIndex]; - - // Try to find a local mapping for this payload - var enumerator = new CachedStreamEnumerator(store.GetEnumerator(cursor.Id), - streamIndex); - - enumerators.Add(enumerator); - } - - while (enumerators.Count > 0) - { - ScaleoutMapping minMapping = null; - CachedStreamEnumerator minEnumerator = null; - - for (int i = enumerators.Count - 1; i >= 0; i--) - { - CachedStreamEnumerator enumerator = enumerators[i]; - - ScaleoutMapping mapping; - if (enumerator.TryMoveNext(out mapping)) - { - if (minMapping == null || mapping.ServerCreationTime < minMapping.ServerCreationTime) - { - minMapping = mapping; - minEnumerator = enumerator; - } - } - else - { - enumerators.RemoveAt(i); - } - } - - if (minMapping != null) - { - minEnumerator.ClearCachedValue(); - yield return Tuple.Create(minMapping, minEnumerator.StreamIndex); - } - } - } - - private ulong ExtractMessages(int streamIndex, ScaleoutMapping mapping, IList> items, ref int totalCount) - { - // For each of the event keys we care about, extract all of the messages - // from the payload - lock (EventKeys) - { - for (var i = 0; i < EventKeys.Count; ++i) - { - string eventKey = EventKeys[i]; - - for (int j = 0; j < mapping.LocalKeyInfo.Count; j++) - { - LocalEventKeyInfo info = mapping.LocalKeyInfo[j]; - - if (info.MessageStore != null && info.Key.Equals(eventKey, StringComparison.OrdinalIgnoreCase)) - { - MessageStoreResult storeResult = info.MessageStore.GetMessages(info.Id, 1); - - if (storeResult.Messages.Count > 0) - { - // TODO: Figure out what to do when we have multiple event keys per mapping - Message message = storeResult.Messages.Array[storeResult.Messages.Offset]; - - // Only add the message to the list if the stream index matches - if (message.StreamIndex == streamIndex) - { - items.Add(storeResult.Messages); - totalCount += storeResult.Messages.Count; - - // We got a mapping id bigger than what we expected which - // means we missed messages. Use the new mappingId. - if (message.MappingId > mapping.Id) - { - return message.MappingId; - } - } - else - { - // REVIEW: When the stream indexes don't match should we leave the mapping id as is? - // If we do nothing then we'll end up querying old cursor ids until - // we eventually find a message id that matches this stream index. - } - } - } - } - } - } - - return mapping.Id; - } - - private void AddCursorForStream(int streamIndex, List cursors) - { - ScaleoutMapping maxMapping = _streams[streamIndex].MaxMapping; - - ulong id = UInt64.MaxValue; - string key = streamIndex.ToString(CultureInfo.InvariantCulture); - - if (maxMapping != null) - { - id = maxMapping.Id; - } - - var newCursor = new Cursor(key, id); - cursors.Add(newCursor); - } - - private class CachedStreamEnumerator - { - private readonly IEnumerator _enumerator; - private ScaleoutMapping _cachedValue; - - public CachedStreamEnumerator(IEnumerator enumerator, int streamIndex) - { - _enumerator = enumerator; - StreamIndex = streamIndex; - } - - public int StreamIndex { get; private set; } - - public bool TryMoveNext(out ScaleoutMapping mapping) - { - mapping = null; - - if (_cachedValue != null) - { - mapping = _cachedValue; - return true; - } - - if (_enumerator.MoveNext()) - { - mapping = _enumerator.Current; - _cachedValue = mapping; - return true; - } - - return false; - } - - public void ClearCachedValue() - { - _cachedValue = null; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/Subscription.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/Subscription.cs deleted file mode 100644 index 774ccbddc..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/Subscription.cs +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public abstract class Subscription : ISubscription, IDisposable - { - private readonly Func> _callback; - private readonly object _callbackState; - private readonly IPerformanceCounterManager _counters; - - private int _state; - private int _subscriptionState; - - private bool Alive - { - get - { - return _subscriptionState != SubscriptionState.Disposed; - } - } - - public string Identity { get; private set; } - - public IList EventKeys { get; private set; } - - public int MaxMessages { get; private set; } - - public IDisposable Disposable { get; set; } - - protected Subscription(string identity, IList eventKeys, Func> callback, int maxMessages, IPerformanceCounterManager counters, object state) - { - if (String.IsNullOrEmpty(identity)) - { - throw new ArgumentNullException("identity"); - } - - if (eventKeys == null) - { - throw new ArgumentNullException("eventKeys"); - } - - if (callback == null) - { - throw new ArgumentNullException("callback"); - } - - if (maxMessages < 0) - { - throw new ArgumentOutOfRangeException("maxMessages"); - } - - if (counters == null) - { - throw new ArgumentNullException("counters"); - } - - Identity = identity; - _callback = callback; - EventKeys = eventKeys; - MaxMessages = maxMessages; - _counters = counters; - _callbackState = state; - - _counters.MessageBusSubscribersTotal.Increment(); - _counters.MessageBusSubscribersCurrent.Increment(); - _counters.MessageBusSubscribersPerSec.Increment(); - } - - public virtual Task Invoke(MessageResult result) - { - return Invoke(result, state => { }, state: null); - } - - private Task Invoke(MessageResult result, Action beforeInvoke, object state) - { - // Change the state from idle to invoking callback - var prevState = Interlocked.CompareExchange(ref _subscriptionState, - SubscriptionState.InvokingCallback, - SubscriptionState.Idle); - - if (prevState == SubscriptionState.Disposed) - { - // Only allow terminal messages after dispose - if (!result.Terminal) - { - return TaskAsyncHelper.False; - } - } - - beforeInvoke(state); - - _counters.MessageBusMessagesReceivedTotal.IncrementBy(result.TotalCount); - _counters.MessageBusMessagesReceivedPerSec.IncrementBy(result.TotalCount); - - return _callback.Invoke(result, _callbackState).ContinueWith(task => - { - // Go from invoking callback to idle - Interlocked.CompareExchange(ref _subscriptionState, - SubscriptionState.Idle, - SubscriptionState.InvokingCallback); - return task; - }, - TaskContinuationOptions.ExecuteSynchronously).FastUnwrap(); - } - - public Task Work() - { - // Set the state to working - Interlocked.Exchange(ref _state, State.Working); - - var tcs = new TaskCompletionSource(); - - WorkImpl(tcs); - - return tcs.Task; - } - - public bool SetQueued() - { - return Interlocked.Increment(ref _state) == State.Working; - } - - public bool UnsetQueued() - { - // If we try to set the state to idle and we were not already in the working state then keep going - return Interlocked.CompareExchange(ref _state, State.Idle, State.Working) != State.Working; - } - - [SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times", Justification = "We have a sync and async code path.")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "We want to avoid user code taking the process down.")] - private void WorkImpl(TaskCompletionSource taskCompletionSource) - { - Process: - if (!Alive) - { - // If this subscription is dead then return immediately - taskCompletionSource.TrySetResult(null); - return; - } - - var items = new List>(); - int totalCount; - object state; - - PerformWork(items, out totalCount, out state); - - if (items.Count > 0) - { - var messageResult = new MessageResult(items, totalCount); - Task callbackTask = Invoke(messageResult, s => BeforeInvoke(s), state); - - if (callbackTask.IsCompleted) - { - try - { - // Make sure exceptions propagate - callbackTask.Wait(); - - if (callbackTask.Result) - { - // Sync path - goto Process; - } - else - { - // If we're done pumping messages through to this subscription - // then dispose - Dispose(); - - // If the callback said it's done then stop - taskCompletionSource.TrySetResult(null); - } - } - catch (Exception ex) - { - if (ex.InnerException is TaskCanceledException) - { - taskCompletionSource.TrySetCanceled(); - } - else - { - taskCompletionSource.TrySetUnwrappedException(ex); - } - } - } - else - { - WorkImplAsync(callbackTask, taskCompletionSource); - } - } - else - { - taskCompletionSource.TrySetResult(null); - } - } - - protected virtual void BeforeInvoke(object state) - { - } - - [SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists", Justification = "The list needs to be populated")] - [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "The caller wouldn't be able to specify what the generic type argument is")] - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#", Justification = "The count needs to be returned")] - [SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Justification = "The state needs to be set by the callee")] - protected abstract void PerformWork(IList> items, out int totalCount, out object state); - - private void WorkImplAsync(Task callbackTask, TaskCompletionSource taskCompletionSource) - { - // Async path - callbackTask.ContinueWith(task => - { - if (task.IsFaulted) - { - taskCompletionSource.TrySetUnwrappedException(task.Exception); - } - else if (task.IsCanceled) - { - taskCompletionSource.TrySetCanceled(); - } - else if (task.Result) - { - WorkImpl(taskCompletionSource); - } - else - { - // If we're done pumping messages through to this subscription - // then dispose - Dispose(); - - // If the callback said it's done then stop - taskCompletionSource.TrySetResult(null); - } - }); - } - - public virtual bool AddEvent(string key, Topic topic) - { - return AddEventCore(key); - } - - public virtual void RemoveEvent(string key) - { - lock (EventKeys) - { - EventKeys.Remove(key); - } - } - - public virtual void SetEventTopic(string key, Topic topic) - { - // Don't call AddEvent since that's virtual - AddEventCore(key); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - // REIVIEW: Consider sleeping instead of using a tight loop, or maybe timing out after some interval - // if the client is very slow then this invoke call might not end quickly and this will make the CPU - // hot waiting for the task to return. - - int disposeRetryCount = 0; - - while (true) - { - // Wait until the subscription isn't working anymore - var state = Interlocked.CompareExchange(ref _subscriptionState, - SubscriptionState.Disposed, - SubscriptionState.Idle); - - // If we're not working then stop - if (state != SubscriptionState.InvokingCallback || disposeRetryCount ++ > 10) - { - if (state != SubscriptionState.Disposed) - { - // Only decrement if we're not disposed already - _counters.MessageBusSubscribersCurrent.Decrement(); - _counters.MessageBusSubscribersPerSec.Decrement(); - } - - // Raise the disposed callback - if (Disposable != null) - { - Disposable.Dispose(); - } - - break; - } - - Thread.Sleep(500); - } - } - } - - public void Dispose() - { - Dispose(true); - } - - public abstract void WriteCursor(TextWriter textWriter); - - private bool AddEventCore(string key) - { - lock (EventKeys) - { - if (EventKeys.Contains(key)) - { - return false; - } - - EventKeys.Add(key); - return true; - } - } - - private static class State - { - public const int Idle = 0; - public const int Working = 1; - } - - private static class SubscriptionState - { - public const int Idle = 0; - public const int InvokingCallback = 1; - public const int Disposed = 2; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/Topic.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/Topic.cs deleted file mode 100644 index eab7934c1..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/Topic.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public class Topic - { - private readonly TimeSpan _lifespan; - - // Keeps track of the last time this subscription was used - private DateTime _lastUsed = DateTime.UtcNow; - - public IList Subscriptions { get; private set; } - public MessageStore Store { get; private set; } - public ReaderWriterLockSlim SubscriptionLock { get; private set; } - - // State of the topic - internal int State; - - public virtual bool IsExpired - { - get - { - try - { - SubscriptionLock.EnterReadLock(); - - TimeSpan timeSpan = DateTime.UtcNow - _lastUsed; - - return Subscriptions.Count == 0 && timeSpan > _lifespan; - } - finally - { - SubscriptionLock.ExitReadLock(); - } - } - } - - public DateTime LastUsed - { - get - { - return _lastUsed; - } - } - - public Topic(uint storeSize, TimeSpan lifespan) - { - _lifespan = lifespan; - Subscriptions = new List(); - Store = new MessageStore(storeSize); - SubscriptionLock = new ReaderWriterLockSlim(); - } - - public void MarkUsed() - { - this._lastUsed = DateTime.UtcNow; - } - - public void AddSubscription(ISubscription subscription) - { - if (subscription == null) - { - throw new ArgumentNullException("subscription"); - } - - try - { - SubscriptionLock.EnterWriteLock(); - - MarkUsed(); - - Subscriptions.Add(subscription); - - // Created -> HasSubscriptions - Interlocked.CompareExchange(ref State, - TopicState.HasSubscriptions, - TopicState.NoSubscriptions); - } - finally - { - SubscriptionLock.ExitWriteLock(); - } - } - - public void RemoveSubscription(ISubscription subscription) - { - if (subscription == null) - { - throw new ArgumentNullException("subscription"); - } - - try - { - SubscriptionLock.EnterWriteLock(); - - MarkUsed(); - - Subscriptions.Remove(subscription); - - - if (Subscriptions.Count == 0) - { - // HasSubscriptions -> NoSubscriptions - Interlocked.CompareExchange(ref State, - TopicState.NoSubscriptions, - TopicState.HasSubscriptions); - } - } - finally - { - SubscriptionLock.ExitWriteLock(); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/TopicLookup.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/TopicLookup.cs deleted file mode 100644 index d62d9084f..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/TopicLookup.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - public sealed class TopicLookup : IEnumerable> - { - // General topics - private readonly ConcurrentDictionary _topics = new ConcurrentDictionary(); - - // All group topics - private readonly ConcurrentDictionary _groupTopics = new ConcurrentDictionary(new SipHashBasedStringEqualityComparer()); - - public int Count - { - get - { - return _topics.Count + _groupTopics.Count; - } - } - - public Topic this[string key] - { - get - { - Topic topic; - if (TryGetValue(key, out topic)) - { - return topic; - } - return null; - } - } - - public bool ContainsKey(string key) - { - if (PrefixHelper.HasGroupPrefix(key)) - { - return _groupTopics.ContainsKey(key); - } - - return _topics.ContainsKey(key); - } - - public bool TryGetValue(string key, out Topic topic) - { - if (PrefixHelper.HasGroupPrefix(key)) - { - return _groupTopics.TryGetValue(key, out topic); - } - - return _topics.TryGetValue(key, out topic); - } - - public IEnumerator> GetEnumerator() - { - return _topics.Concat(_groupTopics).GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public bool TryRemove(string key) - { - Topic topic; - if (PrefixHelper.HasGroupPrefix(key)) - { - return _groupTopics.TryRemove(key, out topic); - } - - return _topics.TryRemove(key, out topic); - } - - public Topic GetOrAdd(string key, Func factory) - { - if (PrefixHelper.HasGroupPrefix(key)) - { - return _groupTopics.GetOrAdd(key, factory); - } - - return _topics.GetOrAdd(key, factory); - } - - public void Clear() - { - _topics.Clear(); - _groupTopics.Clear(); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/TopicState.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/TopicState.cs deleted file mode 100644 index e69193c89..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/TopicState.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Messaging -{ - internal class TopicState - { - public const int NoSubscriptions = 0; - public const int HasSubscriptions = 1; - public const int Dying = 2; - public const int Dead = 3; - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Messaging/Volatile.cs b/src/Microsoft.AspNet.SignalR.Core/Messaging/Volatile.cs deleted file mode 100644 index d4ce8a10e..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Messaging/Volatile.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Messaging -{ - // All methods here are guaranteed both volatile + atomic. - // TODO: Make this use the .NET 4.5 'Volatile' type. - internal static class Volatile - { - public static long Read(ref long location) - { - return Interlocked.Read(ref location); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj b/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj deleted file mode 100644 index 4fc44007d..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj +++ /dev/null @@ -1,284 +0,0 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {1B9A82C4-BCA1-4834-A33E-226F17BE070B} - Library - Properties - Microsoft.AspNet.SignalR - Microsoft.AspNet.SignalR.Core - 512 - true - ..\..\ - true - - - true - bin\x86\Debug\ - TRACE;DEBUG;PERFCOUNTERS - bin\Debug\Microsoft.AspNet.SignalR.Core.XML - true - 1591 - full - x86 - prompt - C:\Dropbox\Git\NzbDrone\src\Common\Microsoft.AspNet.SignalR.ruleset - 4 - false - - - bin\x86\Release\ - TRACE;PERFCOUNTERS - bin\Release\Microsoft.AspNet.SignalR.Core.XML - true - true - 1591 - pdbonly - x86 - prompt - C:\Dropbox\Git\NzbDrone\src\Common\Microsoft.AspNet.SignalR.ruleset - 4 - - - - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - Properties\CommonVersionInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Resources.resx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj.DotSettings b/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj.DotSettings deleted file mode 100644 index 5b8822215..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Microsoft.AspNet.SignalR.Core.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - DO_NOT_SHOW \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Core/PersistentConnection.cs b/src/Microsoft.AspNet.SignalR.Core/PersistentConnection.cs deleted file mode 100644 index 49f2afdd6..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/PersistentConnection.cs +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Configuration; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Json; -using Microsoft.AspNet.SignalR.Messaging; -using Microsoft.AspNet.SignalR.Tracing; -using Microsoft.AspNet.SignalR.Transports; - -namespace Microsoft.AspNet.SignalR -{ - /// - /// Represents a connection between client and server. - /// - public abstract class PersistentConnection - { - private const string WebSocketsTransportName = "webSockets"; - private static readonly char[] SplitChars = new[] { ':' }; - - private IConfigurationManager _configurationManager; - private ITransportManager _transportManager; - private bool _initialized; - private IServerCommandHandler _serverMessageHandler; - - public virtual void Initialize(IDependencyResolver resolver, HostContext context) - { - if (resolver == null) - { - throw new ArgumentNullException("resolver"); - } - - if (context == null) - { - throw new ArgumentNullException("context"); - } - - if (_initialized) - { - return; - } - - MessageBus = resolver.Resolve(); - JsonSerializer = resolver.Resolve(); - TraceManager = resolver.Resolve(); - Counters = resolver.Resolve(); - AckHandler = resolver.Resolve(); - ProtectedData = resolver.Resolve(); - - _configurationManager = resolver.Resolve(); - _transportManager = resolver.Resolve(); - _serverMessageHandler = resolver.Resolve(); - - _initialized = true; - } - - public bool Authorize(IRequest request) - { - return AuthorizeRequest(request); - } - - protected virtual TraceSource Trace - { - get - { - return TraceManager["SignalR.PersistentConnection"]; - } - } - - protected IProtectedData ProtectedData { get; private set; } - - protected IMessageBus MessageBus { get; private set; } - - protected IJsonSerializer JsonSerializer { get; private set; } - - protected IAckHandler AckHandler { get; private set; } - - protected ITraceManager TraceManager { get; private set; } - - protected IPerformanceCounterManager Counters { get; private set; } - - protected ITransport Transport { get; private set; } - - /// - /// Gets the for the . - /// - public IConnection Connection - { - get; - private set; - } - - /// - /// Gets the for the . - /// - public IConnectionGroupManager Groups - { - get; - private set; - } - - private string DefaultSignal - { - get - { - return PrefixHelper.GetPersistentConnectionName(DefaultSignalRaw); - } - } - - private string DefaultSignalRaw - { - get - { - return GetType().FullName; - } - } - - internal virtual string GroupPrefix - { - get - { - return PrefixHelper.PersistentConnectionGroupPrefix; - } - } - - /// - /// Handles all requests for s. - /// - /// The for the current request. - /// A that completes when the pipeline is complete. - /// - /// Thrown if connection wasn't initialized. - /// Thrown if the transport wasn't specified. - /// Thrown if the connection id wasn't specified. - /// - public virtual Task ProcessRequest(HostContext context) - { - if (context == null) - { - throw new ArgumentNullException("context"); - } - - if (!_initialized) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_ConnectionNotInitialized)); - } - - if (IsNegotiationRequest(context.Request)) - { - return ProcessNegotiationRequest(context); - } - else if (IsPingRequest(context.Request)) - { - return ProcessPingRequest(context); - } - - Transport = GetTransport(context); - - if (Transport == null) - { - return FailResponse(context.Response, String.Format(CultureInfo.CurrentCulture, Resources.Error_ProtocolErrorUnknownTransport)); - } - - string connectionToken = context.Request.QueryString["connectionToken"]; - - // If there's no connection id then this is a bad request - if (String.IsNullOrEmpty(connectionToken)) - { - return FailResponse(context.Response, String.Format(CultureInfo.CurrentCulture, Resources.Error_ProtocolErrorMissingConnectionToken)); - } - - string connectionId; - string message; - int statusCode; - - if (!TryGetConnectionId(context, connectionToken, out connectionId, out message, out statusCode)) - { - return FailResponse(context.Response, message, statusCode); - } - - // Set the transport's connection id to the unprotected one - Transport.ConnectionId = connectionId; - - IList signals = GetSignals(connectionId); - IList groups = AppendGroupPrefixes(context, connectionId); - - Connection connection = CreateConnection(connectionId, signals, groups); - - Connection = connection; - string groupName = PrefixHelper.GetPersistentConnectionGroupName(DefaultSignalRaw); - Groups = new GroupManager(connection, groupName); - - Transport.TransportConnected = () => - { - var command = new ServerCommand - { - ServerCommandType = ServerCommandType.RemoveConnection, - Value = connectionId - }; - - return _serverMessageHandler.SendCommand(command); - }; - - Transport.Connected = () => - { - return TaskAsyncHelper.FromMethod(() => OnConnected(context.Request, connectionId).OrEmpty()); - }; - - Transport.Reconnected = () => - { - return TaskAsyncHelper.FromMethod(() => OnReconnected(context.Request, connectionId).OrEmpty()); - }; - - Transport.Received = data => - { - Counters.ConnectionMessagesSentTotal.Increment(); - Counters.ConnectionMessagesSentPerSec.Increment(); - return TaskAsyncHelper.FromMethod(() => OnReceived(context.Request, connectionId, data).OrEmpty()); - }; - - Transport.Disconnected = () => - { - return TaskAsyncHelper.FromMethod(() => OnDisconnected(context.Request, connectionId).OrEmpty()); - }; - - return Transport.ProcessRequest(connection).OrEmpty().Catch(Counters.ErrorsAllTotal, Counters.ErrorsAllPerSec); - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "We want to catch any exception when unprotecting data.")] - internal bool TryGetConnectionId(HostContext context, - string connectionToken, - out string connectionId, - out string message, - out int statusCode) - { - string unprotectedConnectionToken = null; - - // connectionId is only valid when this method returns true - connectionId = null; - - // message and statusCode are only valid when this method returns false - message = null; - statusCode = 400; - - try - { - unprotectedConnectionToken = ProtectedData.Unprotect(connectionToken, Purposes.ConnectionToken); - } - catch (Exception ex) - { - Trace.TraceInformation("Failed to process connectionToken {0}: {1}", connectionToken, ex); - } - - if (String.IsNullOrEmpty(unprotectedConnectionToken)) - { - message = String.Format(CultureInfo.CurrentCulture, Resources.Error_ConnectionIdIncorrectFormat); - return false; - } - - var tokens = unprotectedConnectionToken.Split(SplitChars, 2); - - connectionId = tokens[0]; - string tokenUserName = tokens.Length > 1 ? tokens[1] : String.Empty; - string userName = GetUserIdentity(context); - - if (!String.Equals(tokenUserName, userName, StringComparison.OrdinalIgnoreCase)) - { - message = String.Format(CultureInfo.CurrentCulture, Resources.Error_UnrecognizedUserIdentity); - statusCode = 403; - return false; - } - - return true; - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "We want to prevent any failures in unprotecting")] - internal IList VerifyGroups(HostContext context, string connectionId) - { - string groupsToken = context.Request.QueryString["groupsToken"]; - - if (String.IsNullOrEmpty(groupsToken)) - { - Trace.TraceInformation("The groups token is missing"); - - return ListHelper.Empty; - } - - string unprotectedGroupsToken = null; - - try - { - unprotectedGroupsToken = ProtectedData.Unprotect(groupsToken, Purposes.Groups); - } - catch (Exception ex) - { - Trace.TraceInformation("Failed to process groupsToken {0}: {1}", groupsToken, ex); - } - - if (String.IsNullOrEmpty(unprotectedGroupsToken)) - { - return ListHelper.Empty; - } - - var tokens = unprotectedGroupsToken.Split(SplitChars, 2); - - string groupConnectionId = tokens[0]; - string groupsValue = tokens.Length > 1 ? tokens[1] : String.Empty; - - if (!String.Equals(groupConnectionId, connectionId, StringComparison.OrdinalIgnoreCase)) - { - return ListHelper.Empty; - } - - return JsonSerializer.Parse(groupsValue); - } - - private IList AppendGroupPrefixes(HostContext context, string connectionId) - { - return (from g in OnRejoiningGroups(context.Request, VerifyGroups(context, connectionId), connectionId) - select GroupPrefix + g).ToList(); - } - - private Connection CreateConnection(string connectionId, IList signals, IList groups) - { - return new Connection(MessageBus, - JsonSerializer, - DefaultSignal, - connectionId, - signals, - groups, - TraceManager, - AckHandler, - Counters, - ProtectedData); - } - - /// - /// Returns the default signals for the . - /// - /// The id of the incoming connection. - /// The default signals for this . - private IList GetDefaultSignals(string connectionId) - { - // The list of default signals this connection cares about: - // 1. The default signal (the type name) - // 2. The connection id (so we can message this particular connection) - // 3. Ack signal - - return new string[] { - DefaultSignal, - PrefixHelper.GetConnectionId(connectionId), - PrefixHelper.GetAck(connectionId) - }; - } - - /// - /// Returns the signals used in the . - /// - /// The id of the incoming connection. - /// The signals used for this . - protected virtual IList GetSignals(string connectionId) - { - return GetDefaultSignals(connectionId); - } - - /// - /// Called before every request and gives the user a authorize the user. - /// - /// The for the current connection. - /// A boolean value that represents if the request is authorized. - protected virtual bool AuthorizeRequest(IRequest request) - { - return true; - } - - /// - /// Called when a connection reconnects after a timeout to determine which groups should be rejoined. - /// - /// The for the current connection. - /// The groups the calling connection claims to be part of. - /// The id of the reconnecting client. - /// A collection of group names that should be joined on reconnect - protected virtual IList OnRejoiningGroups(IRequest request, IList groups, string connectionId) - { - return groups; - } - - /// - /// Called when a new connection is made. - /// - /// The for the current connection. - /// The id of the connecting client. - /// A that completes when the connect operation is complete. - protected virtual Task OnConnected(IRequest request, string connectionId) - { - return TaskAsyncHelper.Empty; - } - - /// - /// Called when a connection reconnects after a timeout. - /// - /// The for the current connection. - /// The id of the re-connecting client. - /// A that completes when the re-connect operation is complete. - protected virtual Task OnReconnected(IRequest request, string connectionId) - { - return TaskAsyncHelper.Empty; - } - - /// - /// Called when data is received from a connection. - /// - /// The for the current connection. - /// The id of the connection sending the data. - /// The payload sent to the connection. - /// A that completes when the receive operation is complete. - protected virtual Task OnReceived(IRequest request, string connectionId, string data) - { - return TaskAsyncHelper.Empty; - } - - /// - /// Called when a connection disconnects. - /// - /// The for the current connection. - /// The id of the disconnected connection. - /// A that completes when the disconnect operation is complete. - protected virtual Task OnDisconnected(IRequest request, string connectionId) - { - return TaskAsyncHelper.Empty; - } - - private Task ProcessPingRequest(HostContext context) - { - var payload = new - { - Response = "pong" - }; - - if (!String.IsNullOrEmpty(context.Request.QueryString["callback"])) - { - return ProcessJsonpRequest(context, payload); - } - - context.Response.ContentType = JsonUtility.JsonMimeType; - return context.Response.End(JsonSerializer.Stringify(payload)); - } - - private Task ProcessNegotiationRequest(HostContext context) - { - // Total amount of time without a keep alive before the client should attempt to reconnect in seconds. - var keepAliveTimeout = _configurationManager.KeepAliveTimeout(); - string connectionId = Guid.NewGuid().ToString("d"); - string connectionToken = connectionId + ':' + GetUserIdentity(context); - - var payload = new - { - Url = context.Request.Url.LocalPath.Replace("/negotiate", ""), - ConnectionToken = ProtectedData.Protect(connectionToken, Purposes.ConnectionToken), - ConnectionId = connectionId, - KeepAliveTimeout = keepAliveTimeout != null ? keepAliveTimeout.Value.TotalSeconds : (double?)null, - DisconnectTimeout = _configurationManager.DisconnectTimeout.TotalSeconds, - TryWebSockets = _transportManager.SupportsTransport(WebSocketsTransportName) && context.SupportsWebSockets(), - WebSocketServerUrl = context.WebSocketServerUrl(), - ProtocolVersion = "1.2" - }; - - if (!String.IsNullOrEmpty(context.Request.QueryString["callback"])) - { - return ProcessJsonpRequest(context, payload); - } - - context.Response.ContentType = JsonUtility.JsonMimeType; - return context.Response.End(JsonSerializer.Stringify(payload)); - } - - private static string GetUserIdentity(HostContext context) - { - if (context.Request.User != null && context.Request.User.Identity.IsAuthenticated) - { - return context.Request.User.Identity.Name ?? String.Empty; - } - return String.Empty; - } - - private Task ProcessJsonpRequest(HostContext context, object payload) - { - context.Response.ContentType = JsonUtility.JavaScriptMimeType; - var data = JsonUtility.CreateJsonpCallback(context.Request.QueryString["callback"], JsonSerializer.Stringify(payload)); - - return context.Response.End(data); - } - - private static Task FailResponse(IResponse response, string message, int statusCode = 400) - { - response.StatusCode = statusCode; - return response.End(message); - } - - private static bool IsNegotiationRequest(IRequest request) - { - return request.Url.LocalPath.EndsWith("/negotiate", StringComparison.OrdinalIgnoreCase); - } - - private static bool IsPingRequest(IRequest request) - { - return request.Url.LocalPath.EndsWith("/ping", StringComparison.OrdinalIgnoreCase); - } - - private ITransport GetTransport(HostContext context) - { - return _transportManager.GetTransport(context); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.SignalR.Core/Properties/AssemblyInfo.cs deleted file mode 100644 index b73b3e766..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("Microsoft.AspNet.SignalR.Core")] -[assembly: AssemblyDescription("Async signaling library for .NET to help build real-time, multi-user interactive web applications.")] -#if SIGNED -[assembly: InternalsVisibleTo("Microsoft.AspNet.SignalR.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] -[assembly: InternalsVisibleTo("Microsoft.AspNet.SignalR.FunctionalTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] -[assembly: InternalsVisibleTo("Microsoft.AspNet.SignalR.Tests.Common, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] -#else -[assembly: InternalsVisibleTo("Microsoft.AspNet.SignalR.Tests")] -[assembly: InternalsVisibleTo("Microsoft.AspNet.SignalR.FunctionalTests")] -[assembly: InternalsVisibleTo("Microsoft.AspNet.SignalR.Tests.Common")] -#endif diff --git a/src/Microsoft.AspNet.SignalR.Core/Resources.Designer.cs b/src/Microsoft.AspNet.SignalR.Core/Resources.Designer.cs deleted file mode 100644 index 92f0119ea..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Resources.Designer.cs +++ /dev/null @@ -1,375 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.18010 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Microsoft.AspNet.SignalR { - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.AspNet.SignalR.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to /// <summary>Calls the {0} method on the server-side {1} hub.&#10;Returns a jQuery.Deferred() promise.</summary>. - /// - internal static string DynamicComment_CallsMethodOnServerSideDeferredPromise { - get { - return ResourceManager.GetString("DynamicComment_CallsMethodOnServerSideDeferredPromise", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /// <param name=\"{0}\" type=\"{1}\">Server side type is {2}</param>. - /// - internal static string DynamicComment_ServerSideTypeIs { - get { - return ResourceManager.GetString("DynamicComment_ServerSideTypeIs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Argument cannot be null or empty. - /// - internal static string Error_ArgumentNullOrEmpty { - get { - return ResourceManager.GetString("Error_ArgumentNullOrEmpty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The buffer size '{0}' is out of range.. - /// - internal static string Error_BufferSizeOutOfRange { - get { - return ResourceManager.GetString("Error_BufferSizeOutOfRange", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Caller is not authorized to invoke the {0} method on {1}.. - /// - internal static string Error_CallerNotAuthorizedToInvokeMethodOn { - get { - return ResourceManager.GetString("Error_CallerNotAuthorizedToInvokeMethodOn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The connection id is in the incorrect format.. - /// - internal static string Error_ConnectionIdIncorrectFormat { - get { - return ResourceManager.GetString("Error_ConnectionIdIncorrectFormat", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The PersistentConnection is not initialized.. - /// - internal static string Error_ConnectionNotInitialized { - get { - return ResourceManager.GetString("Error_ConnectionNotInitialized", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DisconnectTimeout cannot be configured after the KeepAlive.. - /// - internal static string Error_DisconnectTimeoutCannotBeConfiguredAfterKeepAlive { - get { - return ResourceManager.GetString("Error_DisconnectTimeoutCannotBeConfiguredAfterKeepAlive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DisconnectTimeout must be at least six seconds.. - /// - internal static string Error_DisconnectTimeoutMustBeAtLeastSixSeconds { - get { - return ResourceManager.GetString("Error_DisconnectTimeoutMustBeAtLeastSixSeconds", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do not read RequireOutgoing. Use protected _requireOutgoing instead.. - /// - internal static string Error_DoNotReadRequireOutgoing { - get { - return ResourceManager.GetString("Error_DoNotReadRequireOutgoing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Duplicate hub names found.. - /// - internal static string Error_DuplicateHubs { - get { - return ResourceManager.GetString("Error_DuplicateHubs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Duplicate payload id detected for stream '{0}'.. - /// - internal static string Error_DuplicatePayloadsForStream { - get { - return ResourceManager.GetString("Error_DuplicatePayloadsForStream", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error creating Hub {0}. . - /// - internal static string Error_ErrorCreatingHub { - get { - return ResourceManager.GetString("Error_ErrorCreatingHub", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to '{0}' Hub could not be resolved.. - /// - internal static string Error_HubCouldNotBeResolved { - get { - return ResourceManager.GetString("Error_HubCouldNotBeResolved", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to There was an error invoking Hub method '{0}.{1}'.. - /// - internal static string Error_HubInvocationFailed { - get { - return ResourceManager.GetString("Error_HubInvocationFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid cursor.. - /// - internal static string Error_InvalidCursorFormat { - get { - return ResourceManager.GetString("Error_InvalidCursorFormat", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The supplied frameId is in the incorrect format.. - /// - internal static string Error_InvalidForeverFrameId { - get { - return ResourceManager.GetString("Error_InvalidForeverFrameId", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to '{0}' is not a {1}.. - /// - internal static string Error_IsNotA { - get { - return ResourceManager.GetString("Error_IsNotA", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SignalR: JavaScript Hub proxy generation has been disabled.. - /// - internal static string Error_JavaScriptProxyDisabled { - get { - return ResourceManager.GetString("Error_JavaScriptProxyDisabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Keep Alive value must be greater than two seconds.. - /// - internal static string Error_KeepAliveMustBeGreaterThanTwoSeconds { - get { - return ResourceManager.GetString("Error_KeepAliveMustBeGreaterThanTwoSeconds", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Keep Alive value must be no more than a third of the DisconnectTimeout.. - /// - internal static string Error_KeepAliveMustBeNoMoreThanAThirdOfTheDisconnectTimeout { - get { - return ResourceManager.GetString("Error_KeepAliveMustBeNoMoreThanAThirdOfTheDisconnectTimeout", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to '{0}' method could not be resolved.. - /// - internal static string Error_MethodCouldNotBeResolved { - get { - return ResourceManager.GetString("Error_MethodCouldNotBeResolved", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Outgoing authorization can only be required for an entire Hub, not a specific method.. - /// - internal static string Error_MethodLevelOutgoingAuthorization { - get { - return ResourceManager.GetString("Error_MethodLevelOutgoingAuthorization", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Multiple activators for type {0} are registered. Please call GetServices instead.. - /// - internal static string Error_MultipleActivatorsAreaRegisteredCallGetServices { - get { - return ResourceManager.GetString("Error_MultipleActivatorsAreaRegisteredCallGetServices", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unexpected end when reading object.. - /// - internal static string Error_ParseObjectFailed { - get { - return ResourceManager.GetString("Error_ParseObjectFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Protocol error: Missing connection token.. - /// - internal static string Error_ProtocolErrorMissingConnectionToken { - get { - return ResourceManager.GetString("Error_ProtocolErrorMissingConnectionToken", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Protocol error: Unknown transport.. - /// - internal static string Error_ProtocolErrorUnknownTransport { - get { - return ResourceManager.GetString("Error_ProtocolErrorUnknownTransport", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to State has exceeded the maximum length of 4096 bytes.. - /// - internal static string Error_StateExceededMaximumLength { - get { - return ResourceManager.GetString("Error_StateExceededMaximumLength", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The stream has been closed.. - /// - internal static string Error_StreamClosed { - get { - return ResourceManager.GetString("Error_StreamClosed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The stream is not open.. - /// - internal static string Error_StreamNotOpen { - get { - return ResourceManager.GetString("Error_StreamNotOpen", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The queue is full.. - /// - internal static string Error_TaskQueueFull { - get { - return ResourceManager.GetString("Error_TaskQueueFull", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unable to add module. The HubPipeline has already been invoked.. - /// - internal static string Error_UnableToAddModulePiplineAlreadyInvoked { - get { - return ResourceManager.GetString("Error_UnableToAddModulePiplineAlreadyInvoked", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unrecognized user identity. The user identity cannot change during an active SignalR connection.. - /// - internal static string Error_UnrecognizedUserIdentity { - get { - return ResourceManager.GetString("Error_UnrecognizedUserIdentity", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Using a Hub instance not created by the HubPipeline is unsupported.. - /// - internal static string Error_UsingHubInstanceNotCreatedUnsupported { - get { - return ResourceManager.GetString("Error_UsingHubInstanceNotCreatedUnsupported", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to WebSockets is not supported.. - /// - internal static string Error_WebSocketsNotSupported { - get { - return ResourceManager.GetString("Error_WebSocketsNotSupported", resourceCulture); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Resources.resx b/src/Microsoft.AspNet.SignalR.Core/Resources.resx deleted file mode 100644 index a858f4b40..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Resources.resx +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - /// <summary>Calls the {0} method on the server-side {1} hub.&#10;Returns a jQuery.Deferred() promise.</summary> - - - /// <param name=\"{0}\" type=\"{1}\">Server side type is {2}</param> - - - Argument cannot be null or empty - - - The buffer size '{0}' is out of range. - - - Caller is not authorized to invoke the {0} method on {1}. - - - The connection id is in the incorrect format. - - - The PersistentConnection is not initialized. - - - DisconnectTimeout cannot be configured after the KeepAlive. - - - DisconnectTimeout must be at least six seconds. - - - Do not read RequireOutgoing. Use protected _requireOutgoing instead. - - - Duplicate hub names found. - - - Duplicate payload id detected for stream '{0}'. - - - Error creating Hub {0}. - - - '{0}' Hub could not be resolved. - - - There was an error invoking Hub method '{0}.{1}'. - - - Invalid cursor. - - - The supplied frameId is in the incorrect format. - - - '{0}' is not a {1}. - - - SignalR: JavaScript Hub proxy generation has been disabled. - - - Keep Alive value must be greater than two seconds. - - - Keep Alive value must be no more than a third of the DisconnectTimeout. - - - '{0}' method could not be resolved. - - - Outgoing authorization can only be required for an entire Hub, not a specific method. - - - Multiple activators for type {0} are registered. Please call GetServices instead. - - - Unexpected end when reading object. - - - Protocol error: Missing connection token. - - - Protocol error: Unknown transport. - - - State has exceeded the maximum length of 4096 bytes. - - - The stream has been closed. - - - The stream is not open. - - - The queue is full. - - - Unable to add module. The HubPipeline has already been invoked. - - - Unrecognized user identity. The user identity cannot change during an active SignalR connection. - - - Using a Hub instance not created by the HubPipeline is unsupported. - - - WebSockets is not supported. - - \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Core/Scripts/hubs.js b/src/Microsoft.AspNet.SignalR.Core/Scripts/hubs.js deleted file mode 100644 index ca0f7977d..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Scripts/hubs.js +++ /dev/null @@ -1,90 +0,0 @@ -/*! - * ASP.NET SignalR JavaScript Library v1.2.2 - * http://signalr.net/ - * - * Copyright Microsoft Open Technologies, Inc. All rights reserved. - * Licensed under the Apache 2.0 - * https://github.com/SignalR/SignalR/blob/master/LICENSE.md - * - */ - -/// -/// -(function ($, window, undefined) { - /// - "use strict"; - - if (typeof ($.signalR) !== "function") { - throw new Error("SignalR: SignalR is not loaded. Please ensure jquery.signalR-x.js is referenced before ~/signalr/hubs."); - } - - var signalR = $.signalR; - - function makeProxyCallback(hub, callback) { - return function () { - // Call the client hub method - callback.apply(hub, $.makeArray(arguments)); - }; - } - - function registerHubProxies(instance, shouldSubscribe) { - var key, hub, memberKey, memberValue, subscriptionMethod; - - for (key in instance) { - if (instance.hasOwnProperty(key)) { - hub = instance[key]; - - if (!(hub.hubName)) { - // Not a client hub - continue; - } - - if (shouldSubscribe) { - // We want to subscribe to the hub events - subscriptionMethod = hub.on; - } - else { - // We want to unsubscribe from the hub events - subscriptionMethod = hub.off; - } - - // Loop through all members on the hub and find client hub functions to subscribe/unsubscribe - for (memberKey in hub.client) { - if (hub.client.hasOwnProperty(memberKey)) { - memberValue = hub.client[memberKey]; - - if (!$.isFunction(memberValue)) { - // Not a client hub function - continue; - } - - subscriptionMethod.call(hub, memberKey, makeProxyCallback(hub, memberValue)); - } - } - } - } - } - - $.hubConnection.prototype.createHubProxies = function () { - var proxies = {}; - this.starting(function () { - // Register the hub proxies as subscribed - // (instance, shouldSubscribe) - registerHubProxies(proxies, true); - - this._registerSubscribedHubs(); - }).disconnected(function () { - // Unsubscribe all hub proxies when we "disconnect". This is to ensure that we do not re-add functional call backs. - // (instance, shouldSubscribe) - registerHubProxies(proxies, false); - }); - - /*hubs*/ - - return proxies; - }; - - signalR.hub = $.hubConnection("{serviceUrl}", { useDefaultPath: false }); - $.extend(signalR, signalR.hub.createHubProxies()); - -}(window.jQuery, window)); \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs b/src/Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs deleted file mode 100644 index 34a604bb2..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/TaskAsyncHelper.cs +++ /dev/null @@ -1,1115 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR -{ - internal static class TaskAsyncHelper - { - private static readonly Task _emptyTask = MakeTask(null); - private static readonly Task _trueTask = MakeTask(true); - private static readonly Task _falseTask = MakeTask(false); - - private static Task MakeTask(T value) - { - return FromResult(value); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Empty - { - get - { - return _emptyTask; - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task True - { - get - { - return _trueTask; - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task False - { - get - { - return _falseTask; - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task OrEmpty(this Task task) - { - return task ?? Empty; - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task OrEmpty(this Task task) - { - return task ?? TaskCache.Empty; - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromAsync(Func beginMethod, Action endMethod, object state) - { - try - { - return Task.Factory.FromAsync(beginMethod, endMethod, state); - } - catch (Exception ex) - { - return TaskAsyncHelper.FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromAsync(Func beginMethod, Func endMethod, object state) - { - try - { - return Task.Factory.FromAsync(beginMethod, endMethod, state); - } - catch (Exception ex) - { - return TaskAsyncHelper.FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Series(Func[] tasks, object[] state) - { - Task prev = TaskAsyncHelper.Empty; - Task finalTask = TaskAsyncHelper.Empty; - - for (int i = 0; i < tasks.Length; i++) - { - prev = finalTask; - finalTask = prev.Then(tasks[i], state[i]); - } - - return finalTask; - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static TTask Catch(this TTask task) where TTask : Task - { - return Catch(task, ex => { }); - } - -#if PERFCOUNTERS - public static TTask Catch(this TTask task, params IPerformanceCounter[] counters) where TTask : Task - { - return Catch(task, _ => - { - if (counters == null) - { - return; - } - for (var i = 0; i < counters.Length; i++) - { - counters[i].Increment(); - } - }); - } -#endif - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static TTask Catch(this TTask task, Action handler, object state) where TTask : Task - { - if (task != null && task.Status != TaskStatus.RanToCompletion) - { - if (task.Status == TaskStatus.Faulted) - { - ExecuteOnFaulted(handler, state, task.Exception); - } - else - { - AttachFaultedContinuation(task, handler, state); - } - } - - return task; - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - private static void AttachFaultedContinuation(TTask task, Action handler, object state) where TTask : Task - { - task.ContinueWith(innerTask => - { - ExecuteOnFaulted(handler, state, innerTask.Exception); - }, - TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - private static void ExecuteOnFaulted(Action handler, object state, AggregateException exception) - { - // observe Exception -#if !WINDOWS_PHONE && !SILVERLIGHT && !NETFX_CORE - Trace.TraceWarning("SignalR exception thrown by Task: {0}", exception); -#endif - handler(exception, state); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static TTask Catch(this TTask task, Action handler) where TTask : Task - { - return task.Catch((ex, state) => ((Action)state).Invoke(ex), - handler); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task ContinueWithNotComplete(this Task task, Action action) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - try - { - action(); - return task; - } - catch (Exception e) - { - return FromError(e); - } - case TaskStatus.RanToCompletion: - return task; - default: - var tcs = new TaskCompletionSource(); - - task.ContinueWith(t => - { - if (t.IsFaulted || t.IsCanceled) - { - try - { - action(); - - if (t.IsFaulted) - { - tcs.TrySetUnwrappedException(t.Exception); - } - else - { - tcs.TrySetCanceled(); - } - } - catch (Exception e) - { - tcs.TrySetException(e); - } - } - else - { - tcs.TrySetResult(null); - } - }, - TaskContinuationOptions.ExecuteSynchronously); - - return tcs.Task; - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static void ContinueWithNotComplete(this Task task, TaskCompletionSource tcs) - { - task.ContinueWith(t => - { - if (t.IsFaulted) - { - tcs.SetUnwrappedException(t.Exception); - } - else if (t.IsCanceled) - { - tcs.SetCanceled(); - } - }, - TaskContinuationOptions.NotOnRanToCompletion); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static void ContinueWith(this Task task, TaskCompletionSource tcs) - { - task.ContinueWith(t => - { - if (t.IsFaulted) - { - tcs.TrySetUnwrappedException(t.Exception); - } - else if (t.IsCanceled) - { - tcs.TrySetCanceled(); - } - else - { - tcs.TrySetResult(null); - } - }, - TaskContinuationOptions.ExecuteSynchronously); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static void ContinueWith(this Task task, TaskCompletionSource tcs) - { - task.ContinueWith(t => - { - if (t.IsFaulted) - { - tcs.TrySetUnwrappedException(t.Exception); - } - else if (t.IsCanceled) - { - tcs.TrySetCanceled(); - } - else - { - tcs.TrySetResult(t.Result); - } - }); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Return(this Task[] tasks) - { - return Then(tasks, () => { }); - } - - // Then extesions - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Action successor) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor); - - default: - return RunTask(task, successor); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func successor) - { - switch (task.Status) - { - case TaskStatus.Faulted: - return FromError(task.Exception); - - case TaskStatus.Canceled: - return Canceled(); - - case TaskStatus.RanToCompletion: - return FromMethod(successor); - - default: - return TaskRunners.RunTask(task, successor); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task[] tasks, Action successor) - { - if (tasks.Length == 0) - { - return FromMethod(successor); - } - - var tcs = new TaskCompletionSource(); - Task.Factory.ContinueWhenAll(tasks, completedTasks => - { - var faulted = completedTasks.FirstOrDefault(t => t.IsFaulted); - if (faulted != null) - { - tcs.SetUnwrappedException(faulted.Exception); - return; - } - var cancelled = completedTasks.FirstOrDefault(t => t.IsCanceled); - if (cancelled != null) - { - tcs.SetCanceled(); - return; - } - - successor(); - tcs.SetResult(null); - }); - - return tcs.Task; - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Action successor, T1 arg1) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor, arg1); - - default: - return GenericDelegates.ThenWithArgs(task, successor, arg1); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Action successor, T1 arg1, T2 arg2) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor, arg1, arg2); - - default: - return GenericDelegates.ThenWithArgs(task, successor, arg1, arg2); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func successor, T1 arg1) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor, arg1); - - default: - return GenericDelegates.ThenWithArgs(task, successor, arg1) - .FastUnwrap(); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func successor, T1 arg1, T2 arg2) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor, arg1, arg2); - - default: - return GenericDelegates.ThenWithArgs(task, successor, arg1, arg2) - .FastUnwrap(); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func> successor) - { - switch (task.Status) - { - case TaskStatus.Faulted: - return FromError(task.Exception); - - case TaskStatus.Canceled: - return Canceled(); - - case TaskStatus.RanToCompletion: - return FromMethod(successor, task.Result); - - default: - return TaskRunners>.RunTask(task, t => successor(t.Result)) - .FastUnwrap(); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func successor) - { - switch (task.Status) - { - case TaskStatus.Faulted: - return FromError(task.Exception); - - case TaskStatus.Canceled: - return Canceled(); - - case TaskStatus.RanToCompletion: - return FromMethod(successor, task.Result); - - default: - return TaskRunners.RunTask(task, t => successor(t.Result)); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func successor, T1 arg1) - { - switch (task.Status) - { - case TaskStatus.Faulted: - return FromError(task.Exception); - - case TaskStatus.Canceled: - return Canceled(); - - case TaskStatus.RanToCompletion: - return FromMethod(successor, task.Result, arg1); - - default: - return GenericDelegates.ThenWithArgs(task, successor, arg1); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func successor) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor); - - default: - return TaskRunners.RunTask(task, successor) - .FastUnwrap(); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func> successor) - { - switch (task.Status) - { - case TaskStatus.Faulted: - return FromError(task.Exception); - - case TaskStatus.Canceled: - return Canceled(); - - case TaskStatus.RanToCompletion: - return FromMethod(successor); - - default: - return TaskRunners>.RunTask(task, successor) - .FastUnwrap(); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Action successor) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor, task.Result); - - default: - return TaskRunners.RunTask(task, successor); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func successor) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor, task.Result); - - default: - return TaskRunners.RunTask(task, t => successor(t.Result)) - .FastUnwrap(); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Then(this Task task, Func, T1, Task> successor, T1 arg1) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor, task, arg1); - - default: - return GenericDelegates, T1, object>.ThenWithArgs(task, successor, arg1) - .FastUnwrap(); - } - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed to the caller")] - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Finally(this Task task, Action next, object state) - { - try - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - next(state); - return task; - case TaskStatus.RanToCompletion: - return FromMethod(next, state); - - default: - return RunTaskSynchronously(task, next, state, onlyOnSuccess: false); - } - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task RunSynchronously(this Task task, Action successor) - { - switch (task.Status) - { - case TaskStatus.Faulted: - case TaskStatus.Canceled: - return task; - - case TaskStatus.RanToCompletion: - return FromMethod(successor); - - default: - return RunTaskSynchronously(task, state => ((Action)state).Invoke(), successor); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task FastUnwrap(this Task task) - { - var innerTask = (task.Status == TaskStatus.RanToCompletion) ? task.Result : null; - return innerTask ?? task.Unwrap(); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task FastUnwrap(this Task> task) - { - var innerTask = (task.Status == TaskStatus.RanToCompletion) ? task.Result : null; - return innerTask ?? task.Unwrap(); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task Delay(TimeSpan timeOut) - { -#if NETFX_CORE - return Task.Delay(timeOut); -#else - var tcs = new TaskCompletionSource(); - - var timer = new Timer(tcs.SetResult, - null, - timeOut, - TimeSpan.FromMilliseconds(-1)); - - return tcs.Task.ContinueWith(_ => - { - timer.Dispose(); - }, - TaskContinuationOptions.ExecuteSynchronously); -#endif - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Action func) - { - try - { - func(); - return Empty; - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Action func, T1 arg) - { - try - { - func(arg); - return Empty; - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Action func, T1 arg1, T2 arg2) - { - try - { - func(arg1, arg2); - return Empty; - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Func func) - { - try - { - return func(); - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Func> func) - { - try - { - return func(); - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Func func) - { - try - { - return FromResult(func()); - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Func func, T1 arg) - { - try - { - return func(arg); - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Func func, T1 arg1, T2 arg2) - { - try - { - return func(arg1, arg2); - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Func> func, T1 arg) - { - try - { - return func(arg); - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Func func, T1 arg) - { - try - { - return FromResult(func(arg)); - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Func> func, T1 arg1, T2 arg2) - { - try - { - return func(arg1, arg2); - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - public static Task FromMethod(Func func, T1 arg1, T2 arg2) - { - try - { - return FromResult(func(arg1, arg2)); - } - catch (Exception ex) - { - return FromError(ex); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - public static Task FromResult(T value) - { - var tcs = new TaskCompletionSource(); - tcs.SetResult(value); - return tcs.Task; - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - internal static Task FromError(Exception e) - { - return FromError(e); - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - internal static Task FromError(Exception e) - { - var tcs = new TaskCompletionSource(); - tcs.SetUnwrappedException(e); - return tcs.Task; - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - internal static void SetUnwrappedException(this TaskCompletionSource tcs, Exception e) - { - var aggregateException = e as AggregateException; - if (aggregateException != null) - { - tcs.SetException(aggregateException.InnerExceptions); - } - else - { - tcs.SetException(e); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - internal static bool TrySetUnwrappedException(this TaskCompletionSource tcs, Exception e) - { - var aggregateException = e as AggregateException; - if (aggregateException != null) - { - return tcs.TrySetException(aggregateException.InnerExceptions); - } - else - { - return tcs.TrySetException(e); - } - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - private static Task Canceled() - { - var tcs = new TaskCompletionSource(); - tcs.SetCanceled(); - return tcs.Task; - } - - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - private static Task Canceled() - { - var tcs = new TaskCompletionSource(); - tcs.SetCanceled(); - return tcs.Task; - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - private static Task RunTask(Task task, Action successor) - { - var tcs = new TaskCompletionSource(); - task.ContinueWith(t => - { - if (t.IsFaulted) - { - tcs.SetUnwrappedException(t.Exception); - } - else if (t.IsCanceled) - { - tcs.SetCanceled(); - } - else - { - try - { - successor(); - tcs.SetResult(null); - } - catch (Exception ex) - { - tcs.SetUnwrappedException(ex); - } - } - }); - - return tcs.Task; - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a shared file")] - private static Task RunTaskSynchronously(Task task, Action next, object state, bool onlyOnSuccess = true) - { - var tcs = new TaskCompletionSource(); - task.ContinueWith(t => - { - try - { - if (t.IsFaulted) - { - if (!onlyOnSuccess) - { - next(state); - } - - tcs.SetUnwrappedException(t.Exception); - } - else if (t.IsCanceled) - { - if (!onlyOnSuccess) - { - next(state); - } - - tcs.SetCanceled(); - } - else - { - next(state); - tcs.SetResult(null); - } - } - catch (Exception ex) - { - tcs.SetUnwrappedException(ex); - } - }, - TaskContinuationOptions.ExecuteSynchronously); - - return tcs.Task; - } - - private static class TaskRunners - { - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - internal static Task RunTask(Task task, Action successor) - { - var tcs = new TaskCompletionSource(); - task.ContinueWith(t => - { - if (t.IsFaulted) - { - tcs.SetUnwrappedException(t.Exception); - } - else if (t.IsCanceled) - { - tcs.SetCanceled(); - } - else - { - try - { - successor(t.Result); - tcs.SetResult(null); - } - catch (Exception ex) - { - tcs.SetUnwrappedException(ex); - } - } - }); - - return tcs.Task; - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - internal static Task RunTask(Task task, Func successor) - { - var tcs = new TaskCompletionSource(); - task.ContinueWith(t => - { - if (t.IsFaulted) - { - tcs.SetUnwrappedException(t.Exception); - } - else if (t.IsCanceled) - { - tcs.SetCanceled(); - } - else - { - try - { - tcs.SetResult(successor()); - } - catch (Exception ex) - { - tcs.SetUnwrappedException(ex); - } - } - }); - - return tcs.Task; - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are set in a tcs")] - internal static Task RunTask(Task task, Func, TResult> successor) - { - var tcs = new TaskCompletionSource(); - task.ContinueWith(t => - { - if (task.IsFaulted) - { - tcs.SetUnwrappedException(t.Exception); - } - else if (task.IsCanceled) - { - tcs.SetCanceled(); - } - else - { - try - { - tcs.SetResult(successor(t)); - } - catch (Exception ex) - { - tcs.SetUnwrappedException(ex); - } - } - }); - - return tcs.Task; - } - } - - private static class GenericDelegates - { - internal static Task ThenWithArgs(Task task, Action successor, T1 arg1) - { - return RunTask(task, () => successor(arg1)); - } - - internal static Task ThenWithArgs(Task task, Action successor, T1 arg1, T2 arg2) - { - return RunTask(task, () => successor(arg1, arg2)); - } - - internal static Task ThenWithArgs(Task task, Func successor, T1 arg1) - { - return TaskRunners.RunTask(task, () => successor(arg1)); - } - - internal static Task ThenWithArgs(Task task, Func successor, T1 arg1, T2 arg2) - { - return TaskRunners.RunTask(task, () => successor(arg1, arg2)); - } - - internal static Task ThenWithArgs(Task task, Func successor, T1 arg1) - { - return TaskRunners.RunTask(task, t => successor(t.Result, arg1)); - } - - internal static Task ThenWithArgs(Task task, Func successor, T1 arg1) - { - return TaskRunners.RunTask(task, () => successor(arg1)); - } - - internal static Task ThenWithArgs(Task task, Func successor, T1 arg1, T2 arg2) - { - return TaskRunners.RunTask(task, () => successor(arg1, arg2)); - } - - internal static Task> ThenWithArgs(Task task, Func> successor, T1 arg1) - { - return TaskRunners>.RunTask(task, t => successor(t.Result, arg1)); - } - - internal static Task> ThenWithArgs(Task task, Func, T1, Task> successor, T1 arg1) - { - return TaskRunners>.RunTask(task, t => successor(t, arg1)); - } - } - - private static class TaskCache - { - public static Task Empty = MakeTask(default(T)); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Tracing/ITraceManager.cs b/src/Microsoft.AspNet.SignalR.Core/Tracing/ITraceManager.cs deleted file mode 100644 index 21b8f03dc..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Tracing/ITraceManager.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Diagnostics; - -namespace Microsoft.AspNet.SignalR.Tracing -{ - public interface ITraceManager - { - SourceSwitch Switch { get; } - TraceSource this[string name] { get; } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Tracing/TraceManager.cs b/src/Microsoft.AspNet.SignalR.Core/Tracing/TraceManager.cs deleted file mode 100644 index 8ca4264a6..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Tracing/TraceManager.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Concurrent; -using System.Diagnostics; - -namespace Microsoft.AspNet.SignalR.Tracing -{ - public class TraceManager : ITraceManager - { - private readonly ConcurrentDictionary _sources = new ConcurrentDictionary(StringComparer.OrdinalIgnoreCase); - - public TraceManager() - { - Switch = new SourceSwitch("SignalRSwitch"); - } - - public SourceSwitch Switch { get; private set; } - - public TraceSource this[string name] - { - get - { - return _sources.GetOrAdd(name, key => new TraceSource(key, SourceLevels.Off) - { - Switch = Switch - }); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Tracing/TraceSourceExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Tracing/TraceSourceExtensions.cs deleted file mode 100644 index 745304bd5..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Tracing/TraceSourceExtensions.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace System.Diagnostics -{ - public static class TraceSourceExtensions - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "msg")] - public static void TraceVerbose(this TraceSource traceSource, string msg) - { - Trace(traceSource, TraceEventType.Verbose, msg); - } - - public static void TraceVerbose(this TraceSource traceSource, string format, params object[] args) - { - Trace(traceSource, TraceEventType.Verbose, format, args); - } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "msg")] - public static void TraceWarning(this TraceSource traceSource, string msg) - { - Trace(traceSource, TraceEventType.Warning, msg); - } - - public static void TraceWarning(this TraceSource traceSource, string format, params object[] args) - { - Trace(traceSource, TraceEventType.Warning, format, args); - } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "msg")] - public static void TraceError(this TraceSource traceSource, string msg) - { - Trace(traceSource, TraceEventType.Error, msg); - } - - public static void TraceError(this TraceSource traceSource, string format, params object[] args) - { - Trace(traceSource, TraceEventType.Error, format, args); - } - - private static void Trace(TraceSource traceSource, TraceEventType eventType, string msg) - { - traceSource.TraceEvent(eventType, 0, msg); - } - - private static void Trace(TraceSource traceSource, TraceEventType eventType, string format, params object[] args) - { - traceSource.TraceEvent(eventType, 0, format, args); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/ForeverFrameTransport.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/ForeverFrameTransport.cs deleted file mode 100644 index 275e0a0bd..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/ForeverFrameTransport.cs +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Transports -{ - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Disposable fields are disposed from a different method")] - public class ForeverFrameTransport : ForeverTransport - { - private const string _initPrefix = "" + - "" + - "" + - "SignalR Forever Frame Transport Stream\r\n" + - "" + - "\r\n"; - - private HTMLTextWriter _htmlOutputWriter; - - public ForeverFrameTransport(HostContext context, IDependencyResolver resolver) - : base(context, resolver) - { - } - - /// - /// Pointed to the HTMLOutputWriter to wrap output stream with an HTML friendly one - /// - public override TextWriter OutputWriter - { - get - { - return HTMLOutputWriter; - } - } - - private HTMLTextWriter HTMLOutputWriter - { - get - { - if (_htmlOutputWriter == null) - { - _htmlOutputWriter = new HTMLTextWriter(Context.Response); - _htmlOutputWriter.NewLine = "\n"; - } - - return _htmlOutputWriter; - } - } - - public override Task KeepAlive() - { - if (InitializeTcs == null || !InitializeTcs.Task.IsCompleted) - { - return TaskAsyncHelper.Empty; - } - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return EnqueueOperation(state => PerformKeepAlive(state), this); - } - - public override Task Send(PersistentResponse response) - { - OnSendingResponse(response); - - var context = new ForeverFrameTransportContext(this, response); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return EnqueueOperation(s => PerformSend(s), context); - } - - protected internal override Task InitializeResponse(ITransportConnection connection) - { - uint frameId; - string rawFrameId = Context.Request.QueryString["frameId"]; - if (String.IsNullOrWhiteSpace(rawFrameId) || !UInt32.TryParse(rawFrameId, NumberStyles.None, CultureInfo.InvariantCulture, out frameId)) - { - // Invalid frameId passed in - throw new InvalidOperationException(Resources.Error_InvalidForeverFrameId); - } - - string initScript = _initPrefix + - frameId.ToString(CultureInfo.InvariantCulture) + - _initSuffix; - - var context = new ForeverFrameTransportContext(this, initScript); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return base.InitializeResponse(connection).Then(s => Initialize(s), context); - } - - private static Task Initialize(object state) - { - var context = (ForeverFrameTransportContext)state; - - var initContext = new ForeverFrameTransportContext(context.Transport, context.State); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return WriteInit(initContext); - } - - private static Task WriteInit(ForeverFrameTransportContext context) - { - context.Transport.Context.Response.ContentType = "text/html; charset=UTF-8"; - - context.Transport.HTMLOutputWriter.WriteRaw((string)context.State); - context.Transport.HTMLOutputWriter.Flush(); - - return context.Transport.Context.Response.Flush(); - } - - private static Task PerformSend(object state) - { - var context = (ForeverFrameTransportContext)state; - - context.Transport.HTMLOutputWriter.WriteRaw("\r\n"); - context.Transport.HTMLOutputWriter.Flush(); - - return context.Transport.Context.Response.Flush(); - } - - private static Task PerformKeepAlive(object state) - { - var transport = (ForeverFrameTransport)state; - - transport.HTMLOutputWriter.WriteRaw(""); - transport.HTMLOutputWriter.WriteLine(); - transport.HTMLOutputWriter.WriteLine(); - transport.HTMLOutputWriter.Flush(); - - return transport.Context.Response.Flush(); - } - - private class ForeverFrameTransportContext - { - public ForeverFrameTransport Transport; - public object State; - - public ForeverFrameTransportContext(ForeverFrameTransport transport, object state) - { - Transport = transport; - State = state; - } - } - - private class HTMLTextWriter : BufferTextWriter - { - public HTMLTextWriter(IResponse response) - : base(response) - { - } - - public void WriteRaw(string value) - { - base.Write(value); - } - - public override void Write(string value) - { - base.Write(JavascriptEncode(value)); - } - - public override void WriteLine(string value) - { - base.WriteLine(JavascriptEncode(value)); - } - - private static string JavascriptEncode(string input) - { - return input.Replace("<", "\\u003c").Replace(">", "\\u003e"); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/ForeverTransport.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/ForeverTransport.cs deleted file mode 100644 index 94b464cf4..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/ForeverTransport.cs +++ /dev/null @@ -1,405 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Json; -using Microsoft.AspNet.SignalR.Tracing; - -namespace Microsoft.AspNet.SignalR.Transports -{ - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "The disposer is an optimization")] - public abstract class ForeverTransport : TransportDisconnectBase, ITransport - { - private readonly IPerformanceCounterManager _counters; - private IJsonSerializer _jsonSerializer; - private string _lastMessageId; - - private const int MaxMessages = 10; - - protected ForeverTransport(HostContext context, IDependencyResolver resolver) - : this(context, - resolver.Resolve(), - resolver.Resolve(), - resolver.Resolve(), - resolver.Resolve()) - { - } - - protected ForeverTransport(HostContext context, - IJsonSerializer jsonSerializer, - ITransportHeartbeat heartbeat, - IPerformanceCounterManager performanceCounterWriter, - ITraceManager traceManager) - : base(context, heartbeat, performanceCounterWriter, traceManager) - { - _jsonSerializer = jsonSerializer; - _counters = performanceCounterWriter; - } - - protected string LastMessageId - { - get - { - if (_lastMessageId == null) - { - _lastMessageId = Context.Request.QueryString["messageId"]; - } - - return _lastMessageId; - } - } - - protected IJsonSerializer JsonSerializer - { - get { return _jsonSerializer; } - } - - internal TaskCompletionSource InitializeTcs { get; set; } - - protected virtual void OnSending(string payload) - { - Heartbeat.MarkConnection(this); - } - - protected virtual void OnSendingResponse(PersistentResponse response) - { - Heartbeat.MarkConnection(this); - } - - public Func Received { get; set; } - - public Func TransportConnected { get; set; } - - public Func Connected { get; set; } - - public Func Reconnected { get; set; } - - // Unit testing hooks - internal Action AfterReceive; - internal Action BeforeCancellationTokenCallbackRegistered; - internal Action BeforeReceive; - internal Action AfterRequestEnd; - - protected override void InitializePersistentState() - { - // PersistentConnection.OnConnected must complete before we can write to the output stream, - // so clients don't indicate the connection has started too early. - InitializeTcs = new TaskCompletionSource(); - WriteQueue = new TaskQueue(InitializeTcs.Task); - - base.InitializePersistentState(); - } - - protected Task ProcessRequestCore(ITransportConnection connection) - { - Connection = connection; - - if (Context.Request.Url.LocalPath.EndsWith("/send", StringComparison.OrdinalIgnoreCase)) - { - return ProcessSendRequest(); - } - else if (IsAbortRequest) - { - return Connection.Abort(ConnectionId); - } - else - { - InitializePersistentState(); - - return ProcessReceiveRequest(connection); - } - } - - public virtual Task ProcessRequest(ITransportConnection connection) - { - return ProcessRequestCore(connection); - } - - public abstract Task Send(PersistentResponse response); - - public virtual Task Send(object value) - { - var context = new ForeverTransportContext(this, value); - - return EnqueueOperation(state => PerformSend(state), context); - } - - protected internal virtual Task InitializeResponse(ITransportConnection connection) - { - return TaskAsyncHelper.Empty; - } - - protected internal override Task EnqueueOperation(Func writeAsync, object state) - { - Task task = base.EnqueueOperation(writeAsync, state); - - // If PersistentConnection.OnConnected has not completed (as indicated by InitializeTcs), - // the queue will be blocked to prevent clients from prematurely indicating the connection has - // started, but we must keep receive loop running to continue processing commands and to - // prevent deadlocks caused by waiting on ACKs. - if (InitializeTcs == null || InitializeTcs.Task.IsCompleted) - { - return task; - } - - return TaskAsyncHelper.Empty; - } - - private Task ProcessSendRequest() - { - string data = Context.Request.Form["data"]; - - if (Received != null) - { - return Received(data); - } - - return TaskAsyncHelper.Empty; - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed to the caller.")] - protected Task ProcessReceiveRequest(ITransportConnection connection) - { - Func initialize = null; - - bool newConnection = Heartbeat.AddConnection(this); - - if (IsConnectRequest) - { - if (newConnection) - { - initialize = Connected; - - _counters.ConnectionsConnected.Increment(); - } - } - else - { - initialize = Reconnected; - } - - var series = new Func[] - { - state => ((Func)state).Invoke(), - state => ((Func)state).Invoke() - }; - - var states = new object[] { TransportConnected ?? _emptyTaskFunc, - initialize ?? _emptyTaskFunc }; - - Func fullInit = () => TaskAsyncHelper.Series(series, states); - - return ProcessMessages(connection, fullInit); - } - - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The object is disposed otherwise")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Exceptions are flowed to the caller.")] - private Task ProcessMessages(ITransportConnection connection, Func initialize) - { - var disposer = new Disposer(); - - if (BeforeCancellationTokenCallbackRegistered != null) - { - BeforeCancellationTokenCallbackRegistered(); - } - - var cancelContext = new ForeverTransportContext(this, disposer); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - IDisposable registration = ConnectionEndToken.SafeRegister(state => Cancel(state), cancelContext); - - var lifetime = new RequestLifetime(this, _requestLifeTime); - var messageContext = new MessageContext(this, lifetime, registration); - - if (BeforeReceive != null) - { - BeforeReceive(); - } - - try - { - // Ensure we enqueue the response initialization before any messages are received - EnqueueOperation(state => InitializeResponse((ITransportConnection)state), connection) - .Catch((ex, state) => OnError(ex, state), messageContext); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - IDisposable subscription = connection.Receive(LastMessageId, - (response, state) => OnMessageReceived(response, state), - MaxMessages, - messageContext); - - - disposer.Set(subscription); - - if (AfterReceive != null) - { - AfterReceive(); - } - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - initialize().Then(tcs => tcs.TrySetResult(null), InitializeTcs) - .Catch((ex, state) => OnError(ex, state), messageContext); - } - catch (OperationCanceledException ex) - { - InitializeTcs.TrySetCanceled(); - - lifetime.Complete(ex); - } - catch (Exception ex) - { - InitializeTcs.TrySetCanceled(); - - lifetime.Complete(ex); - } - - return _requestLifeTime.Task; - } - - private static void Cancel(object state) - { - var context = (ForeverTransportContext)state; - - context.Transport.Trace.TraceEvent(TraceEventType.Verbose, 0, "Cancel(" + context.Transport.ConnectionId + ")"); - - ((IDisposable)context.State).Dispose(); - } - - private static Task OnMessageReceived(PersistentResponse response, object state) - { - var context = (MessageContext)state; - - response.Reconnect = context.Transport.HostShutdownToken.IsCancellationRequested; - - // If we're telling the client to disconnect then clean up the instantiated connection. - if (response.Disconnect) - { - // Send the response before removing any connection data - return context.Transport.Send(response).Then(c => OnDisconnectMessage(c), context) - .Then(() => TaskAsyncHelper.False); - } - else if (context.Transport.IsTimedOut || response.Aborted) - { - context.Registration.Dispose(); - - if (response.Aborted) - { - // If this was a clean disconnect raise the event. - return context.Transport.Abort() - .Then(() => TaskAsyncHelper.False); - } - } - - if (response.Terminal) - { - // End the request on the terminal response - context.Lifetime.Complete(); - - return TaskAsyncHelper.False; - } - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return context.Transport.Send(response) - .Then(() => TaskAsyncHelper.True); - } - - private static void OnDisconnectMessage(MessageContext context) - { - context.Transport.ApplyState(TransportConnectionStates.DisconnectMessageReceived); - - context.Registration.Dispose(); - - // Remove connection without triggering disconnect - context.Transport.Heartbeat.RemoveConnection(context.Transport); - } - - private static Task PerformSend(object state) - { - var context = (ForeverTransportContext)state; - - if (!context.Transport.IsAlive) - { - return TaskAsyncHelper.Empty; - } - - context.Transport.Context.Response.ContentType = JsonUtility.JsonMimeType; - - context.Transport.JsonSerializer.Serialize(context.State, context.Transport.OutputWriter); - context.Transport.OutputWriter.Flush(); - - return context.Transport.Context.Response.End(); - } - - private static void OnError(AggregateException ex, object state) - { - var context = (MessageContext)state; - - context.Transport.IncrementErrors(); - - // Cancel any pending writes in the queue - context.Transport.InitializeTcs.TrySetCanceled(); - - // Complete the http request - context.Lifetime.Complete(ex); - } - - private class ForeverTransportContext - { - public object State; - public ForeverTransport Transport; - - public ForeverTransportContext(ForeverTransport foreverTransport, object state) - { - State = state; - Transport = foreverTransport; - } - } - - private class MessageContext - { - public ForeverTransport Transport; - public RequestLifetime Lifetime; - public IDisposable Registration; - - public MessageContext(ForeverTransport transport, RequestLifetime lifetime, IDisposable registration) - { - Registration = registration; - Lifetime = lifetime; - Transport = transport; - } - } - - private class RequestLifetime - { - private readonly HttpRequestLifeTime _lifetime; - private readonly ForeverTransport _transport; - - public RequestLifetime(ForeverTransport transport, HttpRequestLifeTime lifetime) - { - _lifetime = lifetime; - _transport = transport; - } - - public void Complete() - { - Complete(error: null); - } - - public void Complete(Exception error) - { - _lifetime.Complete(error); - - _transport.Dispose(); - - if (_transport.AfterRequestEnd != null) - { - _transport.AfterRequestEnd(error); - } - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/HttpRequestLifeTime.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/HttpRequestLifeTime.cs deleted file mode 100644 index 1354dcb2c..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/HttpRequestLifeTime.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Transports -{ - internal class HttpRequestLifeTime - { - private readonly TaskCompletionSource _lifetimeTcs = new TaskCompletionSource(); - private readonly TransportDisconnectBase _transport; - private readonly TaskQueue _writeQueue; - private readonly TraceSource _trace; - private readonly string _connectionId; - - public HttpRequestLifeTime(TransportDisconnectBase transport, TaskQueue writeQueue, TraceSource trace, string connectionId) - { - _transport = transport; - _trace = trace; - _connectionId = connectionId; - _writeQueue = writeQueue; - } - - public Task Task - { - get - { - return _lifetimeTcs.Task; - } - } - - public void Complete() - { - Complete(error: null); - } - - public void Complete(Exception error) - { - _trace.TraceEvent(TraceEventType.Verbose, 0, "DrainWrites(" + _connectionId + ")"); - - var context = new LifetimeContext(_transport, _lifetimeTcs, error); - - _transport.ApplyState(TransportConnectionStates.QueueDrained); - - // Drain the task queue for pending write operations so we don't end the request and then try to write - // to a corrupted request object. - _writeQueue.Drain().Catch().Finally(state => - { - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - ((LifetimeContext)state).Complete(); - }, - context); - - if (error != null) - { - _trace.TraceEvent(TraceEventType.Error, 0, "CompleteRequest (" + _connectionId + ") failed: " + error.GetBaseException()); - } - else - { - _trace.TraceInformation("CompleteRequest (" + _connectionId + ")"); - } - } - - private class LifetimeContext - { - private readonly TaskCompletionSource _lifetimeTcs; - private readonly Exception _error; - private readonly TransportDisconnectBase _transport; - - public LifetimeContext(TransportDisconnectBase transport, TaskCompletionSource lifeTimetcs, Exception error) - { - _transport = transport; - _lifetimeTcs = lifeTimetcs; - _error = error; - } - - public void Complete() - { - _transport.ApplyState(TransportConnectionStates.HttpRequestEnded); - - if (_error != null) - { - _lifetimeTcs.TrySetUnwrappedException(_error); - } - else - { - _lifetimeTcs.TrySetResult(null); - } - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/ITrackingConnection.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/ITrackingConnection.cs deleted file mode 100644 index 452e88def..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/ITrackingConnection.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Transports -{ - /// - /// Represents a connection that can be tracked by an . - /// - public interface ITrackingConnection : IDisposable - { - /// - /// Gets the id of the connection. - /// - string ConnectionId { get; } - - /// - /// Gets a cancellation token that represents the connection's lifetime. - /// - CancellationToken CancellationToken { get; } - - /// - /// Gets a value that represents if the connection is alive. - /// - bool IsAlive { get; } - - /// - /// Gets a value that represents if the connection is timed out. - /// - bool IsTimedOut { get; } - - /// - /// Gets a value that represents if the connection supprots keep alive. - /// - bool SupportsKeepAlive { get; } - - /// - /// Gets a value indicating the amount of time to wait after the connection dies before firing the disconnecting the connection. - /// - TimeSpan DisconnectThreshold { get; } - - /// - /// Gets the uri of the connection. - /// - Uri Url { get; } - - /// - /// Applies a new state to the connection. - /// - void ApplyState(TransportConnectionStates states); - - /// - /// Causes the connection to disconnect. - /// - Task Disconnect(); - - /// - /// Causes the connection to timeout. - /// - void Timeout(); - - /// - /// Sends a keep alive ping over the connection. - /// - Task KeepAlive(); - - /// - /// Kills the connection. - /// - [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "End", Justification = "Ends the connction thus the name is appropriate.")] - void End(); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/ITransport.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/ITransport.cs deleted file mode 100644 index f9544306c..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/ITransport.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Transports -{ - /// - /// Represents a transport that communicates - /// - public interface ITransport - { - /// - /// Gets or sets a callback that is invoked when the transport receives data. - /// - Func Received { get; set; } - - /// - /// Gets or sets a callback that is invoked when the initial connection connects to the transport. - /// - Func Connected { get; set; } - - /// - /// Gets or sets a callback that is invoked when the transport connects. - /// - Func TransportConnected { get; set; } - - /// - /// Gets or sets a callback that is invoked when the transport reconnects. - /// - Func Reconnected { get; set; } - - /// - /// Gets or sets a callback that is invoked when the transport disconnects. - /// - Func Disconnected { get; set; } - - /// - /// Gets or sets the connection id for the transport. - /// - string ConnectionId { get; set; } - - /// - /// Processes the specified for this transport. - /// - /// The to process. - /// A that completes when the transport has finished processing the connection. - Task ProcessRequest(ITransportConnection connection); - - /// - /// Sends data over the transport. - /// - /// The value to be sent. - /// A that completes when the send is complete. - Task Send(object value); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/ITransportConnection.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/ITransportConnection.cs deleted file mode 100644 index 50465c2f8..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/ITransportConnection.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Threading.Tasks; - -namespace Microsoft.AspNet.SignalR.Transports -{ - public interface ITransportConnection - { - IDisposable Receive(string messageId, Func> callback, int maxMessages, object state); - - Task Send(ConnectionMessage message); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/ITransportHeartBeat.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/ITransportHeartBeat.cs deleted file mode 100644 index 17a24e825..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/ITransportHeartBeat.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; - -namespace Microsoft.AspNet.SignalR.Transports -{ - /// - /// Manages tracking the state of connections. - /// - public interface ITransportHeartbeat - { - /// - /// Adds a new connection to the list of tracked connections. - /// - /// The connection to be added. - bool AddConnection(ITrackingConnection connection); - - /// - /// Marks an existing connection as active. - /// - /// The connection to mark. - void MarkConnection(ITrackingConnection connection); - - /// - /// Removes a connection from the list of tracked connections. - /// - /// The connection to remove. - void RemoveConnection(ITrackingConnection connection); - - /// - /// Gets a list of connections being tracked. - /// - /// A list of connections. - [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "This might be expensive.")] - IList GetConnections(); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/ITransportManager.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/ITransportManager.cs deleted file mode 100644 index 630cb4639..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/ITransportManager.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using Microsoft.AspNet.SignalR.Hosting; -namespace Microsoft.AspNet.SignalR.Transports -{ - /// - /// Manages the transports for connections. - /// - public interface ITransportManager - { - /// - /// Gets the specified transport for the specified . - /// - /// The for the current request. - /// The for the specified . - ITransport GetTransport(HostContext hostContext); - - /// - /// Determines whether the specified transport is supported. - /// - /// The name of the transport to test. - /// True if the transport is supported, otherwise False. - bool SupportsTransport(string transportName); - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/LongPollingTransport.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/LongPollingTransport.cs deleted file mode 100644 index a8fd15952..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/LongPollingTransport.cs +++ /dev/null @@ -1,400 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Json; -using Microsoft.AspNet.SignalR.Tracing; - -namespace Microsoft.AspNet.SignalR.Transports -{ - public class LongPollingTransport : TransportDisconnectBase, ITransport - { - private readonly IJsonSerializer _jsonSerializer; - private readonly IPerformanceCounterManager _counters; - - // This should be ok to do since long polling request never hang around too long - // so we won't bloat memory - private const int MaxMessages = 5000; - - public LongPollingTransport(HostContext context, IDependencyResolver resolver) - : this(context, - resolver.Resolve(), - resolver.Resolve(), - resolver.Resolve(), - resolver.Resolve()) - { - - } - - public LongPollingTransport(HostContext context, - IJsonSerializer jsonSerializer, - ITransportHeartbeat heartbeat, - IPerformanceCounterManager performanceCounterManager, - ITraceManager traceManager) - : base(context, heartbeat, performanceCounterManager, traceManager) - { - _jsonSerializer = jsonSerializer; - _counters = performanceCounterManager; - } - - /// - /// The number of milliseconds to tell the browser to wait before restablishing a - /// long poll connection after data is sent from the server. Defaults to 0. - /// - [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "long", Justification = "Longpolling is a well known term")] - public static long LongPollDelay - { - get; - set; - } - - public override TimeSpan DisconnectThreshold - { - get { return TimeSpan.FromMilliseconds(LongPollDelay); } - } - - public override bool IsConnectRequest - { - get - { - return Context.Request.Url.LocalPath.EndsWith("/connect", StringComparison.OrdinalIgnoreCase); - } - } - - private bool IsReconnectRequest - { - get - { - return Context.Request.Url.LocalPath.EndsWith("/reconnect", StringComparison.OrdinalIgnoreCase); - } - } - - private bool IsJsonp - { - get - { - return !String.IsNullOrEmpty(JsonpCallback); - } - } - - private bool IsSendRequest - { - get - { - return Context.Request.Url.LocalPath.EndsWith("/send", StringComparison.OrdinalIgnoreCase); - } - } - - private string MessageId - { - get - { - return Context.Request.QueryString["messageId"]; - } - } - - private string JsonpCallback - { - get - { - return Context.Request.QueryString["callback"]; - } - } - - public override bool SupportsKeepAlive - { - get - { - return false; - } - } - - public Func Received { get; set; } - - public Func TransportConnected { get; set; } - - public Func Connected { get; set; } - - public Func Reconnected { get; set; } - - public Task ProcessRequest(ITransportConnection connection) - { - Connection = connection; - - if (IsSendRequest) - { - return ProcessSendRequest(); - } - else if (IsAbortRequest) - { - return Connection.Abort(ConnectionId); - } - else - { - InitializePersistentState(); - - return ProcessReceiveRequest(connection); - } - } - - public Task Send(PersistentResponse response) - { - Heartbeat.MarkConnection(this); - - AddTransportData(response); - - return Send((object)response); - } - - public Task Send(object value) - { - var context = new LongPollingTransportContext(this, value); - - return EnqueueOperation(state => PerformSend(state), context); - } - - private Task ProcessSendRequest() - { - string data = Context.Request.Form["data"] ?? Context.Request.QueryString["data"]; - - if (Received != null) - { - return Received(data); - } - - return TaskAsyncHelper.Empty; - } - - private Task ProcessReceiveRequest(ITransportConnection connection) - { - Func initialize = null; - - bool newConnection = Heartbeat.AddConnection(this); - - if (IsConnectRequest) - { - if (newConnection) - { - initialize = Connected; - - _counters.ConnectionsConnected.Increment(); - } - } - else if (IsReconnectRequest) - { - initialize = Reconnected; - } - - var series = new Func[] - { - state => ((Func)state).Invoke(), - state => ((Func)state).Invoke() - }; - - var states = new object[] { TransportConnected ?? _emptyTaskFunc, - initialize ?? _emptyTaskFunc }; - - Func fullInit = () => TaskAsyncHelper.Series(series, states); - - return ProcessMessages(connection, fullInit); - } - - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The subscription is disposed in the callback")] - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The exception is captured in a task")] - private Task ProcessMessages(ITransportConnection connection, Func initialize) - { - var disposer = new Disposer(); - - var cancelContext = new LongPollingTransportContext(this, disposer); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - IDisposable registration = ConnectionEndToken.SafeRegister(state => Cancel(state), cancelContext); - - var lifeTime = new RequestLifetime(this, _requestLifeTime, registration); - var messageContext = new MessageContext(this, lifeTime); - - try - { - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - IDisposable subscription = connection.Receive(MessageId, - (response, state) => OnMessageReceived(response, state), - MaxMessages, - messageContext); - - // Set the disposable - disposer.Set(subscription); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - initialize().Catch((ex, state) => OnError(ex, state), messageContext); - } - catch (Exception ex) - { - lifeTime.Complete(ex); - } - - return _requestLifeTime.Task; - } - - private static void Cancel(object state) - { - var context = (LongPollingTransportContext)state; - - context.Transport.Trace.TraceEvent(TraceEventType.Verbose, 0, "Cancel(" + context.Transport.ConnectionId + ")"); - - ((IDisposable)context.State).Dispose(); - } - - private static Task OnMessageReceived(PersistentResponse response, object state) - { - var context = (MessageContext)state; - - response.Reconnect = context.Transport.HostShutdownToken.IsCancellationRequested; - - Task task = TaskAsyncHelper.Empty; - - if (response.Aborted) - { - // If this was a clean disconnect then raise the event - task = context.Transport.Abort(); - } - - if (response.Terminal) - { - // If the response wasn't sent, send it before ending the request - if (!context.ResponseSent) - { - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return task.Then((ctx, resp) => ctx.Transport.Send(resp), context, response) - .Then(() => - { - context.Lifetime.Complete(); - - return TaskAsyncHelper.False; - }); - } - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return task.Then(() => - { - context.Lifetime.Complete(); - - return TaskAsyncHelper.False; - }); - } - - // Mark the response as sent - context.ResponseSent = true; - - // Send the response and return false - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return task.Then((ctx, resp) => ctx.Transport.Send(resp), context, response) - .Then(() => TaskAsyncHelper.False); - } - - private static Task PerformSend(object state) - { - var context = (LongPollingTransportContext)state; - - if (!context.Transport.IsAlive) - { - return TaskAsyncHelper.Empty; - } - - context.Transport.Context.Response.ContentType = context.Transport.IsJsonp ? JsonUtility.JavaScriptMimeType : JsonUtility.JsonMimeType; - - if (context.Transport.IsJsonp) - { - context.Transport.OutputWriter.Write(context.Transport.JsonpCallback); - context.Transport.OutputWriter.Write("("); - } - - context.Transport._jsonSerializer.Serialize(context.State, context.Transport.OutputWriter); - - if (context.Transport.IsJsonp) - { - context.Transport.OutputWriter.Write(");"); - } - - context.Transport.OutputWriter.Flush(); - - return context.Transport.Context.Response.End(); - } - - private static void OnError(AggregateException ex, object state) - { - var context = (MessageContext)state; - - context.Transport.IncrementErrors(); - - context.Lifetime.Complete(ex); - } - - private static void AddTransportData(PersistentResponse response) - { - if (LongPollDelay > 0) - { - response.LongPollDelay = LongPollDelay; - } - } - - private class LongPollingTransportContext - { - public object State; - public LongPollingTransport Transport; - - public LongPollingTransportContext(LongPollingTransport transport, object state) - { - State = state; - Transport = transport; - } - } - - private class MessageContext - { - public LongPollingTransport Transport; - public RequestLifetime Lifetime; - public bool ResponseSent; - - public MessageContext(LongPollingTransport longPollingTransport, RequestLifetime requestLifetime) - { - Transport = longPollingTransport; - Lifetime = requestLifetime; - } - } - - private class RequestLifetime - { - private readonly HttpRequestLifeTime _requestLifeTime; - private readonly LongPollingTransport _transport; - private readonly IDisposable _registration; - - public RequestLifetime(LongPollingTransport transport, HttpRequestLifeTime requestLifeTime, IDisposable registration) - { - _transport = transport; - _registration = registration; - _requestLifeTime = requestLifeTime; - } - - public void Complete() - { - Complete(exception: null); - } - - public void Complete(Exception exception) - { - // End the request - _requestLifeTime.Complete(exception); - - // Dispose of the cancellation token subscription - _registration.Dispose(); - - // Dispose any state on the transport - _transport.Dispose(); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/PersistentResponse.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/PersistentResponse.cs deleted file mode 100644 index ced8d90a3..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/PersistentResponse.cs +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Json; -using Microsoft.AspNet.SignalR.Messaging; -using Newtonsoft.Json; - -namespace Microsoft.AspNet.SignalR.Transports -{ - /// - /// Represents a response to a connection. - /// - public sealed class PersistentResponse : IJsonWritable - { - private readonly Func _exclude; - private readonly Action _writeCursor; - - public PersistentResponse() - : this(message => false, writer => { }) - { - - } - - /// - /// Creates a new instance of . - /// - /// A filter that determines whether messages should be written to the client. - /// The cursor writer. - public PersistentResponse(Func exclude, Action writeCursor) - { - _exclude = exclude; - _writeCursor = writeCursor; - } - - /// - /// The list of messages to be sent to the receiving connection. - /// - [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "This is an optimization and this type is only used for serialization.")] - [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "This type is only used for serialization")] - public IList> Messages { get; set; } - - public bool Terminal { get; set; } - - /// - /// The total count of the messages sent the receiving connection. - /// - public int TotalCount { get; set; } - - /// - /// True if the connection receives a disconnect command. - /// - public bool Disconnect { get; set; } - - /// - /// True if the connection was forcibly closed. - /// - public bool Aborted { get; set; } - - /// - /// True if the client should try reconnecting. - /// - // This is set when the host is shutting down. - public bool Reconnect { get; set; } - - /// - /// Signed token representing the list of groups. Updates on change. - /// - public string GroupsToken { get; set; } - - /// - /// The time the long polling client should wait before reestablishing a connection if no data is received. - /// - public long? LongPollDelay { get; set; } - - /// - /// Serializes only the necessary components of the to JSON - /// using Json.NET's JsonTextWriter to improve performance. - /// - /// The that receives the JSON serialization. - void IJsonWritable.WriteJson(TextWriter writer) - { - if (writer == null) - { - throw new ArgumentNullException("writer"); - } - - var jsonWriter = new JsonTextWriter(writer); - jsonWriter.WriteStartObject(); - - // REVIEW: Is this 100% correct? - writer.Write('"'); - writer.Write("C"); - writer.Write('"'); - writer.Write(':'); - writer.Write('"'); - _writeCursor(writer); - writer.Write('"'); - writer.Write(','); - - if (Disconnect) - { - jsonWriter.WritePropertyName("D"); - jsonWriter.WriteValue(1); - } - - if (Reconnect) - { - jsonWriter.WritePropertyName("T"); - jsonWriter.WriteValue(1); - } - - if (GroupsToken != null) - { - jsonWriter.WritePropertyName("G"); - jsonWriter.WriteValue(GroupsToken); - } - - if (LongPollDelay.HasValue) - { - jsonWriter.WritePropertyName("L"); - jsonWriter.WriteValue(LongPollDelay.Value); - } - - jsonWriter.WritePropertyName("M"); - jsonWriter.WriteStartArray(); - - WriteMessages(writer, jsonWriter); - - jsonWriter.WriteEndArray(); - jsonWriter.WriteEndObject(); - } - - private void WriteMessages(TextWriter writer, JsonTextWriter jsonWriter) - { - if (Messages == null) - { - return; - } - - // If the writer is a binary writer then write to the underlying writer directly - var binaryWriter = writer as IBinaryWriter; - - bool first = true; - - for (int i = 0; i < Messages.Count; i++) - { - ArraySegment segment = Messages[i]; - for (int j = segment.Offset; j < segment.Offset + segment.Count; j++) - { - Message message = segment.Array[j]; - - if (!message.IsCommand && !_exclude(message)) - { - if (binaryWriter != null) - { - if (!first) - { - // We need to write the array separator manually - writer.Write(','); - } - - // If we can write binary then just write it - binaryWriter.Write(message.Value); - - first = false; - } - else - { - // Write the raw JSON value - jsonWriter.WriteRawValue(message.GetString()); - } - } - } - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/ServerSentEventsTransport.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/ServerSentEventsTransport.cs deleted file mode 100644 index ef22be398..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/ServerSentEventsTransport.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; - -namespace Microsoft.AspNet.SignalR.Transports -{ - public class ServerSentEventsTransport : ForeverTransport - { - public ServerSentEventsTransport(HostContext context, IDependencyResolver resolver) - : base(context, resolver) - { - } - - public override Task KeepAlive() - { - if (InitializeTcs == null || !InitializeTcs.Task.IsCompleted) - { - return TaskAsyncHelper.Empty; - } - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return EnqueueOperation(state => PerformKeepAlive(state), this); - } - - public override Task Send(PersistentResponse response) - { - OnSendingResponse(response); - - var context = new SendContext(this, response); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return EnqueueOperation(state => PerformSend(state), context); - } - - protected internal override Task InitializeResponse(ITransportConnection connection) - { - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return base.InitializeResponse(connection) - .Then(s => WriteInit(s), this); - } - - private static Task PerformKeepAlive(object state) - { - var transport = (ServerSentEventsTransport)state; - - transport.OutputWriter.Write("data: {}"); - transport.OutputWriter.WriteLine(); - transport.OutputWriter.WriteLine(); - transport.OutputWriter.Flush(); - - return transport.Context.Response.Flush(); - } - - private static Task PerformSend(object state) - { - var context = (SendContext)state; - - context.Transport.OutputWriter.Write("data: "); - context.Transport.JsonSerializer.Serialize(context.State, context.Transport.OutputWriter); - context.Transport.OutputWriter.WriteLine(); - context.Transport.OutputWriter.WriteLine(); - context.Transport.OutputWriter.Flush(); - - return context.Transport.Context.Response.Flush(); - } - - private static Task WriteInit(ServerSentEventsTransport transport) - { - transport.Context.Response.ContentType = "text/event-stream"; - - // "data: initialized\n\n" - transport.OutputWriter.Write("data: initialized"); - transport.OutputWriter.WriteLine(); - transport.OutputWriter.WriteLine(); - transport.OutputWriter.Flush(); - - return transport.Context.Response.Flush(); - } - - private class SendContext - { - public ServerSentEventsTransport Transport; - public object State; - - public SendContext(ServerSentEventsTransport transport, object state) - { - Transport = transport; - State = state; - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportConnectionExtensions.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/TransportConnectionExtensions.cs deleted file mode 100644 index 1f12d533f..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportConnectionExtensions.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Messaging; - -namespace Microsoft.AspNet.SignalR.Transports -{ - internal static class TransportConnectionExtensions - { - internal static Task Close(this ITransportConnection connection, string connectionId) - { - return SendCommand(connection, connectionId, CommandType.Disconnect); - } - - internal static Task Abort(this ITransportConnection connection, string connectionId) - { - return SendCommand(connection, connectionId, CommandType.Abort); - } - - private static Task SendCommand(ITransportConnection connection, string connectionId, CommandType commandType) - { - var command = new Command - { - CommandType = commandType - }; - - var message = new ConnectionMessage(PrefixHelper.GetConnectionId(connectionId), - command); - - return connection.Send(message); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportConnectionStates.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/TransportConnectionStates.cs deleted file mode 100644 index 6ffddb4e5..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportConnectionStates.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace Microsoft.AspNet.SignalR.Transports -{ - [Flags] - public enum TransportConnectionStates - { - None = 0, - Added = 1, - Removed = 2, - Replaced = 4, - QueueDrained = 8, - HttpRequestEnded = 16, - Disconnected = 32, - Aborted = 64, - DisconnectMessageReceived = 128, - Disposed = 65536, - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportDisconnectBase.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/TransportDisconnectBase.cs deleted file mode 100644 index 45f96e0bd..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportDisconnectBase.cs +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Tracing; - -namespace Microsoft.AspNet.SignalR.Transports -{ - [SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", Justification = "Disposable fields are disposed from a different method")] - public abstract class TransportDisconnectBase : ITrackingConnection - { - private readonly HostContext _context; - private readonly ITransportHeartbeat _heartbeat; - private TextWriter _outputWriter; - - private TraceSource _trace; - - private int _timedOut; - private readonly IPerformanceCounterManager _counters; - private int _ended; - private TransportConnectionStates _state; - - internal static readonly Func _emptyTaskFunc = () => TaskAsyncHelper.Empty; - - // Token that represents the end of the connection based on a combination of - // conditions (timeout, disconnect, connection forcibly ended, host shutdown) - private CancellationToken _connectionEndToken; - private SafeCancellationTokenSource _connectionEndTokenSource; - - // Token that represents the host shutting down - private CancellationToken _hostShutdownToken; - private IDisposable _hostRegistration; - private IDisposable _connectionEndRegistration; - - internal HttpRequestLifeTime _requestLifeTime; - - protected TransportDisconnectBase(HostContext context, ITransportHeartbeat heartbeat, IPerformanceCounterManager performanceCounterManager, ITraceManager traceManager) - { - if (context == null) - { - throw new ArgumentNullException("context"); - } - - if (heartbeat == null) - { - throw new ArgumentNullException("heartbeat"); - } - - if (performanceCounterManager == null) - { - throw new ArgumentNullException("performanceCounterManager"); - } - - if (traceManager == null) - { - throw new ArgumentNullException("traceManager"); - } - - _context = context; - _heartbeat = heartbeat; - _counters = performanceCounterManager; - - // Queue to protect against overlapping writes to the underlying response stream - WriteQueue = new TaskQueue(); - - _trace = traceManager["SignalR.Transports." + GetType().Name]; - } - - protected TraceSource Trace - { - get - { - return _trace; - } - } - - public string ConnectionId - { - get; - set; - } - - public virtual TextWriter OutputWriter - { - get - { - if (_outputWriter == null) - { - _outputWriter = CreateResponseWriter(); - _outputWriter.NewLine = "\n"; - } - - return _outputWriter; - } - } - - internal TaskQueue WriteQueue - { - get; - set; - } - - public Func Disconnected { get; set; } - - public virtual CancellationToken CancellationToken - { - get { return _context.Response.CancellationToken; } - } - - public virtual bool IsAlive - { - get - { - // If the CTS is tripped or the request has ended then the connection isn't alive - return !(CancellationToken.IsCancellationRequested || (_requestLifeTime != null && _requestLifeTime.Task.IsCompleted)); - } - } - - protected CancellationToken ConnectionEndToken - { - get - { - return _connectionEndToken; - } - } - - protected CancellationToken HostShutdownToken - { - get - { - return _hostShutdownToken; - } - } - - public bool IsTimedOut - { - get - { - return _timedOut == 1; - } - } - - public virtual bool SupportsKeepAlive - { - get - { - return true; - } - } - - public virtual TimeSpan DisconnectThreshold - { - get { return TimeSpan.FromSeconds(5); } - } - - public virtual bool IsConnectRequest - { - get - { - return Context.Request.Url.LocalPath.EndsWith("/connect", StringComparison.OrdinalIgnoreCase); - } - } - - protected bool IsAbortRequest - { - get - { - return Context.Request.Url.LocalPath.EndsWith("/abort", StringComparison.OrdinalIgnoreCase); - } - } - - protected ITransportConnection Connection { get; set; } - - protected HostContext Context - { - get { return _context; } - } - - protected ITransportHeartbeat Heartbeat - { - get { return _heartbeat; } - } - - public Uri Url - { - get { return _context.Request.Url; } - } - - protected virtual TextWriter CreateResponseWriter() - { - return new BinaryTextWriter(Context.Response); - } - - protected void IncrementErrors() - { - _counters.ErrorsTransportTotal.Increment(); - _counters.ErrorsTransportPerSec.Increment(); - _counters.ErrorsAllTotal.Increment(); - _counters.ErrorsAllPerSec.Increment(); - } - - public Task Disconnect() - { - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return Abort(clean: false).Then(transport => transport.Connection.Close(transport.ConnectionId), this); - } - - public Task Abort() - { - return Abort(clean: true); - } - - public Task Abort(bool clean) - { - if (clean) - { - ApplyState(TransportConnectionStates.Aborted); - } - else - { - ApplyState(TransportConnectionStates.Disconnected); - } - - Trace.TraceInformation("Abort(" + ConnectionId + ")"); - - // When a connection is aborted (graceful disconnect) we send a command to it - // telling to to disconnect. At that moment, we raise the disconnect event and - // remove this connection from the heartbeat so we don't end up raising it for the same connection. - Heartbeat.RemoveConnection(this); - - // End the connection - End(); - - var disconnected = Disconnected ?? _emptyTaskFunc; - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return disconnected().Catch((ex, state) => OnDisconnectError(ex, state), Trace) - .Then(counters => counters.ConnectionsDisconnected.Increment(), _counters); - } - - public void ApplyState(TransportConnectionStates states) - { - _state |= states; - } - - public void Timeout() - { - if (Interlocked.Exchange(ref _timedOut, 1) == 0) - { - Trace.TraceInformation("Timeout(" + ConnectionId + ")"); - - End(); - } - } - - public virtual Task KeepAlive() - { - return TaskAsyncHelper.Empty; - } - - public void End() - { - if (Interlocked.Exchange(ref _ended, 1) == 0) - { - Trace.TraceInformation("End(" + ConnectionId + ")"); - - if (_connectionEndTokenSource != null) - { - _connectionEndTokenSource.Cancel(); - } - } - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - _connectionEndTokenSource.Dispose(); - _connectionEndRegistration.Dispose(); - _hostRegistration.Dispose(); - - ApplyState(TransportConnectionStates.Disposed); - } - } - - protected virtual internal Task EnqueueOperation(Func writeAsync) - { - return EnqueueOperation(state => ((Func)state).Invoke(), writeAsync); - } - - protected virtual internal Task EnqueueOperation(Func writeAsync, object state) - { - if (!IsAlive) - { - return TaskAsyncHelper.Empty; - } - - // Only enqueue new writes if the connection is alive - return WriteQueue.Enqueue(writeAsync, state); - } - - protected virtual void InitializePersistentState() - { - _hostShutdownToken = _context.HostShutdownToken(); - - _requestLifeTime = new HttpRequestLifeTime(this, WriteQueue, Trace, ConnectionId); - - // Create a token that represents the end of this connection's life - _connectionEndTokenSource = new SafeCancellationTokenSource(); - _connectionEndToken = _connectionEndTokenSource.Token; - - // Handle the shutdown token's callback so we can end our token if it trips - _hostRegistration = _hostShutdownToken.SafeRegister(state => - { - ((SafeCancellationTokenSource)state).Cancel(); - }, - _connectionEndTokenSource); - - // When the connection ends release the request - _connectionEndRegistration = CancellationToken.SafeRegister(state => - { - ((HttpRequestLifeTime)state).Complete(); - }, - _requestLifeTime); - } - - private static void OnDisconnectError(AggregateException ex, object state) - { - ((TraceSource)state).TraceEvent(TraceEventType.Error, 0, "Failed to raise disconnect: " + ex.GetBaseException()); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportHeartBeat.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/TransportHeartBeat.cs deleted file mode 100644 index f44bb8216..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportHeartBeat.cs +++ /dev/null @@ -1,384 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using System.Threading; -using Microsoft.AspNet.SignalR.Configuration; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Tracing; - -namespace Microsoft.AspNet.SignalR.Transports -{ - /// - /// Default implementation of . - /// - public class TransportHeartbeat : ITransportHeartbeat, IDisposable - { - private readonly ConcurrentDictionary _connections = new ConcurrentDictionary(); - private readonly Timer _timer; - private readonly IConfigurationManager _configurationManager; - private readonly IServerCommandHandler _serverCommandHandler; - private readonly TraceSource _trace; - private readonly string _serverId; - private readonly IPerformanceCounterManager _counters; - private readonly object _counterLock = new object(); - - private int _running; - private ulong _heartbeatCount; - - /// - /// Initializes and instance of the class. - /// - /// The . - public TransportHeartbeat(IDependencyResolver resolver) - { - _configurationManager = resolver.Resolve(); - _serverCommandHandler = resolver.Resolve(); - _serverId = resolver.Resolve().ServerId; - _counters = resolver.Resolve(); - - var traceManager = resolver.Resolve(); - _trace = traceManager["SignalR.Transports.TransportHeartBeat"]; - - _serverCommandHandler.Command = ProcessServerCommand; - - // REVIEW: When to dispose the timer? - _timer = new Timer(Beat, - null, - _configurationManager.HeartbeatInterval(), - _configurationManager.HeartbeatInterval()); - } - - private TraceSource Trace - { - get - { - return _trace; - } - } - - private void ProcessServerCommand(ServerCommand command) - { - switch (command.ServerCommandType) - { - case ServerCommandType.RemoveConnection: - // Only remove connections if this command didn't originate from the owner - if (!command.IsFromSelf(_serverId)) - { - var connectionId = (string)command.Value; - - // Remove the connection - ConnectionMetadata metadata; - if (_connections.TryGetValue(connectionId, out metadata)) - { - metadata.Connection.End(); - - RemoveConnection(metadata.Connection); - } - } - break; - default: - break; - } - } - - /// - /// Adds a new connection to the list of tracked connections. - /// - /// The connection to be added. - public bool AddConnection(ITrackingConnection connection) - { - if (connection == null) - { - throw new ArgumentNullException("connection"); - } - - var newMetadata = new ConnectionMetadata(connection); - bool isNewConnection = true; - - _connections.AddOrUpdate(connection.ConnectionId, newMetadata, (key, old) => - { - Trace.TraceEvent(TraceEventType.Verbose, 0, "Connection {0} exists. Closing previous connection.", old.Connection.ConnectionId); - // Kick out the older connection. This should only happen when - // a previous connection attempt fails on the client side (e.g. transport fallback). - - old.Connection.ApplyState(TransportConnectionStates.Replaced); - - // Don't bother disposing the registration here since the token source - // gets disposed after the request has ended - old.Connection.End(); - - // If we have old metadata this isn't a new connection - isNewConnection = false; - - return newMetadata; - }); - - if (isNewConnection) - { - Trace.TraceInformation("Connection {0} is New.", connection.ConnectionId); - } - - lock (_counterLock) - { - _counters.ConnectionsCurrent.RawValue = _connections.Count; - } - - // Set the initial connection time - newMetadata.Initial = DateTime.UtcNow; - - newMetadata.Connection.ApplyState(TransportConnectionStates.Added); - - return isNewConnection; - } - - /// - /// Removes a connection from the list of tracked connections. - /// - /// The connection to remove. - public void RemoveConnection(ITrackingConnection connection) - { - if (connection == null) - { - throw new ArgumentNullException("connection"); - } - - // Remove the connection and associated metadata - ConnectionMetadata metadata; - if (_connections.TryRemove(connection.ConnectionId, out metadata)) - { - lock (_counterLock) - { - _counters.ConnectionsCurrent.RawValue = _connections.Count; - } - - connection.ApplyState(TransportConnectionStates.Removed); - - Trace.TraceInformation("Removing connection {0}", connection.ConnectionId); - } - } - - /// - /// Marks an existing connection as active. - /// - /// The connection to mark. - public void MarkConnection(ITrackingConnection connection) - { - if (connection == null) - { - throw new ArgumentNullException("connection"); - } - - // Do nothing if the connection isn't alive - if (!connection.IsAlive) - { - return; - } - - ConnectionMetadata metadata; - if (_connections.TryGetValue(connection.ConnectionId, out metadata)) - { - metadata.LastMarked = DateTime.UtcNow; - } - } - - public IList GetConnections() - { - return _connections.Values.Select(metadata => metadata.Connection).ToList(); - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "We're tracing exceptions and don't want to crash the process.")] - private void Beat(object state) - { - if (Interlocked.Exchange(ref _running, 1) == 1) - { - Trace.TraceEvent(TraceEventType.Verbose, 0, "Timer handler took longer than current interval"); - return; - } - - lock (_counterLock) - { - _counters.ConnectionsCurrent.RawValue = _connections.Count; - } - - try - { - _heartbeatCount++; - - foreach (var metadata in _connections.Values) - { - if (metadata.Connection.IsAlive) - { - CheckTimeoutAndKeepAlive(metadata); - } - else - { - Trace.TraceEvent(TraceEventType.Verbose, 0, metadata.Connection.ConnectionId + " is dead"); - - // Check if we need to disconnect this connection - CheckDisconnect(metadata); - } - } - } - catch (Exception ex) - { - Trace.TraceEvent(TraceEventType.Error, 0, "SignalR error during transport heart beat on background thread: {0}", ex); - } - finally - { - Interlocked.Exchange(ref _running, 0); - } - } - - private void CheckTimeoutAndKeepAlive(ConnectionMetadata metadata) - { - if (RaiseTimeout(metadata)) - { - // If we're past the expiration time then just timeout the connection - metadata.Connection.Timeout(); - } - else - { - // The connection is still alive so we need to keep it alive with a server side "ping". - // This is for scenarios where networking hardware (proxies, loadbalancers) get in the way - // of us handling timeout's or disconnects gracefully - if (RaiseKeepAlive(metadata)) - { - Trace.TraceEvent(TraceEventType.Verbose, 0, "KeepAlive(" + metadata.Connection.ConnectionId + ")"); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - metadata.Connection.KeepAlive().Catch((ex, state) => OnKeepAliveError(ex, state), Trace); - } - - MarkConnection(metadata.Connection); - } - } - - [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "We're tracing exceptions and don't want to crash the process.")] - private void CheckDisconnect(ConnectionMetadata metadata) - { - try - { - if (RaiseDisconnect(metadata)) - { - // Remove the connection from the list - RemoveConnection(metadata.Connection); - - // Fire disconnect on the connection - metadata.Connection.Disconnect(); - } - } - catch (Exception ex) - { - // Swallow exceptions that might happen during disconnect - Trace.TraceEvent(TraceEventType.Error, 0, "Raising Disconnect failed: {0}", ex); - } - } - - private bool RaiseDisconnect(ConnectionMetadata metadata) - { - // The transport is currently dead but it could just be reconnecting - // so we to check it's last active time to see if it's over the disconnect - // threshold - TimeSpan elapsed = DateTime.UtcNow - metadata.LastMarked; - - // The threshold for disconnect is the transport threshold + (potential network issues) - var threshold = metadata.Connection.DisconnectThreshold + _configurationManager.DisconnectTimeout; - - return elapsed >= threshold; - } - - private bool RaiseKeepAlive(ConnectionMetadata metadata) - { - var keepAlive = _configurationManager.KeepAlive; - - // Don't raise keep alive if it's set to 0 or the transport doesn't support - // keep alive - if (keepAlive == null || !metadata.Connection.SupportsKeepAlive) - { - return false; - } - - // Raise keep alive if the keep alive value has passed - return _heartbeatCount % (ulong)ConfigurationExtensions.HeartBeatsPerKeepAlive == 0; - } - - private bool RaiseTimeout(ConnectionMetadata metadata) - { - // The connection already timed out so do nothing - if (metadata.Connection.IsTimedOut) - { - return false; - } - - var keepAlive = _configurationManager.KeepAlive; - // If keep alive is configured and the connection supports keep alive - // don't ever time out - if (keepAlive != null && metadata.Connection.SupportsKeepAlive) - { - return false; - } - - TimeSpan elapsed = DateTime.UtcNow - metadata.Initial; - - // Only raise timeout if we're past the configured connection timeout. - return elapsed >= _configurationManager.ConnectionTimeout; - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - if (_timer != null) - { - _timer.Dispose(); - } - - Trace.TraceInformation("Dispose(). Closing all connections"); - - // Kill all connections - foreach (var pair in _connections) - { - ConnectionMetadata metadata; - if (_connections.TryGetValue(pair.Key, out metadata)) - { - metadata.Connection.End(); - } - } - } - } - - public void Dispose() - { - Dispose(true); - } - - private static void OnKeepAliveError(AggregateException ex, object state) - { - ((TraceSource)state).TraceEvent(TraceEventType.Error, 0, "Failed to send keep alive: " + ex.GetBaseException()); - } - - private class ConnectionMetadata - { - public ConnectionMetadata(ITrackingConnection connection) - { - Connection = connection; - Initial = DateTime.UtcNow; - LastMarked = DateTime.UtcNow; - } - - // The connection instance - public ITrackingConnection Connection { get; set; } - - // The last time the connection had any activity - public DateTime LastMarked { get; set; } - - // The initial connection time of the connection - public DateTime Initial { get; set; } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportManager.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/TransportManager.cs deleted file mode 100644 index a3619dffc..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/TransportManager.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Concurrent; -using System.Diagnostics.CodeAnalysis; -using Microsoft.AspNet.SignalR.Hosting; - -namespace Microsoft.AspNet.SignalR.Transports -{ - /// - /// The default implementation. - /// - public class TransportManager : ITransportManager - { - private readonly ConcurrentDictionary> _transports = new ConcurrentDictionary>(StringComparer.OrdinalIgnoreCase); - - /// - /// Initializes a new instance of class. - /// - /// The default . - [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Those are factory methods")] - public TransportManager(IDependencyResolver resolver) - { - if (resolver == null) - { - throw new ArgumentNullException("resolver"); - } - - Register("foreverFrame", context => new ForeverFrameTransport(context, resolver)); - Register("serverSentEvents", context => new ServerSentEventsTransport(context, resolver)); - Register("longPolling", context => new LongPollingTransport(context, resolver)); - Register("webSockets", context => new WebSocketTransport(context, resolver)); - } - - /// - /// Adds a new transport to the list of supported transports. - /// - /// The specified transport. - /// The factory method for the specified transport. - public void Register(string transportName, Func transportFactory) - { - if (String.IsNullOrEmpty(transportName)) - { - throw new ArgumentNullException("transportName"); - } - - if (transportFactory == null) - { - throw new ArgumentNullException("transportFactory"); - } - - _transports.TryAdd(transportName, transportFactory); - } - - /// - /// Removes a transport from the list of supported transports. - /// - /// The specified transport. - public void Remove(string transportName) - { - if (String.IsNullOrEmpty(transportName)) - { - throw new ArgumentNullException("transportName"); - } - - Func removed; - _transports.TryRemove(transportName, out removed); - } - - /// - /// Gets the specified transport for the specified . - /// - /// The for the current request. - /// The for the specified . - public ITransport GetTransport(HostContext hostContext) - { - if (hostContext == null) - { - throw new ArgumentNullException("hostContext"); - } - - string transportName = hostContext.Request.QueryString["transport"]; - - if (String.IsNullOrEmpty(transportName)) - { - return null; - } - - Func factory; - if (_transports.TryGetValue(transportName, out factory)) - { - return factory(hostContext); - } - - return null; - } - - /// - /// Determines whether the specified transport is supported. - /// - /// The name of the transport to test. - /// True if the transport is supported, otherwise False. - public bool SupportsTransport(string transportName) - { - if (String.IsNullOrEmpty(transportName)) - { - return false; - } - - return _transports.ContainsKey(transportName); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Core/Transports/WebSocketTransport.cs b/src/Microsoft.AspNet.SignalR.Core/Transports/WebSocketTransport.cs deleted file mode 100644 index 8f5db2cec..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/Transports/WebSocketTransport.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Infrastructure; -using Microsoft.AspNet.SignalR.Json; -using Microsoft.AspNet.SignalR.Tracing; - -namespace Microsoft.AspNet.SignalR.Transports -{ - public class WebSocketTransport : ForeverTransport - { - private readonly HostContext _context; - private IWebSocket _socket; - private bool _isAlive = true; - - private readonly Action _message; - private readonly Action _closed; - private readonly Action _error; - - public WebSocketTransport(HostContext context, - IDependencyResolver resolver) - : this(context, - resolver.Resolve(), - resolver.Resolve(), - resolver.Resolve(), - resolver.Resolve()) - { - } - - public WebSocketTransport(HostContext context, - IJsonSerializer serializer, - ITransportHeartbeat heartbeat, - IPerformanceCounterManager performanceCounterWriter, - ITraceManager traceManager) - : base(context, serializer, heartbeat, performanceCounterWriter, traceManager) - { - _context = context; - _message = OnMessage; - _closed = OnClosed; - _error = OnError; - } - - public override bool IsAlive - { - get - { - return _isAlive; - } - } - - public override CancellationToken CancellationToken - { - get - { - return CancellationToken.None; - } - } - - public override Task KeepAlive() - { - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return EnqueueOperation(state => - { - var webSocket = (IWebSocket)state; - return webSocket.Send("{}"); - }, - _socket); - } - - public override Task ProcessRequest(ITransportConnection connection) - { - if (IsAbortRequest) - { - return connection.Abort(ConnectionId); - } - else - { - var webSocketRequest = _context.Request as IWebSocketRequest; - - // Throw if the server implementation doesn't support websockets - if (webSocketRequest == null) - { - throw new InvalidOperationException(Resources.Error_WebSocketsNotSupported); - } - - Connection = connection; - InitializePersistentState(); - - return webSocketRequest.AcceptWebSocketRequest(socket => - { - _socket = socket; - socket.OnClose = _closed; - socket.OnMessage = _message; - socket.OnError = _error; - - return ProcessReceiveRequest(connection); - }, - InitializeTcs.Task); - } - } - - protected override TextWriter CreateResponseWriter() - { - return new BinaryTextWriter(_socket); - } - - public override Task Send(object value) - { - var context = new WebSocketTransportContext(this, value); - - // Ensure delegate continues to use the C# Compiler static delegate caching optimization. - return EnqueueOperation(state => PerformSend(state), context); - } - - public override Task Send(PersistentResponse response) - { - OnSendingResponse(response); - - return Send((object)response); - } - - protected internal override Task InitializeResponse(ITransportConnection connection) - { - return _socket.Send("{}"); - } - - private static Task PerformSend(object state) - { - var context = (WebSocketTransportContext)state; - - context.Transport.JsonSerializer.Serialize(context.State, context.Transport.OutputWriter); - context.Transport.OutputWriter.Flush(); - - return context.Transport._socket.Flush(); - } - - private void OnMessage(string message) - { - if (Received != null) - { - Received(message).Catch(); - } - } - - private void OnClosed() - { - Trace.TraceInformation("CloseSocket({0})", ConnectionId); - - // Require a request to /abort to stop tracking the connection. #2195 - _isAlive = false; - } - - private void OnError(Exception error) - { - Trace.TraceError("OnError({0}, {1})", ConnectionId, error); - } - - private class WebSocketTransportContext - { - public WebSocketTransport Transport; - public object State; - - public WebSocketTransportContext(WebSocketTransport transport, object state) - { - Transport = transport; - State = state; - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Core/app.config b/src/Microsoft.AspNet.SignalR.Core/app.config deleted file mode 100644 index 44298137a..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Core/packages.config b/src/Microsoft.AspNet.SignalR.Core/packages.config deleted file mode 100644 index 7c276ed86..000000000 --- a/src/Microsoft.AspNet.SignalR.Core/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Owin/Handlers/CallHandler.cs b/src/Microsoft.AspNet.SignalR.Owin/Handlers/CallHandler.cs deleted file mode 100644 index 3dd5c6975..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Handlers/CallHandler.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Security.Principal; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Owin.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Owin -{ - public class CallHandler - { - private readonly ConnectionConfiguration _configuration; - private readonly PersistentConnection _connection; - - public CallHandler(ConnectionConfiguration configuration, PersistentConnection connection) - { - _configuration = configuration; - _connection = connection; - } - - public Task Invoke(IDictionary environment) - { - var serverRequest = new ServerRequest(environment); - var serverResponse = new ServerResponse(environment); - var hostContext = new HostContext(serverRequest, serverResponse); - - string origin = serverRequest.RequestHeaders.GetHeader("Origin"); - - if (_configuration.EnableCrossDomain) - { - // Add CORS response headers support - if (!String.IsNullOrEmpty(origin)) - { - serverResponse.ResponseHeaders.SetHeader("Access-Control-Allow-Origin", origin); - serverResponse.ResponseHeaders.SetHeader("Access-Control-Allow-Credentials", "true"); - } - } - else - { - string callback = serverRequest.QueryString["callback"]; - - // If it's a JSONP request and we're not allowing cross domain requests then block it - // If there's an origin header and it's not a same origin request then block it. - - if (!String.IsNullOrEmpty(callback) || - (!String.IsNullOrEmpty(origin) && !IsSameOrigin(serverRequest.Url, origin))) - { - return EndResponse(environment, 403, Resources.Forbidden_CrossDomainIsDisabled); - } - } - - // Add the nosniff header for all responses to prevent IE from trying to sniff mime type from contents - serverResponse.ResponseHeaders.SetHeader("X-Content-Type-Options", "nosniff"); - - // REVIEW: Performance - hostContext.Items[HostConstants.SupportsWebSockets] = environment.SupportsWebSockets(); - hostContext.Items[HostConstants.ShutdownToken] = environment.GetShutdownToken(); - hostContext.Items[HostConstants.DebugMode] = environment.GetIsDebugEnabled(); - - serverRequest.DisableRequestCompression(); - serverResponse.DisableResponseBuffering(); - - _connection.Initialize(_configuration.Resolver, hostContext); - - if (!_connection.Authorize(serverRequest)) - { - IPrincipal user = hostContext.Request.User; - if (user != null && user.Identity.IsAuthenticated) - { - // If we failed to authorize the request then return a 403 since the request - // can't do anything - return EndResponse(environment, 403, "Forbidden"); - } - else - { - // If we failed to authorize the request and the user is not authenticated - // then return a 401 - return EndResponse(environment, 401, "Unauthorized"); - } - } - else - { - return _connection.ProcessRequest(hostContext); - } - } - - private static Task EndResponse(IDictionary environment, int statusCode, string reason) - { - environment[OwinConstants.ResponseStatusCode] = statusCode; - environment[OwinConstants.ResponseReasonPhrase] = reason; - - return TaskAsyncHelper.Empty; - } - - private static bool IsSameOrigin(Uri requestUri, string origin) - { - Uri originUri; - if (!Uri.TryCreate(origin.Trim(), UriKind.Absolute, out originUri)) - { - return false; - } - - return (requestUri.Scheme == originUri.Scheme) && - (requestUri.Host == originUri.Host) && - (requestUri.Port == originUri.Port); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Handlers/HubDispatcherHandler.cs b/src/Microsoft.AspNet.SignalR.Owin/Handlers/HubDispatcherHandler.cs deleted file mode 100644 index fcf83e5e3..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Handlers/HubDispatcherHandler.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hubs; -using Microsoft.AspNet.SignalR.Owin.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Owin.Handlers -{ - using AppFunc = Func, Task>; - - public class HubDispatcherHandler - { - private readonly AppFunc _next; - private readonly string _path; - private readonly HubConfiguration _configuration; - - public HubDispatcherHandler(AppFunc next, string path, HubConfiguration configuration) - { - _next = next; - _path = path; - _configuration = configuration; - } - - public Task Invoke(IDictionary environment) - { - var path = environment.Get(OwinConstants.RequestPath); - if (path == null || !PrefixMatcher.IsMatch(_path, path)) - { - return _next(environment); - } - - var dispatcher = new HubDispatcher(_configuration); - - var handler = new CallHandler(_configuration, dispatcher); - return handler.Invoke(environment); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Handlers/PersistentConnectionHandler.cs b/src/Microsoft.AspNet.SignalR.Owin/Handlers/PersistentConnectionHandler.cs deleted file mode 100644 index 71fb299eb..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Handlers/PersistentConnectionHandler.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Owin.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Owin.Handlers -{ - using AppFunc = Func, Task>; - - public class PersistentConnectionHandler - { - private readonly AppFunc _next; - private readonly string _path; - private readonly Type _connectionType; - private readonly ConnectionConfiguration _configuration; - - public PersistentConnectionHandler(AppFunc next, string path, Type connectionType, ConnectionConfiguration configuration) - { - _next = next; - _path = path; - _connectionType = connectionType; - _configuration = configuration; - } - - public Task Invoke(IDictionary environment) - { - var path = environment.Get(OwinConstants.RequestPath); - if (path == null || !PrefixMatcher.IsMatch(_path, path)) - { - return _next(environment); - } - - var connectionFactory = new PersistentConnectionFactory(_configuration.Resolver); - var connection = connectionFactory.CreateInstance(_connectionType); - - var handler = new CallHandler(_configuration, connection); - return handler.Invoke(environment); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/Headers.cs b/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/Headers.cs deleted file mode 100644 index c320568c9..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/Headers.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; - -namespace Microsoft.AspNet.SignalR.Owin.Infrastructure -{ - /// - /// Helper methods for creating and consuming CallParameters.Headers and ResultParameters.Headers. - /// - internal static class Headers - { - public static IDictionary SetHeader(this IDictionary headers, - string name, string value) - { - headers[name] = new[] { value }; - return headers; - } - - public static string[] GetHeaders(this IDictionary headers, - string name) - { - string[] value; - return headers != null && headers.TryGetValue(name, out value) ? value : null; - } - - public static string GetHeader(this IDictionary headers, - string name) - { - var values = GetHeaders(headers, name); - if (values == null) - { - return null; - } - - switch (values.Length) - { - case 0: - return String.Empty; - case 1: - return values[0]; - default: - return String.Join(",", values); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/OwinConstants.cs b/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/OwinConstants.cs deleted file mode 100644 index e2c246ba1..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/OwinConstants.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -namespace Microsoft.AspNet.SignalR.Owin -{ - internal static class OwinConstants - { - public const string Version = "owin.Version"; - - public const string RequestBody = "owin.RequestBody"; - public const string RequestHeaders = "owin.RequestHeaders"; - public const string RequestScheme = "owin.RequestScheme"; - public const string RequestMethod = "owin.RequestMethod"; - public const string RequestPathBase = "owin.RequestPathBase"; - public const string RequestPath = "owin.RequestPath"; - public const string RequestQueryString = "owin.RequestQueryString"; - public const string RequestProtocol = "owin.RequestProtocol"; - - public const string CallCancelled = "owin.CallCancelled"; - - public const string ResponseStatusCode = "owin.ResponseStatusCode"; - public const string ResponseReasonPhrase = "owin.ResponseReasonPhrase"; - public const string ResponseHeaders = "owin.ResponseHeaders"; - public const string ResponseBody = "owin.ResponseBody"; - - public const string TraceOutput = "host.TraceOutput"; - - public const string User = "server.User"; - public const string RemoteIpAddress = "server.RemoteIpAddress"; - public const string RemotePort = "server.RemotePort"; - public const string LocalIpAddress = "server.LocalIpAddress"; - public const string LocalPort = "server.LocalPort"; - - public const string DisableRequestCompression = "systemweb.DisableResponseCompression"; - public const string DisableRequestBuffering = "server.DisableRequestBuffering"; - public const string DisableResponseBuffering = "server.DisableResponseBuffering"; - - public const string ServerCapabilities = "server.Capabilities"; - public const string WebSocketVersion = "websocket.Version"; - public const string WebSocketAccept = "websocket.Accept"; - - public const string HostOnAppDisposing = "host.OnAppDisposing"; - public const string HostAppNameKey = "host.AppName"; - public const string HostAppModeKey = "host.AppMode"; - public const string AppModeDevelopment = "development"; - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/OwinEnvironmentExtensions.cs b/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/OwinEnvironmentExtensions.cs deleted file mode 100644 index 26459c76c..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/OwinEnvironmentExtensions.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading; - -namespace Microsoft.AspNet.SignalR.Owin -{ - internal static class OwinEnvironmentExtensions - { - internal static T Get(this IDictionary environment, string key) - { - object value; - return environment.TryGetValue(key, out value) ? (T)value : default(T); - } - - internal static CancellationToken GetShutdownToken(this IDictionary env) - { - object value; - return env.TryGetValue(OwinConstants.HostOnAppDisposing, out value) - && value is CancellationToken - ? (CancellationToken)value - : default(CancellationToken); - } - - internal static string GetAppInstanceName(this IDictionary environment) - { - object value; - if (environment.TryGetValue(OwinConstants.HostAppNameKey, out value)) - { - var stringVal = value as string; - - if (!String.IsNullOrEmpty(stringVal)) - { - return stringVal; - } - } - - return null; - } - - internal static bool SupportsWebSockets(this IDictionary environment) - { - object value; - if (environment.TryGetValue(OwinConstants.ServerCapabilities, out value)) - { - var capabilities = value as IDictionary; - if (capabilities != null) - { - return capabilities.ContainsKey(OwinConstants.WebSocketVersion); - } - } - return false; - } - - internal static bool GetIsDebugEnabled(this IDictionary environment) - { - object value; - if (environment.TryGetValue(OwinConstants.HostAppModeKey, out value)) - { - var stringVal = value as string; - return !String.IsNullOrWhiteSpace(stringVal) && - OwinConstants.AppModeDevelopment.Equals(stringVal, StringComparison.OrdinalIgnoreCase); - } - - return false; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/ParamDictionary.cs b/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/ParamDictionary.cs deleted file mode 100644 index 18b159d4d..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/ParamDictionary.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using Microsoft.AspNet.SignalR.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Owin.Infrastructure -{ - [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "It is instantiated in the static Parse method")] - internal sealed class ParamDictionary - { - private static readonly char[] DefaultParamSeparators = new[] { '&', ';' }; - private static readonly char[] ParamKeyValueSeparator = new[] { '=' }; - private static readonly char[] LeadingWhitespaceChars = new[] { ' ' }; - - internal static IEnumerable> ParseToEnumerable(string value, char[] delimiters = null) - { - value = value ?? String.Empty; - delimiters = delimiters ?? DefaultParamSeparators; - - var items = value.Split(delimiters, StringSplitOptions.RemoveEmptyEntries); - - foreach (var item in items) - { - string[] pair = item.Split(ParamKeyValueSeparator, 2, StringSplitOptions.None); - - string pairKey = UrlDecoder.UrlDecode(pair[0]).TrimStart(LeadingWhitespaceChars); - string pairValue = pair.Length < 2 ? String.Empty : UrlDecoder.UrlDecode(pair[1]); - - yield return new KeyValuePair(pairKey, pairValue); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/PrefixMatcher.cs b/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/PrefixMatcher.cs deleted file mode 100644 index 73186522a..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/PrefixMatcher.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; - -namespace Microsoft.AspNet.SignalR.Owin.Infrastructure -{ - internal static class PrefixMatcher - { - public static bool IsMatch(string pathBase, string path) - { - pathBase = EnsureStartsWithSlash(pathBase); - path = EnsureStartsWithSlash(path); - - var pathLength = path.Length; - var pathBaseLength = pathBase.Length; - - if (pathLength < pathBaseLength) - { - return false; - } - - if (pathLength > pathBaseLength && path[pathBaseLength] != '/') - { - return false; - } - - if (!path.StartsWith(pathBase, StringComparison.OrdinalIgnoreCase)) - { - return false; - } - - return true; - } - - private static string EnsureStartsWithSlash(string path) - { - if (path.Length == 0) - { - return path; - } - - if (path[0] == '/') - { - return path; - } - - return '/' + path; - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/UrlDecoder.cs b/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/UrlDecoder.cs deleted file mode 100644 index 0d813a875..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Infrastructure/UrlDecoder.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Text; - -namespace Microsoft.AspNet.SignalR.Infrastructure -{ - // Taken from System.Net.Http.Formatting.Internal.UrlDecoder.cs (http://aspnetwebstack.codeplex.com/) - - /// - /// Helpers for decoding URI query components. - /// - internal static class UrlDecoder - { - // The implementation below is ported from WebUtility for use in .Net 4 - - public static string UrlDecode(string str) - { - if (str == null) - return null; - - return UrlDecodeInternal(str, Encoding.UTF8); - } - - #region UrlDecode implementation - - private static string UrlDecodeInternal(string value, Encoding encoding) - { - if (value == null) - { - return null; - } - - int count = value.Length; - var helper = new DecoderHelper(count, encoding); - - // go through the string's chars collapsing %XX and %uXXXX and - // appending each char as char, with exception of %XX constructs - // that are appended as bytes - - for (int pos = 0; pos < count; pos++) - { - char ch = value[pos]; - - if (ch == '+') - { - ch = ' '; - } - else if (ch == '%' && pos < count - 2) - { - int h1 = HexToInt(value[pos + 1]); - int h2 = HexToInt(value[pos + 2]); - - if (h1 >= 0 && h2 >= 0) - { // valid 2 hex chars - byte b = (byte)((h1 << 4) | h2); - pos += 2; - - // don't add as char - helper.AddByte(b); - continue; - } - } - - if ((ch & 0xFF80) == 0) - helper.AddByte((byte)ch); // 7 bit have to go as bytes because of Unicode - else - helper.AddChar(ch); - } - - return helper.GetString(); - } - - private static int HexToInt(char h) - { - return (h >= '0' && h <= '9') ? h - '0' : - (h >= 'a' && h <= 'f') ? h - 'a' + 10 : - (h >= 'A' && h <= 'F') ? h - 'A' + 10 : - -1; - } - - #endregion - - #region DecoderHelper nested class - - // Internal class to facilitate URL decoding -- keeps char buffer and byte buffer, allows appending of either chars or bytes - private class DecoderHelper - { - private int _bufferSize; - - // Accumulate characters in a special array - private int _numChars; - private char[] _charBuffer; - - // Accumulate bytes for decoding into characters in a special array - private int _numBytes; - private byte[] _byteBuffer; - - // Encoding to convert chars to bytes - private Encoding _encoding; - - private void FlushBytes() - { - if (_numBytes > 0) - { - _numChars += _encoding.GetChars(_byteBuffer, 0, _numBytes, _charBuffer, _numChars); - _numBytes = 0; - } - } - - internal DecoderHelper(int bufferSize, Encoding encoding) - { - _bufferSize = bufferSize; - _encoding = encoding; - - _charBuffer = new char[bufferSize]; - // byte buffer created on demand - } - - internal void AddChar(char ch) - { - if (_numBytes > 0) - FlushBytes(); - - _charBuffer[_numChars++] = ch; - } - - internal void AddByte(byte b) - { - if (_byteBuffer == null) - _byteBuffer = new byte[_bufferSize]; - - _byteBuffer[_numBytes++] = b; - } - - internal String GetString() - { - if (_numBytes > 0) - FlushBytes(); - - if (_numChars > 0) - return new String(_charBuffer, 0, _numChars); - else - return String.Empty; - } - } - - #endregion - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Microsoft.AspNet.SignalR.Owin.csproj b/src/Microsoft.AspNet.SignalR.Owin/Microsoft.AspNet.SignalR.Owin.csproj deleted file mode 100644 index dbf0bb82a..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Microsoft.AspNet.SignalR.Owin.csproj +++ /dev/null @@ -1,112 +0,0 @@ - - - - - Debug - x86 - {2B8C6DAD-4D85-41B1-83FD-248D9F347522} - Library - Properties - Microsoft.AspNet.SignalR.Owin - Microsoft.AspNet.SignalR.Owin - v4.0 - 512 - ..\..\ - true - - 12.0.0 - 2.0 - - - true - bin\x86\Debug\ - TRACE;DEBUG - bin\Debug\Microsoft.AspNet.SignalR.Owin.XML - true - 1591 - full - x86 - prompt - C:\Dropbox\Git\NzbDrone\src\Common\Microsoft.AspNet.SignalR.ruleset - 4 - false - - - bin\x86\Release\ - TRACE - bin\Release\Microsoft.AspNet.SignalR.Owin.XML - true - true - 1591 - pdbonly - x86 - prompt - C:\Dropbox\Git\NzbDrone\src\Common\Microsoft.AspNet.SignalR.ruleset - 4 - - - - - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - - - Properties\CommonAssemblyInfo.cs - - - Properties\CommonVersionInfo.cs - - - Infrastructure\TaskAsyncHelper.cs - - - - - - - - - - - - - True - True - Resources.resx - - - - - - - - - - {1B9A82C4-BCA1-4834-A33E-226F17BE070B} - Microsoft.AspNet.SignalR.Core - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - diff --git a/src/Microsoft.AspNet.SignalR.Owin/Microsoft.AspNet.SignalR.Owin.csproj.DotSettings b/src/Microsoft.AspNet.SignalR.Owin/Microsoft.AspNet.SignalR.Owin.csproj.DotSettings deleted file mode 100644 index 5b8822215..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Microsoft.AspNet.SignalR.Owin.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - DO_NOT_SHOW \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Owin/OwinExtensions.cs b/src/Microsoft.AspNet.SignalR.Owin/OwinExtensions.cs deleted file mode 100644 index 7ff9c5d8c..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/OwinExtensions.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Threading; -using Microsoft.AspNet.SignalR; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Owin; -using Microsoft.AspNet.SignalR.Owin.Handlers; - -namespace Owin -{ - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Owin", Justification = "The owin namespace is for consistentcy.")] - public static class OwinExtensions - { - public static IAppBuilder MapHubs(this IAppBuilder builder) - { - return builder.MapHubs(new HubConfiguration()); - } - - public static IAppBuilder MapHubs(this IAppBuilder builder, HubConfiguration configuration) - { - return builder.MapHubs("/signalr", configuration); - } - - public static IAppBuilder MapHubs(this IAppBuilder builder, string path, HubConfiguration configuration) - { - if (configuration == null) - { - throw new ArgumentNullException("configuration"); - } - - return builder.UseType(path, configuration); - } - - [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "The type parameter is syntactic sugar")] - public static IAppBuilder MapConnection(this IAppBuilder builder, string url) where T : PersistentConnection - { - return builder.MapConnection(url, typeof(T), new ConnectionConfiguration()); - } - - [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "The type parameter is syntactic sugar")] - public static IAppBuilder MapConnection(this IAppBuilder builder, string url, ConnectionConfiguration configuration) where T : PersistentConnection - { - return builder.MapConnection(url, typeof(T), configuration); - } - - public static IAppBuilder MapConnection(this IAppBuilder builder, string url, Type connectionType, ConnectionConfiguration configuration) - { - if (configuration == null) - { - throw new ArgumentNullException("configuration"); - } - - return builder.UseType(url, connectionType, configuration); - } - - private static IAppBuilder UseType(this IAppBuilder builder, params object[] args) - { - if (args.Length > 0) - { - var configuration = args[args.Length - 1] as ConnectionConfiguration; - - if (configuration == null) - { - throw new ArgumentException(Resources.Error_NoConfiguration); - } - - var resolver = configuration.Resolver; - - if (resolver == null) - { - throw new ArgumentException(Resources.Error_NoDepenendeyResolver); - } - - var env = builder.Properties; - CancellationToken token = env.GetShutdownToken(); - string instanceName = env.GetAppInstanceName(); - - resolver.InitializeHost(instanceName, token); - } - - return builder.Use(typeof(T), args); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Properties/AssemblyInfo.cs b/src/Microsoft.AspNet.SignalR.Owin/Properties/AssemblyInfo.cs deleted file mode 100644 index c0e6f23c4..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System.Reflection; - -[assembly: AssemblyTitle("Microsoft.AspNet.SignalR.Owin")] -[assembly: AssemblyDescription("Assembly containing default SignalR host.")] diff --git a/src/Microsoft.AspNet.SignalR.Owin/RequestExtensions.cs b/src/Microsoft.AspNet.SignalR.Owin/RequestExtensions.cs deleted file mode 100644 index 03676f853..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/RequestExtensions.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using Microsoft.AspNet.SignalR.Owin; - -namespace Microsoft.AspNet.SignalR -{ - public static class RequestExtensions - { - public static T GetOwinVariable(this IRequest request, string key) - { - if (request == null) - { - throw new ArgumentNullException("request"); - } - - var env = request.Items.Get>(ServerRequest.OwinEnvironmentKey); - - return env == null ? default(T) : env.Get(key); - } - - private static T Get(this IDictionary values, string key) - { - object value; - return values.TryGetValue(key, out value) ? (T)value : default(T); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Resources.Designer.cs b/src/Microsoft.AspNet.SignalR.Owin/Resources.Designer.cs deleted file mode 100644 index 2925d4911..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Resources.Designer.cs +++ /dev/null @@ -1,96 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.18010 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Microsoft.AspNet.SignalR.Owin { - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.AspNet.SignalR.Owin.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to A configuration object must be specified.. - /// - internal static string Error_NoConfiguration { - get { - return ResourceManager.GetString("Error_NoConfiguration", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A dependency resolver must be specified.. - /// - internal static string Error_NoDepenendeyResolver { - get { - return ResourceManager.GetString("Error_NoDepenendeyResolver", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Not a valid web socket request.. - /// - internal static string Error_NotWebSocketRequest { - get { - return ResourceManager.GetString("Error_NotWebSocketRequest", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Forbidden: SignalR cross domain is disabled.. - /// - internal static string Forbidden_CrossDomainIsDisabled { - get { - return ResourceManager.GetString("Forbidden_CrossDomainIsDisabled", resourceCulture); - } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/Resources.resx b/src/Microsoft.AspNet.SignalR.Owin/Resources.resx deleted file mode 100644 index c77be7797..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/Resources.resx +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - A configuration object must be specified. - - - A dependency resolver must be specified. - - - Not a valid web socket request. - - - Forbidden: SignalR cross domain is disabled. - - \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Owin/ServerRequest.Owin.cs b/src/Microsoft.AspNet.SignalR.Owin/ServerRequest.Owin.cs deleted file mode 100644 index 407b7eb98..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/ServerRequest.Owin.cs +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using Microsoft.AspNet.SignalR.Owin.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Owin -{ - public partial class ServerRequest - { - private readonly IDictionary _environment; - - public static readonly string OwinEnvironmentKey = "owin.environment"; - - public ServerRequest(IDictionary environment) - { - _environment = environment; - - Items = new Dictionary(StringComparer.OrdinalIgnoreCase) - { - { OwinEnvironmentKey , _environment } - }; - } - - private string RequestMethod - { - get { return _environment.Get(OwinConstants.RequestMethod); } - } - - public IDictionary RequestHeaders - { - get { return _environment.Get>(OwinConstants.RequestHeaders); } - } - - private Stream RequestBody - { - get { return _environment.Get(OwinConstants.RequestBody); } - } - - private string RequestScheme - { - get { return _environment.Get(OwinConstants.RequestScheme); } - } - - private string RequestPathBase - { - get { return _environment.Get(OwinConstants.RequestPathBase); } - } - - private string RequestPath - { - get { return _environment.Get(OwinConstants.RequestPath); } - } - - private string RequestQueryString - { - get { return _environment.Get(OwinConstants.RequestQueryString); } - } - - public Action DisableRequestCompression - { - get { return _environment.Get(OwinConstants.DisableRequestCompression) ?? (() => { }); } - } - - private bool TryParseHostHeader(out IPAddress address, out string host, out int port) - { - address = null; - host = null; - port = -1; - - var hostHeader = RequestHeaders.GetHeader("Host"); - if (String.IsNullOrWhiteSpace(hostHeader)) - { - return false; - } - - // IPv6 (http://www.ietf.org/rfc/rfc2732.txt) - if (hostHeader.StartsWith("[", StringComparison.Ordinal)) - { - var portIndex = hostHeader.LastIndexOf("]:", StringComparison.Ordinal); - if (portIndex != -1 && Int32.TryParse(hostHeader.Substring(portIndex + 2), out port)) - { - if (IPAddress.TryParse(hostHeader.Substring(1, portIndex - 1), out address)) - { - host = null; - return true; - } - host = hostHeader.Substring(0, portIndex + 1); - return true; - } - if (hostHeader.EndsWith("]", StringComparison.Ordinal)) - { - if (IPAddress.TryParse(hostHeader.Substring(1, hostHeader.Length - 2), out address)) - { - host = null; - port = -1; - return true; - } - } - } - else - { - // IPAddresses - if (IPAddress.TryParse(hostHeader, out address)) - { - host = null; - port = -1; - return true; - } - - var portIndex = hostHeader.LastIndexOf(':'); - if (portIndex != -1 && Int32.TryParse(hostHeader.Substring(portIndex + 1), out port)) - { - host = hostHeader.Substring(0, portIndex); - return true; - } - } - - // Plain - host = hostHeader; - return true; - } - - private string RequestHost - { - get - { - IPAddress address; - string host; - int port; - if (TryParseHostHeader(out address, out host, out port)) - { - return host ?? address.ToString(); - } - return _environment.Get(OwinConstants.LocalIpAddress) ?? IPAddress.Loopback.ToString(); - } - } - - private int RequestPort - { - get - { - IPAddress address; - string host; - int port; - if (TryParseHostHeader(out address, out host, out port)) - { - if (port == -1) - { - return DefaultPort; - } - return port; - } - - var portString = _environment.Get(OwinConstants.LocalPort); - if (Int32.TryParse(portString, out port) && port != 0) - { - return port; - } - - return DefaultPort; - } - } - - private int DefaultPort - { - get - { - return String.Equals(RequestScheme, "https", StringComparison.OrdinalIgnoreCase) ? 443 : 80; - } - } - - private string ContentType - { - get - { - return RequestHeaders.GetHeader("Content-Type"); - } - } - - private string MediaType - { - get - { - var contentType = ContentType; - if (contentType == null) - { - return null; - } - - var delimiterPos = contentType.IndexOfAny(CommaSemicolon); - return delimiterPos < 0 ? contentType : contentType.Substring(0, delimiterPos); - } - } - - private bool HasFormData - { - get - { - var mediaType = MediaType; - return (RequestMethod == "POST" && String.IsNullOrEmpty(mediaType)) - || mediaType == "application/x-www-form-urlencoded" - || mediaType == "multipart/form-data"; - } - } - - private bool HasParseableData - { - get - { - var mediaType = MediaType; - return mediaType == "application/x-www-form-urlencoded" - || mediaType == "multipart/form-data"; - } - } - - private IEnumerable> ReadForm() - { - if (!HasFormData && !HasParseableData) - { - return Enumerable.Empty>(); - } - - var body = RequestBody; - if (body.CanSeek) - { - body.Seek(0, SeekOrigin.Begin); - } - - var text = new StreamReader(body).ReadToEnd(); - return ParamDictionary.ParseToEnumerable(text); - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/ServerRequest.cs b/src/Microsoft.AspNet.SignalR.Owin/ServerRequest.cs deleted file mode 100644 index 152580f8d..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/ServerRequest.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Security.Principal; -using System.Threading; -using Microsoft.AspNet.SignalR.Owin.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Owin -{ - public partial class ServerRequest : -#if NET45 - IWebSocketRequest -#else - IRequest -#endif - { - private static readonly char[] CommaSemicolon = new[] { ',', ';' }; - - private Uri _url; - private NameValueCollection _queryString; - private NameValueCollection _headers; - private NameValueCollection _form; - private bool _formInitialized; - private object _formLock = new object(); - private IDictionary _cookies; - - public Uri Url - { - get - { - return LazyInitializer.EnsureInitialized( - ref _url, () => - { - var uriBuilder = new UriBuilder(RequestScheme, RequestHost, RequestPort, RequestPathBase + RequestPath); - if (!String.IsNullOrEmpty(RequestQueryString)) - { - uriBuilder.Query = RequestQueryString; - } - return uriBuilder.Uri; - }); - } - } - - - public NameValueCollection QueryString - { - get - { - return LazyInitializer.EnsureInitialized( - ref _queryString, () => - { - var collection = new NameValueCollection(); - foreach (var kv in ParamDictionary.ParseToEnumerable(RequestQueryString)) - { - collection.Add(kv.Key, kv.Value); - } - return collection; - }); - } - } - - public NameValueCollection Headers - { - get - { - return LazyInitializer.EnsureInitialized( - ref _headers, () => - { - var collection = new NameValueCollection(); - foreach (var kv in RequestHeaders) - { - if (kv.Value != null) - { - for (var index = 0; index != kv.Value.Length; ++index) - { - collection.Add(kv.Key, kv.Value[index]); - } - } - } - return collection; - }); - } - } - - public NameValueCollection Form - { - get - { - return LazyInitializer.EnsureInitialized( - ref _form, ref _formInitialized, ref _formLock, () => - { - var collection = new NameValueCollection(); - foreach (var kv in ReadForm()) - { - collection.Add(kv.Key, kv.Value); - } - return collection; - }); - } - } - - - public IDictionary Cookies - { - get - { - return LazyInitializer.EnsureInitialized( - ref _cookies, () => - { - var cookies = new Dictionary(StringComparer.OrdinalIgnoreCase); - var text = RequestHeaders.GetHeader("Cookie"); - foreach (var kv in ParamDictionary.ParseToEnumerable(text, CommaSemicolon)) - { - if (!cookies.ContainsKey(kv.Key)) - { - cookies.Add(kv.Key, new Cookie(kv.Key, kv.Value)); - } - } - return cookies; - }); - } - } - - public IPrincipal User - { - get { return _environment.Get(OwinConstants.User); } - } - - - public IDictionary Items - { - get; - private set; - } - -#if NET45 - public Task AcceptWebSocketRequest(Func callback, Task initTask) - { - var accept = _environment.Get, WebSocketFunc>>(OwinConstants.WebSocketAccept); - if (accept == null) - { - var response = new ServerResponse(_environment); - response.StatusCode = 400; - return response.End(Resources.Error_NotWebSocketRequest); - } - - var handler = new OwinWebSocketHandler(callback, initTask); - accept(null, handler.ProcessRequestAsync); - return TaskAsyncHelper.Empty; - } -#endif - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/ServerResponse.cs b/src/Microsoft.AspNet.SignalR.Owin/ServerResponse.cs deleted file mode 100644 index c268202b6..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/ServerResponse.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNet.SignalR.Hosting; -using Microsoft.AspNet.SignalR.Owin.Infrastructure; - -namespace Microsoft.AspNet.SignalR.Owin -{ - public partial class ServerResponse : IResponse - { - private readonly CancellationToken _callCancelled; - private readonly IDictionary _environment; - private Stream _responseBody; - - public ServerResponse(IDictionary environment) - { - _environment = environment; - _callCancelled = _environment.Get(OwinConstants.CallCancelled); - } - - public CancellationToken CancellationToken - { - get { return _callCancelled; } - } - - public int StatusCode - { - get - { - return _environment.Get(OwinConstants.ResponseStatusCode); - } - set - { - _environment[OwinConstants.ResponseStatusCode] = value; - } - } - - public string ContentType - { - get { return ResponseHeaders.GetHeader("Content-Type"); } - set { ResponseHeaders.SetHeader("Content-Type", value); } - } - - public void Write(ArraySegment data) - { - ResponseBody.Write(data.Array, data.Offset, data.Count); - } - - public Task Flush() - { -#if NET45 - return ResponseBody.FlushAsync(); -#else - return TaskAsyncHelper.FromMethod(() => ResponseBody.Flush()); -#endif - } - - public Task End() - { - return TaskAsyncHelper.Empty; - } - - public IDictionary ResponseHeaders - { - get { return _environment.Get>(OwinConstants.ResponseHeaders); } - } - - public Stream ResponseBody - { - get - { - if (_responseBody == null) - { - _responseBody = _environment.Get(OwinConstants.ResponseBody); - } - - return _responseBody; - } - } - - public Action DisableResponseBuffering - { - get { return _environment.Get(OwinConstants.DisableResponseBuffering) ?? (() => { }); } - } - } -} diff --git a/src/Microsoft.AspNet.SignalR.Owin/app.config b/src/Microsoft.AspNet.SignalR.Owin/app.config deleted file mode 100644 index 44298137a..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Owin/packages.config b/src/Microsoft.AspNet.SignalR.Owin/packages.config deleted file mode 100644 index ac23ae5cb..000000000 --- a/src/Microsoft.AspNet.SignalR.Owin/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/NzbDrone.Api.Test/NzbDrone.Api.Test.csproj b/src/NzbDrone.Api.Test/NzbDrone.Api.Test.csproj index fe7eac650..942e602f3 100644 --- a/src/NzbDrone.Api.Test/NzbDrone.Api.Test.csproj +++ b/src/NzbDrone.Api.Test/NzbDrone.Api.Test.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,12 +9,13 @@ Properties NzbDrone.Api.Test NzbDrone.Api.Test - v4.0 + v4.6.1 512 ..\ true 12.0.0 2.0 + true @@ -26,6 +27,7 @@ MinimumRecommendedRules.ruleset 4 false + false bin\x86\Release\ @@ -36,23 +38,21 @@ prompt MinimumRecommendedRules.ruleset 4 + false ..\packages\NBuilder.4.0.0\lib\net40\FizzWare.NBuilder.dll - True - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll - - - ..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll + - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll diff --git a/src/NzbDrone.Api.Test/packages.config b/src/NzbDrone.Api.Test/packages.config index b329faeb1..0018c93df 100644 --- a/src/NzbDrone.Api.Test/packages.config +++ b/src/NzbDrone.Api.Test/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file diff --git a/src/NzbDrone.Api/NzbDrone.Api.csproj b/src/NzbDrone.Api/NzbDrone.Api.csproj index c5eb654da..5bff82b8d 100644 --- a/src/NzbDrone.Api/NzbDrone.Api.csproj +++ b/src/NzbDrone.Api/NzbDrone.Api.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,7 +9,7 @@ Properties NzbDrone.Api NzbDrone.Api - v4.0 + v4.6.1 512 ..\ true @@ -28,6 +28,7 @@ MinimumRecommendedRules.ruleset 4 false + false ..\..\_output\ @@ -38,42 +39,38 @@ prompt MinimumRecommendedRules.ruleset 4 + false - ..\packages\Ical.Net.2.2.32\lib\net40\antlr.runtime.dll + ..\packages\Ical.Net.2.2.32\lib\net46\antlr.runtime.dll - ..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll - True + ..\packages\FluentValidation.6.2.1.0\lib\Net45\FluentValidation.dll - ..\packages\Ical.Net.2.2.32\lib\net40\Ical.Net.dll + ..\packages\Ical.Net.2.2.32\lib\net46\Ical.Net.dll - ..\packages\Ical.Net.2.2.32\lib\net40\Ical.Net.Collections.dll + ..\packages\Ical.Net.2.2.32\lib\net46\Ical.Net.Collections.dll - - ..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True + + ..\packages\Nancy.1.4.4\lib\net40\Nancy.dll ..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll - True ..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll - True - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - ..\packages\Ical.Net.2.2.32\lib\net40\NodaTime.dll + ..\packages\Ical.Net.2.2.32\lib\net46\NodaTime.dll @@ -210,9 +207,7 @@ - - Designer - + diff --git a/src/NzbDrone.Api/app.config b/src/NzbDrone.Api/app.config index c1684a7be..d4d6857aa 100644 --- a/src/NzbDrone.Api/app.config +++ b/src/NzbDrone.Api/app.config @@ -10,6 +10,14 @@ + + + + + + + + - \ No newline at end of file + diff --git a/src/NzbDrone.Api/packages.config b/src/NzbDrone.Api/packages.config index f68f69f6b..245f86276 100644 --- a/src/NzbDrone.Api/packages.config +++ b/src/NzbDrone.Api/packages.config @@ -1,10 +1,10 @@  - - - - - - - + + + + + + + \ No newline at end of file diff --git a/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj b/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj index 1d6e658f9..66b762ad4 100644 --- a/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj +++ b/src/NzbDrone.App.Test/NzbDrone.Host.Test.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,10 +10,11 @@ Properties NzbDrone.App.Test NzbDrone.App.Test - v4.0 + v4.6.1 512 ..\ true + true @@ -25,6 +26,7 @@ MinimumRecommendedRules.ruleset 4 false + false bin\x86\Release\ @@ -35,32 +37,32 @@ prompt MinimumRecommendedRules.ruleset 4 + false ..\packages\NBuilder.4.0.0\lib\net40\FizzWare.NBuilder.dll - True - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll + + + ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll - - ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - diff --git a/src/NzbDrone.App.Test/packages.config b/src/NzbDrone.App.Test/packages.config index dc7aef2ad..2c958fb84 100644 --- a/src/NzbDrone.App.Test/packages.config +++ b/src/NzbDrone.App.Test/packages.config @@ -1,8 +1,8 @@  - - - - - + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj b/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj index d3861c667..c95135f96 100644 --- a/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj +++ b/src/NzbDrone.Automation.Test/NzbDrone.Automation.Test.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,12 +9,13 @@ Properties NzbDrone.Automation.Test NzbDrone.Automation.Test - v4.0 + v4.6.1 512 ..\ true 12.0.0 2.0 + true @@ -26,6 +27,7 @@ MinimumRecommendedRules.ruleset 4 false + false bin\x86\Release\ @@ -36,19 +38,20 @@ prompt MinimumRecommendedRules.ruleset 4 + false - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll diff --git a/src/NzbDrone.Automation.Test/app.config b/src/NzbDrone.Automation.Test/app.config index c1684a7be..077a6a061 100644 --- a/src/NzbDrone.Automation.Test/app.config +++ b/src/NzbDrone.Automation.Test/app.config @@ -10,6 +10,10 @@ + + + + - \ No newline at end of file + diff --git a/src/NzbDrone.Automation.Test/packages.config b/src/NzbDrone.Automation.Test/packages.config index c5405c724..de7b02686 100644 --- a/src/NzbDrone.Automation.Test/packages.config +++ b/src/NzbDrone.Automation.Test/packages.config @@ -1,8 +1,8 @@  - - - - - + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj index 8f80dbe36..049f94f77 100644 --- a/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,10 +10,11 @@ Properties NzbDrone.Common.Test NzbDrone.Common.Test - v4.0 + v4.6.1 512 ..\ true + true @@ -25,6 +26,7 @@ MinimumRecommendedRules.ruleset 4 false + false bin\x86\Release\ @@ -35,19 +37,23 @@ prompt MinimumRecommendedRules.ruleset 4 + false - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll + + + ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll @@ -57,9 +63,6 @@ - - ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - diff --git a/src/NzbDrone.Common.Test/packages.config b/src/NzbDrone.Common.Test/packages.config index a974434ae..ea98e9817 100644 --- a/src/NzbDrone.Common.Test/packages.config +++ b/src/NzbDrone.Common.Test/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file diff --git a/src/NzbDrone.Common/NzbDrone.Common.csproj b/src/NzbDrone.Common/NzbDrone.Common.csproj index 0bce4df70..6325d63f8 100644 --- a/src/NzbDrone.Common/NzbDrone.Common.csproj +++ b/src/NzbDrone.Common/NzbDrone.Common.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,7 +10,7 @@ Properties NzbDrone.Common NzbDrone.Common - v4.0 + v4.6.1 512 ..\ true @@ -27,6 +27,7 @@ MinimumRecommendedRules.ruleset 4 false + false ..\..\_output\ @@ -37,24 +38,27 @@ prompt MinimumRecommendedRules.ruleset 4 + false + + ..\packages\ICSharpCode.SharpZipLib.Patched.0.86.5\lib\net20\ICSharpCode.SharpZipLib.dll + - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - - ..\packages\DotNet4.SocksProxy.1.3.2.0\lib\net40\Org.Mentalis.dll + + ..\packages\DotNet4.SocksProxy.1.3.4.0\lib\net40\Org.Mentalis.dll True - ..\packages\SharpRaven.2.2.0\lib\net40\SharpRaven.dll + ..\packages\SharpRaven.2.2.0\lib\net45\SharpRaven.dll - - ..\packages\DotNet4.SocksProxy.1.3.2.0\lib\net40\SocksWebProxy.dll + + ..\packages\DotNet4.SocksProxy.1.3.4.0\lib\net40\SocksWebProxy.dll True @@ -64,9 +68,6 @@ - - ..\packages\ICSharpCode.SharpZipLib.Patched.0.86.5\lib\net20\ICSharpCode.SharpZipLib.dll - @@ -226,9 +227,7 @@ Always - - Designer - + diff --git a/src/NzbDrone.Common/Serializer/Json.cs b/src/NzbDrone.Common/Serializer/Json.cs index e40a8181d..be68ff08f 100644 --- a/src/NzbDrone.Common/Serializer/Json.cs +++ b/src/NzbDrone.Common/Serializer/Json.cs @@ -9,28 +9,17 @@ namespace NzbDrone.Common.Serializer public static class Json { private static readonly JsonSerializer Serializer; - private static readonly JsonSerializerSettings SerializerSetting; - private static readonly JsonSerializerSettings DeserializerSetting; + private static readonly JsonSerializerSettings SerializerSettings; static Json() { - SerializerSetting = new JsonSerializerSettings - { - DateTimeZoneHandling = DateTimeZoneHandling.Utc, - NullValueHandling = NullValueHandling.Ignore, - Formatting = Formatting.Indented, - DefaultValueHandling = DefaultValueHandling.Include, - ContractResolver = new CamelCasePropertyNamesContractResolver() - }; - - - SerializerSetting.Converters.Add(new StringEnumConverter { CamelCaseText = true }); - SerializerSetting.Converters.Add(new VersionConverter()); - SerializerSetting.Converters.Add(new HttpUriConverter()); - - Serializer = JsonSerializer.Create(SerializerSetting); + SerializerSettings = GetSerializerSettings(); + Serializer = JsonSerializer.Create(SerializerSettings); + } - DeserializerSetting = new JsonSerializerSettings + public static JsonSerializerSettings GetSerializerSettings() + { + var serializerSettings = new JsonSerializerSettings { DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, @@ -39,19 +28,21 @@ namespace NzbDrone.Common.Serializer ContractResolver = new CamelCasePropertyNamesContractResolver() }; - DeserializerSetting.Converters.Add(new StringEnumConverter { CamelCaseText = true }); - DeserializerSetting.Converters.Add(new VersionConverter()); + serializerSettings.Converters.Add(new StringEnumConverter { CamelCaseText = true }); + serializerSettings.Converters.Add(new VersionConverter()); + serializerSettings.Converters.Add(new HttpUriConverter()); + return serializerSettings; } public static T Deserialize(string json) where T : new() { - return JsonConvert.DeserializeObject(json, DeserializerSetting); + return JsonConvert.DeserializeObject(json, SerializerSettings); } public static object Deserialize(string json, Type type) { - return JsonConvert.DeserializeObject(json, type, DeserializerSetting); + return JsonConvert.DeserializeObject(json, type, SerializerSettings); } public static bool TryDeserialize(string json, out T result) where T : new() @@ -75,7 +66,7 @@ namespace NzbDrone.Common.Serializer public static string ToJson(this object obj) { - return JsonConvert.SerializeObject(obj, SerializerSetting); + return JsonConvert.SerializeObject(obj, SerializerSettings); } public static void Serialize(TModel model, TextWriter outputStream) @@ -90,4 +81,4 @@ namespace NzbDrone.Common.Serializer Serialize(model, new StreamWriter(outputStream)); } } -} +} \ No newline at end of file diff --git a/src/NzbDrone.Common/app.config b/src/NzbDrone.Common/app.config index 8460dd432..9566343db 100644 --- a/src/NzbDrone.Common/app.config +++ b/src/NzbDrone.Common/app.config @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/src/NzbDrone.Common/packages.config b/src/NzbDrone.Common/packages.config index c3f5e4d62..9e9b64ef4 100644 --- a/src/NzbDrone.Common/packages.config +++ b/src/NzbDrone.Common/packages.config @@ -1,8 +1,8 @@  - - - - - + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Console/NzbDrone.Console.csproj b/src/NzbDrone.Console/NzbDrone.Console.csproj index cca21186e..6be4fc420 100644 --- a/src/NzbDrone.Console/NzbDrone.Console.csproj +++ b/src/NzbDrone.Console/NzbDrone.Console.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,7 +10,7 @@ Properties NzbDrone.Console Lidarr.Console - v4.0 + v4.6.1 512 @@ -43,6 +43,7 @@ 4 true BasicCorrectnessRules.ruleset + false x86 @@ -52,6 +53,7 @@ TRACE prompt 4 + false ..\NzbDrone.Host\NzbDrone.ico @@ -66,26 +68,23 @@ app.manifest - - False - ..\packages\Microsoft.Owin.2.1.0\lib\net40\Microsoft.Owin.dll + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll - - False - ..\packages\Microsoft.Owin.Hosting.2.1.0\lib\net40\Microsoft.Owin.Hosting.dll + + ..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - - - + ..\packages\Owin.1.0\lib\net40\Owin.dll + + @@ -118,14 +117,6 @@ - - {1B9A82C4-BCA1-4834-A33E-226F17BE070B} - Microsoft.AspNet.SignalR.Core - - - {2B8C6DAD-4D85-41B1-83FD-248D9F347522} - Microsoft.AspNet.SignalR.Owin - {F2BE0FDF-6E47-4827-A420-DD4EF82407F8} NzbDrone.Common diff --git a/src/NzbDrone.Console/packages.config b/src/NzbDrone.Console/packages.config index 11b77285e..a6608b7d5 100644 --- a/src/NzbDrone.Console/packages.config +++ b/src/NzbDrone.Console/packages.config @@ -1,8 +1,8 @@  - - - - - + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 0fa0b530e..a823fb839 100644 --- a/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -10,7 +10,7 @@ Properties NzbDrone.Core.Test NzbDrone.Core.Test - v4.0 + v4.6.1 512 ..\ true @@ -47,50 +47,48 @@ ..\packages\AutoMoq.1.8.1.0\lib\net40\AutoMoq.dll - True ..\packages\NBuilder.4.0.0\lib\net40\FizzWare.NBuilder.dll - True - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll ..\packages\FluentMigrator.1.6.2\lib\40\FluentMigrator.dll - True ..\packages\FluentMigrator.Runner.1.6.2\lib\40\FluentMigrator.Runner.dll - True - ..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll - True + ..\packages\FluentValidation.6.2.1.0\lib\Net45\FluentValidation.dll ..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll ..\packages\Unity.2.1.505.2\lib\NET35\Microsoft.Practices.Unity.dll - True ..\packages\Unity.2.1.505.2\lib\NET35\Microsoft.Practices.Unity.Configuration.dll - True + + + ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll + + + ..\packages\Prowlin.0.9.4456.26422\lib\net40\Prowlin.dll @@ -387,6 +385,7 @@ + @@ -570,7 +569,6 @@ Always - diff --git a/src/NzbDrone.Core.Test/packages.config b/src/NzbDrone.Core.Test/packages.config index f7d03d187..948f1cb54 100644 --- a/src/NzbDrone.Core.Test/packages.config +++ b/src/NzbDrone.Core.Test/packages.config @@ -1,18 +1,16 @@  - - - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Core/App.config b/src/NzbDrone.Core/App.config index 043c42fe9..3129d272c 100644 --- a/src/NzbDrone.Core/App.config +++ b/src/NzbDrone.Core/App.config @@ -1,6 +1,6 @@  - + diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 237c95a59..7d67bb9c8 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,7 +10,7 @@ Properties NzbDrone.Core NzbDrone.Core - v4.0 + v4.6.1 512 @@ -41,6 +41,7 @@ DEBUG;TRACE prompt 4 + false x86 @@ -50,19 +51,20 @@ TRACE prompt 4 + false + + ..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll + ..\packages\FluentMigrator.1.6.2\lib\40\FluentMigrator.dll - True ..\packages\FluentMigrator.Runner.1.6.2\lib\40\FluentMigrator.Runner.dll - True - ..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll - True + ..\packages\FluentValidation.6.2.1.0\lib\Net45\FluentValidation.dll False @@ -74,29 +76,25 @@ ..\packages\ImageResizer.3.4.3\lib\ImageResizer.dll - True - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - + ..\packages\OAuth.1.0.3\lib\net40\OAuth.dll - - False - ..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll + + ..\packages\Prowlin.0.9.4456.26422\lib\net40\Prowlin.dll ..\packages\taglib.2.1.0.0\lib\policy.2.0.taglib-sharp.dll True - ..\packages\RestSharp.105.2.3\lib\net4\RestSharp.dll - True + ..\packages\RestSharp.105.2.3\lib\net46\RestSharp.dll @@ -108,9 +106,6 @@ - - ..\packages\Prowlin.0.9.4456.26422\lib\net40\Prowlin.dll - ..\Libraries\Sqlite\System.Data.SQLite.dll diff --git a/src/NzbDrone.Core/packages.config b/src/NzbDrone.Core/packages.config index 6b185ed7d..44677e399 100644 --- a/src/NzbDrone.Core/packages.config +++ b/src/NzbDrone.Core/packages.config @@ -1,15 +1,15 @@  - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Host/NzbDrone.Host.csproj b/src/NzbDrone.Host/NzbDrone.Host.csproj index 7fc52d948..a97b86d72 100644 --- a/src/NzbDrone.Host/NzbDrone.Host.csproj +++ b/src/NzbDrone.Host/NzbDrone.Host.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,7 +10,7 @@ Properties NzbDrone.Host NzbDrone.Host - v4.0 + v4.6.1 512 @@ -43,6 +43,7 @@ 4 true BasicCorrectnessRules.ruleset + false x86 @@ -52,37 +53,50 @@ TRACE prompt 4 + false OnOutputUpdated - - False - ..\packages\Microsoft.Owin.2.1.0\lib\net40\Microsoft.Owin.dll + + ..\packages\Microsoft.AspNet.SignalR.Core.2.2.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - False - ..\packages\Microsoft.Owin.Host.HttpListener.2.1.0\lib\net40\Microsoft.Owin.Host.HttpListener.dll + + ..\packages\Microsoft.AspNet.SignalR.SystemWeb.2.2.2\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll - - False - ..\packages\Microsoft.Owin.Hosting.2.1.0\lib\net40\Microsoft.Owin.Hosting.dll + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll - - ..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True + + ..\packages\Microsoft.Owin.Diagnostics.3.1.0\lib\net45\Microsoft.Owin.Diagnostics.dll + + + ..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll + + + ..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll + + + ..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll + + + ..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll + + + ..\packages\Nancy.1.4.4\lib\net40\Nancy.dll ..\packages\Nancy.Owin.1.4.1\lib\net40\Nancy.Owin.dll - True - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll + + + ..\packages\Owin.1.0\lib\net40\Owin.dll @@ -91,9 +105,6 @@ ..\Libraries\Interop.NetFwTypeLib.dll True - - ..\packages\Owin.1.0\lib\net40\Owin.dll - @@ -156,14 +167,6 @@ - - {1B9A82C4-BCA1-4834-A33E-226F17BE070B} - Microsoft.AspNet.SignalR.Core - - - {2B8C6DAD-4D85-41B1-83FD-248D9F347522} - Microsoft.AspNet.SignalR.Owin - {FD286DF8-2D3A-4394-8AD5-443FADE55FB2} NzbDrone.Api diff --git a/src/NzbDrone.Host/Owin/MiddleWare/NzbDroneVersionMiddleWare.cs b/src/NzbDrone.Host/Owin/MiddleWare/NzbDroneVersionMiddleWare.cs index a74d9b1d3..5ef687b74 100644 --- a/src/NzbDrone.Host/Owin/MiddleWare/NzbDroneVersionMiddleWare.cs +++ b/src/NzbDrone.Host/Owin/MiddleWare/NzbDroneVersionMiddleWare.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.Owin; using NzbDrone.Common.EnvironmentInfo; @@ -26,10 +26,10 @@ namespace NzbDrone.Host.Owin.MiddleWare _versionHeader = new KeyValuePair("X-ApplicationVersion", new[] { BuildInfo.Version.ToString() }); } - public override Task Invoke(IOwinContext context) + public override async Task Invoke(IOwinContext context) { context.Response.Headers.Add(_versionHeader); - return Next.Invoke(context); + await Next.Invoke(context); } } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs b/src/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs index 4e25d61fa..8134b6928 100644 --- a/src/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs +++ b/src/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs @@ -12,7 +12,8 @@ namespace NzbDrone.Host.Owin.MiddleWare public SignalRMiddleWare(IContainer container) { - SignalrDependencyResolver.Register(container); + SignalRDependencyResolver.Register(container); + SignalRJsonSerializer.Register(); // Half the default time (110s) to get under nginx's default 60 proxy_read_timeout GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(55); @@ -21,7 +22,7 @@ namespace NzbDrone.Host.Owin.MiddleWare public void Attach(IAppBuilder appBuilder) { - appBuilder.MapConnection("signalr", typeof(NzbDronePersistentConnection), new ConnectionConfiguration { EnableCrossDomain = true }); + appBuilder.MapConnection("/signalr", typeof(NzbDronePersistentConnection), new ConnectionConfiguration ()); } } } diff --git a/src/NzbDrone.Host/app.config b/src/NzbDrone.Host/app.config index 885d99232..2c6b0faf8 100644 --- a/src/NzbDrone.Host/app.config +++ b/src/NzbDrone.Host/app.config @@ -6,7 +6,7 @@ - + @@ -30,7 +30,11 @@ - + + + + + diff --git a/src/NzbDrone.Host/packages.config b/src/NzbDrone.Host/packages.config index cd7fd0969..2678d5ca6 100644 --- a/src/NzbDrone.Host/packages.config +++ b/src/NzbDrone.Host/packages.config @@ -1,11 +1,18 @@  - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index d8a905025..83597c7f0 100644 --- a/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,12 +9,13 @@ Properties NzbDrone.Integration.Test NzbDrone.Integration.Test - v4.0 + v4.6.1 512 ..\ true 12.0.0 2.0 + true @@ -26,6 +27,7 @@ MinimumRecommendedRules.ruleset 4 false + false bin\x86\Release\ @@ -36,53 +38,53 @@ prompt MinimumRecommendedRules.ruleset 4 + false - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll - ..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll - True + ..\packages\FluentValidation.6.2.1.0\lib\Net45\FluentValidation.dll - - ..\packages\Microsoft.AspNet.SignalR.Client.1.2.2\lib\net40\Microsoft.AspNet.SignalR.Client.dll + + ..\packages\Microsoft.AspNet.SignalR.Client.2.2.2\lib\net45\Microsoft.AspNet.SignalR.Client.dll - - False - ..\packages\Microsoft.Owin.2.1.0\lib\net40\Microsoft.Owin.dll + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll - - ..\packages\Microsoft.Owin.Host.HttpListener.2.1.0\lib\net40\Microsoft.Owin.Host.HttpListener.dll + + ..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll - - False - ..\packages\Microsoft.Owin.Hosting.2.1.0\lib\net40\Microsoft.Owin.Hosting.dll + + ..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll - - ..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True + + ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll + + + ..\packages\Nancy.1.4.4\lib\net40\Nancy.dll ..\packages\Nancy.Owin.1.4.1\lib\net40\Nancy.Owin.dll - True - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll + + + ..\packages\Owin.1.0\lib\net40\Owin.dll - ..\packages\RestSharp.105.2.3\lib\net4\RestSharp.dll - True + ..\packages\RestSharp.105.2.3\lib\net46\RestSharp.dll @@ -91,12 +93,6 @@ - - ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - diff --git a/src/NzbDrone.Integration.Test/packages.config b/src/NzbDrone.Integration.Test/packages.config index e82b24d7f..137ccd938 100644 --- a/src/NzbDrone.Integration.Test/packages.config +++ b/src/NzbDrone.Integration.Test/packages.config @@ -1,17 +1,17 @@  - - - - - - - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj b/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj index b16c163ce..7eef65860 100644 --- a/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj +++ b/src/NzbDrone.Libraries.Test/NzbDrone.Libraries.Test.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,12 +9,13 @@ Properties NzbDrone.Libraries.Test NzbDrone.Libraries.Test - v4.0 + v4.6.1 512 ..\ true 12.0.0 2.0 + true @@ -26,6 +27,7 @@ MinimumRecommendedRules.ruleset 4 false + false bin\x86\Release\ @@ -36,20 +38,20 @@ prompt MinimumRecommendedRules.ruleset 4 + false - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll diff --git a/src/NzbDrone.Libraries.Test/app.config b/src/NzbDrone.Libraries.Test/app.config index c1684a7be..077a6a061 100644 --- a/src/NzbDrone.Libraries.Test/app.config +++ b/src/NzbDrone.Libraries.Test/app.config @@ -10,6 +10,10 @@ + + + + - \ No newline at end of file + diff --git a/src/NzbDrone.Libraries.Test/packages.config b/src/NzbDrone.Libraries.Test/packages.config index 413eb1612..1ebfe9722 100644 --- a/src/NzbDrone.Libraries.Test/packages.config +++ b/src/NzbDrone.Libraries.Test/packages.config @@ -1,6 +1,6 @@  - - - + + + \ No newline at end of file diff --git a/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj b/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj index 9e78587a3..663a985f0 100644 --- a/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj +++ b/src/NzbDrone.Mono.Test/NzbDrone.Mono.Test.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,10 +9,11 @@ Properties NzbDrone.Mono.Test NzbDrone.Mono.Test - v4.0 + v4.6.1 512 ..\ true + true @@ -22,6 +23,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -30,6 +32,7 @@ TRACE prompt 4 + false true @@ -39,6 +42,7 @@ x86 prompt MinimumRecommendedRules.ruleset + false bin\x86\Release\ @@ -48,13 +52,14 @@ x86 prompt MinimumRecommendedRules.ruleset + false - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll False @@ -62,10 +67,9 @@ ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - True - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll diff --git a/src/NzbDrone.Mono.Test/app.config b/src/NzbDrone.Mono.Test/app.config index b6d9543c5..8e850db4b 100644 --- a/src/NzbDrone.Mono.Test/app.config +++ b/src/NzbDrone.Mono.Test/app.config @@ -4,7 +4,7 @@ - + @@ -14,6 +14,14 @@ + + + + + + + + - \ No newline at end of file + diff --git a/src/NzbDrone.Mono.Test/packages.config b/src/NzbDrone.Mono.Test/packages.config index 337af9af9..2b0cc4306 100644 --- a/src/NzbDrone.Mono.Test/packages.config +++ b/src/NzbDrone.Mono.Test/packages.config @@ -1,6 +1,6 @@  - - - + + + \ No newline at end of file diff --git a/src/NzbDrone.Mono/NzbDrone.Mono.csproj b/src/NzbDrone.Mono/NzbDrone.Mono.csproj index c8532b6f0..7f30557db 100644 --- a/src/NzbDrone.Mono/NzbDrone.Mono.csproj +++ b/src/NzbDrone.Mono/NzbDrone.Mono.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,7 +9,7 @@ Properties NzbDrone.Mono NzbDrone.Mono - v4.0 + v4.6.1 512 ..\ @@ -23,6 +23,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -31,6 +32,7 @@ TRACE prompt 4 + false true @@ -40,6 +42,7 @@ x86 prompt MinimumRecommendedRules.ruleset + false ..\..\_output\ @@ -49,10 +52,11 @@ x86 prompt MinimumRecommendedRules.ruleset + false - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll diff --git a/src/NzbDrone.Mono/app.config b/src/NzbDrone.Mono/app.config index 8460dd432..9566343db 100644 --- a/src/NzbDrone.Mono/app.config +++ b/src/NzbDrone.Mono/app.config @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/src/NzbDrone.Mono/packages.config b/src/NzbDrone.Mono/packages.config index a14101dce..bfea00b4d 100644 --- a/src/NzbDrone.Mono/packages.config +++ b/src/NzbDrone.Mono/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/NoOpPerformanceCounter.cs b/src/NzbDrone.SignalR/NoOpPerformanceCounter.cs similarity index 79% rename from src/Microsoft.AspNet.SignalR.Core/Infrastructure/NoOpPerformanceCounter.cs rename to src/NzbDrone.SignalR/NoOpPerformanceCounter.cs index cf45a92fa..301d89138 100644 --- a/src/Microsoft.AspNet.SignalR.Core/Infrastructure/NoOpPerformanceCounter.cs +++ b/src/NzbDrone.SignalR/NoOpPerformanceCounter.cs @@ -1,8 +1,7 @@ -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. - using System.Diagnostics; +using Microsoft.AspNet.SignalR.Infrastructure; -namespace Microsoft.AspNet.SignalR.Infrastructure +namespace NzbDrone.SignalR { public class NoOpPerformanceCounter : IPerformanceCounter { @@ -42,7 +41,7 @@ namespace Microsoft.AspNet.SignalR.Infrastructure public void RemoveInstance() { - + } public CounterSample NextSample() diff --git a/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj b/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj index 0cabc3c01..1eb74d8dc 100644 --- a/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj +++ b/src/NzbDrone.SignalR/NzbDrone.SignalR.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,12 +9,13 @@ Properties NzbDrone.SignalR NzbDrone.SignalR - v4.0 + v4.6.1 512 ..\ true 12.0.0 2.0 + true @@ -26,6 +27,7 @@ MinimumRecommendedRules.ruleset 4 false + false ..\..\_output\ @@ -36,11 +38,38 @@ prompt MinimumRecommendedRules.ruleset 4 + false + + ..\packages\Microsoft.AspNet.SignalR.Core.2.2.2\lib\net45\Microsoft.AspNet.SignalR.Core.dll + + + ..\packages\Microsoft.AspNet.SignalR.SystemWeb.2.2.2\lib\net45\Microsoft.AspNet.SignalR.SystemWeb.dll + + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll + + + ..\packages\Microsoft.Owin.Diagnostics.3.1.0\lib\net45\Microsoft.Owin.Diagnostics.dll + + + ..\packages\Microsoft.Owin.Host.HttpListener.3.1.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll + + + ..\packages\Microsoft.Owin.Host.SystemWeb.3.1.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll + + + ..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll + + + ..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll + - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + + + ..\packages\Owin.1.0\lib\net40\Owin.dll @@ -50,18 +79,16 @@ Properties\SharedAssemblyInfo.cs + - + + - - {1B9A82C4-BCA1-4834-A33E-226F17BE070B} - Microsoft.AspNet.SignalR.Core - {F2BE0FDF-6E47-4827-A420-DD4EF82407F8} NzbDrone.Common diff --git a/src/NzbDrone.SignalR/Serializer.cs b/src/NzbDrone.SignalR/Serializer.cs deleted file mode 100644 index e631ef146..000000000 --- a/src/NzbDrone.SignalR/Serializer.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.IO; -using Microsoft.AspNet.SignalR.Json; -using NzbDrone.Common.Serializer; - -namespace NzbDrone.SignalR -{ - public class Serializer : IJsonSerializer - { - private readonly JsonNetSerializer _signalRSerializer = new JsonNetSerializer(); - - public void Serialize(object value, TextWriter writer) - { - if (value.GetType().FullName.StartsWith("NzbDrone")) - { - Json.Serialize(value, writer); - } - else - { - _signalRSerializer.Serialize(value, writer); - } - } - - public object Parse(TextReader reader, Type targetType) - { - return Json.Deserialize(reader.ReadToEnd(), targetType); - } - } -} \ No newline at end of file diff --git a/src/NzbDrone.SignalR/SignalRContractResolver.cs b/src/NzbDrone.SignalR/SignalRContractResolver.cs new file mode 100644 index 000000000..0f766d90a --- /dev/null +++ b/src/NzbDrone.SignalR/SignalRContractResolver.cs @@ -0,0 +1,28 @@ +using System; +using Newtonsoft.Json.Serialization; + +namespace NzbDrone.SignalR +{ + public class SignalRContractResolver : IContractResolver + { + private readonly IContractResolver _camelCaseContractResolver; + private readonly IContractResolver _defaultContractSerializer; + + public SignalRContractResolver() + { + _defaultContractSerializer = new DefaultContractResolver(); + _camelCaseContractResolver = new CamelCasePropertyNamesContractResolver(); + } + + public JsonContract ResolveContract(Type type) + { + var fullName = type.FullName; + if (fullName.StartsWith("NzbDrone") || fullName.StartsWith("Lidarr")) + { + return _camelCaseContractResolver.ResolveContract(type); + } + + return _defaultContractSerializer.ResolveContract(type); + } + } +} diff --git a/src/NzbDrone.SignalR/SignalRJsonSerializer.cs b/src/NzbDrone.SignalR/SignalRJsonSerializer.cs new file mode 100644 index 000000000..031a03f89 --- /dev/null +++ b/src/NzbDrone.SignalR/SignalRJsonSerializer.cs @@ -0,0 +1,22 @@ +using Microsoft.AspNet.SignalR; +using Newtonsoft.Json; +using NzbDrone.Common.Serializer; + +namespace NzbDrone.SignalR +{ + public static class SignalRJsonSerializer + { + private static JsonSerializer _serializer; + private static JsonSerializerSettings _serializerSettings; + + public static void Register() + { + _serializerSettings = Json.GetSerializerSettings(); + _serializerSettings.ContractResolver = new SignalRContractResolver(); + + _serializer = JsonSerializer.Create(_serializerSettings); + + GlobalHost.DependencyResolver.Register(typeof(JsonSerializer), () => _serializer); + } + } +} diff --git a/src/NzbDrone.SignalR/SignalrDependencyResolver.cs b/src/NzbDrone.SignalR/SignalrDependencyResolver.cs index c8a1e7172..2a934ada3 100644 --- a/src/NzbDrone.SignalR/SignalrDependencyResolver.cs +++ b/src/NzbDrone.SignalR/SignalrDependencyResolver.cs @@ -1,20 +1,20 @@ -using System; +using System; using Microsoft.AspNet.SignalR; using Microsoft.AspNet.SignalR.Infrastructure; using NzbDrone.Common.Composition; namespace NzbDrone.SignalR { - public class SignalrDependencyResolver : DefaultDependencyResolver + public class SignalRDependencyResolver : DefaultDependencyResolver { private readonly IContainer _container; public static void Register(IContainer container) { - GlobalHost.DependencyResolver = new SignalrDependencyResolver(container); + GlobalHost.DependencyResolver = new SignalRDependencyResolver(container); } - private SignalrDependencyResolver(IContainer container) + private SignalRDependencyResolver(IContainer container) { _container = container; var performanceCounterManager = new LidarrPerformanceCounterManager(); @@ -23,6 +23,17 @@ namespace NzbDrone.SignalR public override object GetService(Type serviceType) { + // Microsoft.AspNet.SignalR.Infrastructure.AckSubscriber is not registered in our internal contaiiner, + // but it still gets treated like it is (possibly due to being a concrete type). + + var fullName = serviceType.FullName; + + if (fullName == "Microsoft.AspNet.SignalR.Infrastructure.AckSubscriber" || + fullName == "Newtonsoft.Json.JsonSerializer") + { + return base.GetService(serviceType); + } + if (_container.IsTypeRegistered(serviceType)) { return _container.Resolve(serviceType); @@ -31,4 +42,4 @@ namespace NzbDrone.SignalR return base.GetService(serviceType); } } -} \ No newline at end of file +} diff --git a/src/NzbDrone.SignalR/SonarrPerformanceCounterManager.cs b/src/NzbDrone.SignalR/SonarrPerformanceCounterManager.cs index d75f9afe0..1576b5e28 100644 --- a/src/NzbDrone.SignalR/SonarrPerformanceCounterManager.cs +++ b/src/NzbDrone.SignalR/SonarrPerformanceCounterManager.cs @@ -50,5 +50,9 @@ namespace NzbDrone.SignalR public IPerformanceCounter ScaleoutErrorsTotal => _counter; public IPerformanceCounter ScaleoutErrorsPerSec => _counter; public IPerformanceCounter ScaleoutSendQueueLength => _counter; + public IPerformanceCounter ConnectionsCurrentForeverFrame => _counter; + public IPerformanceCounter ConnectionsCurrentLongPolling => _counter; + public IPerformanceCounter ConnectionsCurrentServerSentEvents => _counter; + public IPerformanceCounter ConnectionsCurrentWebSockets => _counter; } } \ No newline at end of file diff --git a/src/NzbDrone.SignalR/app.config b/src/NzbDrone.SignalR/app.config index c1684a7be..d4d6857aa 100644 --- a/src/NzbDrone.SignalR/app.config +++ b/src/NzbDrone.SignalR/app.config @@ -10,6 +10,14 @@ + + + + + + + + - \ No newline at end of file + diff --git a/src/NzbDrone.SignalR/packages.config b/src/NzbDrone.SignalR/packages.config index 7c276ed86..ee54882a5 100644 --- a/src/NzbDrone.SignalR/packages.config +++ b/src/NzbDrone.SignalR/packages.config @@ -1,4 +1,13 @@  - + + + + + + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Test.Common/App.config b/src/NzbDrone.Test.Common/App.config index c7a8ca18c..a62cc0f65 100644 --- a/src/NzbDrone.Test.Common/App.config +++ b/src/NzbDrone.Test.Common/App.config @@ -25,6 +25,14 @@ + + + + + + + + - \ No newline at end of file + diff --git a/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj b/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj index 66b5682af..1d4d29214 100644 --- a/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj +++ b/src/NzbDrone.Test.Common/NzbDrone.Test.Common.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,10 +10,11 @@ Properties NzbDrone.Test.Common NzbDrone.Test.Common - v4.0 + v4.6.1 512 ..\ true + true @@ -25,6 +26,7 @@ MinimumRecommendedRules.ruleset 4 false + false bin\x86\Release\ @@ -35,27 +37,41 @@ prompt MinimumRecommendedRules.ruleset 4 + false - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll + + + ..\packages\FluentValidation.6.2.1.0\lib\Net45\FluentValidation.dll + + + ..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll + + + ..\packages\Unity.2.1.505.2\lib\NET35\Microsoft.Practices.Unity.dll + + + ..\packages\Unity.2.1.505.2\lib\NET35\Microsoft.Practices.Unity.Configuration.dll + + + ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll - ..\packages\RestSharp.105.2.3\lib\net4\RestSharp.dll - True + ..\packages\RestSharp.105.2.3\lib\net46\RestSharp.dll diff --git a/src/NzbDrone.Test.Common/packages.config b/src/NzbDrone.Test.Common/packages.config index ea89c79fc..cd61adfbb 100644 --- a/src/NzbDrone.Test.Common/packages.config +++ b/src/NzbDrone.Test.Common/packages.config @@ -1,11 +1,12 @@  - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Test.Dummy/NzbDrone.Test.Dummy.csproj b/src/NzbDrone.Test.Dummy/NzbDrone.Test.Dummy.csproj index fb311dbd5..0a9d39c47 100644 --- a/src/NzbDrone.Test.Dummy/NzbDrone.Test.Dummy.csproj +++ b/src/NzbDrone.Test.Dummy/NzbDrone.Test.Dummy.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,7 +10,7 @@ Properties NzbDrone.Test.Dummy NzbDrone.Test.Dummy - v4.0 + v4.6.1 512 @@ -26,6 +26,7 @@ DEBUG;TRACE prompt 4 + false x86 @@ -35,6 +36,7 @@ TRACE prompt 4 + false @@ -60,4 +62,4 @@ --> - + \ No newline at end of file diff --git a/src/NzbDrone.Test.Dummy/app.config b/src/NzbDrone.Test.Dummy/app.config index e36560333..0dff63a07 100644 --- a/src/NzbDrone.Test.Dummy/app.config +++ b/src/NzbDrone.Test.Dummy/app.config @@ -1,3 +1,3 @@ - + diff --git a/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj b/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj index e3c6dc4de..91b4a9cb7 100644 --- a/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj +++ b/src/NzbDrone.Update.Test/NzbDrone.Update.Test.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,7 +10,7 @@ Properties NzbDrone.Update.Test NzbDrone.Update.Test - v4.0 + v4.6.1 512 @@ -26,6 +26,7 @@ DEBUG;TRACE prompt 4 + false x86 @@ -35,23 +36,26 @@ TRACE prompt 4 + false ..\packages\NBuilder.4.0.0\lib\net40\FizzWare.NBuilder.dll - True - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll + + + ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll @@ -60,9 +64,6 @@ - - ..\packages\Moq.4.0.10827\lib\NET40\Moq.dll - diff --git a/src/NzbDrone.Update.Test/packages.config b/src/NzbDrone.Update.Test/packages.config index dc7aef2ad..2c958fb84 100644 --- a/src/NzbDrone.Update.Test/packages.config +++ b/src/NzbDrone.Update.Test/packages.config @@ -1,8 +1,8 @@  - - - - - + + + + + \ No newline at end of file diff --git a/src/NzbDrone.Update/NzbDrone.Update.csproj b/src/NzbDrone.Update/NzbDrone.Update.csproj index d4e0a5e41..da46429f1 100644 --- a/src/NzbDrone.Update/NzbDrone.Update.csproj +++ b/src/NzbDrone.Update/NzbDrone.Update.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,7 +10,7 @@ Properties NzbDrone.Update NzbDrone.Update - v4.0 + v4.6.1 512 @@ -26,6 +26,7 @@ DEBUG;TRACE prompt 4 + false x86 @@ -35,17 +36,17 @@ TRACE prompt 4 + false app.manifest - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll diff --git a/src/NzbDrone.Update/app.config b/src/NzbDrone.Update/app.config index 76f6c07e9..65f7b09db 100644 --- a/src/NzbDrone.Update/app.config +++ b/src/NzbDrone.Update/app.config @@ -1,7 +1,7 @@  - + @@ -15,4 +15,4 @@ - \ No newline at end of file + diff --git a/src/NzbDrone.Update/packages.config b/src/NzbDrone.Update/packages.config index 96f5ba1e0..8dabe5228 100644 --- a/src/NzbDrone.Update/packages.config +++ b/src/NzbDrone.Update/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj b/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj index 9eb35ad5e..41115ac08 100644 --- a/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj +++ b/src/NzbDrone.Windows.Test/NzbDrone.Windows.Test.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,10 +9,11 @@ Properties NzbDrone.Windows.Test NzbDrone.Windows.Test - v4.0 + v4.6.1 512 ..\ true + true @@ -22,6 +23,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -30,6 +32,7 @@ TRACE prompt 4 + false true @@ -39,6 +42,7 @@ x86 prompt MinimumRecommendedRules.ruleset + false bin\x86\Release\ @@ -48,16 +52,17 @@ x86 prompt MinimumRecommendedRules.ruleset + false - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.dll - ..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll + ..\packages\FluentAssertions.4.19.0\lib\net45\FluentAssertions.Core.dll - ..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll + ..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll diff --git a/src/NzbDrone.Windows.Test/app.config b/src/NzbDrone.Windows.Test/app.config index b6d9543c5..8e850db4b 100644 --- a/src/NzbDrone.Windows.Test/app.config +++ b/src/NzbDrone.Windows.Test/app.config @@ -4,7 +4,7 @@ - + @@ -14,6 +14,14 @@ + + + + + + + + - \ No newline at end of file + diff --git a/src/NzbDrone.Windows.Test/packages.config b/src/NzbDrone.Windows.Test/packages.config index a4dcb9206..fd0af0f89 100644 --- a/src/NzbDrone.Windows.Test/packages.config +++ b/src/NzbDrone.Windows.Test/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/NzbDrone.Windows/NzbDrone.Windows.csproj b/src/NzbDrone.Windows/NzbDrone.Windows.csproj index 2ee8e6c5a..60f040c3e 100644 --- a/src/NzbDrone.Windows/NzbDrone.Windows.csproj +++ b/src/NzbDrone.Windows/NzbDrone.Windows.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,10 +9,11 @@ Properties NzbDrone.Windows NzbDrone.Windows - v4.0 + v4.6.1 512 ..\ true + true @@ -23,6 +24,7 @@ prompt 4 x86 + false pdbonly @@ -31,6 +33,7 @@ TRACE prompt 4 + false true @@ -40,6 +43,7 @@ x86 prompt MinimumRecommendedRules.ruleset + false ..\..\_output\ @@ -49,10 +53,11 @@ x86 prompt MinimumRecommendedRules.ruleset + false - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll diff --git a/src/NzbDrone.Windows/app.config b/src/NzbDrone.Windows/app.config index 8460dd432..9566343db 100644 --- a/src/NzbDrone.Windows/app.config +++ b/src/NzbDrone.Windows/app.config @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/src/NzbDrone.Windows/packages.config b/src/NzbDrone.Windows/packages.config index a14101dce..bfea00b4d 100644 --- a/src/NzbDrone.Windows/packages.config +++ b/src/NzbDrone.Windows/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/NzbDrone/NzbDrone.csproj b/src/NzbDrone/NzbDrone.csproj index f2dedfe32..cde1ce9b6 100644 --- a/src/NzbDrone/NzbDrone.csproj +++ b/src/NzbDrone/NzbDrone.csproj @@ -1,5 +1,5 @@  - + Debug x86 @@ -10,7 +10,7 @@ Properties NzbDrone Lidarr - v4.0 + v4.6.1 512 @@ -43,6 +43,7 @@ 4 true BasicCorrectnessRules.ruleset + false x86 @@ -52,6 +53,7 @@ TRACE prompt 4 + false ..\NzbDrone.Host\NzbDrone.ico @@ -66,28 +68,25 @@ app.manifest - - False - ..\packages\Microsoft.Owin.2.1.0\lib\net40\Microsoft.Owin.dll + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll - - False - ..\packages\Microsoft.Owin.Hosting.2.1.0\lib\net40\Microsoft.Owin.Hosting.dll + + ..\packages\Microsoft.Owin.Hosting.3.1.0\lib\net45\Microsoft.Owin.Hosting.dll - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.4.3\lib\net40\NLog.dll + ..\packages\NLog.4.4.3\lib\net45\NLog.dll + + + ..\packages\Owin.1.0\lib\net40\Owin.dll - - ..\packages\Owin.1.0\lib\net40\Owin.dll - @@ -128,14 +127,6 @@ - - {1B9A82C4-BCA1-4834-A33E-226F17BE070B} - Microsoft.AspNet.SignalR.Core - - - {2B8C6DAD-4D85-41B1-83FD-248D9F347522} - Microsoft.AspNet.SignalR.Owin - {F2BE0FDF-6E47-4827-A420-DD4EF82407F8} NzbDrone.Common diff --git a/src/NzbDrone/Properties/Resources.Designer.cs b/src/NzbDrone/Properties/Resources.Designer.cs index 65584111d..dfbfeb594 100644 --- a/src/NzbDrone/Properties/Resources.Designer.cs +++ b/src/NzbDrone/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.32559 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -9,6 +9,9 @@ //------------------------------------------------------------------------------ namespace NzbDrone.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// diff --git a/src/NzbDrone/packages.config b/src/NzbDrone/packages.config index 11b77285e..a6608b7d5 100644 --- a/src/NzbDrone/packages.config +++ b/src/NzbDrone/packages.config @@ -1,8 +1,8 @@  - - - - - + + + + + \ No newline at end of file diff --git a/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj b/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj index 5334a144e..64a646a01 100644 --- a/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj +++ b/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj @@ -1,5 +1,5 @@ - - + + Debug x86 @@ -10,7 +10,7 @@ Properties ServiceInstall ServiceInstall - v4.0 + v4.6.1 512 @@ -26,6 +26,7 @@ DEBUG;TRACE prompt 4 + false x86 @@ -35,6 +36,7 @@ TRACE prompt 4 + false app.manifest @@ -77,4 +79,4 @@ --> - + \ No newline at end of file diff --git a/src/ServiceHelpers/ServiceInstall/app.config b/src/ServiceHelpers/ServiceInstall/app.config index e33d6f761..99216b8f8 100644 --- a/src/ServiceHelpers/ServiceInstall/app.config +++ b/src/ServiceHelpers/ServiceInstall/app.config @@ -1,6 +1,6 @@ - + diff --git a/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj b/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj index 5905c1dbd..cf036844f 100644 --- a/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj +++ b/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj @@ -1,5 +1,5 @@ - - + + Debug x86 @@ -10,7 +10,7 @@ Properties ServiceUninstall ServiceUninstall - v4.0 + v4.6.1 512 @@ -26,6 +26,7 @@ DEBUG;TRACE prompt 4 + false x86 @@ -35,6 +36,7 @@ TRACE prompt 4 + false ServiceUninstall.Program @@ -77,4 +79,4 @@ --> - + \ No newline at end of file diff --git a/src/ServiceHelpers/ServiceUninstall/app.config b/src/ServiceHelpers/ServiceUninstall/app.config index e33d6f761..99216b8f8 100644 --- a/src/ServiceHelpers/ServiceUninstall/app.config +++ b/src/ServiceHelpers/ServiceUninstall/app.config @@ -1,6 +1,6 @@ - +