@verdaccio/ui-components 2.0.0-6-next.9 → 2.0.0-6-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +1 -9
- package/CHANGELOG.md +6 -0
- package/build/Theme/ResetStyles.js +34 -37
- package/build/Theme/StyleBaseline.js +4 -6
- package/build/Theme/ThemeProvider.js +24 -34
- package/build/Theme/colors.js +1 -1
- package/build/Theme/index.js +9 -10
- package/build/Theme/theme.js +26 -28
- package/build/__mocks__/react-markdown.js +6 -5
- package/build/__mocks__/remark-plugin.js +1 -1
- package/build/components/ActionBar/ActionBar.js +23 -36
- package/build/components/ActionBar/ActionBarAction.js +45 -56
- package/build/components/ActionBar/index.js +3 -3
- package/build/components/Author/Author.js +26 -21
- package/build/components/Author/index.js +3 -3
- package/build/components/Author/styles.js +5 -5
- package/build/components/CopyClipboard/CopyToClipBoard.js +21 -23
- package/build/components/CopyClipboard/index.js +4 -4
- package/build/components/CopyClipboard/utils.js +14 -16
- package/build/components/Dependencies/Dependencies.js +68 -66
- package/build/components/Dependencies/index.js +3 -3
- package/build/components/Dependencies/styles.js +9 -11
- package/build/components/Deprecated/Deprecated.js +10 -8
- package/build/components/Deprecated/index.js +3 -3
- package/build/components/Developers/Developers.js +27 -42
- package/build/components/Developers/Title.js +19 -18
- package/build/components/Developers/get-unique-developer-values.js +3 -13
- package/build/components/Developers/index.js +5 -6
- package/build/components/Developers/styles.js +7 -7
- package/build/components/Distribution/Dist.js +24 -22
- package/build/components/Distribution/index.js +3 -3
- package/build/components/Distribution/styles.js +7 -7
- package/build/components/Distribution/utilts.spec.js +4 -4
- package/build/components/Engines/Engines.js +37 -36
- package/build/components/Engines/index.js +3 -3
- package/build/components/Engines/styles.js +4 -4
- package/build/components/ErrorBoundary/ErrorBoundary.js +29 -50
- package/build/components/ErrorBoundary/index.js +3 -3
- package/build/components/FundButton/FundButton.js +28 -29
- package/build/components/FundButton/index.js +3 -3
- package/build/components/HeaderInfoDialog/HeaderInfoDialog.js +33 -45
- package/build/components/HeaderInfoDialog/index.js +3 -3
- package/build/components/Heading/Heading.js +10 -14
- package/build/components/Heading/index.js +3 -3
- package/build/components/Help/Help.js +22 -21
- package/build/components/Help/index.js +3 -3
- package/build/components/Help/styles.js +2 -2
- package/build/components/Icons/DevsIcons/CommonJS.js +9 -10
- package/build/components/Icons/DevsIcons/ES6Module.js +9 -10
- package/build/components/Icons/DevsIcons/Git.js +9 -10
- package/build/components/Icons/DevsIcons/NodeJS.js +9 -10
- package/build/components/Icons/DevsIcons/TypeScript.js +9 -10
- package/build/components/Icons/DevsIcons/index.js +5 -5
- package/build/components/Icons/Earth.js +11 -11
- package/build/components/Icons/FileBinary.js +4 -4
- package/build/components/Icons/Law.js +4 -4
- package/build/components/Icons/License.js +5 -5
- package/build/components/Icons/License.js.map +1 -1
- package/build/components/Icons/Managers/Npm.js +9 -10
- package/build/components/Icons/Managers/Pnpm.js +9 -10
- package/build/components/Icons/Managers/Yarn.js +9 -10
- package/build/components/Icons/Managers/index.js +3 -3
- package/build/components/Icons/SvgIcon.js +14 -22
- package/build/components/Icons/Time.js +6 -6
- package/build/components/Icons/Version.js +4 -4
- package/build/components/Icons/index.js +8 -8
- package/build/components/Install/Install.js +40 -26
- package/build/components/Install/InstallListItem.js +46 -37
- package/build/components/Install/index.js +3 -3
- package/build/components/Label/Label.js +13 -19
- package/build/components/Label/index.js +3 -3
- package/build/components/Link/Link.js +16 -15
- package/build/components/Link/index.js +3 -3
- package/build/components/Loading/Loading.js +10 -12
- package/build/components/Loading/Spinner/Spinner.js +27 -37
- package/build/components/Loading/Spinner/index.js +3 -3
- package/build/components/Loading/index.js +3 -3
- package/build/components/Loading/styles.js +11 -12
- package/build/components/LoginDialog/LoginDialog.js +44 -79
- package/build/components/LoginDialog/LoginDialogCloseButton.js +20 -19
- package/build/components/LoginDialog/LoginDialogForm.js +40 -39
- package/build/components/LoginDialog/LoginDialogFormError.js +26 -28
- package/build/components/LoginDialog/LoginDialogHeader.js +29 -29
- package/build/components/LoginDialog/index.js +3 -3
- package/build/components/Logo/Logo.js +35 -36
- package/build/components/Logo/index.js +3 -3
- package/build/components/MenuItem/MenuItem.js +8 -9
- package/build/components/MenuItem/index.js +3 -3
- package/build/components/NoItems/NoItems.js +10 -21
- package/build/components/NoItems/index.js +3 -3
- package/build/components/NotFound/NotFound.js +24 -25
- package/build/components/NotFound/index.js +3 -3
- package/build/components/Package/Package.js +108 -146
- package/build/components/Package/Tag/Tag.js +6 -7
- package/build/components/Package/Tag/index.js +3 -3
- package/build/components/Package/Tag/styles.js +2 -2
- package/build/components/Package/index.js +5 -6
- package/build/components/Package/styles.js +65 -70
- package/build/components/PackageList/PackageList.js +56 -52
- package/build/components/PackageList/index.js +3 -3
- package/build/components/RawViewer/RawViewer.js +23 -22
- package/build/components/RawViewer/index.js +3 -3
- package/build/components/Readme/Readme.js +21 -21
- package/build/components/Readme/Readme.js.map +1 -1
- package/build/components/Readme/Readme.spec.js +6 -6
- package/build/components/Readme/Readme.spec.js.map +1 -1
- package/build/components/Readme/index.js +3 -3
- package/build/components/Readme/utils.js +7 -8
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.js +14 -14
- package/build/components/RegistryInfoDialog/index.js +3 -3
- package/build/components/RegistryInfoDialog/styles.js +17 -19
- package/build/components/Repository/Repository.js +37 -36
- package/build/components/Repository/index.js +3 -3
- package/build/components/Search/AutoComplete/AutoComplete.js +26 -35
- package/build/components/Search/AutoComplete/index.js +3 -3
- package/build/components/Search/AutoComplete/styles.js +15 -16
- package/build/components/Search/Search.js +54 -54
- package/build/components/Search/SearchItem.js +56 -64
- package/build/components/Search/index.js +3 -3
- package/build/components/Search/styles.js +16 -17
- package/build/components/SettingsMenu/SettingsMenu.js +68 -0
- package/build/components/SettingsMenu/index.js +14 -0
- package/build/components/SideBarTittle/SideBarTittle.js +33 -31
- package/build/components/SideBarTittle/index.js +3 -3
- package/build/components/SideBarTittle/utils.js +4 -4
- package/build/components/TextField/TextField.js +16 -24
- package/build/components/TextField/index.js +3 -3
- package/build/components/UpLinks/UpLinks.js +18 -16
- package/build/components/UpLinks/index.js +3 -3
- package/build/components/UpLinks/styles.js +20 -22
- package/build/components/Versions/HistoryList.js +25 -25
- package/build/components/Versions/TagList.js +19 -22
- package/build/components/Versions/Versions.js +21 -20
- package/build/components/Versions/index.js +3 -3
- package/build/components/Versions/styles.js +19 -21
- package/build/hooks/index.js +5 -5
- package/build/hooks/useLocalStorage.js +18 -27
- package/build/hooks/useOnClickOutside.js +5 -5
- package/build/index.js +104 -97
- package/build/layouts/Version/Version.js +8 -8
- package/build/layouts/Version/index.js +3 -3
- package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js +18 -31
- package/build/providers/AppConfigurationProvider/index.js +5 -6
- package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js +38 -0
- package/build/providers/PersistenceSettingProvider/index.js +21 -0
- package/build/providers/TranslatorProvider/TranslatorProvider.js +26 -49
- package/build/providers/TranslatorProvider/TranslatorProvider.spec.js +21 -19
- package/build/providers/TranslatorProvider/index.js +6 -7
- package/build/providers/VersionProvider/VersionProvider.js +32 -34
- package/build/providers/VersionProvider/index.js +5 -6
- package/build/providers/index.js +3 -3
- package/build/sections/Detail/ContainerContent.js +21 -32
- package/build/sections/Detail/Detail.js +18 -27
- package/build/sections/Detail/ReadmeSection.js +7 -6
- package/build/sections/Detail/Tabs.js +16 -14
- package/build/sections/Detail/index.js +3 -3
- package/build/sections/Footer/Footer.js +54 -56
- package/build/sections/Footer/index.js +3 -3
- package/build/sections/Footer/styles.js +41 -47
- package/build/sections/Header/Header.js +36 -70
- package/build/sections/Header/HeaderGreetings.js +10 -8
- package/build/sections/Header/HeaderLeft.js +11 -12
- package/build/sections/Header/HeaderMenu.js +18 -17
- package/build/sections/Header/HeaderRight.js +41 -51
- package/build/sections/Header/HeaderSettingsDialog.js +48 -58
- package/build/sections/Header/HeaderToolTip.js +10 -11
- package/build/sections/Header/HeaderToolTipIcon.js +19 -19
- package/build/sections/Header/LanguageSwitch.js +51 -56
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js +72 -71
- package/build/sections/Header/RegistryInfoContent/index.js +3 -3
- package/build/sections/Header/RegistryInfoContent/styles.js +13 -16
- package/build/sections/Header/RegistryInfoDialog/RegistryInfoDialog.js +14 -14
- package/build/sections/Header/RegistryInfoDialog/index.js +3 -3
- package/build/sections/Header/RegistryInfoDialog/styles.js +17 -19
- package/build/sections/Header/index.js +3 -3
- package/build/sections/Header/styles.js +35 -38
- package/build/sections/Home/Home.js +11 -14
- package/build/sections/Home/index.js +3 -3
- package/build/sections/SideBar/Sidebar.js +38 -54
- package/build/sections/SideBar/index.js +3 -3
- package/build/sections/index.js +5 -5
- package/build/src/components/ActionBar/ActionBar.stories.d.ts +11 -6
- package/build/src/components/Dependencies/Dependencies.stories.d.ts +8 -6
- package/build/src/components/FundButton/FundButton.stories.d.ts +7 -5
- package/build/src/components/Install/Install.stories.d.ts +9 -5
- package/build/src/components/NoItems/NoItems.d.ts +0 -1
- package/build/src/components/Repository/Repository.stories.d.ts +8 -6
- package/build/src/components/SettingsMenu/SettingsMenu.d.ts +6 -0
- package/build/src/components/SettingsMenu/index.d.ts +1 -0
- package/build/src/components/SideBarTittle/SideBarTittle.stories.d.ts +9 -0
- package/build/src/components/Versions/types.d.ts +0 -2
- package/build/src/index.d.ts +1 -0
- package/build/src/layouts/Version/Version.stories.d.ts +7 -6
- package/build/src/providers/PersistenceSettingProvider/PersistenceSettingProvider.d.ts +6 -0
- package/build/src/providers/PersistenceSettingProvider/index.d.ts +1 -0
- package/build/src/providers/VersionProvider/VersionProvider.d.ts +0 -2
- package/build/store/api.js +35 -52
- package/build/store/index.js +9 -9
- package/build/store/models/configuration.js +12 -32
- package/build/store/models/download.js +22 -44
- package/build/store/models/index.js +1 -1
- package/build/store/models/login.js +55 -77
- package/build/store/models/manifest.js +52 -76
- package/build/store/models/packages.js +22 -49
- package/build/store/models/search.js +59 -85
- package/build/store/storage.js +5 -5
- package/build/store/store.js +3 -3
- package/build/test/i18n-config.js +5 -5
- package/build/test/test-react-testing-library.js +19 -24
- package/build/utils/__partials__/packageMeta.js +1 -1
- package/build/utils/cli-utils.js +27 -20
- package/build/utils/index.js +10 -11
- package/build/utils/loadable.js +9 -12
- package/build/utils/routes.js +1 -1
- package/build/utils/url.js +9 -9
- package/build/utils/utils.js +18 -22
- package/package.json +5 -5
- package/src/components/ActionBar/ActionBar.stories.tsx +60 -46
- package/src/components/Author/Author.stories.tsx +1 -1
- package/src/components/CopyClipboard/CopyToClipBoard.stories.tsx +1 -1
- package/src/components/CopyClipboard/CopyToClipBoard.tsx +2 -2
- package/src/components/Dependencies/Dependencies.stories.tsx +151 -51
- package/src/components/Dependencies/Dependencies.tsx +61 -51
- package/src/components/Deprecated/Deprecated.stories.tsx +1 -1
- package/src/components/Developers/Developers.stories.tsx +1 -1
- package/src/components/Distribution/Dist.stories.tsx +1 -1
- package/src/components/Engines/Engines.stories.tsx +1 -1
- package/src/components/FundButton/FundButton.stories.tsx +48 -17
- package/src/components/Help/Help.stories.tsx +1 -1
- package/src/components/Icons/Icons.stories.tsx +1 -1
- package/src/components/Install/Install.stories.tsx +79 -26
- package/src/components/Install/Install.tsx +28 -14
- package/src/components/Install/InstallListItem.tsx +24 -8
- package/src/components/Loading/Loading.stories.tsx +1 -1
- package/src/components/LoginDialog/LoginDialog.stories.tsx +1 -1
- package/src/components/NoItems/NoItems.stories.tsx +1 -1
- package/src/components/NoItems/NoItems.tsx +5 -6
- package/src/components/Repository/Repository.stories.tsx +39 -12
- package/src/components/Repository/Repository.tsx +2 -4
- package/src/components/Search/Search.stories.tsx +1 -1
- package/src/components/SettingsMenu/SettingsMenu.tsx +67 -0
- package/src/components/SettingsMenu/index.ts +1 -0
- package/src/components/SideBarTittle/SideBarTittle.stories.tsx +68 -0
- package/src/components/UpLinks/Uplinks.stories.tsx +1 -1
- package/src/components/Versions/types.ts +0 -2
- package/src/index.ts +2 -0
- package/src/layouts/Version/Version.stories.tsx +35 -20
- package/src/providers/AppConfigurationProvider/AppConfigurationProvider.tsx +0 -1
- package/src/providers/PersistenceSettingProvider/PersistenceSettingProvider.tsx +57 -0
- package/src/providers/PersistenceSettingProvider/index.ts +1 -0
- package/src/providers/VersionProvider/VersionProvider.tsx +0 -2
- package/src/sections/Detail/Detail.stories.tsx +1 -1
- package/src/sections/Header/Header.stories.tsx +1 -1
- package/src/sections/Home/Home.stories.tsx +1 -1
- package/src/sections/SideBar/Sidebar.stories.tsx +1 -1
- package/src/sections/SideBar/Sidebar.test.tsx +0 -1
- package/src/test/test-react-testing-library.tsx +17 -12
- package/src/utils/url.test.ts +4 -0
- package/src/utils/url.ts +1 -1
|
@@ -7,110 +7,84 @@ exports.search = void 0;
|
|
|
7
7
|
var _core = require("@rematch/core");
|
|
8
8
|
var _orderBy = _interopRequireDefault(require("lodash/orderBy"));
|
|
9
9
|
var _api = _interopRequireDefault(require("../api"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
11
|
-
|
|
12
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
13
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
14
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
16
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
18
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
19
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
20
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
21
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
25
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
26
|
-
var CONSTANTS = {
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
const CONSTANTS = {
|
|
27
12
|
API_DELAY: 300,
|
|
28
13
|
ABORT_ERROR: 'AbortError'
|
|
29
14
|
};
|
|
30
|
-
|
|
15
|
+
const search = (0, _core.createModel)()({
|
|
31
16
|
state: {
|
|
32
17
|
suggestions: [],
|
|
33
18
|
controller: []
|
|
34
19
|
},
|
|
35
20
|
reducers: {
|
|
36
|
-
clearRequestQueue
|
|
37
|
-
|
|
38
|
-
controllers.forEach(
|
|
21
|
+
clearRequestQueue(state) {
|
|
22
|
+
const controllers = state.controller;
|
|
23
|
+
controllers.forEach(request => {
|
|
39
24
|
request === null || request === void 0 ? void 0 : request.abort();
|
|
40
25
|
});
|
|
41
|
-
return
|
|
26
|
+
return {
|
|
27
|
+
...state,
|
|
42
28
|
controller: []
|
|
43
|
-
}
|
|
29
|
+
};
|
|
44
30
|
},
|
|
45
|
-
addControllerToQueue
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
31
|
+
addControllerToQueue(state, {
|
|
32
|
+
controller
|
|
33
|
+
}) {
|
|
34
|
+
const currentControllers = state.controller;
|
|
35
|
+
return {
|
|
36
|
+
...state,
|
|
37
|
+
controller: [...currentControllers, controller]
|
|
38
|
+
};
|
|
51
39
|
},
|
|
52
|
-
setError
|
|
53
|
-
return
|
|
40
|
+
setError(state) {
|
|
41
|
+
return {
|
|
42
|
+
...state,
|
|
54
43
|
isError: true
|
|
55
|
-
}
|
|
44
|
+
};
|
|
56
45
|
},
|
|
57
|
-
saveSearch
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
46
|
+
saveSearch(state, {
|
|
47
|
+
suggestions
|
|
48
|
+
}) {
|
|
49
|
+
return {
|
|
50
|
+
...state,
|
|
51
|
+
suggestions,
|
|
61
52
|
isError: null
|
|
62
|
-
}
|
|
53
|
+
};
|
|
63
54
|
}
|
|
64
55
|
},
|
|
65
|
-
effects:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
break;
|
|
95
|
-
case 13:
|
|
96
|
-
_context.prev = 13;
|
|
97
|
-
_context.t0 = _context["catch"](2);
|
|
98
|
-
if (_context.t0.name === CONSTANTS.ABORT_ERROR) {
|
|
99
|
-
dispatch.search.saveSearch({
|
|
100
|
-
suggestions: []
|
|
101
|
-
});
|
|
102
|
-
} else {
|
|
103
|
-
dispatch.search.setError();
|
|
104
|
-
}
|
|
105
|
-
case 16:
|
|
106
|
-
case "end":
|
|
107
|
-
return _context.stop();
|
|
108
|
-
}
|
|
109
|
-
}, _callee, null, [[2, 13]]);
|
|
110
|
-
}))();
|
|
56
|
+
effects: dispatch => ({
|
|
57
|
+
async getSuggestions({
|
|
58
|
+
value
|
|
59
|
+
}, state) {
|
|
60
|
+
const basePath = state.configuration.config.base;
|
|
61
|
+
try {
|
|
62
|
+
const controller = new window.AbortController();
|
|
63
|
+
dispatch.search.addControllerToQueue({
|
|
64
|
+
controller
|
|
65
|
+
});
|
|
66
|
+
const signal = controller.signal;
|
|
67
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility
|
|
68
|
+
// FUTURE: signal is not well supported for IE and Samsung Browser
|
|
69
|
+
const suggestions = await _api.default.request(`${basePath}-/verdaccio/data/search/${encodeURIComponent(value)}`, 'GET', {
|
|
70
|
+
signal,
|
|
71
|
+
headers: {}
|
|
72
|
+
});
|
|
73
|
+
const orderedSuggestions = (0, _orderBy.default)(suggestions, ['verdaccioPrivate'], ['desc']);
|
|
74
|
+
dispatch.search.saveSearch({
|
|
75
|
+
suggestions: orderedSuggestions
|
|
76
|
+
});
|
|
77
|
+
} catch (error) {
|
|
78
|
+
if (error.name === CONSTANTS.ABORT_ERROR) {
|
|
79
|
+
dispatch.search.saveSearch({
|
|
80
|
+
suggestions: []
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
83
|
+
dispatch.search.setError();
|
|
84
|
+
}
|
|
111
85
|
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
86
|
+
}
|
|
87
|
+
})
|
|
114
88
|
});
|
|
115
89
|
exports.search = search;
|
|
116
90
|
//# sourceMappingURL=search.js.map
|
package/build/store/storage.js
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var _localstorageMemory = _interopRequireDefault(require("localstorage-memory"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
9
|
-
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
let storage;
|
|
10
10
|
try {
|
|
11
11
|
localStorage.setItem('__TEST__', '');
|
|
12
12
|
localStorage.removeItem('__TEST__');
|
|
13
13
|
storage = localStorage;
|
|
14
14
|
} catch (err) {
|
|
15
|
-
storage = _localstorageMemory
|
|
15
|
+
storage = _localstorageMemory.default;
|
|
16
16
|
}
|
|
17
17
|
var _default = storage;
|
|
18
|
-
exports
|
|
18
|
+
exports.default = _default;
|
|
19
19
|
//# sourceMappingURL=storage.js.map
|
package/build/store/store.js
CHANGED
|
@@ -7,10 +7,10 @@ exports.store = void 0;
|
|
|
7
7
|
var _core = require("@rematch/core");
|
|
8
8
|
var _loading = _interopRequireDefault(require("@rematch/loading"));
|
|
9
9
|
var _models = require("./models");
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
11
|
-
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
const store = (0, _core.init)({
|
|
12
12
|
models: _models.models,
|
|
13
|
-
plugins: [(0, _loading
|
|
13
|
+
plugins: [(0, _loading.default)()]
|
|
14
14
|
});
|
|
15
15
|
exports.store = store;
|
|
16
16
|
//# sourceMappingURL=store.js.map
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
var _i18next = _interopRequireDefault(require("i18next"));
|
|
8
8
|
var _reactI18next = require("react-i18next");
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
10
|
-
_i18next
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
_i18next.default.use(_reactI18next.initReactI18next).init({
|
|
11
11
|
lng: 'en-US',
|
|
12
12
|
whitelist: ['en-US'],
|
|
13
13
|
load: 'currentOnly',
|
|
@@ -21,6 +21,6 @@ _i18next["default"].use(_reactI18next.initReactI18next).init({
|
|
|
21
21
|
escapeValue: false // react already safes from xss
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
var _default = _i18next
|
|
25
|
-
exports
|
|
24
|
+
var _default = _i18next.default;
|
|
25
|
+
exports.default = _default;
|
|
26
26
|
//# sourceMappingURL=i18n-config.js.map
|
|
@@ -17,7 +17,7 @@ Object.keys(_react).forEach(function (key) {
|
|
|
17
17
|
if (key in exports && exports[key] === _react[key]) return;
|
|
18
18
|
Object.defineProperty(exports, key, {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _react[key];
|
|
22
22
|
}
|
|
23
23
|
});
|
|
@@ -27,32 +27,27 @@ var _reactI18next = require("react-i18next");
|
|
|
27
27
|
var _reactRedux = require("react-redux");
|
|
28
28
|
var _Theme = require("../Theme");
|
|
29
29
|
var _AppConfigurationProvider = _interopRequireDefault(require("../providers/AppConfigurationProvider"));
|
|
30
|
+
var _PersistenceSettingProvider = _interopRequireDefault(require("../providers/PersistenceSettingProvider"));
|
|
30
31
|
var _i18nConfig = _interopRequireDefault(require("./i18n-config"));
|
|
31
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
};
|
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
+
const renderWithStore = (ui, store) => (0, _react.render)(ui, {
|
|
34
|
+
wrapper: ({
|
|
35
|
+
children
|
|
36
|
+
}) => /*#__PURE__*/_react2.default.createElement(_reactRedux.Provider, {
|
|
37
|
+
store: store
|
|
38
|
+
}, /*#__PURE__*/_react2.default.createElement(_PersistenceSettingProvider.default, null, /*#__PURE__*/_react2.default.createElement(_AppConfigurationProvider.default, null, /*#__PURE__*/_react2.default.createElement(_styles.StyledEngineProvider, {
|
|
39
|
+
injectFirst: true
|
|
40
|
+
}, /*#__PURE__*/_react2.default.createElement(_Theme.ThemeProvider, null, /*#__PURE__*/_react2.default.createElement(_reactI18next.I18nextProvider, {
|
|
41
|
+
i18n: _i18nConfig.default
|
|
42
|
+
}, children))))))
|
|
43
|
+
});
|
|
46
44
|
exports.renderWithStore = renderWithStore;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
options[_key - 1] = arguments[_key];
|
|
50
|
-
}
|
|
51
|
-
return _react.render.apply(void 0, [/*#__PURE__*/_react2["default"].createElement(_AppConfigurationProvider["default"], null, /*#__PURE__*/_react2["default"].createElement(_styles.StyledEngineProvider, {
|
|
45
|
+
const customRender = (node, ...options) => {
|
|
46
|
+
return (0, _react.render)( /*#__PURE__*/_react2.default.createElement(_AppConfigurationProvider.default, null, /*#__PURE__*/_react2.default.createElement(_PersistenceSettingProvider.default, null, /*#__PURE__*/_react2.default.createElement(_styles.StyledEngineProvider, {
|
|
52
47
|
injectFirst: true
|
|
53
|
-
}, /*#__PURE__*/_react2
|
|
54
|
-
i18n: _i18nConfig
|
|
55
|
-
}, node))))
|
|
48
|
+
}, /*#__PURE__*/_react2.default.createElement(_Theme.ThemeProvider, null, /*#__PURE__*/_react2.default.createElement(_reactI18next.I18nextProvider, {
|
|
49
|
+
i18n: _i18nConfig.default
|
|
50
|
+
}, node))))), ...options);
|
|
56
51
|
};
|
|
57
52
|
exports.customRender = exports.render = customRender;
|
|
58
53
|
//# sourceMappingURL=test-react-testing-library.js.map
|
package/build/utils/cli-utils.js
CHANGED
|
@@ -8,35 +8,42 @@ exports.getCLIChangePassword = getCLIChangePassword;
|
|
|
8
8
|
exports.getCLISBerryYamlRegistry = getCLISBerryYamlRegistry;
|
|
9
9
|
exports.getCLISetConfigRegistry = getCLISetConfigRegistry;
|
|
10
10
|
exports.getCLISetRegistry = getCLISetRegistry;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
};
|
|
11
|
+
const copyToClipBoardUtility = str => event => {
|
|
12
|
+
event.preventDefault();
|
|
13
|
+
const node = document.createElement('div');
|
|
14
|
+
node.innerText = str;
|
|
15
|
+
if (document.body) {
|
|
16
|
+
document.body.appendChild(node);
|
|
17
|
+
const range = document.createRange();
|
|
18
|
+
const selection = window.getSelection();
|
|
19
|
+
range.selectNodeContents(node);
|
|
20
|
+
selection.removeAllRanges();
|
|
21
|
+
selection.addRange(range);
|
|
22
|
+
document.execCommand('copy');
|
|
23
|
+
document.body.removeChild(node);
|
|
24
|
+
}
|
|
27
25
|
};
|
|
28
26
|
exports.copyToClipBoardUtility = copyToClipBoardUtility;
|
|
29
27
|
function getCLISetConfigRegistry(command, scope, registryUrl) {
|
|
30
28
|
// if there is a scope defined there needs to be a ":" separator between the scope and the registry
|
|
31
|
-
return
|
|
29
|
+
return `${command} ${scope ? `${scope}:` : ''}registry ${registryUrl}`;
|
|
32
30
|
}
|
|
33
31
|
function getCLISetRegistry(command, registryUrl) {
|
|
34
|
-
return
|
|
32
|
+
return `${command} --registry ${registryUrl}`;
|
|
35
33
|
}
|
|
36
34
|
function getCLIChangePassword(command, registryUrl) {
|
|
37
|
-
return
|
|
35
|
+
return `${command} profile set password --registry ${registryUrl}`;
|
|
38
36
|
}
|
|
39
37
|
function getCLISBerryYamlRegistry(scope, registryUrl) {
|
|
40
|
-
return !scope ?
|
|
38
|
+
return !scope ? `// .yarnrc.yml
|
|
39
|
+
npmRegistryServer: "${registryUrl}"
|
|
40
|
+
unsafeHttpWhitelist:
|
|
41
|
+
- ${new URL(registryUrl).host}` : `
|
|
42
|
+
// .yarnrc.yml
|
|
43
|
+
npmRegistryServer: "${registryUrl}"
|
|
44
|
+
npmScopes:
|
|
45
|
+
${scope.replace('@', '')}:
|
|
46
|
+
npmRegistryServer: ${registryUrl}
|
|
47
|
+
npmPublishRegistry: ${registryUrl}`;
|
|
41
48
|
}
|
|
42
49
|
//# sourceMappingURL=cli-utils.js.map
|
package/build/utils/index.js
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
Object.defineProperty(exports, "Route", {
|
|
8
7
|
enumerable: true,
|
|
9
|
-
get: function
|
|
8
|
+
get: function () {
|
|
10
9
|
return _routes.Route;
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
12
|
Object.defineProperty(exports, "getCLIChangePassword", {
|
|
14
13
|
enumerable: true,
|
|
15
|
-
get: function
|
|
14
|
+
get: function () {
|
|
16
15
|
return _cliUtils.getCLIChangePassword;
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
Object.defineProperty(exports, "getCLISBerryYamlRegistry", {
|
|
20
19
|
enumerable: true,
|
|
21
|
-
get: function
|
|
20
|
+
get: function () {
|
|
22
21
|
return _cliUtils.getCLISBerryYamlRegistry;
|
|
23
22
|
}
|
|
24
23
|
});
|
|
25
24
|
Object.defineProperty(exports, "getCLISetConfigRegistry", {
|
|
26
25
|
enumerable: true,
|
|
27
|
-
get: function
|
|
26
|
+
get: function () {
|
|
28
27
|
return _cliUtils.getCLISetConfigRegistry;
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
Object.defineProperty(exports, "getCLISetRegistry", {
|
|
32
31
|
enumerable: true,
|
|
33
|
-
get: function
|
|
32
|
+
get: function () {
|
|
34
33
|
return _cliUtils.getCLISetRegistry;
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
Object.defineProperty(exports, "loadable", {
|
|
38
37
|
enumerable: true,
|
|
39
|
-
get: function
|
|
40
|
-
return _loadable
|
|
38
|
+
get: function () {
|
|
39
|
+
return _loadable.default;
|
|
41
40
|
}
|
|
42
41
|
});
|
|
43
42
|
exports.utils = exports.url = void 0;
|
|
@@ -48,7 +47,7 @@ exports.utils = _utils;
|
|
|
48
47
|
var _cliUtils = require("./cli-utils");
|
|
49
48
|
var _loadable = _interopRequireDefault(require("./loadable"));
|
|
50
49
|
var _routes = require("./routes");
|
|
51
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
52
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
53
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
50
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
51
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
52
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
54
53
|
//# sourceMappingURL=index.js.map
|
package/build/utils/loadable.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports
|
|
6
|
+
exports.default = void 0;
|
|
8
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
10
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
10
|
/* eslint-disable verdaccio/jsx-spread */
|
|
12
11
|
/**
|
|
13
12
|
* With the combination of a bundler, enable to code split a package.
|
|
@@ -18,13 +17,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
18
17
|
```
|
|
19
18
|
@category HOC
|
|
20
19
|
*/
|
|
21
|
-
var _default =
|
|
22
|
-
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, /*#__PURE__*/_react["default"].createElement(TargetComponent, props));
|
|
27
|
-
};
|
|
20
|
+
var _default = importCallback => {
|
|
21
|
+
const TargetComponent = /*#__PURE__*/(0, _react.lazy)(importCallback);
|
|
22
|
+
return props => /*#__PURE__*/_react.default.createElement(_react.Suspense, {
|
|
23
|
+
fallback: null
|
|
24
|
+
}, /*#__PURE__*/_react.default.createElement(TargetComponent, props));
|
|
28
25
|
};
|
|
29
|
-
exports
|
|
26
|
+
exports.default = _default;
|
|
30
27
|
//# sourceMappingURL=loadable.js.map
|
package/build/utils/routes.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Route = void 0;
|
|
7
|
-
|
|
7
|
+
let Route = /*#__PURE__*/function (Route) {
|
|
8
8
|
Route["ROOT"] = "/";
|
|
9
9
|
Route["SCOPE_PACKAGE"] = "/-/web/detail/@:scope/:package";
|
|
10
10
|
Route["SCOPE_PACKAGE_VERSION"] = "/-/web/detail/@:scope/:package/v/:version";
|
package/build/utils/url.js
CHANGED
|
@@ -9,29 +9,29 @@ exports.isEmail = isEmail;
|
|
|
9
9
|
exports.isURL = isURL;
|
|
10
10
|
var _isEmail = _interopRequireDefault(require("validator/lib/isEmail"));
|
|
11
11
|
var _isURL = _interopRequireDefault(require("validator/lib/isURL"));
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : {
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function isURL(url) {
|
|
14
|
-
return (0, _isURL
|
|
15
|
-
protocols: ['http', 'https', 'git+https'],
|
|
14
|
+
return (0, _isURL.default)(url || '', {
|
|
15
|
+
protocols: ['http', 'https', 'git+https', 'git'],
|
|
16
16
|
require_protocol: true,
|
|
17
17
|
require_tld: false
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function isEmail(email) {
|
|
21
|
-
return (0, _isEmail
|
|
21
|
+
return (0, _isEmail.default)(email || '');
|
|
22
22
|
}
|
|
23
23
|
function extractFileName(url) {
|
|
24
24
|
return url.substring(url.lastIndexOf('/') + 1);
|
|
25
25
|
}
|
|
26
26
|
function blobToFile(blob, fileName) {
|
|
27
27
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
-
|
|
28
|
+
const b = blob;
|
|
29
29
|
b.lastModified = Date.now();
|
|
30
30
|
b.name = fileName;
|
|
31
31
|
return b;
|
|
32
32
|
}
|
|
33
33
|
function downloadFile(fileStream, fileName) {
|
|
34
|
-
|
|
34
|
+
let file;
|
|
35
35
|
// File constructor is not supported by Edge
|
|
36
36
|
// https://developer.mozilla.org/en-US/docs/Web/API/File#Browser_compatibility
|
|
37
37
|
// @ts-ignore. Please see: https://github.com/microsoft/TypeScript/issues/33792
|
|
@@ -46,8 +46,8 @@ function downloadFile(fileStream, fileName) {
|
|
|
46
46
|
lastModified: Date.now()
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
const objectURL = URL.createObjectURL(file);
|
|
50
|
+
const fileLink = document.createElement('a');
|
|
51
51
|
fileLink.href = objectURL;
|
|
52
52
|
fileLink.download = fileName;
|
|
53
53
|
|
|
@@ -56,7 +56,7 @@ function downloadFile(fileStream, fileName) {
|
|
|
56
56
|
document.documentElement.appendChild(fileLink);
|
|
57
57
|
fileLink.click();
|
|
58
58
|
// firefox requires remove the object url
|
|
59
|
-
setTimeout(
|
|
59
|
+
setTimeout(() => {
|
|
60
60
|
URL.revokeObjectURL(objectURL);
|
|
61
61
|
document.documentElement.removeChild(fileLink);
|
|
62
62
|
}, 150);
|