mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-02-04 05:50:50 +00:00
nhj
more
This commit is contained in:
20
unified-ai-platform/node_modules/@dabh/diagnostics/LICENSE
generated
vendored
Normal file
20
unified-ai-platform/node_modules/@dabh/diagnostics/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Arnout Kazemier, Martijn Swaagman, the Contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
35
unified-ai-platform/node_modules/@dabh/diagnostics/browser/development.js
generated
vendored
Normal file
35
unified-ai-platform/node_modules/@dabh/diagnostics/browser/development.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
var create = require('../diagnostics');
|
||||
|
||||
/**
|
||||
* Create a new diagnostics logger.
|
||||
*
|
||||
* @param {String} namespace The namespace it should enable.
|
||||
* @param {Object} options Additional options.
|
||||
* @returns {Function} The logger.
|
||||
* @public
|
||||
*/
|
||||
var diagnostics = create(function dev(namespace, options) {
|
||||
options = options || {};
|
||||
options.namespace = namespace;
|
||||
options.prod = false;
|
||||
options.dev = true;
|
||||
|
||||
if (!dev.enabled(namespace) && !(options.force || dev.force)) {
|
||||
return dev.nope(options);
|
||||
}
|
||||
|
||||
return dev.yep(options);
|
||||
});
|
||||
|
||||
//
|
||||
// Configure the logger for the given environment.
|
||||
//
|
||||
diagnostics.modify(require('../modifiers/namespace'));
|
||||
diagnostics.use(require('../adapters/localstorage'));
|
||||
diagnostics.use(require('../adapters/hash'));
|
||||
diagnostics.set(require('../logger/console'));
|
||||
|
||||
//
|
||||
// Expose the diagnostics logger.
|
||||
//
|
||||
module.exports = diagnostics;
|
||||
19
unified-ai-platform/node_modules/@dabh/diagnostics/logger/console.js
generated
vendored
Normal file
19
unified-ai-platform/node_modules/@dabh/diagnostics/logger/console.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* An idiot proof logger to be used as default. We've wrapped it in a try/catch
|
||||
* statement to ensure the environments without the `console` API do not crash
|
||||
* as well as an additional fix for ancient browsers like IE8 where the
|
||||
* `console.log` API doesn't have an `apply`, so we need to use the Function's
|
||||
* apply functionality to apply the arguments.
|
||||
*
|
||||
* @param {Object} meta Options of the logger.
|
||||
* @param {Array} messages The actuall message that needs to be logged.
|
||||
* @public
|
||||
*/
|
||||
module.exports = function (meta, messages) {
|
||||
//
|
||||
// So yea. IE8 doesn't have an apply so we need a work around to puke the
|
||||
// arguments in place.
|
||||
//
|
||||
try { Function.prototype.apply.call(console.log, console, messages); }
|
||||
catch (e) {}
|
||||
}
|
||||
Reference in New Issue
Block a user