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,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 Grape = createLucideIcon("Grape", [
["path", { d: "M22 5V2l-5.89 5.89", key: "1eenpo" }],
["circle", { cx: "16.6", cy: "15.89", r: "3", key: "xjtalx" }],
["circle", { cx: "8.11", cy: "7.4", r: "3", key: "u2fv6i" }],
["circle", { cx: "12.35", cy: "11.65", r: "3", key: "i6i8g7" }],
["circle", { cx: "13.91", cy: "5.85", r: "3", key: "6ye0dv" }],
["circle", { cx: "18.15", cy: "10.09", r: "3", key: "snx9no" }],
["circle", { cx: "6.56", cy: "13.2", r: "3", key: "17x4xg" }],
["circle", { cx: "10.8", cy: "17.44", r: "3", key: "1hogw9" }],
["circle", { cx: "5", cy: "19", r: "3", key: "1sn6vo" }]
]);
export { Grape as default };
//# sourceMappingURL=grape.js.map

View File

@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './utensils.js';
//# sourceMappingURL=fork-knife.js.map

View File

@@ -0,0 +1,129 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["f.Kr.", "e.Kr."],
abbreviated: ["f.Kr.", "e.Kr."],
wide: ["før Kristus", "etter Kristus"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"],
};
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"jan.",
"feb.",
"mars",
"apr.",
"mai",
"juni",
"juli",
"aug.",
"sep.",
"okt.",
"nov.",
"des.",
],
wide: [
"januar",
"februar",
"mars",
"april",
"mai",
"juni",
"juli",
"august",
"september",
"oktober",
"november",
"desember",
],
};
const dayValues = {
narrow: ["S", "M", "T", "O", "T", "F", "L"],
short: ["su", "må", "ty", "on", "to", "fr", "lau"],
abbreviated: ["sun", "mån", "tys", "ons", "tor", "fre", "laur"],
wide: [
"sundag",
"måndag",
"tysdag",
"onsdag",
"torsdag",
"fredag",
"laurdag",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "midnatt",
noon: "middag",
morning: "på morg.",
afternoon: "på etterm.",
evening: "på kvelden",
night: "på natta",
},
abbreviated: {
am: "a.m.",
pm: "p.m.",
midnight: "midnatt",
noon: "middag",
morning: "på morg.",
afternoon: "på etterm.",
evening: "på kvelden",
night: "på natta",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "midnatt",
noon: "middag",
morning: "på morgonen",
afternoon: "på ettermiddagen",
evening: "på kvelden",
night: "på natta",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + ".";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
}),
};

View File

@@ -0,0 +1,602 @@
export const isTranslations = {
authentication: {
account: 'Aðgangur',
accountOfCurrentUser: 'Aðgangur notanda',
accountVerified: 'Aðgangur staðfestur.',
alreadyActivated: 'Þegar virkur',
alreadyLoggedIn: 'Þegar innskráður',
apiKey: 'API lykill',
authenticated: 'Auðkenndur',
backToLogin: 'Aftur á innskráningu',
beginCreateFirstUser: 'Til að byrja, skráðu þinn fyrsta notanda.',
changePassword: 'Breyta lykilorði',
checkYourEmailForPasswordReset: 'Ef netfangið er tengt reikningi muntu fá leiðbeiningar um að endurstilla lykilorðið þitt innan skamms. Vinsamlegast athugaðu ruslpóstmöppuna þína ef þú sérð ekki tölvupóstinn í pósthólfinu þínu.',
confirmGeneration: 'Staðfestu sjálfvirka myndun',
confirmPassword: 'Staðfestu lykilorð',
createFirstUser: 'Skrá fyrsta notanda',
emailNotValid: 'Netfangið er ekki gilt',
emailOrUsername: 'Netfang eða notandanafn',
emailSent: 'Tölvupóstur sendur',
emailVerified: 'Netfang staðfest.',
enableAPIKey: 'Virkja API lykil',
failedToUnlock: 'Aflæsing tókst ekki',
forceUnlock: 'Þvinga aflæsingu',
forgotPassword: 'Gleymt lykilorð',
forgotPasswordEmailInstructions: 'Vinsamlega sláðu inn netfangið þitt. Þú munt fá tölvupóst með leiðbeiningum um hvernig á að endursetja lykilorð.',
forgotPasswordQuestion: 'Gleymt lykilorð?',
forgotPasswordUsernameInstructions: 'Vinsamlegast sláðu inn notandanafnið þitt hér að neðan. Leiðbeiningar um hvernig á að endurstilla lykilorðið þitt verða sendar á netfangið sem tengt er notandanafninu þínu.',
generate: 'Mynda sjálfvirkt',
generateNewAPIKey: 'Sjálfvirkt mynda nýjan API lykil',
generatingNewAPIKeyWillInvalidate: 'Að mynda nýjan API lykil mun <1>óvirkja</1> fyrri lykil. Ertu viss um að halda áfram?',
lockUntil: 'Læsa þar til',
logBackIn: 'Innskrá aftur',
loggedIn: 'Til að innskrá með öðrum notanda, þarftu að <0>útskrá</0> fyrst.',
loggedInChangePassword: 'Til að breyta lykilorði, farðu á <0>reikninginn</0> þinn og breyttu lykilorðinu þar.',
loggedOutInactivity: 'Þú hefur verið útskráður vegna óvirkni.',
loggedOutSuccessfully: 'Útskráning tókst.',
loggingOut: 'Útskrái...',
login: 'Innskráning',
loginAttempts: 'Innskráningar tilraunir',
loginUser: 'Innskrá notanda',
loginWithAnotherUser: 'Til að skrá sig inn með öðrum notanda ættir þú að <0>skrá þig út</0> fyrst.',
logOut: 'Útskrá',
logout: 'Útskrá',
logoutSuccessful: 'Útskráning tókst.',
logoutUser: 'Útskrá notanda',
newAccountCreated: 'Nýr reikningur hefur verið búinn til fyrir þig til að fá aðgang að <a href="{{serverURL}}">{{serverURL}}</a> Vinsamlegast smelltu á eftirfarandi hlekk eða límdu vefslóðina hér að neðan í vafrann þinn til að staðfesta netfangið þitt: <a href="{{verificationURL}}">{{verificationURL}}</a><br> Eftir að þú hefur staðfest netfangið þitt muntu geta skráð þig inn.',
newAPIKeyGenerated: 'Nýr API lykill myndaður.',
newPassword: 'Nýtt lykilorð',
passed: 'Auðkenning tókst',
passwordResetSuccessfully: 'Lykilorð endursett.',
resetPassword: 'Endursetja lykilorð',
resetPasswordExpiration: 'Endursetning lykilorðs rennur út',
resetPasswordToken: 'Endursetja lykilorðs tóka',
resetYourPassword: 'Endursetja lykilorð',
stayLoggedIn: 'Haldast innskráður',
successfullyRegisteredFirstUser: 'Skráning fyrsta notanda tókst.',
successfullyUnlocked: 'Aflæsing tókst',
tokenRefreshSuccessful: 'Endursetning tóka tókst.',
unableToVerify: 'Staðfesting tókst ekki',
username: 'Notandanafn',
usernameNotValid: 'Notandanafnið sem þú skráðir er ekki gilt',
verified: 'Staðfest',
verifiedSuccessfully: 'Staðfest',
verify: 'Staðfesta',
verifyUser: 'Staðfesta notanda',
verifyYourEmail: 'Staðfestu netfangið þitt',
youAreInactive: 'Þú hefur ekki verið virkur í smá stund og verður fljótlega skráður út sjálfkrafa til öryggis. Viltu halda innskráningu?',
youAreReceivingResetPassword: 'Þú færð þetta vegna þess að þú (eða einhver annar) hefur beðið um að endurstilla lykilorðið fyrir reikninginn þinn. Vinsamlegast smelltu á eftirfarandi hlekk eða límdu þetta í vafrann þinn til að ljúka ferlinu:',
youDidNotRequestPassword: 'Ef þú baðst ekki um þetta, vinsamlegast hunsaðu þennan tölvupóst og lykilorðið þitt verður óbreytt.'
},
dashboard: {
addWidget: 'Bæta við smáforriti',
deleteWidget: 'Eyða græju {{id}}',
searchWidgets: 'Leita að græjum...'
},
error: {
accountAlreadyActivated: 'Þessi aðgangur hefur þegar verið virkjaður.',
autosaving: 'Villa kom upp við sjálfvirka vistun á færslu.',
correctInvalidFields: 'Vinsamlega leiðréttu rangt skráða reiti.',
deletingFile: 'Villa kom upp við að eyða skrá.',
deletingTitle: 'Villa kom upp við að eyða {{title}}. Vinsamlegast athugaðu tenginguna þína og reyndu aftur.',
documentNotFound: 'Færsla með auðkenni {{id}} fannst ekki. Því kann að hafa verið eytt eða aldrei til, eða þú gætir ekki haft aðgang að því.',
emailOrPasswordIncorrect: 'Netfangið eða lykilorðið sem gefið var upp er rangt.',
followingFieldsInvalid_one: 'Eftirfarandi svæði er ógilt:',
followingFieldsInvalid_other: 'Eftirfarandi svæði eru ógild:',
incorrectCollection: 'Rangt safn',
insufficientClipboardPermissions: 'Aðgangur að klemmuspjaldi hafnað. Vinsamlegast athugaðu klemmuspjaldsheimildir þínar.',
invalidClipboardData: 'Ógild klemmuspjaldsgögn.',
invalidFileType: 'Ógild skráartegund',
invalidFileTypeValue: 'Ógild skráartegund: {{value}}',
invalidRequestArgs: 'Ógild viðföng send í beiðni: {{args}}',
loadingDocument: 'Vandamál kom upp við að sækja færslu með ID: {{id}}.',
localesNotSaved_one: 'Ekki tókst að vista eftirfarandi staðfærslu:',
localesNotSaved_other: 'Ekki tókst að vista eftirfarandi staðfærslur:',
logoutFailed: 'Útskráning mistókst.',
missingEmail: 'Vantar netfang.',
missingIDOfDocument: 'Vantar auðkenni skjals til að uppfæra.',
missingIDOfVersion: 'Vantar auðkenni útgáfu.',
missingRequiredData: 'Vantar nauðsynleg gögn.',
noFilesUploaded: 'Engum skrám var hlaðið upp.',
noMatchedField: 'Ekkert samsvarandi svæði fannst fyrir "{{label}}"',
notAllowedToAccessPage: 'Þér er ekki heimilt að fara á þessa síðu.',
notAllowedToPerformAction: 'Þér er ekki heimilt að framkvæma þessa aðgerð.',
notFound: 'Umbeðnar upplýsingar fundust ekki.',
noUser: 'Enginn notandi',
previewing: 'Vandamál kom upp við að forskoða þessa færslu.',
problemUploadingFile: 'Vandamál kom upp við að hlaða upp skránni.',
restoringTitle: 'Villa kom upp við að endurheimta {{title}}. Vinsamlegast athugaðu tenginguna þína og reyndu aftur.',
revertingDocument: 'Það kom upp vandamál við að endurheimta þetta skjal.',
tokenInvalidOrExpired: 'Token er annað hvort ógilt eða útrunnið.',
tokenNotProvided: 'Token var gefið upp.',
unableToCopy: 'Ekki hægt að afrita.',
unableToDeleteCount: 'Ekki hægt að eyða {{count}} af {{total}} {{label}}.',
unableToReindexCollection: 'Villa við að endurskrá safn {{collection}}. Aðgerð hætt við.',
unableToUpdateCount: 'Ekki hægt að uppfæra {{count}} af {{total}} {{label}}.',
unauthorized: 'Óheimilt, þú verður að vera innskráður til að gera þessa beiðni.',
unauthorizedAdmin: 'Óheimilt, þessi notandi hefur ekki aðgang að stjórnborðinu.',
unknown: 'Óþekkt villa hefur komið upp.',
unPublishingDocument: 'Vandamál kom upp við að taka færsluna úr birtingu.',
unspecific: 'Villa hefur komið upp.',
unverifiedEmail: 'Vinsamlegast staðfestu netfangið þitt áður en þú skráir þig inn.',
userEmailAlreadyRegistered: 'Notandi með þetta netfang er þegar skráður.',
userLocked: 'Þessi notandi er læstur vegna of margra misheppnaðra innskráningartilrauna.',
usernameAlreadyRegistered: 'Notandi með þetta notandanafn er þegar skráður.',
usernameOrPasswordIncorrect: 'Notandanafnið eða lykilorðið sem gefið var upp er rangt.',
valueMustBeUnique: 'Gildi verður að vera einstakt',
verificationTokenInvalid: 'Staðfestingartoken er ógilt.'
},
fields: {
addLabel: 'Bæta við {{label}}',
addLink: 'Bæta við hlekk',
addNew: 'Bæta við nýju',
addNewLabel: 'Bæta við {{label}}',
addRelationship: 'Bæta við tengingu',
addUpload: 'Bæta við skrá',
block: 'blokk',
blocks: 'blokkir',
blockType: 'Blokkartegund',
chooseBetweenCustomTextOrDocument: 'Veldu á milli að slá inn sérsniðna vefslóð eða tengja við aðra færslu.',
chooseDocumentToLink: 'Veldu færslu til að tengja við',
chooseFromExisting: 'Velja af skráðum',
chooseLabel: 'Velja {{label}}',
collapseAll: 'Fella allt saman',
customURL: 'Sérsniðin vefslóð',
editLabelData: 'Breyta {{label}} gögnum',
editLink: 'Breyta hlekk',
editRelationship: 'Breyta tengingu',
enterURL: 'Sláðu inn vefslóð',
internalLink: 'Innri hlekkur',
itemsAndMore: '{{items}} og {{count}} fleiri',
labelRelationship: '{{label}} tenging',
latitude: 'Breiddargráða',
linkedTo: 'Tengt við <0>{{label}}</0>',
linkType: 'Tegund hlekks',
longitude: 'Lengdargráða',
newLabel: 'Nýtt {{label}}',
openInNewTab: 'Opna í nýjum flipa',
passwordsDoNotMatch: 'Lykilorð eru ekki eins.',
relatedDocument: 'Tengdar færslur',
relationTo: 'Tenging við',
removeRelationship: 'Fjarlægja tengingu',
removeUpload: 'Fjarlægja skrá',
saveChanges: 'Vista breytingar',
searchForBlock: 'Leita að blokk',
searchForLanguage: 'Leitaðu að tungumáli',
selectExistingLabel: 'Veldu núverandi {{label}}',
selectFieldsToEdit: 'Veldu reit til að breyta',
showAll: 'Sýna allt',
swapRelationship: 'Skipta út tengingu',
swapUpload: 'Skipta út skrá',
textToDisplay: 'Texti til að birta',
toggleBlock: 'Fletta blokk',
uploadNewLabel: 'Hlaða upp nýju {{label}}'
},
folder: {
browseByFolder: 'Flakka eftir möppu',
byFolder: 'Eftir möppu',
deleteFolder: 'Eyða möppu',
folderName: 'Möppunafn',
folders: 'Möppurnar',
folderTypeDescription: 'Veldu hvaða tegund safnskjala ætti að vera leyfð í þessari möppu.',
itemHasBeenMoved: '{{title}} hefur verið færð í {{folderName}}',
itemHasBeenMovedToRoot: '{{title}} hefur verið færð í rótarmöppuna',
itemsMovedToFolder: '{{title}} færð í {{folderName}}',
itemsMovedToRoot: '{{title}} færð í rótarmöppuna',
moveFolder: 'Færa möppu',
moveItemsToFolderConfirmation: 'Þú ert að fara að færa <1>{{count}} {{label}}</1> í <2>{{toFolder}}</2>. Ertu viss?',
moveItemsToRootConfirmation: 'Þú ert að fara að færa <1>{{count}} {{label}}</1> í rótarmöppuna. Ertu viss?',
moveItemToFolderConfirmation: 'Þú ert að fara að færa <1>{{title}}</1> í <2>{{toFolder}}</2>. Ertu viss?',
moveItemToRootConfirmation: 'Þú ert að fara að færa <1>{{title}}</1> í rótarmöppuna. Ertu viss?',
movingFromFolder: 'Færi {{title}} úr {{fromFolder}}',
newFolder: 'Ný mappa',
noFolder: 'Engin mappa',
renameFolder: 'Endurnefna möppu',
searchByNameInFolder: 'Leita eftir nafni í {{folderName}}',
selectFolderForItem: 'Veldu möppu fyrir {{title}}'
},
general: {
name: 'Nafn',
aboutToDelete: 'Þú ert að fara að eyða {{label}} <1>{{title}}</1>. Ertu viss?',
aboutToDeleteCount_many: 'Þú ert að fara að eyða {{count}} {{label}}',
aboutToDeleteCount_one: 'Þú ert að fara að eyða {{count}} {{label}}',
aboutToDeleteCount_other: 'Þú ert að fara að eyða {{count}} {{label}}',
aboutToPermanentlyDelete: 'Þú ert að fara að eyða {{label}} <1>{{title}}</1> varanlega. Ertu viss?',
aboutToPermanentlyDeleteTrash: 'Þú ert að fara að eyða <0>{{count}}</0> <1>{{label}}</1> varanlega úr ruslinu. Ertu viss?',
aboutToRestore: 'Þú ert að fara að endurheimta {{label}} <1>{{title}}</1>. Ertu viss?',
aboutToRestoreAsDraft: 'Þú ert að fara að endurheimta {{label}} <1>{{title}}</1> sem drög. Ertu viss?',
aboutToRestoreAsDraftCount: 'Þú ert að fara að endurheimta {{count}} {{label}} sem drög',
aboutToRestoreCount: 'Þú ert að fara að endurheimta {{count}} {{label}}',
aboutToTrash: 'Þú ert að fara að færa {{label}} <1>{{title}}</1> í ruslið. Ertu viss?',
aboutToTrashCount: 'Þú ert að fara að færa {{count}} {{label}} í ruslið',
addBelow: 'Bæta við fyrir neðan',
addFilter: 'Bæta við síu',
adminTheme: 'Stjórnborðs þema',
all: 'Allt',
allCollections: 'Öll söfn',
allLocales: 'Allar staðfærslur',
and: 'Og',
anotherUser: 'Annar notandi',
anotherUserTakenOver: 'Annar notandi hefur tekið yfir skráningu þessarar færslu.',
applyChanges: 'Virkja breytingar',
ascending: 'Hækkandi',
automatic: 'Sjálfvirkt',
backToDashboard: 'Aftur í stjórnborð',
cancel: 'Hætta við',
changesNotSaved: 'Breytingarnar þínar hafa ekki verið vistaðar. Ef þú ferð núna muntu missa breytingarnar þínar.',
clear: 'Hreinsa',
clearAll: 'Hreinsa allt',
close: 'Loka',
collapse: 'Fella saman',
collections: 'Söfn',
columns: 'Dálkar',
columnToSort: 'Dálkur til að raða',
confirm: 'Staðfesta',
confirmCopy: 'Staðfesta afritun',
confirmDeletion: 'Staðfesta eyðingu',
confirmDuplication: 'Staðfesta tvöföldun',
confirmMove: 'Staðfesta tilfærslu',
confirmReindex: 'Endursetja leitargrunn fyrir allar {{collections}}?',
confirmReindexAll: 'Endursetja leitargrunn fyrir öll söfn?',
confirmReindexDescription: 'Þetta mun eyða núverandi leitargrunn og endursetja leitargrunn fyrir allar færslur í {{collections}}.',
confirmReindexDescriptionAll: 'Þetta mun eyða núverandi leitargrunn og endursetja leitargrunn fyrir færslur í öllum söfnum.',
confirmRestoration: 'Staðfesta endurheimtu',
copied: 'Afritað',
copy: 'Afrita',
copyField: 'Afrita svæði',
copying: 'Afrita',
copyRow: 'Afrita röð',
copyWarning: 'Þú munt yfirskrifa {{to}} með {{from}} fyrir {{label}} {{title}}. Ertu viss?',
create: 'Nýskrá',
created: 'Nýskráð',
createdAt: 'Nýskráð',
createNew: 'Nýskrá',
createNewLabel: 'Nýskrá: {{label}}',
creating: 'Nýskrái',
creatingNewLabel: 'Nýskrái {{label}}',
currentlyEditing: 'er að vinna í þessari færslu. Ef þú tekur yfir, mun viðkomandi ekki geta haldið áfram, og gæti glatað óvistuðum breytingum.',
custom: 'Sérsniðið',
dark: 'Dökkt',
dashboard: 'Stjórnborð',
delete: 'Eyða',
deleted: 'Eytt',
deletedAt: 'Eytt',
deletedCountSuccessfully: 'Eyddi {{count}} {{label}}.',
deletedSuccessfully: 'Eyðing tókst.',
deleteLabel: 'Eyða {{label}}',
deletePermanently: 'Sleppa rusli og eyða varanlega',
deleting: 'Eyði...',
depth: 'Dýpt',
descending: 'Lækkandi',
deselectAllRows: 'Afvelja allar raðir',
document: 'Færsla',
documentIsTrashed: 'Þetta {{label}} er í ruslinu og er skrifvarið.',
documentLocked: 'Færsla læst',
documents: 'Færslur',
duplicate: 'Tvöfalda',
duplicateWithoutSaving: 'Tvöfalda án þess að vista breytingar',
edit: 'Breyta',
editAll: 'Breyta öllu',
editedSince: 'Breytt síðan',
editing: 'Breyti',
editingLabel_many: 'Breyti {{count}} {{label}}',
editingLabel_one: 'Breyti {{count}} {{label}}',
editingLabel_other: 'Breyti {{count}} {{label}}',
editingTakenOver: 'Breyting yfirtekin',
editLabel: 'Breyta {{label}}',
email: 'Tölvupóstur',
emailAddress: 'Netfang',
emptyTrash: 'Tæma rusl',
emptyTrashLabel: 'Tæma {{label}} rusl',
enterAValue: 'Sláðu inn gildi',
error: 'Villa',
errors: 'Villur',
exitLivePreview: 'Fara úr beinni forskoðun',
export: 'Flytja út',
fallbackToDefaultLocale: 'Nota sjálfgefna staðfærslu',
false: 'Ósatt',
filter: 'Sía',
filters: 'Síur',
filterWhere: 'Sía {{label}} þar sem',
globals: 'Einstakir hlutir',
goBack: 'Til baka',
groupByLabel: 'Flokka eftir {{label}}',
import: 'Flytja inn',
isEditing: 'er að breyta',
item: 'hlutur',
items: 'hlutir',
language: 'Tungumál',
lastModified: 'Síðast breytt',
layout: 'Útlag',
leaveAnyway: 'Fara samt',
leaveWithoutSaving: 'Fara án þess að vista',
light: 'Ljóst',
livePreview: 'Bein forskoðun',
loading: 'Hleð',
locale: 'Staðfærsla',
locales: 'Staðfærslur',
lock: 'Lás',
menu: 'Valmynd',
moreOptions: 'Fleiri valkostir',
move: 'Færa',
moveConfirm: 'Þú ert að fara að færa {{count}} {{label}} í <1>{{destination}}</1>. Ertu viss?',
moveCount: 'Færa {{count}} {{label}}',
moveDown: 'Færa niður',
moveUp: 'Færa upp',
moving: 'Færi',
movingCount: 'Færi {{count}} {{label}}',
newLabel: 'Nýtt {{label}}',
newPassword: 'Nýtt lykilorð',
next: 'Næsta',
no: 'Nei',
noDateSelected: 'Engin dagsetning valin',
noFiltersSet: 'Engar síur virkar',
noLabel: '<Ekkert {{label}}>',
none: 'Ekkert',
noOptions: 'Engir valkostir',
noResults: 'Engar {{label}} fundust. Annað hvort er engin {{label}} til eða ekkert passar við síu sem þú hefur valið fyrir ofan.',
noResultsDescription: 'Það eru hvorki neinar til eða neinar sem passa við síurnar sem þú skilgreindir að ofan.',
noResultsFound: 'Engin niðurstöður.',
notFound: 'Fannst ekki',
nothingFound: 'Ekkert fannst',
noTrashResults: 'Ekkert {{label}} í rusli.',
noUpcomingEventsScheduled: 'Engir komandi viðburðir áætlaðir.',
noValue: 'Ekkert gildi',
of: 'af',
only: 'Aðeins',
open: 'Opna',
or: 'Eða',
order: 'Röð',
overwriteExistingData: 'Yfirskrifa skráð gögn í reit',
pageNotFound: 'Síða fannst ekki',
password: 'Lykilorð',
pasteField: 'Líma svæði',
pasteRow: 'Líma röð',
payloadSettings: 'Payload stillingar',
permanentlyDelete: 'Eyða varanlega',
permanentlyDeletedCountSuccessfully: 'Eyddi {{count}} {{label}} varanlega.',
perPage: 'Á síðu: {{limit}}',
previous: 'Fyrri',
reindex: 'Endursetja leitargrunn',
reindexingAll: 'Endursetja leitargrunn fyrir allar {{collections}}.',
remove: 'Fjarlægja',
rename: 'Endurnefna',
reset: 'Endurstilla',
resetPreferences: 'Endurstilla þínar stillingar',
resetPreferencesDescription: 'Þetta mun endurstilla allar stillingarnar þínar í sjálfgefnar stillingar.',
resettingPreferences: 'Endurstilli þínar stillingar.',
restore: 'Endurheimta',
restoreAsPublished: 'Endurheimta sem útgefna útgáfu',
restoredCountSuccessfully: 'Endurheimti {{count}} {{label}}.',
restoring: 'Endurheimti...',
row: 'Röð',
rows: 'Raðir',
save: 'Vista',
saveChanges: 'Vista breytingar',
saving: 'Vista...',
schedulePublishFor: 'Áætla útgáfu fyrir {{title}}',
searchBy: 'Leita eftir {{label}}',
select: 'Velja',
selectAll: 'Velja allar {{count}} {{label}}',
selectAllRows: 'Velja allar raðir',
selectedCount: '{{count}} {{label}} valið',
selectLabel: 'Velja {{label}}',
selectValue: 'Veldu gildi',
showAllLabel: 'Sýna allar {{label}}',
sorryNotFound: 'Því miður, það er ekkert sem samsvarar beiðninni þinni.',
sort: 'Raða',
sortByLabelDirection: 'Raða eftir {{label}} {{direction}}',
stayOnThisPage: 'Áfram á þessari síðu',
submissionSuccessful: 'Sending tókst.',
submit: 'Senda',
submitting: 'Sendi...',
success: 'Tókst',
successfullyCreated: '{{label}} var nýskráð.',
successfullyDuplicated: '{{label}} tvöfaldað.',
successfullyReindexed: 'Tókst að endurvísa {{count}} af {{total}} skjölum úr {{collections}} og {{skips}} drög voru sleppt.',
takeOver: 'Taka yfir',
thisLanguage: 'Íslenska',
time: 'Tími',
timezone: 'Tímabelti',
titleDeleted: '{{label}} "{{title}}" var eytt.',
titleRestored: '{{label}} "{{title}}" endurheimt.',
titleTrashed: '{{label}} "{{title}}" fært í rusl.',
trash: 'Rusl',
trashedCountSuccessfully: '{{count}} {{label}} færð í rusl.',
true: 'Satt',
unauthorized: 'Óheimilt',
unlock: 'Opnaðu',
unsavedChanges: 'Þú ert með óvistaðar breytingar. Vistaðu eða hættu við áður en þú heldur áfram.',
unsavedChangesDuplicate: 'Þú ert með óvistaðar breytingar. Viltu halda áfram við að tvöfalda?',
untitled: 'Ónefnt',
upcomingEvents: 'Komandi viðburðir',
updatedAt: 'Uppfært',
updatedCountSuccessfully: 'Uppfærsla {{count}} {{label}} tókst.',
updatedLabelSuccessfully: 'Uppfærði {{label}} með góðum árangri.',
updatedSuccessfully: 'Uppfærsla tókst.',
updateForEveryone: 'Uppfæra fyrir alla',
updating: 'Uppfæri',
uploading: 'Hleð upp',
uploadingBulk: 'Hleð upp {{current}} af {{total}}',
user: 'Notandi',
username: 'Notandanafn',
users: 'Notendur',
value: 'Gildi',
viewing: 'Skoða',
viewReadOnly: 'Skoða sem skrifvarið',
welcome: 'Velkomin',
yes: 'Já'
},
localization: {
cannotCopySameLocale: 'Ekki hægt að afrita í sömu staðfærslu',
copyFrom: 'Afrita frá',
copyFromTo: 'Afrita frá {{from}} til {{to}}',
copyTo: 'Afrita til',
copyToLocale: 'Afrita í staðfærslu',
localeToPublish: 'Staðfærsla til að gefa út',
selectedLocales: 'Valdar svæði',
selectLocaleToCopy: 'Veldu staðfærslu til að afrita',
selectLocaleToDuplicate: 'Veldu staðföng til að afrita'
},
operators: {
contains: 'inniheldur',
equals: 'jafngildir',
exists: 'er til',
intersects: 'skarast',
isGreaterThan: 'er stærra en',
isGreaterThanOrEqualTo: 'er stærra eða jafnt og',
isIn: 'er inni í',
isLessThan: 'er minna en',
isLessThanOrEqualTo: 'er minna en eða jafnt og',
isLike: 'er eins og',
isNotEqualTo: 'er ekki jafnt og',
isNotIn: 'er ekki í',
isNotLike: 'er ekki eins og',
near: 'nálægt',
within: 'innan'
},
upload: {
addFile: 'Bæta við skrá',
addFiles: 'Bæta við skrám',
bulkUpload: 'Magn upphal',
crop: 'Skera',
cropToolDescription: 'Dragðu horn valda svæðisins, teiknaðu nýtt svæði eða stilltu gildin hér að neðan.',
download: 'Sækja',
dragAndDrop: 'Dragðu og slepptu skrá',
dragAndDropHere: 'eða dragðu og slepptu skrá hér',
editImage: 'Breyta mynd',
fileName: 'Skráarnafn',
fileSize: 'Skráarstærð',
filesToUpload: 'Skrár til að hlaða upp',
fileToUpload: 'Skrá til að hlaða upp',
focalPoint: 'Brennipunktur',
focalPointDescription: 'Dragðu brennipunktinn beint á forskoðunina eða stilltu gildin hér að neðan.',
height: 'Hæð',
lessInfo: 'Minni upplýsingar',
moreInfo: 'Fleiri upplýsingar',
noFile: 'Engin skrá',
pasteURL: 'Líma vefslóð',
previewSizes: 'Forskoðunarstærðir',
selectCollectionToBrowse: 'Veldu safn til að skoða',
selectFile: 'Veldu skrá',
setCropArea: 'Stilla klippingarsvæði',
setFocalPoint: 'Stilla brennipunkt',
sizes: 'Stærðir',
sizesFor: 'Stærðir fyrir {{label}}',
width: 'Breidd'
},
validation: {
emailAddress: 'Vinsamlegast settu inn gilt netfang.',
enterNumber: 'Vinsamlegast settu inn gilda tölu.',
fieldHasNo: 'Þetta svæði hefur ekkert {{label}}',
greaterThanMax: '{{value}} er stærra en hámarks leyfða {{label}} sem er {{max}}.',
invalidBlock: 'Blokkið "{{block}}" er ekki leyft.',
invalidBlocks: 'Þessi reitur inniheldur blokkir sem eru ekki lengur leyfðar: {{blocks}}.',
invalidInput: 'Þetta svæði hefur ógilt inntak.',
invalidSelection: 'Þetta svæði hefur ógilt val.',
invalidSelections: 'Þetta svæði hefur eftirfarandi ógild völ:',
latitudeOutOfBounds: 'Breiddargráða verður að vera á bilinu -90 og 90.',
lessThanMin: '{{value}} er minna en lágmarks leyfða {{label}} sem er {{min}}.',
limitReached: 'Mörkum náð, aðeins er hægt að bæta við {{max}} hlutum.',
longerThanMin: 'Þetta gildi verður að vera lengra en lágmarkslengdin sem er {{minLength}} stafir.',
longitudeOutOfBounds: 'Lengdargráða verður að vera á bilinu -180 og 180.',
notValidDate: '"{{value}}" er ekki gild dagsetning.',
required: 'Þetta svæði er nauðsynlegt.',
requiresAtLeast: 'Þetta svæði krefst að minnsta kosti {{count}} {{label}}.',
requiresNoMoreThan: 'Þetta svæði krefst ekki meira en {{count}} {{label}}.',
requiresTwoNumbers: 'Þetta svæði krefst tveggja talna.',
shorterThanMax: 'Þetta gildi verður að vera styttra en hámarkslengdin sem er {{maxLength}} stafir.',
timezoneRequired: 'Tímabelti er nauðsynlegt.',
trueOrFalse: 'Þetta svæði getur aðeins verið jafnt og satt eða ósatt.',
username: 'Vinsamlegast settu inn gilt notandanafn. Getur innihaldið bókstafi, tölur, bandstrik, punkta og undirstrik.',
validUploadID: 'Þetta svæði er ekki gilt skráarupphleðslauðkenni.'
},
version: {
type: 'Tegund',
aboutToPublishSelection: 'Þú ert að fara að gefa út allar valdar {{label}}. Ertu viss?',
aboutToRestore: 'Þú munt endurheimta {{label}} í þá stöðu sem það var þann {{versionDate}}.',
aboutToRestoreGlobal: 'Þú munt endurheimta {{label}} í þá stöðu sem það var í þann {{versionDate}}.',
aboutToRevertToPublished: 'Þú munt endursetja breytingar á þessari færslu í útgefna stöðu. Ertu viss?',
aboutToUnpublish: 'Þú munt taka þessa færslu úr birtingu. Ertu viss?',
aboutToUnpublishIn: 'Þú ert að fara að afbirta þetta skjal í {{locale}}. Ertu viss?',
aboutToUnpublishSelection: 'Þú munt taka úr birtingu allar valdar {{label}}. Ertu viss?',
autosave: 'Sjálfvirk vistun',
autosavedSuccessfully: 'Sjálfvirk vistun tókst.',
autosavedVersion: 'Sjálfvirk vistuð útgáfa',
changed: 'Breytt',
changedFieldsCount_one: '{{count}} breytt svæði',
changedFieldsCount_other: '{{count}} breytt svæði',
compareVersion: 'Bera útgáfu saman við:',
compareVersions: 'Bera útgáfur saman',
comparingAgainst: 'Ber saman við',
confirmPublish: 'Staðfesta útgáfu',
confirmRevertToSaved: 'Staðfesta að snúa til baka í vistað',
confirmUnpublish: 'Staðfesta afbirtingu',
confirmVersionRestoration: 'Staðfesta endurheimtu útgáfu',
currentDocumentStatus: 'Núverandi {{docStatus}} færslu',
currentDraft: 'Núverandi drög',
currentlyPublished: 'Nú útgefið',
currentlyViewing: 'Skoða núna',
currentPublishedVersion: 'Núverandi útgefin útgáfa',
draft: 'Drög',
draftHasPublishedVersion: 'Drög (hafa birt útgáfu)',
draftSavedSuccessfully: 'Drög vistuð með góðum árangri.',
lastSavedAgo: 'Síðast vistað {{distance}} síðan',
modifiedOnly: 'Aðeins breytt',
moreVersions: 'Fleiri útgáfur...',
noFurtherVersionsFound: 'Engar fleiri útgáfur fundust',
noLabelGroup: 'Ónefnd hópur',
noRowsFound: 'Ekkert {{label}} fannst',
noRowsSelected: 'Ekkert {{label}} valið',
preview: 'Forskoðun',
previouslyDraft: 'Áður drög',
previouslyPublished: 'Áður útgefið',
previousVersion: 'Fyrri útgáfa',
problemRestoringVersion: 'Vandamál kom upp við að endurheimta þessa útgáfu',
publish: 'Gefa út',
publishAllLocales: 'Gefa út allar staðfærslur',
publishChanges: 'Gefa út breytingar',
published: 'Útgefið',
publishIn: 'Gefa út í {{locale}}',
publishing: 'Gef út',
restoreAsDraft: 'Endurheimta sem drög',
restoredSuccessfully: 'Endurheimtur með góðum árangri.',
restoreThisVersion: 'Endurheimta þessa útgáfu',
restoring: 'Endurheimti...',
reverting: 'Sný til baka...',
revertToPublished: 'Snúa til baka í útgefið',
revertUnsuccessful: 'Endurheimt ekki hægt. Engin fyrri útgáfu fannst.',
saveDraft: 'Vista drög',
scheduledSuccessfully: 'Áætlað.',
schedulePublish: 'Áætla útgáfu',
selectLocales: 'Veldu staðfærslur til að birta',
selectVersionToCompare: 'Veldu útgáfu til að bera saman',
showingVersionsFor: 'Sýni útgáfur fyrir:',
showLocales: 'Sýna staðfærslur:',
specificVersion: 'Tiltekin útgáfa',
status: 'Staða',
unpublish: 'Taka úr birtingu',
unpublished: 'Óútgefið',
unpublishedSuccessfully: 'Tókst að afturkalla útgáfu.',
unpublishIn: 'Óútgefið í {{locale}}',
unpublishing: 'Tek úr birtingu...',
version: 'Útgáfa',
versionAgo: '{{distance}} síðan',
versionCount_many: '{{count}} útgáfur fundust',
versionCount_none: 'Engar útgáfur fundust',
versionCount_one: '{{count}} útgáfa fannst',
versionCount_other: '{{count}} útgáfur fundust',
versionID: 'Útgáfuauðkenni',
versions: 'Útgáfur',
viewingVersion: 'Skoða útgáfu fyrir {{entityLabel}} {{documentTitle}}',
viewingVersionGlobal: 'Skoða útgáfu fyrir {{entityLabel}}',
viewingVersions: 'Skoða útgáfur fyrir {{entityLabel}} {{documentTitle}}',
viewingVersionsGlobal: 'Skoða útgáfur fyrir {{entityLabel}}'
}
};
export const is = {
dateFNSKey: 'is',
translations: isTranslations
};
//# sourceMappingURL=is.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/providers/DocumentTitle/context.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,17 @@
import type { CollectionSlug, FindOptions } from '../../index.js';
import type { PayloadRequest, PopulateType, SelectType, TransformCollectionWithSelect } from '../../types/index.js';
import type { Collection } from '../config/types.js';
export type Arguments<TSlug extends CollectionSlug, TSelect extends SelectType> = {
collection: Collection;
depth?: number;
disableTransaction?: boolean;
id: number | string;
overrideAccess?: boolean;
overrideLock?: boolean;
populate?: PopulateType;
req: PayloadRequest;
showHiddenFields?: boolean;
trash?: boolean;
} & Pick<FindOptions<TSlug, TSelect>, 'select'>;
export declare const deleteByIDOperation: <TSlug extends CollectionSlug, TSelect extends SelectType>(incomingArgs: Arguments<TSlug, TSelect>) => Promise<TransformCollectionWithSelect<TSlug, TSelect>>;
//# sourceMappingURL=deleteByID.d.ts.map

