fix(products): fix breadcrumbs and product filtering (backport from main)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
import { feedbackAsyncIntegration } from '../feedbackAsync';
export { getFeedback } from '@sentry-internal/feedback';
export { feedbackAsyncIntegration, feedbackAsyncIntegration as feedbackIntegration };
export { captureFeedback } from '@sentry/core';
//# sourceMappingURL=index.feedback.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tree-palm.js","sources":["../../../src/icons/tree-palm.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TreePalm\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgOGMwLTIuNzYtMi40Ni01LTUuNS01UzIgNS4yNCAyIDhoMmwxLTEgMSAxaDQiIC8+CiAgPHBhdGggZD0iTTEzIDcuMTRBNS44MiA1LjgyIDAgMCAxIDE2LjUgNmMzLjA0IDAgNS41IDIuMjQgNS41IDVoLTNsLTEtMS0xIDFoLTMiIC8+CiAgPHBhdGggZD0iTTUuODkgOS43MWMtMi4xNSAyLjE1LTIuMyA1LjQ3LS4zNSA3LjQzbDQuMjQtNC4yNS43LS43LjcxLS43MSAyLjEyLTIuMTJjLTEuOTUtMS45Ni01LjI3LTEuOC03LjQyLjM1IiAvPgogIDxwYXRoIGQ9Ik0xMSAxNS41Yy41IDIuNS0uMTcgNC41LTEgNi41aDRjMi01LjUtLjUtMTItMS0xNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/tree-palm\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst TreePalm = createLucideIcon('TreePalm', [\n ['path', { d: 'M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4', key: 'foxbe7' }],\n [\n 'path',\n { d: 'M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3', key: '18arnh' },\n ],\n [\n 'path',\n {\n d: 'M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35',\n key: 'ywahnh',\n },\n ],\n ['path', { d: 'M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14', key: 'ft0feo' }],\n]);\n\nexport default TreePalm;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjF,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC7F,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,3 @@
export default class KeyGenerator {
static generate(message: string): string;
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/queues/operations/handleSchedules/defaultAfterSchedule.ts"],"sourcesContent":["import type { AfterScheduleFn } from '../../config/types/index.js'\n\nimport { type JobStats, jobStatsGlobalSlug } from '../../config/global.js'\nimport { getCurrentDate } from '../../utilities/getCurrentDate.js'\n\ntype JobStatsScheduledRuns = NonNullable<\n NonNullable<NonNullable<JobStats['stats']>['scheduledRuns']>['queues']\n>[string]\n\nexport const defaultAfterSchedule: AfterScheduleFn = async ({ jobStats, queueable, req }) => {\n const existingQueuesConfig =\n jobStats?.stats?.scheduledRuns?.queues?.[queueable.scheduleConfig.queue] || {}\n\n const queueConfig: JobStatsScheduledRuns = {\n ...existingQueuesConfig,\n }\n if (queueable.taskConfig) {\n ;(queueConfig.tasks ??= {})[queueable.taskConfig.slug] = {\n lastScheduledRun: getCurrentDate().toISOString(),\n }\n } else if (queueable.workflowConfig) {\n ;(queueConfig.workflows ??= {})[queueable.workflowConfig.slug] = {\n lastScheduledRun: getCurrentDate().toISOString(),\n }\n }\n\n // Add to payload-jobs-stats global regardless of the status\n if (jobStats) {\n await req.payload.db.updateGlobal({\n slug: jobStatsGlobalSlug,\n data: {\n ...(jobStats || {}),\n stats: {\n ...(jobStats?.stats || {}),\n scheduledRuns: {\n ...(jobStats?.stats?.scheduledRuns || {}),\n queues: {\n ...(jobStats?.stats?.scheduledRuns?.queues || {}),\n [queueable.scheduleConfig.queue]: queueConfig,\n },\n },\n },\n updatedAt: new Date().toISOString(),\n } as JobStats,\n req,\n returning: false,\n })\n } else {\n await req.payload.db.createGlobal({\n slug: jobStatsGlobalSlug,\n data: {\n createdAt: getCurrentDate().toISOString(),\n stats: {\n scheduledRuns: {\n queues: {\n [queueable.scheduleConfig.queue]: queueConfig,\n },\n },\n },\n } as JobStats,\n req,\n returning: false,\n })\n }\n}\n"],"names":["jobStatsGlobalSlug","getCurrentDate","defaultAfterSchedule","jobStats","queueable","req","existingQueuesConfig","stats","scheduledRuns","queues","scheduleConfig","queue","queueConfig","taskConfig","tasks","slug","lastScheduledRun","toISOString","workflowConfig","workflows","payload","db","updateGlobal","data","updatedAt","Date","returning","createGlobal","createdAt"],"mappings":"AAEA,SAAwBA,kBAAkB,QAAQ,yBAAwB;AAC1E,SAASC,cAAc,QAAQ,oCAAmC;AAMlE,OAAO,MAAMC,uBAAwC,OAAO,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,GAAG,EAAE;IACtF,MAAMC,uBACJH,UAAUI,OAAOC,eAAeC,QAAQ,CAACL,UAAUM,cAAc,CAACC,KAAK,CAAC,IAAI,CAAC;IAE/E,MAAMC,cAAqC;QACzC,GAAGN,oBAAoB;IACzB;IACA,IAAIF,UAAUS,UAAU,EAAE;;QACtBD,CAAAA,YAAYE,KAAK,KAAK,CAAC,CAAA,CAAE,CAACV,UAAUS,UAAU,CAACE,IAAI,CAAC,GAAG;YACvDC,kBAAkBf,iBAAiBgB,WAAW;QAChD;IACF,OAAO,IAAIb,UAAUc,cAAc,EAAE;;QACjCN,CAAAA,YAAYO,SAAS,KAAK,CAAC,CAAA,CAAE,CAACf,UAAUc,cAAc,CAACH,IAAI,CAAC,GAAG;YAC/DC,kBAAkBf,iBAAiBgB,WAAW;QAChD;IACF;IAEA,4DAA4D;IAC5D,IAAId,UAAU;QACZ,MAAME,IAAIe,OAAO,CAACC,EAAE,CAACC,YAAY,CAAC;YAChCP,MAAMf;YACNuB,MAAM;gBACJ,GAAIpB,YAAY,CAAC,CAAC;gBAClBI,OAAO;oBACL,GAAIJ,UAAUI,SAAS,CAAC,CAAC;oBACzBC,eAAe;wBACb,GAAIL,UAAUI,OAAOC,iBAAiB,CAAC,CAAC;wBACxCC,QAAQ;4BACN,GAAIN,UAAUI,OAAOC,eAAeC,UAAU,CAAC,CAAC;4BAChD,CAACL,UAAUM,cAAc,CAACC,KAAK,CAAC,EAAEC;wBACpC;oBACF;gBACF;gBACAY,WAAW,IAAIC,OAAOR,WAAW;YACnC;YACAZ;YACAqB,WAAW;QACb;IACF,OAAO;QACL,MAAMrB,IAAIe,OAAO,CAACC,EAAE,CAACM,YAAY,CAAC;YAChCZ,MAAMf;YACNuB,MAAM;gBACJK,WAAW3B,iBAAiBgB,WAAW;gBACvCV,OAAO;oBACLC,eAAe;wBACbC,QAAQ;4BACN,CAACL,UAAUM,cAAc,CAACC,KAAK,CAAC,EAAEC;wBACpC;oBACF;gBACF;YACF;YACAP;YACAqB,WAAW;QACb;IACF;AACF,EAAC"}

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BookUser = createLucideIcon("BookUser", [
["path", { d: "M15 13a3 3 0 1 0-6 0", key: "10j68g" }],
[
"path",
{
d: "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",
key: "k3hazp"
}
],
["circle", { cx: "12", cy: "8", r: "2", key: "1822b1" }]
]);
export { BookUser as default };
//# sourceMappingURL=book-user.js.map

View File

@@ -0,0 +1,28 @@
const featureProps = {
animation: [
"animate",
"variants",
"whileHover",
"whileTap",
"exit",
"whileInView",
"whileFocus",
"whileDrag",
],
exit: ["exit"],
drag: ["drag", "dragControls"],
focus: ["whileFocus"],
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
layout: ["layout", "layoutId"],
};
const featureDefinitions = {};
for (const key in featureProps) {
featureDefinitions[key] = {
isEnabled: (props) => featureProps[key].some((name) => !!props[name]),
};
}
export { featureDefinitions };

View File

@@ -0,0 +1,48 @@
import { parseCookies } from '../utilities/parseCookies.js';
const extractionMethods = {
Bearer: ({ headers })=>{
const jwtFromHeader = headers.get('Authorization');
// allow RFC6750 OAuth 2.0 compliant Bearer tokens
// in addition to the payload default JWT format
if (jwtFromHeader?.startsWith('Bearer ')) {
return jwtFromHeader.replace('Bearer ', '');
}
return null;
},
cookie: ({ headers, payload })=>{
const origin = headers.get('Origin');
const cookies = parseCookies(headers);
const tokenCookieName = `${payload.config.cookiePrefix}-token`;
const cookieToken = cookies.get(tokenCookieName);
if (!cookieToken) {
return null;
}
if (!origin || payload.config.csrf.length === 0 || payload.config.csrf.indexOf(origin) > -1) {
return cookieToken;
}
return null;
},
JWT: ({ headers })=>{
const jwtFromHeader = headers.get('Authorization');
if (jwtFromHeader?.startsWith('JWT ')) {
return jwtFromHeader.replace('JWT ', '');
}
return null;
}
};
export const extractJWT = (args)=>{
const { headers, payload } = args;
const extractionOrder = payload.config.auth.jwtOrder;
for (const extractionStrategy of extractionOrder){
const result = extractionMethods[extractionStrategy]({
headers,
payload
});
if (result) {
return result;
}
}
return null;
};
//# sourceMappingURL=extractJWT.js.map

View File

@@ -0,0 +1,85 @@
"use strict";
var _assert = _interopRequireDefault(require("assert"));
var _v = _interopRequireDefault(require("./v1.js"));
var _v2 = _interopRequireDefault(require("./v3.js"));
var _v3 = _interopRequireDefault(require("./v4.js"));
var _v4 = _interopRequireDefault(require("./v5.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function usage() {
console.log('Usage:');
console.log(' uuid');
console.log(' uuid v1');
console.log(' uuid v3 <name> <namespace uuid>');
console.log(' uuid v4');
console.log(' uuid v5 <name> <namespace uuid>');
console.log(' uuid --help');
console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122');
}
const args = process.argv.slice(2);
if (args.indexOf('--help') >= 0) {
usage();
process.exit(0);
}
const version = args.shift() || 'v4';
switch (version) {
case 'v1':
console.log((0, _v.default)());
break;
case 'v3':
{
const name = args.shift();
let namespace = args.shift();
(0, _assert.default)(name != null, 'v3 name not specified');
(0, _assert.default)(namespace != null, 'v3 namespace not specified');
if (namespace === 'URL') {
namespace = _v2.default.URL;
}
if (namespace === 'DNS') {
namespace = _v2.default.DNS;
}
console.log((0, _v2.default)(name, namespace));
break;
}
case 'v4':
console.log((0, _v3.default)());
break;
case 'v5':
{
const name = args.shift();
let namespace = args.shift();
(0, _assert.default)(name != null, 'v5 name not specified');
(0, _assert.default)(namespace != null, 'v5 namespace not specified');
if (namespace === 'URL') {
namespace = _v4.default.URL;
}
if (namespace === 'DNS') {
namespace = _v4.default.DNS;
}
console.log((0, _v4.default)(name, namespace));
break;
}
default:
usage();
process.exit(1);
}

View File

@@ -0,0 +1,85 @@
"use strict";
exports.StandAloneQuarterParser = void 0;
var _Parser = require("../Parser.cjs");
var _utils = require("../utils.cjs");
class StandAloneQuarterParser extends _Parser.Parser {
priority = 120;
parse(dateString, token, match) {
switch (token) {
// 1, 2, 3, 4
case "q":
case "qq": // 01, 02, 03, 04
return (0, _utils.parseNDigits)(token.length, dateString);
// 1st, 2nd, 3rd, 4th
case "qo":
return match.ordinalNumber(dateString, { unit: "quarter" });
// Q1, Q2, Q3, Q4
case "qqq":
return (
match.quarter(dateString, {
width: "abbreviated",
context: "standalone",
}) ||
match.quarter(dateString, {
width: "narrow",
context: "standalone",
})
);
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case "qqqqq":
return match.quarter(dateString, {
width: "narrow",
context: "standalone",
});
// 1st quarter, 2nd quarter, ...
case "qqqq":
default:
return (
match.quarter(dateString, {
width: "wide",
context: "standalone",
}) ||
match.quarter(dateString, {
width: "abbreviated",
context: "standalone",
}) ||
match.quarter(dateString, {
width: "narrow",
context: "standalone",
})
);
}
}
validate(_date, value) {
return value >= 1 && value <= 4;
}
set(date, _flags, value) {
date.setMonth((value - 1) * 3, 1);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = [
"Y",
"R",
"Q",
"M",
"L",
"w",
"I",
"d",
"D",
"i",
"e",
"c",
"t",
"T",
];
}
exports.StandAloneQuarterParser = StandAloneQuarterParser;

View File

@@ -0,0 +1 @@
{"version":3,"file":"requestdata.d.ts","sourceRoot":"","sources":["../../../src/integrations/requestdata.ts"],"names":[],"mappings":"AAOA,UAAU,yBAAyB;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,KAAK,6BAA6B,GAAG;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,yBAAyB,CAAC;CACrC,CAAC;AAuCF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,2GAA6C,CAAC"}

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLVoid = void 0;
const graphql_1 = require("graphql");
exports.GraphQLVoid = new graphql_1.GraphQLScalarType({
name: 'Void',
description: 'Represents NULL values',
serialize() {
return '';
},
parseValue() {
return null;
},
parseLiteral() {
return null;
},
extensions: {
codegenScalarType: 'void',
},
});

View File

@@ -0,0 +1,53 @@
export function batch(fn: () => void): void;
export function getNumberOfWatchers(): number;
export function watch(filePath: string): Watcher;
export type FSWatcher = import("fs").FSWatcher;
export type EventType = import("./index").EventType;
export type WatcherSet = Set<Watcher>;
export type WatcherEvents = {
/**
* change event
*/
change: (eventType: EventType, filename?: string) => void;
/**
* error event
*/
error: (err: unknown) => void;
};
/**
* @typedef {object} WatcherEvents
* @property {(eventType: EventType, filename?: string) => void} change change event
* @property {(err: unknown) => void} error error event
*/
/**
* @extends {EventEmitter<{ [K in keyof WatcherEvents]: Parameters<WatcherEvents[K]> }>}
*/
export class Watcher extends EventEmitter<{
/**
* change event
*/
change: [
eventType: import("./index").EventType,
filename?: string | undefined,
];
/**
* error event
*/
error: [err: unknown];
}> {
constructor();
close(): void;
}
/**
* @param {FSWatcher} watcher watcher
* @param {string} filePath a file path
* @param {(type: "rename" | "change", filename: string) => void} handleChangeEvent function to handle change
* @returns {(type: "rename" | "change", filename: string) => void} handler of change event
*/
export function createHandleChangeEvent(
watcher: FSWatcher,
filePath: string,
handleChangeEvent: (type: "rename" | "change", filename: string) => void,
): (type: "rename" | "change", filename: string) => void;
export const watcherLimit: number;
import { EventEmitter } from "events";

View File

@@ -0,0 +1,64 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ATTR_NET_PEER_PORT = exports.ATTR_NET_PEER_NAME = exports.ATTR_MESSAGING_SYSTEM = exports.ATTR_MESSAGING_OPERATION = void 0;
/*
* This file contains a copy of unstable semantic convention definitions
* used by this package.
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
*/
/**
* Deprecated, use `messaging.operation.type` instead.
*
* @example publish
* @example create
* @example process
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `messaging.operation.type`.
*/
exports.ATTR_MESSAGING_OPERATION = 'messaging.operation';
/**
* The messaging system as identified by the client instrumentation.
*
* @note The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_SYSTEM = 'messaging.system';
/**
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
*
* @example example.com
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
*/
exports.ATTR_NET_PEER_NAME = 'net.peer.name';
/**
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
*
* @example 8080
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
*/
exports.ATTR_NET_PEER_PORT = 'net.peer.port';
//# sourceMappingURL=semconv.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/LivePreview/IFrame/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAkB1B,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"resetLoginAttempts.d.ts","sourceRoot":"","sources":["../../../../src/auth/strategies/local/resetLoginAttempts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAA;AACjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE7D,KAAK,IAAI,GAAG;IACV,UAAU,EAAE,yBAAyB,CAAA;IACrC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,CAAA;IACzC,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,kBAAkB,uCAK5B,IAAI,KAAG,OAAO,CAAC,IAAI,CAiBrB,CAAA"}

View File

@@ -0,0 +1,17 @@
# Changelog
## v.2.0.0
Features
- Added stable-stringify (see documentation)
- Support replacer
- Support spacer
- toJSON support without forceDecirc property
- Improved performance
Breaking changes
- Manipulating the input value in a `toJSON` function is not possible anymore in
all cases (see documentation)
- Dropped support for e.g. IE8 and Node.js < 4

View File

@@ -0,0 +1,172 @@
[![Node.js CI](https://github.com/Borewit/peek-readable/actions/workflows/nodejs-ci.yml/badge.svg?branch=master)](https://github.com/Borewit/peek-readable/actions/workflows/nodejs-ci.yml)
[![CodeQL](https://github.com/Borewit/peek-readable/actions/workflows/github-code-scanning/codeql/badge.svg?branch=master)](https://github.com/Borewit/peek-readable/actions/workflows/github-code-scanning/codeql)[![NPM version](https://badge.fury.io/js/peek-readable.svg)](https://npmjs.org/package/peek-readable)
[![npm downloads](http://img.shields.io/npm/dm/peek-readable.svg)](https://npmcharts.com/compare/peek-readable?start=600&interval=30)
[![Coverage Status](https://coveralls.io/repos/github/Borewit/peek-readable/badge.svg?branch=master)](https://coveralls.io/github/Borewit/peek-readable?branch=master)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d4b511481b3a4634b6ca5c0724407eb9)](https://www.codacy.com/gh/Borewit/peek-readable/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Borewit/peek-readable&amp;utm_campaign=Badge_Grade)
[![Known Vulnerabilities](https://snyk.io/test/github/Borewit/peek-readable/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Borewit/peek-readable?targetFile=package.json)
# peek-readable
A promise based asynchronous stream reader, which makes reading from a stream easy.
Allows to read and peek from a [Readable Stream](https://nodejs.org/api/stream.html#stream_readable_streams)
This module is used by [strtok3](https://github.com/Borewit/strtok3)
The `peek-readable` contains one class: `StreamReader`, which reads from a [stream.Readable](https://nodejs.org/api/stream.html#stream_class_stream_readable).
- Class `StreamReader` is used to read from Node.js [stream.Readable](https://nodejs.org/api/stream.html#stream_class_stream_readable).
- Class `WebStreamReader` is used to read from [ReadableStream<Uint8Array>](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
## Compatibility
Module: version 5 migrated from [CommonJS](https://en.wikipedia.org/wiki/CommonJS) to [pure ECMAScript Module (ESM)](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
JavaScript is compliant with [ECMAScript 2019 (ES10)](https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_%E2%80%93_ECMAScript_2019).
Requires Node.js ≥ 14.16 engine.
## Usage
### Installation
```shell script
npm install --save peek-readable
```
## API Documentation
Both `StreamReader` and `WebStreamReader` implement the [IStreamReader interface](#istreamreader-interface).
### `IStreamReader` Interface
The `IStreamReader` interface defines the contract for a stream reader,
which provides methods to read and peek data from a stream into a `Uint8Array` buffer.
The methods are asynchronous and return a promise that resolves with the number of bytes read.
#### Methods
##### `peek` function
This method allows you to inspect data from the stream without advancing the read pointer.
It reads data into the provided Uint8Array at a specified offset but does not modify the stream's internal position,
allowing you to look ahead in the stream.
```ts
peek(uint8Array: Uint8Array, offset: number, length: number): Promise<number>
```
Parameters:
- `uint8Array`: `Uint8Array`: The buffer into which the data will be peeked.
This is where the peeked data will be stored.
- `offset`: `number`: The offset in the Uint8Array where the peeked data should start being written.
- `length`: `number`: The number of bytes to peek from the stream.
Returns `Promise<number>`:
A promise that resolves with the number of bytes actually peeked into the buffer.
This number may be less than the requested length if the end of the stream is reached.
##### `read` function
```ts
read(buffer: Uint8Array, offset: number, length: number): Promise<number>
```
Parameters:
- `uint8Array`: `Uint8Array`: The buffer into which the data will be read.
This is where the read data will be stored.
- `offset`: `number`: The offset in the Uint8Array where the read data should start being written.
- `length`: `number`: The number of bytes to read from the stream.
Returns `Promise<number>`:
A promise that resolves with the number of bytes actually read into the buffer.
This number may be less than the requested length if the end of the stream is reached.
##### `abort` function
Abort active asynchronous operation (`read` or `peak`) before it has completed.
```ts
abort(): Promise<void>
```
## Examples
In the following example we read the first 16 bytes from a stream and store them in our buffer.
Source code of examples can be found [here](test/examples.ts).
```js
import fs from 'node:fs';
import { StreamReader } from 'peek-readable';
(async () => {
const readable = fs.createReadStream('JPEG_example_JPG_RIP_001.jpg');
const streamReader = new StreamReader(readable);
const uint8Array = new Uint8Array(16);
const bytesRead = await streamReader.read(uint8Array, 0, 16);;
// buffer contains 16 bytes, if the end-of-stream has not been reached
})();
```
End-of-stream detection:
```js
(async () => {
const fileReadStream = fs.createReadStream('JPEG_example_JPG_RIP_001.jpg');
const streamReader = new StreamReader(fileReadStream);
const buffer = Buffer.alloc(16); // or use: new Uint8Array(16);
try {
await streamReader.read(buffer, 0, 16);
// buffer contains 16 bytes, if the end-of-stream has not been reached
} catch(error) {
if (error instanceof EndOfStreamError) {
console.log('End-of-stream reached');
}
}
})();
```
With `peek` you can read ahead:
```js
import fs from 'node:fs';
import { StreamReader } from 'peek-readable';
function closeNodeStream(stream: ReadStream): Promise<void> {
return new Promise<void>((resolve, reject) => {
stream.close(err => {
if(err)
reject(err);
else
resolve();
});
})
}
(async () => {
const fileReadStream = fs.createReadStream('JPEG_example_JPG_RIP_001.jpg');
try {
const streamReader = new StreamReader(fileReadStream);
try {
const buffer = Buffer.alloc(20);
let bytesRead = await streamReader.peek(buffer, 0, 3);
if (bytesRead === 3 && buffer[0] === 0xFF && buffer[1] === 0xD8 && buffer[2] === 0xFF) {
console.log('This is a JPEG file');
} else {
throw Error('Expected a JPEG file');
}
bytesRead = await streamReader.read(buffer, 0, 20); // Read JPEG header
if (bytesRead === 20) {
console.log('Got the JPEG header');
} else {
throw Error('Failed to read JPEG header');
}
} finally {
await streamReader.close(); // Release fileReadStream
}
} finally {
await closeNodeStream(fileReadStream);
}
})();
```

View File

@@ -0,0 +1,82 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
// Adapted from Chris Veness' SHA1 code at
// http://www.movable-type.co.uk/scripts/sha1.html
function f(s, x, y, z) {
switch (s) {
case 0:
return x & y ^ ~x & z;
case 1:
return x ^ y ^ z;
case 2:
return x & y ^ x & z ^ y & z;
case 3:
return x ^ y ^ z;
}
}
function ROTL(x, n) {
return x << n | x >>> 32 - n;
}
function sha1(bytes) {
var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
if (typeof bytes === 'string') {
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
bytes = [];
for (var i = 0; i < msg.length; ++i) {
bytes.push(msg.charCodeAt(i));
}
} else if (!Array.isArray(bytes)) {
// Convert Array-like to Array
bytes = Array.prototype.slice.call(bytes);
}
bytes.push(0x80);
var l = bytes.length / 4 + 2;
var N = Math.ceil(l / 16);
var M = new Array(N);
for (var _i = 0; _i < N; ++_i) {
var arr = new Uint32Array(16);
for (var j = 0; j < 16; ++j) {
arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];
}
M[_i] = arr;
}
M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
M[N - 1][14] = Math.floor(M[N - 1][14]);
M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
for (var _i2 = 0; _i2 < N; ++_i2) {
var W = new Uint32Array(80);
for (var t = 0; t < 16; ++t) {
W[t] = M[_i2][t];
}
for (var _t = 16; _t < 80; ++_t) {
W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);
}
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
var e = H[4];
for (var _t2 = 0; _t2 < 80; ++_t2) {
var s = Math.floor(_t2 / 20);
var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;
e = d;
d = c;
c = ROTL(b, 30) >>> 0;
b = a;
a = T;
}
H[0] = H[0] + a >>> 0;
H[1] = H[1] + b >>> 0;
H[2] = H[2] + c >>> 0;
H[3] = H[3] + d >>> 0;
H[4] = H[4] + e >>> 0;
}
return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
}
var _default = exports.default = sha1;

View File

@@ -0,0 +1,34 @@
import { addQuarters } from "./addQuarters.js";
/**
* The {@link subQuarters} function options.
*/
/**
* @name subQuarters
* @category Quarter Helpers
* @summary Subtract the specified number of year quarters from the given date.
*
* @description
* Subtract the specified number of year quarters from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of quarters to be subtracted.
* @param options - An object with options
*
* @returns The new date with the quarters subtracted
*
* @example
* // Subtract 3 quarters from 1 September 2014:
* const result = subQuarters(new Date(2014, 8, 1), 3)
* //=> Sun Dec 01 2013 00:00:00
*/
export function subQuarters(date, amount, options) {
return addQuarters(date, -amount, options);
}
// Fallback for modularized imports:
export default subQuarters;

View File

@@ -0,0 +1,145 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchPatternFn.js");
var _index2 = require("../../_lib/buildMatchFn.js");
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /[قب]/,
abbreviated: /[قب]\.م\./,
wide: /(قبل|بعد) الميلاد/,
};
const parseEraPatterns = {
any: [/قبل/, /بعد/],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /ر[1234]/,
wide: /الربع (الأول|الثاني|الثالث|الرابع)/,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[جفمأسند]/,
abbreviated:
/^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
wide: /^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
};
const parseMonthPatterns = {
narrow: [
/^ج/i,
/^ف/i,
/^م/i,
/^أ/i,
/^م/i,
/^ج/i,
/^ج/i,
/^أ/i,
/^س/i,
/^أ/i,
/^ن/i,
/^د/i,
],
any: [
/^جانفي/i,
/^فيفري/i,
/^مارس/i,
/^أفريل/i,
/^ماي/i,
/^جوان/i,
/^جويلية/i,
/^أوت/i,
/^سبتمبر/i,
/^أكتوبر/i,
/^نوفمبر/i,
/^ديسمبر/i,
],
};
const matchDayPatterns = {
narrow: /^[حنثرخجس]/i,
short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
abbreviated: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i,
};
const parseDayPatterns = {
narrow: [/^ح/i, /^ن/i, /^ث/i, /^ر/i, /^خ/i, /^ج/i, /^س/i],
wide: [
/^الأحد/i,
/^الاثنين/i,
/^الثلاثاء/i,
/^الأربعاء/i,
/^الخميس/i,
/^الجمعة/i,
/^السبت/i,
],
any: [/^أح/i, /^اث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i],
};
const matchDayPeriodPatterns = {
narrow: /^(ص|ع|ن ل|ل|(في|مع) (صباح|قايلة|عشية|ليل))/,
any: /^([صع]|نص الليل|قايلة|(في|مع) (صباح|قايلة|عشية|ليل))/,
};
const parseDayPeriodPatterns = {
any: {
am: /^ص/,
pm: /^ع/,
midnight: /نص الليل/,
noon: /قايلة/,
afternoon: /بعد القايلة/,
morning: /صباح/,
evening: /عشية/,
night: /ليل/,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index2.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index2.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index2.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E zC"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0C VC 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC"},E:{"1":"K D E F A B C L M G 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J 6C bC","16":"bB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z PC xC ND QC","2":"F JD KD LD MD"},G:{"1":"E OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","16":"bC"},H:{"1":"mD"},I:{"1":"VC J I pD qD yC rD sD","16":"nD oD"},J:{"1":"D A"},K:{"1":"B C H PC xC QC","2":"A"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:1,C:"document.head",D:true};

View File

@@ -0,0 +1,144 @@
import { MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTE, MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE, MCP_PROMPT_RESULT_MESSAGE_COUNT_ATTRIBUTE, MCP_TOOL_RESULT_CONTENT_COUNT_ATTRIBUTE } from './attributes.js';
import { isValidContentItem } from './validation.js';
/**
* Result extraction functions for MCP server instrumentation
*
* Handles extraction of attributes from tool and prompt execution results.
*/
/**
* Build attributes for tool result content items
* @param content - Array of content items from tool result
* @param includeContent - Whether to include actual content (text, URIs) or just metadata
* @returns Attributes extracted from each content item
*/
function buildAllContentItemAttributes(
content,
includeContent,
) {
const attributes = {
[MCP_TOOL_RESULT_CONTENT_COUNT_ATTRIBUTE]: content.length,
};
for (const [i, item] of content.entries()) {
if (!isValidContentItem(item)) {
continue;
}
const prefix = content.length === 1 ? 'mcp.tool.result' : `mcp.tool.result.${i}`;
if (typeof item.type === 'string') {
attributes[`${prefix}.content_type`] = item.type;
}
if (includeContent) {
const safeSet = (key, value) => {
if (typeof value === 'string') {
attributes[`${prefix}.${key}`] = value;
}
};
safeSet('mime_type', item.mimeType);
safeSet('uri', item.uri);
safeSet('name', item.name);
if (typeof item.text === 'string') {
attributes[`${prefix}.content`] = item.text;
}
if (typeof item.data === 'string') {
attributes[`${prefix}.data_size`] = item.data.length;
}
const resource = item.resource;
if (isValidContentItem(resource)) {
safeSet('resource_uri', resource.uri);
safeSet('resource_mime_type', resource.mimeType);
}
}
}
return attributes;
}
/**
* Extract tool result attributes for span instrumentation
* @param result - Tool execution result
* @param recordOutputs - Whether to include actual content or just metadata (counts, error status)
* @returns Attributes extracted from tool result content
*/
function extractToolResultAttributes(
result,
recordOutputs,
) {
if (!isValidContentItem(result)) {
return {};
}
const attributes = Array.isArray(result.content) ? buildAllContentItemAttributes(result.content, recordOutputs) : {};
if (typeof result.isError === 'boolean') {
attributes[MCP_TOOL_RESULT_IS_ERROR_ATTRIBUTE] = result.isError;
}
return attributes;
}
/**
* Extract prompt result attributes for span instrumentation
* @param result - Prompt execution result
* @param recordOutputs - Whether to include actual content or just metadata (counts)
* @returns Attributes extracted from prompt result
*/
function extractPromptResultAttributes(
result,
recordOutputs,
) {
const attributes = {};
if (!isValidContentItem(result)) {
return attributes;
}
if (recordOutputs && typeof result.description === 'string') {
attributes[MCP_PROMPT_RESULT_DESCRIPTION_ATTRIBUTE] = result.description;
}
if (Array.isArray(result.messages)) {
attributes[MCP_PROMPT_RESULT_MESSAGE_COUNT_ATTRIBUTE] = result.messages.length;
if (recordOutputs) {
const messages = result.messages;
for (const [i, message] of messages.entries()) {
if (!isValidContentItem(message)) {
continue;
}
const prefix = messages.length === 1 ? 'mcp.prompt.result' : `mcp.prompt.result.${i}`;
const safeSet = (key, value) => {
if (typeof value === 'string') {
const attrName = messages.length === 1 ? `${prefix}.message_${key}` : `${prefix}.${key}`;
attributes[attrName] = value;
}
};
safeSet('role', message.role);
if (isValidContentItem(message.content)) {
const content = message.content;
if (typeof content.text === 'string') {
const attrName = messages.length === 1 ? `${prefix}.message_content` : `${prefix}.content`;
attributes[attrName] = content.text;
}
}
}
}
}
return attributes;
}
export { extractPromptResultAttributes, extractToolResultAttributes };
//# sourceMappingURL=resultExtraction.js.map

View File

@@ -0,0 +1,6 @@
import type { TFunction } from '@payloadcms/translations';
import { APIError } from './APIError.js';
export declare class MissingFile extends APIError {
constructor(t?: TFunction);
}
//# sourceMappingURL=MissingFile.d.ts.map

View File

@@ -0,0 +1,56 @@
declare class Queue<ValueType> implements Iterable<ValueType> {
/**
The size of the queue.
*/
readonly size: number;
/**
Tiny queue data structure.
The instance is an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), which means you can iterate over the queue front to back with a “for…of” loop, or use spreading to convert the queue to an array. Don't do this unless you really need to though, since it's slow.
@example
```
import Queue = require('yocto-queue');
const queue = new Queue();
queue.enqueue('🦄');
queue.enqueue('🌈');
console.log(queue.size);
//=> 2
console.log(...queue);
//=> '🦄 🌈'
console.log(queue.dequeue());
//=> '🦄'
console.log(queue.dequeue());
//=> '🌈'
```
*/
constructor();
[Symbol.iterator](): IterableIterator<ValueType>;
/**
Add a value to the queue.
*/
enqueue(value: ValueType): void;
/**
Remove the next value in the queue.
@returns The removed value or `undefined` if the queue is empty.
*/
dequeue(): ValueType | undefined;
/**
Clear the queue.
*/
clear(): void;
}
export = Queue;

View File

@@ -0,0 +1 @@
{"version":3,"file":"roles.js","names":[],"sources":["../../../../src/rest/commands/create/roles.ts"],"sourcesContent":["import type { DirectusRole } from '../../../schema/role.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreateRoleOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusRole<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Create multiple new roles.\n *\n * @param items The roles to create\n * @param query Optional return data query\n *\n * @returns Returns the role objects for the created roles.\n */\nexport const createRoles =\n\t<Schema, const TQuery extends Query<Schema, DirectusRole<Schema>>>(\n\t\titems: NestedPartial<DirectusRole<Schema>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<CreateRoleOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/roles`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(items),\n\t\tmethod: 'POST',\n\t});\n\n/**\n * Create a new role.\n *\n * @param item The role to create\n * @param query Optional return data query\n *\n * @returns Returns the role object for the created role.\n */\nexport const createRole =\n\t<Schema, const TQuery extends Query<Schema, DirectusRole<Schema>>>(\n\t\titem: NestedPartial<DirectusRole<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateRoleOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/roles`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(item),\n\t\tmethod: 'POST',\n\t});\n"],"mappings":"AAkBA,MAAa,GAEX,EACA,SAEM,CACN,KAAM,SACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,OACR,EAUW,GAEX,EACA,SAEM,CACN,KAAM,SACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}

View File

@@ -0,0 +1,15 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Square = createLucideIcon("Square", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
]);
export { Square as default };
//# sourceMappingURL=square.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/Popup/PopupTrigger/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAIrB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,UAAU,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC3D,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAuDpD,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../../../src/globals/operations/findOne.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAA;AAE7E,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EAEX,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAI/D,OAAO,EAAa,KAAK,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAQrF,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,YAAY,EAAE,qBAAqB,CAAA;IACnC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,GAAG,EAAE,cAAc,CAAA;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC,GACnD,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAA;AAEjD,eAAO,MAAM,gBAAgB,GAAU,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAChE,iBAAiB,KACtB,OAAO,CAAC,CAAC,CAsOX,CAAA"}

View File

@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { isLastDayOfMonth as fn } from "../isLastDayOfMonth.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const isLastDayOfMonth = convertToFP(fn, 1);
// Fallback for modularized imports:
export default isLastDayOfMonth;

View File

@@ -0,0 +1 @@
{"version":3,"file":"flattenWhereToOperators.d.ts","sourceRoot":"","sources":["../../src/database/flattenWhereToOperators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE1D;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,EAAE,CAelE"}

View File

@@ -0,0 +1,43 @@
name: Publish release
on:
workflow_dispatch:
inputs:
version:
description: 'The version number to tag and release'
required: true
type: string
prerelease:
description: 'Release as pre-release'
required: false
type: boolean
default: false
jobs:
release-npm:
runs-on: ubuntu-latest
environment: main
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4
- uses: actions/setup-node@v5
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- run: npm install npm -g
- run: npm install
- name: Change version number and sync
run: |
node scripts/sync-version.mjs ${{ inputs.version }}
- name: GIT commit and push all changed files
run: |
git config --global user.name "mcollina"
git config --global user.email "hello@matteocollina.com"
git commit -n -a -m "Bumped v${{ inputs.version }}"
git push origin HEAD:${{ github.ref }}
- run: npm publish --access public --tag ${{ inputs.prerelease == true && 'next' || 'latest' }}
- name: 'Create release notes'
run: |
npx @matteo.collina/release-notes -a ${{ secrets.GITHUB_TOKEN }} -t v${{ inputs.version }} -r redact -o pinojs ${{ github.event.inputs.prerelease == 'true' && '-p' || '' }} -c ${{ github.ref }}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/admin/fields/Text.ts"],"sourcesContent":["import type React from 'react'\nimport type { MarkOptional } from 'ts-essentials'\n\nimport type { TextField, TextFieldClient } from '../../fields/config/types.js'\nimport type { TextFieldValidation } from '../../fields/validations.js'\nimport type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js'\nimport type {\n ClientFieldBase,\n FieldClientComponent,\n FieldPaths,\n FieldServerComponent,\n ServerFieldBase,\n} from '../forms/Field.js'\nimport type {\n FieldDescriptionClientComponent,\n FieldDescriptionServerComponent,\n FieldDiffClientComponent,\n FieldDiffServerComponent,\n FieldLabelClientComponent,\n FieldLabelServerComponent,\n} from '../types.js'\n\ntype TextFieldClientWithoutType = MarkOptional<TextFieldClient, 'type'>\n\ntype TextFieldBaseClientProps = {\n readonly inputRef?: React.RefObject<HTMLInputElement>\n readonly onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>\n readonly path: string\n readonly validate?: TextFieldValidation\n}\n\ntype TextFieldBaseServerProps = Pick<FieldPaths, 'path'>\n\nexport type TextFieldClientProps = ClientFieldBase<TextFieldClientWithoutType> &\n TextFieldBaseClientProps\n\nexport type TextFieldServerProps = ServerFieldBase<TextField, TextFieldClientWithoutType> &\n TextFieldBaseServerProps\n\nexport type TextFieldServerComponent = FieldServerComponent<\n TextField,\n TextFieldClientWithoutType,\n TextFieldBaseServerProps\n>\n\nexport type TextFieldClientComponent = FieldClientComponent<\n TextFieldClientWithoutType,\n TextFieldBaseClientProps\n>\n\nexport type TextFieldLabelServerComponent = FieldLabelServerComponent<\n TextField,\n TextFieldClientWithoutType\n>\n\nexport type TextFieldLabelClientComponent = FieldLabelClientComponent<TextFieldClientWithoutType>\n\nexport type TextFieldDescriptionServerComponent = FieldDescriptionServerComponent<\n TextField,\n TextFieldClientWithoutType\n>\n\nexport type TextFieldDescriptionClientComponent =\n FieldDescriptionClientComponent<TextFieldClientWithoutType>\n\nexport type TextFieldErrorServerComponent = FieldErrorServerComponent<\n TextField,\n TextFieldClientWithoutType\n>\n\nexport type TextFieldErrorClientComponent = FieldErrorClientComponent<TextFieldClientWithoutType>\n\nexport type TextFieldDiffServerComponent = FieldDiffServerComponent<TextField, TextFieldClient>\n\nexport type TextFieldDiffClientComponent = FieldDiffClientComponent<TextFieldClient>\n"],"names":[],"mappings":"AA0EA,WAAoF"}

View File

@@ -0,0 +1,131 @@
'use strict';
const { EMPTY_BUFFER } = require('./constants');
const FastBuffer = Buffer[Symbol.species];
/**
* Merges an array of buffers into a new buffer.
*
* @param {Buffer[]} list The array of buffers to concat
* @param {Number} totalLength The total length of buffers in the list
* @return {Buffer} The resulting buffer
* @public
*/
function concat(list, totalLength) {
if (list.length === 0) return EMPTY_BUFFER;
if (list.length === 1) return list[0];
const target = Buffer.allocUnsafe(totalLength);
let offset = 0;
for (let i = 0; i < list.length; i++) {
const buf = list[i];
target.set(buf, offset);
offset += buf.length;
}
if (offset < totalLength) {
return new FastBuffer(target.buffer, target.byteOffset, offset);
}
return target;
}
/**
* Masks a buffer using the given mask.
*
* @param {Buffer} source The buffer to mask
* @param {Buffer} mask The mask to use
* @param {Buffer} output The buffer where to store the result
* @param {Number} offset The offset at which to start writing
* @param {Number} length The number of bytes to mask.
* @public
*/
function _mask(source, mask, output, offset, length) {
for (let i = 0; i < length; i++) {
output[offset + i] = source[i] ^ mask[i & 3];
}
}
/**
* Unmasks a buffer using the given mask.
*
* @param {Buffer} buffer The buffer to unmask
* @param {Buffer} mask The mask to use
* @public
*/
function _unmask(buffer, mask) {
for (let i = 0; i < buffer.length; i++) {
buffer[i] ^= mask[i & 3];
}
}
/**
* Converts a buffer to an `ArrayBuffer`.
*
* @param {Buffer} buf The buffer to convert
* @return {ArrayBuffer} Converted buffer
* @public
*/
function toArrayBuffer(buf) {
if (buf.length === buf.buffer.byteLength) {
return buf.buffer;
}
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
}
/**
* Converts `data` to a `Buffer`.
*
* @param {*} data The data to convert
* @return {Buffer} The buffer
* @throws {TypeError}
* @public
*/
function toBuffer(data) {
toBuffer.readOnly = true;
if (Buffer.isBuffer(data)) return data;
let buf;
if (data instanceof ArrayBuffer) {
buf = new FastBuffer(data);
} else if (ArrayBuffer.isView(data)) {
buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength);
} else {
buf = Buffer.from(data);
toBuffer.readOnly = false;
}
return buf;
}
module.exports = {
concat,
mask: _mask,
toArrayBuffer,
toBuffer,
unmask: _unmask
};
/* istanbul ignore else */
if (!process.env.WS_NO_BUFFER_UTIL) {
try {
const bufferUtil = require('bufferutil');
module.exports.mask = function (source, mask, output, offset, length) {
if (length < 48) _mask(source, mask, output, offset, length);
else bufferUtil.mask(source, mask, output, offset, length);
};
module.exports.unmask = function (buffer, mask) {
if (buffer.length < 32) _unmask(buffer, mask);
else bufferUtil.unmask(buffer, mask);
};
} catch (e) {
// Continue regardless of the error.
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"inspection-panel.js","sources":["../../../src/icons/inspection-panel.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name InspectionPanel\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik03IDdoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xNyA3aC4wMSIgLz4KICA8cGF0aCBkPSJNNyAxN2guMDEiIC8+CiAgPHBhdGggZD0iTTE3IDE3aC4wMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/inspection-panel\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst InspectionPanel = createLucideIcon('InspectionPanel', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M7 7h.01', key: '7u93v4' }],\n ['path', { d: 'M17 7h.01', key: '14a9sn' }],\n ['path', { d: 'M7 17h.01', key: '19xn7k' }],\n ['path', { d: 'M17 17h.01', key: '1sd3ek' }],\n]);\n\nexport default InspectionPanel;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,44 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const Template = require("../Template");
const HelperRuntimeModule = require("./HelperRuntimeModule");
/** @typedef {import("../Compilation")} Compilation */
class RelativeUrlRuntimeModule extends HelperRuntimeModule {
constructor() {
super("relative url");
}
/**
* @returns {string | null} runtime code
*/
generate() {
const compilation = /** @type {Compilation} */ (this.compilation);
const { runtimeTemplate } = compilation;
return Template.asString([
`${RuntimeGlobals.relativeUrl} = function RelativeURL(url) {`,
Template.indent([
'var realUrl = new URL(url, "x:/");',
"var values = {};",
"for (var key in realUrl) values[key] = realUrl[key];",
"values.href = url;",
'values.pathname = url.replace(/[?#].*/, "");',
'values.origin = values.protocol = "";',
`values.toString = values.toJSON = ${runtimeTemplate.returningFunction(
"url"
)};`,
"for (var key in values) Object.defineProperty(this, key, { enumerable: true, configurable: true, value: values[key] });"
]),
"};",
`${RuntimeGlobals.relativeUrl}.prototype = URL.prototype;`
]);
}
}
module.exports = RelativeUrlRuntimeModule;

View File

@@ -0,0 +1,84 @@
'use strict';
const buffers = [
Buffer.from(
(new Array(900)).fill('').map((_, i) => `key${i}=value${i}`).join('&')
),
];
const calls = {
field: 0,
end: 0,
};
const moduleName = process.argv[2];
switch (moduleName) {
case 'busboy': {
const busboy = require('busboy');
console.time(moduleName);
const parser = busboy({
limits: {
fieldSizeLimit: Infinity,
},
headers: {
'content-type': 'application/x-www-form-urlencoded; charset=utf-8',
},
});
parser.on('field', (name, val, info) => {
++calls.field;
}).on('close', () => {
++calls.end;
console.timeEnd(moduleName);
});
for (const buf of buffers)
parser.write(buf);
parser.end();
break;
}
case 'formidable': {
const QuerystringParser =
require('formidable/src/parsers/Querystring.js');
console.time(moduleName);
const parser = new QuerystringParser();
parser.on('data', (obj) => {
++calls.field;
}).on('end', () => {
++calls.end;
console.timeEnd(moduleName);
});
for (const buf of buffers)
parser.write(buf);
parser.end();
break;
}
case 'formidable-streaming': {
const QuerystringParser =
require('formidable/src/parsers/StreamingQuerystring.js');
console.time(moduleName);
const parser = new QuerystringParser();
parser.on('data', (obj) => {
++calls.field;
}).on('end', () => {
++calls.end;
console.timeEnd(moduleName);
});
for (const buf of buffers)
parser.write(buf);
parser.end();
break;
}
default:
if (moduleName === undefined)
console.error('Missing parser module name');
else
console.error(`Invalid parser module name: ${moduleName}`);
process.exit(1);
}

View File

@@ -0,0 +1,4 @@
import type { DefaultTranslationsObject, Language } from '../types.js';
export declare const trTranslations: DefaultTranslationsObject;
export declare const tr: Language;
//# sourceMappingURL=tr.d.ts.map

View File

@@ -0,0 +1,3 @@
#!/usr/bin/env node
export {};
//# sourceMappingURL=bin.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"extendDrizzleTable.d.ts","sourceRoot":"","sources":["../../src/utilities/extendDrizzleTable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAWnC,KAAK,IAAI,GAAG;IACV,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAA;IAChD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAA;IACnD,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,oCAAqC,IAAI,KAAG,IAkC1E,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/collections/endpoints/findDistinct.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\n\nimport { APIError } from '../../errors/APIError.js'\nimport { getRequestCollection } from '../../utilities/getRequestEntity.js'\nimport { headersWithCors } from '../../utilities/headersWithCors.js'\nimport { parseParams } from '../../utilities/parseParams/index.js'\nimport { findDistinctOperation } from '../operations/findDistinct.js'\n\nexport const findDistinctHandler: PayloadHandler = async (req) => {\n const collection = getRequestCollection(req)\n\n const { depth, field, limit, page, sort, trash, where } = parseParams(req.query)\n\n if (!field) {\n throw new APIError('field must be specified', httpStatus.BAD_REQUEST)\n }\n\n const result = await findDistinctOperation({\n collection,\n depth,\n field,\n limit,\n page,\n req,\n sort,\n trash,\n where,\n })\n\n return Response.json(result, {\n headers: headersWithCors({\n headers: new Headers(),\n req,\n }),\n status: httpStatus.OK,\n })\n}\n"],"names":["status","httpStatus","APIError","getRequestCollection","headersWithCors","parseParams","findDistinctOperation","findDistinctHandler","req","collection","depth","field","limit","page","sort","trash","where","query","BAD_REQUEST","result","Response","json","headers","Headers","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAIlD,SAASC,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,oBAAoB,QAAQ,sCAAqC;AAC1E,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,WAAW,QAAQ,uCAAsC;AAClE,SAASC,qBAAqB,QAAQ,gCAA+B;AAErE,OAAO,MAAMC,sBAAsC,OAAOC;IACxD,MAAMC,aAAaN,qBAAqBK;IAExC,MAAM,EAAEE,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGX,YAAYG,IAAIS,KAAK;IAE/E,IAAI,CAACN,OAAO;QACV,MAAM,IAAIT,SAAS,2BAA2BD,WAAWiB,WAAW;IACtE;IAEA,MAAMC,SAAS,MAAMb,sBAAsB;QACzCG;QACAC;QACAC;QACAC;QACAC;QACAL;QACAM;QACAC;QACAC;IACF;IAEA,OAAOI,SAASC,IAAI,CAACF,QAAQ;QAC3BG,SAASlB,gBAAgB;YACvBkB,SAAS,IAAIC;YACbf;QACF;QACAR,QAAQC,WAAWuB,EAAE;IACvB;AACF,EAAC"}

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').detectSeries;

View File

@@ -0,0 +1,21 @@
import type { MetricType } from '../types';
export declare const initMetric: <MetricName extends MetricType["name"]>(name: MetricName, value?: number) => {
name: MetricName;
value: number;
rating: "good";
delta: number;
entries: (Extract<import("../types").CLSMetric, {
name: MetricName;
}> | Extract<import("../types").FCPMetric, {
name: MetricName;
}> | Extract<import("../types").INPMetric, {
name: MetricName;
}> | Extract<import("../types").LCPMetric, {
name: MetricName;
}> | Extract<import("../types").TTFBMetric, {
name: MetricName;
}>)["entries"];
id: string;
navigationType: "navigate" | "reload" | "back-forward" | "back-forward-cache" | "prerender" | "restore";
};
//# sourceMappingURL=initMetric.d.ts.map

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MessageCircleX = createLucideIcon("MessageCircleX", [
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }],
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
["path", { d: "m9 9 6 6", key: "z0biqf" }]
]);
export { MessageCircleX as default };
//# sourceMappingURL=message-circle-x.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/uploads/checkFileAccess.ts"],"sourcesContent":["import type { Collection, TypeWithID } from '../collections/config/types.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\n\nimport { executeAccess } from '../auth/executeAccess.js'\nimport { Forbidden } from '../errors/Forbidden.js'\n\nexport const checkFileAccess = async ({\n collection,\n filename,\n req,\n}: {\n collection: Collection\n filename: string\n req: PayloadRequest\n}): Promise<TypeWithID | undefined> => {\n if (filename.includes('../') || filename.includes('..\\\\')) {\n throw new Forbidden(req.t)\n }\n const { config } = collection\n\n const accessResult = await executeAccess(\n { data: { filename }, isReadingStaticFile: true, req },\n config.access.read,\n )\n\n if (typeof accessResult === 'object') {\n const queryToBuild: Where = {\n and: [\n {\n or: [\n {\n filename: {\n equals: filename,\n },\n },\n ],\n },\n accessResult,\n ],\n }\n\n if (config.upload.imageSizes) {\n config.upload.imageSizes.forEach(({ name }) => {\n queryToBuild.and?.[0]?.or?.push({\n [`sizes.${name}.filename`]: {\n equals: filename,\n },\n })\n })\n }\n\n const doc = await req.payload.db.findOne({\n collection: config.slug,\n req,\n where: queryToBuild,\n })\n\n if (!doc) {\n throw new Forbidden(req.t)\n }\n\n return doc\n }\n}\n"],"names":["executeAccess","Forbidden","checkFileAccess","collection","filename","req","includes","t","config","accessResult","data","isReadingStaticFile","access","read","queryToBuild","and","or","equals","upload","imageSizes","forEach","name","push","doc","payload","db","findOne","slug","where"],"mappings":"AAGA,SAASA,aAAa,QAAQ,2BAA0B;AACxD,SAASC,SAAS,QAAQ,yBAAwB;AAElD,OAAO,MAAMC,kBAAkB,OAAO,EACpCC,UAAU,EACVC,QAAQ,EACRC,GAAG,EAKJ;IACC,IAAID,SAASE,QAAQ,CAAC,UAAUF,SAASE,QAAQ,CAAC,SAAS;QACzD,MAAM,IAAIL,UAAUI,IAAIE,CAAC;IAC3B;IACA,MAAM,EAAEC,MAAM,EAAE,GAAGL;IAEnB,MAAMM,eAAe,MAAMT,cACzB;QAAEU,MAAM;YAAEN;QAAS;QAAGO,qBAAqB;QAAMN;IAAI,GACrDG,OAAOI,MAAM,CAACC,IAAI;IAGpB,IAAI,OAAOJ,iBAAiB,UAAU;QACpC,MAAMK,eAAsB;YAC1BC,KAAK;gBACH;oBACEC,IAAI;wBACF;4BACEZ,UAAU;gCACRa,QAAQb;4BACV;wBACF;qBACD;gBACH;gBACAK;aACD;QACH;QAEA,IAAID,OAAOU,MAAM,CAACC,UAAU,EAAE;YAC5BX,OAAOU,MAAM,CAACC,UAAU,CAACC,OAAO,CAAC,CAAC,EAAEC,IAAI,EAAE;gBACxCP,aAAaC,GAAG,EAAE,CAAC,EAAE,EAAEC,IAAIM,KAAK;oBAC9B,CAAC,CAAC,MAAM,EAAED,KAAK,SAAS,CAAC,CAAC,EAAE;wBAC1BJ,QAAQb;oBACV;gBACF;YACF;QACF;QAEA,MAAMmB,MAAM,MAAMlB,IAAImB,OAAO,CAACC,EAAE,CAACC,OAAO,CAAC;YACvCvB,YAAYK,OAAOmB,IAAI;YACvBtB;YACAuB,OAAOd;QACT;QAEA,IAAI,CAACS,KAAK;YACR,MAAM,IAAItB,UAAUI,IAAIE,CAAC;QAC3B;QAEA,OAAOgB;IACT;AACF,EAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/DeleteMany/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAOvE,OAAO,KAAK,MAAM,OAAO,CAAA;AAezB,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,sBAAsB,CAAA;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAkEtC,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,CAAC,UAAU,EAAE,MAAM,GAAG;QACpB,YAAY,EAAE,MAAM,CAAA;QACpB,MAAM,EAAE,OAAO,EAAE,CAAA;QACjB,GAAG,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;QACxB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF,CAAA;AACD,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACjD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;OAKG;IACH,UAAU,EAAE;QACV,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,GAAG,CAAC,EAAE,OAAO,CAAA;YACb,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;YACzB,UAAU,CAAC,EAAE,MAAM,CAAA;SACpB,CAAA;KACF,CAAA;IACD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,WAAW,EACX,MAAM,EACN,UAAU,EACV,KAAK,EACL,QAAQ,EACR,KAAK,GACN,EAAE,kBAAkB,qBA0QpB"}

View File

@@ -0,0 +1,25 @@
# binary-extensions
> List of binary file extensions
The list is just a [JSON file](binary-extensions.json) and can be used anywhere.
## Install
```sh
npm install binary-extensions
```
## Usage
```js
const binaryExtensions = require('binary-extensions');
console.log(binaryExtensions);
//=> ['3ds', '3g2', …]
```
## Related
- [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file
- [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions

View File

@@ -0,0 +1,10 @@
"use strict";
exports.formatDuration = void 0;
var _index = require("../formatDuration.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const formatDuration = (exports.formatDuration = (0, _index2.convertToFP)(
_index.formatDuration,
1,
));

View File

@@ -0,0 +1,37 @@
'use strict'
const { join } = require('path')
const ThreadStream = require('..')
const assert = require('assert')
let worker = null
function setup () {
const stream = new ThreadStream({
filename: join(__dirname, 'to-file.js'),
workerData: { dest: process.argv[2] },
sync: true
})
worker = stream.worker
stream.write('hello')
stream.write(' ')
stream.write('world\n')
stream.flushSync()
stream.unref()
// the stream object goes out of scope here
setImmediate(gc) // eslint-disable-line
}
setup()
let exitEmitted = false
worker.on('exit', function () {
exitEmitted = true
})
process.on('exit', function () {
assert.strictEqual(exitEmitted, true)
})

View File

@@ -0,0 +1,66 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React, { useState } from 'react';
import { v4 as uuid } from 'uuid';
export const DefaultBlockImage = () => {
const [patternID] = useState(() => `pattern${uuid()}`);
return /*#__PURE__*/_jsxs("svg", {
fill: "none",
height: "151",
preserveAspectRatio: "xMidYMid slice",
viewBox: "0 0 231 151",
width: "231",
xmlns: "http://www.w3.org/2000/svg",
children: [/*#__PURE__*/_jsxs("g", {
clipPath: `url(#${patternID})`,
children: [/*#__PURE__*/_jsx("rect", {
fill: "#D9D9D9",
height: "100%",
rx: "2",
width: "100%"
}), /*#__PURE__*/_jsx("rect", {
fill: "#BCBCBC",
height: "116.063",
transform: "rotate(52.0687 33.7051 79.3051)",
width: "85.8593",
x: "33.7051",
y: "79.3051"
}), /*#__PURE__*/_jsx("rect", {
fill: "#BCBCBC",
height: "116.063",
transform: "rotate(52.0687 86.1219 92.6272)",
width: "85.8593",
x: "86.1219",
y: "92.6272"
}), /*#__PURE__*/_jsx("circle", {
cx: "189",
cy: "45",
fill: "#BCBCBC",
r: "19"
}), /*#__PURE__*/_jsx("rect", {
fill: "#B8B8B8",
height: "5",
rx: "2.5",
width: "98",
x: "66",
y: "70"
}), /*#__PURE__*/_jsx("rect", {
fill: "#B8B8B8",
height: "5",
rx: "2.5",
width: "76",
x: "77",
y: "82"
})]
}), /*#__PURE__*/_jsx("defs", {
children: /*#__PURE__*/_jsx("clipPath", {
id: `${patternID}`,
children: /*#__PURE__*/_jsx("rect", {
fill: "white",
height: "151",
width: "231"
})
})
})]
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,27 @@
"use strict";
exports.isLeapYear = isLeapYear;
var _index = require("./toDate.cjs");
/**
* @name isLeapYear
* @category Year Helpers
* @summary Is the given date in the leap year?
*
* @description
* Is the given date in the leap year?
*
* @param date - The date to check
* @param options - The options object
*
* @returns The date is in the leap year
*
* @example
* // Is 1 September 2012 in the leap year?
* const result = isLeapYear(new Date(2012, 8, 1))
* //=> true
*/
function isLeapYear(date, options) {
const _date = (0, _index.toDate)(date, options?.in);
const year = _date.getFullYear();
return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);
}

View File

@@ -0,0 +1,8 @@
import { APIError } from './APIError.js';
export class MissingFieldInputOptions extends APIError {
constructor(field){
super(`Field ${field.label} is missing options.`);
}
}
//# sourceMappingURL=MissingFieldInputOptions.js.map

View File

@@ -0,0 +1,6 @@
import { buildDynamicPredefinedBlocksToJsonMigration } from '@payloadcms/drizzle';
export const dynamic = buildDynamicPredefinedBlocksToJsonMigration({
packageName: '@payloadcms/db-postgres'
});
//# sourceMappingURL=blocks-as-json.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../../../../src/forms/fieldSchemasToFormState/calculateDefaultValues/promise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,KAAK,EAEL,cAAc,EACd,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACV,MAAM,SAAS,CAAA;AAOhB,KAAK,IAAI,CAAC,CAAC,IAAI;IACb,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,GAAG,EAAE,cAAc,CAAA;IACnB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,WAAW,EAAE,IAAI,CAAA;IACjB,IAAI,EAAE,SAAS,CAAA;CAChB,CAAA;AAGD,eAAO,MAAM,mBAAmB,GAAU,CAAC,4EAUxC,IAAI,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,IAAI,CA4NxB,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"with-search.cjs","names":["formatFields"],"sources":["../../../src/rest/helpers/with-search.ts"],"sourcesContent":["import { formatFields } from '../../utils/format-fields.js';\nimport type { RestCommand } from '../types.js';\n\nexport function withSearch<Schema, Output>(getOptions: RestCommand<Output, Schema>): RestCommand<Output, Schema> {\n\treturn () => {\n\t\tconst options = getOptions();\n\n\t\tif (options.method === 'GET' && options.params) {\n\t\t\toptions.method = 'SEARCH';\n\n\t\t\toptions.body = JSON.stringify({\n\t\t\t\tquery: {\n\t\t\t\t\t...options.params,\n\t\t\t\t\tfields: formatFields(options.params['fields'] ?? []),\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tdelete options.params;\n\t\t}\n\n\t\treturn options;\n\t};\n}\n"],"mappings":"iDAGA,SAAgB,EAA2B,EAAsE,CAChH,UAAa,CACZ,IAAM,EAAU,GAAY,CAe5B,OAbI,EAAQ,SAAW,OAAS,EAAQ,SACvC,EAAQ,OAAS,SAEjB,EAAQ,KAAO,KAAK,UAAU,CAC7B,MAAO,CACN,GAAG,EAAQ,OACX,OAAQA,EAAAA,aAAa,EAAQ,OAAO,QAAa,EAAE,CAAC,CACpD,CACD,CAAC,CAEF,OAAO,EAAQ,QAGT"}

View File

@@ -0,0 +1,52 @@
var unitlessKeys = {
animationIterationCount: 1,
aspectRatio: 1,
borderImageOutset: 1,
borderImageSlice: 1,
borderImageWidth: 1,
boxFlex: 1,
boxFlexGroup: 1,
boxOrdinalGroup: 1,
columnCount: 1,
columns: 1,
flex: 1,
flexGrow: 1,
flexPositive: 1,
flexShrink: 1,
flexNegative: 1,
flexOrder: 1,
gridRow: 1,
gridRowEnd: 1,
gridRowSpan: 1,
gridRowStart: 1,
gridColumn: 1,
gridColumnEnd: 1,
gridColumnSpan: 1,
gridColumnStart: 1,
msGridRow: 1,
msGridRowSpan: 1,
msGridColumn: 1,
msGridColumnSpan: 1,
fontWeight: 1,
lineHeight: 1,
opacity: 1,
order: 1,
orphans: 1,
scale: 1,
tabSize: 1,
widows: 1,
zIndex: 1,
zoom: 1,
WebkitLineClamp: 1,
// SVG-related properties
fillOpacity: 1,
floodOpacity: 1,
stopOpacity: 1,
strokeDasharray: 1,
strokeDashoffset: 1,
strokeMiterlimit: 1,
strokeOpacity: 1,
strokeWidth: 1
};
export { unitlessKeys as default };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/date-duration.ts"],"sourcesContent":["import type { DateDuration } from 'gel';\nimport type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn, GelColumnBuilder } from './common.ts';\n\nexport type GelDateDurationBuilderInitial<TName extends string> = GelDateDurationBuilder<{\n\tname: TName;\n\tdataType: 'dateDuration';\n\tcolumnType: 'GelDateDuration';\n\tdata: DateDuration;\n\tdriverParam: DateDuration;\n\tenumValues: undefined;\n}>;\n\nexport class GelDateDurationBuilder<T extends ColumnBuilderBaseConfig<'dateDuration', 'GelDateDuration'>>\n\textends GelColumnBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'GelDateDurationBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'dateDuration', 'GelDateDuration');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelDateDuration<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelDateDuration<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class GelDateDuration<T extends ColumnBaseConfig<'dateDuration', 'GelDateDuration'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelDateDuration';\n\n\tgetSQLType(): string {\n\t\treturn `dateDuration`;\n\t}\n}\n\nexport function dateDuration(): GelDateDurationBuilderInitial<''>;\nexport function dateDuration<TName extends string>(name: TName): GelDateDurationBuilderInitial<TName>;\nexport function dateDuration(name?: string) {\n\treturn new GelDateDurationBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAA2B;AAE3B,oBAA4C;AAWrC,MAAM,+BACJ,+BACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,gBAAgB,iBAAiB;AAAA,EAC9C;AAAA;AAAA,EAGS,MACR,OACmD;AACnD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,wBAAuF,wBAAa;AAAA,EAChH,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,aAAa,MAAe;AAC3C,SAAO,IAAI,uBAAuB,QAAQ,EAAE;AAC7C;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/auth/strategies/local/generatePasswordSaltHash.ts"],"sourcesContent":["import crypto from 'crypto'\n\nimport type { SanitizedCollectionConfig } from '../../../collections/config/types.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\nimport { ValidationError } from '../../../errors/index.js'\nimport { password } from '../../../fields/validations.js'\n\nfunction randomBytes(): Promise<Buffer> {\n return new Promise((resolve, reject) =>\n crypto.randomBytes(32, (err, saltBuffer) => (err ? reject(err) : resolve(saltBuffer))),\n )\n}\n\nfunction pbkdf2Promisified(password: string, salt: string): Promise<Buffer> {\n return new Promise((resolve, reject) =>\n crypto.pbkdf2(password, salt, 25000, 512, 'sha256', (err, hashRaw) =>\n err ? reject(err) : resolve(hashRaw),\n ),\n )\n}\n\ntype Args = {\n collection: SanitizedCollectionConfig\n password: string\n req: PayloadRequest\n}\n\nexport const generatePasswordSaltHash = async ({\n collection,\n password: passwordToSet,\n req,\n}: Args): Promise<{ hash: string; salt: string }> => {\n const validationResult = password(passwordToSet, {\n name: 'password',\n type: 'text',\n blockData: {},\n data: {},\n event: 'submit',\n path: ['password'],\n preferences: { fields: {} },\n req,\n required: true,\n siblingData: {},\n })\n\n if (typeof validationResult === 'string') {\n throw new ValidationError({\n collection: collection?.slug,\n errors: [{ message: validationResult, path: 'password' }],\n })\n }\n\n const saltBuffer = await randomBytes()\n const salt = saltBuffer.toString('hex')\n\n const hashRaw = await pbkdf2Promisified(passwordToSet, salt)\n const hash = hashRaw.toString('hex')\n\n return { hash, salt }\n}\n"],"names":["crypto","ValidationError","password","randomBytes","Promise","resolve","reject","err","saltBuffer","pbkdf2Promisified","salt","pbkdf2","hashRaw","generatePasswordSaltHash","collection","passwordToSet","req","validationResult","name","type","blockData","data","event","path","preferences","fields","required","siblingData","slug","errors","message","toString","hash"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAK3B,SAASC,eAAe,QAAQ,2BAA0B;AAC1D,SAASC,QAAQ,QAAQ,iCAAgC;AAEzD,SAASC;IACP,OAAO,IAAIC,QAAQ,CAACC,SAASC,SAC3BN,OAAOG,WAAW,CAAC,IAAI,CAACI,KAAKC,aAAgBD,MAAMD,OAAOC,OAAOF,QAAQG;AAE7E;AAEA,SAASC,kBAAkBP,QAAgB,EAAEQ,IAAY;IACvD,OAAO,IAAIN,QAAQ,CAACC,SAASC,SAC3BN,OAAOW,MAAM,CAACT,UAAUQ,MAAM,OAAO,KAAK,UAAU,CAACH,KAAKK,UACxDL,MAAMD,OAAOC,OAAOF,QAAQO;AAGlC;AAQA,OAAO,MAAMC,2BAA2B,OAAO,EAC7CC,UAAU,EACVZ,UAAUa,aAAa,EACvBC,GAAG,EACE;IACL,MAAMC,mBAAmBf,SAASa,eAAe;QAC/CG,MAAM;QACNC,MAAM;QACNC,WAAW,CAAC;QACZC,MAAM,CAAC;QACPC,OAAO;QACPC,MAAM;YAAC;SAAW;QAClBC,aAAa;YAAEC,QAAQ,CAAC;QAAE;QAC1BT;QACAU,UAAU;QACVC,aAAa,CAAC;IAChB;IAEA,IAAI,OAAOV,qBAAqB,UAAU;QACxC,MAAM,IAAIhB,gBAAgB;YACxBa,YAAYA,YAAYc;YACxBC,QAAQ;gBAAC;oBAAEC,SAASb;oBAAkBM,MAAM;gBAAW;aAAE;QAC3D;IACF;IAEA,MAAMf,aAAa,MAAML;IACzB,MAAMO,OAAOF,WAAWuB,QAAQ,CAAC;IAEjC,MAAMnB,UAAU,MAAMH,kBAAkBM,eAAeL;IACvD,MAAMsB,OAAOpB,QAAQmB,QAAQ,CAAC;IAE9B,OAAO;QAAEC;QAAMtB;IAAK;AACtB,EAAC"}

View File

@@ -0,0 +1,11 @@
import { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js";
import { _ as _class_check_private_static_access } from "./_class_check_private_static_access.js";
import { _ as _class_check_private_static_field_descriptor } from "./_class_check_private_static_field_descriptor.js";
function _class_static_private_field_spec_get(receiver, classConstructor, descriptor) {
_class_check_private_static_access(receiver, classConstructor);
_class_check_private_static_field_descriptor(descriptor, "get");
return _class_apply_descriptor_get(receiver, descriptor);
}
export { _class_static_private_field_spec_get as _ };

View File

@@ -0,0 +1,125 @@
"use strict";
/**
* Copyright (c) 2017, Dirk-Jan Rutten
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeDateTimeString = exports.parseDateTime = exports.serializeDate = exports.parseDate = exports.serializeTimeString = exports.serializeTime = exports.parseTime = void 0;
// Parses an RFC 3339 compliant time-string into a Date.
// It does this by combining the current date with the time-string
// to create a new Date instance.
//
// Example:
// Suppose the current date is 2016-01-01, then
// parseTime('11:00:12Z') parses to a Date corresponding to
// 2016-01-01T11:00:12Z.
const parseTime = (time) => {
const currentDateString = new Date().toISOString();
return new Date(currentDateString.substr(0, currentDateString.indexOf('T') + 1) + time);
};
exports.parseTime = parseTime;
// Serializes a Date into an RFC 3339 compliant time-string in the
// format hh:mm:ss.sssZ.
const serializeTime = (date) => {
const dateTimeString = date.toISOString();
return dateTimeString.substr(dateTimeString.indexOf('T') + 1);
};
exports.serializeTime = serializeTime;
// Serializes an RFC 3339 compliant time-string by shifting
// it to UTC.
const serializeTimeString = (time) => {
// If already formatted to UTC then return the time string
if (time.indexOf('Z') !== -1) {
return time;
}
else {
// These are time-strings with timezone information,
// these need to be shifted to UTC.
// Convert to UTC time string in
// format hh:mm:ss.sssZ.
const date = (0, exports.parseTime)(time);
let timeUTC = (0, exports.serializeTime)(date);
// Regex to look for fractional second part in time string
// such as 00:00:00.345+01:00
const regexFracSec = /\.\d{1,}/;
// Retrieve the fractional second part of the time
// string if it exists.
const fractionalPart = time.match(regexFracSec);
if (fractionalPart == null) {
// These are time-strings without the fractional
// seconds. So we remove them from the UTC time-string.
timeUTC = timeUTC.replace(regexFracSec, '');
return timeUTC;
}
else {
// These are time-string with fractional seconds.
// Make sure that we inject the fractional
// second part back in. The `timeUTC` variable
// has millisecond precision, we may want more or less
// depending on the string that was passed.
timeUTC = timeUTC.replace(regexFracSec, fractionalPart[0]);
return timeUTC;
}
}
};
exports.serializeTimeString = serializeTimeString;
// Parses an RFC 3339 compliant date-string into a Date.
//
// Example:
// parseDate('2016-01-01') parses to a Date corresponding to
// 2016-01-01T00:00:00.000Z.
const parseDate = (date) => {
return new Date(date);
};
exports.parseDate = parseDate;
// Serializes a Date into a RFC 3339 compliant date-string
// in the format YYYY-MM-DD.
const serializeDate = (date) => {
return date.toISOString().split('T')[0];
};
exports.serializeDate = serializeDate;
// Parses an RFC 3339 compliant date-time-string into a Date.
const parseDateTime = (dateTime) => {
return new Date(dateTime);
};
exports.parseDateTime = parseDateTime;
// Serializes an RFC 3339 compliant date-time-string by shifting
// it to UTC.
const serializeDateTimeString = (dateTime) => {
// If already formatted to UTC then return the time string
if (dateTime.indexOf('Z') !== -1) {
return new Date(dateTime);
}
else {
// These are time-strings with timezone information,
// these need to be shifted to UTC.
// Convert to UTC time string in
// format YYYY-MM-DDThh:mm:ss.sssZ.
let dateTimeUTC = new Date(dateTime).toISOString();
// Regex to look for fractional second part in date-time string
const regexFracSec = /\.\d{1,}/;
// Retrieve the fractional second part of the time
// string if it exists.
const fractionalPart = dateTime.match(regexFracSec);
if (fractionalPart == null) {
// The date-time-string has no fractional part,
// so we remove it from the dateTimeUTC variable.
dateTimeUTC = dateTimeUTC.replace(regexFracSec, '');
return new Date(dateTimeUTC);
}
else {
// These are datetime-string with fractional seconds.
// Make sure that we inject the fractional
// second part back in. The `dateTimeUTC` variable
// has millisecond precision, we may want more or less
// depending on the string that was passed.
dateTimeUTC = dateTimeUTC.replace(regexFracSec, fractionalPart[0]);
return new Date(dateTimeUTC);
}
}
};
exports.serializeDateTimeString = serializeDateTimeString;

View File

@@ -0,0 +1,10 @@
"use strict";
exports.addBusinessDays = void 0;
var _index = require("../addBusinessDays.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const addBusinessDays = (exports.addBusinessDays = (0, _index2.convertToFP)(
_index.addBusinessDays,
2,
));

View File

@@ -0,0 +1,40 @@
{
"name": "@swc/types",
"packageManager": "yarn@4.0.2",
"version": "0.1.25",
"description": "Typings for the swc project.",
"types": "./index.d.ts",
"sideEffects": false,
"scripts": {
"build": "tsc",
"prepublishOnly": "yarn build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/swc-project/swc.git"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"files": [
"*.js",
"*.d.ts"
],
"keywords": [
"swc",
"types"
],
"author": "강동윤 <kdy1997.dev@gmail.com>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/swc-project/swc/issues"
},
"homepage": "https://swc.rs",
"devDependencies": {
"typescript": "^5.2.2"
},
"dependencies": {
"@swc/counter": "^0.1.3"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"static.cjs","names":["token: string | null","access_token"],"sources":["../../src/auth/static.ts"],"sourcesContent":["import type { DirectusClient } from '../types/client.js';\nimport type { StaticTokenClient } from './types.js';\n\n/**\n * Creates a client to authenticate with Directus using a static token.\n *\n * @param token static token.\n *\n * @returns A Directus static token client.\n */\nexport const staticToken = (access_token: string) => {\n\treturn <Schema>(_client: DirectusClient<Schema>): StaticTokenClient<Schema> => {\n\t\tlet token: string | null = access_token ?? null;\n\t\treturn {\n\t\t\tasync getToken() {\n\t\t\t\treturn token;\n\t\t\t},\n\t\t\tasync setToken(access_token: string | null) {\n\t\t\t\ttoken = access_token;\n\t\t\t},\n\t\t};\n\t};\n};\n"],"mappings":"AAUA,MAAa,EAAe,GACX,GAA+D,CAC9E,IAAIA,EAAuB,GAAgB,KAC3C,MAAO,CACN,MAAM,UAAW,CAChB,OAAO,GAER,MAAM,SAAS,EAA6B,CAC3C,EAAQC,GAET"}

View File

@@ -0,0 +1,44 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
// Source: https://www.unicode.org/cldr/charts/32/summary/te.html
// CLDR #1807 - #1811
const dateFormats = {
full: "d, MMMM y, EEEE",
long: "d MMMM, y",
medium: "d MMM, y",
short: "dd-MM-yy",
};
// CLDR #1807 - #1811
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
// CLDR #1815 - #1818
const dateTimeFormats = {
full: "{{date}} {{time}}'కి'",
long: "{{date}} {{time}}'కి'",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,37 @@
import { millisecondsInMinute } from "./constants.js";
import { toDate } from "./toDate.js";
/**
* The {@link addMinutes} function options.
*/
/**
* @name addMinutes
* @category Minute Helpers
* @summary Add the specified number of minutes to the given date.
*
* @description
* Add the specified number of minutes to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of minutes to be added.
* @param options - An object with options
*
* @returns The new date with the minutes added
*
* @example
* // Add 30 minutes to 10 July 2014 12:00:00:
* const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)
* //=> Thu Jul 10 2014 12:30:00
*/
export function addMinutes(date, amount, options) {
const _date = toDate(date, options?.in);
_date.setTime(_date.getTime() + amount * millisecondsInMinute);
return _date;
}
// Fallback for modularized imports:
export default addMinutes;

View File

@@ -0,0 +1,458 @@
# Changelog
## 7.5.4
### Patch Changes
- 680f6e8: Fix issue with not being able to cycle back to the start from the last element if there is a focusable web component inside the focus-trap ((#1068)[https://github.com/focus-trap/focus-trap/issues/1068])
## 7.5.3
### Patch Changes
- 203b322: Fix missing typings for initialFocus option ([#1060](https://github.com/focus-trap/focus-trap/issues/1060))
## 7.5.2
### Patch Changes
- b73eb02: Remove references to `Array.prototype.findLast()` not well supported in Safari ([#996](https://github.com/focus-trap/focus-trap/issues/996))
## 7.5.1
### Patch Changes
- d9e2546: Fix possible exception in new `Tabbable.getTabIndex()` when initializing trap
## 7.5.0
### Minor Changes
- 5e2f913: Adds support for nodes with a positive tabindex in single-container traps only ([#375](https://github.com/focus-trap/focus-trap/issues/375))
## 7.4.3
### Patch Changes
- 134678b: Ensure focus is kept inside the trap when focused element is removed from the DOM ([focus-trap/focus-trap-react#962](https://github.com/focus-trap/focus-trap-react/issues/962))
## 7.4.2
### Patch Changes
- db62ce3: Clicking on open shadowDOM components within a focus trap's container when `clickOutsideDeactivates=true` should not deactivate the focus trap. ([#959](https://github.com/focus-trap/focus-trap/issues/959))
## 7.4.1
### Patch Changes
- 4f720ff: Bump tabbable to v6.1.2 for nwsapi patch
## 7.4.0
### Minor Changes
- da97007: Added new onPost/Pause and onPost/Unpause hooks when un/pausing a trap (also called when auto-un/paused as a result of de/activating a second trap while another is currently active). ([focus-trap-react#948](https://github.com/focus-trap/focus-trap-react/issues/948))
## 7.3.1
### Patch Changes
- a00cfa5: Bump tabbable to v6.1.1 for JSDom fixes
## 7.3.0
### Minor Changes
- ae7129d: Bump tabbable to v6.1.0 adding support for the new HTML `inert` attribute in browsers that support it (NOTE: FireFox does not support it at this time). Also fixes a bug. See tabbable CHANGELOG for more info.
### Patch Changes
- a27ad58: Fix incorrect behavior of `returnFocusOnDeactivate` option when set to true (or defaulted to true) along with `clickOutsideDeactivates=true` and the outside click that deactivates is on a focusable node. Focus was remaining on that node instead of returning to the node focused just prior to activation. ([#893](https://github.com/focus-trap/focus-trap/issues/893))
## 7.2.0
### Minor Changes
- b0482af: Add new `isKeyForward()` and `isKeyBackward()` options ([#612](https://github.com/focus-trap/focus-trap/issues/612))
## 7.1.0
### Minor Changes
- 88cc9bc: Provide new `trapStack` option to make it possible to coordinate auto-activation/pausing between multiple `focus-trap` instances on the same page.
### Patch Changes
- 4f97b38: Bump tabbable to v6.0.1 for a bug fix. See tabbable's changelog for more details.
- f13de76: Mention special Safari setting to enable normal DOM-based tab order in README. [#783](https://github.com/focus-trap/focus-trap/issues/783)
## 7.0.0
### Major Changes
- 5b64423: Revised and clarified official browser support (still as broad and deep as _reasonably_ possible).
- 47f62ac: 🚨 **Breaking:** Tabbable dependency has been updated to v6.0.0 and contains a breaking change related to detached nodes with its default `displayCheck` setting. See tabbable's [changelog](https://github.com/focus-trap/tabbable/blob/master/CHANGELOG.md#600) for more information.
- 5b64423: 🚨 **Breaking:** Dropped support of IE browsers, all versions.
- IE11 was [officially retired](https://blogs.windows.com/windowsexperience/2022/06/15/internet-explorer-11-has-retired-and-is-officially-out-of-support-what-you-need-to-know/) on June 15, 2022 (6 weeks ago). There are no longer any versions of IE that are still maintained or even supported by Microsoft.
## 6.9.4
### Patch Changes
- f68882e: Fix docs and typings to clarify that initialFocus, fallbackFocus, and setReturnFocus options can be functions that also return selector strings.
## 6.9.3
### Patch Changes
- 8a8b1f1: Bump tabbable to v5.3.3 to pick up a small bug fix to web component (shadow DOM) support.
## 6.9.2
### Patch Changes
- ef0ce48: Handle unexpected param (true) passed as the value for the `initialFocus`, `fallbackFocus`, and `setReturnFocus` options: Ignore and perform default behavior.
## 6.9.1
### Patch Changes
- 83262a7: Bumps tabbable to v5.3.2 to pick-up a fix to `displayCheck=full` (default) option behavior that caused issues with detached nodes.
## 6.9.0
### Minor Changes
- 2a57e4b: Add new `trap.active` and `trap.paused` readonly state properties on the trap so that the trap's active/paused state can be queried.
### Patch Changes
- 8fd49df: Fixed bug where `clickOutsideDeactivate` handler would get called on the 'click' event even if the node clicked was in the trap. As with 'mousedown' and 'touchstart' events where this option is also used, the handler should only get called if the target node is _outside_ the trap.
- c32c60a: Fixed: onDeactivate, onPostDeactivate, and checkCanReturnFocus options originally given to createFocusTrap() were not being used by default when calling `trap.deactivate({...})` with an option set even if that option set didn't specify any overrides of these options.
## 6.8.1
### Patch Changes
- 7c86111:
- Bump tabbable to `^5.3.1` (fixing previous update which was incorrectly set to `5.3.0`).
- Fix `tabbableOptions` not being used in all internal uses of tabbable APIs.
- Expose `displayCheck` option in `tabbableOptions` typings and pass it through to tabbable APIs.
- Add info to README about testing traps in JSDom (which is not officially supported).
## 6.8.0
### Minor Changes
- 21458c9: Bumps tabbable to v5.3.0 and includes all changes from the past v6.8.0 beta releases. The big new feature is opt-in Shadow DOM support in tabbable, and a new `getShadowRoot` tabbable option exposed in a new `tabbableOptions` focus-trap config option.
- ⚠️ This will likely break your tests **if you're using JSDom** (e.g. with Jest). See [testing in JSDom](./README.md#testing-in-jsdom) for more info.
## 6.8.0-beta.2
- When updating tabbable nodes, make sure that `getShadowRoot` tabbable option is also passed to `focusable()`.
- Fix bug where having a tabbable node inside a web component in the middle of a tab sequence would cause the tab key to seemingly stop working just before focus should move to it ((#643)[https://github.com/focus-trap/focus-trap/issues/643]).
- Bumps tabbable to `v5.3.0-beta.1`
## 6.8.0-beta.1
- Previous beta didn't include new source. This one does.
## 6.8.0-beta.0
- Adds new `tabbableOptions` configuration option, which allows specifically for the new `getShadowRoot` Tabbable configuration option: `focusTrap.createFocusTrap(rootElement, { tabbableOptions: { getShadowRoot: (node) => closedShadowRoot } })`, for example (where your code has the reference to `closedShadowRoot` previously created on `node` which Tabbable cannot find on its own).
- Bumps tabbable to `v5.3.0-beta.0`
## 6.7.3
### Patch Changes
- ab20d3d: Fix issue with focusing negative tabindex node and then tabbing away when this node is _not_ the last node in the trap's container ((#611)[https://github.com/focus-trap/focus-trap/issues/611])
## 6.7.2
### Patch Changes
- c932330: Fixed bug where tabbing forward from an element with negative tabindex that is last in the trap would result in focus remaining on that element ([565](https://github.com/focus-trap/focus-trap/issues/565))
## 6.7.1
### Patch Changes
- 28a069f: Fix bug from #504 where it's no longer possible to create a trap without any options [#525]
## 6.7.0
### Minor Changes
- 893dd2c: Add `document` option to support focus traps inside `<iframe>` elements (#97)
- 244f0c1: Extend the `setReturnFocus` option to receive a reference to the element that had focus prior to the trap being activated when a function is specified. Additionally, the function can now return `false` to leave focus where it is at the time of deactivation. (#485)
### Patch Changes
- 60162eb: Fix bug where `KeyboardEvent` was not being passed to `escapeDeactivates` option when it's a function (#498)
- 7b6abfa: Fix how focus-trap determines the event's target, which was preventing traps inside open shadow DOMs from working properly (#496)
- 14b0ee8: Fix `initialFocus` option not supporting function returning `false` as documented (#490)
## 6.6.1
### Patch Changes
- 24063d7: Update tabbable to v5.2.1 to get bug fix for disabled fieldsets.
## 6.6.0
### Minor Changes
- 281e66c: Add option to allow no initial focus when trap activates via `initialFocus: false`
There may be cases where we don't want to focus the first tabbable element when a focus trap activates.
Examples use-cases:
- Modals/dialogs
- On mobile devices where "tabbing" doesn't make sense without a connected Bluetooth keyboard
In addition, this change ensures that any element inside the trap manually focused outside of `focus-trap` code will be brought back in focus if focus is somehow found outside of the trap.
Example usage:
When the trap activates, there will be no initially focused element inside the new trap.
```js
const focusTrap = createFocusTrap('#some-container', {
initialFocus: false,
});
```
- 75be463: `escapeDeactivates` can now be either a boolean (as before) or a function that takes an event and returns a boolean.
### Patch Changes
- e2294f0: Fix race condition when activating a second trap where initial focus in the second trap may be thwarted because pausing of first trap clears the `delayInitialFocus` timer created for the second trap before during its activation sequence.
## 6.5.1
### Patch Changes
- c38bf3f: onPostDeactivate should always be called even if returnFocus/OnDeactivate is disabled.
## 6.5.0
### Minor Changes
- 278e77e: Adding 4 new configuration event options to improve support for animated dialogs and animated focus trap triggers: `checkCanFocusTrap()`, `onPostActivate()`, `checkCanReturnFocus()`, and `onPostDeactivate()`.
### Patch Changes
- 8d11e15: Improve docs and types for most options, adding `SVGElement` as a supported type of "DOM node" since it supports the `focus()` method, same as `HTMLElement`.
## 6.4.0
### Minor Changes
- 21c82ce: Bump tabbable from 5.1.6 to 5.2.0. There should be no changes in behavior as a result of this upgrade as `focus-trap` does not currently leverage the new `displayCheck` option.
### Patch Changes
- 1baf62e: Fix focus trapped on initial focus container with tabindex=-1 when pressing shift+tab (#363)
## 6.3.0
### Minor Changes
- a882d62: `clickOutsideDeactivates` can now also be a function that returns a `boolean`, similar to `allowOutsideClick`. The function receives the `MouseEvent` that triggered the click. (#289)
### Patch Changes
- 4d67dee: Fix a focus escape when pressing TAB after hiding element with focus (#281)
- ca32014: Bump tabbable from 5.1.4 to 5.1.5
## 6.2.3
### Patch Changes
- 036a72e: Fix crash in IE due to use of `Array.findIndex()` not supported in that browser (#257)
## 6.2.2
### Patch Changes
- fd3f2d1: Fix a bug where a multi-container trap would cease to work if all tabbable nodes were removed from one of the containers (fixes #223). As a result, an error is now thrown if the trap is left in a state where none of its containers contain any tabbable nodes (unless a `fallbackFocus` node has been configured in the trap's options). Also, the most-recently-focused node is more reliably tracked now, should focus somehow escape the trap and be brought back in by the trap, resulting in the truly most-recently-focused node to regain focus if that ever happens.
## 6.2.1
### Patch Changes
- f0c2aff: Bump tabbable to [5.1.4](https://github.com/focus-trap/tabbable/blob/master/CHANGELOG.md#514) for bug fix.
- 2ba512b:
- Refactored code to use function declarations instead of hoisted functions (this should have no bearing on functionality in the build output included in `./dist`.
- Fixed bugs where `trap.activate()` and `trap.deactivate()` would not always return the trap (now they do in all circumstances).
- d26d2e1: Refactoring to use const/let, and simplify a few lines. This does NOT impact the build output published in `./dist`, however, and hence does not impact browser support.
## 6.2.0
### Minor Changes
- 2267d17: Adding support for multiple elements to be passed in #217
## 6.1.4
### Patch Changes
- 38b6b98: Update tabbable to [5.1.3](https://github.com/focus-trap/tabbable/blob/master/CHANGELOG.md#513) to get bug fixes related to detail and summary elements.
## 6.1.3
### Patch Changes
- 6a39217: Close the gap with #172 and bump `tabbable` to 5.1.2 which has a similar fix.
- 756c79d: Fix #172 (again): Transpile ESM bundle down to the same browser target used for the CJS and UMD bundles. ESM is just the module system, not the browser target.
## 6.1.2
### Patch Changes
- 00674dd: Fix #172: Transpile non-minified bundles so they are compatible with IE11.
- 679009b: Update tabbable dependency to 5.1.1 to get transpiled non-minified bundles.
## 6.1.1
### Patch Changes
- fe2b0ad: Fixed #103: `returnFocusOnDeactivate` is now respected on auto-deactivation with `clickOutsideDeactivates=true`.
## 6.1.0
### Minor Changes
- 5174ce1: Add delayInitialFocus option
### Patch Changes
- 53b906b: Change `prepublishOnly` script to `prepare` script so that it also runs if someone installs the package directly from the git repo (e.g. from your work in which you fixed a bug or added a feature you're waiting to get merged to master and published to NPM).
- 31bb28e: Update tabbable dependency to 5.1.0. The most significant update for focus-trap is a bug fix related to fixed-position containers.
## 6.0.1
### Patch Changes
- 694e2fa: Package main/module entries no longer point to minified bundles.
## 6.0.0
- Add boolean value support for `allowOutsideClick` option.
- New `preventScroll` feature to _prevent_ scrolling to the element getting focus if not in the viewport.
- Changed code formatting to use dangling commas where ES5 supports them.
- **BREAKING**: Updated [tabbable](https://github.com/focus-trap/tabbable/blob/master/CHANGELOG.md#500) dependency to the new 5.0.0 release which contains breaking changes to its `isTabbableRadio()` internal function.
- Help with tree shaking by having `package.json` state `sideEffects: false` to mark this module as having no side effects as a result of merely importing it.
- **BREAKING**: This `package.json`'s "main" no longer points to `./index.js` in the package (although it still points to a CJS module, so it's possible this actually doesn't break anything). It now has:
- "main": `dist/focus-trap.min.js` (the CJS bundle)
- "module": `dist/focus-trap.esm.min.js` (the **new ESM bundle**)
- the UMD is `dist/focus-trap.umd.min.js` if needed (convenient for loading directly in an older browser that doesn't support ESM)
- **NOTE:** The CJS build no longer provides a function as a default export. Use `const { createFocusTrap } = require('focus-trap');` to get the function from before.
- **NOTE:** The ESM build does not provide a default export. Use `import { createFocusTrap } from 'focus-trap';` to import the module.
- **New ESM Build**: Included in `dist/focus-trap.esm.*`.
- New UMD Build: Included in `dist/focus-trap.umd.*`.
## 5.1.0
- Add `setReturnFocus` option that allows you to set which element receives focus when the trap closes.
## 5.0.2
- Add `allowOutsideClick` option that allows you to pass a click event through, even when `clickOutsideDeactivates` is `false`.
## 5.0.0
- Update Tabbable to improve performance (see [Tabbable's changelog](https://github.com/davidtheclark/tabbable/blob/master/CHANGELOG.md)).
- **Breaking (kind of):** if the `onActivate` callback changes the list of tabbable nodes and the `initialFocus` option is not used, the initial focus will still go to the first element present before the callback.
- Improve performance of activating a trap.
- Register document-level event listeners as active (`passive: false`).
## 4.0.2
- Fix reference to root element that caused errors within Shadow DOM.
(Release 4.0.1 was a mistake, containing no changes.)
## 4.0.0
- **Breaking (kind of):** Focus trap now manages a queue of traps, so when a trap is paused because another trap activates, it will be unpaused when that other trap deactivates. If Trap A was automatically _paused_ because Trap B activated (existing behavior), when Trap B is deactivated Trap A will be automatically _unpaused_ (new behavior).
## 3.0.0
- **Breaking (kind of):** Update Tabbable to detect more elements and be more careful with radio buttons (see [Tabbable's changelog](https://github.com/davidtheclark/tabbable/blob/master/CHANGELOG.md)).
- **Breaking (kind of):** If `clickOutsideDeactivates` and `returnFocusOnDeactivate` are both `true`, focus will be returned to the pre-trap element only if the clicked element is not focusable.
## 2.4.6
- Add slight delay before moving focus to the first element in the trap. This should prevent an occasional bug caused when the first element in the trap will close the trap if it picks up on the event that triggered the trap's opening.
## 2.4.5
- Fix `"main"` field in `package.json`.
## 2.4.4
- Publish UMD build so people can download it from `unpkg.com`.
## 2.4.3
- Fixed: TypeScript signature for `activate` function.
## 2.4.2
- Added: TypeScript declaration file.
## 2.3.1
- Fixed: Activation does not re-focus already-focused node.
- Fixed: Tabbing works as expected when initially focused Node has a negative `tabindex` and is in the middle of other tabbable elements.
## 2.3.0
- Added: `initialFocus` and `fallbackFocus` options can take functions that return DOM nodes.
- Fixed: `pause` and `unpause` cannot accidentally add extra event listeners.
## 2.2.0
- Added/fixed, depending on your perspective: If focus is already inside the focus trap when it is activated, leave focus where it is instead of forcing it to the first tabbable node or `initialFocus`.
## 2.1.0
- Added: `fallbackFocus` option.
## 2.0.2
- Fixed: `clickOutsideDeactivates` no longer triggers deactivation when you click _inside_ the trap.
## 2.0.1
- Fix bug when activating multiple focus traps.
## 2.0.0
- Rewrote the thing, altering the API. Read the new docs please.
- Update `tabbable` to fix handling of traps with changing contents.
## 1.1.1
- Improve `clickOutsideDeactivates` functionality.
## 1.1.0
- Add `clickOutsideDeactivates` option.
- Add `escapeDeactivates` option.
## 1.0.2
- Make sure to `select()` `<input>` elements when they receive focus via tab.
## 1.0.1
- Fix buggy attempts to focus nodes that don't exist.
## 1.0.0
- Initial release.

View File

@@ -0,0 +1,35 @@
import { mixNumber } from '../../utils/mix/number.mjs';
import { complex } from '../../value/types/complex/index.mjs';
const correctBoxShadow = {
correct: (latest, { treeScale, projectionDelta }) => {
const original = latest;
const shadow = complex.parse(latest);
// TODO: Doesn't support multiple shadows
if (shadow.length > 5)
return original;
const template = complex.createTransformer(latest);
const offset = typeof shadow[0] !== "number" ? 1 : 0;
// Calculate the overall context scale
const xScale = projectionDelta.x.scale * treeScale.x;
const yScale = projectionDelta.y.scale * treeScale.y;
shadow[0 + offset] /= xScale;
shadow[1 + offset] /= yScale;
/**
* Ideally we'd correct x and y scales individually, but because blur and
* spread apply to both we have to take a scale average and apply that instead.
* We could potentially improve the outcome of this by incorporating the ratio between
* the two scales.
*/
const averageScale = mixNumber(xScale, yScale, 0.5);
// Blur
if (typeof shadow[2 + offset] === "number")
shadow[2 + offset] /= averageScale;
// Spread
if (typeof shadow[3 + offset] === "number")
shadow[3 + offset] /= averageScale;
return template(shadow);
},
};
export { correctBoxShadow };

View File

@@ -0,0 +1,39 @@
import React from 'react';
/**
* All fields are wrapped in a `FieldPathContext` provider by default.
* The `useFieldPath` hook will return this value if it exists, not the path the field was explicitly given.
* This means if you render a field directly, you will need to wrap it with a new `FieldPathContext` provider.
* Otherwise, it will return the parent's path, not the path it was explicitly given.
* @example
* ```tsx
* 'use client'
* import React from 'react'
* import { TextField, FieldPathContext } from '@payloadcms/ui'
* import type { TextFieldClientComponent } from 'payload'
*
* export const MyCustomField: TextFieldClientComponent = (props) => {
* return (
* <FieldPathContext value="path.to.some.other.field">
* <TextField {...props} />
* </FieldPathContext>
* )
* }
* ```
*
* @experimental This is an experimental API and may change at any time. Use at your own risk.
*/
export const FieldPathContext = React.createContext(undefined);
/**
* Gets the current field path from the nearest `FieldPathContext` provider.
* All fields are wrapped in this context by default.
*
* @experimental This is an experimental API and may change at any time. Use at your own risk.
*/
export const useFieldPath = () => {
const context = React.useContext(FieldPathContext);
if (!context) {
return;
}
return context;
};
//# sourceMappingURL=context.js.map

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareUser = createLucideIcon("SquareUser", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }],
["path", { d: "M7 21v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2", key: "1m6ac2" }]
]);
export { SquareUser as default };
//# sourceMappingURL=square-user.js.map

View File

@@ -0,0 +1,126 @@
import { entityKind } from "../entity.js";
import { SelectionProxyHandler } from "../selection-proxy.js";
import { getTableColumns } from "../utils.js";
import { QueryBuilder } from "./query-builders/query-builder.js";
import { mysqlTable } from "./table.js";
import { MySqlViewBase } from "./view-base.js";
import { MySqlViewConfig } from "./view-common.js";
class ViewBuilderCore {
constructor(name, schema) {
this.name = name;
this.schema = schema;
}
static [entityKind] = "MySqlViewBuilder";
config = {};
algorithm(algorithm) {
this.config.algorithm = algorithm;
return this;
}
sqlSecurity(sqlSecurity) {
this.config.sqlSecurity = sqlSecurity;
return this;
}
withCheckOption(withCheckOption) {
this.config.withCheckOption = withCheckOption ?? "cascaded";
return this;
}
}
class ViewBuilder extends ViewBuilderCore {
static [entityKind] = "MySqlViewBuilder";
as(qb) {
if (typeof qb === "function") {
qb = qb(new QueryBuilder());
}
const selectionProxy = new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
});
const aliasedSelection = new Proxy(qb.getSelectedFields(), selectionProxy);
return new Proxy(
new MySqlView({
mysqlConfig: this.config,
config: {
name: this.name,
schema: this.schema,
selectedFields: aliasedSelection,
query: qb.getSQL().inlineParams()
}
}),
selectionProxy
);
}
}
class ManualViewBuilder extends ViewBuilderCore {
static [entityKind] = "MySqlManualViewBuilder";
columns;
constructor(name, columns, schema) {
super(name, schema);
this.columns = getTableColumns(mysqlTable(name, columns));
}
existing() {
return new Proxy(
new MySqlView({
mysqlConfig: void 0,
config: {
name: this.name,
schema: this.schema,
selectedFields: this.columns,
query: void 0
}
}),
new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
as(query) {
return new Proxy(
new MySqlView({
mysqlConfig: this.config,
config: {
name: this.name,
schema: this.schema,
selectedFields: this.columns,
query: query.inlineParams()
}
}),
new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
}
class MySqlView extends MySqlViewBase {
static [entityKind] = "MySqlView";
[MySqlViewConfig];
constructor({ mysqlConfig, config }) {
super(config);
this[MySqlViewConfig] = mysqlConfig;
}
}
function mysqlViewWithSchema(name, selection, schema) {
if (selection) {
return new ManualViewBuilder(name, selection, schema);
}
return new ViewBuilder(name, schema);
}
function mysqlView(name, selection) {
return mysqlViewWithSchema(name, selection, void 0);
}
export {
ManualViewBuilder,
MySqlView,
ViewBuilder,
ViewBuilderCore,
mysqlView,
mysqlViewWithSchema
};
//# sourceMappingURL=view.js.map

View File

@@ -0,0 +1,602 @@
export const jaTranslations = {
authentication: {
account: 'アカウント',
accountOfCurrentUser: '現在のユーザーアカウント',
accountVerified: 'アカウントが正常に確認されました。',
alreadyActivated: 'すでに有効です',
alreadyLoggedIn: 'すでにログインしています',
apiKey: 'API Key',
authenticated: '認証済み',
backToLogin: 'ログイン画面へ戻る',
beginCreateFirstUser: 'まずは、最初のユーザーを作成します。',
changePassword: 'パスワードを変更',
checkYourEmailForPasswordReset: 'そのメールアドレスがアカウントに関連付けられている場合、すぐにパスワードをリセットするための指示が送信されます。メールが受信トレイにない場合は、迷惑メールフォルダーまたはジャンクメールフォルダーを確認してください。',
confirmGeneration: '生成の確認',
confirmPassword: 'パスワードの確認',
createFirstUser: '最初のユーザーを作成',
emailNotValid: '入力されたメールアドレスは無効です。',
emailOrUsername: 'メールアドレスまたはユーザー名',
emailSent: 'メールが送信されました。',
emailVerified: 'メールアドレスが正常に確認されました。',
enableAPIKey: 'API Keyを許可',
failedToUnlock: 'ロックの解除に失敗しました。',
forceUnlock: '強制的にロックを解除',
forgotPassword: 'パスワード再設定',
forgotPasswordEmailInstructions: 'アカウントのメールアドレスを以下に入力してください。パスワードの再設定方法が記載されたメールが届きます。',
forgotPasswordQuestion: 'パスワードをお忘れですか?',
forgotPasswordUsernameInstructions: '以下にユーザー名を入力してください。パスワードのリセット方法については、ユーザー名に関連付けられたメールアドレスに送信されます。',
generate: '生成',
generateNewAPIKey: '新しいAPI Keyを生成',
generatingNewAPIKeyWillInvalidate: '新しいAPI Keyを生成すると、以前のAPI Keyは<1>無効</1>になります。よろしいですか?',
lockUntil: 'ロック期限',
logBackIn: '再ログイン',
loggedIn: '他のユーザーでログインするには、まず<0>ログアウト</0>する必要があります。',
loggedInChangePassword: 'パスワードを変更するには、<0>アカウント</0>にアクセスしてパスワードを編集してください。',
loggedOutInactivity: 'しばらく操作を行わなかったため、管理画面からログアウトしました。',
loggedOutSuccessfully: '管理画面からログアウトしました。',
loggingOut: 'ログアウト中...',
login: 'ログイン',
loginAttempts: 'ログイン試行回数',
loginUser: 'ログインユーザー',
loginWithAnotherUser: '他のユーザーでログインするには、まず<0>ログアウト</0>する必要があります。',
logOut: 'ログアウト',
logout: 'ログアウト',
logoutSuccessful: 'ログアウト成功。',
logoutUser: 'ログアウトユーザー',
newAccountCreated: '<a href="{{serverURL}}">{{serverURL}}</a>にアクセスするための新しいアカウントが作成されました。以下のリンクをクリックするか、ブラウザに以下のURLを貼り付けて、メールアドレスの確認を行ってください。<a href="{{verificationURL}}">{{verificationURL}}</a><br>メールアドレスの確認後に、正常にログインできるようになります。',
newAPIKeyGenerated: '新しいAPI Keyを生成しました。',
newPassword: '新しいパスワード',
passed: '認証が通りました',
passwordResetSuccessfully: 'パスワードが正常にリセットされました。',
resetPassword: 'パスワード再発行',
resetPasswordExpiration: 'パスワードの有効期限をリセット',
resetPasswordToken: 'パスワードのトークンをリセット',
resetYourPassword: 'パスワードの再設定',
stayLoggedIn: 'ログイン状態を維持',
successfullyRegisteredFirstUser: '最初のユーザーの登録が成功しました。',
successfullyUnlocked: 'ロックの解除に成功しました。',
tokenRefreshSuccessful: 'トークンの更新が成功しました。',
unableToVerify: '検証ができません',
username: 'ユーザー名',
usernameNotValid: '入力されたユーザー名は無効です',
verified: '検証済み',
verifiedSuccessfully: '検証が成功しました',
verify: '検証',
verifyUser: 'ユーザーの確認',
verifyYourEmail: 'メールアドレスの確認',
youAreInactive: 'しばらく操作を行わなかったため、セキュリティのために自動的にログアウトします。ログイン状態を維持しますか?',
youAreReceivingResetPassword: 'アカウントのパスワードリセットがリクエストされました。次のリンクをクリックする、または、ブラウザにリンクを貼り付けて、手続きを行ってください:',
youDidNotRequestPassword: 'もし望まない場合は、このメールを無視してください。パスワードは変更されません。'
},
dashboard: {
addWidget: 'ウィジェットを追加する',
deleteWidget: 'ウィジェット{{id}}を削除します',
searchWidgets: 'ウィジェットを検索...'
},
error: {
accountAlreadyActivated: 'このアカウントはすでに有効です。',
autosaving: 'このデータを自動保存する際に問題が発生しました。',
correctInvalidFields: '無効なフィールドを修正してください。',
deletingFile: 'ファイルの削除中にエラーが発生しました。',
deletingTitle: '{{title}} を削除する際にエラーが発生しました。接続を確認してからもう一度お試しください。',
documentNotFound: 'ID {{id}}のドキュメントが見つかりませんでした。削除されたか、存在しなかったか、またはアクセス権限がない可能性があります。',
emailOrPasswordIncorrect: 'メールアドレス、または、パスワードが正しくありません。',
followingFieldsInvalid_one: '次のフィールドは無効です:',
followingFieldsInvalid_other: '次のフィールドは無効です:',
incorrectCollection: '不正なコレクション',
insufficientClipboardPermissions: 'クリップボードへのアクセスが拒否されました。クリップボードの権限を確認してください。',
invalidClipboardData: '無効なクリップボードデータ。',
invalidFileType: '無効なファイル形式',
invalidFileTypeValue: '無効なファイル形式: {{value}}',
invalidRequestArgs: 'リクエストに無効な引数が渡されました: {{args}}',
loadingDocument: 'IDが {{id}} のデータを読み込む際に問題が発生しました。',
localesNotSaved_one: '次のロケールを保存できませんでした:',
localesNotSaved_other: '次のロケールを保存できませんでした:',
logoutFailed: 'ログアウトに失敗しました。',
missingEmail: 'メールアドレスが不足しています。',
missingIDOfDocument: '更新するデータのIDが不足しています。',
missingIDOfVersion: 'バージョンIDが不足しています。',
missingRequiredData: '必須データが不足しています。',
noFilesUploaded: 'ファイルがアップロードされていません。',
noMatchedField: '"{{label}}" に該当するフィールドがありません。',
notAllowedToAccessPage: 'この画面へのアクセスは許可されていません。',
notAllowedToPerformAction: 'このアクションは許可されていません。',
notFound: 'リクエストされたリソースは見つかりませんでした。',
noUser: 'ユーザーなし',
previewing: 'このデータをプレビューする際に問題が発生しました。',
problemUploadingFile: 'ファイルのアップロード中に問題が発生しました。',
restoringTitle: '{{title}}の復元中にエラーが発生しました。接続を確認して、もう一度お試しください。',
revertingDocument: 'このドキュメントを元に戻す際に問題が発生しました。',
tokenInvalidOrExpired: 'トークンが無効、または、有効期限が切れています。',
tokenNotProvided: 'トークンが提供されていません。',
unableToCopy: 'コピーできません。',
unableToDeleteCount: '{{total}} {{label}} から {{count}} を削除できません。',
unableToReindexCollection: 'コレクション {{collection}} の再インデックス中にエラーが発生しました。操作は中止されました。',
unableToUpdateCount: '{{total}} {{label}} のうち {{count}} 個を更新できません。',
unauthorized: '認証されていません。このリクエストを行うにはログインが必要です。',
unauthorizedAdmin: '管理画面へのアクセス権がないため、認証されていません。',
unknown: '不明なエラーが発生しました。',
unPublishingDocument: 'このデータを非公開にする際に問題が発生しました。',
unspecific: 'エラーが発生しました。',
unverifiedEmail: 'ログインする前にメールを確認してください。',
userEmailAlreadyRegistered: '指定されたメールアドレスのユーザーはすでに登録されています。',
userLocked: 'このユーザーは、ログイン試行回数が多すぎるため、ロックされています。',
usernameAlreadyRegistered: '指定されたユーザー名のユーザーはすでに登録されています。',
usernameOrPasswordIncorrect: '提供されたユーザー名またはパスワードが間違っています。',
valueMustBeUnique: 'ユニークな値である必要があります。',
verificationTokenInvalid: '認証トークンが無効です。'
},
fields: {
addLabel: '{{label}} を追加',
addLink: 'リンクを追加',
addNew: '新規追加',
addNewLabel: '{{label}} を新規追加',
addRelationship: 'リレーションシップを追加',
addUpload: 'アップロードを追加',
block: 'ブロック',
blocks: 'ブロック',
blockType: 'ブロックタイプ',
chooseBetweenCustomTextOrDocument: 'カスタムテキストのURLを入力するか、他のドキュメントにリンクするかを選択してください。',
chooseDocumentToLink: 'リンクするドキュメントを選択してください。',
chooseFromExisting: '既存から選択',
chooseLabel: '{{label}} を選択',
collapseAll: 'すべて閉じる',
customURL: 'カスタムURL',
editLabelData: '{{label}} データを編集',
editLink: 'リンクを編集',
editRelationship: 'リレーションシップを編集',
enterURL: 'URL を入力してください',
internalLink: '内部リンク',
itemsAndMore: '{{items}} 他{{count}}件',
labelRelationship: '{{label}} リレーションシップ',
latitude: '緯度',
linkedTo: '<0>{{label}}</0> にリンク',
linkType: 'リンクタイプ',
longitude: '経度',
newLabel: '新規 {{label}}',
openInNewTab: '新しいタブで開く',
passwordsDoNotMatch: 'パスワードが一致しません',
relatedDocument: 'リレーションデータ',
relationTo: 'リレーション',
removeRelationship: 'リレーションシップを削除',
removeUpload: '削除',
saveChanges: '変更を保存',
searchForBlock: 'ブロックを検索',
searchForLanguage: '言語を検索します',
selectExistingLabel: '既存 {{label}} を選択',
selectFieldsToEdit: '編集するフィールドを選択',
showAll: 'すべて開く',
swapRelationship: 'リレーションシップを入れ替え',
swapUpload: 'アップロードを入れ替え',
textToDisplay: '表示するテキスト',
toggleBlock: 'ブロックを切り替え',
uploadNewLabel: '新規 {{label}} アップロード'
},
folder: {
browseByFolder: 'フォルダーで閲覧する',
byFolder: 'フォルダー別に',
deleteFolder: 'フォルダーを削除する',
folderName: 'フォルダー名',
folders: 'フォルダー',
folderTypeDescription: 'このフォルダーに許可されるコレクションドキュメントのタイプを選択してください。',
itemHasBeenMoved: '{{title}}は{{folderName}}に移動されました',
itemHasBeenMovedToRoot: '{{title}}はルートフォルダーに移動されました',
itemsMovedToFolder: '{{title}}は{{folderName}}に移動されました',
itemsMovedToRoot: '{{title}}はルートフォルダーに移動しました。',
moveFolder: 'フォルダーを移動する',
moveItemsToFolderConfirmation: 'あなたは<1>{{count}} {{label}}</1>を<2>{{toFolder}}</2>に移動しようとしています。よろしいですか?',
moveItemsToRootConfirmation: 'あなたはまもなく<1>{{count}} {{label}}</1>をルートフォルダーに移動しようとしています。よろしいですか?',
moveItemToFolderConfirmation: '<1>{{title}}</1>を<2>{{toFolder}}</2>に移動しようとしています。よろしいですか?',
moveItemToRootConfirmation: 'あなたは<1>{{title}}</1>をルートフォルダーに移動しようとしています。よろしいですか?',
movingFromFolder: '{{title}}を{{fromFolder}}から移動します',
newFolder: '新しいフォルダー',
noFolder: 'フォルダーなし',
renameFolder: 'フォルダーの名前を変更する',
searchByNameInFolder: '{{folderName}}で名前を検索する',
selectFolderForItem: '{{title}}のためのフォルダーを選択してください。'
},
general: {
name: '名前',
aboutToDelete: '{{label}} <1>{{title}}</1> を削除します。よろしいですか?',
aboutToDeleteCount_many: '{{label}}を{{count}}つ削除しようとしています',
aboutToDeleteCount_one: '{{label}}を{{count}}つ削除しようとしています',
aboutToDeleteCount_other: '{{label}}を{{count}}つ削除しようとしています',
aboutToPermanentlyDelete: 'あなたは永久に{{label}} <1>{{title}}</1>を削除しようとしています。よろしいですか?',
aboutToPermanentlyDeleteTrash: 'あなたはゴミ箱から<0>{{count}}</0> <1>{{label}}</1>を永久に削除しようとしています。よろしいですか?',
aboutToRestore: 'あなたは{{label}} <1>{{title}}</1>を復元しようとしています。よろしいですか?',
aboutToRestoreAsDraft: 'あなたは {{label}} <1>{{title}}</1> を下書きとして復元しようとしています。よろしいですか?',
aboutToRestoreAsDraftCount: 'あなたはまもなく、{{count}} {{label}}を下書きとして復元しようとしています。',
aboutToRestoreCount: 'あなたはまもなく{{count}} {{label}}を復元しようとしています。',
aboutToTrash: 'あなたは{{label}} <1>{{title}}</1>をゴミ箱に移動しようとしています。よろしいですか?',
aboutToTrashCount: 'あなたはまもなく{{count}} {{label}}をゴミ箱に移動しようとしています。',
addBelow: '下に追加',
addFilter: '絞り込みを追加',
adminTheme: '管理画面のテーマ',
all: 'すべて',
allCollections: 'すべてのコレクション',
allLocales: 'すべてのロケール',
and: 'かつ',
anotherUser: '別のユーザー',
anotherUserTakenOver: '別のユーザーがこのドキュメントの編集を引き継ぎました。',
applyChanges: '変更を適用する',
ascending: '昇順',
automatic: '自動設定',
backToDashboard: 'ダッシュボードに戻る',
cancel: 'キャンセル',
changesNotSaved: '未保存の変更があります。このまま画面を離れると内容が失われます。',
clear: 'クリア',
clearAll: 'すべてクリア',
close: '閉じる',
collapse: '閉じる',
collections: 'コレクション',
columns: '行の表示',
columnToSort: '並び替え対象の行',
confirm: '実行',
confirmCopy: 'コピーを確認します',
confirmDeletion: '削除の確認',
confirmDuplication: '複製の確認',
confirmMove: '移動を確認してください',
confirmReindex: 'すべての{{collections}}を再インデックスしますか?',
confirmReindexAll: 'すべてのコレクションを再インデックスしますか?',
confirmReindexDescription: 'これにより既存のインデックスが削除され、{{collections}}コレクション内のドキュメントが再インデックスされます。',
confirmReindexDescriptionAll: 'これにより既存のインデックスが削除され、すべてのコレクション内のドキュメントが再インデックスされます。',
confirmRestoration: '復元を確認してください',
copied: 'コピーしました',
copy: 'コピー',
copyField: 'フィールドをコピー',
copying: 'コピーする',
copyRow: '行をコピー',
copyWarning: 'あなたは{{label}} {{title}}の{{to}}を{{from}}で上書きしようとしています。よろしいですか?',
create: '作成',
created: '作成',
createdAt: '作成日',
createNew: '新規作成',
createNewLabel: '{{label}} を新規作成',
creating: '作成中',
creatingNewLabel: '{{label}} を新規作成しています',
currentlyEditing: 'このドキュメントを編集中です。あなたが引き継ぐと、編集を続けることができなくなり、未保存の変更が失われる可能性があります。',
custom: 'カスタム',
dark: 'ダークモード',
dashboard: 'ダッシュボード',
delete: '削除',
deleted: '削除されました',
deletedAt: '削除された時間',
deletedCountSuccessfully: '{{count}}つの{{label}}を正常に削除しました。',
deletedSuccessfully: '正常に削除されました。',
deleteLabel: '{{label}}を削除します。',
deletePermanently: 'ゴミ箱をスキップして完全に削除します',
deleting: '削除しています...',
depth: '深さ',
descending: '降順',
deselectAllRows: 'すべての行の選択を解除します',
document: 'ドキュメント',
documentIsTrashed: 'この{{label}}は廃棄され、読み取り専用です。',
documentLocked: 'ドキュメントがロックされました',
documents: 'ドキュメント',
duplicate: '複製',
duplicateWithoutSaving: '変更を保存せずに複製',
edit: '編集',
editAll: 'すべてを編集',
editedSince: 'から編集',
editing: '編集',
editingLabel_many: '{{count}}つの{{label}}を編集しています',
editingLabel_one: '{{count}}つの{{label}}を編集しています',
editingLabel_other: '{{count}}つの{{label}}を編集しています',
editingTakenOver: '編集が引き継がれました',
editLabel: '{{label}} を編集',
email: 'メールアドレス',
emailAddress: 'メールアドレス',
emptyTrash: 'ゴミ箱を空にする',
emptyTrashLabel: '{{label}}のゴミ箱を空にする',
enterAValue: '値を入力',
error: 'エラー',
errors: 'エラー',
exitLivePreview: 'ライブプレビューを終了する',
export: 'エクスポート',
fallbackToDefaultLocale: 'デフォルトロケールへのフォールバック',
false: 'false',
filter: '絞り込み',
filters: '絞り込み',
filterWhere: '{{label}} の絞り込み',
globals: 'グローバル',
goBack: '戻る',
groupByLabel: '{{label}}でグループ化する',
import: 'インポート',
isEditing: '編集中',
item: 'アイテム',
items: 'アイテム',
language: '言語',
lastModified: '最終更新',
layout: 'レイアウト',
leaveAnyway: 'すぐに画面を離れる',
leaveWithoutSaving: '内容が保存されていません',
light: 'ライトモード',
livePreview: 'プレビュー',
loading: '読み込み中',
locale: 'ロケール',
locales: 'ロケール',
lock: 'ロック',
menu: 'メニュー',
moreOptions: 'より多くのオプション',
move: '移動します',
moveConfirm: 'あなたは{{count}} {{label}}を<1>{{destination}}</1>に移動しようとしています。よろしいですか?',
moveCount: '{{count}} {{label}}を移動してください',
moveDown: '下へ移動',
moveUp: '上へ移動',
moving: '移動中',
movingCount: '{{count}} {{label}}を移動します',
newLabel: '新しい {{label}}',
newPassword: '新しいパスワード',
next: '次',
no: 'いいえ',
noDateSelected: '日付が選択されていません',
noFiltersSet: '絞り込みが未設定です。',
noLabel: '<No {{label}}>',
none: 'なし',
noOptions: '選択肢なし',
noResults: '{{label}} データが見つかりませんでした。データが存在しない、または、絞り込みに一致するものがありません。',
noResultsDescription: '存在しないか、指定したフィルターに一致するものがありません。',
noResultsFound: '結果がありません。',
notFound: 'Not Found',
nothingFound: 'Nothing found',
noTrashResults: 'ゴミ箱に{{label}}はありません。',
noUpcomingEventsScheduled: '予定されているイベントはありません。',
noValue: '未設定',
of: '/',
only: 'のみ',
open: '開く',
or: 'または',
order: '表示順',
overwriteExistingData: '既存のフィールドデータを上書きする',
pageNotFound: 'ページが見つかりません',
password: 'パスワード',
pasteField: 'フィールドを貼り付け',
pasteRow: '行を貼り付け',
payloadSettings: 'Payload 設定',
permanentlyDelete: '永久に削除する',
permanentlyDeletedCountSuccessfully: '{{count}} {{label}}を正常に完全に削除しました。',
perPage: '表示件数: {{limit}}',
previous: '前の',
reindex: '再インデックス',
reindexingAll: 'すべての{{collections}}を再インデックスしています。',
remove: '削除',
rename: '名前を変更する',
reset: 'リセット',
resetPreferences: '設定をリセット',
resetPreferencesDescription: 'これにより、すべての設定がデフォルト設定にリセットされます。',
resettingPreferences: '設定をリセットしています。',
restore: '復元',
restoreAsPublished: '公開バージョンとして復元する',
restoredCountSuccessfully: '{{count}} {{label}} の復元に成功しました。',
restoring: '復元中...',
row: '列',
rows: '列',
save: '保存',
saveChanges: '変更を保存する',
saving: '保存しています...',
schedulePublishFor: '{{title}}の公開を予定する',
searchBy: '{{label}} で検索',
select: '選択してください。',
selectAll: 'すべての{{count}}つの{{label}}を選択',
selectAllRows: 'すべての行を選択します',
selectedCount: '{{count}}つの{{label}}を選択中',
selectLabel: '{{label}}を選択してください',
selectValue: '値を選択',
showAllLabel: 'すべての{{label}}を表示する',
sorryNotFound: '申し訳ありません。リクエストに対応する内容が見つかりませんでした。',
sort: '並び替え',
sortByLabelDirection: '{{label}}により並べ替え {{direction}}',
stayOnThisPage: 'この画面にとどまる',
submissionSuccessful: '送信が成功しました。',
submit: '送信',
submitting: '送信中...',
success: '成功',
successfullyCreated: '{{label}} が作成されました。',
successfullyDuplicated: '{{label}} が複製されました。',
successfullyReindexed: '{{collections}} から {{total}} 件のうち {{count}} 件を正常に再インデックスし、{{skips}} 件の下書きをスキップしました。',
takeOver: '引き継ぐ',
thisLanguage: 'Japanese',
time: '時間',
timezone: 'タイムゾーン',
titleDeleted: '{{label}} "{{title}}" が削除されました。',
titleRestored: '「{{label}}」"{{title}}" が正常に復元されました。',
titleTrashed: '{{label}} "{{title}}"がゴミ箱へ移動されました。',
trash: 'ゴミ箱',
trashedCountSuccessfully: '{{count}} {{label}}がゴミ箱に移動しました。',
true: 'true',
unauthorized: '未認証',
unlock: 'アンロック',
unsavedChanges: '保存されていない変更があります。続行する前に保存または破棄してください。',
unsavedChangesDuplicate: '未保存の変更があります。複製を続けますか?',
untitled: 'Untitled',
upcomingEvents: '今後のイベント',
updatedAt: '更新日',
updatedCountSuccessfully: '{{count}}つの{{label}}を正常に更新しました。',
updatedLabelSuccessfully: '{{label}}の更新に成功しました。',
updatedSuccessfully: '更新成功。',
updateForEveryone: '皆様への更新情報',
updating: '更新中',
uploading: 'アップロード中',
uploadingBulk: '{{current}} / {{total}} をアップロード中',
user: 'ユーザー',
username: 'ユーザー名',
users: 'ユーザー',
value: '値',
viewing: '閲覧',
viewReadOnly: '読み取り専用で表示',
welcome: 'ようこそ',
yes: 'はい'
},
localization: {
cannotCopySameLocale: '同じロケールにはコピーできません',
copyFrom: 'からコピーする',
copyFromTo: '{{from}}から{{to}}へのコピー',
copyTo: 'コピー先',
copyToLocale: 'ロケールにコピー',
localeToPublish: '公開する場所',
selectedLocales: '選択されたロケール',
selectLocaleToCopy: 'コピーするロケールを選択してください',
selectLocaleToDuplicate: '重複するロケールを選択してください'
},
operators: {
contains: '含む',
equals: '完全一致',
exists: '存在する',
intersects: '交差する',
isGreaterThan: 'より大きい',
isGreaterThanOrEqualTo: '以上',
isIn: '含まれる',
isLessThan: 'より小さい',
isLessThanOrEqualTo: '以下',
isLike: '部分一致',
isNotEqualTo: '完全一致しない',
isNotIn: '含まれない',
isNotLike: '部分一致しない',
near: '近く',
within: '範囲内'
},
upload: {
addFile: 'ファイルを追加',
addFiles: 'ファイルを追加する',
bulkUpload: '一括アップロード',
crop: 'クロップ',
cropToolDescription: '選択したエリアのコーナーをドラッグしたり、新たなエリアを描画したり、下記の値を調整してください。',
download: 'ダウンロード',
dragAndDrop: 'ファイルをドラッグ & ドロップする',
dragAndDropHere: 'または、このエリアにファイルをドラッグ & ドロップ',
editImage: '画像を編集する',
fileName: 'ファイル名',
fileSize: 'ファイル容量',
filesToUpload: 'アップロードするファイル',
fileToUpload: 'アップロードするファイル',
focalPoint: '焦点',
focalPointDescription: 'プレビュー上で焦点を直接ドラッグするか、下の値を調整してください。',
height: '高さ',
lessInfo: '詳細を隠す',
moreInfo: '詳細を表示',
noFile: 'ファイルなし',
pasteURL: 'URLを貼り付け',
previewSizes: 'プレビューサイズ',
selectCollectionToBrowse: '閲覧するコレクションを選択',
selectFile: 'ファイルを選択',
setCropArea: 'クロップエリアを設定する',
setFocalPoint: '焦点を設定する',
sizes: '容量',
sizesFor: '{{label}}のサイズ',
width: '横幅'
},
validation: {
emailAddress: '有効なメールアドレスを入力してください。',
enterNumber: '有効な数値を入力してください。',
fieldHasNo: '{{label}} が必要です。',
greaterThanMax: '{{value}}は許容最大{{label}}の{{max}}を超えています。',
invalidBlock: 'ブロック "{{block}}" は許可されていません。',
invalidBlocks: 'このフィールドには、もう許可されていないブロックが含まれています: {{blocks}}。',
invalidInput: '無効な入力値です。',
invalidSelection: '無効な選択です。',
invalidSelections: '次の無効な選択があります: ',
latitudeOutOfBounds: '緯度は-90から90の間でなければなりません。',
lessThanMin: '{{value}}は許容最小{{label}}の{{min}}未満です。',
limitReached: '制限に達しました。{{max}}個以上のアイテムを追加することはできません。',
longerThanMin: '{{minLength}} 文字以上にする必要があります。',
longitudeOutOfBounds: '経度は-180から180の間でなければなりません。',
notValidDate: '"{{value}}" は有効な日付ではありません。',
required: '必須フィールドです。',
requiresAtLeast: '少なくとも {{count}} {{label}} 以上が必要です。',
requiresNoMoreThan: '最大で {{count}} {{label}} 以下にする必要があります。',
requiresTwoNumbers: '2つの数値が必要です。',
shorterThanMax: '{{maxLength}} 文字以下にする必要があります。',
timezoneRequired: 'タイムゾーンが必要です。',
trueOrFalse: '"true" または "false" の値にする必要があります。',
username: '有効なユーザー名を入力してください。文字、数字、ハイフン、ピリオド、アンダースコアを使用できます。',
validUploadID: '有効なアップロードIDではありません。'
},
version: {
type: 'タイプ',
aboutToPublishSelection: '選択中のすべての{{label}}を公開しようとしています。よろしいですか?',
aboutToRestore: 'この {{label}} データを {{versionDate}} 時点のバージョンに復元しようとしています。',
aboutToRestoreGlobal: 'グローバルな {{label}} データを {{versionDate}} 時点のバージョンに復元しようとしています。',
aboutToRevertToPublished: 'このデータの変更を公開時の状態に戻そうとしています。よろしいですか?',
aboutToUnpublish: 'このデータを非公開にしようとしています。よろしいですか?',
aboutToUnpublishIn: 'あなたはこのドキュメントを{{locale}}で非公開にしようとしています。よろしいですか?',
aboutToUnpublishSelection: '選択したすべての{{label}}の公開を取り消そうとしています。よろしいですか?',
autosave: '自動保存',
autosavedSuccessfully: '自動保存に成功しました。',
autosavedVersion: '自動保存されたバージョン',
changed: '変更済み',
changedFieldsCount_one: '{{count}} 変更されたフィールド',
changedFieldsCount_other: '{{count}}つの変更されたフィールド',
compareVersion: 'バージョンを比較:',
compareVersions: 'バージョンを比較する',
comparingAgainst: '比較対象とする',
confirmPublish: '公開を確認する',
confirmRevertToSaved: '保存された状態に戻す確認',
confirmUnpublish: '非公開の確認',
confirmVersionRestoration: 'バージョン復元の確認',
currentDocumentStatus: '現在の {{docStatus}} データ',
currentDraft: '現行のドラフト',
currentlyPublished: '現在公開中',
currentlyViewing: '現在表示中',
currentPublishedVersion: '現在公開されているバージョン',
draft: 'ドラフト',
draftHasPublishedVersion: 'ドラフト(公開版が存在する)',
draftSavedSuccessfully: '下書きは正常に保存されました。',
lastSavedAgo: '{{distance}}前に最後に保存されました',
modifiedOnly: '変更済みのみ',
moreVersions: 'さらに多くのバージョン...',
noFurtherVersionsFound: 'その他のバージョンは見つかりませんでした。',
noLabelGroup: '名前のないグループ',
noRowsFound: '{{label}} は未設定です',
noRowsSelected: '選択された{{label}}はありません',
preview: 'プレビュー',
previouslyDraft: '以前はドラフトでした',
previouslyPublished: '以前に公開された',
previousVersion: '以前のバージョン',
problemRestoringVersion: 'このバージョンの復元に問題がありました。',
publish: '公開する',
publishAllLocales: 'すべてのロケールを公開する',
publishChanges: '変更内容を公開',
published: '公開済み',
publishIn: '{{locale}}で公開する',
publishing: '公開',
restoreAsDraft: '下書きとして復元',
restoredSuccessfully: '正常に復元されました。',
restoreThisVersion: 'このバージョンを復元',
restoring: '復元しています...',
reverting: '内容を戻しています...',
revertToPublished: '公開時の内容に戻す',
revertUnsuccessful: '元に戻すことはできませんでした。以前に公開されたバージョンが見つかりませんでした。',
saveDraft: 'ドラフトを保存',
scheduledSuccessfully: '正常にスケジュールされました。',
schedulePublish: 'スケジュール公開',
selectLocales: '表示するロケールを選択',
selectVersionToCompare: '比較するバージョンを選択',
showingVersionsFor: '次のバージョンを表示します:',
showLocales: 'ロケールを表示:',
specificVersion: '特定のバージョン',
status: 'ステータス',
unpublish: '非公開',
unpublished: '未公開',
unpublishedSuccessfully: '正常に未公開になりました。',
unpublishIn: '{{locale}}で非公開にする',
unpublishing: '非公開中...',
version: 'バージョン',
versionAgo: '{{distance}}前',
versionCount_many: '{{count}} バージョンがあります',
versionCount_none: 'バージョンがありません',
versionCount_one: '{{count}} バージョンがあります',
versionCount_other: '{{count}}バージョンが見つかりました',
versionID: 'バージョンID',
versions: 'バージョン',
viewingVersion: '表示バージョン: {{entityLabel}} {{documentTitle}}',
viewingVersionGlobal: '表示バージョン: グローバルな {{entityLabel}}',
viewingVersions: '表示バージョン: {{entityLabel}} {{documentTitle}}',
viewingVersionsGlobal: '表示バージョン: グローバルな {{entityLabel}}'
}
};
export const ja = {
dateFNSKey: 'ja',
translations: jaTranslations
};
//# sourceMappingURL=ja.js.map

View File

@@ -0,0 +1,165 @@
import { arrayMove } from '@dnd-kit/sortable';
import { ConfirmationModal, toast, useConfig, useModal, usePreferences, useServerFunctions } from '@payloadcms/ui';
import { PREFERENCE_KEYS } from 'payload/shared';
import React, { useCallback, useEffect, useState } from 'react';
import { RenderWidget } from './renderWidget/RenderWidget.js';
export function useDashboardLayout(initialLayout) {
const setLayoutPreference = useSetLayoutPreference();
const [isEditing, setIsEditing] = useState(false);
const {
widgets = []
} = useConfig().config.admin.dashboard ?? {};
const [currentLayout, setCurrentLayout] = useState(initialLayout);
const {
openModal
} = useModal();
const cancelModalSlug = 'cancel-dashboard-changes';
const {
serverFunction
} = useServerFunctions();
// Sync state when initialLayout prop changes (e.g., when query params change and server component re-renders)
useEffect(() => {
if (!isEditing) {
setCurrentLayout(initialLayout);
}
}, [initialLayout, isEditing]);
const saveLayout = useCallback(async () => {
try {
const layoutData = currentLayout.map(item => item.item);
setIsEditing(false);
await setLayoutPreference(layoutData);
} catch {
setIsEditing(true);
toast.error('Failed to save layout');
}
}, [setLayoutPreference, currentLayout]);
const resetLayout = useCallback(async () => {
try {
await setLayoutPreference(null);
const result = await serverFunction({
name: 'get-default-layout',
args: {}
});
setCurrentLayout(result.layout);
setIsEditing(false);
} catch {
toast.error('Failed to reset layout');
}
}, [setLayoutPreference, serverFunction]);
const performCancel = useCallback(() => {
setCurrentLayout(initialLayout);
setIsEditing(false);
}, [initialLayout]);
const cancel = useCallback(() => {
// Check if layout has changed
const hasChanges = currentLayout.length !== initialLayout.length || currentLayout.some((widget, index) => {
const initialWidget = initialLayout[index];
return !initialWidget || widget.item.id !== initialWidget.item.id || widget.item.width !== initialWidget.item.width;
});
// If there are changes, show confirmation modal
if (hasChanges) {
openModal(cancelModalSlug);
} else {
performCancel();
}
}, [currentLayout, initialLayout, openModal, cancelModalSlug, performCancel]);
const moveWidget = useCallback(({
moveFromIndex,
moveToIndex
}) => {
if (moveFromIndex === moveToIndex || moveFromIndex < 0 || moveToIndex < 0) {
return;
}
setCurrentLayout(prev => {
return arrayMove(prev, moveFromIndex, moveToIndex);
});
}, []);
const addWidget = useCallback(widgetSlug => {
if (!isEditing) {
return;
}
const widgetId = `${widgetSlug}-${Date.now()}`;
const widget = widgets.find(widget => widget.slug === widgetSlug);
// Create a new widget instance using RenderWidget
const newWidgetInstance = {
component: React.createElement(RenderWidget, {
widgetId
}),
item: {
id: widgetId,
maxWidth: widget?.maxWidth ?? 'full',
minWidth: widget?.minWidth ?? 'x-small',
width: widget?.minWidth ?? 'x-small'
}
};
setCurrentLayout(prev => [...prev, newWidgetInstance]);
// Scroll to the newly added widget after it's rendered and highlight it
setTimeout(() => {
const element = document.getElementById(widgetId);
if (element) {
element.scrollIntoView({
behavior: 'smooth',
block: 'center'
});
// Add highlight animation to the widget element
const widget = element.closest('.widget');
if (widget) {
widget.classList.add('widget--highlight');
// Remove the class after animation completes (1.5s fade out)
setTimeout(() => {
widget.classList.remove('widget--highlight');
}, 1500);
}
}
}, 100);
}, [isEditing, widgets]);
const deleteWidget = useCallback(widgetId => {
if (!isEditing) {
return;
}
setCurrentLayout(prev => prev.filter(item => item.item.id !== widgetId));
}, [isEditing]);
const resizeWidget = useCallback((widgetId, newWidth) => {
if (!isEditing) {
return;
}
setCurrentLayout(prev => prev.map(item => item.item.id === widgetId ? {
...item,
item: {
...item.item,
width: newWidth
}
} : item));
}, [isEditing]);
const cancelModal = React.createElement(ConfirmationModal, {
body: 'You have unsaved changes to your dashboard layout. Are you sure you want to discard them?',
confirmLabel: 'Discard',
heading: 'Discard changes?',
modalSlug: cancelModalSlug,
onConfirm: performCancel
});
return {
addWidget,
cancel,
cancelModal,
currentLayout,
deleteWidget,
isEditing,
moveWidget,
resetLayout,
resizeWidget,
saveLayout,
setIsEditing
};
}
function useSetLayoutPreference() {
const {
setPreference
} = usePreferences();
return useCallback(async layout => {
await setPreference(PREFERENCE_KEYS.DASHBOARD_LAYOUT, {
layouts: layout
}, false);
}, [setPreference]);
}
//# sourceMappingURL=useDashboardLayout.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/xata-http/driver.ts"],"sourcesContent":["import type { Cache } from '~/cache/core/cache.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { Logger } from '~/logger.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport { PgDatabase } from '~/pg-core/db.ts';\nimport { PgDialect } from '~/pg-core/dialect.ts';\nimport type { ExtractTablesWithRelations, RelationalSchemaConfig, TablesRelationalConfig } from '~/relations.ts';\nimport { createTableRelationsHelpers, extractTablesRelationalConfig } from '~/relations.ts';\nimport type { DrizzleConfig } from '~/utils.ts';\nimport type { XataHttpClient, XataHttpQueryResultHKT } from './session.ts';\nimport { XataHttpSession } from './session.ts';\n\nexport interface XataDriverOptions {\n\tlogger?: Logger;\n\tcache?: Cache;\n}\n\nexport class XataHttpDriver {\n\tstatic readonly [entityKind]: string = 'XataDriver';\n\n\tconstructor(\n\t\tprivate client: XataHttpClient,\n\t\tprivate dialect: PgDialect,\n\t\tprivate options: XataDriverOptions = {},\n\t) {\n\t\tthis.initMappers();\n\t}\n\n\tcreateSession(\n\t\tschema: RelationalSchemaConfig<TablesRelationalConfig> | undefined,\n\t): XataHttpSession<Record<string, unknown>, TablesRelationalConfig> {\n\t\treturn new XataHttpSession(this.client, this.dialect, schema, {\n\t\t\tlogger: this.options.logger,\n\t\t\tcache: this.options.cache,\n\t\t});\n\t}\n\n\tinitMappers() {\n\t\t// TODO: Add custom type parsers\n\t}\n}\n\nexport class XataHttpDatabase<TSchema extends Record<string, unknown> = Record<string, never>>\n\textends PgDatabase<XataHttpQueryResultHKT, TSchema>\n{\n\tstatic override readonly [entityKind]: string = 'XataHttpDatabase';\n\n\t/** @internal */\n\tdeclare readonly session: XataHttpSession<TSchema, ExtractTablesWithRelations<TSchema>>;\n}\n\nexport function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(\n\tclient: XataHttpClient,\n\tconfig: DrizzleConfig<TSchema> = {},\n): XataHttpDatabase<TSchema> & {\n\t$client: XataHttpClient;\n} {\n\tconst dialect = new PgDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(config.schema, createTableRelationsHelpers);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst driver = new XataHttpDriver(client, dialect, { logger, cache: config.cache });\n\tconst session = driver.createSession(schema);\n\n\tconst db = new XataHttpDatabase(\n\t\tdialect,\n\t\tsession,\n\t\tschema as RelationalSchemaConfig<ExtractTablesWithRelations<TSchema>> | undefined,\n\t);\n\t(<any> db).$client = client;\n\t(<any> db).$cache = config.cache;\n\tif ((<any> db).$cache) {\n\t\t(<any> db).$cache['invalidate'] = config.cache?.onMutate;\n\t}\n\n\treturn db as any;\n}\n"],"mappings":"AACA,SAAS,kBAAkB;AAE3B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAE1B,SAAS,6BAA6B,qCAAqC;AAG3E,SAAS,uBAAuB;AAOzB,MAAM,eAAe;AAAA,EAG3B,YACS,QACA,SACA,UAA6B,CAAC,GACrC;AAHO;AACA;AACA;AAER,SAAK,YAAY;AAAA,EAClB;AAAA,EARA,QAAiB,UAAU,IAAY;AAAA,EAUvC,cACC,QACmE;AACnE,WAAO,IAAI,gBAAgB,KAAK,QAAQ,KAAK,SAAS,QAAQ;AAAA,MAC7D,QAAQ,KAAK,QAAQ;AAAA,MACrB,OAAO,KAAK,QAAQ;AAAA,IACrB,CAAC;AAAA,EACF;AAAA,EAEA,cAAc;AAAA,EAEd;AACD;AAEO,MAAM,yBACJ,WACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAIjD;AAEO,SAAS,QACf,QACA,SAAiC,CAAC,GAGjC;AACD,QAAM,UAAU,IAAI,UAAU,EAAE,QAAQ,OAAO,OAAO,CAAC;AACvD,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM;AAC3B,aAAS,IAAI,cAAc;AAAA,EAC5B,WAAW,OAAO,WAAW,OAAO;AACnC,aAAS,OAAO;AAAA,EACjB;AAEA,MAAI;AACJ,MAAI,OAAO,QAAQ;AAClB,UAAM,eAAe,8BAA8B,OAAO,QAAQ,2BAA2B;AAC7F,aAAS;AAAA,MACR,YAAY,OAAO;AAAA,MACnB,QAAQ,aAAa;AAAA,MACrB,eAAe,aAAa;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,SAAS,IAAI,eAAe,QAAQ,SAAS,EAAE,QAAQ,OAAO,OAAO,MAAM,CAAC;AAClF,QAAM,UAAU,OAAO,cAAc,MAAM;AAE3C,QAAM,KAAK,IAAI;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACA,EAAO,GAAI,UAAU;AACrB,EAAO,GAAI,SAAS,OAAO;AAC3B,MAAW,GAAI,QAAQ;AACtB,IAAO,GAAI,OAAO,YAAY,IAAI,OAAO,OAAO;AAAA,EACjD;AAEA,SAAO;AACR;","names":[]}

View File

@@ -0,0 +1,577 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const { parseIdentifier } = require("./identifier");
/** @typedef {string | (string | ConditionalMapping)[]} DirectMapping */
/** @typedef {{ [k: string]: MappingValue }} ConditionalMapping */
/** @typedef {ConditionalMapping | DirectMapping | null} MappingValue */
/** @typedef {Record<string, MappingValue> | ConditionalMapping | DirectMapping} ExportsField */
/** @typedef {Record<string, MappingValue>} ImportsField */
/**
* Processing exports/imports field
* @callback FieldProcessor
* @param {string} request request
* @param {Set<string>} conditionNames condition names
* @returns {[string[], string | null]} resolved paths with used field
*/
/*
Example exports field:
{
".": "./main.js",
"./feature": {
"browser": "./feature-browser.js",
"default": "./feature.js"
}
}
Terminology:
Enhanced-resolve name keys ("." and "./feature") as exports field keys.
If value is string or string[], mapping is called as a direct mapping
and value called as a direct export.
If value is key-value object, mapping is called as a conditional mapping
and value called as a conditional export.
Key in conditional mapping is called condition name.
Conditional mapping nested in another conditional mapping is called nested mapping.
----------
Example imports field:
{
"#a": "./main.js",
"#moment": {
"browser": "./moment/index.js",
"default": "moment"
},
"#moment/": {
"browser": "./moment/",
"default": "moment/"
}
}
Terminology:
Enhanced-resolve name keys ("#a" and "#moment/", "#moment") as imports field keys.
If value is string or string[], mapping is called as a direct mapping
and value called as a direct export.
If value is key-value object, mapping is called as a conditional mapping
and value called as a conditional export.
Key in conditional mapping is called condition name.
Conditional mapping nested in another conditional mapping is called nested mapping.
*/
const slashCode = "/".charCodeAt(0);
const dotCode = ".".charCodeAt(0);
const hashCode = "#".charCodeAt(0);
const patternRegEx = /\*/g;
/**
* @param {string} a first string
* @param {string} b second string
* @returns {number} compare result
*/
function patternKeyCompare(a, b) {
const aPatternIndex = a.indexOf("*");
const bPatternIndex = b.indexOf("*");
const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1;
const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1;
if (baseLenA > baseLenB) return -1;
if (baseLenB > baseLenA) return 1;
if (aPatternIndex === -1) return 1;
if (bPatternIndex === -1) return -1;
if (a.length > b.length) return -1;
if (b.length > a.length) return 1;
return 0;
}
/**
* Trying to match request to field
* @param {string} request request
* @param {ExportsField | ImportsField} field exports or import field
* @returns {[MappingValue, string, boolean, boolean, string] | null} match or null, number is negative and one less when it's a folder mapping, number is request.length + 1 for direct mappings
*/
function findMatch(request, field) {
if (
Object.prototype.hasOwnProperty.call(field, request) &&
!request.includes("*") &&
!request.endsWith("/")
) {
const target = /** @type {{ [k: string]: MappingValue }} */ (field)[
request
];
return [target, "", false, false, request];
}
/** @type {string} */
let bestMatch = "";
/** @type {string | undefined} */
let bestMatchSubpath;
const keys = Object.getOwnPropertyNames(field);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const patternIndex = key.indexOf("*");
if (patternIndex !== -1 && request.startsWith(key.slice(0, patternIndex))) {
const patternTrailer = key.slice(patternIndex + 1);
if (
request.length >= key.length &&
request.endsWith(patternTrailer) &&
patternKeyCompare(bestMatch, key) === 1 &&
key.lastIndexOf("*") === patternIndex
) {
bestMatch = key;
bestMatchSubpath = request.slice(
patternIndex,
request.length - patternTrailer.length,
);
}
}
// For legacy `./foo/`
else if (
key[key.length - 1] === "/" &&
request.startsWith(key) &&
patternKeyCompare(bestMatch, key) === 1
) {
bestMatch = key;
bestMatchSubpath = request.slice(key.length);
}
}
if (bestMatch === "") return null;
const target =
/** @type {{ [k: string]: MappingValue }} */
(field)[bestMatch];
const isSubpathMapping = bestMatch.endsWith("/");
const isPattern = bestMatch.includes("*");
return [
target,
/** @type {string} */ (bestMatchSubpath),
isSubpathMapping,
isPattern,
bestMatch,
];
}
/**
* @param {ConditionalMapping | DirectMapping | null} mapping mapping
* @returns {boolean} is conditional mapping
*/
function isConditionalMapping(mapping) {
return (
mapping !== null && typeof mapping === "object" && !Array.isArray(mapping)
);
}
/**
* @param {ConditionalMapping} conditionalMapping_ conditional mapping
* @param {Set<string>} conditionNames condition names
* @returns {DirectMapping | null} direct mapping if found
*/
function conditionalMapping(conditionalMapping_, conditionNames) {
/** @type {[ConditionalMapping, string[], number][]} */
const lookup = [[conditionalMapping_, Object.keys(conditionalMapping_), 0]];
loop: while (lookup.length > 0) {
const [mapping, conditions, j] = lookup[lookup.length - 1];
for (let i = j; i < conditions.length; i++) {
const condition = conditions[i];
if (condition === "default") {
const innerMapping = mapping[condition];
// is nested
if (isConditionalMapping(innerMapping)) {
const conditionalMapping = /** @type {ConditionalMapping} */ (
innerMapping
);
lookup[lookup.length - 1][2] = i + 1;
lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]);
continue loop;
}
return /** @type {DirectMapping} */ (innerMapping);
}
if (conditionNames.has(condition)) {
const innerMapping = mapping[condition];
// is nested
if (isConditionalMapping(innerMapping)) {
const conditionalMapping = /** @type {ConditionalMapping} */ (
innerMapping
);
lookup[lookup.length - 1][2] = i + 1;
lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]);
continue loop;
}
return /** @type {DirectMapping} */ (innerMapping);
}
}
lookup.pop();
}
return null;
}
/**
* @param {string | undefined} remainingRequest remaining request when folder mapping, undefined for file mappings
* @param {boolean} isPattern true, if mapping is a pattern (contains "*")
* @param {boolean} isSubpathMapping true, for subpath mappings
* @param {string} mappingTarget direct export
* @param {(d: string, f: boolean) => void} assert asserting direct value
* @returns {string} mapping result
*/
function targetMapping(
remainingRequest,
isPattern,
isSubpathMapping,
mappingTarget,
assert,
) {
if (remainingRequest === undefined) {
assert(mappingTarget, false);
return mappingTarget;
}
if (isSubpathMapping) {
assert(mappingTarget, true);
return mappingTarget + remainingRequest;
}
assert(mappingTarget, false);
let result = mappingTarget;
if (isPattern) {
result = result.replace(
patternRegEx,
remainingRequest.replace(/\$/g, "$$"),
);
}
return result;
}
/**
* @param {string | undefined} remainingRequest remaining request when folder mapping, undefined for file mappings
* @param {boolean} isPattern true, if mapping is a pattern (contains "*")
* @param {boolean} isSubpathMapping true, for subpath mappings
* @param {DirectMapping | null} mappingTarget direct export
* @param {Set<string>} conditionNames condition names
* @param {(d: string, f: boolean) => void} assert asserting direct value
* @returns {string[]} mapping result
*/
function directMapping(
remainingRequest,
isPattern,
isSubpathMapping,
mappingTarget,
conditionNames,
assert,
) {
if (mappingTarget === null) return [];
if (typeof mappingTarget === "string") {
return [
targetMapping(
remainingRequest,
isPattern,
isSubpathMapping,
mappingTarget,
assert,
),
];
}
/** @type {string[]} */
const targets = [];
for (const exp of mappingTarget) {
if (typeof exp === "string") {
targets.push(
targetMapping(
remainingRequest,
isPattern,
isSubpathMapping,
exp,
assert,
),
);
continue;
}
const mapping = conditionalMapping(exp, conditionNames);
if (!mapping) continue;
const innerExports = directMapping(
remainingRequest,
isPattern,
isSubpathMapping,
mapping,
conditionNames,
assert,
);
for (const innerExport of innerExports) {
targets.push(innerExport);
}
}
return targets;
}
/**
* @param {ExportsField | ImportsField} field root
* @param {(s: string) => string} normalizeRequest Normalize request, for `imports` field it adds `#`, for `exports` field it adds `.` or `./`
* @param {(s: string) => string} assertRequest assertRequest
* @param {(s: string, f: boolean) => void} assertTarget assertTarget
* @returns {FieldProcessor} field processor
*/
function createFieldProcessor(
field,
normalizeRequest,
assertRequest,
assertTarget,
) {
return function fieldProcessor(request, conditionNames) {
request = assertRequest(request);
const match = findMatch(normalizeRequest(request), field);
if (match === null) return [[], null];
const [mapping, remainingRequest, isSubpathMapping, isPattern, usedField] =
match;
/** @type {DirectMapping | null} */
let direct = null;
if (isConditionalMapping(mapping)) {
direct = conditionalMapping(
/** @type {ConditionalMapping} */ (mapping),
conditionNames,
);
// matching not found
if (direct === null) return [[], null];
} else {
direct = /** @type {DirectMapping} */ (mapping);
}
return [
directMapping(
remainingRequest,
isPattern,
isSubpathMapping,
direct,
conditionNames,
assertTarget,
),
usedField,
];
};
}
/**
* @param {string} request request
* @returns {string} updated request
*/
function assertExportsFieldRequest(request) {
if (request.charCodeAt(0) !== dotCode) {
throw new Error('Request should be relative path and start with "."');
}
if (request.length === 1) return "";
if (request.charCodeAt(1) !== slashCode) {
throw new Error('Request should be relative path and start with "./"');
}
if (request.charCodeAt(request.length - 1) === slashCode) {
throw new Error("Only requesting file allowed");
}
return request.slice(2);
}
/**
* @param {ExportsField} field exports field
* @returns {ExportsField} normalized exports field
*/
function buildExportsField(field) {
// handle syntax sugar, if exports field is direct mapping for "."
if (typeof field === "string" || Array.isArray(field)) {
return { ".": field };
}
const keys = Object.keys(field);
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
if (key.charCodeAt(0) !== dotCode) {
// handle syntax sugar, if exports field is conditional mapping for "."
if (i === 0) {
while (i < keys.length) {
const charCode = keys[i].charCodeAt(0);
if (charCode === dotCode || charCode === slashCode) {
throw new Error(
`Exports field key should be relative path and start with "." (key: ${JSON.stringify(
key,
)})`,
);
}
i++;
}
return { ".": field };
}
throw new Error(
`Exports field key should be relative path and start with "." (key: ${JSON.stringify(
key,
)})`,
);
}
if (key.length === 1) {
continue;
}
if (key.charCodeAt(1) !== slashCode) {
throw new Error(
`Exports field key should be relative path and start with "./" (key: ${JSON.stringify(
key,
)})`,
);
}
}
return field;
}
/**
* @param {string} exp export target
* @param {boolean} expectFolder is folder expected
*/
function assertExportTarget(exp, expectFolder) {
const parsedIdentifier = parseIdentifier(exp);
if (!parsedIdentifier) {
return;
}
const [relativePath] = parsedIdentifier;
const isFolder =
relativePath.charCodeAt(relativePath.length - 1) === slashCode;
if (isFolder !== expectFolder) {
throw new Error(
expectFolder
? `Expecting folder to folder mapping. ${JSON.stringify(
exp,
)} should end with "/"`
: `Expecting file to file mapping. ${JSON.stringify(
exp,
)} should not end with "/"`,
);
}
}
/**
* @param {ExportsField} exportsField the exports field
* @returns {FieldProcessor} process callback
*/
module.exports.processExportsField = function processExportsField(
exportsField,
) {
return createFieldProcessor(
buildExportsField(exportsField),
(request) => (request.length === 0 ? "." : `./${request}`),
assertExportsFieldRequest,
assertExportTarget,
);
};
/**
* @param {string} request request
* @returns {string} updated request
*/
function assertImportsFieldRequest(request) {
if (request.charCodeAt(0) !== hashCode) {
throw new Error('Request should start with "#"');
}
if (request.length === 1) {
throw new Error("Request should have at least 2 characters");
}
// Note: #/ patterns are now allowed per Node.js PR #60864
// https://github.com/nodejs/node/pull/60864
if (request.charCodeAt(request.length - 1) === slashCode) {
throw new Error("Only requesting file allowed");
}
return request.slice(1);
}
/**
* @param {string} imp import target
* @param {boolean} expectFolder is folder expected
*/
function assertImportTarget(imp, expectFolder) {
const parsedIdentifier = parseIdentifier(imp);
if (!parsedIdentifier) {
return;
}
const [relativePath] = parsedIdentifier;
const isFolder =
relativePath.charCodeAt(relativePath.length - 1) === slashCode;
if (isFolder !== expectFolder) {
throw new Error(
expectFolder
? `Expecting folder to folder mapping. ${JSON.stringify(
imp,
)} should end with "/"`
: `Expecting file to file mapping. ${JSON.stringify(
imp,
)} should not end with "/"`,
);
}
}
/**
* @param {ImportsField} importsField the exports field
* @returns {FieldProcessor} process callback
*/
module.exports.processImportsField = function processImportsField(
importsField,
) {
return createFieldProcessor(
importsField,
(request) => `#${request}`,
assertImportsFieldRequest,
assertImportTarget,
);
};

View File

@@ -0,0 +1,320 @@
import type { ReplayRecordingMode, Span } from '@sentry/core';
import { ClickDetector } from './coreHandlers/handleClick';
import type { AddEventResult, AddUpdateCallback, AllPerformanceEntry, AllPerformanceEntryData, EventBuffer, InternalEventContext, RecordingEvent, RecordingOptions, ReplayContainer as ReplayContainerInterface, ReplayPerformanceEntry, ReplayPluginOptions, SendBufferedReplayOptions, Session, Timeouts } from './types';
import type { SKIPPED } from './util/throttle';
import { THROTTLED } from './util/throttle';
/**
* The main replay container class, which holds all the state and methods for recording and sending replays.
*/
export declare class ReplayContainer implements ReplayContainerInterface {
eventBuffer: EventBuffer | null;
performanceEntries: AllPerformanceEntry[];
replayPerformanceEntries: ReplayPerformanceEntry<AllPerformanceEntryData>[];
session: Session | undefined;
clickDetector: ClickDetector | undefined;
/**
* Recording can happen in one of two modes:
* - session: Record the whole session, sending it continuously
* - buffer: Always keep the last 60s of recording, requires:
* - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs
* - or calling `flush()` to send the replay
*/
recordingMode: ReplayRecordingMode;
/**
* The current or last active span.
* This is only available when performance is enabled.
*/
lastActiveSpan?: Span;
/**
* These are here so we can overwrite them in tests etc.
* @hidden
*/
readonly timeouts: Timeouts;
/** The replay has to be manually started, because no sample rate (neither session or error) was provided. */
private _requiresManualStart;
private _throttledAddEvent;
/**
* Options to pass to `rrweb.record()`
*/
private readonly _recordingOptions;
private readonly _options;
private _performanceCleanupCallback?;
private _debouncedFlush;
private _flushLock;
/**
* Timestamp of the last user activity. This lives across sessions.
*/
private _lastActivity;
/**
* Is the integration currently active?
*/
private _isEnabled;
/**
* Paused is a state where:
* - DOM Recording is not listening at all
* - Nothing will be added to event buffer (e.g. core SDK events)
*/
private _isPaused;
/**
* Have we attached listeners to the core SDK?
* Note we have to track this as there is no way to remove instrumentation handlers.
*/
private _hasInitializedCoreListeners;
/**
* Function to stop recording
*/
private _stopRecording;
private _context;
/**
* Internal use for canvas recording options
*/
private _canvas;
/**
* Handle when visibility of the page content changes. Opening a new tab will
* cause the state to change to hidden because of content of current page will
* be hidden. Likewise, moving a different window to cover the contents of the
* page will also trigger a change to a hidden state.
*/
private _handleVisibilityChange;
/**
* Handle when page is blurred
*/
private _handleWindowBlur;
/**
* Handle when page is focused
*/
private _handleWindowFocus;
/** Ensure page remains active when a key is pressed. */
private _handleKeyboardEvent;
constructor({ options, recordingOptions, }: {
options: ReplayPluginOptions;
recordingOptions: RecordingOptions;
});
/** Get the event context. */
getContext(): InternalEventContext;
/** If recording is currently enabled. */
isEnabled(): boolean;
/** If recording is currently paused. */
isPaused(): boolean;
/**
* Determine if canvas recording is enabled
*/
isRecordingCanvas(): boolean;
/** Get the replay integration options. */
getOptions(): ReplayPluginOptions;
/** A wrapper to conditionally capture exceptions. */
handleException(error: unknown): void;
/**
* Initializes the plugin based on sampling configuration. Should not be
* called outside of constructor.
*/
initializeSampling(previousSessionId?: string): void;
/**
* Start a replay regardless of sampling rate. Calling this will always
* create a new session. Will log a message if replay is already in progress.
*
* Creates or loads a session, attaches listeners to varying events (DOM,
* _performanceObserver, Recording, Sentry SDK, etc)
*/
start(): void;
/**
* Start replay buffering. Buffers until `flush()` is called or, if
* `replaysOnErrorSampleRate` > 0, an error occurs.
*/
startBuffering(): void;
/**
* Start recording.
*
* Note that this will cause a new DOM checkout
*/
startRecording(): void;
/**
* Stops the recording, if it was running.
*
* Returns true if it was previously stopped, or is now stopped,
* otherwise false.
*/
stopRecording(): boolean;
/**
* Currently, this needs to be manually called (e.g. for tests). Sentry SDK
* does not support a teardown
*/
stop({ forceFlush, reason }?: {
forceFlush?: boolean;
reason?: string;
}): Promise<void>;
/**
* Pause some replay functionality. See comments for `_isPaused`.
* This differs from stop as this only stops DOM recording, it is
* not as thorough of a shutdown as `stop()`.
*/
pause(): void;
/**
* Resumes recording, see notes for `pause().
*
* Note that calling `startRecording()` here will cause a
* new DOM checkout.`
*/
resume(): void;
/**
* If not in "session" recording mode, flush event buffer which will create a new replay.
* Unless `continueRecording` is false, the replay will continue to record and
* behave as a "session"-based replay.
*
* Otherwise, queue up a flush.
*/
sendBufferedReplayOrFlush({ continueRecording }?: SendBufferedReplayOptions): Promise<void>;
/**
* We want to batch uploads of replay events. Save events only if
* `<flushMinDelay>` milliseconds have elapsed since the last event
* *OR* if `<flushMaxDelay>` milliseconds have elapsed.
*
* Accepts a callback to perform side-effects and returns true to stop batch
* processing and hand back control to caller.
*/
addUpdate(cb: AddUpdateCallback): void;
/**
* Updates the user activity timestamp and resumes recording. This should be
* called in an event handler for a user action that we consider as the user
* being "active" (e.g. a mouse click).
*/
triggerUserActivity(): void;
/**
* Updates the user activity timestamp *without* resuming
* recording. Some user events (e.g. keydown) can be create
* low-value replays that only contain the keypress as a
* breadcrumb. Instead this would require other events to
* create a new replay after a session has expired.
*/
updateUserActivity(): void;
/**
* Only flush if `this.recordingMode === 'session'`
*/
conditionalFlush(): Promise<void>;
/**
* Flush using debounce flush
*/
flush(): Promise<void>;
/**
* Always flush via `_debouncedFlush` so that we do not have flushes triggered
* from calling both `flush` and `_debouncedFlush`. Otherwise, there could be
* cases of multiple flushes happening closely together.
*/
flushImmediate(): Promise<void>;
/**
* Cancels queued up flushes.
*/
cancelFlush(): void;
/** Get the current session (=replay) ID
*
* @param onlyIfSampled - If true, will only return the session ID if the session is sampled.
*/
getSessionId(onlyIfSampled?: boolean): string | undefined;
/**
* Checks if recording should be stopped due to user inactivity. Otherwise
* check if session is expired and create a new session if so. Triggers a new
* full snapshot on new session.
*
* Returns true if session is not expired, false otherwise.
* @hidden
*/
checkAndHandleExpiredSession(): boolean | void;
/**
* Capture some initial state that can change throughout the lifespan of the
* replay. This is required because otherwise they would be captured at the
* first flush.
*/
setInitialState(): void;
/**
* Add a breadcrumb event, that may be throttled.
* If it was throttled, we add a custom breadcrumb to indicate that.
*/
throttledAddEvent(event: RecordingEvent, isCheckout?: boolean): typeof THROTTLED | typeof SKIPPED | Promise<AddEventResult | null>;
/**
* This will get the parametrized route name of the current page.
* This is only available if performance is enabled, and if an instrumented router is used.
*/
getCurrentRoute(): string | undefined;
/**
* Initialize and start all listeners to varying events (DOM,
* Performance Observer, Recording, Sentry SDK, etc)
*/
private _initializeRecording;
/**
* Loads (or refreshes) the current session.
*/
private _initializeSessionForSampling;
/**
* Checks and potentially refreshes the current session.
* Returns false if session is not recorded.
*/
private _checkSession;
/**
* Refresh a session with a new one.
* This stops the current session (without forcing a flush, as that would never work since we are expired),
* and then does a new sampling based on the refreshed session.
*/
private _refreshSession;
/**
* Adds listeners to record events for the replay
*/
private _addListeners;
/**
* Cleans up listeners that were created in `_addListeners`
*/
private _removeListeners;
/**
* Tasks to run when we consider a page to be hidden (via blurring and/or visibility)
*/
private _doChangeToBackgroundTasks;
/**
* Tasks to run when we consider a page to be visible (via focus and/or visibility)
*/
private _doChangeToForegroundTasks;
/**
* Update user activity (across session lifespans)
*/
private _updateUserActivity;
/**
* Updates the session's last activity timestamp
*/
private _updateSessionActivity;
/**
* Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb
*/
private _createCustomBreadcrumb;
/**
* Observed performance events are added to `this.performanceEntries`. These
* are included in the replay event before it is finished and sent to Sentry.
*/
private _addPerformanceEntries;
/**
* Clear _context
*/
private _clearContext;
/** Update the initial timestamp based on the buffer content. */
private _updateInitialTimestampFromEventBuffer;
/**
* Return and clear _context
*/
private _popEventContext;
/**
* Flushes replay event buffer to Sentry.
*
* Performance events are only added right before flushing - this is
* due to the buffered performance observer events.
*
* Should never be called directly, only by `flush`
*/
private _runFlush;
/**
* Flush recording data to Sentry. Creates a lock so that only a single flush
* can be active at a time. Do not call this directly.
*/
private _flush;
/** Save the session, if it is sticky */
private _maybeSaveSession;
/** Handler for rrweb.record.onMutation */
private _onMutationHandler;
}
//# sourceMappingURL=replay.d.ts.map

View File

@@ -0,0 +1,65 @@
import { isSameWeek } from "../../../isSameWeek.mjs";
const adjectivesLastWeek = {
masculine: "ostatni",
feminine: "ostatnia",
};
const adjectivesThisWeek = {
masculine: "ten",
feminine: "ta",
};
const adjectivesNextWeek = {
masculine: "następny",
feminine: "następna",
};
const dayGrammaticalGender = {
0: "feminine",
1: "masculine",
2: "masculine",
3: "feminine",
4: "masculine",
5: "masculine",
6: "feminine",
};
function dayAndTimeWithAdjective(token, date, baseDate, options) {
let adjectives;
if (isSameWeek(date, baseDate, options)) {
adjectives = adjectivesThisWeek;
} else if (token === "lastWeek") {
adjectives = adjectivesLastWeek;
} else if (token === "nextWeek") {
adjectives = adjectivesNextWeek;
} else {
throw new Error(`Cannot determine adjectives for token ${token}`);
}
const day = date.getDay();
const grammaticalGender = dayGrammaticalGender[day];
const adjective = adjectives[grammaticalGender];
return `'${adjective}' eeee 'o' p`;
}
const formatRelativeLocale = {
lastWeek: dayAndTimeWithAdjective,
yesterday: "'wczoraj o' p",
today: "'dzisiaj o' p",
tomorrow: "'jutro o' p",
nextWeek: dayAndTimeWithAdjective,
other: "P",
};
export const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(token, date, baseDate, options);
}
return format;
};

View File

@@ -0,0 +1,299 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4-mini";
const FAIL = { success: false };
test("z.string", async () => {
const a = z.string();
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
expect(() => z.parse(a, false)).toThrow();
type a = z.infer<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
});
// test("z.string with description", () => {
// const a = z.string({ description: "string description" });
// a._def;
// expect(a._def.description).toEqual("string description");
// });
test("z.string with custom error", () => {
const a = z.string({ error: () => "BAD" });
expect(z.safeParse(a, 123).error!.issues[0].message).toEqual("BAD");
});
test("inference in checks", () => {
const a = z.string().check(z.refine((val) => val.length));
z.parse(a, "___");
expect(() => z.parse(a, "")).toThrow();
const b = z.string().check(z.refine((val) => val.length));
z.parse(b, "___");
expect(() => z.parse(b, "")).toThrow();
const c = z.string().check(z.refine((val) => val.length));
z.parse(c, "___");
expect(() => z.parse(c, "")).toThrow();
const d = z.string().check(z.refine((val) => val.length));
z.parse(d, "___");
expect(() => z.parse(d, "")).toThrow();
});
test("z.string async", async () => {
// async
const a = z.string().check(z.refine(async (val) => val.length));
expect(await z.parseAsync(a, "___")).toEqual("___");
await expect(() => z.parseAsync(a, "")).rejects.toThrowError();
});
test("z.uuid", () => {
const a = z.uuid();
// parse uuid
z.parse(a, "550e8400-e29b-41d4-a716-446655440000");
z.parse(a, "550e8400-e29b-61d4-a716-446655440000");
// bad uuid
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
const b = z.uuidv4();
z.parse(b, "550e8400-e29b-41d4-a716-446655440000");
expect(z.safeParse(b, "550e8400-e29b-61d4-a716-446655440000")).toMatchObject(FAIL);
const c = z.uuidv6();
z.parse(c, "550e8400-e29b-61d4-a716-446655440000");
expect(z.safeParse(c, "550e8400-e29b-41d4-a716-446655440000")).toMatchObject(FAIL);
const d = z.uuidv7();
z.parse(d, "550e8400-e29b-71d4-a716-446655440000");
expect(z.safeParse(d, "550e8400-e29b-41d4-a716-446655440000")).toMatchObject(FAIL);
expect(z.safeParse(d, "550e8400-e29b-61d4-a716-446655440000")).toMatchObject(FAIL);
});
test("z.email", () => {
const a = z.email();
expect(z.parse(a, "test@test.com")).toEqual("test@test.com");
expect(() => z.parse(a, "test")).toThrow();
expect(z.safeParse(a, "bad email", { error: () => "bad email" }).error!.issues[0].message).toEqual("bad email");
const b = z.email("bad email");
expect(z.safeParse(b, "bad email").error!.issues[0].message).toEqual("bad email");
const c = z.email({ error: "bad email" });
expect(z.safeParse(c, "bad email").error!.issues[0].message).toEqual("bad email");
const d = z.email({ error: () => "bad email" });
expect(z.safeParse(d, "bad email").error!.issues[0].message).toEqual("bad email");
});
test("z.url", () => {
const a = z.url();
// valid URLs
expect(a.parse("http://example.com")).toEqual("http://example.com");
expect(a.parse("https://example.com")).toEqual("https://example.com");
expect(a.parse("ftp://example.com")).toEqual("ftp://example.com");
expect(a.parse("http://sub.example.com")).toEqual("http://sub.example.com");
expect(a.parse("https://example.com/path?query=123#fragment")).toEqual("https://example.com/path?query=123#fragment");
expect(a.parse("http://localhost")).toEqual("http://localhost");
expect(a.parse("https://localhost")).toEqual("https://localhost");
expect(a.parse("http://localhost:3000")).toEqual("http://localhost:3000");
expect(a.parse("https://localhost:3000")).toEqual("https://localhost:3000");
// test trimming
expect(a.parse(" http://example.com ")).toEqual("http://example.com");
expect(a.parse(" http://example.com/")).toEqual("http://example.com/");
expect(a.parse(" http://example.com")).toEqual("http://example.com");
expect(a.parse(" http://example.com//")).toEqual("http://example.com//");
// invalid URLs
expect(() => a.parse("not-a-url")).toThrow();
// expect(() => a.parse("http:/example.com")).toThrow();
expect(() => a.parse("://example.com")).toThrow();
expect(() => a.parse("http://")).toThrow();
expect(() => a.parse("example.com")).toThrow();
// wrong type
expect(() => a.parse(123)).toThrow();
expect(() => a.parse(null)).toThrow();
expect(() => a.parse(undefined)).toThrow();
});
test("z.url with optional hostname regex", () => {
const a = z.url({ hostname: /example\.com$/ });
expect(a.parse("http://example.com")).toEqual("http://example.com");
expect(a.parse("https://sub.example.com")).toEqual("https://sub.example.com");
expect(() => a.parse("http://examples.com")).toThrow();
expect(() => a.parse("http://example.org")).toThrow();
expect(() => a.parse("asdf")).toThrow();
});
test("z.url - file urls", () => {
// file URLs
const a = z.url({ hostname: /.*/ }); // allow any hostname
expect(a.parse("file:///path/to/file.txt")).toEqual("file:///path/to/file.txt");
expect(a.parse("file:///C:/path/to/file.txt")).toEqual("file:///C:/path/to/file.txt");
expect(a.parse("file:///C:/path/to/file.txt?query=123#fragment")).toEqual(
"file:///C:/path/to/file.txt?query=123#fragment"
);
});
test("z.url with optional protocol regex", () => {
const a = z.url({ protocol: /^https?$/ });
expect(a.parse("http://example.com")).toEqual("http://example.com");
expect(a.parse("https://example.com")).toEqual("https://example.com");
expect(() => a.parse("ftp://example.com")).toThrow();
expect(() => a.parse("mailto:example@example.com")).toThrow();
expect(() => a.parse("asdf")).toThrow();
});
test("z.url with both hostname and protocol regexes", () => {
const a = z.url({ hostname: /example\.com$/, protocol: /^https$/ });
expect(a.parse("https://example.com")).toEqual("https://example.com");
expect(a.parse("https://sub.example.com")).toEqual("https://sub.example.com");
expect(() => a.parse("http://example.com")).toThrow();
expect(() => a.parse("https://example.org")).toThrow();
expect(() => a.parse("ftp://example.com")).toThrow();
expect(() => a.parse("asdf")).toThrow();
});
test("z.url with invalid regex patterns", () => {
const a = z.url({ hostname: /a+$/, protocol: /^ftp$/ });
a.parse("ftp://a");
a.parse("ftp://aaaaaaaa");
expect(() => a.parse("http://aaa")).toThrow();
expect(() => a.parse("https://example.com")).toThrow();
expect(() => a.parse("ftp://asdfasdf")).toThrow();
expect(() => a.parse("ftp://invalid")).toThrow();
});
test("z.emoji", () => {
const a = z.emoji();
expect(z.parse(a, "😀")).toEqual("😀");
expect(() => z.parse(a, "hello")).toThrow();
});
test("z.nanoid", () => {
const a = z.nanoid();
expect(z.parse(a, "8FHZpIxleEK3axQRBNNjN")).toEqual("8FHZpIxleEK3axQRBNNjN");
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.cuid", () => {
const a = z.cuid();
expect(z.parse(a, "cixs7y0c0000f7x3b1z6m3w6r")).toEqual("cixs7y0c0000f7x3b1z6m3w6r");
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.cuid2", () => {
const a = z.cuid2();
expect(z.parse(a, "cixs7y0c0000f7x3b1z6m3w6r")).toEqual("cixs7y0c0000f7x3b1z6m3w6r");
expect(() => z.parse(a, 123)).toThrow();
});
test("z.ulid", () => {
const a = z.ulid();
expect(z.parse(a, "01ETGRM9QYVX6S9V2F3B6JXG4N")).toEqual("01ETGRM9QYVX6S9V2F3B6JXG4N");
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.xid", () => {
const a = z.xid();
expect(z.parse(a, "9m4e2mr0ui3e8a215n4g")).toEqual("9m4e2mr0ui3e8a215n4g");
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.ksuid", () => {
const a = z.ksuid();
expect(z.parse(a, "2naeRjTrrHJAkfd3tOuEjw90WCA")).toEqual("2naeRjTrrHJAkfd3tOuEjw90WCA");
expect(() => z.parse(a, "abc")).toThrow();
});
// test("z.ip", () => {
// const a = z.ip();
// expect(z.parse(a, "127.0.0.1")).toEqual("127.0.0.1");
// expect(z.parse(a, "2001:0db8:85a3:0000:0000:8a2e:0370:7334")).toEqual("2001:0db8:85a3:0000:0000:8a2e:0370:7334");
// expect(() => z.parse(a, "abc")).toThrow();
// });
test("z.ipv4", () => {
const a = z.ipv4();
// valid ipv4
expect(z.parse(a, "192.168.1.1")).toEqual("192.168.1.1");
expect(z.parse(a, "255.255.255.255")).toEqual("255.255.255.255");
// invalid ipv4
expect(() => z.parse(a, "999.999.999.999")).toThrow();
expect(() => z.parse(a, "256.256.256.256")).toThrow();
expect(() => z.parse(a, "192.168.1")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.ipv6", () => {
const a = z.ipv6();
// valid ipv6
expect(z.parse(a, "2001:0db8:85a3:0000:0000:8a2e:0370:7334")).toEqual("2001:0db8:85a3:0000:0000:8a2e:0370:7334");
expect(z.parse(a, "::1")).toEqual("::1");
// invalid ipv6
expect(() => z.parse(a, "2001:db8::85a3::8a2e:370:7334")).toThrow();
expect(() => z.parse(a, "2001:db8:85a3:0:0:8a2e:370g:7334")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.base64", () => {
const a = z.base64();
// valid base64
expect(z.parse(a, "SGVsbG8gd29ybGQ=")).toEqual("SGVsbG8gd29ybGQ=");
expect(z.parse(a, "U29tZSBvdGhlciBzdHJpbmc=")).toEqual("U29tZSBvdGhlciBzdHJpbmc=");
// invalid base64
expect(() => z.parse(a, "SGVsbG8gd29ybGQ")).toThrow();
expect(() => z.parse(a, "U29tZSBvdGhlciBzdHJpbmc")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
// test("z.jsonString", () => {
// const a = z.jsonString();
// // valid JSON string
// expect(z.parse(a, '{"key":"value"}')).toEqual('{"key":"value"}');
// expect(z.parse(a, '["item1", "item2"]')).toEqual('["item1", "item2"]');
// // invalid JSON string
// expect(() => z.parse(a, '{"key":value}')).toThrow();
// expect(() => z.parse(a, '["item1", "item2"')).toThrow();
// expect(() => z.parse(a, "hello")).toThrow();
// // wrong type
// expect(() => z.parse(a, 123)).toThrow();
// });
test("z.e164", () => {
const a = z.e164();
// valid e164
expect(z.parse(a, "+1234567890")).toEqual("+1234567890");
expect(z.parse(a, "+19876543210")).toEqual("+19876543210");
// invalid e164
expect(() => z.parse(a, "1234567890")).toThrow();
expect(() => z.parse(a, "+12345")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.jwt", () => {
const a = z.jwt();
// valid jwt
expect(
z.parse(
a,
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
)
).toEqual(
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
);
// invalid jwt
expect(() => z.parse(a, "invalid.jwt.token")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});

View File

@@ -0,0 +1,45 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
// Ref: https://www.unicode.org/cldr/charts/32/summary/ta.html
// CLDR #1846 - #1849
const dateFormats = {
full: "EEEE, d MMMM, y",
long: "d MMMM, y",
medium: "d MMM, y",
short: "d/M/yy",
};
// CLDR #1850 - #1853
const timeFormats = {
full: "a h:mm:ss zzzz",
long: "a h:mm:ss z",
medium: "a h:mm:ss",
short: "a h:mm",
};
const dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

@@ -0,0 +1,184 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
function getBelarusianPlural(count: number, one: string, few: string, many: string): string {
const absCount = Math.abs(count);
const lastDigit = absCount % 10;
const lastTwoDigits = absCount % 100;
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
return many;
}
if (lastDigit === 1) {
return one;
}
if (lastDigit >= 2 && lastDigit <= 4) {
return few;
}
return many;
}
interface BelarusianSizable {
unit: {
one: string;
few: string;
many: string;
};
verb: string;
}
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, BelarusianSizable> = {
string: {
unit: {
one: "сімвал",
few: "сімвалы",
many: "сімвалаў",
},
verb: "мець",
},
array: {
unit: {
one: "элемент",
few: "элементы",
many: "элементаў",
},
verb: "мець",
},
set: {
unit: {
one: "элемент",
few: "элементы",
many: "элементаў",
},
verb: "мець",
},
file: {
unit: {
one: "байт",
few: "байты",
many: "байтаў",
},
verb: "мець",
},
};
function getSizing(origin: string): BelarusianSizable | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "лік";
}
case "object": {
if (Array.isArray(data)) {
return "масіў";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "увод",
email: "email адрас",
url: "URL",
emoji: "эмодзі",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO дата і час",
date: "ISO дата",
time: "ISO час",
duration: "ISO працягласць",
ipv4: "IPv4 адрас",
ipv6: "IPv6 адрас",
cidrv4: "IPv4 дыяпазон",
cidrv6: "IPv6 дыяпазон",
base64: "радок у фармаце base64",
base64url: "радок у фармаце base64url",
json_string: "JSON радок",
e164: "нумар E.164",
jwt: "JWT",
template_literal: "увод",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Няправільны ўвод: чакаўся ${issue.expected}, атрымана ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Няправільны ўвод: чакалася ${util.stringifyPrimitive(issue.values[0])}`;
return `Няправільны варыянт: чакаўся адзін з ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
const maxValue = Number(issue.maximum);
const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
return `Занадта вялікі: чакалася, што ${issue.origin ?? "значэнне"} павінна ${sizing.verb} ${adj}${issue.maximum.toString()} ${unit}`;
}
return `Занадта вялікі: чакалася, што ${issue.origin ?? "значэнне"} павінна быць ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
const minValue = Number(issue.minimum);
const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
return `Занадта малы: чакалася, што ${issue.origin} павінна ${sizing.verb} ${adj}${issue.minimum.toString()} ${unit}`;
}
return `Занадта малы: чакалася, што ${issue.origin} павінна быць ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Няправільны радок: павінен пачынацца з "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Няправільны радок: павінен заканчвацца на "${_issue.suffix}"`;
if (_issue.format === "includes") return `Няправільны радок: павінен змяшчаць "${_issue.includes}"`;
if (_issue.format === "regex") return `Няправільны радок: павінен адпавядаць шаблону ${_issue.pattern}`;
return `Няправільны ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Няправільны лік: павінен быць кратным ${issue.divisor}`;
case "unrecognized_keys":
return `Нераспазнаны ${issue.keys.length > 1 ? "ключы" : "ключ"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Няправільны ключ у ${issue.origin}`;
case "invalid_union":
return "Няправільны ўвод";
case "invalid_element":
return `Няправільнае значэнне ў ${issue.origin}`;
default:
return `Няправільны ўвод`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,7 @@
import type { ColumnBuilderBaseConfig, ColumnDataType } from "../../column-builder.cjs";
import { entityKind } from "../../entity.cjs";
import { GelColumnBuilder } from "./common.cjs";
export declare abstract class GelLocalDateColumnBaseBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object> extends GelColumnBuilder<T, TRuntimeConfig> {
static readonly [entityKind]: string;
defaultNow(): import("../../column-builder.ts").HasDefault<this>;
}

View File

@@ -0,0 +1,4 @@
import type { MigrationConfig } from "../migrator.js";
import type { SqliteRemoteDatabase } from "./driver.js";
export type ProxyMigrator = (migrationQueries: string[]) => Promise<void>;
export declare function migrate<TSchema extends Record<string, unknown>>(db: SqliteRemoteDatabase<TSchema>, callback: ProxyMigrator, config: MigrationConfig): Promise<void>;

View File

@@ -0,0 +1,26 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("check any inference", () => {
const t1 = z.any();
t1.optional();
t1.nullable();
type t1 = z.infer<typeof t1>;
expectTypeOf<t1>().toEqualTypeOf<any>();
});
test("check unknown inference", () => {
const t1 = z.unknown();
t1.optional();
t1.nullable();
type t1 = z.infer<typeof t1>;
expectTypeOf<t1>().toEqualTypeOf<unknown>();
});
test("check never inference", () => {
const t1 = z.never();
expect(() => t1.parse(undefined)).toThrow();
expect(() => t1.parse("asdf")).toThrow();
expect(() => t1.parse(null)).toThrow();
});

View File

@@ -0,0 +1,22 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { registerInstrumentations } from './autoLoader';
export { InstrumentationBase } from './platform/index';
export { InstrumentationNodeModuleDefinition } from './instrumentationNodeModuleDefinition';
export { InstrumentationNodeModuleFile } from './instrumentationNodeModuleFile';
export { isWrapped, safeExecuteInTheMiddle, safeExecuteInTheMiddleAsync, } from './utils';
export { SemconvStability, semconvStabilityFromStr } from './semconvStability';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tv.js","sources":["../../../src/icons/tv.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Tv\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHg9IjIiIHk9IjciIHJ4PSIyIiByeT0iMiIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxNyAyIDEyIDcgNyAyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/tv\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Tv = createLucideIcon('Tv', [\n ['rect', { width: '20', height: '15', x: '2', y: '7', rx: '2', ry: '2', key: '10ag99' }],\n ['polyline', { points: '17 2 12 7 7 2', key: '11pgbg' }],\n]);\n\nexport default Tv;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,iBAAiB,IAAM,CAAA,CAAA,CAAA;AAAA,CAAA,CAChC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CAAA,CACvF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
export { _ as default } from "../esm/_write_only_error.js";

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/extractID.ts"],"sourcesContent":["export const extractID = <IDType extends number | string>(\n objectOrID: { id: IDType } | IDType,\n): IDType => {\n if (typeof objectOrID === 'string' || typeof objectOrID === 'number') {\n return objectOrID\n }\n\n return objectOrID.id\n}\n"],"names":["extractID","objectOrID","id"],"mappings":"AAAA,OAAO,MAAMA,YAAY,CACvBC;IAEA,IAAI,OAAOA,eAAe,YAAY,OAAOA,eAAe,UAAU;QACpE,OAAOA;IACT;IAEA,OAAOA,WAAWC,EAAE;AACtB,EAAC"}

View File

@@ -0,0 +1,9 @@
/// <reference types="react" />
import type { SyntheticEventName, UniqueIdentifier } from '../../types';
export declare type SyntheticListener = {
eventName: SyntheticEventName;
handler: (event: React.SyntheticEvent, id: UniqueIdentifier) => void;
};
export declare type SyntheticListeners = SyntheticListener[];
export declare type SyntheticListenerMap = Record<string, Function>;
export declare function useSyntheticListeners(listeners: SyntheticListeners, id: UniqueIdentifier): SyntheticListenerMap;

View File

@@ -0,0 +1,57 @@
{
"name": "@react-email/head",
"version": "0.0.12",
"description": "Contains head components such as style and meta elements.",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist/**"
],
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/resend/react-email.git",
"directory": "packages/head"
},
"keywords": [
"react",
"email"
],
"engines": {
"node": ">=18.0.0"
},
"peerDependencies": {
"react": "^18.0 || ^19.0 || ^19.0.0-rc"
},
"devDependencies": {
"typescript": "5.1.6",
"@react-email/render": "1.0.3",
"eslint-config-custom": "0.0.0",
"tsconfig": "0.0.0"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external react",
"clean": "rm -rf dist",
"dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
"lint": "eslint .",
"test:watch": "vitest",
"test": "vitest run"
}
}

View File

@@ -0,0 +1,224 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const object = require('./object.js');
const randomSafeContext = require('./randomSafeContext.js');
const string = require('./string.js');
const worldwide = require('./worldwide.js');
function getCrypto() {
const gbl = worldwide.GLOBAL_OBJ ;
return gbl.crypto || gbl.msCrypto;
}
let emptyUuid;
function getRandomByte() {
return randomSafeContext.safeMathRandom() * 16;
}
/**
* UUID4 generator
* @param crypto Object that provides the crypto API.
* @returns string Generated UUID4.
*/
function uuid4(crypto = getCrypto()) {
try {
if (crypto?.randomUUID) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return randomSafeContext.withRandomSafeContext(() => crypto.randomUUID()).replace(/-/g, '');
}
} catch {
// some runtimes can crash invoking crypto
// https://github.com/getsentry/sentry-javascript/issues/8935
}
if (!emptyUuid) {
// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
// Concatenating the following numbers as strings results in '10000000100040008000100000000000'
emptyUuid = ([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11;
}
return emptyUuid.replace(/[018]/g, c =>
// eslint-disable-next-line no-bitwise
((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),
);
}
function getFirstException(event) {
return event.exception?.values?.[0];
}
/**
* Extracts either message or type+value from an event that can be used for user-facing logs
* @returns event's description
*/
function getEventDescription(event) {
const { message, event_id: eventId } = event;
if (message) {
return message;
}
const firstException = getFirstException(event);
if (firstException) {
if (firstException.type && firstException.value) {
return `${firstException.type}: ${firstException.value}`;
}
return firstException.type || firstException.value || eventId || '<unknown>';
}
return eventId || '<unknown>';
}
/**
* Adds exception values, type and value to an synthetic Exception.
* @param event The event to modify.
* @param value Value of the exception.
* @param type Type of the exception.
* @hidden
*/
function addExceptionTypeValue(event, value, type) {
const exception = (event.exception = event.exception || {});
const values = (exception.values = exception.values || []);
const firstException = (values[0] = values[0] || {});
if (!firstException.value) {
firstException.value = value || '';
}
if (!firstException.type) {
firstException.type = type || 'Error';
}
}
/**
* Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.
*
* @param event The event to modify.
* @param newMechanism Mechanism data to add to the event.
* @hidden
*/
function addExceptionMechanism(event, newMechanism) {
const firstException = getFirstException(event);
if (!firstException) {
return;
}
const defaultMechanism = { type: 'generic', handled: true };
const currentMechanism = firstException.mechanism;
firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };
if (newMechanism && 'data' in newMechanism) {
const mergedData = { ...currentMechanism?.data, ...newMechanism.data };
firstException.mechanism.data = mergedData;
}
}
// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
const SEMVER_REGEXP =
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
/**
* Represents Semantic Versioning object
*/
function _parseInt(input) {
return parseInt(input || '', 10);
}
/**
* Parses input into a SemVer interface
* @param input string representation of a semver version
*/
function parseSemver(input) {
const match = input.match(SEMVER_REGEXP) || [];
const major = _parseInt(match[1]);
const minor = _parseInt(match[2]);
const patch = _parseInt(match[3]);
return {
buildmetadata: match[5],
major: isNaN(major) ? undefined : major,
minor: isNaN(minor) ? undefined : minor,
patch: isNaN(patch) ? undefined : patch,
prerelease: match[4],
};
}
/**
* This function adds context (pre/post/line) lines to the provided frame
*
* @param lines string[] containing all lines
* @param frame StackFrame that will be mutated
* @param linesOfContext number of context lines we want to add pre/post
*/
function addContextToFrame(lines, frame, linesOfContext = 5) {
// When there is no line number in the frame, attaching context is nonsensical and will even break grouping
if (frame.lineno === undefined) {
return;
}
const maxLines = lines.length;
const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);
frame.pre_context = lines
.slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
.map((line) => string.snipLine(line, 0));
// We guard here to ensure this is not larger than the existing number of lines
const lineIndex = Math.min(maxLines - 1, sourceLine);
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
frame.context_line = string.snipLine(lines[lineIndex], frame.colno || 0);
frame.post_context = lines
.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
.map((line) => string.snipLine(line, 0));
}
/**
* Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
* in question), and marks it captured if not.
*
* This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and
* record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so
* that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because
* the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not
* caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This
* function helps us ensure that even if we encounter the same error more than once, we only record it the first time we
* see it.
*
* Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on
* them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent
* object wrapper forms so that this check will always work. However, because we need to flag the exact object which
* will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification
* must be done before the exception captured.
*
* @param A thrown exception to check or flag as having been seen
* @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)
*/
function checkOrSetAlreadyCaught(exception) {
if (isAlreadyCaptured(exception)) {
return true;
}
try {
// set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the
// `ExtraErrorData` integration
object.addNonEnumerableProperty(exception , '__sentry_captured__', true);
} catch {
// `exception` is a primitive, so we can't mark it seen
}
return false;
}
function isAlreadyCaptured(exception) {
try {
return (exception ).__sentry_captured__;
} catch {} // eslint-disable-line no-empty
}
exports.addContextToFrame = addContextToFrame;
exports.addExceptionMechanism = addExceptionMechanism;
exports.addExceptionTypeValue = addExceptionTypeValue;
exports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught;
exports.getEventDescription = getEventDescription;
exports.parseSemver = parseSemver;
exports.uuid4 = uuid4;
//# sourceMappingURL=misc.js.map

Some files were not shown because too many files have changed in this diff Show More