@typicalday/firegraph 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/editor/client/assets/index-CJ4m_EOL.css +1 -0
- package/dist/editor/client/assets/index-tyFcX6qG.js +411 -0
- package/dist/editor/client/index.html +2 -2
- package/dist/editor/server/index.mjs +353 -10
- package/dist/index.cjs +20 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/package.json +17 -2
- package/dist/editor/client/assets/index-B1nKCPMa.js +0 -411
- package/dist/editor/client/assets/index-CJJR5qe5.css +0 -1
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-tyFcX6qG.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CJ4m_EOL.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body class="bg-slate-950 text-slate-100 font-['Inter'] antialiased">
|
|
14
14
|
<div id="root"></div>
|
|
@@ -29316,6 +29316,323 @@ var require_ajv = __commonJS({
|
|
|
29316
29316
|
}
|
|
29317
29317
|
});
|
|
29318
29318
|
|
|
29319
|
+
// node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js
|
|
29320
|
+
var require_formats2 = __commonJS({
|
|
29321
|
+
"node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js"(exports) {
|
|
29322
|
+
"use strict";
|
|
29323
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29324
|
+
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
|
29325
|
+
function fmtDef(validate, compare) {
|
|
29326
|
+
return { validate, compare };
|
|
29327
|
+
}
|
|
29328
|
+
exports.fullFormats = {
|
|
29329
|
+
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
29330
|
+
date: fmtDef(date5, compareDate),
|
|
29331
|
+
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
29332
|
+
time: fmtDef(getTime(true), compareTime),
|
|
29333
|
+
"date-time": fmtDef(getDateTime(true), compareDateTime),
|
|
29334
|
+
"iso-time": fmtDef(getTime(), compareIsoTime),
|
|
29335
|
+
"iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
|
|
29336
|
+
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
|
|
29337
|
+
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
|
29338
|
+
uri,
|
|
29339
|
+
"uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
|
|
29340
|
+
// uri-template: https://tools.ietf.org/html/rfc6570
|
|
29341
|
+
"uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
|
|
29342
|
+
// For the source: https://gist.github.com/dperini/729294
|
|
29343
|
+
// For test cases: https://mathiasbynens.be/demo/url-regex
|
|
29344
|
+
url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
|
|
29345
|
+
email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
|
|
29346
|
+
hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
|
|
29347
|
+
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
|
|
29348
|
+
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
|
|
29349
|
+
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
|
29350
|
+
regex,
|
|
29351
|
+
// uuid: http://tools.ietf.org/html/rfc4122
|
|
29352
|
+
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
|
|
29353
|
+
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
|
29354
|
+
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
|
|
29355
|
+
"json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
|
|
29356
|
+
"json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
|
|
29357
|
+
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
|
|
29358
|
+
"relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
|
|
29359
|
+
// the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
|
|
29360
|
+
// byte: https://github.com/miguelmota/is-base64
|
|
29361
|
+
byte,
|
|
29362
|
+
// signed 32 bit integer
|
|
29363
|
+
int32: { type: "number", validate: validateInt32 },
|
|
29364
|
+
// signed 64 bit integer
|
|
29365
|
+
int64: { type: "number", validate: validateInt64 },
|
|
29366
|
+
// C-type float
|
|
29367
|
+
float: { type: "number", validate: validateNumber },
|
|
29368
|
+
// C-type double
|
|
29369
|
+
double: { type: "number", validate: validateNumber },
|
|
29370
|
+
// hint to the UI to hide input strings
|
|
29371
|
+
password: true,
|
|
29372
|
+
// unchecked string payload
|
|
29373
|
+
binary: true
|
|
29374
|
+
};
|
|
29375
|
+
exports.fastFormats = {
|
|
29376
|
+
...exports.fullFormats,
|
|
29377
|
+
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
29378
|
+
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
29379
|
+
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
|
29380
|
+
"iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
|
|
29381
|
+
"iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
|
|
29382
|
+
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
|
29383
|
+
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
|
29384
|
+
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
|
29385
|
+
// email (sources from jsen validator):
|
|
29386
|
+
// http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
|
|
29387
|
+
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
29388
|
+
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
|
|
29389
|
+
};
|
|
29390
|
+
exports.formatNames = Object.keys(exports.fullFormats);
|
|
29391
|
+
function isLeapYear(year) {
|
|
29392
|
+
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
29393
|
+
}
|
|
29394
|
+
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
29395
|
+
var DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
29396
|
+
function date5(str) {
|
|
29397
|
+
const matches = DATE.exec(str);
|
|
29398
|
+
if (!matches)
|
|
29399
|
+
return false;
|
|
29400
|
+
const year = +matches[1];
|
|
29401
|
+
const month = +matches[2];
|
|
29402
|
+
const day = +matches[3];
|
|
29403
|
+
return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
|
|
29404
|
+
}
|
|
29405
|
+
function compareDate(d1, d2) {
|
|
29406
|
+
if (!(d1 && d2))
|
|
29407
|
+
return void 0;
|
|
29408
|
+
if (d1 > d2)
|
|
29409
|
+
return 1;
|
|
29410
|
+
if (d1 < d2)
|
|
29411
|
+
return -1;
|
|
29412
|
+
return 0;
|
|
29413
|
+
}
|
|
29414
|
+
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
29415
|
+
function getTime(strictTimeZone) {
|
|
29416
|
+
return function time3(str) {
|
|
29417
|
+
const matches = TIME.exec(str);
|
|
29418
|
+
if (!matches)
|
|
29419
|
+
return false;
|
|
29420
|
+
const hr = +matches[1];
|
|
29421
|
+
const min = +matches[2];
|
|
29422
|
+
const sec = +matches[3];
|
|
29423
|
+
const tz = matches[4];
|
|
29424
|
+
const tzSign = matches[5] === "-" ? -1 : 1;
|
|
29425
|
+
const tzH = +(matches[6] || 0);
|
|
29426
|
+
const tzM = +(matches[7] || 0);
|
|
29427
|
+
if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
|
|
29428
|
+
return false;
|
|
29429
|
+
if (hr <= 23 && min <= 59 && sec < 60)
|
|
29430
|
+
return true;
|
|
29431
|
+
const utcMin = min - tzM * tzSign;
|
|
29432
|
+
const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
|
|
29433
|
+
return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
|
|
29434
|
+
};
|
|
29435
|
+
}
|
|
29436
|
+
function compareTime(s1, s2) {
|
|
29437
|
+
if (!(s1 && s2))
|
|
29438
|
+
return void 0;
|
|
29439
|
+
const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf();
|
|
29440
|
+
const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf();
|
|
29441
|
+
if (!(t1 && t2))
|
|
29442
|
+
return void 0;
|
|
29443
|
+
return t1 - t2;
|
|
29444
|
+
}
|
|
29445
|
+
function compareIsoTime(t1, t2) {
|
|
29446
|
+
if (!(t1 && t2))
|
|
29447
|
+
return void 0;
|
|
29448
|
+
const a1 = TIME.exec(t1);
|
|
29449
|
+
const a2 = TIME.exec(t2);
|
|
29450
|
+
if (!(a1 && a2))
|
|
29451
|
+
return void 0;
|
|
29452
|
+
t1 = a1[1] + a1[2] + a1[3];
|
|
29453
|
+
t2 = a2[1] + a2[2] + a2[3];
|
|
29454
|
+
if (t1 > t2)
|
|
29455
|
+
return 1;
|
|
29456
|
+
if (t1 < t2)
|
|
29457
|
+
return -1;
|
|
29458
|
+
return 0;
|
|
29459
|
+
}
|
|
29460
|
+
var DATE_TIME_SEPARATOR = /t|\s/i;
|
|
29461
|
+
function getDateTime(strictTimeZone) {
|
|
29462
|
+
const time3 = getTime(strictTimeZone);
|
|
29463
|
+
return function date_time(str) {
|
|
29464
|
+
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
29465
|
+
return dateTime.length === 2 && date5(dateTime[0]) && time3(dateTime[1]);
|
|
29466
|
+
};
|
|
29467
|
+
}
|
|
29468
|
+
function compareDateTime(dt1, dt2) {
|
|
29469
|
+
if (!(dt1 && dt2))
|
|
29470
|
+
return void 0;
|
|
29471
|
+
const d1 = new Date(dt1).valueOf();
|
|
29472
|
+
const d2 = new Date(dt2).valueOf();
|
|
29473
|
+
if (!(d1 && d2))
|
|
29474
|
+
return void 0;
|
|
29475
|
+
return d1 - d2;
|
|
29476
|
+
}
|
|
29477
|
+
function compareIsoDateTime(dt1, dt2) {
|
|
29478
|
+
if (!(dt1 && dt2))
|
|
29479
|
+
return void 0;
|
|
29480
|
+
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
|
|
29481
|
+
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
|
|
29482
|
+
const res = compareDate(d1, d2);
|
|
29483
|
+
if (res === void 0)
|
|
29484
|
+
return void 0;
|
|
29485
|
+
return res || compareTime(t1, t2);
|
|
29486
|
+
}
|
|
29487
|
+
var NOT_URI_FRAGMENT = /\/|:/;
|
|
29488
|
+
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
29489
|
+
function uri(str) {
|
|
29490
|
+
return NOT_URI_FRAGMENT.test(str) && URI.test(str);
|
|
29491
|
+
}
|
|
29492
|
+
var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
29493
|
+
function byte(str) {
|
|
29494
|
+
BYTE.lastIndex = 0;
|
|
29495
|
+
return BYTE.test(str);
|
|
29496
|
+
}
|
|
29497
|
+
var MIN_INT32 = -(2 ** 31);
|
|
29498
|
+
var MAX_INT32 = 2 ** 31 - 1;
|
|
29499
|
+
function validateInt32(value) {
|
|
29500
|
+
return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
|
|
29501
|
+
}
|
|
29502
|
+
function validateInt64(value) {
|
|
29503
|
+
return Number.isInteger(value);
|
|
29504
|
+
}
|
|
29505
|
+
function validateNumber() {
|
|
29506
|
+
return true;
|
|
29507
|
+
}
|
|
29508
|
+
var Z_ANCHOR = /[^\\]\\Z/;
|
|
29509
|
+
function regex(str) {
|
|
29510
|
+
if (Z_ANCHOR.test(str))
|
|
29511
|
+
return false;
|
|
29512
|
+
try {
|
|
29513
|
+
new RegExp(str);
|
|
29514
|
+
return true;
|
|
29515
|
+
} catch (e) {
|
|
29516
|
+
return false;
|
|
29517
|
+
}
|
|
29518
|
+
}
|
|
29519
|
+
}
|
|
29520
|
+
});
|
|
29521
|
+
|
|
29522
|
+
// node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js
|
|
29523
|
+
var require_limit = __commonJS({
|
|
29524
|
+
"node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js"(exports) {
|
|
29525
|
+
"use strict";
|
|
29526
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29527
|
+
exports.formatLimitDefinition = void 0;
|
|
29528
|
+
var ajv_1 = require_ajv();
|
|
29529
|
+
var codegen_1 = require_codegen();
|
|
29530
|
+
var ops = codegen_1.operators;
|
|
29531
|
+
var KWDs = {
|
|
29532
|
+
formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
|
|
29533
|
+
formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
|
|
29534
|
+
formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
|
|
29535
|
+
formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
|
|
29536
|
+
};
|
|
29537
|
+
var error48 = {
|
|
29538
|
+
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
29539
|
+
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
29540
|
+
};
|
|
29541
|
+
exports.formatLimitDefinition = {
|
|
29542
|
+
keyword: Object.keys(KWDs),
|
|
29543
|
+
type: "string",
|
|
29544
|
+
schemaType: "string",
|
|
29545
|
+
$data: true,
|
|
29546
|
+
error: error48,
|
|
29547
|
+
code(cxt) {
|
|
29548
|
+
const { gen, data, schemaCode, keyword, it } = cxt;
|
|
29549
|
+
const { opts, self } = it;
|
|
29550
|
+
if (!opts.validateFormats)
|
|
29551
|
+
return;
|
|
29552
|
+
const fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, "format");
|
|
29553
|
+
if (fCxt.$data)
|
|
29554
|
+
validate$DataFormat();
|
|
29555
|
+
else
|
|
29556
|
+
validateFormat();
|
|
29557
|
+
function validate$DataFormat() {
|
|
29558
|
+
const fmts = gen.scopeValue("formats", {
|
|
29559
|
+
ref: self.formats,
|
|
29560
|
+
code: opts.code.formats
|
|
29561
|
+
});
|
|
29562
|
+
const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`);
|
|
29563
|
+
cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt)));
|
|
29564
|
+
}
|
|
29565
|
+
function validateFormat() {
|
|
29566
|
+
const format = fCxt.schema;
|
|
29567
|
+
const fmtDef = self.formats[format];
|
|
29568
|
+
if (!fmtDef || fmtDef === true)
|
|
29569
|
+
return;
|
|
29570
|
+
if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") {
|
|
29571
|
+
throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
|
|
29572
|
+
}
|
|
29573
|
+
const fmt = gen.scopeValue("formats", {
|
|
29574
|
+
key: format,
|
|
29575
|
+
ref: fmtDef,
|
|
29576
|
+
code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0
|
|
29577
|
+
});
|
|
29578
|
+
cxt.fail$data(compareCode(fmt));
|
|
29579
|
+
}
|
|
29580
|
+
function compareCode(fmt) {
|
|
29581
|
+
return (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;
|
|
29582
|
+
}
|
|
29583
|
+
},
|
|
29584
|
+
dependencies: ["format"]
|
|
29585
|
+
};
|
|
29586
|
+
var formatLimitPlugin = (ajv2) => {
|
|
29587
|
+
ajv2.addKeyword(exports.formatLimitDefinition);
|
|
29588
|
+
return ajv2;
|
|
29589
|
+
};
|
|
29590
|
+
exports.default = formatLimitPlugin;
|
|
29591
|
+
}
|
|
29592
|
+
});
|
|
29593
|
+
|
|
29594
|
+
// node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js
|
|
29595
|
+
var require_dist = __commonJS({
|
|
29596
|
+
"node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js"(exports, module) {
|
|
29597
|
+
"use strict";
|
|
29598
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29599
|
+
var formats_1 = require_formats2();
|
|
29600
|
+
var limit_1 = require_limit();
|
|
29601
|
+
var codegen_1 = require_codegen();
|
|
29602
|
+
var fullName = new codegen_1.Name("fullFormats");
|
|
29603
|
+
var fastName = new codegen_1.Name("fastFormats");
|
|
29604
|
+
var formatsPlugin = (ajv2, opts = { keywords: true }) => {
|
|
29605
|
+
if (Array.isArray(opts)) {
|
|
29606
|
+
addFormats2(ajv2, opts, formats_1.fullFormats, fullName);
|
|
29607
|
+
return ajv2;
|
|
29608
|
+
}
|
|
29609
|
+
const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
|
|
29610
|
+
const list = opts.formats || formats_1.formatNames;
|
|
29611
|
+
addFormats2(ajv2, list, formats, exportName);
|
|
29612
|
+
if (opts.keywords)
|
|
29613
|
+
(0, limit_1.default)(ajv2);
|
|
29614
|
+
return ajv2;
|
|
29615
|
+
};
|
|
29616
|
+
formatsPlugin.get = (name, mode = "full") => {
|
|
29617
|
+
const formats = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
|
|
29618
|
+
const f = formats[name];
|
|
29619
|
+
if (!f)
|
|
29620
|
+
throw new Error(`Unknown format "${name}"`);
|
|
29621
|
+
return f;
|
|
29622
|
+
};
|
|
29623
|
+
function addFormats2(ajv2, list, fs3, exportName) {
|
|
29624
|
+
var _a2;
|
|
29625
|
+
var _b;
|
|
29626
|
+
(_a2 = (_b = ajv2.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
29627
|
+
for (const f of list)
|
|
29628
|
+
ajv2.addFormat(f, fs3[f]);
|
|
29629
|
+
}
|
|
29630
|
+
module.exports = exports = formatsPlugin;
|
|
29631
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29632
|
+
exports.default = formatsPlugin;
|
|
29633
|
+
}
|
|
29634
|
+
});
|
|
29635
|
+
|
|
29319
29636
|
// editor/server/index.ts
|
|
29320
29637
|
var import_express = __toESM(require_express2(), 1);
|
|
29321
29638
|
var import_cors = __toESM(require_lib3(), 1);
|
|
@@ -30005,10 +30322,13 @@ var GraphTransactionImpl = class {
|
|
|
30005
30322
|
}
|
|
30006
30323
|
async updateNode(uid, data) {
|
|
30007
30324
|
const docId = computeNodeDocId(uid);
|
|
30008
|
-
|
|
30009
|
-
...data,
|
|
30325
|
+
const update = {
|
|
30010
30326
|
updatedAt: FieldValue3.serverTimestamp()
|
|
30011
|
-
}
|
|
30327
|
+
};
|
|
30328
|
+
for (const [k, v] of Object.entries(data)) {
|
|
30329
|
+
update[`data.${k}`] = v;
|
|
30330
|
+
}
|
|
30331
|
+
this.adapter.updateDoc(docId, update);
|
|
30012
30332
|
}
|
|
30013
30333
|
async removeNode(uid) {
|
|
30014
30334
|
const docId = computeNodeDocId(uid);
|
|
@@ -30058,10 +30378,13 @@ var GraphBatchImpl = class {
|
|
|
30058
30378
|
}
|
|
30059
30379
|
async updateNode(uid, data) {
|
|
30060
30380
|
const docId = computeNodeDocId(uid);
|
|
30061
|
-
|
|
30062
|
-
...data,
|
|
30381
|
+
const update = {
|
|
30063
30382
|
updatedAt: FieldValue4.serverTimestamp()
|
|
30064
|
-
}
|
|
30383
|
+
};
|
|
30384
|
+
for (const [k, v] of Object.entries(data)) {
|
|
30385
|
+
update[`data.${k}`] = v;
|
|
30386
|
+
}
|
|
30387
|
+
this.adapter.updateDoc(docId, update);
|
|
30065
30388
|
}
|
|
30066
30389
|
async removeNode(uid) {
|
|
30067
30390
|
const docId = computeNodeDocId(uid);
|
|
@@ -30223,7 +30546,9 @@ import { createHash as createHash3 } from "node:crypto";
|
|
|
30223
30546
|
|
|
30224
30547
|
// src/json-schema.ts
|
|
30225
30548
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
30549
|
+
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
30226
30550
|
var ajv = new import_ajv.default({ allErrors: true, strict: false });
|
|
30551
|
+
(0, import_ajv_formats.default)(ajv);
|
|
30227
30552
|
function compileSchema(schema, label) {
|
|
30228
30553
|
const validate = ajv.compile(schema);
|
|
30229
30554
|
return (data) => {
|
|
@@ -31174,10 +31499,13 @@ var GraphClientImpl = class _GraphClientImpl {
|
|
|
31174
31499
|
}
|
|
31175
31500
|
async updateNode(uid, data) {
|
|
31176
31501
|
const docId = computeNodeDocId(uid);
|
|
31177
|
-
|
|
31178
|
-
...data,
|
|
31502
|
+
const update = {
|
|
31179
31503
|
updatedAt: FieldValue5.serverTimestamp()
|
|
31180
|
-
}
|
|
31504
|
+
};
|
|
31505
|
+
for (const [k, v] of Object.entries(data)) {
|
|
31506
|
+
update[`data.${k}`] = v;
|
|
31507
|
+
}
|
|
31508
|
+
await this.adapter.updateDoc(docId, update);
|
|
31181
31509
|
}
|
|
31182
31510
|
async removeNode(uid) {
|
|
31183
31511
|
const docId = computeNodeDocId(uid);
|
|
@@ -49598,15 +49926,30 @@ var appRouter = t.router({
|
|
|
49598
49926
|
collectionName: external_exports.string(),
|
|
49599
49927
|
params: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
49600
49928
|
cursor: external_exports.string().optional(),
|
|
49601
|
-
limit: external_exports.number().int().min(1).max(100).default(50)
|
|
49929
|
+
limit: external_exports.number().int().min(1).max(100).default(50),
|
|
49930
|
+
where: external_exports.array(external_exports.object({
|
|
49931
|
+
field: external_exports.string(),
|
|
49932
|
+
op: external_exports.string(),
|
|
49933
|
+
value: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])
|
|
49934
|
+
})).optional()
|
|
49602
49935
|
})).query(async ({ ctx, input }) => {
|
|
49603
49936
|
const def = getCollectionDef(ctx, input.collectionName);
|
|
49604
49937
|
const colPath = substitutePathTemplate(def.path, input.params ?? {});
|
|
49605
49938
|
const col = ctx.db.collection(colPath);
|
|
49939
|
+
const allowedOps = ["==", "!=", "<", "<=", ">", ">="];
|
|
49940
|
+
const schemaFieldNames = def.fields.length > 0 ? new Set(def.fields.map((f) => f.name)) : null;
|
|
49941
|
+
const safeFieldNameRe = /^[a-zA-Z_][a-zA-Z0-9_.]*$/;
|
|
49606
49942
|
let query = col;
|
|
49607
49943
|
if (def.typeField && def.typeValue !== void 0) {
|
|
49608
49944
|
query = query.where(def.typeField, "==", def.typeValue);
|
|
49609
49945
|
}
|
|
49946
|
+
if (input.where?.length) {
|
|
49947
|
+
for (const clause of input.where) {
|
|
49948
|
+
if (!allowedOps.includes(clause.op)) continue;
|
|
49949
|
+
if (schemaFieldNames ? !schemaFieldNames.has(clause.field) : !safeFieldNameRe.test(clause.field)) continue;
|
|
49950
|
+
query = query.where(clause.field, clause.op, clause.value);
|
|
49951
|
+
}
|
|
49952
|
+
}
|
|
49610
49953
|
if (def.defaultOrderBy) {
|
|
49611
49954
|
query = query.orderBy(def.defaultOrderBy.field, def.defaultOrderBy.direction);
|
|
49612
49955
|
} else {
|
package/dist/index.cjs
CHANGED
|
@@ -793,10 +793,13 @@ var GraphTransactionImpl = class {
|
|
|
793
793
|
}
|
|
794
794
|
async updateNode(uid, data) {
|
|
795
795
|
const docId = computeNodeDocId(uid);
|
|
796
|
-
|
|
797
|
-
...data,
|
|
796
|
+
const update = {
|
|
798
797
|
updatedAt: import_firestore3.FieldValue.serverTimestamp()
|
|
799
|
-
}
|
|
798
|
+
};
|
|
799
|
+
for (const [k, v] of Object.entries(data)) {
|
|
800
|
+
update[`data.${k}`] = v;
|
|
801
|
+
}
|
|
802
|
+
this.adapter.updateDoc(docId, update);
|
|
800
803
|
}
|
|
801
804
|
async removeNode(uid) {
|
|
802
805
|
const docId = computeNodeDocId(uid);
|
|
@@ -846,10 +849,13 @@ var GraphBatchImpl = class {
|
|
|
846
849
|
}
|
|
847
850
|
async updateNode(uid, data) {
|
|
848
851
|
const docId = computeNodeDocId(uid);
|
|
849
|
-
|
|
850
|
-
...data,
|
|
852
|
+
const update = {
|
|
851
853
|
updatedAt: import_firestore4.FieldValue.serverTimestamp()
|
|
852
|
-
}
|
|
854
|
+
};
|
|
855
|
+
for (const [k, v] of Object.entries(data)) {
|
|
856
|
+
update[`data.${k}`] = v;
|
|
857
|
+
}
|
|
858
|
+
this.adapter.updateDoc(docId, update);
|
|
853
859
|
}
|
|
854
860
|
async removeNode(uid) {
|
|
855
861
|
const docId = computeNodeDocId(uid);
|
|
@@ -1011,7 +1017,9 @@ var import_node_crypto3 = require("crypto");
|
|
|
1011
1017
|
|
|
1012
1018
|
// src/json-schema.ts
|
|
1013
1019
|
var import_ajv = __toESM(require("ajv"), 1);
|
|
1020
|
+
var import_ajv_formats = __toESM(require("ajv-formats"), 1);
|
|
1014
1021
|
var ajv = new import_ajv.default({ allErrors: true, strict: false });
|
|
1022
|
+
(0, import_ajv_formats.default)(ajv);
|
|
1015
1023
|
function compileSchema(schema, label) {
|
|
1016
1024
|
const validate = ajv.compile(schema);
|
|
1017
1025
|
return (data) => {
|
|
@@ -1973,10 +1981,13 @@ var GraphClientImpl = class _GraphClientImpl {
|
|
|
1973
1981
|
}
|
|
1974
1982
|
async updateNode(uid, data) {
|
|
1975
1983
|
const docId = computeNodeDocId(uid);
|
|
1976
|
-
|
|
1977
|
-
...data,
|
|
1984
|
+
const update = {
|
|
1978
1985
|
updatedAt: import_firestore5.FieldValue.serverTimestamp()
|
|
1979
|
-
}
|
|
1986
|
+
};
|
|
1987
|
+
for (const [k, v] of Object.entries(data)) {
|
|
1988
|
+
update[`data.${k}`] = v;
|
|
1989
|
+
}
|
|
1990
|
+
await this.adapter.updateDoc(docId, update);
|
|
1980
1991
|
}
|
|
1981
1992
|
async removeNode(uid) {
|
|
1982
1993
|
const docId = computeNodeDocId(uid);
|