Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/helpers.d.ts +15 -0
- novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/helpers.js +66 -0
- novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/helpers.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/index.d.ts +41 -0
- novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/index.d.ts.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/index.js +178 -0
- novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/index.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/bignumber.js/doc/API.html +2249 -0
- novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/compile.js +60 -0
- novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/constants.js +57 -0
- novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/expand.js +113 -0
- novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/parse.js +331 -0
- novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/stringify.js +32 -0
- novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/utils.js +122 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cjs-module-lexer/dist/lexer.js +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cjs-module-lexer/dist/lexer.mjs +2 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cookie/dist/index.d.ts +114 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cookie/dist/index.js +239 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cookie/dist/index.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/enoent.js +59 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/parse.js +91 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/util/escape.js +47 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- novas/novacore-zephyr/claude-code-router/node_modules/data-uri-to-buffer/dist/index.d.ts +15 -0
- novas/novacore-zephyr/claude-code-router/node_modules/data-uri-to-buffer/dist/index.js +53 -0
- novas/novacore-zephyr/claude-code-router/node_modules/data-uri-to-buffer/dist/index.js.map +1 -0
- novas/novacore-zephyr/claude-code-router/node_modules/data-uri-to-buffer/src/index.ts +68 -0
- novas/novacore-zephyr/claude-code-router/node_modules/debug/src/browser.js +272 -0
- novas/novacore-zephyr/claude-code-router/node_modules/debug/src/common.js +292 -0
- novas/novacore-zephyr/claude-code-router/node_modules/debug/src/index.js +10 -0
- novas/novacore-zephyr/claude-code-router/node_modules/debug/src/node.js +263 -0
- novas/novacore-zephyr/claude-code-router/node_modules/depd/lib/browser/index.js +77 -0
- novas/novacore-zephyr/claude-code-router/node_modules/dotenv/lib/cli-options.js +17 -0
- novas/novacore-zephyr/claude-code-router/node_modules/dotenv/lib/env-options.js +28 -0
- novas/novacore-zephyr/claude-code-router/node_modules/dotenv/lib/main.d.ts +162 -0
- novas/novacore-zephyr/claude-code-router/node_modules/dotenv/lib/main.js +386 -0
- novas/novacore-zephyr/claude-code-router/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts +17 -0
- novas/novacore-zephyr/claude-code-router/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js +187 -0
- novas/novacore-zephyr/claude-code-router/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js +23 -0
- novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts +5 -0
- novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/RGI_Emoji.js +6 -0
- novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/index.d.ts +5 -0
- novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/index.js +6 -0
- novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/text.d.ts +5 -0
- novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/text.js +6 -0
- novas/novacore-zephyr/claude-code-router/node_modules/exit/lib/exit.js +41 -0
- novas/novacore-zephyr/claude-code-router/node_modules/exit/test/exit_test.js +121 -0
- novas/novacore-zephyr/claude-code-router/node_modules/exit/test/fixtures/10-stderr.txt +10 -0
novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/helpers.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="node" />
|
| 2 |
+
/// <reference types="node" />
|
| 3 |
+
/// <reference types="node" />
|
| 4 |
+
/// <reference types="node" />
|
| 5 |
+
/// <reference types="node" />
|
| 6 |
+
import * as http from 'http';
|
| 7 |
+
import * as https from 'https';
|
| 8 |
+
import type { Readable } from 'stream';
|
| 9 |
+
export type ThenableRequest = http.ClientRequest & {
|
| 10 |
+
then: Promise<http.IncomingMessage>['then'];
|
| 11 |
+
};
|
| 12 |
+
export declare function toBuffer(stream: Readable): Promise<Buffer>;
|
| 13 |
+
export declare function json(stream: Readable): Promise<any>;
|
| 14 |
+
export declare function req(url: string | URL, opts?: https.RequestOptions): ThenableRequest;
|
| 15 |
+
//# sourceMappingURL=helpers.d.ts.map
|
novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/helpers.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,GAAG;IAClD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC;AAEF,wBAAsB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE;AAGD,wBAAsB,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAUzD;AAED,wBAAgB,GAAG,CAClB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,GAAE,KAAK,CAAC,cAAmB,GAC7B,eAAe,CAcjB"}
|
novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/helpers.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
| 3 |
+
if (k2 === undefined) k2 = k;
|
| 4 |
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
| 5 |
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
| 6 |
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
| 7 |
+
}
|
| 8 |
+
Object.defineProperty(o, k2, desc);
|
| 9 |
+
}) : (function(o, m, k, k2) {
|
| 10 |
+
if (k2 === undefined) k2 = k;
|
| 11 |
+
o[k2] = m[k];
|
| 12 |
+
}));
|
| 13 |
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
| 14 |
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
| 15 |
+
}) : function(o, v) {
|
| 16 |
+
o["default"] = v;
|
| 17 |
+
});
|
| 18 |
+
var __importStar = (this && this.__importStar) || function (mod) {
|
| 19 |
+
if (mod && mod.__esModule) return mod;
|
| 20 |
+
var result = {};
|
| 21 |
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
| 22 |
+
__setModuleDefault(result, mod);
|
| 23 |
+
return result;
|
| 24 |
+
};
|
| 25 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 26 |
+
exports.req = exports.json = exports.toBuffer = void 0;
|
| 27 |
+
const http = __importStar(require("http"));
|
| 28 |
+
const https = __importStar(require("https"));
|
| 29 |
+
async function toBuffer(stream) {
|
| 30 |
+
let length = 0;
|
| 31 |
+
const chunks = [];
|
| 32 |
+
for await (const chunk of stream) {
|
| 33 |
+
length += chunk.length;
|
| 34 |
+
chunks.push(chunk);
|
| 35 |
+
}
|
| 36 |
+
return Buffer.concat(chunks, length);
|
| 37 |
+
}
|
| 38 |
+
exports.toBuffer = toBuffer;
|
| 39 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
| 40 |
+
async function json(stream) {
|
| 41 |
+
const buf = await toBuffer(stream);
|
| 42 |
+
const str = buf.toString('utf8');
|
| 43 |
+
try {
|
| 44 |
+
return JSON.parse(str);
|
| 45 |
+
}
|
| 46 |
+
catch (_err) {
|
| 47 |
+
const err = _err;
|
| 48 |
+
err.message += ` (input: ${str})`;
|
| 49 |
+
throw err;
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
exports.json = json;
|
| 53 |
+
function req(url, opts = {}) {
|
| 54 |
+
const href = typeof url === 'string' ? url : url.href;
|
| 55 |
+
const req = (href.startsWith('https:') ? https : http).request(url, opts);
|
| 56 |
+
const promise = new Promise((resolve, reject) => {
|
| 57 |
+
req
|
| 58 |
+
.once('response', resolve)
|
| 59 |
+
.once('error', reject)
|
| 60 |
+
.end();
|
| 61 |
+
});
|
| 62 |
+
req.then = promise.then.bind(promise);
|
| 63 |
+
return req;
|
| 64 |
+
}
|
| 65 |
+
exports.req = req;
|
| 66 |
+
//# sourceMappingURL=helpers.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/helpers.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,6CAA+B;AAOxB,KAAK,UAAU,QAAQ,CAAC,MAAgB;IAC9C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,MAAM,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC;QACvB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACnB;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACtC,CAAC;AARD,4BAQC;AAED,8DAA8D;AACvD,KAAK,UAAU,IAAI,CAAC,MAAgB;IAC1C,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,GAAG,GAAG,GAAG,CA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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="node" />
|
| 2 |
+
/// <reference types="node" />
|
| 3 |
+
/// <reference types="node" />
|
| 4 |
+
/// <reference types="node" />
|
| 5 |
+
import * as net from 'net';
|
| 6 |
+
import * as tls from 'tls';
|
| 7 |
+
import * as http from 'http';
|
| 8 |
+
import type { Duplex } from 'stream';
|
| 9 |
+
export * from './helpers';
|
| 10 |
+
interface HttpConnectOpts extends net.TcpNetConnectOpts {
|
| 11 |
+
secureEndpoint: false;
|
| 12 |
+
protocol?: string;
|
| 13 |
+
}
|
| 14 |
+
interface HttpsConnectOpts extends tls.ConnectionOptions {
|
| 15 |
+
secureEndpoint: true;
|
| 16 |
+
protocol?: string;
|
| 17 |
+
port: number;
|
| 18 |
+
}
|
| 19 |
+
export type AgentConnectOpts = HttpConnectOpts | HttpsConnectOpts;
|
| 20 |
+
declare const INTERNAL: unique symbol;
|
| 21 |
+
export declare abstract class Agent extends http.Agent {
|
| 22 |
+
private [INTERNAL];
|
| 23 |
+
options: Partial<net.TcpNetConnectOpts & tls.ConnectionOptions>;
|
| 24 |
+
keepAlive: boolean;
|
| 25 |
+
constructor(opts?: http.AgentOptions);
|
| 26 |
+
abstract connect(req: http.ClientRequest, options: AgentConnectOpts): Promise<Duplex | http.Agent> | Duplex | http.Agent;
|
| 27 |
+
/**
|
| 28 |
+
* Determine whether this is an `http` or `https` request.
|
| 29 |
+
*/
|
| 30 |
+
isSecureEndpoint(options?: AgentConnectOpts): boolean;
|
| 31 |
+
private incrementSockets;
|
| 32 |
+
private decrementSockets;
|
| 33 |
+
getName(options?: AgentConnectOpts): string;
|
| 34 |
+
createSocket(req: http.ClientRequest, options: AgentConnectOpts, cb: (err: Error | null, s?: Duplex) => void): void;
|
| 35 |
+
createConnection(): Duplex;
|
| 36 |
+
get defaultPort(): number;
|
| 37 |
+
set defaultPort(v: number);
|
| 38 |
+
get protocol(): string;
|
| 39 |
+
set protocol(v: string);
|
| 40 |
+
}
|
| 41 |
+
//# sourceMappingURL=index.d.ts.map
|
novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,cAAc,WAAW,CAAC;AAE1B,UAAU,eAAgB,SAAQ,GAAG,CAAC,iBAAiB;IACtD,cAAc,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,gBAAiB,SAAQ,GAAG,CAAC,iBAAiB;IACvD,cAAc,EAAE,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAElE,QAAA,MAAM,QAAQ,eAAmC,CAAC;AAQlD,8BAAsB,KAAM,SAAQ,IAAI,CAAC,KAAK;IAC7C,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAgB;IAGlC,OAAO,EAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACjE,SAAS,EAAG,OAAO,CAAC;gBAER,IAAI,CAAC,EAAE,IAAI,CAAC,YAAY;IAKpC,QAAQ,CAAC,OAAO,CACf,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,OAAO,EAAE,gBAAgB,GACvB,OAAO,CAAC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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
| 3 |
+
if (k2 === undefined) k2 = k;
|
| 4 |
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
| 5 |
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
| 6 |
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
| 7 |
+
}
|
| 8 |
+
Object.defineProperty(o, k2, desc);
|
| 9 |
+
}) : (function(o, m, k, k2) {
|
| 10 |
+
if (k2 === undefined) k2 = k;
|
| 11 |
+
o[k2] = m[k];
|
| 12 |
+
}));
|
| 13 |
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
| 14 |
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
| 15 |
+
}) : function(o, v) {
|
| 16 |
+
o["default"] = v;
|
| 17 |
+
});
|
| 18 |
+
var __importStar = (this && this.__importStar) || function (mod) {
|
| 19 |
+
if (mod && mod.__esModule) return mod;
|
| 20 |
+
var result = {};
|
| 21 |
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
| 22 |
+
__setModuleDefault(result, mod);
|
| 23 |
+
return result;
|
| 24 |
+
};
|
| 25 |
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
| 26 |
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
| 27 |
+
};
|
| 28 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 29 |
+
exports.Agent = void 0;
|
| 30 |
+
const net = __importStar(require("net"));
|
| 31 |
+
const http = __importStar(require("http"));
|
| 32 |
+
const https_1 = require("https");
|
| 33 |
+
__exportStar(require("./helpers"), exports);
|
| 34 |
+
const INTERNAL = Symbol('AgentBaseInternalState');
|
| 35 |
+
class Agent extends http.Agent {
|
| 36 |
+
constructor(opts) {
|
| 37 |
+
super(opts);
|
| 38 |
+
this[INTERNAL] = {};
|
| 39 |
+
}
|
| 40 |
+
/**
|
| 41 |
+
* Determine whether this is an `http` or `https` request.
|
| 42 |
+
*/
|
| 43 |
+
isSecureEndpoint(options) {
|
| 44 |
+
if (options) {
|
| 45 |
+
// First check the `secureEndpoint` property explicitly, since this
|
| 46 |
+
// means that a parent `Agent` is "passing through" to this instance.
|
| 47 |
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
| 48 |
+
if (typeof options.secureEndpoint === 'boolean') {
|
| 49 |
+
return options.secureEndpoint;
|
| 50 |
+
}
|
| 51 |
+
// If no explicit `secure` endpoint, check if `protocol` property is
|
| 52 |
+
// set. This will usually be the case since using a full string URL
|
| 53 |
+
// or `URL` instance should be the most common usage.
|
| 54 |
+
if (typeof options.protocol === 'string') {
|
| 55 |
+
return options.protocol === 'https:';
|
| 56 |
+
}
|
| 57 |
+
}
|
| 58 |
+
// Finally, if no `protocol` property was set, then fall back to
|
| 59 |
+
// checking the stack trace of the current call stack, and try to
|
| 60 |
+
// detect the "https" module.
|
| 61 |
+
const { stack } = new Error();
|
| 62 |
+
if (typeof stack !== 'string')
|
| 63 |
+
return false;
|
| 64 |
+
return stack
|
| 65 |
+
.split('\n')
|
| 66 |
+
.some((l) => l.indexOf('(https.js:') !== -1 ||
|
| 67 |
+
l.indexOf('node:https:') !== -1);
|
| 68 |
+
}
|
| 69 |
+
// In order to support async signatures in `connect()` and Node's native
|
| 70 |
+
// connection pooling in `http.Agent`, the array of sockets for each origin
|
| 71 |
+
// has to be updated synchronously. This is so the length of the array is
|
| 72 |
+
// accurate when `addRequest()` is next called. We achieve this by creating a
|
| 73 |
+
// fake socket and adding it to `sockets[origin]` and incrementing
|
| 74 |
+
// `totalSocketCount`.
|
| 75 |
+
incrementSockets(name) {
|
| 76 |
+
// If `maxSockets` and `maxTotalSockets` are both Infinity then there is no
|
| 77 |
+
// need to create a fake socket because Node.js native connection pooling
|
| 78 |
+
// will never be invoked.
|
| 79 |
+
if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
|
| 80 |
+
return null;
|
| 81 |
+
}
|
| 82 |
+
// All instances of `sockets` are expected TypeScript errors. The
|
| 83 |
+
// alternative is to add it as a private property of this class but that
|
| 84 |
+
// will break TypeScript subclassing.
|
| 85 |
+
if (!this.sockets[name]) {
|
| 86 |
+
// @ts-expect-error `sockets` is readonly in `@types/node`
|
| 87 |
+
this.sockets[name] = [];
|
| 88 |
+
}
|
| 89 |
+
const fakeSocket = new net.Socket({ writable: false });
|
| 90 |
+
this.sockets[name].push(fakeSocket);
|
| 91 |
+
// @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
|
| 92 |
+
this.totalSocketCount++;
|
| 93 |
+
return fakeSocket;
|
| 94 |
+
}
|
| 95 |
+
decrementSockets(name, socket) {
|
| 96 |
+
if (!this.sockets[name] || socket === null) {
|
| 97 |
+
return;
|
| 98 |
+
}
|
| 99 |
+
const sockets = this.sockets[name];
|
| 100 |
+
const index = sockets.indexOf(socket);
|
| 101 |
+
if (index !== -1) {
|
| 102 |
+
sockets.splice(index, 1);
|
| 103 |
+
// @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
|
| 104 |
+
this.totalSocketCount--;
|
| 105 |
+
if (sockets.length === 0) {
|
| 106 |
+
// @ts-expect-error `sockets` is readonly in `@types/node`
|
| 107 |
+
delete this.sockets[name];
|
| 108 |
+
}
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
// In order to properly update the socket pool, we need to call `getName()` on
|
| 112 |
+
// the core `https.Agent` if it is a secureEndpoint.
|
| 113 |
+
getName(options) {
|
| 114 |
+
const secureEndpoint = this.isSecureEndpoint(options);
|
| 115 |
+
if (secureEndpoint) {
|
| 116 |
+
// @ts-expect-error `getName()` isn't defined in `@types/node`
|
| 117 |
+
return https_1.Agent.prototype.getName.call(this, options);
|
| 118 |
+
}
|
| 119 |
+
// @ts-expect-error `getName()` isn't defined in `@types/node`
|
| 120 |
+
return super.getName(options);
|
| 121 |
+
}
|
| 122 |
+
createSocket(req, options, cb) {
|
| 123 |
+
const connectOpts = {
|
| 124 |
+
...options,
|
| 125 |
+
secureEndpoint: this.isSecureEndpoint(options),
|
| 126 |
+
};
|
| 127 |
+
const name = this.getName(connectOpts);
|
| 128 |
+
const fakeSocket = this.incrementSockets(name);
|
| 129 |
+
Promise.resolve()
|
| 130 |
+
.then(() => this.connect(req, connectOpts))
|
| 131 |
+
.then((socket) => {
|
| 132 |
+
this.decrementSockets(name, fakeSocket);
|
| 133 |
+
if (socket instanceof http.Agent) {
|
| 134 |
+
try {
|
| 135 |
+
// @ts-expect-error `addRequest()` isn't defined in `@types/node`
|
| 136 |
+
return socket.addRequest(req, connectOpts);
|
| 137 |
+
}
|
| 138 |
+
catch (err) {
|
| 139 |
+
return cb(err);
|
| 140 |
+
}
|
| 141 |
+
}
|
| 142 |
+
this[INTERNAL].currentSocket = socket;
|
| 143 |
+
// @ts-expect-error `createSocket()` isn't defined in `@types/node`
|
| 144 |
+
super.createSocket(req, options, cb);
|
| 145 |
+
}, (err) => {
|
| 146 |
+
this.decrementSockets(name, fakeSocket);
|
| 147 |
+
cb(err);
|
| 148 |
+
});
|
| 149 |
+
}
|
| 150 |
+
createConnection() {
|
| 151 |
+
const socket = this[INTERNAL].currentSocket;
|
| 152 |
+
this[INTERNAL].currentSocket = undefined;
|
| 153 |
+
if (!socket) {
|
| 154 |
+
throw new Error('No socket was returned in the `connect()` function');
|
| 155 |
+
}
|
| 156 |
+
return socket;
|
| 157 |
+
}
|
| 158 |
+
get defaultPort() {
|
| 159 |
+
return (this[INTERNAL].defaultPort ??
|
| 160 |
+
(this.protocol === 'https:' ? 443 : 80));
|
| 161 |
+
}
|
| 162 |
+
set defaultPort(v) {
|
| 163 |
+
if (this[INTERNAL]) {
|
| 164 |
+
this[INTERNAL].defaultPort = v;
|
| 165 |
+
}
|
| 166 |
+
}
|
| 167 |
+
get protocol() {
|
| 168 |
+
return (this[INTERNAL].protocol ??
|
| 169 |
+
(this.isSecureEndpoint() ? 'https:' : 'http:'));
|
| 170 |
+
}
|
| 171 |
+
set protocol(v) {
|
| 172 |
+
if (this[INTERNAL]) {
|
| 173 |
+
this[INTERNAL].protocol = v;
|
| 174 |
+
}
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
exports.Agent = Agent;
|
| 178 |
+
//# sourceMappingURL=index.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/agent-base/dist/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,y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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE HTML>
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
| 6 |
+
<meta name="Author" content="M Mclaughlin">
|
| 7 |
+
<title>bignumber.js API</title>
|
| 8 |
+
<style>
|
| 9 |
+
html{font-size:100%}
|
| 10 |
+
body{background:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;
|
| 11 |
+
line-height:1.65em;min-height:100%;margin:0}
|
| 12 |
+
body,i{color:#000}
|
| 13 |
+
.nav{background:#fff;position:fixed;top:0;bottom:0;left:0;width:200px;overflow-y:auto;
|
| 14 |
+
padding:15px 0 30px 15px}
|
| 15 |
+
div.container{width:600px;margin:50px 0 50px 240px}
|
| 16 |
+
p{margin:0 0 1em;width:600px}
|
| 17 |
+
pre,ul{margin:1em 0}
|
| 18 |
+
h1,h2,h3,h4,h5{margin:0;padding:1.5em 0 0}
|
| 19 |
+
h1,h2{padding:.75em 0}
|
| 20 |
+
h1{font:400 3em Verdana,sans-serif;color:#000;margin-bottom:1em}
|
| 21 |
+
h2{font-size:2.25em;color:#ff2a00}
|
| 22 |
+
h3{font-size:1.75em;color:#4dc71f}
|
| 23 |
+
h4{font-size:1.75em;color:#ff2a00;padding-bottom:.75em}
|
| 24 |
+
h5{font-size:1.2em;margin-bottom:.4em}
|
| 25 |
+
h6{font-size:1.1em;margin-bottom:0.8em;padding:0.5em 0}
|
| 26 |
+
dd{padding-top:.35em}
|
| 27 |
+
dt{padding-top:.5em}
|
| 28 |
+
b{font-weight:700}
|
| 29 |
+
dt b{font-size:1.3em}
|
| 30 |
+
a,a:visited{color:#ff2a00;text-decoration:none}
|
| 31 |
+
a:active,a:hover{outline:0;text-decoration:underline}
|
| 32 |
+
.nav a,.nav b,.nav a:visited{display:block;color:#ff2a00;font-weight:700; margin-top:15px}
|
| 33 |
+
.nav b{color:#4dc71f;margin-top:20px;cursor:default;width:auto}
|
| 34 |
+
ul{list-style-type:none;padding:0 0 0 20px}
|
| 35 |
+
.nav ul{line-height:14px;padding-left:0;margin:5px 0 0}
|
| 36 |
+
.nav ul a,.nav ul a:visited,span{display:inline;color:#000;font-family:Verdana,Geneva,sans-serif;
|
| 37 |
+
font-size:11px;font-weight:400;margin:0}
|
| 38 |
+
.inset,ul.inset{margin-left:20px}
|
| 39 |
+
.inset{font-size:.9em}
|
| 40 |
+
.nav li{width:auto;margin:0 0 3px}
|
| 41 |
+
.alias{font-style:italic;margin-left:20px}
|
| 42 |
+
table{border-collapse:collapse;border-spacing:0;border:2px solid #a7dbd8;margin:1.75em 0;padding:0}
|
| 43 |
+
td,th{text-align:left;margin:0;padding:2px 5px;border:1px dotted #a7dbd8}
|
| 44 |
+
th{border-top:2px solid #a7dbd8;border-bottom:2px solid #a7dbd8;color:#ff2a00}
|
| 45 |
+
code,pre{font-family:Consolas, monaco, monospace;font-weight:400}
|
| 46 |
+
pre{background:#f5f5f5;white-space:pre-wrap;word-wrap:break-word;border-left:5px solid #abef98;
|
| 47 |
+
padding:1px 0 1px 15px;margin:1.2em 0}
|
| 48 |
+
code,.nav-title{color:#ff2a00}
|
| 49 |
+
.end{margin-bottom:25px}
|
| 50 |
+
.centre{text-align:center}
|
| 51 |
+
.error-table{font-size:13px;width:100%}
|
| 52 |
+
#faq{margin:3em 0 0}
|
| 53 |
+
li span{float:right;margin-right:10px;color:#c0c0c0}
|
| 54 |
+
#js{font:inherit;color:#4dc71f}
|
| 55 |
+
</style>
|
| 56 |
+
</head>
|
| 57 |
+
<body>
|
| 58 |
+
|
| 59 |
+
<div class="nav">
|
| 60 |
+
|
| 61 |
+
<b>v9.0.2</b>
|
| 62 |
+
|
| 63 |
+
<a class='nav-title' href="#">API</a>
|
| 64 |
+
|
| 65 |
+
<b> CONSTRUCTOR </b>
|
| 66 |
+
<ul>
|
| 67 |
+
<li><a href="#bignumber">BigNumber</a></li>
|
| 68 |
+
</ul>
|
| 69 |
+
|
| 70 |
+
<a href="#methods">Methods</a>
|
| 71 |
+
<ul>
|
| 72 |
+
<li><a href="#clone">clone</a></li>
|
| 73 |
+
<li><a href="#config" >config</a><span>set</span></li>
|
| 74 |
+
<li>
|
| 75 |
+
<ul class="inset">
|
| 76 |
+
<li><a href="#decimal-places">DECIMAL_PLACES</a></li>
|
| 77 |
+
<li><a href="#rounding-mode" >ROUNDING_MODE</a></li>
|
| 78 |
+
<li><a href="#exponential-at">EXPONENTIAL_AT</a></li>
|
| 79 |
+
<li><a href="#range" >RANGE</a></li>
|
| 80 |
+
<li><a href="#crypto" >CRYPTO</a></li>
|
| 81 |
+
<li><a href="#modulo-mode" >MODULO_MODE</a></li>
|
| 82 |
+
<li><a href="#pow-precision" >POW_PRECISION</a></li>
|
| 83 |
+
<li><a href="#format" >FORMAT</a></li>
|
| 84 |
+
<li><a href="#alphabet" >ALPHABET</a></li>
|
| 85 |
+
</ul>
|
| 86 |
+
</li>
|
| 87 |
+
<li><a href="#isBigNumber">isBigNumber</a></li>
|
| 88 |
+
<li><a href="#max" >maximum</a><span>max</span></li>
|
| 89 |
+
<li><a href="#min" >minimum</a><span>min</span></li>
|
| 90 |
+
<li><a href="#random" >random</a></li>
|
| 91 |
+
<li><a href="#sum" >sum</a></li>
|
| 92 |
+
</ul>
|
| 93 |
+
|
| 94 |
+
<a href="#constructor-properties">Properties</a>
|
| 95 |
+
<ul>
|
| 96 |
+
<li><a href="#round-up" >ROUND_UP</a></li>
|
| 97 |
+
<li><a href="#round-down" >ROUND_DOWN</a></li>
|
| 98 |
+
<li><a href="#round-ceil" >ROUND_CEIL</a></li>
|
| 99 |
+
<li><a href="#round-floor" >ROUND_FLOOR</a></li>
|
| 100 |
+
<li><a href="#round-half-up" >ROUND_HALF_UP</a></li>
|
| 101 |
+
<li><a href="#round-half-down" >ROUND_HALF_DOWN</a></li>
|
| 102 |
+
<li><a href="#round-half-even" >ROUND_HALF_EVEN</a></li>
|
| 103 |
+
<li><a href="#round-half-ceil" >ROUND_HALF_CEIL</a></li>
|
| 104 |
+
<li><a href="#round-half-floor">ROUND_HALF_FLOOR</a></li>
|
| 105 |
+
<li><a href="#debug" >DEBUG</a></li>
|
| 106 |
+
</ul>
|
| 107 |
+
|
| 108 |
+
<b> INSTANCE </b>
|
| 109 |
+
|
| 110 |
+
<a href="#prototype-methods">Methods</a>
|
| 111 |
+
<ul>
|
| 112 |
+
<li><a href="#abs" >absoluteValue </a><span>abs</span> </li>
|
| 113 |
+
<li><a href="#cmp" >comparedTo </a> </li>
|
| 114 |
+
<li><a href="#dp" >decimalPlaces </a><span>dp</span> </li>
|
| 115 |
+
<li><a href="#div" >dividedBy </a><span>div</span> </li>
|
| 116 |
+
<li><a href="#divInt" >dividedToIntegerBy </a><span>idiv</span> </li>
|
| 117 |
+
<li><a href="#pow" >exponentiatedBy </a><span>pow</span> </li>
|
| 118 |
+
<li><a href="#int" >integerValue </a> </li>
|
| 119 |
+
<li><a href="#eq" >isEqualTo </a><span>eq</span> </li>
|
| 120 |
+
<li><a href="#isF" >isFinite </a> </li>
|
| 121 |
+
<li><a href="#gt" >isGreaterThan </a><span>gt</span> </li>
|
| 122 |
+
<li><a href="#gte" >isGreaterThanOrEqualTo</a><span>gte</span> </li>
|
| 123 |
+
<li><a href="#isInt" >isInteger </a> </li>
|
| 124 |
+
<li><a href="#lt" >isLessThan </a><span>lt</span> </li>
|
| 125 |
+
<li><a href="#lte" >isLessThanOrEqualTo </a><span>lte</span> </li>
|
| 126 |
+
<li><a href="#isNaN" >isNaN </a> </li>
|
| 127 |
+
<li><a href="#isNeg" >isNegative </a> </li>
|
| 128 |
+
<li><a href="#isPos" >isPositive </a> </li>
|
| 129 |
+
<li><a href="#isZ" >isZero </a> </li>
|
| 130 |
+
<li><a href="#minus" >minus </a> </li>
|
| 131 |
+
<li><a href="#mod" >modulo </a><span>mod</span> </li>
|
| 132 |
+
<li><a href="#times" >multipliedBy </a><span>times</span></li>
|
| 133 |
+
<li><a href="#neg" >negated </a> </li>
|
| 134 |
+
<li><a href="#plus" >plus </a> </li>
|
| 135 |
+
<li><a href="#sd" >precision </a><span>sd</span> </li>
|
| 136 |
+
<li><a href="#shift" >shiftedBy </a> </li>
|
| 137 |
+
<li><a href="#sqrt" >squareRoot </a><span>sqrt</span> </li>
|
| 138 |
+
<li><a href="#toE" >toExponential </a> </li>
|
| 139 |
+
<li><a href="#toFix" >toFixed </a> </li>
|
| 140 |
+
<li><a href="#toFor" >toFormat </a> </li>
|
| 141 |
+
<li><a href="#toFr" >toFraction </a> </li>
|
| 142 |
+
<li><a href="#toJSON" >toJSON </a> </li>
|
| 143 |
+
<li><a href="#toN" >toNumber </a> </li>
|
| 144 |
+
<li><a href="#toP" >toPrecision </a> </li>
|
| 145 |
+
<li><a href="#toS" >toString </a> </li>
|
| 146 |
+
<li><a href="#valueOf">valueOf </a> </li>
|
| 147 |
+
</ul>
|
| 148 |
+
|
| 149 |
+
<a href="#instance-properties">Properties</a>
|
| 150 |
+
<ul>
|
| 151 |
+
<li><a href="#coefficient">c: coefficient</a></li>
|
| 152 |
+
<li><a href="#exponent" >e: exponent</a></li>
|
| 153 |
+
<li><a href="#sign" >s: sign</a></li>
|
| 154 |
+
</ul>
|
| 155 |
+
|
| 156 |
+
<a href="#zero-nan-infinity">Zero, NaN & Infinity</a>
|
| 157 |
+
<a href="#Errors">Errors</a>
|
| 158 |
+
<a href="#type-coercion">Type coercion</a>
|
| 159 |
+
<a class='end' href="#faq">FAQ</a>
|
| 160 |
+
|
| 161 |
+
</div>
|
| 162 |
+
|
| 163 |
+
<div class="container">
|
| 164 |
+
|
| 165 |
+
<h1>bignumber<span id='js'>.js</span></h1>
|
| 166 |
+
|
| 167 |
+
<p>A JavaScript library for arbitrary-precision arithmetic.</p>
|
| 168 |
+
<p><a href="https://github.com/MikeMcl/bignumber.js">Hosted on GitHub</a>. </p>
|
| 169 |
+
|
| 170 |
+
<h2>API</h2>
|
| 171 |
+
|
| 172 |
+
<p>
|
| 173 |
+
See the <a href='https://github.com/MikeMcl/bignumber.js'>README</a> on GitHub for a
|
| 174 |
+
quick-start introduction.
|
| 175 |
+
</p>
|
| 176 |
+
<p>
|
| 177 |
+
In all examples below, <code>var</code> and semicolons are not shown, and if a commented-out
|
| 178 |
+
value is in quotes it means <code>toString</code> has been called on the preceding expression.
|
| 179 |
+
</p>
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
<h3>CONSTRUCTOR</h3>
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
<h5 id="bignumber">
|
| 186 |
+
BigNumber<code class='inset'>BigNumber(n [, base]) <i>⇒ BigNumber</i></code>
|
| 187 |
+
</h5>
|
| 188 |
+
<p>
|
| 189 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 190 |
+
<code>base</code>: <i>number</i>: integer, <code>2</code> to <code>36</code> inclusive. (See
|
| 191 |
+
<a href='#alphabet'><code>ALPHABET</code></a> to extend this range).
|
| 192 |
+
</p>
|
| 193 |
+
<p>
|
| 194 |
+
Returns a new instance of a BigNumber object with value <code>n</code>, where <code>n</code>
|
| 195 |
+
is a numeric value in the specified <code>base</code>, or base <code>10</code> if
|
| 196 |
+
<code>base</code> is omitted or is <code>null</code> or <code>undefined</code>.
|
| 197 |
+
</p>
|
| 198 |
+
<p>
|
| 199 |
+
Note that the BigNnumber constructor accepts an <code>n</code> of type <em>number</em> purely
|
| 200 |
+
as a convenience so that string quotes don't have to be typed when entering literal values,
|
| 201 |
+
and that it is the <code>toString</code> value of <code>n</code> that is used rather than its
|
| 202 |
+
underlying binary floating point value converted to decimal.
|
| 203 |
+
</p>
|
| 204 |
+
<pre>
|
| 205 |
+
x = new BigNumber(123.4567) // '123.4567'
|
| 206 |
+
// 'new' is optional
|
| 207 |
+
y = BigNumber(x) // '123.4567'</pre>
|
| 208 |
+
<p>
|
| 209 |
+
If <code>n</code> is a base <code>10</code> value it can be in normal or exponential notation.
|
| 210 |
+
Values in other bases must be in normal notation. Values in any base can have fraction digits,
|
| 211 |
+
i.e. digits after the decimal point.
|
| 212 |
+
</p>
|
| 213 |
+
<pre>
|
| 214 |
+
new BigNumber(43210) // '43210'
|
| 215 |
+
new BigNumber('4.321e+4') // '43210'
|
| 216 |
+
new BigNumber('-735.0918e-430') // '-7.350918e-428'
|
| 217 |
+
new BigNumber('123412421.234324', 5) // '607236.557696'</pre>
|
| 218 |
+
<p>
|
| 219 |
+
Signed <code>0</code>, signed <code>Infinity</code> and <code>NaN</code> are supported.
|
| 220 |
+
</p>
|
| 221 |
+
<pre>
|
| 222 |
+
new BigNumber('-Infinity') // '-Infinity'
|
| 223 |
+
new BigNumber(NaN) // 'NaN'
|
| 224 |
+
new BigNumber(-0) // '0'
|
| 225 |
+
new BigNumber('.5') // '0.5'
|
| 226 |
+
new BigNumber('+2') // '2'</pre>
|
| 227 |
+
<p>
|
| 228 |
+
String values in hexadecimal literal form, e.g. <code>'0xff'</code> or <code>'0xFF'</code>
|
| 229 |
+
(but not <code>'0xfF'</code>), are valid, as are string values with the octal and binary
|
| 230 |
+
prefixs <code>'0o'</code> and <code>'0b'</code>. String values in octal literal form without
|
| 231 |
+
the prefix will be interpreted as decimals, e.g. <code>'011'</code> is interpreted as 11, not 9.
|
| 232 |
+
</p>
|
| 233 |
+
<pre>
|
| 234 |
+
new BigNumber(-10110100.1, 2) // '-180.5'
|
| 235 |
+
new BigNumber('-0b10110100.1') // '-180.5'
|
| 236 |
+
new BigNumber('ff.8', 16) // '255.5'
|
| 237 |
+
new BigNumber('0xff.8') // '255.5'</pre>
|
| 238 |
+
<p>
|
| 239 |
+
If a base is specified, <code>n</code> is rounded according to the current
|
| 240 |
+
<a href='#decimal-places'><code>DECIMAL_PLACES</code></a> and
|
| 241 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> settings. <em>This includes base
|
| 242 |
+
<code>10</code> so don't include a <code>base</code> parameter for decimal values unless
|
| 243 |
+
this behaviour is wanted.</em>
|
| 244 |
+
</p>
|
| 245 |
+
<pre>BigNumber.config({ DECIMAL_PLACES: 5 })
|
| 246 |
+
new BigNumber(1.23456789) // '1.23456789'
|
| 247 |
+
new BigNumber(1.23456789, 10) // '1.23457'</pre>
|
| 248 |
+
<p>An error is thrown if <code>base</code> is invalid. See <a href='#Errors'>Errors</a>.</p>
|
| 249 |
+
<p>
|
| 250 |
+
There is no limit to the number of digits of a value of type <em>string</em> (other than
|
| 251 |
+
that of JavaScript's maximum array size). See <a href='#range'><code>RANGE</code></a> to set
|
| 252 |
+
the maximum and minimum possible exponent value of a BigNumber.
|
| 253 |
+
</p>
|
| 254 |
+
<pre>
|
| 255 |
+
new BigNumber('5032485723458348569331745.33434346346912144534543')
|
| 256 |
+
new BigNumber('4.321e10000000')</pre>
|
| 257 |
+
<p>BigNumber <code>NaN</code> is returned if <code>n</code> is invalid
|
| 258 |
+
(unless <code>BigNumber.DEBUG</code> is <code>true</code>, see below).</p>
|
| 259 |
+
<pre>
|
| 260 |
+
new BigNumber('.1*') // 'NaN'
|
| 261 |
+
new BigNumber('blurgh') // 'NaN'
|
| 262 |
+
new BigNumber(9, 2) // 'NaN'</pre>
|
| 263 |
+
<p>
|
| 264 |
+
To aid in debugging, if <code>BigNumber.DEBUG</code> is <code>true</code> then an error will
|
| 265 |
+
be thrown on an invalid <code>n</code>. An error will also be thrown if <code>n</code> is of
|
| 266 |
+
type <em>number</em> and has more than <code>15</code> significant digits, as calling
|
| 267 |
+
<code><a href='#toS'>toString</a></code> or <code><a href='#valueOf'>valueOf</a></code> on
|
| 268 |
+
these numbers may not result in the intended value.
|
| 269 |
+
</p>
|
| 270 |
+
<pre>
|
| 271 |
+
console.log(823456789123456.3) // 823456789123456.2
|
| 272 |
+
new BigNumber(823456789123456.3) // '823456789123456.2'
|
| 273 |
+
BigNumber.DEBUG = true
|
| 274 |
+
// '[BigNumber Error] Number primitive has more than 15 significant digits'
|
| 275 |
+
new BigNumber(823456789123456.3)
|
| 276 |
+
// '[BigNumber Error] Not a base 2 number'
|
| 277 |
+
new BigNumber(9, 2)</pre>
|
| 278 |
+
<p>
|
| 279 |
+
A BigNumber can also be created from an object literal.
|
| 280 |
+
Use <code><a href='#isBigNumber'>isBigNumber</a></code> to check that it is well-formed.
|
| 281 |
+
</p>
|
| 282 |
+
<pre>new BigNumber({ s: 1, e: 2, c: [ 777, 12300000000000 ], _isBigNumber: true }) // '777.123'</pre>
|
| 283 |
+
|
| 284 |
+
|
| 285 |
+
|
| 286 |
+
|
| 287 |
+
<h4 id="methods">Methods</h4>
|
| 288 |
+
<p>The static methods of a BigNumber constructor.</p>
|
| 289 |
+
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
<h5 id="clone">clone
|
| 294 |
+
<code class='inset'>.clone([object]) <i>⇒ BigNumber constructor</i></code>
|
| 295 |
+
</h5>
|
| 296 |
+
<p><code>object</code>: <i>object</i></p>
|
| 297 |
+
<p>
|
| 298 |
+
Returns a new independent BigNumber constructor with configuration as described by
|
| 299 |
+
<code>object</code> (see <a href='#config'><code>config</code></a>), or with the default
|
| 300 |
+
configuration if <code>object</code> is <code>null</code> or <code>undefined</code>.
|
| 301 |
+
</p>
|
| 302 |
+
<p>
|
| 303 |
+
Throws if <code>object</code> is not an object. See <a href='#Errors'>Errors</a>.
|
| 304 |
+
</p>
|
| 305 |
+
<pre>BigNumber.config({ DECIMAL_PLACES: 5 })
|
| 306 |
+
BN = BigNumber.clone({ DECIMAL_PLACES: 9 })
|
| 307 |
+
|
| 308 |
+
x = new BigNumber(1)
|
| 309 |
+
y = new BN(1)
|
| 310 |
+
|
| 311 |
+
x.div(3) // 0.33333
|
| 312 |
+
y.div(3) // 0.333333333
|
| 313 |
+
|
| 314 |
+
// BN = BigNumber.clone({ DECIMAL_PLACES: 9 }) is equivalent to:
|
| 315 |
+
BN = BigNumber.clone()
|
| 316 |
+
BN.config({ DECIMAL_PLACES: 9 })</pre>
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
<h5 id="config">config<code class='inset'>set([object]) <i>⇒ object</i></code></h5>
|
| 321 |
+
<p>
|
| 322 |
+
<code>object</code>: <i>object</i>: an object that contains some or all of the following
|
| 323 |
+
properties.
|
| 324 |
+
</p>
|
| 325 |
+
<p>Configures the settings for this particular BigNumber constructor.</p>
|
| 326 |
+
|
| 327 |
+
<dl class='inset'>
|
| 328 |
+
<dt id="decimal-places"><code><b>DECIMAL_PLACES</b></code></dt>
|
| 329 |
+
<dd>
|
| 330 |
+
<i>number</i>: integer, <code>0</code> to <code>1e+9</code> inclusive<br />
|
| 331 |
+
Default value: <code>20</code>
|
| 332 |
+
</dd>
|
| 333 |
+
<dd>
|
| 334 |
+
The <em>maximum</em> number of decimal places of the results of operations involving
|
| 335 |
+
division, i.e. division, square root and base conversion operations, and power operations
|
| 336 |
+
with negative exponents.<br />
|
| 337 |
+
</dd>
|
| 338 |
+
<dd>
|
| 339 |
+
<pre>BigNumber.config({ DECIMAL_PLACES: 5 })
|
| 340 |
+
BigNumber.set({ DECIMAL_PLACES: 5 }) // equivalent</pre>
|
| 341 |
+
</dd>
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
|
| 345 |
+
<dt id="rounding-mode"><code><b>ROUNDING_MODE</b></code></dt>
|
| 346 |
+
<dd>
|
| 347 |
+
<i>number</i>: integer, <code>0</code> to <code>8</code> inclusive<br />
|
| 348 |
+
Default value: <code>4</code> <a href="#round-half-up">(<code>ROUND_HALF_UP</code>)</a>
|
| 349 |
+
</dd>
|
| 350 |
+
<dd>
|
| 351 |
+
The rounding mode used in the above operations and the default rounding mode of
|
| 352 |
+
<a href='#dp'><code>decimalPlaces</code></a>,
|
| 353 |
+
<a href='#sd'><code>precision</code></a>,
|
| 354 |
+
<a href='#toE'><code>toExponential</code></a>,
|
| 355 |
+
<a href='#toFix'><code>toFixed</code></a>,
|
| 356 |
+
<a href='#toFor'><code>toFormat</code></a> and
|
| 357 |
+
<a href='#toP'><code>toPrecision</code></a>.
|
| 358 |
+
</dd>
|
| 359 |
+
<dd>The modes are available as enumerated properties of the BigNumber constructor.</dd>
|
| 360 |
+
<dd>
|
| 361 |
+
<pre>BigNumber.config({ ROUNDING_MODE: 0 })
|
| 362 |
+
BigNumber.set({ ROUNDING_MODE: BigNumber.ROUND_UP }) // equivalent</pre>
|
| 363 |
+
</dd>
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
<dt id="exponential-at"><code><b>EXPONENTIAL_AT</b></code></dt>
|
| 368 |
+
<dd>
|
| 369 |
+
<i>number</i>: integer, magnitude <code>0</code> to <code>1e+9</code> inclusive, or
|
| 370 |
+
<br />
|
| 371 |
+
<i>number</i>[]: [ integer <code>-1e+9</code> to <code>0</code> inclusive, integer
|
| 372 |
+
<code>0</code> to <code>1e+9</code> inclusive ]<br />
|
| 373 |
+
Default value: <code>[-7, 20]</code>
|
| 374 |
+
</dd>
|
| 375 |
+
<dd>
|
| 376 |
+
The exponent value(s) at which <code>toString</code> returns exponential notation.
|
| 377 |
+
</dd>
|
| 378 |
+
<dd>
|
| 379 |
+
If a single number is assigned, the value is the exponent magnitude.<br />
|
| 380 |
+
If an array of two numbers is assigned then the first number is the negative exponent
|
| 381 |
+
value at and beneath which exponential notation is used, and the second number is the
|
| 382 |
+
positive exponent value at and above which the same.
|
| 383 |
+
</dd>
|
| 384 |
+
<dd>
|
| 385 |
+
For example, to emulate JavaScript numbers in terms of the exponent values at which they
|
| 386 |
+
begin to use exponential notation, use <code>[-7, 20]</code>.
|
| 387 |
+
</dd>
|
| 388 |
+
<dd>
|
| 389 |
+
<pre>BigNumber.config({ EXPONENTIAL_AT: 2 })
|
| 390 |
+
new BigNumber(12.3) // '12.3' e is only 1
|
| 391 |
+
new BigNumber(123) // '1.23e+2'
|
| 392 |
+
new BigNumber(0.123) // '0.123' e is only -1
|
| 393 |
+
new BigNumber(0.0123) // '1.23e-2'
|
| 394 |
+
|
| 395 |
+
BigNumber.config({ EXPONENTIAL_AT: [-7, 20] })
|
| 396 |
+
new BigNumber(123456789) // '123456789' e is only 8
|
| 397 |
+
new BigNumber(0.000000123) // '1.23e-7'
|
| 398 |
+
|
| 399 |
+
// Almost never return exponential notation:
|
| 400 |
+
BigNumber.config({ EXPONENTIAL_AT: 1e+9 })
|
| 401 |
+
|
| 402 |
+
// Always return exponential notation:
|
| 403 |
+
BigNumber.config({ EXPONENTIAL_AT: 0 })</pre>
|
| 404 |
+
</dd>
|
| 405 |
+
<dd>
|
| 406 |
+
Regardless of the value of <code>EXPONENTIAL_AT</code>, the <code>toFixed</code> method
|
| 407 |
+
will always return a value in normal notation and the <code>toExponential</code> method
|
| 408 |
+
will always return a value in exponential form.
|
| 409 |
+
</dd>
|
| 410 |
+
<dd>
|
| 411 |
+
Calling <code>toString</code> with a base argument, e.g. <code>toString(10)</code>, will
|
| 412 |
+
also always return normal notation.
|
| 413 |
+
</dd>
|
| 414 |
+
|
| 415 |
+
|
| 416 |
+
|
| 417 |
+
<dt id="range"><code><b>RANGE</b></code></dt>
|
| 418 |
+
<dd>
|
| 419 |
+
<i>number</i>: integer, magnitude <code>1</code> to <code>1e+9</code> inclusive, or
|
| 420 |
+
<br />
|
| 421 |
+
<i>number</i>[]: [ integer <code>-1e+9</code> to <code>-1</code> inclusive, integer
|
| 422 |
+
<code>1</code> to <code>1e+9</code> inclusive ]<br />
|
| 423 |
+
Default value: <code>[-1e+9, 1e+9]</code>
|
| 424 |
+
</dd>
|
| 425 |
+
<dd>
|
| 426 |
+
The exponent value(s) beyond which overflow to <code>Infinity</code> and underflow to
|
| 427 |
+
zero occurs.
|
| 428 |
+
</dd>
|
| 429 |
+
<dd>
|
| 430 |
+
If a single number is assigned, it is the maximum exponent magnitude: values wth a
|
| 431 |
+
positive exponent of greater magnitude become <code>Infinity</code> and those with a
|
| 432 |
+
negative exponent of greater magnitude become zero.
|
| 433 |
+
<dd>
|
| 434 |
+
If an array of two numbers is assigned then the first number is the negative exponent
|
| 435 |
+
limit and the second number is the positive exponent limit.
|
| 436 |
+
</dd>
|
| 437 |
+
<dd>
|
| 438 |
+
For example, to emulate JavaScript numbers in terms of the exponent values at which they
|
| 439 |
+
become zero and <code>Infinity</code>, use <code>[-324, 308]</code>.
|
| 440 |
+
</dd>
|
| 441 |
+
<dd>
|
| 442 |
+
<pre>BigNumber.config({ RANGE: 500 })
|
| 443 |
+
BigNumber.config().RANGE // [ -500, 500 ]
|
| 444 |
+
new BigNumber('9.999e499') // '9.999e+499'
|
| 445 |
+
new BigNumber('1e500') // 'Infinity'
|
| 446 |
+
new BigNumber('1e-499') // '1e-499'
|
| 447 |
+
new BigNumber('1e-500') // '0'
|
| 448 |
+
|
| 449 |
+
BigNumber.config({ RANGE: [-3, 4] })
|
| 450 |
+
new BigNumber(99999) // '99999' e is only 4
|
| 451 |
+
new BigNumber(100000) // 'Infinity' e is 5
|
| 452 |
+
new BigNumber(0.001) // '0.01' e is only -3
|
| 453 |
+
new BigNumber(0.0001) // '0' e is -4</pre>
|
| 454 |
+
</dd>
|
| 455 |
+
<dd>
|
| 456 |
+
The largest possible magnitude of a finite BigNumber is
|
| 457 |
+
<code>9.999...e+1000000000</code>.<br />
|
| 458 |
+
The smallest possible magnitude of a non-zero BigNumber is <code>1e-1000000000</code>.
|
| 459 |
+
</dd>
|
| 460 |
+
|
| 461 |
+
|
| 462 |
+
|
| 463 |
+
<dt id="crypto"><code><b>CRYPTO</b></code></dt>
|
| 464 |
+
<dd>
|
| 465 |
+
<i>boolean</i>: <code>true</code> or <code>false</code>.<br />
|
| 466 |
+
Default value: <code>false</code>
|
| 467 |
+
</dd>
|
| 468 |
+
<dd>
|
| 469 |
+
The value that determines whether cryptographically-secure pseudo-random number
|
| 470 |
+
generation is used.
|
| 471 |
+
</dd>
|
| 472 |
+
<dd>
|
| 473 |
+
If <code>CRYPTO</code> is set to <code>true</code> then the
|
| 474 |
+
<a href='#random'><code>random</code></a> method will generate random digits using
|
| 475 |
+
<code>crypto.getRandomValues</code> in browsers that support it, or
|
| 476 |
+
<code>crypto.randomBytes</code> if using Node.js.
|
| 477 |
+
</dd>
|
| 478 |
+
<dd>
|
| 479 |
+
If neither function is supported by the host environment then attempting to set
|
| 480 |
+
<code>CRYPTO</code> to <code>true</code> will fail and an exception will be thrown.
|
| 481 |
+
</dd>
|
| 482 |
+
<dd>
|
| 483 |
+
If <code>CRYPTO</code> is <code>false</code> then the source of randomness used will be
|
| 484 |
+
<code>Math.random</code> (which is assumed to generate at least <code>30</code> bits of
|
| 485 |
+
randomness).
|
| 486 |
+
</dd>
|
| 487 |
+
<dd>See <a href='#random'><code>random</code></a>.</dd>
|
| 488 |
+
<dd>
|
| 489 |
+
<pre>
|
| 490 |
+
// Node.js
|
| 491 |
+
const crypto = require('crypto'); // CommonJS
|
| 492 |
+
import * as crypto from 'crypto'; // ES module
|
| 493 |
+
|
| 494 |
+
global.crypto = crypto;
|
| 495 |
+
|
| 496 |
+
BigNumber.config({ CRYPTO: true })
|
| 497 |
+
BigNumber.config().CRYPTO // true
|
| 498 |
+
BigNumber.random() // 0.54340758610486147524</pre>
|
| 499 |
+
</dd>
|
| 500 |
+
|
| 501 |
+
|
| 502 |
+
|
| 503 |
+
<dt id="modulo-mode"><code><b>MODULO_MODE</b></code></dt>
|
| 504 |
+
<dd>
|
| 505 |
+
<i>number</i>: integer, <code>0</code> to <code>9</code> inclusive<br />
|
| 506 |
+
Default value: <code>1</code> (<a href="#round-down"><code>ROUND_DOWN</code></a>)
|
| 507 |
+
</dd>
|
| 508 |
+
<dd>The modulo mode used when calculating the modulus: <code>a mod n</code>.</dd>
|
| 509 |
+
<dd>
|
| 510 |
+
The quotient, <code>q = a / n</code>, is calculated according to the
|
| 511 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> that corresponds to the chosen
|
| 512 |
+
<code>MODULO_MODE</code>.
|
| 513 |
+
</dd>
|
| 514 |
+
<dd>The remainder, <code>r</code>, is calculated as: <code>r = a - n * q</code>.</dd>
|
| 515 |
+
<dd>
|
| 516 |
+
The modes that are most commonly used for the modulus/remainder operation are shown in
|
| 517 |
+
the following table. Although the other rounding modes can be used, they may not give
|
| 518 |
+
useful results.
|
| 519 |
+
</dd>
|
| 520 |
+
<dd>
|
| 521 |
+
<table>
|
| 522 |
+
<tr><th>Property</th><th>Value</th><th>Description</th></tr>
|
| 523 |
+
<tr>
|
| 524 |
+
<td><b>ROUND_UP</b></td><td class='centre'>0</td>
|
| 525 |
+
<td>
|
| 526 |
+
The remainder is positive if the dividend is negative, otherwise it is negative.
|
| 527 |
+
</td>
|
| 528 |
+
</tr>
|
| 529 |
+
<tr>
|
| 530 |
+
<td><b>ROUND_DOWN</b></td><td class='centre'>1</td>
|
| 531 |
+
<td>
|
| 532 |
+
The remainder has the same sign as the dividend.<br />
|
| 533 |
+
This uses 'truncating division' and matches the behaviour of JavaScript's
|
| 534 |
+
remainder operator <code>%</code>.
|
| 535 |
+
</td>
|
| 536 |
+
</tr>
|
| 537 |
+
<tr>
|
| 538 |
+
<td><b>ROUND_FLOOR</b></td><td class='centre'>3</td>
|
| 539 |
+
<td>
|
| 540 |
+
The remainder has the same sign as the divisor.<br />
|
| 541 |
+
This matches Python's <code>%</code> operator.
|
| 542 |
+
</td>
|
| 543 |
+
</tr>
|
| 544 |
+
<tr>
|
| 545 |
+
<td><b>ROUND_HALF_EVEN</b></td><td class='centre'>6</td>
|
| 546 |
+
<td>The <i>IEEE 754</i> remainder function.</td>
|
| 547 |
+
</tr>
|
| 548 |
+
<tr>
|
| 549 |
+
<td><b>EUCLID</b></td><td class='centre'>9</td>
|
| 550 |
+
<td>
|
| 551 |
+
The remainder is always positive. Euclidian division: <br />
|
| 552 |
+
<code>q = sign(n) * floor(a / abs(n))</code>
|
| 553 |
+
</td>
|
| 554 |
+
</tr>
|
| 555 |
+
</table>
|
| 556 |
+
</dd>
|
| 557 |
+
<dd>
|
| 558 |
+
The rounding/modulo modes are available as enumerated properties of the BigNumber
|
| 559 |
+
constructor.
|
| 560 |
+
</dd>
|
| 561 |
+
<dd>See <a href='#mod'><code>modulo</code></a>.</dd>
|
| 562 |
+
<dd>
|
| 563 |
+
<pre>BigNumber.config({ MODULO_MODE: BigNumber.EUCLID })
|
| 564 |
+
BigNumber.config({ MODULO_MODE: 9 }) // equivalent</pre>
|
| 565 |
+
</dd>
|
| 566 |
+
|
| 567 |
+
|
| 568 |
+
|
| 569 |
+
<dt id="pow-precision"><code><b>POW_PRECISION</b></code></dt>
|
| 570 |
+
<dd>
|
| 571 |
+
<i>number</i>: integer, <code>0</code> to <code>1e+9</code> inclusive.<br />
|
| 572 |
+
Default value: <code>0</code>
|
| 573 |
+
</dd>
|
| 574 |
+
<dd>
|
| 575 |
+
The <i>maximum</i> precision, i.e. number of significant digits, of the result of the power
|
| 576 |
+
operation (unless a modulus is specified).
|
| 577 |
+
</dd>
|
| 578 |
+
<dd>If set to <code>0</code>, the number of significant digits will not be limited.</dd>
|
| 579 |
+
<dd>See <a href='#pow'><code>exponentiatedBy</code></a>.</dd>
|
| 580 |
+
<dd><pre>BigNumber.config({ POW_PRECISION: 100 })</pre></dd>
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
<dt id="format"><code><b>FORMAT</b></code></dt>
|
| 585 |
+
<dd><i>object</i></dd>
|
| 586 |
+
<dd>
|
| 587 |
+
The <code>FORMAT</code> object configures the format of the string returned by the
|
| 588 |
+
<a href='#toFor'><code>toFormat</code></a> method.
|
| 589 |
+
</dd>
|
| 590 |
+
<dd>
|
| 591 |
+
The example below shows the properties of the <code>FORMAT</code> object that are
|
| 592 |
+
recognised, and their default values.
|
| 593 |
+
</dd>
|
| 594 |
+
<dd>
|
| 595 |
+
Unlike the other configuration properties, the values of the properties of the
|
| 596 |
+
<code>FORMAT</code> object will not be checked for validity. The existing
|
| 597 |
+
<code>FORMAT</code> object will simply be replaced by the object that is passed in.
|
| 598 |
+
The object can include any number of the properties shown below.
|
| 599 |
+
</dd>
|
| 600 |
+
<dd>See <a href='#toFor'><code>toFormat</code></a> for examples of usage.</dd>
|
| 601 |
+
<dd>
|
| 602 |
+
<pre>
|
| 603 |
+
BigNumber.config({
|
| 604 |
+
FORMAT: {
|
| 605 |
+
// string to prepend
|
| 606 |
+
prefix: '',
|
| 607 |
+
// decimal separator
|
| 608 |
+
decimalSeparator: '.',
|
| 609 |
+
// grouping separator of the integer part
|
| 610 |
+
groupSeparator: ',',
|
| 611 |
+
// primary grouping size of the integer part
|
| 612 |
+
groupSize: 3,
|
| 613 |
+
// secondary grouping size of the integer part
|
| 614 |
+
secondaryGroupSize: 0,
|
| 615 |
+
// grouping separator of the fraction part
|
| 616 |
+
fractionGroupSeparator: ' ',
|
| 617 |
+
// grouping size of the fraction part
|
| 618 |
+
fractionGroupSize: 0,
|
| 619 |
+
// string to append
|
| 620 |
+
suffix: ''
|
| 621 |
+
}
|
| 622 |
+
});</pre>
|
| 623 |
+
</dd>
|
| 624 |
+
|
| 625 |
+
|
| 626 |
+
|
| 627 |
+
<dt id="alphabet"><code><b>ALPHABET</b></code></dt>
|
| 628 |
+
<dd>
|
| 629 |
+
<i>string</i><br />
|
| 630 |
+
Default value: <code>'0123456789abcdefghijklmnopqrstuvwxyz'</code>
|
| 631 |
+
</dd>
|
| 632 |
+
<dd>
|
| 633 |
+
The alphabet used for base conversion. The length of the alphabet corresponds to the
|
| 634 |
+
maximum value of the base argument that can be passed to the
|
| 635 |
+
<a href='#bignumber'><code>BigNumber</code></a> constructor or
|
| 636 |
+
<a href='#toS'><code>toString</code></a>.
|
| 637 |
+
</dd>
|
| 638 |
+
<dd>
|
| 639 |
+
There is no maximum length for the alphabet, but it must be at least 2 characters long, and
|
| 640 |
+
it must not contain whitespace or a repeated character, or the sign indicators
|
| 641 |
+
<code>'+'</code> and <code>'-'</code>, or the decimal separator <code>'.'</code>.
|
| 642 |
+
</dd>
|
| 643 |
+
<dd>
|
| 644 |
+
<pre>// duodecimal (base 12)
|
| 645 |
+
BigNumber.config({ ALPHABET: '0123456789TE' })
|
| 646 |
+
x = new BigNumber('T', 12)
|
| 647 |
+
x.toString() // '10'
|
| 648 |
+
x.toString(12) // 'T'</pre>
|
| 649 |
+
</dd>
|
| 650 |
+
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
</dl>
|
| 654 |
+
<br /><br />
|
| 655 |
+
<p>Returns an object with the above properties and their current values.</p>
|
| 656 |
+
<p>
|
| 657 |
+
Throws if <code>object</code> is not an object, or if an invalid value is assigned to
|
| 658 |
+
one or more of the above properties. See <a href='#Errors'>Errors</a>.
|
| 659 |
+
</p>
|
| 660 |
+
<pre>
|
| 661 |
+
BigNumber.config({
|
| 662 |
+
DECIMAL_PLACES: 40,
|
| 663 |
+
ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL,
|
| 664 |
+
EXPONENTIAL_AT: [-10, 20],
|
| 665 |
+
RANGE: [-500, 500],
|
| 666 |
+
CRYPTO: true,
|
| 667 |
+
MODULO_MODE: BigNumber.ROUND_FLOOR,
|
| 668 |
+
POW_PRECISION: 80,
|
| 669 |
+
FORMAT: {
|
| 670 |
+
groupSize: 3,
|
| 671 |
+
groupSeparator: ' ',
|
| 672 |
+
decimalSeparator: ','
|
| 673 |
+
},
|
| 674 |
+
ALPHABET: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
|
| 675 |
+
});
|
| 676 |
+
|
| 677 |
+
obj = BigNumber.config();
|
| 678 |
+
obj.DECIMAL_PLACES // 40
|
| 679 |
+
obj.RANGE // [-500, 500]</pre>
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
<h5 id="isBigNumber">
|
| 684 |
+
isBigNumber<code class='inset'>.isBigNumber(value) <i>⇒ boolean</i></code>
|
| 685 |
+
</h5>
|
| 686 |
+
<p><code>value</code>: <i>any</i><br /></p>
|
| 687 |
+
<p>
|
| 688 |
+
Returns <code>true</code> if <code>value</code> is a BigNumber instance, otherwise returns
|
| 689 |
+
<code>false</code>.
|
| 690 |
+
</p>
|
| 691 |
+
<pre>x = 42
|
| 692 |
+
y = new BigNumber(x)
|
| 693 |
+
|
| 694 |
+
BigNumber.isBigNumber(x) // false
|
| 695 |
+
y instanceof BigNumber // true
|
| 696 |
+
BigNumber.isBigNumber(y) // true
|
| 697 |
+
|
| 698 |
+
BN = BigNumber.clone();
|
| 699 |
+
z = new BN(x)
|
| 700 |
+
z instanceof BigNumber // false
|
| 701 |
+
BigNumber.isBigNumber(z) // true</pre>
|
| 702 |
+
<p>
|
| 703 |
+
If <code>value</code> is a BigNumber instance and <code>BigNumber.DEBUG</code> is <code>true</code>,
|
| 704 |
+
then this method will also check if <code>value</code> is well-formed, and throw if it is not.
|
| 705 |
+
See <a href='#Errors'>Errors</a>.
|
| 706 |
+
</p>
|
| 707 |
+
<p>
|
| 708 |
+
The check can be useful if creating a BigNumber from an object literal.
|
| 709 |
+
See <a href='#bignumber'>BigNumber</a>.
|
| 710 |
+
</p>
|
| 711 |
+
<pre>
|
| 712 |
+
x = new BigNumber(10)
|
| 713 |
+
|
| 714 |
+
// Change x.c to an illegitimate value.
|
| 715 |
+
x.c = NaN
|
| 716 |
+
|
| 717 |
+
BigNumber.DEBUG = false
|
| 718 |
+
|
| 719 |
+
// No error.
|
| 720 |
+
BigNumber.isBigNumber(x) // true
|
| 721 |
+
|
| 722 |
+
BigNumber.DEBUG = true
|
| 723 |
+
|
| 724 |
+
// Error.
|
| 725 |
+
BigNumber.isBigNumber(x) // '[BigNumber Error] Invalid BigNumber'</pre>
|
| 726 |
+
|
| 727 |
+
|
| 728 |
+
|
| 729 |
+
<h5 id="max">maximum<code class='inset'>.max(n...) <i>⇒ BigNumber</i></code></h5>
|
| 730 |
+
<p>
|
| 731 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 732 |
+
<i>See <code><a href="#bignumber">BigNumber</a></code> for further parameter details.</i>
|
| 733 |
+
</p>
|
| 734 |
+
<p>
|
| 735 |
+
Returns a BigNumber whose value is the maximum of the arguments.
|
| 736 |
+
</p>
|
| 737 |
+
<p>The return value is always exact and unrounded.</p>
|
| 738 |
+
<pre>x = new BigNumber('3257869345.0378653')
|
| 739 |
+
BigNumber.maximum(4e9, x, '123456789.9') // '4000000000'
|
| 740 |
+
|
| 741 |
+
arr = [12, '13', new BigNumber(14)]
|
| 742 |
+
BigNumber.max.apply(null, arr) // '14'</pre>
|
| 743 |
+
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
<h5 id="min">minimum<code class='inset'>.min(n...) <i>⇒ BigNumber</i></code></h5>
|
| 747 |
+
<p>
|
| 748 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 749 |
+
<i>See <code><a href="#bignumber">BigNumber</a></code> for further parameter details.</i>
|
| 750 |
+
</p>
|
| 751 |
+
<p>
|
| 752 |
+
Returns a BigNumber whose value is the minimum of the arguments.
|
| 753 |
+
</p>
|
| 754 |
+
<p>The return value is always exact and unrounded.</p>
|
| 755 |
+
<pre>x = new BigNumber('3257869345.0378653')
|
| 756 |
+
BigNumber.minimum(4e9, x, '123456789.9') // '123456789.9'
|
| 757 |
+
|
| 758 |
+
arr = [2, new BigNumber(-14), '-15.9999', -12]
|
| 759 |
+
BigNumber.min.apply(null, arr) // '-15.9999'</pre>
|
| 760 |
+
|
| 761 |
+
|
| 762 |
+
|
| 763 |
+
<h5 id="random">
|
| 764 |
+
random<code class='inset'>.random([dp]) <i>⇒ BigNumber</i></code>
|
| 765 |
+
</h5>
|
| 766 |
+
<p><code>dp</code>: <i>number</i>: integer, <code>0</code> to <code>1e+9</code> inclusive</p>
|
| 767 |
+
<p>
|
| 768 |
+
Returns a new BigNumber with a pseudo-random value equal to or greater than <code>0</code> and
|
| 769 |
+
less than <code>1</code>.
|
| 770 |
+
</p>
|
| 771 |
+
<p>
|
| 772 |
+
The return value will have <code>dp</code> decimal places (or less if trailing zeros are
|
| 773 |
+
produced).<br />
|
| 774 |
+
If <code>dp</code> is omitted then the number of decimal places will default to the current
|
| 775 |
+
<a href='#decimal-places'><code>DECIMAL_PLACES</code></a> setting.
|
| 776 |
+
</p>
|
| 777 |
+
<p>
|
| 778 |
+
Depending on the value of this BigNumber constructor's
|
| 779 |
+
<a href='#crypto'><code>CRYPTO</code></a> setting and the support for the
|
| 780 |
+
<code>crypto</code> object in the host environment, the random digits of the return value are
|
| 781 |
+
generated by either <code>Math.random</code> (fastest), <code>crypto.getRandomValues</code>
|
| 782 |
+
(Web Cryptography API in recent browsers) or <code>crypto.randomBytes</code> (Node.js).
|
| 783 |
+
</p>
|
| 784 |
+
<p>
|
| 785 |
+
To be able to set <a href='#crypto'><code>CRYPTO</code></a> to <code>true</code> when using
|
| 786 |
+
Node.js, the <code>crypto</code> object must be available globally:
|
| 787 |
+
</p>
|
| 788 |
+
<pre>// Node.js
|
| 789 |
+
const crypto = require('crypto'); // CommonJS
|
| 790 |
+
import * as crypto from 'crypto'; // ES module
|
| 791 |
+
global.crypto = crypto;</pre>
|
| 792 |
+
<p>
|
| 793 |
+
If <a href='#crypto'><code>CRYPTO</code></a> is <code>true</code>, i.e. one of the
|
| 794 |
+
<code>crypto</code> methods is to be used, the value of a returned BigNumber should be
|
| 795 |
+
cryptographically-secure and statistically indistinguishable from a random value.
|
| 796 |
+
</p>
|
| 797 |
+
<p>
|
| 798 |
+
Throws if <code>dp</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 799 |
+
</p>
|
| 800 |
+
<pre>BigNumber.config({ DECIMAL_PLACES: 10 })
|
| 801 |
+
BigNumber.random() // '0.4117936847'
|
| 802 |
+
BigNumber.random(20) // '0.78193327636914089009'</pre>
|
| 803 |
+
|
| 804 |
+
|
| 805 |
+
|
| 806 |
+
<h5 id="sum">sum<code class='inset'>.sum(n...) <i>⇒ BigNumber</i></code></h5>
|
| 807 |
+
<p>
|
| 808 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 809 |
+
<i>See <code><a href="#bignumber">BigNumber</a></code> for further parameter details.</i>
|
| 810 |
+
</p>
|
| 811 |
+
<p>Returns a BigNumber whose value is the sum of the arguments.</p>
|
| 812 |
+
<p>The return value is always exact and unrounded.</p>
|
| 813 |
+
<pre>x = new BigNumber('3257869345.0378653')
|
| 814 |
+
BigNumber.sum(4e9, x, '123456789.9') // '7381326134.9378653'
|
| 815 |
+
|
| 816 |
+
arr = [2, new BigNumber(14), '15.9999', 12]
|
| 817 |
+
BigNumber.sum.apply(null, arr) // '43.9999'</pre>
|
| 818 |
+
|
| 819 |
+
|
| 820 |
+
|
| 821 |
+
<h4 id="constructor-properties">Properties</h4>
|
| 822 |
+
<p>
|
| 823 |
+
The library's enumerated rounding modes are stored as properties of the constructor.<br />
|
| 824 |
+
(They are not referenced internally by the library itself.)
|
| 825 |
+
</p>
|
| 826 |
+
<p>
|
| 827 |
+
Rounding modes <code>0</code> to <code>6</code> (inclusive) are the same as those of Java's
|
| 828 |
+
BigDecimal class.
|
| 829 |
+
</p>
|
| 830 |
+
<table>
|
| 831 |
+
<tr>
|
| 832 |
+
<th>Property</th>
|
| 833 |
+
<th>Value</th>
|
| 834 |
+
<th>Description</th>
|
| 835 |
+
</tr>
|
| 836 |
+
<tr>
|
| 837 |
+
<td id="round-up"><b>ROUND_UP</b></td>
|
| 838 |
+
<td class='centre'>0</td>
|
| 839 |
+
<td>Rounds away from zero</td>
|
| 840 |
+
</tr>
|
| 841 |
+
<tr>
|
| 842 |
+
<td id="round-down"><b>ROUND_DOWN</b></td>
|
| 843 |
+
<td class='centre'>1</td>
|
| 844 |
+
<td>Rounds towards zero</td>
|
| 845 |
+
</tr>
|
| 846 |
+
<tr>
|
| 847 |
+
<td id="round-ceil"><b>ROUND_CEIL</b></td>
|
| 848 |
+
<td class='centre'>2</td>
|
| 849 |
+
<td>Rounds towards <code>Infinity</code></td>
|
| 850 |
+
</tr>
|
| 851 |
+
<tr>
|
| 852 |
+
<td id="round-floor"><b>ROUND_FLOOR</b></td>
|
| 853 |
+
<td class='centre'>3</td>
|
| 854 |
+
<td>Rounds towards <code>-Infinity</code></td>
|
| 855 |
+
</tr>
|
| 856 |
+
<tr>
|
| 857 |
+
<td id="round-half-up"><b>ROUND_HALF_UP</b></td>
|
| 858 |
+
<td class='centre'>4</td>
|
| 859 |
+
<td>
|
| 860 |
+
Rounds towards nearest neighbour.<br />
|
| 861 |
+
If equidistant, rounds away from zero
|
| 862 |
+
</td>
|
| 863 |
+
</tr>
|
| 864 |
+
<tr>
|
| 865 |
+
<td id="round-half-down"><b>ROUND_HALF_DOWN</b></td>
|
| 866 |
+
<td class='centre'>5</td>
|
| 867 |
+
<td>
|
| 868 |
+
Rounds towards nearest neighbour.<br />
|
| 869 |
+
If equidistant, rounds towards zero
|
| 870 |
+
</td>
|
| 871 |
+
</tr>
|
| 872 |
+
<tr>
|
| 873 |
+
<td id="round-half-even"><b>ROUND_HALF_EVEN</b></td>
|
| 874 |
+
<td class='centre'>6</td>
|
| 875 |
+
<td>
|
| 876 |
+
Rounds towards nearest neighbour.<br />
|
| 877 |
+
If equidistant, rounds towards even neighbour
|
| 878 |
+
</td>
|
| 879 |
+
</tr>
|
| 880 |
+
<tr>
|
| 881 |
+
<td id="round-half-ceil"><b>ROUND_HALF_CEIL</b></td>
|
| 882 |
+
<td class='centre'>7</td>
|
| 883 |
+
<td>
|
| 884 |
+
Rounds towards nearest neighbour.<br />
|
| 885 |
+
If equidistant, rounds towards <code>Infinity</code>
|
| 886 |
+
</td>
|
| 887 |
+
</tr>
|
| 888 |
+
<tr>
|
| 889 |
+
<td id="round-half-floor"><b>ROUND_HALF_FLOOR</b></td>
|
| 890 |
+
<td class='centre'>8</td>
|
| 891 |
+
<td>
|
| 892 |
+
Rounds towards nearest neighbour.<br />
|
| 893 |
+
If equidistant, rounds towards <code>-Infinity</code>
|
| 894 |
+
</td>
|
| 895 |
+
</tr>
|
| 896 |
+
</table>
|
| 897 |
+
<pre>
|
| 898 |
+
BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL })
|
| 899 |
+
BigNumber.config({ ROUNDING_MODE: 2 }) // equivalent</pre>
|
| 900 |
+
|
| 901 |
+
<h5 id="debug">DEBUG</h5>
|
| 902 |
+
<p><i>undefined|false|true</i></p>
|
| 903 |
+
<p>
|
| 904 |
+
If <code>BigNumber.DEBUG</code> is set <code>true</code> then an error will be thrown
|
| 905 |
+
if this <a href='#bignumber'>BigNumber</a> constructor receives an invalid value, such as
|
| 906 |
+
a value of type <em>number</em> with more than <code>15</code> significant digits.
|
| 907 |
+
See <a href='#bignumber'>BigNumber</a>.
|
| 908 |
+
</p>
|
| 909 |
+
<p>
|
| 910 |
+
An error will also be thrown if the <code><a href='#isBigNumber'>isBigNumber</a></code>
|
| 911 |
+
method receives a BigNumber that is not well-formed.
|
| 912 |
+
See <code><a href='#isBigNumber'>isBigNumber</a></code>.
|
| 913 |
+
</p>
|
| 914 |
+
<pre>BigNumber.DEBUG = true</pre>
|
| 915 |
+
|
| 916 |
+
|
| 917 |
+
<h3>INSTANCE</h3>
|
| 918 |
+
|
| 919 |
+
|
| 920 |
+
<h4 id="prototype-methods">Methods</h4>
|
| 921 |
+
<p>The methods inherited by a BigNumber instance from its constructor's prototype object.</p>
|
| 922 |
+
<p>A BigNumber is immutable in the sense that it is not changed by its methods. </p>
|
| 923 |
+
<p>
|
| 924 |
+
The treatment of ±<code>0</code>, ±<code>Infinity</code> and <code>NaN</code> is
|
| 925 |
+
consistent with how JavaScript treats these values.
|
| 926 |
+
</p>
|
| 927 |
+
<p>Many method names have a shorter alias.</p>
|
| 928 |
+
|
| 929 |
+
|
| 930 |
+
|
| 931 |
+
<h5 id="abs">absoluteValue<code class='inset'>.abs() <i>⇒ BigNumber</i></code></h5>
|
| 932 |
+
<p>
|
| 933 |
+
Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of
|
| 934 |
+
this BigNumber.
|
| 935 |
+
</p>
|
| 936 |
+
<p>The return value is always exact and unrounded.</p>
|
| 937 |
+
<pre>
|
| 938 |
+
x = new BigNumber(-0.8)
|
| 939 |
+
y = x.absoluteValue() // '0.8'
|
| 940 |
+
z = y.abs() // '0.8'</pre>
|
| 941 |
+
|
| 942 |
+
|
| 943 |
+
|
| 944 |
+
<h5 id="cmp">
|
| 945 |
+
comparedTo<code class='inset'>.comparedTo(n [, base]) <i>⇒ number</i></code>
|
| 946 |
+
</h5>
|
| 947 |
+
<p>
|
| 948 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 949 |
+
<code>base</code>: <i>number</i><br />
|
| 950 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 951 |
+
</p>
|
| 952 |
+
<table>
|
| 953 |
+
<tr><th>Returns</th><th> </th></tr>
|
| 954 |
+
<tr>
|
| 955 |
+
<td class='centre'><code>1</code></td>
|
| 956 |
+
<td>If the value of this BigNumber is greater than the value of <code>n</code></td>
|
| 957 |
+
</tr>
|
| 958 |
+
<tr>
|
| 959 |
+
<td class='centre'><code>-1</code></td>
|
| 960 |
+
<td>If the value of this BigNumber is less than the value of <code>n</code></td>
|
| 961 |
+
</tr>
|
| 962 |
+
<tr>
|
| 963 |
+
<td class='centre'><code>0</code></td>
|
| 964 |
+
<td>If this BigNumber and <code>n</code> have the same value</td>
|
| 965 |
+
</tr>
|
| 966 |
+
<tr>
|
| 967 |
+
<td class='centre'><code>null</code></td>
|
| 968 |
+
<td>If the value of either this BigNumber or <code>n</code> is <code>NaN</code></td>
|
| 969 |
+
</tr>
|
| 970 |
+
</table>
|
| 971 |
+
<pre>
|
| 972 |
+
x = new BigNumber(Infinity)
|
| 973 |
+
y = new BigNumber(5)
|
| 974 |
+
x.comparedTo(y) // 1
|
| 975 |
+
x.comparedTo(x.minus(1)) // 0
|
| 976 |
+
y.comparedTo(NaN) // null
|
| 977 |
+
y.comparedTo('110', 2) // -1</pre>
|
| 978 |
+
|
| 979 |
+
|
| 980 |
+
|
| 981 |
+
<h5 id="dp">
|
| 982 |
+
decimalPlaces<code class='inset'>.dp([dp [, rm]]) <i>⇒ BigNumber|number</i></code>
|
| 983 |
+
</h5>
|
| 984 |
+
<p>
|
| 985 |
+
<code>dp</code>: <i>number</i>: integer, <code>0</code> to <code>1e+9</code> inclusive<br />
|
| 986 |
+
<code>rm</code>: <i>number</i>: integer, <code>0</code> to <code>8</code> inclusive
|
| 987 |
+
</p>
|
| 988 |
+
<p>
|
| 989 |
+
If <code>dp</code> is a number, returns a BigNumber whose value is the value of this BigNumber
|
| 990 |
+
rounded by rounding mode <code>rm</code> to a maximum of <code>dp</code> decimal places.
|
| 991 |
+
</p>
|
| 992 |
+
<p>
|
| 993 |
+
If <code>dp</code> is omitted, or is <code>null</code> or <code>undefined</code>, the return
|
| 994 |
+
value is the number of decimal places of the value of this BigNumber, or <code>null</code> if
|
| 995 |
+
the value of this BigNumber is ±<code>Infinity</code> or <code>NaN</code>.
|
| 996 |
+
</p>
|
| 997 |
+
<p>
|
| 998 |
+
If <code>rm</code> is omitted, or is <code>null</code> or <code>undefined</code>,
|
| 999 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> is used.
|
| 1000 |
+
</p>
|
| 1001 |
+
<p>
|
| 1002 |
+
Throws if <code>dp</code> or <code>rm</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 1003 |
+
</p>
|
| 1004 |
+
<pre>
|
| 1005 |
+
x = new BigNumber(1234.56)
|
| 1006 |
+
x.decimalPlaces(1) // '1234.6'
|
| 1007 |
+
x.dp() // 2
|
| 1008 |
+
x.decimalPlaces(2) // '1234.56'
|
| 1009 |
+
x.dp(10) // '1234.56'
|
| 1010 |
+
x.decimalPlaces(0, 1) // '1234'
|
| 1011 |
+
x.dp(0, 6) // '1235'
|
| 1012 |
+
x.decimalPlaces(1, 1) // '1234.5'
|
| 1013 |
+
x.dp(1, BigNumber.ROUND_HALF_EVEN) // '1234.6'
|
| 1014 |
+
x // '1234.56'
|
| 1015 |
+
y = new BigNumber('9.9e-101')
|
| 1016 |
+
y.dp() // 102</pre>
|
| 1017 |
+
|
| 1018 |
+
|
| 1019 |
+
|
| 1020 |
+
<h5 id="div">dividedBy<code class='inset'>.div(n [, base]) <i>⇒ BigNumber</i></code>
|
| 1021 |
+
</h5>
|
| 1022 |
+
<p>
|
| 1023 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1024 |
+
<code>base</code>: <i>number</i><br />
|
| 1025 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1026 |
+
</p>
|
| 1027 |
+
<p>
|
| 1028 |
+
Returns a BigNumber whose value is the value of this BigNumber divided by
|
| 1029 |
+
<code>n</code>, rounded according to the current
|
| 1030 |
+
<a href='#decimal-places'><code>DECIMAL_PLACES</code></a> and
|
| 1031 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> settings.
|
| 1032 |
+
</p>
|
| 1033 |
+
<pre>
|
| 1034 |
+
x = new BigNumber(355)
|
| 1035 |
+
y = new BigNumber(113)
|
| 1036 |
+
x.dividedBy(y) // '3.14159292035398230088'
|
| 1037 |
+
x.div(5) // '71'
|
| 1038 |
+
x.div(47, 16) // '5'</pre>
|
| 1039 |
+
|
| 1040 |
+
|
| 1041 |
+
|
| 1042 |
+
<h5 id="divInt">
|
| 1043 |
+
dividedToIntegerBy<code class='inset'>.idiv(n [, base]) ⇒
|
| 1044 |
+
<i>BigNumber</i></code>
|
| 1045 |
+
</h5>
|
| 1046 |
+
<p>
|
| 1047 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1048 |
+
<code>base</code>: <i>number</i><br />
|
| 1049 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1050 |
+
</p>
|
| 1051 |
+
<p>
|
| 1052 |
+
Returns a BigNumber whose value is the integer part of dividing the value of this BigNumber by
|
| 1053 |
+
<code>n</code>.
|
| 1054 |
+
</p>
|
| 1055 |
+
<pre>
|
| 1056 |
+
x = new BigNumber(5)
|
| 1057 |
+
y = new BigNumber(3)
|
| 1058 |
+
x.dividedToIntegerBy(y) // '1'
|
| 1059 |
+
x.idiv(0.7) // '7'
|
| 1060 |
+
x.idiv('0.f', 16) // '5'</pre>
|
| 1061 |
+
|
| 1062 |
+
|
| 1063 |
+
|
| 1064 |
+
<h5 id="pow">
|
| 1065 |
+
exponentiatedBy<code class='inset'>.pow(n [, m]) <i>⇒ BigNumber</i></code>
|
| 1066 |
+
</h5>
|
| 1067 |
+
<p>
|
| 1068 |
+
<code>n</code>: <i>number|string|BigNumber</i>: integer<br />
|
| 1069 |
+
<code>m</code>: <i>number|string|BigNumber</i>
|
| 1070 |
+
</p>
|
| 1071 |
+
<p>
|
| 1072 |
+
Returns a BigNumber whose value is the value of this BigNumber exponentiated by
|
| 1073 |
+
<code>n</code>, i.e. raised to the power <code>n</code>, and optionally modulo a modulus
|
| 1074 |
+
<code>m</code>.
|
| 1075 |
+
</p>
|
| 1076 |
+
<p>
|
| 1077 |
+
Throws if <code>n</code> is not an integer. See <a href='#Errors'>Errors</a>.
|
| 1078 |
+
</p>
|
| 1079 |
+
<p>
|
| 1080 |
+
If <code>n</code> is negative the result is rounded according to the current
|
| 1081 |
+
<a href='#decimal-places'><code>DECIMAL_PLACES</code></a> and
|
| 1082 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> settings.
|
| 1083 |
+
</p>
|
| 1084 |
+
<p>
|
| 1085 |
+
As the number of digits of the result of the power operation can grow so large so quickly,
|
| 1086 |
+
e.g. 123.456<sup>10000</sup> has over <code>50000</code> digits, the number of significant
|
| 1087 |
+
digits calculated is limited to the value of the
|
| 1088 |
+
<a href='#pow-precision'><code>POW_PRECISION</code></a> setting (unless a modulus
|
| 1089 |
+
<code>m</code> is specified).
|
| 1090 |
+
</p>
|
| 1091 |
+
<p>
|
| 1092 |
+
By default <a href='#pow-precision'><code>POW_PRECISION</code></a> is set to <code>0</code>.
|
| 1093 |
+
This means that an unlimited number of significant digits will be calculated, and that the
|
| 1094 |
+
method's performance will decrease dramatically for larger exponents.
|
| 1095 |
+
</p>
|
| 1096 |
+
<p>
|
| 1097 |
+
If <code>m</code> is specified and the value of <code>m</code>, <code>n</code> and this
|
| 1098 |
+
BigNumber are integers, and <code>n</code> is positive, then a fast modular exponentiation
|
| 1099 |
+
algorithm is used, otherwise the operation will be performed as
|
| 1100 |
+
<code>x.exponentiatedBy(n).modulo(m)</code> with a
|
| 1101 |
+
<a href='#pow-precision'><code>POW_PRECISION</code></a> of <code>0</code>.
|
| 1102 |
+
</p>
|
| 1103 |
+
<pre>
|
| 1104 |
+
Math.pow(0.7, 2) // 0.48999999999999994
|
| 1105 |
+
x = new BigNumber(0.7)
|
| 1106 |
+
x.exponentiatedBy(2) // '0.49'
|
| 1107 |
+
BigNumber(3).pow(-2) // '0.11111111111111111111'</pre>
|
| 1108 |
+
|
| 1109 |
+
|
| 1110 |
+
|
| 1111 |
+
<h5 id="int">
|
| 1112 |
+
integerValue<code class='inset'>.integerValue([rm]) <i>⇒ BigNumber</i></code>
|
| 1113 |
+
</h5>
|
| 1114 |
+
<p>
|
| 1115 |
+
<code>rm</code>: <i>number</i>: integer, <code>0</code> to <code>8</code> inclusive
|
| 1116 |
+
</p>
|
| 1117 |
+
<p>
|
| 1118 |
+
Returns a BigNumber whose value is the value of this BigNumber rounded to an integer using
|
| 1119 |
+
rounding mode <code>rm</code>.
|
| 1120 |
+
</p>
|
| 1121 |
+
<p>
|
| 1122 |
+
If <code>rm</code> is omitted, or is <code>null</code> or <code>undefined</code>,
|
| 1123 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> is used.
|
| 1124 |
+
</p>
|
| 1125 |
+
<p>
|
| 1126 |
+
Throws if <code>rm</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 1127 |
+
</p>
|
| 1128 |
+
<pre>
|
| 1129 |
+
x = new BigNumber(123.456)
|
| 1130 |
+
x.integerValue() // '123'
|
| 1131 |
+
x.integerValue(BigNumber.ROUND_CEIL) // '124'
|
| 1132 |
+
y = new BigNumber(-12.7)
|
| 1133 |
+
y.integerValue() // '-13'
|
| 1134 |
+
y.integerValue(BigNumber.ROUND_DOWN) // '-12'</pre>
|
| 1135 |
+
<p>
|
| 1136 |
+
The following is an example of how to add a prototype method that emulates JavaScript's
|
| 1137 |
+
<code>Math.round</code> function. <code>Math.ceil</code>, <code>Math.floor</code> and
|
| 1138 |
+
<code>Math.trunc</code> can be emulated in the same way with
|
| 1139 |
+
<code>BigNumber.ROUND_CEIL</code>, <code>BigNumber.ROUND_FLOOR</code> and
|
| 1140 |
+
<code> BigNumber.ROUND_DOWN</code> respectively.
|
| 1141 |
+
</p>
|
| 1142 |
+
<pre>
|
| 1143 |
+
BigNumber.prototype.round = function () {
|
| 1144 |
+
return this.integerValue(BigNumber.ROUND_HALF_CEIL);
|
| 1145 |
+
};
|
| 1146 |
+
x.round() // '123'</pre>
|
| 1147 |
+
|
| 1148 |
+
|
| 1149 |
+
|
| 1150 |
+
<h5 id="eq">isEqualTo<code class='inset'>.eq(n [, base]) <i>⇒ boolean</i></code></h5>
|
| 1151 |
+
<p>
|
| 1152 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1153 |
+
<code>base</code>: <i>number</i><br />
|
| 1154 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1155 |
+
</p>
|
| 1156 |
+
<p>
|
| 1157 |
+
Returns <code>true</code> if the value of this BigNumber is equal to the value of
|
| 1158 |
+
<code>n</code>, otherwise returns <code>false</code>.<br />
|
| 1159 |
+
As with JavaScript, <code>NaN</code> does not equal <code>NaN</code>.
|
| 1160 |
+
</p>
|
| 1161 |
+
<p>Note: This method uses the <a href='#cmp'><code>comparedTo</code></a> method internally.</p>
|
| 1162 |
+
<pre>
|
| 1163 |
+
0 === 1e-324 // true
|
| 1164 |
+
x = new BigNumber(0)
|
| 1165 |
+
x.isEqualTo('1e-324') // false
|
| 1166 |
+
BigNumber(-0).eq(x) // true ( -0 === 0 )
|
| 1167 |
+
BigNumber(255).eq('ff', 16) // true
|
| 1168 |
+
|
| 1169 |
+
y = new BigNumber(NaN)
|
| 1170 |
+
y.isEqualTo(NaN) // false</pre>
|
| 1171 |
+
|
| 1172 |
+
|
| 1173 |
+
|
| 1174 |
+
<h5 id="isF">isFinite<code class='inset'>.isFinite() <i>⇒ boolean</i></code></h5>
|
| 1175 |
+
<p>
|
| 1176 |
+
Returns <code>true</code> if the value of this BigNumber is a finite number, otherwise
|
| 1177 |
+
returns <code>false</code>.
|
| 1178 |
+
</p>
|
| 1179 |
+
<p>
|
| 1180 |
+
The only possible non-finite values of a BigNumber are <code>NaN</code>, <code>Infinity</code>
|
| 1181 |
+
and <code>-Infinity</code>.
|
| 1182 |
+
</p>
|
| 1183 |
+
<pre>
|
| 1184 |
+
x = new BigNumber(1)
|
| 1185 |
+
x.isFinite() // true
|
| 1186 |
+
y = new BigNumber(Infinity)
|
| 1187 |
+
y.isFinite() // false</pre>
|
| 1188 |
+
<p>
|
| 1189 |
+
Note: The native method <code>isFinite()</code> can be used if
|
| 1190 |
+
<code>n <= Number.MAX_VALUE</code>.
|
| 1191 |
+
</p>
|
| 1192 |
+
|
| 1193 |
+
|
| 1194 |
+
|
| 1195 |
+
<h5 id="gt">isGreaterThan<code class='inset'>.gt(n [, base]) <i>⇒ boolean</i></code></h5>
|
| 1196 |
+
<p>
|
| 1197 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1198 |
+
<code>base</code>: <i>number</i><br />
|
| 1199 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1200 |
+
</p>
|
| 1201 |
+
<p>
|
| 1202 |
+
Returns <code>true</code> if the value of this BigNumber is greater than the value of
|
| 1203 |
+
<code>n</code>, otherwise returns <code>false</code>.
|
| 1204 |
+
</p>
|
| 1205 |
+
<p>Note: This method uses the <a href='#cmp'><code>comparedTo</code></a> method internally.</p>
|
| 1206 |
+
<pre>
|
| 1207 |
+
0.1 > (0.3 - 0.2) // true
|
| 1208 |
+
x = new BigNumber(0.1)
|
| 1209 |
+
x.isGreaterThan(BigNumber(0.3).minus(0.2)) // false
|
| 1210 |
+
BigNumber(0).gt(x) // false
|
| 1211 |
+
BigNumber(11, 3).gt(11.1, 2) // true</pre>
|
| 1212 |
+
|
| 1213 |
+
|
| 1214 |
+
|
| 1215 |
+
<h5 id="gte">
|
| 1216 |
+
isGreaterThanOrEqualTo<code class='inset'>.gte(n [, base]) <i>⇒ boolean</i></code>
|
| 1217 |
+
</h5>
|
| 1218 |
+
<p>
|
| 1219 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1220 |
+
<code>base</code>: <i>number</i><br />
|
| 1221 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1222 |
+
</p>
|
| 1223 |
+
<p>
|
| 1224 |
+
Returns <code>true</code> if the value of this BigNumber is greater than or equal to the value
|
| 1225 |
+
of <code>n</code>, otherwise returns <code>false</code>.
|
| 1226 |
+
</p>
|
| 1227 |
+
<p>Note: This method uses the <a href='#cmp'><code>comparedTo</code></a> method internally.</p>
|
| 1228 |
+
<pre>
|
| 1229 |
+
(0.3 - 0.2) >= 0.1 // false
|
| 1230 |
+
x = new BigNumber(0.3).minus(0.2)
|
| 1231 |
+
x.isGreaterThanOrEqualTo(0.1) // true
|
| 1232 |
+
BigNumber(1).gte(x) // true
|
| 1233 |
+
BigNumber(10, 18).gte('i', 36) // true</pre>
|
| 1234 |
+
|
| 1235 |
+
|
| 1236 |
+
|
| 1237 |
+
<h5 id="isInt">isInteger<code class='inset'>.isInteger() <i>⇒ boolean</i></code></h5>
|
| 1238 |
+
<p>
|
| 1239 |
+
Returns <code>true</code> if the value of this BigNumber is an integer, otherwise returns
|
| 1240 |
+
<code>false</code>.
|
| 1241 |
+
</p>
|
| 1242 |
+
<pre>
|
| 1243 |
+
x = new BigNumber(1)
|
| 1244 |
+
x.isInteger() // true
|
| 1245 |
+
y = new BigNumber(123.456)
|
| 1246 |
+
y.isInteger() // false</pre>
|
| 1247 |
+
|
| 1248 |
+
|
| 1249 |
+
|
| 1250 |
+
<h5 id="lt">isLessThan<code class='inset'>.lt(n [, base]) <i>⇒ boolean</i></code></h5>
|
| 1251 |
+
<p>
|
| 1252 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1253 |
+
<code>base</code>: <i>number</i><br />
|
| 1254 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1255 |
+
</p>
|
| 1256 |
+
<p>
|
| 1257 |
+
Returns <code>true</code> if the value of this BigNumber is less than the value of
|
| 1258 |
+
<code>n</code>, otherwise returns <code>false</code>.
|
| 1259 |
+
</p>
|
| 1260 |
+
<p>Note: This method uses the <a href='#cmp'><code>comparedTo</code></a> method internally.</p>
|
| 1261 |
+
<pre>
|
| 1262 |
+
(0.3 - 0.2) < 0.1 // true
|
| 1263 |
+
x = new BigNumber(0.3).minus(0.2)
|
| 1264 |
+
x.isLessThan(0.1) // false
|
| 1265 |
+
BigNumber(0).lt(x) // true
|
| 1266 |
+
BigNumber(11.1, 2).lt(11, 3) // true</pre>
|
| 1267 |
+
|
| 1268 |
+
|
| 1269 |
+
|
| 1270 |
+
<h5 id="lte">
|
| 1271 |
+
isLessThanOrEqualTo<code class='inset'>.lte(n [, base]) <i>⇒ boolean</i></code>
|
| 1272 |
+
</h5>
|
| 1273 |
+
<p>
|
| 1274 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1275 |
+
<code>base</code>: <i>number</i><br />
|
| 1276 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1277 |
+
</p>
|
| 1278 |
+
<p>
|
| 1279 |
+
Returns <code>true</code> if the value of this BigNumber is less than or equal to the value of
|
| 1280 |
+
<code>n</code>, otherwise returns <code>false</code>.
|
| 1281 |
+
</p>
|
| 1282 |
+
<p>Note: This method uses the <a href='#cmp'><code>comparedTo</code></a> method internally.</p>
|
| 1283 |
+
<pre>
|
| 1284 |
+
0.1 <= (0.3 - 0.2) // false
|
| 1285 |
+
x = new BigNumber(0.1)
|
| 1286 |
+
x.isLessThanOrEqualTo(BigNumber(0.3).minus(0.2)) // true
|
| 1287 |
+
BigNumber(-1).lte(x) // true
|
| 1288 |
+
BigNumber(10, 18).lte('i', 36) // true</pre>
|
| 1289 |
+
|
| 1290 |
+
|
| 1291 |
+
|
| 1292 |
+
<h5 id="isNaN">isNaN<code class='inset'>.isNaN() <i>⇒ boolean</i></code></h5>
|
| 1293 |
+
<p>
|
| 1294 |
+
Returns <code>true</code> if the value of this BigNumber is <code>NaN</code>, otherwise
|
| 1295 |
+
returns <code>false</code>.
|
| 1296 |
+
</p>
|
| 1297 |
+
<pre>
|
| 1298 |
+
x = new BigNumber(NaN)
|
| 1299 |
+
x.isNaN() // true
|
| 1300 |
+
y = new BigNumber('Infinity')
|
| 1301 |
+
y.isNaN() // false</pre>
|
| 1302 |
+
<p>Note: The native method <code>isNaN()</code> can also be used.</p>
|
| 1303 |
+
|
| 1304 |
+
|
| 1305 |
+
|
| 1306 |
+
<h5 id="isNeg">isNegative<code class='inset'>.isNegative() <i>⇒ boolean</i></code></h5>
|
| 1307 |
+
<p>
|
| 1308 |
+
Returns <code>true</code> if the sign of this BigNumber is negative, otherwise returns
|
| 1309 |
+
<code>false</code>.
|
| 1310 |
+
</p>
|
| 1311 |
+
<pre>
|
| 1312 |
+
x = new BigNumber(-0)
|
| 1313 |
+
x.isNegative() // true
|
| 1314 |
+
y = new BigNumber(2)
|
| 1315 |
+
y.isNegative() // false</pre>
|
| 1316 |
+
<p>Note: <code>n < 0</code> can be used if <code>n <= -Number.MIN_VALUE</code>.</p>
|
| 1317 |
+
|
| 1318 |
+
|
| 1319 |
+
|
| 1320 |
+
<h5 id="isPos">isPositive<code class='inset'>.isPositive() <i>⇒ boolean</i></code></h5>
|
| 1321 |
+
<p>
|
| 1322 |
+
Returns <code>true</code> if the sign of this BigNumber is positive, otherwise returns
|
| 1323 |
+
<code>false</code>.
|
| 1324 |
+
</p>
|
| 1325 |
+
<pre>
|
| 1326 |
+
x = new BigNumber(-0)
|
| 1327 |
+
x.isPositive() // false
|
| 1328 |
+
y = new BigNumber(2)
|
| 1329 |
+
y.isPositive() // true</pre>
|
| 1330 |
+
|
| 1331 |
+
|
| 1332 |
+
|
| 1333 |
+
<h5 id="isZ">isZero<code class='inset'>.isZero() <i>⇒ boolean</i></code></h5>
|
| 1334 |
+
<p>
|
| 1335 |
+
Returns <code>true</code> if the value of this BigNumber is zero or minus zero, otherwise
|
| 1336 |
+
returns <code>false</code>.
|
| 1337 |
+
</p>
|
| 1338 |
+
<pre>
|
| 1339 |
+
x = new BigNumber(-0)
|
| 1340 |
+
x.isZero() && x.isNegative() // true
|
| 1341 |
+
y = new BigNumber(Infinity)
|
| 1342 |
+
y.isZero() // false</pre>
|
| 1343 |
+
<p>Note: <code>n == 0</code> can be used if <code>n >= Number.MIN_VALUE</code>.</p>
|
| 1344 |
+
|
| 1345 |
+
|
| 1346 |
+
|
| 1347 |
+
<h5 id="minus">
|
| 1348 |
+
minus<code class='inset'>.minus(n [, base]) <i>⇒ BigNumber</i></code>
|
| 1349 |
+
</h5>
|
| 1350 |
+
<p>
|
| 1351 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1352 |
+
<code>base</code>: <i>number</i><br />
|
| 1353 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1354 |
+
</p>
|
| 1355 |
+
<p>Returns a BigNumber whose value is the value of this BigNumber minus <code>n</code>.</p>
|
| 1356 |
+
<p>The return value is always exact and unrounded.</p>
|
| 1357 |
+
<pre>
|
| 1358 |
+
0.3 - 0.1 // 0.19999999999999998
|
| 1359 |
+
x = new BigNumber(0.3)
|
| 1360 |
+
x.minus(0.1) // '0.2'
|
| 1361 |
+
x.minus(0.6, 20) // '0'</pre>
|
| 1362 |
+
|
| 1363 |
+
|
| 1364 |
+
|
| 1365 |
+
<h5 id="mod">modulo<code class='inset'>.mod(n [, base]) <i>⇒ BigNumber</i></code></h5>
|
| 1366 |
+
<p>
|
| 1367 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1368 |
+
<code>base</code>: <i>number</i><br />
|
| 1369 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1370 |
+
</p>
|
| 1371 |
+
<p>
|
| 1372 |
+
Returns a BigNumber whose value is the value of this BigNumber modulo <code>n</code>, i.e.
|
| 1373 |
+
the integer remainder of dividing this BigNumber by <code>n</code>.
|
| 1374 |
+
</p>
|
| 1375 |
+
<p>
|
| 1376 |
+
The value returned, and in particular its sign, is dependent on the value of the
|
| 1377 |
+
<a href='#modulo-mode'><code>MODULO_MODE</code></a> setting of this BigNumber constructor.
|
| 1378 |
+
If it is <code>1</code> (default value), the result will have the same sign as this BigNumber,
|
| 1379 |
+
and it will match that of Javascript's <code>%</code> operator (within the limits of double
|
| 1380 |
+
precision) and BigDecimal's <code>remainder</code> method.
|
| 1381 |
+
</p>
|
| 1382 |
+
<p>The return value is always exact and unrounded.</p>
|
| 1383 |
+
<p>
|
| 1384 |
+
See <a href='#modulo-mode'><code>MODULO_MODE</code></a> for a description of the other
|
| 1385 |
+
modulo modes.
|
| 1386 |
+
</p>
|
| 1387 |
+
<pre>
|
| 1388 |
+
1 % 0.9 // 0.09999999999999998
|
| 1389 |
+
x = new BigNumber(1)
|
| 1390 |
+
x.modulo(0.9) // '0.1'
|
| 1391 |
+
y = new BigNumber(33)
|
| 1392 |
+
y.mod('a', 33) // '3'</pre>
|
| 1393 |
+
|
| 1394 |
+
|
| 1395 |
+
|
| 1396 |
+
<h5 id="times">
|
| 1397 |
+
multipliedBy<code class='inset'>.times(n [, base]) <i>⇒ BigNumber</i></code>
|
| 1398 |
+
</h5>
|
| 1399 |
+
<p>
|
| 1400 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1401 |
+
<code>base</code>: <i>number</i><br />
|
| 1402 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1403 |
+
</p>
|
| 1404 |
+
<p>
|
| 1405 |
+
Returns a BigNumber whose value is the value of this BigNumber multiplied by <code>n</code>.
|
| 1406 |
+
</p>
|
| 1407 |
+
<p>The return value is always exact and unrounded.</p>
|
| 1408 |
+
<pre>
|
| 1409 |
+
0.6 * 3 // 1.7999999999999998
|
| 1410 |
+
x = new BigNumber(0.6)
|
| 1411 |
+
y = x.multipliedBy(3) // '1.8'
|
| 1412 |
+
BigNumber('7e+500').times(y) // '1.26e+501'
|
| 1413 |
+
x.multipliedBy('-a', 16) // '-6'</pre>
|
| 1414 |
+
|
| 1415 |
+
|
| 1416 |
+
|
| 1417 |
+
<h5 id="neg">negated<code class='inset'>.negated() <i>⇒ BigNumber</i></code></h5>
|
| 1418 |
+
<p>
|
| 1419 |
+
Returns a BigNumber whose value is the value of this BigNumber negated, i.e. multiplied by
|
| 1420 |
+
<code>-1</code>.
|
| 1421 |
+
</p>
|
| 1422 |
+
<pre>
|
| 1423 |
+
x = new BigNumber(1.8)
|
| 1424 |
+
x.negated() // '-1.8'
|
| 1425 |
+
y = new BigNumber(-1.3)
|
| 1426 |
+
y.negated() // '1.3'</pre>
|
| 1427 |
+
|
| 1428 |
+
|
| 1429 |
+
|
| 1430 |
+
<h5 id="plus">plus<code class='inset'>.plus(n [, base]) <i>⇒ BigNumber</i></code></h5>
|
| 1431 |
+
<p>
|
| 1432 |
+
<code>n</code>: <i>number|string|BigNumber</i><br />
|
| 1433 |
+
<code>base</code>: <i>number</i><br />
|
| 1434 |
+
<i>See <a href="#bignumber">BigNumber</a> for further parameter details.</i>
|
| 1435 |
+
</p>
|
| 1436 |
+
<p>Returns a BigNumber whose value is the value of this BigNumber plus <code>n</code>.</p>
|
| 1437 |
+
<p>The return value is always exact and unrounded.</p>
|
| 1438 |
+
<pre>
|
| 1439 |
+
0.1 + 0.2 // 0.30000000000000004
|
| 1440 |
+
x = new BigNumber(0.1)
|
| 1441 |
+
y = x.plus(0.2) // '0.3'
|
| 1442 |
+
BigNumber(0.7).plus(x).plus(y) // '1.1'
|
| 1443 |
+
x.plus('0.1', 8) // '0.225'</pre>
|
| 1444 |
+
|
| 1445 |
+
|
| 1446 |
+
|
| 1447 |
+
<h5 id="sd">
|
| 1448 |
+
precision<code class='inset'>.sd([d [, rm]]) <i>⇒ BigNumber|number</i></code>
|
| 1449 |
+
</h5>
|
| 1450 |
+
<p>
|
| 1451 |
+
<code>d</code>: <i>number|boolean</i>: integer, <code>1</code> to <code>1e+9</code>
|
| 1452 |
+
inclusive, or <code>true</code> or <code>false</code><br />
|
| 1453 |
+
<code>rm</code>: <i>number</i>: integer, <code>0</code> to <code>8</code> inclusive.
|
| 1454 |
+
</p>
|
| 1455 |
+
<p>
|
| 1456 |
+
If <code>d</code> is a number, returns a BigNumber whose value is the value of this BigNumber
|
| 1457 |
+
rounded to a precision of <code>d</code> significant digits using rounding mode
|
| 1458 |
+
<code>rm</code>.
|
| 1459 |
+
</p>
|
| 1460 |
+
<p>
|
| 1461 |
+
If <code>d</code> is omitted or is <code>null</code> or <code>undefined</code>, the return
|
| 1462 |
+
value is the number of significant digits of the value of this BigNumber, or <code>null</code>
|
| 1463 |
+
if the value of this BigNumber is ±<code>Infinity</code> or <code>NaN</code>.
|
| 1464 |
+
</p>
|
| 1465 |
+
<p>
|
| 1466 |
+
If <code>d</code> is <code>true</code> then any trailing zeros of the integer
|
| 1467 |
+
part of a number are counted as significant digits, otherwise they are not.
|
| 1468 |
+
</p>
|
| 1469 |
+
<p>
|
| 1470 |
+
If <code>rm</code> is omitted or is <code>null</code> or <code>undefined</code>,
|
| 1471 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> will be used.
|
| 1472 |
+
</p>
|
| 1473 |
+
<p>
|
| 1474 |
+
Throws if <code>d</code> or <code>rm</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 1475 |
+
</p>
|
| 1476 |
+
<pre>
|
| 1477 |
+
x = new BigNumber(9876.54321)
|
| 1478 |
+
x.precision(6) // '9876.54'
|
| 1479 |
+
x.sd() // 9
|
| 1480 |
+
x.precision(6, BigNumber.ROUND_UP) // '9876.55'
|
| 1481 |
+
x.sd(2) // '9900'
|
| 1482 |
+
x.precision(2, 1) // '9800'
|
| 1483 |
+
x // '9876.54321'
|
| 1484 |
+
y = new BigNumber(987000)
|
| 1485 |
+
y.precision() // 3
|
| 1486 |
+
y.sd(true) // 6</pre>
|
| 1487 |
+
|
| 1488 |
+
|
| 1489 |
+
|
| 1490 |
+
<h5 id="shift">shiftedBy<code class='inset'>.shiftedBy(n) <i>⇒ BigNumber</i></code></h5>
|
| 1491 |
+
<p>
|
| 1492 |
+
<code>n</code>: <i>number</i>: integer,
|
| 1493 |
+
<code>-9007199254740991</code> to <code>9007199254740991</code> inclusive
|
| 1494 |
+
</p>
|
| 1495 |
+
<p>
|
| 1496 |
+
Returns a BigNumber whose value is the value of this BigNumber shifted by <code>n</code>
|
| 1497 |
+
places.
|
| 1498 |
+
<p>
|
| 1499 |
+
The shift is of the decimal point, i.e. of powers of ten, and is to the left if <code>n</code>
|
| 1500 |
+
is negative or to the right if <code>n</code> is positive.
|
| 1501 |
+
</p>
|
| 1502 |
+
<p>The return value is always exact and unrounded.</p>
|
| 1503 |
+
<p>
|
| 1504 |
+
Throws if <code>n</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 1505 |
+
</p>
|
| 1506 |
+
<pre>
|
| 1507 |
+
x = new BigNumber(1.23)
|
| 1508 |
+
x.shiftedBy(3) // '1230'
|
| 1509 |
+
x.shiftedBy(-3) // '0.00123'</pre>
|
| 1510 |
+
|
| 1511 |
+
|
| 1512 |
+
|
| 1513 |
+
<h5 id="sqrt">squareRoot<code class='inset'>.sqrt() <i>⇒ BigNumber</i></code></h5>
|
| 1514 |
+
<p>
|
| 1515 |
+
Returns a BigNumber whose value is the square root of the value of this BigNumber,
|
| 1516 |
+
rounded according to the current
|
| 1517 |
+
<a href='#decimal-places'><code>DECIMAL_PLACES</code></a> and
|
| 1518 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> settings.
|
| 1519 |
+
</p>
|
| 1520 |
+
<p>
|
| 1521 |
+
The return value will be correctly rounded, i.e. rounded as if the result was first calculated
|
| 1522 |
+
to an infinite number of correct digits before rounding.
|
| 1523 |
+
</p>
|
| 1524 |
+
<pre>
|
| 1525 |
+
x = new BigNumber(16)
|
| 1526 |
+
x.squareRoot() // '4'
|
| 1527 |
+
y = new BigNumber(3)
|
| 1528 |
+
y.sqrt() // '1.73205080756887729353'</pre>
|
| 1529 |
+
|
| 1530 |
+
|
| 1531 |
+
|
| 1532 |
+
<h5 id="toE">
|
| 1533 |
+
toExponential<code class='inset'>.toExponential([dp [, rm]]) <i>⇒ string</i></code>
|
| 1534 |
+
</h5>
|
| 1535 |
+
<p>
|
| 1536 |
+
<code>dp</code>: <i>number</i>: integer, <code>0</code> to <code>1e+9</code> inclusive<br />
|
| 1537 |
+
<code>rm</code>: <i>number</i>: integer, <code>0</code> to <code>8</code> inclusive
|
| 1538 |
+
</p>
|
| 1539 |
+
<p>
|
| 1540 |
+
Returns a string representing the value of this BigNumber in exponential notation rounded
|
| 1541 |
+
using rounding mode <code>rm</code> to <code>dp</code> decimal places, i.e with one digit
|
| 1542 |
+
before the decimal point and <code>dp</code> digits after it.
|
| 1543 |
+
</p>
|
| 1544 |
+
<p>
|
| 1545 |
+
If the value of this BigNumber in exponential notation has fewer than <code>dp</code> fraction
|
| 1546 |
+
digits, the return value will be appended with zeros accordingly.
|
| 1547 |
+
</p>
|
| 1548 |
+
<p>
|
| 1549 |
+
If <code>dp</code> is omitted, or is <code>null</code> or <code>undefined</code>, the number
|
| 1550 |
+
of digits after the decimal point defaults to the minimum number of digits necessary to
|
| 1551 |
+
represent the value exactly.<br />
|
| 1552 |
+
If <code>rm</code> is omitted or is <code>null</code> or <code>undefined</code>,
|
| 1553 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> is used.
|
| 1554 |
+
</p>
|
| 1555 |
+
<p>
|
| 1556 |
+
Throws if <code>dp</code> or <code>rm</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 1557 |
+
</p>
|
| 1558 |
+
<pre>
|
| 1559 |
+
x = 45.6
|
| 1560 |
+
y = new BigNumber(x)
|
| 1561 |
+
x.toExponential() // '4.56e+1'
|
| 1562 |
+
y.toExponential() // '4.56e+1'
|
| 1563 |
+
x.toExponential(0) // '5e+1'
|
| 1564 |
+
y.toExponential(0) // '5e+1'
|
| 1565 |
+
x.toExponential(1) // '4.6e+1'
|
| 1566 |
+
y.toExponential(1) // '4.6e+1'
|
| 1567 |
+
y.toExponential(1, 1) // '4.5e+1' (ROUND_DOWN)
|
| 1568 |
+
x.toExponential(3) // '4.560e+1'
|
| 1569 |
+
y.toExponential(3) // '4.560e+1'</pre>
|
| 1570 |
+
|
| 1571 |
+
|
| 1572 |
+
|
| 1573 |
+
<h5 id="toFix">
|
| 1574 |
+
toFixed<code class='inset'>.toFixed([dp [, rm]]) <i>⇒ string</i></code>
|
| 1575 |
+
</h5>
|
| 1576 |
+
<p>
|
| 1577 |
+
<code>dp</code>: <i>number</i>: integer, <code>0</code> to <code>1e+9</code> inclusive<br />
|
| 1578 |
+
<code>rm</code>: <i>number</i>: integer, <code>0</code> to <code>8</code> inclusive
|
| 1579 |
+
</p>
|
| 1580 |
+
<p>
|
| 1581 |
+
Returns a string representing the value of this BigNumber in normal (fixed-point) notation
|
| 1582 |
+
rounded to <code>dp</code> decimal places using rounding mode <code>rm</code>.
|
| 1583 |
+
</p>
|
| 1584 |
+
<p>
|
| 1585 |
+
If the value of this BigNumber in normal notation has fewer than <code>dp</code> fraction
|
| 1586 |
+
digits, the return value will be appended with zeros accordingly.
|
| 1587 |
+
</p>
|
| 1588 |
+
<p>
|
| 1589 |
+
Unlike <code>Number.prototype.toFixed</code>, which returns exponential notation if a number
|
| 1590 |
+
is greater or equal to <code>10<sup>21</sup></code>, this method will always return normal
|
| 1591 |
+
notation.
|
| 1592 |
+
</p>
|
| 1593 |
+
<p>
|
| 1594 |
+
If <code>dp</code> is omitted or is <code>null</code> or <code>undefined</code>, the return
|
| 1595 |
+
value will be unrounded and in normal notation. This is also unlike
|
| 1596 |
+
<code>Number.prototype.toFixed</code>, which returns the value to zero decimal places.<br />
|
| 1597 |
+
It is useful when fixed-point notation is required and the current
|
| 1598 |
+
<a href="#exponential-at"><code>EXPONENTIAL_AT</code></a> setting causes
|
| 1599 |
+
<code><a href='#toS'>toString</a></code> to return exponential notation.<br />
|
| 1600 |
+
If <code>rm</code> is omitted or is <code>null</code> or <code>undefined</code>,
|
| 1601 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> is used.
|
| 1602 |
+
</p>
|
| 1603 |
+
<p>
|
| 1604 |
+
Throws if <code>dp</code> or <code>rm</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 1605 |
+
</p>
|
| 1606 |
+
<pre>
|
| 1607 |
+
x = 3.456
|
| 1608 |
+
y = new BigNumber(x)
|
| 1609 |
+
x.toFixed() // '3'
|
| 1610 |
+
y.toFixed() // '3.456'
|
| 1611 |
+
y.toFixed(0) // '3'
|
| 1612 |
+
x.toFixed(2) // '3.46'
|
| 1613 |
+
y.toFixed(2) // '3.46'
|
| 1614 |
+
y.toFixed(2, 1) // '3.45' (ROUND_DOWN)
|
| 1615 |
+
x.toFixed(5) // '3.45600'
|
| 1616 |
+
y.toFixed(5) // '3.45600'</pre>
|
| 1617 |
+
|
| 1618 |
+
|
| 1619 |
+
|
| 1620 |
+
<h5 id="toFor">
|
| 1621 |
+
toFormat<code class='inset'>.toFormat([dp [, rm[, format]]]) <i>⇒ string</i></code>
|
| 1622 |
+
</h5>
|
| 1623 |
+
<p>
|
| 1624 |
+
<code>dp</code>: <i>number</i>: integer, <code>0</code> to <code>1e+9</code> inclusive<br />
|
| 1625 |
+
<code>rm</code>: <i>number</i>: integer, <code>0</code> to <code>8</code> inclusive<br />
|
| 1626 |
+
<code>format</code>: <i>object</i>: see <a href='#format'><code>FORMAT</code></a>
|
| 1627 |
+
</p>
|
| 1628 |
+
<p>
|
| 1629 |
+
<p>
|
| 1630 |
+
Returns a string representing the value of this BigNumber in normal (fixed-point) notation
|
| 1631 |
+
rounded to <code>dp</code> decimal places using rounding mode <code>rm</code>, and formatted
|
| 1632 |
+
according to the properties of the <code>format</code> object.
|
| 1633 |
+
</p>
|
| 1634 |
+
<p>
|
| 1635 |
+
See <a href='#format'><code>FORMAT</code></a> and the examples below for the properties of the
|
| 1636 |
+
<code>format</code> object, their types, and their usage. A formatting object may contain
|
| 1637 |
+
some or all of the recognised properties.
|
| 1638 |
+
</p>
|
| 1639 |
+
<p>
|
| 1640 |
+
If <code>dp</code> is omitted or is <code>null</code> or <code>undefined</code>, then the
|
| 1641 |
+
return value is not rounded to a fixed number of decimal places.<br />
|
| 1642 |
+
If <code>rm</code> is omitted or is <code>null</code> or <code>undefined</code>,
|
| 1643 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> is used.<br />
|
| 1644 |
+
If <code>format</code> is omitted or is <code>null</code> or <code>undefined</code>, the
|
| 1645 |
+
<a href='#format'><code>FORMAT</code></a> object is used.
|
| 1646 |
+
</p>
|
| 1647 |
+
<p>
|
| 1648 |
+
Throws if <code>dp</code>, <code>rm</code> or <code>format</code> is invalid. See
|
| 1649 |
+
<a href='#Errors'>Errors</a>.
|
| 1650 |
+
</p>
|
| 1651 |
+
<pre>
|
| 1652 |
+
fmt = {
|
| 1653 |
+
prefix: '',
|
| 1654 |
+
decimalSeparator: '.',
|
| 1655 |
+
groupSeparator: ',',
|
| 1656 |
+
groupSize: 3,
|
| 1657 |
+
secondaryGroupSize: 0,
|
| 1658 |
+
fractionGroupSeparator: ' ',
|
| 1659 |
+
fractionGroupSize: 0,
|
| 1660 |
+
suffix: ''
|
| 1661 |
+
}
|
| 1662 |
+
|
| 1663 |
+
x = new BigNumber('123456789.123456789')
|
| 1664 |
+
|
| 1665 |
+
// Set the global formatting options
|
| 1666 |
+
BigNumber.config({ FORMAT: fmt })
|
| 1667 |
+
|
| 1668 |
+
x.toFormat() // '123,456,789.123456789'
|
| 1669 |
+
x.toFormat(3) // '123,456,789.123'
|
| 1670 |
+
|
| 1671 |
+
// If a reference to the object assigned to FORMAT has been retained,
|
| 1672 |
+
// the format properties can be changed directly
|
| 1673 |
+
fmt.groupSeparator = ' '
|
| 1674 |
+
fmt.fractionGroupSize = 5
|
| 1675 |
+
x.toFormat() // '123 456 789.12345 6789'
|
| 1676 |
+
|
| 1677 |
+
// Alternatively, pass the formatting options as an argument
|
| 1678 |
+
fmt = {
|
| 1679 |
+
prefix: '=> ',
|
| 1680 |
+
decimalSeparator: ',',
|
| 1681 |
+
groupSeparator: '.',
|
| 1682 |
+
groupSize: 3,
|
| 1683 |
+
secondaryGroupSize: 2
|
| 1684 |
+
}
|
| 1685 |
+
|
| 1686 |
+
x.toFormat() // '123 456 789.12345 6789'
|
| 1687 |
+
x.toFormat(fmt) // '=> 12.34.56.789,123456789'
|
| 1688 |
+
x.toFormat(2, fmt) // '=> 12.34.56.789,12'
|
| 1689 |
+
x.toFormat(3, BigNumber.ROUND_UP, fmt) // '=> 12.34.56.789,124'</pre>
|
| 1690 |
+
|
| 1691 |
+
|
| 1692 |
+
|
| 1693 |
+
<h5 id="toFr">
|
| 1694 |
+
toFraction<code class='inset'>.toFraction([maximum_denominator])
|
| 1695 |
+
<i>⇒ [BigNumber, BigNumber]</i></code>
|
| 1696 |
+
</h5>
|
| 1697 |
+
<p>
|
| 1698 |
+
<code>maximum_denominator</code>:
|
| 1699 |
+
<i>number|string|BigNumber</i>: integer >= <code>1</code> and <=
|
| 1700 |
+
<code>Infinity</code>
|
| 1701 |
+
</p>
|
| 1702 |
+
<p>
|
| 1703 |
+
Returns an array of two BigNumbers representing the value of this BigNumber as a simple
|
| 1704 |
+
fraction with an integer numerator and an integer denominator. The denominator will be a
|
| 1705 |
+
positive non-zero value less than or equal to <code>maximum_denominator</code>.
|
| 1706 |
+
</p>
|
| 1707 |
+
<p>
|
| 1708 |
+
If a <code>maximum_denominator</code> is not specified, or is <code>null</code> or
|
| 1709 |
+
<code>undefined</code>, the denominator will be the lowest value necessary to represent the
|
| 1710 |
+
number exactly.
|
| 1711 |
+
</p>
|
| 1712 |
+
<p>
|
| 1713 |
+
Throws if <code>maximum_denominator</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 1714 |
+
</p>
|
| 1715 |
+
<pre>
|
| 1716 |
+
x = new BigNumber(1.75)
|
| 1717 |
+
x.toFraction() // '7, 4'
|
| 1718 |
+
|
| 1719 |
+
pi = new BigNumber('3.14159265358')
|
| 1720 |
+
pi.toFraction() // '157079632679,50000000000'
|
| 1721 |
+
pi.toFraction(100000) // '312689, 99532'
|
| 1722 |
+
pi.toFraction(10000) // '355, 113'
|
| 1723 |
+
pi.toFraction(100) // '311, 99'
|
| 1724 |
+
pi.toFraction(10) // '22, 7'
|
| 1725 |
+
pi.toFraction(1) // '3, 1'</pre>
|
| 1726 |
+
|
| 1727 |
+
|
| 1728 |
+
|
| 1729 |
+
<h5 id="toJSON">toJSON<code class='inset'>.toJSON() <i>⇒ string</i></code></h5>
|
| 1730 |
+
<p>As <a href='#valueOf'><code>valueOf</code></a>.</p>
|
| 1731 |
+
<pre>
|
| 1732 |
+
x = new BigNumber('177.7e+457')
|
| 1733 |
+
y = new BigNumber(235.4325)
|
| 1734 |
+
z = new BigNumber('0.0098074')
|
| 1735 |
+
|
| 1736 |
+
// Serialize an array of three BigNumbers
|
| 1737 |
+
str = JSON.stringify( [x, y, z] )
|
| 1738 |
+
// "["1.777e+459","235.4325","0.0098074"]"
|
| 1739 |
+
|
| 1740 |
+
// Return an array of three BigNumbers
|
| 1741 |
+
JSON.parse(str, function (key, val) {
|
| 1742 |
+
return key === '' ? val : new BigNumber(val)
|
| 1743 |
+
})</pre>
|
| 1744 |
+
|
| 1745 |
+
|
| 1746 |
+
|
| 1747 |
+
<h5 id="toN">toNumber<code class='inset'>.toNumber() <i>⇒ number</i></code></h5>
|
| 1748 |
+
<p>Returns the value of this BigNumber as a JavaScript number primitive.</p>
|
| 1749 |
+
<p>
|
| 1750 |
+
This method is identical to using type coercion with the unary plus operator.
|
| 1751 |
+
</p>
|
| 1752 |
+
<pre>
|
| 1753 |
+
x = new BigNumber(456.789)
|
| 1754 |
+
x.toNumber() // 456.789
|
| 1755 |
+
+x // 456.789
|
| 1756 |
+
|
| 1757 |
+
y = new BigNumber('45987349857634085409857349856430985')
|
| 1758 |
+
y.toNumber() // 4.598734985763409e+34
|
| 1759 |
+
|
| 1760 |
+
z = new BigNumber(-0)
|
| 1761 |
+
1 / z.toNumber() // -Infinity
|
| 1762 |
+
1 / +z // -Infinity</pre>
|
| 1763 |
+
|
| 1764 |
+
|
| 1765 |
+
|
| 1766 |
+
<h5 id="toP">
|
| 1767 |
+
toPrecision<code class='inset'>.toPrecision([sd [, rm]]) <i>⇒ string</i></code>
|
| 1768 |
+
</h5>
|
| 1769 |
+
<p>
|
| 1770 |
+
<code>sd</code>: <i>number</i>: integer, <code>1</code> to <code>1e+9</code> inclusive<br />
|
| 1771 |
+
<code>rm</code>: <i>number</i>: integer, <code>0</code> to <code>8</code> inclusive
|
| 1772 |
+
</p>
|
| 1773 |
+
<p>
|
| 1774 |
+
Returns a string representing the value of this BigNumber rounded to <code>sd</code>
|
| 1775 |
+
significant digits using rounding mode <code>rm</code>.
|
| 1776 |
+
</p>
|
| 1777 |
+
<p>
|
| 1778 |
+
If <code>sd</code> is less than the number of digits necessary to represent the integer part
|
| 1779 |
+
of the value in normal (fixed-point) notation, then exponential notation is used.
|
| 1780 |
+
</p>
|
| 1781 |
+
<p>
|
| 1782 |
+
If <code>sd</code> is omitted, or is <code>null</code> or <code>undefined</code>, then the
|
| 1783 |
+
return value is the same as <code>n.toString()</code>.<br />
|
| 1784 |
+
If <code>rm</code> is omitted or is <code>null</code> or <code>undefined</code>,
|
| 1785 |
+
<a href='#rounding-mode'><code>ROUNDING_MODE</code></a> is used.
|
| 1786 |
+
</p>
|
| 1787 |
+
<p>
|
| 1788 |
+
Throws if <code>sd</code> or <code>rm</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 1789 |
+
</p>
|
| 1790 |
+
<pre>
|
| 1791 |
+
x = 45.6
|
| 1792 |
+
y = new BigNumber(x)
|
| 1793 |
+
x.toPrecision() // '45.6'
|
| 1794 |
+
y.toPrecision() // '45.6'
|
| 1795 |
+
x.toPrecision(1) // '5e+1'
|
| 1796 |
+
y.toPrecision(1) // '5e+1'
|
| 1797 |
+
y.toPrecision(2, 0) // '4.6e+1' (ROUND_UP)
|
| 1798 |
+
y.toPrecision(2, 1) // '4.5e+1' (ROUND_DOWN)
|
| 1799 |
+
x.toPrecision(5) // '45.600'
|
| 1800 |
+
y.toPrecision(5) // '45.600'</pre>
|
| 1801 |
+
|
| 1802 |
+
|
| 1803 |
+
|
| 1804 |
+
<h5 id="toS">toString<code class='inset'>.toString([base]) <i>⇒ string</i></code></h5>
|
| 1805 |
+
<p>
|
| 1806 |
+
<code>base</code>: <i>number</i>: integer, <code>2</code> to <code>ALPHABET.length</code>
|
| 1807 |
+
inclusive (see <a href='#alphabet'><code>ALPHABET</code></a>).
|
| 1808 |
+
</p>
|
| 1809 |
+
<p>
|
| 1810 |
+
Returns a string representing the value of this BigNumber in the specified base, or base
|
| 1811 |
+
<code>10</code> if <code>base</code> is omitted or is <code>null</code> or
|
| 1812 |
+
<code>undefined</code>.
|
| 1813 |
+
</p>
|
| 1814 |
+
<p>
|
| 1815 |
+
For bases above <code>10</code>, and using the default base conversion alphabet
|
| 1816 |
+
(see <a href='#alphabet'><code>ALPHABET</code></a>), values from <code>10</code> to
|
| 1817 |
+
<code>35</code> are represented by <code>a-z</code>
|
| 1818 |
+
(as with <code>Number.prototype.toString</code>).
|
| 1819 |
+
</p>
|
| 1820 |
+
<p>
|
| 1821 |
+
If a base is specified the value is rounded according to the current
|
| 1822 |
+
<a href='#decimal-places'><code>DECIMAL_PLACES</code></a>
|
| 1823 |
+
and <a href='#rounding-mode'><code>ROUNDING_MODE</code></a> settings.
|
| 1824 |
+
</p>
|
| 1825 |
+
<p>
|
| 1826 |
+
If a base is not specified, and this BigNumber has a positive
|
| 1827 |
+
exponent that is equal to or greater than the positive component of the
|
| 1828 |
+
current <a href="#exponential-at"><code>EXPONENTIAL_AT</code></a> setting,
|
| 1829 |
+
or a negative exponent equal to or less than the negative component of the
|
| 1830 |
+
setting, then exponential notation is returned.
|
| 1831 |
+
</p>
|
| 1832 |
+
<p>If <code>base</code> is <code>null</code> or <code>undefined</code> it is ignored.</p>
|
| 1833 |
+
<p>
|
| 1834 |
+
Throws if <code>base</code> is invalid. See <a href='#Errors'>Errors</a>.
|
| 1835 |
+
</p>
|
| 1836 |
+
<pre>
|
| 1837 |
+
x = new BigNumber(750000)
|
| 1838 |
+
x.toString() // '750000'
|
| 1839 |
+
BigNumber.config({ EXPONENTIAL_AT: 5 })
|
| 1840 |
+
x.toString() // '7.5e+5'
|
| 1841 |
+
|
| 1842 |
+
y = new BigNumber(362.875)
|
| 1843 |
+
y.toString(2) // '101101010.111'
|
| 1844 |
+
y.toString(9) // '442.77777777777777777778'
|
| 1845 |
+
y.toString(32) // 'ba.s'
|
| 1846 |
+
|
| 1847 |
+
BigNumber.config({ DECIMAL_PLACES: 4 });
|
| 1848 |
+
z = new BigNumber('1.23456789')
|
| 1849 |
+
z.toString() // '1.23456789'
|
| 1850 |
+
z.toString(10) // '1.2346'</pre>
|
| 1851 |
+
|
| 1852 |
+
|
| 1853 |
+
|
| 1854 |
+
<h5 id="valueOf">valueOf<code class='inset'>.valueOf() <i>⇒ string</i></code></h5>
|
| 1855 |
+
<p>
|
| 1856 |
+
As <a href='#toS'><code>toString</code></a>, but does not accept a base argument and includes
|
| 1857 |
+
the minus sign for negative zero.
|
| 1858 |
+
</p>
|
| 1859 |
+
<pre>
|
| 1860 |
+
x = new BigNumber('-0')
|
| 1861 |
+
x.toString() // '0'
|
| 1862 |
+
x.valueOf() // '-0'
|
| 1863 |
+
y = new BigNumber('1.777e+457')
|
| 1864 |
+
y.valueOf() // '1.777e+457'</pre>
|
| 1865 |
+
|
| 1866 |
+
|
| 1867 |
+
|
| 1868 |
+
<h4 id="instance-properties">Properties</h4>
|
| 1869 |
+
<p>The properties of a BigNumber instance:</p>
|
| 1870 |
+
<table>
|
| 1871 |
+
<tr>
|
| 1872 |
+
<th>Property</th>
|
| 1873 |
+
<th>Description</th>
|
| 1874 |
+
<th>Type</th>
|
| 1875 |
+
<th>Value</th>
|
| 1876 |
+
</tr>
|
| 1877 |
+
<tr>
|
| 1878 |
+
<td class='centre' id='coefficient'><b>c</b></td>
|
| 1879 |
+
<td>coefficient<sup>*</sup></td>
|
| 1880 |
+
<td><i>number</i><code>[]</code></td>
|
| 1881 |
+
<td> Array of base <code>1e14</code> numbers</td>
|
| 1882 |
+
</tr>
|
| 1883 |
+
<tr>
|
| 1884 |
+
<td class='centre' id='exponent'><b>e</b></td>
|
| 1885 |
+
<td>exponent</td>
|
| 1886 |
+
<td><i>number</i></td>
|
| 1887 |
+
<td>Integer, <code>-1000000000</code> to <code>1000000000</code> inclusive</td>
|
| 1888 |
+
</tr>
|
| 1889 |
+
<tr>
|
| 1890 |
+
<td class='centre' id='sign'><b>s</b></td>
|
| 1891 |
+
<td>sign</td>
|
| 1892 |
+
<td><i>number</i></td>
|
| 1893 |
+
<td><code>-1</code> or <code>1</code></td>
|
| 1894 |
+
</tr>
|
| 1895 |
+
</table>
|
| 1896 |
+
<p><sup>*</sup>significand</p>
|
| 1897 |
+
<p>
|
| 1898 |
+
The value of any of the <code>c</code>, <code>e</code> and <code>s</code> properties may also
|
| 1899 |
+
be <code>null</code>.
|
| 1900 |
+
</p>
|
| 1901 |
+
<p>
|
| 1902 |
+
The above properties are best considered to be read-only. In early versions of this library it
|
| 1903 |
+
was okay to change the exponent of a BigNumber by writing to its exponent property directly,
|
| 1904 |
+
but this is no longer reliable as the value of the first element of the coefficient array is
|
| 1905 |
+
now dependent on the exponent.
|
| 1906 |
+
</p>
|
| 1907 |
+
<p>
|
| 1908 |
+
Note that, as with JavaScript numbers, the original exponent and fractional trailing zeros are
|
| 1909 |
+
not necessarily preserved.
|
| 1910 |
+
</p>
|
| 1911 |
+
<pre>x = new BigNumber(0.123) // '0.123'
|
| 1912 |
+
x.toExponential() // '1.23e-1'
|
| 1913 |
+
x.c // '1,2,3'
|
| 1914 |
+
x.e // -1
|
| 1915 |
+
x.s // 1
|
| 1916 |
+
|
| 1917 |
+
y = new Number(-123.4567000e+2) // '-12345.67'
|
| 1918 |
+
y.toExponential() // '-1.234567e+4'
|
| 1919 |
+
z = new BigNumber('-123.4567000e+2') // '-12345.67'
|
| 1920 |
+
z.toExponential() // '-1.234567e+4'
|
| 1921 |
+
z.c // '1,2,3,4,5,6,7'
|
| 1922 |
+
z.e // 4
|
| 1923 |
+
z.s // -1</pre>
|
| 1924 |
+
|
| 1925 |
+
|
| 1926 |
+
|
| 1927 |
+
<h4 id="zero-nan-infinity">Zero, NaN and Infinity</h4>
|
| 1928 |
+
<p>
|
| 1929 |
+
The table below shows how ±<code>0</code>, <code>NaN</code> and
|
| 1930 |
+
±<code>Infinity</code> are stored.
|
| 1931 |
+
</p>
|
| 1932 |
+
<table>
|
| 1933 |
+
<tr>
|
| 1934 |
+
<th> </th>
|
| 1935 |
+
<th class='centre'>c</th>
|
| 1936 |
+
<th class='centre'>e</th>
|
| 1937 |
+
<th class='centre'>s</th>
|
| 1938 |
+
</tr>
|
| 1939 |
+
<tr>
|
| 1940 |
+
<td>±0</td>
|
| 1941 |
+
<td><code>[0]</code></td>
|
| 1942 |
+
<td><code>0</code></td>
|
| 1943 |
+
<td><code>±1</code></td>
|
| 1944 |
+
</tr>
|
| 1945 |
+
<tr>
|
| 1946 |
+
<td>NaN</td>
|
| 1947 |
+
<td><code>null</code></td>
|
| 1948 |
+
<td><code>null</code></td>
|
| 1949 |
+
<td><code>null</code></td>
|
| 1950 |
+
</tr>
|
| 1951 |
+
<tr>
|
| 1952 |
+
<td>±Infinity</td>
|
| 1953 |
+
<td><code>null</code></td>
|
| 1954 |
+
<td><code>null</code></td>
|
| 1955 |
+
<td><code>±1</code></td>
|
| 1956 |
+
</tr>
|
| 1957 |
+
</table>
|
| 1958 |
+
<pre>
|
| 1959 |
+
x = new Number(-0) // 0
|
| 1960 |
+
1 / x == -Infinity // true
|
| 1961 |
+
|
| 1962 |
+
y = new BigNumber(-0) // '0'
|
| 1963 |
+
y.c // '0' ( [0].toString() )
|
| 1964 |
+
y.e // 0
|
| 1965 |
+
y.s // -1</pre>
|
| 1966 |
+
|
| 1967 |
+
|
| 1968 |
+
|
| 1969 |
+
<h4 id='Errors'>Errors</h4>
|
| 1970 |
+
<p>The table below shows the errors that are thrown.</p>
|
| 1971 |
+
<p>
|
| 1972 |
+
The errors are generic <code>Error</code> objects whose message begins
|
| 1973 |
+
<code>'[BigNumber Error]'</code>.
|
| 1974 |
+
</p>
|
| 1975 |
+
<table class='error-table'>
|
| 1976 |
+
<tr>
|
| 1977 |
+
<th>Method</th>
|
| 1978 |
+
<th>Throws</th>
|
| 1979 |
+
</tr>
|
| 1980 |
+
<tr>
|
| 1981 |
+
<td rowspan=6>
|
| 1982 |
+
<code>BigNumber</code><br />
|
| 1983 |
+
<code>comparedTo</code><br />
|
| 1984 |
+
<code>dividedBy</code><br />
|
| 1985 |
+
<code>dividedToIntegerBy</code><br />
|
| 1986 |
+
<code>isEqualTo</code><br />
|
| 1987 |
+
<code>isGreaterThan</code><br />
|
| 1988 |
+
<code>isGreaterThanOrEqualTo</code><br />
|
| 1989 |
+
<code>isLessThan</code><br />
|
| 1990 |
+
<code>isLessThanOrEqualTo</code><br />
|
| 1991 |
+
<code>minus</code><br />
|
| 1992 |
+
<code>modulo</code><br />
|
| 1993 |
+
<code>plus</code><br />
|
| 1994 |
+
<code>multipliedBy</code>
|
| 1995 |
+
</td>
|
| 1996 |
+
<td>Base not a primitive number</td>
|
| 1997 |
+
</tr>
|
| 1998 |
+
<tr>
|
| 1999 |
+
<td>Base not an integer</td>
|
| 2000 |
+
</tr>
|
| 2001 |
+
<tr>
|
| 2002 |
+
<td>Base out of range</td>
|
| 2003 |
+
</tr>
|
| 2004 |
+
<tr>
|
| 2005 |
+
<td>Number primitive has more than 15 significant digits<sup>*</sup></td>
|
| 2006 |
+
</tr>
|
| 2007 |
+
<tr>
|
| 2008 |
+
<td>Not a base... number<sup>*</sup></td>
|
| 2009 |
+
</tr>
|
| 2010 |
+
<tr>
|
| 2011 |
+
<td>Not a number<sup>*</sup></td>
|
| 2012 |
+
</tr>
|
| 2013 |
+
<tr>
|
| 2014 |
+
<td><code>clone</code></td>
|
| 2015 |
+
<td>Object expected</td>
|
| 2016 |
+
</tr>
|
| 2017 |
+
<tr>
|
| 2018 |
+
<td rowspan=24><code>config</code></td>
|
| 2019 |
+
<td>Object expected</td>
|
| 2020 |
+
</tr>
|
| 2021 |
+
<tr>
|
| 2022 |
+
<td><code>DECIMAL_PLACES</code> not a primitive number</td>
|
| 2023 |
+
</tr>
|
| 2024 |
+
<tr>
|
| 2025 |
+
<td><code>DECIMAL_PLACES</code> not an integer</td>
|
| 2026 |
+
</tr>
|
| 2027 |
+
<tr>
|
| 2028 |
+
<td><code>DECIMAL_PLACES</code> out of range</td>
|
| 2029 |
+
</tr>
|
| 2030 |
+
<tr>
|
| 2031 |
+
<td><code>ROUNDING_MODE</code> not a primitive number</td>
|
| 2032 |
+
</tr>
|
| 2033 |
+
<tr>
|
| 2034 |
+
<td><code>ROUNDING_MODE</code> not an integer</td>
|
| 2035 |
+
</tr>
|
| 2036 |
+
<tr>
|
| 2037 |
+
<td><code>ROUNDING_MODE</code> out of range</td>
|
| 2038 |
+
</tr>
|
| 2039 |
+
<tr>
|
| 2040 |
+
<td><code>EXPONENTIAL_AT</code> not a primitive number</td>
|
| 2041 |
+
</tr>
|
| 2042 |
+
<tr>
|
| 2043 |
+
<td><code>EXPONENTIAL_AT</code> not an integer</td>
|
| 2044 |
+
</tr>
|
| 2045 |
+
<tr>
|
| 2046 |
+
<td><code>EXPONENTIAL_AT</code> out of range</td>
|
| 2047 |
+
</tr>
|
| 2048 |
+
<tr>
|
| 2049 |
+
<td><code>RANGE</code> not a primitive number</td>
|
| 2050 |
+
</tr>
|
| 2051 |
+
<tr>
|
| 2052 |
+
<td><code>RANGE</code> not an integer</td>
|
| 2053 |
+
</tr>
|
| 2054 |
+
<tr>
|
| 2055 |
+
<td><code>RANGE</code> cannot be zero</td>
|
| 2056 |
+
</tr>
|
| 2057 |
+
<tr>
|
| 2058 |
+
<td><code>RANGE</code> cannot be zero</td>
|
| 2059 |
+
</tr>
|
| 2060 |
+
<tr>
|
| 2061 |
+
<td><code>CRYPTO</code> not true or false</td>
|
| 2062 |
+
</tr>
|
| 2063 |
+
<tr>
|
| 2064 |
+
<td><code>crypto</code> unavailable</td>
|
| 2065 |
+
</tr>
|
| 2066 |
+
<tr>
|
| 2067 |
+
<td><code>MODULO_MODE</code> not a primitive number</td>
|
| 2068 |
+
</tr>
|
| 2069 |
+
<tr>
|
| 2070 |
+
<td><code>MODULO_MODE</code> not an integer</td>
|
| 2071 |
+
</tr>
|
| 2072 |
+
<tr>
|
| 2073 |
+
<td><code>MODULO_MODE</code> out of range</td>
|
| 2074 |
+
</tr>
|
| 2075 |
+
<tr>
|
| 2076 |
+
<td><code>POW_PRECISION</code> not a primitive number</td>
|
| 2077 |
+
</tr>
|
| 2078 |
+
<tr>
|
| 2079 |
+
<td><code>POW_PRECISION</code> not an integer</td>
|
| 2080 |
+
</tr>
|
| 2081 |
+
<tr>
|
| 2082 |
+
<td><code>POW_PRECISION</code> out of range</td>
|
| 2083 |
+
</tr>
|
| 2084 |
+
<tr>
|
| 2085 |
+
<td><code>FORMAT</code> not an object</td>
|
| 2086 |
+
</tr>
|
| 2087 |
+
<tr>
|
| 2088 |
+
<td><code>ALPHABET</code> invalid</td>
|
| 2089 |
+
</tr>
|
| 2090 |
+
<tr>
|
| 2091 |
+
<td rowspan=3>
|
| 2092 |
+
<code>decimalPlaces</code><br />
|
| 2093 |
+
<code>precision</code><br />
|
| 2094 |
+
<code>random</code><br />
|
| 2095 |
+
<code>shiftedBy</code><br />
|
| 2096 |
+
<code>toExponential</code><br />
|
| 2097 |
+
<code>toFixed</code><br />
|
| 2098 |
+
<code>toFormat</code><br />
|
| 2099 |
+
<code>toPrecision</code>
|
| 2100 |
+
</td>
|
| 2101 |
+
<td>Argument not a primitive number</td>
|
| 2102 |
+
</tr>
|
| 2103 |
+
<tr>
|
| 2104 |
+
<td>Argument not an integer</td>
|
| 2105 |
+
</tr>
|
| 2106 |
+
<tr>
|
| 2107 |
+
<td>Argument out of range</td>
|
| 2108 |
+
</tr>
|
| 2109 |
+
<tr>
|
| 2110 |
+
<td>
|
| 2111 |
+
<code>decimalPlaces</code><br />
|
| 2112 |
+
<code>precision</code>
|
| 2113 |
+
</td>
|
| 2114 |
+
<td>Argument not true or false</td>
|
| 2115 |
+
</tr>
|
| 2116 |
+
<tr>
|
| 2117 |
+
<td><code>exponentiatedBy</code></td>
|
| 2118 |
+
<td>Argument not an integer</td>
|
| 2119 |
+
</tr>
|
| 2120 |
+
<tr>
|
| 2121 |
+
<td><code>isBigNumber</code></td>
|
| 2122 |
+
<td>Invalid BigNumber<sup>*</sup></td>
|
| 2123 |
+
</tr>
|
| 2124 |
+
<tr>
|
| 2125 |
+
<td>
|
| 2126 |
+
<code>minimum</code><br />
|
| 2127 |
+
<code>maximum</code>
|
| 2128 |
+
</td>
|
| 2129 |
+
<td>Not a number<sup>*</sup></td>
|
| 2130 |
+
</tr>
|
| 2131 |
+
<tr>
|
| 2132 |
+
<td>
|
| 2133 |
+
<code>random</code>
|
| 2134 |
+
</td>
|
| 2135 |
+
<td>crypto unavailable</td>
|
| 2136 |
+
</tr>
|
| 2137 |
+
<tr>
|
| 2138 |
+
<td>
|
| 2139 |
+
<code>toFormat</code>
|
| 2140 |
+
</td>
|
| 2141 |
+
<td>Argument not an object</td>
|
| 2142 |
+
</tr>
|
| 2143 |
+
<tr>
|
| 2144 |
+
<td rowspan=2><code>toFraction</code></td>
|
| 2145 |
+
<td>Argument not an integer</td>
|
| 2146 |
+
</tr>
|
| 2147 |
+
<tr>
|
| 2148 |
+
<td>Argument out of range</td>
|
| 2149 |
+
</tr>
|
| 2150 |
+
<tr>
|
| 2151 |
+
<td rowspan=3><code>toString</code></td>
|
| 2152 |
+
<td>Base not a primitive number</td>
|
| 2153 |
+
</tr>
|
| 2154 |
+
<tr>
|
| 2155 |
+
<td>Base not an integer</td>
|
| 2156 |
+
</tr>
|
| 2157 |
+
<tr>
|
| 2158 |
+
<td>Base out of range</td>
|
| 2159 |
+
</tr>
|
| 2160 |
+
</table>
|
| 2161 |
+
<p><sup>*</sup>Only thrown if <code>BigNumber.DEBUG</code> is <code>true</code>.</p>
|
| 2162 |
+
<p>To determine if an exception is a BigNumber Error:</p>
|
| 2163 |
+
<pre>
|
| 2164 |
+
try {
|
| 2165 |
+
// ...
|
| 2166 |
+
} catch (e) {
|
| 2167 |
+
if (e instanceof Error && e.message.indexOf('[BigNumber Error]') === 0) {
|
| 2168 |
+
// ...
|
| 2169 |
+
}
|
| 2170 |
+
}</pre>
|
| 2171 |
+
|
| 2172 |
+
|
| 2173 |
+
|
| 2174 |
+
<h4 id="type-coercion">Type coercion</h4>
|
| 2175 |
+
<p>
|
| 2176 |
+
To prevent the accidental use of a BigNumber in primitive number operations, or the
|
| 2177 |
+
accidental addition of a BigNumber to a string, the <code>valueOf</code> method can be safely
|
| 2178 |
+
overwritten as shown below.
|
| 2179 |
+
</p>
|
| 2180 |
+
<p>
|
| 2181 |
+
The <a href='#valueOf'><code>valueOf</code></a> method is the same as the
|
| 2182 |
+
<a href='#toJSON'><code>toJSON</code></a> method, and both are the same as the
|
| 2183 |
+
<a href='#toS'><code>toString</code></a> method except they do not take a <code>base</code>
|
| 2184 |
+
argument and they include the minus sign for negative zero.
|
| 2185 |
+
</p>
|
| 2186 |
+
<pre>
|
| 2187 |
+
BigNumber.prototype.valueOf = function () {
|
| 2188 |
+
throw Error('valueOf called!')
|
| 2189 |
+
}
|
| 2190 |
+
|
| 2191 |
+
x = new BigNumber(1)
|
| 2192 |
+
x / 2 // '[BigNumber Error] valueOf called!'
|
| 2193 |
+
x + 'abc' // '[BigNumber Error] valueOf called!'
|
| 2194 |
+
</pre>
|
| 2195 |
+
|
| 2196 |
+
|
| 2197 |
+
|
| 2198 |
+
<h4 id='faq'>FAQ</h4>
|
| 2199 |
+
|
| 2200 |
+
<h6>Why are trailing fractional zeros removed from BigNumbers?</h6>
|
| 2201 |
+
<p>
|
| 2202 |
+
Some arbitrary-precision libraries retain trailing fractional zeros as they can indicate the
|
| 2203 |
+
precision of a value. This can be useful but the results of arithmetic operations can be
|
| 2204 |
+
misleading.
|
| 2205 |
+
</p>
|
| 2206 |
+
<pre>
|
| 2207 |
+
x = new BigDecimal("1.0")
|
| 2208 |
+
y = new BigDecimal("1.1000")
|
| 2209 |
+
z = x.add(y) // 2.1000
|
| 2210 |
+
|
| 2211 |
+
x = new BigDecimal("1.20")
|
| 2212 |
+
y = new BigDecimal("3.45000")
|
| 2213 |
+
z = x.multiply(y) // 4.1400000</pre>
|
| 2214 |
+
<p>
|
| 2215 |
+
To specify the precision of a value is to specify that the value lies
|
| 2216 |
+
within a certain range.
|
| 2217 |
+
</p>
|
| 2218 |
+
<p>
|
| 2219 |
+
In the first example, <code>x</code> has a value of <code>1.0</code>. The trailing zero shows
|
| 2220 |
+
the precision of the value, implying that it is in the range <code>0.95</code> to
|
| 2221 |
+
<code>1.05</code>. Similarly, the precision indicated by the trailing zeros of <code>y</code>
|
| 2222 |
+
indicates that the value is in the range <code>1.09995</code> to <code>1.10005</code>.
|
| 2223 |
+
</p>
|
| 2224 |
+
<p>
|
| 2225 |
+
If we add the two lowest values in the ranges we have, <code>0.95 + 1.09995 = 2.04995</code>,
|
| 2226 |
+
and if we add the two highest values we have, <code>1.05 + 1.10005 = 2.15005</code>, so the
|
| 2227 |
+
range of the result of the addition implied by the precision of its operands is
|
| 2228 |
+
<code>2.04995</code> to <code>2.15005</code>.
|
| 2229 |
+
</p>
|
| 2230 |
+
<p>
|
| 2231 |
+
The result given by BigDecimal of <code>2.1000</code> however, indicates that the value is in
|
| 2232 |
+
the range <code>2.09995</code> to <code>2.10005</code> and therefore the precision implied by
|
| 2233 |
+
its trailing zeros may be misleading.
|
| 2234 |
+
</p>
|
| 2235 |
+
<p>
|
| 2236 |
+
In the second example, the true range is <code>4.122744</code> to <code>4.157256</code> yet
|
| 2237 |
+
the BigDecimal answer of <code>4.1400000</code> indicates a range of <code>4.13999995</code>
|
| 2238 |
+
to <code>4.14000005</code>. Again, the precision implied by the trailing zeros may be
|
| 2239 |
+
misleading.
|
| 2240 |
+
</p>
|
| 2241 |
+
<p>
|
| 2242 |
+
This library, like binary floating point and most calculators, does not retain trailing
|
| 2243 |
+
fractional zeros. Instead, the <code>toExponential</code>, <code>toFixed</code> and
|
| 2244 |
+
<code>toPrecision</code> methods enable trailing zeros to be added if and when required.<br />
|
| 2245 |
+
</p>
|
| 2246 |
+
</div>
|
| 2247 |
+
|
| 2248 |
+
</body>
|
| 2249 |
+
</html>
|
novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/compile.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
const fill = require('fill-range');
|
| 4 |
+
const utils = require('./utils');
|
| 5 |
+
|
| 6 |
+
const compile = (ast, options = {}) => {
|
| 7 |
+
const walk = (node, parent = {}) => {
|
| 8 |
+
const invalidBlock = utils.isInvalidBrace(parent);
|
| 9 |
+
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
| 10 |
+
const invalid = invalidBlock === true || invalidNode === true;
|
| 11 |
+
const prefix = options.escapeInvalid === true ? '\\' : '';
|
| 12 |
+
let output = '';
|
| 13 |
+
|
| 14 |
+
if (node.isOpen === true) {
|
| 15 |
+
return prefix + node.value;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
if (node.isClose === true) {
|
| 19 |
+
console.log('node.isClose', prefix, node.value);
|
| 20 |
+
return prefix + node.value;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
if (node.type === 'open') {
|
| 24 |
+
return invalid ? prefix + node.value : '(';
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
if (node.type === 'close') {
|
| 28 |
+
return invalid ? prefix + node.value : ')';
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
if (node.type === 'comma') {
|
| 32 |
+
return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
if (node.value) {
|
| 36 |
+
return node.value;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
if (node.nodes && node.ranges > 0) {
|
| 40 |
+
const args = utils.reduce(node.nodes);
|
| 41 |
+
const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
|
| 42 |
+
|
| 43 |
+
if (range.length !== 0) {
|
| 44 |
+
return args.length > 1 && range.length > 1 ? `(${range})` : range;
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
if (node.nodes) {
|
| 49 |
+
for (const child of node.nodes) {
|
| 50 |
+
output += walk(child, node);
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
return output;
|
| 55 |
+
};
|
| 56 |
+
|
| 57 |
+
return walk(ast);
|
| 58 |
+
};
|
| 59 |
+
|
| 60 |
+
module.exports = compile;
|
novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/constants.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
module.exports = {
|
| 4 |
+
MAX_LENGTH: 10000,
|
| 5 |
+
|
| 6 |
+
// Digits
|
| 7 |
+
CHAR_0: '0', /* 0 */
|
| 8 |
+
CHAR_9: '9', /* 9 */
|
| 9 |
+
|
| 10 |
+
// Alphabet chars.
|
| 11 |
+
CHAR_UPPERCASE_A: 'A', /* A */
|
| 12 |
+
CHAR_LOWERCASE_A: 'a', /* a */
|
| 13 |
+
CHAR_UPPERCASE_Z: 'Z', /* Z */
|
| 14 |
+
CHAR_LOWERCASE_Z: 'z', /* z */
|
| 15 |
+
|
| 16 |
+
CHAR_LEFT_PARENTHESES: '(', /* ( */
|
| 17 |
+
CHAR_RIGHT_PARENTHESES: ')', /* ) */
|
| 18 |
+
|
| 19 |
+
CHAR_ASTERISK: '*', /* * */
|
| 20 |
+
|
| 21 |
+
// Non-alphabetic chars.
|
| 22 |
+
CHAR_AMPERSAND: '&', /* & */
|
| 23 |
+
CHAR_AT: '@', /* @ */
|
| 24 |
+
CHAR_BACKSLASH: '\\', /* \ */
|
| 25 |
+
CHAR_BACKTICK: '`', /* ` */
|
| 26 |
+
CHAR_CARRIAGE_RETURN: '\r', /* \r */
|
| 27 |
+
CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
|
| 28 |
+
CHAR_COLON: ':', /* : */
|
| 29 |
+
CHAR_COMMA: ',', /* , */
|
| 30 |
+
CHAR_DOLLAR: '$', /* . */
|
| 31 |
+
CHAR_DOT: '.', /* . */
|
| 32 |
+
CHAR_DOUBLE_QUOTE: '"', /* " */
|
| 33 |
+
CHAR_EQUAL: '=', /* = */
|
| 34 |
+
CHAR_EXCLAMATION_MARK: '!', /* ! */
|
| 35 |
+
CHAR_FORM_FEED: '\f', /* \f */
|
| 36 |
+
CHAR_FORWARD_SLASH: '/', /* / */
|
| 37 |
+
CHAR_HASH: '#', /* # */
|
| 38 |
+
CHAR_HYPHEN_MINUS: '-', /* - */
|
| 39 |
+
CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
|
| 40 |
+
CHAR_LEFT_CURLY_BRACE: '{', /* { */
|
| 41 |
+
CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
|
| 42 |
+
CHAR_LINE_FEED: '\n', /* \n */
|
| 43 |
+
CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
|
| 44 |
+
CHAR_PERCENT: '%', /* % */
|
| 45 |
+
CHAR_PLUS: '+', /* + */
|
| 46 |
+
CHAR_QUESTION_MARK: '?', /* ? */
|
| 47 |
+
CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
|
| 48 |
+
CHAR_RIGHT_CURLY_BRACE: '}', /* } */
|
| 49 |
+
CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
|
| 50 |
+
CHAR_SEMICOLON: ';', /* ; */
|
| 51 |
+
CHAR_SINGLE_QUOTE: '\'', /* ' */
|
| 52 |
+
CHAR_SPACE: ' ', /* */
|
| 53 |
+
CHAR_TAB: '\t', /* \t */
|
| 54 |
+
CHAR_UNDERSCORE: '_', /* _ */
|
| 55 |
+
CHAR_VERTICAL_LINE: '|', /* | */
|
| 56 |
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
|
| 57 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/expand.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
const fill = require('fill-range');
|
| 4 |
+
const stringify = require('./stringify');
|
| 5 |
+
const utils = require('./utils');
|
| 6 |
+
|
| 7 |
+
const append = (queue = '', stash = '', enclose = false) => {
|
| 8 |
+
const result = [];
|
| 9 |
+
|
| 10 |
+
queue = [].concat(queue);
|
| 11 |
+
stash = [].concat(stash);
|
| 12 |
+
|
| 13 |
+
if (!stash.length) return queue;
|
| 14 |
+
if (!queue.length) {
|
| 15 |
+
return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
for (const item of queue) {
|
| 19 |
+
if (Array.isArray(item)) {
|
| 20 |
+
for (const value of item) {
|
| 21 |
+
result.push(append(value, stash, enclose));
|
| 22 |
+
}
|
| 23 |
+
} else {
|
| 24 |
+
for (let ele of stash) {
|
| 25 |
+
if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
|
| 26 |
+
result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
|
| 27 |
+
}
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
return utils.flatten(result);
|
| 31 |
+
};
|
| 32 |
+
|
| 33 |
+
const expand = (ast, options = {}) => {
|
| 34 |
+
const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;
|
| 35 |
+
|
| 36 |
+
const walk = (node, parent = {}) => {
|
| 37 |
+
node.queue = [];
|
| 38 |
+
|
| 39 |
+
let p = parent;
|
| 40 |
+
let q = parent.queue;
|
| 41 |
+
|
| 42 |
+
while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
|
| 43 |
+
p = p.parent;
|
| 44 |
+
q = p.queue;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
if (node.invalid || node.dollar) {
|
| 48 |
+
q.push(append(q.pop(), stringify(node, options)));
|
| 49 |
+
return;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
|
| 53 |
+
q.push(append(q.pop(), ['{}']));
|
| 54 |
+
return;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
if (node.nodes && node.ranges > 0) {
|
| 58 |
+
const args = utils.reduce(node.nodes);
|
| 59 |
+
|
| 60 |
+
if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
|
| 61 |
+
throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
let range = fill(...args, options);
|
| 65 |
+
if (range.length === 0) {
|
| 66 |
+
range = stringify(node, options);
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
q.push(append(q.pop(), range));
|
| 70 |
+
node.nodes = [];
|
| 71 |
+
return;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
const enclose = utils.encloseBrace(node);
|
| 75 |
+
let queue = node.queue;
|
| 76 |
+
let block = node;
|
| 77 |
+
|
| 78 |
+
while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
|
| 79 |
+
block = block.parent;
|
| 80 |
+
queue = block.queue;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
for (let i = 0; i < node.nodes.length; i++) {
|
| 84 |
+
const child = node.nodes[i];
|
| 85 |
+
|
| 86 |
+
if (child.type === 'comma' && node.type === 'brace') {
|
| 87 |
+
if (i === 1) queue.push('');
|
| 88 |
+
queue.push('');
|
| 89 |
+
continue;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
if (child.type === 'close') {
|
| 93 |
+
q.push(append(q.pop(), queue, enclose));
|
| 94 |
+
continue;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
if (child.value && child.type !== 'open') {
|
| 98 |
+
queue.push(append(queue.pop(), child.value));
|
| 99 |
+
continue;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
if (child.nodes) {
|
| 103 |
+
walk(child, node);
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
return queue;
|
| 108 |
+
};
|
| 109 |
+
|
| 110 |
+
return utils.flatten(walk(ast));
|
| 111 |
+
};
|
| 112 |
+
|
| 113 |
+
module.exports = expand;
|
novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/parse.js
ADDED
|
@@ -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stringify');
|
| 4 |
+
|
| 5 |
+
/**
|
| 6 |
+
* Constants
|
| 7 |
+
*/
|
| 8 |
+
|
| 9 |
+
const {
|
| 10 |
+
MAX_LENGTH,
|
| 11 |
+
CHAR_BACKSLASH, /* \ */
|
| 12 |
+
CHAR_BACKTICK, /* ` */
|
| 13 |
+
CHAR_COMMA, /* , */
|
| 14 |
+
CHAR_DOT, /* . */
|
| 15 |
+
CHAR_LEFT_PARENTHESES, /* ( */
|
| 16 |
+
CHAR_RIGHT_PARENTHESES, /* ) */
|
| 17 |
+
CHAR_LEFT_CURLY_BRACE, /* { */
|
| 18 |
+
CHAR_RIGHT_CURLY_BRACE, /* } */
|
| 19 |
+
CHAR_LEFT_SQUARE_BRACKET, /* [ */
|
| 20 |
+
CHAR_RIGHT_SQUARE_BRACKET, /* ] */
|
| 21 |
+
CHAR_DOUBLE_QUOTE, /* " */
|
| 22 |
+
CHAR_SINGLE_QUOTE, /* ' */
|
| 23 |
+
CHAR_NO_BREAK_SPACE,
|
| 24 |
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
| 25 |
+
} = require('./constants');
|
| 26 |
+
|
| 27 |
+
/**
|
| 28 |
+
* parse
|
| 29 |
+
*/
|
| 30 |
+
|
| 31 |
+
const parse = (input, options = {}) => {
|
| 32 |
+
if (typeof input !== 'string') {
|
| 33 |
+
throw new TypeError('Expected a string');
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
const opts = options || {};
|
| 37 |
+
const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
| 38 |
+
if (input.length > max) {
|
| 39 |
+
throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
const ast = { type: 'root', input, nodes: [] };
|
| 43 |
+
const stack = [ast];
|
| 44 |
+
let block = ast;
|
| 45 |
+
let prev = ast;
|
| 46 |
+
let brackets = 0;
|
| 47 |
+
const length = input.length;
|
| 48 |
+
let index = 0;
|
| 49 |
+
let depth = 0;
|
| 50 |
+
let value;
|
| 51 |
+
|
| 52 |
+
/**
|
| 53 |
+
* Helpers
|
| 54 |
+
*/
|
| 55 |
+
|
| 56 |
+
const advance = () => input[index++];
|
| 57 |
+
const push = node => {
|
| 58 |
+
if (node.type === 'text' && prev.type === 'dot') {
|
| 59 |
+
prev.type = 'text';
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
if (prev && prev.type === 'text' && node.type === 'text') {
|
| 63 |
+
prev.value += node.value;
|
| 64 |
+
return;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
block.nodes.push(node);
|
| 68 |
+
node.parent = block;
|
| 69 |
+
node.prev = prev;
|
| 70 |
+
prev = node;
|
| 71 |
+
return node;
|
| 72 |
+
};
|
| 73 |
+
|
| 74 |
+
push({ type: 'bos' });
|
| 75 |
+
|
| 76 |
+
while (index < length) {
|
| 77 |
+
block = stack[stack.length - 1];
|
| 78 |
+
value = advance();
|
| 79 |
+
|
| 80 |
+
/**
|
| 81 |
+
* Invalid chars
|
| 82 |
+
*/
|
| 83 |
+
|
| 84 |
+
if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
|
| 85 |
+
continue;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
/**
|
| 89 |
+
* Escaped chars
|
| 90 |
+
*/
|
| 91 |
+
|
| 92 |
+
if (value === CHAR_BACKSLASH) {
|
| 93 |
+
push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
|
| 94 |
+
continue;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
/**
|
| 98 |
+
* Right square bracket (literal): ']'
|
| 99 |
+
*/
|
| 100 |
+
|
| 101 |
+
if (value === CHAR_RIGHT_SQUARE_BRACKET) {
|
| 102 |
+
push({ type: 'text', value: '\\' + value });
|
| 103 |
+
continue;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/**
|
| 107 |
+
* Left square bracket: '['
|
| 108 |
+
*/
|
| 109 |
+
|
| 110 |
+
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
| 111 |
+
brackets++;
|
| 112 |
+
|
| 113 |
+
let next;
|
| 114 |
+
|
| 115 |
+
while (index < length && (next = advance())) {
|
| 116 |
+
value += next;
|
| 117 |
+
|
| 118 |
+
if (next === CHAR_LEFT_SQUARE_BRACKET) {
|
| 119 |
+
brackets++;
|
| 120 |
+
continue;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
if (next === CHAR_BACKSLASH) {
|
| 124 |
+
value += advance();
|
| 125 |
+
continue;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
|
| 129 |
+
brackets--;
|
| 130 |
+
|
| 131 |
+
if (brackets === 0) {
|
| 132 |
+
break;
|
| 133 |
+
}
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
push({ type: 'text', value });
|
| 138 |
+
continue;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
/**
|
| 142 |
+
* Parentheses
|
| 143 |
+
*/
|
| 144 |
+
|
| 145 |
+
if (value === CHAR_LEFT_PARENTHESES) {
|
| 146 |
+
block = push({ type: 'paren', nodes: [] });
|
| 147 |
+
stack.push(block);
|
| 148 |
+
push({ type: 'text', value });
|
| 149 |
+
continue;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
if (value === CHAR_RIGHT_PARENTHESES) {
|
| 153 |
+
if (block.type !== 'paren') {
|
| 154 |
+
push({ type: 'text', value });
|
| 155 |
+
continue;
|
| 156 |
+
}
|
| 157 |
+
block = stack.pop();
|
| 158 |
+
push({ type: 'text', value });
|
| 159 |
+
block = stack[stack.length - 1];
|
| 160 |
+
continue;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
/**
|
| 164 |
+
* Quotes: '|"|`
|
| 165 |
+
*/
|
| 166 |
+
|
| 167 |
+
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
| 168 |
+
const open = value;
|
| 169 |
+
let next;
|
| 170 |
+
|
| 171 |
+
if (options.keepQuotes !== true) {
|
| 172 |
+
value = '';
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
while (index < length && (next = advance())) {
|
| 176 |
+
if (next === CHAR_BACKSLASH) {
|
| 177 |
+
value += next + advance();
|
| 178 |
+
continue;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
if (next === open) {
|
| 182 |
+
if (options.keepQuotes === true) value += next;
|
| 183 |
+
break;
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
value += next;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
push({ type: 'text', value });
|
| 190 |
+
continue;
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
/**
|
| 194 |
+
* Left curly brace: '{'
|
| 195 |
+
*/
|
| 196 |
+
|
| 197 |
+
if (value === CHAR_LEFT_CURLY_BRACE) {
|
| 198 |
+
depth++;
|
| 199 |
+
|
| 200 |
+
const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
|
| 201 |
+
const brace = {
|
| 202 |
+
type: 'brace',
|
| 203 |
+
open: true,
|
| 204 |
+
close: false,
|
| 205 |
+
dollar,
|
| 206 |
+
depth,
|
| 207 |
+
commas: 0,
|
| 208 |
+
ranges: 0,
|
| 209 |
+
nodes: []
|
| 210 |
+
};
|
| 211 |
+
|
| 212 |
+
block = push(brace);
|
| 213 |
+
stack.push(block);
|
| 214 |
+
push({ type: 'open', value });
|
| 215 |
+
continue;
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
/**
|
| 219 |
+
* Right curly brace: '}'
|
| 220 |
+
*/
|
| 221 |
+
|
| 222 |
+
if (value === CHAR_RIGHT_CURLY_BRACE) {
|
| 223 |
+
if (block.type !== 'brace') {
|
| 224 |
+
push({ type: 'text', value });
|
| 225 |
+
continue;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
const type = 'close';
|
| 229 |
+
block = stack.pop();
|
| 230 |
+
block.close = true;
|
| 231 |
+
|
| 232 |
+
push({ type, value });
|
| 233 |
+
depth--;
|
| 234 |
+
|
| 235 |
+
block = stack[stack.length - 1];
|
| 236 |
+
continue;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
/**
|
| 240 |
+
* Comma: ','
|
| 241 |
+
*/
|
| 242 |
+
|
| 243 |
+
if (value === CHAR_COMMA && depth > 0) {
|
| 244 |
+
if (block.ranges > 0) {
|
| 245 |
+
block.ranges = 0;
|
| 246 |
+
const open = block.nodes.shift();
|
| 247 |
+
block.nodes = [open, { type: 'text', value: stringify(block) }];
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
push({ type: 'comma', value });
|
| 251 |
+
block.commas++;
|
| 252 |
+
continue;
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
/**
|
| 256 |
+
* Dot: '.'
|
| 257 |
+
*/
|
| 258 |
+
|
| 259 |
+
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
|
| 260 |
+
const siblings = block.nodes;
|
| 261 |
+
|
| 262 |
+
if (depth === 0 || siblings.length === 0) {
|
| 263 |
+
push({ type: 'text', value });
|
| 264 |
+
continue;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
if (prev.type === 'dot') {
|
| 268 |
+
block.range = [];
|
| 269 |
+
prev.value += value;
|
| 270 |
+
prev.type = 'range';
|
| 271 |
+
|
| 272 |
+
if (block.nodes.length !== 3 && block.nodes.length !== 5) {
|
| 273 |
+
block.invalid = true;
|
| 274 |
+
block.ranges = 0;
|
| 275 |
+
prev.type = 'text';
|
| 276 |
+
continue;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
block.ranges++;
|
| 280 |
+
block.args = [];
|
| 281 |
+
continue;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
if (prev.type === 'range') {
|
| 285 |
+
siblings.pop();
|
| 286 |
+
|
| 287 |
+
const before = siblings[siblings.length - 1];
|
| 288 |
+
before.value += prev.value + value;
|
| 289 |
+
prev = before;
|
| 290 |
+
block.ranges--;
|
| 291 |
+
continue;
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
push({ type: 'dot', value });
|
| 295 |
+
continue;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
/**
|
| 299 |
+
* Text
|
| 300 |
+
*/
|
| 301 |
+
|
| 302 |
+
push({ type: 'text', value });
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
// Mark imbalanced braces and brackets as invalid
|
| 306 |
+
do {
|
| 307 |
+
block = stack.pop();
|
| 308 |
+
|
| 309 |
+
if (block.type !== 'root') {
|
| 310 |
+
block.nodes.forEach(node => {
|
| 311 |
+
if (!node.nodes) {
|
| 312 |
+
if (node.type === 'open') node.isOpen = true;
|
| 313 |
+
if (node.type === 'close') node.isClose = true;
|
| 314 |
+
if (!node.nodes) node.type = 'text';
|
| 315 |
+
node.invalid = true;
|
| 316 |
+
}
|
| 317 |
+
});
|
| 318 |
+
|
| 319 |
+
// get the location of the block on parent.nodes (block's siblings)
|
| 320 |
+
const parent = stack[stack.length - 1];
|
| 321 |
+
const index = parent.nodes.indexOf(block);
|
| 322 |
+
// replace the (invalid) block with it's nodes
|
| 323 |
+
parent.nodes.splice(index, 1, ...block.nodes);
|
| 324 |
+
}
|
| 325 |
+
} while (stack.length > 0);
|
| 326 |
+
|
| 327 |
+
push({ type: 'eos' });
|
| 328 |
+
return ast;
|
| 329 |
+
};
|
| 330 |
+
|
| 331 |
+
module.exports = parse;
|
novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/stringify.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
const utils = require('./utils');
|
| 4 |
+
|
| 5 |
+
module.exports = (ast, options = {}) => {
|
| 6 |
+
const stringify = (node, parent = {}) => {
|
| 7 |
+
const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
|
| 8 |
+
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
| 9 |
+
let output = '';
|
| 10 |
+
|
| 11 |
+
if (node.value) {
|
| 12 |
+
if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
|
| 13 |
+
return '\\' + node.value;
|
| 14 |
+
}
|
| 15 |
+
return node.value;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
if (node.value) {
|
| 19 |
+
return node.value;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
if (node.nodes) {
|
| 23 |
+
for (const child of node.nodes) {
|
| 24 |
+
output += stringify(child);
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
return output;
|
| 28 |
+
};
|
| 29 |
+
|
| 30 |
+
return stringify(ast);
|
| 31 |
+
};
|
| 32 |
+
|
novas/novacore-zephyr/claude-code-router/node_modules/braces/lib/utils.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
exports.isInteger = num => {
|
| 4 |
+
if (typeof num === 'number') {
|
| 5 |
+
return Number.isInteger(num);
|
| 6 |
+
}
|
| 7 |
+
if (typeof num === 'string' && num.trim() !== '') {
|
| 8 |
+
return Number.isInteger(Number(num));
|
| 9 |
+
}
|
| 10 |
+
return false;
|
| 11 |
+
};
|
| 12 |
+
|
| 13 |
+
/**
|
| 14 |
+
* Find a node of the given type
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
exports.find = (node, type) => node.nodes.find(node => node.type === type);
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* Find a node of the given type
|
| 21 |
+
*/
|
| 22 |
+
|
| 23 |
+
exports.exceedsLimit = (min, max, step = 1, limit) => {
|
| 24 |
+
if (limit === false) return false;
|
| 25 |
+
if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
|
| 26 |
+
return ((Number(max) - Number(min)) / Number(step)) >= limit;
|
| 27 |
+
};
|
| 28 |
+
|
| 29 |
+
/**
|
| 30 |
+
* Escape the given node with '\\' before node.value
|
| 31 |
+
*/
|
| 32 |
+
|
| 33 |
+
exports.escapeNode = (block, n = 0, type) => {
|
| 34 |
+
const node = block.nodes[n];
|
| 35 |
+
if (!node) return;
|
| 36 |
+
|
| 37 |
+
if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
|
| 38 |
+
if (node.escaped !== true) {
|
| 39 |
+
node.value = '\\' + node.value;
|
| 40 |
+
node.escaped = true;
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
};
|
| 44 |
+
|
| 45 |
+
/**
|
| 46 |
+
* Returns true if the given brace node should be enclosed in literal braces
|
| 47 |
+
*/
|
| 48 |
+
|
| 49 |
+
exports.encloseBrace = node => {
|
| 50 |
+
if (node.type !== 'brace') return false;
|
| 51 |
+
if ((node.commas >> 0 + node.ranges >> 0) === 0) {
|
| 52 |
+
node.invalid = true;
|
| 53 |
+
return true;
|
| 54 |
+
}
|
| 55 |
+
return false;
|
| 56 |
+
};
|
| 57 |
+
|
| 58 |
+
/**
|
| 59 |
+
* Returns true if a brace node is invalid.
|
| 60 |
+
*/
|
| 61 |
+
|
| 62 |
+
exports.isInvalidBrace = block => {
|
| 63 |
+
if (block.type !== 'brace') return false;
|
| 64 |
+
if (block.invalid === true || block.dollar) return true;
|
| 65 |
+
if ((block.commas >> 0 + block.ranges >> 0) === 0) {
|
| 66 |
+
block.invalid = true;
|
| 67 |
+
return true;
|
| 68 |
+
}
|
| 69 |
+
if (block.open !== true || block.close !== true) {
|
| 70 |
+
block.invalid = true;
|
| 71 |
+
return true;
|
| 72 |
+
}
|
| 73 |
+
return false;
|
| 74 |
+
};
|
| 75 |
+
|
| 76 |
+
/**
|
| 77 |
+
* Returns true if a node is an open or close node
|
| 78 |
+
*/
|
| 79 |
+
|
| 80 |
+
exports.isOpenOrClose = node => {
|
| 81 |
+
if (node.type === 'open' || node.type === 'close') {
|
| 82 |
+
return true;
|
| 83 |
+
}
|
| 84 |
+
return node.open === true || node.close === true;
|
| 85 |
+
};
|
| 86 |
+
|
| 87 |
+
/**
|
| 88 |
+
* Reduce an array of text nodes.
|
| 89 |
+
*/
|
| 90 |
+
|
| 91 |
+
exports.reduce = nodes => nodes.reduce((acc, node) => {
|
| 92 |
+
if (node.type === 'text') acc.push(node.value);
|
| 93 |
+
if (node.type === 'range') node.type = 'text';
|
| 94 |
+
return acc;
|
| 95 |
+
}, []);
|
| 96 |
+
|
| 97 |
+
/**
|
| 98 |
+
* Flatten an array
|
| 99 |
+
*/
|
| 100 |
+
|
| 101 |
+
exports.flatten = (...args) => {
|
| 102 |
+
const result = [];
|
| 103 |
+
|
| 104 |
+
const flat = arr => {
|
| 105 |
+
for (let i = 0; i < arr.length; i++) {
|
| 106 |
+
const ele = arr[i];
|
| 107 |
+
|
| 108 |
+
if (Array.isArray(ele)) {
|
| 109 |
+
flat(ele);
|
| 110 |
+
continue;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
if (ele !== undefined) {
|
| 114 |
+
result.push(ele);
|
| 115 |
+
}
|
| 116 |
+
}
|
| 117 |
+
return result;
|
| 118 |
+
};
|
| 119 |
+
|
| 120 |
+
flat(args);
|
| 121 |
+
return result;
|
| 122 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/cjs-module-lexer/dist/lexer.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"use strict";exports.init=init;exports.initSync=initSync;exports.parse=parse;let A;const Q=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse(g,I="@"){if(!A)throw new Error("Not initialized");const D=g.length+1,N=(A.__heap_base.value||A.__heap_base)+4*D-A.memory.buffer.byteLength;N>0&&A.memory.grow(Math.ceil(N/65536));const k=A.sa(D);(Q?C:E)(g,new Uint16Array(A.memory.buffer,k,D));const w=A.parseCJS(k,g.length,0,0,0);if(w){const Q=new Error(`Parse error ${I}${A.e()}:${g.slice(0,A.e()).split("\n").length}:${A.e()-g.lastIndexOf("\n",A.e()-1)}`);throw Object.assign(Q,{idx:A.e()}),5!==w&&6!==w&&7!==w||Object.assign(Q,{code:"ERR_LEXER_ESM_SYNTAX"}),Q}let H=new Set,J=new Set,o=new Set;for(;A.rre();){const Q=B(g.slice(A.res(),A.ree()));Q&&J.add(Q)}for(;A.ru();)o.add(B(g.slice(A.us(),A.ue())));for(;A.re();){let Q=B(g.slice(A.es(),A.ee()));void 0===Q||o.has(Q)||H.add(Q)}return{exports:[...H],reexports:[...J]}}function B(A){if('"'!==A[0]&&"'"!==A[0])return A;try{const Q=(0,eval)(A);for(let A=0;A<Q.length;A++){const B=64512&Q.charCodeAt(A);if(!(B<55296)){if(55296!==B)return;if(56320!=(64512&Q.charCodeAt(++A)))return}}return Q}catch{}}function E(A,Q){const B=A.length;let E=0;for(;E<B;){const B=A.charCodeAt(E);Q[E++]=(255&B)<<8|B>>>8}}function C(A,Q){const B=A.length;let E=0;for(;E<B;)Q[E]=A.charCodeAt(E++)}function g(){const A="AGFzbQEAAAABrAERYAJ/fwBgAABgAX8Bf2AAAX9gBn9/f39/fwF/YAF/AGAXf39/f39/f39/f39/f39/f39/f39/f38Bf2AIf39/f39/f38Bf2AHf39/f39/fwF/YAN/f38Bf2AFf39/f38Bf2AOf39/f39/f39/f39/f38Bf2AKf39/f39/f39/fwF/YAt/f39/f39/f39/fwF/YAJ/fwF/YAR/f39/AX9gCX9/f39/f39/fwF/A0NCAgMDAwMDAwMDAwMAAAABBAICBQQBBgcBBQEFBQUBAQICAgIBAQIIAwICAgkKAgELAgwNDgQPCA4HAgICAhACAgMJBAUBcAEFBQUDAQABBg8CfwFB0JgCC38AQdCYAgsHXA4GbWVtb3J5AgACc2EAAAFlAAECZXMAAgJlZQADA3JlcwAEA3JlZQAFAnVzAAYCdWUABwJyZQAIA3JyZQAJAnJ1AAoIcGFyc2VDSlMADwtfX2hlYXBfYmFzZQMBCQoBAEEBCwQLDA0OCt2fAUJ4AQF/QQAoApgfIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgLkH0EAIAA2AugfQQBBADYCwB9BAEEANgLIH0EAQQA2AsQfQQBBADYCzB9BAEEANgLUH0EAQQA2AtAf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ECQEEAKAK8oAEiAkECakHlAEHxAEH1AEHpAEHyAEHlABAmRQ0AQQAhAUEAIAJBDmo2ArygAQJAECdBKEcNAEEAQQAoArygAUECajYCvKABECchA0EAKAK8oAEhBAJAIANBJ0YNACADQSJHDQELIAMQHEEAQQAoArygAUECaiIDNgK8oAEQJ0EpRw0AAkACQAJAIABBf2oOAgEAAgsgBCADQQAoAqAfEQAAQQEPCyAEIANBACgCoB8RAABBAQ8LQQAoArSgASAENgIAQQAoArSgASADNgIEQQEPC0EAIAI2ArygAQsgAQsdAAJAQQAoApgfIABHDQBBAQ8LIABBfmovAQAQJQv1AgEEf0EAKAKYHyEBAkADQCAAQX5qIQIgAC8BACIDQSBHDQEgACABSyEEIAIhACAEDQALCwJAIANBPUcNAAJAA0AgAkF+aiEAIAIvAQBBIEcNASACIAFLIQQgACECIAQNAAsLIABBAmohAiAAQQRqIQNBACEEAkADQCACECghACACIAFNDQEgAEUNASAAQdwARg0CIAAQKUUNASACQX5BfCAAQYCABEkbaiECIAAQKiEEDAALCyAEQQFxRQ0AIAIvAQBBIEcNAEEAKAK0oAEiBEEAKAKwH0YNACAEIAM2AgwgBCACQQJqNgIIIAJBfmohAEEgIQICQANAIABBAmogAU0NASACQf//A3FBIEcNASAALwEAIQIgAEF+aiEADAALCwJAAkACQCACQf//A3FBjn9qDgMAAwEDCyAAQfYAQeEAECsNAQwCCyAAQewAQeUAECsNACAAQeMAQe8AQe4AQfMAECxFDQELQQAgBEEQajYCtKABCws/AQF/QQAhBgJAIAAvAQAgAUcNACAALwECIAJHDQAgAC8BBCADRw0AIAAvAQYgBEcNACAALwEIIAVGIQYLIAYLowEBA39BAEEAKAK8oAEiAEEMaiIBNgK8oAECQAJAAkACQAJAAkACQBAnIgJBWWoOCAIDAQIBAQEEAAsgAkEiRg0BIAJB+wBGDQELQQAoArygASABRg0EC0EALwGGQEUNAkEAQQAoArygAUF+ajYCvKABDwtBAEEALwGGQCICQQFqOwGGQEEAKAKwoAEgAkECdGogADY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AmpB5QBB9ABB9QBB8gBB7gAQE0UNAUEAIANBDGo2ArygARAnEC1FDQECQAJAAkAQJyIDQdsARg0AIANBLkcNAkEAQQAoArygAUECajYCvKABECcQLQ0BDAQLQQBBACgCvKABQQJqNgK8oAECQBAnIgNBJ0YNACADQSJHDQQLIAMQHEEAQQAoArygAUECajYCvKABECdB3QBHDQNBAEEAKAK8oAFBAmo2ArygAQsQJyEDCwJAIANBO0cNAEEAQQAoArygAUECajYCvKABECchAwsgA0H9AEcNAUEAQQAoArygAUECajYCvKABAkAQJyIDQSxHDQBBAEEAKAK8oAFBAmo2ArygARAnIQMLIANB/QBHDQFBAEEAKAK8oAFBAmo2ArygARAnQSlHDQEgAiAAQQAoApwfEQAADwsgAkHrAEcNASAARQ0BQQAoArygASIALwECQeUARw0BIAAvAQRB+QBHDQEgAC8BBkHzAEcNASAAQQZqIQFBACAAQQhqNgK8oAEQJ0EoRw0BQQBBACgCvKABQQJqNgK8oAEQJyEAQQAoArygASECIAAQLUUNAUEAKAK8oAEhABAnQSlHDQFBAEEAKAK8oAEiAUECajYCvKABECdBLkcNAUEAQQAoArygAUECajYCvKABECdB5gBHDQFBACgCvKABIgNBAmpB7wBB8gBBxQBB4QBB4wBB6AAQJkUNAUEAIANBDmo2ArygARAnIQNBACgCvKABIgRBfmohASADQShHDQFBACAEQQJqNgK8oAEQJ0HmAEcNAUEAKAK8oAEiA0ECakH1AEHuAEHjAEH0AEHpAEHvAEHuABAWRQ0BQQAgA0EQajYCvKABECdBKEcNAUEAQQAoArygAUECajYCvKABECchA0EAKAK8oAEhBCADEC1FDQFBACgCvKABIQMQJ0EpRw0BQQBBACgCvKABQQJqNgK8oAEQJ0H7AEcNAUEAQQAoArygAUECajYCvKABECdB6QBHDQFBACgCvKABIgUvAQJB5gBHDQFBACAFQQRqNgK8oAEQJ0EoRw0BQQBBACgCvKABQQJqNgK8oAEQJxpBACgCvKABIgUgBCADIARrIgMQQQ0BIAAgAmsiBkEBdSEHQQAgBSADQQ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Amo2ArygAQsQJyEACyAAQSlHDQNBAEEAKAK8oAFBAmo2ArygAQsQJyEACwJAAkACQCAAEDBFDQAQJ0HbAEcNBEEAQQAoArygAUECajYCvKABECcaQQAoArygASIAIAQgAxBBDQRBACAAIAhBAXRqNgK8oAEQJ0HdAEcNBEEAQQAoArygAUECajYCvKABECdBPUcNBEEAQQAoArygAUECajYCvKABECcaQQAoArygASIAIAIgBhBBDQRBACAAIAdBAXRqNgK8oAEQJ0HbAEcNBEEAQQAoArygAUECajYCvKABECcaQQAoArygASIAIAQgAxBBDQRBACAAIAhBAXRqNgK8oAEQJ0HdAEcNBEEAQQAoArygAUECajYCvKABECciAEE7Rw0CQQBBACgCvKABQQJqNgK8oAEMAQsgAEHPAEcNA0EAKAK8oAEiAEECakHiAEHqAEHlAEHjAEH0ABATRQ0DQQAgAEEMajYCvKABECdBLkcNA0EAQQAoArygAUECajYCvKABECdB5ABHDQNBACgCvKABIgBBAmpB5QBB5gBB6QBB7gBB5QBB0ABB8gBB7wBB8ABB5QBB8gBB9ABB+QAQL0UNA0EAIABBHGo2ArygARAnQShHDQNBAEEAKAK8oAFBAmo2ArygARAnEDBFDQMQJ0EsRw0DQQBBACgCvKABQQJqNgK8oAEQJxpBACgCvKABIgAgBCADEEENA0EAIAAgCEEBdGo2ArygARAnQSxHDQNBAEEAKAK8oAFBAmo2ArygARAnQfsARw0DQQBBACgCvKABQQJqNgK8oAEQJ0HlAEcNA0EAKAK8oAEiAEECakHuAEH1AEHtAEHlAEHyAEHhAEHiAEHsAEHlABAxRQ0DQQAgAEEUajYCvKABECdBOkcNA0EAQQAoArygAUECajYCvKABECchBUEAKAK8oAEhAAJAIAVB9ABGDQAgAC8BAkHyAEcNBCAALwEEQfUARw0EIAAvAQZB5QBHDQQLQQAgAEEIajYCvKABECdBLEcNA0EAQQAoArygAUECajYCvKABECdB5wBHDQNBACgCvKABIgAvAQJB5QBHDQMgAC8BBEH0AEcNA0EAIABBBmo2ArygAQJAECciAEE6Rw0AQQBBACgCvKABQQJqNgK8oAEQJ0HmAEcNBEEAKAK8oAEiAEECakH1AEHuAEHjAEH0AEHpAEHvAEHuABAWRQ0EQQAgAEEQaiIANgK8oAECQBAnIgVBKEYNACAAQQAoArygAUYNBSAFEC1FDQULECchAAsgAEEoRw0DQQBBACgCvKABQQJqNgK8oAEQJ0EpRw0DQQBBACgCvKABQQJqNgK8oAEQJ0H7AEcNA0EAQQAoArygAUECajYCvKABECdB8gBHDQNBACgCvKABIgBBAmpB5QBB9ABB9QBB8gBB7gAQE0UNA0EAIABBDGo2ArygARAnGkEAKAK8oAEiACACIAYQQQ0DQQAgACAHQQF0ajYCvKABECdB2wBHDQNBAEEAKAK8oAFBAmo2ArygARAnGkEAKAK8oAEiACAEIAMQQQ0DQQAgACAIQQF0ajYCvKABECdB3QBHDQNBAEEAKAK8oAFBAmo2ArygAQJAECciAEE7Rw0AQQBBACgCvKABQQJqNgK8oAEQJyEACyAAQf0ARw0DQQBBACgCvKABQQJqNgK8oAECQBAnIgBBLEcNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNA0EAQQAoArygAUECajYCvKABECdBKUcNA0EAQQAoArygAUECajYCvKABECciAEE7Rw0BQQBBACgCvKABQQJqNgK8oAELECchAAsgAEH9AEcNAUEAQQAoArygAUECajYCvKABECdBKUcNAUEAKAK0oAEhBEGAICEAA0ACQAJAIAQgAEYNACAHIABBDGooAgAgAEEIaigCACIDa0EBdUcNASACIAMgBhBBDQEgACgCACAAQQRqKAIAQQAoAqAfEQAAQQAgATYCvKABCw8LIABBEGohAAwACwsgAiAAQQAoAqQfEQAAC0EAIAE2ArygAQtBAAJAQQAoAvAfDQBBACAANgLwHwtBACgCvKABIQBBAEEAKALAoAFBAmo2ArygAUEAIABBACgCmB9rQQF1NgLsHwuOAQEEf0EAKAK8oAEhAUEAKALAoAEhAgJAAkADQCABIgNBAmohASADIAJPDQEgAS8BACIEIABGDQICQCAEQdwARg0AIARBdmoOBAIBAQIBCyADQQRqIQ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ApwfEQAADAILQQAgATYCvKABDwtBACgCvKABIgAvAQJBLkcNAiAALwEEQS5HDQJBACAAQQZqNgK8oAECQAJAAkAgAC8BBiIAQfIARw0AQQEQECEAQQAoArygASECIAANASACLwEAIQALIABB//8DcRAtDQFBACABNgK8oAEPC0EAIAJBAmo2ArygAQsQJyEACyAAQf//A3EiAEEsRg0CIABB/QBGDQBBACABNgK8oAELDwtBACABNgK8oAEPC0EAKAK8oAEhAAwACwuPAQEBf0EAIQ4CQCAALwEAIAFHDQAgAC8BAiACRw0AIAAvAQQgA0cNACAALwEGIARHDQAgAC8BCCAFRw0AIAAvAQogBkcNACAALwEMIAdHDQAgAC8BDiAIRw0AIAAvARAgCUcNACAALwESIApHDQAgAC8BFCALRw0AIAAvARYgDEcNACAALwEYIA1GIQ4LIA4LqAEBAn9BACEBQQAoArygASECAkACQCAAQe0ARw0AIAJBAmpB7wBB5ABB9QBB7ABB5QAQE0UNAUEAIAJBDGo2ArygAQJAECdBLkYNAEEAIQEMAgtBAEEAKAK8oAFBAmo2ArygARAnIQALIABB5QBHDQBBACgCvKABIgBBDmogAiAAQQJqQfgAQfAAQe8AQfIAQfQAQfMAECYiARshAgtBACACNgK8oAEgAQtnAQF/QQAhCgJAIAAvAQAgAUcNACAALwECIAJHDQAgAC8BBCADRw0AIAAvAQYgBEcNACAALwEIIAVHDQAgAC8BCiAGRw0AIAAvAQwgB0cNACAALwEOIAhHDQAgAC8BECAJRiEKCyAKC3EBAX9BACELAkAgAC8BACABRw0AIAAvAQIgAkcNACAALwEEIANHDQAgAC8BBiAERw0AIAAvAQggBUcNACAALwEKIAZHDQAgAC8BDCAHRw0AIAAvAQ4gCEcNACAALwEQIAlHDQAgAC8BEiAKRiELCyALC4MEAQJ/QQAhAgJAECdBzwBHDQBBACECQQAoArygASIDQQJqQeIAQeoAQeUAQeMAQfQAEBNFDQBBACECQQAgA0EMajYCvKABECdBLkcNAEEAQQAoArygAUECajYCvKABAkAQJyIDQfAARw0AQQAhAkEA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wAAAJUAAAACAAAAigUAADEAAAABAgAANgAAAAUAAAAxAAAACQAAAAAAAAAPAAAAAAAAABcAAAAEAAAAAgAAAA4AAABRBQAABgAAAAIAAAAQAAAAAwAAAAYAAAACAAAAAQAAAAIAAAAEAAAABgEAAAYAAAAKAAAACQAAAKMBAAANAAAA1wUAAAYAAABuAAAABgAAAAYAAAAJAAAAlxIAAAkAAAAHBQwA7wAAAABBmB8LHFCMAAABAAAAAgAAAAMAAAAEAAAAAAQAAPAfAAA=";return"undefined"!=typeof Buffer?Buffer.from(A,"base64"):Uint8Array.from(atob(A),A=>A.charCodeAt(0))}let I;function init(){return I||(I=(async()=>{const Q=await WebAssembly.compile(g()),{exports:B}=await WebAssembly.instantiate(Q);A=B})())}function initSync(){if(A)return;const Q=new WebAssembly.Module(g()),{exports:B}=new WebAssembly.Instance(Q);A=B}
|
novas/novacore-zephyr/claude-code-router/node_modules/cjs-module-lexer/dist/lexer.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* cjs-module-lexer 1.4.3 */
|
| 2 |
+
let A;const Q=1===new Uint8Array(new Uint16Array([1]).buffer)[0];export function parse(g,I="@"){if(!A)throw new Error("Not initialized");const D=g.length+1,N=(A.__heap_base.value||A.__heap_base)+4*D-A.memory.buffer.byteLength;N>0&&A.memory.grow(Math.ceil(N/65536));const k=A.sa(D);(Q?C:E)(g,new Uint16Array(A.memory.buffer,k,D));const w=A.parseCJS(k,g.length,0,0,0);if(w){const Q=new Error(`Parse error ${I}${A.e()}:${g.slice(0,A.e()).split("\n").length}:${A.e()-g.lastIndexOf("\n",A.e()-1)}`);throw Object.assign(Q,{idx:A.e()}),5!==w&&6!==w&&7!==w||Object.assign(Q,{code:"ERR_LEXER_ESM_SYNTAX"}),Q}let H=new Set,J=new Set,o=new Set;for(;A.rre();){const Q=B(g.slice(A.res(),A.ree()));Q&&J.add(Q)}for(;A.ru();)o.add(B(g.slice(A.us(),A.ue())));for(;A.re();){let Q=B(g.slice(A.es(),A.ee()));void 0===Q||o.has(Q)||H.add(Q)}return{exports:[...H],reexports:[...J]}}function B(A){if('"'!==A[0]&&"'"!==A[0])return A;try{const Q=(0,eval)(A);for(let A=0;A<Q.length;A++){const B=64512&Q.charCodeAt(A);if(!(B<55296)){if(55296!==B)return;if(56320!=(64512&Q.charCodeAt(++A)))return}}return Q}catch{}}function E(A,Q){const B=A.length;let E=0;for(;E<B;){const B=A.charCodeAt(E);Q[E++]=(255&B)<<8|B>>>8}}function C(A,Q){const B=A.length;let E=0;for(;E<B;)Q[E]=A.charCodeAt(E++)}function g(){const A="AGFzbQEAAAABrAERYAJ/fwBgAABgAX8Bf2AAAX9gBn9/f39/fwF/YAF/AGAXf39/f39/f39/f39/f39/f39/f39/f38Bf2AIf39/f39/f38Bf2AHf39/f39/fwF/YAN/f38Bf2AFf39/f38Bf2AOf39/f39/f39/f39/f38Bf2AKf39/f39/f39/fwF/YAt/f39/f39/f39/fwF/YAJ/fwF/YAR/f39/AX9gCX9/f39/f39/fwF/A0NCAgMDAwMDAwMDAwMAAAABBAICBQQBBgcBBQEFBQUBAQICAgIBAQIIAwICAgkKAgELAgwNDgQPCA4HAgICAhACAgMJBAUBcAEFBQUDAQABBg8CfwFB0JgCC38AQdCYAgsHXA4GbWVtb3J5AgACc2EAAAFlAAECZXMAAgJlZQADA3JlcwAEA3JlZQAFAnVzAAYCdWUABwJyZQAIA3JyZQAJAnJ1AAoIcGFyc2VDSlMADwtfX2hlYXBfYmFzZQMBCQoBAEEBCwQLDA0OCt2fAUJ4AQF/QQAoApgfIgEgAEEBdGoiAEEAOwEAQQAgAEECaiIANgLkH0EAIAA2AugfQQBBADYCwB9BAEEANgLIH0EAQQA2AsQfQQBBADYCzB9BAEEANgLUH0EAQQA2AtAfQQBBADYC2B9BAEEANgLgH0EAQQA2AtwfIAELCABBACgC7B8LFQBBACgCxB8oAgBBACgCmB9rQQF1CxUAQQAoAsQfKAIEQQAoApgfa0EBdQsVA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AKAK8oAEhBAJAIANBJ0YNACADQSJHDQELIAMQHEEAQQAoArygAUECaiIDNgK8oAEQJ0EpRw0AAkACQAJAIABBf2oOAgEAAgsgBCADQQAoAqAfEQAAQQEPCyAEIANBACgCoB8RAABBAQ8LQQAoArSgASAENgIAQQAoArSgASADNgIEQQEPC0EAIAI2ArygAQsgAQsdAAJAQQAoApgfIABHDQBBAQ8LIABBfmovAQAQJQv1AgEEf0EAKAKYHyEBAkADQCAAQX5qIQIgAC8BACIDQSBHDQEgACABSyEEIAIhACAEDQALCwJAIANBPUcNAAJAA0AgAkF+aiEAIAIvAQBBIEcNASACIAFLIQQgACECIAQNAAsLIABBAmohAiAAQQRqIQNBACEEAkADQCACECghACACIAFNDQEgAEUNASAAQdwARg0CIAAQKUUNASACQX5BfCAAQYCABEkbaiECIAAQKiEEDAALCyAEQQFxRQ0AIAIvAQBBIEcNAEEAKAK0oAEiBEEAKAKwH0YNACAEIAM2AgwgBCACQQJqNgIIIAJBfmohAEEgIQICQANAIABBAmogAU0NASACQf//A3FBIEcNASAALwEAIQIgAEF+aiEADAALCwJAAkACQCACQf//A3FBjn9qDgMAAwEDCyAAQfYAQeEAECsNAQwCCyAAQewAQeUAECsNACAAQeMAQe8AQe4AQfMAECxFDQELQQAgBEEQajYCtKABCws/AQF/QQAhBgJAIAAvAQAgAUcNACAALwECIAJHDQAgAC8BBCADRw0AIAAvAQYgBEcNACAALwEIIAVGIQYLIAYLowEBA39BAEEAKAK8oAEiAEEMaiIBNgK8oAECQAJAAkACQAJAAkACQBAnIgJBWWoOCAIDAQIBAQEEAAsgAkEiRg0BIAJB+wBGDQELQQAoArygASABRg0EC0EALwGGQEUNAkEAQQAoArygAUF+ajYCvKABDwtBAEEALwGGQCICQQFqOwGGQEEAKAKwoAEgAkECdGogADYCAA8LQQUQGw8LQQYQGwsL6QEBAX9BACEXAkAgAC8BACABRw0AIAAvAQIgAkcNACAALwEEIANHDQAgAC8BBiAERw0AIAAvAQggBUcNACAALwEKIA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BAnIgVBKEYNACAAQQAoArygAUYNBSAFEC1FDQULECchAAsgAEEoRw0DQQBBACgCvKABQQJqNgK8oAEQJ0EpRw0DQQBBACgCvKABQQJqNgK8oAEQJ0H7AEcNA0EAQQAoArygAUECajYCvKABECdB8gBHDQNBACgCvKABIgBBAmpB5QBB9ABB9QBB8gBB7gAQE0UNA0EAIABBDGo2ArygARAnGkEAKAK8oAEiACACIAYQQQ0DQQAgACAHQQF0ajYCvKABECdB2wBHDQNBAEEAKAK8oAFBAmo2ArygARAnGkEAKAK8oAEiACAEIAMQQQ0DQQAgACAIQQF0ajYCvKABECdB3QBHDQNBAEEAKAK8oAFBAmo2ArygAQJAECciAEE7Rw0AQQBBACgCvKABQQJqNgK8oAEQJyEACyAAQf0ARw0DQQBBACgCvKABQQJqNgK8oAECQBAnIgBBLEcNAEEAQQAoArygAUECajYCvKABECchAAsgAEH9AEcNA0EAQQAoArygAUECajYCvKABECdBKUcNA0EAQQAoArygAUECajYCvKABECciAEE7Rw0BQQBBACgCvKABQQJqNgK8oAELECchAAsgAEH9AEcNAUEAQQAoArygAUECajYCvKABECdBKUcNAUEAKAK0oAEhBEGAICEAA0ACQAJAIAQgAEYNACAHIABBDGooAgAgAEEIaigCACIDa0EBdUcNASACIAMgBhBBDQEgACgCACAAQQRqKAIAQQAoAqAfEQAAQQAgATYCvKABCw8LIABBEGohAAwACwsgAiAAQQAoAqQfEQAAC0EAIAE2ArygAQtBAAJAQQAoAvAfDQBBACAANgLwHwtBACgCvKABIQBBAEEAKALAoAFBAmo2ArygAUEAIABBACgCmB9rQQF1NgLsHwuOAQEEf0EAKAK8oAEhAUEAKALAoAEhAgJAAkADQCABIgNBAmohASADIAJPDQEgAS8BACIEIABGDQICQCAEQdwARg0AIARBdmoOBAIBAQIBCyADQQRqIQEgAy8BBEENRw0AIANBBmogASADLwEGQQpGGyEBDAALC0EAIAE2ArygAUEJEBsPC0EAIAE2ArygAQtKAQN/QQAoArygAUECaiEAQQAoAsCgASEBAkAD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AAwAAAAYAAAACAAAAAQAAAAIAAAAEAAAABgEAAAYAAAAKAAAACQAAAKMBAAANAAAA1wUAAAYAAABuAAAABgAAAAYAAAAJAAAAlxIAAAkAAAAHBQwA7wAAAABBmB8LHFCMAAABAAAAAgAAAAMAAAAEAAAAAAQAAPAfAAA=";return"undefined"!=typeof Buffer?Buffer.from(A,"base64"):Uint8Array.from(atob(A),A=>A.charCodeAt(0))}let I;export function init(){return I||(I=(async()=>{const Q=await WebAssembly.compile(g()),{exports:B}=await WebAssembly.instantiate(Q);A=B})())}export function initSync(){if(A)return;const Q=new WebAssembly.Module(g()),{exports:B}=new WebAssembly.Instance(Q);A=B}
|
novas/novacore-zephyr/claude-code-router/node_modules/cookie/dist/index.d.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Parse options.
|
| 3 |
+
*/
|
| 4 |
+
export interface ParseOptions {
|
| 5 |
+
/**
|
| 6 |
+
* Specifies a function that will be used to decode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).
|
| 7 |
+
* Since the value of a cookie has a limited character set (and must be a simple string), this function can be used to decode
|
| 8 |
+
* a previously-encoded cookie value into a JavaScript string.
|
| 9 |
+
*
|
| 10 |
+
* The default function is the global `decodeURIComponent`, wrapped in a `try..catch`. If an error
|
| 11 |
+
* is thrown it will return the cookie's original value. If you provide your own encode/decode
|
| 12 |
+
* scheme you must ensure errors are appropriately handled.
|
| 13 |
+
*
|
| 14 |
+
* @default decode
|
| 15 |
+
*/
|
| 16 |
+
decode?: (str: string) => string | undefined;
|
| 17 |
+
}
|
| 18 |
+
/**
|
| 19 |
+
* Parse a cookie header.
|
| 20 |
+
*
|
| 21 |
+
* Parse the given cookie header string into an object
|
| 22 |
+
* The object has the various cookies as keys(names) => values
|
| 23 |
+
*/
|
| 24 |
+
export declare function parse(str: string, options?: ParseOptions): Record<string, string | undefined>;
|
| 25 |
+
/**
|
| 26 |
+
* Serialize options.
|
| 27 |
+
*/
|
| 28 |
+
export interface SerializeOptions {
|
| 29 |
+
/**
|
| 30 |
+
* Specifies a function that will be used to encode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).
|
| 31 |
+
* Since value of a cookie has a limited character set (and must be a simple string), this function can be used to encode
|
| 32 |
+
* a value into a string suited for a cookie's value, and should mirror `decode` when parsing.
|
| 33 |
+
*
|
| 34 |
+
* @default encodeURIComponent
|
| 35 |
+
*/
|
| 36 |
+
encode?: (str: string) => string;
|
| 37 |
+
/**
|
| 38 |
+
* Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.2).
|
| 39 |
+
*
|
| 40 |
+
* The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and
|
| 41 |
+
* `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
|
| 42 |
+
* so if both are set, they should point to the same date and time.
|
| 43 |
+
*/
|
| 44 |
+
maxAge?: number;
|
| 45 |
+
/**
|
| 46 |
+
* Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.1).
|
| 47 |
+
* When no expiration is set clients consider this a "non-persistent cookie" and delete it the current session is over.
|
| 48 |
+
*
|
| 49 |
+
* The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and
|
| 50 |
+
* `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,
|
| 51 |
+
* so if both are set, they should point to the same date and time.
|
| 52 |
+
*/
|
| 53 |
+
expires?: Date;
|
| 54 |
+
/**
|
| 55 |
+
* Specifies the value for the [`Domain` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.3).
|
| 56 |
+
* When no domain is set clients consider the cookie to apply to the current domain only.
|
| 57 |
+
*/
|
| 58 |
+
domain?: string;
|
| 59 |
+
/**
|
| 60 |
+
* Specifies the value for the [`Path` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.4).
|
| 61 |
+
* When no path is set, the path is considered the ["default path"](https://tools.ietf.org/html/rfc6265#section-5.1.4).
|
| 62 |
+
*/
|
| 63 |
+
path?: string;
|
| 64 |
+
/**
|
| 65 |
+
* Enables the [`HttpOnly` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.6).
|
| 66 |
+
* When enabled, clients will not allow client-side JavaScript to see the cookie in `document.cookie`.
|
| 67 |
+
*/
|
| 68 |
+
httpOnly?: boolean;
|
| 69 |
+
/**
|
| 70 |
+
* Enables the [`Secure` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.5).
|
| 71 |
+
* When enabled, clients will only send the cookie back if the browser has a HTTPS connection.
|
| 72 |
+
*/
|
| 73 |
+
secure?: boolean;
|
| 74 |
+
/**
|
| 75 |
+
* Enables the [`Partitioned` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-cutler-httpbis-partitioned-cookies/).
|
| 76 |
+
* When enabled, clients will only send the cookie back when the current domain _and_ top-level domain matches.
|
| 77 |
+
*
|
| 78 |
+
* This is an attribute that has not yet been fully standardized, and may change in the future.
|
| 79 |
+
* This also means clients may ignore this attribute until they understand it. More information
|
| 80 |
+
* about can be found in [the proposal](https://github.com/privacycg/CHIPS).
|
| 81 |
+
*/
|
| 82 |
+
partitioned?: boolean;
|
| 83 |
+
/**
|
| 84 |
+
* Specifies the value for the [`Priority` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).
|
| 85 |
+
*
|
| 86 |
+
* - `'low'` will set the `Priority` attribute to `Low`.
|
| 87 |
+
* - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
|
| 88 |
+
* - `'high'` will set the `Priority` attribute to `High`.
|
| 89 |
+
*
|
| 90 |
+
* More information about priority levels can be found in [the specification](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).
|
| 91 |
+
*/
|
| 92 |
+
priority?: "low" | "medium" | "high";
|
| 93 |
+
/**
|
| 94 |
+
* Specifies the value for the [`SameSite` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).
|
| 95 |
+
*
|
| 96 |
+
* - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
|
| 97 |
+
* - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.
|
| 98 |
+
* - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie.
|
| 99 |
+
* - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.
|
| 100 |
+
*
|
| 101 |
+
* More information about enforcement levels can be found in [the specification](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).
|
| 102 |
+
*/
|
| 103 |
+
sameSite?: boolean | "lax" | "strict" | "none";
|
| 104 |
+
}
|
| 105 |
+
/**
|
| 106 |
+
* Serialize data into a cookie header.
|
| 107 |
+
*
|
| 108 |
+
* Serialize a name value pair into a cookie string suitable for
|
| 109 |
+
* http headers. An optional options object specifies cookie parameters.
|
| 110 |
+
*
|
| 111 |
+
* serialize('foo', 'bar', { httpOnly: true })
|
| 112 |
+
* => "foo=bar; httpOnly"
|
| 113 |
+
*/
|
| 114 |
+
export declare function serialize(name: string, val: string, options?: SerializeOptions): string;
|
novas/novacore-zephyr/claude-code-router/node_modules/cookie/dist/index.js
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", { value: true });
|
| 3 |
+
exports.parse = parse;
|
| 4 |
+
exports.serialize = serialize;
|
| 5 |
+
/**
|
| 6 |
+
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
|
| 7 |
+
* This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
|
| 8 |
+
* which has been replaced by the token definition in RFC 7230 appendix B.
|
| 9 |
+
*
|
| 10 |
+
* cookie-name = token
|
| 11 |
+
* token = 1*tchar
|
| 12 |
+
* tchar = "!" / "#" / "$" / "%" / "&" / "'" /
|
| 13 |
+
* "*" / "+" / "-" / "." / "^" / "_" /
|
| 14 |
+
* "`" / "|" / "~" / DIGIT / ALPHA
|
| 15 |
+
*
|
| 16 |
+
* Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191
|
| 17 |
+
* Allow same range as cookie value, except `=`, which delimits end of name.
|
| 18 |
+
*/
|
| 19 |
+
const cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
|
| 20 |
+
/**
|
| 21 |
+
* RegExp to match cookie-value in RFC 6265 sec 4.1.1
|
| 22 |
+
*
|
| 23 |
+
* cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
|
| 24 |
+
* cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
|
| 25 |
+
* ; US-ASCII characters excluding CTLs,
|
| 26 |
+
* ; whitespace DQUOTE, comma, semicolon,
|
| 27 |
+
* ; and backslash
|
| 28 |
+
*
|
| 29 |
+
* Allowing more characters: https://github.com/jshttp/cookie/issues/191
|
| 30 |
+
* Comma, backslash, and DQUOTE are not part of the parsing algorithm.
|
| 31 |
+
*/
|
| 32 |
+
const cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
|
| 33 |
+
/**
|
| 34 |
+
* RegExp to match domain-value in RFC 6265 sec 4.1.1
|
| 35 |
+
*
|
| 36 |
+
* domain-value = <subdomain>
|
| 37 |
+
* ; defined in [RFC1034], Section 3.5, as
|
| 38 |
+
* ; enhanced by [RFC1123], Section 2.1
|
| 39 |
+
* <subdomain> = <label> | <subdomain> "." <label>
|
| 40 |
+
* <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]
|
| 41 |
+
* Labels must be 63 characters or less.
|
| 42 |
+
* 'let-dig' not 'letter' in the first char, per RFC1123
|
| 43 |
+
* <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>
|
| 44 |
+
* <let-dig-hyp> = <let-dig> | "-"
|
| 45 |
+
* <let-dig> = <letter> | <digit>
|
| 46 |
+
* <letter> = any one of the 52 alphabetic characters A through Z in
|
| 47 |
+
* upper case and a through z in lower case
|
| 48 |
+
* <digit> = any one of the ten digits 0 through 9
|
| 49 |
+
*
|
| 50 |
+
* Keep support for leading dot: https://github.com/jshttp/cookie/issues/173
|
| 51 |
+
*
|
| 52 |
+
* > (Note that a leading %x2E ("."), if present, is ignored even though that
|
| 53 |
+
* character is not permitted, but a trailing %x2E ("."), if present, will
|
| 54 |
+
* cause the user agent to ignore the attribute.)
|
| 55 |
+
*/
|
| 56 |
+
const domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
|
| 57 |
+
/**
|
| 58 |
+
* RegExp to match path-value in RFC 6265 sec 4.1.1
|
| 59 |
+
*
|
| 60 |
+
* path-value = <any CHAR except CTLs or ";">
|
| 61 |
+
* CHAR = %x01-7F
|
| 62 |
+
* ; defined in RFC 5234 appendix B.1
|
| 63 |
+
*/
|
| 64 |
+
const pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
|
| 65 |
+
const __toString = Object.prototype.toString;
|
| 66 |
+
const NullObject = /* @__PURE__ */ (() => {
|
| 67 |
+
const C = function () { };
|
| 68 |
+
C.prototype = Object.create(null);
|
| 69 |
+
return C;
|
| 70 |
+
})();
|
| 71 |
+
/**
|
| 72 |
+
* Parse a cookie header.
|
| 73 |
+
*
|
| 74 |
+
* Parse the given cookie header string into an object
|
| 75 |
+
* The object has the various cookies as keys(names) => values
|
| 76 |
+
*/
|
| 77 |
+
function parse(str, options) {
|
| 78 |
+
const obj = new NullObject();
|
| 79 |
+
const len = str.length;
|
| 80 |
+
// RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
|
| 81 |
+
if (len < 2)
|
| 82 |
+
return obj;
|
| 83 |
+
const dec = options?.decode || decode;
|
| 84 |
+
let index = 0;
|
| 85 |
+
do {
|
| 86 |
+
const eqIdx = str.indexOf("=", index);
|
| 87 |
+
if (eqIdx === -1)
|
| 88 |
+
break; // No more cookie pairs.
|
| 89 |
+
const colonIdx = str.indexOf(";", index);
|
| 90 |
+
const endIdx = colonIdx === -1 ? len : colonIdx;
|
| 91 |
+
if (eqIdx > endIdx) {
|
| 92 |
+
// backtrack on prior semicolon
|
| 93 |
+
index = str.lastIndexOf(";", eqIdx - 1) + 1;
|
| 94 |
+
continue;
|
| 95 |
+
}
|
| 96 |
+
const keyStartIdx = startIndex(str, index, eqIdx);
|
| 97 |
+
const keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
|
| 98 |
+
const key = str.slice(keyStartIdx, keyEndIdx);
|
| 99 |
+
// only assign once
|
| 100 |
+
if (obj[key] === undefined) {
|
| 101 |
+
let valStartIdx = startIndex(str, eqIdx + 1, endIdx);
|
| 102 |
+
let valEndIdx = endIndex(str, endIdx, valStartIdx);
|
| 103 |
+
const value = dec(str.slice(valStartIdx, valEndIdx));
|
| 104 |
+
obj[key] = value;
|
| 105 |
+
}
|
| 106 |
+
index = endIdx + 1;
|
| 107 |
+
} while (index < len);
|
| 108 |
+
return obj;
|
| 109 |
+
}
|
| 110 |
+
function startIndex(str, index, max) {
|
| 111 |
+
do {
|
| 112 |
+
const code = str.charCodeAt(index);
|
| 113 |
+
if (code !== 0x20 /* */ && code !== 0x09 /* \t */)
|
| 114 |
+
return index;
|
| 115 |
+
} while (++index < max);
|
| 116 |
+
return max;
|
| 117 |
+
}
|
| 118 |
+
function endIndex(str, index, min) {
|
| 119 |
+
while (index > min) {
|
| 120 |
+
const code = str.charCodeAt(--index);
|
| 121 |
+
if (code !== 0x20 /* */ && code !== 0x09 /* \t */)
|
| 122 |
+
return index + 1;
|
| 123 |
+
}
|
| 124 |
+
return min;
|
| 125 |
+
}
|
| 126 |
+
/**
|
| 127 |
+
* Serialize data into a cookie header.
|
| 128 |
+
*
|
| 129 |
+
* Serialize a name value pair into a cookie string suitable for
|
| 130 |
+
* http headers. An optional options object specifies cookie parameters.
|
| 131 |
+
*
|
| 132 |
+
* serialize('foo', 'bar', { httpOnly: true })
|
| 133 |
+
* => "foo=bar; httpOnly"
|
| 134 |
+
*/
|
| 135 |
+
function serialize(name, val, options) {
|
| 136 |
+
const enc = options?.encode || encodeURIComponent;
|
| 137 |
+
if (!cookieNameRegExp.test(name)) {
|
| 138 |
+
throw new TypeError(`argument name is invalid: ${name}`);
|
| 139 |
+
}
|
| 140 |
+
const value = enc(val);
|
| 141 |
+
if (!cookieValueRegExp.test(value)) {
|
| 142 |
+
throw new TypeError(`argument val is invalid: ${val}`);
|
| 143 |
+
}
|
| 144 |
+
let str = name + "=" + value;
|
| 145 |
+
if (!options)
|
| 146 |
+
return str;
|
| 147 |
+
if (options.maxAge !== undefined) {
|
| 148 |
+
if (!Number.isInteger(options.maxAge)) {
|
| 149 |
+
throw new TypeError(`option maxAge is invalid: ${options.maxAge}`);
|
| 150 |
+
}
|
| 151 |
+
str += "; Max-Age=" + options.maxAge;
|
| 152 |
+
}
|
| 153 |
+
if (options.domain) {
|
| 154 |
+
if (!domainValueRegExp.test(options.domain)) {
|
| 155 |
+
throw new TypeError(`option domain is invalid: ${options.domain}`);
|
| 156 |
+
}
|
| 157 |
+
str += "; Domain=" + options.domain;
|
| 158 |
+
}
|
| 159 |
+
if (options.path) {
|
| 160 |
+
if (!pathValueRegExp.test(options.path)) {
|
| 161 |
+
throw new TypeError(`option path is invalid: ${options.path}`);
|
| 162 |
+
}
|
| 163 |
+
str += "; Path=" + options.path;
|
| 164 |
+
}
|
| 165 |
+
if (options.expires) {
|
| 166 |
+
if (!isDate(options.expires) ||
|
| 167 |
+
!Number.isFinite(options.expires.valueOf())) {
|
| 168 |
+
throw new TypeError(`option expires is invalid: ${options.expires}`);
|
| 169 |
+
}
|
| 170 |
+
str += "; Expires=" + options.expires.toUTCString();
|
| 171 |
+
}
|
| 172 |
+
if (options.httpOnly) {
|
| 173 |
+
str += "; HttpOnly";
|
| 174 |
+
}
|
| 175 |
+
if (options.secure) {
|
| 176 |
+
str += "; Secure";
|
| 177 |
+
}
|
| 178 |
+
if (options.partitioned) {
|
| 179 |
+
str += "; Partitioned";
|
| 180 |
+
}
|
| 181 |
+
if (options.priority) {
|
| 182 |
+
const priority = typeof options.priority === "string"
|
| 183 |
+
? options.priority.toLowerCase()
|
| 184 |
+
: undefined;
|
| 185 |
+
switch (priority) {
|
| 186 |
+
case "low":
|
| 187 |
+
str += "; Priority=Low";
|
| 188 |
+
break;
|
| 189 |
+
case "medium":
|
| 190 |
+
str += "; Priority=Medium";
|
| 191 |
+
break;
|
| 192 |
+
case "high":
|
| 193 |
+
str += "; Priority=High";
|
| 194 |
+
break;
|
| 195 |
+
default:
|
| 196 |
+
throw new TypeError(`option priority is invalid: ${options.priority}`);
|
| 197 |
+
}
|
| 198 |
+
}
|
| 199 |
+
if (options.sameSite) {
|
| 200 |
+
const sameSite = typeof options.sameSite === "string"
|
| 201 |
+
? options.sameSite.toLowerCase()
|
| 202 |
+
: options.sameSite;
|
| 203 |
+
switch (sameSite) {
|
| 204 |
+
case true:
|
| 205 |
+
case "strict":
|
| 206 |
+
str += "; SameSite=Strict";
|
| 207 |
+
break;
|
| 208 |
+
case "lax":
|
| 209 |
+
str += "; SameSite=Lax";
|
| 210 |
+
break;
|
| 211 |
+
case "none":
|
| 212 |
+
str += "; SameSite=None";
|
| 213 |
+
break;
|
| 214 |
+
default:
|
| 215 |
+
throw new TypeError(`option sameSite is invalid: ${options.sameSite}`);
|
| 216 |
+
}
|
| 217 |
+
}
|
| 218 |
+
return str;
|
| 219 |
+
}
|
| 220 |
+
/**
|
| 221 |
+
* URL-decode string value. Optimized to skip native call when no %.
|
| 222 |
+
*/
|
| 223 |
+
function decode(str) {
|
| 224 |
+
if (str.indexOf("%") === -1)
|
| 225 |
+
return str;
|
| 226 |
+
try {
|
| 227 |
+
return decodeURIComponent(str);
|
| 228 |
+
}
|
| 229 |
+
catch (e) {
|
| 230 |
+
return str;
|
| 231 |
+
}
|
| 232 |
+
}
|
| 233 |
+
/**
|
| 234 |
+
* Determine if value is a Date.
|
| 235 |
+
*/
|
| 236 |
+
function isDate(val) {
|
| 237 |
+
return __toString.call(val) === "[object Date]";
|
| 238 |
+
}
|
| 239 |
+
//# sourceMappingURL=index.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/cookie/dist/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAiGA,sBA0CC;AA4GD,8BA6GC;AApWD;;;;;;;;;;;;;GAaG;AACH,MAAM,gBAAgB,GAAG,uCAAuC,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,MAAM,iBAAiB,GAAG,iCAAiC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,iBAAiB,GACrB,qFAAqF,CAAC;AAExF;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAE1D,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAE7C,MAAM,UAAU,GAAG,eAAe,CAAC,CAAC,GAAG,EAAE;IACvC,MAAM,CAAC,GAAG,cAAa,CAAC,CAAC;IACzB,CAAC,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,CAAC,CAAC;AACX,CAAC,CAAC,EAAgC,CAAC;AAoBnC;;;;;GAKG;AACH,SAAgB,KAAK,CACnB,GAAW,EACX,OAAsB;IAEtB,MAAM,GAAG,GAAuC,IAAI,UAAU,EAAE,CAAC;IACjE,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;IACvB,iGAAi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,mBAAmB,CAAC;gBAC3B,MAAM;YACR,KAAK,KAAK;gBACR,GAAG,IAAI,gBAAgB,CAAC;gBACxB,MAAM;YACR,KAAK,MAAM;gBACT,GAAG,IAAI,iBAAiB,CAAC;gBACzB,MAAM;YACR;gBACE,MAAM,IAAI,SAAS,CAAC,+BAA+B,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;GAEG;AACH,SAAS,MAAM,CAAC,GAAW;IACzB,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAAE,OAAO,GAAG,CAAC;IAExC,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,GAAG,CAAC;IACb,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,eAAe,CAAC;AAClD,CAAC","sourcesContent":["/**\n * RegExp to match cookie-name in RFC 6265 sec 4.1.1\n * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2\n * which has been replaced by the token definition in RFC 7230 appendix B.\n *\n * cookie-name = token\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" /\n * \"*\" / \"+\" / \"-\" / \".\" / \"^\" / \"_\" /\n * \"`\" / \"|\" / \"~\" / DIGIT / ALPHA\n *\n * Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191\n * Allow same range as cookie value, except `=`, which delimits end of name.\n */\nconst cookieNameRegExp = /^[\\u0021-\\u003A\\u003C\\u003E-\\u007E]+$/;\n\n/**\n * RegExp to match cookie-value in RFC 6265 sec 4.1.1\n *\n * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n * ; US-ASCII characters excluding CTLs,\n * ; whitespace DQUOTE, comma, semicolon,\n * ; and backslash\n *\n * Allowing more characters: https://github.com/jshttp/cookie/issues/191\n * Comma, backslash, and DQUOTE are not part of the parsing algorithm.\n */\nconst cookieValueRegExp = /^[\\u0021-\\u003A\\u003C-\\u007E]*$/;\n\n/**\n * RegExp to match domain-value in RFC 6265 sec 4.1.1\n *\n * domain-value = <subdomain>\n * ; defined in [RFC1034], Section 3.5, as\n * ; enhanced by [RFC1123], Section 2.1\n * <subdomain> = <label> | <subdomain> \".\" <label>\n * <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]\n * Labels must be 63 characters or less.\n * 'let-dig' not 'letter' in the first char, per RFC1123\n * <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>\n * <let-dig-hyp> = <let-dig> | \"-\"\n * <let-dig> = <letter> | <digit>\n * <letter> = any one of the 52 alphabetic characters A through Z in\n * upper case and a through z in lower case\n * <digit> = any one of the ten digits 0 through 9\n *\n * Keep support for leading dot: https://github.com/jshttp/cookie/issues/173\n *\n * > (Note that a leading %x2E (\".\"), if present, is ignored even though that\n * character is not permitted, but a trailing %x2E (\".\"), if present, will\n * cause the user agent to ignore the attribute.)\n */\nconst domainValueRegExp =\n /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;\n\n/**\n * RegExp to match path-value in RFC 6265 sec 4.1.1\n *\n * path-value = <any CHAR except CTLs or \";\">\n * CHAR = %x01-7F\n * ; defined in RFC 5234 appendix B.1\n */\nconst pathValueRegExp = /^[\\u0020-\\u003A\\u003D-\\u007E]*$/;\n\nconst __toString = Object.prototype.toString;\n\nconst NullObject = /* @__PURE__ */ (() => {\n const C = function () {};\n C.prototype = Object.create(null);\n return C;\n})() as unknown as { new (): any };\n\n/**\n * Parse options.\n */\nexport interface ParseOptions {\n /**\n * Specifies a function that will be used to decode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).\n * Since the value of a cookie has a limited character set (and must be a simple string), this function can be used to decode\n * a previously-encoded cookie value into a JavaScript string.\n *\n * The default function is the global `decodeURIComponent`, wrapped in a `try..catch`. If an error\n * is thrown it will return the cookie's original value. If you provide your own encode/decode\n * scheme you must ensure errors are appropriately handled.\n *\n * @default decode\n */\n decode?: (str: string) => string | undefined;\n}\n\n/**\n * Parse a cookie header.\n *\n * Parse the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n */\nexport function parse(\n str: string,\n options?: ParseOptions,\n): Record<string, string | undefined> {\n const obj: Record<string, string | undefined> = new NullObject();\n const len = str.length;\n // RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.\n if (len < 2) return obj;\n\n const dec = options?.decode || decode;\n let index = 0;\n\n do {\n const eqIdx = str.indexOf(\"=\", index);\n if (eqIdx === -1) break; // No more cookie pairs.\n\n const colonIdx = str.indexOf(\";\", index);\n const endIdx = colonIdx === -1 ? len : colonIdx;\n\n if (eqIdx > endIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(\";\", eqIdx - 1) + 1;\n continue;\n }\n\n const keyStartIdx = startIndex(str, index, eqIdx);\n const keyEndIdx = endIndex(str, eqIdx, keyStartIdx);\n const key = str.slice(keyStartIdx, keyEndIdx);\n\n // only assign once\n if (obj[key] === undefined) {\n let valStartIdx = startIndex(str, eqIdx + 1, endIdx);\n let valEndIdx = endIndex(str, endIdx, valStartIdx);\n\n const value = dec(str.slice(valStartIdx, valEndIdx));\n obj[key] = value;\n }\n\n index = endIdx + 1;\n } while (index < len);\n\n return obj;\n}\n\nfunction startIndex(str: string, index: number, max: number) {\n do {\n const code = str.charCodeAt(index);\n if (code !== 0x20 /* */ && code !== 0x09 /* \\t */) return index;\n } while (++index < max);\n return max;\n}\n\nfunction endIndex(str: string, index: number, min: number) {\n while (index > min) {\n const code = str.charCodeAt(--index);\n if (code !== 0x20 /* */ && code !== 0x09 /* \\t */) return index + 1;\n }\n return min;\n}\n\n/**\n * Serialize options.\n */\nexport interface SerializeOptions {\n /**\n * Specifies a function that will be used to encode a [cookie-value](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1).\n * Since value of a cookie has a limited character set (and must be a simple string), this function can be used to encode\n * a value into a string suited for a cookie's value, and should mirror `decode` when parsing.\n *\n * @default encodeURIComponent\n */\n encode?: (str: string) => string;\n /**\n * Specifies the `number` (in seconds) to be the value for the [`Max-Age` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.2).\n *\n * The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and\n * `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,\n * so if both are set, they should point to the same date and time.\n */\n maxAge?: number;\n /**\n * Specifies the `Date` object to be the value for the [`Expires` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.1).\n * When no expiration is set clients consider this a \"non-persistent cookie\" and delete it the current session is over.\n *\n * The [cookie storage model specification](https://tools.ietf.org/html/rfc6265#section-5.3) states that if both `expires` and\n * `maxAge` are set, then `maxAge` takes precedence, but it is possible not all clients by obey this,\n * so if both are set, they should point to the same date and time.\n */\n expires?: Date;\n /**\n * Specifies the value for the [`Domain` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.3).\n * When no domain is set clients consider the cookie to apply to the current domain only.\n */\n domain?: string;\n /**\n * Specifies the value for the [`Path` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.4).\n * When no path is set, the path is considered the [\"default path\"](https://tools.ietf.org/html/rfc6265#section-5.1.4).\n */\n path?: string;\n /**\n * Enables the [`HttpOnly` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.6).\n * When enabled, clients will not allow client-side JavaScript to see the cookie in `document.cookie`.\n */\n httpOnly?: boolean;\n /**\n * Enables the [`Secure` `Set-Cookie` attribute](https://tools.ietf.org/html/rfc6265#section-5.2.5).\n * When enabled, clients will only send the cookie back if the browser has a HTTPS connection.\n */\n secure?: boolean;\n /**\n * Enables the [`Partitioned` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-cutler-httpbis-partitioned-cookies/).\n * When enabled, clients will only send the cookie back when the current domain _and_ top-level domain matches.\n *\n * This is an attribute that has not yet been fully standardized, and may change in the future.\n * This also means clients may ignore this attribute until they understand it. More information\n * about can be found in [the proposal](https://github.com/privacycg/CHIPS).\n */\n partitioned?: boolean;\n /**\n * Specifies the value for the [`Priority` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).\n *\n * - `'low'` will set the `Priority` attribute to `Low`.\n * - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.\n * - `'high'` will set the `Priority` attribute to `High`.\n *\n * More information about priority levels can be found in [the specification](https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1).\n */\n priority?: \"low\" | \"medium\" | \"high\";\n /**\n * Specifies the value for the [`SameSite` `Set-Cookie` attribute](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).\n *\n * - `true` will set the `SameSite` attribute to `Strict` for strict same site enforcement.\n * - `'lax'` will set the `SameSite` attribute to `Lax` for lax same site enforcement.\n * - `'none'` will set the `SameSite` attribute to `None` for an explicit cross-site cookie.\n * - `'strict'` will set the `SameSite` attribute to `Strict` for strict same site enforcement.\n *\n * More information about enforcement levels can be found in [the specification](https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7).\n */\n sameSite?: boolean | \"lax\" | \"strict\" | \"none\";\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize a name value pair into a cookie string suitable for\n * http headers. An optional options object specifies cookie parameters.\n *\n * serialize('foo', 'bar', { httpOnly: true })\n * => \"foo=bar; httpOnly\"\n */\nexport function serialize(\n name: string,\n val: string,\n options?: SerializeOptions,\n): string {\n const enc = options?.encode || encodeURIComponent;\n\n if (!cookieNameRegExp.test(name)) {\n throw new TypeError(`argument name is invalid: ${name}`);\n }\n\n const value = enc(val);\n\n if (!cookieValueRegExp.test(value)) {\n throw new TypeError(`argument val is invalid: ${val}`);\n }\n\n let str = name + \"=\" + value;\n if (!options) return str;\n\n if (options.maxAge !== undefined) {\n if (!Number.isInteger(options.maxAge)) {\n throw new TypeError(`option maxAge is invalid: ${options.maxAge}`);\n }\n\n str += \"; Max-Age=\" + options.maxAge;\n }\n\n if (options.domain) {\n if (!domainValueRegExp.test(options.domain)) {\n throw new TypeError(`option domain is invalid: ${options.domain}`);\n }\n\n str += \"; Domain=\" + options.domain;\n }\n\n if (options.path) {\n if (!pathValueRegExp.test(options.path)) {\n throw new TypeError(`option path is invalid: ${options.path}`);\n }\n\n str += \"; Path=\" + options.path;\n }\n\n if (options.expires) {\n if (\n !isDate(options.expires) ||\n !Number.isFinite(options.expires.valueOf())\n ) {\n throw new TypeError(`option expires is invalid: ${options.expires}`);\n }\n\n str += \"; Expires=\" + options.expires.toUTCString();\n }\n\n if (options.httpOnly) {\n str += \"; HttpOnly\";\n }\n\n if (options.secure) {\n str += \"; Secure\";\n }\n\n if (options.partitioned) {\n str += \"; Partitioned\";\n }\n\n if (options.priority) {\n const priority =\n typeof options.priority === \"string\"\n ? options.priority.toLowerCase()\n : undefined;\n switch (priority) {\n case \"low\":\n str += \"; Priority=Low\";\n break;\n case \"medium\":\n str += \"; Priority=Medium\";\n break;\n case \"high\":\n str += \"; Priority=High\";\n break;\n default:\n throw new TypeError(`option priority is invalid: ${options.priority}`);\n }\n }\n\n if (options.sameSite) {\n const sameSite =\n typeof options.sameSite === \"string\"\n ? options.sameSite.toLowerCase()\n : options.sameSite;\n switch (sameSite) {\n case true:\n case \"strict\":\n str += \"; SameSite=Strict\";\n break;\n case \"lax\":\n str += \"; SameSite=Lax\";\n break;\n case \"none\":\n str += \"; SameSite=None\";\n break;\n default:\n throw new TypeError(`option sameSite is invalid: ${options.sameSite}`);\n }\n }\n\n return str;\n}\n\n/**\n * URL-decode string value. Optimized to skip native call when no %.\n */\nfunction decode(str: string): string {\n if (str.indexOf(\"%\") === -1) return str;\n\n try {\n return decodeURIComponent(str);\n } catch (e) {\n return str;\n }\n}\n\n/**\n * Determine if value is a Date.\n */\nfunction isDate(val: any): val is Date {\n return __toString.call(val) === \"[object Date]\";\n}\n"]}
|
novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/enoent.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
const isWin = process.platform === 'win32';
|
| 4 |
+
|
| 5 |
+
function notFoundError(original, syscall) {
|
| 6 |
+
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
| 7 |
+
code: 'ENOENT',
|
| 8 |
+
errno: 'ENOENT',
|
| 9 |
+
syscall: `${syscall} ${original.command}`,
|
| 10 |
+
path: original.command,
|
| 11 |
+
spawnargs: original.args,
|
| 12 |
+
});
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
function hookChildProcess(cp, parsed) {
|
| 16 |
+
if (!isWin) {
|
| 17 |
+
return;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
const originalEmit = cp.emit;
|
| 21 |
+
|
| 22 |
+
cp.emit = function (name, arg1) {
|
| 23 |
+
// If emitting "exit" event and exit code is 1, we need to check if
|
| 24 |
+
// the command exists and emit an "error" instead
|
| 25 |
+
// See https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
| 26 |
+
if (name === 'exit') {
|
| 27 |
+
const err = verifyENOENT(arg1, parsed);
|
| 28 |
+
|
| 29 |
+
if (err) {
|
| 30 |
+
return originalEmit.call(cp, 'error', err);
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
|
| 35 |
+
};
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
function verifyENOENT(status, parsed) {
|
| 39 |
+
if (isWin && status === 1 && !parsed.file) {
|
| 40 |
+
return notFoundError(parsed.original, 'spawn');
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
return null;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
function verifyENOENTSync(status, parsed) {
|
| 47 |
+
if (isWin && status === 1 && !parsed.file) {
|
| 48 |
+
return notFoundError(parsed.original, 'spawnSync');
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
return null;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
module.exports = {
|
| 55 |
+
hookChildProcess,
|
| 56 |
+
verifyENOENT,
|
| 57 |
+
verifyENOENTSync,
|
| 58 |
+
notFoundError,
|
| 59 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/parse.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
const path = require('path');
|
| 4 |
+
const resolveCommand = require('./util/resolveCommand');
|
| 5 |
+
const escape = require('./util/escape');
|
| 6 |
+
const readShebang = require('./util/readShebang');
|
| 7 |
+
|
| 8 |
+
const isWin = process.platform === 'win32';
|
| 9 |
+
const isExecutableRegExp = /\.(?:com|exe)$/i;
|
| 10 |
+
const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
| 11 |
+
|
| 12 |
+
function detectShebang(parsed) {
|
| 13 |
+
parsed.file = resolveCommand(parsed);
|
| 14 |
+
|
| 15 |
+
const shebang = parsed.file && readShebang(parsed.file);
|
| 16 |
+
|
| 17 |
+
if (shebang) {
|
| 18 |
+
parsed.args.unshift(parsed.file);
|
| 19 |
+
parsed.command = shebang;
|
| 20 |
+
|
| 21 |
+
return resolveCommand(parsed);
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
return parsed.file;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
function parseNonShell(parsed) {
|
| 28 |
+
if (!isWin) {
|
| 29 |
+
return parsed;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
// Detect & add support for shebangs
|
| 33 |
+
const commandFile = detectShebang(parsed);
|
| 34 |
+
|
| 35 |
+
// We don't need a shell if the command filename is an executable
|
| 36 |
+
const needsShell = !isExecutableRegExp.test(commandFile);
|
| 37 |
+
|
| 38 |
+
// If a shell is required, use cmd.exe and take care of escaping everything correctly
|
| 39 |
+
// Note that `forceShell` is an hidden option used only in tests
|
| 40 |
+
if (parsed.options.forceShell || needsShell) {
|
| 41 |
+
// Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
|
| 42 |
+
// The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
|
| 43 |
+
// Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
|
| 44 |
+
// we need to double escape them
|
| 45 |
+
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
| 46 |
+
|
| 47 |
+
// Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
|
| 48 |
+
// This is necessary otherwise it will always fail with ENOENT in those cases
|
| 49 |
+
parsed.command = path.normalize(parsed.command);
|
| 50 |
+
|
| 51 |
+
// Escape command & arguments
|
| 52 |
+
parsed.command = escape.command(parsed.command);
|
| 53 |
+
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
| 54 |
+
|
| 55 |
+
const shellCommand = [parsed.command].concat(parsed.args).join(' ');
|
| 56 |
+
|
| 57 |
+
parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
|
| 58 |
+
parsed.command = process.env.comspec || 'cmd.exe';
|
| 59 |
+
parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
return parsed;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
function parse(command, args, options) {
|
| 66 |
+
// Normalize arguments, similar to nodejs
|
| 67 |
+
if (args && !Array.isArray(args)) {
|
| 68 |
+
options = args;
|
| 69 |
+
args = null;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
args = args ? args.slice(0) : []; // Clone array to avoid changing the original
|
| 73 |
+
options = Object.assign({}, options); // Clone object to avoid changing the original
|
| 74 |
+
|
| 75 |
+
// Build our parsed object
|
| 76 |
+
const parsed = {
|
| 77 |
+
command,
|
| 78 |
+
args,
|
| 79 |
+
options,
|
| 80 |
+
file: undefined,
|
| 81 |
+
original: {
|
| 82 |
+
command,
|
| 83 |
+
args,
|
| 84 |
+
},
|
| 85 |
+
};
|
| 86 |
+
|
| 87 |
+
// Delegate further parsing to shell or non-shell
|
| 88 |
+
return options.shell ? parsed : parseNonShell(parsed);
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
module.exports = parse;
|
novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/util/escape.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
// See http://www.robvanderwoude.com/escapechars.php
|
| 4 |
+
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
| 5 |
+
|
| 6 |
+
function escapeCommand(arg) {
|
| 7 |
+
// Escape meta chars
|
| 8 |
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
| 9 |
+
|
| 10 |
+
return arg;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
| 14 |
+
// Convert to string
|
| 15 |
+
arg = `${arg}`;
|
| 16 |
+
|
| 17 |
+
// Algorithm below is based on https://qntm.org/cmd
|
| 18 |
+
// It's slightly altered to disable JS backtracking to avoid hanging on specially crafted input
|
| 19 |
+
// Please see https://github.com/moxystudio/node-cross-spawn/pull/160 for more information
|
| 20 |
+
|
| 21 |
+
// Sequence of backslashes followed by a double quote:
|
| 22 |
+
// double up all the backslashes and escape the double quote
|
| 23 |
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
|
| 24 |
+
|
| 25 |
+
// Sequence of backslashes followed by the end of the string
|
| 26 |
+
// (which will become a double quote later):
|
| 27 |
+
// double up all the backslashes
|
| 28 |
+
arg = arg.replace(/(?=(\\+?)?)\1$/, '$1$1');
|
| 29 |
+
|
| 30 |
+
// All other backslashes occur literally
|
| 31 |
+
|
| 32 |
+
// Quote the whole thing:
|
| 33 |
+
arg = `"${arg}"`;
|
| 34 |
+
|
| 35 |
+
// Escape meta chars
|
| 36 |
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
| 37 |
+
|
| 38 |
+
// Double escape meta chars if necessary
|
| 39 |
+
if (doubleEscapeMetaChars) {
|
| 40 |
+
arg = arg.replace(metaCharsRegExp, '^$1');
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
return arg;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
module.exports.command = escapeCommand;
|
| 47 |
+
module.exports.argument = escapeArgument;
|
novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/util/readShebang.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
const fs = require('fs');
|
| 4 |
+
const shebangCommand = require('shebang-command');
|
| 5 |
+
|
| 6 |
+
function readShebang(command) {
|
| 7 |
+
// Read the first 150 bytes from the file
|
| 8 |
+
const size = 150;
|
| 9 |
+
const buffer = Buffer.alloc(size);
|
| 10 |
+
|
| 11 |
+
let fd;
|
| 12 |
+
|
| 13 |
+
try {
|
| 14 |
+
fd = fs.openSync(command, 'r');
|
| 15 |
+
fs.readSync(fd, buffer, 0, size, 0);
|
| 16 |
+
fs.closeSync(fd);
|
| 17 |
+
} catch (e) { /* Empty */ }
|
| 18 |
+
|
| 19 |
+
// Attempt to extract shebang (null is returned if not a shebang)
|
| 20 |
+
return shebangCommand(buffer.toString());
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
module.exports = readShebang;
|
novas/novacore-zephyr/claude-code-router/node_modules/cross-spawn/lib/util/resolveCommand.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
const path = require('path');
|
| 4 |
+
const which = require('which');
|
| 5 |
+
const getPathKey = require('path-key');
|
| 6 |
+
|
| 7 |
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
| 8 |
+
const env = parsed.options.env || process.env;
|
| 9 |
+
const cwd = process.cwd();
|
| 10 |
+
const hasCustomCwd = parsed.options.cwd != null;
|
| 11 |
+
// Worker threads do not have process.chdir()
|
| 12 |
+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
|
| 13 |
+
|
| 14 |
+
// If a custom `cwd` was specified, we need to change the process cwd
|
| 15 |
+
// because `which` will do stat calls but does not support a custom cwd
|
| 16 |
+
if (shouldSwitchCwd) {
|
| 17 |
+
try {
|
| 18 |
+
process.chdir(parsed.options.cwd);
|
| 19 |
+
} catch (err) {
|
| 20 |
+
/* Empty */
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
let resolved;
|
| 25 |
+
|
| 26 |
+
try {
|
| 27 |
+
resolved = which.sync(parsed.command, {
|
| 28 |
+
path: env[getPathKey({ env })],
|
| 29 |
+
pathExt: withoutPathExt ? path.delimiter : undefined,
|
| 30 |
+
});
|
| 31 |
+
} catch (e) {
|
| 32 |
+
/* Empty */
|
| 33 |
+
} finally {
|
| 34 |
+
if (shouldSwitchCwd) {
|
| 35 |
+
process.chdir(cwd);
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
// If we successfully resolved, ensure that an absolute path is returned
|
| 40 |
+
// Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
|
| 41 |
+
if (resolved) {
|
| 42 |
+
resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
return resolved;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
function resolveCommand(parsed) {
|
| 49 |
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
module.exports = resolveCommand;
|
novas/novacore-zephyr/claude-code-router/node_modules/data-uri-to-buffer/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="node" />
|
| 2 |
+
export interface MimeBuffer extends Buffer {
|
| 3 |
+
type: string;
|
| 4 |
+
typeFull: string;
|
| 5 |
+
charset: string;
|
| 6 |
+
}
|
| 7 |
+
/**
|
| 8 |
+
* Returns a `Buffer` instance from the given data URI `uri`.
|
| 9 |
+
*
|
| 10 |
+
* @param {String} uri Data URI to turn into a Buffer instance
|
| 11 |
+
* @returns {Buffer} Buffer instance from Data URI
|
| 12 |
+
* @api public
|
| 13 |
+
*/
|
| 14 |
+
export declare function dataUriToBuffer(uri: string): MimeBuffer;
|
| 15 |
+
export default dataUriToBuffer;
|
novas/novacore-zephyr/claude-code-router/node_modules/data-uri-to-buffer/dist/index.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Returns a `Buffer` instance from the given data URI `uri`.
|
| 3 |
+
*
|
| 4 |
+
* @param {String} uri Data URI to turn into a Buffer instance
|
| 5 |
+
* @returns {Buffer} Buffer instance from Data URI
|
| 6 |
+
* @api public
|
| 7 |
+
*/
|
| 8 |
+
export function dataUriToBuffer(uri) {
|
| 9 |
+
if (!/^data:/i.test(uri)) {
|
| 10 |
+
throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
|
| 11 |
+
}
|
| 12 |
+
// strip newlines
|
| 13 |
+
uri = uri.replace(/\r?\n/g, '');
|
| 14 |
+
// split the URI up into the "metadata" and the "data" portions
|
| 15 |
+
const firstComma = uri.indexOf(',');
|
| 16 |
+
if (firstComma === -1 || firstComma <= 4) {
|
| 17 |
+
throw new TypeError('malformed data: URI');
|
| 18 |
+
}
|
| 19 |
+
// remove the "data:" scheme and parse the metadata
|
| 20 |
+
const meta = uri.substring(5, firstComma).split(';');
|
| 21 |
+
let charset = '';
|
| 22 |
+
let base64 = false;
|
| 23 |
+
const type = meta[0] || 'text/plain';
|
| 24 |
+
let typeFull = type;
|
| 25 |
+
for (let i = 1; i < meta.length; i++) {
|
| 26 |
+
if (meta[i] === 'base64') {
|
| 27 |
+
base64 = true;
|
| 28 |
+
}
|
| 29 |
+
else if (meta[i]) {
|
| 30 |
+
typeFull += `;${meta[i]}`;
|
| 31 |
+
if (meta[i].indexOf('charset=') === 0) {
|
| 32 |
+
charset = meta[i].substring(8);
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
// defaults to US-ASCII only if type is not provided
|
| 37 |
+
if (!meta[0] && !charset.length) {
|
| 38 |
+
typeFull += ';charset=US-ASCII';
|
| 39 |
+
charset = 'US-ASCII';
|
| 40 |
+
}
|
| 41 |
+
// get the encoded data portion and decode URI-encoded chars
|
| 42 |
+
const encoding = base64 ? 'base64' : 'ascii';
|
| 43 |
+
const data = unescape(uri.substring(firstComma + 1));
|
| 44 |
+
const buffer = Buffer.from(data, encoding);
|
| 45 |
+
// set `.type` and `.typeFull` properties to MIME type
|
| 46 |
+
buffer.type = type;
|
| 47 |
+
buffer.typeFull = typeFull;
|
| 48 |
+
// set the `.charset` property
|
| 49 |
+
buffer.charset = charset;
|
| 50 |
+
return buffer;
|
| 51 |
+
}
|
| 52 |
+
export default dataUriToBuffer;
|
| 53 |
+
//# sourceMappingURL=index.js.map
|
novas/novacore-zephyr/claude-code-router/node_modules/data-uri-to-buffer/dist/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IAC1C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;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AmB,CAAC;QAChC,OAAO,GAAG,UAAU,CAAC;KACrB;IAED,4DAA4D;IAC5D,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;IAC7C,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAe,CAAC;IAEzD,sDAAsD;IACtD,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAE3B,8BAA8B;IAC9B,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IAEzB,OAAO,MAAM,CAAC;AACf,CAAC;AAED,eAAe,eAAe,CAAC"}
|
novas/novacore-zephyr/claude-code-router/node_modules/data-uri-to-buffer/src/index.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export interface MimeBuffer extends Buffer {
|
| 2 |
+
type: string;
|
| 3 |
+
typeFull: string;
|
| 4 |
+
charset: string;
|
| 5 |
+
}
|
| 6 |
+
|
| 7 |
+
/**
|
| 8 |
+
* Returns a `Buffer` instance from the given data URI `uri`.
|
| 9 |
+
*
|
| 10 |
+
* @param {String} uri Data URI to turn into a Buffer instance
|
| 11 |
+
* @returns {Buffer} Buffer instance from Data URI
|
| 12 |
+
* @api public
|
| 13 |
+
*/
|
| 14 |
+
export function dataUriToBuffer(uri: string): MimeBuffer {
|
| 15 |
+
if (!/^data:/i.test(uri)) {
|
| 16 |
+
throw new TypeError(
|
| 17 |
+
'`uri` does not appear to be a Data URI (must begin with "data:")'
|
| 18 |
+
);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
// strip newlines
|
| 22 |
+
uri = uri.replace(/\r?\n/g, '');
|
| 23 |
+
|
| 24 |
+
// split the URI up into the "metadata" and the "data" portions
|
| 25 |
+
const firstComma = uri.indexOf(',');
|
| 26 |
+
if (firstComma === -1 || firstComma <= 4) {
|
| 27 |
+
throw new TypeError('malformed data: URI');
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
// remove the "data:" scheme and parse the metadata
|
| 31 |
+
const meta = uri.substring(5, firstComma).split(';');
|
| 32 |
+
|
| 33 |
+
let charset = '';
|
| 34 |
+
let base64 = false;
|
| 35 |
+
const type = meta[0] || 'text/plain';
|
| 36 |
+
let typeFull = type;
|
| 37 |
+
for (let i = 1; i < meta.length; i++) {
|
| 38 |
+
if (meta[i] === 'base64') {
|
| 39 |
+
base64 = true;
|
| 40 |
+
} else if(meta[i]) {
|
| 41 |
+
typeFull += `;${ meta[i]}`;
|
| 42 |
+
if (meta[i].indexOf('charset=') === 0) {
|
| 43 |
+
charset = meta[i].substring(8);
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
// defaults to US-ASCII only if type is not provided
|
| 48 |
+
if (!meta[0] && !charset.length) {
|
| 49 |
+
typeFull += ';charset=US-ASCII';
|
| 50 |
+
charset = 'US-ASCII';
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
// get the encoded data portion and decode URI-encoded chars
|
| 54 |
+
const encoding = base64 ? 'base64' : 'ascii';
|
| 55 |
+
const data = unescape(uri.substring(firstComma + 1));
|
| 56 |
+
const buffer = Buffer.from(data, encoding) as MimeBuffer;
|
| 57 |
+
|
| 58 |
+
// set `.type` and `.typeFull` properties to MIME type
|
| 59 |
+
buffer.type = type;
|
| 60 |
+
buffer.typeFull = typeFull;
|
| 61 |
+
|
| 62 |
+
// set the `.charset` property
|
| 63 |
+
buffer.charset = charset;
|
| 64 |
+
|
| 65 |
+
return buffer;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
export default dataUriToBuffer;
|
novas/novacore-zephyr/claude-code-router/node_modules/debug/src/browser.js
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* This is the web browser implementation of `debug()`.
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
exports.formatArgs = formatArgs;
|
| 8 |
+
exports.save = save;
|
| 9 |
+
exports.load = load;
|
| 10 |
+
exports.useColors = useColors;
|
| 11 |
+
exports.storage = localstorage();
|
| 12 |
+
exports.destroy = (() => {
|
| 13 |
+
let warned = false;
|
| 14 |
+
|
| 15 |
+
return () => {
|
| 16 |
+
if (!warned) {
|
| 17 |
+
warned = true;
|
| 18 |
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
| 19 |
+
}
|
| 20 |
+
};
|
| 21 |
+
})();
|
| 22 |
+
|
| 23 |
+
/**
|
| 24 |
+
* Colors.
|
| 25 |
+
*/
|
| 26 |
+
|
| 27 |
+
exports.colors = [
|
| 28 |
+
'#0000CC',
|
| 29 |
+
'#0000FF',
|
| 30 |
+
'#0033CC',
|
| 31 |
+
'#0033FF',
|
| 32 |
+
'#0066CC',
|
| 33 |
+
'#0066FF',
|
| 34 |
+
'#0099CC',
|
| 35 |
+
'#0099FF',
|
| 36 |
+
'#00CC00',
|
| 37 |
+
'#00CC33',
|
| 38 |
+
'#00CC66',
|
| 39 |
+
'#00CC99',
|
| 40 |
+
'#00CCCC',
|
| 41 |
+
'#00CCFF',
|
| 42 |
+
'#3300CC',
|
| 43 |
+
'#3300FF',
|
| 44 |
+
'#3333CC',
|
| 45 |
+
'#3333FF',
|
| 46 |
+
'#3366CC',
|
| 47 |
+
'#3366FF',
|
| 48 |
+
'#3399CC',
|
| 49 |
+
'#3399FF',
|
| 50 |
+
'#33CC00',
|
| 51 |
+
'#33CC33',
|
| 52 |
+
'#33CC66',
|
| 53 |
+
'#33CC99',
|
| 54 |
+
'#33CCCC',
|
| 55 |
+
'#33CCFF',
|
| 56 |
+
'#6600CC',
|
| 57 |
+
'#6600FF',
|
| 58 |
+
'#6633CC',
|
| 59 |
+
'#6633FF',
|
| 60 |
+
'#66CC00',
|
| 61 |
+
'#66CC33',
|
| 62 |
+
'#9900CC',
|
| 63 |
+
'#9900FF',
|
| 64 |
+
'#9933CC',
|
| 65 |
+
'#9933FF',
|
| 66 |
+
'#99CC00',
|
| 67 |
+
'#99CC33',
|
| 68 |
+
'#CC0000',
|
| 69 |
+
'#CC0033',
|
| 70 |
+
'#CC0066',
|
| 71 |
+
'#CC0099',
|
| 72 |
+
'#CC00CC',
|
| 73 |
+
'#CC00FF',
|
| 74 |
+
'#CC3300',
|
| 75 |
+
'#CC3333',
|
| 76 |
+
'#CC3366',
|
| 77 |
+
'#CC3399',
|
| 78 |
+
'#CC33CC',
|
| 79 |
+
'#CC33FF',
|
| 80 |
+
'#CC6600',
|
| 81 |
+
'#CC6633',
|
| 82 |
+
'#CC9900',
|
| 83 |
+
'#CC9933',
|
| 84 |
+
'#CCCC00',
|
| 85 |
+
'#CCCC33',
|
| 86 |
+
'#FF0000',
|
| 87 |
+
'#FF0033',
|
| 88 |
+
'#FF0066',
|
| 89 |
+
'#FF0099',
|
| 90 |
+
'#FF00CC',
|
| 91 |
+
'#FF00FF',
|
| 92 |
+
'#FF3300',
|
| 93 |
+
'#FF3333',
|
| 94 |
+
'#FF3366',
|
| 95 |
+
'#FF3399',
|
| 96 |
+
'#FF33CC',
|
| 97 |
+
'#FF33FF',
|
| 98 |
+
'#FF6600',
|
| 99 |
+
'#FF6633',
|
| 100 |
+
'#FF9900',
|
| 101 |
+
'#FF9933',
|
| 102 |
+
'#FFCC00',
|
| 103 |
+
'#FFCC33'
|
| 104 |
+
];
|
| 105 |
+
|
| 106 |
+
/**
|
| 107 |
+
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
| 108 |
+
* and the Firebug extension (any Firefox version) are known
|
| 109 |
+
* to support "%c" CSS customizations.
|
| 110 |
+
*
|
| 111 |
+
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
| 112 |
+
*/
|
| 113 |
+
|
| 114 |
+
// eslint-disable-next-line complexity
|
| 115 |
+
function useColors() {
|
| 116 |
+
// NB: In an Electron preload script, document will be defined but not fully
|
| 117 |
+
// initialized. Since we know we're in Chrome, we'll just detect this case
|
| 118 |
+
// explicitly
|
| 119 |
+
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
| 120 |
+
return true;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
// Internet Explorer and Edge do not support colors.
|
| 124 |
+
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
| 125 |
+
return false;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
let m;
|
| 129 |
+
|
| 130 |
+
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
| 131 |
+
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
| 132 |
+
// eslint-disable-next-line no-return-assign
|
| 133 |
+
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
| 134 |
+
// Is firebug? http://stackoverflow.com/a/398120/376773
|
| 135 |
+
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
| 136 |
+
// Is firefox >= v31?
|
| 137 |
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
| 138 |
+
(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
|
| 139 |
+
// Double check webkit in userAgent just in case we are in a worker
|
| 140 |
+
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
/**
|
| 144 |
+
* Colorize log arguments if enabled.
|
| 145 |
+
*
|
| 146 |
+
* @api public
|
| 147 |
+
*/
|
| 148 |
+
|
| 149 |
+
function formatArgs(args) {
|
| 150 |
+
args[0] = (this.useColors ? '%c' : '') +
|
| 151 |
+
this.namespace +
|
| 152 |
+
(this.useColors ? ' %c' : ' ') +
|
| 153 |
+
args[0] +
|
| 154 |
+
(this.useColors ? '%c ' : ' ') +
|
| 155 |
+
'+' + module.exports.humanize(this.diff);
|
| 156 |
+
|
| 157 |
+
if (!this.useColors) {
|
| 158 |
+
return;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
const c = 'color: ' + this.color;
|
| 162 |
+
args.splice(1, 0, c, 'color: inherit');
|
| 163 |
+
|
| 164 |
+
// The final "%c" is somewhat tricky, because there could be other
|
| 165 |
+
// arguments passed either before or after the %c, so we need to
|
| 166 |
+
// figure out the correct index to insert the CSS into
|
| 167 |
+
let index = 0;
|
| 168 |
+
let lastC = 0;
|
| 169 |
+
args[0].replace(/%[a-zA-Z%]/g, match => {
|
| 170 |
+
if (match === '%%') {
|
| 171 |
+
return;
|
| 172 |
+
}
|
| 173 |
+
index++;
|
| 174 |
+
if (match === '%c') {
|
| 175 |
+
// We only are interested in the *last* %c
|
| 176 |
+
// (the user may have provided their own)
|
| 177 |
+
lastC = index;
|
| 178 |
+
}
|
| 179 |
+
});
|
| 180 |
+
|
| 181 |
+
args.splice(lastC, 0, c);
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
/**
|
| 185 |
+
* Invokes `console.debug()` when available.
|
| 186 |
+
* No-op when `console.debug` is not a "function".
|
| 187 |
+
* If `console.debug` is not available, falls back
|
| 188 |
+
* to `console.log`.
|
| 189 |
+
*
|
| 190 |
+
* @api public
|
| 191 |
+
*/
|
| 192 |
+
exports.log = console.debug || console.log || (() => {});
|
| 193 |
+
|
| 194 |
+
/**
|
| 195 |
+
* Save `namespaces`.
|
| 196 |
+
*
|
| 197 |
+
* @param {String} namespaces
|
| 198 |
+
* @api private
|
| 199 |
+
*/
|
| 200 |
+
function save(namespaces) {
|
| 201 |
+
try {
|
| 202 |
+
if (namespaces) {
|
| 203 |
+
exports.storage.setItem('debug', namespaces);
|
| 204 |
+
} else {
|
| 205 |
+
exports.storage.removeItem('debug');
|
| 206 |
+
}
|
| 207 |
+
} catch (error) {
|
| 208 |
+
// Swallow
|
| 209 |
+
// XXX (@Qix-) should we be logging these?
|
| 210 |
+
}
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
/**
|
| 214 |
+
* Load `namespaces`.
|
| 215 |
+
*
|
| 216 |
+
* @return {String} returns the previously persisted debug modes
|
| 217 |
+
* @api private
|
| 218 |
+
*/
|
| 219 |
+
function load() {
|
| 220 |
+
let r;
|
| 221 |
+
try {
|
| 222 |
+
r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
|
| 223 |
+
} catch (error) {
|
| 224 |
+
// Swallow
|
| 225 |
+
// XXX (@Qix-) should we be logging these?
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
| 229 |
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
| 230 |
+
r = process.env.DEBUG;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
return r;
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
/**
|
| 237 |
+
* Localstorage attempts to return the localstorage.
|
| 238 |
+
*
|
| 239 |
+
* This is necessary because safari throws
|
| 240 |
+
* when a user disables cookies/localstorage
|
| 241 |
+
* and you attempt to access it.
|
| 242 |
+
*
|
| 243 |
+
* @return {LocalStorage}
|
| 244 |
+
* @api private
|
| 245 |
+
*/
|
| 246 |
+
|
| 247 |
+
function localstorage() {
|
| 248 |
+
try {
|
| 249 |
+
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
| 250 |
+
// The Browser also has localStorage in the global context.
|
| 251 |
+
return localStorage;
|
| 252 |
+
} catch (error) {
|
| 253 |
+
// Swallow
|
| 254 |
+
// XXX (@Qix-) should we be logging these?
|
| 255 |
+
}
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
module.exports = require('./common')(exports);
|
| 259 |
+
|
| 260 |
+
const {formatters} = module.exports;
|
| 261 |
+
|
| 262 |
+
/**
|
| 263 |
+
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
| 264 |
+
*/
|
| 265 |
+
|
| 266 |
+
formatters.j = function (v) {
|
| 267 |
+
try {
|
| 268 |
+
return JSON.stringify(v);
|
| 269 |
+
} catch (error) {
|
| 270 |
+
return '[UnexpectedJSONParseError]: ' + error.message;
|
| 271 |
+
}
|
| 272 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/debug/src/common.js
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
/**
|
| 3 |
+
* This is the common logic for both the Node.js and web browser
|
| 4 |
+
* implementations of `debug()`.
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
function setup(env) {
|
| 8 |
+
createDebug.debug = createDebug;
|
| 9 |
+
createDebug.default = createDebug;
|
| 10 |
+
createDebug.coerce = coerce;
|
| 11 |
+
createDebug.disable = disable;
|
| 12 |
+
createDebug.enable = enable;
|
| 13 |
+
createDebug.enabled = enabled;
|
| 14 |
+
createDebug.humanize = require('ms');
|
| 15 |
+
createDebug.destroy = destroy;
|
| 16 |
+
|
| 17 |
+
Object.keys(env).forEach(key => {
|
| 18 |
+
createDebug[key] = env[key];
|
| 19 |
+
});
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* The currently active debug mode names, and names to skip.
|
| 23 |
+
*/
|
| 24 |
+
|
| 25 |
+
createDebug.names = [];
|
| 26 |
+
createDebug.skips = [];
|
| 27 |
+
|
| 28 |
+
/**
|
| 29 |
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
| 30 |
+
*
|
| 31 |
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
| 32 |
+
*/
|
| 33 |
+
createDebug.formatters = {};
|
| 34 |
+
|
| 35 |
+
/**
|
| 36 |
+
* Selects a color for a debug namespace
|
| 37 |
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
| 38 |
+
* @return {Number|String} An ANSI color code for the given namespace
|
| 39 |
+
* @api private
|
| 40 |
+
*/
|
| 41 |
+
function selectColor(namespace) {
|
| 42 |
+
let hash = 0;
|
| 43 |
+
|
| 44 |
+
for (let i = 0; i < namespace.length; i++) {
|
| 45 |
+
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
| 46 |
+
hash |= 0; // Convert to 32bit integer
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
| 50 |
+
}
|
| 51 |
+
createDebug.selectColor = selectColor;
|
| 52 |
+
|
| 53 |
+
/**
|
| 54 |
+
* Create a debugger with the given `namespace`.
|
| 55 |
+
*
|
| 56 |
+
* @param {String} namespace
|
| 57 |
+
* @return {Function}
|
| 58 |
+
* @api public
|
| 59 |
+
*/
|
| 60 |
+
function createDebug(namespace) {
|
| 61 |
+
let prevTime;
|
| 62 |
+
let enableOverride = null;
|
| 63 |
+
let namespacesCache;
|
| 64 |
+
let enabledCache;
|
| 65 |
+
|
| 66 |
+
function debug(...args) {
|
| 67 |
+
// Disabled?
|
| 68 |
+
if (!debug.enabled) {
|
| 69 |
+
return;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
const self = debug;
|
| 73 |
+
|
| 74 |
+
// Set `diff` timestamp
|
| 75 |
+
const curr = Number(new Date());
|
| 76 |
+
const ms = curr - (prevTime || curr);
|
| 77 |
+
self.diff = ms;
|
| 78 |
+
self.prev = prevTime;
|
| 79 |
+
self.curr = curr;
|
| 80 |
+
prevTime = curr;
|
| 81 |
+
|
| 82 |
+
args[0] = createDebug.coerce(args[0]);
|
| 83 |
+
|
| 84 |
+
if (typeof args[0] !== 'string') {
|
| 85 |
+
// Anything else let's inspect with %O
|
| 86 |
+
args.unshift('%O');
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
// Apply any `formatters` transformations
|
| 90 |
+
let index = 0;
|
| 91 |
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
| 92 |
+
// If we encounter an escaped % then don't increase the array index
|
| 93 |
+
if (match === '%%') {
|
| 94 |
+
return '%';
|
| 95 |
+
}
|
| 96 |
+
index++;
|
| 97 |
+
const formatter = createDebug.formatters[format];
|
| 98 |
+
if (typeof formatter === 'function') {
|
| 99 |
+
const val = args[index];
|
| 100 |
+
match = formatter.call(self, val);
|
| 101 |
+
|
| 102 |
+
// Now we need to remove `args[index]` since it's inlined in the `format`
|
| 103 |
+
args.splice(index, 1);
|
| 104 |
+
index--;
|
| 105 |
+
}
|
| 106 |
+
return match;
|
| 107 |
+
});
|
| 108 |
+
|
| 109 |
+
// Apply env-specific formatting (colors, etc.)
|
| 110 |
+
createDebug.formatArgs.call(self, args);
|
| 111 |
+
|
| 112 |
+
const logFn = self.log || createDebug.log;
|
| 113 |
+
logFn.apply(self, args);
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
debug.namespace = namespace;
|
| 117 |
+
debug.useColors = createDebug.useColors();
|
| 118 |
+
debug.color = createDebug.selectColor(namespace);
|
| 119 |
+
debug.extend = extend;
|
| 120 |
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
| 121 |
+
|
| 122 |
+
Object.defineProperty(debug, 'enabled', {
|
| 123 |
+
enumerable: true,
|
| 124 |
+
configurable: false,
|
| 125 |
+
get: () => {
|
| 126 |
+
if (enableOverride !== null) {
|
| 127 |
+
return enableOverride;
|
| 128 |
+
}
|
| 129 |
+
if (namespacesCache !== createDebug.namespaces) {
|
| 130 |
+
namespacesCache = createDebug.namespaces;
|
| 131 |
+
enabledCache = createDebug.enabled(namespace);
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
return enabledCache;
|
| 135 |
+
},
|
| 136 |
+
set: v => {
|
| 137 |
+
enableOverride = v;
|
| 138 |
+
}
|
| 139 |
+
});
|
| 140 |
+
|
| 141 |
+
// Env-specific initialization logic for debug instances
|
| 142 |
+
if (typeof createDebug.init === 'function') {
|
| 143 |
+
createDebug.init(debug);
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
return debug;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
function extend(namespace, delimiter) {
|
| 150 |
+
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
| 151 |
+
newDebug.log = this.log;
|
| 152 |
+
return newDebug;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
/**
|
| 156 |
+
* Enables a debug mode by namespaces. This can include modes
|
| 157 |
+
* separated by a colon and wildcards.
|
| 158 |
+
*
|
| 159 |
+
* @param {String} namespaces
|
| 160 |
+
* @api public
|
| 161 |
+
*/
|
| 162 |
+
function enable(namespaces) {
|
| 163 |
+
createDebug.save(namespaces);
|
| 164 |
+
createDebug.namespaces = namespaces;
|
| 165 |
+
|
| 166 |
+
createDebug.names = [];
|
| 167 |
+
createDebug.skips = [];
|
| 168 |
+
|
| 169 |
+
const split = (typeof namespaces === 'string' ? namespaces : '')
|
| 170 |
+
.trim()
|
| 171 |
+
.replace(/\s+/g, ',')
|
| 172 |
+
.split(',')
|
| 173 |
+
.filter(Boolean);
|
| 174 |
+
|
| 175 |
+
for (const ns of split) {
|
| 176 |
+
if (ns[0] === '-') {
|
| 177 |
+
createDebug.skips.push(ns.slice(1));
|
| 178 |
+
} else {
|
| 179 |
+
createDebug.names.push(ns);
|
| 180 |
+
}
|
| 181 |
+
}
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
/**
|
| 185 |
+
* Checks if the given string matches a namespace template, honoring
|
| 186 |
+
* asterisks as wildcards.
|
| 187 |
+
*
|
| 188 |
+
* @param {String} search
|
| 189 |
+
* @param {String} template
|
| 190 |
+
* @return {Boolean}
|
| 191 |
+
*/
|
| 192 |
+
function matchesTemplate(search, template) {
|
| 193 |
+
let searchIndex = 0;
|
| 194 |
+
let templateIndex = 0;
|
| 195 |
+
let starIndex = -1;
|
| 196 |
+
let matchIndex = 0;
|
| 197 |
+
|
| 198 |
+
while (searchIndex < search.length) {
|
| 199 |
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
|
| 200 |
+
// Match character or proceed with wildcard
|
| 201 |
+
if (template[templateIndex] === '*') {
|
| 202 |
+
starIndex = templateIndex;
|
| 203 |
+
matchIndex = searchIndex;
|
| 204 |
+
templateIndex++; // Skip the '*'
|
| 205 |
+
} else {
|
| 206 |
+
searchIndex++;
|
| 207 |
+
templateIndex++;
|
| 208 |
+
}
|
| 209 |
+
} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
|
| 210 |
+
// Backtrack to the last '*' and try to match more characters
|
| 211 |
+
templateIndex = starIndex + 1;
|
| 212 |
+
matchIndex++;
|
| 213 |
+
searchIndex = matchIndex;
|
| 214 |
+
} else {
|
| 215 |
+
return false; // No match
|
| 216 |
+
}
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
// Handle trailing '*' in template
|
| 220 |
+
while (templateIndex < template.length && template[templateIndex] === '*') {
|
| 221 |
+
templateIndex++;
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
return templateIndex === template.length;
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
/**
|
| 228 |
+
* Disable debug output.
|
| 229 |
+
*
|
| 230 |
+
* @return {String} namespaces
|
| 231 |
+
* @api public
|
| 232 |
+
*/
|
| 233 |
+
function disable() {
|
| 234 |
+
const namespaces = [
|
| 235 |
+
...createDebug.names,
|
| 236 |
+
...createDebug.skips.map(namespace => '-' + namespace)
|
| 237 |
+
].join(',');
|
| 238 |
+
createDebug.enable('');
|
| 239 |
+
return namespaces;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
/**
|
| 243 |
+
* Returns true if the given mode name is enabled, false otherwise.
|
| 244 |
+
*
|
| 245 |
+
* @param {String} name
|
| 246 |
+
* @return {Boolean}
|
| 247 |
+
* @api public
|
| 248 |
+
*/
|
| 249 |
+
function enabled(name) {
|
| 250 |
+
for (const skip of createDebug.skips) {
|
| 251 |
+
if (matchesTemplate(name, skip)) {
|
| 252 |
+
return false;
|
| 253 |
+
}
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
for (const ns of createDebug.names) {
|
| 257 |
+
if (matchesTemplate(name, ns)) {
|
| 258 |
+
return true;
|
| 259 |
+
}
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
return false;
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
/**
|
| 266 |
+
* Coerce `val`.
|
| 267 |
+
*
|
| 268 |
+
* @param {Mixed} val
|
| 269 |
+
* @return {Mixed}
|
| 270 |
+
* @api private
|
| 271 |
+
*/
|
| 272 |
+
function coerce(val) {
|
| 273 |
+
if (val instanceof Error) {
|
| 274 |
+
return val.stack || val.message;
|
| 275 |
+
}
|
| 276 |
+
return val;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
/**
|
| 280 |
+
* XXX DO NOT USE. This is a temporary stub function.
|
| 281 |
+
* XXX It WILL be removed in the next major release.
|
| 282 |
+
*/
|
| 283 |
+
function destroy() {
|
| 284 |
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
createDebug.enable(createDebug.load());
|
| 288 |
+
|
| 289 |
+
return createDebug;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
module.exports = setup;
|
novas/novacore-zephyr/claude-code-router/node_modules/debug/src/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Detect Electron renderer / nwjs process, which is node, but we should
|
| 3 |
+
* treat as a browser.
|
| 4 |
+
*/
|
| 5 |
+
|
| 6 |
+
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
| 7 |
+
module.exports = require('./browser.js');
|
| 8 |
+
} else {
|
| 9 |
+
module.exports = require('./node.js');
|
| 10 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/debug/src/node.js
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* Module dependencies.
|
| 3 |
+
*/
|
| 4 |
+
|
| 5 |
+
const tty = require('tty');
|
| 6 |
+
const util = require('util');
|
| 7 |
+
|
| 8 |
+
/**
|
| 9 |
+
* This is the Node.js implementation of `debug()`.
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
exports.init = init;
|
| 13 |
+
exports.log = log;
|
| 14 |
+
exports.formatArgs = formatArgs;
|
| 15 |
+
exports.save = save;
|
| 16 |
+
exports.load = load;
|
| 17 |
+
exports.useColors = useColors;
|
| 18 |
+
exports.destroy = util.deprecate(
|
| 19 |
+
() => {},
|
| 20 |
+
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
|
| 21 |
+
);
|
| 22 |
+
|
| 23 |
+
/**
|
| 24 |
+
* Colors.
|
| 25 |
+
*/
|
| 26 |
+
|
| 27 |
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
| 28 |
+
|
| 29 |
+
try {
|
| 30 |
+
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
|
| 31 |
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
| 32 |
+
const supportsColor = require('supports-color');
|
| 33 |
+
|
| 34 |
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
| 35 |
+
exports.colors = [
|
| 36 |
+
20,
|
| 37 |
+
21,
|
| 38 |
+
26,
|
| 39 |
+
27,
|
| 40 |
+
32,
|
| 41 |
+
33,
|
| 42 |
+
38,
|
| 43 |
+
39,
|
| 44 |
+
40,
|
| 45 |
+
41,
|
| 46 |
+
42,
|
| 47 |
+
43,
|
| 48 |
+
44,
|
| 49 |
+
45,
|
| 50 |
+
56,
|
| 51 |
+
57,
|
| 52 |
+
62,
|
| 53 |
+
63,
|
| 54 |
+
68,
|
| 55 |
+
69,
|
| 56 |
+
74,
|
| 57 |
+
75,
|
| 58 |
+
76,
|
| 59 |
+
77,
|
| 60 |
+
78,
|
| 61 |
+
79,
|
| 62 |
+
80,
|
| 63 |
+
81,
|
| 64 |
+
92,
|
| 65 |
+
93,
|
| 66 |
+
98,
|
| 67 |
+
99,
|
| 68 |
+
112,
|
| 69 |
+
113,
|
| 70 |
+
128,
|
| 71 |
+
129,
|
| 72 |
+
134,
|
| 73 |
+
135,
|
| 74 |
+
148,
|
| 75 |
+
149,
|
| 76 |
+
160,
|
| 77 |
+
161,
|
| 78 |
+
162,
|
| 79 |
+
163,
|
| 80 |
+
164,
|
| 81 |
+
165,
|
| 82 |
+
166,
|
| 83 |
+
167,
|
| 84 |
+
168,
|
| 85 |
+
169,
|
| 86 |
+
170,
|
| 87 |
+
171,
|
| 88 |
+
172,
|
| 89 |
+
173,
|
| 90 |
+
178,
|
| 91 |
+
179,
|
| 92 |
+
184,
|
| 93 |
+
185,
|
| 94 |
+
196,
|
| 95 |
+
197,
|
| 96 |
+
198,
|
| 97 |
+
199,
|
| 98 |
+
200,
|
| 99 |
+
201,
|
| 100 |
+
202,
|
| 101 |
+
203,
|
| 102 |
+
204,
|
| 103 |
+
205,
|
| 104 |
+
206,
|
| 105 |
+
207,
|
| 106 |
+
208,
|
| 107 |
+
209,
|
| 108 |
+
214,
|
| 109 |
+
215,
|
| 110 |
+
220,
|
| 111 |
+
221
|
| 112 |
+
];
|
| 113 |
+
}
|
| 114 |
+
} catch (error) {
|
| 115 |
+
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
/**
|
| 119 |
+
* Build up the default `inspectOpts` object from the environment variables.
|
| 120 |
+
*
|
| 121 |
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
| 122 |
+
*/
|
| 123 |
+
|
| 124 |
+
exports.inspectOpts = Object.keys(process.env).filter(key => {
|
| 125 |
+
return /^debug_/i.test(key);
|
| 126 |
+
}).reduce((obj, key) => {
|
| 127 |
+
// Camel-case
|
| 128 |
+
const prop = key
|
| 129 |
+
.substring(6)
|
| 130 |
+
.toLowerCase()
|
| 131 |
+
.replace(/_([a-z])/g, (_, k) => {
|
| 132 |
+
return k.toUpperCase();
|
| 133 |
+
});
|
| 134 |
+
|
| 135 |
+
// Coerce string value into JS value
|
| 136 |
+
let val = process.env[key];
|
| 137 |
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
| 138 |
+
val = true;
|
| 139 |
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
| 140 |
+
val = false;
|
| 141 |
+
} else if (val === 'null') {
|
| 142 |
+
val = null;
|
| 143 |
+
} else {
|
| 144 |
+
val = Number(val);
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
obj[prop] = val;
|
| 148 |
+
return obj;
|
| 149 |
+
}, {});
|
| 150 |
+
|
| 151 |
+
/**
|
| 152 |
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
| 153 |
+
*/
|
| 154 |
+
|
| 155 |
+
function useColors() {
|
| 156 |
+
return 'colors' in exports.inspectOpts ?
|
| 157 |
+
Boolean(exports.inspectOpts.colors) :
|
| 158 |
+
tty.isatty(process.stderr.fd);
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
/**
|
| 162 |
+
* Adds ANSI color escape codes if enabled.
|
| 163 |
+
*
|
| 164 |
+
* @api public
|
| 165 |
+
*/
|
| 166 |
+
|
| 167 |
+
function formatArgs(args) {
|
| 168 |
+
const {namespace: name, useColors} = this;
|
| 169 |
+
|
| 170 |
+
if (useColors) {
|
| 171 |
+
const c = this.color;
|
| 172 |
+
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
| 173 |
+
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
| 174 |
+
|
| 175 |
+
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
| 176 |
+
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
|
| 177 |
+
} else {
|
| 178 |
+
args[0] = getDate() + name + ' ' + args[0];
|
| 179 |
+
}
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
function getDate() {
|
| 183 |
+
if (exports.inspectOpts.hideDate) {
|
| 184 |
+
return '';
|
| 185 |
+
}
|
| 186 |
+
return new Date().toISOString() + ' ';
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
/**
|
| 190 |
+
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
| 191 |
+
*/
|
| 192 |
+
|
| 193 |
+
function log(...args) {
|
| 194 |
+
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
/**
|
| 198 |
+
* Save `namespaces`.
|
| 199 |
+
*
|
| 200 |
+
* @param {String} namespaces
|
| 201 |
+
* @api private
|
| 202 |
+
*/
|
| 203 |
+
function save(namespaces) {
|
| 204 |
+
if (namespaces) {
|
| 205 |
+
process.env.DEBUG = namespaces;
|
| 206 |
+
} else {
|
| 207 |
+
// If you set a process.env field to null or undefined, it gets cast to the
|
| 208 |
+
// string 'null' or 'undefined'. Just delete instead.
|
| 209 |
+
delete process.env.DEBUG;
|
| 210 |
+
}
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
/**
|
| 214 |
+
* Load `namespaces`.
|
| 215 |
+
*
|
| 216 |
+
* @return {String} returns the previously persisted debug modes
|
| 217 |
+
* @api private
|
| 218 |
+
*/
|
| 219 |
+
|
| 220 |
+
function load() {
|
| 221 |
+
return process.env.DEBUG;
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
/**
|
| 225 |
+
* Init logic for `debug` instances.
|
| 226 |
+
*
|
| 227 |
+
* Create a new `inspectOpts` object in case `useColors` is set
|
| 228 |
+
* differently for a particular `debug` instance.
|
| 229 |
+
*/
|
| 230 |
+
|
| 231 |
+
function init(debug) {
|
| 232 |
+
debug.inspectOpts = {};
|
| 233 |
+
|
| 234 |
+
const keys = Object.keys(exports.inspectOpts);
|
| 235 |
+
for (let i = 0; i < keys.length; i++) {
|
| 236 |
+
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
| 237 |
+
}
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
module.exports = require('./common')(exports);
|
| 241 |
+
|
| 242 |
+
const {formatters} = module.exports;
|
| 243 |
+
|
| 244 |
+
/**
|
| 245 |
+
* Map %o to `util.inspect()`, all on a single line.
|
| 246 |
+
*/
|
| 247 |
+
|
| 248 |
+
formatters.o = function (v) {
|
| 249 |
+
this.inspectOpts.colors = this.useColors;
|
| 250 |
+
return util.inspect(v, this.inspectOpts)
|
| 251 |
+
.split('\n')
|
| 252 |
+
.map(str => str.trim())
|
| 253 |
+
.join(' ');
|
| 254 |
+
};
|
| 255 |
+
|
| 256 |
+
/**
|
| 257 |
+
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
| 258 |
+
*/
|
| 259 |
+
|
| 260 |
+
formatters.O = function (v) {
|
| 261 |
+
this.inspectOpts.colors = this.useColors;
|
| 262 |
+
return util.inspect(v, this.inspectOpts);
|
| 263 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/depd/lib/browser/index.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*!
|
| 2 |
+
* depd
|
| 3 |
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
| 4 |
+
* MIT Licensed
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
'use strict'
|
| 8 |
+
|
| 9 |
+
/**
|
| 10 |
+
* Module exports.
|
| 11 |
+
* @public
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
module.exports = depd
|
| 15 |
+
|
| 16 |
+
/**
|
| 17 |
+
* Create deprecate for namespace in caller.
|
| 18 |
+
*/
|
| 19 |
+
|
| 20 |
+
function depd (namespace) {
|
| 21 |
+
if (!namespace) {
|
| 22 |
+
throw new TypeError('argument namespace is required')
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
function deprecate (message) {
|
| 26 |
+
// no-op in browser
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
deprecate._file = undefined
|
| 30 |
+
deprecate._ignored = true
|
| 31 |
+
deprecate._namespace = namespace
|
| 32 |
+
deprecate._traced = false
|
| 33 |
+
deprecate._warned = Object.create(null)
|
| 34 |
+
|
| 35 |
+
deprecate.function = wrapfunction
|
| 36 |
+
deprecate.property = wrapproperty
|
| 37 |
+
|
| 38 |
+
return deprecate
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
/**
|
| 42 |
+
* Return a wrapped function in a deprecation message.
|
| 43 |
+
*
|
| 44 |
+
* This is a no-op version of the wrapper, which does nothing but call
|
| 45 |
+
* validation.
|
| 46 |
+
*/
|
| 47 |
+
|
| 48 |
+
function wrapfunction (fn, message) {
|
| 49 |
+
if (typeof fn !== 'function') {
|
| 50 |
+
throw new TypeError('argument fn must be a function')
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
return fn
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
/**
|
| 57 |
+
* Wrap property in a deprecation message.
|
| 58 |
+
*
|
| 59 |
+
* This is a no-op version of the wrapper, which does nothing but call
|
| 60 |
+
* validation.
|
| 61 |
+
*/
|
| 62 |
+
|
| 63 |
+
function wrapproperty (obj, prop, message) {
|
| 64 |
+
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
| 65 |
+
throw new TypeError('argument obj must be object')
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
var descriptor = Object.getOwnPropertyDescriptor(obj, prop)
|
| 69 |
+
|
| 70 |
+
if (!descriptor) {
|
| 71 |
+
throw new TypeError('must call property on owner object')
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
if (!descriptor.configurable) {
|
| 75 |
+
throw new TypeError('property must be configurable')
|
| 76 |
+
}
|
| 77 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/dotenv/lib/cli-options.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const re = /^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/
|
| 2 |
+
|
| 3 |
+
module.exports = function optionMatcher (args) {
|
| 4 |
+
const options = args.reduce(function (acc, cur) {
|
| 5 |
+
const matches = cur.match(re)
|
| 6 |
+
if (matches) {
|
| 7 |
+
acc[matches[1]] = matches[2]
|
| 8 |
+
}
|
| 9 |
+
return acc
|
| 10 |
+
}, {})
|
| 11 |
+
|
| 12 |
+
if (!('quiet' in options)) {
|
| 13 |
+
options.quiet = 'true'
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
return options
|
| 17 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/dotenv/lib/env-options.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// ../config.js accepts options via environment variables
|
| 2 |
+
const options = {}
|
| 3 |
+
|
| 4 |
+
if (process.env.DOTENV_CONFIG_ENCODING != null) {
|
| 5 |
+
options.encoding = process.env.DOTENV_CONFIG_ENCODING
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
if (process.env.DOTENV_CONFIG_PATH != null) {
|
| 9 |
+
options.path = process.env.DOTENV_CONFIG_PATH
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
if (process.env.DOTENV_CONFIG_QUIET != null) {
|
| 13 |
+
options.quiet = process.env.DOTENV_CONFIG_QUIET
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
if (process.env.DOTENV_CONFIG_DEBUG != null) {
|
| 17 |
+
options.debug = process.env.DOTENV_CONFIG_DEBUG
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
if (process.env.DOTENV_CONFIG_OVERRIDE != null) {
|
| 21 |
+
options.override = process.env.DOTENV_CONFIG_OVERRIDE
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
if (process.env.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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// TypeScript Version: 3.0
|
| 2 |
+
/// <reference types="node" />
|
| 3 |
+
import type { URL } from 'url';
|
| 4 |
+
|
| 5 |
+
export interface DotenvParseOutput {
|
| 6 |
+
[name: string]: string;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
/**
|
| 10 |
+
* Parses a string or buffer in the .env file format into an object.
|
| 11 |
+
*
|
| 12 |
+
* See https://dotenvx.com/docs
|
| 13 |
+
*
|
| 14 |
+
* @param src - contents to be parsed. example: `'DB_HOST=localhost'`
|
| 15 |
+
* @returns an object with keys and values based on `src`. example: `{ DB_HOST : 'localhost' }`
|
| 16 |
+
*/
|
| 17 |
+
export function parse<T extends DotenvParseOutput = DotenvParseOutput>(
|
| 18 |
+
src: string | Buffer
|
| 19 |
+
): T;
|
| 20 |
+
|
| 21 |
+
export interface DotenvConfigOptions {
|
| 22 |
+
/**
|
| 23 |
+
* Default: `path.resolve(process.cwd(), '.env')`
|
| 24 |
+
*
|
| 25 |
+
* Specify a custom path if your file containing environment variables is located elsewhere.
|
| 26 |
+
* Can also be an array of strings, specifying multiple paths.
|
| 27 |
+
*
|
| 28 |
+
* example: `require('dotenv').config({ path: '/custom/path/to/.env' })`
|
| 29 |
+
* example: `require('dotenv').config({ path: ['/path/to/first.env', '/path/to/second.env'] })`
|
| 30 |
+
*/
|
| 31 |
+
path?: string | string[] | URL;
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* Default: `utf8`
|
| 35 |
+
*
|
| 36 |
+
* Specify the encoding of your file containing environment variables.
|
| 37 |
+
*
|
| 38 |
+
* example: `require('dotenv').config({ encoding: 'latin1' })`
|
| 39 |
+
*/
|
| 40 |
+
encoding?: string;
|
| 41 |
+
|
| 42 |
+
/**
|
| 43 |
+
* Default: `false`
|
| 44 |
+
*
|
| 45 |
+
* Suppress all output (except errors).
|
| 46 |
+
*
|
| 47 |
+
* example: `require('dotenv').config({ quiet: true })`
|
| 48 |
+
*/
|
| 49 |
+
quiet?: boolean;
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* Default: `false`
|
| 53 |
+
*
|
| 54 |
+
* Turn on logging to help debug why certain keys or values are not being set as you expect.
|
| 55 |
+
*
|
| 56 |
+
* example: `require('dotenv').config({ debug: process.env.DEBUG })`
|
| 57 |
+
*/
|
| 58 |
+
debug?: boolean;
|
| 59 |
+
|
| 60 |
+
/**
|
| 61 |
+
* Default: `false`
|
| 62 |
+
*
|
| 63 |
+
* Override any environment variables that have already been set on your machine with values from your .env file.
|
| 64 |
+
*
|
| 65 |
+
* example: `require('dotenv').config({ override: true })`
|
| 66 |
+
*/
|
| 67 |
+
override?: boolean;
|
| 68 |
+
|
| 69 |
+
/**
|
| 70 |
+
* Default: `process.env`
|
| 71 |
+
*
|
| 72 |
+
* Specify an object to write your secrets to. Defaults to process.env environment variables.
|
| 73 |
+
*
|
| 74 |
+
* example: `const processEnv = {}; require('dotenv').config({ processEnv: processEnv })`
|
| 75 |
+
*/
|
| 76 |
+
processEnv?: DotenvPopulateInput;
|
| 77 |
+
|
| 78 |
+
/**
|
| 79 |
+
* Default: `undefined`
|
| 80 |
+
*
|
| 81 |
+
* Pass the DOTENV_KEY directly to config options. Defaults to looking for process.env.DOTENV_KEY environment variable. Note this only applies to decrypting .env.vault files. If passed as null or undefined, or not passed at all, dotenv falls back to its traditional job of parsing a .env file.
|
| 82 |
+
*
|
| 83 |
+
* example: `require('dotenv').config({ DOTENV_KEY: 'dotenv://:key_1234…@dotenvx.com/vault/.env.vault?environment=production' })`
|
| 84 |
+
*/
|
| 85 |
+
DOTENV_KEY?: string;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
export interface DotenvConfigOutput {
|
| 89 |
+
error?: Error;
|
| 90 |
+
parsed?: DotenvParseOutput;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
export interface DotenvPopulateOptions {
|
| 94 |
+
/**
|
| 95 |
+
* Default: `false`
|
| 96 |
+
*
|
| 97 |
+
* Turn on logging to help debug why certain keys or values are not being set as you expect.
|
| 98 |
+
*
|
| 99 |
+
* example: `require('dotenv').config({ debug: process.env.DEBUG })`
|
| 100 |
+
*/
|
| 101 |
+
debug?: boolean;
|
| 102 |
+
|
| 103 |
+
/**
|
| 104 |
+
* Default: `false`
|
| 105 |
+
*
|
| 106 |
+
* Override any environment variables that have already been set on your machine with values from your .env file.
|
| 107 |
+
*
|
| 108 |
+
* example: `require('dotenv').config({ override: true })`
|
| 109 |
+
*/
|
| 110 |
+
override?: boolean;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
export interface DotenvPopulateInput {
|
| 114 |
+
[name: string]: string;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
/**
|
| 118 |
+
* Loads `.env` file contents into process.env by default. If `DOTENV_KEY` is present, it smartly attempts to load encrypted `.env.vault` file contents into process.env.
|
| 119 |
+
*
|
| 120 |
+
* See https://dotenvx.com/docs
|
| 121 |
+
*
|
| 122 |
+
* @param options - additional options. example: `{ path: './custom/path', encoding: 'latin1', quiet: false, debug: true, override: false }`
|
| 123 |
+
* @returns an object with a `parsed` key if successful or `error` key if an error occurred. example: { parsed: { KEY: 'value' } }
|
| 124 |
+
*
|
| 125 |
+
*/
|
| 126 |
+
export function config(options?: DotenvConfigOptions): DotenvConfigOutput;
|
| 127 |
+
|
| 128 |
+
/**
|
| 129 |
+
* Loads `.env` file contents into process.env.
|
| 130 |
+
*
|
| 131 |
+
* See https://dotenvx.com/docs
|
| 132 |
+
*
|
| 133 |
+
* @param options - additional options. example: `{ path: './custom/path', encoding: 'latin1', quiet: false, debug: true, override: false }`
|
| 134 |
+
* @returns an object with a `parsed` key if successful or `error` key if an error occurred. example: { parsed: { KEY: 'value' } }
|
| 135 |
+
*
|
| 136 |
+
*/
|
| 137 |
+
export function configDotenv(options?: DotenvConfigOptions): DotenvConfigOutput;
|
| 138 |
+
|
| 139 |
+
/**
|
| 140 |
+
* Loads `source` json contents into `target` like process.env.
|
| 141 |
+
*
|
| 142 |
+
* See https://dotenvx.com/docs
|
| 143 |
+
*
|
| 144 |
+
* @param processEnv - the target JSON object. in most cases use process.env but you can also pass your own JSON object
|
| 145 |
+
* @param parsed - the source JSON object
|
| 146 |
+
* @param options - additional options. example: `{ quiet: false, debug: true, override: false }`
|
| 147 |
+
* @returns {void}
|
| 148 |
+
*
|
| 149 |
+
*/
|
| 150 |
+
export function populate(processEnv: DotenvPopulateInput, parsed: DotenvPopulateInput, options?: DotenvConfigOptions): void;
|
| 151 |
+
|
| 152 |
+
/**
|
| 153 |
+
* Decrypt ciphertext
|
| 154 |
+
*
|
| 155 |
+
* See https://dotenvx.com/docs
|
| 156 |
+
*
|
| 157 |
+
* @param encrypted - the encrypted ciphertext string
|
| 158 |
+
* @param keyStr - the decryption key string
|
| 159 |
+
* @returns {string}
|
| 160 |
+
*
|
| 161 |
+
*/
|
| 162 |
+
export function decrypt(encrypted: string, keyStr: string): string;
|
novas/novacore-zephyr/claude-code-router/node_modules/dotenv/lib/main.js
ADDED
|
@@ -0,0 +1,386 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
const packageJson = require('../package.json')
|
| 6 |
+
|
| 7 |
+
const version = packageJson.version
|
| 8 |
+
|
| 9 |
+
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg
|
| 10 |
+
|
| 11 |
+
// Parse src into an Object
|
| 12 |
+
function parse (src) {
|
| 13 |
+
const obj = {}
|
| 14 |
+
|
| 15 |
+
// Convert buffer to string
|
| 16 |
+
let lines = src.toString()
|
| 17 |
+
|
| 18 |
+
// Convert line breaks to same format
|
| 19 |
+
lines = lines.replace(/\r\n?/mg, '\n')
|
| 20 |
+
|
| 21 |
+
let match
|
| 22 |
+
while ((match = LINE.exec(lines)) != null) {
|
| 23 |
+
const key = match[1]
|
| 24 |
+
|
| 25 |
+
// Default undefined or null to empty string
|
| 26 |
+
let value = (match[2] || '')
|
| 27 |
+
|
| 28 |
+
// Remove whitespace
|
| 29 |
+
value = value.trim()
|
| 30 |
+
|
| 31 |
+
// Check if double quoted
|
| 32 |
+
const maybeQuote = value[0]
|
| 33 |
+
|
| 34 |
+
// Remove surrounding quotes
|
| 35 |
+
value = value.replace(/^(['"`])([\s\S]*)\1$/mg, '$2')
|
| 36 |
+
|
| 37 |
+
// Expand newlines if double quoted
|
| 38 |
+
if (maybeQuote === '"') {
|
| 39 |
+
value = value.replace(/\\n/g, '\n')
|
| 40 |
+
value = value.replace(/\\r/g, '\r')
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
// Add to object
|
| 44 |
+
obj[key] = value
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
return obj
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
function _parseVault (options) {
|
| 51 |
+
options = options || {}
|
| 52 |
+
|
| 53 |
+
const vaultPath = _vaultPath(options)
|
| 54 |
+
options.path = vaultPath // parse .env.vault
|
| 55 |
+
const result = DotenvModule.configDotenv(options)
|
| 56 |
+
if (!result.parsed) {
|
| 57 |
+
const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)
|
| 58 |
+
err.code = 'MISSING_DATA'
|
| 59 |
+
throw err
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
// handle scenario for comma separated keys - for use with key rotation
|
| 63 |
+
// example: DOTENV_KEY="dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod"
|
| 64 |
+
const keys = _dotenvKey(options).split(',')
|
| 65 |
+
const length = keys.length
|
| 66 |
+
|
| 67 |
+
let decrypted
|
| 68 |
+
for (let i = 0; i < length; i++) {
|
| 69 |
+
try {
|
| 70 |
+
// Get full key
|
| 71 |
+
const key = keys[i].trim()
|
| 72 |
+
|
| 73 |
+
// Get instructions for decrypt
|
| 74 |
+
const attrs = _instructions(result, key)
|
| 75 |
+
|
| 76 |
+
// Decrypt
|
| 77 |
+
decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)
|
| 78 |
+
|
| 79 |
+
break
|
| 80 |
+
} catch (error) {
|
| 81 |
+
// last key
|
| 82 |
+
if (i + 1 >= length) {
|
| 83 |
+
throw error
|
| 84 |
+
}
|
| 85 |
+
// try next key
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
// Parse decrypted .env string
|
| 90 |
+
return DotenvModule.parse(decrypted)
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
function _warn (message) {
|
| 94 |
+
console.log(`[dotenv@${version}][WARN] ${message}`)
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
function _debug (message) {
|
| 98 |
+
console.log(`[dotenv@${version}][DEBUG] ${message}`)
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
function _log (message) {
|
| 102 |
+
console.log(`[dotenv@${version}] ${message}`)
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
function _dotenvKey (options) {
|
| 106 |
+
// prioritize developer directly setting options.DOTENV_KEY
|
| 107 |
+
if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
|
| 108 |
+
return options.DOTENV_KEY
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
// secondary infra already contains a DOTENV_KEY environment variable
|
| 112 |
+
if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {
|
| 113 |
+
return process.env.DOTENV_KEY
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
// fallback to empty string
|
| 117 |
+
return ''
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
function _instructions (result, dotenvKey) {
|
| 121 |
+
// Parse DOTENV_KEY. Format is a URI
|
| 122 |
+
let uri
|
| 123 |
+
try {
|
| 124 |
+
uri = new URL(dotenvKey)
|
| 125 |
+
} catch (error) {
|
| 126 |
+
if (error.code === 'ERR_INVALID_URL') {
|
| 127 |
+
const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')
|
| 128 |
+
err.code = 'INVALID_DOTENV_KEY'
|
| 129 |
+
throw err
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
throw error
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
// Get decrypt key
|
| 136 |
+
const key = uri.password
|
| 137 |
+
if (!key) {
|
| 138 |
+
const err = new Error('INVALID_DOTENV_KEY: Missing key part')
|
| 139 |
+
err.code = 'INVALID_DOTENV_KEY'
|
| 140 |
+
throw err
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
// Get environment
|
| 144 |
+
const environment = uri.searchParams.get('environment')
|
| 145 |
+
if (!environment) {
|
| 146 |
+
const err = new Error('INVALID_DOTENV_KEY: Missing environment part')
|
| 147 |
+
err.code = 'INVALID_DOTENV_KEY'
|
| 148 |
+
throw err
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
// Get ciphertext payload
|
| 152 |
+
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`
|
| 153 |
+
const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION
|
| 154 |
+
if (!ciphertext) {
|
| 155 |
+
const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)
|
| 156 |
+
err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'
|
| 157 |
+
throw err
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
return { ciphertext, key }
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
function _vaultPath (options) {
|
| 164 |
+
let possibleVaultPath = null
|
| 165 |
+
|
| 166 |
+
if (options && options.path && options.path.length > 0) {
|
| 167 |
+
if (Array.isArray(options.path)) {
|
| 168 |
+
for (const filepath of options.path) {
|
| 169 |
+
if (fs.existsSync(filepath)) {
|
| 170 |
+
possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`
|
| 171 |
+
}
|
| 172 |
+
}
|
| 173 |
+
} else {
|
| 174 |
+
possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`
|
| 175 |
+
}
|
| 176 |
+
} else {
|
| 177 |
+
possibleVaultPath = path.resolve(process.cwd(), '.env.vault')
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
if (fs.existsSync(possibleVaultPath)) {
|
| 181 |
+
return possibleVaultPath
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
return null
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
function _resolveHome (envPath) {
|
| 188 |
+
return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
function _configVault (options) {
|
| 192 |
+
const debug = Boolean(options && options.debug)
|
| 193 |
+
const quiet = options && 'quiet' in options ? options.quiet : true
|
| 194 |
+
|
| 195 |
+
if (debug || !quiet) {
|
| 196 |
+
_log('Loading env from encrypted .env.vault')
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
const parsed = DotenvModule._parseVault(options)
|
| 200 |
+
|
| 201 |
+
let processEnv = process.env
|
| 202 |
+
if (options && options.processEnv != null) {
|
| 203 |
+
processEnv = options.processEnv
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
DotenvModule.populate(processEnv, parsed, options)
|
| 207 |
+
|
| 208 |
+
return { parsed }
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
function configDotenv (options) {
|
| 212 |
+
const dotenvPath = path.resolve(process.cwd(), '.env')
|
| 213 |
+
let encoding = 'utf8'
|
| 214 |
+
const debug = Boolean(options && options.debug)
|
| 215 |
+
const quiet = options && 'quiet' in options ? options.quiet : true
|
| 216 |
+
|
| 217 |
+
if (options && options.encoding) {
|
| 218 |
+
encoding = options.encoding
|
| 219 |
+
} else {
|
| 220 |
+
if (debug) {
|
| 221 |
+
_debug('No encoding is specified. UTF-8 is used by default')
|
| 222 |
+
}
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
let optionPaths = [dotenvPath] // default, look for .env
|
| 226 |
+
if (options && options.path) {
|
| 227 |
+
if (!Array.isArray(options.path)) {
|
| 228 |
+
optionPaths = [_resolveHome(options.path)]
|
| 229 |
+
} else {
|
| 230 |
+
optionPaths = [] // reset default
|
| 231 |
+
for (const filepath of options.path) {
|
| 232 |
+
optionPaths.push(_resolveHome(filepath))
|
| 233 |
+
}
|
| 234 |
+
}
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
// Build the parsed data in a temporary object (because we need to return it). Once we have the final
|
| 238 |
+
// parsed data, we will combine it with process.env (or options.processEnv if provided).
|
| 239 |
+
let lastError
|
| 240 |
+
const parsedAll = {}
|
| 241 |
+
for (const path of optionPaths) {
|
| 242 |
+
try {
|
| 243 |
+
// Specifying an encoding returns a string instead of a buffer
|
| 244 |
+
const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))
|
| 245 |
+
|
| 246 |
+
DotenvModule.populate(parsedAll, parsed, options)
|
| 247 |
+
} catch (e) {
|
| 248 |
+
if (debug) {
|
| 249 |
+
_debug(`Failed to load ${path} ${e.message}`)
|
| 250 |
+
}
|
| 251 |
+
lastError = e
|
| 252 |
+
}
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
let processEnv = process.env
|
| 256 |
+
if (options && options.processEnv != null) {
|
| 257 |
+
processEnv = options.processEnv
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
DotenvModule.populate(processEnv, parsedAll, options)
|
| 261 |
+
|
| 262 |
+
if (debug || !quiet) {
|
| 263 |
+
const keysCount = Object.keys(parsedAll).length
|
| 264 |
+
const shortPaths = []
|
| 265 |
+
for (const filePath of optionPaths) {
|
| 266 |
+
try {
|
| 267 |
+
const relative = path.relative(process.cwd(), filePath)
|
| 268 |
+
shortPaths.push(relative)
|
| 269 |
+
} catch (e) {
|
| 270 |
+
if (debug) {
|
| 271 |
+
_debug(`Failed to load ${filePath} ${e.message}`)
|
| 272 |
+
}
|
| 273 |
+
lastError = e
|
| 274 |
+
}
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
_log(`injecting env (${keysCount}) from ${shortPaths.join(',')}`)
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
if (lastError) {
|
| 281 |
+
return { parsed: parsedAll, error: lastError }
|
| 282 |
+
} else {
|
| 283 |
+
return { parsed: parsedAll }
|
| 284 |
+
}
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
// Populates process.env from .env file
|
| 288 |
+
function config (options) {
|
| 289 |
+
// fallback to original dotenv if DOTENV_KEY is not set
|
| 290 |
+
if (_dotenvKey(options).length === 0) {
|
| 291 |
+
return DotenvModule.configDotenv(options)
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
const vaultPath = _vaultPath(options)
|
| 295 |
+
|
| 296 |
+
// dotenvKey exists but .env.vault file does not exist
|
| 297 |
+
if (!vaultPath) {
|
| 298 |
+
_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)
|
| 299 |
+
|
| 300 |
+
return DotenvModule.configDotenv(options)
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
return DotenvModule._configVault(options)
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
function decrypt (encrypted, keyStr) {
|
| 307 |
+
const key = Buffer.from(keyStr.slice(-64), 'hex')
|
| 308 |
+
let ciphertext = Buffer.from(encrypted, 'base64')
|
| 309 |
+
|
| 310 |
+
const nonce = ciphertext.subarray(0, 12)
|
| 311 |
+
const authTag = ciphertext.subarray(-16)
|
| 312 |
+
ciphertext = ciphertext.subarray(12, -16)
|
| 313 |
+
|
| 314 |
+
try {
|
| 315 |
+
const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)
|
| 316 |
+
aesgcm.setAuthTag(authTag)
|
| 317 |
+
return `${aesgcm.update(ciphertext)}${aesgcm.final()}`
|
| 318 |
+
} catch (error) {
|
| 319 |
+
const isRange = error instanceof RangeError
|
| 320 |
+
const invalidKeyLength = error.message === 'Invalid key length'
|
| 321 |
+
const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'
|
| 322 |
+
|
| 323 |
+
if (isRange || invalidKeyLength) {
|
| 324 |
+
const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')
|
| 325 |
+
err.code = 'INVALID_DOTENV_KEY'
|
| 326 |
+
throw err
|
| 327 |
+
} else if (decryptionFailed) {
|
| 328 |
+
const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')
|
| 329 |
+
err.code = 'DECRYPTION_FAILED'
|
| 330 |
+
throw err
|
| 331 |
+
} else {
|
| 332 |
+
throw error
|
| 333 |
+
}
|
| 334 |
+
}
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
// Populate process.env with parsed values
|
| 338 |
+
function populate (processEnv, parsed, options = {}) {
|
| 339 |
+
const debug = Boolean(options && options.debug)
|
| 340 |
+
const override = Boolean(options && options.override)
|
| 341 |
+
|
| 342 |
+
if (typeof parsed !== 'object') {
|
| 343 |
+
const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')
|
| 344 |
+
err.code = 'OBJECT_REQUIRED'
|
| 345 |
+
throw err
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
// Set process.env
|
| 349 |
+
for (const key of Object.keys(parsed)) {
|
| 350 |
+
if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
|
| 351 |
+
if (override === true) {
|
| 352 |
+
processEnv[key] = parsed[key]
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
if (debug) {
|
| 356 |
+
if (override === true) {
|
| 357 |
+
_debug(`"${key}" is already defined and WAS overwritten`)
|
| 358 |
+
} else {
|
| 359 |
+
_debug(`"${key}" is already defined and was NOT overwritten`)
|
| 360 |
+
}
|
| 361 |
+
}
|
| 362 |
+
} else {
|
| 363 |
+
processEnv[key] = parsed[key]
|
| 364 |
+
}
|
| 365 |
+
}
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
const DotenvModule = {
|
| 369 |
+
configDotenv,
|
| 370 |
+
_configVault,
|
| 371 |
+
_parseVault,
|
| 372 |
+
config,
|
| 373 |
+
decrypt,
|
| 374 |
+
parse,
|
| 375 |
+
populate
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
module.exports.configDotenv = DotenvModule.configDotenv
|
| 379 |
+
module.exports._configVault = DotenvModule._configVault
|
| 380 |
+
module.exports._parseVault = DotenvModule._parseVault
|
| 381 |
+
module.exports.config = DotenvModule.config
|
| 382 |
+
module.exports.decrypt = DotenvModule.decrypt
|
| 383 |
+
module.exports.parse = DotenvModule.parse
|
| 384 |
+
module.exports.populate = DotenvModule.populate
|
| 385 |
+
|
| 386 |
+
module.exports = DotenvModule
|
novas/novacore-zephyr/claude-code-router/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types="node" />
|
| 2 |
+
|
| 3 |
+
declare module "ecdsa-sig-formatter" {
|
| 4 |
+
/**
|
| 5 |
+
* Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature. Returns a base64 url encoded String.
|
| 6 |
+
* If signature is a String, it should be base64 encoded
|
| 7 |
+
* alg must be one of ES256, ES384 or ES512
|
| 8 |
+
*/
|
| 9 |
+
export function derToJose(signature: Buffer | string, alg: string): string;
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* Convert the JOSE-style concatenated signature to an ASN.1/DER encoded signature. Returns a Buffer
|
| 13 |
+
* If signature is a String, it should be base64 url encoded
|
| 14 |
+
* alg must be one of ES256, ES384 or ES512
|
| 15 |
+
*/
|
| 16 |
+
export function joseToDer(signature: Buffer | string, alg: string): Buffer
|
| 17 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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INT = TAG_INT | (CLASS_UNIVERSAL << 6);
|
| 14 |
+
|
| 15 |
+
function base64Url(base64) {
|
| 16 |
+
return base64
|
| 17 |
+
.replace(/=/g, '')
|
| 18 |
+
.replace(/\+/g, '-')
|
| 19 |
+
.replace(/\//g, '_');
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
function signatureAsBuffer(signature) {
|
| 23 |
+
if (Buffer.isBuffer(signature)) {
|
| 24 |
+
return signature;
|
| 25 |
+
} else if ('string' === typeof signature) {
|
| 26 |
+
return Buffer.from(signature, 'base64');
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
throw new TypeError('ECDSA signature must be a Base64 string or a Buffer');
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
function derToJose(signature, alg) {
|
| 33 |
+
signature = signatureAsBuffer(signature);
|
| 34 |
+
var paramBytes = getParamBytesForAlg(alg);
|
| 35 |
+
|
| 36 |
+
// the DER encoded param should at most be the param size, plus a padding
|
| 37 |
+
// zero, since due to being a signed integer
|
| 38 |
+
var maxEncodedParamLength = paramBytes + 1;
|
| 39 |
+
|
| 40 |
+
var inputLength = signature.length;
|
| 41 |
+
|
| 42 |
+
var offset = 0;
|
| 43 |
+
if (signature[offset++] !== ENCODED_TAG_SEQ) {
|
| 44 |
+
throw new Error('Could not find expected "seq"');
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
var seqLength = signature[offset++];
|
| 48 |
+
if (seqLength === (MAX_OCTET | 1)) {
|
| 49 |
+
seqLength = signature[offset++];
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
if (inputLength - offset < seqLength) {
|
| 53 |
+
throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining');
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
if (signature[offset++] !== ENCODED_TAG_INT) {
|
| 57 |
+
throw new Error('Could not find expected "int" for "r"');
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
var rLength = signature[offset++];
|
| 61 |
+
|
| 62 |
+
if (inputLength - offset - 2 < rLength) {
|
| 63 |
+
throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available');
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
if (maxEncodedParamLength < rLength) {
|
| 67 |
+
throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
var rOffset = offset;
|
| 71 |
+
offset += rLength;
|
| 72 |
+
|
| 73 |
+
if (signature[offset++] !== ENCODED_TAG_INT) {
|
| 74 |
+
throw new Error('Could not find expected "int" for "s"');
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
var sLength = signature[offset++];
|
| 78 |
+
|
| 79 |
+
if (inputLength - offset !== sLength) {
|
| 80 |
+
throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"');
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
if (maxEncodedParamLength < sLength) {
|
| 84 |
+
throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable');
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
var sOffset = offset;
|
| 88 |
+
offset += sLength;
|
| 89 |
+
|
| 90 |
+
if (offset !== inputLength) {
|
| 91 |
+
throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain');
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
var rPadding = paramBytes - rLength,
|
| 95 |
+
sPadding = paramBytes - sLength;
|
| 96 |
+
|
| 97 |
+
var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength);
|
| 98 |
+
|
| 99 |
+
for (offset = 0; offset < rPadding; ++offset) {
|
| 100 |
+
dst[offset] = 0;
|
| 101 |
+
}
|
| 102 |
+
signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength);
|
| 103 |
+
|
| 104 |
+
offset = paramBytes;
|
| 105 |
+
|
| 106 |
+
for (var o = offset; offset < o + sPadding; ++offset) {
|
| 107 |
+
dst[offset] = 0;
|
| 108 |
+
}
|
| 109 |
+
signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength);
|
| 110 |
+
|
| 111 |
+
dst = dst.toString('base64');
|
| 112 |
+
dst = base64Url(dst);
|
| 113 |
+
|
| 114 |
+
return dst;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
function countPadding(buf, start, stop) {
|
| 118 |
+
var padding = 0;
|
| 119 |
+
while (start + padding < stop && buf[start + padding] === 0) {
|
| 120 |
+
++padding;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
var needsSign = buf[start + padding] >= MAX_OCTET;
|
| 124 |
+
if (needsSign) {
|
| 125 |
+
--padding;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
return padding;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
function joseToDer(signature, alg) {
|
| 132 |
+
signature = signatureAsBuffer(signature);
|
| 133 |
+
var paramBytes = getParamBytesForAlg(alg);
|
| 134 |
+
|
| 135 |
+
var signatureBytes = signature.length;
|
| 136 |
+
if (signatureBytes !== paramBytes * 2) {
|
| 137 |
+
throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"');
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
var rPadding = countPadding(signature, 0, paramBytes);
|
| 141 |
+
var sPadding = countPadding(signature, paramBytes, signature.length);
|
| 142 |
+
var rLength = paramBytes - rPadding;
|
| 143 |
+
var sLength = paramBytes - sPadding;
|
| 144 |
+
|
| 145 |
+
var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength;
|
| 146 |
+
|
| 147 |
+
var shortLength = rsBytes < MAX_OCTET;
|
| 148 |
+
|
| 149 |
+
var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes);
|
| 150 |
+
|
| 151 |
+
var offset = 0;
|
| 152 |
+
dst[offset++] = ENCODED_TAG_SEQ;
|
| 153 |
+
if (shortLength) {
|
| 154 |
+
// Bit 8 has value "0"
|
| 155 |
+
// bits 7-1 give the length.
|
| 156 |
+
dst[offset++] = rsBytes;
|
| 157 |
+
} else {
|
| 158 |
+
// Bit 8 of first octet has value "1"
|
| 159 |
+
// bits 7-1 give the number of additional length octets.
|
| 160 |
+
dst[offset++] = MAX_OCTET | 1;
|
| 161 |
+
// length, base 256
|
| 162 |
+
dst[offset++] = rsBytes & 0xff;
|
| 163 |
+
}
|
| 164 |
+
dst[offset++] = ENCODED_TAG_INT;
|
| 165 |
+
dst[offset++] = rLength;
|
| 166 |
+
if (rPadding < 0) {
|
| 167 |
+
dst[offset++] = 0;
|
| 168 |
+
offset += signature.copy(dst, offset, 0, paramBytes);
|
| 169 |
+
} else {
|
| 170 |
+
offset += signature.copy(dst, offset, rPadding, paramBytes);
|
| 171 |
+
}
|
| 172 |
+
dst[offset++] = ENCODED_TAG_INT;
|
| 173 |
+
dst[offset++] = sLength;
|
| 174 |
+
if (sPadding < 0) {
|
| 175 |
+
dst[offset++] = 0;
|
| 176 |
+
signature.copy(dst, offset, paramBytes);
|
| 177 |
+
} else {
|
| 178 |
+
signature.copy(dst, offset, paramBytes + sPadding);
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
return dst;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
module.exports = {
|
| 185 |
+
derToJose: derToJose,
|
| 186 |
+
joseToDer: joseToDer
|
| 187 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
function getParamSize(keySize) {
|
| 4 |
+
var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1);
|
| 5 |
+
return result;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
var paramBytesForAlg = {
|
| 9 |
+
ES256: getParamSize(256),
|
| 10 |
+
ES384: getParamSize(384),
|
| 11 |
+
ES512: getParamSize(521)
|
| 12 |
+
};
|
| 13 |
+
|
| 14 |
+
function getParamBytesForAlg(alg) {
|
| 15 |
+
var paramBytes = paramBytesForAlg[alg];
|
| 16 |
+
if (paramBytes) {
|
| 17 |
+
return paramBytes;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
throw new Error('Unknown algorithm "' + alg + '"');
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
module.exports = getParamBytesForAlg;
|
novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
declare module 'emoji-regex/es2015/RGI_Emoji' {
|
| 2 |
+
function emojiRegex(): RegExp;
|
| 3 |
+
|
| 4 |
+
export = emojiRegex;
|
| 5 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/RGI_Emoji.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
module.exports = () => {
|
| 4 |
+
// https://mths.be/emoji
|
| 5 |
+
return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373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}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}])\uFE0F|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467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1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]|\u{1F3F4}|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]/gu;
|
| 6 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
declare module 'emoji-regex/es2015' {
|
| 2 |
+
function emojiRegex(): RegExp;
|
| 3 |
+
|
| 4 |
+
export = emojiRegex;
|
| 5 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
module.exports = () => {
|
| 4 |
+
// https://mths.be/emoji
|
| 5 |
+
return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8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F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32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7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu;
|
| 6 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/text.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
declare module 'emoji-regex/es2015/text' {
|
| 2 |
+
function emojiRegex(): RegExp;
|
| 3 |
+
|
| 4 |
+
export = emojiRegex;
|
| 5 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/emoji-regex/es2015/text.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
|
| 3 |
+
module.exports = () => {
|
| 4 |
+
// https://mths.be/emoji
|
| 5 |
+
return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{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3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u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}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}])\uFE0F|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}\u200D\u{1F466}|\u{1F635}\u200D\u{1F4AB}|\u{1F62E}\u200D\u{1F4A8}|\u{1F415}\u200D\u{1F9BA}|\u{1F9D1}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F469}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1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}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]|\u{1F3F4}|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]\uFE0F?/gu;
|
| 6 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/exit/lib/exit.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* exit
|
| 3 |
+
* https://github.com/cowboy/node-exit
|
| 4 |
+
*
|
| 5 |
+
* Copyright (c) 2013 "Cowboy" Ben Alman
|
| 6 |
+
* Licensed under the MIT license.
|
| 7 |
+
*/
|
| 8 |
+
|
| 9 |
+
'use strict';
|
| 10 |
+
|
| 11 |
+
module.exports = function exit(exitCode, streams) {
|
| 12 |
+
if (!streams) { streams = [process.stdout, process.stderr]; }
|
| 13 |
+
var drainCount = 0;
|
| 14 |
+
// Actually exit if all streams are drained.
|
| 15 |
+
function tryToExit() {
|
| 16 |
+
if (drainCount === streams.length) {
|
| 17 |
+
process.exit(exitCode);
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
streams.forEach(function(stream) {
|
| 21 |
+
// Count drained streams now, but monitor non-drained streams.
|
| 22 |
+
if (stream.bufferSize === 0) {
|
| 23 |
+
drainCount++;
|
| 24 |
+
} else {
|
| 25 |
+
stream.write('', 'utf-8', function() {
|
| 26 |
+
drainCount++;
|
| 27 |
+
tryToExit();
|
| 28 |
+
});
|
| 29 |
+
}
|
| 30 |
+
// Prevent further writing.
|
| 31 |
+
stream.write = function() {};
|
| 32 |
+
});
|
| 33 |
+
// If all streams were already drained, exit now.
|
| 34 |
+
tryToExit();
|
| 35 |
+
// In Windows, when run as a Node.js child process, a script utilizing
|
| 36 |
+
// this library might just exit with a 0 exit code, regardless. This code,
|
| 37 |
+
// despite the fact that it looks a bit crazy, appears to fix that.
|
| 38 |
+
process.on('exit', function() {
|
| 39 |
+
process.exit(exitCode);
|
| 40 |
+
});
|
| 41 |
+
};
|
novas/novacore-zephyr/claude-code-router/node_modules/exit/test/exit_test.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
|
| 3 |
+
/*
|
| 4 |
+
======== A Handy Little Nodeunit Reference ========
|
| 5 |
+
https://github.com/caolan/nodeunit
|
| 6 |
+
|
| 7 |
+
Test methods:
|
| 8 |
+
test.expect(numAssertions)
|
| 9 |
+
test.done()
|
| 10 |
+
Test assertions:
|
| 11 |
+
test.ok(value, [message])
|
| 12 |
+
test.equal(actual, expected, [message])
|
| 13 |
+
test.notEqual(actual, expected, [message])
|
| 14 |
+
test.deepEqual(actual, expected, [message])
|
| 15 |
+
test.notDeepEqual(actual, expected, [message])
|
| 16 |
+
test.strictEqual(actual, expected, [message])
|
| 17 |
+
test.notStrictEqual(actual, expected, [message])
|
| 18 |
+
test.throws(block, [error], [message])
|
| 19 |
+
test.doesNotThrow(block, [error], [message])
|
| 20 |
+
test.ifError(value)
|
| 21 |
+
*/
|
| 22 |
+
|
| 23 |
+
var fs = require('fs');
|
| 24 |
+
var exec = require('child_process').exec;
|
| 25 |
+
|
| 26 |
+
var _which = require('which').sync;
|
| 27 |
+
function which(command) {
|
| 28 |
+
try {
|
| 29 |
+
_which(command);
|
| 30 |
+
return command;
|
| 31 |
+
} catch (err) {
|
| 32 |
+
return false;
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
// Look for grep first (any OS). If not found (but on Windows) look for find,
|
| 37 |
+
// which is Windows' horribly crippled grep alternative.
|
| 38 |
+
var grep = which('grep') || process.platform === 'win32' && which('find');
|
| 39 |
+
|
| 40 |
+
exports['exit'] = {
|
| 41 |
+
setUp: function(done) {
|
| 42 |
+
this.origCwd = process.cwd();
|
| 43 |
+
process.chdir('test/fixtures');
|
| 44 |
+
done();
|
| 45 |
+
},
|
| 46 |
+
tearDown: function(done) {
|
| 47 |
+
process.chdir(this.origCwd);
|
| 48 |
+
done();
|
| 49 |
+
},
|
| 50 |
+
'grep': function(test) {
|
| 51 |
+
test.expect(1);
|
| 52 |
+
// Many unit tests depend on this.
|
| 53 |
+
test.ok(grep, 'A suitable "grep" or "find" program was not found in the PATH.');
|
| 54 |
+
test.done();
|
| 55 |
+
},
|
| 56 |
+
// The rest of the tests are built dynamically, to keep things sane.
|
| 57 |
+
};
|
| 58 |
+
|
| 59 |
+
// A few helper functions.
|
| 60 |
+
function normalizeLineEndings(s) {
|
| 61 |
+
return s.replace(/\r?\n/g, '\n');
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
// Capture command output, normalizing captured stdout to unix file endings.
|
| 65 |
+
function run(command, callback) {
|
| 66 |
+
exec(command, function(error, stdout) {
|
| 67 |
+
callback(error ? error.code : 0, normalizeLineEndings(stdout));
|
| 68 |
+
});
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
// Read a fixture file, normalizing file contents to unix file endings.
|
| 72 |
+
function fixture(filename) {
|
| 73 |
+
return normalizeLineEndings(String(fs.readFileSync(filename)));
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
function buildTests() {
|
| 77 |
+
// Build individual unit tests for command output.
|
| 78 |
+
var counts = [10, 100, 1000];
|
| 79 |
+
var outputs = [' stdout stderr', ' stdout', ' stderr'];
|
| 80 |
+
var pipes = ['', ' | ' + grep + ' "std"'];
|
| 81 |
+
counts.forEach(function(count) {
|
| 82 |
+
outputs.forEach(function(output) {
|
| 83 |
+
pipes.forEach(function(pipe) {
|
| 84 |
+
var command = 'node log.js 0 ' + count + output + ' 2>&1' + pipe;
|
| 85 |
+
exports['exit']['output (' + command + ')'] = function(test) {
|
| 86 |
+
test.expect(2);
|
| 87 |
+
run(command, function(code, actual) {
|
| 88 |
+
var expected = fixture(count + output.replace(/ /g, '-') + '.txt');
|
| 89 |
+
// Sometimes, the actual file lines are out of order on Windows.
|
| 90 |
+
// But since the point of this lib is to drain the buffer and not
|
| 91 |
+
// guarantee output order, we only test the length.
|
| 92 |
+
test.equal(actual.length, expected.length, 'should be the same length.');
|
| 93 |
+
// The "fail" lines in log.js should NOT be output!
|
| 94 |
+
test.ok(actual.indexOf('fail') === -1, 'should not output after exit is called.');
|
| 95 |
+
test.done();
|
| 96 |
+
});
|
| 97 |
+
};
|
| 98 |
+
});
|
| 99 |
+
});
|
| 100 |
+
});
|
| 101 |
+
|
| 102 |
+
// Build individual unit tests for exit codes.
|
| 103 |
+
var codes = [0, 1, 123];
|
| 104 |
+
codes.forEach(function(code) {
|
| 105 |
+
var command = 'node log.js ' + code + ' 10 stdout stderr';
|
| 106 |
+
exports['exit']['exit code (' + command + ')'] = function(test) {
|
| 107 |
+
test.expect(1);
|
| 108 |
+
run(command, function(actual) {
|
| 109 |
+
// The specified exit code should be passed through.
|
| 110 |
+
test.equal(actual, code, 'should exit with ' + code + ' error code.');
|
| 111 |
+
test.done();
|
| 112 |
+
});
|
| 113 |
+
};
|
| 114 |
+
});
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
// Don't bother building tests if grep wasn't found, otherwise everything will
|
| 118 |
+
// fail and the error will get lost.
|
| 119 |
+
if (grep) {
|
| 120 |
+
buildTests();
|
| 121 |
+
}
|
novas/novacore-zephyr/claude-code-router/node_modules/exit/test/fixtures/10-stderr.txt
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
stderr 0
|
| 2 |
+
stderr 1
|
| 3 |
+
stderr 2
|
| 4 |
+
stderr 3
|
| 5 |
+
stderr 4
|
| 6 |
+
stderr 5
|
| 7 |
+
stderr 6
|
| 8 |
+
stderr 7
|
| 9 |
+
stderr 8
|
| 10 |
+
stderr 9
|