code
stringlengths 0
56.1M
| repo_name
stringclasses 515
values | path
stringlengths 2
147
| language
stringclasses 447
values | license
stringclasses 7
values | size
int64 0
56.8M
|
---|---|---|---|---|---|
<!DOCTYPE html>
<html lang="en">
<head>
@section('head')
<title>{{ $title or 'Anime is fantabulous!' }}</title>
<meta charset="utf-8">
<meta name="author" content="nixx quality, [email protected]">
<meta name="og:email" content="[email protected]">
<meta name="og:title" content="{{ $title or 'Anime is fantabulous!' }}">
<link href="/octicons/octicons.css" rel="stylesheet">
<link href="/css/style.css" rel="stylesheet">
@show
</head>
<body>
<nav>
@section('nav')
<a href="{{ route('index') }}" rel="index"><span class="octicon octicon-arrow-left"></span> Back to top</a>
@show
</nav>
@section('everything')
<div class="center">
@yield('content')
<footer>
@section('footer')
<p>
Version <a href="https://gitgud.io/nixx/anime.is-fantabulo.us/commit/{{ $version }}" title="see on gitgud" rel="external">{{ $version }}</a>.
Send me an email: <a href="mailto:[email protected]" rel="author">[email protected]</a>
</p>
@show
</footer>
</div>
@show
@if (isset($script))
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="/js/{{ $script }}"></script>
@endif
</body>
</html>
|
nixx/anime.is
|
app/views/layout.blade.php
|
PHP
|
unknown
| 1,255 |
<html>
<head>
<style>
body {
margin: 0;
}
video {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<video controls src="{{ $asseturl }}.webm" type="video/webm" crossorigin="{{ Config::get('app.url') }}">
@if ($video->engtrack)
<track kind="subtitles" label="English" srclang="en" src="{{ $asseturl }}-eng.vtt">
@endif
@if ($video->romtrack)
<track kind="subtitles" label="Japanese (Romaji)" srclang="ja-Latn-alalc97" src="{{ $asseturl }}-rom.vtt">
@endif
</video>
</body>
</html>
|
nixx/anime.is
|
app/views/player.blade.php
|
PHP
|
unknown
| 659 |
@extends('layout-admin', array('title' => 'Admin - New Show', 'active' => 'show.create'))
@section('content')
@if($errors->has())
@foreach($errors->all() as $error)
<div class="alert alert-danger" role="alert">
<strong>バカ! バカ!</strong> {{ $error }}
</div>
@endforeach
<audio src="/bakabaka.ogg" autoplay></audio>
@endif
<h1 class="page-header">New Show</h1>
{{ Form::open(['route' => 'admin.show.store', 'class' => 'form-horizontal']) }}
<fieldset>
<div class="form-group">
{{ Form::label('title', 'Title', ['class' => 'col-md-4 control-label']) }}
<div class="col-md-4">
{{ Form::text('title', null, ['class' => 'form-control input-md', 'required']) }}
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label> {{-- If this isn't here, the button isn't aligned properly --}}
<div class="col-md-4">
{{ Form::submit('Save', ['class' => 'btn btn-success']) }}
</div>
</div>
</fieldset>
{{ Form::close() }}
@stop
|
nixx/anime.is
|
app/views/show/create.blade.php
|
PHP
|
unknown
| 1,236 |
@extends('layout-admin', array('title' => 'Admin - Edit ' . $show->title, 'active' => 'show.edit'))
@section('content')
@if($errors->has())
@foreach($errors->all() as $error)
<div class="alert alert-danger" role="alert">
<strong>バカ! バカ!</strong> {{ $error }}
</div>
@endforeach
<audio src="/bakabaka.ogg" autoplay></audio>
@endif
@if(Session::has('message'))
<div class="alert alert-info" role="alert">
<strong>やった!</strong> {{ Session::get('message') }}
</div>
@endif
<h1 class="page-header">{{ $show->title }}</h1>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th width=50>eng</th>
<th width=50>rom</th>
<th width=50></th>
<th width=50></th>
</tr>
</thead>
<tbody>
@foreach ($show->videos->sort(Video::sorter()) as $video)
<tr>
<td>{{ $video->name }}</td>
<td>{{ $video->engtrack ? "Yes" : "No" }}</td>
<td>{{ $video->romtrack ? "Yes" : "No" }}</td>
<td>{{ link_to_route('admin.show.video.edit', "Edit", [$show->id, $video->id], ['class' => 'btn btn-sm btn-info']) }}</td>
<td>{{ Form::open(['route' => ['admin.show.video.destroy', $show->id, $video->id]]) }}
{{ Form::hidden('_method', 'DELETE') }}
{{ Form::submit('Delete', ['class' => 'btn btn-sm btn-danger']) }}
{{ Form::close() }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<p>{{ link_to_route('admin.show.video.create', 'Add', $show->id, ['class' => 'btn btn-sm btn-success']) }}</p>
<h2 class="sub-header">Edit Show</h2>
{{ Form::model($show, ['route' => ['admin.show.update', $show->id], 'method' => 'PUT', 'class' => 'form-horizontal']) }}
<fieldset>
<div class="form-group">
{{ Form::label('title', 'Title', ['class' => 'col-md-4 control-label']) }}
<div class="col-md-4">
{{ Form::text('title', null, ['class' => 'form-control input-md', 'required']) }}
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label> {{-- If this isn't here, the button isn't aligned properly --}}
<div class="col-md-4">
{{ Form::submit('Save', ['class' => 'btn btn-success']) }}
</div>
</div>
</fieldset>
{{ Form::close() }}
@stop
|
nixx/anime.is
|
app/views/show/edit.blade.php
|
PHP
|
unknown
| 2,789 |
@extends('layout-admin', array('title' => 'Admin', 'active' => 'show.edit'))
@section('content')
<h1 class="page-header">Edit Show</h1>
@if(Session::has('message'))
<div class="alert alert-info" role="alert">
<strong>やった!</strong> {{ Session::get('message') }}
</div>
@endif
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Title</th>
<th width=50></th>
<th width=50></th>
</tr>
</thead>
<tbody>
@foreach ($shows as $show)
<tr>
<td>{{ $show->title }}</td>
<td>{{ link_to_route('admin.show.edit', "Edit", $show->id, ['class' => 'btn btn-sm btn-info']) }}</td>
<td>{{ Form::open(['route' => ['admin.show.destroy', $show->id]]) }}
{{ Form::hidden('_method', 'DELETE') }}
{{ Form::submit('Delete', ['class' => 'btn btn-sm btn-danger']) }}
{{ Form::close() }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@stop
|
nixx/anime.is
|
app/views/show/index.blade.php
|
PHP
|
unknown
| 1,230 |
@extends('layout-admin', array('title' => 'Admin - New Video', 'active' => 'show.edit'))
@section('content')
@if($errors->has())
@foreach($errors->all() as $error)
<div class="alert alert-danger" role="alert">
<strong>バカ! バカ!</strong> {{ $error }}
</div>
@endforeach
<audio src="/bakabaka.ogg" autoplay></audio>
@endif
<h1 class="page-header">New Video</h1>
{{ Form::open(['route' => ['admin.show.video.store', $show->id], 'class' => 'form-horizontal']) }}
<fieldset>
<div class="form-group">
{{ Form::label('name', 'Name', ['class' => 'col-md-4 control-label']) }}
<div class="col-md-4">
{{ Form::text('name', null, ['class' => 'form-control input-md', 'required']) }}
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="tracks">Subtitle Tracks</label>
<div class="col-md-4">
<div class="checkbox">
<label for="engtrack">
{{ Form::checkbox('engtrack', null, true, ['id' => 'engtrack']) }}
English
</label>
</div>
<div class="checkbox">
<label for="romtrack">
{{ Form::checkbox('romtrack', null, true, ['id' => 'romtrack']) }}
Romaji
</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label> {{-- If this isn't here, the button isn't aligned properly --}}
<div class="col-md-4">
{{ Form::submit('Save', ['class' => 'btn btn-success']) }}
</div>
</div>
</fieldset>
{{ Form::close() }}
@stop
|
nixx/anime.is
|
app/views/video/create.blade.php
|
PHP
|
unknown
| 1,943 |
@extends('layout-admin', array('title' => 'Admin - Edit Video', 'active' => 'show.edit'))
@section('content')
@if($errors->has())
@foreach($errors->all() as $error)
<div class="alert alert-danger" role="alert">
<strong>バカ! バカ!</strong> {{ $error }}
</div>
@endforeach
<audio src="/bakabaka.ogg" autoplay></audio>
@endif
<h1 class="page-header">Edit {{ $show->title }} {{ $video->name }}</h1>
{{ Form::model($video, ['route' => ['admin.show.video.update', $show->id, $video->id], 'method' => 'PUT', 'class' => 'form-horizontal']) }}
<fieldset>
<div class="form-group">
{{ Form::label('name', 'Name', ['class' => 'col-md-4 control-label']) }}
<div class="col-md-4">
{{ Form::text('name', null, ['class' => 'form-control input-md', 'required']) }}
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="tracks">Subtitle Tracks</label>
<div class="col-md-4">
<div class="checkbox">
<label for="engtrack">
{{ Form::checkbox('engtrack', null, true, ['id' => 'engtrack']) }}
English
</label>
</div>
<div class="checkbox">
<label for="romtrack">
{{ Form::checkbox('romtrack', null, true, ['id' => 'romtrack']) }}
Romaji
</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label> {{-- If this isn't here, the button isn't aligned properly --}}
<div class="col-md-4">
{{ Form::submit('Save', ['class' => 'btn btn-success']) }}
</div>
</div>
</fieldset>
{{ Form::close() }}
@stop
|
nixx/anime.is
|
app/views/video/edit.blade.php
|
PHP
|
unknown
| 2,020 |
@extends('layout', array('script' => 'watch.js', 'title' => $video->show->title . " " . $video->name))
@section('head')
@parent
<meta name="twitter:card" content="player">
<meta name="twitter:player" content="{{ route('watch.simple', array('show_title' => $video->show->title, 'video_name' => $video->name)) }}">
<meta name="twitter:player:width" content="1280">
<meta name="twitter:player:height" content="720">
<meta name="twitter:image" content="{{ $asseturl }}.jpg">
@stop
@section('everything')
<video autoplay controls src="{{ $asseturl }}.webm" type="video/webm" crossorigin="{{ Config::get('app.url') }}">
@if ($video->engtrack)
<track kind="subtitles" label="English" srclang="en" src="{{ $asseturl }}-eng.vtt">
@endif
@if ($video->romtrack)
<track kind="subtitles" label="Japanese (Romaji)" srclang="ja-Latn-alalc97" src="{{ $asseturl }}-rom.vtt">
@endif
</video>
@stop
|
nixx/anime.is
|
app/views/watch.blade.php
|
PHP
|
unknown
| 927 |
#!/usr/bin/env php
<?php
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/bootstrap/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let's turn on the lights.
| This bootstraps the framework and gets it ready for and then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight these users.
|
*/
$app = require_once __DIR__.'/bootstrap/start.php';
/*
|--------------------------------------------------------------------------
| Load The Artisan Console Application
|--------------------------------------------------------------------------
|
| We'll need to run the script to load and return the Artisan console
| application. We keep this in its own script so that we will load
| the console application independent of running commands which
| will allow us to fire commands from Routes when we want to.
|
*/
$app->setRequestForConsoleEnvironment();
$artisan = Illuminate\Console\Application::start($app);
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$status = $artisan->run();
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running. We will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$app->shutdown();
exit($status);
|
nixx/anime.is
|
artisan
|
none
|
unknown
| 2,452 |
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/
if (file_exists($compiled = __DIR__.'/compiled.php'))
{
require $compiled;
}
/*
|--------------------------------------------------------------------------
| Setup Patchwork UTF-8 Handling
|--------------------------------------------------------------------------
|
| The Patchwork library provides solid handling of UTF-8 strings as well
| as provides replacements for all mb_* and iconv type functions that
| are not available by default in PHP. We'll setup this stuff here.
|
*/
Patchwork\Utf8\Bootup::initMbstring();
/*
|--------------------------------------------------------------------------
| Register The Laravel Auto Loader
|--------------------------------------------------------------------------
|
| We register an auto-loader "behind" the Composer loader that can load
| model classes on the fly, even if the autoload files have not been
| regenerated for the application. We'll add it to the stack here.
|
*/
Illuminate\Support\ClassLoader::register();
/*
|--------------------------------------------------------------------------
| Register The Workbench Loaders
|--------------------------------------------------------------------------
|
| The Laravel workbench provides a convenient place to develop packages
| when working locally. However we will need to load in the Composer
| auto-load files for the packages so that these can be used here.
|
*/
if (is_dir($workbench = __DIR__.'/../workbench'))
{
Illuminate\Workbench\Starter::start($workbench);
}
|
nixx/anime.is
|
bootstrap/autoload.php
|
PHP
|
unknown
| 2,453 |
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application Path
|--------------------------------------------------------------------------
|
| Here we just defined the path to the application directory. Most likely
| you will never need to change this value as the default setup should
| work perfectly fine for the vast majority of all our applications.
|
*/
'app' => __DIR__.'/../app',
/*
|--------------------------------------------------------------------------
| Public Path
|--------------------------------------------------------------------------
|
| The public path contains the assets for your web application, such as
| your JavaScript and CSS files, and also contains the primary entry
| point for web requests into these applications from the outside.
|
*/
'public' => __DIR__.'/../public',
/*
|--------------------------------------------------------------------------
| Base Path
|--------------------------------------------------------------------------
|
| The base path is the root of the Laravel installation. Most likely you
| will not need to change this value. But, if for some wild reason it
| is necessary you will do so here, just proceed with some caution.
|
*/
'base' => __DIR__.'/..',
/*
|--------------------------------------------------------------------------
| Storage Path
|--------------------------------------------------------------------------
|
| The storage path is used by Laravel to store cached Blade views, logs
| and other pieces of information. You may modify the path here when
| you want to change the location of this directory for your apps.
|
*/
'storage' => __DIR__.'/../app/storage',
);
|
nixx/anime.is
|
bootstrap/paths.php
|
PHP
|
unknown
| 1,753 |
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new Illuminate\Foundation\Application;
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name for the host that matches a
| given environment, then we will automatically detect it for you.
|
*/
$env = $app->detectEnvironment(array(
'local' => array('wriggle'),
));
/*
|--------------------------------------------------------------------------
| Bind Paths
|--------------------------------------------------------------------------
|
| Here we are binding the paths configured in paths.php to the app. You
| should not be changing these here. If you need to change these you
| may do so within the paths.php file and they will be bound here.
|
*/
$app->bindInstallPaths(require __DIR__.'/paths.php');
/*
|--------------------------------------------------------------------------
| Load The Application
|--------------------------------------------------------------------------
|
| Here we will load this Illuminate application. We will keep this in a
| separate location so we can isolate the creation of an application
| from the actual running of the application with a given request.
|
*/
$framework = $app['path.base'].
'/vendor/laravel/framework/src';
require $framework.'/Illuminate/Foundation/start.php';
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;
|
nixx/anime.is
|
bootstrap/start.php
|
PHP
|
unknown
| 2,323 |
{
"name": "nixxquality/anime",
"description": "anime.is-fantabulo.us",
"license": "MIT",
"require": {
"laravel/framework": "4.2.*",
"doctrine/dbal": "2.2.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate",
"touch app/database/production.sqlite",
"php artisan migrate:install",
"php artisan migrate --force"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
|
nixx/anime.is
|
composer.json
|
JSON
|
unknown
| 798 |
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "ccb168e4150a05129e796c0d2035b2ee",
"packages": [
{
"name": "classpreloader/classpreloader",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/ClassPreloader/ClassPreloader.git",
"reference": "2c9f3bcbab329570c57339895bd11b5dd3b00877"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/2c9f3bcbab329570c57339895bd11b5dd3b00877",
"reference": "2c9f3bcbab329570c57339895bd11b5dd3b00877",
"shasum": ""
},
"require": {
"nikic/php-parser": "~0.9",
"php": ">=5.3.3",
"symfony/console": "~2.1",
"symfony/filesystem": "~2.1",
"symfony/finder": "~2.1"
},
"bin": [
"classpreloader.php"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-0": {
"ClassPreloader": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case",
"keywords": [
"autoload",
"class",
"preload"
],
"time": "2014-03-12 00:05:31"
},
{
"name": "d11wtq/boris",
"version": "v1.0.10",
"source": {
"type": "git",
"url": "https://github.com/borisrepl/boris.git",
"reference": "31055b15e2d3fe47f31f6aa8e277f8f3fc7eb483"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/borisrepl/boris/zipball/31055b15e2d3fe47f31f6aa8e277f8f3fc7eb483",
"reference": "31055b15e2d3fe47f31f6aa8e277f8f3fc7eb483",
"shasum": ""
},
"require": {
"ext-pcntl": "*",
"ext-posix": "*",
"ext-readline": "*",
"php": ">=5.3.0"
},
"bin": [
"bin/boris"
],
"type": "library",
"autoload": {
"psr-0": {
"Boris": "lib"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A tiny, but robust REPL (Read-Evaluate-Print-Loop) for PHP.",
"time": "2015-03-01 08:05:19"
},
{
"name": "doctrine/common",
"version": "2.2.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common.git",
"reference": "9e13facbacb001d324d71a0f6d25d8d7f12346b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/common/zipball/9e13facbacb001d324d71a0f6d25d8d7f12346b6",
"reference": "9e13facbacb001d324d71a0f6d25d8d7f12346b6",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"type": "library",
"autoload": {
"psr-0": {
"Doctrine\\Common": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL"
],
"authors": [
{
"name": "Jonathan Wage",
"email": "[email protected]",
"homepage": "http://www.jwage.com/",
"role": "Creator"
},
{
"name": "Guilherme Blanco",
"email": "[email protected]",
"homepage": "http://www.instaclick.com"
},
{
"name": "Roman Borschel",
"email": "[email protected]"
},
{
"name": "Benjamin Eberlei",
"email": "[email protected]"
},
{
"name": "Johannes M. Schmitt",
"email": "[email protected]",
"homepage": "http://jmsyst.com",
"role": "Developer of wrapped JMSSerializerBundle"
}
],
"description": "Common Library for Doctrine projects",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"annotations",
"collections",
"eventmanager",
"persistence",
"spl"
],
"time": "2012-08-29 08:04:14"
},
{
"name": "doctrine/dbal",
"version": "2.2.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "ee8f64111d03df2dbf3c106214514fce4a9857ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/ee8f64111d03df2dbf3c106214514fce4a9857ab",
"reference": "ee8f64111d03df2dbf3c106214514fce4a9857ab",
"shasum": ""
},
"require": {
"doctrine/common": ">=2.2.0,<=2.2.99",
"php": ">=5.3.2"
},
"type": "library",
"autoload": {
"psr-0": {
"Doctrine\\DBAL": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL"
],
"authors": [
{
"name": "Jonathan Wage",
"email": "[email protected]",
"homepage": "http://www.jwage.com/",
"role": "Creator"
},
{
"name": "Guilherme Blanco",
"email": "[email protected]",
"homepage": "http://www.instaclick.com"
},
{
"name": "Roman Borschel",
"email": "[email protected]"
},
{
"name": "Benjamin Eberlei",
"email": "[email protected]"
}
],
"description": "Database Abstraction Layer",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"database",
"dbal",
"persistence",
"queryobject"
],
"time": "2012-04-13 07:56:12"
},
{
"name": "filp/whoops",
"version": "1.1.7",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
"reference": "72538eeb70bbfb11964412a3d098d109efd012f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/72538eeb70bbfb11964412a3d098d109efd012f7",
"reference": "72538eeb70bbfb11964412a3d098d109efd012f7",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"mockery/mockery": "0.9.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"autoload": {
"psr-0": {
"Whoops": "src/"
},
"classmap": [
"src/deprecated"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Filipe Dobreira",
"homepage": "https://github.com/filp",
"role": "Developer"
}
],
"description": "php error handling for cool kids",
"homepage": "https://github.com/filp/whoops",
"keywords": [
"error",
"exception",
"handling",
"library",
"silex-provider",
"whoops",
"zf2"
],
"time": "2015-06-29 05:42:04"
},
{
"name": "ircmaxell/password-compat",
"version": "v1.0.4",
"source": {
"type": "git",
"url": "https://github.com/ircmaxell/password_compat.git",
"reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c",
"reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c",
"shasum": ""
},
"require-dev": {
"phpunit/phpunit": "4.*"
},
"type": "library",
"autoload": {
"files": [
"lib/password.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Anthony Ferrara",
"email": "[email protected]",
"homepage": "http://blog.ircmaxell.com"
}
],
"description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash",
"homepage": "https://github.com/ircmaxell/password_compat",
"keywords": [
"hashing",
"password"
],
"time": "2014-11-20 16:49:30"
},
{
"name": "jeremeamia/SuperClosure",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/jeremeamia/super_closure.git",
"reference": "4d89ca74994feab128ea46d5b3add92e6cb84554"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/4d89ca74994feab128ea46d5b3add92e6cb84554",
"reference": "4d89ca74994feab128ea46d5b3add92e6cb84554",
"shasum": ""
},
"require": {
"nikic/php-parser": "~0.9",
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "~3.7"
},
"type": "library",
"autoload": {
"psr-0": {
"Jeremeamia\\SuperClosure": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jeremy Lindblom"
}
],
"description": "Doing interesting things with closures like serialization.",
"homepage": "https://github.com/jeremeamia/super_closure",
"keywords": [
"closure",
"function",
"parser",
"serializable",
"serialize",
"tokenizer"
],
"time": "2015-01-10 01:09:28"
},
{
"name": "laravel/framework",
"version": "v4.2.17",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "3359de6d6cd322e8a1b251c2f8d9dd42a3e4e232"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/3359de6d6cd322e8a1b251c2f8d9dd42a3e4e232",
"reference": "3359de6d6cd322e8a1b251c2f8d9dd42a3e4e232",
"shasum": ""
},
"require": {
"classpreloader/classpreloader": "~1.0.2",
"d11wtq/boris": "~1.0",
"filp/whoops": "1.1.*",
"ircmaxell/password-compat": "~1.0",
"jeremeamia/superclosure": "~1.0.1",
"monolog/monolog": "~1.6",
"nesbot/carbon": "~1.0",
"patchwork/utf8": "~1.1",
"php": ">=5.4.0",
"phpseclib/phpseclib": "0.3.*",
"predis/predis": "0.8.*",
"stack/builder": "~1.0",
"swiftmailer/swiftmailer": "~5.1",
"symfony/browser-kit": "2.5.*",
"symfony/console": "2.5.*",
"symfony/css-selector": "2.5.*",
"symfony/debug": "2.5.*",
"symfony/dom-crawler": "2.5.*",
"symfony/finder": "2.5.*",
"symfony/http-foundation": "2.5.*",
"symfony/http-kernel": "2.5.*",
"symfony/process": "2.5.*",
"symfony/routing": "2.5.*",
"symfony/security-core": "2.5.*",
"symfony/translation": "2.5.*"
},
"replace": {
"illuminate/auth": "self.version",
"illuminate/cache": "self.version",
"illuminate/config": "self.version",
"illuminate/console": "self.version",
"illuminate/container": "self.version",
"illuminate/cookie": "self.version",
"illuminate/database": "self.version",
"illuminate/encryption": "self.version",
"illuminate/events": "self.version",
"illuminate/exception": "self.version",
"illuminate/filesystem": "self.version",
"illuminate/foundation": "self.version",
"illuminate/hashing": "self.version",
"illuminate/html": "self.version",
"illuminate/http": "self.version",
"illuminate/log": "self.version",
"illuminate/mail": "self.version",
"illuminate/pagination": "self.version",
"illuminate/queue": "self.version",
"illuminate/redis": "self.version",
"illuminate/remote": "self.version",
"illuminate/routing": "self.version",
"illuminate/session": "self.version",
"illuminate/support": "self.version",
"illuminate/translation": "self.version",
"illuminate/validation": "self.version",
"illuminate/view": "self.version",
"illuminate/workbench": "self.version"
},
"require-dev": {
"aws/aws-sdk-php": "~2.6",
"iron-io/iron_mq": "~1.5",
"mockery/mockery": "~0.9",
"pda/pheanstalk": "~2.1",
"phpunit/phpunit": "~4.0"
},
"suggest": {
"doctrine/dbal": "Allow renaming columns and dropping SQLite columns."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"classmap": [
"src/Illuminate/Queue/IlluminateQueueClosure.php"
],
"files": [
"src/Illuminate/Support/helpers.php"
],
"psr-0": {
"Illuminate": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "[email protected]"
}
],
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"time": "2015-02-11 20:37:15"
},
{
"name": "monolog/monolog",
"version": "1.16.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "c0c0b4bee3aabce7182876b0d912ef2595563db7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c0c0b4bee3aabce7182876b0d912ef2595563db7",
"reference": "c0c0b4bee3aabce7182876b0d912ef2595563db7",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0"
},
"provide": {
"psr/log-implementation": "1.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9",
"doctrine/couchdb": "~1.0@dev",
"graylog2/gelf-php": "~1.0",
"php-console/php-console": "^3.1.3",
"phpunit/phpunit": "~4.5",
"phpunit/phpunit-mock-objects": "2.3.0",
"raven/raven": "~0.8",
"ruflin/elastica": ">=0.90 <3.0",
"swiftmailer/swiftmailer": "~5.3",
"videlalvaro/php-amqplib": "~2.4"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"php-console/php-console": "Allow sending log messages to Google Chrome",
"raven/raven": "Allow sending log messages to a Sentry server",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server",
"videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.16.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "[email protected]",
"homepage": "http://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "http://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"time": "2015-08-09 17:44:44"
},
{
"name": "nesbot/carbon",
"version": "1.17.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "a1dd1ad9abfc8b3c4d8768068e6c71d293424e86"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/a1dd1ad9abfc8b3c4d8768068e6c71d293424e86",
"reference": "a1dd1ad9abfc8b3c4d8768068e6c71d293424e86",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"type": "library",
"autoload": {
"psr-0": {
"Carbon": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Brian Nesbitt",
"email": "[email protected]",
"homepage": "http://nesbot.com"
}
],
"description": "A simple API extension for DateTime.",
"homepage": "http://carbon.nesbot.com",
"keywords": [
"date",
"datetime",
"time"
],
"time": "2015-03-08 14:05:44"
},
{
"name": "nikic/php-parser",
"version": "v0.9.5",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "ef70767475434bdb3615b43c327e2cae17ef12eb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ef70767475434bdb3615b43c327e2cae17ef12eb",
"reference": "ef70767475434bdb3615b43c327e2cae17ef12eb",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.9-dev"
}
},
"autoload": {
"psr-0": {
"PHPParser": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov"
}
],
"description": "A PHP parser written in PHP",
"keywords": [
"parser",
"php"
],
"time": "2014-07-23 18:24:17"
},
{
"name": "patchwork/utf8",
"version": "v1.2.3",
"source": {
"type": "git",
"url": "https://github.com/tchwork/utf8.git",
"reference": "a7a9a987d01d052ff9c99510ecbd07ebc6c270f2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tchwork/utf8/zipball/a7a9a987d01d052ff9c99510ecbd07ebc6c270f2",
"reference": "a7a9a987d01d052ff9c99510ecbd07ebc6c270f2",
"shasum": ""
},
"require": {
"lib-pcre": ">=7.3",
"php": ">=5.3.0"
},
"suggest": {
"ext-iconv": "Use iconv for best performance",
"ext-intl": "Use Intl for best performance",
"ext-mbstring": "Use Mbstring for best performance",
"ext-wfio": "Use WFIO for UTF-8 filesystem access on Windows"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"autoload": {
"psr-4": {
"Patchwork\\": "src/Patchwork/"
},
"classmap": [
"src/Normalizer.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"(Apache-2.0 or GPL-2.0)"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "[email protected]"
}
],
"description": "Portable and performant UTF-8, Unicode and Grapheme Clusters for PHP",
"homepage": "https://github.com/tchwork/utf8",
"keywords": [
"grapheme",
"i18n",
"unicode",
"utf-8",
"utf8"
],
"time": "2015-06-25 08:17:49"
},
{
"name": "phpseclib/phpseclib",
"version": "0.3.10",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "d15bba1edcc7c89e09cc74c5d961317a8b947bf4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d15bba1edcc7c89e09cc74c5d961317a8b947bf4",
"reference": "d15bba1edcc7c89e09cc74c5d961317a8b947bf4",
"shasum": ""
},
"require": {
"php": ">=5.0.0"
},
"require-dev": {
"phing/phing": "~2.7",
"phpunit/phpunit": "~4.0",
"sami/sami": "~2.0",
"squizlabs/php_codesniffer": "~1.5"
},
"suggest": {
"ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a wide variety of cryptographic operations.",
"pear-pear/PHP_Compat": "Install PHP_Compat to get phpseclib working on PHP < 4.3.3."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.3-dev"
}
},
"autoload": {
"psr-0": {
"Crypt": "phpseclib/",
"File": "phpseclib/",
"Math": "phpseclib/",
"Net": "phpseclib/",
"System": "phpseclib/"
},
"files": [
"phpseclib/Crypt/Random.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"include-path": [
"phpseclib/"
],
"license": [
"MIT"
],
"authors": [
{
"name": "Jim Wigginton",
"email": "[email protected]",
"role": "Lead Developer"
},
{
"name": "Patrick Monnerat",
"email": "[email protected]",
"role": "Developer"
},
{
"name": "Andreas Fischer",
"email": "[email protected]",
"role": "Developer"
},
{
"name": "Hans-Jürgen Petrich",
"email": "[email protected]",
"role": "Developer"
}
],
"description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
"homepage": "http://phpseclib.sourceforge.net",
"keywords": [
"BigInteger",
"aes",
"asn.1",
"asn1",
"blowfish",
"crypto",
"cryptography",
"encryption",
"rsa",
"security",
"sftp",
"signature",
"signing",
"ssh",
"twofish",
"x.509",
"x509"
],
"time": "2015-01-28 21:50:33"
},
{
"name": "predis/predis",
"version": "v0.8.7",
"source": {
"type": "git",
"url": "https://github.com/nrk/predis.git",
"reference": "4123fcd85d61354c6c9900db76c9597dbd129bf6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nrk/predis/zipball/4123fcd85d61354c6c9900db76c9597dbd129bf6",
"reference": "4123fcd85d61354c6c9900db76c9597dbd129bf6",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"suggest": {
"ext-curl": "Allows access to Webdis when paired with phpiredis",
"ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol"
},
"type": "library",
"autoload": {
"psr-0": {
"Predis": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniele Alessandri",
"email": "[email protected]",
"homepage": "http://clorophilla.net"
}
],
"description": "Flexible and feature-complete PHP client library for Redis",
"homepage": "http://github.com/nrk/predis",
"keywords": [
"nosql",
"predis",
"redis"
],
"time": "2014-08-01 09:43:10"
},
{
"name": "psr/log",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
"shasum": ""
},
"type": "library",
"autoload": {
"psr-0": {
"Psr\\Log\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"keywords": [
"log",
"psr",
"psr-3"
],
"time": "2012-12-21 11:40:51"
},
{
"name": "stack/builder",
"version": "v1.0.3",
"source": {
"type": "git",
"url": "https://github.com/stackphp/builder.git",
"reference": "c1f8a4693b55c563405024f708a76ef576c3b276"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stackphp/builder/zipball/c1f8a4693b55c563405024f708a76ef576c3b276",
"reference": "c1f8a4693b55c563405024f708a76ef576c3b276",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"symfony/http-foundation": "~2.1",
"symfony/http-kernel": "~2.1"
},
"require-dev": {
"silex/silex": "~1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-0": {
"Stack": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Igor Wiedler",
"email": "[email protected]"
}
],
"description": "Builder for stack middlewares based on HttpKernelInterface.",
"keywords": [
"stack"
],
"time": "2014-11-23 20:37:11"
},
{
"name": "swiftmailer/swiftmailer",
"version": "v5.4.1",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/0697e6aa65c83edf97bb0f23d8763f94e3f11421",
"reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"mockery/mockery": "~0.9.1,<0.9.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.4-dev"
}
},
"autoload": {
"files": [
"lib/swift_required.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Chris Corbyn"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Swiftmailer, free feature-rich PHP mailer",
"homepage": "http://swiftmailer.org",
"keywords": [
"email",
"mail",
"mailer"
],
"time": "2015-06-06 14:19:39"
},
{
"name": "symfony/browser-kit",
"version": "v2.5.12",
"target-dir": "Symfony/Component/BrowserKit",
"source": {
"type": "git",
"url": "https://github.com/symfony/BrowserKit.git",
"reference": "b2b78b850a32251cbbd9915ab61453302e7ecd72"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/b2b78b850a32251cbbd9915ab61453302e7ecd72",
"reference": "b2b78b850a32251cbbd9915ab61453302e7ecd72",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/dom-crawler": "~2.0,>=2.0.5"
},
"require-dev": {
"symfony/css-selector": "~2.0,>=2.0.5",
"symfony/process": "~2.0,>=2.0.5"
},
"suggest": {
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\BrowserKit\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony BrowserKit Component",
"homepage": "http://symfony.com",
"time": "2015-01-03 08:01:13"
},
{
"name": "symfony/console",
"version": "v2.5.12",
"target-dir": "Symfony/Component/Console",
"source": {
"type": "git",
"url": "https://github.com/symfony/Console.git",
"reference": "a43e750b4c74f3bdfca77c79c343033d35a6cd6e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/a43e750b4c74f3bdfca77c79c343033d35a6cd6e",
"reference": "a43e750b4c74f3bdfca77c79c343033d35a6cd6e",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/event-dispatcher": "~2.1"
},
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Console\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony Console Component",
"homepage": "http://symfony.com",
"time": "2015-02-08 07:07:45"
},
{
"name": "symfony/css-selector",
"version": "v2.5.12",
"target-dir": "Symfony/Component/CssSelector",
"source": {
"type": "git",
"url": "https://github.com/symfony/CssSelector.git",
"reference": "d45b306421462295e76b94bcf76b963867450327"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/d45b306421462295e76b94bcf76b963867450327",
"reference": "d45b306421462295e76b94bcf76b963867450327",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\CssSelector\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Jean-François Simon",
"email": "[email protected]"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony CssSelector Component",
"homepage": "http://symfony.com",
"time": "2015-01-03 08:01:13"
},
{
"name": "symfony/debug",
"version": "v2.5.12",
"target-dir": "Symfony/Component/Debug",
"source": {
"type": "git",
"url": "https://github.com/symfony/Debug.git",
"reference": "ed3019589cdadf32c521d1e181f9d72955645c67"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Debug/zipball/ed3019589cdadf32c521d1e181f9d72955645c67",
"reference": "ed3019589cdadf32c521d1e181f9d72955645c67",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"conflict": {
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
"symfony/class-loader": "~2.2",
"symfony/http-foundation": "~2.1",
"symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2"
},
"suggest": {
"symfony/http-foundation": "",
"symfony/http-kernel": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Debug\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony Debug Component",
"homepage": "http://symfony.com",
"time": "2015-01-16 14:51:58"
},
{
"name": "symfony/dom-crawler",
"version": "v2.5.12",
"target-dir": "Symfony/Component/DomCrawler",
"source": {
"type": "git",
"url": "https://github.com/symfony/DomCrawler.git",
"reference": "3860edcf7ff7e173cfe2151f0d425e610e77cc35"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/3860edcf7ff7e173cfe2151f0d425e610e77cc35",
"reference": "3860edcf7ff7e173cfe2151f0d425e610e77cc35",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/css-selector": "~2.3"
},
"suggest": {
"symfony/css-selector": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\DomCrawler\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony DomCrawler Component",
"homepage": "http://symfony.com",
"time": "2015-01-03 08:01:13"
},
{
"name": "symfony/event-dispatcher",
"version": "v2.7.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/EventDispatcher.git",
"reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/9310b5f9a87ec2ea75d20fec0b0017c77c66dac3",
"reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~2.0,>=2.0.5",
"symfony/dependency-injection": "~2.6",
"symfony/expression-language": "~2.6",
"symfony/phpunit-bridge": "~2.7",
"symfony/stopwatch": "~2.3"
},
"suggest": {
"symfony/dependency-injection": "",
"symfony/http-kernel": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "[email protected]"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2015-06-18 19:21:56"
},
{
"name": "symfony/filesystem",
"version": "v2.7.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/Filesystem.git",
"reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/2d7b2ddaf3f548f4292df49a99d19c853d43f0b8",
"reference": "2d7b2ddaf3f548f4292df49a99d19c853d43f0b8",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"symfony/phpunit-bridge": "~2.7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.7-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "[email protected]"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2015-07-09 16:07:40"
},
{
"name": "symfony/finder",
"version": "v2.5.12",
"target-dir": "Symfony/Component/Finder",
"source": {
"type": "git",
"url": "https://github.com/symfony/Finder.git",
"reference": "e527ebf47ff912a45e148b7d0b107b80ec0b3cc2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Finder/zipball/e527ebf47ff912a45e148b7d0b107b80ec0b3cc2",
"reference": "e527ebf47ff912a45e148b7d0b107b80ec0b3cc2",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Finder\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony Finder Component",
"homepage": "http://symfony.com",
"time": "2015-01-03 08:01:13"
},
{
"name": "symfony/http-foundation",
"version": "v2.5.12",
"target-dir": "Symfony/Component/HttpFoundation",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpFoundation.git",
"reference": "08e783861dd9579bac4092814bbfb0cae6666b65"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/08e783861dd9579bac4092814bbfb0cae6666b65",
"reference": "08e783861dd9579bac4092814bbfb0cae6666b65",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/expression-language": "~2.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\HttpFoundation\\": ""
},
"classmap": [
"Symfony/Component/HttpFoundation/Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony HttpFoundation Component",
"homepage": "http://symfony.com",
"time": "2015-04-01 15:49:36"
},
{
"name": "symfony/http-kernel",
"version": "v2.5.12",
"target-dir": "Symfony/Component/HttpKernel",
"source": {
"type": "git",
"url": "https://github.com/symfony/HttpKernel.git",
"reference": "31652385d94eafc2103a98435d6d5bd7eea61736"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/31652385d94eafc2103a98435d6d5bd7eea61736",
"reference": "31652385d94eafc2103a98435d6d5bd7eea61736",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"psr/log": "~1.0",
"symfony/debug": "~2.5.9|~2.6,>=2.6.2",
"symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2",
"symfony/http-foundation": "~2.5"
},
"require-dev": {
"symfony/browser-kit": "~2.3",
"symfony/class-loader": "~2.1",
"symfony/config": "~2.0,>=2.0.5",
"symfony/console": "~2.2",
"symfony/css-selector": "~2.0,>=2.0.5",
"symfony/dependency-injection": "~2.2",
"symfony/dom-crawler": "~2.0,>=2.0.5",
"symfony/expression-language": "~2.4",
"symfony/finder": "~2.0,>=2.0.5",
"symfony/process": "~2.0,>=2.0.5",
"symfony/routing": "~2.2",
"symfony/stopwatch": "~2.3",
"symfony/templating": "~2.2"
},
"suggest": {
"symfony/browser-kit": "",
"symfony/class-loader": "",
"symfony/config": "",
"symfony/console": "",
"symfony/dependency-injection": "",
"symfony/finder": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\HttpKernel\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony HttpKernel Component",
"homepage": "http://symfony.com",
"time": "2015-05-26 23:43:20"
},
{
"name": "symfony/process",
"version": "v2.5.12",
"target-dir": "Symfony/Component/Process",
"source": {
"type": "git",
"url": "https://github.com/symfony/Process.git",
"reference": "00a1308e8b5aec5eba7c8f1708426a78f929be8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Process/zipball/00a1308e8b5aec5eba7c8f1708426a78f929be8c",
"reference": "00a1308e8b5aec5eba7c8f1708426a78f929be8c",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Process\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony Process Component",
"homepage": "http://symfony.com",
"time": "2015-02-08 07:07:45"
},
{
"name": "symfony/routing",
"version": "v2.5.12",
"target-dir": "Symfony/Component/Routing",
"source": {
"type": "git",
"url": "https://github.com/symfony/Routing.git",
"reference": "46142c34ea830f47429df6e15faec3a33292d618"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Routing/zipball/46142c34ea830f47429df6e15faec3a33292d618",
"reference": "46142c34ea830f47429df6e15faec3a33292d618",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"doctrine/common": "~2.2",
"psr/log": "~1.0",
"symfony/config": "~2.2",
"symfony/expression-language": "~2.4",
"symfony/http-foundation": "~2.3",
"symfony/yaml": "~2.0,>=2.0.5"
},
"suggest": {
"doctrine/annotations": "For using the annotation loader",
"symfony/config": "For using the all-in-one router or any loader",
"symfony/expression-language": "For using expression matching",
"symfony/yaml": "For using the YAML loader"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Routing\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony Routing Component",
"homepage": "http://symfony.com",
"keywords": [
"router",
"routing",
"uri",
"url"
],
"time": "2015-02-08 07:07:45"
},
{
"name": "symfony/security-core",
"version": "v2.5.12",
"target-dir": "Symfony/Component/Security/Core",
"source": {
"type": "git",
"url": "https://github.com/symfony/security-core.git",
"reference": "3a27d7b34ee62cb0fdf5ad970e7777912ef4722f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/security-core/zipball/3a27d7b34ee62cb0fdf5ad970e7777912ef4722f",
"reference": "3a27d7b34ee62cb0fdf5ad970e7777912ef4722f",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"ircmaxell/password-compat": "1.0.*",
"psr/log": "~1.0",
"symfony/event-dispatcher": "~2.1",
"symfony/expression-language": "~2.4",
"symfony/http-foundation": "~2.4",
"symfony/translation": "~2.0,>=2.0.5",
"symfony/validator": "~2.5,>=2.5.5"
},
"suggest": {
"ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5",
"symfony/event-dispatcher": "",
"symfony/expression-language": "For using the expression voter",
"symfony/http-foundation": "",
"symfony/validator": "For using the user password constraint"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Security\\Core\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony Security Component - Core Library",
"homepage": "http://symfony.com",
"time": "2015-01-25 04:37:39"
},
{
"name": "symfony/translation",
"version": "v2.5.12",
"target-dir": "Symfony/Component/Translation",
"source": {
"type": "git",
"url": "https://github.com/symfony/Translation.git",
"reference": "165b5348cd20f8c4b2fcf1097c9c8300d1093b90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Translation/zipball/165b5348cd20f8c4b2fcf1097c9c8300d1093b90",
"reference": "165b5348cd20f8c4b2fcf1097c9c8300d1093b90",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
"symfony/config": "~2.3,>=2.3.12",
"symfony/intl": "~2.3",
"symfony/yaml": "~2.2"
},
"suggest": {
"symfony/config": "",
"symfony/yaml": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"psr-0": {
"Symfony\\Component\\Translation\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "[email protected]"
}
],
"description": "Symfony Translation Component",
"homepage": "http://symfony.com",
"time": "2015-01-03 15:23:51"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
|
nixx/anime.is
|
composer.lock
|
lock
|
unknown
| 64,031 |
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./app/tests/</directory>
</testsuite>
</testsuites>
</phpunit>
|
nixx/anime.is
|
phpunit.xml
|
XML
|
unknown
| 567 |
/*
* Base structure
*/
/* Move down content because we have a fixed navbar that is 50px tall */
body {
padding-top: 50px;
}
/*
* Global add-ons
*/
.sub-header {
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
/*
* Top navigation
* Hide default border to remove 1px line.
*/
.navbar-fixed-top {
border: 0;
}
/*
* Sidebar
*/
/* Hide for mobile, show later */
.sidebar {
display: none;
}
@media (min-width: 768px) {
.sidebar {
position: fixed;
top: 51px;
bottom: 0;
left: 0;
z-index: 1000;
display: block;
padding: 20px;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
background-color: #f5f5f5;
border-right: 1px solid #eee;
}
}
/* Sidebar navigation */
.nav-sidebar {
margin-right: -21px; /* 20px padding + 1px border */
margin-bottom: 20px;
margin-left: -20px;
}
.nav-sidebar > li > a {
padding-right: 20px;
padding-left: 20px;
}
.nav-sidebar > .active > a,
.nav-sidebar > .active > a:hover,
.nav-sidebar > .active > a:focus {
color: #fff;
background-color: #428bca;
}
/*
* Main content
*/
.main {
padding: 20px;
}
@media (min-width: 768px) {
.main {
padding-right: 40px;
padding-left: 40px;
}
}
.main .page-header {
margin-top: 0;
}
/*
* Placeholder dashboard ideas
*/
.placeholders {
margin-bottom: 30px;
text-align: center;
}
.placeholders h4 {
margin-bottom: 0;
}
.placeholder {
margin-bottom: 20px;
}
.placeholder img {
display: inline-block;
border-radius: 50%;
}
|
nixx/anime.is
|
public/css/dashboard.css
|
CSS
|
unknown
| 1,554 |
body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
background-image: url("/imagedoc-darknoise.png");
}
h1, a, p, label, li, h2 {
color: #fff;
}
a:hover {
text-shadow: 0 0 3px #fff;
}
nav
{
position: fixed;
top: 5px;
left: 5px;
}
.center
{
width: 840px;
margin: auto;
}
video {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
max-width: 95%;
max-height: 95%;
box-shadow: 0 0 15px #000;
}
video:focus {
outline-width: 0;
}
.anchor {
font-size: 0.6em;
text-decoration: none;
margin-left: -10px;
padding-left: 10px;
}
.anchor > span {
cursor: pointer;
}
.horizontal > li {
display: inline;
list-style-type: none;
padding-right: 5px;
}
.hidden {
visibility: hidden;
}
|
nixx/anime.is
|
public/css/style.css
|
CSS
|
unknown
| 759 |
nixx/anime.is
|
public/favicon.ico
|
ico
|
unknown
| 0 |
|
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <[email protected]>
*/
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/../bootstrap/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let's turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight these users.
|
*/
$app = require_once __DIR__.'/../bootstrap/start.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can simply call the run method,
| which will execute the request and send the response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have whipped up for them.
|
*/
$app->run();
|
nixx/anime.is
|
public/index.php
|
PHP
|
unknown
| 1,586 |
$("h1").on("mouseenter mouseleave", function() {
$(this).children("a").toggleClass("hidden");
});
|
nixx/anime.is
|
public/js/index.js
|
JavaScript
|
unknown
| 102 |
$("video").on("ended", function() {
if ((window.location + "").indexOf("?shuffle") != -1) {
window.location = "/shuffle/";
}
}).on("canplay", function () {
t_index = (window.location.hash + "").indexOf("t=");
if (t_index != -1) {
$("video").get()[0].currentTime = window.location.hash.substr(t_index + 2, 2);
}
});
|
nixx/anime.is
|
public/js/watch.js
|
JavaScript
|
unknown
| 341 |
If you intend to install Octicons locally, install `octicons-local.ttf`. It should appear as “github-octicons” in your font list. It is specially designed not to conflict with GitHub's web fonts.
|
nixx/anime.is
|
public/octicons/README.md
|
Markdown
|
unknown
| 200 |
@font-face {
font-family: 'octicons';
src: url('octicons.eot?#iefix') format('embedded-opentype'),
url('octicons.woff') format('woff'),
url('octicons.ttf') format('truetype'),
url('octicons.svg#octicons') format('svg');
font-weight: normal;
font-style: normal;
}
/*
.octicon is optimized for 16px.
.mega-octicon is optimized for 32px but can be used larger.
*/
.octicon {
font: normal normal 16px octicons;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
}
.mega-octicon {
font: normal normal 32px octicons;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
}
.octicon-alert:before { content: '\f02d'} /* */
.octicon-alignment-align:before { content: '\f08a'} /* */
.octicon-alignment-aligned-to:before { content: '\f08e'} /* */
.octicon-alignment-unalign:before { content: '\f08b'} /* */
.octicon-arrow-down:before { content: '\f03f'} /* */
.octicon-arrow-left:before { content: '\f040'} /* */
.octicon-arrow-right:before { content: '\f03e'} /* */
.octicon-arrow-small-down:before { content: '\f0a0'} /* */
.octicon-arrow-small-left:before { content: '\f0a1'} /* */
.octicon-arrow-small-right:before { content: '\f071'} /* */
.octicon-arrow-small-up:before { content: '\f09f'} /* */
.octicon-arrow-up:before { content: '\f03d'} /* */
.octicon-beer:before { content: '\f069'} /* */
.octicon-book:before { content: '\f007'} /* */
.octicon-bookmark:before { content: '\f07b'} /* */
.octicon-briefcase:before { content: '\f0d3'} /* */
.octicon-broadcast:before { content: '\f048'} /* */
.octicon-browser:before { content: '\f0c5'} /* */
.octicon-bug:before { content: '\f091'} /* */
.octicon-calendar:before { content: '\f068'} /* */
.octicon-check:before { content: '\f03a'} /* */
.octicon-checklist:before { content: '\f076'} /* */
.octicon-chevron-down:before { content: '\f0a3'} /* */
.octicon-chevron-left:before { content: '\f0a4'} /* */
.octicon-chevron-right:before { content: '\f078'} /* */
.octicon-chevron-up:before { content: '\f0a2'} /* */
.octicon-circle-slash:before { content: '\f084'} /* */
.octicon-circuit-board:before { content: '\f0d6'} /* */
.octicon-clippy:before { content: '\f035'} /* */
.octicon-clock:before { content: '\f046'} /* */
.octicon-cloud-download:before { content: '\f00b'} /* */
.octicon-cloud-upload:before { content: '\f00c'} /* */
.octicon-code:before { content: '\f05f'} /* */
.octicon-color-mode:before { content: '\f065'} /* */
.octicon-comment-add:before,
.octicon-comment:before { content: '\f02b'} /* */
.octicon-comment-discussion:before { content: '\f04f'} /* */
.octicon-credit-card:before { content: '\f045'} /* */
.octicon-dash:before { content: '\f0ca'} /* */
.octicon-dashboard:before { content: '\f07d'} /* */
.octicon-database:before { content: '\f096'} /* */
.octicon-device-camera:before { content: '\f056'} /* */
.octicon-device-camera-video:before { content: '\f057'} /* */
.octicon-device-desktop:before { content: '\f27c'} /* */
.octicon-device-mobile:before { content: '\f038'} /* */
.octicon-diff:before { content: '\f04d'} /* */
.octicon-diff-added:before { content: '\f06b'} /* */
.octicon-diff-ignored:before { content: '\f099'} /* */
.octicon-diff-modified:before { content: '\f06d'} /* */
.octicon-diff-removed:before { content: '\f06c'} /* */
.octicon-diff-renamed:before { content: '\f06e'} /* */
.octicon-ellipsis:before { content: '\f09a'} /* */
.octicon-eye-unwatch:before,
.octicon-eye-watch:before,
.octicon-eye:before { content: '\f04e'} /* */
.octicon-file-binary:before { content: '\f094'} /* */
.octicon-file-code:before { content: '\f010'} /* */
.octicon-file-directory:before { content: '\f016'} /* */
.octicon-file-media:before { content: '\f012'} /* */
.octicon-file-pdf:before { content: '\f014'} /* */
.octicon-file-submodule:before { content: '\f017'} /* */
.octicon-file-symlink-directory:before { content: '\f0b1'} /* */
.octicon-file-symlink-file:before { content: '\f0b0'} /* */
.octicon-file-text:before { content: '\f011'} /* */
.octicon-file-zip:before { content: '\f013'} /* */
.octicon-flame:before { content: '\f0d2'} /* */
.octicon-fold:before { content: '\f0cc'} /* */
.octicon-gear:before { content: '\f02f'} /* */
.octicon-gift:before { content: '\f042'} /* */
.octicon-gist:before { content: '\f00e'} /* */
.octicon-gist-secret:before { content: '\f08c'} /* */
.octicon-git-branch-create:before,
.octicon-git-branch-delete:before,
.octicon-git-branch:before { content: '\f020'} /* */
.octicon-git-commit:before { content: '\f01f'} /* */
.octicon-git-compare:before { content: '\f0ac'} /* */
.octicon-git-merge:before { content: '\f023'} /* */
.octicon-git-pull-request-abandoned:before,
.octicon-git-pull-request:before { content: '\f009'} /* */
.octicon-globe:before { content: '\f0b6'} /* */
.octicon-graph:before { content: '\f043'} /* */
.octicon-heart:before { content: '\2665'} /* ♥ */
.octicon-history:before { content: '\f07e'} /* */
.octicon-home:before { content: '\f08d'} /* */
.octicon-horizontal-rule:before { content: '\f070'} /* */
.octicon-hourglass:before { content: '\f09e'} /* */
.octicon-hubot:before { content: '\f09d'} /* */
.octicon-inbox:before { content: '\f0cf'} /* */
.octicon-info:before { content: '\f059'} /* */
.octicon-issue-closed:before { content: '\f028'} /* */
.octicon-issue-opened:before { content: '\f026'} /* */
.octicon-issue-reopened:before { content: '\f027'} /* */
.octicon-jersey:before { content: '\f019'} /* */
.octicon-jump-down:before { content: '\f072'} /* */
.octicon-jump-left:before { content: '\f0a5'} /* */
.octicon-jump-right:before { content: '\f0a6'} /* */
.octicon-jump-up:before { content: '\f073'} /* */
.octicon-key:before { content: '\f049'} /* */
.octicon-keyboard:before { content: '\f00d'} /* */
.octicon-law:before { content: '\f0d8'} /* */
.octicon-light-bulb:before { content: '\f000'} /* */
.octicon-link:before { content: '\f05c'} /* */
.octicon-link-external:before { content: '\f07f'} /* */
.octicon-list-ordered:before { content: '\f062'} /* */
.octicon-list-unordered:before { content: '\f061'} /* */
.octicon-location:before { content: '\f060'} /* */
.octicon-gist-private:before,
.octicon-mirror-private:before,
.octicon-git-fork-private:before,
.octicon-lock:before { content: '\f06a'} /* */
.octicon-logo-github:before { content: '\f092'} /* */
.octicon-mail:before { content: '\f03b'} /* */
.octicon-mail-read:before { content: '\f03c'} /* */
.octicon-mail-reply:before { content: '\f051'} /* */
.octicon-mark-github:before { content: '\f00a'} /* */
.octicon-markdown:before { content: '\f0c9'} /* */
.octicon-megaphone:before { content: '\f077'} /* */
.octicon-mention:before { content: '\f0be'} /* */
.octicon-microscope:before { content: '\f089'} /* */
.octicon-milestone:before { content: '\f075'} /* */
.octicon-mirror-public:before,
.octicon-mirror:before { content: '\f024'} /* */
.octicon-mortar-board:before { content: '\f0d7'} /* */
.octicon-move-down:before { content: '\f0a8'} /* */
.octicon-move-left:before { content: '\f074'} /* */
.octicon-move-right:before { content: '\f0a9'} /* */
.octicon-move-up:before { content: '\f0a7'} /* */
.octicon-mute:before { content: '\f080'} /* */
.octicon-no-newline:before { content: '\f09c'} /* */
.octicon-octoface:before { content: '\f008'} /* */
.octicon-organization:before { content: '\f037'} /* */
.octicon-package:before { content: '\f0c4'} /* */
.octicon-paintcan:before { content: '\f0d1'} /* */
.octicon-pencil:before { content: '\f058'} /* */
.octicon-person-add:before,
.octicon-person-follow:before,
.octicon-person:before { content: '\f018'} /* */
.octicon-pin:before { content: '\f041'} /* */
.octicon-playback-fast-forward:before { content: '\f0bd'} /* */
.octicon-playback-pause:before { content: '\f0bb'} /* */
.octicon-playback-play:before { content: '\f0bf'} /* */
.octicon-playback-rewind:before { content: '\f0bc'} /* */
.octicon-plug:before { content: '\f0d4'} /* */
.octicon-repo-create:before,
.octicon-gist-new:before,
.octicon-file-directory-create:before,
.octicon-file-add:before,
.octicon-plus:before { content: '\f05d'} /* */
.octicon-podium:before { content: '\f0af'} /* */
.octicon-primitive-dot:before { content: '\f052'} /* */
.octicon-primitive-square:before { content: '\f053'} /* */
.octicon-pulse:before { content: '\f085'} /* */
.octicon-puzzle:before { content: '\f0c0'} /* */
.octicon-question:before { content: '\f02c'} /* */
.octicon-quote:before { content: '\f063'} /* */
.octicon-radio-tower:before { content: '\f030'} /* */
.octicon-repo-delete:before,
.octicon-repo:before { content: '\f001'} /* */
.octicon-repo-clone:before { content: '\f04c'} /* */
.octicon-repo-force-push:before { content: '\f04a'} /* */
.octicon-gist-fork:before,
.octicon-repo-forked:before { content: '\f002'} /* */
.octicon-repo-pull:before { content: '\f006'} /* */
.octicon-repo-push:before { content: '\f005'} /* */
.octicon-rocket:before { content: '\f033'} /* */
.octicon-rss:before { content: '\f034'} /* */
.octicon-ruby:before { content: '\f047'} /* */
.octicon-screen-full:before { content: '\f066'} /* */
.octicon-screen-normal:before { content: '\f067'} /* */
.octicon-search-save:before,
.octicon-search:before { content: '\f02e'} /* */
.octicon-server:before { content: '\f097'} /* */
.octicon-settings:before { content: '\f07c'} /* */
.octicon-log-in:before,
.octicon-sign-in:before { content: '\f036'} /* */
.octicon-log-out:before,
.octicon-sign-out:before { content: '\f032'} /* */
.octicon-split:before { content: '\f0c6'} /* */
.octicon-squirrel:before { content: '\f0b2'} /* */
.octicon-star-add:before,
.octicon-star-delete:before,
.octicon-star:before { content: '\f02a'} /* */
.octicon-steps:before { content: '\f0c7'} /* */
.octicon-stop:before { content: '\f08f'} /* */
.octicon-repo-sync:before,
.octicon-sync:before { content: '\f087'} /* */
.octicon-tag-remove:before,
.octicon-tag-add:before,
.octicon-tag:before { content: '\f015'} /* */
.octicon-telescope:before { content: '\f088'} /* */
.octicon-terminal:before { content: '\f0c8'} /* */
.octicon-three-bars:before { content: '\f05e'} /* */
.octicon-tools:before { content: '\f031'} /* */
.octicon-trashcan:before { content: '\f0d0'} /* */
.octicon-triangle-down:before { content: '\f05b'} /* */
.octicon-triangle-left:before { content: '\f044'} /* */
.octicon-triangle-right:before { content: '\f05a'} /* */
.octicon-triangle-up:before { content: '\f0aa'} /* */
.octicon-unfold:before { content: '\f039'} /* */
.octicon-unmute:before { content: '\f0ba'} /* */
.octicon-versions:before { content: '\f064'} /* */
.octicon-remove-close:before,
.octicon-x:before { content: '\f081'} /* */
.octicon-zap:before { content: '\26A1'} /* ⚡ */
|
nixx/anime.is
|
public/octicons/octicons.css
|
CSS
|
unknown
| 11,740 |
@octicons-font-path: ".";
@octicons-version: "0ba238babad928a8b468c644ef3a15e66545d466";
@font-face {
font-family: 'octicons';
src: ~"url('@{octicons-font-path}/octicons.eot?#iefix&v=@{octicons-version}') format('embedded-opentype')",
~"url('@{octicons-font-path}/octicons.woff?v=@{octicons-version}') format('woff')",
~"url('@{octicons-font-path}/octicons.ttf?v=@{octicons-version}') format('truetype')",
~"url('@{octicons-font-path}/octicons.svg?v=@{octicons-version}#octicons') format('svg')";
font-weight: normal;
font-style: normal;
}
// .octicon is optimized for 16px.
// .mega-octicon is optimized for 32px but can be used larger.
.octicon {
font: normal normal 16px octicons;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
}
.mega-octicon {
font: normal normal 32px octicons;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
}
.octicon-alert:before { content: '\f02d'} /* */
.octicon-alignment-align:before { content: '\f08a'} /* */
.octicon-alignment-aligned-to:before { content: '\f08e'} /* */
.octicon-alignment-unalign:before { content: '\f08b'} /* */
.octicon-arrow-down:before { content: '\f03f'} /* */
.octicon-arrow-left:before { content: '\f040'} /* */
.octicon-arrow-right:before { content: '\f03e'} /* */
.octicon-arrow-small-down:before { content: '\f0a0'} /* */
.octicon-arrow-small-left:before { content: '\f0a1'} /* */
.octicon-arrow-small-right:before { content: '\f071'} /* */
.octicon-arrow-small-up:before { content: '\f09f'} /* */
.octicon-arrow-up:before { content: '\f03d'} /* */
.octicon-beer:before { content: '\f069'} /* */
.octicon-book:before { content: '\f007'} /* */
.octicon-bookmark:before { content: '\f07b'} /* */
.octicon-briefcase:before { content: '\f0d3'} /* */
.octicon-broadcast:before { content: '\f048'} /* */
.octicon-browser:before { content: '\f0c5'} /* */
.octicon-bug:before { content: '\f091'} /* */
.octicon-calendar:before { content: '\f068'} /* */
.octicon-check:before { content: '\f03a'} /* */
.octicon-checklist:before { content: '\f076'} /* */
.octicon-chevron-down:before { content: '\f0a3'} /* */
.octicon-chevron-left:before { content: '\f0a4'} /* */
.octicon-chevron-right:before { content: '\f078'} /* */
.octicon-chevron-up:before { content: '\f0a2'} /* */
.octicon-circle-slash:before { content: '\f084'} /* */
.octicon-circuit-board:before { content: '\f0d6'} /* */
.octicon-clippy:before { content: '\f035'} /* */
.octicon-clock:before { content: '\f046'} /* */
.octicon-cloud-download:before { content: '\f00b'} /* */
.octicon-cloud-upload:before { content: '\f00c'} /* */
.octicon-code:before { content: '\f05f'} /* */
.octicon-color-mode:before { content: '\f065'} /* */
.octicon-comment-add:before,
.octicon-comment:before { content: '\f02b'} /* */
.octicon-comment-discussion:before { content: '\f04f'} /* */
.octicon-credit-card:before { content: '\f045'} /* */
.octicon-dash:before { content: '\f0ca'} /* */
.octicon-dashboard:before { content: '\f07d'} /* */
.octicon-database:before { content: '\f096'} /* */
.octicon-device-camera:before { content: '\f056'} /* */
.octicon-device-camera-video:before { content: '\f057'} /* */
.octicon-device-desktop:before { content: '\f27c'} /* */
.octicon-device-mobile:before { content: '\f038'} /* */
.octicon-diff:before { content: '\f04d'} /* */
.octicon-diff-added:before { content: '\f06b'} /* */
.octicon-diff-ignored:before { content: '\f099'} /* */
.octicon-diff-modified:before { content: '\f06d'} /* */
.octicon-diff-removed:before { content: '\f06c'} /* */
.octicon-diff-renamed:before { content: '\f06e'} /* */
.octicon-ellipsis:before { content: '\f09a'} /* */
.octicon-eye-unwatch:before,
.octicon-eye-watch:before,
.octicon-eye:before { content: '\f04e'} /* */
.octicon-file-binary:before { content: '\f094'} /* */
.octicon-file-code:before { content: '\f010'} /* */
.octicon-file-directory:before { content: '\f016'} /* */
.octicon-file-media:before { content: '\f012'} /* */
.octicon-file-pdf:before { content: '\f014'} /* */
.octicon-file-submodule:before { content: '\f017'} /* */
.octicon-file-symlink-directory:before { content: '\f0b1'} /* */
.octicon-file-symlink-file:before { content: '\f0b0'} /* */
.octicon-file-text:before { content: '\f011'} /* */
.octicon-file-zip:before { content: '\f013'} /* */
.octicon-flame:before { content: '\f0d2'} /* */
.octicon-fold:before { content: '\f0cc'} /* */
.octicon-gear:before { content: '\f02f'} /* */
.octicon-gift:before { content: '\f042'} /* */
.octicon-gist:before { content: '\f00e'} /* */
.octicon-gist-secret:before { content: '\f08c'} /* */
.octicon-git-branch-create:before,
.octicon-git-branch-delete:before,
.octicon-git-branch:before { content: '\f020'} /* */
.octicon-git-commit:before { content: '\f01f'} /* */
.octicon-git-compare:before { content: '\f0ac'} /* */
.octicon-git-merge:before { content: '\f023'} /* */
.octicon-git-pull-request-abandoned:before,
.octicon-git-pull-request:before { content: '\f009'} /* */
.octicon-globe:before { content: '\f0b6'} /* */
.octicon-graph:before { content: '\f043'} /* */
.octicon-heart:before { content: '\2665'} /* ♥ */
.octicon-history:before { content: '\f07e'} /* */
.octicon-home:before { content: '\f08d'} /* */
.octicon-horizontal-rule:before { content: '\f070'} /* */
.octicon-hourglass:before { content: '\f09e'} /* */
.octicon-hubot:before { content: '\f09d'} /* */
.octicon-inbox:before { content: '\f0cf'} /* */
.octicon-info:before { content: '\f059'} /* */
.octicon-issue-closed:before { content: '\f028'} /* */
.octicon-issue-opened:before { content: '\f026'} /* */
.octicon-issue-reopened:before { content: '\f027'} /* */
.octicon-jersey:before { content: '\f019'} /* */
.octicon-jump-down:before { content: '\f072'} /* */
.octicon-jump-left:before { content: '\f0a5'} /* */
.octicon-jump-right:before { content: '\f0a6'} /* */
.octicon-jump-up:before { content: '\f073'} /* */
.octicon-key:before { content: '\f049'} /* */
.octicon-keyboard:before { content: '\f00d'} /* */
.octicon-law:before { content: '\f0d8'} /* */
.octicon-light-bulb:before { content: '\f000'} /* */
.octicon-link:before { content: '\f05c'} /* */
.octicon-link-external:before { content: '\f07f'} /* */
.octicon-list-ordered:before { content: '\f062'} /* */
.octicon-list-unordered:before { content: '\f061'} /* */
.octicon-location:before { content: '\f060'} /* */
.octicon-gist-private:before,
.octicon-mirror-private:before,
.octicon-git-fork-private:before,
.octicon-lock:before { content: '\f06a'} /* */
.octicon-logo-github:before { content: '\f092'} /* */
.octicon-mail:before { content: '\f03b'} /* */
.octicon-mail-read:before { content: '\f03c'} /* */
.octicon-mail-reply:before { content: '\f051'} /* */
.octicon-mark-github:before { content: '\f00a'} /* */
.octicon-markdown:before { content: '\f0c9'} /* */
.octicon-megaphone:before { content: '\f077'} /* */
.octicon-mention:before { content: '\f0be'} /* */
.octicon-microscope:before { content: '\f089'} /* */
.octicon-milestone:before { content: '\f075'} /* */
.octicon-mirror-public:before,
.octicon-mirror:before { content: '\f024'} /* */
.octicon-mortar-board:before { content: '\f0d7'} /* */
.octicon-move-down:before { content: '\f0a8'} /* */
.octicon-move-left:before { content: '\f074'} /* */
.octicon-move-right:before { content: '\f0a9'} /* */
.octicon-move-up:before { content: '\f0a7'} /* */
.octicon-mute:before { content: '\f080'} /* */
.octicon-no-newline:before { content: '\f09c'} /* */
.octicon-octoface:before { content: '\f008'} /* */
.octicon-organization:before { content: '\f037'} /* */
.octicon-package:before { content: '\f0c4'} /* */
.octicon-paintcan:before { content: '\f0d1'} /* */
.octicon-pencil:before { content: '\f058'} /* */
.octicon-person-add:before,
.octicon-person-follow:before,
.octicon-person:before { content: '\f018'} /* */
.octicon-pin:before { content: '\f041'} /* */
.octicon-playback-fast-forward:before { content: '\f0bd'} /* */
.octicon-playback-pause:before { content: '\f0bb'} /* */
.octicon-playback-play:before { content: '\f0bf'} /* */
.octicon-playback-rewind:before { content: '\f0bc'} /* */
.octicon-plug:before { content: '\f0d4'} /* */
.octicon-repo-create:before,
.octicon-gist-new:before,
.octicon-file-directory-create:before,
.octicon-file-add:before,
.octicon-plus:before { content: '\f05d'} /* */
.octicon-podium:before { content: '\f0af'} /* */
.octicon-primitive-dot:before { content: '\f052'} /* */
.octicon-primitive-square:before { content: '\f053'} /* */
.octicon-pulse:before { content: '\f085'} /* */
.octicon-puzzle:before { content: '\f0c0'} /* */
.octicon-question:before { content: '\f02c'} /* */
.octicon-quote:before { content: '\f063'} /* */
.octicon-radio-tower:before { content: '\f030'} /* */
.octicon-repo-delete:before,
.octicon-repo:before { content: '\f001'} /* */
.octicon-repo-clone:before { content: '\f04c'} /* */
.octicon-repo-force-push:before { content: '\f04a'} /* */
.octicon-gist-fork:before,
.octicon-repo-forked:before { content: '\f002'} /* */
.octicon-repo-pull:before { content: '\f006'} /* */
.octicon-repo-push:before { content: '\f005'} /* */
.octicon-rocket:before { content: '\f033'} /* */
.octicon-rss:before { content: '\f034'} /* */
.octicon-ruby:before { content: '\f047'} /* */
.octicon-screen-full:before { content: '\f066'} /* */
.octicon-screen-normal:before { content: '\f067'} /* */
.octicon-search-save:before,
.octicon-search:before { content: '\f02e'} /* */
.octicon-server:before { content: '\f097'} /* */
.octicon-settings:before { content: '\f07c'} /* */
.octicon-log-in:before,
.octicon-sign-in:before { content: '\f036'} /* */
.octicon-log-out:before,
.octicon-sign-out:before { content: '\f032'} /* */
.octicon-split:before { content: '\f0c6'} /* */
.octicon-squirrel:before { content: '\f0b2'} /* */
.octicon-star-add:before,
.octicon-star-delete:before,
.octicon-star:before { content: '\f02a'} /* */
.octicon-steps:before { content: '\f0c7'} /* */
.octicon-stop:before { content: '\f08f'} /* */
.octicon-repo-sync:before,
.octicon-sync:before { content: '\f087'} /* */
.octicon-tag-remove:before,
.octicon-tag-add:before,
.octicon-tag:before { content: '\f015'} /* */
.octicon-telescope:before { content: '\f088'} /* */
.octicon-terminal:before { content: '\f0c8'} /* */
.octicon-three-bars:before { content: '\f05e'} /* */
.octicon-tools:before { content: '\f031'} /* */
.octicon-trashcan:before { content: '\f0d0'} /* */
.octicon-triangle-down:before { content: '\f05b'} /* */
.octicon-triangle-left:before { content: '\f044'} /* */
.octicon-triangle-right:before { content: '\f05a'} /* */
.octicon-triangle-up:before { content: '\f0aa'} /* */
.octicon-unfold:before { content: '\f039'} /* */
.octicon-unmute:before { content: '\f0ba'} /* */
.octicon-versions:before { content: '\f064'} /* */
.octicon-remove-close:before,
.octicon-x:before { content: '\f081'} /* */
.octicon-zap:before { content: '\26A1'} /* ⚡ */
|
nixx/anime.is
|
public/octicons/octicons.less
|
CSS
|
unknown
| 12,018 |
@font-face {
font-family: 'octicons';
src: font-url('octicons.eot?#iefix') format('embedded-opentype'),
font-url('octicons.woff') format('woff'),
font-url('octicons.ttf') format('truetype'),
font-url('octicons.svg#octicons') format('svg');
font-weight: normal;
font-style: normal;
}
// .octicon is optimized for 16px.
// .mega-octicon is optimized for 32px but can be used larger.
.octicon {
font: normal normal 16px octicons;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
}
.mega-octicon {
font: normal normal 32px octicons;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
}
.octicon-alert:before { content: '\f02d'} /* */
.octicon-alignment-align:before { content: '\f08a'} /* */
.octicon-alignment-aligned-to:before { content: '\f08e'} /* */
.octicon-alignment-unalign:before { content: '\f08b'} /* */
.octicon-arrow-down:before { content: '\f03f'} /* */
.octicon-arrow-left:before { content: '\f040'} /* */
.octicon-arrow-right:before { content: '\f03e'} /* */
.octicon-arrow-small-down:before { content: '\f0a0'} /* */
.octicon-arrow-small-left:before { content: '\f0a1'} /* */
.octicon-arrow-small-right:before { content: '\f071'} /* */
.octicon-arrow-small-up:before { content: '\f09f'} /* */
.octicon-arrow-up:before { content: '\f03d'} /* */
.octicon-beer:before { content: '\f069'} /* */
.octicon-book:before { content: '\f007'} /* */
.octicon-bookmark:before { content: '\f07b'} /* */
.octicon-briefcase:before { content: '\f0d3'} /* */
.octicon-broadcast:before { content: '\f048'} /* */
.octicon-browser:before { content: '\f0c5'} /* */
.octicon-bug:before { content: '\f091'} /* */
.octicon-calendar:before { content: '\f068'} /* */
.octicon-check:before { content: '\f03a'} /* */
.octicon-checklist:before { content: '\f076'} /* */
.octicon-chevron-down:before { content: '\f0a3'} /* */
.octicon-chevron-left:before { content: '\f0a4'} /* */
.octicon-chevron-right:before { content: '\f078'} /* */
.octicon-chevron-up:before { content: '\f0a2'} /* */
.octicon-circle-slash:before { content: '\f084'} /* */
.octicon-circuit-board:before { content: '\f0d6'} /* */
.octicon-clippy:before { content: '\f035'} /* */
.octicon-clock:before { content: '\f046'} /* */
.octicon-cloud-download:before { content: '\f00b'} /* */
.octicon-cloud-upload:before { content: '\f00c'} /* */
.octicon-code:before { content: '\f05f'} /* */
.octicon-color-mode:before { content: '\f065'} /* */
.octicon-comment-add:before,
.octicon-comment:before { content: '\f02b'} /* */
.octicon-comment-discussion:before { content: '\f04f'} /* */
.octicon-credit-card:before { content: '\f045'} /* */
.octicon-dash:before { content: '\f0ca'} /* */
.octicon-dashboard:before { content: '\f07d'} /* */
.octicon-database:before { content: '\f096'} /* */
.octicon-device-camera:before { content: '\f056'} /* */
.octicon-device-camera-video:before { content: '\f057'} /* */
.octicon-device-desktop:before { content: '\f27c'} /* */
.octicon-device-mobile:before { content: '\f038'} /* */
.octicon-diff:before { content: '\f04d'} /* */
.octicon-diff-added:before { content: '\f06b'} /* */
.octicon-diff-ignored:before { content: '\f099'} /* */
.octicon-diff-modified:before { content: '\f06d'} /* */
.octicon-diff-removed:before { content: '\f06c'} /* */
.octicon-diff-renamed:before { content: '\f06e'} /* */
.octicon-ellipsis:before { content: '\f09a'} /* */
.octicon-eye-unwatch:before,
.octicon-eye-watch:before,
.octicon-eye:before { content: '\f04e'} /* */
.octicon-file-binary:before { content: '\f094'} /* */
.octicon-file-code:before { content: '\f010'} /* */
.octicon-file-directory:before { content: '\f016'} /* */
.octicon-file-media:before { content: '\f012'} /* */
.octicon-file-pdf:before { content: '\f014'} /* */
.octicon-file-submodule:before { content: '\f017'} /* */
.octicon-file-symlink-directory:before { content: '\f0b1'} /* */
.octicon-file-symlink-file:before { content: '\f0b0'} /* */
.octicon-file-text:before { content: '\f011'} /* */
.octicon-file-zip:before { content: '\f013'} /* */
.octicon-flame:before { content: '\f0d2'} /* */
.octicon-fold:before { content: '\f0cc'} /* */
.octicon-gear:before { content: '\f02f'} /* */
.octicon-gift:before { content: '\f042'} /* */
.octicon-gist:before { content: '\f00e'} /* */
.octicon-gist-secret:before { content: '\f08c'} /* */
.octicon-git-branch-create:before,
.octicon-git-branch-delete:before,
.octicon-git-branch:before { content: '\f020'} /* */
.octicon-git-commit:before { content: '\f01f'} /* */
.octicon-git-compare:before { content: '\f0ac'} /* */
.octicon-git-merge:before { content: '\f023'} /* */
.octicon-git-pull-request-abandoned:before,
.octicon-git-pull-request:before { content: '\f009'} /* */
.octicon-globe:before { content: '\f0b6'} /* */
.octicon-graph:before { content: '\f043'} /* */
.octicon-heart:before { content: '\2665'} /* ♥ */
.octicon-history:before { content: '\f07e'} /* */
.octicon-home:before { content: '\f08d'} /* */
.octicon-horizontal-rule:before { content: '\f070'} /* */
.octicon-hourglass:before { content: '\f09e'} /* */
.octicon-hubot:before { content: '\f09d'} /* */
.octicon-inbox:before { content: '\f0cf'} /* */
.octicon-info:before { content: '\f059'} /* */
.octicon-issue-closed:before { content: '\f028'} /* */
.octicon-issue-opened:before { content: '\f026'} /* */
.octicon-issue-reopened:before { content: '\f027'} /* */
.octicon-jersey:before { content: '\f019'} /* */
.octicon-jump-down:before { content: '\f072'} /* */
.octicon-jump-left:before { content: '\f0a5'} /* */
.octicon-jump-right:before { content: '\f0a6'} /* */
.octicon-jump-up:before { content: '\f073'} /* */
.octicon-key:before { content: '\f049'} /* */
.octicon-keyboard:before { content: '\f00d'} /* */
.octicon-law:before { content: '\f0d8'} /* */
.octicon-light-bulb:before { content: '\f000'} /* */
.octicon-link:before { content: '\f05c'} /* */
.octicon-link-external:before { content: '\f07f'} /* */
.octicon-list-ordered:before { content: '\f062'} /* */
.octicon-list-unordered:before { content: '\f061'} /* */
.octicon-location:before { content: '\f060'} /* */
.octicon-gist-private:before,
.octicon-mirror-private:before,
.octicon-git-fork-private:before,
.octicon-lock:before { content: '\f06a'} /* */
.octicon-logo-github:before { content: '\f092'} /* */
.octicon-mail:before { content: '\f03b'} /* */
.octicon-mail-read:before { content: '\f03c'} /* */
.octicon-mail-reply:before { content: '\f051'} /* */
.octicon-mark-github:before { content: '\f00a'} /* */
.octicon-markdown:before { content: '\f0c9'} /* */
.octicon-megaphone:before { content: '\f077'} /* */
.octicon-mention:before { content: '\f0be'} /* */
.octicon-microscope:before { content: '\f089'} /* */
.octicon-milestone:before { content: '\f075'} /* */
.octicon-mirror-public:before,
.octicon-mirror:before { content: '\f024'} /* */
.octicon-mortar-board:before { content: '\f0d7'} /* */
.octicon-move-down:before { content: '\f0a8'} /* */
.octicon-move-left:before { content: '\f074'} /* */
.octicon-move-right:before { content: '\f0a9'} /* */
.octicon-move-up:before { content: '\f0a7'} /* */
.octicon-mute:before { content: '\f080'} /* */
.octicon-no-newline:before { content: '\f09c'} /* */
.octicon-octoface:before { content: '\f008'} /* */
.octicon-organization:before { content: '\f037'} /* */
.octicon-package:before { content: '\f0c4'} /* */
.octicon-paintcan:before { content: '\f0d1'} /* */
.octicon-pencil:before { content: '\f058'} /* */
.octicon-person-add:before,
.octicon-person-follow:before,
.octicon-person:before { content: '\f018'} /* */
.octicon-pin:before { content: '\f041'} /* */
.octicon-playback-fast-forward:before { content: '\f0bd'} /* */
.octicon-playback-pause:before { content: '\f0bb'} /* */
.octicon-playback-play:before { content: '\f0bf'} /* */
.octicon-playback-rewind:before { content: '\f0bc'} /* */
.octicon-plug:before { content: '\f0d4'} /* */
.octicon-repo-create:before,
.octicon-gist-new:before,
.octicon-file-directory-create:before,
.octicon-file-add:before,
.octicon-plus:before { content: '\f05d'} /* */
.octicon-podium:before { content: '\f0af'} /* */
.octicon-primitive-dot:before { content: '\f052'} /* */
.octicon-primitive-square:before { content: '\f053'} /* */
.octicon-pulse:before { content: '\f085'} /* */
.octicon-puzzle:before { content: '\f0c0'} /* */
.octicon-question:before { content: '\f02c'} /* */
.octicon-quote:before { content: '\f063'} /* */
.octicon-radio-tower:before { content: '\f030'} /* */
.octicon-repo-delete:before,
.octicon-repo:before { content: '\f001'} /* */
.octicon-repo-clone:before { content: '\f04c'} /* */
.octicon-repo-force-push:before { content: '\f04a'} /* */
.octicon-gist-fork:before,
.octicon-repo-forked:before { content: '\f002'} /* */
.octicon-repo-pull:before { content: '\f006'} /* */
.octicon-repo-push:before { content: '\f005'} /* */
.octicon-rocket:before { content: '\f033'} /* */
.octicon-rss:before { content: '\f034'} /* */
.octicon-ruby:before { content: '\f047'} /* */
.octicon-screen-full:before { content: '\f066'} /* */
.octicon-screen-normal:before { content: '\f067'} /* */
.octicon-search-save:before,
.octicon-search:before { content: '\f02e'} /* */
.octicon-server:before { content: '\f097'} /* */
.octicon-settings:before { content: '\f07c'} /* */
.octicon-log-in:before,
.octicon-sign-in:before { content: '\f036'} /* */
.octicon-log-out:before,
.octicon-sign-out:before { content: '\f032'} /* */
.octicon-split:before { content: '\f0c6'} /* */
.octicon-squirrel:before { content: '\f0b2'} /* */
.octicon-star-add:before,
.octicon-star-delete:before,
.octicon-star:before { content: '\f02a'} /* */
.octicon-steps:before { content: '\f0c7'} /* */
.octicon-stop:before { content: '\f08f'} /* */
.octicon-repo-sync:before,
.octicon-sync:before { content: '\f087'} /* */
.octicon-tag-remove:before,
.octicon-tag-add:before,
.octicon-tag:before { content: '\f015'} /* */
.octicon-telescope:before { content: '\f088'} /* */
.octicon-terminal:before { content: '\f0c8'} /* */
.octicon-three-bars:before { content: '\f05e'} /* */
.octicon-tools:before { content: '\f031'} /* */
.octicon-trashcan:before { content: '\f0d0'} /* */
.octicon-triangle-down:before { content: '\f05b'} /* */
.octicon-triangle-left:before { content: '\f044'} /* */
.octicon-triangle-right:before { content: '\f05a'} /* */
.octicon-triangle-up:before { content: '\f0aa'} /* */
.octicon-unfold:before { content: '\f039'} /* */
.octicon-unmute:before { content: '\f0ba'} /* */
.octicon-versions:before { content: '\f064'} /* */
.octicon-remove-close:before,
.octicon-x:before { content: '\f081'} /* */
.octicon-zap:before { content: '\26A1'} /* ⚡ */
|
nixx/anime.is
|
public/octicons/sprockets-octicons.scss
|
CSS
|
unknown
| 11,758 |
nixx/anime.is
|
public/packages/.gitkeep
|
none
|
unknown
| 0 |
|
User-agent: *
Disallow:
|
nixx/anime.is
|
public/robots.txt
|
Text
|
unknown
| 24 |
<?php
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$uri = urldecode($uri);
$paths = require __DIR__.'/bootstrap/paths.php';
$requested = $paths['public'].$uri;
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' && file_exists($requested))
{
return false;
}
require_once $paths['public'].'/index.php';
|
nixx/anime.is
|
server.php
|
PHP
|
unknown
| 518 |
# Copy this file to .env and fill in the values you wish to change. Most already
# have sensible defaults. See config.ts for more details.
# PORT=7860
# SERVER_TITLE=Coom Tunnel
# MODEL_RATE_LIMIT=4
# MAX_OUTPUT_TOKENS_OPENAI=300
# MAX_OUTPUT_TOKENS_ANTHROPIC=900
# LOG_LEVEL=info
# REJECT_DISALLOWED=false
# REJECT_MESSAGE="This content violates /aicg/'s acceptable use policy."
# CHECK_KEYS=true
# QUOTA_DISPLAY_MODE=full
# QUEUE_MODE=fair
# BLOCKED_ORIGINS=reddit.com,9gag.com
# BLOCK_MESSAGE="You must be over the age of majority in your country to use this service."
# BLOCK_REDIRECT="https://roblox.com/"
# Note: CHECK_KEYS is disabled by default in local development mode, but enabled
# by default in production mode.
# Optional settings for user management. See docs/user-management.md.
# GATEKEEPER=none
# GATEKEEPER_STORE=memory
# MAX_IPS_PER_USER=20
# Optional settings for prompt logging. See docs/logging-sheets.md.
# PROMPT_LOGGING=false
# ------------------------------------------------------------------------------
# The values below are secret -- make sure they are set securely.
# For Huggingface, set them via the Secrets section in your Space's config UI.
# For Render, create a "secret file" called .env using the Environment tab.
# You can add multiple keys by separating them with a comma.
OPENAI_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ANTHROPIC_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# TEMPORARY: This will eventually be replaced by a more robust system.
# You can adjust the models used when sending OpenAI prompts to /anthropic.
# Refer to Anthropic's docs for more info (note that they don't list older
# versions of the models, but they still work).
# CLAUDE_SMALL_MODEL=claude-v1.2
# CLAUDE_BIG_MODEL=claude-v1-100k
# You can require a Bearer token for requests when using proxy_token gatekeeper.
# PROXY_KEY=your-secret-key
# You can set an admin key for user management when using user_token gatekeeper.
# ADMIN_KEY=your-very-secret-key
# These are used for various persistence features. Refer to the docs for more
# info.
# FIREBASE_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# FIREBASE_RTDB_URL=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.firebaseio.com
# This is only relevant if you want to use the prompt logging feature.
# GOOGLE_SHEETS_SPREADSHEET_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# GOOGLE_SHEETS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
knanon/oai
|
.env.example
|
example
|
unknown
| 2,459 |
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
knanon/oai
|
.gitattributes
|
Git
|
unknown
| 1,477 |
.env
.venv
.vscode
build
greeting.md
node_modules
|
knanon/oai
|
.gitignore
|
Git
|
unknown
| 50 |
# OAI Reverse Proxy
Reverse proxy server for the OpenAI and Anthropic APIs. Forwards text generation requests while rejecting administrative/billing requests. Includes optional rate limiting and prompt filtering to prevent abuse.
### Table of Contents
- [What is this?](#what-is-this)
- [Why?](#why)
- [Usage Instructions](#setup-instructions)
- [Deploy to Huggingface (Recommended)](#deploy-to-huggingface-recommended)
- [Deploy to Repl.it (WIP)](#deploy-to-replit-wip)
- [Local Development](#local-development)
## What is this?
If you would like to provide a friend access to an API via keys you own, you can use this to keep your keys safe while still allowing them to generate text with the API. You can also use this if you'd like to build a client-side application which uses the OpenAI or Anthropic APIs, but don't want to build your own backend. You should never embed your real API keys in a client-side application. Instead, you can have your frontend connect to this reverse proxy and forward requests to the downstream service.
This keeps your keys safe and allows you to use the rate limiting and prompt filtering features of the proxy to prevent abuse.
## Why?
OpenAI keys have full account permissions. They can revoke themselves, generate new keys, modify spend quotas, etc. **You absolutely should not share them, post them publicly, nor embed them in client-side applications as they can be easily stolen.**
This proxy only forwards text generation requests to the downstream service and rejects requests which would otherwise modify your account.
---
## Usage Instructions
If you'd like to run your own instance of this proxy, you'll need to deploy it somewhere and configure it with your API keys. A few easy options are provided below, though you can also deploy it to any other service you'd like.
### Deploy to Huggingface (Recommended)
[See here for instructions on how to deploy to a Huggingface Space.](./docs/deploy-huggingface.md)
### Deploy to Render
[See here for instructions on how to deploy to Render.com.](./docs/deploy-render.md)
## Local Development
To run the proxy locally for development or testing, install Node.js >= 18.0.0 and follow the steps below.
1. Clone the repo
2. Install dependencies with `npm install`
3. Create a `.env` file in the root of the project and add your API keys. See the [.env.example](./.env.example) file for an example.
4. Start the server in development mode with `npm run start:dev`.
You can also use `npm run start:dev:tsc` to enable project-wide type checking at the cost of slower startup times. `npm run type-check` can be used to run type checking without starting the server.
|
knanon/oai
|
README.md
|
Markdown
|
unknown
| 2,670 |
FROM node:18-bullseye-slim
RUN apt-get update && \
apt-get install -y git
RUN git clone https://gitgud.io/khanon/oai-reverse-proxy.git /app
WORKDIR /app
RUN npm install
COPY Dockerfile greeting.md* .env* ./
RUN npm run build
EXPOSE 7860
ENV NODE_ENV=production
CMD [ "npm", "start" ]
|
knanon/oai
|
docker/huggingface/Dockerfile
|
Dockerfile
|
unknown
| 288 |
# syntax = docker/dockerfile:1.2
FROM node:18-bullseye-slim
RUN apt-get update && \
apt-get install -y curl
# Unlike Huggingface, Render can only deploy straight from a git repo and
# doesn't allow you to create or modify arbitrary files via the web UI.
# To use a greeting file, set `GREETING_URL` to a URL that points to a raw
# text file containing your greeting, such as a GitHub Gist.
# You may need to clear the build cache if you change the greeting, otherwise
# Render will use the cached layer from the previous build.
WORKDIR /app
ARG GREETING_URL
RUN if [ -n "$GREETING_URL" ]; then \
curl -sL "$GREETING_URL" > greeting.md; \
fi
COPY package*.json greeting.md* ./
RUN npm install
COPY . .
RUN npm run build
RUN --mount=type=secret,id=_env,dst=/etc/secrets/.env cat /etc/secrets/.env >> .env
EXPOSE 10000
ENV NODE_ENV=production
CMD [ "npm", "start" ]
|
knanon/oai
|
docker/render/Dockerfile
|
Dockerfile
|
unknown
| 883 |
# Deploy to Huggingface Space
This repository can be deployed to a [Huggingface Space](https://huggingface.co/spaces). This is a free service that allows you to run a simple server in the cloud. You can use it to safely share your OpenAI API key with a friend.
### 1. Get an API key
- Go to [OpenAI](https://openai.com/) and sign up for an account. You can use a free trial key for this as long as you provide SMS verification.
- Claude is not publicly available yet, but if you have access to it via the [Anthropic](https://www.anthropic.com/) closed beta, you can also use that key with the proxy.
### 2. Create an empty Huggingface Space
- Go to [Huggingface](https://huggingface.co/) and sign up for an account.
- Once logged in, [create a new Space](https://huggingface.co/new-space).
- Provide a name for your Space and select "Docker" as the SDK. Select "Blank" for the template.
- Click "Create Space" and wait for the Space to be created.

### 3. Create an empty Dockerfile
- Once your Space is created, you'll see an option to "Create the Dockerfile in your browser". Click that link.

- Paste the following into the text editor and click "Save".
```dockerfile
FROM node:18-bullseye-slim
RUN apt-get update && \
apt-get install -y git
RUN git clone https://gitgud.io/khanon/oai-reverse-proxy.git /app
WORKDIR /app
RUN npm install
COPY Dockerfile greeting.md* .env* ./
RUN npm run build
EXPOSE 7860
ENV NODE_ENV=production
CMD [ "npm", "start" ]
```
- Click "Commit new file to `main`" to save the Dockerfile.

### 4. Set your API key as a secret
- Click the Settings button in the top right corner of your repository.
- Scroll down to the `Repository Secrets` section and click `New Secret`.

- Enter `OPENAI_KEY` as the name and your OpenAI API key as the value.
- For Claude, set `ANTHROPIC_KEY` instead.
- You can use both types of keys at the same time if you want.

### 5. Deploy the server
- Your server should automatically deploy when you add the secret, but if not you can select `Factory Reboot` from that same Settings menu.
### 6. Share the link
- The Service Info section below should show the URL for your server. You can share this with anyone to safely give them access to your API key.
- Your friend doesn't need any API key of their own, they just need your link.
# Optional
## Updating the server
To update your server, go to the Settings menu and select `Factory Reboot`. This will pull the latest version of the code from GitHub and restart the server.
Note that if you just perform a regular Restart, the server will be restarted with the same code that was running before.
## Adding a greeting message
You can create a Markdown file called `greeting.md` to display a message on the Server Info page. This is a good place to put instructions for how to use the server.
## Customizing the server
The server will be started with some default configuration, but you can override it by adding a `.env` file to your Space. You can use Huggingface's web editor to create a new `.env` file alongside your Dockerfile. Huggingface will restart your server automatically when you save the file.
Here are some example settings:
```shell
# Requests per minute per IP address
MODEL_RATE_LIMIT=4
# Max tokens to request from OpenAI
MAX_OUTPUT_TOKENS_OPENAI=256
# Max tokens to request from Anthropic (Claude)
MAX_OUTPUT_TOKENS_ANTHROPIC=512
# Block prompts containing disallowed characters
REJECT_DISALLOWED=false
REJECT_MESSAGE="This content violates /aicg/'s acceptable use policy."
# Show exact quota usage on the Server Info page
QUOTA_DISPLAY_MODE=full
```
See `.env.example` for a full list of available settings, or check `config.ts` for details on what each setting does.
## Restricting access to the server
If you want to restrict access to the server, you can set a `PROXY_KEY` secret. This key will need to be passed in the Authentication header of every request to the server, just like an OpenAI API key.
Add this using the same method as the OPENAI_KEY secret above. Don't add this to your `.env` file because that file is public and anyone can see it.
|
knanon/oai
|
docs/deploy-huggingface.md
|
Markdown
|
unknown
| 4,365 |
# Deploy to Render.com
Render.com offers a free tier that includes 750 hours of compute time per month. This is enough to run a single proxy instance 24/7. Instances shut down after 15 minutes without traffic but start up again automatically when a request is received.
### 1. Create account
- [Sign up for Render.com](https://render.com/) to create an account and access the dashboard.
### 2. Create a service using a Blueprint
Render allows you to deploy and auutomatically configure a repository containing a [render.yaml](../render.yaml) file using its Blueprints feature. This is the easiest way to get started.
- Click the **Blueprints** tab at the top of the dashboard.
- Click **New Blueprint Instance**.
- Under **Public Git repository**, enter `https://gitlab.com/khanon/oai-proxy`.
- Note that this is not the GitGud repository, but a mirror on GitLab.
- Click **Continue**.
- Under **Blueprint Name**, enter a name.
- Under **Branch**, enter `main`.
- Click **Apply**.
The service will be created according to the instructions in the `render.yaml` file. Don't wait for it to complete as it will fail due to missing environment variables. Instead, proceed to the next step.
### 3. Set environment variables
- Return to the **Dashboard** tab.
- Click the name of the service you just created, which may show as "Deploy failed".
- Click the **Environment** tab.
- Click **Add Secret File**.
- Under **Filename**, enter `.env`.
- Under **Contents**, enter all of your environment variables, one per line, in the format `NAME=value`.
- For example, `OPENAI_KEY=sk-abc123`.
- Click **Save Changes**.
The service will automatically rebuild and deploy with the new environment variables. This will take a few minutes. The link to your deployed proxy will appear at the top of the page.
If you want to change the URL, go to the **Settings** tab of your Web Service and click the **Edit** button next to **Name**. You can also set a custom domain, though I haven't tried this yet.
# Optional
## Updating the server
To update your server, go to the page for your Web Service and click **Manual Deploy** > **Deploy latest commit**. This will pull the latest version of the code and redeploy the server.
_If you have trouble with this, you can also try selecting **Clear build cache & deploy** instead from the same menu._
## Adding a greeting message
To show a greeting message on the Server Info page, set the `GREETING_URL` environment variable within Render to the URL of a Markdown file. This URL should point to a raw text file, not an HTML page. You can use a public GitHub Gist or GitLab Snippet for this. For example: `GREETING_URL=https://gitlab.com/-/snippets/2542011/raw/main/greeting.md`. You can change the title of the page by setting the `SERVER_TITLE` environment variable.
Don't set `GREETING_URL` in the `.env` secret file you created earlier; it must be set in Render's environment variables section for it to work correctly.
## Customizing the server
You can customize the server by editing the `.env` configuration you created earlier. Refer to [.env.example](../.env.example) for a list of all available configuration options. Further information can be found in the [config.ts](../src/config.ts) file.
|
knanon/oai
|
docs/deploy-render.md
|
Markdown
|
unknown
| 3,257 |
# Warning
**I strongly suggest against using this feature with a Google account that you care about.** Depending on the content of the prompts people submit, Google may flag the spreadsheet as containing inappropriate content. This seems to prevent you from sharing that spreadsheet _or any others on the account. This happened with my throwaway account during testing; the existing shared spreadsheet continues to work but even completely new spreadsheets are flagged and cannot be shared.
I'll be looking into alternative storage backends but you should not use this implementation with a Google account you care about, or even one remotely connected to your main accounts (as Google has a history of linking accounts together via IPs/browser fingerprinting). Use a VPN and completely isolated VM to be safe.
# Configuring Google Sheets Prompt Logging
This proxy can log incoming prompts and model responses to Google Sheets. Some configuration on the Google side is required to enable this feature. The APIs used are free, but you will need a Google account and a Google Cloud Platform project.
NOTE: Concurrency is not supported. Don't connect two instances of the server to the same spreadsheet or bad things will happen.
## Prerequisites
- A Google account
- **USE A THROWAWAY ACCOUNT!**
- A Google Cloud Platform project
### 0. Create a Google Cloud Platform Project
_A Google Cloud Platform project is required to enable programmatic access to Google Sheets. If you already have a project, skip to the next step. You can also see the [Google Cloud Platform documentation](https://developers.google.com/workspace/guides/create-project) for more information._
- Go to the Google Cloud Platform Console and [create a new project](https://console.cloud.google.com/projectcreate).
### 1. Enable the Google Sheets API
_The Google Sheets API must be enabled for your project. You can also see the [Google Sheets API documentation](https://developers.google.com/sheets/api/quickstart/nodejs) for more information._
- Go to the [Google Sheets API page](https://console.cloud.google.com/apis/library/sheets.googleapis.com) and click **Enable**, then fill in the form to enable the Google Sheets API for your project.
<!-- TODO: Add screenshot of Enable page and describe filling out the form -->
### 2. Create a Service Account
_A service account is required to authenticate the proxy to Google Sheets._
- Once the Google Sheets API is enabled, click the **Credentials** tab on the Google Sheets API page.
- Click **Create credentials** and select **Service account**.
- Provide a name for the service account and click **Done** (the second and third steps can be skipped).
### 3. Download the Service Account Key
_Once your account is created, you'll need to download the key file and include it in the proxy's secrets configuration._
- Click the Service Account you just created in the list of service accounts for the API.
- Click the **Keys** tab and click **Add key**, then select **Create new key**.
- Select **JSON** as the key type and click **Create**.
The JSON file will be downloaded to your computer.
### 4. Set the Service Account key as a Secret
_The JSON key file must be set as a secret in the proxy's configuration. Because files cannot be included in the secrets configuration, you'll need to base64 encode the file's contents and paste the encoded string as the value of the `GOOGLE_SHEETS_KEY` secret._
- Open the JSON key file in a text editor and copy the contents.
- Visit the [base64 encode/decode tool](https://www.base64encode.org/) and paste the contents into the box, then click **Encode**.
- Copy the encoded string and paste it as the value of the `GOOGLE_SHEETS_KEY` secret in the deployment's secrets configuration.
- **WARNING:** Don't reveal this string publically. The `.env` file is NOT private -- unless you're running the proxy locally, you should not use it to store secrets!
### 5. Create a new spreadsheet and share it with the service account
_The service account must be given permission to access the logging spreadsheet. Each service account has a unique email address, which can be found in the JSON key file; share the spreadsheet with that email address just as you would share it with another user._
- Open the JSON key file in a text editor and copy the value of the `client_email` field.
- Open the spreadsheet you want to log to, or create a new one, and click **File > Share**.
- Paste the service account's email address into the **Add people or groups** field. Ensure the service account has **Editor** permissions, then click **Done**.
### 6. Set the spreadsheet ID as a Secret
_The spreadsheet ID must be set as a secret in the proxy's configuration. The spreadsheet ID can be found in the URL of the spreadsheet. For example, the spreadsheet ID for `https://docs.google.com/spreadsheets/d/1X2Y3Z/edit#gid=0` is `1X2Y3Z`. The ID isn't necessarily a sensitive value if you intend for the spreadsheet to be public, but it's still recommended to set it as a secret._
- Copy the spreadsheet ID and paste it as the value of the `GOOGLE_SHEETS_SPREADSHEET_ID` secret in the deployment's secrets configuration.
|
knanon/oai
|
docs/logging-sheets.md
|
Markdown
|
unknown
| 5,183 |
# Shat out by GPT-4, I did not check for correctness beyond a cursory glance
openapi: 3.0.0
info:
version: 1.0.0
title: User Management API
paths:
/admin/users:
get:
summary: List all users
operationId: getUsers
responses:
"200":
description: A list of users
content:
application/json:
schema:
type: object
properties:
users:
type: array
items:
$ref: "#/components/schemas/User"
count:
type: integer
format: int32
post:
summary: Create a new user
operationId: createUser
responses:
"200":
description: The created user's token
content:
application/json:
schema:
type: object
properties:
token:
type: string
put:
summary: Bulk upsert users
operationId: bulkUpsertUsers
requestBody:
content:
application/json:
schema:
type: object
properties:
users:
type: array
items:
$ref: "#/components/schemas/User"
responses:
"200":
description: The upserted users
content:
application/json:
schema:
type: object
properties:
upserted_users:
type: array
items:
$ref: "#/components/schemas/User"
count:
type: integer
format: int32
"400":
description: Bad request
content:
application/json:
schema:
type: object
properties:
error:
type: string
/admin/users/{token}:
get:
summary: Get a user by token
operationId: getUser
parameters:
- name: token
in: path
required: true
schema:
type: string
responses:
"200":
description: A user
content:
application/json:
schema:
$ref: "#/components/schemas/User"
"404":
description: Not found
content:
application/json:
schema:
type: object
properties:
error:
type: string
put:
summary: Update a user by token
operationId: upsertUser
parameters:
- name: token
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/User"
responses:
"200":
description: The updated user
content:
application/json:
schema:
$ref: "#/components/schemas/User"
"400":
description: Bad request
content:
application/json:
schema:
type: object
properties:
error:
type: string
delete:
summary: Disables the user with the given token
description: Optionally accepts a `disabledReason` query parameter. Returns the disabled user.
parameters:
- in: path
name: token
required: true
schema:
type: string
description: The token of the user to disable
- in: query
name: disabledReason
required: false
schema:
type: string
description: The reason for disabling the user
responses:
'200':
description: The disabled user
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'400':
description: Bad request
content:
application/json:
schema:
type: object
properties:
error:
type: string
'404':
description: Not found
content:
application/json:
schema:
type: object
properties:
error:
type: string
components:
schemas:
User:
type: object
properties:
token:
type: string
ip:
type: array
items:
type: string
type:
type: string
enum: ["normal", "special"]
promptCount:
type: integer
format: int32
tokenCount:
type: integer
format: int32
createdAt:
type: integer
format: int64
lastUsedAt:
type: integer
format: int64
disabledAt:
type: integer
format: int64
disabledReason:
type: string
|
knanon/oai
|
docs/openapi-admin-users.yaml
|
YAML
|
unknown
| 5,273 |
# User Management
The proxy supports several different user management strategies. You can choose the one that best fits your needs by setting the `GATEKEEPER` environment variable.
Several of these features require you to set secrets in your environment. If using Huggingface Spaces to deploy, do not set these in your `.env` file because that file is public and anyone can see it.
## Table of Contents
- [No user management](#no-user-management-gatekeepernone)
- [Single-password authentication](#single-password-authentication-gatekeeperproxy_key)
- [Per-user authentication](#per-user-authentication-gatekeeperuser_token)
- [Memory](#memory)
- [Firebase Realtime Database](#firebase-realtime-database)
- [Firebase setup instructions](#firebase-setup-instructions)
## No user management (`GATEKEEPER=none`)
This is the default mode. The proxy will not require any authentication to access the server and offers basic IP-based rate limiting and anti-abuse features.
## Single-password authentication (`GATEKEEPER=proxy_key`)
This mode allows you to set a password that must be passed in the `Authentication` header of every request to the server as a bearer token. This is useful if you want to restrict access to the server, but don't want to create a separate account for every user.
To set the password, create a `PROXY_KEY` secret in your environment.
## Per-user authentication (`GATEKEEPER=user_token`)
This mode allows you to provision separate Bearer tokens for each user. You can manage users via the /admin/users REST API, which itself requires an admin Bearer token.
To begin, set `ADMIN_KEY` to a secret value. This will be used to authenticate requests to the /admin/users REST API.
[You can find an OpenAPI specification for the /admin/users REST API here.](openapi-admin-users.yaml)
By default, the proxy will store user data in memory. Naturally, this means that user data will be lost when the proxy is restarted, though you can use the bulk user import/export feature to save and restore user data manually or via a script. However, the proxy also supports persisting user data to an external data store with some additional configuration.
Below are the supported data stores and their configuration options.
### Memory
This is the default data store (`GATEKEEPER_STORE=memory`) User data will be stored in memory and will be lost when the proxy is restarted. You are responsible for downloading and re-uploading user data via the REST API if you want to persist it.
### Firebase Realtime Database
To use Firebase Realtime Database to persist user data, set the following environment variables:
- `GATEKEEPER_STORE`: Set this to `firebase_rtdb`
- **Secret** `FIREBASE_RTDB_URL`: The URL of your Firebase Realtime Database, e.g. `https://my-project-default-rtdb.firebaseio.com`
- **Secret** `FIREBASE_KEY`: A base-64 encoded service account key for your Firebase project. Refer to the instructions below for how to create this key.
**Firebase setup instructions**
1. Go to the [Firebase console](https://console.firebase.google.com/) and click "Add project", then follow the prompts to create a new project.
2. From the **Project Overview** page, click **All products** in the left sidebar, then click **Realtime Database**.
3. Click **Create database** and choose **Start in test mode**. Click **Enable**.
- Test mode is fine for this use case as it still requires authentication to access the database. You may wish to set up more restrictive rules if you plan to use the database for other purposes.
- The reference URL for the database will be displayed on the page. You will need this later.
4. Click the gear icon next to **Project Overview** in the left sidebar, then click **Project settings**.
5. Click the **Service accounts** tab, then click **Generate new private key**.
6. The downloaded file contains your key. Encode it as base64 and set it as the `FIREBASE_KEY` secret in your environment.
7. Set `FIREBASE_RTDB_URL` to the reference URL of your Firebase Realtime Database, e.g. `https://my-project-default-rtdb.firebaseio.com`.
8. Set `GATEKEEPER_STORE` to `firebase_rtdb` in your environment if you haven't already.
The proxy will attempt to connect to your Firebase Realtime Database at startup and will throw an error if it cannot connect. If you see this error, check that your `FIREBASE_RTDB_URL` and `FIREBASE_KEY` secrets are set correctly.
---
Users are loaded from the database and changes are flushed periodically. You can use the PUT /admin/users API to bulk import users and force a flush to the database.
|
knanon/oai
|
docs/user-management.md
|
Markdown
|
unknown
| 4,602 |
{
"name": "oai-reverse-proxy",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "oai-reverse-proxy",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"axios": "^1.3.5",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"firebase-admin": "^11.10.1",
"googleapis": "^122.0.0",
"http-proxy-middleware": "^3.0.0-beta.1",
"openai": "^3.2.1",
"pino": "^8.11.0",
"pino-http": "^8.3.3",
"showdown": "^2.1.0",
"uuid": "^9.0.0",
"zlib": "^1.0.5",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/cors": "^2.8.13",
"@types/express": "^4.17.17",
"@types/showdown": "^2.0.0",
"@types/uuid": "^9.0.1",
"concurrently": "^8.0.1",
"esbuild": "^0.17.16",
"esbuild-register": "^3.4.2",
"nodemon": "^3.0.1",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@babel/parser": {
"version": "7.22.7",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz",
"integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==",
"optional": true,
"bin": {
"parser": "bin/babel-parser.js"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@cspotcode/source-map-support": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
"dev": true,
"dependencies": {
"@jridgewell/trace-mapping": "0.3.9"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/android-arm": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.16.tgz",
"integrity": "sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/android-arm64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.16.tgz",
"integrity": "sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/android-x64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.16.tgz",
"integrity": "sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/darwin-arm64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.16.tgz",
"integrity": "sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/darwin-x64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.16.tgz",
"integrity": "sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/freebsd-arm64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.16.tgz",
"integrity": "sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/freebsd-x64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.16.tgz",
"integrity": "sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-arm": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.16.tgz",
"integrity": "sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-arm64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.16.tgz",
"integrity": "sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-ia32": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.16.tgz",
"integrity": "sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.16.tgz",
"integrity": "sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ==",
"cpu": [
"loong64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-mips64el": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.16.tgz",
"integrity": "sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA==",
"cpu": [
"mips64el"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-ppc64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.16.tgz",
"integrity": "sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q==",
"cpu": [
"ppc64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-riscv64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.16.tgz",
"integrity": "sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA==",
"cpu": [
"riscv64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-s390x": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.16.tgz",
"integrity": "sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw==",
"cpu": [
"s390x"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-x64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.16.tgz",
"integrity": "sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/netbsd-x64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.16.tgz",
"integrity": "sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/openbsd-x64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.16.tgz",
"integrity": "sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/sunos-x64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.16.tgz",
"integrity": "sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/win32-arm64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.16.tgz",
"integrity": "sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/win32-ia32": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.16.tgz",
"integrity": "sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/win32-x64": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.16.tgz",
"integrity": "sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@fastify/busboy": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-1.2.1.tgz",
"integrity": "sha512-7PQA7EH43S0CxcOa9OeAnaeA0oQ+e/DHNPZwSQM9CQHW76jle5+OvLdibRp/Aafs9KXbLhxyjOTkRjWUbQEd3Q==",
"dependencies": {
"text-decoding": "^1.0.0"
},
"engines": {
"node": ">=14"
}
},
"node_modules/@firebase/app-types": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.0.tgz",
"integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q=="
},
"node_modules/@firebase/auth-interop-types": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@firebase/auth-interop-types/-/auth-interop-types-0.2.1.tgz",
"integrity": "sha512-VOaGzKp65MY6P5FI84TfYKBXEPi6LmOCSMMzys6o2BN2LOsqy7pCuZCup7NYnfbk5OkkQKzvIfHOzTm0UDpkyg=="
},
"node_modules/@firebase/component": {
"version": "0.6.4",
"resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.4.tgz",
"integrity": "sha512-rLMyrXuO9jcAUCaQXCMjCMUsWrba5fzHlNK24xz5j2W6A/SRmK8mZJ/hn7V0fViLbxC0lPMtrK1eYzk6Fg03jA==",
"dependencies": {
"@firebase/util": "1.9.3",
"tslib": "^2.1.0"
}
},
"node_modules/@firebase/database": {
"version": "0.14.4",
"resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.14.4.tgz",
"integrity": "sha512-+Ea/IKGwh42jwdjCyzTmeZeLM3oy1h0mFPsTy6OqCWzcu/KFqRAr5Tt1HRCOBlNOdbh84JPZC47WLU18n2VbxQ==",
"dependencies": {
"@firebase/auth-interop-types": "0.2.1",
"@firebase/component": "0.6.4",
"@firebase/logger": "0.4.0",
"@firebase/util": "1.9.3",
"faye-websocket": "0.11.4",
"tslib": "^2.1.0"
}
},
"node_modules/@firebase/database-compat": {
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.3.4.tgz",
"integrity": "sha512-kuAW+l+sLMUKBThnvxvUZ+Q1ZrF/vFJ58iUY9kAcbX48U03nVzIF6Tmkf0p3WVQwMqiXguSgtOPIB6ZCeF+5Gg==",
"dependencies": {
"@firebase/component": "0.6.4",
"@firebase/database": "0.14.4",
"@firebase/database-types": "0.10.4",
"@firebase/logger": "0.4.0",
"@firebase/util": "1.9.3",
"tslib": "^2.1.0"
}
},
"node_modules/@firebase/database-types": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.10.4.tgz",
"integrity": "sha512-dPySn0vJ/89ZeBac70T+2tWWPiJXWbmRygYv0smT5TfE3hDrQ09eKMF3Y+vMlTdrMWq7mUdYW5REWPSGH4kAZQ==",
"dependencies": {
"@firebase/app-types": "0.9.0",
"@firebase/util": "1.9.3"
}
},
"node_modules/@firebase/logger": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.4.0.tgz",
"integrity": "sha512-eRKSeykumZ5+cJPdxxJRgAC3G5NknY2GwEbKfymdnXtnT0Ucm4pspfR6GT4MUQEDuJwRVbVcSx85kgJulMoFFA==",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@firebase/util": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.9.3.tgz",
"integrity": "sha512-DY02CRhOZwpzO36fHpuVysz6JZrscPiBXD0fXp6qSrL9oNOx5KWICKdR95C0lSITzxp0TZosVyHqzatE8JbcjA==",
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@google-cloud/firestore": {
"version": "6.6.1",
"resolved": "https://registry.npmjs.org/@google-cloud/firestore/-/firestore-6.6.1.tgz",
"integrity": "sha512-Z41j2h0mrgBH9qNIVmbRLqGKc6XmdJtWipeKwdnGa/bPTP1gn2SGTrYyWnpfsLMEtzKSYieHPSkAFp5kduF2RA==",
"optional": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"functional-red-black-tree": "^1.0.1",
"google-gax": "^3.5.7",
"protobufjs": "^7.0.0"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/@google-cloud/paginator": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-3.0.7.tgz",
"integrity": "sha512-jJNutk0arIQhmpUUQJPJErsojqo834KcyB6X7a1mxuic8i1tKXxde8E69IZxNZawRIlZdIK2QY4WALvlK5MzYQ==",
"optional": true,
"dependencies": {
"arrify": "^2.0.0",
"extend": "^3.0.2"
},
"engines": {
"node": ">=10"
}
},
"node_modules/@google-cloud/projectify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-3.0.0.tgz",
"integrity": "sha512-HRkZsNmjScY6Li8/kb70wjGlDDyLkVk3KvoEo9uIoxSjYLJasGiCch9+PqRVDOCGUFvEIqyogl+BeqILL4OJHA==",
"optional": true,
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/@google-cloud/promisify": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-3.0.1.tgz",
"integrity": "sha512-z1CjRjtQyBOYL+5Qr9DdYIfrdLBe746jRTYfaYU6MeXkqp7UfYs/jX16lFFVzZ7PGEJvqZNqYUEtb1mvDww4pA==",
"optional": true,
"engines": {
"node": ">=12"
}
},
"node_modules/@google-cloud/storage": {
"version": "6.10.1",
"resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-6.10.1.tgz",
"integrity": "sha512-EtLlT0YbXtrbUxaNbEfTyTytrjELtl4i42flf8COg+Hu5+apdNjsFO9XEY39wshxAuVjLf4fCSm7GTSW+BD3gQ==",
"optional": true,
"dependencies": {
"@google-cloud/paginator": "^3.0.7",
"@google-cloud/projectify": "^3.0.0",
"@google-cloud/promisify": "^3.0.0",
"abort-controller": "^3.0.0",
"async-retry": "^1.3.3",
"compressible": "^2.0.12",
"duplexify": "^4.0.0",
"ent": "^2.2.0",
"extend": "^3.0.2",
"gaxios": "^5.0.0",
"google-auth-library": "^8.0.1",
"mime": "^3.0.0",
"mime-types": "^2.0.8",
"p-limit": "^3.0.1",
"retry-request": "^5.0.0",
"teeny-request": "^8.0.0",
"uuid": "^8.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@google-cloud/storage/node_modules/mime": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
"integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==",
"optional": true,
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/@google-cloud/storage/node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"optional": true,
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/@grpc/grpc-js": {
"version": "1.8.17",
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.17.tgz",
"integrity": "sha512-DGuSbtMFbaRsyffMf+VEkVu8HkSXEUfO3UyGJNtqxW9ABdtTIA+2UXAJpwbJS+xfQxuwqLUeELmL6FuZkOqPxw==",
"optional": true,
"dependencies": {
"@grpc/proto-loader": "^0.7.0",
"@types/node": ">=12.12.47"
},
"engines": {
"node": "^8.13.0 || >=10.10.0"
}
},
"node_modules/@grpc/proto-loader": {
"version": "0.7.7",
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.7.tgz",
"integrity": "sha512-1TIeXOi8TuSCQprPItwoMymZXxWT0CPxUhkrkeCUH+D8U7QDwQ6b7SUz2MaLuWM2llT+J/TVFLmQI5KtML3BhQ==",
"optional": true,
"dependencies": {
"@types/long": "^4.0.1",
"lodash.camelcase": "^4.3.0",
"long": "^4.0.0",
"protobufjs": "^7.0.0",
"yargs": "^17.7.2"
},
"bin": {
"proto-loader-gen-types": "build/bin/proto-loader-gen-types.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
"dev": true,
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.4.15",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
"dev": true
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
"dev": true,
"dependencies": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"node_modules/@jsdoc/salty": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz",
"integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==",
"optional": true,
"dependencies": {
"lodash": "^4.17.21"
},
"engines": {
"node": ">=v12.0.0"
}
},
"node_modules/@protobufjs/aspromise": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
"optional": true
},
"node_modules/@protobufjs/base64": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
"optional": true
},
"node_modules/@protobufjs/codegen": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
"optional": true
},
"node_modules/@protobufjs/eventemitter": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
"optional": true
},
"node_modules/@protobufjs/fetch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
"optional": true,
"dependencies": {
"@protobufjs/aspromise": "^1.1.1",
"@protobufjs/inquire": "^1.1.0"
}
},
"node_modules/@protobufjs/float": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
"optional": true
},
"node_modules/@protobufjs/inquire": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
"optional": true
},
"node_modules/@protobufjs/path": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
"optional": true
},
"node_modules/@protobufjs/pool": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
"optional": true
},
"node_modules/@protobufjs/utf8": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
"optional": true
},
"node_modules/@tootallnate/once": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
"integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
"optional": true,
"engines": {
"node": ">= 10"
}
},
"node_modules/@tsconfig/node10": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
"integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
"dev": true
},
"node_modules/@tsconfig/node12": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
"dev": true
},
"node_modules/@tsconfig/node14": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
"dev": true
},
"node_modules/@tsconfig/node16": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz",
"integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==",
"dev": true
},
"node_modules/@types/body-parser": {
"version": "1.19.2",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
"integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
"dependencies": {
"@types/connect": "*",
"@types/node": "*"
}
},
"node_modules/@types/connect": {
"version": "3.4.35",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
"integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/cors": {
"version": "2.8.13",
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz",
"integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==",
"dev": true,
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/express": {
"version": "4.17.17",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz",
"integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==",
"dependencies": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "^4.17.33",
"@types/qs": "*",
"@types/serve-static": "*"
}
},
"node_modules/@types/express-serve-static-core": {
"version": "4.17.33",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz",
"integrity": "sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==",
"dependencies": {
"@types/node": "*",
"@types/qs": "*",
"@types/range-parser": "*"
}
},
"node_modules/@types/glob": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz",
"integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==",
"optional": true,
"dependencies": {
"@types/minimatch": "^5.1.2",
"@types/node": "*"
}
},
"node_modules/@types/http-proxy": {
"version": "1.17.10",
"resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.10.tgz",
"integrity": "sha512-Qs5aULi+zV1bwKAg5z1PWnDXWmsn+LxIvUGv6E2+OOMYhclZMO+OXd9pYVf2gLykf2I7IV2u7oTHwChPNsvJ7g==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/jsonwebtoken": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
"integrity": "sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/linkify-it": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.2.tgz",
"integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==",
"optional": true
},
"node_modules/@types/long": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
"integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==",
"optional": true
},
"node_modules/@types/markdown-it": {
"version": "12.2.3",
"resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz",
"integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==",
"optional": true,
"dependencies": {
"@types/linkify-it": "*",
"@types/mdurl": "*"
}
},
"node_modules/@types/mdurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz",
"integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==",
"optional": true
},
"node_modules/@types/mime": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz",
"integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA=="
},
"node_modules/@types/minimatch": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
"integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==",
"optional": true
},
"node_modules/@types/node": {
"version": "18.15.11",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz",
"integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q=="
},
"node_modules/@types/qs": {
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw=="
},
"node_modules/@types/range-parser": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw=="
},
"node_modules/@types/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==",
"optional": true,
"dependencies": {
"@types/glob": "*",
"@types/node": "*"
}
},
"node_modules/@types/serve-static": {
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz",
"integrity": "sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==",
"dependencies": {
"@types/mime": "*",
"@types/node": "*"
}
},
"node_modules/@types/showdown": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@types/showdown/-/showdown-2.0.0.tgz",
"integrity": "sha512-70xBJoLv+oXjB5PhtA8vo7erjLDp9/qqI63SRHm4REKrwuPOLs8HhXwlZJBJaB4kC18cCZ1UUZ6Fb/PLFW4TCA==",
"dev": true
},
"node_modules/@types/uuid": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz",
"integrity": "sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==",
"dev": true
},
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
},
"node_modules/abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"dependencies": {
"event-target-shim": "^5.0.0"
},
"engines": {
"node": ">=6.5"
}
},
"node_modules/accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
"dependencies": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/acorn": {
"version": "8.10.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
"integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
"devOptional": true,
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/acorn-jsx": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"optional": true,
"peerDependencies": {
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
"node_modules/acorn-walk": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
"dev": true,
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
"dependencies": {
"debug": "4"
},
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/agent-base/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/agent-base/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"devOptional": true,
"engines": {
"node": ">=8"
}
},
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"devOptional": true,
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/anymatch": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
"dev": true
},
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"optional": true
},
"node_modules/array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
},
"node_modules/arrify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
"integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
"engines": {
"node": ">=8"
}
},
"node_modules/async-retry": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz",
"integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==",
"optional": true,
"dependencies": {
"retry": "0.13.1"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/atomic-sleep": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz",
"integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==",
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/axios": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.5.tgz",
"integrity": "sha512-glL/PvG/E+xCWwV8S6nCHcrfg1exGx7vxyUIivIA1iL7BIh6bePylCfVHwp6k13ao7SATxB6imau2kqY+I67kw==",
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"devOptional": true
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/bignumber.js": {
"version": "9.1.1",
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz",
"integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==",
"engines": {
"node": "*"
}
},
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
"optional": true
},
"node_modules/body-parser": {
"version": "1.20.1",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
"integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
"dependencies": {
"bytes": "3.1.2",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
"http-errors": "2.0.0",
"iconv-lite": "0.4.24",
"on-finished": "2.4.1",
"qs": "6.11.0",
"raw-body": "2.5.1",
"type-is": "~1.6.18",
"unpipe": "1.0.0"
},
"engines": {
"node": ">= 0.8",
"npm": "1.2.8000 || >= 1.4.16"
}
},
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"devOptional": true,
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dependencies": {
"fill-range": "^7.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.2.1"
}
},
"node_modules/buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
},
"node_modules/buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true
},
"node_modules/bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/call-bind": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"dependencies": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/catharsis": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz",
"integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==",
"optional": true,
"dependencies": {
"lodash": "^4.17.15"
},
"engines": {
"node": ">= 10"
}
},
"node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"devOptional": true,
"dependencies": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/chalk/node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"devOptional": true,
"engines": {
"node": ">=8"
}
},
"node_modules/chalk/node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"devOptional": true,
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"dev": true,
"funding": [
{
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
],
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/cliui": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
"devOptional": true,
"dependencies": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.1",
"wrap-ansi": "^7.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"devOptional": true,
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"devOptional": true
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/commander": {
"version": "9.5.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"engines": {
"node": "^12.20.0 || >=14"
}
},
"node_modules/compressible": {
"version": "2.0.18",
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
"integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
"optional": true,
"dependencies": {
"mime-db": ">= 1.43.0 < 2"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"devOptional": true
},
"node_modules/concurrently": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.0.1.tgz",
"integrity": "sha512-Sh8bGQMEL0TAmAm2meAXMjcASHZa7V0xXQVDBLknCPa9TPtkY9yYs+0cnGGgfdkW0SV1Mlg+hVGfXcoI8d3MJA==",
"dev": true,
"dependencies": {
"chalk": "^4.1.2",
"date-fns": "^2.29.3",
"lodash": "^4.17.21",
"rxjs": "^7.8.0",
"shell-quote": "^1.8.0",
"spawn-command": "0.0.2-1",
"supports-color": "^8.1.1",
"tree-kill": "^1.2.2",
"yargs": "^17.7.1"
},
"bin": {
"conc": "dist/bin/concurrently.js",
"concurrently": "dist/bin/concurrently.js"
},
"engines": {
"node": "^14.13.0 || >=16.0.0"
},
"funding": {
"url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
}
},
"node_modules/concurrently/node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/concurrently/node_modules/supports-color": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
"dev": true,
"dependencies": {
"has-flag": "^4.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
"node_modules/content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
"dependencies": {
"safe-buffer": "5.2.1"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/content-type": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
"integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/cookie-signature": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
},
"node_modules/cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"dependencies": {
"object-assign": "^4",
"vary": "^1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/create-require": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"dev": true
},
"node_modules/date-fns": {
"version": "2.29.3",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz",
"integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==",
"dev": true,
"engines": {
"node": ">=0.11"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/date-fns"
}
},
"node_modules/debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/deep-is": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
"optional": true
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/destroy": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
"engines": {
"node": ">= 0.8",
"npm": "1.2.8000 || >= 1.4.16"
}
},
"node_modules/diff": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
"dev": true,
"engines": {
"node": ">=0.3.1"
}
},
"node_modules/dotenv": {
"version": "16.0.3",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz",
"integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==",
"engines": {
"node": ">=12"
}
},
"node_modules/duplexify": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz",
"integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==",
"optional": true,
"dependencies": {
"end-of-stream": "^1.4.1",
"inherits": "^2.0.3",
"readable-stream": "^3.1.1",
"stream-shift": "^1.0.0"
}
},
"node_modules/duplexify/node_modules/readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"optional": true,
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/ecdsa-sig-formatter": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
"dependencies": {
"safe-buffer": "^5.0.1"
}
},
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
},
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"devOptional": true
},
"node_modules/encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/end-of-stream": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"optional": true,
"dependencies": {
"once": "^1.4.0"
}
},
"node_modules/ent": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz",
"integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==",
"optional": true
},
"node_modules/entities": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz",
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==",
"optional": true,
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/esbuild": {
"version": "0.17.16",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.16.tgz",
"integrity": "sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
"node": ">=12"
},
"optionalDependencies": {
"@esbuild/android-arm": "0.17.16",
"@esbuild/android-arm64": "0.17.16",
"@esbuild/android-x64": "0.17.16",
"@esbuild/darwin-arm64": "0.17.16",
"@esbuild/darwin-x64": "0.17.16",
"@esbuild/freebsd-arm64": "0.17.16",
"@esbuild/freebsd-x64": "0.17.16",
"@esbuild/linux-arm": "0.17.16",
"@esbuild/linux-arm64": "0.17.16",
"@esbuild/linux-ia32": "0.17.16",
"@esbuild/linux-loong64": "0.17.16",
"@esbuild/linux-mips64el": "0.17.16",
"@esbuild/linux-ppc64": "0.17.16",
"@esbuild/linux-riscv64": "0.17.16",
"@esbuild/linux-s390x": "0.17.16",
"@esbuild/linux-x64": "0.17.16",
"@esbuild/netbsd-x64": "0.17.16",
"@esbuild/openbsd-x64": "0.17.16",
"@esbuild/sunos-x64": "0.17.16",
"@esbuild/win32-arm64": "0.17.16",
"@esbuild/win32-ia32": "0.17.16",
"@esbuild/win32-x64": "0.17.16"
}
},
"node_modules/esbuild-register": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.4.2.tgz",
"integrity": "sha512-kG/XyTDyz6+YDuyfB9ZoSIOOmgyFCH+xPRtsCa8W85HLRV5Csp+o3jWVbOSHgSLfyLc5DmP+KFDNwty4mEjC+Q==",
"dev": true,
"dependencies": {
"debug": "^4.3.4"
},
"peerDependencies": {
"esbuild": ">=0.12 <1"
}
},
"node_modules/esbuild-register/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dev": true,
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/esbuild-register/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"node_modules/escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
"devOptional": true,
"engines": {
"node": ">=6"
}
},
"node_modules/escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
},
"node_modules/escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"optional": true,
"engines": {
"node": ">=8"
}
},
"node_modules/escodegen": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
"integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
"optional": true,
"dependencies": {
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1"
},
"bin": {
"escodegen": "bin/escodegen.js",
"esgenerate": "bin/esgenerate.js"
},
"engines": {
"node": ">=4.0"
},
"optionalDependencies": {
"source-map": "~0.6.1"
}
},
"node_modules/escodegen/node_modules/estraverse": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"optional": true,
"engines": {
"node": ">=4.0"
}
},
"node_modules/escodegen/node_modules/levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
"integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
"optional": true,
"dependencies": {
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/escodegen/node_modules/optionator": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
"optional": true,
"dependencies": {
"deep-is": "~0.1.3",
"fast-levenshtein": "~2.0.6",
"levn": "~0.3.0",
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2",
"word-wrap": "~1.2.3"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/escodegen/node_modules/prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
"integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
"optional": true,
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/escodegen/node_modules/type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
"integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
"optional": true,
"dependencies": {
"prelude-ls": "~1.1.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/eslint-visitor-keys": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
"integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
"optional": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/espree": {
"version": "9.6.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.6.0.tgz",
"integrity": "sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==",
"optional": true,
"dependencies": {
"acorn": "^8.9.0",
"acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"optional": true,
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/estraverse": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
"optional": true,
"engines": {
"node": ">=4.0"
}
},
"node_modules/esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"optional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/eventemitter3": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
},
"node_modules/events": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"engines": {
"node": ">=0.8.x"
}
},
"node_modules/express": {
"version": "4.18.2",
"resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
"integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
"dependencies": {
"accepts": "~1.3.8",
"array-flatten": "1.1.1",
"body-parser": "1.20.1",
"content-disposition": "0.5.4",
"content-type": "~1.0.4",
"cookie": "0.5.0",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "2.0.0",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "1.2.0",
"fresh": "0.5.2",
"http-errors": "2.0.0",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.7",
"qs": "6.11.0",
"range-parser": "~1.2.1",
"safe-buffer": "5.2.1",
"send": "0.18.0",
"serve-static": "1.15.0",
"setprototypeof": "1.2.0",
"statuses": "2.0.1",
"type-is": "~1.6.18",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
},
"engines": {
"node": ">= 0.10.0"
}
},
"node_modules/extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"optional": true
},
"node_modules/fast-levenshtein": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
"optional": true
},
"node_modules/fast-redact": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.1.2.tgz",
"integrity": "sha512-+0em+Iya9fKGfEQGcd62Yv6onjBmmhV1uh86XVfOU8VwAe6kaFdQCWI9s0/Nnugx5Vd9tdbZ7e6gE2tR9dzXdw==",
"engines": {
"node": ">=6"
}
},
"node_modules/fast-text-encoding": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz",
"integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w=="
},
"node_modules/faye-websocket": {
"version": "0.11.4",
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz",
"integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==",
"dependencies": {
"websocket-driver": ">=0.5.1"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dependencies": {
"to-regex-range": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/finalhandler": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
"integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
"dependencies": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"on-finished": "2.4.1",
"parseurl": "~1.3.3",
"statuses": "2.0.1",
"unpipe": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/firebase-admin": {
"version": "11.10.1",
"resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-11.10.1.tgz",
"integrity": "sha512-atv1E6GbuvcvWaD3eHwrjeP5dAVs+EaHEJhu9CThMzPY6In8QYDiUR6tq5SwGl4SdA/GcAU0nhwWc/FSJsAzfQ==",
"dependencies": {
"@fastify/busboy": "^1.2.1",
"@firebase/database-compat": "^0.3.4",
"@firebase/database-types": "^0.10.4",
"@types/node": ">=12.12.47",
"jsonwebtoken": "^9.0.0",
"jwks-rsa": "^3.0.1",
"node-forge": "^1.3.1",
"uuid": "^9.0.0"
},
"engines": {
"node": ">=14"
},
"optionalDependencies": {
"@google-cloud/firestore": "^6.6.0",
"@google-cloud/storage": "^6.9.5"
}
},
"node_modules/follow-redirects": {
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"optional": true
},
"node_modules/fsevents": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"node_modules/functional-red-black-tree": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
"integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==",
"optional": true
},
"node_modules/gaxios": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.0.tgz",
"integrity": "sha512-aezGIjb+/VfsJtIcHGcBSerNEDdfdHeMros+RbYbGpmonKWQCOVOes0LVZhn1lDtIgq55qq0HaxymIoae3Fl/A==",
"dependencies": {
"extend": "^3.0.2",
"https-proxy-agent": "^5.0.0",
"is-stream": "^2.0.0",
"node-fetch": "^2.6.7"
},
"engines": {
"node": ">=12"
}
},
"node_modules/gcp-metadata": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.2.0.tgz",
"integrity": "sha512-aFhhvvNycky2QyhG+dcfEdHBF0FRbYcf39s6WNHUDysKSrbJ5vuFbjydxBcmewtXeV248GP8dWT3ByPNxsyHCw==",
"dependencies": {
"gaxios": "^5.0.0",
"json-bigint": "^1.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/get-intrinsic": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
"integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
"dependencies": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.3"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/glob": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"optional": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/glob/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"optional": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/glob/node_modules/minimatch": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"optional": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=10"
}
},
"node_modules/google-auth-library": {
"version": "8.7.0",
"resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.7.0.tgz",
"integrity": "sha512-1M0NG5VDIvJZEnstHbRdckLZESoJwguinwN8Dhae0j2ZKIQFIV63zxm6Fo6nM4xkgqUr2bbMtV5Dgo+Hy6oo0Q==",
"dependencies": {
"arrify": "^2.0.0",
"base64-js": "^1.3.0",
"ecdsa-sig-formatter": "^1.0.11",
"fast-text-encoding": "^1.0.0",
"gaxios": "^5.0.0",
"gcp-metadata": "^5.0.0",
"gtoken": "^6.1.0",
"jws": "^4.0.0",
"lru-cache": "^6.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/google-gax": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/google-gax/-/google-gax-3.6.1.tgz",
"integrity": "sha512-g/lcUjGcB6DSw2HxgEmCDOrI/CByOwqRvsuUvNalHUK2iPPPlmAIpbMbl62u0YufGMr8zgE3JL7th6dCb1Ry+w==",
"optional": true,
"dependencies": {
"@grpc/grpc-js": "~1.8.0",
"@grpc/proto-loader": "^0.7.0",
"@types/long": "^4.0.0",
"@types/rimraf": "^3.0.2",
"abort-controller": "^3.0.0",
"duplexify": "^4.0.0",
"fast-text-encoding": "^1.0.3",
"google-auth-library": "^8.0.2",
"is-stream-ended": "^0.1.4",
"node-fetch": "^2.6.1",
"object-hash": "^3.0.0",
"proto3-json-serializer": "^1.0.0",
"protobufjs": "7.2.4",
"protobufjs-cli": "1.1.1",
"retry-request": "^5.0.0"
},
"bin": {
"compileProtos": "build/tools/compileProtos.js",
"minifyProtoJson": "build/tools/minify.js"
},
"engines": {
"node": ">=12"
}
},
"node_modules/google-p12-pem": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz",
"integrity": "sha512-WPkN4yGtz05WZ5EhtlxNDWPhC4JIic6G8ePitwUWy4l+XPVYec+a0j0Ts47PDtW59y3RwAhUd9/h9ZZ63px6RQ==",
"dependencies": {
"node-forge": "^1.3.1"
},
"bin": {
"gp12-pem": "build/src/bin/gp12-pem.js"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/googleapis": {
"version": "122.0.0",
"resolved": "https://registry.npmjs.org/googleapis/-/googleapis-122.0.0.tgz",
"integrity": "sha512-n8Gt7j9LzSkhQEGPOrcLBKxllTvW/0v6oILuwszL/zqgelNsGJYXVqPJllgJJ6RM7maJ6T35UBeYqI6GQ/IlJg==",
"dependencies": {
"google-auth-library": "^8.0.2",
"googleapis-common": "^6.0.0"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/googleapis-common": {
"version": "6.0.4",
"resolved": "https://registry.npmjs.org/googleapis-common/-/googleapis-common-6.0.4.tgz",
"integrity": "sha512-m4ErxGE8unR1z0VajT6AYk3s6a9gIMM6EkDZfkPnES8joeOlEtFEJeF8IyZkb0tjPXkktUfYrE4b3Li1DNyOwA==",
"dependencies": {
"extend": "^3.0.2",
"gaxios": "^5.0.1",
"google-auth-library": "^8.0.2",
"qs": "^6.7.0",
"url-template": "^2.0.8",
"uuid": "^9.0.0"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/graceful-fs": {
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"optional": true
},
"node_modules/gtoken": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/gtoken/-/gtoken-6.1.2.tgz",
"integrity": "sha512-4ccGpzz7YAr7lxrT2neugmXQ3hP9ho2gcaityLVkiUecAiwiy60Ii8gRbZeOsXV19fYaRjgBSshs8kXw+NKCPQ==",
"dependencies": {
"gaxios": "^5.0.1",
"google-p12-pem": "^4.0.0",
"jws": "^4.0.0"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dependencies": {
"function-bind": "^1.1.1"
},
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/http-errors": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
"dependencies": {
"depd": "2.0.0",
"inherits": "2.0.4",
"setprototypeof": "1.2.0",
"statuses": "2.0.1",
"toidentifier": "1.0.1"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/http-parser-js": {
"version": "0.5.8",
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
"integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q=="
},
"node_modules/http-proxy": {
"version": "1.18.1",
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
"dependencies": {
"eventemitter3": "^4.0.0",
"follow-redirects": "^1.0.0",
"requires-port": "^1.0.0"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/http-proxy-agent": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
"integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
"optional": true,
"dependencies": {
"@tootallnate/once": "2",
"agent-base": "6",
"debug": "4"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/http-proxy-agent/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"optional": true,
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/http-proxy-agent/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"optional": true
},
"node_modules/http-proxy-middleware": {
"version": "3.0.0-beta.1",
"resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-3.0.0-beta.1.tgz",
"integrity": "sha512-hdiTlVVoaxncf239csnEpG5ew2lRWnoNR1PMWOO6kYulSphlrfLs5JFZtFVH3R5EUWSZNMkeUqvkvfctuWaK8A==",
"dependencies": {
"@types/http-proxy": "^1.17.10",
"debug": "^4.3.4",
"http-proxy": "^1.18.1",
"is-glob": "^4.0.1",
"is-plain-obj": "^3.0.0",
"micromatch": "^4.0.5"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/http-proxy-middleware/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/http-proxy-middleware/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
"dependencies": {
"agent-base": "6",
"debug": "4"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/https-proxy-agent/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/https-proxy-agent/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/ignore-by-default": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
"integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
"dev": true
},
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"optional": true,
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/ipaddr.js": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"dependencies": {
"binary-extensions": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"devOptional": true,
"engines": {
"node": ">=8"
}
},
"node_modules/is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dependencies": {
"is-extglob": "^2.1.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/is-plain-obj": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
"integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-stream": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
"integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-stream-ended": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz",
"integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==",
"optional": true
},
"node_modules/jose": {
"version": "4.14.4",
"resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz",
"integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==",
"funding": {
"url": "https://github.com/sponsors/panva"
}
},
"node_modules/js2xmlparser": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz",
"integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==",
"optional": true,
"dependencies": {
"xmlcreate": "^2.0.4"
}
},
"node_modules/jsdoc": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz",
"integrity": "sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==",
"optional": true,
"dependencies": {
"@babel/parser": "^7.20.15",
"@jsdoc/salty": "^0.2.1",
"@types/markdown-it": "^12.2.3",
"bluebird": "^3.7.2",
"catharsis": "^0.9.0",
"escape-string-regexp": "^2.0.0",
"js2xmlparser": "^4.0.2",
"klaw": "^3.0.0",
"markdown-it": "^12.3.2",
"markdown-it-anchor": "^8.4.1",
"marked": "^4.0.10",
"mkdirp": "^1.0.4",
"requizzle": "^0.2.3",
"strip-json-comments": "^3.1.0",
"underscore": "~1.13.2"
},
"bin": {
"jsdoc": "jsdoc.js"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/json-bigint": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
"integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
"dependencies": {
"bignumber.js": "^9.0.0"
}
},
"node_modules/jsonwebtoken": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
"integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==",
"dependencies": {
"jws": "^3.2.2",
"lodash": "^4.17.21",
"ms": "^2.1.1",
"semver": "^7.3.8"
},
"engines": {
"node": ">=12",
"npm": ">=6"
}
},
"node_modules/jsonwebtoken/node_modules/jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jsonwebtoken/node_modules/jws": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
"dependencies": {
"jwa": "^1.4.1",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jsonwebtoken/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/jwa": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz",
"integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==",
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
},
"node_modules/jwks-rsa": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-3.0.1.tgz",
"integrity": "sha512-UUOZ0CVReK1QVU3rbi9bC7N5/le8ziUj0A2ef1Q0M7OPD2KvjEYizptqIxGIo6fSLYDkqBrazILS18tYuRc8gw==",
"dependencies": {
"@types/express": "^4.17.14",
"@types/jsonwebtoken": "^9.0.0",
"debug": "^4.3.4",
"jose": "^4.10.4",
"limiter": "^1.1.5",
"lru-memoizer": "^2.1.4"
},
"engines": {
"node": ">=14"
}
},
"node_modules/jwks-rsa/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/jwks-rsa/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/jws": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz",
"integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==",
"dependencies": {
"jwa": "^2.0.0",
"safe-buffer": "^5.0.1"
}
},
"node_modules/klaw": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
"integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
"optional": true,
"dependencies": {
"graceful-fs": "^4.1.9"
}
},
"node_modules/limiter": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz",
"integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA=="
},
"node_modules/linkify-it": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz",
"integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==",
"optional": true,
"dependencies": {
"uc.micro": "^1.0.1"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/lodash.camelcase": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"optional": true
},
"node_modules/lodash.clonedeep": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ=="
},
"node_modules/long": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==",
"optional": true
},
"node_modules/lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/lru-memoizer": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-2.2.0.tgz",
"integrity": "sha512-QfOZ6jNkxCcM/BkIPnFsqDhtrazLRsghi9mBwFAzol5GCvj4EkFT899Za3+QwikCg5sRX8JstioBDwOxEyzaNw==",
"dependencies": {
"lodash.clonedeep": "^4.5.0",
"lru-cache": "~4.0.0"
}
},
"node_modules/lru-memoizer/node_modules/lru-cache": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz",
"integrity": "sha512-uQw9OqphAGiZhkuPlpFGmdTU2tEuhxTourM/19qGJrxBPHAr/f8BT1a0i/lOclESnGatdJG/UCkP9kZB/Lh1iw==",
"dependencies": {
"pseudomap": "^1.0.1",
"yallist": "^2.0.0"
}
},
"node_modules/lru-memoizer/node_modules/yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A=="
},
"node_modules/make-error": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"dev": true
},
"node_modules/markdown-it": {
"version": "12.3.2",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz",
"integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==",
"optional": true,
"dependencies": {
"argparse": "^2.0.1",
"entities": "~2.1.0",
"linkify-it": "^3.0.1",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
},
"bin": {
"markdown-it": "bin/markdown-it.js"
}
},
"node_modules/markdown-it-anchor": {
"version": "8.6.7",
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz",
"integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==",
"optional": true,
"peerDependencies": {
"@types/markdown-it": "*",
"markdown-it": "*"
}
},
"node_modules/marked": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz",
"integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==",
"optional": true,
"bin": {
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 12"
}
},
"node_modules/mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==",
"optional": true
},
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
"integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
},
"node_modules/methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/micromatch": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
"dependencies": {
"braces": "^3.0.2",
"picomatch": "^2.3.1"
},
"engines": {
"node": ">=8.6"
}
},
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"devOptional": true,
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"optional": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"optional": true,
"bin": {
"mkdirp": "bin/cmd.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
},
"node_modules/negotiator": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/node-fetch": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz",
"integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/node-forge": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
"integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
"engines": {
"node": ">= 6.13.0"
}
},
"node_modules/nodemon": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz",
"integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==",
"dev": true,
"dependencies": {
"chokidar": "^3.5.2",
"debug": "^3.2.7",
"ignore-by-default": "^1.0.1",
"minimatch": "^3.1.2",
"pstree.remy": "^1.1.8",
"semver": "^7.5.3",
"simple-update-notifier": "^2.0.0",
"supports-color": "^5.5.0",
"touch": "^3.1.0",
"undefsafe": "^2.0.5"
},
"bin": {
"nodemon": "bin/nodemon.js"
},
"engines": {
"node": ">=10"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/nodemon"
}
},
"node_modules/nodemon/node_modules/debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"dependencies": {
"ms": "^2.1.1"
}
},
"node_modules/nodemon/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true
},
"node_modules/nopt": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
"integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
"dev": true,
"dependencies": {
"abbrev": "1"
},
"bin": {
"nopt": "bin/nopt.js"
},
"engines": {
"node": "*"
}
},
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-hash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
"optional": true,
"engines": {
"node": ">= 6"
}
},
"node_modules/object-inspect": {
"version": "1.12.3",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
"integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/on-exit-leak-free": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz",
"integrity": "sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w=="
},
"node_modules/on-finished": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
"dependencies": {
"ee-first": "1.1.1"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"optional": true,
"dependencies": {
"wrappy": "1"
}
},
"node_modules/openai": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/openai/-/openai-3.2.1.tgz",
"integrity": "sha512-762C9BNlJPbjjlWZi4WYK9iM2tAVAv0uUp1UmI34vb0CN5T2mjB/qM6RYBmNKMh/dN9fC+bxqPwWJZUTWW052A==",
"dependencies": {
"axios": "^0.26.0",
"form-data": "^4.0.0"
}
},
"node_modules/openai/node_modules/axios": {
"version": "0.26.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"dependencies": {
"follow-redirects": "^1.14.8"
}
},
"node_modules/p-limit": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"optional": true,
"dependencies": {
"yocto-queue": "^0.1.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
"optional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
},
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"engines": {
"node": ">=8.6"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/pino": {
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/pino/-/pino-8.11.0.tgz",
"integrity": "sha512-Z2eKSvlrl2rH8p5eveNUnTdd4AjJk8tAsLkHYZQKGHP4WTh2Gi1cOSOs3eWPqaj+niS3gj4UkoreoaWgF3ZWYg==",
"dependencies": {
"atomic-sleep": "^1.0.0",
"fast-redact": "^3.1.1",
"on-exit-leak-free": "^2.1.0",
"pino-abstract-transport": "v1.0.0",
"pino-std-serializers": "^6.0.0",
"process-warning": "^2.0.0",
"quick-format-unescaped": "^4.0.3",
"real-require": "^0.2.0",
"safe-stable-stringify": "^2.3.1",
"sonic-boom": "^3.1.0",
"thread-stream": "^2.0.0"
},
"bin": {
"pino": "bin.js"
}
},
"node_modules/pino-abstract-transport": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.0.0.tgz",
"integrity": "sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==",
"dependencies": {
"readable-stream": "^4.0.0",
"split2": "^4.0.0"
}
},
"node_modules/pino-http": {
"version": "8.3.3",
"resolved": "https://registry.npmjs.org/pino-http/-/pino-http-8.3.3.tgz",
"integrity": "sha512-p4umsNIXXVu95HD2C8wie/vXH7db5iGRpc+yj1/ZQ3sRtTQLXNjoS6Be5+eI+rQbqCRxen/7k/KSN+qiZubGDw==",
"dependencies": {
"get-caller-file": "^2.0.5",
"pino": "^8.0.0",
"pino-std-serializers": "^6.0.0",
"process-warning": "^2.0.0"
}
},
"node_modules/pino-std-serializers": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-6.1.0.tgz",
"integrity": "sha512-KO0m2f1HkrPe9S0ldjx7za9BJjeHqBku5Ch8JyxETxT8dEFGz1PwgrHaOQupVYitpzbFSYm7nnljxD8dik2c+g=="
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/process-warning": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.2.0.tgz",
"integrity": "sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg=="
},
"node_modules/proto3-json-serializer": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-1.1.1.tgz",
"integrity": "sha512-AwAuY4g9nxx0u52DnSMkqqgyLHaW/XaPLtaAo3y/ZCfeaQB/g4YDH4kb8Wc/mWzWvu0YjOznVnfn373MVZZrgw==",
"optional": true,
"dependencies": {
"protobufjs": "^7.0.0"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/protobufjs": {
"version": "7.2.4",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz",
"integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==",
"hasInstallScript": true,
"optional": true,
"dependencies": {
"@protobufjs/aspromise": "^1.1.2",
"@protobufjs/base64": "^1.1.2",
"@protobufjs/codegen": "^2.0.4",
"@protobufjs/eventemitter": "^1.1.0",
"@protobufjs/fetch": "^1.1.0",
"@protobufjs/float": "^1.0.2",
"@protobufjs/inquire": "^1.1.0",
"@protobufjs/path": "^1.1.2",
"@protobufjs/pool": "^1.1.0",
"@protobufjs/utf8": "^1.1.0",
"@types/node": ">=13.7.0",
"long": "^5.0.0"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/protobufjs-cli": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/protobufjs-cli/-/protobufjs-cli-1.1.1.tgz",
"integrity": "sha512-VPWMgIcRNyQwWUv8OLPyGQ/0lQY/QTQAVN5fh+XzfDwsVw1FZ2L3DM/bcBf8WPiRz2tNpaov9lPZfNcmNo6LXA==",
"optional": true,
"dependencies": {
"chalk": "^4.0.0",
"escodegen": "^1.13.0",
"espree": "^9.0.0",
"estraverse": "^5.1.0",
"glob": "^8.0.0",
"jsdoc": "^4.0.0",
"minimist": "^1.2.0",
"semver": "^7.1.2",
"tmp": "^0.2.1",
"uglify-js": "^3.7.7"
},
"bin": {
"pbjs": "bin/pbjs",
"pbts": "bin/pbts"
},
"engines": {
"node": ">=12.0.0"
},
"peerDependencies": {
"protobufjs": "^7.0.0"
}
},
"node_modules/protobufjs/node_modules/long": {
"version": "5.2.3",
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
"integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==",
"optional": true
},
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
"dependencies": {
"forwarded": "0.2.0",
"ipaddr.js": "1.9.1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"node_modules/pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ=="
},
"node_modules/pstree.remy": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
"integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
"dev": true
},
"node_modules/qs": {
"version": "6.11.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"dependencies": {
"side-channel": "^1.0.4"
},
"engines": {
"node": ">=0.6"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/quick-format-unescaped": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz",
"integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg=="
},
"node_modules/range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/raw-body": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
"integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
"dependencies": {
"bytes": "3.1.2",
"http-errors": "2.0.0",
"iconv-lite": "0.4.24",
"unpipe": "1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/readable-stream": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.3.0.tgz",
"integrity": "sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==",
"dependencies": {
"abort-controller": "^3.0.0",
"buffer": "^6.0.3",
"events": "^3.3.0",
"process": "^0.11.10"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"dependencies": {
"picomatch": "^2.2.1"
},
"engines": {
"node": ">=8.10.0"
}
},
"node_modules/real-require": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz",
"integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==",
"engines": {
"node": ">= 12.13.0"
}
},
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
"devOptional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
},
"node_modules/requizzle": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz",
"integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==",
"optional": true,
"dependencies": {
"lodash": "^4.17.21"
}
},
"node_modules/retry": {
"version": "0.13.1",
"resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
"integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
"optional": true,
"engines": {
"node": ">= 4"
}
},
"node_modules/retry-request": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/retry-request/-/retry-request-5.0.2.tgz",
"integrity": "sha512-wfI3pk7EE80lCIXprqh7ym48IHYdwmAAzESdbU8Q9l7pnRCk9LEhpbOTNKjz6FARLm/Bl5m+4F0ABxOkYUujSQ==",
"optional": true,
"dependencies": {
"debug": "^4.1.1",
"extend": "^3.0.2"
},
"engines": {
"node": ">=12"
}
},
"node_modules/retry-request/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"optional": true,
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/retry-request/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"optional": true
},
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"optional": true,
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"optional": true,
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rxjs": {
"version": "7.8.0",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz",
"integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==",
"dev": true,
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/safe-stable-stringify": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz",
"integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==",
"engines": {
"node": ">=10"
}
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/semver": {
"version": "7.5.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz",
"integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==",
"dependencies": {
"lru-cache": "^6.0.0"
},
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/send": {
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
"integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
"dependencies": {
"debug": "2.6.9",
"depd": "2.0.0",
"destroy": "1.2.0",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"fresh": "0.5.2",
"http-errors": "2.0.0",
"mime": "1.6.0",
"ms": "2.1.3",
"on-finished": "2.4.1",
"range-parser": "~1.2.1",
"statuses": "2.0.1"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/send/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
},
"node_modules/serve-static": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
"integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
"dependencies": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"parseurl": "~1.3.3",
"send": "0.18.0"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/setprototypeof": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
},
"node_modules/shell-quote": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz",
"integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/showdown": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/showdown/-/showdown-2.1.0.tgz",
"integrity": "sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==",
"dependencies": {
"commander": "^9.0.0"
},
"bin": {
"showdown": "bin/showdown.js"
},
"funding": {
"type": "individual",
"url": "https://www.paypal.me/tiviesantos"
}
},
"node_modules/side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"dependencies": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/simple-update-notifier": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
"integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
"dev": true,
"dependencies": {
"semver": "^7.5.3"
},
"engines": {
"node": ">=10"
}
},
"node_modules/sonic-boom": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.3.0.tgz",
"integrity": "sha512-LYxp34KlZ1a2Jb8ZQgFCK3niIHzibdwtwNUWKg0qQRzsDoJ3Gfgkf8KdBTFU3SkejDEIlWwnSnpVdOZIhFMl/g==",
"dependencies": {
"atomic-sleep": "^1.0.0"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"devOptional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-support": {
"version": "0.5.21",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
"dev": true,
"dependencies": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
}
},
"node_modules/spawn-command": {
"version": "0.0.2-1",
"resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz",
"integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==",
"dev": true
},
"node_modules/split2": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
"integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
"engines": {
"node": ">= 10.x"
}
},
"node_modules/statuses": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/stream-events": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz",
"integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==",
"optional": true,
"dependencies": {
"stubs": "^3.0.0"
}
},
"node_modules/stream-shift": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
"integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
"optional": true
},
"node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"optional": true,
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"devOptional": true,
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"devOptional": true,
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-json-comments": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"optional": true,
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/stubs": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz",
"integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==",
"optional": true
},
"node_modules/supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/teeny-request": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-8.0.3.tgz",
"integrity": "sha512-jJZpA5He2y52yUhA7pyAGZlgQpcB+xLjcN0eUFxr9c8hP/H7uOXbBNVo/O0C/xVfJLJs680jvkFgVJEEvk9+ww==",
"optional": true,
"dependencies": {
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.1",
"stream-events": "^1.0.5",
"uuid": "^9.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/text-decoding": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/text-decoding/-/text-decoding-1.0.0.tgz",
"integrity": "sha512-/0TJD42KDnVwKmDK6jj3xP7E2MG7SHAOG4tyTgyUCRPdHwvkquYNLEQltmdMa3owq3TkddCVcTsoctJI8VQNKA=="
},
"node_modules/thread-stream": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.3.0.tgz",
"integrity": "sha512-kaDqm1DET9pp3NXwR8382WHbnpXnRkN9xGN9dQt3B2+dmXiW8X1SOwmFOxAErEQ47ObhZ96J6yhZNXuyCOL7KA==",
"dependencies": {
"real-require": "^0.2.0"
}
},
"node_modules/tmp": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
"integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==",
"optional": true,
"dependencies": {
"rimraf": "^3.0.0"
},
"engines": {
"node": ">=8.17.0"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dependencies": {
"is-number": "^7.0.0"
},
"engines": {
"node": ">=8.0"
}
},
"node_modules/toidentifier": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
"engines": {
"node": ">=0.6"
}
},
"node_modules/touch": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
"dev": true,
"dependencies": {
"nopt": "~1.0.10"
},
"bin": {
"nodetouch": "bin/nodetouch.js"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"node_modules/tree-kill": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
"integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
"dev": true,
"bin": {
"tree-kill": "cli.js"
}
},
"node_modules/ts-node": {
"version": "10.9.1",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
"integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
"dev": true,
"dependencies": {
"@cspotcode/source-map-support": "^0.8.0",
"@tsconfig/node10": "^1.0.7",
"@tsconfig/node12": "^1.0.7",
"@tsconfig/node14": "^1.0.0",
"@tsconfig/node16": "^1.0.2",
"acorn": "^8.4.1",
"acorn-walk": "^8.1.1",
"arg": "^4.1.0",
"create-require": "^1.1.0",
"diff": "^4.0.1",
"make-error": "^1.1.1",
"v8-compile-cache-lib": "^3.0.1",
"yn": "3.1.1"
},
"bin": {
"ts-node": "dist/bin.js",
"ts-node-cwd": "dist/bin-cwd.js",
"ts-node-esm": "dist/bin-esm.js",
"ts-node-script": "dist/bin-script.js",
"ts-node-transpile-only": "dist/bin-transpile.js",
"ts-script": "dist/bin-script-deprecated.js"
},
"peerDependencies": {
"@swc/core": ">=1.2.50",
"@swc/wasm": ">=1.2.50",
"@types/node": "*",
"typescript": ">=2.7"
},
"peerDependenciesMeta": {
"@swc/core": {
"optional": true
},
"@swc/wasm": {
"optional": true
}
}
},
"node_modules/tslib": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
},
"node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"dependencies": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/typescript": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
"integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=12.20"
}
},
"node_modules/uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
"optional": true
},
"node_modules/uglify-js": {
"version": "3.17.4",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
"integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==",
"optional": true,
"bin": {
"uglifyjs": "bin/uglifyjs"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/undefsafe": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
"integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
"dev": true
},
"node_modules/underscore": {
"version": "1.13.6",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==",
"optional": true
},
"node_modules/unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/url-template": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz",
"integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw=="
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"optional": true
},
"node_modules/utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/uuid": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/v8-compile-cache-lib": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
"dev": true
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"node_modules/websocket-driver": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
"integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
"dependencies": {
"http-parser-js": ">=0.5.1",
"safe-buffer": ">=5.1.0",
"websocket-extensions": ">=0.1.1"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/websocket-extensions": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/word-wrap": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz",
"integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==",
"optional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"devOptional": true,
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"optional": true
},
"node_modules/xmlcreate": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz",
"integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==",
"optional": true
},
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
"devOptional": true,
"engines": {
"node": ">=10"
}
},
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/yargs": {
"version": "17.7.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
"devOptional": true,
"dependencies": {
"cliui": "^8.0.1",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
"require-directory": "^2.1.1",
"string-width": "^4.2.3",
"y18n": "^5.0.5",
"yargs-parser": "^21.1.1"
},
"engines": {
"node": ">=12"
}
},
"node_modules/yargs-parser": {
"version": "21.1.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
"devOptional": true,
"engines": {
"node": ">=12"
}
},
"node_modules/yn": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/yocto-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
"optional": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/zlib": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/zlib/-/zlib-1.0.5.tgz",
"integrity": "sha512-40fpE2II+Cd3k8HWTWONfeKE2jL+P42iWJ1zzps5W51qcTsOUKM5Q5m2PFb0CLxlmFAaUuUdJGc3OfZy947v0w==",
"hasInstallScript": true,
"engines": {
"node": ">=0.2.0"
}
},
"node_modules/zod": {
"version": "3.21.4",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz",
"integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
}
}
}
|
knanon/oai
|
package-lock.json
|
JSON
|
unknown
| 157,719 |
{
"name": "oai-reverse-proxy",
"version": "1.0.0",
"description": "Reverse proxy for the OpenAI API",
"scripts": {
"build:watch": "esbuild src/server.ts --outfile=build/server.js --platform=node --target=es2020 --format=cjs --bundle --sourcemap --watch",
"build": "tsc",
"start:dev": "concurrently \"npm run build:watch\" \"npm run start:watch\"",
"start:dev:tsc": "nodemon --watch src --exec ts-node --transpile-only src/server.ts",
"start:watch": "nodemon --require source-map-support/register build/server.js",
"start:replit": "tsc && node build/server.js",
"start": "node build/server.js",
"type-check": "tsc --noEmit"
},
"engines": {
"node": ">=18.0.0"
},
"author": "",
"license": "MIT",
"dependencies": {
"axios": "^1.3.5",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"firebase-admin": "^11.10.1",
"googleapis": "^122.0.0",
"http-proxy-middleware": "^3.0.0-beta.1",
"openai": "^3.2.1",
"pino": "^8.11.0",
"pino-http": "^8.3.3",
"showdown": "^2.1.0",
"uuid": "^9.0.0",
"zlib": "^1.0.5",
"zod": "^3.21.4"
},
"devDependencies": {
"@types/cors": "^2.8.13",
"@types/express": "^4.17.17",
"@types/showdown": "^2.0.0",
"@types/uuid": "^9.0.1",
"concurrently": "^8.0.1",
"esbuild": "^0.17.16",
"esbuild-register": "^3.4.2",
"nodemon": "^3.0.1",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
"overrides": {
"google-gax": "^3.6.1"
}
}
|
knanon/oai
|
package.json
|
JSON
|
unknown
| 1,553 |
services:
- type: web
name: oai-proxy
env: docker
repo: https://gitlab.com/khanon/oai-proxy.git
region: oregon
plan: free
branch: main
healthCheckPath: /health
dockerfilePath: ./docker/render/Dockerfile
|
knanon/oai
|
render.yaml
|
YAML
|
unknown
| 240 |
import { RequestHandler, Router } from "express";
import { config } from "../config";
import { usersRouter } from "./users";
const ADMIN_KEY = config.adminKey;
const failedAttempts = new Map<string, number>();
const adminRouter = Router();
const auth: RequestHandler = (req, res, next) => {
const token = req.headers.authorization?.slice("Bearer ".length);
const attempts = failedAttempts.get(req.ip) ?? 0;
if (attempts > 5) {
req.log.warn(
{ ip: req.ip, token },
`Blocked request to admin API due to too many failed attempts`
);
return res.status(401).json({ error: "Too many attempts" });
}
if (token !== ADMIN_KEY) {
const newAttempts = attempts + 1;
failedAttempts.set(req.ip, newAttempts);
req.log.warn(
{ ip: req.ip, attempts: newAttempts, token },
`Attempted admin API request with invalid token`
);
return res.status(401).json({ error: "Unauthorized" });
}
next();
};
adminRouter.use(auth);
adminRouter.use("/users", usersRouter);
export { adminRouter };
|
knanon/oai
|
src/admin/routes.ts
|
TypeScript
|
unknown
| 1,039 |
import { Router } from "express";
import { z } from "zod";
import * as userStore from "../proxy/auth/user-store";
const usersRouter = Router();
const UserSchema = z
.object({
ip: z.array(z.string()).optional(),
type: z.enum(["normal", "special"]).optional(),
promptCount: z.number().optional(),
tokenCount: z.number().optional(),
createdAt: z.number().optional(),
lastUsedAt: z.number().optional(),
disabledAt: z.number().optional(),
disabledReason: z.string().optional(),
})
.strict();
const UserSchemaWithToken = UserSchema.extend({
token: z.string(),
}).strict();
/**
* Returns a list of all users, sorted by prompt count and then last used time.
* GET /admin/users
*/
usersRouter.get("/", (_req, res) => {
const users = userStore.getUsers().sort((a, b) => {
if (a.promptCount !== b.promptCount) {
return b.promptCount - a.promptCount;
}
return (b.lastUsedAt ?? 0) - (a.lastUsedAt ?? 0);
});
res.json({ users, count: users.length });
});
/**
* Returns the user with the given token.
* GET /admin/users/:token
*/
usersRouter.get("/:token", (req, res) => {
const user = userStore.getUser(req.params.token);
if (!user) {
return res.status(404).json({ error: "Not found" });
}
res.json(user);
});
/**
* Creates a new user.
* Returns the created user's token.
* POST /admin/users
*/
usersRouter.post("/", (_req, res) => {
res.json({ token: userStore.createUser() });
});
/**
* Updates the user with the given token, creating them if they don't exist.
* Accepts a JSON body containing at least one field on the User type.
* Returns the upserted user.
* PUT /admin/users/:token
*/
usersRouter.put("/:token", (req, res) => {
const result = UserSchema.safeParse(req.body);
if (!result.success) {
return res.status(400).json({ error: result.error });
}
userStore.upsertUser({ ...result.data, token: req.params.token });
res.json(userStore.getUser(req.params.token));
});
/**
* Bulk-upserts users given a list of User updates.
* Accepts a JSON body with the field `users` containing an array of updates.
* Returns an object containing the upserted users and the number of upserts.
* PUT /admin/users
*/
usersRouter.put("/", (req, res) => {
const result = z.array(UserSchemaWithToken).safeParse(req.body.users);
if (!result.success) {
return res.status(400).json({ error: result.error });
}
const upserts = result.data.map((user) => userStore.upsertUser(user));
res.json({
upserted_users: upserts,
count: upserts.length,
});
});
/**
* Disables the user with the given token. Optionally accepts a `disabledReason`
* query parameter.
* Returns the disabled user.
* DELETE /admin/users/:token
*/
usersRouter.delete("/:token", (req, res) => {
const user = userStore.getUser(req.params.token);
const disabledReason = z
.string()
.optional()
.safeParse(req.query.disabledReason);
if (!disabledReason.success) {
return res.status(400).json({ error: disabledReason.error });
}
if (!user) {
return res.status(404).json({ error: "Not found" });
}
userStore.disableUser(req.params.token, disabledReason.data);
res.json(userStore.getUser(req.params.token));
});
export { usersRouter };
|
knanon/oai
|
src/admin/users.ts
|
TypeScript
|
unknown
| 3,252 |
import dotenv from "dotenv";
import type firebase from "firebase-admin";
import pino from "pino";
dotenv.config();
// Can't import the usual logger here because it itself needs the config.
const startupLogger = pino({ level: "debug" }).child({ module: "startup" });
const isDev = process.env.NODE_ENV !== "production";
type PromptLoggingBackend = "google_sheets";
export type DequeueMode = "fair" | "random" | "none";
type Config = {
/** The port the proxy server will listen on. */
port: number;
/** Comma-delimited list of OpenAI API keys. */
openaiKey?: string;
/** Comma-delimited list of Anthropic API keys. */
anthropicKey?: string;
/**
* The proxy key to require for requests. Only applicable if the user
* management mode is set to 'proxy_key', and required if so.
**/
proxyKey?: string;
/**
* The admin key used to access the /admin API. Required if the user
* management mode is set to 'user_token'.
**/
adminKey?: string;
/**
* Which user management mode to use.
*
* `none`: No user management. Proxy is open to all requests with basic
* abuse protection.
*
* `proxy_key`: A specific proxy key must be provided in the Authorization
* header to use the proxy.
*
* `user_token`: Users must be created via the /admin REST API and provide
* their personal access token in the Authorization header to use the proxy.
* Configure this function and add users via the /admin API.
*/
gatekeeper: "none" | "proxy_key" | "user_token";
/**
* Persistence layer to use for user management.
*
* `memory`: Users are stored in memory and are lost on restart (default)
*
* `firebase_rtdb`: Users are stored in a Firebase Realtime Database; requires
* `firebaseKey` and `firebaseRtdbUrl` to be set.
**/
gatekeeperStore: "memory" | "firebase_rtdb";
/** URL of the Firebase Realtime Database if using the Firebase RTDB store. */
firebaseRtdbUrl?: string;
/** Base64-encoded Firebase service account key if using the Firebase RTDB store. */
firebaseKey?: string;
/**
* Maximum number of IPs per user, after which their token is disabled.
* Users with the manually-assigned `special` role are exempt from this limit.
* By default, this is 0, meaning that users are not IP-limited.
*/
maxIpsPerUser: number;
/** Per-IP limit for requests per minute to OpenAI's completions endpoint. */
modelRateLimit: number;
/** For OpenAI, the maximum number of sampled tokens a user can request. */
maxOutputTokensOpenAI: number;
/** For Anthropic, the maximum number of sampled tokens a user can request. */
maxOutputTokensAnthropic: number;
/** Whether requests containing disallowed characters should be rejected. */
rejectDisallowed?: boolean;
/** Message to return when rejecting requests. */
rejectMessage?: string;
/** Pino log level. */
logLevel?: "debug" | "info" | "warn" | "error";
/** Whether prompts and responses should be logged to persistent storage. */
promptLogging?: boolean;
/** Which prompt logging backend to use. */
promptLoggingBackend?: PromptLoggingBackend;
/** Base64-encoded Google Sheets API key. */
googleSheetsKey?: string;
/** Google Sheets spreadsheet ID. */
googleSheetsSpreadsheetId?: string;
/** Whether to periodically check keys for usage and validity. */
checkKeys?: boolean;
/**
* How to display quota information on the info page.
*
* `none`: Hide quota information
*
* `partial`: Display quota information only as a percentage
*
* `full`: Display quota information as usage against total capacity
*/
quotaDisplayMode: "none" | "partial" | "full";
/**
* Which request queueing strategy to use when keys are over their rate limit.
*
* `fair`: Requests are serviced in the order they were received (default)
*
* `random`: Requests are serviced randomly
*
* `none`: Requests are not queued and users have to retry manually
*/
queueMode: DequeueMode;
/**
* Comma-separated list of origins to block. Requests matching any of these
* origins or referers will be rejected.
* Partial matches are allowed, so `reddit` will match `www.reddit.com`.
* Include only the hostname, not the protocol or path, e.g:
* `reddit.com,9gag.com,gaiaonline.com`
*/
blockedOrigins?: string;
/**
* Message to return when rejecting requests from blocked origins.
*/
blockMessage?: string;
/**
* Desination URL to redirect blocked requests to, for non-JSON requests.
*/
blockRedirect?: string;
/**
* Whether the proxy should disallow requests for GPT-4 models in order to
* prevent excessive spend. Applies only to OpenAI.
*/
turboOnly?: boolean;
};
// To change configs, create a file called .env in the root directory.
// See .env.example for an example.
export const config: Config = {
port: getEnvWithDefault("PORT", 7860),
openaiKey: getEnvWithDefault("OPENAI_KEY", ""),
anthropicKey: getEnvWithDefault("ANTHROPIC_KEY", ""),
proxyKey: getEnvWithDefault("PROXY_KEY", ""),
adminKey: getEnvWithDefault("ADMIN_KEY", ""),
gatekeeper: getEnvWithDefault("GATEKEEPER", "none"),
gatekeeperStore: getEnvWithDefault("GATEKEEPER_STORE", "memory"),
maxIpsPerUser: getEnvWithDefault("MAX_IPS_PER_USER", 0),
firebaseRtdbUrl: getEnvWithDefault("FIREBASE_RTDB_URL", undefined),
firebaseKey: getEnvWithDefault("FIREBASE_KEY", undefined),
modelRateLimit: getEnvWithDefault("MODEL_RATE_LIMIT", 4),
maxOutputTokensOpenAI: getEnvWithDefault("MAX_OUTPUT_TOKENS_OPENAI", 300),
maxOutputTokensAnthropic: getEnvWithDefault(
"MAX_OUTPUT_TOKENS_ANTHROPIC",
600
),
rejectDisallowed: getEnvWithDefault("REJECT_DISALLOWED", false),
rejectMessage: getEnvWithDefault(
"REJECT_MESSAGE",
"This content violates /aicg/'s acceptable use policy."
),
logLevel: getEnvWithDefault("LOG_LEVEL", "info"),
checkKeys: getEnvWithDefault("CHECK_KEYS", !isDev),
quotaDisplayMode: getEnvWithDefault("QUOTA_DISPLAY_MODE", "partial"),
promptLogging: getEnvWithDefault("PROMPT_LOGGING", false),
promptLoggingBackend: getEnvWithDefault("PROMPT_LOGGING_BACKEND", undefined),
googleSheetsKey: getEnvWithDefault("GOOGLE_SHEETS_KEY", undefined),
googleSheetsSpreadsheetId: getEnvWithDefault(
"GOOGLE_SHEETS_SPREADSHEET_ID",
undefined
),
queueMode: getEnvWithDefault("QUEUE_MODE", "fair"),
blockedOrigins: getEnvWithDefault("BLOCKED_ORIGINS", undefined),
blockMessage: getEnvWithDefault(
"BLOCK_MESSAGE",
"You must be over the age of majority in your country to use this service."
),
blockRedirect: getEnvWithDefault("BLOCK_REDIRECT", "https://www.9gag.com"),
turboOnly: getEnvWithDefault("TURBO_ONLY", false),
} as const;
function migrateConfigs() {
let migrated = false;
const deprecatedMax = process.env.MAX_OUTPUT_TOKENS;
if (!process.env.MAX_OUTPUT_TOKENS_OPENAI && deprecatedMax) {
migrated = true;
config.maxOutputTokensOpenAI = parseInt(deprecatedMax);
}
if (!process.env.MAX_OUTPUT_TOKENS_ANTHROPIC && deprecatedMax) {
migrated = true;
config.maxOutputTokensAnthropic = parseInt(deprecatedMax);
}
if (migrated) {
startupLogger.warn(
{
MAX_OUTPUT_TOKENS: deprecatedMax,
MAX_OUTPUT_TOKENS_OPENAI: config.maxOutputTokensOpenAI,
MAX_OUTPUT_TOKENS_ANTHROPIC: config.maxOutputTokensAnthropic,
},
"`MAX_OUTPUT_TOKENS` has been replaced with separate `MAX_OUTPUT_TOKENS_OPENAI` and `MAX_OUTPUT_TOKENS_ANTHROPIC` configs. You should update your .env file to remove `MAX_OUTPUT_TOKENS` and set the new configs."
);
}
}
/** Prevents the server from starting if config state is invalid. */
export async function assertConfigIsValid() {
migrateConfigs();
// Ensure gatekeeper mode is valid.
if (!["none", "proxy_key", "user_token"].includes(config.gatekeeper)) {
throw new Error(
`Invalid gatekeeper mode: ${config.gatekeeper}. Must be one of: none, proxy_key, user_token.`
);
}
// Don't allow `user_token` mode without `ADMIN_KEY`.
if (config.gatekeeper === "user_token" && !config.adminKey) {
throw new Error(
"`user_token` gatekeeper mode requires an `ADMIN_KEY` to be set."
);
}
// Don't allow `proxy_key` mode without `PROXY_KEY`.
if (config.gatekeeper === "proxy_key" && !config.proxyKey) {
throw new Error(
"`proxy_key` gatekeeper mode requires a `PROXY_KEY` to be set."
);
}
// Don't allow `PROXY_KEY` to be set for other modes.
if (config.gatekeeper !== "proxy_key" && config.proxyKey) {
throw new Error(
"`PROXY_KEY` is set, but gatekeeper mode is not `proxy_key`. Make sure to set `GATEKEEPER=proxy_key`."
);
}
// Require appropriate firebase config if using firebase store.
if (
config.gatekeeperStore === "firebase_rtdb" &&
(!config.firebaseKey || !config.firebaseRtdbUrl)
) {
throw new Error(
"Firebase RTDB store requires `FIREBASE_KEY` and `FIREBASE_RTDB_URL` to be set."
);
}
// Ensure forks which add new secret-like config keys don't unwittingly expose
// them to users.
for (const key of getKeys(config)) {
const maybeSensitive = ["key", "credentials", "secret", "password"].some(
(sensitive) => key.toLowerCase().includes(sensitive)
);
const secured = new Set([...SENSITIVE_KEYS, ...OMITTED_KEYS]);
if (maybeSensitive && !secured.has(key))
throw new Error(
`Config key "${key}" may be sensitive but is exposed. Add it to SENSITIVE_KEYS or OMITTED_KEYS.`
);
}
await maybeInitializeFirebase();
}
/**
* Config keys that are masked on the info page, but not hidden as their
* presence may be relevant to the user due to privacy implications.
*/
export const SENSITIVE_KEYS: (keyof Config)[] = ["googleSheetsSpreadsheetId"];
/**
* Config keys that are not displayed on the info page at all, generally because
* they are not relevant to the user or can be inferred from other config.
*/
export const OMITTED_KEYS: (keyof Config)[] = [
"port",
"logLevel",
"openaiKey",
"anthropicKey",
"proxyKey",
"adminKey",
"checkKeys",
"quotaDisplayMode",
"googleSheetsKey",
"firebaseKey",
"firebaseRtdbUrl",
"gatekeeperStore",
"maxIpsPerUser",
"blockedOrigins",
"blockMessage",
"blockRedirect",
];
const getKeys = Object.keys as <T extends object>(obj: T) => Array<keyof T>;
export function listConfig(): Record<string, string> {
const result: Record<string, string> = {};
for (const key of getKeys(config)) {
const value = config[key]?.toString() || "";
const shouldOmit =
OMITTED_KEYS.includes(key) || value === "" || value === "undefined";
const shouldMask = SENSITIVE_KEYS.includes(key);
if (shouldOmit) {
continue;
}
if (value && shouldMask) {
result[key] = "********";
} else {
result[key] = value;
}
}
return result;
}
function getEnvWithDefault<T>(name: string, defaultValue: T): T {
const value = process.env[name];
if (value === undefined) {
return defaultValue;
}
try {
if (name === "OPENAI_KEY" || name === "ANTHROPIC_KEY") {
return value as unknown as T;
}
return JSON.parse(value) as T;
} catch (err) {
return value as unknown as T;
}
}
let firebaseApp: firebase.app.App | undefined;
async function maybeInitializeFirebase() {
if (!config.gatekeeperStore.startsWith("firebase")) {
return;
}
const firebase = await import("firebase-admin");
const firebaseKey = Buffer.from(config.firebaseKey!, "base64").toString();
const app = firebase.initializeApp({
credential: firebase.credential.cert(JSON.parse(firebaseKey)),
databaseURL: config.firebaseRtdbUrl,
});
await app.database().ref("connection-test").set(Date.now());
firebaseApp = app;
}
export function getFirebaseApp(): firebase.app.App {
if (!firebaseApp) {
throw new Error("Firebase app not initialized.");
}
return firebaseApp;
}
|
knanon/oai
|
src/config.ts
|
TypeScript
|
unknown
| 11,965 |
import fs from "fs";
import { Request, Response } from "express";
import showdown from "showdown";
import { config, listConfig } from "./config";
import { keyPool } from "./key-management";
import { getUniqueIps } from "./proxy/rate-limit";
import {
QueuePartition,
getEstimatedWaitTime,
getQueueLength,
} from "./proxy/queue";
const INFO_PAGE_TTL = 5000;
let infoPageHtml: string | undefined;
let infoPageLastUpdated = 0;
export const handleInfoPage = (req: Request, res: Response) => {
if (infoPageLastUpdated + INFO_PAGE_TTL > Date.now()) {
res.send(infoPageHtml);
return;
}
// Sometimes huggingface doesn't send the host header and makes us guess.
const baseUrl =
process.env.SPACE_ID && !req.get("host")?.includes("hf.space")
? getExternalUrlForHuggingfaceSpaceId(process.env.SPACE_ID)
: req.protocol + "://" + req.get("host");
res.send(cacheInfoPageHtml(baseUrl));
};
function cacheInfoPageHtml(baseUrl: string) {
const keys = keyPool.list();
const openaiKeys = keys.filter((k) => k.service === "openai").length;
const anthropicKeys = keys.filter((k) => k.service === "anthropic").length;
const info = {
uptime: process.uptime(),
endpoints: {
// ...(openaiKeys ? { openai: baseUrl + "/proxy/openai" } : {}),
// ...(anthropicKeys ? { anthropic: baseUrl + "/proxy/anthropic" } : {}),
// shikiho: baseUrl + "/proxy/shikiho", // shikiho is kill
gepetto: baseUrl + "/proxy/gepetto",
},
proompts: keys.reduce((acc, k) => acc + k.promptCount, 0),
...(config.modelRateLimit ? { proomptersNow: getUniqueIps() } : {}),
// openaiKeys,
// anthropicKeys,
// ...(openaiKeys ? getOpenAIInfo() : {}),
// ...(anthropicKeys ? getAnthropicInfo() : {}),
config: listConfig(),
build: process.env.BUILD_INFO || "dev",
};
const title = getServerTitle();
const headerHtml = buildInfoPageHeader(new showdown.Converter(), title);
const pageBody = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex" />
<title>${title}</title>
</head>
<body style="font-family: sans-serif; background-color: #f0f0f0; padding: 1em;">
${headerHtml}
<hr />
<h2>Service Info</h2>
<pre>${JSON.stringify(info, null, 2)}</pre>
</body>
</html>`;
infoPageHtml = pageBody;
infoPageLastUpdated = Date.now();
return pageBody;
}
type ServiceInfo = {
activeKeys: number;
trialKeys?: number;
quota: string;
proomptersInQueue: number;
estimatedQueueTime: string;
};
// this has long since outgrown this awful "dump everything in a <pre> tag" approach
// but I really don't want to spend time on a proper UI for this right now
function getOpenAIInfo() {
const info: { [model: string]: Partial<ServiceInfo> } = {};
const keys = keyPool.list().filter((k) => k.service === "openai");
const hasGpt4 = keys.some((k) => k.isGpt4) && !config.turboOnly;
if (keyPool.anyUnchecked()) {
const uncheckedKeys = keys.filter((k) => !k.lastChecked);
info.status = `Still checking ${uncheckedKeys.length} keys...` as any;
} else {
delete info.status;
}
if (config.checkKeys) {
const turboKeys = keys.filter((k) => !k.isGpt4 && !k.isDisabled);
const gpt4Keys = keys.filter((k) => k.isGpt4 && !k.isDisabled);
const quota: Record<string, string> = { turbo: "", gpt4: "" };
const turboQuota = keyPool.remainingQuota("openai") * 100;
const gpt4Quota = keyPool.remainingQuota("openai", { gpt4: true }) * 100;
if (config.quotaDisplayMode === "full") {
const turboUsage = keyPool.usageInUsd("openai");
const gpt4Usage = keyPool.usageInUsd("openai", { gpt4: true });
quota.turbo = `${turboUsage} (${Math.round(turboQuota)}% remaining)`;
quota.gpt4 = `${gpt4Usage} (${Math.round(gpt4Quota)}% remaining)`;
} else {
quota.turbo = `${Math.round(turboQuota)}%`;
quota.gpt4 = `${Math.round(gpt4Quota * 100)}%`;
}
info.turbo = {
activeKeys: turboKeys.filter((k) => !k.isDisabled).length,
trialKeys: turboKeys.filter((k) => k.isTrial).length,
quota: quota.turbo,
};
if (hasGpt4) {
info.gpt4 = {
activeKeys: gpt4Keys.filter((k) => !k.isDisabled).length,
trialKeys: gpt4Keys.filter((k) => k.isTrial).length,
quota: quota.gpt4,
};
}
if (config.quotaDisplayMode === "none") {
delete info.turbo?.quota;
delete info.gpt4?.quota;
}
} else {
info.status = "Key checking is disabled." as any;
info.turbo = { activeKeys: keys.filter((k) => !k.isDisabled).length };
info.gpt4 = {
activeKeys: keys.filter((k) => !k.isDisabled && k.isGpt4).length,
};
}
if (config.queueMode !== "none") {
const turboQueue = getQueueInformation("turbo");
info.turbo.proomptersInQueue = turboQueue.proomptersInQueue;
info.turbo.estimatedQueueTime = turboQueue.estimatedQueueTime;
if (hasGpt4) {
const gpt4Queue = getQueueInformation("gpt-4");
info.gpt4.proomptersInQueue = gpt4Queue.proomptersInQueue;
info.gpt4.estimatedQueueTime = gpt4Queue.estimatedQueueTime;
}
}
return info;
}
function getAnthropicInfo() {
const claudeInfo: Partial<ServiceInfo> = {};
const keys = keyPool.list().filter((k) => k.service === "anthropic");
claudeInfo.activeKeys = keys.filter((k) => !k.isDisabled).length;
if (config.queueMode !== "none") {
const queue = getQueueInformation("claude");
claudeInfo.proomptersInQueue = queue.proomptersInQueue;
claudeInfo.estimatedQueueTime = queue.estimatedQueueTime;
}
return { claude: claudeInfo };
}
/**
* If the server operator provides a `greeting.md` file, it will be included in
* the rendered info page.
**/
function buildInfoPageHeader(converter: showdown.Converter, title: string) {
const customGreeting = fs.existsSync("greeting.md")
? fs.readFileSync("greeting.md", "utf8")
: null;
// TODO: use some templating engine instead of this mess
let infoBody = `<!-- Header for Showdown's parser, don't remove this line -->
# ${title}`;
if (config.promptLogging) {
infoBody += `\n## Prompt logging is enabled!
The server operator has enabled prompt logging. The prompts you send to this proxy and the AI responses you receive may be saved.
Logs are anonymous and do not contain IP addresses or timestamps. [You can see the type of data logged here, along with the rest of the code.](https://gitgud.io/khanon/oai-reverse-proxy/-/blob/main/src/prompt-logging/index.ts).
**If you are uncomfortable with this, don't send prompts to this proxy!**`;
}
if (config.queueMode !== "none") {
const waits = [];
infoBody += `\n## Estimated Wait Times\nIf the AI is busy, your prompt will processed when a slot frees up.`;
if (config.openaiKey) {
const turboWait = getQueueInformation("turbo").estimatedQueueTime;
const gpt4Wait = getQueueInformation("gpt-4").estimatedQueueTime;
waits.push(`**Turbo:** ${turboWait}`);
if (keyPool.list().some((k) => k.isGpt4) && !config.turboOnly) {
waits.push(`**GPT-4:** ${gpt4Wait}`);
}
}
if (config.anthropicKey) {
const claudeWait = getQueueInformation("claude").estimatedQueueTime;
waits.push(`**Claude:** ${claudeWait}`);
}
infoBody += "\n\n" + waits.join(" / ");
}
if (customGreeting) {
infoBody += `\n## Server Greeting\n
${customGreeting}`;
}
return converter.makeHtml(infoBody);
}
/** Returns queue time in seconds, or minutes + seconds if over 60 seconds. */
function getQueueInformation(partition: QueuePartition) {
if (config.queueMode === "none") {
return {};
}
const waitMs = getEstimatedWaitTime(partition);
const waitTime =
waitMs < 60000
? `${Math.round(waitMs / 1000)}sec`
: `${Math.round(waitMs / 60000)}min, ${Math.round(
(waitMs % 60000) / 1000
)}sec`;
return {
proomptersInQueue: getQueueLength(partition),
estimatedQueueTime: waitMs > 2000 ? waitTime : "no wait",
};
}
function getServerTitle() {
// Use manually set title if available
if (process.env.SERVER_TITLE) {
return process.env.SERVER_TITLE;
}
// Huggingface
if (process.env.SPACE_ID) {
return `${process.env.SPACE_AUTHOR_NAME} / ${process.env.SPACE_TITLE}`;
}
// Render
if (process.env.RENDER) {
return `Render / ${process.env.RENDER_SERVICE_NAME}`;
}
return "OAI Reverse Proxy";
}
function getExternalUrlForHuggingfaceSpaceId(spaceId: string) {
// Huggingface broke their amazon elb config and no longer sends the
// x-forwarded-host header. This is a workaround.
try {
const [username, spacename] = spaceId.split("/");
return `https://${username}-${spacename.replace(/_/g, "-")}.hf.space`;
} catch (e) {
return "";
}
}
|
knanon/oai
|
src/info-page.ts
|
TypeScript
|
unknown
| 8,805 |
import crypto from "crypto";
import { Key, KeyProvider } from "..";
import { config } from "../../config";
import { logger } from "../../logger";
// https://docs.anthropic.com/claude/reference/selecting-a-model
export const ANTHROPIC_SUPPORTED_MODELS = [
"claude-instant-v1",
"claude-instant-v1-100k",
"claude-v1",
"claude-v1-100k",
"claude-2",
] as const;
export type AnthropicModel = (typeof ANTHROPIC_SUPPORTED_MODELS)[number];
export type AnthropicKeyUpdate = Omit<
Partial<AnthropicKey>,
| "key"
| "hash"
| "lastUsed"
| "promptCount"
| "rateLimitedAt"
| "rateLimitedUntil"
>;
export interface AnthropicKey extends Key {
readonly service: "anthropic";
/** The time at which this key was last rate limited. */
rateLimitedAt: number;
/** The time until which this key is rate limited. */
rateLimitedUntil: number;
/**
* Whether this key requires a special preamble. For unclear reasons, some
* Anthropic keys will throw an error if the prompt does not begin with a
* message from the user, whereas others can be used without a preamble. This
* is despite using the same API endpoint, version, and model.
* When a key returns this particular error, we set this flag to true.
*/
requiresPreamble: boolean;
}
/**
* Upon being rate limited, a key will be locked out for this many milliseconds
* while we wait for other concurrent requests to finish.
*/
const RATE_LIMIT_LOCKOUT = 2000;
/**
* Upon assigning a key, we will wait this many milliseconds before allowing it
* to be used again. This is to prevent the queue from flooding a key with too
* many requests while we wait to learn whether previous ones succeeded.
*/
const KEY_REUSE_DELAY = 500;
export class AnthropicKeyProvider implements KeyProvider<AnthropicKey> {
readonly service = "anthropic";
private keys: AnthropicKey[] = [];
private log = logger.child({ module: "key-provider", service: this.service });
constructor() {
const keyConfig = config.anthropicKey?.trim();
if (!keyConfig) {
this.log.warn(
"ANTHROPIC_KEY is not set. Anthropic API will not be available."
);
return;
}
let bareKeys: string[];
bareKeys = [...new Set(keyConfig.split(",").map((k) => k.trim()))];
for (const key of bareKeys) {
const newKey: AnthropicKey = {
key,
service: this.service,
isGpt4: false,
isTrial: false,
isDisabled: false,
promptCount: 0,
lastUsed: 0,
rateLimitedAt: 0,
rateLimitedUntil: 0,
requiresPreamble: false,
hash: `ant-${crypto
.createHash("sha256")
.update(key)
.digest("hex")
.slice(0, 8)}`,
lastChecked: 0,
};
this.keys.push(newKey);
}
this.log.info({ keyCount: this.keys.length }, "Loaded Anthropic keys.");
}
public init() {
// Nothing to do as Anthropic's API doesn't provide any usage information so
// there is no key checker implementation and no need to start it.
}
public list() {
return this.keys.map((k) => Object.freeze({ ...k, key: undefined }));
}
public get(_model: AnthropicModel) {
// Currently, all Anthropic keys have access to all models. This will almost
// certainly change when they move out of beta later this year.
const availableKeys = this.keys.filter((k) => !k.isDisabled);
if (availableKeys.length === 0) {
throw new Error("No Anthropic keys available.");
}
// (largely copied from the OpenAI provider, without trial key support)
// Select a key, from highest priority to lowest priority:
// 1. Keys which are not rate limited
// a. If all keys were rate limited recently, select the least-recently
// rate limited key.
// 2. Keys which have not been used in the longest time
const now = Date.now();
const keysByPriority = availableKeys.sort((a, b) => {
const aRateLimited = now - a.rateLimitedAt < RATE_LIMIT_LOCKOUT;
const bRateLimited = now - b.rateLimitedAt < RATE_LIMIT_LOCKOUT;
if (aRateLimited && !bRateLimited) return 1;
if (!aRateLimited && bRateLimited) return -1;
if (aRateLimited && bRateLimited) {
return a.rateLimitedAt - b.rateLimitedAt;
}
return a.lastUsed - b.lastUsed;
});
const selectedKey = keysByPriority[0];
selectedKey.lastUsed = now;
selectedKey.rateLimitedAt = now;
// Intended to throttle the queue processor as otherwise it will just
// flood the API with requests and we want to wait a sec to see if we're
// going to get a rate limit error on this key.
selectedKey.rateLimitedUntil = now + KEY_REUSE_DELAY;
return { ...selectedKey };
}
public disable(key: AnthropicKey) {
const keyFromPool = this.keys.find((k) => k.key === key.key);
if (!keyFromPool || keyFromPool.isDisabled) return;
keyFromPool.isDisabled = true;
this.log.warn({ key: key.hash }, "Key disabled");
}
public update(hash: string, update: Partial<AnthropicKey>) {
const keyFromPool = this.keys.find((k) => k.hash === hash)!;
Object.assign(keyFromPool, update);
}
public available() {
return this.keys.filter((k) => !k.isDisabled).length;
}
// No key checker for Anthropic
public anyUnchecked() {
return false;
}
public incrementPrompt(hash?: string) {
const key = this.keys.find((k) => k.hash === hash);
if (!key) return;
key.promptCount++;
}
public getLockoutPeriod(_model: AnthropicModel) {
const activeKeys = this.keys.filter((k) => !k.isDisabled);
// Don't lock out if there are no keys available or the queue will stall.
// Just let it through so the add-key middleware can throw an error.
if (activeKeys.length === 0) return 0;
const now = Date.now();
const rateLimitedKeys = activeKeys.filter((k) => now < k.rateLimitedUntil);
const anyNotRateLimited = rateLimitedKeys.length < activeKeys.length;
if (anyNotRateLimited) return 0;
// If all keys are rate-limited, return the time until the first key is
// ready.
const timeUntilFirstReady = Math.min(
...activeKeys.map((k) => k.rateLimitedUntil - now)
);
return timeUntilFirstReady;
}
/**
* This is called when we receive a 429, which means there are already five
* concurrent requests running on this key. We don't have any information on
* when these requests will resolve, so all we can do is wait a bit and try
* again. We will lock the key for 2 seconds after getting a 429 before
* retrying in order to give the other requests a chance to finish.
*/
public markRateLimited(keyHash: string) {
this.log.warn({ key: keyHash }, "Key rate limited");
const key = this.keys.find((k) => k.hash === keyHash)!;
const now = Date.now();
key.rateLimitedAt = now;
key.rateLimitedUntil = now + RATE_LIMIT_LOCKOUT;
}
public remainingQuota() {
const activeKeys = this.keys.filter((k) => !k.isDisabled).length;
const allKeys = this.keys.length;
if (activeKeys === 0) return 0;
return Math.round((activeKeys / allKeys) * 100) / 100;
}
public usageInUsd() {
return "$0.00 / ∞";
}
}
|
knanon/oai
|
src/key-management/anthropic/provider.ts
|
TypeScript
|
unknown
| 7,200 |
import { OPENAI_SUPPORTED_MODELS, OpenAIModel } from "./openai/provider";
import {
ANTHROPIC_SUPPORTED_MODELS,
AnthropicModel,
} from "./anthropic/provider";
import { KeyPool } from "./key-pool";
export type AIService = "openai" | "anthropic" | "gepetto";
export type Model = OpenAIModel | AnthropicModel;
export interface Key {
/** The API key itself. Never log this, use `hash` instead. */
readonly key: string;
/** The service that this key is for. */
service: AIService;
/** Whether this is a free trial key. These are prioritized over paid keys if they can fulfill the request. */
isTrial: boolean;
/** Whether this key has been provisioned for GPT-4. */
isGpt4: boolean;
/** Whether this key is currently disabled, meaning its quota has been exceeded or it has been revoked. */
isDisabled: boolean;
/** The number of prompts that have been sent with this key. */
promptCount: number;
/** The time at which this key was last used. */
lastUsed: number;
/** The time at which this key was last checked. */
lastChecked: number;
/** Hash of the key, for logging and to find the key in the pool. */
hash: string;
}
/*
KeyPool and KeyProvider's similarities are a relic of the old design where
there was only a single KeyPool for OpenAI keys. Now that there are multiple
supported services, the service-specific functionality has been moved to
KeyProvider and KeyPool is just a wrapper around multiple KeyProviders,
delegating to the appropriate one based on the model requested.
Existing code will continue to call methods on KeyPool, which routes them to
the appropriate KeyProvider or returns data aggregated across all KeyProviders
for service-agnostic functionality.
*/
export interface KeyProvider<T extends Key = Key> {
readonly service: AIService;
init(): void;
get(model: Model): T;
list(): Omit<T, "key">[];
disable(key: T): void;
update(hash: string, update: Partial<T>): void;
available(): number;
anyUnchecked(): boolean;
incrementPrompt(hash: string): void;
getLockoutPeriod(model: Model): number;
remainingQuota(options?: Record<string, unknown>): number;
usageInUsd(options?: Record<string, unknown>): string;
markRateLimited(hash: string): void;
}
export const keyPool = new KeyPool();
export const SUPPORTED_MODELS = [
...OPENAI_SUPPORTED_MODELS,
...ANTHROPIC_SUPPORTED_MODELS,
] as const;
export type SupportedModel = (typeof SUPPORTED_MODELS)[number];
export { OPENAI_SUPPORTED_MODELS, ANTHROPIC_SUPPORTED_MODELS };
export { AnthropicKey } from "./anthropic/provider";
export { OpenAIKey } from "./openai/provider";
|
knanon/oai
|
src/key-management/index.ts
|
TypeScript
|
unknown
| 2,611 |
import type * as http from "http";
import { AnthropicKeyProvider, AnthropicKeyUpdate } from "./anthropic/provider";
import { Key, Model, KeyProvider, AIService } from "./index";
import { OpenAIKeyProvider, OpenAIKeyUpdate } from "./openai/provider";
type AllowedPartial = OpenAIKeyUpdate | AnthropicKeyUpdate;
export class KeyPool {
private keyProviders: KeyProvider[] = [];
constructor() {
this.keyProviders.push(new OpenAIKeyProvider());
this.keyProviders.push(new AnthropicKeyProvider());
}
public init() {
this.keyProviders.forEach((provider) => provider.init());
const availableKeys = this.available("all");
if (availableKeys === 0) {
throw new Error(
"No keys loaded. Ensure either OPENAI_KEY or ANTHROPIC_KEY is set."
);
}
}
public get(model: Model): Key {
const service = this.getService(model);
return this.getKeyProvider(service).get(model);
}
public list(): Omit<Key, "key">[] {
return this.keyProviders.flatMap((provider) => provider.list());
}
public disable(key: Key): void {
const service = this.getKeyProvider(key.service);
service.disable(key);
}
public update(key: Key, props: AllowedPartial): void {
const service = this.getKeyProvider(key.service);
service.update(key.hash, props);
}
public available(service: AIService | "all" = "all"): number {
return this.keyProviders.reduce((sum, provider) => {
const includeProvider = service === "all" || service === provider.service;
return sum + (includeProvider ? provider.available() : 0);
}, 0);
}
public anyUnchecked(): boolean {
return this.keyProviders.some((provider) => provider.anyUnchecked());
}
public incrementPrompt(key: Key): void {
const provider = this.getKeyProvider(key.service);
provider.incrementPrompt(key.hash);
}
public getLockoutPeriod(model: Model): number {
const service = this.getService(model);
return this.getKeyProvider(service).getLockoutPeriod(model);
}
public markRateLimited(key: Key): void {
const provider = this.getKeyProvider(key.service);
provider.markRateLimited(key.hash);
}
public updateRateLimits(key: Key, headers: http.IncomingHttpHeaders): void {
const provider = this.getKeyProvider(key.service);
if (provider instanceof OpenAIKeyProvider) {
provider.updateRateLimits(key.hash, headers);
}
}
public remainingQuota(
service: AIService,
options?: Record<string, unknown>
): number {
return this.getKeyProvider(service).remainingQuota(options);
}
public usageInUsd(
service: AIService,
options?: Record<string, unknown>
): string {
return this.getKeyProvider(service).usageInUsd(options);
}
private getService(model: Model): AIService {
if (model.startsWith("gpt")) {
// https://platform.openai.com/docs/models/model-endpoint-compatibility
return "openai";
} else if (model.startsWith("claude-")) {
// https://console.anthropic.com/docs/api/reference#parameters
return "anthropic";
}
throw new Error(`Unknown service for model '${model}'`);
}
private getKeyProvider(service: AIService): KeyProvider {
return this.keyProviders.find((provider) => provider.service === service)!;
}
}
|
knanon/oai
|
src/key-management/key-pool.ts
|
TypeScript
|
unknown
| 3,282 |
import axios, { AxiosError } from "axios";
import { Configuration, OpenAIApi } from "openai";
import { logger } from "../../logger";
import type { OpenAIKey, OpenAIKeyProvider } from "./provider";
const MIN_CHECK_INTERVAL = 3 * 1000; // 3 seconds
const KEY_CHECK_PERIOD = 5 * 60 * 1000; // 5 minutes
const GET_SUBSCRIPTION_URL =
"https://api.openai.com/dashboard/billing/subscription";
const GET_USAGE_URL = "https://api.openai.com/dashboard/billing/usage";
type GetSubscriptionResponse = {
plan: { title: string };
has_payment_method: boolean;
soft_limit_usd: number;
hard_limit_usd: number;
system_hard_limit_usd: number;
};
type GetUsageResponse = {
total_usage: number;
};
type OpenAIError = {
error: { type: string; code: string; param: unknown; message: string };
};
type UpdateFn = typeof OpenAIKeyProvider.prototype.update;
export class OpenAIKeyChecker {
private readonly keys: OpenAIKey[];
private log = logger.child({ module: "key-checker", service: "openai" });
private timeout?: NodeJS.Timeout;
private updateKey: UpdateFn;
private lastCheck = 0;
constructor(keys: OpenAIKey[], updateKey: UpdateFn) {
this.keys = keys;
this.updateKey = updateKey;
}
public start() {
this.log.info("Starting key checker...");
this.scheduleNextCheck();
}
public stop() {
if (this.timeout) {
clearTimeout(this.timeout);
}
}
/**
* Schedules the next check. If there are still keys yet to be checked, it
* will schedule a check immediately for the next unchecked key. Otherwise,
* it will schedule a check in several minutes for the oldest key.
**/
private scheduleNextCheck() {
const enabledKeys = this.keys.filter((key) => !key.isDisabled);
if (enabledKeys.length === 0) {
this.log.warn("All keys are disabled. Key checker stopping.");
return;
}
// Perform startup checks for any keys that haven't been checked yet.
const uncheckedKeys = enabledKeys.filter((key) => !key.lastChecked);
if (uncheckedKeys.length > 0) {
// Check up to 12 keys at once to speed up startup.
const keysToCheck = uncheckedKeys.slice(0, 12);
this.log.info(
{
key: keysToCheck.map((key) => key.hash),
remaining: uncheckedKeys.length - keysToCheck.length,
},
"Scheduling initial checks for key batch."
);
this.timeout = setTimeout(async () => {
const promises = keysToCheck.map((key) => this.checkKey(key));
try {
await Promise.all(promises);
} catch (error) {
this.log.error({ error }, "Error checking one or more keys.");
}
this.scheduleNextCheck();
}, 250);
return;
}
// Schedule the next check for the oldest key.
const oldestKey = enabledKeys.reduce((oldest, key) =>
key.lastChecked < oldest.lastChecked ? key : oldest
);
// Don't check any individual key more than once every 5 minutes.
// Also, don't check anything more often than once every 3 seconds.
const nextCheck = Math.max(
oldestKey.lastChecked + KEY_CHECK_PERIOD,
this.lastCheck + MIN_CHECK_INTERVAL
);
this.log.debug(
{ key: oldestKey.hash, nextCheck: new Date(nextCheck) },
"Scheduling next check."
);
const delay = nextCheck - Date.now();
this.timeout = setTimeout(() => this.checkKey(oldestKey), delay);
}
private async checkKey(key: OpenAIKey) {
// It's possible this key might have been disabled while we were waiting
// for the next check.
if (key.isDisabled) {
this.log.warn({ key: key.hash }, "Skipping check for disabled key.");
this.scheduleNextCheck();
return;
}
this.log.debug({ key: key.hash }, "Checking key...");
let isInitialCheck = !key.lastChecked;
try {
// During the initial check we need to get the subscription first because
// trials have different behavior.
if (isInitialCheck) {
const subscription = await this.getSubscription(key);
this.updateKey(key.hash, { isTrial: !subscription.has_payment_method });
if (key.isTrial) {
this.log.debug(
{ key: key.hash },
"Attempting generation on trial key."
);
await this.assertCanGenerate(key);
}
const [provisionedModels, usage] = await Promise.all([
this.getProvisionedModels(key),
this.getUsage(key),
]);
const updates = {
isGpt4: provisionedModels.gpt4,
softLimit: subscription.soft_limit_usd,
hardLimit: subscription.hard_limit_usd,
systemHardLimit: subscription.system_hard_limit_usd,
usage,
};
this.updateKey(key.hash, updates);
} else {
// Don't check provisioned models after the initial check because it's
// not likely to change.
const [subscription, usage] = await Promise.all([
this.getSubscription(key),
this.getUsage(key),
]);
const updates = {
softLimit: subscription.soft_limit_usd,
hardLimit: subscription.hard_limit_usd,
systemHardLimit: subscription.system_hard_limit_usd,
usage,
};
this.updateKey(key.hash, updates);
}
this.log.info(
{ key: key.hash, usage: key.usage, hardLimit: key.hardLimit },
"Key check complete."
);
} catch (error) {
// touch the key so we don't check it again for a while
this.updateKey(key.hash, {});
this.handleAxiosError(key, error as AxiosError);
}
this.lastCheck = Date.now();
// Only enqueue the next check if this wasn't a startup check, since those
// are batched together elsewhere.
if (!isInitialCheck) {
this.scheduleNextCheck();
}
}
private async getProvisionedModels(
key: OpenAIKey
): Promise<{ turbo: boolean; gpt4: boolean }> {
const openai = new OpenAIApi(new Configuration({ apiKey: key.key }));
const models = (await openai.listModels()!).data.data;
const turbo = models.some(({ id }) => id.startsWith("gpt-3.5"));
const gpt4 = models.some(({ id }) => id.startsWith("gpt-4"));
return { turbo, gpt4 };
}
private async getSubscription(key: OpenAIKey) {
const { data } = await axios.get<GetSubscriptionResponse>(
GET_SUBSCRIPTION_URL,
{ headers: { Authorization: `Bearer ${key.key}` } }
);
return data;
}
private async getUsage(key: OpenAIKey) {
const querystring = OpenAIKeyChecker.getUsageQuerystring(key.isTrial);
const url = `${GET_USAGE_URL}?${querystring}`;
const { data } = await axios.get<GetUsageResponse>(url, {
headers: { Authorization: `Bearer ${key.key}` },
});
return parseFloat((data.total_usage / 100).toFixed(2));
}
private handleAxiosError(key: OpenAIKey, error: AxiosError) {
if (error.response && OpenAIKeyChecker.errorIsOpenAiError(error)) {
const { status, data } = error.response;
if (status === 401) {
this.log.warn(
{ key: key.hash, error: data },
"Key is invalid or revoked. Disabling key."
);
this.updateKey(key.hash, { isDisabled: true });
} else if (status === 429 && data.error.type === "insufficient_quota") {
this.log.warn(
{ key: key.hash, isTrial: key.isTrial, error: data },
"Key is out of quota. Disabling key."
);
this.updateKey(key.hash, { isDisabled: true });
}
else if (status === 429 && data.error.type === "access_terminated") {
this.log.warn(
{ key: key.hash, isTrial: key.isTrial, error: data },
"Key has been terminated due to policy violations. Disabling key."
);
this.updateKey(key.hash, { isDisabled: true });
} else {
this.log.error(
{ key: key.hash, status, error: data },
"Encountered API error while checking key."
);
}
return;
}
this.log.error(
{ key: key.hash, error },
"Network error while checking key; trying again later."
);
}
/**
* Trial key usage reporting is inaccurate, so we need to run an actual
* completion to test them for liveness.
*/
private async assertCanGenerate(key: OpenAIKey): Promise<void> {
const openai = new OpenAIApi(new Configuration({ apiKey: key.key }));
// This will throw an AxiosError if the key is invalid or out of quota.
await openai.createChatCompletion({
model: "gpt-3.5-turbo",
messages: [{ role: "user", content: "Hello" }],
max_tokens: 1,
});
}
static getUsageQuerystring(isTrial: boolean) {
// For paid keys, the limit resets every month, so we can use the first day
// of the current month.
// For trial keys, the limit does not reset and we don't know when the key
// was created, so we use 99 days ago because that's as far back as the API
// will let us go.
// End date needs to be set to the beginning of the next day so that we get
// usage for the current day.
const today = new Date();
const startDate = isTrial
? new Date(today.getTime() - 99 * 24 * 60 * 60 * 1000)
: new Date(today.getFullYear(), today.getMonth(), 1);
const endDate = new Date(today.getTime() + 24 * 60 * 60 * 1000);
return `start_date=${startDate.toISOString().split("T")[0]}&end_date=${
endDate.toISOString().split("T")[0]
}`;
}
static errorIsOpenAiError(
error: AxiosError
): error is AxiosError<OpenAIError> {
const data = error.response?.data as any;
return data?.error?.type;
}
}
|
knanon/oai
|
src/key-management/openai/checker.ts
|
TypeScript
|
unknown
| 9,640 |
/* Manages OpenAI API keys. Tracks usage, disables expired keys, and provides
round-robin access to keys. Keys are stored in the OPENAI_KEY environment
variable as a comma-separated list of keys. */
import crypto from "crypto";
import fs from "fs";
import http from "http";
import path from "path";
import { KeyProvider, Key, Model } from "../index";
import { config } from "../../config";
import { logger } from "../../logger";
import { OpenAIKeyChecker } from "./checker";
export type OpenAIModel = "gpt-3.5-turbo" | "gpt-4";
export const OPENAI_SUPPORTED_MODELS: readonly OpenAIModel[] = [
"gpt-3.5-turbo",
"gpt-4",
] as const;
export interface OpenAIKey extends Key {
readonly service: "openai";
/** The current usage of this key. */
usage: number;
/** Threshold at which a warning email will be sent by OpenAI. */
softLimit: number;
/** Threshold at which the key will be disabled because it has reached the user-defined limit. */
hardLimit: number;
/** The maximum quota allocated to this key by OpenAI. */
systemHardLimit: number;
/** The time at which this key was last rate limited. */
rateLimitedAt: number;
/**
* Last known X-RateLimit-Requests-Reset header from OpenAI, converted to a
* number.
* Formatted as a `\d+(m|s)` string denoting the time until the limit resets.
* Specifically, it seems to indicate the time until the key's quota will be
* fully restored; the key may be usable before this time as the limit is a
* rolling window.
*
* Requests which return a 429 do not count against the quota.
*
* Requests which fail for other reasons (e.g. 401) count against the quota.
*/
rateLimitRequestsReset: number;
/**
* Last known X-RateLimit-Tokens-Reset header from OpenAI, converted to a
* number.
* Appears to follow the same format as `rateLimitRequestsReset`.
*
* Requests which fail do not count against the quota as they do not consume
* tokens.
*/
rateLimitTokensReset: number;
}
export type OpenAIKeyUpdate = Omit<
Partial<OpenAIKey>,
"key" | "hash" | "lastUsed" | "lastChecked" | "promptCount"
>;
export class OpenAIKeyProvider implements KeyProvider<OpenAIKey> {
readonly service = "openai" as const;
private keys: OpenAIKey[] = [];
private checker?: OpenAIKeyChecker;
private log = logger.child({ module: "key-provider", service: this.service });
constructor() {
const keyString = config.openaiKey?.trim();
if (!keyString) {
this.log.warn("OPENAI_KEY is not set. OpenAI API will not be available.");
return;
}
let bareKeys: string[];
bareKeys = keyString.split(",").map((k) => k.trim());
bareKeys = [...new Set(bareKeys)];
for (const k of bareKeys) {
const newKey = {
key: k,
service: "openai" as const,
isGpt4: true,
isTrial: false,
isDisabled: false,
softLimit: 0,
hardLimit: 0,
systemHardLimit: 0,
usage: 0,
lastUsed: 0,
lastChecked: 0,
promptCount: 0,
hash: `oai-${crypto
.createHash("sha256")
.update(k)
.digest("hex")
.slice(0, 8)}`,
rateLimitedAt: 0,
rateLimitRequestsReset: 0,
rateLimitTokensReset: 0,
};
this.keys.push(newKey);
}
this.log.info({ keyCount: this.keys.length }, "Loaded OpenAI keys.");
}
public init() {
if (config.checkKeys) {
this.checker = new OpenAIKeyChecker(this.keys, this.update.bind(this));
this.checker.start();
}
}
/**
* Returns a list of all keys, with the key field removed.
* Don't mutate returned keys, use a KeyPool method instead.
**/
public list() {
return this.keys.map((key) => {
return Object.freeze({
...key,
key: undefined,
});
});
}
public get(model: Model) {
const needGpt4 = model.startsWith("gpt-4");
const availableKeys = this.keys.filter(
(key) => !key.isDisabled && (!needGpt4 || key.isGpt4)
);
if (availableKeys.length === 0) {
let message = needGpt4
? "No GPT-4 keys available. Try selecting a Turbo model."
: "No active OpenAI keys available.";
throw new Error(message);
}
if (needGpt4 && config.turboOnly) {
throw new Error(
"Proxy operator has disabled GPT-4 to reduce quota usage. Try selecting a Turbo model."
);
}
// Select a key, from highest priority to lowest priority:
// 1. Keys which are not rate limited
// a. We ignore rate limits from over a minute ago
// b. If all keys were rate limited in the last minute, select the
// least recently rate limited key
// 2. Keys which are trials
// 3. Keys which have not been used in the longest time
const now = Date.now();
const rateLimitThreshold = 60 * 1000;
const keysByPriority = availableKeys.sort((a, b) => {
const aRateLimited = now - a.rateLimitedAt < rateLimitThreshold;
const bRateLimited = now - b.rateLimitedAt < rateLimitThreshold;
if (aRateLimited && !bRateLimited) return 1;
if (!aRateLimited && bRateLimited) return -1;
if (aRateLimited && bRateLimited) {
return a.rateLimitedAt - b.rateLimitedAt;
}
if (a.isTrial && !b.isTrial) return -1;
if (!a.isTrial && b.isTrial) return 1;
return a.lastUsed - b.lastUsed;
});
const selectedKey = keysByPriority[0];
selectedKey.lastUsed = now;
// When a key is selected, we rate-limit it for a brief period of time to
// prevent the queue processor from immediately flooding it with requests
// while the initial request is still being processed (which is when we will
// get new rate limit headers).
// Instead, we will let a request through every second until the key
// becomes fully saturated and locked out again.
selectedKey.rateLimitedAt = now;
selectedKey.rateLimitRequestsReset = 1000;
return { ...selectedKey };
}
/** Called by the key checker to update key information. */
public update(keyHash: string, update: OpenAIKeyUpdate) {
const keyFromPool = this.keys.find((k) => k.hash === keyHash)!;
Object.assign(keyFromPool, { ...update, lastChecked: Date.now() });
// this.writeKeyStatus();
}
/** Disables a key, or does nothing if the key isn't in this pool. */
public disable(key: Key) {
const keyFromPool = this.keys.find((k) => k.key === key.key);
if (!keyFromPool || keyFromPool.isDisabled) return;
keyFromPool.isDisabled = true;
// If it's disabled just set the usage to the hard limit so it doesn't
// mess with the aggregate usage.
keyFromPool.usage = keyFromPool.hardLimit;
this.log.warn({ key: key.hash }, "Key disabled");
}
public available() {
return this.keys.filter((k) => !k.isDisabled).length;
}
public anyUnchecked() {
return !!config.checkKeys && this.keys.some((key) => !key.lastChecked);
}
/**
* Given a model, returns the period until a key will be available to service
* the request, or returns 0 if a key is ready immediately.
*/
public getLockoutPeriod(model: Model = "gpt-4"): number {
const needGpt4 = model.startsWith("gpt-4");
const activeKeys = this.keys.filter(
(key) => !key.isDisabled && (!needGpt4 || key.isGpt4)
);
if (activeKeys.length === 0) {
// If there are no active keys for this model we can't fulfill requests.
// We'll return 0 to let the request through and return an error,
// otherwise the request will be stuck in the queue forever.
return 0;
}
// A key is rate-limited if its `rateLimitedAt` plus the greater of its
// `rateLimitRequestsReset` and `rateLimitTokensReset` is after the
// current time.
// If there are any keys that are not rate-limited, we can fulfill requests.
const now = Date.now();
const rateLimitedKeys = activeKeys.filter((key) => {
const resetTime = Math.max(
key.rateLimitRequestsReset,
key.rateLimitTokensReset
);
return now < key.rateLimitedAt + resetTime;
}).length;
const anyNotRateLimited = rateLimitedKeys < activeKeys.length;
if (anyNotRateLimited) {
return 0;
}
// If all keys are rate-limited, return the time until the first key is
// ready.
const timeUntilFirstReady = Math.min(
...activeKeys.map((key) => {
const resetTime = Math.max(
key.rateLimitRequestsReset,
key.rateLimitTokensReset
);
return key.rateLimitedAt + resetTime - now;
})
);
return timeUntilFirstReady;
}
public markRateLimited(keyHash: string) {
this.log.warn({ key: keyHash }, "Key rate limited");
const key = this.keys.find((k) => k.hash === keyHash)!;
key.rateLimitedAt = Date.now();
}
public incrementPrompt(keyHash?: string) {
const key = this.keys.find((k) => k.hash === keyHash);
if (!key) return;
key.promptCount++;
}
public updateRateLimits(keyHash: string, headers: http.IncomingHttpHeaders) {
const key = this.keys.find((k) => k.hash === keyHash)!;
const requestsReset = headers["x-ratelimit-reset-requests"];
const tokensReset = headers["x-ratelimit-reset-tokens"];
// Sometimes OpenAI only sends one of the two rate limit headers, it's
// unclear why.
if (requestsReset && typeof requestsReset === "string") {
this.log.info(
{ key: key.hash, requestsReset },
`Updating rate limit requests reset time`
);
key.rateLimitRequestsReset = getResetDurationMillis(requestsReset);
}
if (tokensReset && typeof tokensReset === "string") {
this.log.info(
{ key: key.hash, tokensReset },
`Updating rate limit tokens reset time`
);
key.rateLimitTokensReset = getResetDurationMillis(tokensReset);
}
if (!requestsReset && !tokensReset) {
this.log.warn(
{ key: key.hash },
`No rate limit headers in OpenAI response; skipping update`
);
return;
}
}
/**
* Returns the remaining aggregate quota for all keys as a percentage.
* Can go slightly negative because keys will typically go slightly over their
* limit before being disabled. Can sometimes go *really* negative if the
* cron job OpenAI uses to disable keys fails, as the key will essentially
* have unlimited quota.
**/
public remainingQuota({ gpt4 }: { gpt4: boolean } = { gpt4: false }): number {
const keys = this.keys.filter((k) => k.isGpt4 === gpt4);
if (keys.length === 0) return 0;
const totalUsage = keys.reduce((acc, key) => acc + key.usage, 0);
const totalLimit = keys.reduce((acc, { hardLimit }) => acc + hardLimit, 0);
return 1 - totalUsage / totalLimit;
}
/** Returns used and available usage in USD. */
public usageInUsd({ gpt4 }: { gpt4: boolean } = { gpt4: false }): string {
const keys = this.keys.filter((k) => k.isGpt4 === gpt4);
if (keys.length === 0) return "???";
const totalUsage = keys.reduce((acc, key) => acc + key.usage, 0);
const totalLimit = keys.reduce((acc, { hardLimit }) => acc + hardLimit, 0);
return `$${totalUsage.toFixed(2)} / $${totalLimit.toFixed(2)}`;
}
/** Writes key status to disk. */
// public writeKeyStatus() {
// const keys = this.keys.map((key) => ({
// key: key.key,
// isGpt4: key.isGpt4,
// usage: key.usage,
// hardLimit: key.hardLimit,
// isDisabled: key.isDisabled,
// }));
// fs.writeFileSync(
// path.join(__dirname, "..", "keys.json"),
// JSON.stringify(keys, null, 2)
// );
// }
}
/**
* Converts reset string ("21.0032s" or "21ms") to a number of milliseconds.
* Result is clamped to 10s even though the API returns up to 60s, because the
* API returns the time until the entire quota is reset, even if a key may be
* able to fulfill requests before then due to partial resets.
**/
function getResetDurationMillis(resetDuration?: string): number {
const match = resetDuration?.match(/(\d+(\.\d+)?)(s|ms)/);
if (match) {
const [, time, , unit] = match;
const value = parseFloat(time);
const result = unit === "s" ? value * 1000 : value;
return Math.min(result, 10000);
}
return 0;
}
|
knanon/oai
|
src/key-management/openai/provider.ts
|
TypeScript
|
unknown
| 12,285 |
import pino from "pino";
import { config } from "./config";
export const logger = pino({
level: config.logLevel,
});
|
knanon/oai
|
src/logger.ts
|
TypeScript
|
unknown
| 120 |
export * as sheets from "./sheets";
|
knanon/oai
|
src/prompt-logging/backends/index.ts
|
TypeScript
|
unknown
| 36 |
/* Google Sheets backend for prompt logger. Upon every flush, this backend
writes the batch to a Sheets spreadsheet. If the sheet becomes too large, it
will create a new sheet and continue writing there.
This is essentially a really shitty ORM for Sheets. Absolutely no concurrency
support because it relies on local state to match up with the remote state. */
import { google, sheets_v4 } from "googleapis";
import type { CredentialBody } from "google-auth-library";
import type { GaxiosResponse } from "googleapis-common";
import { config } from "../../config";
import { logger } from "../../logger";
import { PromptLogEntry } from "..";
// There is always a sheet called __index__ which contains a list of all the
// other sheets. We use this rather than iterating over all the sheets in case
// the user needs to manually work with the spreadsheet.
// If no __index__ sheet exists, we will assume that the spreadsheet is empty
// and create one.
type IndexSheetModel = {
/**
* Stored in cell B2. Set on startup; if it changes, we assume that another
* instance of the proxy is writing to the spreadsheet and stop.
*/
lockId: string;
/**
* Data starts at row 4. Row 1-3 are headers
*/
rows: { logSheetName: string; createdAt: string; rowCount: number }[];
};
type LogSheetModel = {
sheetName: string;
rows: {
model: string;
endpoint: string;
promptRaw: string;
promptFlattened: string;
response: string;
}[];
};
const MAX_ROWS_PER_SHEET = 2000;
const log = logger.child({ module: "sheets" });
let sheetsClient: sheets_v4.Sheets | null = null;
/** Called when log backend aborts to tell the log queue to stop. */
let stopCallback: (() => void) | null = null;
/** Lock/synchronization ID for this session. */
let lockId = Math.random().toString(36).substring(2, 15);
/** In-memory cache of the index sheet. */
let indexSheet: IndexSheetModel | null = null;
/** In-memory cache of the active log sheet. */
let activeLogSheet: LogSheetModel | null = null;
/**
* Loads the __index__ sheet into memory. By default, asserts that the lock ID
* has not changed since the start of the session.
*/
const loadIndexSheet = async (assertLockId = true) => {
const client = sheetsClient!;
const spreadsheetId = config.googleSheetsSpreadsheetId!;
log.info({ assertLockId }, "Loading __index__ sheet.");
const res = await client.spreadsheets.values.get({
spreadsheetId: spreadsheetId,
range: "__index__!A1:D",
majorDimension: "ROWS",
});
const data = assertData(res);
if (!data.values || data.values[2][0] !== "logSheetName") {
log.error({ values: data.values }, "Unexpected format for __index__ sheet");
throw new Error("Unexpected format for __index__ sheet");
}
if (assertLockId) {
const lockIdCell = data.values[1][1];
if (lockIdCell !== lockId) {
log.error(
{ receivedLock: lockIdCell, expectedLock: lockId },
"Another instance of the proxy is writing to the spreadsheet; stopping."
);
stop();
throw new Error(`Lock ID assertion failed`);
}
}
const rows = data.values.slice(3).map((row) => {
return {
logSheetName: row[0],
createdAt: row[1],
rowCount: row[2],
};
});
indexSheet = { lockId, rows };
};
/** Creates empty __index__ sheet for a new spreadsheet. */
const createIndexSheet = async () => {
const client = sheetsClient!;
const spreadsheetId = config.googleSheetsSpreadsheetId!;
log.info("Creating empty __index__ sheet.");
const res = await client.spreadsheets.batchUpdate({
spreadsheetId: spreadsheetId,
requestBody: {
requests: [
{
addSheet: {
properties: {
title: "__index__",
gridProperties: { rowCount: 1, columnCount: 3 },
},
},
},
],
},
});
assertData(res);
indexSheet = { lockId, rows: [] };
await writeIndexSheet();
};
/** Writes contents of in-memory indexSheet to the remote __index__ sheet. */
const writeIndexSheet = async () => {
const client = sheetsClient!;
const spreadsheetId = config.googleSheetsSpreadsheetId!;
const headerRows = [
["Don't edit this sheet while the server is running.", "", ""],
["Lock ID", lockId, ""],
["logSheetName", "createdAt", "rowCount"],
];
const contentRows = indexSheet!.rows.map((row) => {
return [row.logSheetName, row.createdAt, row.rowCount];
});
log.info("Persisting __index__ sheet.");
await client.spreadsheets.values.batchUpdate({
spreadsheetId: spreadsheetId,
requestBody: {
valueInputOption: "RAW",
data: [
{ range: "__index__!A1:D", values: [...headerRows, ...contentRows] },
],
},
});
};
/** Creates a new log sheet, adds it to the index, and sets it as active. */
const createLogSheet = async () => {
const client = sheetsClient!;
const spreadsheetId = config.googleSheetsSpreadsheetId!;
// Sheet name format is Log_YYYYMMDD_HHMMSS
const sheetName = `Log_${new Date()
.toISOString()
// YYYY-MM-DDTHH:MM:SS.sssZ -> YYYYMMDD_HHMMSS
.replace(/[-:.]/g, "")
.replace(/T/, "_")
.substring(0, 15)}`;
log.info({ sheetName }, "Creating new log sheet.");
const res = await client.spreadsheets.batchUpdate({
spreadsheetId: spreadsheetId,
requestBody: {
requests: [
{
addSheet: {
properties: {
title: sheetName,
gridProperties: { rowCount: MAX_ROWS_PER_SHEET, columnCount: 5 },
},
},
},
],
},
});
assertData(res);
// Increase row/column size and wrap text for readability.
const sheetId = res.data.replies![0].addSheet!.properties!.sheetId;
await client.spreadsheets.batchUpdate({
spreadsheetId: spreadsheetId,
requestBody: {
requests: [
{
repeatCell: {
range: { sheetId },
cell: {
userEnteredFormat: {
wrapStrategy: "WRAP",
verticalAlignment: "TOP",
},
},
fields: "*",
},
},
{
updateDimensionProperties: {
range: {
sheetId,
dimension: "COLUMNS",
startIndex: 3,
endIndex: 5,
},
properties: { pixelSize: 500 },
fields: "pixelSize",
},
},
{
updateDimensionProperties: {
range: {
sheetId,
dimension: "ROWS",
startIndex: 1,
},
properties: { pixelSize: 200 },
fields: "pixelSize",
},
},
],
},
});
await client.spreadsheets.values.batchUpdate({
spreadsheetId: spreadsheetId,
requestBody: {
valueInputOption: "RAW",
data: [
{
range: `${sheetName}!A1:E`,
values: [
["model", "endpoint", "prompt json", "prompt string", "response"],
],
},
],
},
});
indexSheet!.rows.push({
logSheetName: sheetName,
createdAt: new Date().toISOString(),
rowCount: 0,
});
await writeIndexSheet();
activeLogSheet = { sheetName, rows: [] };
};
export const appendBatch = async (batch: PromptLogEntry[]) => {
if (!activeLogSheet) {
// Create a new log sheet if we don't have one yet.
await createLogSheet();
} else {
// Check lock to ensure we're the only instance writing to the spreadsheet.
await loadIndexSheet(true);
}
const client = sheetsClient!;
const spreadsheetId = config.googleSheetsSpreadsheetId!;
const sheetName = activeLogSheet!.sheetName;
const newRows = batch.map((entry) => {
return [
entry.model,
entry.endpoint,
entry.promptRaw.slice(0, 50000),
entry.promptFlattened.slice(0, 50000),
entry.response.slice(0, 50000),
];
});
log.info({ sheetName, rowCount: newRows.length }, "Appending log batch.");
const data = await client.spreadsheets.values.append({
spreadsheetId: spreadsheetId,
range: `${sheetName}!A1:D`,
valueInputOption: "RAW",
requestBody: { values: newRows, majorDimension: "ROWS" },
});
assertData(data);
if (data.data.updates && data.data.updates.updatedRows) {
const newRowCount = data.data.updates.updatedRows;
log.info({ sheetName, rowCount: newRowCount }, "Successfully appended.");
activeLogSheet!.rows = activeLogSheet!.rows.concat(
newRows.map((row) => ({
model: row[0],
endpoint: row[1],
promptRaw: row[2],
promptFlattened: row[3],
response: row[4],
}))
);
} else {
// We didn't receive an error but we didn't get any updates either.
// We may need to create a new sheet and throw to make the queue retry the
// batch.
log.warn(
{ sheetName, rowCount: newRows.length },
"No updates received from append. Creating new sheet and retrying."
);
await createLogSheet();
throw new Error("No updates received from append.");
}
await finalizeBatch();
};
const finalizeBatch = async () => {
const sheetName = activeLogSheet!.sheetName;
const rowCount = activeLogSheet!.rows.length;
const indexRow = indexSheet!.rows.find(
({ logSheetName }) => logSheetName === sheetName
)!;
indexRow.rowCount = rowCount;
if (rowCount >= MAX_ROWS_PER_SHEET) {
await createLogSheet(); // Also updates index sheet
} else {
await writeIndexSheet();
}
log.info({ sheetName, rowCount }, "Batch finalized.");
};
type LoadLogSheetArgs = {
sheetName: string;
/** The starting row to load. If omitted, loads all rows (expensive). */
fromRow?: number;
};
/** Not currently used. */
export const loadLogSheet = async ({
sheetName,
fromRow = 2, // omit header row
}: LoadLogSheetArgs) => {
const client = sheetsClient!;
const spreadsheetId = config.googleSheetsSpreadsheetId!;
const range = `${sheetName}!A${fromRow}:E`;
const res = await client.spreadsheets.values.get({
spreadsheetId: spreadsheetId,
range,
});
const data = assertData(res);
const values = data.values || [];
const rows = values.slice(1).map((row) => {
return {
model: row[0],
endpoint: row[1],
promptRaw: row[2],
promptFlattened: row[3],
response: row[4],
};
});
activeLogSheet = { sheetName, rows };
};
export const init = async (onStop: () => void) => {
if (sheetsClient) {
return;
}
if (!config.googleSheetsKey || !config.googleSheetsSpreadsheetId) {
throw new Error(
"Missing required Google Sheets config. Refer to documentation for setup instructions."
);
}
log.info("Initializing Google Sheets backend.");
const encodedCreds = config.googleSheetsKey;
// encodedCreds is a base64-encoded JSON key from the GCP console.
const creds: CredentialBody = JSON.parse(
Buffer.from(encodedCreds, "base64").toString("utf8").trim()
);
const auth = new google.auth.GoogleAuth({
scopes: ["https://www.googleapis.com/auth/spreadsheets"],
credentials: creds,
});
sheetsClient = google.sheets({ version: "v4", auth });
stopCallback = onStop;
const sheetId = config.googleSheetsSpreadsheetId;
const res = await sheetsClient.spreadsheets.get({
spreadsheetId: sheetId,
});
if (!res.data) {
const { status, statusText, headers } = res;
log.error(
{
res: { status, statusText, headers },
creds: {
client_email: creds.client_email?.slice(0, 5) + "********",
private_key: creds.private_key?.slice(0, 5) + "********",
},
sheetId: config.googleSheetsSpreadsheetId,
},
"Could not connect to Google Sheets."
);
stop();
throw new Error("Could not connect to Google Sheets.");
} else {
const sheetTitle = res.data.properties?.title;
log.info({ sheetId, sheetTitle }, "Connected to Google Sheets.");
}
// Load or create the index sheet and write the lockId to it.
try {
log.info("Loading index sheet.");
await loadIndexSheet(false);
await writeIndexSheet();
} catch (e) {
log.info("Creating new index sheet.");
await createIndexSheet();
}
};
/** Called during some unrecoverable error to tell the log queue to stop. */
function stop() {
log.warn("Stopping Google Sheets backend.");
if (stopCallback) {
stopCallback();
}
sheetsClient = null;
}
function assertData<T = sheets_v4.Schema$ValueRange>(res: GaxiosResponse<T>) {
if (!res.data) {
const { status, statusText, headers } = res;
log.error(
{ res: { status, statusText, headers } },
"Unexpected response from Google Sheets API."
);
}
return res.data!;
}
|
knanon/oai
|
src/prompt-logging/backends/sheets.ts
|
TypeScript
|
unknown
| 12,733 |
/* Logs prompts and model responses to a persistent storage backend, if enabled.
Since the proxy is generally deployed to free-tier services, our options for
persistent storage are pretty limited. We'll use Google Sheets as a makeshift
database for now.
Due to the limitations of Google Sheets, we'll queue up log entries and flush
them to the API periodically. */
export interface PromptLogEntry {
model: string;
endpoint: string;
/** JSON prompt passed to the model */
promptRaw: string;
/** Prompt with user and assistant messages flattened into a single string */
promptFlattened: string;
response: string;
// TODO: temperature, top_p, top_k, etc.
}
export * as logQueue from "./log-queue";
|
knanon/oai
|
src/prompt-logging/index.ts
|
TypeScript
|
unknown
| 715 |
/* Queues incoming prompts/responses and periodically flushes them to configured
* logging backend. */
import { logger } from "../logger";
import { PromptLogEntry } from ".";
import { sheets } from "./backends";
const FLUSH_INTERVAL = 1000 * 10;
const MAX_BATCH_SIZE = 25;
const queue: PromptLogEntry[] = [];
const log = logger.child({ module: "log-queue" });
let started = false;
let timeoutId: NodeJS.Timeout | null = null;
let retrying = false;
let consecutiveFailedBatches = 0;
export const enqueue = (payload: PromptLogEntry) => {
if (!started) {
log.warn("Log queue not started, discarding incoming log entry.");
return;
}
queue.push(payload);
};
export const flush = async () => {
if (!started) {
return;
}
if (queue.length > 0) {
const batchSize = Math.min(MAX_BATCH_SIZE, queue.length);
const nextBatch = queue.splice(0, batchSize);
log.info({ size: nextBatch.length }, "Submitting new batch.");
try {
await sheets.appendBatch(nextBatch);
retrying = false;
consecutiveFailedBatches = 0;
} catch (e: any) {
if (retrying) {
log.error(
{ message: e.message, stack: e.stack },
"Failed twice to flush batch, discarding."
);
retrying = false;
consecutiveFailedBatches++;
} else {
// Put the batch back at the front of the queue and try again
log.warn(
{ message: e.message, stack: e.stack },
"Failed to flush batch. Retrying."
);
queue.unshift(...nextBatch);
retrying = true;
setImmediate(() => flush());
return;
}
}
}
const useHalfInterval = queue.length > MAX_BATCH_SIZE / 2;
scheduleFlush(useHalfInterval);
};
export const start = async () => {
try {
await sheets.init(() => stop());
log.info("Logging backend initialized.");
started = true;
} catch (e) {
log.error(e, "Could not initialize logging backend.");
return;
}
scheduleFlush();
};
export const stop = () => {
if (timeoutId) {
clearTimeout(timeoutId);
}
log.info("Stopping log queue.");
started = false;
};
const scheduleFlush = (halfInterval = false) => {
if (consecutiveFailedBatches > 3) {
// TODO: may cause memory issues on busy servers, though if we crash that
// may actually fix the problem with logs randomly not being flushed.
const oneMinute = 60 * 1000;
const maxBackoff = 10 * oneMinute;
const backoff = Math.min(consecutiveFailedBatches * oneMinute, maxBackoff);
timeoutId = setTimeout(() => {
flush();
}, backoff);
log.warn(
{ consecutiveFailedBatches, backoffMs: backoff },
"Failed to flush 3 batches in a row, pausing for a few minutes."
);
return;
}
if (halfInterval) {
log.warn(
{ queueSize: queue.length },
"Queue is falling behind, switching to faster flush interval."
);
}
timeoutId = setTimeout(
() => {
flush();
},
halfInterval ? FLUSH_INTERVAL / 2 : FLUSH_INTERVAL
);
};
|
knanon/oai
|
src/prompt-logging/log-queue.ts
|
TypeScript
|
unknown
| 3,041 |
import { Request, RequestHandler, Router } from "express";
import * as http from "http";
import { createProxyMiddleware } from "http-proxy-middleware";
import { config } from "../config";
import { logger } from "../logger";
import { createQueueMiddleware } from "./queue";
import { ipLimiter } from "./rate-limit";
import { handleProxyError } from "./middleware/common";
import {
addKey,
addAnthropicPreamble,
blockZoomerOrigins,
createPreprocessorMiddleware,
finalizeBody,
languageFilter,
limitOutputTokens,
removeOriginHeaders,
} from "./middleware/request";
import {
ProxyResHandlerWithBody,
createOnProxyResHandler,
} from "./middleware/response";
let modelsCache: any = null;
let modelsCacheTime = 0;
const getModelsResponse = () => {
if (new Date().getTime() - modelsCacheTime < 1000 * 60) {
return modelsCache;
}
if (!config.anthropicKey) return { object: "list", data: [] };
const claudeVariants = [
"claude-v1",
"claude-v1-100k",
"claude-instant-v1",
"claude-instant-v1-100k",
"claude-v1.3",
"claude-v1.3-100k",
"claude-v1.2",
"claude-v1.0",
"claude-instant-v1.1",
"claude-instant-v1.1-100k",
"claude-instant-v1.0",
"claude-2", // claude-2 is 100k by default it seems
"claude-2.0",
];
const models = claudeVariants.map((id) => ({
id,
object: "model",
created: new Date().getTime(),
owned_by: "anthropic",
permission: [],
root: "claude",
parent: null,
}));
modelsCache = { object: "list", data: models };
modelsCacheTime = new Date().getTime();
return modelsCache;
};
const handleModelRequest: RequestHandler = (_req, res) => {
res.status(200).json(getModelsResponse());
};
const rewriteAnthropicRequest = (
proxyReq: http.ClientRequest,
req: Request,
res: http.ServerResponse
) => {
const rewriterPipeline = [
addKey,
addAnthropicPreamble,
languageFilter,
limitOutputTokens,
blockZoomerOrigins,
removeOriginHeaders,
finalizeBody,
];
try {
for (const rewriter of rewriterPipeline) {
rewriter(proxyReq, req, res, {});
}
} catch (error) {
req.log.error(error, "Error while executing proxy rewriter");
proxyReq.destroy(error as Error);
}
};
/** Only used for non-streaming requests. */
const anthropicResponseHandler: ProxyResHandlerWithBody = async (
_proxyRes,
req,
res,
body
) => {
if (typeof body !== "object") {
throw new Error("Expected body to be an object");
}
if (config.promptLogging) {
const host = req.get("host");
body.proxy_note = `Prompts are logged on this proxy instance. See ${host} for more information.`;
}
if (!req.originalUrl.includes("/v1/complete") && !req.originalUrl.includes("/complete")) {
req.log.info("Transforming Anthropic response to OpenAI format");
body = transformAnthropicResponse(body);
}
res.status(200).json(body);
};
/**
* Transforms a model response from the Anthropic API to match those from the
* OpenAI API, for users using Claude via the OpenAI-compatible endpoint. This
* is only used for non-streaming requests as streaming requests are handled
* on-the-fly.
*/
function transformAnthropicResponse(
anthropicBody: Record<string, any>
): Record<string, any> {
return {
id: "ant-" + anthropicBody.log_id,
object: "chat.completion",
created: Date.now(),
model: anthropicBody.model,
usage: {
prompt_tokens: 0,
completion_tokens: 0,
total_tokens: 0,
},
choices: [
{
message: {
role: "assistant",
content: anthropicBody.completion?.trim(),
},
finish_reason: anthropicBody.stop_reason,
index: 0,
},
],
};
}
const anthropicProxy = createQueueMiddleware(
createProxyMiddleware({
target: "https://api.anthropic.com",
changeOrigin: true,
on: {
proxyReq: rewriteAnthropicRequest,
proxyRes: createOnProxyResHandler([anthropicResponseHandler]),
error: handleProxyError,
},
selfHandleResponse: true,
logger,
pathRewrite: {
// Send OpenAI-compat requests to the real Anthropic endpoint.
"^/v1/chat/completions": "/v1/complete",
},
})
);
const anthropicRouter = Router();
// Fix paths because clients don't consistently use the /v1 prefix.
anthropicRouter.use((req, _res, next) => {
if (!req.path.startsWith("/v1/")) {
req.url = `/v1${req.url}`;
}
next();
});
anthropicRouter.get("/v1/models", handleModelRequest);
anthropicRouter.post(
"/v1/complete",
ipLimiter,
createPreprocessorMiddleware({ inApi: "anthropic", outApi: "anthropic" }),
anthropicProxy
);
// OpenAI-to-Anthropic compatibility endpoint.
anthropicRouter.post(
"/v1/chat/completions",
ipLimiter,
createPreprocessorMiddleware({ inApi: "openai", outApi: "anthropic" }),
anthropicProxy
);
// Redirect browser requests to the homepage.
anthropicRouter.get("*", (req, res, next) => {
const isBrowser = req.headers["user-agent"]?.includes("Mozilla");
if (isBrowser) {
res.redirect("/");
} else {
next();
}
});
export const anthropic = anthropicRouter;
|
knanon/oai
|
src/proxy/anthropic.ts
|
TypeScript
|
unknown
| 5,131 |
import type { Request, RequestHandler } from "express";
import { config } from "../../config";
import { authenticate, getUser } from "./user-store";
const GATEKEEPER = config.gatekeeper;
const PROXY_KEY = config.proxyKey;
const ADMIN_KEY = config.adminKey;
function getProxyAuthorizationFromRequest(req: Request): string | undefined {
// Anthropic's API uses x-api-key instead of Authorization. Some clients will
// pass the _proxy_ key in this header too, instead of providing it as a
// Bearer token in the Authorization header. So we need to check both.
// Prefer the Authorization header if both are present.
if (req.headers.authorization) {
const token = req.headers.authorization?.slice("Bearer ".length);
delete req.headers.authorization;
return token;
}
if (req.headers["x-api-key"]) {
const token = req.headers["x-api-key"]?.toString();
delete req.headers["x-api-key"];
return token;
}
return undefined;
}
export const gatekeeper: RequestHandler = (req, res, next) => {
const token = getProxyAuthorizationFromRequest(req);
// TODO: Generate anonymous users based on IP address for public or proxy_key
// modes so that all middleware can assume a user of some sort is present.
if (ADMIN_KEY && token === ADMIN_KEY) {
return next();
}
if (GATEKEEPER === "none") {
return next();
}
if (GATEKEEPER === "proxy_key" && token === PROXY_KEY) {
return next();
}
if (GATEKEEPER === "user_token" && token) {
const user = authenticate(token, req.ip);
if (user) {
req.user = user;
return next();
} else {
const maybeBannedUser = getUser(token);
if (maybeBannedUser?.disabledAt) {
return res.status(403).json({
error: `Forbidden: ${
maybeBannedUser.disabledReason || "Token disabled"
}`,
});
}
}
}
res.status(401).json({ error: "Unauthorized" });
};
|
knanon/oai
|
src/proxy/auth/gatekeeper.ts
|
TypeScript
|
unknown
| 1,931 |
/**
* Basic user management. Handles creation and tracking of proxy users, personal
* access tokens, and quota management. Supports in-memory and Firebase Realtime
* Database persistence stores.
*
* Users are identified solely by their personal access token. The token is
* used to authenticate the user for all proxied requests.
*/
import admin from "firebase-admin";
import { v4 as uuid } from "uuid";
import { config, getFirebaseApp } from "../../config";
import { logger } from "../../logger";
export interface User {
/** The user's personal access token. */
token: string;
/** The IP addresses the user has connected from. */
ip: string[];
/** The user's privilege level. */
type: UserType;
/** The number of prompts the user has made. */
promptCount: number;
/** The number of tokens the user has consumed. Not yet implemented. */
tokenCount: number;
/** The time at which the user was created. */
createdAt: number;
/** The time at which the user last connected. */
lastUsedAt?: number;
/** The time at which the user was disabled, if applicable. */
disabledAt?: number;
/** The reason for which the user was disabled, if applicable. */
disabledReason?: string;
}
/**
* Possible privilege levels for a user.
* - `normal`: Default role. Subject to usual rate limits and quotas.
* - `special`: Special role. Higher quotas and exempt from auto-ban/lockout.
* TODO: implement auto-ban/lockout for normal users when they do naughty shit
*/
export type UserType = "normal" | "special";
type UserUpdate = Partial<User> & Pick<User, "token">;
const MAX_IPS_PER_USER = config.maxIpsPerUser;
const users: Map<string, User> = new Map();
const usersToFlush = new Set<string>();
export async function init() {
logger.info({ store: config.gatekeeperStore }, "Initializing user store...");
if (config.gatekeeperStore === "firebase_rtdb") {
await initFirebase();
}
logger.info("User store initialized.");
}
/** Creates a new user and returns their token. */
export function createUser() {
const token = uuid();
users.set(token, {
token,
ip: [],
type: "normal",
promptCount: 0,
tokenCount: 0,
createdAt: Date.now(),
});
usersToFlush.add(token);
return token;
}
/** Returns the user with the given token if they exist. */
export function getUser(token: string) {
return users.get(token);
}
/** Returns a list of all users. */
export function getUsers() {
return Array.from(users.values()).map((user) => ({ ...user }));
}
/**
* Upserts the given user. Intended for use with the /admin API for updating
* user information via JSON. Use other functions for more specific operations.
*/
export function upsertUser(user: UserUpdate) {
const existing: User = users.get(user.token) ?? {
token: user.token,
ip: [],
type: "normal",
promptCount: 0,
tokenCount: 0,
createdAt: Date.now(),
};
users.set(user.token, {
...existing,
...user,
});
usersToFlush.add(user.token);
// Immediately schedule a flush to the database if we're using Firebase.
if (config.gatekeeperStore === "firebase_rtdb") {
setImmediate(flushUsers);
}
return users.get(user.token);
}
/** Increments the prompt count for the given user. */
export function incrementPromptCount(token: string) {
const user = users.get(token);
if (!user) return;
user.promptCount++;
usersToFlush.add(token);
}
/** Increments the token count for the given user by the given amount. */
export function incrementTokenCount(token: string, amount = 1) {
const user = users.get(token);
if (!user) return;
user.tokenCount += amount;
usersToFlush.add(token);
}
/**
* Given a user's token and IP address, authenticates the user and adds the IP
* to the user's list of IPs. Returns the user if they exist and are not
* disabled, otherwise returns undefined.
*/
export function authenticate(token: string, ip: string) {
const user = users.get(token);
if (!user || user.disabledAt) return;
if (!user.ip.includes(ip)) user.ip.push(ip);
// If too many IPs are associated with the user, disable the account.
const ipLimit =
user.type === "special" || !MAX_IPS_PER_USER ? Infinity : MAX_IPS_PER_USER;
if (user.ip.length > ipLimit) {
disableUser(token, "Too many IP addresses associated with this token.");
return;
}
user.lastUsedAt = Date.now();
usersToFlush.add(token);
return user;
}
/** Disables the given user, optionally providing a reason. */
export function disableUser(token: string, reason?: string) {
const user = users.get(token);
if (!user) return;
user.disabledAt = Date.now();
user.disabledReason = reason;
usersToFlush.add(token);
}
// TODO: Firebase persistence is pretend right now and just polls the in-memory
// store to sync it with Firebase when it changes. Will refactor to abstract
// persistence layer later so we can support multiple stores.
let firebaseTimeout: NodeJS.Timeout | undefined;
async function initFirebase() {
logger.info("Connecting to Firebase...");
const app = getFirebaseApp();
const db = admin.database(app);
const usersRef = db.ref("users");
const snapshot = await usersRef.once("value");
const users: Record<string, User> | null = snapshot.val();
firebaseTimeout = setInterval(flushUsers, 20 * 1000);
if (!users) {
logger.info("No users found in Firebase.");
return;
}
for (const token in users) {
upsertUser(users[token]);
}
usersToFlush.clear();
const numUsers = Object.keys(users).length;
logger.info({ users: numUsers }, "Loaded users from Firebase");
}
async function flushUsers() {
const app = getFirebaseApp();
const db = admin.database(app);
const usersRef = db.ref("users");
const updates: Record<string, User> = {};
for (const token of usersToFlush) {
const user = users.get(token);
if (!user) {
continue;
}
updates[token] = user;
}
usersToFlush.clear();
const numUpdates = Object.keys(updates).length;
if (numUpdates === 0) {
return;
}
await usersRef.update(updates);
logger.info(
{ users: Object.keys(updates).length },
"Flushed users to Firebase"
);
}
|
knanon/oai
|
src/proxy/auth/user-store.ts
|
TypeScript
|
unknown
| 6,166 |
import { config } from "../config";
import { RequestHandler } from "express";
const BLOCKED_REFERERS = config.blockedOrigins?.split(",") || [];
/** Disallow requests from blocked origins and referers. */
export const checkOrigin: RequestHandler = (req, res, next) => {
const blocks = BLOCKED_REFERERS || [];
for (const block of blocks) {
if (
req.headers.origin?.includes(block) ||
req.headers.referer?.includes(block)
) {
req.log.warn(
{ origin: req.headers.origin, referer: req.headers.referer },
"Blocked request from origin or referer"
);
// VenusAI requests incorrectly say they accept HTML despite immediately
// trying to parse the response as JSON, so we check the body type instead
const hasJsonBody =
req.headers["content-type"]?.includes("application/json");
if (!req.accepts("html") || hasJsonBody) {
return res.status(403).json({
error: { type: "blocked_origin", message: config.blockMessage },
});
} else {
const destination = config.blockRedirect || "https://openai.com";
return res.status(403).send(
`<html>
<head>
<title>Redirecting</title>
<meta http-equiv="refresh" content="3; url=${destination}" />
</head>
<body style="font-family: sans-serif; height: 100vh; display: flex; flex-direction: column; justify-content: center; text-align: center;">
<h2>${config.blockMessage}</h3>
<p><strong>Please hold while you are redirected to a more suitable service.</strong></p>
</body>
</html>`
);
}
}
}
next();
};
|
knanon/oai
|
src/proxy/check-origin.ts
|
TypeScript
|
unknown
| 1,596 |
import { Request, RequestHandler, Router } from "express";
import * as http from "http";
import { createProxyMiddleware } from "http-proxy-middleware";
import { logger } from "../logger";
import { createQueueMiddleware } from "./queue";
import { ipLimiter } from "./rate-limit";
import { handleProxyError } from "./middleware/common";
import {
createPreprocessorMiddleware,
finalizeBody,
} from "./middleware/request";
import {
ProxyResHandlerWithBody,
createOnProxyResHandler,
} from "./middleware/response";
import { keyPool } from "../key-management";
import { config } from "../config";
const getModelsResponse = () => {
const variants = ["gepetto4-v1"];
const models = variants.map((id) => ({
id,
object: "model",
created: new Date().getTime(),
owned_by: "some swedes",
permission: [],
root: "openai (maybe?)",
parent: null,
}));
return { object: "list", data: models };
};
const handleModelRequest: RequestHandler = (_req, res) => {
res.status(200).json(getModelsResponse());
};
const rewriteGepettoRequest = (
proxyReq: http.ClientRequest,
req: Request,
res: http.ServerResponse
) => {
const rewriterPipeline = [finalizeBody];
try {
if (req.body.stream) {
throw new Error("Streaming is not supported on this endpoint.");
}
// gepetto doesn't use api keys but most of the code expects one to be present
req.key = keyPool.get("gpt-4");
for (const rewriter of rewriterPipeline) {
rewriter(proxyReq, req, res, {});
}
} catch (error) {
req.log.error(error, "Error while executing proxy rewriter");
proxyReq.destroy(error as Error);
}
};
const gepettoResponseHandler: ProxyResHandlerWithBody = async (
_proxyRes,
req,
res,
body
) => {
if (typeof body !== "object") {
throw new Error("Expected body to be an object");
}
if (config.promptLogging) {
const host = req.get("host");
body.proxy_note = `Prompts are logged on this proxy instance. See ${host} for more information.`;
}
res.status(200).json(body);
};
const gepettoProxy = createQueueMiddleware(
createProxyMiddleware({
target: process.env.GEPETTO_URL,
changeOrigin: true,
on: {
proxyReq: rewriteGepettoRequest,
proxyRes: createOnProxyResHandler([gepettoResponseHandler]),
error: handleProxyError,
},
selfHandleResponse: true,
logger,
pathRewrite: {
// The POST request needs to be to the root path.
"^/v1/chat/completions": "/",
},
})
);
const gepettoRouter = Router();
// Fix paths because clients don't consistently use the /v1 prefix.
gepettoRouter.use((req, _res, next) => {
if (!req.path.startsWith("/v1/")) {
req.url = `/v1${req.url}`;
}
next();
});
gepettoRouter.get("/v1/models", handleModelRequest);
gepettoRouter.post(
"/v1/chat/completions",
ipLimiter,
createPreprocessorMiddleware({ inApi: "openai", outApi: "gepetto" }),
gepettoProxy
);
// Redirect browser requests to the homepage.
gepettoRouter.get("*", (req, res, next) => {
const isBrowser = req.headers["user-agent"]?.includes("Mozilla");
if (isBrowser) {
res.redirect("/");
} else {
next();
}
});
export const gepetto = gepettoRouter;
|
knanon/oai
|
src/proxy/gepetto.ts
|
TypeScript
|
unknown
| 3,207 |
/* Pretends to be a KoboldAI API endpoint and translates incoming Kobold
requests to OpenAI API equivalents. */
import { Request, Response, Router } from "express";
import http from "http";
import { createProxyMiddleware } from "http-proxy-middleware";
import { config } from "../config";
import { logger } from "../logger";
import { ipLimiter } from "./rate-limit";
import { handleProxyError } from "./middleware/common";
import {
addKey,
createPreprocessorMiddleware,
finalizeBody,
languageFilter,
limitOutputTokens,
transformKoboldPayload,
} from "./middleware/request";
import {
createOnProxyResHandler,
ProxyResHandlerWithBody,
} from "./middleware/response";
export const handleModelRequest = (_req: Request, res: Response) => {
res.status(200).json({ result: "Connected to OpenAI reverse proxy" });
};
export const handleSoftPromptsRequest = (_req: Request, res: Response) => {
res.status(200).json({ soft_prompts_list: [] });
};
const rewriteRequest = (
proxyReq: http.ClientRequest,
req: Request,
res: Response
) => {
if (config.queueMode !== "none") {
const msg = `Queueing is enabled on this proxy instance and is incompatible with the KoboldAI endpoint. Use the OpenAI endpoint instead.`;
proxyReq.destroy(new Error(msg));
return;
}
req.body.stream = false;
const rewriterPipeline = [
addKey,
transformKoboldPayload,
languageFilter,
limitOutputTokens,
finalizeBody,
];
try {
for (const rewriter of rewriterPipeline) {
rewriter(proxyReq, req, res, {});
}
} catch (error) {
logger.error(error, "Error while executing proxy rewriter");
proxyReq.destroy(error as Error);
}
};
const koboldResponseHandler: ProxyResHandlerWithBody = async (
_proxyRes,
req,
res,
body
) => {
if (typeof body !== "object") {
throw new Error("Expected body to be an object");
}
const koboldResponse = {
results: [{ text: body.choices[0].message.content }],
model: body.model,
...(config.promptLogging && {
proxy_note: `Prompt logging is enabled on this proxy instance. See ${req.get(
"host"
)} for more information.`,
}),
};
res.send(JSON.stringify(koboldResponse));
};
const koboldOaiProxy = createProxyMiddleware({
target: "https://api.openai.com",
changeOrigin: true,
pathRewrite: {
"^/api/v1/generate": "/v1/chat/completions",
},
on: {
proxyReq: rewriteRequest,
proxyRes: createOnProxyResHandler([koboldResponseHandler]),
error: handleProxyError,
},
selfHandleResponse: true,
logger,
});
const koboldRouter = Router();
koboldRouter.get("/api/v1/model", handleModelRequest);
koboldRouter.get("/api/v1/config/soft_prompts_list", handleSoftPromptsRequest);
koboldRouter.post(
"/api/v1/generate",
ipLimiter,
createPreprocessorMiddleware({ inApi: "kobold", outApi: "openai" }),
koboldOaiProxy
);
koboldRouter.use((req, res) => {
logger.warn(`Unhandled kobold request: ${req.method} ${req.path}`);
res.status(404).json({ error: "Not found" });
});
export const kobold = koboldRouter;
|
knanon/oai
|
src/proxy/kobold.ts
|
TypeScript
|
unknown
| 3,078 |
import { Request, Response } from "express";
import httpProxy from "http-proxy";
import { ZodError } from "zod";
const OPENAI_CHAT_COMPLETION_ENDPOINT = "/v1/chat/completions";
const ANTHROPIC_COMPLETION_ENDPOINT = "/v1/complete";
const GEPETTO_COMPLETION_ENDPOINT = "/";
/** Returns true if we're making a request to a completion endpoint. */
export function isCompletionRequest(req: Request) {
return (
req.method === "POST" &&
[
OPENAI_CHAT_COMPLETION_ENDPOINT,
ANTHROPIC_COMPLETION_ENDPOINT,
GEPETTO_COMPLETION_ENDPOINT,
].some((endpoint) => req.path.startsWith(endpoint))
);
}
export function writeErrorResponse(
req: Request,
res: Response,
statusCode: number,
errorPayload: Record<string, any>
) {
const errorSource = errorPayload.error?.type.startsWith("proxy")
? "proxy"
: "upstream";
// If we're mid-SSE stream, send a data event with the error payload and end
// the stream. Otherwise just send a normal error response.
if (
res.headersSent ||
res.getHeader("content-type") === "text/event-stream"
) {
const errorContent =
statusCode === 403
? JSON.stringify(errorPayload)
: JSON.stringify(errorPayload, null, 2);
const msg = buildFakeSseMessage(
`${errorSource} error (${statusCode})`,
errorContent,
req
);
res.write(msg);
res.write(`data: [DONE]\n\n`);
res.end();
} else {
res.status(statusCode).json(errorPayload);
}
}
export const handleProxyError: httpProxy.ErrorCallback = (err, req, res) => {
req.log.error({ err }, `Error during proxy request middleware`);
handleInternalError(err, req as Request, res as Response);
};
export const handleInternalError = (
err: Error,
req: Request,
res: Response
) => {
try {
const isZod = err instanceof ZodError;
const isForbidden = err.name === "ForbiddenError";
if (isZod) {
writeErrorResponse(req, res, 400, {
error: {
type: "proxy_validation_error",
proxy_note: `Reverse proxy couldn't validate your request when trying to transform it. Your client may be sending invalid data.`,
issues: err.issues,
stack: err.stack,
message: err.message,
},
});
} else if (isForbidden) {
// Spoofs a vaguely threatening OpenAI error message. Only invoked by the
// block-zoomers rewriter to scare off tiktokers.
writeErrorResponse(req, res, 403, {
error: {
type: "organization_account_disabled",
code: "policy_violation",
param: null,
message: err.message,
},
});
} else {
writeErrorResponse(req, res, 500, {
error: {
type: "proxy_rewriter_error",
proxy_note: `Reverse proxy encountered an error before it could reach the upstream API.`,
message: err.message,
stack: err.stack,
},
});
}
} catch (e) {
req.log.error(
{ error: e },
`Error writing error response headers, giving up.`
);
}
};
export function buildFakeSseMessage(
type: string,
string: string,
req: Request
) {
let fakeEvent;
const useBackticks = !type.includes("403");
const msgContent = useBackticks
? `\`\`\`\n[${type}: ${string}]\n\`\`\`\n`
: `[${type}: ${string}]`;
if (req.inboundApi === "anthropic") {
fakeEvent = {
completion: msgContent,
stop_reason: type,
truncated: false, // I've never seen this be true
stop: null,
model: req.body?.model,
log_id: "proxy-req-" + req.id,
};
} else {
fakeEvent = {
id: "chatcmpl-" + req.id,
object: "chat.completion.chunk",
created: Date.now(),
model: req.body?.model,
choices: [
{
delta: { content: msgContent },
index: 0,
finish_reason: type,
},
],
};
}
return `data: ${JSON.stringify(fakeEvent)}\n\n`;
}
|
knanon/oai
|
src/proxy/middleware/common.ts
|
TypeScript
|
unknown
| 3,953 |
import { AnthropicKey, Key } from "../../../key-management";
import { isCompletionRequest } from "../common";
import { ProxyRequestMiddleware } from ".";
/**
* Some keys require the prompt to start with `\n\nHuman:`. There is no way to
* know this without trying to send the request and seeing if it fails. If a
* key is marked as requiring a preamble, it will be added here.
*/
export const addAnthropicPreamble: ProxyRequestMiddleware = (
_proxyReq,
req
) => {
if (!isCompletionRequest(req) || req.key?.service !== "anthropic") {
return;
}
let preamble = "";
let prompt = req.body.prompt;
assertAnthropicKey(req.key);
if (req.key.requiresPreamble) {
preamble = prompt.startsWith("\n\nHuman:") ? "" : "\n\nHuman:";
req.log.debug({ key: req.key.hash, preamble }, "Adding preamble to prompt");
}
req.body.prompt = preamble + prompt;
};
function assertAnthropicKey(key: Key): asserts key is AnthropicKey {
if (key.service !== "anthropic") {
throw new Error(`Expected an Anthropic key, got '${key.service}'`);
}
}
|
knanon/oai
|
src/proxy/middleware/request/add-anthropic-preamble.ts
|
TypeScript
|
unknown
| 1,058 |
import { Key, keyPool } from "../../../key-management";
import { isCompletionRequest } from "../common";
import { ProxyRequestMiddleware } from ".";
/** Add a key that can service this request to the request object. */
export const addKey: ProxyRequestMiddleware = (proxyReq, req) => {
let assignedKey: Key;
if (!isCompletionRequest(req)) {
// Horrible, horrible hack to stop the proxy from complaining about clients
// not sending a model when they are requesting the list of models (which
// requires a key, but obviously not a model).
// TODO: shouldn't even proxy /models to the upstream API, just fake it
// using the models our key pool has available.
req.body.model = "gpt-3.5-turbo";
}
if (!req.inboundApi || !req.outboundApi) {
const err = new Error(
"Request API format missing. Did you forget to add the request preprocessor to your router?"
);
req.log.error(
{ in: req.inboundApi, out: req.outboundApi, path: req.path },
err.message
);
throw err;
}
if (!req.body?.model) {
throw new Error("You must specify a model with your request.");
}
// This should happen somewhere else but addKey is guaranteed to run first.
req.isStreaming = req.body.stream === true || req.body.stream === "true";
req.body.stream = req.isStreaming;
// Anthropic support has a special endpoint that accepts OpenAI-formatted
// requests and translates them into Anthropic requests. On this endpoint,
// the requested model is an OpenAI one even though we're actually sending
// an Anthropic request.
// For such cases, ignore the requested model entirely.
if (req.inboundApi === "openai" && req.outboundApi === "anthropic") {
req.log.debug("Using an Anthropic key for an OpenAI-compatible request");
// We don't assign the model here, that will happen when transforming the
// request body.
assignedKey = keyPool.get("claude-v1");
} else {
assignedKey = keyPool.get(req.body.model);
}
req.key = assignedKey;
req.log.info(
{
key: assignedKey.hash,
model: req.body?.model,
fromApi: req.inboundApi,
toApi: req.outboundApi,
},
"Assigned key to request"
);
if (assignedKey.service === "anthropic") {
proxyReq.setHeader("X-API-Key", assignedKey.key);
} else {
proxyReq.setHeader("Authorization", `Bearer ${assignedKey.key}`);
}
};
|
knanon/oai
|
src/proxy/middleware/request/add-key.ts
|
TypeScript
|
unknown
| 2,397 |
import { isCompletionRequest } from "../common";
import { ProxyRequestMiddleware } from ".";
const DISALLOWED_ORIGIN_SUBSTRINGS = "janitorai.com,janitor.ai".split(",");
class ForbiddenError extends Error {
constructor(message: string) {
super(message);
this.name = "ForbiddenError";
}
}
/**
* Blocks requests from Janitor AI users with a fake, scary error message so I
* stop getting emails asking for tech support.
*/
export const blockZoomerOrigins: ProxyRequestMiddleware = (_proxyReq, req) => {
if (!isCompletionRequest(req)) {
return;
}
const origin = req.headers.origin || req.headers.referer;
if (origin && DISALLOWED_ORIGIN_SUBSTRINGS.some((s) => origin.includes(s))) {
// Venus-derivatives send a test prompt to check if the proxy is working.
// We don't want to block that just yet.
if (req.body.messages[0]?.content === "Just say TEST") {
return;
}
throw new ForbiddenError(
`Your access was terminated due to violation of our policies, please check your email for more information. If you believe this is in error and would like to appeal, please contact us through our help center at help.openai.com.`
);
}
};
|
knanon/oai
|
src/proxy/middleware/request/block-zoomer-origins.ts
|
TypeScript
|
unknown
| 1,193 |
import { fixRequestBody } from "http-proxy-middleware";
import type { ProxyRequestMiddleware } from ".";
/** Finalize the rewritten request body. Must be the last rewriter. */
export const finalizeBody: ProxyRequestMiddleware = (proxyReq, req) => {
if (["POST", "PUT", "PATCH"].includes(req.method ?? "") && req.body) {
const updatedBody = JSON.stringify(req.body);
proxyReq.setHeader("Content-Length", Buffer.byteLength(updatedBody));
(req as any).rawBody = Buffer.from(updatedBody);
// body-parser and http-proxy-middleware don't play nice together
fixRequestBody(proxyReq, req);
}
};
|
knanon/oai
|
src/proxy/middleware/request/finalize-body.ts
|
TypeScript
|
unknown
| 613 |
import type { Request } from "express";
import type { ClientRequest } from "http";
import type { ProxyReqCallback } from "http-proxy";
// Express middleware (runs before http-proxy-middleware, can be async)
export { createPreprocessorMiddleware } from "./preprocess";
export { setApiFormat } from "./set-api-format";
export { transformOutboundPayload } from "./transform-outbound-payload";
// HPM middleware (runs on onProxyReq, cannot be async)
export { addKey } from "./add-key";
export { addAnthropicPreamble } from "./add-anthropic-preamble";
export { blockZoomerOrigins } from "./block-zoomer-origins";
export { finalizeBody } from "./finalize-body";
export { languageFilter } from "./language-filter";
export { limitCompletions } from "./limit-completions";
export { limitOutputTokens } from "./limit-output-tokens";
export { removeOriginHeaders } from "./remove-origin-headers";
export { transformKoboldPayload } from "./transform-kobold-payload";
/**
* Middleware that runs prior to the request being handled by http-proxy-
* middleware.
*
* Async functions can be used here, but you will not have access to the proxied
* request/response objects, nor the data set by ProxyRequestMiddleware
* functions as they have not yet been run.
*
* User will have been authenticated by the time this middleware runs, but your
* request won't have been assigned an API key yet.
*
* Note that these functions only run once ever per request, even if the request
* is automatically retried by the request queue middleware.
*/
export type RequestPreprocessor = (req: Request) => void | Promise<void>;
/**
* Middleware that runs immediately before the request is sent to the API in
* response to http-proxy-middleware's `proxyReq` event.
*
* Async functions cannot be used here as HPM's event emitter is not async and
* will not wait for the promise to resolve before sending the request.
*
* Note that these functions may be run multiple times per request if the
* first attempt is rate limited and the request is automatically retried by the
* request queue middleware.
*/
export type ProxyRequestMiddleware = ProxyReqCallback<ClientRequest, Request>;
|
knanon/oai
|
src/proxy/middleware/request/index.ts
|
TypeScript
|
unknown
| 2,172 |
import { Request } from "express";
import { config } from "../../../config";
import { logger } from "../../../logger";
import { isCompletionRequest } from "../common";
import { ProxyRequestMiddleware } from ".";
const DISALLOWED_REGEX =
/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DB5\u4E00-\u9FD5\uF900-\uFA6D\uFA70-\uFAD9]/;
// Our shitty free-tier VMs will fall over if we test every single character in
// each 15k character request ten times a second. So we'll just sample 20% of
// the characters and hope that's enough.
const containsDisallowedCharacters = (text: string) => {
const sampleSize = Math.ceil(text.length * 0.2);
const sample = text
.split("")
.sort(() => 0.5 - Math.random())
.slice(0, sampleSize)
.join("");
return DISALLOWED_REGEX.test(sample);
};
/** Block requests containing too many disallowed characters. */
export const languageFilter: ProxyRequestMiddleware = (_proxyReq, req) => {
if (!config.rejectDisallowed) {
return;
}
if (isCompletionRequest(req)) {
const combinedText = getPromptFromRequest(req);
if (containsDisallowedCharacters(combinedText)) {
logger.warn(`Blocked request containing bad characters`);
_proxyReq.destroy(new Error(config.rejectMessage));
}
}
};
function getPromptFromRequest(req: Request) {
const service = req.outboundApi;
const body = req.body;
switch (service) {
case "anthropic":
return body.prompt;
case "openai":
return body.messages
.map((m: { content: string }) => m.content)
.join("\n");
default:
throw new Error(`Unknown service: ${service}`);
}
}
|
knanon/oai
|
src/proxy/middleware/request/language-filter.ts
|
TypeScript
|
unknown
| 1,678 |
import { isCompletionRequest } from "../common";
import { ProxyRequestMiddleware } from ".";
/**
* Don't allow multiple completions to be requested to prevent abuse.
* OpenAI-only, Anthropic provides no such parameter.
**/
export const limitCompletions: ProxyRequestMiddleware = (_proxyReq, req) => {
if (isCompletionRequest(req) && req.outboundApi === "openai") {
const originalN = req.body?.n || 1;
req.body.n = 1;
if (originalN !== req.body.n) {
req.log.warn(`Limiting completion choices from ${originalN} to 1`);
}
}
};
|
knanon/oai
|
src/proxy/middleware/request/limit-completions.ts
|
TypeScript
|
unknown
| 554 |
import { Request } from "express";
import { config } from "../../../config";
import { isCompletionRequest } from "../common";
import { ProxyRequestMiddleware } from ".";
/** Enforce a maximum number of tokens requested from the model. */
export const limitOutputTokens: ProxyRequestMiddleware = (_proxyReq, req) => {
// TODO: do all of this shit in the zod validator
if (isCompletionRequest(req)) {
const requestedMax = Number.parseInt(getMaxTokensFromRequest(req));
const apiMax =
req.outboundApi === "openai"
? config.maxOutputTokensOpenAI
: config.maxOutputTokensAnthropic;
let maxTokens = requestedMax;
if (typeof requestedMax !== "number") {
maxTokens = apiMax;
}
maxTokens = Math.min(maxTokens, apiMax);
if (req.outboundApi === "openai") {
req.body.max_tokens = maxTokens;
} else if (req.outboundApi === "anthropic") {
req.body.max_tokens_to_sample = maxTokens;
}
if (requestedMax !== maxTokens) {
req.log.info(
{ requestedMax, configMax: apiMax, final: maxTokens },
"Limiting user's requested max output tokens"
);
}
}
};
function getMaxTokensFromRequest(req: Request) {
switch (req.outboundApi) {
case "anthropic":
return req.body?.max_tokens_to_sample;
case "openai":
return req.body?.max_tokens;
default:
throw new Error(`Unknown service: ${req.outboundApi}`);
}
}
|
knanon/oai
|
src/proxy/middleware/request/limit-output-tokens.ts
|
TypeScript
|
unknown
| 1,432 |
import { RequestHandler } from "express";
import { handleInternalError } from "../common";
import { RequestPreprocessor, setApiFormat, transformOutboundPayload } from ".";
/**
* Returns a middleware function that processes the request body into the given
* API format, and then sequentially runs the given additional preprocessors.
*/
export const createPreprocessorMiddleware = (
apiFormat: Parameters<typeof setApiFormat>[0],
additionalPreprocessors?: RequestPreprocessor[]
): RequestHandler => {
const preprocessors: RequestPreprocessor[] = [
setApiFormat(apiFormat),
transformOutboundPayload,
...(additionalPreprocessors ?? []),
];
return async function executePreprocessors(req, res, next) {
try {
for (const preprocessor of preprocessors) {
await preprocessor(req);
}
next();
} catch (error) {
req.log.error(error, "Error while executing request preprocessor");
handleInternalError(error as Error, req, res);
}
};
};
|
knanon/oai
|
src/proxy/middleware/request/preprocess.ts
|
TypeScript
|
unknown
| 1,002 |
import { ProxyRequestMiddleware } from ".";
/**
* Removes origin and referer headers before sending the request to the API for
* privacy reasons.
**/
export const removeOriginHeaders: ProxyRequestMiddleware = (proxyReq) => {
proxyReq.setHeader("origin", "");
proxyReq.setHeader("referer", "");
};
|
knanon/oai
|
src/proxy/middleware/request/remove-origin-headers.ts
|
TypeScript
|
unknown
| 305 |
import { Request } from "express";
import { AIService } from "../../../key-management";
import { RequestPreprocessor } from ".";
export const setApiFormat = (api: {
inApi: Request["inboundApi"];
outApi: AIService;
}): RequestPreprocessor => {
return (req) => {
req.inboundApi = api.inApi;
req.outboundApi = api.outApi;
};
};
|
knanon/oai
|
src/proxy/middleware/request/set-api-format.ts
|
TypeScript
|
unknown
| 342 |
import { Request } from "express";
import { z } from "zod";
import { isCompletionRequest } from "../common";
import { RequestPreprocessor } from ".";
// import { countTokens } from "../../../tokenization";
// https://console.anthropic.com/docs/api/reference#-v1-complete
const AnthropicV1CompleteSchema = z.object({
model: z.string().regex(/^claude-/, "Model must start with 'claude-'"),
prompt: z.string({
required_error:
"No prompt found. Are you sending an OpenAI-formatted request to the Claude endpoint?",
}),
max_tokens_to_sample: z.coerce.number(),
stop_sequences: z.array(z.string()).optional(),
stream: z.boolean().optional().default(false),
temperature: z.coerce.number().optional().default(1),
top_k: z.coerce.number().optional().default(-1),
top_p: z.coerce.number().optional().default(-1),
metadata: z.any().optional(),
});
// https://platform.openai.com/docs/api-reference/chat/create
const OpenAIV1ChatCompletionSchema = z.object({
model: z.string().regex(/^gpt/, "Model must start with 'gpt-'"),
messages: z.array(
z.object({
role: z.enum(["system", "user", "assistant"]),
content: z.string(),
name: z.string().optional(),
}),
{
required_error:
"No prompt found. Are you sending an Anthropic-formatted request to the OpenAI endpoint?",
}
),
temperature: z.number().optional().default(1),
top_p: z.number().optional().default(1),
n: z
.literal(1, {
errorMap: () => ({
message: "You may only request a single completion at a time.",
}),
})
.optional(),
stream: z.boolean().optional().default(false),
stop: z.union([z.string(), z.array(z.string())]).optional(),
max_tokens: z.coerce.number().optional(),
frequency_penalty: z.number().optional().default(0),
presence_penalty: z.number().optional().default(0),
logit_bias: z.any().optional(),
user: z.string().optional(),
});
/** Transforms an incoming request body to one that matches the target API. */
export const transformOutboundPayload: RequestPreprocessor = async (req) => {
const sameService = req.inboundApi === req.outboundApi;
const alreadyTransformed = req.retryCount > 0;
const notTransformable = !isCompletionRequest(req);
if (alreadyTransformed || notTransformable) {
return;
}
if (sameService) {
// Just validate, don't transform.
const validator =
req.outboundApi === "openai"
? OpenAIV1ChatCompletionSchema
: AnthropicV1CompleteSchema;
const result = validator.safeParse(req.body);
if (!result.success) {
req.log.error(
{ issues: result.error.issues, body: req.body },
"Request validation failed"
);
throw result.error;
}
return;
}
if (req.inboundApi === "openai" && req.outboundApi === "anthropic") {
req.body = openaiToAnthropic(req.body, req);
return;
}
if (req.inboundApi === "openai" && req.outboundApi === "gepetto") {
req.body = openAiToGepetto(req);
req.log.debug("Transformed OpenAI-to-Gepetto request");
return;
}
throw new Error(
`'${req.inboundApi}' -> '${req.outboundApi}' request proxying is not supported. Make sure your client is configured to use the correct API.`
);
};
function openAiToGepetto(req: Request) {
// I can't figure out the request format for whatever the hell this endpoint
// is supposed to be. It seems to ignore most of the request body except for
// the prompt.
// Until I can confirm otherwise we will just validate and send the request
// body verbatim.
const result = OpenAIV1ChatCompletionSchema.safeParse(req.body);
if (!result.success) {
req.log.error(
{ issues: result.error.issues, body: req.body },
"Invalid OpenAI-to-Gepetto request"
);
throw result.error;
}
return result.data;
}
function openaiToAnthropic(body: any, req: Request) {
const result = OpenAIV1ChatCompletionSchema.safeParse(body);
if (!result.success) {
req.log.error(
{ issues: result.error.issues, body: req.body },
"Invalid OpenAI-to-Anthropic request"
);
throw result.error;
}
// Anthropic has started versioning their API, indicated by an HTTP header
// `anthropic-version`. The new June 2023 version is not backwards compatible
// with our OpenAI-to-Anthropic transformations so we need to explicitly
// request the older version for now. 2023-01-01 will be removed in September.
// https://docs.anthropic.com/claude/reference/versioning
req.headers["anthropic-version"] = "2023-01-01";
const { messages, ...rest } = result.data;
const prompt =
result.data.messages
.map((m) => {
let role: string = m.role;
if (role === "assistant") {
role = "Assistant";
} else if (role === "system") {
role = "System";
} else if (role === "user") {
role = "Human";
}
// https://console.anthropic.com/docs/prompt-design
// `name` isn't supported by Anthropic but we can still try to use it.
return `\n\n${role}: ${m.name?.trim() ? `(as ${m.name}) ` : ""}${
m.content
}`;
})
.join("") + "\n\nAssistant: ";
// No longer defaulting to `claude-v1.2` because it seems to be in the process
// of being deprecated. `claude-v1` is the new default.
// If you have keys that can still use `claude-v1.2`, you can set the
// CLAUDE_BIG_MODEL and CLAUDE_SMALL_MODEL environment variables in your .env
// file.
const CLAUDE_BIG = process.env.CLAUDE_BIG_MODEL || "claude-v1-100k";
const CLAUDE_SMALL = process.env.CLAUDE_SMALL_MODEL || "claude-v1";
// TODO: Finish implementing tokenizer for more accurate model selection.
// This currently uses _character count_, not token count.
const model = prompt.length > 25000 ? CLAUDE_BIG : CLAUDE_SMALL;
let stops = rest.stop
? Array.isArray(rest.stop)
? rest.stop
: [rest.stop]
: [];
// Recommended by Anthropic
stops.push("\n\nHuman:");
// Helps with jailbreak prompts that send fake system messages and multi-bot
// chats that prefix bot messages with "System: Respond as <bot name>".
stops.push("\n\nSystem:");
// Remove duplicates
stops = [...new Set(stops)];
return {
...rest,
model,
prompt: prompt,
max_tokens_to_sample: rest.max_tokens,
stop_sequences: stops,
};
}
|
knanon/oai
|
src/proxy/middleware/request/transform-outbound-payload.ts
|
TypeScript
|
unknown
| 6,374 |
import { Request, Response } from "express";
import * as http from "http";
import { buildFakeSseMessage } from "../common";
import { RawResponseBodyHandler, decodeResponseBody } from ".";
type OpenAiChatCompletionResponse = {
id: string;
object: string;
created: number;
model: string;
choices: {
message: { role: string; content: string };
finish_reason: string | null;
index: number;
}[];
};
type AnthropicCompletionResponse = {
completion: string;
stop_reason: string;
truncated: boolean;
stop: any;
model: string;
log_id: string;
exception: null;
};
/**
* Consume the SSE stream and forward events to the client. Once the stream is
* stream is closed, resolve with the full response body so that subsequent
* middleware can work with it.
*
* Typically we would only need of the raw response handlers to execute, but
* in the event a streamed request results in a non-200 response, we need to
* fall back to the non-streaming response handler so that the error handler
* can inspect the error response.
*
* Currently most frontends don't support Anthropic streaming, so users can opt
* to send requests for Claude models via an endpoint that accepts OpenAI-
* compatible requests and translates the received Anthropic SSE events into
* OpenAI ones, essentially pretending to be an OpenAI streaming API.
*/
export const handleStreamedResponse: RawResponseBodyHandler = async (
proxyRes,
req,
res
) => {
// If these differ, the user is using the OpenAI-compatibile endpoint, so
// we need to translate the SSE events into OpenAI completion events for their
// frontend.
if (!req.isStreaming) {
const err = new Error(
"handleStreamedResponse called for non-streaming request."
);
req.log.error({ stack: err.stack, api: req.inboundApi }, err.message);
throw err;
}
if (req.inboundApi === "gepetto") {
throw new Error("Gepetto streaming not supported at this time.");
}
const key = req.key!;
if (proxyRes.statusCode !== 200) {
// Ensure we use the non-streaming middleware stack since we won't be
// getting any events.
req.isStreaming = false;
req.log.warn(
{ statusCode: proxyRes.statusCode, key: key.hash },
`Streaming request returned error status code. Falling back to non-streaming response handler.`
);
return decodeResponseBody(proxyRes, req, res);
}
return new Promise((resolve, reject) => {
req.log.info({ key: key.hash }, `Starting to proxy SSE stream.`);
// Queued streaming requests will already have a connection open and headers
// sent due to the heartbeat handler. In that case we can just start
// streaming the response without sending headers.
if (!res.headersSent) {
res.setHeader("Content-Type", "text/event-stream");
res.setHeader("Cache-Control", "no-cache");
res.setHeader("Connection", "keep-alive");
res.setHeader("X-Accel-Buffering", "no");
copyHeaders(proxyRes, res);
res.flushHeaders();
}
const originalEvents: string[] = [];
let partialMessage = "";
let lastPosition = 0;
type ProxyResHandler<T extends unknown> = (...args: T[]) => void;
function withErrorHandling<T extends unknown>(fn: ProxyResHandler<T>) {
return (...args: T[]) => {
try {
fn(...args);
} catch (error) {
proxyRes.emit("error", error);
}
};
}
proxyRes.on(
"data",
withErrorHandling((chunk: Buffer) => {
// We may receive multiple (or partial) SSE messages in a single chunk,
// so we need to buffer and emit seperate stream events for full
// messages so we can parse/transform them properly.
const str = chunk.toString();
// Anthropic uses CRLF line endings (out-of-spec btw)
const fullMessages = (partialMessage + str).split(/\r?\n\r?\n/);
partialMessage = fullMessages.pop() || "";
for (const message of fullMessages) {
proxyRes.emit("full-sse-event", message);
}
})
);
proxyRes.on(
"full-sse-event",
withErrorHandling((data) => {
originalEvents.push(data);
const { event, position } = transformEvent({
data,
requestApi: req.inboundApi,
responseApi: req.outboundApi,
lastPosition,
});
lastPosition = position;
res.write(event + "\n\n");
})
);
proxyRes.on(
"end",
withErrorHandling(() => {
let finalBody = convertEventsToFinalResponse(originalEvents, req);
req.log.info({ key: key.hash }, `Finished proxying SSE stream.`);
res.end();
resolve(finalBody);
})
);
proxyRes.on("error", (err) => {
req.log.error({ error: err, key: key.hash }, `Mid-stream error.`);
const fakeErrorEvent = buildFakeSseMessage(
"mid-stream-error",
err.message,
req
);
res.write(`data: ${JSON.stringify(fakeErrorEvent)}\n\n`);
res.write("data: [DONE]\n\n");
res.end();
reject(err);
});
});
};
/**
* Transforms SSE events from the given response API into events compatible with
* the API requested by the client.
*/
function transformEvent({
data,
requestApi,
responseApi,
lastPosition,
}: {
data: string;
requestApi: string;
responseApi: string;
lastPosition: number;
}) {
if (requestApi === responseApi) {
return { position: -1, event: data };
}
if (requestApi === "anthropic" && responseApi === "openai") {
throw new Error(`Anthropic -> OpenAI streaming not implemented.`);
}
// Anthropic sends the full completion so far with each event whereas OpenAI
// only sends the delta. To make the SSE events compatible, we remove
// everything before `lastPosition` from the completion.
if (!data.startsWith("data:")) {
return { position: lastPosition, event: data };
}
if (data.startsWith("data: [DONE]")) {
return { position: lastPosition, event: data };
}
const event = JSON.parse(data.slice("data: ".length));
const newEvent = {
id: "ant-" + event.log_id,
object: "chat.completion.chunk",
created: Date.now(),
model: event.model,
choices: [
{
index: 0,
delta: { content: event.completion?.slice(lastPosition) },
finish_reason: event.stop_reason,
},
],
};
return {
position: event.completion.length,
event: `data: ${JSON.stringify(newEvent)}`,
};
}
/** Copy headers, excluding ones we're already setting for the SSE response. */
function copyHeaders(proxyRes: http.IncomingMessage, res: Response) {
const toOmit = [
"content-length",
"content-encoding",
"transfer-encoding",
"content-type",
"connection",
"cache-control",
];
for (const [key, value] of Object.entries(proxyRes.headers)) {
if (!toOmit.includes(key) && value) {
res.setHeader(key, value);
}
}
}
/**
* Converts the list of incremental SSE events into an object that resembles a
* full, non-streamed response from the API so that subsequent middleware can
* operate on it as if it were a normal response.
* Events are expected to be in the format they were received from the API.
*/
function convertEventsToFinalResponse(events: string[], req: Request) {
if (req.outboundApi === "openai") {
let response: OpenAiChatCompletionResponse = {
id: "",
object: "",
created: 0,
model: "",
choices: [],
};
response = events.reduce((acc, event, i) => {
if (!event.startsWith("data: ")) {
return acc;
}
if (event === "data: [DONE]") {
return acc;
}
const data = JSON.parse(event.slice("data: ".length));
if (i === 0) {
return {
id: data.id,
object: data.object,
created: data.created,
model: data.model,
choices: [
{
message: { role: data.choices[0].delta.role, content: "" },
index: 0,
finish_reason: null,
},
],
};
}
if (data.choices[0].delta.content) {
acc.choices[0].message.content += data.choices[0].delta.content;
}
acc.choices[0].finish_reason = data.choices[0].finish_reason;
return acc;
}, response);
return response;
}
if (req.outboundApi === "anthropic") {
/*
* Full complete responses from Anthropic are conveniently just the same as
* the final SSE event before the "DONE" event, so we can reuse that
*/
const lastEvent = events[events.length - 2].toString();
const data = JSON.parse(
lastEvent.slice(lastEvent.indexOf("data: ") + "data: ".length)
);
const response: AnthropicCompletionResponse = {
...data,
log_id: req.id,
};
return response;
}
if (req.outboundApi === "gepetto") {
// not implemented
return {};
}
throw new Error("If you get this, something is fucked");
}
|
knanon/oai
|
src/proxy/middleware/response/handle-streamed-response.ts
|
TypeScript
|
unknown
| 9,018 |
/* This file is fucking horrendous, sorry */
import { Request, Response } from "express";
import * as http from "http";
import util from "util";
import zlib from "zlib";
import { config } from "../../../config";
import { logger } from "../../../logger";
import { keyPool } from "../../../key-management";
import { enqueue, trackWaitTime } from "../../queue";
import { incrementPromptCount } from "../../auth/user-store";
import { isCompletionRequest, writeErrorResponse } from "../common";
import { handleStreamedResponse } from "./handle-streamed-response";
import { logPrompt } from "./log-prompt";
const DECODER_MAP = {
gzip: util.promisify(zlib.gunzip),
deflate: util.promisify(zlib.inflate),
br: util.promisify(zlib.brotliDecompress),
};
const isSupportedContentEncoding = (
contentEncoding: string
): contentEncoding is keyof typeof DECODER_MAP => {
return contentEncoding in DECODER_MAP;
};
class RetryableError extends Error {
constructor(message: string) {
super(message);
this.name = "RetryableError";
}
}
/**
* Either decodes or streams the entire response body and then passes it as the
* last argument to the rest of the middleware stack.
*/
export type RawResponseBodyHandler = (
proxyRes: http.IncomingMessage,
req: Request,
res: Response
) => Promise<string | Record<string, any>>;
export type ProxyResHandlerWithBody = (
proxyRes: http.IncomingMessage,
req: Request,
res: Response,
/**
* This will be an object if the response content-type is application/json,
* or if the response is a streaming response. Otherwise it will be a string.
*/
body: string | Record<string, any>
) => Promise<void>;
export type ProxyResMiddleware = ProxyResHandlerWithBody[];
/**
* Returns a on.proxyRes handler that executes the given middleware stack after
* the common proxy response handlers have processed the response and decoded
* the body. Custom middleware won't execute if the response is determined to
* be an error from the upstream service as the response will be taken over by
* the common error handler.
*
* For streaming responses, the handleStream middleware will block remaining
* middleware from executing as it consumes the stream and forwards events to
* the client. Once the stream is closed, the finalized body will be attached
* to res.body and the remaining middleware will execute.
*/
export const createOnProxyResHandler = (apiMiddleware: ProxyResMiddleware) => {
return async (
proxyRes: http.IncomingMessage,
req: Request,
res: Response
) => {
const initialHandler = req.isStreaming
? handleStreamedResponse
: decodeResponseBody;
let lastMiddlewareName = initialHandler.name;
try {
const body = await initialHandler(proxyRes, req, res);
const middlewareStack: ProxyResMiddleware = [];
if (req.isStreaming) {
// `handleStreamedResponse` writes to the response and ends it, so
// we can only execute middleware that doesn't write to the response.
middlewareStack.push(trackRateLimit, incrementKeyUsage, logPrompt);
} else {
middlewareStack.push(
trackRateLimit,
handleUpstreamErrors,
incrementKeyUsage,
copyHttpHeaders,
logPrompt,
...apiMiddleware
);
}
for (const middleware of middlewareStack) {
lastMiddlewareName = middleware.name;
await middleware(proxyRes, req, res, body);
}
trackWaitTime(req);
} catch (error: any) {
// Hack: if the error is a retryable rate-limit error, the request has
// been re-enqueued and we can just return without doing anything else.
if (error instanceof RetryableError) {
return;
}
const errorData = {
error: error.stack,
thrownBy: lastMiddlewareName,
key: req.key?.hash,
};
const message = `Error while executing proxy response middleware: ${lastMiddlewareName} (${error.message})`;
if (res.headersSent) {
req.log.error(errorData, message);
// This should have already been handled by the error handler, but
// just in case...
if (!res.writableEnded) {
res.end();
}
return;
}
logger.error(errorData, message);
res
.status(500)
.json({ error: "Internal server error", proxy_note: message });
}
};
};
function reenqueueRequest(req: Request) {
req.log.info(
{ key: req.key?.hash, retryCount: req.retryCount },
`Re-enqueueing request due to retryable error`
);
req.retryCount++;
enqueue(req);
}
/**
* Handles the response from the upstream service and decodes the body if
* necessary. If the response is JSON, it will be parsed and returned as an
* object. Otherwise, it will be returned as a string.
* @throws {Error} Unsupported content-encoding or invalid application/json body
*/
export const decodeResponseBody: RawResponseBodyHandler = async (
proxyRes,
req,
res
) => {
if (req.isStreaming) {
const err = new Error("decodeResponseBody called for a streaming request.");
req.log.error({ stack: err.stack, api: req.inboundApi }, err.message);
throw err;
}
const promise = new Promise<string>((resolve, reject) => {
let chunks: Buffer[] = [];
proxyRes.on("data", (chunk) => chunks.push(chunk));
proxyRes.on("end", async () => {
let body = Buffer.concat(chunks);
const contentEncoding = proxyRes.headers["content-encoding"];
if (contentEncoding) {
if (isSupportedContentEncoding(contentEncoding)) {
const decoder = DECODER_MAP[contentEncoding];
body = await decoder(body);
} else {
const errorMessage = `Proxy received response with unsupported content-encoding: ${contentEncoding}`;
logger.warn({ contentEncoding, key: req.key?.hash }, errorMessage);
writeErrorResponse(req, res, 500, {
error: errorMessage,
contentEncoding,
});
return reject(errorMessage);
}
}
try {
if (proxyRes.headers["content-type"]?.includes("application/json")) {
const json = JSON.parse(body.toString());
return resolve(json);
}
return resolve(body.toString());
} catch (error: any) {
const errorMessage = `Proxy received response with invalid JSON: ${error.message}`;
logger.warn({ error, key: req.key?.hash }, errorMessage);
writeErrorResponse(req, res, 500, { error: errorMessage });
return reject(errorMessage);
}
});
});
return promise;
};
// TODO: This is too specific to OpenAI's error responses.
/**
* Handles non-2xx responses from the upstream service. If the proxied response
* is an error, this will respond to the client with an error payload and throw
* an error to stop the middleware stack.
* On 429 errors, if request queueing is enabled, the request will be silently
* re-enqueued. Otherwise, the request will be rejected with an error payload.
* @throws {Error} On HTTP error status code from upstream service
*/
const handleUpstreamErrors: ProxyResHandlerWithBody = async (
proxyRes,
req,
res,
body
) => {
const statusCode = proxyRes.statusCode || 500;
if (statusCode < 400) {
return;
}
let errorPayload: Record<string, any>;
// Subtract 1 from available keys because if this message is being shown,
// it's because the key is about to be disabled.
const availableKeys = keyPool.available(req.outboundApi) - 1;
const tryAgainMessage = Boolean(availableKeys)
? `There are ${availableKeys} more keys available; try your request again.`
: "There are no more keys available.";
try {
if (typeof body === "object") {
errorPayload = body;
} else {
throw new Error("Received unparsable error response from upstream.");
}
} catch (parseError: any) {
const statusMessage = proxyRes.statusMessage || "Unknown error";
// Likely Bad Gateway or Gateway Timeout from reverse proxy/load balancer
logger.warn(
{ statusCode, statusMessage, key: req.key?.hash },
parseError.message
);
const errorObject = {
statusCode,
statusMessage: proxyRes.statusMessage,
error: parseError.message,
proxy_note: `This is likely a temporary error with the upstream service.`,
};
writeErrorResponse(req, res, statusCode, errorObject);
throw new Error(parseError.message);
}
logger.warn(
{
statusCode,
type: errorPayload.error?.code,
errorPayload,
key: req.key?.hash,
},
`Received error response from upstream. (${proxyRes.statusMessage})`
);
if (statusCode === 400) {
// Bad request (likely prompt is too long)
if (req.outboundApi === "openai") {
errorPayload.proxy_note = `Upstream service rejected the request as invalid. Your prompt may be too long for ${req.body?.model}.`;
} else if (req.outboundApi === "anthropic") {
maybeHandleMissingPreambleError(req, errorPayload);
}
} else if (statusCode === 401) {
// Key is invalid or was revoked
keyPool.disable(req.key!);
errorPayload.proxy_note = `API key is invalid or revoked. ${tryAgainMessage}`;
} else if (statusCode === 429) {
// OpenAI uses this for a bunch of different rate-limiting scenarios.
if (req.outboundApi === "openai") {
handleOpenAIRateLimitError(req, tryAgainMessage, errorPayload);
} else if (req.outboundApi === "anthropic") {
handleAnthropicRateLimitError(req, errorPayload);
}
} else if (statusCode === 404) {
// Most likely model not found
if (req.outboundApi === "openai") {
// TODO: this probably doesn't handle GPT-4-32k variants properly if the
// proxy has keys for both the 8k and 32k context models at the same time.
if (errorPayload.error?.code === "model_not_found") {
if (req.key!.isGpt4) {
errorPayload.proxy_note = `Assigned key isn't provisioned for the GPT-4 snapshot you requested. Try again to get a different key, or use Turbo.`;
} else {
errorPayload.proxy_note = `No model was found for this key.`;
}
}
} else if (req.outboundApi === "anthropic") {
errorPayload.proxy_note = `The requested Claude model might not exist, or the key might not be provisioned for it.`;
}
} else {
errorPayload.proxy_note = `Unrecognized error from upstream service.`;
}
// Some OAI errors contain the organization ID, which we don't want to reveal.
if (errorPayload.error?.message) {
errorPayload.error.message = errorPayload.error.message.replace(
/org-.{24}/gm,
"org-xxxxxxxxxxxxxxxxxxx"
);
}
writeErrorResponse(req, res, statusCode, errorPayload);
throw new Error(errorPayload.error?.message);
};
/**
* This is a workaround for a very strange issue where certain API keys seem to
* enforce more strict input validation than others -- specifically, they will
* require a `\n\nHuman:` prefix on the prompt, perhaps to prevent the key from
* being used as a generic text completion service and to enforce the use of
* the chat RLHF. This is not documented anywhere, and it's not clear why some
* keys enforce this and others don't.
* This middleware checks for that specific error and marks the key as being
* one that requires the prefix, and then re-enqueues the request.
* The exact error is:
* ```
* {
* "error": {
* "type": "invalid_request_error",
* "message": "prompt must start with \"\n\nHuman:\" turn"
* }
* }
* ```
*/
function maybeHandleMissingPreambleError(
req: Request,
errorPayload: Record<string, any>
) {
if (
errorPayload.error?.type === "invalid_request_error" &&
errorPayload.error?.message === 'prompt must start with "\n\nHuman:" turn'
) {
req.log.warn(
{ key: req.key?.hash },
"Request failed due to missing preamble. Key will be marked as such for subsequent requests."
);
keyPool.update(req.key!, { requiresPreamble: true });
if (config.queueMode !== "none") {
reenqueueRequest(req);
throw new RetryableError("Claude request re-enqueued to add preamble.");
}
errorPayload.proxy_note = `This Claude key requires special prompt formatting. Try again; the proxy will reformat your prompt next time.`;
} else {
errorPayload.proxy_note = `Proxy received unrecognized error from Anthropic. Check the specific error for more information.`;
}
}
function handleAnthropicRateLimitError(
req: Request,
errorPayload: Record<string, any>
) {
if (errorPayload.error?.type === "rate_limit_error") {
keyPool.markRateLimited(req.key!);
if (config.queueMode !== "none") {
reenqueueRequest(req);
throw new RetryableError("Claude rate-limited request re-enqueued.");
}
errorPayload.proxy_note = `There are too many in-flight requests for this key. Try again later.`;
} else {
errorPayload.proxy_note = `Unrecognized rate limit error from Anthropic. Key may be over quota.`;
}
}
function handleOpenAIRateLimitError(
req: Request,
tryAgainMessage: string,
errorPayload: Record<string, any>
): Record<string, any> {
const type = errorPayload.error?.type;
if (type === "insufficient_quota") {
// Billing quota exceeded (key is dead, disable it)
keyPool.disable(req.key!);
errorPayload.proxy_note = `Assigned key's quota has been exceeded. ${tryAgainMessage}`;
} else if (type === "access_terminated") {
// Account banned (key is dead, disable it)
keyPool.disable(req.key!);
errorPayload.proxy_note = `Assigned key has been banned by OpenAI for policy violations. ${tryAgainMessage}`;
} else if (type === "billing_not_active") {
// Billing is not active (key is dead, disable it)
keyPool.disable(req.key!);
errorPayload.proxy_note = `Assigned key was deactivated by OpenAI. ${tryAgainMessage}`;
} else if (type === "requests" || type === "tokens") {
// Per-minute request or token rate limit is exceeded, which we can retry
keyPool.markRateLimited(req.key!);
if (config.queueMode !== "none") {
reenqueueRequest(req);
// This is confusing, but it will bubble up to the top-level response
// handler and cause the request to go back into the request queue.
throw new RetryableError("Rate-limited request re-enqueued.");
}
errorPayload.proxy_note = `Assigned key's '${type}' rate limit has been exceeded. Try again later.`;
} else {
// OpenAI probably overloaded
errorPayload.proxy_note = `This is likely a temporary error with OpenAI. Try again in a few seconds.`;
}
return errorPayload;
}
const incrementKeyUsage: ProxyResHandlerWithBody = async (_proxyRes, req) => {
if (isCompletionRequest(req)) {
keyPool.incrementPrompt(req.key!);
if (req.user) {
incrementPromptCount(req.user.token);
}
}
};
const trackRateLimit: ProxyResHandlerWithBody = async (proxyRes, req) => {
keyPool.updateRateLimits(req.key!, proxyRes.headers);
};
const copyHttpHeaders: ProxyResHandlerWithBody = async (
proxyRes,
_req,
res
) => {
Object.keys(proxyRes.headers).forEach((key) => {
// Omit content-encoding because we will always decode the response body
if (key === "content-encoding") {
return;
}
// We're usually using res.json() to send the response, which causes express
// to set content-length. That's not valid for chunked responses and some
// clients will reject it so we need to omit it.
if (key === "transfer-encoding") {
return;
}
res.setHeader(key, proxyRes.headers[key] as string);
});
};
|
knanon/oai
|
src/proxy/middleware/response/index.ts
|
TypeScript
|
unknown
| 15,681 |
import { Request } from "express";
import { config } from "../../../config";
import { AIService } from "../../../key-management";
import { logQueue } from "../../../prompt-logging";
import { isCompletionRequest } from "../common";
import { ProxyResHandlerWithBody } from ".";
import { logger } from "../../../logger";
/** If prompt logging is enabled, enqueues the prompt for logging. */
export const logPrompt: ProxyResHandlerWithBody = async (
_proxyRes,
req,
_res,
responseBody
) => {
if (!config.promptLogging) {
return;
}
if (typeof responseBody !== "object") {
throw new Error("Expected body to be an object");
}
if (!isCompletionRequest(req)) {
return;
}
const promptPayload = getPromptForRequest(req);
const promptFlattened = flattenMessages(promptPayload);
const response = getResponseForService({
service: req.outboundApi,
body: responseBody,
});
logQueue.enqueue({
endpoint: req.inboundApi,
promptRaw: JSON.stringify(promptPayload),
promptFlattened,
model: response.model, // may differ from the requested model
response: response.completion,
});
};
type OaiMessage = {
role: "user" | "assistant" | "system";
content: string;
};
const getPromptForRequest = (req: Request): string | OaiMessage[] => {
// Since the prompt logger only runs after the request has been proxied, we
// can assume the body has already been transformed to the target API's
// format.
if (req.outboundApi === "anthropic") {
return req.body.prompt;
} else {
return req.body.messages;
}
};
const flattenMessages = (messages: string | OaiMessage[]): string => {
if (typeof messages === "string") {
return messages.trim();
}
return messages.map((m) => `${m.role}: ${m.content}`).join("\n");
};
const getResponseForService = ({
service,
body,
}: {
service: AIService;
body: Record<string, any>;
}): { completion: string; model: string } => {
if (service === "anthropic") {
return { completion: body.completion.trim(), model: body.model };
} else {
return { completion: body.choices[0].message.content, model: body.model };
}
};
|
knanon/oai
|
src/proxy/middleware/response/log-prompt.ts
|
TypeScript
|
unknown
| 2,144 |
import { RequestHandler, Request, Router } from "express";
import * as http from "http";
import { createProxyMiddleware } from "http-proxy-middleware";
import { config } from "../config";
import { keyPool } from "../key-management";
import { logger } from "../logger";
import { createQueueMiddleware } from "./queue";
import { ipLimiter } from "./rate-limit";
import { handleProxyError } from "./middleware/common";
import {
addKey,
blockZoomerOrigins,
createPreprocessorMiddleware,
finalizeBody,
languageFilter,
limitCompletions,
limitOutputTokens,
removeOriginHeaders,
} from "./middleware/request";
import {
createOnProxyResHandler,
ProxyResHandlerWithBody,
} from "./middleware/response";
let modelsCache: any = null;
let modelsCacheTime = 0;
function getModelsResponse() {
if (new Date().getTime() - modelsCacheTime < 1000 * 60) {
return modelsCache;
}
// https://platform.openai.com/docs/models/overview
const gptVariants = [
"gpt-4",
"gpt-4-0613",
"gpt-4-0314", // EOL 2023-09-13
"gpt-4-32k",
"gpt-4-32k-0613",
"gpt-4-32k-0314", // EOL 2023-09-13
"gpt-3.5-turbo",
"gpt-3.5-turbo-0301", // EOL 2023-09-13
"gpt-3.5-turbo-0613",
"gpt-3.5-turbo-16k",
"gpt-3.5-turbo-16k-0613",
];
const gpt4Available = keyPool.list().filter((key) => {
return key.service === "openai" && !key.isDisabled && key.isGpt4;
}).length;
const models = gptVariants
.map((id) => ({
id,
object: "model",
created: new Date().getTime(),
owned_by: "openai",
permission: [
{
id: "modelperm-" + id,
object: "model_permission",
created: new Date().getTime(),
organization: "*",
group: null,
is_blocking: false,
},
],
root: id,
parent: null,
}))
.filter((model) => {
if (model.id.startsWith("gpt-4")) {
return gpt4Available > 0;
}
return true;
});
modelsCache = { object: "list", data: models };
modelsCacheTime = new Date().getTime();
return modelsCache;
}
const handleModelRequest: RequestHandler = (_req, res) => {
res.status(200).json(getModelsResponse());
};
const rewriteRequest = (
proxyReq: http.ClientRequest,
req: Request,
res: http.ServerResponse
) => {
const rewriterPipeline = [
addKey,
languageFilter,
limitOutputTokens,
limitCompletions,
blockZoomerOrigins,
removeOriginHeaders,
finalizeBody,
];
try {
for (const rewriter of rewriterPipeline) {
rewriter(proxyReq, req, res, {});
}
} catch (error) {
req.log.error(error, "Error while executing proxy rewriter");
proxyReq.destroy(error as Error);
}
};
const openaiResponseHandler: ProxyResHandlerWithBody = async (
_proxyRes,
req,
res,
body
) => {
if (typeof body !== "object") {
throw new Error("Expected body to be an object");
}
if (config.promptLogging) {
const host = req.get("host");
body.proxy_note = `Prompts are logged on this proxy instance. See ${host} for more information.`;
}
res.status(200).json(body);
};
const openaiProxy = createQueueMiddleware(
createProxyMiddleware({
target: "https://api.openai.com",
changeOrigin: true,
on: {
proxyReq: rewriteRequest,
proxyRes: createOnProxyResHandler([openaiResponseHandler]),
error: handleProxyError,
},
selfHandleResponse: true,
logger,
})
);
const openaiRouter = Router();
// Fix paths because clients don't consistently use the /v1 prefix.
openaiRouter.use((req, _res, next) => {
if (!req.path.startsWith("/v1/")) {
req.url = `/v1${req.url}`;
}
next();
});
openaiRouter.get("/v1/models", handleModelRequest);
openaiRouter.post(
"/v1/chat/completions",
ipLimiter,
createPreprocessorMiddleware({ inApi: "openai", outApi: "openai" }),
openaiProxy
);
// Redirect browser requests to the homepage.
openaiRouter.get("*", (req, res, next) => {
const isBrowser = req.headers["user-agent"]?.includes("Mozilla");
if (isBrowser) {
res.redirect("/");
} else {
next();
}
});
openaiRouter.use((req, res) => {
req.log.warn(`Blocked openai proxy request: ${req.method} ${req.path}`);
res.status(404).json({ error: "Not found" });
});
export const openai = openaiRouter;
|
knanon/oai
|
src/proxy/openai.ts
|
TypeScript
|
unknown
| 4,304 |
/**
* Very scuffed request queue. OpenAI's GPT-4 keys have a very strict rate limit
* of 40000 generated tokens per minute. We don't actually know how many tokens
* a given key has generated, so our queue will simply retry requests that fail
* with a non-billing related 429 over and over again until they succeed.
*
* Dequeueing can operate in one of two modes:
* - 'fair': requests are dequeued in the order they were enqueued.
* - 'random': requests are dequeued randomly, not really a queue at all.
*
* When a request to a proxied endpoint is received, we create a closure around
* the call to http-proxy-middleware and attach it to the request. This allows
* us to pause the request until we have a key available. Further, if the
* proxied request encounters a retryable error, we can simply put the request
* back in the queue and it will be retried later using the same closure.
*/
import type { Handler, Request } from "express";
import { config, DequeueMode } from "../config";
import { keyPool, SupportedModel } from "../key-management";
import { logger } from "../logger";
import { AGNAI_DOT_CHAT_IP } from "./rate-limit";
import { buildFakeSseMessage } from "./middleware/common";
export type QueuePartition = "claude" | "turbo" | "gpt-4";
const queue: Request[] = [];
const log = logger.child({ module: "request-queue" });
let dequeueMode: DequeueMode = "fair";
/** Maximum number of queue slots for Agnai.chat requests. */
const AGNAI_CONCURRENCY_LIMIT = 15;
/** Maximum number of queue slots for individual users. */
const USER_CONCURRENCY_LIMIT = 1;
const sameIpPredicate = (incoming: Request) => (queued: Request) =>
queued.ip === incoming.ip;
const sameUserPredicate = (incoming: Request) => (queued: Request) => {
const incomingUser = incoming.user ?? { token: incoming.ip };
const queuedUser = queued.user ?? { token: queued.ip };
return queuedUser.token === incomingUser.token;
};
export function enqueue(req: Request) {
let enqueuedRequestCount = 0;
let isGuest = req.user?.token === undefined;
if (isGuest) {
enqueuedRequestCount = queue.filter(sameIpPredicate(req)).length;
} else {
enqueuedRequestCount = queue.filter(sameUserPredicate(req)).length;
}
// All Agnai.chat requests come from the same IP, so we allow them to have
// more spots in the queue. Can't make it unlimited because people will
// intentionally abuse it.
// Authenticated users always get a single spot in the queue.
const maxConcurrentQueuedRequests =
isGuest && req.ip === AGNAI_DOT_CHAT_IP
? AGNAI_CONCURRENCY_LIMIT
: USER_CONCURRENCY_LIMIT;
if (enqueuedRequestCount >= maxConcurrentQueuedRequests) {
if (req.ip === AGNAI_DOT_CHAT_IP) {
// Re-enqueued requests are not counted towards the limit since they
// already made it through the queue once.
if (req.retryCount === 0) {
throw new Error("Too many agnai.chat requests are already queued");
}
} else {
throw new Error("Your IP or token already has a request in the queue");
}
}
queue.push(req);
req.queueOutTime = 0;
// shitty hack to remove hpm's event listeners on retried requests
removeProxyMiddlewareEventListeners(req);
// If the request opted into streaming, we need to register a heartbeat
// handler to keep the connection alive while it waits in the queue. We
// deregister the handler when the request is dequeued.
if (req.body.stream === "true" || req.body.stream === true) {
const res = req.res!;
if (!res.headersSent) {
initStreaming(req);
}
req.heartbeatInterval = setInterval(() => {
if (process.env.NODE_ENV === "production") {
req.res!.write(": queue heartbeat\n\n");
} else {
req.log.info(`Sending heartbeat to request in queue.`);
const partition = getPartitionForRequest(req);
const avgWait = Math.round(getEstimatedWaitTime(partition) / 1000);
const currentDuration = Math.round((Date.now() - req.startTime) / 1000);
const debugMsg = `queue length: ${queue.length}; elapsed time: ${currentDuration}s; avg wait: ${avgWait}s`;
req.res!.write(buildFakeSseMessage("heartbeat", debugMsg, req));
}
}, 10000);
}
// Register a handler to remove the request from the queue if the connection
// is aborted or closed before it is dequeued.
const removeFromQueue = () => {
req.log.info(`Removing aborted request from queue.`);
const index = queue.indexOf(req);
if (index !== -1) {
queue.splice(index, 1);
}
if (req.heartbeatInterval) {
clearInterval(req.heartbeatInterval);
}
};
req.onAborted = removeFromQueue;
req.res!.once("close", removeFromQueue);
if (req.retryCount ?? 0 > 0) {
req.log.info({ retries: req.retryCount }, `Enqueued request for retry.`);
} else {
req.log.info(`Enqueued new request.`);
}
}
function getPartitionForRequest(req: Request): QueuePartition {
// There is a single request queue, but it is partitioned by model and API
// provider.
// - claude: requests for the Anthropic API, regardless of model
// - gpt-4: requests for the OpenAI API, specifically for GPT-4 models
// - turbo: effectively, all other requests
const provider = req.outboundApi;
const model = (req.body.model as SupportedModel) ?? "gpt-3.5-turbo";
if (provider === "anthropic") {
return "claude";
}
if (provider === "openai" && model.startsWith("gpt-4")) {
return "gpt-4";
}
return "turbo";
}
function getQueueForPartition(partition: QueuePartition): Request[] {
return queue.filter((req) => getPartitionForRequest(req) === partition);
}
export function dequeue(partition: QueuePartition): Request | undefined {
const modelQueue = getQueueForPartition(partition);
if (modelQueue.length === 0) {
return undefined;
}
let req: Request;
if (dequeueMode === "fair") {
// Dequeue the request that has been waiting the longest
req = modelQueue.reduce((prev, curr) =>
prev.startTime < curr.startTime ? prev : curr
);
} else {
// Dequeue a random request
const index = Math.floor(Math.random() * modelQueue.length);
req = modelQueue[index];
}
queue.splice(queue.indexOf(req), 1);
if (req.onAborted) {
req.res!.off("close", req.onAborted);
req.onAborted = undefined;
}
if (req.heartbeatInterval) {
clearInterval(req.heartbeatInterval);
}
// Track the time leaving the queue now, but don't add it to the wait times
// yet because we don't know if the request will succeed or fail. We track
// the time now and not after the request succeeds because we don't want to
// include the model processing time.
req.queueOutTime = Date.now();
return req;
}
/**
* Naive way to keep the queue moving by continuously dequeuing requests. Not
* ideal because it limits throughput but we probably won't have enough traffic
* or keys for this to be a problem. If it does we can dequeue multiple
* per tick.
**/
function processQueue() {
// This isn't completely correct, because a key can service multiple models.
// Currently if a key is locked out on one model it will also stop servicing
// the others, because we only track one rate limit per key.
const gpt4Lockout = keyPool.getLockoutPeriod("gpt-4");
const turboLockout = keyPool.getLockoutPeriod("gpt-3.5-turbo");
const claudeLockout = keyPool.getLockoutPeriod("claude-v1");
const reqs: (Request | undefined)[] = [];
if (gpt4Lockout === 0) {
reqs.push(dequeue("gpt-4"));
}
if (turboLockout === 0) {
reqs.push(dequeue("turbo"));
}
if (claudeLockout === 0) {
reqs.push(dequeue("claude"));
}
reqs.filter(Boolean).forEach((req) => {
if (req?.proceed) {
req.log.info({ retries: req.retryCount }, `Dequeuing request.`);
req.proceed();
}
});
setTimeout(processQueue, 50);
}
/**
* Kill stalled requests after 5 minutes, and remove tracked wait times after 2
* minutes.
**/
function cleanQueue() {
const now = Date.now();
const oldRequests = queue.filter(
(req) => now - (req.startTime ?? now) > 5 * 60 * 1000
);
oldRequests.forEach((req) => {
req.log.info(`Removing request from queue after 5 minutes.`);
killQueuedRequest(req);
});
const index = waitTimes.findIndex(
(waitTime) => now - waitTime.end > 300 * 1000
);
const removed = waitTimes.splice(0, index + 1);
log.trace(
{ stalledRequests: oldRequests.length, prunedWaitTimes: removed.length },
`Cleaning up request queue.`
);
setTimeout(cleanQueue, 20 * 1000);
}
export function start() {
processQueue();
cleanQueue();
log.info(`Started request queue.`);
}
let waitTimes: { partition: QueuePartition; start: number; end: number }[] = [];
/** Adds a successful request to the list of wait times. */
export function trackWaitTime(req: Request) {
waitTimes.push({
partition: getPartitionForRequest(req),
start: req.startTime!,
end: req.queueOutTime ?? Date.now(),
});
}
/** Returns average wait time in milliseconds. */
export function getEstimatedWaitTime(partition: QueuePartition) {
const now = Date.now();
const recentWaits = waitTimes.filter(
(wt) => wt.partition === partition && now - wt.end < 300 * 1000
);
if (recentWaits.length === 0) {
return 0;
}
return (
recentWaits.reduce((sum, wt) => sum + wt.end - wt.start, 0) /
recentWaits.length
);
}
export function getQueueLength(partition: QueuePartition | "all" = "all") {
if (partition === "all") {
return queue.length;
}
const modelQueue = getQueueForPartition(partition);
return modelQueue.length;
}
export function createQueueMiddleware(proxyMiddleware: Handler): Handler {
return (req, res, next) => {
if (config.queueMode === "none") {
return proxyMiddleware(req, res, next);
}
req.proceed = () => {
proxyMiddleware(req, res, next);
};
try {
enqueue(req);
} catch (err: any) {
req.res!.status(429).json({
type: "proxy_error",
message: err.message,
stack: err.stack,
proxy_note: `Only one request can be queued at a time. If you don't have another request queued, your IP or user token might be in use by another request.`,
});
}
};
}
function killQueuedRequest(req: Request) {
if (!req.res || req.res.writableEnded) {
req.log.warn(`Attempted to terminate request that has already ended.`);
return;
}
const res = req.res;
try {
const message = `Your request has been terminated by the proxy because it has been in the queue for more than 5 minutes. The queue is currently ${queue.length} requests long.`;
if (res.headersSent) {
const fakeErrorEvent = buildFakeSseMessage(
"proxy queue error",
message,
req
);
res.write(fakeErrorEvent);
res.end();
} else {
res.status(500).json({ error: message });
}
} catch (e) {
req.log.error(e, `Error killing stalled request.`);
}
}
function initStreaming(req: Request) {
req.log.info(`Initiating streaming for new queued request.`);
const res = req.res!;
res.statusCode = 200;
res.setHeader("Content-Type", "text/event-stream");
res.setHeader("Cache-Control", "no-cache");
res.setHeader("Connection", "keep-alive");
res.setHeader("X-Accel-Buffering", "no"); // nginx-specific fix
res.flushHeaders();
res.write("\n");
res.write(": joining queue\n\n");
}
/**
* http-proxy-middleware attaches a bunch of event listeners to the req and
* res objects which causes problems with our approach to re-enqueuing failed
* proxied requests. This function removes those event listeners.
* We don't have references to the original event listeners, so we have to
* look through the list and remove HPM's listeners by looking for particular
* strings in the listener functions. This is an astoundingly shitty way to do
* this, but it's the best I can come up with.
*/
function removeProxyMiddlewareEventListeners(req: Request) {
// node_modules/http-proxy-middleware/dist/plugins/default/debug-proxy-errors-plugin.js:29
// res.listeners('close')
const RES_ONCLOSE = `Destroying proxyRes in proxyRes close event`;
// node_modules/http-proxy-middleware/dist/plugins/default/debug-proxy-errors-plugin.js:19
// res.listeners('error')
const RES_ONERROR = `Socket error in proxyReq event`;
// node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js:146
// req.listeners('aborted')
const REQ_ONABORTED = `proxyReq.abort()`;
// node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js:156
// req.listeners('error')
const REQ_ONERROR = `if (req.socket.destroyed`;
const res = req.res!;
const resOnClose = res
.listeners("close")
.find((listener) => listener.toString().includes(RES_ONCLOSE));
if (resOnClose) {
res.removeListener("close", resOnClose as any);
}
const resOnError = res
.listeners("error")
.find((listener) => listener.toString().includes(RES_ONERROR));
if (resOnError) {
res.removeListener("error", resOnError as any);
}
const reqOnAborted = req
.listeners("aborted")
.find((listener) => listener.toString().includes(REQ_ONABORTED));
if (reqOnAborted) {
req.removeListener("aborted", reqOnAborted as any);
}
const reqOnError = req
.listeners("error")
.find((listener) => listener.toString().includes(REQ_ONERROR));
if (reqOnError) {
req.removeListener("error", reqOnError as any);
}
}
|
knanon/oai
|
src/proxy/queue.ts
|
TypeScript
|
unknown
| 13,481 |
import { Request, Response, NextFunction } from "express";
import { config } from "../config";
export const AGNAI_DOT_CHAT_IP = "157.230.249.32";
const RATE_LIMIT_ENABLED = Boolean(config.modelRateLimit);
const RATE_LIMIT = Math.max(1, config.modelRateLimit);
const ONE_MINUTE_MS = 60 * 1000;
const lastAttempts = new Map<string, number[]>();
const expireOldAttempts = (now: number) => (attempt: number) =>
attempt > now - ONE_MINUTE_MS;
const getTryAgainInMs = (ip: string) => {
const now = Date.now();
const attempts = lastAttempts.get(ip) || [];
const validAttempts = attempts.filter(expireOldAttempts(now));
if (validAttempts.length >= RATE_LIMIT) {
return validAttempts[0] - now + ONE_MINUTE_MS;
} else {
lastAttempts.set(ip, [...validAttempts, now]);
return 0;
}
};
const getStatus = (ip: string) => {
const now = Date.now();
const attempts = lastAttempts.get(ip) || [];
const validAttempts = attempts.filter(expireOldAttempts(now));
return {
remaining: Math.max(0, RATE_LIMIT - validAttempts.length),
reset: validAttempts.length > 0 ? validAttempts[0] + ONE_MINUTE_MS : now,
};
};
/** Prunes attempts and IPs that are no longer relevant after one minutes. */
const clearOldAttempts = () => {
const now = Date.now();
for (const [ip, attempts] of lastAttempts.entries()) {
const validAttempts = attempts.filter(expireOldAttempts(now));
if (validAttempts.length === 0) {
lastAttempts.delete(ip);
} else {
lastAttempts.set(ip, validAttempts);
}
}
};
setInterval(clearOldAttempts, 10 * 1000);
export const getUniqueIps = () => {
return lastAttempts.size;
};
export const ipLimiter = (req: Request, res: Response, next: NextFunction) => {
if (!RATE_LIMIT_ENABLED) {
next();
return;
}
// Exempt Agnai.chat from rate limiting since it's shared between a lot of
// users. Dunno how to prevent this from being abused without some sort of
// identifier sent from Agnaistic to identify specific users.
if (req.ip === AGNAI_DOT_CHAT_IP) {
next();
return;
}
// If user is authenticated, key rate limiting by their token. Otherwise, key
// rate limiting by their IP address. Mitigates key sharing.
const rateLimitKey = req.user?.token || req.ip;
const { remaining, reset } = getStatus(rateLimitKey);
res.set("X-RateLimit-Limit", config.modelRateLimit.toString());
res.set("X-RateLimit-Remaining", remaining.toString());
res.set("X-RateLimit-Reset", reset.toString());
const tryAgainInMs = getTryAgainInMs(rateLimitKey);
if (tryAgainInMs > 0) {
res.set("Retry-After", tryAgainInMs.toString());
res.status(429).json({
error: {
type: "proxy_rate_limited",
message: `This proxy is rate limited to ${
config.modelRateLimit
} model requests per minute. Please try again in ${Math.ceil(
tryAgainInMs / 1000
)} seconds.`,
},
});
} else {
next();
}
};
|
knanon/oai
|
src/proxy/rate-limit.ts
|
TypeScript
|
unknown
| 2,960 |
/* Accepts incoming requests at either the /kobold or /openai routes and then
routes them to the appropriate handler to be forwarded to the OpenAI API.
Incoming OpenAI requests are more or less 1:1 with the OpenAI API, but only a
subset of the API is supported. Kobold requests must be transformed into
equivalent OpenAI requests. */
import * as express from "express";
import { gatekeeper } from "./auth/gatekeeper";
import { kobold } from "./kobold";
import { openai } from "./openai";
import { anthropic } from "./anthropic";
import { gepetto } from "./gepetto";
const router = express.Router();
router.use(gatekeeper);
// router.use("/kobold", kobold);
// router.use("/openai", openai);
// router.use("/anthropic", anthropic);
router.use("/gepetto", gepetto);
export { router as proxyRouter };
|
knanon/oai
|
src/proxy/routes.ts
|
TypeScript
|
unknown
| 801 |
import { assertConfigIsValid, config } from "./config";
import "source-map-support/register";
import express from "express";
import cors from "cors";
import pinoHttp from "pino-http";
import childProcess from "child_process";
import { logger } from "./logger";
import { keyPool } from "./key-management";
import { adminRouter } from "./admin/routes";
import { proxyRouter } from "./proxy/routes";
import { handleInfoPage } from "./info-page";
import { logQueue } from "./prompt-logging";
import { start as startRequestQueue } from "./proxy/queue";
import { init as initUserStore } from "./proxy/auth/user-store";
import { checkOrigin } from "./proxy/check-origin";
const PORT = config.port;
const app = express();
// middleware
app.use(
pinoHttp({
quietReqLogger: true,
logger,
autoLogging: {
ignore: (req) => {
const ignored = ["/proxy/kobold/api/v1/model", "/health"];
return ignored.includes(req.url as string);
},
},
redact: {
paths: [
"req.headers.cookie",
'res.headers["set-cookie"]',
"req.headers.authorization",
'req.headers["x-api-key"]',
'req.headers["x-forwarded-for"]',
'req.headers["x-real-ip"]',
'req.headers["true-client-ip"]',
'req.headers["cf-connecting-ip"]',
// Don't log the prompt text on transform errors
"body.messages",
"body.prompt",
],
censor: "********",
},
})
);
app.get("/health", (_req, res) => res.sendStatus(200));
app.use((req, _res, next) => {
req.startTime = Date.now();
req.retryCount = 0;
next();
});
app.use(cors());
app.use(
express.json({ limit: "10mb" }),
express.urlencoded({ extended: true, limit: "10mb" })
);
// TODO: Detect (or support manual configuration of) whether the app is behind
// a load balancer/reverse proxy, which is necessary to determine request IP
// addresses correctly.
app.set("trust proxy", true);
// routes
app.use(checkOrigin);
app.get("/", handleInfoPage);
app.use("/admin", adminRouter);
app.use("/proxy", proxyRouter);
// 500 and 404
app.use((err: any, _req: unknown, res: express.Response, _next: unknown) => {
if (err.status) {
res.status(err.status).json({ error: err.message });
} else {
logger.error(err);
res.status(500).json({
error: {
type: "proxy_error",
message: err.message,
stack: err.stack,
proxy_note: `Reverse proxy encountered an internal server error.`,
},
});
}
});
app.use((_req: unknown, res: express.Response) => {
res.status(404).json({ error: "Not found" });
});
async function start() {
logger.info("Server starting up...");
await setBuildInfo();
logger.info("Checking configs and external dependencies...");
await assertConfigIsValid();
keyPool.init();
if (config.gatekeeper === "user_token") {
await initUserStore();
}
if (config.promptLogging) {
logger.info("Starting prompt logging...");
logQueue.start();
}
if (config.queueMode !== "none") {
logger.info("Starting request queue...");
startRequestQueue();
}
app.listen(PORT, async () => {
logger.info({ port: PORT }, "Now listening for connections.");
registerUncaughtExceptionHandler();
});
logger.info(
{ build: process.env.BUILD_INFO, nodeEnv: process.env.NODE_ENV },
"Startup complete."
);
}
function registerUncaughtExceptionHandler() {
process.on("uncaughtException", (err: any) => {
logger.error(
{ err, stack: err?.stack },
"UNCAUGHT EXCEPTION. Please report this error trace."
);
});
process.on("unhandledRejection", (err: any) => {
logger.error(
{ err, stack: err?.stack },
"UNCAUGHT PROMISE REJECTION. Please report this error trace."
);
});
}
/**
* Attepts to collect information about the current build from either the
* environment or the git repo used to build the image (only works if not
* .dockerignore'd). If you're running a sekrit club fork, you can no-op this
* function and set the BUILD_INFO env var manually, though I would prefer you
* didn't set it to something misleading.
*/
async function setBuildInfo() {
// Render .dockerignore's the .git directory but provides info in the env
if (process.env.RENDER) {
const sha = process.env.RENDER_GIT_COMMIT?.slice(0, 7) || "unknown SHA";
const branch = process.env.RENDER_GIT_BRANCH || "unknown branch";
const repo = process.env.RENDER_GIT_REPO_SLUG || "unknown repo";
const buildInfo = `${sha} (${branch}@${repo})`;
process.env.BUILD_INFO = buildInfo;
logger.info({ build: buildInfo }, "Got build info from Render config.");
return;
}
try {
// Ignore git's complaints about dubious directory ownership on Huggingface
// (which evidently runs dockerized Spaces on Windows with weird NTFS perms)
if (process.env.SPACE_ID) {
childProcess.execSync("git config --global --add safe.directory /app");
}
const promisifyExec = (cmd: string) =>
new Promise((resolve, reject) => {
childProcess.exec(cmd, (err, stdout) =>
err ? reject(err) : resolve(stdout)
);
});
const promises = [
promisifyExec("git rev-parse --short HEAD"),
promisifyExec("git rev-parse --abbrev-ref HEAD"),
promisifyExec("git config --get remote.origin.url"),
promisifyExec("git status --porcelain"),
].map((p) => p.then((result: any) => result.toString().trim()));
let [sha, branch, remote, status] = await Promise.all(promises);
remote = remote.match(/.*[\/:]([\w-]+)\/([\w\-\.]+?)(?:\.git)?$/) || [];
const repo = remote.slice(-2).join("/");
status = status
// ignore Dockerfile changes since that's how the user deploys the app
.split("\n")
.filter((line: string) => !line.endsWith("Dockerfile") && line);
const changes = status.length > 0;
const build = `${sha}${changes ? " (modified)" : ""} (${branch}@${repo})`;
process.env.BUILD_INFO = build;
logger.info({ build, status, changes }, "Got build info from Git.");
} catch (error: any) {
logger.error(
{
error,
stdout: error.stdout?.toString(),
stderr: error.stderr?.toString(),
},
"Failed to get commit SHA.",
error
);
process.env.BUILD_INFO = "unknown";
}
}
start();
|
knanon/oai
|
src/server.ts
|
TypeScript
|
unknown
| 6,336 |
import { Express } from "express-serve-static-core";
import { AIService, Key } from "../key-management/index";
import { User } from "../proxy/auth/user-store";
declare global {
namespace Express {
interface Request {
key?: Key;
/** Denotes the format of the user's submitted request. */
inboundApi: AIService | "kobold";
/** Denotes the format of the request being proxied to the API. */
outboundApi: AIService;
user?: User;
isStreaming?: boolean;
startTime: number;
retryCount: number;
queueOutTime?: number;
onAborted?: () => void;
proceed: () => void;
heartbeatInterval?: NodeJS.Timeout;
}
}
}
|
knanon/oai
|
src/types/custom.d.ts
|
TypeScript
|
unknown
| 688 |
{
"compilerOptions": {
"strict": true,
"target": "ES2020",
"module": "CommonJS",
"moduleResolution": "node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"outDir": "build",
"sourceMap": true
},
"include": ["src"],
"exclude": ["node_modules"],
"files": ["src/types/custom.d.ts"]
}
|
knanon/oai
|
tsconfig.json
|
JSON
|
unknown
| 403 |
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.swp
*.swo
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# dotenv
.env
# virtualenv
venv/
ENV/
# Spyder project settings
.spyderproject
# Rope project settings
.ropeproject
# Start.tw
src/config/start.tw
|
AshVaris/fc
|
.gitignore
|
Git
|
mit
| 1,091 |
further development:
-specialized slave schools
-fortifications
-more levels for militia edict (further militarize society)
-conquering other arcologies?
Events:
-famous criminal escapes to the arcology, followed by another arcology police force
Bugs:
-sometimes troop counts breaks
-sometimes rebel numbers have fractionary parts
|
AshVaris/fc
|
TODO.txt
|
Text
|
mit
| 332 |
# How to vector art
Please read the whole document before starting to work.
Some aspects are not obvious right away.
Note: This does not actually describe how to be an artist.
## TL;DR
killall inkscape
artTools/vector_layer_split.py artTools/vector_source.svg tw src/art/vector/layers/
compile
## 1. Be an artist
Make changes to the vector_source.svg.
Inkscape was thoroughly tested.
Adobe Illustrator might work decently, too.
## 2. Respect the structure
While editing, keep the Layers in mind.
* In Inkscape, Layers are special "Inkscape groups".
* In Illustrator, Layers are groups with user-definded IDs.
* All Layers should have an ID that is globally unique
(not just within their subtree).
* Please use anonymous groups only for the ease of editing. Remove all "helper" groups before finally saving the file.
* Anonymous groups can be used for continous scaling (of e.g. boobs).
* Every asset that should go into a separate file needs to be in a labelled group
(even if that is a group with only one shape).
* There are some globally available styles defined as CSS classes (e.g. skin, hair).
Use them if your asset should be changed upon display.
Do not set the style directly in the object.
## 3. Fix the document (before commiting, Inkscape only)
Inkscape shows weird behaviour in some regards.
If you use Inkscape, close the document and run
python3 inkscape_svg_fixup.py vector_source.svg
before continuing. Open the file in Inkscape and save it again.
You need to make a minor change, as Inkscape will not save a unchanged file
(move the notes back and forth or something). The fixup does not produce
the same linebreaks as Inkscape or Illustrator and git will go mad because
the whole seems to have changed.
What it does:
* Adobe Illustrator uses group IDs as layer labels.
Inkscape however uses layer labels and a separate, auto-generated group ID.
inkscape_svg_fixup.py overwrites the group ID with the Inkscape layer label
so they are synchronised with Inkscape layer labels.
* Inkscape copies the global style definition into the object *every time*
the object is edited. If an object references a CSS class AND at the same time
has a local style, the local style is removed
so global dynamic styling is possible later on.
Note: Behaviour of Adobe Illustrator is untested.
## 4. Split the layers
Execute
python3 vector_layer_split.py vector_source.svg tw ../src/art/vector/layers/
For revamped art
python3 vector_revamp_layer_split.py vector_revamp_source.svg tw ../src/art/vector_revamp/layers/
. This application reads all groups in `vector_source.svg`.
Each group is stored in a separate file in the target directory `/src/art/vector/layers/`.
The group ID sets the file name. Therefore, the group ID **must not** contain spaces or any other weird characters.
Also consider:
* A group with ID ending in _ is ignored. Use Layers ending in _ to keep overview.
* A group with ID starting with "g" (Inkscape) or "XMLID" (Illustrator) is also ignored.
* Existing files are overwritten **without enquiry**.
* The target directory is not emptied. If a file is no longer needed, you should remove it manually.
* This procedure removes global definitions. This means, SVG filters are currently not supported.
Available output formats are `svg` and `tw`.
`svg` output exists for debug reasons.
`tw` embeds the SVG data into Twine files, but removes the global style definitions so they can be set during display.
## 5. Edit the code
`/src/art/` contains Twine code which shows the assets in the story.
There are many helpful comments in `/src/art/artWidgets.tw`.
The code also generates the previously removed global style definitions on the fly and per display.
## 6. Compile the story
Use the provided compile script (Windows batch or shell) for compiling.
## 7. Advanced usage
You can define multiple CSS classes to one element, e.g. "skin torso". When procedurally generating CSS, you can then set a global "skin" style, and a different one for "torso".
You can put variable text into the image using single quotes, e.g. "'+_tattooText+'". The single quotes *break* the quoting in Twine so the content of the Twine variable `_tattooText` is shown upon display. You can even align text on paths.
An anonymous group can be used for dynamic transformation. However, finding the correct parameters for the affine transformation matrix can be cumbersome. Use any method you see fit. See `src/art/vector/Boob.tw` for one example of the result.
|
AshVaris/fc
|
artTools/README.md
|
Markdown
|
mit
| 4,555 |
#!/usr/bin/env python3
'''
Application for "fixing" SVGs edited with Inkscape
These problems are addressed:
* Inkscape notoriously copies class styles into the object definitions.
https://bugs.launchpad.net/inkscape/+bug/167937
* Inkscape uses labels on layers. Layers are basically named groups.
Inkscape does not sync the group id with the layer label.
Usage Example:
python3 inkscape_svg_fixup.py vector_source.svg
Note:
The output of lxml differs greatly from standard SVG indentation.
Please open and save the file in Inkscape before committing.
'''
import lxml.etree as etree
import sys
def fix(tree):
# know namespaces
ns = {
'svg' : 'http://www.w3.org/2000/svg',
'inkscape' : 'http://www.inkscape.org/namespaces/inkscape'
}
# find document global style definition
# mangle it and interpret as python dictionary
style_element = tree.find('./svg:style',namespaces=ns)
style_definitions = style_element.text
pythonic_style_definitions = '{'+style_definitions.\
replace('\t.','"').replace('{','":"').replace('}','",').\
replace('/*','#')+'}'
styles = eval(pythonic_style_definitions)
# go through all SVG elements
for elem in tree.iter():
if (elem.tag == etree.QName(ns['svg'], 'g')):
# compare inkscape label with group element ID
l = elem.get(etree.QName(ns['inkscape'], 'label'))
if l:
i = elem.get('id')
if (i != l):
print("Overwriting ID %s with Label %s..."%(i, l))
elem.set('id', l)
# remove all offending style attributes
s = elem.get('style')
c = elem.get('class')
if (c and s):
s = s.lower()
c = c.split(' ')[0] # regard main style only
cs = ''
if c in styles:
cs = styles[c].strip('; ').lower()
if (c not in styles):
print("Object id %s references unknown style class %s."%(i,c))
else:
if (cs != s.strip('; ')):
print("Style %s removed from object id %s differed from class %s style %s."%(s,i,c,cs))
del elem.attrib["style"]
if __name__ == "__main__":
input_file = sys.argv[1]
tree = etree.parse(input_file)
fix(tree)
# store SVG into file (input file is overwritten)
svg = etree.tostring(tree, pretty_print=True)
with open(input_file, 'wb') as f:
f.write('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'.encode("utf-8"))
f.write(svg)
|
AshVaris/fc
|
artTools/inkscape_svg_fixup.py
|
Python
|
mit
| 2,389 |
#!/usr/bin/env python3
'''
Application for procedural content adaption
*THIS IS VERY EXPERIMENTAL*
Contains a very poor man's implementation of spline mesh warping.
This application parses SVG path data of an outfit sample aligned to a body part.
The outfit is then replicated for other shapes of the same body part.
Example data is geared towards generating a strap outfit for boobs and torso
for all sizes of boobs and all shapes of torsos based on a single outfit for
boobs of size 2 and a hourglass torso respectively.
Limitations:
* handles paths only
* only svg.path Line and CubicBezier are tested
* only the aforementioned examples are tested
Usage:
python3 vector_clothing_replicator.py infile clothing bodypart destinationfile
Usage Example:
python3 vector_clothing_replicator.py vector_source.svg Straps Boob vector_destination.svg
python3 vector_clothing_replicator.py vector_source.svg Straps Torso vector_destination.svg
'''
from svg.path import parse_path
import copy
import lxml.etree as etree
import sys
REFERENCE_PATH_SAMPLES = 200
EMBED_REPLICATIONS = True # wether to embed all replications into the input file or output separate files
input_file = sys.argv[1]
clothing = sys.argv[2]
bodypart = sys.argv[3]
output_file_embed = sys.argv[4]
# TODO: make these configurable
output_file_pattern = '%s_%s_%s.svg' #bodypart, target_id, clothing
if ('Torso' == bodypart):
xpath_shape = './svg:g[@id="Torso_"]/svg:g[@id="Torso_%s"]/svg:path[@class="skin torso"]/@d' # TODO: formulate more general, independent of style
xpath_outfit_container = '//svg:g[@id="Torso_Outfit_%s_"]'%(clothing)
xpath_outfit = '//svg:g[@id="Torso_Outfit_%s_%s"]'%(clothing,'%s')
target_ids = "Unnatural,Hourglass,Normal".split(",")
reference_id = "Hourglass"
else:
raise RuntimeError("Please specify a bodypart for clothing to replicate.")
tree = etree.parse(input_file)
ns = {'svg' : 'http://www.w3.org/2000/svg'}
canvas = copy.deepcopy(tree)
for e in canvas.xpath('./svg:g',namespaces=ns)+canvas.xpath('./svg:path',namespaces=ns):
# TODO: this should be "remove all objects, preserve document properties"
e.getparent().remove(e)
def get_points(xpath_shape):
'''
This funciton extracts reference paths by the given xpath selector.
Each path is used to sample a fixed number of points.
'''
paths_data = tree.xpath(xpath_shape,namespaces=ns)
points = []
path_length = None
for path_data in paths_data:
p = parse_path(path_data)
points += [
p.point(1.0/float(REFERENCE_PATH_SAMPLES)*i)
for i in range(REFERENCE_PATH_SAMPLES)
]
if (not points):
raise RuntimeError(
'No paths for reference points found by selector "%s".'%(xpath_shape)
)
return points
def point_movement(point, reference_points, target_points):
'''
For a given point, finds the nearest point in the reference path.
Gives distance vector from the nearest reference point to the
respective target reference point.
'''
distances = [abs(point-reference_point) for reference_point in reference_points]
min_ref_dist_idx = min(enumerate(distances), key=lambda x:x[1])[0]
movement = target_points[min_ref_dist_idx] - reference_points[min_ref_dist_idx]
return movement
reference_points = get_points(xpath_shape%(reference_id))
container = tree.xpath(xpath_outfit_container,namespaces=ns)
if (len(container) != 1):
raise RuntimeError('Outfit container selector "%s" does not yield exactly one layer.'%(xpath_outfit_container))
container = container[0]
outfit_source = container.xpath(xpath_outfit%(reference_id),namespaces=ns)
if (len(outfit_source) != 1):
raise RuntimeError('Outfit source selector "%s" does not yield exactly one outfit layer in container selected by "%s".'%(xpath_outfit%(reference_id), xpath_outfit_container))
outfit_source = outfit_source[0]
for target_id in target_ids:
print(
'Generating variant "%s" of clothing "%s" for bodypart "%s"...'%
(target_id, clothing, bodypart)
)
outfit = copy.deepcopy(outfit_source)
paths = outfit.xpath('./svg:path',namespaces=ns)
if target_id == reference_id:
print("This is the source variant. Skipping...")
else:
layerid = outfit.get('id').replace('_%s'%(reference_id),'_%s'%(target_id))
outfit.set('id', layerid)
outfit.set(etree.QName('http://www.inkscape.org/namespaces/inkscape', 'label'), layerid) # for the Inkscape-users
target_points = get_points(xpath_shape%(target_id))
if (len(reference_points) != len(target_points)):
raise RuntimeError(
('Different amounts of sampled points in reference "%s" and target "%s" paths. '+
'Selector "%s" probably matches different number of paths in the two layers.')%
(reference_id, target_id, xpath_shape)
)
for path in paths:
path_data = path.get("d")
p = parse_path(path_data)
for segment in p:
original_distance = abs(segment.end-segment.start)
start_movement = point_movement(segment.start, reference_points, target_points)
segment.start += start_movement
end_movement = point_movement(segment.end, reference_points, target_points)
segment.end += end_movement
distance = abs(segment.end-segment.start)
try:
# enhance position of CubicBezier control points
# amplification is relative to the distance gained by movement
segment.control1 += start_movement
segment.control1 += (segment.control1-segment.start)*(distance/original_distance-1.0)
segment.control2 += end_movement
segment.control2 += (segment.control2-segment.end)*(distance/original_distance-1.0)
except AttributeError as ae:
# segment is not a CubicBezier
pass
path.set("d", p.d())
if EMBED_REPLICATIONS:
container.append(outfit)
if not EMBED_REPLICATIONS:
container = copy.deepcopy(canvas).xpath('.',namespaces=ns)[0]
container.append(outfit)
if not EMBED_REPLICATIONS:
svg = etree.tostring(container, pretty_print=True)
with open((output_file_pattern%(bodypart, target_id, clothing)).lower(), 'wb') as f:
f.write('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'.encode("utf-8"))
f.write(svg)
if EMBED_REPLICATIONS:
svg = etree.tostring(tree, pretty_print=True)
with open(output_file_embed, 'wb') as f:
f.write('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'.encode("utf-8"))
f.write(svg)
|
AshVaris/fc
|
artTools/vector_clothing_replicator.py
|
Python
|
mit
| 6,444 |
#!/usr/bin/env python3
'''
Application for splitting groups from one SVG file into separate files
Usage:
python3 vector_layer_split.py infile format outdir
Usage Example:
python3 vector_layer_split.py vector_source.svg tw ../src/art/vector/layers/
'''
import lxml.etree as etree
import sys
import os
import copy
import re
import inkscape_svg_fixup
input_file = sys.argv[1]
output_format = sys.argv[2]
output_directory = sys.argv[3]
if not os.path.exists(output_directory):
os.makedirs(output_directory)
ns = {
'svg' : 'http://www.w3.org/2000/svg',
'inkscape' : 'http://www.inkscape.org/namespaces/inkscape',
'sodipodi':"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",
}
tree = etree.parse(input_file)
inkscape_svg_fixup.fix(tree)
# prepare output template
template = copy.deepcopy(tree)
root = template.getroot()
# remove all svg root attributes except document size
for a in root.attrib:
if (a != "viewBox"):
del root.attrib[a]
# add placeholder for CSS class (needed for workaround for non HTML 5.1 compliant browser)
if output_format == 'tw':
root.attrib["class"] = "'+_art_display_class+'"
# remove all content, including metadata
# for twine output, style definitions are removed, too
defs = None
for e in root:
if (e.tag == etree.QName(ns['svg'], 'defs')):
defs = e
if (e.tag == etree.QName(ns['svg'], 'g') or
e.tag == etree.QName(ns['svg'], 'metadata') or
e.tag == etree.QName(ns['svg'], 'defs') or
e.tag == etree.QName(ns['sodipodi'], 'namedview') or
(output_format == 'tw' and e.tag == etree.QName(ns['svg'], 'style'))
):
root.remove(e)
# template preparation finished
# prepare regex for later use
regex_xmlns = re.compile(' xmlns[^ ]+',)
regex_space = re.compile('[>][ ]+[<]',)
# find all groups
layers = tree.xpath('//svg:g',namespaces=ns)
for layer in layers:
i = layer.get('id')
if ( # disregard non-content groups
i.endswith("_") or # manually suppressed with underscore
i.startswith("XMLID") or # Illustrator generated group
i.startswith("g") # Inkscape generated group
):
continue
# create new canvas
output = copy.deepcopy(template)
# copy all shapes into template
canvas = output.getroot()
for e in layer:
canvas.append(e)
# represent template as SVG (binary string)
svg = etree.tostring(output, pretty_print=False)
# poor man's conditional defs insertion
# TODO: extract only referenced defs (filters, gradients, ...)
# TODO: detect necessity by traversing the elements. do not stupidly search in the string representation
if ("filter:" in svg.decode('utf-8')):
# it seems there is a filter referenced in the generated SVG, re-insert defs from main document
canvas.insert(0,defs)
# re-generate output
svg = etree.tostring(output, pretty_print=False)
if (output_format == 'tw'):
# remove unnecessary attributes
# TODO: never generate unnecessary attributes in the first place
svg = svg.decode('utf-8')
svg = regex_xmlns.sub('',svg)
svg = svg.replace(' inkscape:connector-curvature="0"','') # this just saves space
svg = svg.replace('\n','').replace('\r','') # print cannot be multi-line
svg = regex_space.sub('><',svg) # remove indentaion
svg = svg.replace('svg:','') # svg namespace was removed
svg = svg.replace('<g ','<g transform="\'+_art_transform+\'"') # internal groups are used for scaling
svg = svg.encode('utf-8')
# save SVG string to file
i = layer.get('id')
output_path = os.path.join(output_directory,i+'.'+output_format)
with open(output_path, 'wb') as f:
if (output_format == 'svg'):
# Header for normal SVG (XML)
f.write('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'.encode("utf-8"))
f.write(svg)
elif (output_format == 'tw'):
# Header for SVG in Twine file (SugarCube print statement)
f.write((':: Art_Vector_%s [nobr]\n\n'%(i)).encode("utf-8"))
f.write("<<print '<html>".encode("utf-8"))
f.write(svg)
f.write("</html>' >>".encode("utf-8"))
|
AshVaris/fc
|
artTools/vector_layer_split.py
|
Python
|
mit
| 4,045 |
#!/usr/bin/env python3
'''
Application for splitting groups from one SVG file into separate files
Usage:
python3 vector_layer_split.py infile format outdir
Usage Example:
python3 vector_layer_split.py vector_source.svg tw ../src/art/vector/layers/
'''
import lxml.etree as etree
from lxml.etree import XMLParser, parse
import sys
import os
import copy
import re
import inkscape_svg_fixup
input_file = sys.argv[1]
output_format = sys.argv[2]
output_directory = sys.argv[3]
if not os.path.exists(output_directory):
os.makedirs(output_directory)
ns = {
'svg': 'http://www.w3.org/2000/svg',
'inkscape': 'http://www.inkscape.org/namespaces/inkscape',
'sodipodi': "http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd",
}
p = XMLParser(huge_tree=True)
tree = parse(input_file, parser=p)
#tree = etree.parse(input_file)
inkscape_svg_fixup.fix(tree)
# prepare output template
template = copy.deepcopy(tree)
root = template.getroot()
# remove all svg root attributes except document size
for a in root.attrib:
if (a != "viewBox"):
del root.attrib[a]
# add placeholder for CSS class (needed for workaround for non HTML 5.1 compliant browser)
if output_format == 'tw':
root.attrib["class"] = "'+_art_display_class+'"
# remove all content, including metadata
# for twine output, style definitions are removed, too
defs = None
for e in root:
if (e.tag == etree.QName(ns['svg'], 'defs')):
defs = e
if (e.tag == etree.QName(ns['svg'], 'g') or
e.tag == etree.QName(ns['svg'], 'metadata') or
e.tag == etree.QName(ns['svg'], 'defs') or
e.tag == etree.QName(ns['sodipodi'], 'namedview') or
(output_format == 'tw' and e.tag == etree.QName(ns['svg'], 'style'))
):
root.remove(e)
# template preparation finished
# prepare regex for later use
regex_xmlns = re.compile(' xmlns[^ ]+', )
regex_space = re.compile('[>][ ]+[<]', )
regex_transformValue = re.compile('(?<=transformVariableName=")[^"]*', )
regex_transformVar = re.compile('transformVariableName="[^"]*"', )
regex_transformAttr = re.compile('transform="[^"]*"', )
# find all groups
layers = tree.xpath('//svg:g', namespaces=ns)
for layer in layers:
i = layer.get('id')
if ( # disregard non-content groups
i.endswith("_") or # manually suppressed with underscore
i.startswith("XMLID") or # Illustrator generated group
i.startswith("g") # Inkscape generated group
):
continue
# create new canvas
output = copy.deepcopy(template)
# copy all shapes into template
canvas = output.getroot()
for e in layer:
canvas.append(e)
# represent template as SVG (binary string)
svg = etree.tostring(output, pretty_print=False)
# poor man's conditional defs insertion
# TODO: extract only referenced defs (filters, gradients, ...)
# TODO: detect necessity by traversing the elements. do not stupidly search in the string representation
if ("filter:" in svg.decode('utf-8')):
# it seems there is a filter referenced in the generated SVG, re-insert defs from main document
canvas.insert(0, defs)
# re-generate output
svg = etree.tostring(output, pretty_print=False)
elif ("clip-path=" in svg.decode('utf-8')):
# it seems there is a clip path referenced in the generated SVG, re-insert defs from main document
canvas.insert(0, defs)
# re-generate output
svg = etree.tostring(output, pretty_print=False)
if (output_format == 'tw'):
# remove unnecessary attributes
# TODO: never generate unnecessary attributes in the first place
svg = svg.decode('utf-8')
svg = regex_xmlns.sub('', svg)
svg = svg.replace(' inkscape:connector-curvature="0"', '') # this just saves space
svg = svg.replace('\n', '').replace('\r', '') # print cannot be multi-line
svg = regex_space.sub('><', svg) # remove indentaion
svg = svg.replace('svg:', '') # svg namespace was removed
transformGroups = regex_transformVar.findall(svg)
if (len(transformGroups) > 0):
svg = regex_transformAttr.sub('', svg)
for transformGroup in transformGroups:
transformValue = regex_transformValue.search(transformGroup)
if (transformValue is not None):
svg = svg.replace(transformGroup, ' transform="\'+' + transformValue.group() + '+\'" ') # internal groups are used for scaling
svg = svg.encode('utf-8')
# save SVG string to file
i = layer.get('id')
output_path = os.path.join(output_directory, i + '.' + output_format)
with open(output_path, 'wb') as f:
if (output_format == 'svg'):
# Header for normal SVG (XML)
f.write('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'.encode("utf-8"))
f.write(svg)
elif (output_format == 'tw'):
# Header for SVG in Twine file (SugarCube print statement)
f.write((':: Art_Vector_Revamp_%s [nobr]\n\n' % (i)).encode("utf-8"))
f.write("<<print '<html>".encode("utf-8"))
f.write(svg)
f.write("</html>' >>".encode("utf-8"))
|
AshVaris/fc
|
artTools/vector_revamp_layer_split.py
|
Python
|
mit
| 5,242 |
# Ignore everything in this directory
*
# Except the following:
!.gitignore
!resources/vector/*
|
AshVaris/fc
|
bin/.gitignore
|
Git
|
mit
| 99 |
#!/bin/bash
while [[ "$1" ]]
do
case $1 in
--insane)
insane="true"
;;
*)
echo "Unknown argument $1"
exit 1
esac
shift
done
# Find and insert current commit
COMMIT=$(git rev-parse --short HEAD)
sed -Ei "s/build .releaseID/\0 commit $COMMIT/" src/gui/mainMenu/AlphaDisclaimer.tw
if [[ ! "$insane" ]]
then
# Run sanity check.
./sanityCheck
fi
ARCH="$(uname -m)"
if [ "$ARCH" = "x86_64" ]
then
echo "x64 arch"
./devTools/tweeGo/tweego_nix64 -o bin/FC_pregmod.html src/ || build_failed="true"
elif echo "$ARCH" | grep -Ee '86$' > /dev/null
then
echo "x86 arch"
./devTools/tweeGo/tweego_nix86 -o bin/FC_pregmod.html src/ || build_failed="true"
elif echo "$ARCH" | grep -Ee '^arm' > /dev/null
then
echo "arm arch"
# tweego doesn't provide arm binaries so you have to build it yourself
export TWEEGO_PATH=devTools/tweeGo/storyFormats
tweego -o bin/FC_pregmod.html src/ || build_failed="true"
else
exit 2
fi
# Revert AlphaDisclaimer for next compilation
git checkout -- src/gui/mainMenu/AlphaDisclaimer.tw
if [ "$build_failed" = "true" ]
then
exit 1
fi
#Make the output prettier, replacing \t with a tab and \n with a newline
sed -i -e '/^.*<div id="store-area".*$/s/\\t/\t/g' -e '/^.*<div id="store-area".*$/s/\\n/\n/g' bin/FC_pregmod.html
|
AshVaris/fc
|
compile
|
none
|
mit
| 1,264 |
#!/bin/bash
# Run sanity check.
./sanityCheck
HASH="$(git rev-list -n 1 --abbrev-commit HEAD)"
ARCH="$(uname -m)"
if [ "$ARCH" = "x86_64" ]
then
echo "x64 arch"
./devTools/tweeGo/tweego_nix64 -o "bin/FC_pregmod_$HASH.html" src/
elif echo "$ARCH" | grep -Ee '86$' > /dev/null
then
echo "x86 arch"
./devTools/tweeGo/tweego_nix86 -o "bin/FC_pregmod_$HASH.html" src/
elif echo "$ARCH" | grep -Ee '^arm' > /dev/null
then
echo "arm arch"
# tweego doesn't provide arm binaries so you have to build it yourself
export TWEEGO_PATH=devTools/tweeGo/storyFormats
tweego -o "bin/FC_pregmod_$HASH.html" src/
else
exit 2
fi
#Make the output prettier, replacing \t with a tab and \n with a newline
sed -i -e '/^<div id="store-area".*$/s/\\t/\t/g' -e '/^<div id="store-area".*$/s/\\n/\n/g' "bin/FC_pregmod_$HASH.html"
echo "FC_pregmod_$HASH.html" compilation finished.
|
AshVaris/fc
|
compile-git
|
none
|
mit
| 866 |
@echo off
:: Free Cities Basic Compiler - Windows
:: Set working directory
pushd %~dp0
:: Run the appropriate compiler for the user's CPU architecture.
if %PROCESSOR_ARCHITECTURE% == AMD64 (
CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src"
) else (
CALL "%~dp0devTools\tweeGo\tweego_win86.exe" -o "%~dp0bin/FC_pregmod.html" "%~dp0src"
)
popd
ECHO Done
|
AshVaris/fc
|
compile.bat
|
Batchfile
|
mit
| 415 |
@echo off
:: Free Cities Basic Compiler - Windows
:: Set working directory
pushd %~dp0
:: See if we can find a git installation
setlocal enabledelayedexpansion
for %%k in (HKCU HKLM) do (
for %%w in (\ \Wow6432Node\) do (
for /f "skip=2 delims=: tokens=1*" %%a in ('reg query "%%k\SOFTWARE%%wMicrosoft\Windows\CurrentVersion\Uninstall\Git_is1" /v InstallLocation 2^> nul') do (
for /f "tokens=3" %%z in ("%%a") do (
set GIT=%%z:%%b
set GITFOUND=yes
goto FOUND
)
)
)
)
:FOUND
if %GITFOUND% == yes (
set "PATH=%GIT%bin;%PATH%"
bash --login -c ./sanityCheck
)
:: Compile the game
call "%~dp0compile.bat"
if %GITFOUND% == yes (
:: Make the output prettier, replacing \t with a tab and \n with a newline
bash -c "sed -i -e '/^.*<div id=\"store-area\".*$/s/\\\t/\t/g' -e '/^.*<div id=\"store-area\".*$/s/\\\n/\n/g' bin/FC_pregmod.html"
:: Revert ./src/init/storyInit.tw for next compilation
git checkout -- ./src/init/storyInit.tw
)
popd
PAUSE
|
AshVaris/fc
|
compile_debug+sanityCheck.bat
|
Batchfile
|
mit
| 1,035 |
@echo off
:: Free Cities Basic Compiler - Windows
:: Set working directory
pushd %~dp0
:: Compile the game
call "%~dp0compile.bat"
popd
PAUSE
|
AshVaris/fc
|
compile_debug.bat
|
Batchfile
|
mit
| 156 |
Anatomy of a FreeCities event
Type
There are several types of events. They all happen during the end-of-week calculation, AFTER the normal changes to the slaves and all the economic effects (including you messing with your corporation) happened.
Scheduled events
Nonrandom events
Random nonindividual events
Random individual events
The differences between them are almost non-existent. If they happen, they happen in this order, so you could say it's a kind of event priority ordering. The last two events pre-select a slave (in $eventSlave), with the "nonindividual" events using all your slaves while the "individual" events use only non-fuckdolls, typically from your penthouse. When writing your event, you're free to ignore this and choose your own slave or create a new one. By convention, scheduled events tend to go back to the "Scheduled Event" passage so that other such events can run; all the others tend to just skip to the next event category. Nothing in code forces you to do it this way for your events.
Preconditions
Most events have some kind of precondition for when they happen. Scheduled events always happen when their preconditions are true. Nonrandom events happen when their preconditions are true and no other nonrandom events get picked first (so writing a too-often-true precondition is a good way to break the game by blocking any further such events). The two other types of events get put in a pool ($events) if they match the precondition, then at most one event gets pulled from the pool per type.
NonRandomEvent (26-33)
<<elseif (_effectiveWeek == 14) && $badC != 1>>
<<set _valid = $slaves.find(function(s) { return s.curatives > 1 || s.inflationType == "curative"; })>>
<<if def _valid>>
<<set $badC = 1, $Event = "bad curatives">>
<<goto "Generic Plot Events">>
<<else>>
<<set $badC = 1>>
<<goto "Nonrandom Event">>
<</if>>
If it is week fourteen and the player player hasn't ready seen the event, a check is then made for slaves that either are on curatives or have their implants filled by curatives. If it was sucessful then load the "bad curatives" generic event, if unsucessful set the flag anyway and read from the Nonrandom Event passage.
Immediate effects
Every event can have immediate effects, which happen when the event gets chosen. For most events, those are what should happen if the player ignores the event (by hitting "Continue" or the space bar on the keyboard). Choice effects (see below) can override or roll back those.
reRecuit (4-19)
<<if Array.isArray($recruit)>>
<<if $cheatMode == 1>>
<<set $nextButton = "Back", $nextLink = "Nonrandom Event", $returnTo = "Nonrandom Event">> /* if user just clicks spacebar */
''A random recruit event would have been selected from the following:''
<br>
<<for _i = 0; _i < $recruit.length; _i++>>
<<print "[[$recruit[_i]|RE recruit][$recruit = $recruit[" + _i + "]]]">>
<br>
<</for>>
<br><br>[[Go Back to Random Nonindividual Event|Random Nonindividual Event][$eventSlave = 0]]
<<else>>
<<set $recruit = $recruit.random()>>
<<goto "RE recruit">>
<</if>>
<<else>>
If cheat mode is enabled and the user presses the space bar go back to the start.
Main event text
The bulk of the writing will be in the main event text. There are quite a few rules to deal with here.
The PC is referred to in the second person singular ("you"), everyone else in third person.
The PC has no direct speech. All the things "you" say are described, not quoted.
A slave can be linked with the macro <<EventNameLink _Slave>>. This allows the player to click on the slave name and view their description, then go back to the event. WARNING: Going back triggers the event passage again, so if your event has immediate effects (see above), make sure to NOT repeat them by setting corresponding flags (this is harder than it sounds in general).
<<SlaveTitle _Slave>> sets $desc (which ends up being a string like "slavegirl", "MILF", "futanari" and so on, depending on slave).
<<SlavePronouns _Slave>> allows you to use the variables $pronoun ("she"/"he"/"it"), $pronounCap ("She"/"He"/"It"), $possessive ("her"/"his"/"its"), $possessiveCap ("Her"/"His"/"Its") and $object ("her"/"him"/"it"). There is NO variable for self-possession ("hers"/"his"/"its") and for "herself", you need to use <<= $object>>self.
One more macro initialises several others and is required when you have a slave speak and want to use direct quotes: <<Enunciate _Slave>> allows you to use <<Master>>, <<WrittenMaster>>, <<says>> (which turns into "lisps" when that's the case) and the lisping replacers <<s>>, <<ss>>, <<S>>, <<c>> and <<z>>.
The text should be about large enough to fit on the screen assuming typical monitor sizes. In terms of visible text, about 1000 words are a fine limit to aim for. There's a lot to keep in mind in terms of different appearances and circumstances, so keep your document with slave variables as a reference nearby.
It's fine - and a part of the normal workflow - to first write an event without any variation, then go through it and vary the text here and there.
Choices
You should keep the amount of choices small, but not too small. About three to five is generally a good number. Choices which can't be taken due to the current situation should be displayed as such ("You lack the funds ...") if they are an obvious choice, hidden when they aren't (for example, in event chains you might want to hide choices if the player didn't do something specific or didn't acquire some specific bit of knowledge). Every choice should be a simple sentence of the form "Do something." followed by a short explanation of the obvious effects.
Choices should also be hidden when they run against the game rules, like for example the setting if the player wants to see "extreme" content.
diary (313-325)
<<if $dairyFeedersUpgrade == 1>>
The milking machines can hold feeders in slaves' mouths and inject drugs into their bodies, ensuring ideal nutrition and production.
<br> The feeders are
<<if $dairyFeedersSetting == 2>>
''industrial.'' [[Moderate|Dairy][$dairyFeedersSetting = 1, $dairyFeedersSettingChanged = -1]]
<<elseif $dairyFeedersSetting == 1>>
''active.'' [[Inactive|Dairy][$dairyFeedersSetting = 0]]<<if ($seeExtreme != 0) && ($dairyRestraintsSetting == 2)>> | [[Industrial|Dairy][$dairyFeedersSetting = 2, $dairyFeedersSettingChanged = 1]]<</if>>
<<else>>
''inactive.'' [[Active|Dairy][$dairyFeedersSetting = 1]]
<</if>>
<<else>>
$dairyNameCaps is equipped to feed and clean slaves normally. [[Upgrade the milking machines with intubators|Dairy][$cash -= _Tmult1, $dairyFeedersUpgrade = 1]] //Costs ¤_Tmult1 and will increase upkeep costs//
<</if>>
In order to enable the industrial feeder option both any of the see extreme content options has be enabled and the restraint's have to be already set to industrial.
Remember that "do nothing" is almost always a choice (it's called "Continue" and can be found on the left side of the screen) so your events don't need this as an extra choice.
Choice text
This should be a short text describing the effects of your choice. Generally shorter than the main text, but all the other things mentioned there apply.
Try to keep surprise buttsex to a minimum.
For example this cut up version of "paternalist encounter" from REFS (l:106-139).
<span id="result">
<<link "Alert your drones and keep walking">>
<</link>>
<<if $cash >= 2000>>
<br><<link "Take the poor slave girl into your custody">>
<br><<link "Publicly confront the citizen">>
So here you can either, A) "Alert your drones and keep walking", B) if $cash is above 2000 you can take acquire the slave or C) "Publicly confront the citizen".
Choice effect
A choice doesn't need to have a specific effect. If your event has an immediate effect, remember to take that into account when you decide on the choice's effects.
<span id="result">
<<link "Alert your drones and keep walking">>
<<replace "#result">>
You inform $assistantName that you have a slave beater in need of detainment by your security drones, then continue on your way confident in your knowledge that the citizen will soon be in custody.
<</replace>>
<</link>>
<<if $cash >= 2000>>
<br><<link "Take the poor slave girl into your custody">>
<<replace "#result">>
Confronting the citizen is simplicity in itself, he would not dare defy you under threat of arrest by your security drones and is unlikely to garner any sympathy from the public for his degradationist behaviors. As such, you are able to take civil ownership over the poor slave girl and take her into your care with only minimal compensation to the citizen. As you stride away from her former owner with the girl in your arms, she leans over to plant a chaste kiss of thanks on your cheek.
<<set $cash -= 2000>>
<<set $activeSlaveOneTimeMaxAge = 22>>
<<include "Generate New Slave">>
<<set $activeSlave.origin = "She was taken into your custody from an abusive owner.">>
<<set $activeSlave.devotion = random(-25,0)>>
<<set $activeSlave.trust = random(-25,0)>>
<<set $activeSlave.boobs = random(300,450)>>
<<set $activeSlave.hips = random(-2,-1)>>
<<set $activeSlave.butt = random(0,2)>>
<<set $activeSlave.health = random(10,20)>>
<<include "New Slave Intro">>
<<set $nextLink = "AS Dump", $returnTo = "RIE Eligibility Check">>
<</replace>>
<</link>> // Taking custody of the girl will cost ¤2000. //
<</if>>
<br><<link "Publicly confront the citizen">>
<<replace "#result">>
Your walk up to the citizen is not accompanied by shaking ground or tumultuous fanfare, yet the citizen looks as if death itself has come before him. You don't hurt him physically, instead chastising him publicly in front of his fellow peers who begin to cheer their agreement. You end your tirade of verbal abuse with a reminder that although the man is a citizen of your arcology, that does not give him the impunity to shirk the law. To make it clear his next offense will be his last, a brace of your security drones hover behind you threateningly. The crowd that gathered @@.green;approve of your rebuke of the citizen@@.
<<set $rep += 500>>
<</replace>>
<</link>>
</span>
So here the results of the choices are, A) nothing, B) reduce cash by 2000 but acquire the slave C) chastise the citizen for plus 500 rep.
|
AshVaris/fc
|
devNotes/AnatomyOfAFreeCitiesEvent.txt
|
Text
|
mit
| 10,392 |
<<widget "BodySwap">>
/* still needs work - blindness, mindbroken reactions, fatness, muscle, piercings, tattoos, clits, massive changes in cock and balls sizes, and the latter half of the stuff needs amp checks. On top of that, the non-amp breasts has a comment after it is well */
$args[0].slaveName is recovering nicely.
<<if $args[0].health >= $args[1].health+10>>
The monitors indicate that her health has improved from her previous body. Whatever else happens, she will likely appreciate this.
<<elseif $args[0].health <= $args[1].health-10>>
The monitors indicate that her health has degraded from her previous body. Whatever else happens, this will likely upset her.
<</if>>
Now you only have to wait for her to wake up.
<br><br>
<<if $args[0].amp != 1>> /* (has limbs) */
<<if $args[0].devotion > 50>>
After a while, she begins to stir, her eyes fluttering. She lets out a low groan and reaches up to rub at her eyes. She stops, and stares uncomprehendingly at the hand for moment before she realizes that it’s not her own. A smile begins to form on her face.
<<elseif $args[0].devotion > 20>>
After a while, she begins to stir, her eyes fluttering. She lets out a low groan and reaches up to rub at her eyes. She stops, and stares uncomprehendingly at the hand for moment before she realizes that it’s not her own.
<<else>>
She reaches up to rub at her eyes, and pauses to stare in shock at her hand. She finally realizes that the new body she found herself in @@.gold;was not a nightmare as she had hoped, but reality.@@ She is @@.mediumorchid;utterly disturbed@@ by your removal of the last constant she had in life.
<<set $args[0].devotion -= 15, $args[0].trust -= 30>>
<</if>>
<<if $args[0].skin != $args[1].skin>>
Her $args[0].skin skin is the first thing that leaps out at her.
<<if $args[0].devotion > 50>>
She is fascinated by the change and what this means for her.
<<elseif $args[0].devotion > 20>>
The fact that you would alter something so defining about her no longer surprises her.
<<elseif $args[0].devotion >= -20>>
The fact that you would alter something so defining about her is @@.hotpink;humbling.@@
<<set $args[0].devotion += 2>>
<<else>>
The fact that you would alter something so defining about her is @@.gold;terrifying.@@
<<set $args[0].trust -= 2>>
<</if>>
<</if>>
She holds the limb in front of her, flexing each
/*(arms)*/
<<if $args[0].amp < 0 && $args[1].amp == 0>>
finger; the servo motors whining softly with each movement.
<<if $args[0].devotion >= -20>>
A look of morbid curiosity crosses her features.
<<else>>
A look of @@.mediumorchid;frustration@@ and @@.gold;anguish@@ distorts her face as she moans pitiably.
<<set $args[0].devotion -= 5, $args[0].trust -= 1>>
<</if>>
<<elseif $args[0].amp < 0 && $args[1].amp < 0>>
finger; the servo motors whining softly with each movement.
<<elseif $args[0].muscles < $args[1].muscles-5>> /*(less muscle)*/
<<if $args[0].devotion > 20>>
finger; the arm notably less muscular than her old one.
<<else>>
finger and noticing her arm feels less muscular than she remembers. She becomes irritated with her newfound weakness and @@.mediumorchid;frowns angrily.@@
<<set $args[0].devotion -= 1>>
<</if>>
<<elseif $args[0].muscles > $args[1].muscles+5>> /*(more muscle)*/
<<if $args[0].devotion >= -20>>
finger; the arm visibly more toned than her old one. With a clench of her fist, the muscles of the limb bulge slightly. She is @@.hotpink;happy@@ that you would take into consideration such a small detail, and knows that life will be just that much easier now.
<<set $args[0].devotion += 2>>
<<else>>
finger. Flexing, she realizes she is noticeably stronger than she was before. @@.mediumaquamarine;She takes a moment to relish her newfound strength.@@
<<set $args[0].trust += 10>>
<</if>>
<<else>> /* (same muscle (within five units)) */
<<if $args[0].physicalAge < $args[1].physicalAge-5>>
finger and noticing how much younger she is.
<<if $args[1].physicalAge >= 40>>
She is pleased to see her hand is now less wrinkled and the muscles that coat her arm are now firmer than they were before.
<</if>>
<<elseif $args[0].physicalAge > $args[1].physicalAge+5>>
finger and noticing how much older she is.
<<if $args[1].physicalAge < 40>>
With a despondent note, she lowers her hand back to her side, having seen the wrinkles that now coat her new arm.
<</if>>
<<else>>
finger and finding little difference.
<</if>>
<</if>>
Her hand roams over her face until it reaches her lips.
<<if $args[0].sexualFlaw == "oral fixation" && $args[0].lips > $args[1].lips+10>> /* (bigger lip+oral fixation) */
She slowly runs her fingertips over the plush pillows. A blush blossoms over her face and the beeping of her heart monitor speeds up slightly. You know that she’ll put them to good use.
<<if $args[0].devotion <= 20>>
She pauses, and begins to @@.hotpink;hesitantly smile@@ as she feels the softness of her lovely new lips.
<</if>>
<<elseif $args[0].sexualFlaw == "oral fixation" && $args[0].lips < $args[1].lips-10>> /* (smaller lip+oral fixation) */
<<if $args[0].devotion > 20>>
Her fingers pause and almost flinch away once they reach her lips. A second later, they return to confirm her fear. Her pride and joy are gone. She lets out a sniff and @@.mediumorchid;tears begin to roll down her cheeks.@@
<<set $args[0].devotion -= 10>>
<<else>>
Her hand flinches, and she pulls it away as <<if $args[0].voice == 0>>attempted <</if>>sobs well up from her. For someone who values her lips like her, this is a truly @@.mediumorchid;terrible fate.@@
<<set $args[0].devotion -= 20>>
<</if>>
<<elseif $args[0].teeth == "removable" && $args[1].teeth != "removable">> /* no teeth */
A look of confusion crosses her face, her brow furrowing slightly. You see her work her jaw for moment before she turns her head and spits out a set of dentures.
<<if $args[0].devotion <= -20>>
She @@.mediumorchid;glowers@@ at them, knowing full well they'll be back in her mouth shortly.
<<set $args[0].devotion -= 2>>
<</if>>
<<elseif $args[0].teeth != "removable" && $args[0].tonguePiercing > 0 && $args[1].tonguePiercing == 0>> /* (if tongue pierced+has teeth) */
You can vaguely hear her rattling her tongue piercing against her teeth.
<<else>> /* (no oral fixation) */
<<if $args[0].physicalAge < 40 && $args[1].physicalAge > 50>>
<<if $args[0].devotion > 20>>
She can feel the lack of wrinkles on her face and @@.hotpink;smiles broadly.@@
<<else>>
She can feel the lack of wrinkles on her face and cringes at what this means for her future.
<</if>>
<</if>>
<</if>>
<br><br>
After a moment, she sits up to try and take stock of her new
<<if ($args[0].weight >= $args[1].weight+30) || ($args[0].muscles <= $args[1].muscles-30 && $args[0].muscles < 50) || ($args[0].belly >= $args[1].belly+10000) || ($args[0].boobs >= $args[1].boobs+1000)>> /*(If fat/more big breasted/heavily pregnant/physically weaker and/or same or more weight)*/
body, letting out a grunt of effort as she lifts her heavier form.
<<if ($args[0].weight <= $args[1].weight-30) || ($args[0].muscles >= $args[1].muscles+30 && $args[1].muscles < 50) || ($args[0].belly <= $args[1].belly-10000) || ($args[0].boobs <= $args[1].boobs-500)>> /*(if fat/less big breasted/physically stronger and/or same or less weight/no longer heavily pregnant)*/
body, the effort noticeably easier than before.
<<else>>
body.
<</if>>
As she settles herself, she takes a look down at her chest.
/*(Breast size)*/
<<if $args[0].boobs >= $args[1].boobs-100 && $args[0].boobs <= $args[1].boobs+100 && $args[0].boobs > 300 && $args[1].boobs > 300>> /*(No change (less than a 100 cc’s of change)*/
<<if $args[0].devotion > 20>>
She is happy to find that a familiarly sized chest waiting for her.
<<if ($args[0].physicalAge < $args[1].physicalAge-5) || ($args[0].boobShape != "saggy" && $args[0].boobShape != "downward facing" && ($args[1].boobShape == "saggy" || $args[1].boobShape == "downward facing"))>> /*(younger/perkier)*/
She gasps when she realizes they ar now perkier and firmer than her old breasts. She toys with the supple flesh and sensitive nipples, groping them with childlike abandon.
<</if>>
<<else>>
She cautiously handles one breast, then the other, and is happy that at least one less thing is different today.
<<if ($args[0].physicalAge < $args[1].physicalAge-5)>> /*(younger)*/
The suppleness of her younger breasts, at least, is a reminder that she is now @@.hotpink;young again@@ and of how many would kill to be bestowed such a gift.
<<set $args[0].devotion += 2>>
<<elseif ($args[0].boobShape != "saggy" && $args[0].boobShape != "downward facing" && ($args[1].boobShape == "saggy" || $args[1].boobShape == "downward facing"))>> /*perkier*/
Their newfound perkiness is not lost on her.
<</if>>
<</if>>
<<elseif $args[0].boobs <= 300 && $args[1].boobs > 300 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(flat + breast fetish)*/
<<if $args[0].devotion > 20>>
She struggles to keep her emotions in check as she feebly paws at where she used to have breasts. She finally musters the courage to smile at you, but it @@.mediumorchid;doesn’t quite reach her eyes.@@
<<else>>
Her eyes immediately @@.mediumorchid;fill with tears@@ as she sees how flat she is. <<if $args[0].voice != 0>>Heaving sobs wrack her body, and it’s<<else>>It’s<</if>> all she can do to keep from curling into a ball, cupping her once large breasts.
<</if>>
<<set $args[0].devotion -= 5>>
<<elseif $args[0].boobs <= 300 && $args[1].boobs > 300>> /*(flat)*/
She runs a hand over her flat chest and sighs.
<<if $args[0].devotion > 20>>
She shrugs this off, and toys with her nipples instead.
<<else>>
<<if $arcologies[0].FSSlimnessEnthusiast == "unset">>She knows much of society will view her as a lesser person and a part of her feels the same.<</if>> This feels like a cruel manipulation of her body and she @@.mediumorchid;hates you@@ a little more for it.
<<set $args[0].devotion -= 2>>
<</if>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Smaller breasts + breast fetish)*/
<<if $args[0].devotion > 20>>
She struggles to keep her emotions in check as she feebly paws at her now smaller breasts. She finally musters the courage to smile at you, but it @@.mediumorchid;doesn’t quite reach her eyes.@@
<<else>>
Her eyes immediately @@.mediumorchid;fill with tears@@ as she sees her breasts have shrunk. <<if $args[0].voice != 0>>Heaving sobs wrack her body, and it’s<<else>>It’s<</if>> all she can do to keep from curling into a ball, cradling her once large breasts.
<</if>>
<<set $args[0].devotion -= 5>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300>> /*(Smaller breasts)*/
She gives her new breasts a careful grope and is disappointed to find they are smaller now.
<<if $args[0].devotion > 20>>
She shrugs this off, and toys with her new breasts.
<<else>>
<<if $arcologies[0].FSSlimnessEnthusiast == "unset">>She knows much of society will view her as a lesser person and a part of her feels the same.<</if>> This feels like a cruel manipulation of her body and she @@.mediumorchid;hates you@@ a little more for it.
<<set $args[0].devotion -= 2>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Massive+breast fetish)*/
She can barely move under the weight of her new breasts.
<<if $args[0].devotion >= -20>>
The sheer size of her titanic tits greatly excites her to the point that she can't hold back. She shudders against her new chest pillows as an intense orgasm @@.hotpink;rewards her for enjoying your gift.@@
<<set $args[0].devotion += 5>>
<<else>>
She tries desperately to control her mounting excitement, reminding herself that these breasts were not given to her for her own enjoyment. However, she can’t help taking advantage of her massive mammaries, squeezing and toying with them until she is flushed red. She finally stops as she sees your wolfish grin. Deep down, @@.hotpink;she's thankful,@@ and the way she's cradling her chest pillows lovingly proves it.
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000>> /*(Extreme bigger breasts)*/
She can barely move under the weight of her new breasts.
<<if $args[0].devotion > 20>>
This new size excites her and she looks forward to experimenting with them.
<<else>>
This new size is a @@.gold;massive inconvenience@@ for her and it @@.mediumorchid.infuriates her@@ that you would do such a thing to her.
<<set $args[0].devotion -= 5, $args[0].trust -= 5>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Bigger+breast fetish)*/
<<if $args[0].devotion > 20>>
Her groping becomes more vigorous, a blush spreading down her face to her chest. She bites her lip as she teases her nipples, the beeping of her heart monitor becoming more insistent. From the look on her face, you know she’ll want to put them to the test.
<<else>>
Her cautious handling quickly become more insistent. She bites her lip as she begins to tease at her nipples and the steady beep of the heart monitor becomes noticeably faster. She @@.hotpink;is excited@@ about her new breasts.
<<set $args[0].devotion += 2>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100>> /*(Bigger breasts)*/
<<if $args[0].devotion > 20>>
She gives her larger chest a heft, marveling at their size.
<<else>>>
She is confused for a moment at the larger breasts adorning her chest before she tentatively takes one in hand and experimentally hefts it to gauge their new weight.
<</if>>
<<else>>
She's as flat as ever.
<</if>>
/* Milkanon, the above needs milk/implant/shape content. I handled saggy/downward facing, but it and the rest could use a little work. */
/* The above also needs breast implant content - see amp for comparison. */
<br><br>
<<if $args[1].voice == 0>>
When she finishes, she turns to you and gestures for a mirror.
<<if $args[0].voice != 0>>
You gesture as if you couldn't hear her, to which she squeeks in response. It immediately @@.hotpink;dawns on her@@ what this means. She @@.mediumaquamarine;thanks you profusely@@ before asking for a mirror.
<<set $args[0].devotion += 5, $args[0].trust += 10>>
<</if>>
<<else>>
When she finishes, she turns to you and opens her mouth to
<<if $args[0].voice == 0>>
speak, but finds no words come. She tries again, frowning. She rubs her throat and tears well in her eyes, but no sobs can be heard as her shoulders begin to @@.gold;shake.@@ After a bit, she extends her hand, and gestures @@.mediumorchid;somberly@@ for a mirror.
<<set $args[0].devotion -= 5, $args[0].trust -= 5>>
<<elseif $args[0].voice != $args[1].voice>>
speak. At first she's slightly startled by her new voice, but manages a single word. “..mirror..”
<</if>>
<</if>>
<<else>> /* (amputee) */
After a while, she begins to stir, her eyes fluttering. She lets out a low groan and reaches up to rub at her eyes. Or rather, she attempts to. A visible look of confusion crosses her face and she strains to sit up, but all she manages to do is wiggle, her movements reminding you of a suffocating goldfish. As the cloud of anesthetics fades, she realizes what's happened to her and begins to panic, her breaths quickening.
<<if $args[0].devotion > 20>>
With a visible look of concentration, her breathing slows and she tries to take stock of her new body.
<<if $args[1].amp == 1>> /*(was already an amputee)*/
She quickly realizes nothing has changed.
<<else>>
She quickly realizes @@.gold;you have taken her arms and legs.@@
<<set $args[0].trust -= 15>>
<</if>>
<<else>>
<<if $args[1].amp == 1>> /*(was already an amputee)*/
<<else>>
Her eyes seemed to bulge, her heart monitor begins to beep faster and more insistently. Eventually, your assistant is forced to inject her with a sedative. Her eyes flutter closed and the heart monitors beeping slows to a steady pulse. Hopefully she’ll be calmer when she wakes up again, though the memory of waking without limbs will @@.gold;stick with her.@@
<br>
...
<br>
When she wakes up again, she seems calmer; the cold @@.hotpink;acceptance@@ of her fate clouds her eyes.
<<set $args[0].devotion += 5, $args[0].trust -= 15>>
<</if>>
<</if>>
<br><br>
She cranes her neck to looks down on herself
/*(breast changes)*/
<<if $args[0].boobsImplant > 0 && $args[1].boobsImplant > 0>> /*(breast implants)*/
and finds
<<if $args[0].boobsImplant >= $args[1].boobsImplant+20000 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Massive implants+breast fetish)*/
she still has breast implants; implants easily bigger than her entire body.
<<if $args[0].devotion >= -20>>
The sheer size of her silicone titans greatly excites her to the point that she can't hold back. She wriggles under her new chest boulders as an intense orgasm @@.hotpink;courses through her body.@@
<<set $args[0].devotion += 5>>
<<else>>
She tries desperately to control her mounting excitement, reminding herself that these breasts were not given to her for her own enjoyment. However, she can’t help become aroused under the weight of her massive fake mounds. She finally stops squirming when she sees your wolfish grin. Deep down, @@.hotpink;she's thankful,@@ and the way she's lovingly eying her balloons proves it.
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Massive+breast fetish)*/
she still has breast implants resting on her chest. Even if they aren't clearly implants, she can barely move under the weight of her new breasts.
<<if $args[0].devotion >= -20>>
The sheer size of her titanic tits greatly excites her to the point that she can't hold back. She shudders against her new chest pillows as an intense orgasm @@.hotpink;rewards her for enjoying your gift.@@
<<set $args[0].devotion += 5>>
<<else>>
She tries desperately to control her mounting excitement, reminding herself that these breasts were not given to her for her own enjoyment. However, she can’t help become aroused under the weight of her massive fake mounds. She finally stops squirming when she sees your wolfish grin. Deep down, @@.hotpink;she's thankful,@@ and the way she's lovingly eying her balloons proves it.
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobsImplant >= $args[1].boobsImplant+20000>> /*(Extreme bigger implants)*/
a pair of absolutely enormous fake tits looming over her.
<<if $args[0].devotion > 20>>
This new size excites her and she looks forward to experimenting with them.
<<else>>
This new size is a @@.gold;massive inconvenience@@ for her and it @@.mediumorchid.infuriates her@@ that you would do such a thing to her.
<<set $args[0].devotion -= 10, $args[0].trust -= 10>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000>> /*(Extreme bigger breasts)*/
a pair of massive tits resting on her chest. As she moves, she recognizes the familiar weight of the implants at their cores.
<<if $args[0].devotion > 20>>
This new size excites her and she looks forward to experimenting with them.
<<else>>
This new size is a @@.gold;massive inconvenience@@ for her and it @@.mediumorchid.infuriates her@@ that you would do such a thing to her.
<<set $args[0].devotion -= 5, $args[0].trust -= 5>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Bigger+breast fetish)*/
<<if $args[0].devotion > 20>>
her bust has grown. She eyes her mammaries eagerly, desperate to grope them. She bites her lip and gives you a pleading look that begs you to teases her nipples. From the look on her face, you know she’ll want to put them to the test.
<<else>>
her breasts have expanded in size. She wrestles with the fact that you have clearly not done this for her benefit, @@.hotpink;but decides this is definitely better than the alternative.@@
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100>> /*(Bigger breasts)*/
<<if $args[0].devotion > 20>>
her bust has grown. She is caught off guard at the size of her new chest. She shakes her shoulders, marveling at their mass.
<<else>>
her chest is heavier than ever. However, she is well aware however that these breasts are not for her benefit or pleasure. She views this as a @@.mediumorchid;cruel manipulation of her body@@ on top of what has already been done to her.
<<set $args[0].devotion -= 5>>
<</if>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Smaller breasts + breast fetish)*/
<<if $args[0].devotion > 20>>
her bust has shrunk. She is saddened by the loss of the beautiful weight she once beared and struggles to keep herself under control for your sake, @@.mediumorchid;barely.@@
<<else>>
that her chest is not as large as it once was. @@.mediumcorchid;Tears leap into her eyes@@ as her shoulders begin to shake<<if $args[0].voice != 0>> and sobs echo about the room</if>>. She pauses to gather herself together and let the tears run from her eyes before continuing her bodily inspection.
<</if>>
<<set $args[0].devotion -= 5>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300>> /*(Smaller breasts)*/
<<if $args[0].devotion > 20>>
that her chest is smaller. She shrugs this off, as her devotion to you overrides any anguish this might cause.
<<else>>
that her chest is not as large as it once was. She looks at you with @@.mediumorchid;anger<<if $arcologies[0].FSSlimnessEnthusiast == "unset">>@@ as this is not only a cruel manipulation of her body, but she is now less of a woman in the eyes of a vast majority of society.<<else>>.@@<</if>>
<<set $args[0].devotion -= 2>>
<</if>>
<<else>> /*(No change (less than a 100 cc’s of change)*/
<<if $args[0].devotion > 20>>
a familiar chest waiting for her.
<<if ($args[0].physicalAge < $args[1].physicalAge-5)>> /*(younger)*/
She is pleased to see her breasts are now more pert and smooth then they were before.
<</if>>
<<else>>
that her breasts are roughly the same.
<<if ($args[0].physicalAge < $args[1].physicalAge-5)>> /*(younger)*/
Except, of course, that they are younger and more pert, something that she @@.hotpink;can't help but appreciate.@@
<<set $args[0].devotion += 2>>
<</if>>
<</if>>
<</if>>
<<elseif $args[0].boobsImplant > 0 && $args[1].boobsImplant == 0>>
and finds
<<if $args[0].boobsImplant >= $args[1].boobsImplant+20000 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Massive implants+breast fetish)*/
a pair of massive implants towering over her.
<<if $args[0].devotion >= -20>>
The sheer size of her silicone titans greatly excites her to the point that she can't hold back. She wriggles under her new chest boulders as an intense orgasm @@.hotpink;courses through her body.@@
<<set $args[0].devotion += 5>>
<<else>>
She tries desperately to control her mounting excitement, reminding herself that these breasts were not given to her for her own enjoyment. However, she can’t help become aroused under the weight of her massive fake mounds. She finally stops squirming when she sees your wolfish grin. Deep down, @@.hotpink;she's thankful,@@ and the way she's lovingly eying her balloons proves it.
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Massive+breast fetish)*/
she has breast implants resting on her chest. Even if they aren't clearly implants, she can barely move under the weight of her new breasts.
<<if $args[0].devotion >= -20>>
The sheer size of her titanic tits greatly excites her to the point that she can't hold back. She shudders against her new chest pillows as an intense orgasm @@.hotpink;rewards her for enjoying your gift.@@
<<set $args[0].devotion += 5>>
<<else>>
She tries desperately to control her mounting excitement, reminding herself that these breasts were not given to her for her own enjoyment. However, she can’t help become aroused under the weight of her massive fake mounds. She finally stops squirming when she sees your wolfish grin. Deep down, @@.hotpink;she's thankful,@@ and the way she's lovingly eying her balloons proves it.
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobsImplant >= $args[1].boobsImplant+20000>> /*(Extreme bigger implants)*/
a pair of absolutely enormous fake tits looming over her.
<<if $args[0].devotion > 20>>
This new size excites her and she looks forward to experimenting with them.
<<else>>
This new size is a @@.gold;massive inconvenience@@ for her and it @@.mediumorchid.infuriates her@@ that you would do such a thing to her.
<<set $args[0].devotion -= 10, $args[0].trust -= 10>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000>> /*(Extreme bigger breasts)*/
a pair of massive tits resting on her chest. As she moves, she recognizes an unfamiliar firmness at their cores.
<<if $args[0].devotion > 20>>
This new size excites her and she looks forward to experimenting with them.
<<else>>
This new size is a @@.gold;massive inconvenience@@ for her and it @@.mediumorchid.infuriates her@@ that you would do such a thing to her.
<<set $args[0].devotion -= 5, $args[0].trust -= 5>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Bigger+breast fetish)*/
<<if $args[0].devotion > 20>>
her bust has grown. She eyes her mammaries eagerly, desperate to grope them. She bites her lip and gives you a pleading look that begs you to teases her nipples. From the look on her face, you know she’ll want to put them to the test.
<<else>>
her breasts have expanded in size. She wrestles with the fact that you have clearly not done this for her benefit, @@.hotpink;but decides this is definitely better than the alternative.@@
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100>> /*(Bigger breasts)*/
<<if $args[0].devotion > 20>>
her bust has grown. She is caught off guard at the size of her new chest. She shakes her shoulders, marveling at their firmness.
<<else>>
her chest is heavy with implants. However, she is well aware however that these breasts are not for her benefit or pleasure. She views this as a @@.mediumorchid;cruel manipulation of her body@@ on top of what has already been done to her.
<<set $args[0].devotion -= 5>>
<</if>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Smaller breasts + breast fetish)*/
<<if $args[0].devotion > 20>>
her bust has shrunk. She is saddened by the loss of the beautiful weight she once beared and struggles to keep herself under control for your sake, @@.mediumorchid;barely.@@
<<else>>
that her chest is not as large as it once was. @@.mediumcorchid;Tears leap into her eyes@@ as her shoulders begin to shake<<if $args[0].voice != 0>> and sobs echo about the room</if>>. She pauses to gather herself together and let the tears run from her eyes before continuing her bodily inspection.
<</if>>
<<set $args[0].devotion -= 5>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300>> /*(Smaller breasts)*/
<<if $args[0].devotion > 20>>
that her chest is smaller. She shrugs this off, as her devotion to you overrides any anguish this might cause.
<<else>>
that her chest is not as large as it once was. She looks at you with @@.mediumorchid;anger<<if $arcologies[0].FSSlimnessEnthusiast == "unset">>@@ as this is not only a cruel manipulation of her body, but she is now less of a woman in the eyes of a vast majority of society.<<else>>.@@<</if>>
<<set $args[0].devotion -= 2>>
<</if>>
<<else>> /*(No change (less than a 100 cc’s of change)*/
<<if $args[0].devotion > 20>>
a familiar chest waiting for her. She quickly realizes her mistake once she moves them.
<<if ($args[0].physicalAge < $args[1].physicalAge-5)>> /*(younger)*/
She is pleased to see her breasts are now more pert and smooth then they were before.
<</if>>
<<else>>
that her breasts are roughly the same. She quickly realizes her mistake once she moves them.
<<if ($args[0].physicalAge < $args[1].physicalAge-5)>> /*(younger)*/
Except, of course, that they are younger and more pert, something that she @@.hotpink;can't help but appreciate.@@
<<set $args[0].devotion += 2>>
<</if>>
<</if>>
<</if>>
<<elseif $args[0].boobsImplant == 0 && $args[1].boobsImplant > 0>>
<<if $args[0].boobs <= 300 && $args[0].fetish == "boobs" && $args[0].fetishKnown>>/*flat+fetish*/
<<if $args[0].devotion > 20>>
and finds not only her implants gone, but her breasts entirely. She is saddened by her flat chest and struggles to keep herself under control for your sake, @@.mediumorchid;barely.@@
<<else>>
and finds that her implants are gone, along with the rest of her breasts. @@.mediumcorchid;Tears leap into her eyes@@ as her shoulders begin to shake<<if $args[0].voice != 0>> and sobs echo about the room</if>>. She pauses to gather herself together and let the tears run from her eyes before continuing her bodily inspection.
<</if>>
<<set $args[0].devotion -= 5>>
<<elseif $args[0].boobs <= 300>> /*flat*/
<<if $args[0].devotion > 20>>
and sees nothing. Not only have her implants been removed, but she's been left completely flat. It is what it is.
<<else>>
and sees nothing. Not only have her implants been removed, but she's been left completely flat. <<if $arcologies[0].FSSlimnessEnthusiast == "unset">>She knows much of society will view her as a lesser person and a part of her feels the same.<</if>> This feels like a cruel manipulation of her body and she @@.mediumorchid;hates you@@ a little more for it.
<<set $args[0].devotion -= 2>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Massive+breast fetish)*/
and sees nothing but breast. As she wiggles back and forth, she can just make out that she no longer has implants.
<<if $args[0].devotion >= -20>>
The sheer size of her titanic tits greatly excites her to the point that she can't hold back. She shudders against her new chest pillows as an intense orgasm @@.hotpink;rewards her for enjoying your gift.@@
<<set $args[0].devotion += 5>>
<<else>>
She tries desperately to control her mounting excitement, reminding herself that these breasts were not given to her for her own enjoyment. However, she can’t help become aroused under the weight of her massive fake mounds. She finally stops squirming when she sees your wolfish grin. Deep down, @@.hotpink;she's thankful,@@ and the way she's lovingly eying her balloons proves it.
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000>> /*(Extreme bigger breasts)*/
and finds a pair of massive tits resting on her chest. As she moves, she can just make out that she no longer has implants.
<<if $args[0].devotion > 20>>
This new size excites her and she looks forward to experimenting with them.
<<else>>
This new size is a @@.gold;massive inconvenience@@ for her and it @@.mediumorchid.infuriates her@@ that you would do such a thing to her.
<<set $args[0].devotion -= 5, $args[0].trust -= 5>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Bigger+breast fetish)*/
<<if $args[0].devotion > 20>>
and finds her tits are bigger than ever, yet implant free. She eyes her mammaries eagerly, desperate to grope them. She bites her lip and gives you a pleading look that begs you to teases her nipples. From the look on her face, you know she’ll want to put them to the test.
<<else>>
and sees that her breasts have expanded in size, yet lack implants. She wrestles with the fact that you have clearly not done this for her benefit, @@.hotpink;but decides this is definitely better than the alternative.@@
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100>> /*(Bigger breasts)*/
<<if $args[0].devotion > 20>>
and finds her bust has grown. She is caught off guard at the size of her new chest. She shakes her shoulders, marveling at the motion of silicone free flesh.
<<else>>
and finds her chest is heavier than ever, and not because of silicone. However, she is well aware however that these breasts are not for her benefit or pleasure. She views this as a @@.mediumorchid;cruel manipulation of her body@@ on top of what has already been done to her.
<<set $args[0].devotion -= 5>>
<</if>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Smaller breasts + breast fetish)*/
<<if $args[0].devotion > 20>>
ands sees her bust has shrunk. She is saddened by the loss of her implants and struggles to keep herself under control for your sake, @@.mediumorchid;barely.@@
<<else>>
ands sees that her chest is not as large as it once was. @@.mediumcorchid;Tears leap into her eyes@@ as her natural breasts begin to quiver<<if $args[0].voice != 0>> and sobs echo about the room</if>>. She pauses to gather herself together and let the tears run from her eyes before continuing her bodily inspection.
<</if>>
<<set $args[0].devotion -= 5>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300>> /*(Smaller breasts)*/
<<if $args[0].devotion > 20>>
and finds that her implants have been removed. She shrugs this off, as her devotion to you overrides any anguish this might cause.
<<else>>
ands sees that her chest is not as large as it once was. She looks at you with @@.mediumorchid;anger<<if $arcologies[0].FSSlimnessEnthusiast == "unset">>@@ as this is not only a cruel manipulation of her body, but she is now less of a woman in the eyes of a vast majority of society.<<else>>.@@<</if>>
<<set $args[0].devotion -= 2>>
<</if>>
<<else>> /*(No change (less than a 100 cc’s of change)*/
<<if $args[0].devotion > 20>>
and finds a familiar chest waiting for her, albiet implant free.
<<if ($args[0].physicalAge < $args[1].physicalAge-5)>> /*(younger)*/
She is pleased to see her breasts are now more pert and smooth then they were before.
<</if>>
<<else>>
and sees that her breasts are roughly the same, save for their missing implants.
<<if ($args[0].physicalAge < $args[1].physicalAge-5)>> /*(younger)*/
Except, of course, that they are younger and more pert, something that she @@.hotpink;can't help but appreciate.@@
<<set $args[0].devotion += 2>>
<</if>>
<</if>>
<</if>>
<<else>>
<<if $args[0].boobs <= 300 && $args[0].fetish == "boobs" && $args[0].fetishKnown>>/*flat+fetish*/
<<if $args[0].devotion > 20>>
and sees no tits at all. She is saddened by her flat chest and struggles to keep herself under control for your sake, @@.mediumorchid;barely.@@
<<else>>
and sees no tits at all. @@.mediumcorchid;Tears leap into her eyes@@ as her shoulders begin to shake<<if $args[0].voice != 0>> and sobs echo about the room</if>>. She pauses to gather herself together and let the tears run from her eyes before continuing her bodily inspection.
<</if>>
<<set $args[0].devotion -= 5>>
<<elseif $args[0].boobs <= 300>> /*flat*/
<<if $args[0].devotion > 20>>
sees nothing. Her breasts are completely gone. At least it's a literal weight off her chest.
<<else>>
sees nothing. Her breasts are completely gone. <<if $arcologies[0].FSSlimnessEnthusiast == "unset">>She knows much of society will view her as a lesser person and a part of her feels the same.<</if>> This feels like a cruel manipulation of her body and she @@.mediumorchid;hates you@@ a little more for it.
<<set $args[0].devotion -= 2>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Massive+breast fetish)*/
sees nothing but breast. As she wiggles back and forth beneath their mass, she can make out that they are all natural.
<<if $args[0].devotion >= -20>>
The sheer size of her titanic tits greatly excites her to the point that she can't hold back. She shudders against her new chest pillows as an intense orgasm @@.hotpink;rewards her for enjoying your gift.@@
<<set $args[0].devotion += 5>>
<<else>>
She tries desperately to control her mounting excitement, reminding herself that these breasts were not given to her for her own enjoyment. However, she can’t help become aroused under the weight of her massive mammaries. She finally stops squirming when she sees your wolfish grin. Deep down, @@.hotpink;she's thankful,@@ and the way she's lovingly eying her chest pillows proves it.
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobs >= $args[1].boobs+20000>> /*(Extreme bigger breasts)*/
and finds a pair of massive tits resting on her chest. As she moves, she can clearly tell they are completely natural.
<<if $args[0].devotion > 20>>
This new size excites her and she looks forward to experimenting with them.
<<else>>
This new size is a @@.gold;massive inconvenience@@ for her and it @@.mediumorchid.infuriates her@@ that you would do such a thing to her.
<<set $args[0].devotion -= 5, $args[0].trust -= 5>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Bigger+breast fetish)*/
<<if $args[0].devotion > 20>>
and finds her tits are bigger than ever. She eyes her mammaries eagerly, desperate to grope them. She bites her lip and gives you a pleading look that begs you to teases her nipples. From the look on her face, you know she’ll want to put them to the test.
<<else>>
and sees her breasts have expanded in size. She wrestles with the fact that you have clearly not done this for her benefit, @@.hotpink;but decides this is definitely better than the alternative.@@
<<set $args[0].devotion += 5>>
<</if>>
<<elseif $args[0].boobs > $args[1].boobs+100>> /*(Bigger breasts)*/
<<if $args[0].devotion > 20>>
and finds her bust has grown. She is caught off guard at the size of her new chest. She shakes her shoulders, marveling at the motion of her soft flesh.
<<else>>
and finds that her chest is heavier than ever. However, she is well aware however that these breasts are not for her benefit or pleasure. She views this as a @@.mediumorchid;cruel manipulation of her body@@ on top of what has already been done to her.
<<set $args[0].devotion -= 5>>
<</if>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300 && $args[0].fetish == "boobs" && $args[0].fetishKnown>> /*(Smaller breasts + breast fetish)*/
<<if $args[0].devotion > 20>>
and sees that her bust has shrunk. She is saddened by her smaller chest and struggles to keep herself under control for your sake, @@.mediumorchid;barely.@@
<<else>>
and finds that her chest is not as large as it once was. @@.mediumcorchid;Tears leap into her eyes@@ as her her shoulders begin to shake<<if $args[0].voice != 0>> and sobs echo about the room</if>>. She pauses to gather herself together and let the tears run from her eyes before continuing her bodily inspection.
<</if>>
<<set $args[0].devotion -= 5>>
<<elseif $args[0].boobs <= $args[1].boobs-100 && $args[1].boobs > 300>> /*(Smaller breasts)*/
<<if $args[0].devotion > 20>>
that her breasts are smaller. She shrugs this off, as her devotion to you overrides any anguish this might cause.
<<else>>
that her chest is not as large as it once was. She looks at you with @@.mediumorchid;anger<<if $arcologies[0].FSSlimnessEnthusiast == "unset">>@@ as this is not only a cruel manipulation of her body, but she is now less of a woman in the eyes of a vast majority of society.<<else>>.@@<</if>>
<<set $args[0].devotion -= 2>>
<</if>>
<<else>> /*(No change (less than a 100 cc’s of change)*/
<<if $args[0].devotion > 20>>
a familiar chest waiting for her.
<<if ($args[0].physicalAge < $args[1].physicalAge-5)>> /*(younger)*/
She is pleased to see her breasts are now more pert and smooth then they were before.
<</if>>
<<else>>
that her breasts are roughly the same.
<<if ($args[0].physicalAge < $args[1].physicalAge-5)>> /*(younger)*/
Except, of course, that they are younger and more pert, something that she @@.hotpink;can't help but appreciate.@@
<<set $args[0].devotion += 2>>
<</if>>
<</if>>
<</if>>
<</if>>
/*(if breasts have changed shape)*/
<<if $args[0].boobShape != $args[1].boobShape && $args[0].boobs > 300>>
She also takes note that her breasts are now
<<if $args[0].boobShape == "saggy">> /*(drooping or older)*/
saggier, and is disappointed by this.
<<elseif $args[0].boobShape == "downward-facing">>
downward-facing, and is disappointed by this.
<<elseif $args[0].boobShape == "wide-set">>
hanging heavily to either side of her body.
<<elseif $args[0].boobShape == "perky">>
perkier and
<<if $args[0].devotion > 20>>
jostles them playfully.
<<else>>
is intrigued by this development.
<</if>>
<<elseif $args[0].boobShape == "torpedo-shaped">>
torpedo shaped and
<<if $args[0].devotion > 20>>
twists her chest to make them sway about.
<<else>>
is intrigued by this development.
<</if>>
<<else>>
completely unremarkable.
<</if>>
<</if>>
<<if $args[0].nipples != $args[1].nipples>> /*(if nipples have changed shape)*/
After a few moments, she shifts her chest to get a better look at her nipples, having noticed that they don’t look quite the same as before.
<</if>>
/*(if lactation status has changed)*/
<<if $args[0].lactation > 0 && $args[1].lactation == 0>> /*(lactating now, wasn’t before)*/
As she examines her breasts,
<<if $args[0].lactation == 1>>
solitary drops of milk begin to drop from her tits.
<<else>>
steady streams of milk start to flow from her tits.
<</if>>
<<if $args[0].devotion > 20>>
She is delighted by the fact that her breasts now produce milk. This is a gift she will happily use for your benefit.
<<else>>
She is irritated that you have altered her body to produce milk.
<</if>>
<<elseif $args[0].lactation > 1 && $args[1].lactation == 1>>
She notices her breasts are rapidly producing milk. She groans at the unfamiliar pressure.
<<elseif $args[0].lactation == 1 && $args[1].lactation == 2>>
She notices that her breasts are producing less milk. She seems a little relieved.
<<elseif $args[0].lactation == 0 && $args[1].lactation > 0>>
She notices that her breasts no longer produce milk. She doesn’t show much reaction to this change.
<<elseif $args[0].lactation > 0 && $args[1].lactation > 0>>
The familiar feeling of fullness in her breasts tells her she's producing as much milk as ever.
<</if>
<br><br>
<<if $args[1].voice == 0>>
After a moment, she turns to you and gestures for a mirror.
<<if $args[0].voice != 0>>
You gesture as if you couldn't hear her, to which she squeeks in response. It immediately @@.hotpink;dawns on her@@ what this means. She @@.mediumaquamarine;thanks you profusely@@ before asking for a mirror.
<<set $args[0].devotion += 5, $args[0].trust += 10>>
<</if>>
<<else>>
After a moment, she turns to speak to you,
<<if $args[0].voice == 0>>
but can’t. She tries again, frowning. She struggles to make any sound at all as tears well in her eyes, but no sobs can be heard as her shoulder stubs begin to @@.gold;shake.@@ After a bit, wiggles @@.mediumorchid;somberly@@ for a mirror.
<<set $args[0].devotion -= 5, $args[0].trust -= 5>>
<<elseif $args[0].voice != $args[1].voice>>
and starts at her new
<<if $args[0].voice > $args[1].voice>>
higher pitched
<<elseif $args[0].voice < $args[1].voice>>
lower pitched
<<else>>
voice,
<</if>>
but then murmurs “...mirror”.
<</if>>
<</if>>
<</if>>
<br><br>
You depress a button and a long, body length mirror slides up from the floor near the wall. Your slave
<<if $args[0].amp == 1>>
With the help of an assistant, slave sits up against the side of the gurney and sees her entire new body for the first time.
<<else>>
Gingerly hops to her feet
<<if $args[0].heels == 1 || !canWalk($args[0])>>
<<if $args[0].heels == 1>>
and immediately stumbles, catching herself before her cut heels let her fall to the floor.
<<elseif !canWalk($args[0])>>
and immediately collapses under her own weight.
<</if>>
She looks at you
<<if $args[0].devotion >= -20>>
@@.hotpink;submissively@@
<<set $args[0].devotion += 5>>
<<else>>
@@.mediumorchid;angrily@@
<<set $args[0].devotion -= 5>>
<</if>>
as she pulls her weight back onto the bed and tries again, this time using the gurney to support herself. She
<<else>>
and
<</if>>
/*(height changes)*/
<<if $args[0].height >= $args[1].height+10>>
wobbles for a moment as she adjusts to her new height.
<<if $args[0].devotion > 20>>
She is @@.hotpink;truly pleased@@ that you have taken the effort to give her extra height, knowing that a lot of everyday things in life will be easier, and that she will be viewed as having more stature now, both metaphorically and literally.
<<set $args[0].devotion += 2>>
<<else>>
She frowns for a moment, before shrugging and accepting this small gift, even knowing that it is likely not for her sake that you have done this. Her mouth curls into a @@.hotpink;small grin@@ for just a moment.
<<set $args[0].devotion += 1>>
<</if>>
<<elseif $args[0].height <= $args[1].height-10>>
starts at a falling sensation before realizing she is just shorter than she was before.
<<if $args[0].devotion > 20>>
As frustrating as it will be, she tries to look at the bright side of this and thinks of all the fun things she will be able to do easier now, like being picked up and set on a counter or pinned against a wall. She drools a little, before she shakes her head and continues on.
<<else>>
This is aggravating more than anything to her. Everything will just be just that much more difficult now. She @@.mediumorchid;glowers at you.@@
<<set $args[0].devotion -= 2>>
<</if>>
<<else>>
quickly gets used to her new body's similar stature.
<</if>>
<</if>>
<<if $args[0].bald == 1 && $args[1].bald == 0>> /*(+baldness)*/
The first thing she sees in the mirror is that she is now bald. This
<<if $args[0].devotion > 20>>
feels fun and interesting, and she gently rubs her new smooth scalp.
<<else>>
feels like a gross imposition and she @@.mediumorchid;scowls at you accusingly,@@ for this is one less thing that marks her as a person that you have taken from her.
<<set $args[0].devotion -= 3>>
<</if>>
<<elseif $args[0].bald == 0 && $args[1].bald == 1>> /*(-baldness)*/
The first thing she sees in the mirror is that she now has hair. This
<<if $args[0].devotion >= -20>>
makes her @@.hotpink;squeal with delight.@@ She plays with her new hair, enjoying how it feels between her fingers.
<<set $args[0].devotion += 3>>
<<else>>
surprises her. She is not happy with your doing something like this while she had no control of it, but under the circumstances there are far worse things to have then hair.
<</if>>
<<elseif $args[0].bald == 0 && $args[1].bald == 0>>
The first thing she sees in the mirror is that she is still bald.
<<else>>
The first thing she sees in the mirror is that
<<if $args[0].hColor != $args[1].hColor>>
she now has $args[0].hColor hair.
<<else>>
her head isn't too different.
<</if>>
<</if>>
<<if $args[0].race != $args[1].race>> /*(race changes)*/
The next thing she notices is that her body is not of the same race as it was before. Her new $args[0].race body
<<if $args[0].devotion > 50>>
intrigues and delights her. She is happy that you invested in her appearance in such an interesting way.
<<elseif $args[0].devotion > 20>>
@@.mediumorchid;disturbs her.@@ She is @@.gold;shaken@@ by such a drastic change.
<<set $args[0].devotion -= 10, $args[0].trust -= 10>>
<<else>>
@@.mediumorchid;disgusts and angers her.@@ One of the only parts of her identity she had left has now been stripped from her.
<<set $args[0].devotion -= 20>>
<</if>>
<<else>>
The next thing she notices is that she is still <<print $args[0].race>>.
<<if $args[0].devotion <= 50>>
She's @@.hotpink;relieved@@ that you didn't take such a deep part of her identity from her.
<<set $args[0].devotion += 1>>
<</if>>
<</if>>
/*(age)*/
<<if $args[0].visualAge >= $args[1].visualAge+5>> /*(older)*/
She starts as she sees that she is now older than she once was. This is disturbing to her on a fundamental level,
<<if $args[0].devotion > 50>>
as that means she will now will have less time with you before the end of of her
<<if $PhysicalRetirementAgePolicy == 1>>
service and
<</if>>
life. She does her best to shrug this off and tries to think of all the fun things a lewd older body can do.
<<else>>
as that means she will be @@unable to spend as much time on this earth.@@
<<set $args[0].devotion -= ($args[1].visualAge-$args[0].visualAge*5)>>
<<if $PhysicalRetirementAgePolicy == 1>>
On the other hand, it means she won’t have as much time to spend with you before she is retired.
<<else>>
This is compounded with the fact that she @@.gold;may well die before she becomes a freed slave.@@
<<set $args[0].trust -= ($args[1].visualAge-$args[0].visualAge*5)>>
<</if>>
<</if>>
<<elseif $args[0].physicalAge <= $args[1].physicalAge-5 || ($args[0].physicalAge < 18 && $args[0].physicalAge < $args[1].physicalAge)>> /*(younger)*/
She starts at her youthful new face and body.
<<if $args[1].physicalAge >= 18>>
<<if $args[0].physicalAge < 4>>
She's thoroughly shocked to find she's a toddler again.
<<elseif $args[0].physicalAge < 9>>
She's surprised to find she's a little girl.
<<elseif $args[0].physicalAge < 13>>
She's surprised to find that she's once more a preteen.
<<elseif $args[0].physicalAge < 16>>
She never expected to be a teenager again.
<<elseif $args[0].physicalAge < 18>>
She never expected to be a young adult again.
<</if>>
<</if>>
<<set _puberty = 0>>
<<if (($args[0].physicalAge < $pubertyAge && ($args[0].ovaries == 1 || $args[0].mpreg == 1)) || ($args[0].physicalAge < $virilityAge && $args[0].balls > 0)) && ($args[1].pubertyXX == 1 || $args[1].pubertyXY == 1)>>
She realizes that she will have to go through puberty again, now that she is $args[0].physicalAge again. This is unnerving to her.
<<set _puberty = 1>>
<</if>>
<<if $args[0].devotion > 20>>
<<if _puberty == 1>>
However, she will do her best to enjoy the highs that come with it, and
<<else>>
This is a @@.hotpink;wonderful gift to her,@@ as she will now be able to
<<set $args[0].devotion += Math.max($args[1].physicalAge-$args[0].physicalAge, 10)>>
<</if>>
<<if $PhysicalRetirementAgePolicy == 1>>
spend more time with you before the end of her service.
<<else>>
service you better, as well as have all the other benefits of youthful age.
<</if>>
<<else>>
<<if _puberty == 1>>
It will be frustrating to go through the rigors of sexual development all over again, especially when combined with the fact that she must also
<<else>>
This is both a @@.hotpink;blessing@@ and a @@.gold;curse,@@ as while she now has a younger and healthier body, she must also
<<set $args[0].devotion += Math.max($args[1].physicalAge-$args[0].physicalAge, 10), $args[0].trust -= 5>>
<</if>>
<<if $PhysicalRetirementAgePolicy == 1>>
spend more time with you before the end of her service.
<<else>>
use all of her the youth for the benefit of her master instead of herself.
<</if>>
<</if>>
<</if>>
/* - this needs to be broken down into piercing types and where they are located on the body. IE. face piercings/tats with the face inspection, though piercings would go with the lip stuff, wouldn't they?
(changes to piercings)
As she inspects the rest of her herself, she sees that you have
(adding piercings when she had none)
added piercings to her body when she had none.
(more piercings)
Added more piercings to her body.
(less piercings)
Given this body less piercings then she had once had.
(changes to tattoos)
She also sees that you have
(added tattoos when she had none)
Given her tattoos when she’d had none before.
(more tattoos)
Given her more tattoos.
(less tattoos)
Given her less tattoos.
(devoted)
It delights her that you have taken such an interest in those little details.
(not devoted)
It bothers her that you have altered even more of her body.
*/
/*stomach*/
<<set _weightChange = 0>> /*used to segway to pregnancy/belly implants after weight*/
Her hands drift over
<<if $args[0].weight >= $args[1].weight+30>> /*(fatter)*/
her stomach and she feels just how much more weight she is carrying.
<<if $args[0].devotion > 20>>
She finds her new curves intriguing.
<<else>>
Her face contorts with @@.mediumorchid;disgust@@ at her newfound bulk.
<<set $args[0].devotion -= 5>>
<</if>>
<<set _weightChange = 1>>
<<if $args[0].bellySag > $args[1].bellySag && $args[0].belly < 100>>
She also notices how much it sags.
<<if $args[0].devotion > 20>>
This isn’t pleasant, but she bears it for you.
<<else>>
This does nothing for her self image, only @@.mediumorchid;disgusts and annoys@@ her.
<<set $args[0].devotion -= 2>>
<</if>>
<<elseif $args[0].bellySag < $args[1].bellySag && $args[0].belly < 100>>
She also notices it is tighter despite being softer.
<<if $args[0].devotion > 20>>
This is great for her self image and she happily strokes her new perkier belly.
<<else>>
Whatever else this transition brings, this is a gift she will appreciate and she @@.hotpink;smiles, just a bit.@@
<<set $args[0].devotion += 1>>
<</if>>
<</if>>
<<elseif $args[0].weight <= $args[1].weight-30>> /*(thinner)*/
her stomach and she finds her body thinner.
<<if $args[0].devotion > 20>>
She finds her new curves intriguing.
<<else>>
While free weight loss is @@appreciated,@@ she wishes she had some say in the matter.
<<set $args[0].devotion += 1>>
<</if>>
<<set _weightChange = 1>>
<<if $args[0].bellySag > $args[1].bellySag && $args[0].belly < 100>>
She also notices how it has a sag to it.
<<if $args[0].devotion > 20>>
This isn’t pleasant, but she bears it for you.
<<else>>
This does nothing for her self image, only @@.mediumorchid;disgusts and annoys@@ her.
<<set $args[0].devotion -= 2>>
<</if>>
<<elseif $args[0].bellySag < $args[1].bellySag && $args[0].belly < 100>>
She also notices it is tighter despite being softer.
<<if $args[0].devotion > 20>>
This is great for her self image and she happily strokes her new perkier belly.
<<else>>
Whatever else this transition brings, this is a gift she will appreciate and she @@.hotpink;smiles, just a bit.@@
<<set $args[0].devotion += 1>>
<</if>>
<</if>>
<<elseif $args[0].bellySag > $args[1].bellySag && $args[0].belly < 100>> /*(belly sag)*/
her stomach and she notices a sag in her belly.
<<if $args[0].devotion > 20>>
This isn’t pleasant, but she bears it for you.
<<else>>
This does nothing for her self image, only @@.mediumorchid;disgusts and annoys@@ her.
<<set $args[0].devotion -= 2>>
<</if>>
<<elseif $args[0].bellySag < $args[1].bellySag && $args[0].belly < 100>> /*(subtracted)*/
her stomach and notices the sag in her belly has lessened.
<<if $args[0].devotion > 20>>
This is great for her self image and she happily strokes her new tight belly.
<<else>>
Whatever else this transition brings, this is a gift she will appreciate and she @@.hotpink;smiles, just a bit.@@
<<set $args[0].devotion += 1>>
<</if>>
<<elseif $args[0].weight < 10 && $args[0].muscles > 5 && $args[0].belly < 100>>
her muscled stomach. She stops to trace her abs.
<<if $args[0].devotion > 20>>
She finds her new strength intriguing.
<<else>>
She finds her new strength @@.mediumaquamarine;empowering.@@
<<set $args[0].trust += 2>>
<</if>>
<<set _weightChange = 1>>
<</if>>
/*(pregnancy/belly changes)*/
/* will be expanded - going to skip for now and do all at once */
/*
(unnoticeable pregnancy)
(first pregnancy)
She doesn’t notice her pregnancy since this is her first one.
(not first pregnancy)
Since this is not her first pregnancy, she is able to read the monitors and understand that she is now pregnant.
(noticeable pregnancy)
And she feels a bump in her stomach, as well as a gentle kick.
(devoted)
Even though she didn’t get to experience being made into one, she is delighted to be a mother (“again” if it’s not the first time).
(not devoted)
She is filled with conflicting emotions, hatred for you for forcing this life onto her, and the instinct of a mother’s love for her unborn child.
(belly implant filled)
And she feels a bump in her stomach.
(devoted)
She likes how the bulge looks on her.
(not devoted)
It bothers her that you would add such a minor inconvenience to her body.
*/
As her hands drift lower,
/*(changed genitals)*/
<<if $args[1].vagina > -1>> /*(had a vagina)*/
<<if $args[0].dick > 0 && $args[1].dick > 0>> /*(had a penis)*/
she is relieved to find
<<if $args[0].balls > 0 && $args[0].scrotum > 0 && $args[1].balls > 0 && $args[1].scrotum > 0>>
a cock, balls and pussy.
<<elseif $args[0].balls == 0 && $args[1].balls > 0 && $args[1].scrotum > 0>>
both a cock and pussy, though she is a little miffed that she now lacks testicles.
<<elseif $args[0].balls > 0 && $args[0].scrotum > 0 && $args[1].balls == 0>>
both a cock, pussy and, more surprisingly, balls.
<<else>>
both a cock and pussy.
<</if>>
<<if $args[0].dick > 0 && $args[1].dick == 0>> /*(+penis)*/
she is startled to find she has a penis now.
<<if $args[0].vagina > -1>> /*(kept vagina)*/
She is confused for a moment until she lifts her new penis to see a vagina under it.
<<else>> /*(did not keep vagina, +penis or not)*/
She understands that she no longer has a vagina.
<</if>>
<<elseif $args[0].dick == 0 && $args[1].dick > 0>> /*(had a penis)*/
she is shocked to see that she no longer has a
<<if $args[0].balls > 0 && $args[0].scrotum > 0>>
penis, mostly because she still has balls.
<<elseif $args[0].vagina > -1>>
penis, though she is glad to still have a pussy.
<<else>>
penis, or anything, for that matter, on her crotch.
<</if>>
<<elseif $args[0].vagina > -1>>
she is happy to find a familiar hole.
<<else>>
she is startled to find she no longer has genitals.
<</if>>
<<elseif $args[1].dick > 0>> /*(had a penis)*/
<<if $args[0].dick > 0>>
she is relieved to find she still has her
<<if $args[0].balls > 0 && $args[0].scrotum > 0 && $args[1].balls > 0 && $args[1].scrotum > 0>>
penis and testicles.
<<elseif $args[0].balls == 0 && $args[1].balls > 0 && $args[1].scrotum > 0>>
penis, but is a little alarmed to find she now lacks testicles.
<<elseif $args[0].balls > 0 && $args[0].scrotum > 0 && $args[1].balls == 0>>
penis, but is more interested in the dangling pair of objects beneath it.
<<else>>
penis.
<</if>>
<<if $args[0].vagina > -1>>
A new sensation causes her to roam lower. Much to her surprise, she now also has a pussy.
<</if>>
<<else>>
she is shocked to find that she no longer has a
<<if $args[0].balls > 0 && $args[0].scrotum > 0 && $args[1].balls > 0 && $args[1].scrotum > 0>>
penis, but still has balls.
<<elseif $args[0].vagina > -1>>
penis, but a vagina.
<<else>>
penis, or anything, for genitals.
<</if>>
<</if>>
<<else>>
she is surprised to find
<<if $args[0].dick > 0 && $args[0].vagina > -1 && $args[0].balls > 0 && $args[0].scrotum > 0>>
her crotch is fully loaded.
<<elseif $args[0].dick > 0 && $args[0].vagina > -1>>
she has both a dick and vagina.
<<elseif $args[0].dick > 0>>
she now has a cock<<if $args[0].balls > 0 && $args[0].scrotum > 0>> and balls<</if>> to play with.
<<elseif $args[0].vagina > -1>>
she now has a pussy to play with.
<<else>>
she is still a null. She expected something more.
<</if>>
<</if>>
<<set _cockChanged = 0>>
/*(penis changes)*/
<<if $args[0].dick != $args[1].dick && $args[1].dick != 0>>
Her penis is a good deal <<if $args[0].dick > $args[1].dick>>larger<<else>>smaller<</if>> than it was, and she is
<<if $args[0].devotion > 20>>
pleased with this development. She takes the time to
<<if $args[0].dick > $args[1].dick>>
grope and tease her newfound length.
<<else>>
toy with her now shorter dick.
<</if>>
<<else>>
annoyed at this development. She frowns as she
<<if $args[0].dick > $args[1].dick>>
tests her newfound growth, only groping it for a moment before noticing your amused grin and stopping.
<<else>>
pokes and prods at her smaller dick, only stopping when she starts to become flushed and notices your questioning gaze.
<</if>>
<</if>>
<<set _cockChanged = 1>>
<</if>>
/*(ball changes)*/
<<if $args[0].balls != $args[1].balls && $args[1].balls != 0>>
Then she takes a moment to cup her balls, it seems they are
<<if $args[0].balls > $args[1].balls>>
larger now. This
<<if $args[0].devotion > 20>>
change delights her and she spends ample time jostling and toying with her bigger nuts.
<<else>>
change is just one more bother for her. Her brow furrows as she takes a moment to feel them up and stops as <<if $args[0].dick>>her cock starts to stiffen<<else>>as a bead of precum starts to form from her urethra<</if>>.
<</if>>
<<else>>
Smaller now, and this
<<if $args[0].devotion > 20>>
change, while not necessarily fun, is appreciated by your devoted slave nonetheless.
<<else>>
change causes her consternation and humiliation.
<</if>>
<</if>>
<<set _cockChanged = 1>>
<</if>>
<<if _cockChanged == 1>>
<<if $args[0].devotion > 20>>
She is thrilled at your modifications to her genitals and is excited to explore those changes with you.
<<else>>
She is @@.mediumorchid;enraged@@ and @@.gold;frightened@@ to see such changes to her genitals, as they were fundamental parts of her identity.
<<set $args[0].devotion -= 10, $args[0].trust -= 10>>
<</if>>
<</if>>
/*(vagina)*/
<<if $args[0].vagina != -1>>
<<if $args[0].dick > 0>>
Then she moves her dick<<if $args[0].scrotum > 0>> and balls<</if>> aside to inspect her vagina more closely.
<<else>>
Next she gives her vagina a closer inspection.
<</if>>
<<if $args[0].vagina == 0>> /*(+virginity)*/
As she prods at her vagina, she feels a slight tightness and a bit of difficulty as she tries to press her finger inside of herself. She realizes this body is a virgin!
<<if $args[0].vagina > 0>>
<<if $args[0].devotion > 20>>
She is happy to be a virgin again so that she can lose it to you.
<<else>>
She is @@.hotpink;happy@@ to be a virgin again, but @@.gold;worries@@ about how long it will last.
<<set $args[0].devotion += 3, $args[0].trust -= 3>>
<</if>>
<</if>>
<<elseif $args[1].vagina != -1 && $args[0].vagina < $args[1].vagina>> /*(+tightness)*/
She notices she is tighter now than she was before.
<<if $args[0].devotion > 20>>
Sex will be more pleasurable than it was before and she looks forward to breaking in her new pussy with you.
<<else>>
She groans in @@.mediumorchid;frustration.@@ She is well aware of the displeasure of having a pussy forcibly broken in and does not look forward to it again.
<<set $args[0].devotion -= 2>>
<</if>>
<<elseif $args[1].vagina != -1 && $args[0].vagina > $args[1].vagina>> /*(-tightness)*/
She notices how she is now looser than she was before.
<<if $args[0].devotion > 20>>
She giggles a bit as she tests out how many fingers she can fit inside her new loose hole, though she wishes she were still tight for you.
<<else>>
She @@.mediumorchid;frowns@@ as she feels out how much looser she is now. She supposes it saves her from getting fucked loose, but it is humiliating how many more fingers she can fit inside herself.
<<set $args[0].devotion -= 1>>
<</if>>
<<elseif $args[0].vagina == $args[1].vagina>>
It's much like her old vagina.
<<else>>
After a bit of toying, she's satisfied with her new organ.
<</if>>
<</if>>
/*(butt)*/
The last thing she learns is how
<<if $args[0].butt > $args[1].butt>> /*(bigger)*/
much bigger her butt is now. As she turns around she sees it has grown
<<if $args[0].butt >= $args[1].butt+5>> /*(+to max size description or above)*/
an incredible amount.
<<elseif $args[0].butt > $args[1].butt+1>> /*(+more sizes)*/
a lot.
<<else>> /*(+1 size)*/
a fair bit.
<</if>>
<<if $args[0].devotion > 20>>
This is a pleasing development as she looks forward to putting this new butt to the test with you.
<<else>>
While she’s not terribly upset, this still feels like a violation of her, somehow. Still, there are worse things that could happen then waking up with a bigger butt.
<</if>>
<<if $args[0].butt >= $args[1].butt+5 && $args[0].butt > 12>>
She is overwhelmed by how large her new butt is. She can barely stand under its weight.
<</if>>
<<elseif $args[0].butt < $args[1].butt>> /*(smaller)*/
much smaller her butt is now. As she turns around, she sees it has shrunk
<<if $args[0].butt <= $args[1].butt-5>> /*(+to max size description or above)*/
an incredible amount.
<<elseif $args[0].butt > $args[1].butt-1>> /*(+more sizes)*/
a lot.
<<else>> /*(-1 size)*/
a fair bit.
<</if>>
<<if $args[0].devotion > 20>>
She is saddened that there is now less of her for you to play with, but remembers that you chose this body for her and hopes that you will still make use of her butt.
<<else>>
This is just depressing to her. A butt is one of the two parts of her body that almost every women (or “women”) is defined by, and now she feels like just that much less of a person.
<</if>>
<<else>>
little her butt has changed in size.
<</if>>
<<if $args[0].buttImplant > 0 && $args[1].buttImplant == 0>> /*(+butt implants)*/
She also notes that there are implants in her, as her prodding reveals a certain stiffness in her ass’s shape.
<<if $args[0].devotion > 20>>
It pleases her that you would invest in such a minor way in her body.
<<else>>
It feels like you have modified her in a such a minor way for your own benefit, and she doesn’t kid herself in thinking otherwise.
<</if>>
<<elseif $args[0].buttImplant == 0 && $args[1].buttImplant > 0>> /*(-butt implants)*/
She also notes that she no longer has butt implants, as her experimentation reveals a more natural bounce to her buttocks.
<<if $args[0].devotion > 20>>
She is happy that you think her body doesn’t need any artificial modification to be pleasing.
<<else>>
She views this as one less thing she didn’t have a choice in.
<</if>>
<</if>>
/*(Flavor text for slave description after body transfer)*/
She has been given a new body while in your service.
<</widget>>
Checklist
Age (done)
Physical health (done)
Height (done)
Weight (done)
Musculature (done)
Race (done)
Skin color (done)
Number of piercings/tattoos (done)
Amputation (done)
Heel modifications (done)
Voice (and if they can/can't talk) (done)
Boob size/shape/implants (done)
Butt size/implants
Nipples, odd areola (done)
Lactation (done)
Drastic lip size differences (done)
Vagina (lack, virginity, looseness) (done)
Dicks and balls (external only) (done)
Pregnancy/belly implant (done)
Belly sag (done)
Being in a body going through, or not yet having reached, puberty (done)
Baldness
|
AshVaris/fc
|
devNotes/Bodyswap text.txt
|
Text
|
mit
| 68,768 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.