update deps + eslint + element as second arg on mount
This commit is contained in:
1 parent
d94d9e03cf
commit
c7ddae4b86
12 files changed
+10089
-327
No files matched your search
@@ -0,0 +1,4 @@
|
||||
.eslintrc.js
|
||||
babel.config.js
|
||||
webpack.config.js
|
||||
dist/
|
||||
@@ -0,0 +1,22 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended'
|
||||
],
|
||||
overrides: [
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module'
|
||||
},
|
||||
plugins: [
|
||||
'@typescript-eslint'
|
||||
],
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@babel/preset-env',
|
||||
'@babel/preset-typescript'
|
||||
]
|
||||
}
|
||||
Vendored
+2
-287
@@ -1,287 +1,2 @@
|
||||
var fireapp =
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "/fireapp/1.4.6/";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = "./src/main.ts");
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ({
|
||||
|
||||
/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js":
|
||||
/*!************************************************************!*\
|
||||
!*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
|
||||
\************************************************************/
|
||||
/*! exports provided: default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _extends; });\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\n//# sourceURL=webpack://fireapp/./node_modules/@babel/runtime/helpers/esm/extends.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/history/esm/history.js":
|
||||
/*!*********************************************!*\
|
||||
!*** ./node_modules/history/esm/history.js ***!
|
||||
\*********************************************/
|
||||
/*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createBrowserHistory\", function() { return createBrowserHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createHashHistory\", function() { return createHashHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createMemoryHistory\", function() { return createMemoryHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createLocation\", function() { return createLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"locationsAreEqual\", function() { return locationsAreEqual; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"parsePath\", function() { return parsePath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createPath\", function() { return createPath; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var resolve_pathname__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! resolve-pathname */ \"./node_modules/resolve-pathname/esm/resolve-pathname.js\");\n/* harmony import */ var value_equal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! value-equal */ \"./node_modules/value-equal/esm/value-equal.js\");\n/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tiny-warning */ \"./node_modules/tiny-warning/dist/tiny-warning.esm.js\");\n/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-invariant */ \"./node_modules/tiny-invariant/dist/tiny-invariant.esm.js\");\n\n\n\n\n\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = Object(resolve_pathname__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(location.pathname, currentLocation.pLine truncated
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/regenerator-runtime/runtime.js":
|
||||
/*!*****************************************************!*\
|
||||
!*** ./node_modules/regenerator-runtime/runtime.js ***!
|
||||
\*****************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name pr
Line truncated
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/resolve-pathname/esm/resolve-pathname.js":
|
||||
/*!***************************************************************!*\
|
||||
!*** ./node_modules/resolve-pathname/esm/resolve-pathname.js ***!
|
||||
\***************************************************************/
|
||||
/*! exports provided: default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("__webpack_require__.r(__webpack_exports__);\nfunction isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (resolvePathname);\n\n\n//# sourceURL=webpack://fireapp/./node_modules/resolve-pathname/esm/resolve-pathname.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/systemjs/dist/extras/amd.js":
|
||||
/*!**************************************************!*\
|
||||
!*** ./node_modules/systemjs/dist/extras/amd.js ***!
|
||||
\**************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("/* WEBPACK VAR INJECTION */(function(global) {/*\n * Support for AMD loading\n */\n(function (global) {\n const systemPrototype = global.System.constructor.prototype;\n\n const emptyInstantiation = [[], function () { return {} }];\n\n function unsupportedRequire () {\n throw Error('AMD require not supported.');\n }\n\n let tmpRegister, firstNamedDefine;\n\n function emptyFn () {}\n\n const requireExportsModule = ['require', 'exports', 'module'];\n\n function createAMDRegister (amdDefineDeps, amdDefineExec) {\n const exports = {};\n const module = { exports: exports };\n const depModules = [];\n const setters = [];\n let splice = 0;\n for (let i = 0; i < amdDefineDeps.length; i++) {\n const id = amdDefineDeps[i];\n const index = setters.length;\n if (id === 'require') {\n depModules[i] = unsupportedRequire;\n splice++;\n }\n else if (id === 'module') {\n depModules[i] = module;\n splice++;\n }\n else if (id === 'exports') {\n depModules[i] = exports;\n splice++;\n }\n else {\n // needed for ie11 lack of iteration scope\n const idx = i;\n setters.push(function (ns) {\n depModules[idx] = ns.__useDefault ? ns.default : ns;\n });\n }\n if (splice)\n amdDefineDeps[index] = id;\n }\n if (splice)\n amdDefineDeps.length -= splice;\n const amdExec = amdDefineExec;\n return [amdDefineDeps, function (_export) {\n _export({ default: exports, __useDefault: true });\n return {\n setters: setters,\n execute: function () {\n module.exports = amdExec.apply(exports, depModules) || module.exports;\n if (exports !== module.exports)\n _export('default', module.exports);\n }\n };\n }];\n }\n\n const _import = systemPrototype.import;\n systemPrototype.import = function() {\n firstNamedDefine = null;\n return _import.apply(this, arguments);\n };\n\n // hook System.register to know the last declaration binding\n let lastRegisterDeclare;\n const systemRegister = systemPrototype.register;\n systemPrototype.register = function (name, deps, declare) {\n lastRegisterDeclare = typeof name === 'string' ? declare : deps;\n systemRegister.apply(this, arguments);\n };\n\n const instantiate = systemPrototype.instantiate;\n systemPrototype.instantiate = function() {\n // Reset \"currently executing script\"\n amdDefineDeps = null;\n return instantiate.apply(this, arguments);\n };\n\n const getRegister = systemPrototype.getRegister;\n systemPrototype.getRegister = function () {\n if (tmpRegister)\n return tmpRegister;\n\n const _firstNamedDefine = firstNamedDefine;\n firstNamedDefine = null;\n\n const register = getRegister.call(this);\n // if its an actual System.register leave it\n if (register && register[1] === lastRegisterDeclare)\n return register;\n\n const _amdDefineDeps = amdDefineDeps;\n amdDefineDeps = null;\n\n // If the script registered a named module, return that module instead of re-instantiating it.\n if (_firstNamedDefine)\n return _firstNamedDefine;\n\n // otherwise AMD takes priority\n // no registration -> attempt AMD detection\n if (!_amdDefineDeps)\n return register || emptyInstantiation;\n\n return createAMDRegister(_amdDefineDeps, amdDefineExec);\n };\n let amdDefineDeps, amdDefineExec;\n global.define = function (name, deps, execute) {\n // define('', [], function () {})\n if (typeof name === 'string') {\n const depsAndExec = getDepsAndExec(deps, execute);\n if (amdDefineDeps) {\n if (!System.registerRegistry)\n throw Error('Include the named register extension for SystemJS named AMD support.');\n addToRegisterRegistry(name, createAMDRegister(depsAndExec[0], depsAndExec[1]));\n amdDefineDeps = [];\n amdDefineExec = emptyFn;\n return;\n }\n else {\n if (System.registerRegistry)\n addToRegisterRegistry(name, createAMDRegister([].concat(depsAndExec[0]), depsAndExec[1]));\n name = deps;\n deps = execute;\n }\n }\n const depsAndExec = getDepsAndExec(name, deps);\n amdDefineDeps = depsAndExec[0];\n amdDefineExec = depsAndExec[1];\n };\n global.define.amd = {};\n\n function getDepsAndExec(arg1, arg2) {\n // define([], function () {})\n if (arg1 instanceof Array) {\n return [arg1, arg2];\n }\n // define({})\n else if (typeof arg1 === 'object') {\n return [[], function () { return arg1 }];\n }\n // define(function () {})\n else if (typeof arg1 === 'function') {\n return [requireExportsModule, arg1];\n }\n }\n\n function addToRegisterRegistry(name, define) {\n if (!firstNamedDefine) {\n firstNamedDefine = define;\n }\n\n // We must call System.getRegister() here to give other extras, such as the name
Line truncated
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/systemjs/dist/extras/named-exports.js":
|
||||
/*!************************************************************!*\
|
||||
!*** ./node_modules/systemjs/dist/extras/named-exports.js ***!
|
||||
\************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("/* WEBPACK VAR INJECTION */(function(global) {/*\n * Named exports support for legacy module formats in SystemJS 2.0\n */\n(function (global) {\n const systemJSPrototype = global.System.constructor.prototype;\n \n // hook System.register to know the last declaration binding\n let lastRegisterDeclare;\n const systemRegister = systemJSPrototype.register;\n systemJSPrototype.register = function (name, deps, declare) {\n lastRegisterDeclare = typeof name === 'string' ? declare : deps;\n systemRegister.apply(this, arguments);\n };\n\n const getRegister = systemJSPrototype.getRegister;\n systemJSPrototype.getRegister = function () {\n const register = getRegister.call(this);\n // if it is an actual System.register call, then its ESM\n // -> dont add named exports\n if (!register || register[1] === lastRegisterDeclare || register[1].length === 0)\n return register;\n \n // otherwise it was provided by a custom instantiator\n // -> extend the registration with named exports support\n const registerDeclare = register[1];\n register[1] = function (_export, _context) {\n // hook the _export function to note the default export\n let defaultExport, hasDefaultExport = false;\n const declaration = registerDeclare.call(this, function (name, value) {\n if (typeof name === 'object' && name.__useDefault)\n defaultExport = name.default, hasDefaultExport = true;\n else if (name === 'default')\n defaultExport = value;\n else if (name === '__useDefault')\n hasDefaultExport = true;\n _export(name, value);\n }, _context);\n // hook the execute function\n const execute = declaration.execute;\n if (execute)\n declaration.execute = function () {\n execute.call(this);\n // do a bulk export of the default export object\n // to export all its names as named exports\n if (hasDefaultExport && typeof defaultExport === 'object')\n for (let name in defaultExport) {\n // default is not a named export\n if (name !== 'default') {\n _export(name, defaultExport[name]);\n }\n }\n };\n return declaration;\n };\n return register;\n };\n})(typeof self !== 'undefined' ? self : global);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://fireapp/./node_modules/systemjs/dist/extras/named-exports.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/systemjs/dist/extras/named-register.js":
|
||||
/*!*************************************************************!*\
|
||||
!*** ./node_modules/systemjs/dist/extras/named-register.js ***!
|
||||
\*************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("/* WEBPACK VAR INJECTION */(function(global) {/*\n * SystemJS named register extension\n * Supports System.register('name', [..deps..], function (_export, _context) { ... })\n * \n * Names are written to the registry as-is\n * System.register('x', ...) can be imported as System.import('x')\n */\n(function (global) {\n const System = global.System;\n setRegisterRegistry(System);\n const systemJSPrototype = System.constructor.prototype;\n const constructor = System.constructor;\n const SystemJS = function () {\n constructor.call(this);\n setRegisterRegistry(this);\n };\n SystemJS.prototype = systemJSPrototype;\n System.constructor = SystemJS;\n\n let firstNamedDefine;\n\n function setRegisterRegistry(systemInstance) {\n systemInstance.registerRegistry = Object.create(null);\n }\n\n const _import = systemJSPrototype.import;\n systemJSPrototype.import = function() {\n firstNamedDefine = null;\n return _import.apply(this, arguments);\n };\n\n const register = systemJSPrototype.register;\n systemJSPrototype.register = function (name, deps, declare) {\n if (typeof name !== 'string')\n return register.apply(this, arguments);\n const define = [deps, declare];\n this.registerRegistry[name] = define;\n if (!firstNamedDefine) {\n firstNamedDefine = define;\n }\n return register.apply(this, arguments);\n };\n\n const resolve = systemJSPrototype.resolve;\n systemJSPrototype.resolve = function (id, parentURL) {\n try {\n // Prefer import map (or other existing) resolution over the registerRegistry\n return resolve.call(this, id, parentURL);\n } catch (err) {\n if (id in this.registerRegistry)\n return id;\n throw err;\n }\n };\n\n const instantiate = systemJSPrototype.instantiate;\n systemJSPrototype.instantiate = function (url, firstParentUrl) {\n return this.registerRegistry[url] || instantiate.call(this, url, firstParentUrl);\n };\n\n const getRegister = systemJSPrototype.getRegister;\n systemJSPrototype.getRegister = function () {\n // Calling getRegister() because other extras need to know it was called so they can perform side effects\n const register = getRegister.call(this);\n\n const result = firstNamedDefine || register;\n firstNamedDefine = null;\n return result;\n }\n})(typeof self !== 'undefined' ? self : global);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://fireapp/./node_modules/systemjs/dist/extras/named-register.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/systemjs/dist/extras/transform.js":
|
||||
/*!********************************************************!*\
|
||||
!*** ./node_modules/systemjs/dist/extras/transform.js ***!
|
||||
\********************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("/* WEBPACK VAR INJECTION */(function(global) {/*\n * Support for a \"transform\" loader interface\n */\n(function (global) {\n const systemJSPrototype = global.System.constructor.prototype;\n\n const instantiate = systemJSPrototype.instantiate;\n systemJSPrototype.instantiate = function (url, parent) {\n if (url.slice(-5) === '.wasm')\n return instantiate.call(this, url, parent);\n\n const loader = this;\n return fetch(url, { credentials: 'same-origin' })\n .then(function (res) {\n if (!res.ok)\n throw Error('Fetch error: ' + res.status + ' ' + res.statusText + (parent ? ' loading from ' + parent : ''));\n return res.text();\n })\n .then(function (source) {\n return loader.transform.call(this, url, source);\n })\n .then(function (source) {\n (0, eval)(source + '\\n//# sourceURL=' + url);\n return loader.getRegister();\n });\n };\n\n // Hookable transform function!\n systemJSPrototype.transform = function (_id, source) {\n return source;\n };\n})(typeof self !== 'undefined' ? self : global);\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://fireapp/./node_modules/systemjs/dist/extras/transform.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/systemjs/dist/system.js":
|
||||
/*!**********************************************!*\
|
||||
!*** ./node_modules/systemjs/dist/system.js ***!
|
||||
\**********************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
eval("/* WEBPACK VAR INJECTION */(function(global) {/*\n* SystemJS 6.2.2\n*/\n(function () {\n const hasSelf = typeof self !== 'undefined';\n\n const hasDocument = typeof document !== 'undefined';\n\n const envGlobal = hasSelf ? self : global;\n\n let baseUrl;\n\n if (hasDocument) {\n const baseEl = document.querySelector('base[href]');\n if (baseEl)\n baseUrl = baseEl.href;\n }\n\n if (!baseUrl && typeof location !== 'undefined') {\n baseUrl = location.href.split('#')[0].split('?')[0];\n const lastSepIndex = baseUrl.lastIndexOf('/');\n if (lastSepIndex !== -1)\n baseUrl = baseUrl.slice(0, lastSepIndex + 1);\n }\n\n const backslashRegEx = /\\\\/g;\n function resolveIfNotPlainOrUrl (relUrl, parentUrl) {\n if (relUrl.indexOf('\\\\') !== -1)\n relUrl = relUrl.replace(backslashRegEx, '/');\n // protocol-relative\n if (relUrl[0] === '/' && relUrl[1] === '/') {\n return parentUrl.slice(0, parentUrl.indexOf(':') + 1) + relUrl;\n }\n // relative-url\n else if (relUrl[0] === '.' && (relUrl[1] === '/' || relUrl[1] === '.' && (relUrl[2] === '/' || relUrl.length === 2 && (relUrl += '/')) ||\n relUrl.length === 1 && (relUrl += '/')) ||\n relUrl[0] === '/') {\n const parentProtocol = parentUrl.slice(0, parentUrl.indexOf(':') + 1);\n // Disabled, but these cases will give inconsistent results for deep backtracking\n //if (parentUrl[parentProtocol.length] !== '/')\n // throw Error('Cannot resolve');\n // read pathname from parent URL\n // pathname taken to be part after leading \"/\"\n let pathname;\n if (parentUrl[parentProtocol.length + 1] === '/') {\n // resolving to a :// so we need to read out the auth and host\n if (parentProtocol !== 'file:') {\n pathname = parentUrl.slice(parentProtocol.length + 2);\n pathname = pathname.slice(pathname.indexOf('/') + 1);\n }\n else {\n pathname = parentUrl.slice(8);\n }\n }\n else {\n // resolving to :/ so pathname is the /... part\n pathname = parentUrl.slice(parentProtocol.length + (parentUrl[parentProtocol.length] === '/'));\n }\n\n if (relUrl[0] === '/')\n return parentUrl.slice(0, parentUrl.length - pathname.length - 1) + relUrl;\n\n // join together and split for removal of .. and . segments\n // looping the string instead of anything fancy for perf reasons\n // '../../../../../z' resolved to 'x/y' is just 'z'\n const segmented = pathname.slice(0, pathname.lastIndexOf('/') + 1) + relUrl;\n\n const output = [];\n let segmentIndex = -1;\n for (let i = 0; i < segmented.length; i++) {\n // busy reading a segment - only terminate on '/'\n if (segmentIndex !== -1) {\n if (segmented[i] === '/') {\n output.push(segmented.slice(segmentIndex, i + 1));\n segmentIndex = -1;\n }\n }\n\n // new segment - check if it is relative\n else if (segmented[i] === '.') {\n // ../ segment\n if (segmented[i + 1] === '.' && (segmented[i + 2] === '/' || i + 2 === segmented.length)) {\n output.pop();\n i += 2;\n }\n // ./ segment\n else if (segmented[i + 1] === '/' || i + 1 === segmented.length) {\n i += 1;\n }\n else {\n // the start of a new segment as below\n segmentIndex = i;\n }\n }\n // it is the start of a new segment\n else {\n segmentIndex = i;\n }\n }\n // finish reading out the last segment\n if (segmentIndex !== -1)\n output.push(segmented.slice(segmentIndex));\n return parentUrl.slice(0, parentUrl.length - pathname.length) + output.join('');\n }\n }\n\n /*\n * Import maps implementation\n *\n * To make lookups fast we pre-resolve the entire import map\n * and then match based on backtracked hash lookups\n *\n */\n\n function resolveUrl (relUrl, parentUrl) {\n return resolveIfNotPlainOrUrl(relUrl, parentUrl) || (relUrl.indexOf(':') !== -1 ? relUrl : resolveIfNotPlainOrUrl('./' + relUrl, parentUrl));\n }\n\n function objectAssign (to, from) {\n for (let p in from)\n to[p] = from[p];\n return to;\n }\n\n function resolveAndComposePackages (packages, outPackages, baseUrl, parentMap, parentUrl) {\n for (let p in packages) {\n const resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl) || p;\n const rhs = packages[p];\n // package fallbacks not currently supported\n if (typeof rhs !== 'string')\n continue;\n const mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(rhs, baseUrl) || rhs, parentUrl);\n if (!mapped)\n targetWarning(p, rhs, 'bare specifier did not resolve');\n else\n outPackages[resolvedLhs] = mapped;\n }\n }\n\n function resolveAndComposeImportMap (json, baseUrl, pare
Line truncated
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/tiny-invariant/dist/tiny-invariant.esm.js":
|
||||
/*!****************************************************************!*\
|
||||
!*** ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js ***!
|
||||
\****************************************************************/
|
||||
/*! exports provided: default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("__webpack_require__.r(__webpack_exports__);\nvar isProduction = \"development\" === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n throw new Error(prefix + \": \" + (message || ''));\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (invariant);\n\n\n//# sourceURL=webpack://fireapp/./node_modules/tiny-invariant/dist/tiny-invariant.esm.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/tiny-warning/dist/tiny-warning.esm.js":
|
||||
/*!************************************************************!*\
|
||||
!*** ./node_modules/tiny-warning/dist/tiny-warning.esm.js ***!
|
||||
\************************************************************/
|
||||
/*! exports provided: default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("__webpack_require__.r(__webpack_exports__);\nvar isProduction = \"development\" === 'production';\nfunction warning(condition, message) {\n if (!isProduction) {\n if (condition) {\n return;\n }\n\n var text = \"Warning: \" + message;\n\n if (typeof console !== 'undefined') {\n console.warn(text);\n }\n\n try {\n throw Error(text);\n } catch (x) {}\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (warning);\n\n\n//# sourceURL=webpack://fireapp/./node_modules/tiny-warning/dist/tiny-warning.esm.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/value-equal/esm/value-equal.js":
|
||||
/*!*****************************************************!*\
|
||||
!*** ./node_modules/value-equal/esm/value-equal.js ***!
|
||||
\*****************************************************/
|
||||
/*! exports provided: default */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("__webpack_require__.r(__webpack_exports__);\nfunction valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true;\n\n // Otherwise, if either of them == null they are not equal.\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return (\n Array.isArray(b) &&\n a.length === b.length &&\n a.every(function(item, index) {\n return valueEqual(item, b[index]);\n })\n );\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n return Object.keys(Object.assign({}, a, b)).every(function(key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (valueEqual);\n\n\n//# sourceURL=webpack://fireapp/./node_modules/value-equal/esm/value-equal.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/webpack/buildin/global.js":
|
||||
/*!***********************************!*\
|
||||
!*** (webpack)/buildin/global.js ***!
|
||||
\***********************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack://fireapp/(webpack)/buildin/global.js?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/apps.ts":
|
||||
/*!*********************!*\
|
||||
!*** ./src/apps.ts ***!
|
||||
\*********************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass Apps extends Map {\n constructor(apps) {\n super();\n this.findApp = (path) => {\n const currentPath = [...this.keys()].reduce((memo, appRoute) => {\n const correctedAppRoute = appRoute.replace(/^\\/?/, '/');\n const correctedMemo = memo ? memo.replace(/^\\/?/, '/') : memo;\n return this.startWithPath(path, correctedAppRoute) && this.startWithPath(correctedAppRoute, correctedMemo)\n ? appRoute\n : memo;\n }, void 0);\n return (this.get(currentPath) || this.get('/') || {\n version: ''\n });\n };\n this.merge(apps);\n }\n merge(apps) {\n (Object.entries(apps).forEach(([path, options]) => this.set(path, options)));\n }\n startWithPath(path, subPath) {\n if (!subPath) {\n return true;\n }\n const pathItem = String(path).split('/');\n const subPathItems = String(subPath).split('/');\n return subPathItems.reduce((memo, appItem, index) => memo && pathItem[index] === appItem, true);\n }\n}\nexports.Apps = Apps;\n\n\n//# sourceURL=webpack://fireapp/./src/apps.ts?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/history.ts":
|
||||
/*!************************!*\
|
||||
!*** ./src/history.ts ***!
|
||||
\************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst history_1 = __webpack_require__(/*! history */ \"./node_modules/history/esm/history.js\");\nconst history = history_1.createBrowserHistory();\nexports.default = history;\n\n\n//# sourceURL=webpack://fireapp/./src/history.ts?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/main.ts":
|
||||
/*!*********************!*\
|
||||
!*** ./src/main.ts ***!
|
||||
\*********************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__webpack_require__(/*! systemjs/dist/system */ \"./node_modules/systemjs/dist/system.js\");\n__webpack_require__(/*! systemjs/dist/extras/amd */ \"./node_modules/systemjs/dist/extras/amd.js\");\n__webpack_require__(/*! systemjs/dist/extras/named-register */ \"./node_modules/systemjs/dist/extras/named-register.js\");\n__webpack_require__(/*! systemjs/dist/extras/named-exports */ \"./node_modules/systemjs/dist/extras/named-exports.js\");\n__webpack_require__(/*! systemjs/dist/extras/transform */ \"./node_modules/systemjs/dist/extras/transform.js\");\n__webpack_require__(/*! regenerator-runtime/runtime */ \"./node_modules/regenerator-runtime/runtime.js\");\nconst apps_1 = __webpack_require__(/*! ./apps */ \"./src/apps.ts\");\nconst virtual_module_1 = __webpack_require__(/*! ./virtual-module */ \"./src/virtual-module.ts\");\nconst history_1 = __importDefault(__webpack_require__(/*! ./history */ \"./src/history.ts\"));\nconst systemJSImport = (requestUrl) => __awaiter(void 0, void 0, void 0, function* () {\n const { default: component, mount, unmount } = yield System.import(requestUrl);\n return { component, mount, unmount };\n});\nexports.default = ({ apps: rawApps, navigations, config, features }) => __awaiter(void 0, void 0, void 0, function* () {\n virtual_module_1.defineVirtualModule({ navigations, config, features });\n const apps = new apps_1.Apps(rawApps);\n let prevPathname = window.location.pathname;\n function getApp() {\n return __awaiter(this, void 0, void 0, function* () {\n const app = apps.findApp(history_1.default.location.pathname);\n const publicPath = `/${app.name}/${app.version}`;\n __webpack_require__.p = `${config.baseUrl}${publicPath}${__webpack_require__.p}`;\n const appPath = `${config.baseUrl}${publicPath}/index.js`;\n const { component, mount, unmount } = yield systemJSImport(appPath);\n return { component, mount, unmount };\n });\n }\n let { component, mount, unmount } = yield getApp();\n mount(component.default);\n history_1.default.listen((location) => __awaiter(void 0, void 0, void 0, function* () {\n if (location.pathname !== prevPathname) {\n prevPathname = location.pathname;\n unmount();\n const nextApp = yield getApp();\n nextApp.mount(nextApp.component.default);\n unmount = nextApp.unmount;\n }\n }));\n});\n\n\n//# sourceURL=webpack://fireapp/./src/main.ts?");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/virtual-module.ts":
|
||||
/*!*******************************!*\
|
||||
!*** ./src/virtual-module.ts ***!
|
||||
\*******************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst history_1 = __importDefault(__webpack_require__(/*! ./history */ \"./src/history.ts\"));\nconst createVirtualModule = ({ config, navigations, features }) => ({\n getConfig: () => config,\n getConfigValue: (pkg) => config[pkg],\n getNavigations: () => navigations,\n getNavigationsValue: (pkg) => navigations[pkg],\n getAllFeatures: () => features,\n getFeatures: (pkg) => features[pkg],\n getHistory: () => history_1.default,\n});\nexports.defineVirtualModule = (params) => {\n const virtualModule = createVirtualModule(params);\n // @ts-ignore\n System.set('root.scope', Object.assign({}, virtualModule));\n};\n\n\n//# sourceURL=webpack://fireapp/./src/virtual-module.ts?");
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ })["default"];
|
||||
/*! For license information please see index.js.LICENSE.txt */
|
||||
var fireapp;(()=>{var t={666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,c=Object.create(i.prototype),u=new A(r||[]);return o(c,"_invoke",{value:L(t,n,u)}),c}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function g(){}function b(){}var w={};s(w,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(R([])));O&&O!==n&&r.call(O,c)&&(w=O);var E=b.prototype=m.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(o,i,c,u){var a=l(t[o],t,i);if("throw"!==a.type){var s=a.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(a.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function L(t,e,n){var r=h;return function(o,i){if(r===y)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw i;return T()}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=y;var a=l(t,e,n);if("normal"===a.type){if(r=n.done?d:p,a.arg===v)continue;return{value:a.arg,done:n.done}}"throw"===a.type&&(r=d,n.method="throw",n.arg=a.arg)}}}function P(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=l(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var c=i.arg;return c?c.done?(n[t.resultName]=c.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):c:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function R(t){if(t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:T}}function T(){return{value:e,done:!0}}return g.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,a,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},S(j.prototype),s(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var c=new j(f(e,n,r,o),i);return t.isGeneratorFunction(n)?c:c.next().then((function(t){return t.done?t.value:c.next()}))},S(E),s(E,a,"Generator"),s(E,c,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=R,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var c=this.tryEntries[i],u=c.cLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
Generated
+10003
File diff suppressed because it is too large.
Load diff
+14
-8
@@ -5,26 +5,32 @@
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"start": "nodemon ./stubs/server.js",
|
||||
"build": "webpack --mode development"
|
||||
"build": "webpack --mode development",
|
||||
"build:prod": "webpack --mode production"
|
||||
},
|
||||
"author": "innoavvlasov@gmail.com",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@types/node": "13.7.0",
|
||||
"@babel/core": "^7.21.0",
|
||||
"@babel/preset-env": "^7.20.2",
|
||||
"@babel/preset-typescript": "^7.21.0",
|
||||
"@types/node": "16.18.12",
|
||||
"@types/systemjs": "6.1.0",
|
||||
"awesome-typescript-loader": "5.2.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.53.0",
|
||||
"@typescript-eslint/parser": "^5.53.0",
|
||||
"babel-loader": "^9.1.2",
|
||||
"clean-webpack-plugin": "3.0.0",
|
||||
"es6-promise": "4.2.8",
|
||||
"eslint": "^8.34.0",
|
||||
"exports-loader": "0.7.0",
|
||||
"fbjs": "1.0.0",
|
||||
"file-loader": "5.0.2",
|
||||
"history": "4.10.1",
|
||||
"imports-loader": "0.8.0",
|
||||
"nodemon": "^2.0.20",
|
||||
"rimraf": "3.0.1",
|
||||
"systemjs": "6.2.2",
|
||||
"typescript": "3.7.5",
|
||||
"webpack": "4.41.5",
|
||||
"webpack-cli": "3.3.10",
|
||||
"whatwg-fetch": "3.0.0"
|
||||
"typescript": "^4.9.5",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack-cli": "^5.0.1"
|
||||
}
|
||||
}
|
||||
+10
-2
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable prefer-const */
|
||||
import "systemjs/dist/system";
|
||||
import "systemjs/dist/extras/amd";
|
||||
import "systemjs/dist/extras/named-register";
|
||||
@@ -16,6 +17,13 @@ const systemJSImport = async (requestUrl: string) => {
|
||||
return { component, mount, unmount }
|
||||
}
|
||||
|
||||
let mainMountElement = document.getElementById('app');
|
||||
|
||||
if (!mainMountElement) {
|
||||
mainMountElement = document.createElement('div');
|
||||
mainMountElement.id = 'app';
|
||||
}
|
||||
|
||||
export default async ({ apps: rawApps, navigations, config, features }) => {
|
||||
defineVirtualModule({ navigations, config, features })
|
||||
|
||||
@@ -38,7 +46,7 @@ export default async ({ apps: rawApps, navigations, config, features }) => {
|
||||
}
|
||||
|
||||
let { component, mount, unmount } = await getApp()
|
||||
mount(component.default);
|
||||
mount(component.default, mainMountElement);
|
||||
|
||||
history.listen(async (location) => {
|
||||
if (location.pathname !== prevPathname) {
|
||||
@@ -46,7 +54,7 @@ export default async ({ apps: rawApps, navigations, config, features }) => {
|
||||
unmount()
|
||||
|
||||
const nextApp = await getApp();
|
||||
nextApp.mount(nextApp.component.default)
|
||||
nextApp.mount(nextApp.component.default, mainMountElement)
|
||||
unmount = nextApp.unmount;
|
||||
}
|
||||
})
|
||||
|
||||
@@ -12,7 +12,6 @@ const createVirtualModule = ({ config, navigations, features }) => ({
|
||||
|
||||
export const defineVirtualModule = (params) => {
|
||||
const virtualModule = createVirtualModule(params)
|
||||
// @ts-ignore
|
||||
System.set('root.scope', {
|
||||
...virtualModule
|
||||
});
|
||||
|
||||
+21
-18
@@ -1,20 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"dom",
|
||||
"es7"
|
||||
],
|
||||
"outDir": "./dist/",
|
||||
"sourceMap": true,
|
||||
"esModuleInterop": true,
|
||||
"downlevelIteration" :true,
|
||||
"noImplicitAny": false,
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"jsx": "react",
|
||||
"typeRoots": ["node_modules/@types", "src/typings", "../../node_modules/@types"]
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"dom",
|
||||
"ESNext"
|
||||
],
|
||||
"outDir": "./dist/",
|
||||
"sourceMap": true,
|
||||
"esModuleInterop": true,
|
||||
"downlevelIteration": true,
|
||||
"noImplicitAny": false,
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"typeRoots": [
|
||||
"node_modules/@types",
|
||||
"src/typings",
|
||||
"../../node_modules/@types"
|
||||
]
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
+5
-10
@@ -6,21 +6,20 @@ const outputDirectory = 'dist';
|
||||
const pkg = require('./package.json')
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
entry: {
|
||||
index: "./src/main.ts"
|
||||
index: './src/main.ts'
|
||||
},
|
||||
output: {
|
||||
library: "fireapp",
|
||||
library: 'fireapp',
|
||||
path: path.resolve(__dirname, outputDirectory),
|
||||
libraryExport: "default",
|
||||
libraryExport: 'default',
|
||||
publicPath: `/fireapp/${pkg.version}/`
|
||||
},
|
||||
|
||||
plugins: [new CleanWebpackPlugin()],
|
||||
|
||||
resolve: {
|
||||
extensions: [".ts", ".js"]
|
||||
extensions: ['.ts', '.js']
|
||||
},
|
||||
|
||||
module: {
|
||||
@@ -28,11 +27,7 @@ module.exports = {
|
||||
{ parser: { system: false } },
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
loader: "awesome-typescript-loader"
|
||||
},
|
||||
{
|
||||
test: /\.(jpe?g|gif|png|svg|woff|ttf|eot|wav|mp3)$/,
|
||||
loader: "file-loader"
|
||||
loader: 'babel-loader'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user