View File

@@ -0,0 +1,8 @@
import { Parser } from "../index.js";
export declare const parsers: {
angular: Parser;
html: Parser;
lwc: Parser;
vue: Parser;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","React","EditIcon","useCellProps","DefaultCell","DrawerLink","t0","$","onDrawerOpen","cellProps","t1","_jsxs","className","children","_jsx","link","onClick","rowData","id","collectionSlug","type"],"sources":["../../../../../src/elements/RelationshipTable/cells/DrawerLink/index.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\n\nimport type { OnDrawerOpen } from '../../index.js'\n\nimport { EditIcon } from '../../../../icons/Edit/index.js'\nimport { useCellProps } from '../../../../providers/TableColumns/RenderDefaultCell/index.js'\nimport { DefaultCell } from '../../../Table/DefaultCell/index.js'\nimport './index.scss'\n\nexport const DrawerLink: React.FC<{\n currentDrawerID?: string\n onDrawerOpen: OnDrawerOpen\n}> = ({ onDrawerOpen }) => {\n const cellProps = useCellProps()\n\n return (\n <div className=\"drawer-link\">\n <DefaultCell {...cellProps} className=\"drawer-link__cell\" link={false} onClick={null} />\n <button\n className=\"drawer-link__doc-drawer-toggler\"\n onClick={() => {\n onDrawerOpen(cellProps.rowData.id, cellProps.collectionSlug)\n }}\n type=\"button\"\n >\n <EditIcon />\n </button>\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAEA,OAAOC,KAAA,MAAW;AAIlB,SAASC,QAAQ,QAAQ;AACzB,SAASC,YAAY,QAAQ;AAC7B,SAASC,WAAW,QAAQ;AAC5B,OAAO;AAEP,OAAO,MAAMC,UAAA,GAGRC,EAAA;EAAA,MAAAC,CAAA,GAAAP,EAAA;EAAC;IAAAQ;EAAA,IAAAF,EAAgB;EACpB,MAAAG,SAAA,GAAkBN,YAAA;EAAA,IAAAO,EAAA;EAAA,IAAAH,CAAA,QAAAE,SAAA,IAAAF,CAAA,QAAAC,YAAA;IAGhBE,EAAA,GAAAC,KAAA,CAAC;MAAAC,SAAA,EAAc;MAAAC,QAAA,GACbC,IAAA,CAAAV,WAAA;QAAA,GAAiBK,SAAS;QAAAG,SAAA,EAAY;QAAAG,IAAA;QAAAC,OAAA;MAAA,C,GACtCF,IAAA,CAAC;QAAAF,SAAA,EACW;QAAAI,OAAA,EAAAA,CAAA;UAERR,YAAA,CAAaC,SAAA,CAAAQ,OAAA,CAAAC,EAAA,EAAsBT,SAAA,CAAAU,cAAwB;QAAA;QAAAC,IAAA,EAExD;QAAAP,QAAA,EAELC,IAAA,CAAAZ,QAAA,IAAC;MAAA,C;;;;;;;;SATLQ,E;CAaJ","ignoreList":[]}

View File

@@ -0,0 +1,72 @@
import { jobAfterRead, jobsCollectionSlug } from '../config/collection.js';
/**
* Convenience method for updateJobs by id
*/ export async function updateJob(args) {
const result = await updateJobs(args);
if (result) {
return result[0];
}
}
/**
* Helper for updating jobs in the most performant way possible.
* Handles deciding whether it can used direct db methods or not, and if so,
* manually runs the afterRead hook that populates the `taskStatus` property.
*/ export async function updateJobs({ id, data, depth, disableTransaction, limit: limitArg, req, returning, sort, where: whereArg }) {
const limit = id ? 1 : limitArg;
const where = id ? {
id: {
equals: id
}
} : whereArg;
if (depth || req.payload.config?.jobs?.runHooks) {
const result = await req.payload.update({
id,
collection: jobsCollectionSlug,
data,
depth,
disableTransaction,
limit,
req,
where
});
if (returning === false || !result) {
return null;
}
return result.docs;
}
const jobReq = {
transactionID: req.payload.db.name !== 'mongoose' ? await req.payload.db.beginTransaction() : undefined
};
if (typeof data.updatedAt === 'undefined') {
// Ensure updatedAt date is always updated
data.updatedAt = new Date().toISOString();
}
const args = id ? {
id,
data,
req: jobReq,
returning
} : {
data,
limit,
req: jobReq,
returning,
sort,
where: where
};
const updatedJobs = await req.payload.db.updateJobs(args);
if (req.payload.db.name !== 'mongoose' && jobReq.transactionID) {
await req.payload.db.commitTransaction(jobReq.transactionID);
}
if (returning === false || !updatedJobs?.length) {
return null;
}
return updatedJobs.map((updatedJob)=>{
return jobAfterRead({
config: req.payload.config,
doc: updatedJob
});
});
}
//# sourceMappingURL=updateJob.js.map

View File

@@ -0,0 +1,4 @@
export declare const errorMessages: {
413: string;
};
//# sourceMappingURL=errorMessages.d.ts.map

View File

@@ -0,0 +1,12 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("void", () => {
const v = z.void();
v.parse(undefined);
expect(() => v.parse(null)).toThrow();
expect(() => v.parse("")).toThrow();
type v = z.infer<typeof v>;
expectTypeOf<v>().toEqualTypeOf<void>();
});

View File

@@ -0,0 +1,56 @@
{
"name": "https-proxy-agent",
"version": "5.0.1",
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
"main": "dist/index",
"types": "dist/index",
"files": [
"dist"
],
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc",
"test": "mocha --reporter spec",
"test-lint": "eslint src --ext .js,.ts",
"prepublishOnly": "npm run build"
},
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/node-https-proxy-agent.git"
},
"keywords": [
"https",
"proxy",
"endpoint",
"agent"
],
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/TooTallNate/node-https-proxy-agent/issues"
},
"dependencies": {
"agent-base": "6",
"debug": "4"
},
"devDependencies": {
"@types/debug": "4",
"@types/node": "^12.12.11",
"@typescript-eslint/eslint-plugin": "1.6.0",
"@typescript-eslint/parser": "1.1.0",
"eslint": "5.16.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-prettier": "4.1.0",
"eslint-import-resolver-typescript": "1.1.1",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"mocha": "^6.2.2",
"proxy": "1",
"rimraf": "^3.0.0",
"typescript": "^3.5.3"
},
"engines": {
"node": ">= 6"
}
}

View File

@@ -0,0 +1,40 @@
{
"name": "colorette",
"version": "2.0.20",
"type": "module",
"main": "index.cjs",
"module": "index.js",
"types": "index.d.ts",
"description": "🌈Easily set your terminal text color & styles.",
"repository": "jorgebucaran/colorette",
"license": "MIT",
"exports": {
"./package.json": "./package.json",
".": {
"require": "./index.cjs",
"import": "./index.js",
"types": "./index.d.ts"
}
},
"files": [
"*.*(c)[tj]s*"
],
"author": "Jorge Bucaran",
"keywords": [
"terminal",
"styles",
"color",
"ansi"
],
"scripts": {
"test": "c8 twist tests/*.js",
"build": "npx rollup --format cjs --input index.js --file index.cjs",
"deploy": "npm test && git commit --all --message $tag && git tag --sign $tag --message $tag && git push && git push --tags",
"release": "tag=$npm_package_version npm run deploy && npm publish --access public",
"prepare": "npm run build"
},
"devDependencies": {
"c8": "*",
"twist": "*"
}
}

View File

@@ -0,0 +1,22 @@
import { DirectusVersion } from "../../../schema/version.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/delete/versions.d.ts
/**
* Delete multiple existing Content Versions.
* @param keys
* @returns
* @throws Will throw if keys is empty
*/
declare const deleteContentVersions: <Schema>(keys: DirectusVersion<Schema>["id"][]) => RestCommand<void, Schema>;
/**
* Delete an existing Content Version.
* @param key
* @returns
* @throws Will throw if key is empty
*/
declare const deleteContentVersion: <Schema>(key: DirectusVersion<Schema>["id"]) => RestCommand<void, Schema>;
//#endregion
export { deleteContentVersion, deleteContentVersions };
//# sourceMappingURL=versions.d.ts.map

View File

