@zohodesk/react-cli 1.1.18 → 1.1.19-exp.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +6 -0
- package/lib/babel/babel-option-utils/babel-preset-react-option.js +22 -0
- package/lib/babel/cmjs-plugins-presets.js +7 -1
- package/lib/babel/es-plugins-presets.js +7 -1
- package/lib/configs/webpack.prod.config.js +9 -2
- package/lib/loaderUtils/getDevJsLoaders.js +7 -2
- package/lib/loaders/workerLoader.js +39 -24
- package/npm-shrinkwrap.json +19077 -15
- package/package.json +1 -1
- package/packages/client_build_tool/lib/allCommandsConfigs.js +23 -0
- package/packages/client_build_tool/lib/buildToolLoggers.js +32 -0
- package/packages/client_build_tool/lib/commands/build/commandExecutor.js +21 -0
- package/packages/client_build_tool/lib/commands/build/config.js +12 -0
- package/packages/client_build_tool/lib/commands/build/errorHander.js +10 -0
- package/packages/client_build_tool/lib/commands/build/index.js +35 -0
- package/packages/client_build_tool/lib/commands/build/optionsProcesser.js +40 -0
- package/packages/client_build_tool/lib/commands/buildEs/commandExecutor.js +17 -0
- package/packages/client_build_tool/lib/commands/buildEs/config.js +12 -0
- package/packages/client_build_tool/lib/commands/buildLib/commandExecutor.js +17 -0
- package/packages/client_build_tool/lib/commands/buildLib/config.js +12 -0
- package/packages/client_build_tool/lib/commands/start/commandExecutor.js +13 -0
- package/packages/client_build_tool/lib/commands/start/config.js +12 -0
- package/packages/client_build_tool/lib/commands/start/deprecationHandler.js +10 -0
- package/packages/client_build_tool/lib/commands/start/errorHander.js +10 -0
- package/packages/client_build_tool/lib/commands/start/optionsProcesser.js +36 -0
- package/packages/client_build_tool/lib/commands/start/postProcesser.js +10 -0
- package/packages/client_build_tool/lib/commands/start/preProcesser.js +10 -0
- package/packages/client_build_tool/lib/commandsRouter.js +71 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/decidePublicPath.js +44 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/libAlias.js +31 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/nameTemplates.js +51 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/resourceBasedPublicPath.js +21 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/cssLoaders.js +16 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin.js +111 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/EFCPlugin.js +1 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ContributionGuide.md +11 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +136 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nSplit.md +95 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/README.md +25 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +29 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +24 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nDependency.js +99 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +81 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nModule.js +201 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +401 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +67 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +23 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +29 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +49 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +77 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +63 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +19 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +31 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +127 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RTLSplitPlugin.js +1 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +63 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +89 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtrSplit.md +34 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +15 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +155 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin.js +49 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/ExcludePlugin.js +58 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/RTLSplitPlugin.js +139 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/devServerConfig.js +34 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/getCSSLoaders.js +30 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/jsLoaders.js +17 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/assetLoaders.js +14 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +24 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +18 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +21 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +138 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +83 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +23 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaders/workerLoader.js +133 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/optimizationConfig.js +39 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/outputConfig.js +28 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +18 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCopyThirdpartyFile.js +38 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +24 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +28 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +35 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +16 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +23 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +19 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +27 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +18 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configUglifyCSSPlugin.js +15 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/plugins.js +39 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/postcssPlugins.js +36 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/resolvers.js +42 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/splitChunksConfig.js +12 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpack.dev.config.js +17 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackBuild.js +24 -0
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackConfig.js +50 -0
- package/packages/client_build_tool/lib/shared/commands-utlis/doBasicRequiermentCheck.js +16 -0
- package/packages/client_build_tool/lib/shared/commands-utlis/getCliPath.js +38 -0
- package/packages/client_build_tool/lib/shared/commands-utlis/index.js +29 -0
- package/packages/client_build_tool/lib/shared/commands-utlis/log.js +13 -0
- package/packages/client_build_tool/lib/shared/commands-utlis/readArgsFormCommandLine.js +11 -0
- package/packages/client_build_tool/lib/shared/commands-utlis/readOptionFormCommandLine.js +11 -0
- package/packages/client_build_tool/lib/shared/commands-utlis/spanSync.js +35 -0
- package/packages/client_build_tool/lib/shared/constants.js +33 -0
- package/packages/client_build_tool/lib/shared/schemas/applyValuesToShema.js +37 -0
- package/packages/client_build_tool/lib/shared/schemas/cliArgsToObject.js +37 -0
- package/packages/client_build_tool/lib/shared/schemas/defaultConfigValues.js +119 -0
- package/packages/client_build_tool/lib/shared/schemas/deprecatedOptionsHandler.js +65 -0
- package/packages/client_build_tool/lib/shared/schemas/getCWD.js +23 -0
- package/packages/client_build_tool/lib/shared/schemas/getNpmVersion.js +21 -0
- package/packages/client_build_tool/lib/shared/schemas/npmConfigToObject.js +32 -0
- package/packages/client_build_tool/lib/shared/schemas/oldDefaultConfigValues.js +480 -0
- package/packages/client_build_tool/lib/shared/schemas/readOptions.js +55 -0
- package/packages/client_build_tool/lib/shared/schemas/readOptionsForPackageJson.js +26 -0
- package/packages/client_build_tool/lib/shared/schemas/readOptionsOld.js +152 -0
- package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.crt +37 -0
- package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.key +27 -0
- package/packages/client_build_tool/lib/shared/server/configWebpackDevMiddleware.js +40 -0
- package/packages/client_build_tool/lib/shared/server/corsHandleing.js +28 -0
- package/packages/client_build_tool/lib/shared/server/getIp.js +30 -0
- package/packages/client_build_tool/lib/shared/server/getServerURL.js +29 -0
- package/packages/client_build_tool/lib/shared/server/httpsOptions.js +53 -0
- package/packages/client_build_tool/lib/shared/server/initExpressApp.js +19 -0
- package/packages/client_build_tool/lib/shared/server/initialHTMLHandling.js +66 -0
- package/packages/client_build_tool/lib/shared/server/serveContextFiles.js +24 -0
- package/packages/client_build_tool/lib/shared/server/serverBywebpackDevMiddleware.js +40 -0
- package/packages/client_build_tool/lib/shared/server/startHttpServer.js +26 -0
- package/packages/client_build_tool/lib/shared/server/startHttpsServer.js +34 -0
- package/packages/client_build_tool/lib/shared/server/unwanted/addHttp2Server.js +41 -0
- package/packages/client_build_tool/lib/shared/server/unwanted/configWebpackDevMiddleware.js +44 -0
- package/packages/client_build_tool/lib/shared/server/unwanted/devServerUtlis.js +1 -0
- package/packages/client_build_tool/lib/shared/server/unwanted/mockApiSupport.js +19 -0
- package/packages/client_build_tool/lib/shared/server/unwanted/webpackConfig.js +32 -0
- package/packages/client_build_tool/lib/shared/server/unwanted/websocketMockSetup.js +48 -0
- package/packages/client_build_tool/lib/shared/server/urlConcat.js +25 -0
- package/packages/client_build_tool/lib/shared/utils/utils.js +1 -0
- package/packages/client_build_tool/node_modules/history/CHANGES.md +395 -0
- package/packages/client_build_tool/node_modules/history/DOMUtils.js +3 -0
- package/packages/client_build_tool/node_modules/history/ExecutionEnvironment.js +3 -0
- package/packages/client_build_tool/node_modules/history/LICENSE +21 -0
- package/packages/client_build_tool/node_modules/history/LocationUtils.js +3 -0
- package/packages/client_build_tool/node_modules/history/PathUtils.js +3 -0
- package/packages/client_build_tool/node_modules/history/README.md +282 -0
- package/packages/client_build_tool/node_modules/history/cjs/history.js +933 -0
- package/packages/client_build_tool/node_modules/history/cjs/history.min.js +1 -0
- package/packages/client_build_tool/node_modules/history/createBrowserHistory.js +3 -0
- package/packages/client_build_tool/node_modules/history/createHashHistory.js +3 -0
- package/packages/client_build_tool/node_modules/history/createMemoryHistory.js +3 -0
- package/packages/client_build_tool/node_modules/history/createTransitionManager.js +3 -0
- package/packages/client_build_tool/node_modules/history/es/DOMUtils.js +7 -0
- package/packages/client_build_tool/node_modules/history/es/ExecutionEnvironment.js +7 -0
- package/packages/client_build_tool/node_modules/history/es/LocationUtils.js +7 -0
- package/packages/client_build_tool/node_modules/history/es/PathUtils.js +7 -0
- package/packages/client_build_tool/node_modules/history/es/createBrowserHistory.js +7 -0
- package/packages/client_build_tool/node_modules/history/es/createHashHistory.js +7 -0
- package/packages/client_build_tool/node_modules/history/es/createMemoryHistory.js +7 -0
- package/packages/client_build_tool/node_modules/history/es/createTransitionManager.js +7 -0
- package/packages/client_build_tool/node_modules/history/es/warnAboutDeprecatedESMImport.js +35 -0
- package/packages/client_build_tool/node_modules/history/esm/history.js +904 -0
- package/packages/client_build_tool/node_modules/history/index.js +7 -0
- package/packages/client_build_tool/node_modules/history/package.json +117 -0
- package/packages/client_build_tool/node_modules/history/umd/history.js +1059 -0
- package/packages/client_build_tool/node_modules/history/umd/history.min.js +1 -0
- package/packages/client_build_tool/node_modules/history/warnAboutDeprecatedCJSRequire.js +35 -0
@@ -0,0 +1 @@
|
|
1
|
+
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.History={})}(this,function(n){"use strict";function S(){return(S=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n}).apply(this,arguments)}var e="Invariant failed";function H(n,t){if(!n)throw new Error(e)}function d(n){return"/"===n.charAt(0)}function v(n,t){for(var e=t,o=e+1,i=n.length;o<i;e+=1,o+=1)n[e]=n[o];n.pop()}var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function U(n){return"/"===n.charAt(0)?n:"/"+n}function t(n){return"/"===n.charAt(0)?n.substr(1):n}function j(n,t){return e=n,new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)?n.substr(t.length):n;var e}function C(n){return"/"===n.charAt(n.length-1)?n.slice(0,-1):n}function r(n){var t=n||"/",e="",o="",i=t.indexOf("#");-1!==i&&(o=t.substr(i),t=t.substr(0,i));var r=t.indexOf("?");return-1!==r&&(e=t.substr(r),t=t.substr(0,r)),{pathname:t,search:"?"===e?"":e,hash:"#"===o?"":o}}function I(n){var t=n.pathname,e=n.search,o=n.hash,i=t||"/";return e&&"?"!==e&&(i+="?"===e.charAt(0)?e:"?"+e),o&&"#"!==o&&(i+="#"===o.charAt(0)?o:"#"+o),i}function R(n,t,e,o){var i;"string"==typeof n?(i=r(n)).state=t:(void 0===(i=S({},n)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(n){throw n instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):n}return e&&(i.key=e),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=function(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",e=n&&n.split("/")||[],o=t&&t.split("/")||[],i=n&&d(n),r=t&&d(t),a=i||r;if(n&&d(n)?o=e:e.length&&(o.pop(),o=o.concat(e)),!o.length)return"/";var c=void 0;if(o.length){var f=o[o.length-1];c="."===f||".."===f||""===f}else c=!1;for(var u=0,s=o.length;0<=s;s--){var h=o[s];"."===h?v(o,s):".."===h?(v(o,s),u++):u&&(v(o,s),u--)}if(!a)for(;u--;u)o.unshift("..");!a||""===o[0]||o[0]&&d(o[0])||o.unshift("");var l=o.join("/");return c&&"/"!==l.substr(-1)&&(l+="/"),l}(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function T(n,t){return n.pathname===t.pathname&&n.search===t.search&&n.hash===t.hash&&n.key===t.key&&function e(t,o){if(t===o)return!0;if(null==t||null==o)return!1;if(Array.isArray(t))return Array.isArray(o)&&t.length===o.length&&t.every(function(n,t){return e(n,o[t])});var n=void 0===t?"undefined":f(t);if(n!==(void 0===o?"undefined":f(o)))return!1;if("object"!==n)return!1;var i=t.valueOf(),r=o.valueOf();if(i!==t||r!==o)return e(i,r);var a=Object.keys(t),c=Object.keys(o);return a.length===c.length&&a.every(function(n){return e(t[n],o[n])})}(n.state,t.state)}function M(){var r=null;var o=[];return{setPrompt:function(n){return r=n,function(){r===n&&(r=null)}},confirmTransitionTo:function(n,t,e,o){if(null!=r){var i="function"==typeof r?r(n,t):r;"string"==typeof i?"function"==typeof e?e(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(n){var t=!0;function e(){t&&n.apply(void 0,arguments)}return o.push(e),function(){t=!1,o=o.filter(function(n){return n!==e})}},notifyListeners:function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];o.forEach(function(n){return n.apply(void 0,t)})}}}var B=!("undefined"==typeof window||!window.document||!window.document.createElement);function F(n,t){t(window.confirm(n))}var _="popstate",q="hashchange";function G(){try{return window.history.state||{}}catch(n){return{}}}var E="hashchange",L={hashbang:{encodePath:function(n){return"!"===n.charAt(0)?n:"!/"+t(n)},decodePath:function(n){return"!"===n.charAt(0)?n.substr(1):n}},noslash:{encodePath:t,decodePath:U},slash:{encodePath:U,decodePath:U}};function W(){var n=window.location.href,t=n.indexOf("#");return-1===t?"":n.substring(t+1)}function $(n){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,0<=t?t:0)+"#"+n)}function g(n,t,e){return Math.min(Math.max(n,t),e)}n.createBrowserHistory=function(n){void 0===n&&(n={}),B||H(!1);var t,c=window.history,f=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,e=!(-1===window.navigator.userAgent.indexOf("Trident")),o=n,i=o.forceRefresh,u=void 0!==i&&i,r=o.getUserConfirmation,s=void 0===r?F:r,a=o.keyLength,h=void 0===a?6:a,l=n.basename?C(U(n.basename)):"";function d(n){var t=n||{},e=t.key,o=t.state,i=window.location,r=i.pathname+i.search+i.hash;return l&&(r=j(r,l)),R(r,o,e)}function v(){return Math.random().toString(36).substr(2,h)}var p=M();function y(n){S(L,n),L.length=c.length,p.notifyListeners(L.location,L.action)}function g(n){void(void 0===n.state&&navigator.userAgent.indexOf("CriOS"))||P(d(n.state))}function w(){P(d(G()))}var m=!1;function P(t){m?(m=!1,y()):p.confirmTransitionTo(t,"POP",s,function(n){n?y({action:"POP",location:t}):function(n){var t=L.location,e=b.indexOf(t.key);-1===e&&(e=0);var o=b.indexOf(n.key);-1===o&&(o=0);var i=e-o;i&&(m=!0,k(i))}(t)})}var O=d(G()),b=[O.key];function x(n){return l+I(n)}function k(n){c.go(n)}var A=0;function T(n){1===(A+=n)&&1===n?(window.addEventListener(_,g),e&&window.addEventListener(q,w)):0===A&&(window.removeEventListener(_,g),e&&window.removeEventListener(q,w))}var E=!1,L={length:c.length,action:"POP",location:O,createHref:x,push:function(n,t){var a=R(n,t,v(),L.location);p.confirmTransitionTo(a,"PUSH",s,function(n){if(n){var t=x(a),e=a.key,o=a.state;if(f)if(c.pushState({key:e,state:o},null,t),u)window.location.href=t;else{var i=b.indexOf(L.location.key),r=b.slice(0,-1===i?0:i+1);r.push(a.key),b=r,y({action:"PUSH",location:a})}else window.location.href=t}})},replace:function(n,t){var r="REPLACE",a=R(n,t,v(),L.location);p.confirmTransitionTo(a,r,s,function(n){if(n){var t=x(a),e=a.key,o=a.state;if(f)if(c.replaceState({key:e,state:o},null,t),u)window.location.replace(t);else{var i=b.indexOf(L.location.key);-1!==i&&(b[i]=a.key),y({action:r,location:a})}else window.location.replace(t)}})},go:k,goBack:function(){k(-1)},goForward:function(){k(1)},block:function(n){void 0===n&&(n=!1);var t=p.setPrompt(n);return E||(T(1),E=!0),function(){return E&&(E=!1,T(-1)),t()}},listen:function(n){var t=p.appendListener(n);return T(1),function(){T(-1),t()}}};return L},n.createHashHistory=function(n){void 0===n&&(n={}),B||H(!1);var t=window.history,e=(window.navigator.userAgent.indexOf("Firefox"),n),o=e.getUserConfirmation,c=void 0===o?F:o,i=e.hashType,r=void 0===i?"slash":i,f=n.basename?C(U(n.basename)):"",a=L[r],u=a.encodePath,s=a.decodePath;function h(){var n=s(W());return f&&(n=j(n,f)),R(n)}var l=M();function d(n){S(A,n),A.length=t.length,l.notifyListeners(A.location,A.action)}var v=!1,p=null;function y(){var t,n=W(),e=u(n);if(n!==e)$(e);else{var o=h(),i=A.location;if(!v&&T(i,o))return;if(p===I(o))return;p=null,t=o,v?(v=!1,d()):l.confirmTransitionTo(t,"POP",c,function(n){n?d({action:"POP",location:t}):function(n){var t=A.location,e=P.lastIndexOf(I(t));-1===e&&(e=0);var o=P.lastIndexOf(I(n));-1===o&&(o=0);var i=e-o;i&&(v=!0,O(i))}(t)})}}var g=W(),w=u(g);g!==w&&$(w);var m=h(),P=[I(m)];function O(n){t.go(n)}var b=0;function x(n){1===(b+=n)&&1===n?window.addEventListener(E,y):0===b&&window.removeEventListener(E,y)}var k=!1,A={length:t.length,action:"POP",location:m,createHref:function(n){return"#"+u(f+I(n))},push:function(n,t){var a=R(n,void 0,void 0,A.location);l.confirmTransitionTo(a,"PUSH",c,function(n){if(n){var t,e=I(a),o=u(f+e);if(W()!==o){p=e,t=o,window.location.hash=t;var i=P.lastIndexOf(I(A.location)),r=P.slice(0,-1===i?0:i+1);r.push(e),P=r,d({action:"PUSH",location:a})}else d()}})},replace:function(n,t){var i="REPLACE",r=R(n,void 0,void 0,A.location);l.confirmTransitionTo(r,i,c,function(n){if(n){var t=I(r),e=u(f+t);W()!==e&&(p=t,$(e));var o=P.indexOf(I(A.location));-1!==o&&(P[o]=t),d({action:i,location:r})}})},go:O,goBack:function(){O(-1)},goForward:function(){O(1)},block:function(n){void 0===n&&(n=!1);var t=l.setPrompt(n);return k||(x(1),k=!0),function(){return k&&(k=!1,x(-1)),t()}},listen:function(n){var t=l.appendListener(n);return x(1),function(){x(-1),t()}}};return A},n.createMemoryHistory=function(n){void 0===n&&(n={});var t=n,i=t.getUserConfirmation,e=t.initialEntries,o=void 0===e?["/"]:e,r=t.initialIndex,a=void 0===r?0:r,c=t.keyLength,f=void 0===c?6:c,u=M();function s(n){S(y,n),y.length=y.entries.length,u.notifyListeners(y.location,y.action)}function h(){return Math.random().toString(36).substr(2,f)}var l=g(a,0,o.length-1),d=o.map(function(n){return R(n,void 0,"string"==typeof n?h():n.key||h())}),v=I;function p(n){var t=g(y.index+n,0,y.entries.length-1),e=y.entries[t];u.confirmTransitionTo(e,"POP",i,function(n){n?s({action:"POP",location:e,index:t}):s()})}var y={length:d.length,action:"POP",location:d[l],index:l,entries:d,createHref:v,push:function(n,t){var o=R(n,t,h(),y.location);u.confirmTransitionTo(o,"PUSH",i,function(n){if(n){var t=y.index+1,e=y.entries.slice(0);e.length>t?e.splice(t,e.length-t,o):e.push(o),s({action:"PUSH",location:o,index:t,entries:e})}})},replace:function(n,t){var e="REPLACE",o=R(n,t,h(),y.location);u.confirmTransitionTo(o,e,i,function(n){n&&(y.entries[y.index]=o,s({action:e,location:o}))})},go:p,goBack:function(){p(-1)},goForward:function(){p(1)},canGo:function(n){var t=y.index+n;return 0<=t&&t<y.entries.length},block:function(n){return void 0===n&&(n=!1),u.setPrompt(n)},listen:function(n){return u.appendListener(n)}};return y},n.createLocation=R,n.locationsAreEqual=T,n.parsePath=r,n.createPath=I,Object.defineProperty(n,"__esModule",{value:!0})});
|
@@ -0,0 +1,35 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var printWarning = function() {};
|
4
|
+
|
5
|
+
if (process.env.NODE_ENV !== 'production') {
|
6
|
+
printWarning = function(format, subs) {
|
7
|
+
var index = 0;
|
8
|
+
var message =
|
9
|
+
'Warning: ' +
|
10
|
+
(subs.length > 0
|
11
|
+
? format.replace(/%s/g, function() {
|
12
|
+
return subs[index++];
|
13
|
+
})
|
14
|
+
: format);
|
15
|
+
|
16
|
+
if (typeof console !== 'undefined') {
|
17
|
+
console.error(message);
|
18
|
+
}
|
19
|
+
|
20
|
+
try {
|
21
|
+
// --- Welcome to debugging history ---
|
22
|
+
// This error was thrown as a convenience so that you can use the
|
23
|
+
// stack trace to find the callsite that triggered this warning.
|
24
|
+
throw new Error(message);
|
25
|
+
} catch (e) {}
|
26
|
+
};
|
27
|
+
}
|
28
|
+
|
29
|
+
module.exports = function(member) {
|
30
|
+
printWarning(
|
31
|
+
'Please use `require("history").%s` instead of `require("history/%s")`. ' +
|
32
|
+
'Support for the latter will be removed in the next major release.',
|
33
|
+
[member, member]
|
34
|
+
);
|
35
|
+
};
|