Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/LICENSE +8 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts +3 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js +226 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs +223 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.mts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts +10 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js +39 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs +35 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts +17 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts +17 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.js +113 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs +108 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.d.mts +20 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.js +4 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.d.mts +7 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts +3 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts +3 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs +33 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts +4 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts +4 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js +31 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs +26 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts +9 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts +9 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js +22 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map +1 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs +18 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts +37 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts +37 -0
- platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map +1 -0
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright 2023 Anthropic, PBC.
|
| 2 |
+
|
| 3 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
| 4 |
+
|
| 5 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 6 |
+
|
| 7 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 8 |
+
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"parser.d.mts","sourceRoot":"","sources":["../../src/_vendor/partial-json-parser/parser.ts"],"names":[],"mappings":"AAKA,QAAA,MAgQE,YAAY,GAAI,OAAO,MAAM,KAAG,OAAgE,CAAC;AAEnG,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
declare const partialParse: (input: string) => unknown;
|
| 2 |
+
export { partialParse };
|
| 3 |
+
//# sourceMappingURL=parser.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.partialParse = void 0;
|
| 4 |
+
const tokenize = (input) => {
|
| 5 |
+
let current = 0;
|
| 6 |
+
let tokens = [];
|
| 7 |
+
while (current < input.length) {
|
| 8 |
+
let char = input[current];
|
| 9 |
+
if (char === '\\') {
|
| 10 |
+
current++;
|
| 11 |
+
continue;
|
| 12 |
+
}
|
| 13 |
+
if (char === '{') {
|
| 14 |
+
tokens.push({
|
| 15 |
+
type: 'brace',
|
| 16 |
+
value: '{',
|
| 17 |
+
});
|
| 18 |
+
current++;
|
| 19 |
+
continue;
|
| 20 |
+
}
|
| 21 |
+
if (char === '}') {
|
| 22 |
+
tokens.push({
|
| 23 |
+
type: 'brace',
|
| 24 |
+
value: '}',
|
| 25 |
+
});
|
| 26 |
+
current++;
|
| 27 |
+
continue;
|
| 28 |
+
}
|
| 29 |
+
if (char === '[') {
|
| 30 |
+
tokens.push({
|
| 31 |
+
type: 'paren',
|
| 32 |
+
value: '[',
|
| 33 |
+
});
|
| 34 |
+
current++;
|
| 35 |
+
continue;
|
| 36 |
+
}
|
| 37 |
+
if (char === ']') {
|
| 38 |
+
tokens.push({
|
| 39 |
+
type: 'paren',
|
| 40 |
+
value: ']',
|
| 41 |
+
});
|
| 42 |
+
current++;
|
| 43 |
+
continue;
|
| 44 |
+
}
|
| 45 |
+
if (char === ':') {
|
| 46 |
+
tokens.push({
|
| 47 |
+
type: 'separator',
|
| 48 |
+
value: ':',
|
| 49 |
+
});
|
| 50 |
+
current++;
|
| 51 |
+
continue;
|
| 52 |
+
}
|
| 53 |
+
if (char === ',') {
|
| 54 |
+
tokens.push({
|
| 55 |
+
type: 'delimiter',
|
| 56 |
+
value: ',',
|
| 57 |
+
});
|
| 58 |
+
current++;
|
| 59 |
+
continue;
|
| 60 |
+
}
|
| 61 |
+
if (char === '"') {
|
| 62 |
+
let value = '';
|
| 63 |
+
let danglingQuote = false;
|
| 64 |
+
char = input[++current];
|
| 65 |
+
while (char !== '"') {
|
| 66 |
+
if (current === input.length) {
|
| 67 |
+
danglingQuote = true;
|
| 68 |
+
break;
|
| 69 |
+
}
|
| 70 |
+
if (char === '\\') {
|
| 71 |
+
current++;
|
| 72 |
+
if (current === input.length) {
|
| 73 |
+
danglingQuote = true;
|
| 74 |
+
break;
|
| 75 |
+
}
|
| 76 |
+
value += char + input[current];
|
| 77 |
+
char = input[++current];
|
| 78 |
+
}
|
| 79 |
+
else {
|
| 80 |
+
value += char;
|
| 81 |
+
char = input[++current];
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
char = input[++current];
|
| 85 |
+
if (!danglingQuote) {
|
| 86 |
+
tokens.push({
|
| 87 |
+
type: 'string',
|
| 88 |
+
value,
|
| 89 |
+
});
|
| 90 |
+
}
|
| 91 |
+
continue;
|
| 92 |
+
}
|
| 93 |
+
let WHITESPACE = /\s/;
|
| 94 |
+
if (char && WHITESPACE.test(char)) {
|
| 95 |
+
current++;
|
| 96 |
+
continue;
|
| 97 |
+
}
|
| 98 |
+
let NUMBERS = /[0-9]/;
|
| 99 |
+
if ((char && NUMBERS.test(char)) || char === '-' || char === '.') {
|
| 100 |
+
let value = '';
|
| 101 |
+
if (char === '-') {
|
| 102 |
+
value += char;
|
| 103 |
+
char = input[++current];
|
| 104 |
+
}
|
| 105 |
+
while ((char && NUMBERS.test(char)) || char === '.') {
|
| 106 |
+
value += char;
|
| 107 |
+
char = input[++current];
|
| 108 |
+
}
|
| 109 |
+
tokens.push({
|
| 110 |
+
type: 'number',
|
| 111 |
+
value,
|
| 112 |
+
});
|
| 113 |
+
continue;
|
| 114 |
+
}
|
| 115 |
+
let LETTERS = /[a-z]/i;
|
| 116 |
+
if (char && LETTERS.test(char)) {
|
| 117 |
+
let value = '';
|
| 118 |
+
while (char && LETTERS.test(char)) {
|
| 119 |
+
if (current === input.length) {
|
| 120 |
+
break;
|
| 121 |
+
}
|
| 122 |
+
value += char;
|
| 123 |
+
char = input[++current];
|
| 124 |
+
}
|
| 125 |
+
if (value == 'true' || value == 'false' || value === 'null') {
|
| 126 |
+
tokens.push({
|
| 127 |
+
type: 'name',
|
| 128 |
+
value,
|
| 129 |
+
});
|
| 130 |
+
}
|
| 131 |
+
else {
|
| 132 |
+
// unknown token, e.g. `nul` which isn't quite `null`
|
| 133 |
+
current++;
|
| 134 |
+
continue;
|
| 135 |
+
}
|
| 136 |
+
continue;
|
| 137 |
+
}
|
| 138 |
+
current++;
|
| 139 |
+
}
|
| 140 |
+
return tokens;
|
| 141 |
+
}, strip = (tokens) => {
|
| 142 |
+
if (tokens.length === 0) {
|
| 143 |
+
return tokens;
|
| 144 |
+
}
|
| 145 |
+
let lastToken = tokens[tokens.length - 1];
|
| 146 |
+
switch (lastToken.type) {
|
| 147 |
+
case 'separator':
|
| 148 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 149 |
+
return strip(tokens);
|
| 150 |
+
break;
|
| 151 |
+
case 'number':
|
| 152 |
+
let lastCharacterOfLastToken = lastToken.value[lastToken.value.length - 1];
|
| 153 |
+
if (lastCharacterOfLastToken === '.' || lastCharacterOfLastToken === '-') {
|
| 154 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 155 |
+
return strip(tokens);
|
| 156 |
+
}
|
| 157 |
+
case 'string':
|
| 158 |
+
let tokenBeforeTheLastToken = tokens[tokens.length - 2];
|
| 159 |
+
if (tokenBeforeTheLastToken?.type === 'delimiter') {
|
| 160 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 161 |
+
return strip(tokens);
|
| 162 |
+
}
|
| 163 |
+
else if (tokenBeforeTheLastToken?.type === 'brace' && tokenBeforeTheLastToken.value === '{') {
|
| 164 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 165 |
+
return strip(tokens);
|
| 166 |
+
}
|
| 167 |
+
break;
|
| 168 |
+
case 'delimiter':
|
| 169 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 170 |
+
return strip(tokens);
|
| 171 |
+
break;
|
| 172 |
+
}
|
| 173 |
+
return tokens;
|
| 174 |
+
}, unstrip = (tokens) => {
|
| 175 |
+
let tail = [];
|
| 176 |
+
tokens.map((token) => {
|
| 177 |
+
if (token.type === 'brace') {
|
| 178 |
+
if (token.value === '{') {
|
| 179 |
+
tail.push('}');
|
| 180 |
+
}
|
| 181 |
+
else {
|
| 182 |
+
tail.splice(tail.lastIndexOf('}'), 1);
|
| 183 |
+
}
|
| 184 |
+
}
|
| 185 |
+
if (token.type === 'paren') {
|
| 186 |
+
if (token.value === '[') {
|
| 187 |
+
tail.push(']');
|
| 188 |
+
}
|
| 189 |
+
else {
|
| 190 |
+
tail.splice(tail.lastIndexOf(']'), 1);
|
| 191 |
+
}
|
| 192 |
+
}
|
| 193 |
+
});
|
| 194 |
+
if (tail.length > 0) {
|
| 195 |
+
tail.reverse().map((item) => {
|
| 196 |
+
if (item === '}') {
|
| 197 |
+
tokens.push({
|
| 198 |
+
type: 'brace',
|
| 199 |
+
value: '}',
|
| 200 |
+
});
|
| 201 |
+
}
|
| 202 |
+
else if (item === ']') {
|
| 203 |
+
tokens.push({
|
| 204 |
+
type: 'paren',
|
| 205 |
+
value: ']',
|
| 206 |
+
});
|
| 207 |
+
}
|
| 208 |
+
});
|
| 209 |
+
}
|
| 210 |
+
return tokens;
|
| 211 |
+
}, generate = (tokens) => {
|
| 212 |
+
let output = '';
|
| 213 |
+
tokens.map((token) => {
|
| 214 |
+
switch (token.type) {
|
| 215 |
+
case 'string':
|
| 216 |
+
output += '"' + token.value + '"';
|
| 217 |
+
break;
|
| 218 |
+
default:
|
| 219 |
+
output += token.value;
|
| 220 |
+
break;
|
| 221 |
+
}
|
| 222 |
+
});
|
| 223 |
+
return output;
|
| 224 |
+
}, partialParse = (input) => JSON.parse(generate(unstrip(strip(tokenize(input)))));
|
| 225 |
+
exports.partialParse = partialParse;
|
| 226 |
+
//# sourceMappingURL=parser.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/_vendor/partial-json-parser/parser.ts"],"names":[],"mappings":";;;AAKA,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAW,EAAE;IACxC,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,MAAM,GAAY,EAAE,CAAC;IAEzB,OAAO,OAAO,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC9B,IAAI,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QAE1B,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC;gBACV,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,GAAG;aACX,CAAC,CAAC;YAEH,OAAO,EAAE,CAAC;YACV,SAAS;QACX,CAAC;QAED,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,CAAC,IA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char === '\\') {
|
| 7 |
+
current++;
|
| 8 |
+
continue;
|
| 9 |
+
}
|
| 10 |
+
if (char === '{') {
|
| 11 |
+
tokens.push({
|
| 12 |
+
type: 'brace',
|
| 13 |
+
value: '{',
|
| 14 |
+
});
|
| 15 |
+
current++;
|
| 16 |
+
continue;
|
| 17 |
+
}
|
| 18 |
+
if (char === '}') {
|
| 19 |
+
tokens.push({
|
| 20 |
+
type: 'brace',
|
| 21 |
+
value: '}',
|
| 22 |
+
});
|
| 23 |
+
current++;
|
| 24 |
+
continue;
|
| 25 |
+
}
|
| 26 |
+
if (char === '[') {
|
| 27 |
+
tokens.push({
|
| 28 |
+
type: 'paren',
|
| 29 |
+
value: '[',
|
| 30 |
+
});
|
| 31 |
+
current++;
|
| 32 |
+
continue;
|
| 33 |
+
}
|
| 34 |
+
if (char === ']') {
|
| 35 |
+
tokens.push({
|
| 36 |
+
type: 'paren',
|
| 37 |
+
value: ']',
|
| 38 |
+
});
|
| 39 |
+
current++;
|
| 40 |
+
continue;
|
| 41 |
+
}
|
| 42 |
+
if (char === ':') {
|
| 43 |
+
tokens.push({
|
| 44 |
+
type: 'separator',
|
| 45 |
+
value: ':',
|
| 46 |
+
});
|
| 47 |
+
current++;
|
| 48 |
+
continue;
|
| 49 |
+
}
|
| 50 |
+
if (char === ',') {
|
| 51 |
+
tokens.push({
|
| 52 |
+
type: 'delimiter',
|
| 53 |
+
value: ',',
|
| 54 |
+
});
|
| 55 |
+
current++;
|
| 56 |
+
continue;
|
| 57 |
+
}
|
| 58 |
+
if (char === '"') {
|
| 59 |
+
let value = '';
|
| 60 |
+
let danglingQuote = false;
|
| 61 |
+
char = input[++current];
|
| 62 |
+
while (char !== '"') {
|
| 63 |
+
if (current === input.length) {
|
| 64 |
+
danglingQuote = true;
|
| 65 |
+
break;
|
| 66 |
+
}
|
| 67 |
+
if (char === '\\') {
|
| 68 |
+
current++;
|
| 69 |
+
if (current === input.length) {
|
| 70 |
+
danglingQuote = true;
|
| 71 |
+
break;
|
| 72 |
+
}
|
| 73 |
+
value += char + input[current];
|
| 74 |
+
char = input[++current];
|
| 75 |
+
}
|
| 76 |
+
else {
|
| 77 |
+
value += char;
|
| 78 |
+
char = input[++current];
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
char = input[++current];
|
| 82 |
+
if (!danglingQuote) {
|
| 83 |
+
tokens.push({
|
| 84 |
+
type: 'string',
|
| 85 |
+
value,
|
| 86 |
+
});
|
| 87 |
+
}
|
| 88 |
+
continue;
|
| 89 |
+
}
|
| 90 |
+
let WHITESPACE = /\s/;
|
| 91 |
+
if (char && WHITESPACE.test(char)) {
|
| 92 |
+
current++;
|
| 93 |
+
continue;
|
| 94 |
+
}
|
| 95 |
+
let NUMBERS = /[0-9]/;
|
| 96 |
+
if ((char && NUMBERS.test(char)) || char === '-' || char === '.') {
|
| 97 |
+
let value = '';
|
| 98 |
+
if (char === '-') {
|
| 99 |
+
value += char;
|
| 100 |
+
char = input[++current];
|
| 101 |
+
}
|
| 102 |
+
while ((char && NUMBERS.test(char)) || char === '.') {
|
| 103 |
+
value += char;
|
| 104 |
+
char = input[++current];
|
| 105 |
+
}
|
| 106 |
+
tokens.push({
|
| 107 |
+
type: 'number',
|
| 108 |
+
value,
|
| 109 |
+
});
|
| 110 |
+
continue;
|
| 111 |
+
}
|
| 112 |
+
let LETTERS = /[a-z]/i;
|
| 113 |
+
if (char && LETTERS.test(char)) {
|
| 114 |
+
let value = '';
|
| 115 |
+
while (char && LETTERS.test(char)) {
|
| 116 |
+
if (current === input.length) {
|
| 117 |
+
break;
|
| 118 |
+
}
|
| 119 |
+
value += char;
|
| 120 |
+
char = input[++current];
|
| 121 |
+
}
|
| 122 |
+
if (value == 'true' || value == 'false' || value === 'null') {
|
| 123 |
+
tokens.push({
|
| 124 |
+
type: 'name',
|
| 125 |
+
value,
|
| 126 |
+
});
|
| 127 |
+
}
|
| 128 |
+
else {
|
| 129 |
+
// unknown token, e.g. `nul` which isn't quite `null`
|
| 130 |
+
current++;
|
| 131 |
+
continue;
|
| 132 |
+
}
|
| 133 |
+
continue;
|
| 134 |
+
}
|
| 135 |
+
current++;
|
| 136 |
+
}
|
| 137 |
+
return tokens;
|
| 138 |
+
}, strip = (tokens) => {
|
| 139 |
+
if (tokens.length === 0) {
|
| 140 |
+
return tokens;
|
| 141 |
+
}
|
| 142 |
+
let lastToken = tokens[tokens.length - 1];
|
| 143 |
+
switch (lastToken.type) {
|
| 144 |
+
case 'separator':
|
| 145 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 146 |
+
return strip(tokens);
|
| 147 |
+
break;
|
| 148 |
+
case 'number':
|
| 149 |
+
let lastCharacterOfLastToken = lastToken.value[lastToken.value.length - 1];
|
| 150 |
+
if (lastCharacterOfLastToken === '.' || lastCharacterOfLastToken === '-') {
|
| 151 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 152 |
+
return strip(tokens);
|
| 153 |
+
}
|
| 154 |
+
case 'string':
|
| 155 |
+
let tokenBeforeTheLastToken = tokens[tokens.length - 2];
|
| 156 |
+
if (tokenBeforeTheLastToken?.type === 'delimiter') {
|
| 157 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 158 |
+
return strip(tokens);
|
| 159 |
+
}
|
| 160 |
+
else if (tokenBeforeTheLastToken?.type === 'brace' && tokenBeforeTheLastToken.value === '{') {
|
| 161 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 162 |
+
return strip(tokens);
|
| 163 |
+
}
|
| 164 |
+
break;
|
| 165 |
+
case 'delimiter':
|
| 166 |
+
tokens = tokens.slice(0, tokens.length - 1);
|
| 167 |
+
return strip(tokens);
|
| 168 |
+
break;
|
| 169 |
+
}
|
| 170 |
+
return tokens;
|
| 171 |
+
}, unstrip = (tokens) => {
|
| 172 |
+
let tail = [];
|
| 173 |
+
tokens.map((token) => {
|
| 174 |
+
if (token.type === 'brace') {
|
| 175 |
+
if (token.value === '{') {
|
| 176 |
+
tail.push('}');
|
| 177 |
+
}
|
| 178 |
+
else {
|
| 179 |
+
tail.splice(tail.lastIndexOf('}'), 1);
|
| 180 |
+
}
|
| 181 |
+
}
|
| 182 |
+
if (token.type === 'paren') {
|
| 183 |
+
if (token.value === '[') {
|
| 184 |
+
tail.push(']');
|
| 185 |
+
}
|
| 186 |
+
else {
|
| 187 |
+
tail.splice(tail.lastIndexOf(']'), 1);
|
| 188 |
+
}
|
| 189 |
+
}
|
| 190 |
+
});
|
| 191 |
+
if (tail.length > 0) {
|
| 192 |
+
tail.reverse().map((item) => {
|
| 193 |
+
if (item === '}') {
|
| 194 |
+
tokens.push({
|
| 195 |
+
type: 'brace',
|
| 196 |
+
value: '}',
|
| 197 |
+
});
|
| 198 |
+
}
|
| 199 |
+
else if (item === ']') {
|
| 200 |
+
tokens.push({
|
| 201 |
+
type: 'paren',
|
| 202 |
+
value: ']',
|
| 203 |
+
});
|
| 204 |
+
}
|
| 205 |
+
});
|
| 206 |
+
}
|
| 207 |
+
return tokens;
|
| 208 |
+
}, generate = (tokens) => {
|
| 209 |
+
let output = '';
|
| 210 |
+
tokens.map((token) => {
|
| 211 |
+
switch (token.type) {
|
| 212 |
+
case 'string':
|
| 213 |
+
output += '"' + token.value + '"';
|
| 214 |
+
break;
|
| 215 |
+
default:
|
| 216 |
+
output += token.value;
|
| 217 |
+
break;
|
| 218 |
+
}
|
| 219 |
+
});
|
| 220 |
+
return output;
|
| 221 |
+
}, partialParse = (input) => JSON.parse(generate(unstrip(strip(tokenize(input)))));
|
| 222 |
+
export { partialParse };
|
| 223 |
+
//# sourceMappingURL=parser.mjs.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"parser.mjs","sourceRoot":"","sources":["../../src/_vendor/partial-json-parser/parser.ts"],"names":[],"mappings":"AAKA,MAAM,QAAQ,GAAG,CAAC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ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"api-promise.d.ts","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":""}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/api-promise.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"api-promise.js","sourceRoot":"","sources":["src/api-promise.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,gEAAmC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"error.d.mts","sourceRoot":"","sources":["src/error.ts"],"names":[],"mappings":""}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/error.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["src/error.ts"],"names":[],"mappings":";;;AAAA,mDAAmD;AACnD,0DAA6B"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/constants.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/internal/constants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM5D,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { type Bytes } from "./line.js";
|
| 2 |
+
export declare class JSONLDecoder<T> {
|
| 3 |
+
private iterator;
|
| 4 |
+
controller: AbortController;
|
| 5 |
+
constructor(iterator: AsyncIterableIterator<Bytes>, controller: AbortController);
|
| 6 |
+
private decoder;
|
| 7 |
+
[Symbol.asyncIterator](): AsyncIterator<T>;
|
| 8 |
+
static fromResponse<T>(response: Response, controller: AbortController): JSONLDecoder<T>;
|
| 9 |
+
}
|
| 10 |
+
//# sourceMappingURL=jsonl.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.JSONLDecoder = void 0;
|
| 4 |
+
const error_1 = require("../../core/error.js");
|
| 5 |
+
const shims_1 = require("../shims.js");
|
| 6 |
+
const line_1 = require("./line.js");
|
| 7 |
+
class JSONLDecoder {
|
| 8 |
+
constructor(iterator, controller) {
|
| 9 |
+
this.iterator = iterator;
|
| 10 |
+
this.controller = controller;
|
| 11 |
+
}
|
| 12 |
+
async *decoder() {
|
| 13 |
+
const lineDecoder = new line_1.LineDecoder();
|
| 14 |
+
for await (const chunk of this.iterator) {
|
| 15 |
+
for (const line of lineDecoder.decode(chunk)) {
|
| 16 |
+
yield JSON.parse(line);
|
| 17 |
+
}
|
| 18 |
+
}
|
| 19 |
+
for (const line of lineDecoder.flush()) {
|
| 20 |
+
yield JSON.parse(line);
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
[Symbol.asyncIterator]() {
|
| 24 |
+
return this.decoder();
|
| 25 |
+
}
|
| 26 |
+
static fromResponse(response, controller) {
|
| 27 |
+
if (!response.body) {
|
| 28 |
+
controller.abort();
|
| 29 |
+
if (typeof globalThis.navigator !== 'undefined' &&
|
| 30 |
+
globalThis.navigator.product === 'ReactNative') {
|
| 31 |
+
throw new error_1.AnthropicError(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`);
|
| 32 |
+
}
|
| 33 |
+
throw new error_1.AnthropicError(`Attempted to iterate over a response with no body`);
|
| 34 |
+
}
|
| 35 |
+
return new JSONLDecoder((0, shims_1.ReadableStreamToAsyncIterable)(response.body), controller);
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
exports.JSONLDecoder = JSONLDecoder;
|
| 39 |
+
//# sourceMappingURL=jsonl.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"jsonl.js","sourceRoot":"","sources":["../../src/internal/decoders/jsonl.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAClD,uCAAyD;AACzD,oCAAiD;AAEjD,MAAa,YAAY;IAGvB,YACU,QAAsC,EAC9C,UAA2B;QADnB,aAAQ,GAAR,QAAQ,CAA8B;QAG9C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEO,KAAK,CAAC,CAAC,OAAO;QACpB,MAAM,WAAW,GAAG,IAAI,kBAAW,EAAE,CAAC;QACtC,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAA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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { AnthropicError } from "../../core/error.mjs";
|
| 2 |
+
import { ReadableStreamToAsyncIterable } from "../shims.mjs";
|
| 3 |
+
import { LineDecoder } from "./line.mjs";
|
| 4 |
+
export class JSONLDecoder {
|
| 5 |
+
constructor(iterator, controller) {
|
| 6 |
+
this.iterator = iterator;
|
| 7 |
+
this.controller = controller;
|
| 8 |
+
}
|
| 9 |
+
async *decoder() {
|
| 10 |
+
const lineDecoder = new LineDecoder();
|
| 11 |
+
for await (const chunk of this.iterator) {
|
| 12 |
+
for (const line of lineDecoder.decode(chunk)) {
|
| 13 |
+
yield JSON.parse(line);
|
| 14 |
+
}
|
| 15 |
+
}
|
| 16 |
+
for (const line of lineDecoder.flush()) {
|
| 17 |
+
yield JSON.parse(line);
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
[Symbol.asyncIterator]() {
|
| 21 |
+
return this.decoder();
|
| 22 |
+
}
|
| 23 |
+
static fromResponse(response, controller) {
|
| 24 |
+
if (!response.body) {
|
| 25 |
+
controller.abort();
|
| 26 |
+
if (typeof globalThis.navigator !== 'undefined' &&
|
| 27 |
+
globalThis.navigator.product === 'ReactNative') {
|
| 28 |
+
throw new AnthropicError(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`);
|
| 29 |
+
}
|
| 30 |
+
throw new AnthropicError(`Attempted to iterate over a response with no body`);
|
| 31 |
+
}
|
| 32 |
+
return new JSONLDecoder(ReadableStreamToAsyncIterable(response.body), controller);
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
//# sourceMappingURL=jsonl.mjs.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"jsonl.mjs","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AAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export type Bytes = string | ArrayBuffer | Uint8Array | null | undefined;
|
| 2 |
+
/**
|
| 3 |
+
* A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
|
| 4 |
+
* reading lines from text.
|
| 5 |
+
*
|
| 6 |
+
* https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
|
| 7 |
+
*/
|
| 8 |
+
export declare class LineDecoder {
|
| 9 |
+
#private;
|
| 10 |
+
static NEWLINE_CHARS: Set<string>;
|
| 11 |
+
static NEWLINE_REGEXP: RegExp;
|
| 12 |
+
constructor();
|
| 13 |
+
decode(chunk: Bytes): string[];
|
| 14 |
+
flush(): string[];
|
| 15 |
+
}
|
| 16 |
+
export declare function findDoubleNewlineIndex(buffer: Uint8Array): number;
|
| 17 |
+
//# sourceMappingURL=line.d.mts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"line.d.mts","sourceRoot":"","sources":["../../src/internal/decoders/line.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzE;;;;;GAKG;AACH,qBAAa,WAAW;;IAEtB,MAAM,CAAC,aAAa,cAAyB;IAC7C,MAAM,CAAC,cAAc,SAAkB;;IAUvC,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE;IA6C9B,KAAK,IAAI,MAAM,EAAE;CAMlB;AA+BD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CA6BjE"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export type Bytes = string | ArrayBuffer | Uint8Array | null | undefined;
|
| 2 |
+
/**
|
| 3 |
+
* A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
|
| 4 |
+
* reading lines from text.
|
| 5 |
+
*
|
| 6 |
+
* https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
|
| 7 |
+
*/
|
| 8 |
+
export declare class LineDecoder {
|
| 9 |
+
#private;
|
| 10 |
+
static NEWLINE_CHARS: Set<string>;
|
| 11 |
+
static NEWLINE_REGEXP: RegExp;
|
| 12 |
+
constructor();
|
| 13 |
+
decode(chunk: Bytes): string[];
|
| 14 |
+
flush(): string[];
|
| 15 |
+
}
|
| 16 |
+
export declare function findDoubleNewlineIndex(buffer: Uint8Array): number;
|
| 17 |
+
//# sourceMappingURL=line.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/internal/decoders/line.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,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|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _LineDecoder_buffer, _LineDecoder_carriageReturnIndex;
|
| 3 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 4 |
+
exports.LineDecoder = void 0;
|
| 5 |
+
exports.findDoubleNewlineIndex = findDoubleNewlineIndex;
|
| 6 |
+
const tslib_1 = require("../tslib.js");
|
| 7 |
+
const bytes_1 = require("../utils/bytes.js");
|
| 8 |
+
/**
|
| 9 |
+
* A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
|
| 10 |
+
* reading lines from text.
|
| 11 |
+
*
|
| 12 |
+
* https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
|
| 13 |
+
*/
|
| 14 |
+
class LineDecoder {
|
| 15 |
+
constructor() {
|
| 16 |
+
_LineDecoder_buffer.set(this, void 0);
|
| 17 |
+
_LineDecoder_carriageReturnIndex.set(this, void 0);
|
| 18 |
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, new Uint8Array(), "f");
|
| 19 |
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
| 20 |
+
}
|
| 21 |
+
decode(chunk) {
|
| 22 |
+
if (chunk == null) {
|
| 23 |
+
return [];
|
| 24 |
+
}
|
| 25 |
+
const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk)
|
| 26 |
+
: typeof chunk === 'string' ? (0, bytes_1.encodeUTF8)(chunk)
|
| 27 |
+
: chunk;
|
| 28 |
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, (0, bytes_1.concatBytes)([tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), binaryChunk]), "f");
|
| 29 |
+
const lines = [];
|
| 30 |
+
let patternIndex;
|
| 31 |
+
while ((patternIndex = findNewlineIndex(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f"))) != null) {
|
| 32 |
+
if (patternIndex.carriage && tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") == null) {
|
| 33 |
+
// skip until we either get a corresponding `\n`, a new `\r` or nothing
|
| 34 |
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, patternIndex.index, "f");
|
| 35 |
+
continue;
|
| 36 |
+
}
|
| 37 |
+
// we got double \r or \rtext\n
|
| 38 |
+
if (tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") != null &&
|
| 39 |
+
(patternIndex.index !== tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") + 1 || patternIndex.carriage)) {
|
| 40 |
+
lines.push((0, bytes_1.decodeUTF8)(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") - 1)));
|
| 41 |
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f")), "f");
|
| 42 |
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
| 43 |
+
continue;
|
| 44 |
+
}
|
| 45 |
+
const endIndex = tslib_1.__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
|
| 46 |
+
const line = (0, bytes_1.decodeUTF8)(tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, endIndex));
|
| 47 |
+
lines.push(line);
|
| 48 |
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_buffer, tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(patternIndex.index), "f");
|
| 49 |
+
tslib_1.__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
| 50 |
+
}
|
| 51 |
+
return lines;
|
| 52 |
+
}
|
| 53 |
+
flush() {
|
| 54 |
+
if (!tslib_1.__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length) {
|
| 55 |
+
return [];
|
| 56 |
+
}
|
| 57 |
+
return this.decode('\n');
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
exports.LineDecoder = LineDecoder;
|
| 61 |
+
_LineDecoder_buffer = new WeakMap(), _LineDecoder_carriageReturnIndex = new WeakMap();
|
| 62 |
+
// prettier-ignore
|
| 63 |
+
LineDecoder.NEWLINE_CHARS = new Set(['\n', '\r']);
|
| 64 |
+
LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
|
| 65 |
+
/**
|
| 66 |
+
* This function searches the buffer for the end patterns, (\r or \n)
|
| 67 |
+
* and returns an object with the index preceding the matched newline and the
|
| 68 |
+
* index after the newline char. `null` is returned if no new line is found.
|
| 69 |
+
*
|
| 70 |
+
* ```ts
|
| 71 |
+
* findNewLineIndex('abc\ndef') -> { preceding: 2, index: 3 }
|
| 72 |
+
* ```
|
| 73 |
+
*/
|
| 74 |
+
function findNewlineIndex(buffer, startIndex) {
|
| 75 |
+
const newline = 0x0a; // \n
|
| 76 |
+
const carriage = 0x0d; // \r
|
| 77 |
+
for (let i = startIndex ?? 0; i < buffer.length; i++) {
|
| 78 |
+
if (buffer[i] === newline) {
|
| 79 |
+
return { preceding: i, index: i + 1, carriage: false };
|
| 80 |
+
}
|
| 81 |
+
if (buffer[i] === carriage) {
|
| 82 |
+
return { preceding: i, index: i + 1, carriage: true };
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
return null;
|
| 86 |
+
}
|
| 87 |
+
function findDoubleNewlineIndex(buffer) {
|
| 88 |
+
// This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n)
|
| 89 |
+
// and returns the index right after the first occurrence of any pattern,
|
| 90 |
+
// or -1 if none of the patterns are found.
|
| 91 |
+
const newline = 0x0a; // \n
|
| 92 |
+
const carriage = 0x0d; // \r
|
| 93 |
+
for (let i = 0; i < buffer.length - 1; i++) {
|
| 94 |
+
if (buffer[i] === newline && buffer[i + 1] === newline) {
|
| 95 |
+
// \n\n
|
| 96 |
+
return i + 2;
|
| 97 |
+
}
|
| 98 |
+
if (buffer[i] === carriage && buffer[i + 1] === carriage) {
|
| 99 |
+
// \r\r
|
| 100 |
+
return i + 2;
|
| 101 |
+
}
|
| 102 |
+
if (buffer[i] === carriage &&
|
| 103 |
+
buffer[i + 1] === newline &&
|
| 104 |
+
i + 3 < buffer.length &&
|
| 105 |
+
buffer[i + 2] === carriage &&
|
| 106 |
+
buffer[i + 3] === newline) {
|
| 107 |
+
// \r\n\r\n
|
| 108 |
+
return i + 4;
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
return -1;
|
| 112 |
+
}
|
| 113 |
+
//# sourceMappingURL=line.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"line.js","sourceRoot":"","sources":["../../src/internal/decoders/line.ts"],"names":[],"mappings":";;;;AAyGA,wDA6BC;;AAtID,6CAAqE;AAIrE;;;;;GAKG;AACH,MAAa,WAAW;IAQtB;QAHA,sCAAoB;QACpB,mDAAoC;QAGlC,+BAAA,IAAI,uBAAW,IAAI,UAAU,EAAE,MAAA,CAAC;QAChC,+BAAA,IAAI,oCAAwB,IAAI,MAAA,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,KAAY;QACjB,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,WAAW,GACf,KAAK,YAAY,WAAW,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC;YACpD,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,I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sdk/internal/decoders/line.mjs
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var _LineDecoder_buffer, _LineDecoder_carriageReturnIndex;
|
| 2 |
+
import { __classPrivateFieldGet, __classPrivateFieldSet } from "../tslib.mjs";
|
| 3 |
+
import { concatBytes, decodeUTF8, encodeUTF8 } from "../utils/bytes.mjs";
|
| 4 |
+
/**
|
| 5 |
+
* A re-implementation of httpx's `LineDecoder` in Python that handles incrementally
|
| 6 |
+
* reading lines from text.
|
| 7 |
+
*
|
| 8 |
+
* https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258
|
| 9 |
+
*/
|
| 10 |
+
export class LineDecoder {
|
| 11 |
+
constructor() {
|
| 12 |
+
_LineDecoder_buffer.set(this, void 0);
|
| 13 |
+
_LineDecoder_carriageReturnIndex.set(this, void 0);
|
| 14 |
+
__classPrivateFieldSet(this, _LineDecoder_buffer, new Uint8Array(), "f");
|
| 15 |
+
__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
| 16 |
+
}
|
| 17 |
+
decode(chunk) {
|
| 18 |
+
if (chunk == null) {
|
| 19 |
+
return [];
|
| 20 |
+
}
|
| 21 |
+
const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk)
|
| 22 |
+
: typeof chunk === 'string' ? encodeUTF8(chunk)
|
| 23 |
+
: chunk;
|
| 24 |
+
__classPrivateFieldSet(this, _LineDecoder_buffer, concatBytes([__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), binaryChunk]), "f");
|
| 25 |
+
const lines = [];
|
| 26 |
+
let patternIndex;
|
| 27 |
+
while ((patternIndex = findNewlineIndex(__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f"))) != null) {
|
| 28 |
+
if (patternIndex.carriage && __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") == null) {
|
| 29 |
+
// skip until we either get a corresponding `\n`, a new `\r` or nothing
|
| 30 |
+
__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, patternIndex.index, "f");
|
| 31 |
+
continue;
|
| 32 |
+
}
|
| 33 |
+
// we got double \r or \rtext\n
|
| 34 |
+
if (__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") != null &&
|
| 35 |
+
(patternIndex.index !== __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") + 1 || patternIndex.carriage)) {
|
| 36 |
+
lines.push(decodeUTF8(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") - 1)));
|
| 37 |
+
__classPrivateFieldSet(this, _LineDecoder_buffer, __classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f")), "f");
|
| 38 |
+
__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
| 39 |
+
continue;
|
| 40 |
+
}
|
| 41 |
+
const endIndex = __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
|
| 42 |
+
const line = decodeUTF8(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, endIndex));
|
| 43 |
+
lines.push(line);
|
| 44 |
+
__classPrivateFieldSet(this, _LineDecoder_buffer, __classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(patternIndex.index), "f");
|
| 45 |
+
__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
| 46 |
+
}
|
| 47 |
+
return lines;
|
| 48 |
+
}
|
| 49 |
+
flush() {
|
| 50 |
+
if (!__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length) {
|
| 51 |
+
return [];
|
| 52 |
+
}
|
| 53 |
+
return this.decode('\n');
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
_LineDecoder_buffer = new WeakMap(), _LineDecoder_carriageReturnIndex = new WeakMap();
|
| 57 |
+
// prettier-ignore
|
| 58 |
+
LineDecoder.NEWLINE_CHARS = new Set(['\n', '\r']);
|
| 59 |
+
LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
|
| 60 |
+
/**
|
| 61 |
+
* This function searches the buffer for the end patterns, (\r or \n)
|
| 62 |
+
* and returns an object with the index preceding the matched newline and the
|
| 63 |
+
* index after the newline char. `null` is returned if no new line is found.
|
| 64 |
+
*
|
| 65 |
+
* ```ts
|
| 66 |
+
* findNewLineIndex('abc\ndef') -> { preceding: 2, index: 3 }
|
| 67 |
+
* ```
|
| 68 |
+
*/
|
| 69 |
+
function findNewlineIndex(buffer, startIndex) {
|
| 70 |
+
const newline = 0x0a; // \n
|
| 71 |
+
const carriage = 0x0d; // \r
|
| 72 |
+
for (let i = startIndex ?? 0; i < buffer.length; i++) {
|
| 73 |
+
if (buffer[i] === newline) {
|
| 74 |
+
return { preceding: i, index: i + 1, carriage: false };
|
| 75 |
+
}
|
| 76 |
+
if (buffer[i] === carriage) {
|
| 77 |
+
return { preceding: i, index: i + 1, carriage: true };
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
return null;
|
| 81 |
+
}
|
| 82 |
+
export function findDoubleNewlineIndex(buffer) {
|
| 83 |
+
// This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n)
|
| 84 |
+
// and returns the index right after the first occurrence of any pattern,
|
| 85 |
+
// or -1 if none of the patterns are found.
|
| 86 |
+
const newline = 0x0a; // \n
|
| 87 |
+
const carriage = 0x0d; // \r
|
| 88 |
+
for (let i = 0; i < buffer.length - 1; i++) {
|
| 89 |
+
if (buffer[i] === newline && buffer[i + 1] === newline) {
|
| 90 |
+
// \n\n
|
| 91 |
+
return i + 2;
|
| 92 |
+
}
|
| 93 |
+
if (buffer[i] === carriage && buffer[i + 1] === carriage) {
|
| 94 |
+
// \r\r
|
| 95 |
+
return i + 2;
|
| 96 |
+
}
|
| 97 |
+
if (buffer[i] === carriage &&
|
| 98 |
+
buffer[i + 1] === newline &&
|
| 99 |
+
i + 3 < buffer.length &&
|
| 100 |
+
buffer[i + 2] === carriage &&
|
| 101 |
+
buffer[i + 3] === newline) {
|
| 102 |
+
// \r\n\r\n
|
| 103 |
+
return i + 4;
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
return -1;
|
| 107 |
+
}
|
| 108 |
+
//# sourceMappingURL=line.mjs.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"line.mjs","sourceRoot":"","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P,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,IACE,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ;YACtB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,OAAO;YACzB,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM;YACrB,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,QAAQ;YAC1B,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,OAAO,EACzB,CAAC;YACD,WAAW;YACX,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/headers.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"headers.mjs","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAWtF,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAE7E,CAAC;AAgBF,MAAM,OAAO,GAAG,KAAK,CAAC,OAAsD,CAAC;AAE7E,QAAQ,CAAC,CAAC,cAAc,CAAC,OAAoB;IAC3C,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,IAAI,4BAA4B,IAAI,OAAO,EAAE,CAAC;QAC5C,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAA0B,CAAC;QACrD,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACxB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACrB,CAAC;QACD,OAAO;IACT,CAAC;IAED,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,IAAiE,CAAC;IACtE,IAAI,OAAO,YAAY,OAAO,E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AAC;QACjC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;QACtC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YACpD,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YACrC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;gBAChC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC3B,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;YACD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC3B,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAClC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,CAAC,4BAA4B,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AAC7F,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAoB,EAAE,EAAE;IACrD,KAAK,MAAM,CAAC,IAAI,cAAc,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/parse.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../src/internal/parse.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAiBtF,oDAkDC;AAO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CAAC,OAAO,CAAC,CAAC;QACvF,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,OAAO,YAAY,CAAC,IAAS,EAAE,QAAQ,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,IAAoB,CAAC;IAC9B,CAAC,CAAC,EAAE,CAAC;IACL,IAAA,eAAS,EAAC,MAAM,CAAC,CAAC,KAAK,CACrB,IAAI,YAAY,mBAAmB,EACnC,IAAA,0BAAoB,EAAC;QACnB,mBAAmB;QACnB,GAAG,EAAE,QAAQ,CAAC,GAAG;QACjB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,IAAI;QACJ,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;KACnC,CAAC,CACH,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC;AAOD,SAAgB,YAAY,CAAI,KAAQ,EAAE,QAAkB;IAC1D,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,OAAO,KAAyB,CAAC;IACnC,CAAC;IAED,OAAO,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE;QACjD,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;QACzC,UAAU,EAAE,KAAK;KAClB,CAAqB,CAAC;AACzB,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shim-types.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"shim-types.d.mts","sourceRoot":"","sources":["../src/internal/shim-types.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC;AAE/C,iBAAiB;AACjB,KAAK,kBAAkB,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAEhE,iBAAiB;AACjB,KAAK,mBAAmB,CAAC,CAAC,GAAG,GAAG,IAAI,OAAO,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;AAE3E,KAAK,8BAA8B,CAAC,CAAC,GAAG,GAAG,IACzC,OAAO,UAAU,SAAS;IAAE,cAAc,EAAE,GAAG,CAAA;CAAE,GAAG,KAAK,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAErF,KAAK,eAAe,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,CACtC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,GACzE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,8BAA8B,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,8BAA8B,CAAC,CAAC,CAAC,CAAC,CACpG,CAAC;AAEF,YAAY,EAAE,eAAe,IAAI,cAAc,EAAE,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/shims.d.mts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { Fetch } from "./builtin-types.mjs";
|
| 2 |
+
import type { ReadableStream } from "./shim-types.mjs";
|
| 3 |
+
export declare function getDefaultFetch(): Fetch;
|
| 4 |
+
type ReadableStreamArgs = ConstructorParameters<typeof ReadableStream>;
|
| 5 |
+
export declare function makeReadableStream(...args: ReadableStreamArgs): ReadableStream;
|
| 6 |
+
export declare function ReadableStreamFrom<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T>;
|
| 7 |
+
/**
|
| 8 |
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
| 9 |
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
| 10 |
+
*
|
| 11 |
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
| 12 |
+
*/
|
| 13 |
+
export declare function ReadableStreamToAsyncIterable<T>(stream: any): AsyncIterableIterator<T>;
|
| 14 |
+
/**
|
| 15 |
+
* Cancels a ReadableStream we don't need to consume.
|
| 16 |
+
* See https://undici.nodejs.org/#/?id=garbage-collection
|
| 17 |
+
*/
|
| 18 |
+
export declare function CancelReadableStream(stream: any): Promise<void>;
|
| 19 |
+
export {};
|
| 20 |
+
//# sourceMappingURL=shims.d.mts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/types.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 3 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 4 |
+
//# sourceMappingURL=types.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/uploads.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":";;;AA0CA,4BAOC;AAED,0BAcC;AA9DD,sCAA6C;AAUtC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,IAAI,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,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,CACzF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,SAAS,CACjB,wGAAwG,KAAK,UAAU,CACxH,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export * from "./utils/values.mjs";
|
| 2 |
+
export * from "./utils/base64.mjs";
|
| 3 |
+
export * from "./utils/env.mjs";
|
| 4 |
+
export * from "./utils/log.mjs";
|
| 5 |
+
export * from "./utils/uuid.mjs";
|
| 6 |
+
export * from "./utils/sleep.mjs";
|
| 7 |
+
//# sourceMappingURL=utils.d.mts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare const toBase64: (data: string | Uint8Array | null | undefined) => string;
|
| 2 |
+
export declare const fromBase64: (str: string) => Uint8Array;
|
| 3 |
+
//# sourceMappingURL=base64.d.mts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"base64.d.mts","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,KAAG,MAgBvE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,UAgBxC,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare const toBase64: (data: string | Uint8Array | null | undefined) => string;
|
| 2 |
+
export declare const fromBase64: (str: string) => Uint8Array;
|
| 3 |
+
//# sourceMappingURL=base64.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
import { AnthropicError } from "../../core/error.mjs";
|
| 3 |
+
import { encodeUTF8 } from "./bytes.mjs";
|
| 4 |
+
export const toBase64 = (data) => {
|
| 5 |
+
if (!data)
|
| 6 |
+
return '';
|
| 7 |
+
if (typeof globalThis.Buffer !== 'undefined') {
|
| 8 |
+
return globalThis.Buffer.from(data).toString('base64');
|
| 9 |
+
}
|
| 10 |
+
if (typeof data === 'string') {
|
| 11 |
+
data = encodeUTF8(data);
|
| 12 |
+
}
|
| 13 |
+
if (typeof btoa !== 'undefined') {
|
| 14 |
+
return btoa(String.fromCharCode.apply(null, data));
|
| 15 |
+
}
|
| 16 |
+
throw new AnthropicError('Cannot generate base64 string; Expected `Buffer` or `btoa` to be defined');
|
| 17 |
+
};
|
| 18 |
+
export const fromBase64 = (str) => {
|
| 19 |
+
if (typeof globalThis.Buffer !== 'undefined') {
|
| 20 |
+
const buf = globalThis.Buffer.from(str, 'base64');
|
| 21 |
+
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
|
| 22 |
+
}
|
| 23 |
+
if (typeof atob !== 'undefined') {
|
| 24 |
+
const bstr = atob(str);
|
| 25 |
+
const buf = new Uint8Array(bstr.length);
|
| 26 |
+
for (let i = 0; i < bstr.length; i++) {
|
| 27 |
+
buf[i] = bstr.charCodeAt(i);
|
| 28 |
+
}
|
| 29 |
+
return buf;
|
| 30 |
+
}
|
| 31 |
+
throw new AnthropicError('Cannot decode base64 string; Expected `Buffer` or `atob` to be defined');
|
| 32 |
+
};
|
| 33 |
+
//# sourceMappingURL=base64.mjs.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/base64.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"base64.mjs","sourceRoot":"","sources":["../../src/internal/utils/base64.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,cAAc,EAAE;OAClB,EAAE,UAAU,EAAE;AAErB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAA4C,EAAU,EAAE;IAC/E,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,IAAI,OAAQ,UAAkB,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QACtD,OAAQ,UAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAW,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,IAAI,cAAc,CAAC,0EAA0E,CAAC,CAAC;AACvG,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAAc,EAAE;IACpD,IAAI,OAAQ,UAAkB,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QACtD,MAAM,GAAG,GAAI,UAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC3D,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,IAAI,cAAc,CAAC,wEAAwE,CAAC,CAAC;AACrG,CAAC,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.mts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare function concatBytes(buffers: Uint8Array[]): Uint8Array;
|
| 2 |
+
export declare function encodeUTF8(str: string): Uint8Array<ArrayBufferLike>;
|
| 3 |
+
export declare function decodeUTF8(bytes: Uint8Array): string;
|
| 4 |
+
//# sourceMappingURL=bytes.d.mts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export declare function concatBytes(buffers: Uint8Array[]): Uint8Array;
|
| 2 |
+
export declare function encodeUTF8(str: string): Uint8Array<ArrayBufferLike>;
|
| 3 |
+
export declare function decodeUTF8(bytes: Uint8Array): string;
|
| 4 |
+
//# sourceMappingURL=bytes.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.concatBytes = concatBytes;
|
| 4 |
+
exports.encodeUTF8 = encodeUTF8;
|
| 5 |
+
exports.decodeUTF8 = decodeUTF8;
|
| 6 |
+
function concatBytes(buffers) {
|
| 7 |
+
let length = 0;
|
| 8 |
+
for (const buffer of buffers) {
|
| 9 |
+
length += buffer.length;
|
| 10 |
+
}
|
| 11 |
+
const output = new Uint8Array(length);
|
| 12 |
+
let index = 0;
|
| 13 |
+
for (const buffer of buffers) {
|
| 14 |
+
output.set(buffer, index);
|
| 15 |
+
index += buffer.length;
|
| 16 |
+
}
|
| 17 |
+
return output;
|
| 18 |
+
}
|
| 19 |
+
let encodeUTF8_;
|
| 20 |
+
function encodeUTF8(str) {
|
| 21 |
+
let encoder;
|
| 22 |
+
return (encodeUTF8_ ??
|
| 23 |
+
((encoder = new globalThis.TextEncoder()), (encodeUTF8_ = encoder.encode.bind(encoder))))(str);
|
| 24 |
+
}
|
| 25 |
+
let decodeUTF8_;
|
| 26 |
+
function decodeUTF8(bytes) {
|
| 27 |
+
let decoder;
|
| 28 |
+
return (decodeUTF8_ ??
|
| 29 |
+
((decoder = new globalThis.TextDecoder()), (decodeUTF8_ = decoder.decode.bind(decoder))))(bytes);
|
| 30 |
+
}
|
| 31 |
+
//# sourceMappingURL=bytes.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export function concatBytes(buffers) {
|
| 2 |
+
let length = 0;
|
| 3 |
+
for (const buffer of buffers) {
|
| 4 |
+
length += buffer.length;
|
| 5 |
+
}
|
| 6 |
+
const output = new Uint8Array(length);
|
| 7 |
+
let index = 0;
|
| 8 |
+
for (const buffer of buffers) {
|
| 9 |
+
output.set(buffer, index);
|
| 10 |
+
index += buffer.length;
|
| 11 |
+
}
|
| 12 |
+
return output;
|
| 13 |
+
}
|
| 14 |
+
let encodeUTF8_;
|
| 15 |
+
export function encodeUTF8(str) {
|
| 16 |
+
let encoder;
|
| 17 |
+
return (encodeUTF8_ ??
|
| 18 |
+
((encoder = new globalThis.TextEncoder()), (encodeUTF8_ = encoder.encode.bind(encoder))))(str);
|
| 19 |
+
}
|
| 20 |
+
let decodeUTF8_;
|
| 21 |
+
export function decodeUTF8(bytes) {
|
| 22 |
+
let decoder;
|
| 23 |
+
return (decodeUTF8_ ??
|
| 24 |
+
((decoder = new globalThis.TextDecoder()), (decodeUTF8_ = decoder.decode.bind(decoder))))(bytes);
|
| 25 |
+
}
|
| 26 |
+
//# sourceMappingURL=bytes.mjs.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Read an environment variable.
|
| 3 |
+
*
|
| 4 |
+
* Trims beginning and trailing whitespace.
|
| 5 |
+
*
|
| 6 |
+
* Will return undefined if the environment variable doesn't exist or cannot be accessed.
|
| 7 |
+
*/
|
| 8 |
+
export declare const readEnv: (env: string) => string | undefined;
|
| 9 |
+
//# sourceMappingURL=env.d.mts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Read an environment variable.
|
| 3 |
+
*
|
| 4 |
+
* Trims beginning and trailing whitespace.
|
| 5 |
+
*
|
| 6 |
+
* Will return undefined if the environment variable doesn't exist or cannot be accessed.
|
| 7 |
+
*/
|
| 8 |
+
export declare const readEnv: (env: string) => string | undefined;
|
| 9 |
+
//# sourceMappingURL=env.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/internal/utils/env.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAQ9C,CAAC"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 3 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 4 |
+
exports.readEnv = void 0;
|
| 5 |
+
/**
|
| 6 |
+
* Read an environment variable.
|
| 7 |
+
*
|
| 8 |
+
* Trims beginning and trailing whitespace.
|
| 9 |
+
*
|
| 10 |
+
* Will return undefined if the environment variable doesn't exist or cannot be accessed.
|
| 11 |
+
*/
|
| 12 |
+
const readEnv = (env) => {
|
| 13 |
+
if (typeof globalThis.process !== 'undefined') {
|
| 14 |
+
return globalThis.process.env?.[env]?.trim() ?? undefined;
|
| 15 |
+
}
|
| 16 |
+
if (typeof globalThis.Deno !== 'undefined') {
|
| 17 |
+
return globalThis.Deno.env?.get?.(env)?.trim();
|
| 18 |
+
}
|
| 19 |
+
return undefined;
|
| 20 |
+
};
|
| 21 |
+
exports.readEnv = readEnv;
|
| 22 |
+
//# sourceMappingURL=env.js.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/internal/utils/env.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF;;;;;;GAMG;AACI,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;IACzD,IAAI,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACvD,OAAQ,UAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IACrE,CAAC;IACD,IAAI,OAAQ,UAAkB,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACpD,OAAQ,UAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AARW,QAAA,OAAO,WAQlB"}
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
/**
|
| 3 |
+
* Read an environment variable.
|
| 4 |
+
*
|
| 5 |
+
* Trims beginning and trailing whitespace.
|
| 6 |
+
*
|
| 7 |
+
* Will return undefined if the environment variable doesn't exist or cannot be accessed.
|
| 8 |
+
*/
|
| 9 |
+
export const readEnv = (env) => {
|
| 10 |
+
if (typeof globalThis.process !== 'undefined') {
|
| 11 |
+
return globalThis.process.env?.[env]?.trim() ?? undefined;
|
| 12 |
+
}
|
| 13 |
+
if (typeof globalThis.Deno !== 'undefined') {
|
| 14 |
+
return globalThis.Deno.env?.get?.(env)?.trim();
|
| 15 |
+
}
|
| 16 |
+
return undefined;
|
| 17 |
+
};
|
| 18 |
+
//# sourceMappingURL=env.mjs.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.mts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { type BaseAnthropic } from "../../client.mjs";
|
| 2 |
+
import { RequestOptions } from "../request-options.mjs";
|
| 3 |
+
type LogFn = (message: string, ...rest: unknown[]) => void;
|
| 4 |
+
export type Logger = {
|
| 5 |
+
error: LogFn;
|
| 6 |
+
warn: LogFn;
|
| 7 |
+
info: LogFn;
|
| 8 |
+
debug: LogFn;
|
| 9 |
+
};
|
| 10 |
+
export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
|
| 11 |
+
export declare const parseLogLevel: (maybeLevel: string | undefined, sourceName: string, client: BaseAnthropic) => LogLevel | undefined;
|
| 12 |
+
export declare function loggerFor(client: BaseAnthropic): Logger;
|
| 13 |
+
export declare const formatRequestDetails: (details: {
|
| 14 |
+
options?: RequestOptions | undefined;
|
| 15 |
+
headers?: Headers | Record<string, string> | undefined;
|
| 16 |
+
retryOfRequestLogID?: string | undefined;
|
| 17 |
+
retryOf?: string | undefined;
|
| 18 |
+
url?: string | undefined;
|
| 19 |
+
status?: number | undefined;
|
| 20 |
+
method?: string | undefined;
|
| 21 |
+
durationMs?: number | undefined;
|
| 22 |
+
message?: unknown;
|
| 23 |
+
body?: unknown;
|
| 24 |
+
}) => {
|
| 25 |
+
options?: RequestOptions | undefined;
|
| 26 |
+
headers?: Headers | Record<string, string> | undefined;
|
| 27 |
+
retryOfRequestLogID?: string | undefined;
|
| 28 |
+
retryOf?: string | undefined;
|
| 29 |
+
url?: string | undefined;
|
| 30 |
+
status?: number | undefined;
|
| 31 |
+
method?: string | undefined;
|
| 32 |
+
durationMs?: number | undefined;
|
| 33 |
+
message?: unknown;
|
| 34 |
+
body?: unknown;
|
| 35 |
+
};
|
| 36 |
+
export {};
|
| 37 |
+
//# sourceMappingURL=log.d.mts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { type BaseAnthropic } from "../../client.js";
|
| 2 |
+
import { RequestOptions } from "../request-options.js";
|
| 3 |
+
type LogFn = (message: string, ...rest: unknown[]) => void;
|
| 4 |
+
export type Logger = {
|
| 5 |
+
error: LogFn;
|
| 6 |
+
warn: LogFn;
|
| 7 |
+
info: LogFn;
|
| 8 |
+
debug: LogFn;
|
| 9 |
+
};
|
| 10 |
+
export type LogLevel = 'off' | 'error' | 'warn' | 'info' | 'debug';
|
| 11 |
+
export declare const parseLogLevel: (maybeLevel: string | undefined, sourceName: string, client: BaseAnthropic) => LogLevel | undefined;
|
| 12 |
+
export declare function loggerFor(client: BaseAnthropic): Logger;
|
| 13 |
+
export declare const formatRequestDetails: (details: {
|
| 14 |
+
options?: RequestOptions | undefined;
|
| 15 |
+
headers?: Headers | Record<string, string> | undefined;
|
| 16 |
+
retryOfRequestLogID?: string | undefined;
|
| 17 |
+
retryOf?: string | undefined;
|
| 18 |
+
url?: string | undefined;
|
| 19 |
+
status?: number | undefined;
|
| 20 |
+
method?: string | undefined;
|
| 21 |
+
durationMs?: number | undefined;
|
| 22 |
+
message?: unknown;
|
| 23 |
+
body?: unknown;
|
| 24 |
+
}) => {
|
| 25 |
+
options?: RequestOptions | undefined;
|
| 26 |
+
headers?: Headers | Record<string, string> | undefined;
|
| 27 |
+
retryOfRequestLogID?: string | undefined;
|
| 28 |
+
retryOf?: string | undefined;
|
| 29 |
+
url?: string | undefined;
|
| 30 |
+
status?: number | undefined;
|
| 31 |
+
method?: string | undefined;
|
| 32 |
+
durationMs?: number | undefined;
|
| 33 |
+
message?: unknown;
|
| 34 |
+
body?: unknown;
|
| 35 |
+
};
|
| 36 |
+
export {};
|
| 37 |
+
//# sourceMappingURL=log.d.ts.map
|
platform/dbops/archive/databases_old/data/home/x/india-h200-1-workspace/claude-code-router/node_modules/@anthropic-ai/sdk/internal/utils/log.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/internal/utils/log.ts"],"names":[],"mappings":"OAGO,EAAE,KAAK,aAAa,EAAE;OACtB,EAAE,cAAc,EAAE;AAEzB,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAC3D,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAUnE,eAAO,MAAM,aAAa,GACxB,YAAY,MAAM,GAAG,SAAS,EAC9B,YAAY,MAAM,EAClB,QAAQ,aAAa,KACpB,QAAQ,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