@@ -0,0 +1,10 @@
{
"name": "dist",
"private": true,
"version": "1.0.0",
"main": "bundle.min.js",
"type": "commonjs",
"author": "",
"license": "BSD-2-Clause",
"description": "A package to hold the Terser dist bundle as commonjs while keeping the rest of it ESM. Nothing to see here."
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"grip-vertical.js","sources":["../../../src/icons/grip-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name GripVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iMTIiIHI9IjEiIC8+CiAgPGNpcmNsZSBjeD0iOSIgY3k9IjUiIHI9IjEiIC8+CiAgPGNpcmNsZSBjeD0iOSIgY3k9IjE5IiByPSIxIiAvPgogIDxjaXJjbGUgY3g9IjE1IiBjeT0iMTIiIHI9IjEiIC8+CiAgPGNpcmNsZSBjeD0iMTUiIGN5PSI1IiByPSIxIiAvPgogIDxjaXJjbGUgY3g9IjE1IiBjeT0iMTkiIHI9IjEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/grip-vertical\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 GripVertical = createLucideIcon('GripVertical', [\n ['circle', { cx: '9', cy: '12', r: '1', key: '1vctgf' }],\n ['circle', { cx: '9', cy: '5', r: '1', key: 'hp0tcf' }],\n ['circle', { cx: '9', cy: '19', r: '1', key: 'fkjjf6' }],\n ['circle', { cx: '15', cy: '12', r: '1', key: '1tmaij' }],\n ['circle', { cx: '15', cy: '5', r: '1', key: '19l28e' }],\n ['circle', { cx: '15', cy: '19', r: '1', key: 'f4zoj3' }],\n]);\n\nexport default GripVertical;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CACpD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACtD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"fields.js","names":[],"sources":["../../../../src/rest/commands/delete/fields.ts"],"sourcesContent":["import type { DirectusField } from '../../../schema/field.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\n/**\n * Deletes the given field in the given collection.\n * @param collection\n * @param field\n * @returns\n * @throws Will throw if collection is empty\n * @throws Will throw if field is empty\n */\nexport const deleteField =\n\t<Schema>(\n\t\tcollection: DirectusField<Schema>['collection'],\n\t\tfield: DirectusField<Schema>['field'],\n\t): RestCommand<void, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(collection, 'Collection cannot be empty');\n\t\tthrowIfEmpty(field, 'Field cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/fields/${collection}/${field}`,\n\t\t\tmethod: 'DELETE',\n\t\t};\n\t};\n"],"mappings":"6DAYA,MAAa,GAEX,EACA,SAGA,EAAa,EAAY,6BAA6B,CACtD,EAAa,EAAO,wBAAwB,CAErC,CACN,KAAM,WAAW,EAAW,GAAG,IAC/B,OAAQ,SACR"}

View File

@@ -0,0 +1,10 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Maltese locale.
* @language Maltese
* @iso-639-2 mlt
* @author Andras Matzon [@amatzon](@link https://github.com/amatzon)
* @author Bryan Borg [@bryanMt](@link https://github.com/bryanMt)
*/
export declare const mt: Locale;

View File

@@ -0,0 +1,28 @@
'use strict';
const DatePart = require('./datepart');
class Milliseconds extends DatePart {
constructor(opts = {}) {
super(opts);
}
up() {
this.date.setMilliseconds(this.date.getMilliseconds() + 1);
}
down() {
this.date.setMilliseconds(this.date.getMilliseconds() - 1);
}
setTo(val) {
this.date.setMilliseconds(parseInt(val.substr(-this.token.length)));
}
toString() {
return String(this.date.getMilliseconds()).padStart(4, '0').substr(0, this.token.length);
}
}
module.exports = Milliseconds;

View File

@@ -0,0 +1,30 @@
"use strict";
exports.__esModule = true;
exports.config = exports.Transition = exports.TransitionGroup = exports.SwitchTransition = exports.ReplaceTransition = exports.CSSTransition = void 0;
var _CSSTransition = _interopRequireDefault(require("./CSSTransition"));
exports.CSSTransition = _CSSTransition.default;
var _ReplaceTransition = _interopRequireDefault(require("./ReplaceTransition"));
exports.ReplaceTransition = _ReplaceTransition.default;
var _SwitchTransition = _interopRequireDefault(require("./SwitchTransition"));
exports.SwitchTransition = _SwitchTransition.default;
var _TransitionGroup = _interopRequireDefault(require("./TransitionGroup"));
exports.TransitionGroup = _TransitionGroup.default;
var _Transition = _interopRequireDefault(require("./Transition"));
exports.Transition = _Transition.default;
var _config = _interopRequireDefault(require("./config"));
exports.config = _config.default;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

View File

@@ -0,0 +1,33 @@
import { status as httpStatus } from 'http-status';
import { APIError } from '../../errors/APIError.js';
import { getRequestCollection } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { parseParams } from '../../utilities/parseParams/index.js';
import { findDistinctOperation } from '../operations/findDistinct.js';
export const findDistinctHandler = async (req)=>{
const collection = getRequestCollection(req);
const { depth, field, limit, page, sort, trash, where } = parseParams(req.query);
if (!field) {
throw new APIError('field must be specified', httpStatus.BAD_REQUEST);
}
const result = await findDistinctOperation({
collection,
depth,
field,
limit,
page,
req,
sort,
trash,
where
});
return Response.json(result, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=findDistinct.js.map

View File

@@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
export type PgBooleanBuilderInitial<TName extends string> = PgBooleanBuilder<{
name: TName;
dataType: 'boolean';
columnType: 'PgBoolean';
data: boolean;
driverParam: boolean;
enumValues: undefined;
}>;
export declare class PgBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'PgBoolean'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgBoolean<T extends ColumnBaseConfig<'boolean', 'PgBoolean'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function boolean(): PgBooleanBuilderInitial<''>;
export declare function boolean<TName extends string>(name: TName): PgBooleanBuilderInitial<TName>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"envToBool.js","sources":["../../../src/utils/envToBool.ts"],"sourcesContent":["export const FALSY_ENV_VALUES = new Set(['false', 'f', 'n', 'no', 'off', '0']);\nexport const TRUTHY_ENV_VALUES = new Set(['true', 't', 'y', 'yes', 'on', '1']);\n\nexport type StrictBoolCast = {\n strict: true;\n};\n\nexport type LooseBoolCast = {\n strict?: false;\n};\n\nexport type BoolCastOptions = StrictBoolCast | LooseBoolCast;\n\nexport function envToBool(value: unknown, options?: LooseBoolCast): boolean;\nexport function envToBool(value: unknown, options: StrictBoolCast): boolean | null;\nexport function envToBool(value: unknown, options?: BoolCastOptions): boolean | null;\n/**\n * A helper function which casts an ENV variable value to `true` or `false` using the constants defined above.\n * In strict mode, it may return `null` if the value doesn't match any of the predefined values.\n *\n * @param value The value of the env variable\n * @param options -- Only has `strict` key for now, which requires a strict match for `true` in TRUTHY_ENV_VALUES\n * @returns true/false if the lowercase value matches the predefined values above. If not, null in strict mode,\n * and Boolean(value) in loose mode.\n */\nexport function envToBool(value: unknown, options?: BoolCastOptions): boolean | null {\n const normalized = String(value).toLowerCase();\n\n if (FALSY_ENV_VALUES.has(normalized)) {\n return false;\n }\n\n if (TRUTHY_ENV_VALUES.has(normalized)) {\n return true;\n }\n\n return options?.strict ? null : Boolean(value);\n}\n"],"names":[],"mappings":"MAAa,gBAAA,GAAmB,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC;MAChE,iBAAA,GAAoB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC;;AAe7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,CAAC,KAAK,EAAW,OAAO,EAAoC;AACrF,EAAE,MAAM,UAAA,GAAa,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE;;AAEhD,EAAE,IAAI,gBAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;AACxC,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF,EAAE,IAAI,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;AACzC,IAAI,OAAO,IAAI;AACf,EAAE;;AAEF,EAAE,OAAO,OAAO,EAAE,MAAA,GAAS,OAAO,OAAO,CAAC,KAAK,CAAC;AAChD;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"server.js","sources":["../../../src/icons/server.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Server\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iOCIgeD0iMiIgeT0iMiIgcng9IjIiIHJ5PSIyIiAvPgogIDxyZWN0IHdpZHRoPSIyMCIgaGVpZ2h0PSI4IiB4PSIyIiB5PSIxNCIgcng9IjIiIHJ5PSIyIiAvPgogIDxsaW5lIHgxPSI2IiB4Mj0iNi4wMSIgeTE9IjYiIHkyPSI2IiAvPgogIDxsaW5lIHgxPSI2IiB4Mj0iNi4wMSIgeTE9IjE4IiB5Mj0iMTgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/server\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 Server = createLucideIcon('Server', [\n ['rect', { width: '20', height: '8', x: '2', y: '2', rx: '2', ry: '2', key: 'ngkwjq' }],\n ['rect', { width: '20', height: '8', x: '2', y: '14', rx: '2', ry: '2', key: 'iecqi9' }],\n ['line', { x1: '6', x2: '6.01', y1: '6', y2: '6', key: '16zg32' }],\n ['line', { x1: '6', x2: '6.01', y1: '18', y2: '18', key: 'nzw8ys' }],\n]);\n\nexport default Server;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,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,CAAK,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,CACtF,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,CAAK,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,MAAM,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,CACvF,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACrE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,415 @@
/**
* @license React
* scheduler-unstable_mock.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
function push(heap, node) {
var index = heap.length;
heap.push(node);
a: for (; 0 < index; ) {
var parentIndex = (index - 1) >>> 1,
parent = heap[parentIndex];
if (0 < compare(parent, node))
(heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
else break a;
}
}
function peek(heap) {
return 0 === heap.length ? null : heap[0];
}
function pop(heap) {
if (0 === heap.length) return null;
var first = heap[0],
last = heap.pop();
if (last !== first) {
heap[0] = last;
a: for (
var index = 0, length = heap.length, halfLength = length >>> 1;
index < halfLength;
) {
var leftIndex = 2 * (index + 1) - 1,
left = heap[leftIndex],
rightIndex = leftIndex + 1,
right = heap[rightIndex];
if (0 > compare(left, last))
rightIndex < length && 0 > compare(right, left)
? ((heap[index] = right),
(heap[rightIndex] = last),
(index = rightIndex))
: ((heap[index] = left),
(heap[leftIndex] = last),
(index = leftIndex));
else if (rightIndex < length && 0 > compare(right, last))
(heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
else break a;
}
}
return first;
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return 0 !== diff ? diff : a.id - b.id;
}
var taskQueue = [],
timerQueue = [],
taskIdCounter = 1,
currentTask = null,
currentPriorityLevel = 3,
isPerformingWork = !1,
isHostCallbackScheduled = !1,
isHostTimeoutScheduled = !1,
currentMockTime = 0,
scheduledCallback = null,
scheduledTimeout = null,
timeoutTime = -1,
yieldedValues = null,
expectedNumberOfYields = -1,
didStop = !1,
isFlushing = !1,
needsPaint = !1,
shouldYieldForPaint = !1,
disableYieldValue = !1;
function advanceTimers(currentTime) {
for (var timer = peek(timerQueue); null !== timer; ) {
if (null === timer.callback) pop(timerQueue);
else if (timer.startTime <= currentTime)
pop(timerQueue),
(timer.sortIndex = timer.expirationTime),
push(taskQueue, timer);
else break;
timer = peek(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = !1;
advanceTimers(currentTime);
if (!isHostCallbackScheduled)
if (null !== peek(taskQueue))
(isHostCallbackScheduled = !0), (scheduledCallback = flushWork);
else {
var firstTimer = peek(timerQueue);
null !== firstTimer &&
((currentTime = firstTimer.startTime - currentTime),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + currentTime));
}
}
function flushWork(hasTimeRemaining, initialTime) {
isHostCallbackScheduled = !1;
isHostTimeoutScheduled &&
((isHostTimeoutScheduled = !1),
(scheduledTimeout = null),
(timeoutTime = -1));
isPerformingWork = !0;
var previousPriorityLevel = currentPriorityLevel;
try {
a: {
advanceTimers(initialTime);
for (
currentTask = peek(taskQueue);
null !== currentTask &&
(!(currentTask.expirationTime > initialTime) ||
(hasTimeRemaining && !shouldYieldToHost()));
) {
var callback = currentTask.callback;
if ("function" === typeof callback) {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var continuationCallback = callback(
currentTask.expirationTime <= initialTime
);
initialTime = currentMockTime;
if ("function" === typeof continuationCallback) {
if (
((currentTask.callback = continuationCallback),
advanceTimers(initialTime),
shouldYieldForPaint)
) {
var JSCompiler_inline_result = (needsPaint = !0);
break a;
}
} else
currentTask === peek(taskQueue) && pop(taskQueue),
advanceTimers(initialTime);
} else pop(taskQueue);
currentTask = peek(taskQueue);
}
if (null !== currentTask) JSCompiler_inline_result = !0;
else {
var firstTimer = peek(timerQueue);
if (null !== firstTimer) {
var ms = firstTimer.startTime - initialTime;
scheduledTimeout = handleTimeout;
timeoutTime = currentMockTime + ms;
}
JSCompiler_inline_result = !1;
}
}
return JSCompiler_inline_result;
} finally {
(currentTask = null),
(currentPriorityLevel = previousPriorityLevel),
(isPerformingWork = !1);
}
}
function shouldYieldToHost() {
return (0 === expectedNumberOfYields && null === yieldedValues) ||
(-1 !== expectedNumberOfYields &&
null !== yieldedValues &&
yieldedValues.length >= expectedNumberOfYields) ||
(shouldYieldForPaint && needsPaint)
? (didStop = !0)
: !1;
}
function unstable_flushAllWithoutAsserting() {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork);
hasMoreWork || (scheduledCallback = null);
return !0;
} finally {
isFlushing = !1;
}
} else return !1;
}
exports.log = function (value) {
"disabledLog" === console.log.name ||
disableYieldValue ||
(null === yieldedValues
? (yieldedValues = [value])
: yieldedValues.push(value));
};
exports.reset = function () {
if (isFlushing) throw Error("Cannot reset while already flushing work.");
currentMockTime = 0;
scheduledTimeout = scheduledCallback = null;
timeoutTime = -1;
yieldedValues = null;
expectedNumberOfYields = -1;
needsPaint = isFlushing = didStop = !1;
};
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_advanceTime = function (ms) {
"disabledLog" === console.log.name ||
disableYieldValue ||
((currentMockTime += ms),
null !== scheduledTimeout &&
timeoutTime <= currentMockTime &&
(scheduledTimeout(currentMockTime),
(timeoutTime = -1),
(scheduledTimeout = null)));
};
exports.unstable_cancelCallback = function (task) {
task.callback = null;
};
exports.unstable_clearLog = function () {
if (null === yieldedValues) return [];
var values = yieldedValues;
yieldedValues = null;
return values;
};
exports.unstable_continueExecution = function () {
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork));
};
exports.unstable_flushAll = function () {
if (null !== yieldedValues)
throw Error(
"Log is not empty. Assert on the log of yielded values before flushing additional work."
);
unstable_flushAllWithoutAsserting();
if (null !== yieldedValues)
throw Error(
"While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])"
);
};
exports.unstable_flushAllWithoutAsserting = unstable_flushAllWithoutAsserting;
exports.unstable_flushExpired = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
isFlushing = !0;
try {
scheduledCallback(!1, currentMockTime) || (scheduledCallback = null);
} finally {
isFlushing = !1;
}
}
};
exports.unstable_flushNumberOfYields = function (count) {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
expectedNumberOfYields = count;
isFlushing = !0;
try {
count = !0;
do count = cb(!0, currentMockTime);
while (count && !didStop);
count || (scheduledCallback = null);
} finally {
(expectedNumberOfYields = -1), (isFlushing = didStop = !1);
}
}
};
exports.unstable_flushUntilNextPaint = function () {
if (isFlushing) throw Error("Already flushing work.");
if (null !== scheduledCallback) {
var cb = scheduledCallback;
shouldYieldForPaint = !0;
needsPaint = !1;
isFlushing = !0;
try {
var hasMoreWork = !0;
do hasMoreWork = cb(!0, currentMockTime);
while (hasMoreWork && !didStop);
hasMoreWork || (scheduledCallback = null);
} finally {
isFlushing = didStop = shouldYieldForPaint = !1;
}
}
return !1;
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel;
};
exports.unstable_getFirstCallbackNode = function () {
return peek(taskQueue);
};
exports.unstable_hasPendingWork = function () {
return null !== scheduledCallback;
};
exports.unstable_next = function (eventHandler) {
switch (currentPriorityLevel) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_now = function () {
return currentMockTime;
};
exports.unstable_pauseExecution = function () {};
exports.unstable_requestPaint = function () {
needsPaint = !0;
};
exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
switch (priorityLevel) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
priorityLevel = 3;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
var currentTime = currentMockTime;
"object" === typeof options && null !== options
? ((options = options.delay),
(options =
"number" === typeof options && 0 < options
? currentTime + options
: currentTime))
: (options = currentTime);
switch (priorityLevel) {
case 1:
var timeout = -1;
break;
case 2:
timeout = 250;
break;
case 5:
timeout = 1073741823;
break;
case 4:
timeout = 1e4;
break;
default:
timeout = 5e3;
}
timeout = options + timeout;
priorityLevel = {
id: taskIdCounter++,
callback: callback,
priorityLevel: priorityLevel,
startTime: options,
expirationTime: timeout,
sortIndex: -1
};
options > currentTime
? ((priorityLevel.sortIndex = options),
push(timerQueue, priorityLevel),
null === peek(taskQueue) &&
priorityLevel === peek(timerQueue) &&
(isHostTimeoutScheduled
? ((scheduledTimeout = null), (timeoutTime = -1))
: (isHostTimeoutScheduled = !0),
(scheduledTimeout = handleTimeout),
(timeoutTime = currentMockTime + (options - currentTime))))
: ((priorityLevel.sortIndex = timeout),
push(taskQueue, priorityLevel),
isHostCallbackScheduled ||
isPerformingWork ||
((isHostCallbackScheduled = !0), (scheduledCallback = flushWork)));
return priorityLevel;
};
exports.unstable_setDisableYieldValue = function (newValue) {
disableYieldValue = newValue;
};
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel;
return function () {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"stack.js","sourceRoot":"","sources":["../src/stack.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAG,OAAO,CAAC;AACxB,MAAM,OAAO,GAAG,WAAW,CAAC;AAc5B;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,SAAyC;IACnE,OAAO,OAAO,CACZ,SAAS;QACT,SAAS,CAAC,YAAY;QACtB,OAAO,SAAS,CAAC,GAAG,KAAK,UAAU,CACpC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,SAAyC;IACvE,OAAO,OAAO;IACZ,uFAAuF;IACvF,CAAC,SAAS;QACV,SAAS,CAAC,QAAQ;QAClB,OAAO,SAAS,CAAC,GAAG,KAAK,UAAU,CACpC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,QAAmB,EAAE,aAAyB;IACvE,IAAI,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,aAAa,GAAG,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAEpE,IAAI,QAAQ,IAAI,aAAa,EAAE;QAC7B,OAAO,QAAQ,GAAG,MAAM,GAAG,aAAa,CAAC;KAC1C;SACI;QACH,OAAO,QAAQ,IAAI,aAAa,CAAC;KAClC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,SAAoB,EAAE,QAAmB,EAAE,aAAyB;IACjG,IAAI,aAAa,EAAE;QACjB,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE;YACvC,GAAG,EAAE,GAAG,EAAE;gBACR,IAAI,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;gBAC7C,OAAO,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,aAAa,CAAC,CAAC;YACxD,CAAC;YACD,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC;KACJ;SACI;QACH,YAAY,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;KACnC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,QAAQ,CAAC,KAAyB;IACzC,IAAI,KAAK,EAAE;QACT,IAAI,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEjC,qDAAqD;QACrD,IAAI,QAAQ,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YAEpB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACtB,IAAI,QAAQ,KAAK,SAAS,EAAE;oBAC1B,kDAAkD;oBAClD,mDAAmD;oBACnD,QAAQ,GAAG,CAAC,CAAC;iBACd;aACF;iBACI,IAAI,QAAQ,KAAK,SAAS,EAAE;gBAC/B,+DAA+D;gBAC/D,oDAAoD;gBACpD,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC;gBACrC,MAAM;aACP;SACF;QAED,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACpB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACzB;KACF;IAED,kEAAkE;IAClE,yEAAyE;IACzE,kCAAkC;IAClC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,KAAgB,EAAE,SAAoB;IAC1D,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE;QACpC,GAAG,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC/C,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,IAAI;KACnB,CAAC,CAAC;AACL,CAAC"}

View File

@@ -0,0 +1 @@
module.exports={C:{"4":0.01579,"5":0.00526,"41":0.00526,"52":0.01579,"77":0.00526,"78":0.02105,"115":0.27889,"125":0.00526,"127":0.00526,"128":0.01579,"133":0.09998,"134":0.03157,"135":0.00526,"136":0.00526,"138":0.01052,"139":0.01052,"140":0.11576,"141":0.01052,"142":0.01579,"143":0.01579,"144":0.03157,"145":1.04714,"146":1.66805,"147":0.00526,_:"2 3 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 126 129 130 131 132 137 148 149 3.5 3.6"},D:{"38":0.01052,"41":0.00526,"49":0.01052,"53":0.00526,"66":0.00526,"69":0.00526,"70":0.00526,"72":0.00526,"75":0.02105,"77":0.00526,"79":0.18417,"80":0.01052,"81":0.01052,"85":0.00526,"87":0.14207,"88":0.00526,"89":0.00526,"90":0.00526,"91":0.01579,"93":0.00526,"94":0.01052,"95":0.00526,"99":0.00526,"103":0.03157,"104":0.03157,"105":0.01052,"106":0.02105,"107":0.01052,"108":0.03157,"109":1.07345,"110":0.01052,"111":0.05788,"112":0.83666,"114":0.01052,"116":0.09472,"117":0.01052,"118":0.01579,"119":0.01052,"120":0.06841,"121":0.05262,"122":0.0421,"123":0.01579,"124":0.03683,"125":0.16312,"126":0.17365,"127":0.02631,"128":0.0421,"129":0.01052,"130":0.01579,"131":0.12103,"132":0.03683,"133":0.05788,"134":0.03683,"135":0.0421,"136":0.0421,"137":0.04736,"138":0.17365,"139":1.17343,"140":0.11576,"141":0.26836,"142":11.5343,"143":16.98047,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 39 40 42 43 44 45 46 47 48 50 51 52 54 55 56 57 58 59 60 61 62 63 64 65 67 68 71 73 74 76 78 83 84 86 92 96 97 98 100 101 102 113 115 144 145 146"},F:{"46":0.02631,"93":0.08419,"95":0.03157,"122":0.00526,"123":0.03683,"124":1.18921,"125":0.45779,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"109":0.02631,"114":0.02105,"118":0.00526,"123":0.00526,"124":0.00526,"131":0.01579,"132":0.01052,"134":0.00526,"138":0.03157,"139":0.01579,"140":0.02105,"141":0.03157,"142":0.91033,"143":2.77834,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 119 120 121 122 125 126 127 128 129 130 133 135 136 137"},E:{"14":0.00526,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.5 17.0","13.1":0.00526,"14.1":0.01052,"15.2-15.3":0.00526,"15.4":0.00526,"15.6":0.05788,"16.0":0.01052,"16.1":0.01052,"16.2":0.00526,"16.3":0.01052,"16.4":0.00526,"16.5":0.00526,"16.6":0.07367,"17.1":0.0421,"17.2":0.01052,"17.3":0.01052,"17.4":0.01579,"17.5":0.06314,"17.6":0.06841,"18.0":0.00526,"18.1":0.03157,"18.2":0.00526,"18.3":0.03157,"18.4":0.01052,"18.5-18.6":0.05262,"26.0":0.03683,"26.1":0.27362,"26.2":0.07893,"26.3":0.00526},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00188,"5.0-5.1":0,"6.0-6.1":0.00377,"7.0-7.1":0.00283,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00754,"10.0-10.2":0.00094,"10.3":0.01319,"11.0-11.2":0.16209,"11.3-11.4":0.00471,"12.0-12.1":0.00377,"12.2-12.5":0.04241,"13.0-13.1":0.00094,"13.2":0.0066,"13.3":0.00188,"13.4-13.7":0.0066,"14.0-14.4":0.01319,"14.5-14.8":0.01414,"15.0-15.1":0.01508,"15.2-15.3":0.01131,"15.4":0.01225,"15.5":0.01319,"15.6-15.8":0.2045,"16.0":0.02356,"16.1":0.04523,"16.2":0.02356,"16.3":0.04241,"16.4":0.01037,"16.5":0.01791,"16.6-16.7":0.26575,"17.0":0.01508,"17.1":0.0245,"17.2":0.01791,"17.3":0.02733,"17.4":0.04618,"17.5":0.09047,"17.6-17.7":0.20921,"18.0":0.04712,"18.1":0.09801,"18.2":0.05183,"18.3":0.16869,"18.4":0.0867,"18.5-18.7":6.22542,"26.0":0.12157,"26.1":1.01118,"26.2":0.19225,"26.3":0.00848},P:{"4":0.23765,"21":0.01033,"22":0.01033,"23":0.031,"24":0.02067,"25":0.01033,"26":0.04133,"27":0.05166,"28":0.13433,"29":3.00683,_:"20 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 18.0","5.0-5.4":0.031,"6.2-6.4":0.01033,"7.2-7.4":0.14466,"8.2":0.01033,"17.0":0.01033,"19.0":0.01033},I:{"0":0.07096,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00006},A:{"8":0.01754,"11":0.00877,_:"6 7 9 10 5.5"},K:{"0":0.34587,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.01895},H:{"0":0},L:{"0":39.15863},R:{_:"0"},M:{"0":0.44537}};

View File

@@ -0,0 +1,809 @@
/*!
Copyright 2013 Lovell Fuller and others.
SPDX-License-Identifier: Apache-2.0
*/
const is = require('./is');
const sharp = require('./sharp');
/**
* Justification alignment
* @member
* @private
*/
const align = {
left: 'low',
top: 'low',
low: 'low',
center: 'centre',
centre: 'centre',
right: 'high',
bottom: 'high',
high: 'high'
};
const inputStreamParameters = [
// Limits and error handling
'failOn', 'limitInputPixels', 'unlimited',
// Format-generic
'animated', 'autoOrient', 'density', 'ignoreIcc', 'page', 'pages', 'sequentialRead',
// Format-specific
'jp2', 'openSlide', 'pdf', 'raw', 'svg', 'tiff',
// Deprecated
'failOnError', 'openSlideLevel', 'pdfBackground', 'tiffSubifd'
];
/**
* Extract input options, if any, from an object.
* @private
*/
function _inputOptionsFromObject (obj) {
const params = inputStreamParameters
.filter(p => is.defined(obj[p]))
.map(p => ([p, obj[p]]));
return params.length
? Object.fromEntries(params)
: undefined;
}
/**
* Create Object containing input and input-related options.
* @private
*/
function _createInputDescriptor (input, inputOptions, containerOptions) {
const inputDescriptor = {
autoOrient: false,
failOn: 'warning',
limitInputPixels: 0x3FFF ** 2,
ignoreIcc: false,
unlimited: false,
sequentialRead: true
};
if (is.string(input)) {
// filesystem
inputDescriptor.file = input;
} else if (is.buffer(input)) {
// Buffer
if (input.length === 0) {
throw Error('Input Buffer is empty');
}
inputDescriptor.buffer = input;
} else if (is.arrayBuffer(input)) {
if (input.byteLength === 0) {
throw Error('Input bit Array is empty');
}
inputDescriptor.buffer = Buffer.from(input, 0, input.byteLength);
} else if (is.typedArray(input)) {
if (input.length === 0) {
throw Error('Input Bit Array is empty');
}
inputDescriptor.buffer = Buffer.from(input.buffer, input.byteOffset, input.byteLength);
} else if (is.plainObject(input) && !is.defined(inputOptions)) {
// Plain Object descriptor, e.g. create
inputOptions = input;
if (_inputOptionsFromObject(inputOptions)) {
// Stream with options
inputDescriptor.buffer = [];
}
} else if (!is.defined(input) && !is.defined(inputOptions) && is.object(containerOptions) && containerOptions.allowStream) {
// Stream without options
inputDescriptor.buffer = [];
} else if (Array.isArray(input)) {
if (input.length > 1) {
// Join images together
if (!this.options.joining) {
this.options.joining = true;
this.options.join = input.map(i => this._createInputDescriptor(i));
} else {
throw new Error('Recursive join is unsupported');
}
} else {
throw new Error('Expected at least two images to join');
}
} else {
throw new Error(`Unsupported input '${input}' of type ${typeof input}${
is.defined(inputOptions) ? ` when also providing options of type ${typeof inputOptions}` : ''
}`);
}
if (is.object(inputOptions)) {
// Deprecated: failOnError
if (is.defined(inputOptions.failOnError)) {
if (is.bool(inputOptions.failOnError)) {
inputDescriptor.failOn = inputOptions.failOnError ? 'warning' : 'none';
} else {
throw is.invalidParameterError('failOnError', 'boolean', inputOptions.failOnError);
}
}
// failOn
if (is.defined(inputOptions.failOn)) {
if (is.string(inputOptions.failOn) && is.inArray(inputOptions.failOn, ['none', 'truncated', 'error', 'warning'])) {
inputDescriptor.failOn = inputOptions.failOn;
} else {
throw is.invalidParameterError('failOn', 'one of: none, truncated, error, warning', inputOptions.failOn);
}
}
// autoOrient
if (is.defined(inputOptions.autoOrient)) {
if (is.bool(inputOptions.autoOrient)) {
inputDescriptor.autoOrient = inputOptions.autoOrient;
} else {
throw is.invalidParameterError('autoOrient', 'boolean', inputOptions.autoOrient);
}
}
// Density
if (is.defined(inputOptions.density)) {
if (is.inRange(inputOptions.density, 1, 100000)) {
inputDescriptor.density = inputOptions.density;
} else {
throw is.invalidParameterError('density', 'number between 1 and 100000', inputOptions.density);
}
}
// Ignore embeddded ICC profile
if (is.defined(inputOptions.ignoreIcc)) {
if (is.bool(inputOptions.ignoreIcc)) {
inputDescriptor.ignoreIcc = inputOptions.ignoreIcc;
} else {
throw is.invalidParameterError('ignoreIcc', 'boolean', inputOptions.ignoreIcc);
}
}
// limitInputPixels
if (is.defined(inputOptions.limitInputPixels)) {
if (is.bool(inputOptions.limitInputPixels)) {
inputDescriptor.limitInputPixels = inputOptions.limitInputPixels
? 0x3FFF ** 2
: 0;
} else if (is.integer(inputOptions.limitInputPixels) && is.inRange(inputOptions.limitInputPixels, 0, Number.MAX_SAFE_INTEGER)) {
inputDescriptor.limitInputPixels = inputOptions.limitInputPixels;
} else {
throw is.invalidParameterError('limitInputPixels', 'positive integer', inputOptions.limitInputPixels);
}
}
// unlimited
if (is.defined(inputOptions.unlimited)) {
if (is.bool(inputOptions.unlimited)) {
inputDescriptor.unlimited = inputOptions.unlimited;
} else {
throw is.invalidParameterError('unlimited', 'boolean', inputOptions.unlimited);
}
}
// sequentialRead
if (is.defined(inputOptions.sequentialRead)) {
if (is.bool(inputOptions.sequentialRead)) {
inputDescriptor.sequentialRead = inputOptions.sequentialRead;
} else {
throw is.invalidParameterError('sequentialRead', 'boolean', inputOptions.sequentialRead);
}
}
// Raw pixel input
if (is.defined(inputOptions.raw)) {
if (
is.object(inputOptions.raw) &&
is.integer(inputOptions.raw.width) && inputOptions.raw.width > 0 &&
is.integer(inputOptions.raw.height) && inputOptions.raw.height > 0 &&
is.integer(inputOptions.raw.channels) && is.inRange(inputOptions.raw.channels, 1, 4)
) {
inputDescriptor.rawWidth = inputOptions.raw.width;
inputDescriptor.rawHeight = inputOptions.raw.height;
inputDescriptor.rawChannels = inputOptions.raw.channels;
switch (input.constructor) {
case Uint8Array:
case Uint8ClampedArray:
inputDescriptor.rawDepth = 'uchar';
break;
case Int8Array:
inputDescriptor.rawDepth = 'char';
break;
case Uint16Array:
inputDescriptor.rawDepth = 'ushort';
break;
case Int16Array:
inputDescriptor.rawDepth = 'short';
break;
case Uint32Array:
inputDescriptor.rawDepth = 'uint';
break;
case Int32Array:
inputDescriptor.rawDepth = 'int';
break;
case Float32Array:
inputDescriptor.rawDepth = 'float';
break;
case Float64Array:
inputDescriptor.rawDepth = 'double';
break;
default:
inputDescriptor.rawDepth = 'uchar';
break;
}
} else {
throw new Error('Expected width, height and channels for raw pixel input');
}
inputDescriptor.rawPremultiplied = false;
if (is.defined(inputOptions.raw.premultiplied)) {
if (is.bool(inputOptions.raw.premultiplied)) {
inputDescriptor.rawPremultiplied = inputOptions.raw.premultiplied;
} else {
throw is.invalidParameterError('raw.premultiplied', 'boolean', inputOptions.raw.premultiplied);
}
}
inputDescriptor.rawPageHeight = 0;
if (is.defined(inputOptions.raw.pageHeight)) {
if (is.integer(inputOptions.raw.pageHeight) && inputOptions.raw.pageHeight > 0 && inputOptions.raw.pageHeight <= inputOptions.raw.height) {
if (inputOptions.raw.height % inputOptions.raw.pageHeight !== 0) {
throw new Error(`Expected raw.height ${inputOptions.raw.height} to be a multiple of raw.pageHeight ${inputOptions.raw.pageHeight}`);
}
inputDescriptor.rawPageHeight = inputOptions.raw.pageHeight;
} else {
throw is.invalidParameterError('raw.pageHeight', 'positive integer', inputOptions.raw.pageHeight);
}
}
}
// Multi-page input (GIF, TIFF, PDF)
if (is.defined(inputOptions.animated)) {
if (is.bool(inputOptions.animated)) {
inputDescriptor.pages = inputOptions.animated ? -1 : 1;
} else {
throw is.invalidParameterError('animated', 'boolean', inputOptions.animated);
}
}
if (is.defined(inputOptions.pages)) {
if (is.integer(inputOptions.pages) && is.inRange(inputOptions.pages, -1, 100000)) {
inputDescriptor.pages = inputOptions.pages;
} else {
throw is.invalidParameterError('pages', 'integer between -1 and 100000', inputOptions.pages);
}
}
if (is.defined(inputOptions.page)) {
if (is.integer(inputOptions.page) && is.inRange(inputOptions.page, 0, 100000)) {
inputDescriptor.page = inputOptions.page;
} else {
throw is.invalidParameterError('page', 'integer between 0 and 100000', inputOptions.page);
}
}
// OpenSlide specific options
if (is.object(inputOptions.openSlide) && is.defined(inputOptions.openSlide.level)) {
if (is.integer(inputOptions.openSlide.level) && is.inRange(inputOptions.openSlide.level, 0, 256)) {
inputDescriptor.openSlideLevel = inputOptions.openSlide.level;
} else {
throw is.invalidParameterError('openSlide.level', 'integer between 0 and 256', inputOptions.openSlide.level);
}
} else if (is.defined(inputOptions.level)) {
// Deprecated
if (is.integer(inputOptions.level) && is.inRange(inputOptions.level, 0, 256)) {
inputDescriptor.openSlideLevel = inputOptions.level;
} else {
throw is.invalidParameterError('level', 'integer between 0 and 256', inputOptions.level);
}
}
// TIFF specific options
if (is.object(inputOptions.tiff) && is.defined(inputOptions.tiff.subifd)) {
if (is.integer(inputOptions.tiff.subifd) && is.inRange(inputOptions.tiff.subifd, -1, 100000)) {
inputDescriptor.tiffSubifd = inputOptions.tiff.subifd;
} else {
throw is.invalidParameterError('tiff.subifd', 'integer between -1 and 100000', inputOptions.tiff.subifd);
}
} else if (is.defined(inputOptions.subifd)) {
// Deprecated
if (is.integer(inputOptions.subifd) && is.inRange(inputOptions.subifd, -1, 100000)) {
inputDescriptor.tiffSubifd = inputOptions.subifd;
} else {
throw is.invalidParameterError('subifd', 'integer between -1 and 100000', inputOptions.subifd);
}
}
// SVG specific options
if (is.object(inputOptions.svg)) {
if (is.defined(inputOptions.svg.stylesheet)) {
if (is.string(inputOptions.svg.stylesheet)) {
inputDescriptor.svgStylesheet = inputOptions.svg.stylesheet;
} else {
throw is.invalidParameterError('svg.stylesheet', 'string', inputOptions.svg.stylesheet);
}
}
if (is.defined(inputOptions.svg.highBitdepth)) {
if (is.bool(inputOptions.svg.highBitdepth)) {
inputDescriptor.svgHighBitdepth = inputOptions.svg.highBitdepth;
} else {
throw is.invalidParameterError('svg.highBitdepth', 'boolean', inputOptions.svg.highBitdepth);
}
}
}
// PDF specific options
if (is.object(inputOptions.pdf) && is.defined(inputOptions.pdf.background)) {
inputDescriptor.pdfBackground = this._getBackgroundColourOption(inputOptions.pdf.background);
} else if (is.defined(inputOptions.pdfBackground)) {
// Deprecated
inputDescriptor.pdfBackground = this._getBackgroundColourOption(inputOptions.pdfBackground);
}
// JPEG 2000 specific options
if (is.object(inputOptions.jp2) && is.defined(inputOptions.jp2.oneshot)) {
if (is.bool(inputOptions.jp2.oneshot)) {
inputDescriptor.jp2Oneshot = inputOptions.jp2.oneshot;
} else {
throw is.invalidParameterError('jp2.oneshot', 'boolean', inputOptions.jp2.oneshot);
}
}
// Create new image
if (is.defined(inputOptions.create)) {
if (
is.object(inputOptions.create) &&
is.integer(inputOptions.create.width) && inputOptions.create.width > 0 &&
is.integer(inputOptions.create.height) && inputOptions.create.height > 0 &&
is.integer(inputOptions.create.channels)
) {
inputDescriptor.createWidth = inputOptions.create.width;
inputDescriptor.createHeight = inputOptions.create.height;
inputDescriptor.createChannels = inputOptions.create.channels;
inputDescriptor.createPageHeight = 0;
if (is.defined(inputOptions.create.pageHeight)) {
if (is.integer(inputOptions.create.pageHeight) && inputOptions.create.pageHeight > 0 && inputOptions.create.pageHeight <= inputOptions.create.height) {
if (inputOptions.create.height % inputOptions.create.pageHeight !== 0) {
throw new Error(`Expected create.height ${inputOptions.create.height} to be a multiple of create.pageHeight ${inputOptions.create.pageHeight}`);
}
inputDescriptor.createPageHeight = inputOptions.create.pageHeight;
} else {
throw is.invalidParameterError('create.pageHeight', 'positive integer', inputOptions.create.pageHeight);
}
}
// Noise
if (is.defined(inputOptions.create.noise)) {
if (!is.object(inputOptions.create.noise)) {
throw new Error('Expected noise to be an object');
}
if (inputOptions.create.noise.type !== 'gaussian') {
throw new Error('Only gaussian noise is supported at the moment');
}
inputDescriptor.createNoiseType = inputOptions.create.noise.type;
if (!is.inRange(inputOptions.create.channels, 1, 4)) {
throw is.invalidParameterError('create.channels', 'number between 1 and 4', inputOptions.create.channels);
}
inputDescriptor.createNoiseMean = 128;
if (is.defined(inputOptions.create.noise.mean)) {
if (is.number(inputOptions.create.noise.mean) && is.inRange(inputOptions.create.noise.mean, 0, 10000)) {
inputDescriptor.createNoiseMean = inputOptions.create.noise.mean;
} else {
throw is.invalidParameterError('create.noise.mean', 'number between 0 and 10000', inputOptions.create.noise.mean);
}
}
inputDescriptor.createNoiseSigma = 30;
if (is.defined(inputOptions.create.noise.sigma)) {
if (is.number(inputOptions.create.noise.sigma) && is.inRange(inputOptions.create.noise.sigma, 0, 10000)) {
inputDescriptor.createNoiseSigma = inputOptions.create.noise.sigma;
} else {
throw is.invalidParameterError('create.noise.sigma', 'number between 0 and 10000', inputOptions.create.noise.sigma);
}
}
} else if (is.defined(inputOptions.create.background)) {
if (!is.inRange(inputOptions.create.channels, 3, 4)) {
throw is.invalidParameterError('create.channels', 'number between 3 and 4', inputOptions.create.channels);
}
inputDescriptor.createBackground = this._getBackgroundColourOption(inputOptions.create.background);
} else {
throw new Error('Expected valid noise or background to create a new input image');
}
delete inputDescriptor.buffer;
} else {
throw new Error('Expected valid width, height and channels to create a new input image');
}
}
// Create a new image with text
if (is.defined(inputOptions.text)) {
if (is.object(inputOptions.text) && is.string(inputOptions.text.text)) {
inputDescriptor.textValue = inputOptions.text.text;
if (is.defined(inputOptions.text.height) && is.defined(inputOptions.text.dpi)) {
throw new Error('Expected only one of dpi or height');
}
if (is.defined(inputOptions.text.font)) {
if (is.string(inputOptions.text.font)) {
inputDescriptor.textFont = inputOptions.text.font;
} else {
throw is.invalidParameterError('text.font', 'string', inputOptions.text.font);
}
}
if (is.defined(inputOptions.text.fontfile)) {
if (is.string(inputOptions.text.fontfile)) {
inputDescriptor.textFontfile = inputOptions.text.fontfile;
} else {
throw is.invalidParameterError('text.fontfile', 'string', inputOptions.text.fontfile);
}
}
if (is.defined(inputOptions.text.width)) {
if (is.integer(inputOptions.text.width) && inputOptions.text.width > 0) {
inputDescriptor.textWidth = inputOptions.text.width;
} else {
throw is.invalidParameterError('text.width', 'positive integer', inputOptions.text.width);
}
}
if (is.defined(inputOptions.text.height)) {
if (is.integer(inputOptions.text.height) && inputOptions.text.height > 0) {
inputDescriptor.textHeight = inputOptions.text.height;
} else {
throw is.invalidParameterError('text.height', 'positive integer', inputOptions.text.height);
}
}
if (is.defined(inputOptions.text.align)) {
if (is.string(inputOptions.text.align) && is.string(this.constructor.align[inputOptions.text.align])) {
inputDescriptor.textAlign = this.constructor.align[inputOptions.text.align];
} else {
throw is.invalidParameterError('text.align', 'valid alignment', inputOptions.text.align);
}
}
if (is.defined(inputOptions.text.justify)) {
if (is.bool(inputOptions.text.justify)) {
inputDescriptor.textJustify = inputOptions.text.justify;
} else {
throw is.invalidParameterError('text.justify', 'boolean', inputOptions.text.justify);
}
}
if (is.defined(inputOptions.text.dpi)) {
if (is.integer(inputOptions.text.dpi) && is.inRange(inputOptions.text.dpi, 1, 1000000)) {
inputDescriptor.textDpi = inputOptions.text.dpi;
} else {
throw is.invalidParameterError('text.dpi', 'integer between 1 and 1000000', inputOptions.text.dpi);
}
}
if (is.defined(inputOptions.text.rgba)) {
if (is.bool(inputOptions.text.rgba)) {
inputDescriptor.textRgba = inputOptions.text.rgba;
} else {
throw is.invalidParameterError('text.rgba', 'bool', inputOptions.text.rgba);
}
}
if (is.defined(inputOptions.text.spacing)) {
if (is.integer(inputOptions.text.spacing) && is.inRange(inputOptions.text.spacing, -1000000, 1000000)) {
inputDescriptor.textSpacing = inputOptions.text.spacing;
} else {
throw is.invalidParameterError('text.spacing', 'integer between -1000000 and 1000000', inputOptions.text.spacing);
}
}
if (is.defined(inputOptions.text.wrap)) {
if (is.string(inputOptions.text.wrap) && is.inArray(inputOptions.text.wrap, ['word', 'char', 'word-char', 'none'])) {
inputDescriptor.textWrap = inputOptions.text.wrap;
} else {
throw is.invalidParameterError('text.wrap', 'one of: word, char, word-char, none', inputOptions.text.wrap);
}
}
delete inputDescriptor.buffer;
} else {
throw new Error('Expected a valid string to create an image with text.');
}
}
// Join images together
if (is.defined(inputOptions.join)) {
if (is.defined(this.options.join)) {
if (is.defined(inputOptions.join.animated)) {
if (is.bool(inputOptions.join.animated)) {
inputDescriptor.joinAnimated = inputOptions.join.animated;
} else {
throw is.invalidParameterError('join.animated', 'boolean', inputOptions.join.animated);
}
}
if (is.defined(inputOptions.join.across)) {
if (is.integer(inputOptions.join.across) && is.inRange(inputOptions.join.across, 1, 1000000)) {
inputDescriptor.joinAcross = inputOptions.join.across;
} else {
throw is.invalidParameterError('join.across', 'integer between 1 and 100000', inputOptions.join.across);
}
}
if (is.defined(inputOptions.join.shim)) {
if (is.integer(inputOptions.join.shim) && is.inRange(inputOptions.join.shim, 0, 1000000)) {
inputDescriptor.joinShim = inputOptions.join.shim;
} else {
throw is.invalidParameterError('join.shim', 'integer between 0 and 100000', inputOptions.join.shim);
}
}
if (is.defined(inputOptions.join.background)) {
inputDescriptor.joinBackground = this._getBackgroundColourOption(inputOptions.join.background);
}
if (is.defined(inputOptions.join.halign)) {
if (is.string(inputOptions.join.halign) && is.string(this.constructor.align[inputOptions.join.halign])) {
inputDescriptor.joinHalign = this.constructor.align[inputOptions.join.halign];
} else {
throw is.invalidParameterError('join.halign', 'valid alignment', inputOptions.join.halign);
}
}
if (is.defined(inputOptions.join.valign)) {
if (is.string(inputOptions.join.valign) && is.string(this.constructor.align[inputOptions.join.valign])) {
inputDescriptor.joinValign = this.constructor.align[inputOptions.join.valign];
} else {
throw is.invalidParameterError('join.valign', 'valid alignment', inputOptions.join.valign);
}
}
} else {
throw new Error('Expected input to be an array of images to join');
}
}
} else if (is.defined(inputOptions)) {
throw new Error(`Invalid input options ${inputOptions}`);
}
return inputDescriptor;
}
/**
* Handle incoming Buffer chunk on Writable Stream.
* @private
* @param {Buffer} chunk
* @param {string} encoding - unused
* @param {Function} callback
*/
function _write (chunk, _encoding, callback) {
if (Array.isArray(this.options.input.buffer)) {
if (is.buffer(chunk)) {
if (this.options.input.buffer.length === 0) {
this.on('finish', () => {
this.streamInFinished = true;
});
}
this.options.input.buffer.push(chunk);
callback();
} else {
callback(new Error('Non-Buffer data on Writable Stream'));
}
} else {
callback(new Error('Unexpected data on Writable Stream'));
}
}
/**
* Flattens the array of chunks accumulated in input.buffer.
* @private
*/
function _flattenBufferIn () {
if (this._isStreamInput()) {
this.options.input.buffer = Buffer.concat(this.options.input.buffer);
}
}
/**
* Are we expecting Stream-based input?
* @private
* @returns {boolean}
*/
function _isStreamInput () {
return Array.isArray(this.options.input.buffer);
}
/**
* Fast access to (uncached) image metadata without decoding any compressed pixel data.
*
* This is read from the header of the input image.
* It does not take into consideration any operations to be applied to the output image,
* such as resize or rotate.
*
* Dimensions in the response will respect the `page` and `pages` properties of the
* {@link /api-constructor/ constructor parameters}.
*
* A `Promise` is returned when `callback` is not provided.
*
* - `format`: Name of decoder used to decompress image data e.g. `jpeg`, `png`, `webp`, `gif`, `svg`
* - `size`: Total size of image in bytes, for Stream and Buffer input only
* - `width`: Number of pixels wide (EXIF orientation is not taken into consideration, see example below)
* - `height`: Number of pixels high (EXIF orientation is not taken into consideration, see example below)
* - `space`: Name of colour space interpretation e.g. `srgb`, `rgb`, `cmyk`, `lab`, `b-w` [...](https://www.libvips.org/API/current/enum.Interpretation.html)
* - `channels`: Number of bands e.g. `3` for sRGB, `4` for CMYK
* - `depth`: Name of pixel depth format e.g. `uchar`, `char`, `ushort`, `float` [...](https://www.libvips.org/API/current/enum.BandFormat.html)
* - `density`: Number of pixels per inch (DPI), if present
* - `chromaSubsampling`: String containing JPEG chroma subsampling, `4:2:0` or `4:4:4` for RGB, `4:2:0:4` or `4:4:4:4` for CMYK
* - `isProgressive`: Boolean indicating whether the image is interlaced using a progressive scan
* - `isPalette`: Boolean indicating whether the image is palette-based (GIF, PNG).
* - `bitsPerSample`: Number of bits per sample for each channel (GIF, PNG, HEIF).
* - `pages`: Number of pages/frames contained within the image, with support for TIFF, HEIF, PDF, animated GIF and animated WebP
* - `pageHeight`: Number of pixels high each page in a multi-page image will be.
* - `loop`: Number of times to loop an animated image, zero refers to a continuous loop.
* - `delay`: Delay in ms between each page in an animated image, provided as an array of integers.
* - `pagePrimary`: Number of the primary page in a HEIF image
* - `levels`: Details of each level in a multi-level image provided as an array of objects, requires libvips compiled with support for OpenSlide
* - `subifds`: Number of Sub Image File Directories in an OME-TIFF image
* - `background`: Default background colour, if present, for PNG (bKGD) and GIF images
* - `compression`: The encoder used to compress an HEIF file, `av1` (AVIF) or `hevc` (HEIC)
* - `resolutionUnit`: The unit of resolution (density), either `inch` or `cm`, if present
* - `hasProfile`: Boolean indicating the presence of an embedded ICC profile
* - `hasAlpha`: Boolean indicating the presence of an alpha transparency channel
* - `orientation`: Number value of the EXIF Orientation header, if present
* - `exif`: Buffer containing raw EXIF data, if present
* - `icc`: Buffer containing raw [ICC](https://www.npmjs.com/package/icc) profile data, if present
* - `iptc`: Buffer containing raw IPTC data, if present
* - `xmp`: Buffer containing raw XMP data, if present
* - `xmpAsString`: String containing XMP data, if valid UTF-8.
* - `tifftagPhotoshop`: Buffer containing raw TIFFTAG_PHOTOSHOP data, if present
* - `formatMagick`: String containing format for images loaded via *magick
* - `comments`: Array of keyword/text pairs representing PNG text blocks, if present.
*
* @example
* const metadata = await sharp(input).metadata();
*
* @example
* const image = sharp(inputJpg);
* image
* .metadata()
* .then(function(metadata) {
* return image
* .resize(Math.round(metadata.width / 2))
* .webp()
* .toBuffer();
* })
* .then(function(data) {
* // data contains a WebP image half the width and height of the original JPEG
* });
*
* @example
* // Get dimensions taking EXIF Orientation into account.
* const { autoOrient } = await sharp(input).metadata();
* const { width, height } = autoOrient;
*
* @param {Function} [callback] - called with the arguments `(err, metadata)`
* @returns {Promise<Object>|Sharp}
*/
function metadata (callback) {
const stack = Error();
if (is.fn(callback)) {
if (this._isStreamInput()) {
this.on('finish', () => {
this._flattenBufferIn();
sharp.metadata(this.options, (err, metadata) => {
if (err) {
callback(is.nativeError(err, stack));
} else {
callback(null, metadata);
}
});
});
} else {
sharp.metadata(this.options, (err, metadata) => {
if (err) {
callback(is.nativeError(err, stack));
} else {
callback(null, metadata);
}
});
}
return this;
} else {
if (this._isStreamInput()) {
return new Promise((resolve, reject) => {
const finished = () => {
this._flattenBufferIn();
sharp.metadata(this.options, (err, metadata) => {
if (err) {
reject(is.nativeError(err, stack));
} else {
resolve(metadata);
}
});
};
if (this.writableFinished) {
finished();
} else {
this.once('finish', finished);
}
});
} else {
return new Promise((resolve, reject) => {
sharp.metadata(this.options, (err, metadata) => {
if (err) {
reject(is.nativeError(err, stack));
} else {
resolve(metadata);
}
});
});
}
}
}
/**
* Access to pixel-derived image statistics for every channel in the image.
* A `Promise` is returned when `callback` is not provided.
*
* - `channels`: Array of channel statistics for each channel in the image. Each channel statistic contains
* - `min` (minimum value in the channel)
* - `max` (maximum value in the channel)
* - `sum` (sum of all values in a channel)
* - `squaresSum` (sum of squared values in a channel)
* - `mean` (mean of the values in a channel)
* - `stdev` (standard deviation for the values in a channel)
* - `minX` (x-coordinate of one of the pixel where the minimum lies)
* - `minY` (y-coordinate of one of the pixel where the minimum lies)
* - `maxX` (x-coordinate of one of the pixel where the maximum lies)
* - `maxY` (y-coordinate of one of the pixel where the maximum lies)
* - `isOpaque`: Is the image fully opaque? Will be `true` if the image has no alpha channel or if every pixel is fully opaque.
* - `entropy`: Histogram-based estimation of greyscale entropy, discarding alpha channel if any.
* - `sharpness`: Estimation of greyscale sharpness based on the standard deviation of a Laplacian convolution, discarding alpha channel if any.
* - `dominant`: Object containing most dominant sRGB colour based on a 4096-bin 3D histogram.
*
* **Note**: Statistics are derived from the original input image. Any operations performed on the image must first be
* written to a buffer in order to run `stats` on the result (see third example).
*
* @example
* const image = sharp(inputJpg);
* image
* .stats()
* .then(function(stats) {
* // stats contains the channel-wise statistics array and the isOpaque value
* });
*
* @example
* const { entropy, sharpness, dominant } = await sharp(input).stats();
* const { r, g, b } = dominant;
*
* @example
* const image = sharp(input);
* // store intermediate result
* const part = await image.extract(region).toBuffer();
* // create new instance to obtain statistics of extracted region
* const stats = await sharp(part).stats();
*
* @param {Function} [callback] - called with the arguments `(err, stats)`
* @returns {Promise<Object>}
*/
function stats (callback) {
const stack = Error();
if (is.fn(callback)) {
if (this._isStreamInput()) {
this.on('finish', () => {
this._flattenBufferIn();
sharp.stats(this.options, (err, stats) => {
if (err) {
callback(is.nativeError(err, stack));
} else {
callback(null, stats);
}
});
});
} else {
sharp.stats(this.options, (err, stats) => {
if (err) {
callback(is.nativeError(err, stack));
} else {
callback(null, stats);
}
});
}
return this;
} else {
if (this._isStreamInput()) {
return new Promise((resolve, reject) => {
this.on('finish', function () {
this._flattenBufferIn();
sharp.stats(this.options, (err, stats) => {
if (err) {
reject(is.nativeError(err, stack));
} else {
resolve(stats);
}
});
});
});
} else {
return new Promise((resolve, reject) => {
sharp.stats(this.options, (err, stats) => {
if (err) {
reject(is.nativeError(err, stack));
} else {
resolve(stats);
}
});
});
}
}
}
/**
* Decorate the Sharp prototype with input-related functions.
* @module Sharp
* @private
*/
module.exports = (Sharp) => {
Object.assign(Sharp.prototype, {
// Private
_inputOptionsFromObject,
_createInputDescriptor,
_write,
_flattenBufferIn,
_isStreamInput,
// Public
metadata,
stats
});
// Class attributes
Sharp.align = align;
};

View File

@@ -0,0 +1,22 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./errors.cjs"), exports);
__exportStar(require("./helpers/parseUtil.cjs"), exports);
__exportStar(require("./helpers/typeAliases.cjs"), exports);
__exportStar(require("./helpers/util.cjs"), exports);
__exportStar(require("./types.cjs"), exports);
__exportStar(require("./ZodError.cjs"), exports);

View File

@@ -0,0 +1,50 @@
{
"name": "emoji-regex",
"version": "8.0.0",
"description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.",
"homepage": "https://mths.be/emoji-regex",
"main": "index.js",
"types": "index.d.ts",
"keywords": [
"unicode",
"regex",
"regexp",
"regular expressions",
"code points",
"symbols",
"characters",
"emoji"
],
"license": "MIT",
"author": {
"name": "Mathias Bynens",
"url": "https://mathiasbynens.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/mathiasbynens/emoji-regex.git"
},
"bugs": "https://github.com/mathiasbynens/emoji-regex/issues",
"files": [
"LICENSE-MIT.txt",
"index.js",
"index.d.ts",
"text.js",
"es2015/index.js",
"es2015/text.js"
],
"scripts": {
"build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js",
"test": "mocha",
"test:watch": "npm run test -- --watch"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/plugin-proposal-unicode-property-regex": "^7.2.0",
"@babel/preset-env": "^7.3.4",
"mocha": "^6.0.2",
"regexgen": "^1.3.0",
"unicode-12.0.0": "^0.7.9"
}
}

View File

@@ -0,0 +1,45 @@
import { KafkaJsInstrumentation } from '@opentelemetry/instrumentation-kafkajs';
import { defineIntegration } from '@sentry/core';
import { generateInstrumentOnce, addOriginToSpan } from '@sentry/node-core';
const INTEGRATION_NAME = 'Kafka';
const instrumentKafka = generateInstrumentOnce(
INTEGRATION_NAME,
() =>
new KafkaJsInstrumentation({
consumerHook(span) {
addOriginToSpan(span, 'auto.kafkajs.otel.consumer');
},
producerHook(span) {
addOriginToSpan(span, 'auto.kafkajs.otel.producer');
},
}),
);
const _kafkaIntegration = (() => {
return {
name: INTEGRATION_NAME,
setupOnce() {
instrumentKafka();
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for the [kafkajs](https://www.npmjs.com/package/kafkajs) library.
*
* For more information, see the [`kafkaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/kafka/).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.kafkaIntegration()],
* });
*/
const kafkaIntegration = defineIntegration(_kafkaIntegration);
export { instrumentKafka, kafkaIntegration };
//# sourceMappingURL=kafka.js.map

