function assertObjectType(name, value, vm) { if (!isPlainObject(value)) { warn( `Invalid value for option "${name}": expected an Object, ` + `but got ${toRawType(value)}.`, vm ) } }
onRendererEnd(renderer: RendererEvent) { const root = this.findRoot(renderer.outputDirectory); if (root === null) { this.application.logger.warn( `[typedoc-markdown-plugin] sidebars.json not written as could not locate VuePress root directory. In order to to implemnent sidebars.json functionality, the output directory must be a child of a 'docs' directory.`, ); return; } this.writeSideBar(renderer, root); }
function checkJson(item) { if (/\.json$/i.test(item.name) && JSON_RE.test(item.value)) { try { JSON.parse(item.value); } catch(e) { message.warn('Warning: the value of ' + item.name + ' can\`t be parsed into json. ' + e.message); } } }
this._asyncFSwrapper.readdir(tcwd).catch(err => { console.warn(err); if (this._noTracking === true && this.dirpath) { // #262 this.setFailedState(); setTimeout(() => { this.readFS(this.dirpath); }, 1000); } else { this.setFailedState(); } })
setTimeout(() => { try { requestAnimationFrame(window.mods.globe._animate); } catch(e) { // We probably got caught in a theme change. Print it out but everything should keep running fine. console.warn(e); } }, 1000 / 30);
triggers.maybeRunTrigger(triggers.Types.afterSave, this.auth, updatedObject, originalObject, this.config, this.context).then(result => { if (result && typeof result === 'object') { this.response.response = result; } }).catch(function (err) { _logger.default.warn('afterSave caught an error', err); })
componentDidMount() { // Initialize Algolia search. // TODO Is this expensive? Should it be deferred until a user is about to search? // eslint-disable-next-line no-undef if (window.docsearch) { window.docsearch(siteConfig.docSearch) } else { console.warn('Search has failed to load and now is being disabled') this.setState({ enabled: false }) } }
async sendCommandToActiveTab(command) { const tabs = await this.tabsQuery({ active: true, currentWindow: true }); if (!tabs.length) { console.warn('No valid tab'); return; } this.dispatch({ type: 'CONTENT_UPLOAD', operation: null }); console.info('Sending message ', command); await this.tabsSendMessage(tabs[0].id, command); }
addGraphQLType(type, throwError = false, ignoreReserved = false, ignoreConnection = false) { if (!ignoreReserved && RESERVED_GRAPHQL_TYPE_NAMES.includes(type.name) || this.graphQLTypes.find(existingType => existingType.name === type.name) || !ignoreConnection && type.name.endsWith('Connection')) { const message = `Type ${type.name} could not be added to the auto schema because it collided with an existing type.`; if (throwError) { throw new Error(message); } this.log.warn(message); return undefined; } this.graphQLTypes.push(type); return type; }
it("should not call disconnected if local", async () => { discoverer.logger.warn.mockClear(); registry.nodes.disconnected.mockClear(); node.available = true; node.local = true; discoverer.checkRemoteNodes(); expect(registry.nodes.disconnected).toBeCalledTimes(0); expect(discoverer.logger.warn).toBeCalledTimes(0); });
directories.forEach((directory) => { logger.info(`Installing dependencies in folder ${directory}`); try { execSync(`cd ${directory} && npm install --unsafe-perm`, { maxBuffer: 10 * 1000 * 1024, // 10Mo of logs allowed for module with big npm install }); } catch (e) { logger.warn(e); } });
dispatchServerAction(action) { if (action.type == null) { console.warn('Undefined action.type', action); } this.dispatch({source: 'SERVER_ACTION', action}); }
this._asyncFSwrapper.readdir(tcwd).catch(err => { console.warn(err); if (this._noTracking === true && this.dirpath) { // #262 this.setFailedState(); setTimeout(() => { this.readFS(this.dirpath); }, 1000); } else { this.setFailedState(); } })
componentDidMount() { // Initialize Algolia search. // TODO Is this expensive? Should it be deferred until a user is about to search? // eslint-disable-next-line no-undef if (window.docsearch) { window.docsearch(siteConfig.docSearch) } else { console.warn('Search has failed to load and now is being disabled') this.setState({ enabled: false }) } }
directories.forEach((directory) => { logger.info(`Installing dependencies in folder ${directory}`); try { execSync(`cd ${directory} && npm install --unsafe-perm`, { maxBuffer: 10 * 1000 * 1024, // 10Mo of logs allowed for module with big npm install }); } catch (e) { logger.warn(e); } });