View File

@@ -0,0 +1,19 @@
import type { I18n } from '@payloadcms/translations';
import type { JSONSchema4 } from 'json-schema';
import type { SanitizedConfig } from '../../config/types.js';
import type { JobsConfig } from './types/index.js';
export declare function generateJobsJSONSchemas(config: SanitizedConfig, jobsConfig: JobsConfig, interfaceNameDefinitions: Map<string, JSONSchema4>,
/**
* Used for relationship fields, to determine whether to use a string or number type for the ID.
* While there is a default ID field type set by the db adapter, they can differ on a collection-level
* if they have custom ID fields.
*/
collectionIDFieldTypes: {
[key: string]: 'number' | 'string';
}, i18n?: I18n): {
definitions?: Map<string, JSONSchema4>;
properties?: {
tasks: JSONSchema4;
};
};
//# sourceMappingURL=generateJobsJSONSchemas.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../src/languages/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtE,eAAO,MAAM,cAAc,EAAE,yBA+nB5B,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,QAGhB,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"AttributeNames.js","sourceRoot":"","sources":["../../../src/enums/AttributeNames.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,yCAAuB,CAAA;IACvB,kDAAgC,CAAA;IAChC,8CAA4B,CAAA;AAC9B,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum AttributeNames {\n HAPI_TYPE = 'hapi.type',\n PLUGIN_NAME = 'hapi.plugin.name',\n EXT_TYPE = 'server.ext.type',\n}\n"]}

View File

@@ -0,0 +1,45 @@
'use strict'
const assert = require('node:assert')
const { URLSerializer } = require('../fetch/data-url')
const { isValidHeaderName } = require('../fetch/util')
/**
* @see https://url.spec.whatwg.org/#concept-url-equals
* @param {URL} A
* @param {URL} B
* @param {boolean | undefined} excludeFragment
* @returns {boolean}
*/
function urlEquals (A, B, excludeFragment = false) {
const serializedA = URLSerializer(A, excludeFragment)
const serializedB = URLSerializer(B, excludeFragment)
return serializedA === serializedB
}
/**
* @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262
* @param {string} header
*/
function getFieldValues (header) {
assert(header !== null)
const values = []
for (let value of header.split(',')) {
value = value.trim()
if (isValidHeaderName(value)) {
values.push(value)
}
}
return values
}
module.exports = {
urlEquals,
getFieldValues
}

View File

@@ -0,0 +1,11 @@
import baseConfig from './config.base.js';
import pkg from './packageJson.js';
export default {
...baseConfig,
output: {
...baseConfig.output,
file: pkg.browser,
format: 'umd',
},
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/types/base.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AAEpE,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAE7C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,EAAE,MAAM,GAAG,mBAAmB,GAAG,MAAM,CAAC;IAE9C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;OAQG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;OAIG;IACH,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAE5B;;;;;;;;;;;OAWG;IACH,cAAc,EAAE,UAAU,GAAG,QAAQ,GAAG,cAAc,GAAG,oBAAoB,GAAG,WAAW,GAAG,SAAS,CAAC;CACzG;AAED,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEpF,uDAAuD;AACvD,MAAM,MAAM,qBAAqB,GAC7B,wBAAwB,GACxB,wBAAwB,GACxB,wBAAwB,GACxB,wBAAwB,GACxB,yBAAyB,CAAC;AAE9B;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,GAAG,IAAI,KAAK,MAAM,GAAG,SAAS,CAAC;CAC1D;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,UAAU,CAAC"}

View File

@@ -0,0 +1,14 @@
Prism.languages.hoon = {
'comment': {
pattern: /::.*/,
greedy: true
},
'string': {
pattern: /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,
greedy: true
},
'constant': /%(?:\.[ny]|[\w-]+)/,
'class-name': /@(?:[a-z0-9-]*[a-z0-9])?|\*/i,
'function': /(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,
'keyword': /\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/
};

View File

@@ -0,0 +1,7 @@
@layer payload-default {
.select-all {
&__checkbox {
display: block;
}
}
}

View File

@@ -0,0 +1,26 @@
import { type CollectionSlug, type JoinFieldClient, type PaginatedDocs, type Where } from 'payload';
import React from 'react';
import type { DocumentDrawerProps } from '../DocumentDrawer/types.js';
import './index.scss';
type RelationshipTableComponentProps = {
readonly AfterInput?: React.ReactNode;
readonly allowCreate?: boolean;
readonly BeforeInput?: React.ReactNode;
readonly disableTable?: boolean;
readonly field: JoinFieldClient;
readonly fieldPath?: string;
readonly filterOptions?: Where;
readonly initialData?: PaginatedDocs;
readonly initialDrawerData?: DocumentDrawerProps['initialData'];
readonly Label?: React.ReactNode;
readonly parent?: {
collectionSlug: CollectionSlug;
id: number | string;
joinPath: string;
};
readonly relationTo: string | string[];
};
export type OnDrawerOpen = (id?: string, collectionSlug?: string) => void;
export declare const RelationshipTable: React.FC<RelationshipTableComponentProps>;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,157 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(tcn|scn)/i,
abbreviated: /^(trước CN|sau CN)/i,
wide: /^(trước Công Nguyên|sau Công Nguyên)/i,
};
const parseEraPatterns = {
any: [/^t/i, /^s/i],
};
const matchQuarterPatterns = {
narrow: /^([1234]|i{1,3}v?)/i,
abbreviated: /^q([1234]|i{1,3}v?)/i,
wide: /^quý ([1234]|i{1,3}v?)/i,
};
const parseQuarterPatterns = {
any: [/(1|i)$/i, /(2|ii)$/i, /(3|iii)$/i, /(4|iv)$/i],
};
const matchMonthPatterns = {
// month number may contain leading 0, 'thg' prefix may have space, underscore or empty before number
// note the order of '1' since it is a sub-string of '10', so must be lower priority
narrow: /^(0?[2-9]|10|11|12|0?1)/i,
// note the order of 'thg 1' since it is sub-string of 'thg 10', so must be lower priority
abbreviated: /^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i,
// note the order of 'Mười' since it is sub-string of Mười Một, so must be lower priority
wide: /^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i,
};
const parseMonthPatterns = {
narrow: [
/0?1$/i,
/0?2/i,
/3/,
/4/,
/5/,
/6/,
/7/,
/8/,
/9/,
/10/,
/11/,
/12/,
],
abbreviated: [
/^thg[ _]?0?1(?!\d)/i,
/^thg[ _]?0?2/i,
/^thg[ _]?0?3/i,
/^thg[ _]?0?4/i,
/^thg[ _]?0?5/i,
/^thg[ _]?0?6/i,
/^thg[ _]?0?7/i,
/^thg[ _]?0?8/i,
/^thg[ _]?0?9/i,
/^thg[ _]?10/i,
/^thg[ _]?11/i,
/^thg[ _]?12/i,
],
wide: [
/^tháng ?(Một|0?1(?!\d))/i,
/^tháng ?(Hai|0?2)/i,
/^tháng ?(Ba|0?3)/i,
/^tháng ?(Tư|0?4)/i,
/^tháng ?(Năm|0?5)/i,
/^tháng ?(Sáu|0?6)/i,
/^tháng ?(Bảy|0?7)/i,
/^tháng ?(Tám|0?8)/i,
/^tháng ?(Chín|0?9)/i,
/^tháng ?(Mười|10)/i,
/^tháng ?(Mười ?Một|11)/i,
/^tháng ?(Mười ?Hai|12)/i,
],
};
const matchDayPatterns = {
narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i,
short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i,
wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i,
};
const parseDayPatterns = {
narrow: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
short: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
abbreviated: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i],
wide: [/(Chủ|Chúa) ?Nhật/i, /Hai/i, /Ba/i, /Tư/i, /Năm/i, /Sáu/i, /Bảy/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^(a|sa)/i,
pm: /^(p|ch[^i]*)/i,
midnight: /nửa đêm/i,
noon: /trưa/i,
morning: /sáng/i,
afternoon: /chiều/i,
evening: /tối/i,
night: /^đêm/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "wide",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"4 5 6 7 8 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"0 1 2 3 C L M G N O z","194":"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"},C:{"1":"0 1 2 3 4 5 6 7 8 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":"9 0C VC 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 4C 5C","66":"2B 3B 4B 5B WC 6B XC 7B 8B 9B","260":"AC","516":"BC"},D:{"1":"0 1 2 3 4 5 6 7 8 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","2":"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","66":"CC DC EC"},E:{"2":"J bB K D E F A B C L M G 6C bC 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD","1028":"TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID"},F:{"1":"0 1 2 3 4 5 6 7 8 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","2":"9 F 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 JD KD LD MD PC xC ND QC"},G:{"2":"E bC 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","1028":"TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB zD 0D 1D 2D SC TC UC 3D","2":"J tD uD vD wD xD cC yD"},Q:{"1":"4D"},R:{"1":"5D"},S:{"2":"6D 7D"}},B:6,C:"AV1 video format",D:true};

View File

@@ -0,0 +1,40 @@
/*
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 CompatGetDefaultExportRuntimeModule extends HelperRuntimeModule {
constructor() {
super("compat get default export");
}
/**
* @returns {string | null} runtime code
*/
generate() {
const compilation = /** @type {Compilation} */ (this.compilation);
const { runtimeTemplate } = compilation;
const fn = RuntimeGlobals.compatGetDefaultExport;
return Template.asString([
"// getDefaultExport function for compatibility with non-harmony modules",
`${fn} = ${runtimeTemplate.basicFunction("module", [
"var getter = module && module.__esModule ?",
Template.indent([
`${runtimeTemplate.returningFunction("module['default']")} :`,
`${runtimeTemplate.returningFunction("module")};`
]),
`${RuntimeGlobals.definePropertyGetters}(getter, { a: getter });`,
"return getter;"
])};`
]);
}
}
module.exports = CompatGetDefaultExportRuntimeModule;

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 SquareTerminal = createLucideIcon("SquareTerminal", [
["path", { d: "m7 11 2-2-2-2", key: "1lz0vl" }],
["path", { d: "M11 13h4", key: "1p7l4v" }],
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }]
]);
export { SquareTerminal as default };
//# sourceMappingURL=square-terminal.js.map

View File

@@ -0,0 +1,24 @@
import { DirectusFile } from "../../../schema/file.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/read/files.d.ts
type ReadFileOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusFile<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* List all files that exist in Directus.
* @param query The query parameters
* @returns An array of up to limit file objects. If no items are available, data will be an empty array.
*/
declare const readFiles: <Schema, const TQuery extends Query<Schema, DirectusFile<Schema>>>(query?: TQuery) => RestCommand<ReadFileOutput<Schema, TQuery>[], Schema>;
/**
* Retrieve a single file by primary key.
* @param key The primary key of the dashboard
* @param query The query parameters
* @returns Returns a file object if a valid primary key was provided.
* @throws Will throw if key is empty
*/
declare const readFile: <Schema, const TQuery extends Query<Schema, DirectusFile<Schema>>>(key: DirectusFile<Schema>["id"], query?: TQuery) => RestCommand<ReadFileOutput<Schema, TQuery>, Schema>;
//#endregion
export { ReadFileOutput, readFile, readFiles };
//# sourceMappingURL=files.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/double-precision.ts"],"sourcesContent":["import 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 GelDoublePrecisionBuilderInitial<TName extends string> = GelDoublePrecisionBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'GelDoublePrecision';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class GelDoublePrecisionBuilder<T extends ColumnBuilderBaseConfig<'number', 'GelDoublePrecision'>>\n\textends GelColumnBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'GelDoublePrecisionBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'GelDoublePrecision');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelDoublePrecision<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelDoublePrecision<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 GelDoublePrecision<T extends ColumnBaseConfig<'number', 'GelDoublePrecision'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelDoublePrecision';\n\n\tgetSQLType(): string {\n\t\treturn 'double precision';\n\t}\n\n\toverride mapFromDriverValue(value: string | number): number {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number.parseFloat(value);\n\t\t}\n\t\treturn value;\n\t}\n}\n\nexport function doublePrecision(): GelDoublePrecisionBuilderInitial<''>;\nexport function doublePrecision<TName extends string>(name: TName): GelDoublePrecisionBuilderInitial<TName>;\nexport function doublePrecision(name?: string) {\n\treturn new GelDoublePrecisionBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA4C;AAWrC,MAAM,kCACJ,+BACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,oBAAoB;AAAA,EAC3C;AAAA;AAAA,EAGS,MACR,OACsD;AACtD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,2BAAuF,wBAAa;AAAA,EAChH,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,WAAW,KAAK;AAAA,IAC/B;AACA,WAAO;AAAA,EACR;AACD;AAIO,SAAS,gBAAgB,MAAe;AAC9C,SAAO,IAAI,0BAA0B,QAAQ,EAAE;AAChD;","names":[]}

View File

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

View File

@@ -0,0 +1,161 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var decimal_exports = {};
__export(decimal_exports, {
SingleStoreDecimal: () => SingleStoreDecimal,
SingleStoreDecimalBigInt: () => SingleStoreDecimalBigInt,
SingleStoreDecimalBigIntBuilder: () => SingleStoreDecimalBigIntBuilder,
SingleStoreDecimalBuilder: () => SingleStoreDecimalBuilder,
SingleStoreDecimalNumber: () => SingleStoreDecimalNumber,
SingleStoreDecimalNumberBuilder: () => SingleStoreDecimalNumberBuilder,
decimal: () => decimal
});
module.exports = __toCommonJS(decimal_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class SingleStoreDecimalBuilder extends import_common.SingleStoreColumnBuilderWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreDecimalBuilder";
constructor(name, config) {
super(name, "string", "SingleStoreDecimal");
this.config.precision = config?.precision;
this.config.scale = config?.scale;
this.config.unsigned = config?.unsigned;
}
/** @internal */
build(table) {
return new SingleStoreDecimal(
table,
this.config
);
}
}
class SingleStoreDecimal extends import_common.SingleStoreColumnWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreDecimal";
precision = this.config.precision;
scale = this.config.scale;
unsigned = this.config.unsigned;
mapFromDriverValue(value) {
if (typeof value === "string") return value;
return String(value);
}
getSQLType() {
let type = "";
if (this.precision !== void 0 && this.scale !== void 0) {
type += `decimal(${this.precision},${this.scale})`;
} else if (this.precision === void 0) {
type += "decimal";
} else {
type += `decimal(${this.precision})`;
}
type = type === "decimal(10,0)" || type === "decimal(10)" ? "decimal" : type;
return this.unsigned ? `${type} unsigned` : type;
}
}
class SingleStoreDecimalNumberBuilder extends import_common.SingleStoreColumnBuilderWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreDecimalNumberBuilder";
constructor(name, config) {
super(name, "number", "SingleStoreDecimalNumber");
this.config.precision = config?.precision;
this.config.scale = config?.scale;
this.config.unsigned = config?.unsigned;
}
/** @internal */
build(table) {
return new SingleStoreDecimalNumber(
table,
this.config
);
}
}
class SingleStoreDecimalNumber extends import_common.SingleStoreColumnWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreDecimalNumber";
precision = this.config.precision;
scale = this.config.scale;
unsigned = this.config.unsigned;
mapFromDriverValue(value) {
if (typeof value === "number") return value;
return Number(value);
}
mapToDriverValue = String;
getSQLType() {
let type = "";
if (this.precision !== void 0 && this.scale !== void 0) {
type += `decimal(${this.precision},${this.scale})`;
} else if (this.precision === void 0) {
type += "decimal";
} else {
type += `decimal(${this.precision})`;
}
type = type === "decimal(10,0)" || type === "decimal(10)" ? "decimal" : type;
return this.unsigned ? `${type} unsigned` : type;
}
}
class SingleStoreDecimalBigIntBuilder extends import_common.SingleStoreColumnBuilderWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreDecimalBigIntBuilder";
constructor(name, config) {
super(name, "bigint", "SingleStoreDecimalBigInt");
this.config.precision = config?.precision;
this.config.scale = config?.scale;
this.config.unsigned = config?.unsigned;
}
/** @internal */
build(table) {
return new SingleStoreDecimalBigInt(
table,
this.config
);
}
}
class SingleStoreDecimalBigInt extends import_common.SingleStoreColumnWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreDecimalBigInt";
precision = this.config.precision;
scale = this.config.scale;
unsigned = this.config.unsigned;
mapFromDriverValue = BigInt;
mapToDriverValue = String;
getSQLType() {
let type = "";
if (this.precision !== void 0 && this.scale !== void 0) {
type += `decimal(${this.precision},${this.scale})`;
} else if (this.precision === void 0) {
type += "decimal";
} else {
type += `decimal(${this.precision})`;
}
type = type === "decimal(10,0)" || type === "decimal(10)" ? "decimal" : type;
return this.unsigned ? `${type} unsigned` : type;
}
}
function decimal(a, b = {}) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
const mode = config?.mode;
return mode === "number" ? new SingleStoreDecimalNumberBuilder(name, config) : mode === "bigint" ? new SingleStoreDecimalBigIntBuilder(name, config) : new SingleStoreDecimalBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SingleStoreDecimal,
SingleStoreDecimalBigInt,
SingleStoreDecimalBigIntBuilder,
SingleStoreDecimalBuilder,
SingleStoreDecimalNumber,
SingleStoreDecimalNumberBuilder,
decimal
});
//# sourceMappingURL=decimal.cjs.map

View File

@@ -0,0 +1,560 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Natsu @xiaoxiaojx
*/
"use strict";
const { aliasResolveHandler } = require("./AliasUtils");
const { modulesResolveHandler } = require("./ModulesUtils");
const { readJson } = require("./util/fs");
const {
PathType: _PathType,
cachedDirname: dirname,
cachedJoin: join,
isSubPath,
normalize,
} = require("./util/path");
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
/** @typedef {import("./AliasUtils").AliasOption} AliasOption */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
/** @typedef {import("./Resolver").ResolveContext} ResolveContext */
/** @typedef {import("./Resolver").FileSystem} FileSystem */
/** @typedef {import("./Resolver").TsconfigPathsData} TsconfigPathsData */
/** @typedef {import("./Resolver").TsconfigPathsMap} TsconfigPathsMap */
/** @typedef {import("./ResolverFactory").TsconfigOptions} TsconfigOptions */
/**
* @typedef {object} TsconfigCompilerOptions
* @property {string=} baseUrl Base URL for resolving paths
* @property {{ [key: string]: string[] }=} paths TypeScript paths mapping
*/
/**
* @typedef {object} TsconfigReference
* @property {string} path Path to the referenced project
*/
/**
* @typedef {object} Tsconfig
* @property {TsconfigCompilerOptions=} compilerOptions Compiler options
* @property {string | string[]=} extends Extended configuration paths
* @property {TsconfigReference[]=} references Project references
*/
const DEFAULT_CONFIG_FILE = "tsconfig.json";
/**
* @param {string} pattern Path pattern
* @returns {number} Length of the prefix
*/
function getPrefixLength(pattern) {
const prefixLength = pattern.indexOf("*");
if (prefixLength === -1) {
return pattern.length;
}
return pattern.slice(0, Math.max(0, prefixLength)).length;
}
/**
* Sort path patterns.
* If a module name can be matched with multiple patterns then pattern with the longest prefix will be picked.
* @param {string[]} arr Array of path patterns
* @returns {string[]} Array of path patterns sorted by longest prefix
*/
function sortByLongestPrefix(arr) {
return [...arr].sort((a, b) => getPrefixLength(b) - getPrefixLength(a));
}
/**
* Merge two tsconfig objects
* @param {Tsconfig | null} base base config
* @param {Tsconfig | null} config config to merge
* @returns {Tsconfig} merged config
*/
function mergeTsconfigs(base, config) {
base = base || {};
config = config || {};
return {
...base,
...config,
compilerOptions: {
.../** @type {TsconfigCompilerOptions} */ (base.compilerOptions),
.../** @type {TsconfigCompilerOptions} */ (config.compilerOptions),
},
};
}
/**
* Substitute ${configDir} template variable in path
* @param {string} pathValue the path value
* @param {string} configDir the config directory
* @returns {string} the path with substituted template
*/
function substituteConfigDir(pathValue, configDir) {
return pathValue.replace(/\$\{configDir\}/g, configDir);
}
/**
* Convert tsconfig paths to resolver options
* @param {string} configDir Config file directory
* @param {{ [key: string]: string[] }} paths TypeScript paths mapping
* @param {string=} baseUrl Base URL for resolving paths (relative to configDir)
* @returns {TsconfigPathsData} the resolver options
*/
function tsconfigPathsToResolveOptions(configDir, paths, baseUrl) {
// Calculate absolute base URL
const absoluteBaseUrl = !baseUrl ? configDir : join(configDir, baseUrl);
/** @type {string[]} */
const sortedKeys = sortByLongestPrefix(Object.keys(paths));
/** @type {AliasOption[]} */
const alias = [];
/** @type {string[]} */
const modules = [];
for (const pattern of sortedKeys) {
const mappings = paths[pattern];
// Substitute ${configDir} in path mappings
const absolutePaths = mappings.map((mapping) => {
const substituted = substituteConfigDir(mapping, configDir);
return join(absoluteBaseUrl, substituted);
});
if (absolutePaths.length > 0) {
if (pattern === "*") {
modules.push(
...absolutePaths
.map((dir) => {
if (/[/\\]\*$/.test(dir)) {
return dir.replace(/[/\\]\*$/, "");
}
return "";
})
.filter(Boolean),
);
} else {
alias.push({ name: pattern, alias: absolutePaths });
}
}
}
if (absoluteBaseUrl && !modules.includes(absoluteBaseUrl)) {
modules.push(absoluteBaseUrl);
}
return {
alias,
modules,
};
}
/**
* Get the base context for the current project
* @param {string} context the context
* @param {string=} baseUrl base URL for resolving paths
* @returns {string} the base context
*/
function getAbsoluteBaseUrl(context, baseUrl) {
return !baseUrl ? context : join(context, baseUrl);
}
module.exports = class TsconfigPathsPlugin {
/**
* @param {true | string | TsconfigOptions} configFileOrOptions tsconfig file path or options object
*/
constructor(configFileOrOptions) {
if (
typeof configFileOrOptions === "object" &&
configFileOrOptions !== null
) {
// Options object format
this.configFile = configFileOrOptions.configFile || DEFAULT_CONFIG_FILE;
/** @type {string[] | "auto"} */
if (Array.isArray(configFileOrOptions.references)) {
/** @type {TsconfigReference[] | "auto"} */
this.references = configFileOrOptions.references.map((ref) => ({
path: ref,
}));
} else if (configFileOrOptions.references === "auto") {
this.references = "auto";
} else {
this.references = [];
}
} else {
this.configFile =
configFileOrOptions === true
? DEFAULT_CONFIG_FILE
: /** @type {string} */ (configFileOrOptions);
/** @type {TsconfigReference[] | "auto"} */
this.references = [];
}
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const aliasTarget = resolver.ensureHook("internal-resolve");
const moduleTarget = resolver.ensureHook("module");
resolver
.getHook("raw-resolve")
.tapAsync(
"TsconfigPathsPlugin",
async (request, resolveContext, callback) => {
try {
const tsconfigPathsMap = await this._getTsconfigPathsMap(
resolver,
request,
resolveContext,
);
if (!tsconfigPathsMap) return callback();
const selectedData = this._selectPathsDataForContext(
request.path,
tsconfigPathsMap,
);
if (!selectedData) return callback();
aliasResolveHandler(
resolver,
selectedData.alias,
aliasTarget,
request,
resolveContext,
callback,
);
} catch (err) {
callback(/** @type {Error} */ (err));
}
},
);
resolver
.getHook("raw-module")
.tapAsync(
"TsconfigPathsPlugin",
async (request, resolveContext, callback) => {
try {
const tsconfigPathsMap = await this._getTsconfigPathsMap(
resolver,
request,
resolveContext,
);
if (!tsconfigPathsMap) return callback();
const selectedData = this._selectPathsDataForContext(
request.path,
tsconfigPathsMap,
);
if (!selectedData) return callback();
modulesResolveHandler(
resolver,
selectedData.modules,
moduleTarget,
request,
resolveContext,
callback,
);
} catch (err) {
callback(/** @type {Error} */ (err));
}
},
);
}
/**
* Get TsconfigPathsMap for the request (with caching)
* @param {Resolver} resolver the resolver
* @param {ResolveRequest} request the request
* @param {ResolveContext} resolveContext the resolve context
* @returns {Promise<TsconfigPathsMap | null>} the tsconfig paths map or null
*/
async _getTsconfigPathsMap(resolver, request, resolveContext) {
if (typeof request.tsconfigPathsMap === "undefined") {
try {
const absTsconfigPath = join(
request.path || process.cwd(),
this.configFile,
);
const result = await this._loadTsconfigPathsMap(
resolver.fileSystem,
absTsconfigPath,
);
request.tsconfigPathsMap = result;
} catch (err) {
request.tsconfigPathsMap = null;
throw err;
}
}
if (!request.tsconfigPathsMap) {
return null;
}
for (const fileDependency of request.tsconfigPathsMap.fileDependencies) {
if (resolveContext.fileDependencies) {
resolveContext.fileDependencies.add(fileDependency);
}
}
return request.tsconfigPathsMap;
}
/**
* Load tsconfig.json and build complete TsconfigPathsMap
* Includes main project paths and all referenced projects
* @param {FileSystem} fileSystem the file system
* @param {string} absTsconfigPath absolute path to tsconfig.json
* @returns {Promise<TsconfigPathsMap>} the complete tsconfig paths map
*/
async _loadTsconfigPathsMap(fileSystem, absTsconfigPath) {
/** @type {Set<string>} */
const fileDependencies = new Set();
const config = await this._loadTsconfig(
fileSystem,
absTsconfigPath,
fileDependencies,
);
const compilerOptions = config.compilerOptions || {};
const mainContext = dirname(absTsconfigPath);
const main = tsconfigPathsToResolveOptions(
mainContext,
compilerOptions.paths || {},
compilerOptions.baseUrl,
);
/** @type {{ [baseUrl: string]: TsconfigPathsData }} */
const refs = {};
let referencesToUse = null;
if (this.references === "auto") {
referencesToUse = config.references;
} else if (Array.isArray(this.references)) {
referencesToUse = this.references;
}
if (Array.isArray(referencesToUse)) {
await this._loadTsconfigReferences(
fileSystem,
mainContext,
referencesToUse,
fileDependencies,
refs,
);
}
return { main, mainContext, refs, fileDependencies };
}
/**
* Select the correct TsconfigPathsData based on request.path (context-aware)
* Matches the behavior of tsconfig-paths-webpack-plugin
* @param {string | false} requestPath the request path
* @param {TsconfigPathsMap} tsconfigPathsMap the tsconfig paths map
* @returns {TsconfigPathsData | null} the selected paths data
*/
_selectPathsDataForContext(requestPath, tsconfigPathsMap) {
const { main, mainContext, refs } = tsconfigPathsMap;
if (!requestPath) {
return main;
}
// Combine main and refs into a single map: context path -> TsconfigPathsData
const allContexts = {
[mainContext]: main,
...refs,
};
let longestMatch = null;
let longestMatchLength = 0;
for (const [context, data] of Object.entries(allContexts)) {
if (context === requestPath) {
return data;
}
if (
isSubPath(context, requestPath) &&
context.length > longestMatchLength
) {
longestMatch = data;
longestMatchLength = context.length;
}
}
if (longestMatch) {
return longestMatch;
}
return null;
}
/**
* Load tsconfig from extends path
* @param {FileSystem} fileSystem the file system
* @param {string} configFilePath current config file path
* @param {string} extendedConfigValue extends value
* @param {Set<string>} fileDependencies the file dependencies
* @returns {Promise<Tsconfig>} the extended tsconfig
*/
async _loadTsconfigFromExtends(
fileSystem,
configFilePath,
extendedConfigValue,
fileDependencies,
) {
const currentDir = dirname(configFilePath);
// Substitute ${configDir} in extends path
extendedConfigValue = substituteConfigDir(extendedConfigValue, currentDir);
if (
typeof extendedConfigValue === "string" &&
!extendedConfigValue.includes(".json")
) {
extendedConfigValue += ".json";
}
let extendedConfigPath = join(currentDir, extendedConfigValue);
const exists = await new Promise((resolve) => {
fileSystem.readFile(extendedConfigPath, (err) => {
resolve(!err);
});
});
if (!exists && extendedConfigValue.includes("/")) {
extendedConfigPath = join(
currentDir,
normalize(`node_modules/${extendedConfigValue}`),
);
}
const config = await this._loadTsconfig(
fileSystem,
extendedConfigPath,
fileDependencies,
);
const compilerOptions = config.compilerOptions || { baseUrl: undefined };
if (compilerOptions.baseUrl) {
const extendsDir = dirname(extendedConfigValue);
compilerOptions.baseUrl = getAbsoluteBaseUrl(
extendsDir,
compilerOptions.baseUrl,
);
}
delete config.references;
return /** @type {Tsconfig} */ (config);
}
/**
* Load referenced tsconfig projects and store in referenceMatchMap
* Simple implementation matching tsconfig-paths-webpack-plugin:
* Just load each reference and store independently
* @param {FileSystem} fileSystem the file system
* @param {string} context the context
* @param {TsconfigReference[]} references array of references
* @param {Set<string>} fileDependencies the file dependencies
* @param {{ [baseUrl: string]: TsconfigPathsData }} referenceMatchMap the map to populate
* @returns {Promise<void>}
*/
async _loadTsconfigReferences(
fileSystem,
context,
references,
fileDependencies,
referenceMatchMap,
) {
for (const ref of references) {
// Substitute ${configDir} in reference path
const refPath = substituteConfigDir(ref.path, context);
const refConfigPath = join(join(context, refPath), DEFAULT_CONFIG_FILE);
try {
const refConfig = await this._loadTsconfig(
fileSystem,
refConfigPath,
fileDependencies,
);
if (refConfig.compilerOptions && refConfig.compilerOptions.paths) {
const refContext = dirname(refConfigPath);
referenceMatchMap[refContext] = tsconfigPathsToResolveOptions(
refContext,
refConfig.compilerOptions.paths || {},
refConfig.compilerOptions.baseUrl,
);
}
if (this.references === "auto" && Array.isArray(refConfig.references)) {
await this._loadTsconfigReferences(
fileSystem,
dirname(refConfigPath),
refConfig.references,
fileDependencies,
referenceMatchMap,
);
}
} catch (_err) {
continue;
}
}
}
/**
* Load tsconfig.json with extends support
* @param {FileSystem} fileSystem the file system
* @param {string} configFilePath absolute path to tsconfig.json
* @param {Set<string>} fileDependencies the file dependencies
* @returns {Promise<Tsconfig>} the merged tsconfig
*/
async _loadTsconfig(fileSystem, configFilePath, fileDependencies) {
const config = await readJson(fileSystem, configFilePath);
fileDependencies.add(configFilePath);
let result = config;
const extendedConfig = config.extends;
if (extendedConfig) {
let base;
if (Array.isArray(extendedConfig)) {
base = {};
for (const extendedConfigElement of extendedConfig) {
const extendedTsconfig = await this._loadTsconfigFromExtends(
fileSystem,
configFilePath,
extendedConfigElement,
fileDependencies,
);
base = mergeTsconfigs(base, extendedTsconfig);
}
} else {
base = await this._loadTsconfigFromExtends(
fileSystem,
configFilePath,
extendedConfig,
fileDependencies,
);
}
result = /** @type {Tsconfig} */ (mergeTsconfigs(base, config));
}
return result;
}
};

View File

@@ -0,0 +1,19 @@
/**
* @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 DraftingCompass = createLucideIcon("DraftingCompass", [
["path", { d: "m12.99 6.74 1.93 3.44", key: "iwagvd" }],
["path", { d: "M19.136 12a10 10 0 0 1-14.271 0", key: "ppmlo4" }],
["path", { d: "m21 21-2.16-3.84", key: "vylbct" }],
["path", { d: "m3 21 8.02-14.26", key: "1ssaw4" }],
["circle", { cx: "12", cy: "5", r: "2", key: "f1ur92" }]
]);
export { DraftingCompass as default };
//# sourceMappingURL=drafting-compass.js.map

View File

@@ -0,0 +1,83 @@
import { APIError } from '../../errors/index.js';
import { InvalidFieldJoin } from '../../errors/InvalidFieldJoin.js';
import { flattenAllFields } from '../../utilities/flattenAllFields.js';
import { getFieldByPath } from '../../utilities/getFieldByPath.js';
export const sanitizeJoinField = ({ config, field, joinPath, joins, parentIsLocalized, polymorphicJoins, validateOnly })=>{
// the `joins` arg is not passed for globals or when recursing on fields that do not allow a join field
if (typeof joins === 'undefined') {
throw new APIError('Join fields cannot be added to arrays, blocks or globals.');
}
if (typeof field.maxDepth === 'undefined') {
field.maxDepth = 1;
}
const join = {
field,
joinPath: `${joinPath ? joinPath + '.' : ''}${field.name}`,
parentIsLocalized,
// @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve
targetField: undefined
};
if (Array.isArray(field.collection)) {
for (const collection of field.collection){
const sanitizedField = {
...field,
collection
};
sanitizeJoinField({
config,
field: sanitizedField,
joinPath,
joins,
parentIsLocalized,
polymorphicJoins,
validateOnly: true
});
}
if (Array.isArray(polymorphicJoins)) {
polymorphicJoins.push(join);
}
return;
}
const joinCollection = config.collections?.find((collection)=>collection.slug === field.collection);
if (!joinCollection) {
throw new InvalidFieldJoin(field);
}
const relationshipField = getFieldByPath({
fields: flattenAllFields({
cache: true,
fields: joinCollection.fields
}),
path: field.on
});
if (!relationshipField || relationshipField.field.type !== 'relationship' && relationshipField.field.type !== 'upload') {
throw new InvalidFieldJoin(join.field);
}
if (relationshipField.pathHasLocalized) {
join.getForeignPath = ({ locale })=>{
return relationshipField.localizedPath.replace('<locale>', locale);
};
}
if (!relationshipField.field.index && !relationshipField.field.unique) {
relationshipField.field.index = true;
}
if (validateOnly) {
return;
}
join.targetField = relationshipField.field;
// override the join field localized property to use whatever the relationship field has
// or if it's nested to a localized array / blocks / tabs / group
field.localized = relationshipField.field.localized;
// override the join field hasMany property to use whatever the relationship field has
field.hasMany = relationshipField.field.hasMany;
// @ts-expect-error converting JoinField to FlattenedJoinField to track targetField
field.targetField = join.targetField;
if (!joins[field.collection]) {
joins[field.collection] = [
join
];
} else {
joins[field.collection]?.push(join);
}
};
//# sourceMappingURL=sanitizeJoinField.js.map

View File

@@ -0,0 +1,174 @@
import type { Span } from '../../types-hoist/span';
/** Types for MCP server instrumentation */
/**
* Configuration for extracting attributes from MCP methods
* @internal
*/
export type MethodConfig = {
targetField: string;
targetAttribute: string;
captureArguments?: boolean;
argumentsField?: string;
captureUri?: boolean;
captureName?: boolean;
};
/**
* JSON-RPC 2.0 request object
* @see https://www.jsonrpc.org/specification#request_object
*/
export interface JsonRpcRequest {
jsonrpc: '2.0';
method: string;
id: string | number;
params?: Record<string, unknown>;
}
/**
* JSON-RPC 2.0 response object
* @see https://www.jsonrpc.org/specification#response_object
*/
export interface JsonRpcResponse {
jsonrpc: '2.0';
id: string | number | null;
result?: unknown;
error?: JsonRpcError;
}
/**
* JSON-RPC 2.0 error object
* @see https://www.jsonrpc.org/specification#error_object
*/
export interface JsonRpcError {
code: number;
message: string;
data?: unknown;
}
/**
* JSON-RPC 2.0 notification object
* @note Notifications do NOT have an 'id' field - this is what distinguishes them from requests
* @see https://www.jsonrpc.org/specification#notification
*/
export interface JsonRpcNotification {
jsonrpc: '2.0';
method: string;
params?: Record<string, unknown>;
}
/**
* MCP transport interface
* @description Abstraction for MCP communication transport layer
*/
export interface MCPTransport {
/**
* Message handler for incoming JSON-RPC messages
* The first argument is a JSON RPC message
*/
onmessage?: (...args: unknown[]) => void;
/** Close handler for transport lifecycle */
onclose?: (...args: unknown[]) => void;
/** Error handler for transport errors */
onerror?: (error: Error) => void;
/** Send method for outgoing messages */
send?: (message: JsonRpcMessage, options?: Record<string, unknown>) => Promise<void>;
/** Optional session identifier */
sessionId?: SessionId;
}
/** Union type for all JSON-RPC message types */
export type JsonRpcMessage = JsonRpcRequest | JsonRpcNotification | JsonRpcResponse;
/**
* MCP server instance interface
* @description MCP server methods for registering handlers
*/
export interface MCPServerInstance {
/** Register a resource handler */
resource: (name: string, ...args: unknown[]) => void;
/** Register a tool handler */
tool: (name: string, ...args: unknown[]) => void;
/** Register a prompt handler */
prompt: (name: string, ...args: unknown[]) => void;
/** Connect the server to a transport */
connect(transport: MCPTransport): Promise<void>;
}
/** Client connection information for handlers */
export interface ExtraHandlerData {
requestInfo?: {
remoteAddress?: string;
remotePort?: number;
};
clientAddress?: string;
clientPort?: number;
request?: {
ip?: string;
connection?: {
remoteAddress?: string;
remotePort?: number;
};
};
}
/** Types of MCP spans */
export type McpSpanType = 'request' | 'notification-incoming' | 'notification-outgoing';
/**
* Configuration for creating MCP spans
* @internal
*/
export interface McpSpanConfig {
type: McpSpanType;
message: JsonRpcRequest | JsonRpcNotification;
transport: MCPTransport;
extra?: ExtraHandlerData;
callback: () => unknown;
options?: ResolvedMcpOptions;
}
export type SessionId = string;
export type RequestId = string | number;
/**
* Request-to-span correlation data
* @internal
*/
export type RequestSpanMapValue = {
span: Span;
method: string;
startTime: number;
};
/** Generic MCP handler function */
export type MCPHandler = (...args: unknown[]) => unknown;
/**
* Extra data passed to MCP handlers
* @internal
*/
export interface HandlerExtraData {
sessionId?: SessionId;
requestId: RequestId;
}
/** Error types for MCP operations */
export type McpErrorType = 'tool_execution' | 'resource_execution' | 'prompt_execution' | 'transport' | 'protocol' | 'validation' | 'timeout';
/**
* Party (client/server) information extracted from MCP initialize requests
* @internal
*/
export type PartyInfo = {
name?: string;
title?: string;
version?: string;
};
/**
* Session-level data collected from various MCP messages
* @internal
*/
export type SessionData = {
clientInfo?: PartyInfo;
protocolVersion?: string;
serverInfo?: PartyInfo;
};
/**
* Options for configuring the MCP server wrapper.
*/
export type McpServerWrapperOptions = {
/** Whether to capture tool/prompt input arguments in spans. Defaults to sendDefaultPii. */
recordInputs?: boolean;
/** Whether to capture tool/prompt output results in spans. Defaults to sendDefaultPii. */
recordOutputs?: boolean;
};
/**
* Resolved options with defaults applied. Used internally.
* @internal
*/
export type ResolvedMcpOptions = Required<McpServerWrapperOptions>;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,51 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
class Semaphore {
/**
* Creates an instance of Semaphore.
* @param {number} available the amount available number of "tasks"
* in the Semaphore
*/
constructor(available) {
this.available = available;
/** @type {(() => void)[]} */
this.waiters = [];
/** @private */
this._continue = this._continue.bind(this);
}
/**
* @param {() => void} callback function block to capture and run
* @returns {void}
*/
acquire(callback) {
if (this.available > 0) {
this.available--;
callback();
} else {
this.waiters.push(callback);
}
}
release() {
this.available++;
if (this.waiters.length > 0) {
process.nextTick(this._continue);
}
}
_continue() {
if (this.available > 0 && this.waiters.length > 0) {
this.available--;
const callback = /** @type {(() => void)} */ (this.waiters.pop());
callback();
}
}
}
module.exports = Semaphore;

View File

@@ -0,0 +1 @@
{"version":3,"file":"book-audio.js","sources":["../../../src/icons/book-audio.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BookAudio\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgNnY3IiAvPgogIDxwYXRoIGQ9Ik0xNiA4djMiIC8+CiAgPHBhdGggZD0iTTQgMTkuNXYtMTVBMi41IDIuNSAwIDAgMSA2LjUgMkgxOWExIDEgMCAwIDEgMSAxdjE4YTEgMSAwIDAgMS0xIDFINi41YTEgMSAwIDAgMSAwLTVIMjAiIC8+CiAgPHBhdGggZD0iTTggOHYzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/book-audio\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 BookAudio = createLucideIcon('BookAudio', [\n ['path', { d: 'M12 6v7', key: '1f6ttz' }],\n ['path', { d: 'M16 8v3', key: 'gejaml' }],\n [\n 'path',\n {\n 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',\n key: 'k3hazp',\n },\n ],\n ['path', { d: 'M8 8v3', key: '1qzp49' }],\n]);\n\nexport default BookAudio;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxC,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;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,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzC,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,15 @@
"use strict";
var _array_like_to_array = require("./_array_like_to_array.cjs");
function _unsupported_iterable_to_array(o, minLen) {
if (!o) return;
if (typeof o === "string") return _array_like_to_array._(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array._(o, minLen);
}
exports._ = _unsupported_iterable_to_array;

View File

@@ -0,0 +1,358 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
const {
parseVersionRuntimeCode,
rangeToStringRuntimeCode,
satisfyRuntimeCode,
versionLtRuntimeCode
} = require("../util/semver");
/** @typedef {import("webpack-sources").Source} Source */
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Chunk").ChunkId} ChunkId */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../ChunkGraph").ModuleId} ModuleId */
/** @typedef {import("../Compilation")} Compilation */
/** @typedef {import("../Module")} Module */
/** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
/** @typedef {import("../CodeGenerationResults")} CodeGenerationResults */
class ConsumeSharedRuntimeModule extends RuntimeModule {
/**
* @param {ReadOnlyRuntimeRequirements} runtimeRequirements runtime requirements
*/
constructor(runtimeRequirements) {
super("consumes", RuntimeModule.STAGE_ATTACH);
this._runtimeRequirements = runtimeRequirements;
}
/**
* @returns {string | null} runtime code
*/
generate() {
const compilation = /** @type {Compilation} */ (this.compilation);
const chunkGraph = /** @type {ChunkGraph} */ (this.chunkGraph);
const codeGenerationResults =
/** @type {CodeGenerationResults} */
(compilation.codeGenerationResults);
const { runtimeTemplate } = compilation;
/** @type {Record<ChunkId, ModuleId[]>} */
const chunkToModuleMapping = {};
/** @type {Map<ModuleId, Source>} */
const moduleIdToSourceMapping = new Map();
/** @type {ModuleId[]} */
const initialConsumes = [];
/**
* @param {Iterable<Module>} modules modules
* @param {Chunk} chunk the chunk
* @param {ModuleId[]} list list of ids
*/
const addModules = (modules, chunk, list) => {
for (const m of modules) {
const module = m;
const id = /** @type {ModuleId} */ (chunkGraph.getModuleId(module));
list.push(id);
moduleIdToSourceMapping.set(
id,
codeGenerationResults.getSource(
module,
chunk.runtime,
"consume-shared"
)
);
}
};
for (const chunk of /** @type {Chunk} */ (
this.chunk
).getAllReferencedChunks()) {
const modules = chunkGraph.getChunkModulesIterableBySourceType(
chunk,
"consume-shared"
);
if (!modules) continue;
addModules(
modules,
chunk,
(chunkToModuleMapping[/** @type {ChunkId} */ (chunk.id)] = [])
);
}
for (const chunk of /** @type {Chunk} */ (
this.chunk
).getAllInitialChunks()) {
const modules = chunkGraph.getChunkModulesIterableBySourceType(
chunk,
"consume-shared"
);
if (!modules) continue;
addModules(modules, chunk, initialConsumes);
}
if (moduleIdToSourceMapping.size === 0) return null;
return Template.asString([
parseVersionRuntimeCode(runtimeTemplate),
versionLtRuntimeCode(runtimeTemplate),
rangeToStringRuntimeCode(runtimeTemplate),
satisfyRuntimeCode(runtimeTemplate),
`var exists = ${runtimeTemplate.basicFunction("scope, key", [
`return scope && ${RuntimeGlobals.hasOwnProperty}(scope, key);`
])}`,
`var get = ${runtimeTemplate.basicFunction("entry", [
"entry.loaded = 1;",
"return entry.get()"
])};`,
`var eagerOnly = ${runtimeTemplate.basicFunction("versions", [
`return Object.keys(versions).reduce(${runtimeTemplate.basicFunction(
"filtered, version",
Template.indent([
"if (versions[version].eager) {",
Template.indent(["filtered[version] = versions[version];"]),
"}",
"return filtered;"
])
)}, {});`
])};`,
`var findLatestVersion = ${runtimeTemplate.basicFunction(
"scope, key, eager",
[
"var versions = eager ? eagerOnly(scope[key]) : scope[key];",
`var key = Object.keys(versions).reduce(${runtimeTemplate.basicFunction(
"a, b",
["return !a || versionLt(a, b) ? b : a;"]
)}, 0);`,
"return key && versions[key];"
]
)};`,
`var findSatisfyingVersion = ${runtimeTemplate.basicFunction(
"scope, key, requiredVersion, eager",
[
"var versions = eager ? eagerOnly(scope[key]) : scope[key];",
`var key = Object.keys(versions).reduce(${runtimeTemplate.basicFunction(
"a, b",
[
"if (!satisfy(requiredVersion, b)) return a;",
"return !a || versionLt(a, b) ? b : a;"
]
)}, 0);`,
"return key && versions[key]"
]
)};`,
`var findSingletonVersionKey = ${runtimeTemplate.basicFunction(
"scope, key, eager",
[
"var versions = eager ? eagerOnly(scope[key]) : scope[key];",
`return Object.keys(versions).reduce(${runtimeTemplate.basicFunction(
"a, b",
["return !a || (!versions[a].loaded && versionLt(a, b)) ? b : a;"]
)}, 0);`
]
)};`,
`var getInvalidSingletonVersionMessage = ${runtimeTemplate.basicFunction(
"scope, key, version, requiredVersion",
[
'return "Unsatisfied version " + version + " from " + (version && scope[key][version].from) + " of shared singleton module " + key + " (required " + rangeToString(requiredVersion) + ")"'
]
)};`,
`var getInvalidVersionMessage = ${runtimeTemplate.basicFunction(
"scope, scopeName, key, requiredVersion, eager",
[
"var versions = scope[key];",
'return "No satisfying version (" + rangeToString(requiredVersion) + ")" + (eager ? " for eager consumption" : "") + " of shared module " + key + " found in shared scope " + scopeName + ".\\n" +',
`\t"Available versions: " + Object.keys(versions).map(${runtimeTemplate.basicFunction(
"key",
['return key + " from " + versions[key].from;']
)}).join(", ");`
]
)};`,
`var fail = ${runtimeTemplate.basicFunction("msg", [
"throw new Error(msg);"
])}`,
`var failAsNotExist = ${runtimeTemplate.basicFunction("scopeName, key", [
'return fail("Shared module " + key + " doesn\'t exist in shared scope " + scopeName);'
])}`,
`var warn = /*#__PURE__*/ ${
compilation.outputOptions.ignoreBrowserWarnings
? runtimeTemplate.basicFunction("", "")
: runtimeTemplate.basicFunction("msg", [
'if (typeof console !== "undefined" && console.warn) console.warn(msg);'
])
};`,
`var init = ${runtimeTemplate.returningFunction(
Template.asString([
"function(scopeName, key, eager, c, d) {",
Template.indent([
`var promise = ${RuntimeGlobals.initializeSharing}(scopeName);`,
// if we require eager shared, we expect it to be already loaded before it requested, no need to wait the whole scope loaded.
"if (promise && promise.then && !eager) { ",
Template.indent([
`return promise.then(fn.bind(fn, scopeName, ${RuntimeGlobals.shareScopeMap}[scopeName], key, false, c, d));`
]),
"}",
`return fn(scopeName, ${RuntimeGlobals.shareScopeMap}[scopeName], key, eager, c, d);`
]),
"}"
]),
"fn"
)};`,
"",
`var useFallback = ${runtimeTemplate.basicFunction(
"scopeName, key, fallback",
["return fallback ? fallback() : failAsNotExist(scopeName, key);"]
)}`,
`var load = /*#__PURE__*/ init(${runtimeTemplate.basicFunction(
"scopeName, scope, key, eager, fallback",
[
"if (!exists(scope, key)) return useFallback(scopeName, key, fallback);",
"return get(findLatestVersion(scope, key, eager));"
]
)});`,
`var loadVersion = /*#__PURE__*/ init(${runtimeTemplate.basicFunction(
"scopeName, scope, key, eager, requiredVersion, fallback",
[
"if (!exists(scope, key)) return useFallback(scopeName, key, fallback);",
"var satisfyingVersion = findSatisfyingVersion(scope, key, requiredVersion, eager);",
"if (satisfyingVersion) return get(satisfyingVersion);",
"warn(getInvalidVersionMessage(scope, scopeName, key, requiredVersion, eager))",
"return get(findLatestVersion(scope, key, eager));"
]
)});`,
`var loadStrictVersion = /*#__PURE__*/ init(${runtimeTemplate.basicFunction(
"scopeName, scope, key, eager, requiredVersion, fallback",
[
"if (!exists(scope, key)) return useFallback(scopeName, key, fallback);",
"var satisfyingVersion = findSatisfyingVersion(scope, key, requiredVersion, eager);",
"if (satisfyingVersion) return get(satisfyingVersion);",
"if (fallback) return fallback();",
"fail(getInvalidVersionMessage(scope, scopeName, key, requiredVersion, eager));"
]
)});`,
`var loadSingleton = /*#__PURE__*/ init(${runtimeTemplate.basicFunction(
"scopeName, scope, key, eager, fallback",
[
"if (!exists(scope, key)) return useFallback(scopeName, key, fallback);",
"var version = findSingletonVersionKey(scope, key, eager);",
"return get(scope[key][version]);"
]
)});`,
`var loadSingletonVersion = /*#__PURE__*/ init(${runtimeTemplate.basicFunction(
"scopeName, scope, key, eager, requiredVersion, fallback",
[
"if (!exists(scope, key)) return useFallback(scopeName, key, fallback);",
"var version = findSingletonVersionKey(scope, key, eager);",
"if (!satisfy(requiredVersion, version)) {",
Template.indent([
"warn(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));"
]),
"}",
"return get(scope[key][version]);"
]
)});`,
`var loadStrictSingletonVersion = /*#__PURE__*/ init(${runtimeTemplate.basicFunction(
"scopeName, scope, key, eager, requiredVersion, fallback",
[
"if (!exists(scope, key)) return useFallback(scopeName, key, fallback);",
"var version = findSingletonVersionKey(scope, key, eager);",
"if (!satisfy(requiredVersion, version)) {",
Template.indent([
"fail(getInvalidSingletonVersionMessage(scope, key, version, requiredVersion));"
]),
"}",
"return get(scope[key][version]);"
]
)});`,
"var installedModules = {};",
"var moduleToHandlerMapping = {",
Template.indent(
Array.from(
moduleIdToSourceMapping,
([key, source]) => `${JSON.stringify(key)}: ${source.source()}`
).join(",\n")
),
"};",
initialConsumes.length > 0
? Template.asString([
`var initialConsumes = ${JSON.stringify(initialConsumes)};`,
`initialConsumes.forEach(${runtimeTemplate.basicFunction("id", [
`${
RuntimeGlobals.moduleFactories
}[id] = ${runtimeTemplate.basicFunction("module", [
"// Handle case when module is used sync",
"installedModules[id] = 0;",
`delete ${RuntimeGlobals.moduleCache}[id];`,
"var factory = moduleToHandlerMapping[id]();",
'if(typeof factory !== "function") throw new Error("Shared module is not available for eager consumption: " + id);',
"module.exports = factory();"
])}`
])});`
])
: "// no consumes in initial chunks",
this._runtimeRequirements.has(RuntimeGlobals.ensureChunkHandlers)
? Template.asString([
`var chunkMapping = ${JSON.stringify(
chunkToModuleMapping,
null,
"\t"
)};`,
"var startedInstallModules = {};",
`${
RuntimeGlobals.ensureChunkHandlers
}.consumes = ${runtimeTemplate.basicFunction("chunkId, promises", [
`if(${RuntimeGlobals.hasOwnProperty}(chunkMapping, chunkId)) {`,
Template.indent([
`chunkMapping[chunkId].forEach(${runtimeTemplate.basicFunction(
"id",
[
`if(${RuntimeGlobals.hasOwnProperty}(installedModules, id)) return promises.push(installedModules[id]);`,
"if(!startedInstallModules[id]) {",
`var onFactory = ${runtimeTemplate.basicFunction(
"factory",
[
"installedModules[id] = 0;",
`${
RuntimeGlobals.moduleFactories
}[id] = ${runtimeTemplate.basicFunction("module", [
`delete ${RuntimeGlobals.moduleCache}[id];`,
"module.exports = factory();"
])}`
]
)};`,
"startedInstallModules[id] = true;",
`var onError = ${runtimeTemplate.basicFunction("error", [
"delete installedModules[id];",
`${
RuntimeGlobals.moduleFactories
}[id] = ${runtimeTemplate.basicFunction("module", [
`delete ${RuntimeGlobals.moduleCache}[id];`,
"throw error;"
])}`
])};`,
"try {",
Template.indent([
"var promise = moduleToHandlerMapping[id]();",
"if(promise.then) {",
Template.indent(
"promises.push(installedModules[id] = promise.then(onFactory)['catch'](onError));"
),
"} else onFactory(promise);"
]),
"} catch(e) { onError(e); }",
"}"
]
)});`
]),
"}"
])}`
])
: "// no chunk loading of consumes"
]);
}
}
module.exports = ConsumeSharedRuntimeModule;

View File

@@ -0,0 +1 @@
{"version":3,"file":"copyleft.js","sources":["../../../src/icons/copyleft.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Copyleft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNOS4xNyAxNC44M2E0IDQgMCAxIDAgMC01LjY2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/copyleft\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 Copyleft = createLucideIcon('Copyleft', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M9.17 14.83a4 4 0 1 0 0-5.66', key: '1sveal' }],\n]);\n\nexport default Copyleft;\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,CAC5C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgC,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;AAC/D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,11 @@
import type { DefaultCellComponentProps } from 'payload';
import React from 'react';
import './index.scss';
export declare const useCellProps: () => DefaultCellComponentProps | null;
export declare const RenderDefaultCell: React.FC<{
clientProps: DefaultCellComponentProps;
columnIndex: number;
enableRowSelections?: boolean;
isLinkedColumn?: boolean;
}>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,136 @@
'use strict';
const assert = require('assert');
const format = require('../');
// assert.equal(format([]), '');
// assert.equal(format(['']), '');
// assert.equal(format([[]]), '[]');
// assert.equal(format([{}]), '{}');
// assert.equal(format([null]), 'null');
// assert.equal(format([true]), 'true');
// assert.equal(format([false]), 'false');
// assert.equal(format(['test']), 'test');
// // // CHECKME this is for console.log() compatibility - but is it *right*?
// assert.equal(format(['foo', 'bar', 'baz']), 'foo bar baz');
const emptyObj = {}
assert.equal(format(emptyObj, []), emptyObj)
assert.equal(format(emptyObj, ['a', 'b', 'c']), '{} "b" "c" ')
assert.equal(format('', ['a']), '')
// ES6 Symbol handling
const symbol = Symbol('foo')
assert.equal(format(null, [symbol]), null);
assert.equal(format('foo', [symbol]), 'foo');
assert.equal(format('%s', [symbol]), 'Symbol(foo)');
assert.equal(format('%j', [symbol]), 'undefined');
assert.throws(function() {
format('%d', [symbol]);
}, TypeError);
assert.equal(format('%d', [42.0]), '42');
assert.equal(format('%d', [42]), '42');
assert.equal(format('%f', [42.99]), '42.99');
assert.equal(format('%i', [42.99]), '42');
assert.equal(format('%s', [42]), '42');
assert.equal(format('%j', [42]), '42');
assert.equal(format('%d', [undefined]), '%d');
assert.equal(format('%s', [undefined]), 'undefined');
assert.equal(format('%j', [undefined]), '%j');
assert.equal(format('%d', [null]), '%d');
assert.equal(format('%i', [null]), '%i');
assert.equal(format('%s', [null]), 'null');
assert.equal(format('%j', [null]), 'null');
assert.equal(format('%d', ['42.0']), '42');
assert.equal(format('%d', ['42']), '42');
assert.equal(format('%i', ['42']), '42');
assert.equal(format('%i', ['42.99']), '42');
assert.equal(format('%s %i', ['foo', 42.99]), 'foo 42');
assert.equal(format('%d %d', ['42']), '42 %d');
assert.equal(format('%i %i', ['42']), '42 %i');
assert.equal(format('%i %i', ['42.99']), '42 %i');
assert.equal(format('foo %d', ['42']), 'foo 42');
assert.equal(format('%s', ['42']), '42');
// assert.equal(format('%j', ['42']), '"42"');
// assert.equal(format('%%s%s', ['foo']), '%sfoo');
assert.equal(format('%s', []), '%s');
assert.equal(format('%s', [undefined]), 'undefined');
assert.equal(format('%s', ['foo']), 'foo');
assert.equal(format('%s', ['\"quoted\"']), '\"quoted\"');
assert.equal(format('%j', [{ s: '\"quoted\"' }]), '{\"s\":\"\\"quoted\\"\"}');
assert.equal(format('%s:%s', []), '%s:%s');
assert.equal(format('%s:%s', [undefined]), 'undefined:%s');
assert.equal(format('%s:%s', ['foo']), 'foo:%s');
assert.equal(format('%s:%s', ['foo', 'bar']), 'foo:bar');
assert.equal(format('%s:%s', ['foo', 'bar', 'baz']), 'foo:bar');
assert.equal(format('%s%s', []), '%s%s');
assert.equal(format('%s%s', [undefined]), 'undefined%s');
assert.equal(format('%s%s', ['foo']), 'foo%s');
assert.equal(format('%s%s', ['foo', 'bar']), 'foobar');
assert.equal(format('%s%s', ['foo', 'bar', 'baz']), 'foobar');
assert.equal(format('foo %s', ['foo']), 'foo foo')
assert.equal(format('foo %o', [{foo: 'foo'}]), 'foo {"foo":"foo"}')
assert.equal(format('foo %O', [{foo: 'foo'}]), 'foo {"foo":"foo"}')
assert.equal(format('foo %j', [{foo: 'foo'}]), 'foo {"foo":"foo"}')
assert.equal(format('foo %j %j', [{foo: 'foo'}]), 'foo {"foo":"foo"} %j')
assert.equal(format('foo %j', ['foo']), 'foo \'foo\'') // TODO: isn't this wrong?
assert.equal(format('foo %j', [function foo () {}]), 'foo foo')
assert.equal(format('foo %j', [function () {}]), 'foo <anonymous>')
assert.equal(format('foo %j', [{foo: 'foo'}, 'not-printed']), 'foo {"foo":"foo"}')
assert.equal(
format('foo %j', [{ foo: 'foo' }], { stringify () { return 'REPLACED' } }),
'foo REPLACED'
)
const circularObject = {}
circularObject.foo = circularObject
assert.equal(format('foo %j', [circularObject]), 'foo "[Circular]"')
// // assert.equal(format(['%%%s%%', 'hi']), '%hi%');
// // assert.equal(format(['%%%s%%%%', 'hi']), '%hi%%');
// (function() {
// var o = {};
// o.o = o;
// assert.equal(format(['%j', o]), '[Circular]');
// })();
assert.equal(format('%%', ['foo']), '%')
assert.equal(format('foo %%', ['foo']), 'foo %')
assert.equal(format('foo %% %s', ['bar']), 'foo % bar')
assert.equal(format('%s - %d', ['foo', undefined]), 'foo - %d')
assert.equal(format('%s - %f', ['foo', undefined]), 'foo - %f')
assert.equal(format('%s - %i', ['foo', undefined]), 'foo - %i')
assert.equal(format('%s - %O', ['foo', undefined]), 'foo - %O')
assert.equal(format('%s - %o', ['foo', undefined]), 'foo - %o')
assert.equal(format('%s - %j', ['foo', undefined]), 'foo - %j')
assert.equal(format('%s - %s', ['foo', undefined]), 'foo - undefined')
assert.equal(format('%s - %%', ['foo', undefined]), 'foo - %')
assert.equal(format('%s - %d', ['foo', null]), 'foo - %d')
assert.equal(format('%s - %f', ['foo', null]), 'foo - %f')
assert.equal(format('%s - %i', ['foo', null]), 'foo - %i')
assert.equal(format('%s - %O', ['foo', null]), 'foo - null')
assert.equal(format('%s - %o', ['foo', null]), 'foo - null')
assert.equal(format('%s - %j', ['foo', null]), 'foo - null')
assert.equal(format('%s - %s', ['foo', null]), 'foo - null')
assert.equal(format('%s - %%', ['foo', null]), 'foo - %')
assert.equal(format('%d%d', [11, 22]), '1122')
assert.equal(format('%d%s', [11, 22]), '1122')
assert.equal(format('%d%o', [11, { aa: 22 }]), '11{"aa":22}')
assert.equal(format('%d%d%d', [11, 22, 33]), '112233')
assert.equal(format('%d%d%s', [11, 22, 33]), '112233')
assert.equal(format('%d%o%d%s', [11, { aa: 22 }, 33, 'sss']), '11{"aa":22}33sss')
assert.equal(format('%d%%%d', [11, 22]), '11%22')
assert.equal(format('%d%%%s', [11, 22]), '11%22')

View File

@@ -0,0 +1,35 @@
import type { StackFrame } from '../types-hoist/stackframe';
type WatchdogReturn = {
/** Resets the watchdog timer */
poll: () => void;
/** Enables or disables the watchdog timer */
enabled: (state: boolean) => void;
};
type CreateTimerImpl = () => {
getTimeMs: () => number;
reset: () => void;
};
/**
* A node.js watchdog timer
* @param pollInterval The interval that we expect to get polled at
* @param anrThreshold The threshold for when we consider ANR
* @param callback The callback to call for ANR
* @returns An object with `poll` and `enabled` functions {@link WatchdogReturn}
*/
export declare function watchdogTimer(createTimer: CreateTimerImpl, pollInterval: number, anrThreshold: number, callback: () => void): WatchdogReturn;
interface Location {
scriptId: string;
lineNumber: number;
columnNumber?: number;
}
interface CallFrame {
functionName: string;
location: Location;
url: string;
}
/**
* Converts Debugger.CallFrame to Sentry StackFrame
*/
export declare function callFrameToStackFrame(frame: CallFrame, url: string | undefined, getModuleFromFilename: (filename: string | undefined) => string | undefined): StackFrame;
export {};
//# sourceMappingURL=anr.d.ts.map

View File

@@ -0,0 +1,60 @@
import type { SavepointSQL, SQL, TransactionSQL } from 'bun';
import { type Cache } from "../cache/core/index.js";
import type { WithCacheConfig } from "../cache/core/types.js";
import { entityKind } from "../entity.js";
import type { Logger } from "../logger.js";
import type { PgDialect } from "../pg-core/dialect.js";
import { PgTransaction } from "../pg-core/index.js";
import type { SelectedFieldsOrdered } from "../pg-core/query-builders/select.types.js";
import type { PgQueryResultHKT, PgTransactionConfig, PreparedQueryConfig } from "../pg-core/session.js";
import { PgPreparedQuery, PgSession } from "../pg-core/session.js";
import type { RelationalSchemaConfig, TablesRelationalConfig } from "../relations.js";
import { type Query } from "../sql/sql.js";
import { type Assume } from "../utils.js";
export declare class BunSQLPreparedQuery<T extends PreparedQueryConfig> extends PgPreparedQuery<T> {
private client;
private queryString;
private params;
private logger;
private fields;
private _isResponseInArrayMode;
private customResultMapper?;
static readonly [entityKind]: string;
constructor(client: SQL, queryString: string, params: unknown[], logger: Logger, cache: Cache, queryMetadata: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
} | undefined, cacheConfig: WithCacheConfig | undefined, fields: SelectedFieldsOrdered | undefined, _isResponseInArrayMode: boolean, customResultMapper?: ((rows: unknown[][]) => T["execute"]) | undefined);
execute(placeholderValues?: Record<string, unknown> | undefined): Promise<T['execute']>;
all(placeholderValues?: Record<string, unknown> | undefined): Promise<T['all']>;
}
export interface BunSQLSessionOptions {
logger?: Logger;
cache?: Cache;
}
export declare class BunSQLSession<TSQL extends SQL, TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends PgSession<BunSQLQueryResultHKT, TFullSchema, TSchema> {
client: TSQL;
private schema;
static readonly [entityKind]: string;
logger: Logger;
private cache;
constructor(client: TSQL, dialect: PgDialect, schema: RelationalSchemaConfig<TSchema> | undefined,
/** @internal */
options?: BunSQLSessionOptions);
prepareQuery<T extends PreparedQueryConfig = PreparedQueryConfig>(query: Query, fields: SelectedFieldsOrdered | undefined, name: string | undefined, isResponseInArrayMode: boolean, customResultMapper?: (rows: unknown[][]) => T['execute'], queryMetadata?: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
}, cacheConfig?: WithCacheConfig): PgPreparedQuery<T>;
query(query: string, params: unknown[]): Promise<any>;
queryObjects(query: string, params: unknown[]): Promise<any>;
transaction<T>(transaction: (tx: BunSQLTransaction<TFullSchema, TSchema>) => Promise<T>, config?: PgTransactionConfig): Promise<T>;
}
export declare class BunSQLTransaction<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends PgTransaction<BunSQLQueryResultHKT, TFullSchema, TSchema> {
static readonly [entityKind]: string;
constructor(dialect: PgDialect,
/** @internal */
session: BunSQLSession<TransactionSQL | SavepointSQL, TFullSchema, TSchema>, schema: RelationalSchemaConfig<TSchema> | undefined, nestedIndex?: number);
transaction<T>(transaction: (tx: BunSQLTransaction<TFullSchema, TSchema>) => Promise<T>): Promise<T>;
}
export interface BunSQLQueryResultHKT extends PgQueryResultHKT {
type: Assume<this['row'], Record<string, any>[]>;
}

View File

@@ -0,0 +1,96 @@
[![CI](https://github.com/Borewit/text-codec/actions/workflows/ci.yml/badge.svg)](https://github.com/Borewit/text-codec/actions/workflows/ci.yml)
[![npm version](https://img.shields.io/npm/v/%40borewit%2Ftext-codec.svg)](https://www.npmjs.com/package/@borewit/text-codec)
[![npm downloads](http://img.shields.io/npm/dm/@borewit/text-codec.svg)](https://npmcharts.com/compare/@borewit/text-codec?interval=30)
![bundlejs](https://deno.bundlejs.com/?q=@borewit/text-codec&badge)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?logo=open-source-initiative&logoColor=white)](LICENSE.txt)
# `@borewit/text-codec`
A **lightweight alternative implementation** of `TextEncoder` / `TextDecoder` supporting common encodings missing in some JavaScript engines and Node.js builds.
Works in environments like **Hermes** (React Native) or **Small-ICU Node.js** where only UTF-8 and UTF-16LE are available.
| Encoding | Hermes — **Encode** | Hermes — **Decode** | Small-ICU Node.js — **Encode** | Small-ICU Node.js — **Decode** |
|---------------------------|---------------------|---------------------|--------------------------------|--------------------------------|
| **utf-8** / `utf8` | | Native | Native | Native |
| **utf-16le** | | | Native | Native |
| **ascii** | | | | |
| **latin1** / `iso-8859-1` | | | | Native (sometimes) |
| **windows-1252** | | | | |
**Legend:**
- **Native** — Supported natively by the JavaScript engine.
- **** — Support added by this module.
- **Native (sometimes)** — Available in some builds (e.g., certain Small-ICU Node.js builds).
---
When your project needs to handle encodings like `latin1` / `iso-8859-1` or `windows-1252` in these environments,
native `TextDecoder` / `TextEncoder` may throw an error or return incorrect results.
## ✨ Features
- Decoding and encoding
- Lightweight
- Typed
### Supported encodings:
- `utf-8` / `utf8`
- `utf-16le`
- `ascii`
- `latin1` / `iso-8859-1`
- `windows-1252`
---
## 📦 Installation
```sh
npm install @borewit/text-codec
```
# 📚 API Documentation
## `textDecode(bytes, encoding): string`
Decodes binary data into a JavaScript string using the specified encoding.
**Parameters**
- `bytes` (`Uint8Array`) — The binary data to decode.
- `encoding` (`SupportedEncoding`, optional) — Encoding type. Defaults to `"utf-8"`.
**Returns**
- `string` — The decoded text.
**Example**
```js
import { textDecode } from "@borewit/text-encode";
const bytes = new Uint8Array([0x48, 0x65, 0x6c, 0x6c, 0x6f]);
const text = textDecode(bytes, "ascii");
console.log(text); // "Hello"
```
Encodes a JavaScript string into binary form using the specified encoding.
## `textEncode(input, encoding): Uint8Array`
**Parameters**
- `input` (`string`) — The string to encode.
- `encoding` (`SupportedEncoding`, optional) — Encoding type. Defaults to `"utf-8"`.
**Returns**
`Uint8Array` — The encoded binary data.
Example:
```js
import { textEncode } from "@borewit/text-encode";
const bytes = textEncode("Hello", "utf-16le");
console.log(bytes); // Uint8Array([...])
```
## 📜 Licence
This project is licensed under the [MIT License](LICENSE.txt). Feel free to use, modify, and distribute as needed.

View File

@@ -0,0 +1,546 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/gd/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "nas lugha na diog",
other: "nas lugha na {{count}} diogan"
},
xSeconds: {
one: "1 diog",
two: "2 dhiog",
twenty: "20 diog",
other: "{{count}} diogan"
},
halfAMinute: "leth mhionaid",
lessThanXMinutes: {
one: "nas lugha na mionaid",
other: "nas lugha na {{count}} mionaidean"
},
xMinutes: {
one: "1 mionaid",
two: "2 mhionaid",
twenty: "20 mionaid",
other: "{{count}} mionaidean"
},
aboutXHours: {
one: "mu uair de th\xECde",
other: "mu {{count}} uairean de th\xECde"
},
xHours: {
one: "1 uair de th\xECde",
two: "2 uair de th\xECde",
twenty: "20 uair de th\xECde",
other: "{{count}} uairean de th\xECde"
},
xDays: {
one: "1 l\xE0",
other: "{{count}} l\xE0"
},
aboutXWeeks: {
one: "mu 1 seachdain",
other: "mu {{count}} seachdainean"
},
xWeeks: {
one: "1 seachdain",
other: "{{count}} seachdainean"
},
aboutXMonths: {
one: "mu mh\xECos",
other: "mu {{count}} m\xECosan"
},
xMonths: {
one: "1 m\xECos",
other: "{{count}} m\xECosan"
},
aboutXYears: {
one: "mu bhliadhna",
other: "mu {{count}} bliadhnaichean"
},
xYears: {
one: "1 bhliadhna",
other: "{{count}} bliadhna"
},
overXYears: {
one: "c\xF2rr is bliadhna",
other: "c\xF2rr is {{count}} bliadhnaichean"
},
almostXYears: {
one: "cha mh\xF2r bliadhna",
other: "cha mh\xF2r {{count}} bliadhnaichean"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else if (count === 2 && !!tokenValue.two) {
result = tokenValue.two;
} else if (count === 20 && !!tokenValue.twenty) {
result = tokenValue.twenty;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "ann an " + result;
} else {
return "o chionn " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/gd/_lib/formatLong.js
var dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy"
};
var timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
};
var dateTimeFormats = {
full: "{{date}} 'aig' {{time}}",
long: "{{date}} 'aig' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/gd/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'mu dheireadh' eeee 'aig' p",
yesterday: "'an-d\xE8 aig' p",
today: "'an-diugh aig' p",
tomorrow: "'a-m\xE0ireach aig' p",
nextWeek: "eeee 'aig' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/gd/_lib/localize.js
var eraValues = {
narrow: ["R", "A"],
abbreviated: ["RC", "AD"],
wide: ["ro Chr\xECosta", "anno domini"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["C1", "C2", "C3", "C4"],
wide: [
"a' chiad chairteal",
"an d\xE0rna cairteal",
"an treas cairteal",
"an ceathramh cairteal"]
};
var monthValues = {
narrow: ["F", "G", "M", "G", "C", "\xD2", "I", "L", "S", "D", "S", "D"],
abbreviated: [
"Faoi",
"Gear",
"M\xE0rt",
"Gibl",
"C\xE8it",
"\xD2gmh",
"Iuch",
"L\xF9n",
"Sult",
"D\xE0mh",
"Samh",
"D\xF9bh"],
wide: [
"Am Faoilleach",
"An Gearran",
"Am M\xE0rt",
"An Giblean",
"An C\xE8itean",
"An t-\xD2gmhios",
"An t-Iuchar",
"An L\xF9nastal",
"An t-Sultain",
"An D\xE0mhair",
"An t-Samhain",
"An D\xF9bhlachd"]
};
var dayValues = {
narrow: ["D", "L", "M", "C", "A", "H", "S"],
short: ["D\xF2", "Lu", "M\xE0", "Ci", "Ar", "Ha", "Sa"],
abbreviated: ["Did", "Dil", "Dim", "Dic", "Dia", "Dih", "Dis"],
wide: [
"Did\xF2mhnaich",
"Diluain",
"Dim\xE0irt",
"Diciadain",
"Diardaoin",
"Dihaoine",
"Disathairne"]
};
var dayPeriodValues = {
narrow: {
am: "m",
pm: "f",
midnight: "m.o.",
noon: "m.l.",
morning: "madainn",
afternoon: "feasgar",
evening: "feasgar",
night: "oidhche"
},
abbreviated: {
am: "M.",
pm: "F.",
midnight: "meadhan oidhche",
noon: "meadhan l\xE0",
morning: "madainn",
afternoon: "feasgar",
evening: "feasgar",
night: "oidhche"
},
wide: {
am: "m.",
pm: "f.",
midnight: "meadhan oidhche",
noon: "meadhan l\xE0",
morning: "madainn",
afternoon: "feasgar",
evening: "feasgar",
night: "oidhche"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "m",
pm: "f",
midnight: "m.o.",
noon: "m.l.",
morning: "sa mhadainn",
afternoon: "feasgar",
evening: "feasgar",
night: "air an oidhche"
},
abbreviated: {
am: "M.",
pm: "F.",
midnight: "meadhan oidhche",
noon: "meadhan l\xE0",
morning: "sa mhadainn",
afternoon: "feasgar",
evening: "feasgar",
night: "air an oidhche"
},
wide: {
am: "m.",
pm: "f.",
midnight: "meadhan oidhche",
noon: "meadhan l\xE0",
morning: "sa mhadainn",
afternoon: "feasgar",
evening: "feasgar",
night: "air an oidhche"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber) {
var number = Number(dirtyNumber);
var rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return number + "d";
case 2:
return number + "na";
}
}
if (rem100 === 12) {
return number + "na";
}
return number + "mh";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/gd/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(d|na|tr|mh)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(r|a)/i,
abbreviated: /^(r\.?\s?c\.?|r\.?\s?a\.?\s?c\.?|a\.?\s?d\.?|a\.?\s?c\.?)/i,
wide: /^(ro Chrìosta|ron aois choitchinn|anno domini|aois choitcheann)/i
};
var parseEraPatterns = {
any: [/^b/i, /^(a|c)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^c[1234]/i,
wide: /^[1234](cd|na|tr|mh)? cairteal/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[fgmcòilsd]/i,
abbreviated: /^(faoi|gear|màrt|gibl|cèit|ògmh|iuch|lùn|sult|dàmh|samh|dùbh)/i,
wide: /^(am faoilleach|an gearran|am màrt|an giblean|an cèitean|an t-Ògmhios|an t-Iuchar|an lùnastal|an t-Sultain|an dàmhair|an t-Samhain|an dùbhlachd)/i
};
var parseMonthPatterns = {
narrow: [
/^f/i,
/^g/i,
/^m/i,
/^g/i,
/^c/i,
/^ò/i,
/^i/i,
/^l/i,
/^s/i,
/^d/i,
/^s/i,
/^d/i],
any: [
/^fa/i,
/^ge/i,
/^mà/i,
/^gi/i,
/^c/i,
/^ò/i,
/^i/i,
/^l/i,
/^su/i,
/^d/i,
/^sa/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[dlmcahs]/i,
short: /^(dò|lu|mà|ci|ar|ha|sa)/i,
abbreviated: /^(did|dil|dim|dic|dia|dih|dis)/i,
wide: /^(didòmhnaich|diluain|dimàirt|diciadain|diardaoin|dihaoine|disathairne)/i
};
var parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^c/i, /^a/i, /^h/i, /^s/i],
any: [/^d/i, /^l/i, /^m/i, /^c/i, /^a/i, /^h/i, /^s/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|mi|n|(san|aig) (madainn|feasgar|feasgar|oidhche))/i,
any: /^([ap]\.?\s?m\.?|meadhan oidhche|meadhan là|(san|aig) (madainn|feasgar|feasgar|oidhche))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^m/i,
pm: /^f/i,
midnight: /^meadhan oidhche/i,
noon: /^meadhan là/i,
morning: /sa mhadainn/i,
afternoon: /feasgar/i,
evening: /feasgar/i,
night: /air an oidhche/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/gd.js
var gd = {
code: "gd",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/gd/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
gd: gd }) });
//# debugId=8A995658F065856664756E2164756E21
//# sourceMappingURL=cdn.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 CodeXml = createLucideIcon("CodeXml", [
["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
]);
export { CodeXml as default };
//# sourceMappingURL=code-xml.js.map

View File

@@ -0,0 +1,106 @@
import { getClient, SDK_VERSION } from '@sentry/core';
import { WINDOW } from '../helpers.js';
// This is a map of integration function method to bundle file name.
const LazyLoadableIntegrations = {
replayIntegration: 'replay',
replayCanvasIntegration: 'replay-canvas',
feedbackIntegration: 'feedback',
feedbackModalIntegration: 'feedback-modal',
feedbackScreenshotIntegration: 'feedback-screenshot',
captureConsoleIntegration: 'captureconsole',
contextLinesIntegration: 'contextlines',
linkedErrorsIntegration: 'linkederrors',
dedupeIntegration: 'dedupe',
extraErrorDataIntegration: 'extraerrordata',
graphqlClientIntegration: 'graphqlclient',
httpClientIntegration: 'httpclient',
reportingObserverIntegration: 'reportingobserver',
rewriteFramesIntegration: 'rewriteframes',
browserProfilingIntegration: 'browserprofiling',
moduleMetadataIntegration: 'modulemetadata',
instrumentAnthropicAiClient: 'instrumentanthropicaiclient',
instrumentOpenAiClient: 'instrumentopenaiclient',
instrumentGoogleGenAIClient: 'instrumentgooglegenaiclient',
instrumentLangGraph: 'instrumentlanggraph',
createLangChainCallbackHandler: 'createlangchaincallbackhandler',
} ;
const WindowWithMaybeIntegration = WINDOW
;
/**
* Lazy load an integration from the CDN.
* Rejects if the integration cannot be loaded.
*/
async function lazyLoadIntegration(
name,
scriptNonce,
) {
const bundle = LazyLoadableIntegrations[name];
// `window.Sentry` is only set when using a CDN bundle, but this method can also be used via the NPM package
const sentryOnWindow = (WindowWithMaybeIntegration.Sentry = WindowWithMaybeIntegration.Sentry || {});
if (!bundle) {
throw new Error(`Cannot lazy load integration: ${name}`);
}
// Bail if the integration already exists
const existing = sentryOnWindow[name];
// The `feedbackIntegration` is loaded by default in the CDN bundles,
// so we need to differentiate between the real integration and the shim.
// if only the shim exists, we still want to lazy load the real integration.
if (typeof existing === 'function' && !('_isShim' in existing)) {
return existing;
}
const url = getScriptURL(bundle);
const script = WINDOW.document.createElement('script');
script.src = url;
script.crossOrigin = 'anonymous';
script.referrerPolicy = 'strict-origin';
if (scriptNonce) {
script.setAttribute('nonce', scriptNonce);
}
const waitForLoad = new Promise((resolve, reject) => {
script.addEventListener('load', () => resolve());
script.addEventListener('error', reject);
});
const currentScript = WINDOW.document.currentScript;
const parent = WINDOW.document.body || WINDOW.document.head || currentScript?.parentElement;
if (parent) {
parent.appendChild(script);
} else {
throw new Error(`Could not find parent element to insert lazy-loaded ${name} script`);
}
try {
await waitForLoad;
} catch {
throw new Error(`Error when loading integration: ${name}`);
}
const integrationFn = sentryOnWindow[name];
if (typeof integrationFn !== 'function') {
throw new Error(`Could not load integration: ${name}`);
}
return integrationFn;
}
function getScriptURL(bundle) {
const client = getClient();
const baseURL = client?.getOptions()?.cdnBaseUrl || 'https://browser.sentry-cdn.com';
return new URL(`/${SDK_VERSION}/${bundle}.min.js`, baseURL).toString();
}
export { lazyLoadIntegration };
//# sourceMappingURL=lazyLoadIntegration.js.map

View File

@@ -0,0 +1,30 @@
import { formatDistance } from "./cs/_lib/formatDistance.js";
import { formatLong } from "./cs/_lib/formatLong.js";
import { formatRelative } from "./cs/_lib/formatRelative.js";
import { localize } from "./cs/_lib/localize.js";
import { match } from "./cs/_lib/match.js";
/**
* @category Locales
* @summary Czech locale.
* @language Czech
* @iso-639-2 ces
* @author David Rus [@davidrus](https://github.com/davidrus)
* @author Pavel Hrách [@SilenY](https://github.com/SilenY)
* @author Jozef Bíroš [@JozefBiros](https://github.com/JozefBiros)
*/
export const cs = {
code: "cs",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default cs;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"defaultScopes.js","sources":["../../src/defaultScopes.ts"],"sourcesContent":["import { getGlobalSingleton } from './carrier';\nimport { Scope } from './scope';\n\n/** Get the default current scope. */\nexport function getDefaultCurrentScope(): Scope {\n return getGlobalSingleton('defaultCurrentScope', () => new Scope());\n}\n\n/** Get the default isolation scope. */\nexport function getDefaultIsolationScope(): Scope {\n return getGlobalSingleton('defaultIsolationScope', () => new Scope());\n}\n"],"names":["getGlobalSingleton","Scope"],"mappings":";;;;;AAGA;AACO,SAAS,sBAAsB,GAAU;AAChD,EAAE,OAAOA,0BAAkB,CAAC,qBAAqB,EAAE,MAAM,IAAIC,WAAK,EAAE,CAAC;AACrE;;AAEA;AACO,SAAS,wBAAwB,GAAU;AAClD,EAAE,OAAOD,0BAAkB,CAAC,uBAAuB,EAAE,MAAM,IAAIC,WAAK,EAAE,CAAC;AACvE;;;;;"}

View File

@@ -0,0 +1,22 @@
/**
* @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 BadgeMinus = createLucideIcon("BadgeMinus", [
[
"path",
{
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
key: "3c2336"
}
],
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
]);
export { BadgeMinus as default };
//# sourceMappingURL=badge-minus.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"findUp.d.ts","sourceRoot":"","sources":["../../src/utilities/findUp.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,GAAG,EACH,SAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,MAAM,CAAA;IACzE,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB,GAAG,IAAI,GAAG,MAAM,CAkChB;AAED;;GAEG;AACH,wBAAsB,MAAM,CAAC,EAC3B,SAAS,EACT,GAAG,EACH,SAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,MAAM,CAAA;IACzE,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAkCzB;AAMD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,WAOzD;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,MAAM,oBAO3D"}

View File

@@ -0,0 +1,133 @@
# watchpack
Wrapper library for directory and file watching.
[![Test](https://github.com/webpack/watchpack/actions/workflows/test.yml/badge.svg)](https://github.com/webpack/watchpack/actions/workflows/test.yml)
[![Codecov](https://codecov.io/gh/webpack/watchpack/graph/badge.svg?token=8xk2OrrxWm)](https://codecov.io/gh/webpack/watchpack)
[![Downloads](https://img.shields.io/npm/dm/watchpack.svg)](https://www.npmjs.com/package/watchpack)
## Concept
watchpack high level API doesn't map directly to watchers. Instead a three level architecture ensures that for each directory only a single watcher exists.
- The high level API requests `DirectoryWatchers` from a `WatcherManager`, which ensures that only a single `DirectoryWatcher` per directory is created.
- A user-faced `Watcher` can be obtained from a `DirectoryWatcher` and provides a filtered view on the `DirectoryWatcher`.
- Reference-counting is used on the `DirectoryWatcher` and `Watcher` to decide when to close them.
- The real watchers are created by the `DirectoryWatcher`.
- Files are never watched directly. This should keep the watcher count low.
- Watching can be started in the past. This way watching can start after file reading.
- Symlinks are not followed, instead the symlink is watched.
## API
```javascript
const Watchpack = require("watchpack");
const wp = new Watchpack({
// options:
aggregateTimeout: 1000,
// fire "aggregated" event when after a change for 1000ms no additional change occurred
// aggregated defaults to undefined, which doesn't fire an "aggregated" event
poll: true,
// poll: true - use polling with the default interval
// poll: 10000 - use polling with an interval of 10s
// poll defaults to undefined, which prefer native watching methods
// Note: enable polling when watching on a network path
// When WATCHPACK_POLLING environment variable is set it will override this option
followSymlinks: true,
// true: follows symlinks and watches symlinks and real files
// (This makes sense when symlinks has not been resolved yet, comes with a performance hit)
// false (default): watches only specified item they may be real files or symlinks
// (This makes sense when symlinks has already been resolved)
ignored: "**/.git",
// ignored: "string" - a glob pattern for files or folders that should not be watched
// ignored: ["string", "string"] - multiple glob patterns that should be ignored
// ignored: /regexp/ - a regular expression for files or folders that should not be watched
// ignored: (entry) => boolean - an arbitrary function which must return truthy to ignore an entry
// For all cases expect the arbitrary function the path will have path separator normalized to '/'.
// All subdirectories are ignored too
});
// Watchpack.prototype.watch({
// files: Iterable<string>,
// directories: Iterable<string>,
// missing: Iterable<string>,
// startTime?: number
// })
wp.watch({
files: listOfFiles,
directories: listOfDirectories,
missing: listOfNotExistingItems,
startTime: Date.now() - 10000,
});
// starts watching these files and directories
// calling this again will override the files and directories
// files: can be files or directories, for files: content and existence changes are tracked
// for directories: only existence and timestamp changes are tracked
// directories: only directories, directory content (and content of children, ...) and
// existence changes are tracked.
// assumed to exist, when directory is not found without further information a remove event is emitted
// missing: can be files or directories,
// only existence changes are tracked
// expected to not exist, no remove event is emitted when not found initially
// files and directories are assumed to exist, when they are not found without further information a remove event is emitted
// missing is assumed to not exist and no remove event is emitted
wp.on("change", (filePath, mtime, explanation) => {
// filePath: the changed file
// mtime: last modified time for the changed file
// explanation: textual information how this change was detected
});
wp.on("remove", (filePath, explanation) => {
// filePath: the removed file or directory
// explanation: textual information how this change was detected
});
wp.on("aggregated", (changes, removals) => {
// changes: a Set of all changed files
// removals: a Set of all removed files
// watchpack gives up ownership on these Sets.
});
// Watchpack.prototype.pause()
wp.pause();
// stops emitting events, but keeps watchers open
// next "watch" call can reuse the watchers
// The watcher will keep aggregating events
// which can be received with getAggregated()
// Watchpack.prototype.close()
wp.close();
// stops emitting events and closes all watchers
// Watchpack.prototype.getAggregated(): { changes: Set<string>, removals: Set<string> }
const { changes, removals } = wp.getAggregated();
// returns the current aggregated info and removes that from the watcher
// The next aggregated event won't include that info and will only emitted
// when futher changes happen
// Can also be used when paused.
// Watchpack.prototype.collectTimeInfoEntries(fileInfoEntries: Map<string, Entry>, directoryInfoEntries: Map<string, Entry>)
wp.collectTimeInfoEntries(fileInfoEntries, directoryInfoEntries);
// collects time info objects for all known files and directories
// this include info from files not directly watched
// key: absolute path, value: object with { safeTime, timestamp }
// safeTime: a point in time at which it is safe to say all changes happened before that
// timestamp: only for files, the mtime timestamp of the file
// Watchpack.prototype.getTimeInfoEntries()
const fileTimes = wp.getTimeInfoEntries();
// returns a Map with all known time info objects for files and directories
// similar to collectTimeInfoEntries but returns a single map with all entries
// (deprecated)
// Watchpack.prototype.getTimes()
const fileTimesOld = wp.getTimes();
// returns an object with all known change times for files
// this include timestamps from files not directly watched
// key: absolute path, value: timestamp as number
```

View File

@@ -0,0 +1 @@
{"version":3,"file":"clientKeys.d.ts","sourceRoot":"","sources":["../src/clientKeys.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,qBAAqB,49aAkhBhC,CAAA"}

View File

@@ -0,0 +1,26 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { GelColumn, GelColumnBuilder } from "./common.js";
type GelTextBuilderInitial<TName extends string> = GelTextBuilder<{
name: TName;
dataType: 'string';
columnType: 'GelText';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class GelTextBuilder<T extends ColumnBuilderBaseConfig<'string', 'GelText'>> extends GelColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class GelText<T extends ColumnBaseConfig<'string', 'GelText'>> extends GelColumn<T, {
enumValues: T['enumValues'];
}> {
static readonly [entityKind]: string;
readonly enumValues: T["enumValues"];
getSQLType(): string;
}
export declare function text(): GelTextBuilderInitial<''>;
export declare function text<TName extends string>(name: TName): GelTextBuilderInitial<TName>;
export {};

View File

@@ -0,0 +1 @@
{"version":3,"file":"panels-right-bottom.js","sources":["../../../src/icons/panels-right-bottom.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PanelsRightBottom\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0zIDE1aDEyIiAvPgogIDxwYXRoIGQ9Ik0xNSAzdjE4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/panels-right-bottom\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 PanelsRightBottom = createLucideIcon('PanelsRightBottom', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M3 15h12', key: '1wkqb3' }],\n ['path', { d: 'M15 3v18', key: '14nvp0' }],\n]);\n\nexport default PanelsRightBottom;\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,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_caching","require","fs","_fs2","data","makeStaticFileCache","fn","makeStrongCache","filepath","cache","cached","invalidate","fileMtime","readFile","nodeFs","existsSync","statSync","mtime","e","code"],"sources":["../../../src/config/files/utils.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport { makeStrongCache } from \"../caching.ts\";\nimport type { CacheConfigurator } from \"../caching.ts\";\nimport * as fs from \"../../gensync-utils/fs.ts\";\nimport nodeFs from \"node:fs\";\n\nexport function makeStaticFileCache<T>(\n fn: (filepath: string, contents: string) => T,\n) {\n return makeStrongCache(function* (\n filepath: string,\n cache: CacheConfigurator<void>,\n ): Handler<null | T> {\n const cached = cache.invalidate(() => fileMtime(filepath));\n\n if (cached === null) {\n return null;\n }\n\n return fn(filepath, yield* fs.readFile(filepath, \"utf8\"));\n });\n}\n\nfunction fileMtime(filepath: string): number | null {\n if (!nodeFs.existsSync(filepath)) return null;\n\n try {\n return +nodeFs.statSync(filepath).mtime;\n } catch (e) {\n if (e.code !== \"ENOENT\" && e.code !== \"ENOTDIR\") throw e;\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,EAAA,GAAAD,OAAA;AACA,SAAAE,KAAA;EAAA,MAAAC,IAAA,GAAAH,OAAA;EAAAE,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,SAASC,mBAAmBA,CACjCC,EAA6C,EAC7C;EACA,OAAO,IAAAC,wBAAe,EAAC,WACrBC,QAAgB,EAChBC,KAA8B,EACX;IACnB,MAAMC,MAAM,GAAGD,KAAK,CAACE,UAAU,CAAC,MAAMC,SAAS,CAACJ,QAAQ,CAAC,CAAC;IAE1D,IAAIE,MAAM,KAAK,IAAI,EAAE;MACnB,OAAO,IAAI;IACb;IAEA,OAAOJ,EAAE,CAACE,QAAQ,EAAE,OAAON,EAAE,CAACW,QAAQ,CAACL,QAAQ,EAAE,MAAM,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ;AAEA,SAASI,SAASA,CAACJ,QAAgB,EAAiB;EAClD,IAAI,CAACM,KAAKA,CAAC,CAACC,UAAU,CAACP,QAAQ,CAAC,EAAE,OAAO,IAAI;EAE7C,IAAI;IACF,OAAO,CAACM,KAAKA,CAAC,CAACE,QAAQ,CAACR,QAAQ,CAAC,CAACS,KAAK;EACzC,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV,IAAIA,CAAC,CAACC,IAAI,KAAK,QAAQ,IAAID,CAAC,CAACC,IAAI,KAAK,SAAS,EAAE,MAAMD,CAAC;EAC1D;EAEA,OAAO,IAAI;AACb;AAAC","ignoreList":[]}

View File

@@ -0,0 +1,72 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const {
JAVASCRIPT_MODULE_TYPE_AUTO,
JAVASCRIPT_MODULE_TYPE_ESM
} = require("../ModuleTypeConstants");
const ContextElementDependency = require("./ContextElementDependency");
const ImportMetaContextDependency = require("./ImportMetaContextDependency");
const ImportMetaContextDependencyParserPlugin = require("./ImportMetaContextDependencyParserPlugin");
/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("../javascript/JavascriptParser")} Parser */
const PLUGIN_NAME = "ImportMetaContextPlugin";
class ImportMetaContextPlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { contextModuleFactory, normalModuleFactory }) => {
compilation.dependencyFactories.set(
ImportMetaContextDependency,
contextModuleFactory
);
compilation.dependencyTemplates.set(
ImportMetaContextDependency,
new ImportMetaContextDependency.Template()
);
compilation.dependencyFactories.set(
ContextElementDependency,
normalModuleFactory
);
/**
* @param {Parser} parser parser parser
* @param {JavascriptParserOptions} parserOptions parserOptions
* @returns {void}
*/
const handler = (parser, parserOptions) => {
if (
parserOptions.importMetaContext !== undefined &&
!parserOptions.importMetaContext
) {
return;
}
new ImportMetaContextDependencyParserPlugin().apply(parser);
};
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_AUTO)
.tap(PLUGIN_NAME, handler);
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_ESM)
.tap(PLUGIN_NAME, handler);
}
);
}
}
module.exports = ImportMetaContextPlugin;

View File

@@ -0,0 +1 @@
{"version":3,"file":"setupEventContextTrace.d.ts","sourceRoot":"","sources":["../../src/setupEventContextTrace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,uDAAuD;AACvD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAwB3D"}

View File

@@ -0,0 +1,67 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { DEFAULTS } = require("./config/defaults");
const createHash = require("./util/createHash");
/** @typedef {import("./Compilation").DependencyConstructor} DependencyConstructor */
/** @typedef {import("./DependencyTemplate")} DependencyTemplate */
/** @typedef {import("./util/Hash").HashFunction} HashFunction */
class DependencyTemplates {
/**
* @param {HashFunction} hashFunction the hash function to use
*/
constructor(hashFunction = DEFAULTS.HASH_FUNCTION) {
/** @type {Map<DependencyConstructor, DependencyTemplate>} */
this._map = new Map();
/** @type {string} */
this._hash = "31d6cfe0d16ae931b73c59d7e0c089c0";
/** @type {HashFunction} */
this._hashFunction = hashFunction;
}
/**
* @param {DependencyConstructor} dependency Constructor of Dependency
* @returns {DependencyTemplate | undefined} template for this dependency
*/
get(dependency) {
return this._map.get(dependency);
}
/**
* @param {DependencyConstructor} dependency Constructor of Dependency
* @param {DependencyTemplate} dependencyTemplate template for this dependency
* @returns {void}
*/
set(dependency, dependencyTemplate) {
this._map.set(dependency, dependencyTemplate);
}
/**
* @param {string} part additional hash contributor
* @returns {void}
*/
updateHash(part) {
const hash = createHash(this._hashFunction);
hash.update(`${this._hash}${part}`);
this._hash = hash.digest("hex");
}
getHash() {
return this._hash;
}
clone() {
const newInstance = new DependencyTemplates(this._hashFunction);
newInstance._map = new Map(this._map);
newInstance._hash = this._hash;
return newInstance;
}
}
module.exports = DependencyTemplates;

View File

@@ -0,0 +1,28 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import type { AnyPgTable } from "../table.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgJsonBuilderInitial<TName extends string> = PgJsonBuilder<{
name: TName;
dataType: 'json';
columnType: 'PgJson';
data: unknown;
driverParam: unknown;
enumValues: undefined;
}>;
export declare class PgJsonBuilder<T extends ColumnBuilderBaseConfig<'json', 'PgJson'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class PgJson<T extends ColumnBaseConfig<'json', 'PgJson'>> extends PgColumn<T> {
static readonly [entityKind]: string;
constructor(table: AnyPgTable<{
name: T['tableName'];
}>, config: PgJsonBuilder<T>['config']);
getSQLType(): string;
mapToDriverValue(value: T['data']): string;
mapFromDriverValue(value: T['data'] | string): T['data'];
}
export declare function json(): PgJsonBuilderInitial<''>;
export declare function json<TName extends string>(name: TName): PgJsonBuilderInitial<TName>;

View File

@@ -0,0 +1,8 @@
import React from 'react';
import type { ContextType } from './types.js';
export declare const useStepNav: () => ContextType;
export declare const Context: React.Context<ContextType>;
export declare const StepNavProvider: React.FC<{
children?: React.ReactNode;
}>;
//# sourceMappingURL=context.d.ts.map

View File

@@ -0,0 +1,19 @@
/**
* @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 CalendarCheck2 = createLucideIcon("CalendarCheck2", [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["path", { d: "M21 14V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8", key: "bce9hv" }],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "m16 20 2 2 4-4", key: "13tcca" }]
]);
export { CalendarCheck2 as default };
//# sourceMappingURL=calendar-check-2.js.map

View File

@@ -0,0 +1,40 @@
import type { KeyLike } from '../types';
export interface GenerateKeyPairResult<KeyLikeType extends KeyLike = KeyLike> {
/** The generated Private Key. */
privateKey: KeyLikeType;
/** Public Key corresponding to the generated Private Key. */
publicKey: KeyLikeType;
}
export interface GenerateKeyPairOptions {
/**
* The EC "crv" (Curve) or OKP "crv" (Subtype of Key Pair) value to generate. The curve must be
* both supported on the runtime as well as applicable for the given JWA algorithm identifier.
*/
crv?: string;
/**
* A hint for RSA algorithms to generate an RSA key of a given `modulusLength` (Key size in bits).
* JOSE requires 2048 bits or larger. Default is 2048.
*/
modulusLength?: number;
/**
* (Only effective in Web Crypto API runtimes) The value to use as
* {@link !SubtleCrypto.generateKey} `extractable` argument. Default is false.
*
*/
extractable?: boolean;
}
/**
* Generates a private and a public key for a given JWA algorithm identifier. This can only generate
* asymmetric key pairs. For symmetric secrets use the `generateSecret` function.
*
* Note: Under Web Crypto API runtime the `privateKey` is generated with `extractable` set to
* `false` by default. See {@link GenerateKeyPairOptions.extractable} to generate an extractable
* `privateKey`.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/generate/keypair'`.
*
* @param alg JWA Algorithm Identifier to be used with the generated key pair.
* @param options Additional options passed down to the key pair generation.
*/
export declare function generateKeyPair<KeyLikeType extends KeyLike = KeyLike>(alg: string, options?: GenerateKeyPairOptions): Promise<GenerateKeyPairResult<KeyLikeType>>;

View File

@@ -0,0 +1,53 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var duration_exports = {};
__export(duration_exports, {
GelDuration: () => GelDuration,
GelDurationBuilder: () => GelDurationBuilder,
duration: () => duration
});
module.exports = __toCommonJS(duration_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class GelDurationBuilder extends import_common.GelColumnBuilder {
static [import_entity.entityKind] = "GelDurationBuilder";
constructor(name) {
super(name, "duration", "GelDuration");
}
/** @internal */
build(table) {
return new GelDuration(table, this.config);
}
}
class GelDuration extends import_common.GelColumn {
static [import_entity.entityKind] = "GelDuration";
getSQLType() {
return `duration`;
}
}
function duration(name) {
return new GelDurationBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GelDuration,
GelDurationBuilder,
duration
});
//# sourceMappingURL=duration.cjs.map

View File

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

View File

@@ -0,0 +1,21 @@
import { DirectusUser } from "./user.js";
import { DirectusCollection } from "./collection.js";
import { MergeCoreCollection } from "../types/schema.js";
//#region src/schema/version.d.ts
type DirectusVersion<Schema = any> = MergeCoreCollection<Schema, 'directus_versions', {
id: string;
key: string;
name: string | null;
collection: DirectusCollection<Schema> | string;
item: string;
hash: string;
date_created: 'datetime' | null;
date_updated: 'datetime' | null;
user_created: DirectusUser<Schema> | string | null;
user_updated: DirectusUser<Schema> | string | null;
delta: Record<string, any> | null;
}>;
//#endregion
export { DirectusVersion };
//# sourceMappingURL=version.d.ts.map

View File

@@ -0,0 +1,42 @@
'use strict'
const { test } = require('node:test')
const { createWarning } = require('..')
const { withResolvers } = require('./promise')
test('emit should emit a given code unlimited times', t => {
t.plan(50)
let runs = 0
const expectedRun = []
const times = 10
const { promise, resolve } = withResolvers()
process.on('warning', onWarning)
function onWarning (warning) {
t.assert.deepStrictEqual(warning.name, 'TestDeprecation')
t.assert.deepStrictEqual(warning.code, 'CODE')
t.assert.deepStrictEqual(warning.message, 'Hello world')
t.assert.ok(warn.emitted)
t.assert.deepStrictEqual(runs++, expectedRun.shift())
}
const warn = createWarning({
name: 'TestDeprecation',
code: 'CODE',
message: 'Hello world',
unlimited: true
})
for (let i = 0; i < times; i++) {
expectedRun.push(i)
warn()
}
setImmediate(() => {
process.removeListener('warning', onWarning)
resolve()
})
return promise
})

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.bundle.tracing.replay.logs.metrics.d.ts","sourceRoot":"","sources":["../../../src/index.bundle.tracing.replay.logs.metrics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAI7E,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EACL,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,eAAe,EACf,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAAE,uBAAuB,IAAI,wBAAwB,EAAE,uBAAuB,IAAI,mBAAmB,EAAE,CAAC;AAE/G,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC"}

View File

@@ -0,0 +1,27 @@
/**
* @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 Dam = createLucideIcon("Dam", [
[
"path",
{ d: "M11 11.31c1.17.56 1.54 1.69 3.5 1.69 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1", key: "157kva" }
],
["path", { d: "M11.75 18c.35.5 1.45 1 2.75 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1", key: "d7q6m6" }],
["path", { d: "M2 10h4", key: "l0bgd4" }],
["path", { d: "M2 14h4", key: "1gsvsf" }],
["path", { d: "M2 18h4", key: "1bu2t1" }],
["path", { d: "M2 6h4", key: "aawbzj" }],
[
"path",
{ d: "M7 3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1L10 4a1 1 0 0 0-1-1z", key: "pr6s65" }
]
]);
export { Dam as default };
//# sourceMappingURL=dam.js.map

View File

@@ -0,0 +1,108 @@
import { safeDateNow } from './randomSafeContext.js';
// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend
const DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds
/**
* Extracts Retry-After value from the request header or returns default value
* @param header string representation of 'Retry-After' header
* @param now current unix timestamp
*
*/
function parseRetryAfterHeader(header, now = safeDateNow()) {
const headerDelay = parseInt(`${header}`, 10);
if (!isNaN(headerDelay)) {
return headerDelay * 1000;
}
const headerDate = Date.parse(`${header}`);
if (!isNaN(headerDate)) {
return headerDate - now;
}
return DEFAULT_RETRY_AFTER;
}
/**
* Gets the time that the given category is disabled until for rate limiting.
* In case no category-specific limit is set but a general rate limit across all categories is active,
* that time is returned.
*
* @return the time in ms that the category is disabled until or 0 if there's no active rate limit.
*/
function disabledUntil(limits, dataCategory) {
return limits[dataCategory] || limits.all || 0;
}
/**
* Checks if a category is rate limited
*/
function isRateLimited(limits, dataCategory, now = safeDateNow()) {
return disabledUntil(limits, dataCategory) > now;
}
/**
* Update ratelimits from incoming headers.
*
* @return the updated RateLimits object.
*/
function updateRateLimits(
limits,
{ statusCode, headers },
now = safeDateNow(),
) {
const updatedRateLimits = {
...limits,
};
// "The name is case-insensitive."
// https://developer.mozilla.org/en-US/docs/Web/API/Headers/get
const rateLimitHeader = headers?.['x-sentry-rate-limits'];
const retryAfterHeader = headers?.['retry-after'];
if (rateLimitHeader) {
/**
* rate limit headers are of the form
* <header>,<header>,..
* where each <header> is of the form
* <retry_after>: <categories>: <scope>: <reason_code>: <namespaces>
* where
* <retry_after> is a delay in seconds
* <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form
* <category>;<category>;...
* <scope> is what's being limited (org, project, or key) - ignored by SDK
* <reason_code> is an arbitrary string like "org_quota" - ignored by SDK
* <namespaces> Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.
* Only present if rate limit applies to the metric_bucket data category.
*/
for (const limit of rateLimitHeader.trim().split(',')) {
const [retryAfter, categories, , , namespaces] = limit.split(':', 5) ;
const headerDelay = parseInt(retryAfter, 10);
const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default
if (!categories) {
updatedRateLimits.all = now + delay;
} else {
for (const category of categories.split(';')) {
if (category === 'metric_bucket') {
// namespaces will be present when category === 'metric_bucket'
if (!namespaces || namespaces.split(';').includes('custom')) {
updatedRateLimits[category] = now + delay;
}
} else {
updatedRateLimits[category] = now + delay;
}
}
}
}
} else if (retryAfterHeader) {
updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);
} else if (statusCode === 429) {
updatedRateLimits.all = now + 60 * 1000;
}
return updatedRateLimits;
}
export { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };
//# sourceMappingURL=ratelimit.js.map

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