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,6 @@
import { ColumnOptionsRaw } from '../models/external-table';
import { Column } from '../models/internal-table';
export declare const objIfExists: (key: string, val: any) => {
[x: string]: any;
};
export declare const rawColumnToInternalColumn: (column: ColumnOptionsRaw) => Column;

View File

@@ -0,0 +1,66 @@
css-line-break
==============
![CI](https://github.com/niklasvh/css-line-break/workflows/CI/badge.svg?branch=master)
[![NPM Downloads](https://img.shields.io/npm/dm/css-line-break.svg)](https://www.npmjs.org/package/css-line-break)
[![NPM Version](https://img.shields.io/npm/v/css-line-break.svg)](https://www.npmjs.org/package/css-line-break)
A JavaScript library for Line Breaking and identifying Word Boundaries,
[implementing the Unicode Line Breaking Algorithm (UAX #14)](http://unicode.org/reports/tr14/)
>> Line breaking, also known as word wrapping, is the process of breaking a section of text into
lines such that it will fit in the available width of a page, window or other display area.
The Unicode Line Breaking Algorithm performs part of this process. Given an input text,
it produces a set of positions called "break opportunities" that are appropriate points to
begin a new line. The selection of actual line break positions from the set of break opportunities
is not covered by the Unicode Line Breaking Algorithm, but is in the domain of higher level
software with knowledge of the available width and the display size of the text.
In addition, the module implements CSS specific tailoring options to line breaking as
defined in [CSS Text Module Level 3](https://www.w3.org/TR/css-text-3/#line-breaking).
### Installing
You can install the module via npm:
npm install css-line-break
### Usage
The `LineBreaker` creates an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators) that returns `Break`s for a given text.
LineBreaker(text, [options]);
### Example
[JSFiddle](https://jsfiddle.net/ofd3752k)
```javascript
import {LineBreaker} from 'css-line-break';
const breaker = LineBreaker('Lorem ipsum lol.', {
lineBreak: 'strict',
wordBreak: 'normal'
});
const words = [];
let bk;
while (!(bk = breaker.next()).done) {
words.push(bk.value.slice());
}
assert.deepEqual(words, ['Lorem ', 'ipsum ', 'lol.']);
```
### Options
The following parameters are available for the options:
- `lineBreak`: `normal` | `strict`
- `wordBreak`: `normal` | `break-all` | `break-word` | `keep-all`
For more information how they affect the line breaking algorithms,
check out [CSS Text Module Level 3](https://www.w3.org/TR/css-text-3/#line-breaking).
### Testing
You can run the test suite with:
npm test
The library implements all the [LineBreakTest.txt tests](http://www.unicode.org/Public/10.0.0/ucd/auxiliary/LineBreakTest.txt)
and a number of CSS web-platform-tests.

View File

@@ -0,0 +1 @@
!function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,o=e.languages["markup-templating"];e.hooks.add("before-tokenize",(function(e){o.buildPlaceholders(e,"django",n)})),e.hooks.add("after-tokenize",(function(e){o.tokenizePlaceholders(e,"django")})),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",(function(e){o.buildPlaceholders(e,"jinja2",n)})),e.hooks.add("after-tokenize",(function(e){o.tokenizePlaceholders(e,"jinja2")}))}(Prism);

View File

@@ -0,0 +1,37 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 200
[*.js]
block_comment_start = /*
block_comment = *
block_comment_end = */
[*.yml]
indent_size = 1
[package.json]
indent_style = tab
[lib/core.json]
indent_style = tab
[CHANGELOG.md]
indent_style = space
indent_size = 2
[{*.json,Makefile}]
max_line_length = off
[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*]
indent_style = off
indent_size = off
max_line_length = off
insert_final_newline = off

View File

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

View File

@@ -0,0 +1,45 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const nodeVersion = require('../nodeVersion.js');
/** Detect CommonJS. */
function isCjs() {
try {
return typeof module !== 'undefined' && typeof module.exports !== 'undefined';
} catch {
return false;
}
}
let hasWarnedAboutNodeVersion;
/**
* Check if the current Node.js version supports module.register
*/
function supportsEsmLoaderHooks() {
if (isCjs()) {
return false;
}
if (nodeVersion.NODE_MAJOR >= 21 || (nodeVersion.NODE_MAJOR === 20 && nodeVersion.NODE_MINOR >= 6) || (nodeVersion.NODE_MAJOR === 18 && nodeVersion.NODE_MINOR >= 19)) {
return true;
}
if (!hasWarnedAboutNodeVersion) {
hasWarnedAboutNodeVersion = true;
core.consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn(
`[Sentry] You are using Node.js v${process.versions.node} in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.`,
);
});
}
return false;
}
exports.isCjs = isCjs;
exports.supportsEsmLoaderHooks = supportsEsmLoaderHooks;
//# sourceMappingURL=detection.js.map

View File

@@ -0,0 +1,20 @@
import { DataloaderInstrumentation } from '@opentelemetry/instrumentation-dataloader';
export declare const instrumentDataloader: ((options?: unknown) => DataloaderInstrumentation) & {
id: string;
};
/**
* Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library.
*
* For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.dataloaderIntegration()],
* });
* ```
*/
export declare const dataloaderIntegration: () => import("@sentry/core").Integration;
//# sourceMappingURL=dataloader.d.ts.map

View File

@@ -0,0 +1,3 @@
const legacy = require('../dist/legacy-exports')
module.exports = legacy.set
legacy.warnFileDeprecation(__filename)

View File

@@ -0,0 +1,10 @@
import type { PayloadRequest } from '../types/index.js';
import type { File, FileData, UploadConfig } from './types.js';
type Args = {
data: FileData;
req: PayloadRequest;
uploadConfig: UploadConfig;
};
export declare const getExternalFile: ({ data, req, uploadConfig }: Args) => Promise<File>;
export {};
//# sourceMappingURL=getExternalFile.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","LockIcon","className","_jsxs","filter","Boolean","join","fill","height","viewBox","width","xmlns","_jsx","d","strokeLinecap","strokeLinejoin","strokeOpacity","stopOpacity"],"sources":["../../../src/icons/Lock/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nexport const LockIcon: React.FC<{ className?: string }> = ({ className }) => (\n <svg\n className={['icon icon--lock', className].filter(Boolean).join(' ')}\n fill=\"none\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n className=\"stroke\"\n d=\"M7.5 9.5V7.5C7.5 6.83696 7.76339 6.20107 8.23223 5.73223C8.70107 5.26339 9.33696 5 10 5C10.663 5 11.2989 5.26339 11.7678 5.73223C12.2366 6.20107 12.5 6.83696 12.5 7.5V9.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeOpacity=\"1\"\n />\n <path\n className=\"stroke\"\n d=\"M13.5 9.5H6.5C5.94772 9.5 5.5 9.94772 5.5 10.5V14C5.5 14.5523 5.94772 15 6.5 15H13.5C14.0523 15 14.5 14.5523 14.5 14V10.5C14.5 9.94772 14.0523 9.5 13.5 9.5Z\"\n stopOpacity=\"1\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n)\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAElB,OAAO;AAEP,OAAO,MAAMC,QAAA,GAA6CA,CAAC;EAAEC;AAAS,CAAE,kBACtEC,KAAA,CAAC;EACCD,SAAA,EAAW,CAAC,mBAAmBA,SAAA,CAAU,CAACE,MAAM,CAACC,OAAA,EAASC,IAAI,CAAC;EAC/DC,IAAA,EAAK;EACLC,MAAA,EAAO;EACPC,OAAA,EAAQ;EACRC,KAAA,EAAM;EACNC,KAAA,EAAM;0BAENC,IAAA,CAAC;IACCV,SAAA,EAAU;IACVW,CAAA,EAAE;IACFC,aAAA,EAAc;IACdC,cAAA,EAAe;IACfC,aAAA,EAAc;mBAEhBJ,IAAA,CAAC;IACCV,SAAA,EAAU;IACVW,CAAA,EAAE;IACFI,WAAA,EAAY;IACZH,aAAA,EAAc;IACdC,cAAA,EAAe","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"extract-data.js","names":[],"sources":["../../src/utils/extract-data.ts"],"sourcesContent":["import { isFetchResponse } from './is-response.js';\n\n/**\n * Tries to extract a fetch response\n */\nexport async function extractData(response: unknown) {\n\tif (typeof response !== 'object' || !response) return;\n\n\tif (isFetchResponse(response)) {\n\t\tconst type = response.headers.get('Content-Type')?.toLowerCase();\n\n\t\tif (type?.startsWith('application/json') || type?.startsWith('application/health+json')) {\n\t\t\tconst result = await response.json();\n\n\t\t\tif (!response.ok || 'errors' in result) throw result;\n\n\t\t\tif ('data' in result) return result.data;\n\n\t\t\treturn result;\n\t\t}\n\n\t\tif (type?.startsWith('text/html') || type?.startsWith('text/plain')) {\n\t\t\tconst result = await response.text();\n\t\t\tif (!response.ok) throw result;\n\t\t\treturn result;\n\t\t}\n\n\t\tif (response.status === 204) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// fallback for anything else\n\t\treturn response;\n\t}\n\n\t// exception for alternatives like ofetch that don't return the Response object\n\n\tif ('errors' in response) throw response;\n\n\tif ('data' in response) return response.data;\n\n\treturn response;\n}\n"],"mappings":"mDAKA,eAAsB,EAAY,EAAmB,CAChD,YAAO,GAAa,UAAY,CAAC,GAErC,IAAI,EAAgB,EAAS,CAAE,CAC9B,IAAM,EAAO,EAAS,QAAQ,IAAI,eAAe,EAAE,aAAa,CAEhE,GAAI,GAAM,WAAW,mBAAmB,EAAI,GAAM,WAAW,0BAA0B,CAAE,CACxF,IAAM,EAAS,MAAM,EAAS,MAAM,CAEpC,GAAI,CAAC,EAAS,IAAM,WAAY,EAAQ,MAAM,EAI9C,MAFI,SAAU,EAAe,EAAO,KAE7B,EAGR,GAAI,GAAM,WAAW,YAAY,EAAI,GAAM,WAAW,aAAa,CAAE,CACpE,IAAM,EAAS,MAAM,EAAS,MAAM,CACpC,GAAI,CAAC,EAAS,GAAI,MAAM,EACxB,OAAO,EAQR,OALI,EAAS,SAAW,IAChB,KAID,EAKR,GAAI,WAAY,EAAU,MAAM,EAIhC,MAFI,SAAU,EAAiB,EAAS,KAEjC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"wallet.js","sources":["../../../src/icons/wallet.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Wallet\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTkgN1Y0YTEgMSAwIDAgMC0xLTFINWEyIDIgMCAwIDAgMCA0aDE1YTEgMSAwIDAgMSAxIDF2NGgtM2EyIDIgMCAwIDAgMCA0aDNhMSAxIDAgMCAwIDEtMXYtMmExIDEgMCAwIDAtMS0xIiAvPgogIDxwYXRoIGQ9Ik0zIDV2MTRhMiAyIDAgMCAwIDIgMmgxNWExIDEgMCAwIDAgMS0xdi00IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/wallet\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 Wallet = createLucideIcon('Wallet', [\n [\n 'path',\n {\n d: 'M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1',\n key: '18etb6',\n },\n ],\n ['path', { d: 'M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4', key: 'xoc0q4' }],\n]);\n\nexport default Wallet;\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,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,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,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC5E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/updateGlobalVersion.ts"],"sourcesContent":["import type {\n JsonObject,\n SanitizedGlobalConfig,\n TypeWithVersion,\n UpdateGlobalVersionArgs,\n} from 'payload'\n\nimport { buildVersionGlobalFields } from 'payload'\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter } from './types.js'\n\nimport { buildQuery } from './queries/buildQuery.js'\nimport { upsertRow } from './upsertRow/index.js'\nimport { getTransaction } from './utilities/getTransaction.js'\n\nexport async function updateGlobalVersion<T extends JsonObject = JsonObject>(\n this: DrizzleAdapter,\n {\n id,\n global,\n locale,\n req,\n returning,\n select,\n versionData,\n where: whereArg,\n }: UpdateGlobalVersionArgs<T>,\n): Promise<TypeWithVersion<T>> {\n const globalConfig: SanitizedGlobalConfig = this.payload.globals.config.find(\n ({ slug }) => slug === global,\n )\n const whereToUse = whereArg || { id: { equals: id } }\n\n const tableName = this.tableNameMap.get(\n `_${toSnakeCase(globalConfig.slug)}${this.versionsSuffix}`,\n )\n\n const fields = buildVersionGlobalFields(this.payload.config, globalConfig, true)\n\n const { where } = buildQuery({\n adapter: this,\n fields,\n locale,\n tableName,\n where: whereToUse,\n })\n\n const db = await getTransaction(this, req)\n\n const result = await upsertRow<TypeWithVersion<T>>({\n id,\n adapter: this,\n data: versionData,\n db,\n fields,\n globalSlug: global,\n ignoreResult: returning === false,\n operation: 'update',\n req,\n select,\n tableName,\n where,\n })\n\n if (returning === false) {\n return null\n }\n\n return result\n}\n"],"names":["buildVersionGlobalFields","toSnakeCase","buildQuery","upsertRow","getTransaction","updateGlobalVersion","id","global","locale","req","returning","select","versionData","where","whereArg","globalConfig","payload","globals","config","find","slug","whereToUse","equals","tableName","tableNameMap","get","versionsSuffix","fields","adapter","db","result","data","globalSlug","ignoreResult","operation"],"mappings":"AAOA,SAASA,wBAAwB,QAAQ,UAAS;AAClD,OAAOC,iBAAiB,gBAAe;AAIvC,SAASC,UAAU,QAAQ,0BAAyB;AACpD,SAASC,SAAS,QAAQ,uBAAsB;AAChD,SAASC,cAAc,QAAQ,gCAA+B;AAE9D,OAAO,eAAeC,oBAEpB,EACEC,EAAE,EACFC,MAAM,EACNC,MAAM,EACNC,GAAG,EACHC,SAAS,EACTC,MAAM,EACNC,WAAW,EACXC,OAAOC,QAAQ,EACY;IAE7B,MAAMC,eAAsC,IAAI,CAACC,OAAO,CAACC,OAAO,CAACC,MAAM,CAACC,IAAI,CAC1E,CAAC,EAAEC,IAAI,EAAE,GAAKA,SAASb;IAEzB,MAAMc,aAAaP,YAAY;QAAER,IAAI;YAAEgB,QAAQhB;QAAG;IAAE;IAEpD,MAAMiB,YAAY,IAAI,CAACC,YAAY,CAACC,GAAG,CACrC,CAAC,CAAC,EAAExB,YAAYc,aAAaK,IAAI,IAAI,IAAI,CAACM,cAAc,EAAE;IAG5D,MAAMC,SAAS3B,yBAAyB,IAAI,CAACgB,OAAO,CAACE,MAAM,EAAEH,cAAc;IAE3E,MAAM,EAAEF,KAAK,EAAE,GAAGX,WAAW;QAC3B0B,SAAS,IAAI;QACbD;QACAnB;QACAe;QACAV,OAAOQ;IACT;IAEA,MAAMQ,KAAK,MAAMzB,eAAe,IAAI,EAAEK;IAEtC,MAAMqB,SAAS,MAAM3B,UAA8B;QACjDG;QACAsB,SAAS,IAAI;QACbG,MAAMnB;QACNiB;QACAF;QACAK,YAAYzB;QACZ0B,cAAcvB,cAAc;QAC5BwB,WAAW;QACXzB;QACAE;QACAY;QACAV;IACF;IAEA,IAAIH,cAAc,OAAO;QACvB,OAAO;IACT;IAEA,OAAOoB;AACT"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"pill-bottle.js","sources":["../../../src/icons/pill-bottle.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PillBottle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggMTFoLTRhMSAxIDAgMCAwLTEgMXY1YTEgMSAwIDAgMCAxIDFoNCIgLz4KICA8cGF0aCBkPSJNNiA3djEzYTIgMiAwIDAgMCAyIDJoOGEyIDIgMCAwIDAgMi0yVjciIC8+CiAgPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjUiIHg9IjQiIHk9IjIiIHJ4PSIxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/pill-bottle\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 PillBottle = createLucideIcon('PillBottle', [\n ['path', { d: 'M18 11h-4a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h4', key: '17ldeb' }],\n ['path', { d: 'M6 7v13a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7', key: 'nc37y6' }],\n ['rect', { width: '16', height: '5', x: '4', y: '2', rx: '1', key: '3jeezo' }],\n]);\n\nexport default PillBottle;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxE,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,CAAK,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;AAC/E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/withMergedProps/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,mBAAmB,EAAE,EACrE,SAAS,EACT,uBAAuB,EACvB,gBAAgB,GACjB,EAAE;IACD,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAA;IACxC,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,gBAAgB,EAAE,gBAAgB,CAAA;CACnC,GAAG,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAkBhC"}

View File

@@ -0,0 +1,41 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { useDroppable } from '@dnd-kit/core';
import React from 'react';
import './index.scss';
const baseClass = 'toolbar-area';
export const ToolbarArea = props => {
const $ = _c(4);
const {
children
} = props;
let t0;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t0 = {
id: "live-preview-area"
};
$[0] = t0;
} else {
t0 = $[0];
}
const {
setNodeRef
} = useDroppable(t0);
let t1;
if ($[1] !== children || $[2] !== setNodeRef) {
t1 = _jsx("div", {
className: baseClass,
ref: setNodeRef,
children
});
$[1] = children;
$[2] = setNodeRef;
$[3] = t1;
} else {
t1 = $[3];
}
return t1;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,6 @@
export declare const lastDayOfISOWeekWithOptions: import("./types.js").FPFn2<
Date,
| import("../lastDayOfISOWeek.js").LastDayOfISOWeekOptions<Date>
| undefined,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "بىر سىكۇنت ئىچىدە",
other: "سىكۇنت ئىچىدە {{count}}",
},
xSeconds: {
one: "بىر سىكۇنت",
other: "سىكۇنت {{count}}",
},
halfAMinute: "يىرىم مىنۇت",
lessThanXMinutes: {
one: "بىر مىنۇت ئىچىدە",
other: "مىنۇت ئىچىدە {{count}}",
},
xMinutes: {
one: "بىر مىنۇت",
other: "مىنۇت {{count}}",
},
aboutXHours: {
one: "تەخمىنەن بىر سائەت",
other: "سائەت {{count}} تەخمىنەن",
},
xHours: {
one: "بىر سائەت",
other: "سائەت {{count}}",
},
xDays: {
one: "بىر كۈن",
other: "كۈن {{count}}",
},
aboutXWeeks: {
one: "تەخمىنەن بىرھەپتە",
other: "ھەپتە {{count}} تەخمىنەن",
},
xWeeks: {
one: "بىرھەپتە",
other: "ھەپتە {{count}}",
},
aboutXMonths: {
one: "تەخمىنەن بىر ئاي",
other: "ئاي {{count}} تەخمىنەن",
},
xMonths: {
one: "بىر ئاي",
other: "ئاي {{count}}",
},
aboutXYears: {
one: "تەخمىنەن بىر يىل",
other: "يىل {{count}} تەخمىنەن",
},
xYears: {
one: "بىر يىل",
other: "يىل {{count}}",
},
overXYears: {
one: "بىر يىلدىن ئارتۇق",
other: "يىلدىن ئارتۇق {{count}}",
},
almostXYears: {
one: "ئاساسەن بىر يىل",
other: "يىل {{count}} ئاساسەن",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result;
} else {
return result + " بولدى";
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1 @@
{"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../src/ModalProvider/reducer.ts"],"names":[],"mappings":"AAqDA,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,KAAiB,EACjB,MAAc,EACF,EAAE;IACd,IAAI,QAAQ,qBAAQ,KAAK,CAAE,CAAC;IAE5B,MAAM,EACJ,IAAI,EACJ,OAAO,GACR,GAAG,MAAM,CAAC;IAEX,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,cAAc,CAAC,CAAC,CAAC;YACpB,MAAM,EACJ,IAAI,GACL,GAAG,OAAO,CAAC;YAEZ,IAAI,IAAI,EAAE,CAAC;gBACT,QAAQ,CAAC,IAAI,CAAC,mCACT,QAAQ,CAAC,IAAI,CAAC,GACd,OAAO,CACX,CAAC;YACJ,CAAC;YAED,MAAM;QACR,CAAC;QAED,KAAK,YAAY,CAAC,CAAC,CAAC;YAClB,MAAM,EACJ,IAAI,GACL,GAAG,OAAO,CAAC;YAEZ,IAAI,IAAI,EAAE,CAAC;gBACT,MAAM,eAAe,GAAG,IAAI,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;gBAElE,IAAI,CAAC,eAAe,EAAE,CAAC;oBACrB,QAAQ,CAAC,IAAI,CAAC,mCACT,QAAQ,CAAC,IAAI,CAAC,KACjB,IAAI,EACJ,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,EACpB,MAAM,EAAE,IAAI,GACb,CAAC;gBACJ,CAAC;YACH,CAAC;YAED,MAAM;QACR,CAAC;QAED,KAAK,cAAc,CAAC,CAAC,CAAC;YACpB,MAAM,EACJ,IAAI,GACL,GAAG,OAAO,CAAC;YAEZ,IAAI,IAAI,EAAE,CAAC;gBACT,MAAM,eAAe,GAAG,IAAI,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;gBAElE,QAAQ,CAAC,IAAI,CAAC,mCACT,QAAQ,CAAC,IAAI,CAAC,KACjB,IAAI,EACJ,QAAQ,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,EACnD,MAAM,EAAE,CAAC,eAAe,GACzB,CAAC;YACJ,CAAC;YAED,MAAM;QACR,CAAC;QAED,KAAK,aAAa,CAAC,CAAC,CAAC;YACnB,MAAM,EACJ,IAAI,GACL,GAAG,OAAO,CAAC;YAEZ,IAAI,IAAI,EAAE,CAAC;gBACT,QAAQ,CAAC,IAAI,CAAC,mCACT,QAAQ,CAAC,IAAI,CAAC,KACjB,IAAI,EACJ,QAAQ,EAAE,SAAS,EACnB,MAAM,EAAE,KAAK,GACd,CAAC;YACJ,CAAC;YAED,MAAM;QACR,CAAC;QAED,KAAK,cAAc,CAAC,CAAC,CAAC;YACpB,MAAM,EACJ,IAAI,GACL,GAAG,OAAO,CAAC;YAEZ,IAAI,IAAI,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;gBAC7B,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;YAED,MAAM;QACR,CAAC;QAED,KAAK,oBAAoB,CAAC,CAAC,CAAC;YAC1B,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;iBACtC,MAAM,CAAC,CAAC,GAA4B,EAAE,IAAY,EAAE,EAAE;gBACrD,MAAM,KAAK,GAAgB,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAE1C,IAAI,KAAK,CAAC,MAAM,IAAI,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;oBACxI,OAAO,KAAK,CAAC;gBACf,CAAC;gBAED,OAAO,GAAG,CAAC;YACb,CAAC,EAAE,SAAS,CAAC,CAAC;YAEhB,IAAI,WAAW,EAAE,CAAC;gBAChB,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,mCACrB,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,KAC7B,MAAM,EAAE,KAAK,EACb,QAAQ,EAAE,SAAS,GACpB,CAAA;YACH,CAAC;YAED,MAAM;QACR,CAAC;QAED,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;gBACjE,GAAG,CAAC,GAAG,CAAC,mCACH,KAAK,KACR,MAAM,EAAE,KAAK,EACb,QAAQ,EAAE,SAAS,GACpB,CAAC;gBAEF,OAAO,GAAG,CAAC;YACb,CAAC,EAAE,EAAgB,CAAC,CAAC;YAErB,MAAM;QACR,CAAC;QAED,OAAO,CAAC,CAAC,CAAC;YACR,MAAM;QACR,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}

View File

@@ -0,0 +1,10 @@
import { cache } from 'react';
import getConfig from './getConfig.js';
async function getLocaleCachedImpl() {
const config = await getConfig();
return config.locale;
}
const getLocaleCached = cache(getLocaleCachedImpl);
export { getLocaleCached as default };

View File

@@ -0,0 +1,5 @@
import type { createTranslator } from 'use-intl/core';
import type { _useExtracted as useExtractedType } from 'use-intl/react';
declare function getServerExtractorImpl(config: Parameters<typeof createTranslator>[0], namespace?: string): ReturnType<typeof useExtractedType>;
declare const _default: typeof getServerExtractorImpl;
export default _default;

View File

@@ -0,0 +1,32 @@
import { startOfDay } from "./startOfDay.js";
/**
* The {@link startOfToday} function options.
*/
/**
* @name startOfToday
* @category Day Helpers
* @summary Return the start of today.
* @pure false
*
* @description
* Return the start of today.
*
* @typeParam ContextDate - The `Date` type of the context function.
*
* @param options - An object with options
*
* @returns The start of today
*
* @example
* // If today is 6 October 2014:
* const result = startOfToday()
* //=> Mon Oct 6 2014 00:00:00
*/
export function startOfToday(options) {
return startOfDay(Date.now(), options);
}
// Fallback for modularized imports:
export default startOfToday;

View File

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

View File

@@ -0,0 +1,15 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChevronRight = createLucideIcon("ChevronRight", [
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
]);
export { ChevronRight as default };
//# sourceMappingURL=chevron-right.js.map

View File

@@ -0,0 +1,3 @@
declare function parse(header: string): Record<string, string>[];
export = parse;

View File

@@ -0,0 +1,127 @@
# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path)
> Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save normalize-path
```
## Usage
```js
const normalize = require('normalize-path');
console.log(normalize('\\foo\\bar\\baz\\'));
//=> '/foo/bar/baz'
```
**win32 namespaces**
```js
console.log(normalize('\\\\?\\UNC\\Server01\\user\\docs\\Letter.txt'));
//=> '//?/UNC/Server01/user/docs/Letter.txt'
console.log(normalize('\\\\.\\CdRomX'));
//=> '//./CdRomX'
```
**Consecutive slashes**
Condenses multiple consecutive forward slashes (except for leading slashes in win32 namespaces) to a single slash.
```js
console.log(normalize('.//foo//bar///////baz/'));
//=> './foo/bar/baz'
```
### Trailing slashes
By default trailing slashes are removed. Pass `false` as the last argument to disable this behavior and _**keep** trailing slashes_:
```js
console.log(normalize('foo\\bar\\baz\\', false)); //=> 'foo/bar/baz/'
console.log(normalize('./foo/bar/baz/', false)); //=> './foo/bar/baz/'
```
## Release history
### v3.0
No breaking changes in this release.
* a check was added to ensure that [win32 namespaces](https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces) are handled properly by win32 `path.parse()` after a path has been normalized by this library.
* a minor optimization was made to simplify how the trailing separator was handled
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Related projects
Other useful path-related libraries:
* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.")
* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.")
* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.")
* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.")
* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.")
* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 35 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [phated](https://github.com/phated) |
### Author
**Jon Schlinkert**
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
### License
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 19, 2018._

View File

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

View File

@@ -0,0 +1,3 @@
export * from "./neon-auth.js";
export * from "./rls.js";
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,20 @@
import type { Integration } from '@sentry/core';
import type { NodeOptions } from '../types';
import { NodeClient } from './client';
/**
* Get default integrations for the Node-Core SDK.
*/
export declare function getDefaultIntegrations(): Integration[];
/**
* Initialize Sentry for Node.
*/
export declare function init(options?: NodeOptions | undefined): NodeClient | undefined;
/**
* Initialize Sentry for Node, without any integrations added by default.
*/
export declare function initWithoutDefaultIntegrations(options?: NodeOptions | undefined): NodeClient;
/**
* Validate that your OpenTelemetry setup is correct.
*/
export declare function validateOpenTelemetrySetup(): void;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,42 @@
import type { ColumnBuilderBase, ColumnBuilderBaseConfig, ColumnBuilderExtraConfig, ColumnBuilderRuntimeConfig, ColumnDataType, HasGenerated } from "../../column-builder.js";
import { ColumnBuilder } from "../../column-builder.js";
import { Column } from "../../column.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import type { SQL } from "../../sql/sql.js";
import type { UpdateDeleteAction } from "../foreign-keys.js";
import type { SQLiteTable } from "../table.js";
import type { Update } from "../../utils.js";
export interface ReferenceConfig {
ref: () => SQLiteColumn;
actions: {
onUpdate?: UpdateDeleteAction;
onDelete?: UpdateDeleteAction;
};
}
export interface SQLiteColumnBuilderBase<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TTypeConfig extends object = object> extends ColumnBuilderBase<T, TTypeConfig & {
dialect: 'sqlite';
}> {
}
export interface SQLiteGeneratedColumnConfig {
mode?: 'virtual' | 'stored';
}
export declare abstract class SQLiteColumnBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object, TTypeConfig extends object = object, TExtraConfig extends ColumnBuilderExtraConfig = object> extends ColumnBuilder<T, TRuntimeConfig, TTypeConfig & {
dialect: 'sqlite';
}, TExtraConfig> implements SQLiteColumnBuilderBase<T, TTypeConfig> {
static readonly [entityKind]: string;
private foreignKeyConfigs;
references(ref: ReferenceConfig['ref'], actions?: ReferenceConfig['actions']): this;
unique(name?: string): this;
generatedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: SQLiteGeneratedColumnConfig): HasGenerated<this, {
type: 'always';
}>;
}
export declare abstract class SQLiteColumn<T extends ColumnBaseConfig<ColumnDataType, string> = ColumnBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = {}, TTypeConfig extends object = {}> extends Column<T, TRuntimeConfig, TTypeConfig & {
dialect: 'sqlite';
}> {
readonly table: SQLiteTable;
static readonly [entityKind]: string;
constructor(table: SQLiteTable, config: ColumnBuilderRuntimeConfig<T['data'], TRuntimeConfig>);
}
export type AnySQLiteColumn<TPartial extends Partial<ColumnBaseConfig<ColumnDataType, string>> = {}> = SQLiteColumn<Required<Update<ColumnBaseConfig<ColumnDataType, string>, TPartial>>>;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"calendar-search.js","sources":["../../../src/icons/calendar-search.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CalendarSearch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgMnY0IiAvPgogIDxwYXRoIGQ9Ik0yMSAxMS43NVY2YTIgMiAwIDAgMC0yLTJINWEyIDIgMCAwIDAtMiAydjE0YTIgMiAwIDAgMCAyIDJoNy4yNSIgLz4KICA8cGF0aCBkPSJtMjIgMjItMS44NzUtMS44NzUiIC8+CiAgPHBhdGggZD0iTTMgMTBoMTgiIC8+CiAgPHBhdGggZD0iTTggMnY0IiAvPgogIDxjaXJjbGUgY3g9IjE4IiBjeT0iMTgiIHI9IjMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/calendar-search\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 CalendarSearch = createLucideIcon('CalendarSearch', [\n ['path', { d: 'M16 2v4', key: '4m81vk' }],\n ['path', { d: 'M21 11.75V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.25', key: '1jrsq6' }],\n ['path', { d: 'm22 22-1.875-1.875', key: '13zax7' }],\n ['path', { d: 'M3 10h18', key: '8toen8' }],\n ['path', { d: 'M8 2v4', key: '1cmpym' }],\n ['circle', { cx: '18', cy: '18', r: '3', key: '1xkwt0' }],\n]);\n\nexport default CalendarSearch;\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,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,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,CAAmE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChG,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,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,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACvC,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,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 './square-split-horizontal.js';
//# sourceMappingURL=split-square-horizontal.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ice-cream-bowl.js","sources":["../../../src/icons/ice-cream-bowl.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name IceCreamBowl\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTdjNSAwIDgtMi42OSA4LTZINGMwIDMuMzEgMyA2IDggNm0tNCA0aDhtLTQtM3YzTTUuMTQgMTFhMy41IDMuNSAwIDEgMSA2LjcxIDAiIC8+CiAgPHBhdGggZD0iTTEyLjE0IDExYTMuNSAzLjUgMCAxIDEgNi43MSAwIiAvPgogIDxwYXRoIGQ9Ik0xNS41IDYuNWEzLjUgMy41IDAgMSAwLTcgMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/ice-cream-bowl\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 IceCreamBowl = createLucideIcon('IceCreamBowl', [\n [\n 'path',\n {\n d: 'M12 17c5 0 8-2.69 8-6H4c0 3.31 3 6 8 6m-4 4h8m-4-3v3M5.14 11a3.5 3.5 0 1 1 6.71 0',\n key: '1uxfcu',\n },\n ],\n ['path', { d: 'M12.14 11a3.5 3.5 0 1 1 6.71 0', key: '4k3m1s' }],\n ['path', { d: 'M15.5 6.5a3.5 3.5 0 1 0-7 0', key: 'zmuahr' }],\n]);\n\nexport default IceCreamBowl;\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,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;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,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC9D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,20 @@
/**
* @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 CaptionsOff = createLucideIcon("CaptionsOff", [
["path", { d: "M10.5 5H19a2 2 0 0 1 2 2v8.5", key: "jqtk4d" }],
["path", { d: "M17 11h-.5", key: "1961ue" }],
["path", { d: "M19 19H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2", key: "1keqsi" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }],
["path", { d: "M7 11h4", key: "1o1z6v" }],
["path", { d: "M7 15h2.5", key: "1ina1g" }]
]);
export { CaptionsOff as default };
//# sourceMappingURL=captions-off.js.map

View File

@@ -0,0 +1,36 @@
"use strict";
exports.SecondParser = void 0;
var _constants = require("../constants.cjs");
var _Parser = require("../Parser.cjs");
var _utils = require("../utils.cjs");
class SecondParser extends _Parser.Parser {
priority = 50;
parse(dateString, token, match) {
switch (token) {
case "s":
return (0, _utils.parseNumericPattern)(
_constants.numericPatterns.second,
dateString,
);
case "so":
return match.ordinalNumber(dateString, { unit: "second" });
default:
return (0, _utils.parseNDigits)(token.length, dateString);
}
}
validate(_date, value) {
return value >= 0 && value <= 59;
}
set(date, _flags, value) {
date.setSeconds(value, 0);
return date;
}
incompatibleTokens = ["t", "T"];
}
exports.SecondParser = SecondParser;

View File

@@ -0,0 +1 @@
{"version":3,"file":"message-circle-plus.js","sources":["../../../src/icons/message-circle-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MessageCirclePlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNy45IDIwQTkgOSAwIDEgMCA0IDE2LjFMMiAyMloiIC8+CiAgPHBhdGggZD0iTTggMTJoOCIgLz4KICA8cGF0aCBkPSJNMTIgOHY4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/message-circle-plus\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 MessageCirclePlus = createLucideIcon('MessageCirclePlus', [\n ['path', { d: 'M7.9 20A9 9 0 1 0 4 16.1L2 22Z', key: 'vv11sd' }],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n ['path', { d: 'M12 8v8', key: 'napkw2' }],\n]);\n\nexport default MessageCirclePlus;\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,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/D,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;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017-present Devon Govett
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,399 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UndiciInstrumentation = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const diagch = require("diagnostics_channel");
const url_1 = require("url");
const instrumentation_1 = require("@opentelemetry/instrumentation");
const api_1 = require("@opentelemetry/api");
const core_1 = require("@opentelemetry/core");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
/** @knipignore */
const version_1 = require("./version");
// A combination of https://github.com/elastic/apm-agent-nodejs and
// https://github.com/gadget-inc/opentelemetry-instrumentations/blob/main/packages/opentelemetry-instrumentation-undici/src/index.ts
class UndiciInstrumentation extends instrumentation_1.InstrumentationBase {
_recordFromReq = new WeakMap();
constructor(config = {}) {
super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, config);
}
// No need to instrument files/modules
init() {
return undefined;
}
disable() {
super.disable();
this._channelSubs.forEach(sub => sub.unsubscribe());
this._channelSubs.length = 0;
}
enable() {
// "enabled" handling is currently a bit messy with InstrumentationBase.
// If constructed with `{enabled: false}`, this `.enable()` is still called,
// and `this.getConfig().enabled !== this.isEnabled()`, creating confusion.
//
// For now, this class will setup for instrumenting if `.enable()` is
// called, but use `this.getConfig().enabled` to determine if
// instrumentation should be generated. This covers the more likely common
// case of config being given a construction time, rather than later via
// `instance.enable()`, `.disable()`, or `.setConfig()` calls.
super.enable();
// This method is called by the super-class constructor before ours is
// called. So we need to ensure the property is initalized.
this._channelSubs = this._channelSubs || [];
// Avoid to duplicate subscriptions
if (this._channelSubs.length > 0) {
return;
}
this.subscribeToChannel('undici:request:create', this.onRequestCreated.bind(this));
this.subscribeToChannel('undici:client:sendHeaders', this.onRequestHeaders.bind(this));
this.subscribeToChannel('undici:request:headers', this.onResponseHeaders.bind(this));
this.subscribeToChannel('undici:request:trailers', this.onDone.bind(this));
this.subscribeToChannel('undici:request:error', this.onError.bind(this));
}
_updateMetricInstruments() {
this._httpClientDurationHistogram = this.meter.createHistogram(semantic_conventions_1.METRIC_HTTP_CLIENT_REQUEST_DURATION, {
description: 'Measures the duration of outbound HTTP requests.',
unit: 's',
valueType: api_1.ValueType.DOUBLE,
advice: {
explicitBucketBoundaries: [
0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5,
7.5, 10,
],
},
});
}
subscribeToChannel(diagnosticChannel, onMessage) {
// `diagnostics_channel` had a ref counting bug until v18.19.0.
// https://github.com/nodejs/node/pull/47520
const [major, minor] = process.version
.replace('v', '')
.split('.')
.map(n => Number(n));
const useNewSubscribe = major > 18 || (major === 18 && minor >= 19);
let unsubscribe;
if (useNewSubscribe) {
diagch.subscribe?.(diagnosticChannel, onMessage);
unsubscribe = () => diagch.unsubscribe?.(diagnosticChannel, onMessage);
}
else {
const channel = diagch.channel(diagnosticChannel);
channel.subscribe(onMessage);
unsubscribe = () => channel.unsubscribe(onMessage);
}
this._channelSubs.push({
name: diagnosticChannel,
unsubscribe,
});
}
parseRequestHeaders(request) {
const result = new Map();
if (Array.isArray(request.headers)) {
// headers are an array [k1, v2, k2, v2] (undici v6+)
// values could be string or a string[] for multiple values
for (let i = 0; i < request.headers.length; i += 2) {
const key = request.headers[i];
const value = request.headers[i + 1];
// Key should always be a string, but the types don't know that, and let's be safe
if (typeof key === 'string') {
result.set(key.toLowerCase(), value);
}
}
}
else if (typeof request.headers === 'string') {
// headers are a raw string (undici v5)
// headers could be repeated in several lines for multiple values
const headers = request.headers.split('\r\n');
for (const line of headers) {
if (!line) {
continue;
}
const colonIndex = line.indexOf(':');
if (colonIndex === -1) {
// Invalid header? Probably this can't happen, but again let's be safe.
continue;
}
const key = line.substring(0, colonIndex).toLowerCase();
const value = line.substring(colonIndex + 1).trim();
const allValues = result.get(key);
if (allValues && Array.isArray(allValues)) {
allValues.push(value);
}
else if (allValues) {
result.set(key, [allValues, value]);
}
else {
result.set(key, value);
}
}
}
return result;
}
// This is the 1st message we receive for each request (fired after request creation). Here we will
// create the span and populate some atttributes, then link the span to the request for further
// span processing
onRequestCreated({ request }) {
// Ignore if:
// - instrumentation is disabled
// - ignored by config
// - method is 'CONNECT'
const config = this.getConfig();
const enabled = config.enabled !== false;
const shouldIgnoreReq = (0, instrumentation_1.safeExecuteInTheMiddle)(() => !enabled ||
request.method === 'CONNECT' ||
config.ignoreRequestHook?.(request), e => e && this._diag.error('caught ignoreRequestHook error: ', e), true);
if (shouldIgnoreReq) {
return;
}
const startTime = (0, core_1.hrTime)();
let requestUrl;
try {
requestUrl = new url_1.URL(request.path, request.origin);
}
catch (err) {
this._diag.warn('could not determine url.full:', err);
// Skip instrumenting this request.
return;
}
const urlScheme = requestUrl.protocol.replace(':', '');
const requestMethod = this.getRequestMethod(request.method);
const attributes = {
[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD]: requestMethod,
[semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]: request.method,
[semantic_conventions_1.ATTR_URL_FULL]: requestUrl.toString(),
[semantic_conventions_1.ATTR_URL_PATH]: requestUrl.pathname,
[semantic_conventions_1.ATTR_URL_QUERY]: requestUrl.search,
[semantic_conventions_1.ATTR_URL_SCHEME]: urlScheme,
};
const schemePorts = { https: '443', http: '80' };
const serverAddress = requestUrl.hostname;
const serverPort = requestUrl.port || schemePorts[urlScheme];
attributes[semantic_conventions_1.ATTR_SERVER_ADDRESS] = serverAddress;
if (serverPort && !isNaN(Number(serverPort))) {
attributes[semantic_conventions_1.ATTR_SERVER_PORT] = Number(serverPort);
}
// Get user agent from headers
const headersMap = this.parseRequestHeaders(request);
const userAgentValues = headersMap.get('user-agent');
if (userAgentValues) {
// NOTE: having multiple user agents is not expected so
// we're going to take last one like `curl` does
// ref: https://curl.se/docs/manpage.html#-A
const userAgent = Array.isArray(userAgentValues)
? userAgentValues[userAgentValues.length - 1]
: userAgentValues;
attributes[semantic_conventions_1.ATTR_USER_AGENT_ORIGINAL] = userAgent;
}
// Get attributes from the hook if present
const hookAttributes = (0, instrumentation_1.safeExecuteInTheMiddle)(() => config.startSpanHook?.(request), e => e && this._diag.error('caught startSpanHook error: ', e), true);
if (hookAttributes) {
Object.entries(hookAttributes).forEach(([key, val]) => {
attributes[key] = val;
});
}
// Check if parent span is required via config and:
// - if a parent is required but not present, we use a `NoopSpan` to still
// propagate context without recording it.
// - create a span otherwise
const activeCtx = api_1.context.active();
const currentSpan = api_1.trace.getSpan(activeCtx);
let span;
if (config.requireParentforSpans &&
(!currentSpan || !api_1.trace.isSpanContextValid(currentSpan.spanContext()))) {
span = api_1.trace.wrapSpanContext(api_1.INVALID_SPAN_CONTEXT);
}
else {
span = this.tracer.startSpan(requestMethod === '_OTHER' ? 'HTTP' : requestMethod, {
kind: api_1.SpanKind.CLIENT,
attributes: attributes,
}, activeCtx);
}
// Execute the request hook if defined
(0, instrumentation_1.safeExecuteInTheMiddle)(() => config.requestHook?.(span, request), e => e && this._diag.error('caught requestHook error: ', e), true);
// Context propagation goes last so no hook can tamper
// the propagation headers
const requestContext = api_1.trace.setSpan(api_1.context.active(), span);
const addedHeaders = {};
api_1.propagation.inject(requestContext, addedHeaders);
const headerEntries = Object.entries(addedHeaders);
for (let i = 0; i < headerEntries.length; i++) {
const [k, v] = headerEntries[i];
if (typeof request.addHeader === 'function') {
request.addHeader(k, v);
}
else if (typeof request.headers === 'string') {
request.headers += `${k}: ${v}\r\n`;
}
else if (Array.isArray(request.headers)) {
// undici@6.11.0 accidentally, briefly removed `request.addHeader()`.
request.headers.push(k, v);
}
}
this._recordFromReq.set(request, { span, attributes, startTime });
}
// This is the 2nd message we receive for each request. It is fired when connection with
// the remote is established and about to send the first byte. Here we do have info about the
// remote address and port so we can populate some `network.*` attributes into the span
onRequestHeaders({ request, socket }) {
const record = this._recordFromReq.get(request);
if (!record) {
return;
}
const config = this.getConfig();
const { span } = record;
const { remoteAddress, remotePort } = socket;
const spanAttributes = {
[semantic_conventions_1.ATTR_NETWORK_PEER_ADDRESS]: remoteAddress,
[semantic_conventions_1.ATTR_NETWORK_PEER_PORT]: remotePort,
};
// After hooks have been processed (which may modify request headers)
// we can collect the headers based on the configuration
if (config.headersToSpanAttributes?.requestHeaders) {
const headersToAttribs = new Set(config.headersToSpanAttributes.requestHeaders.map(n => n.toLowerCase()));
const headersMap = this.parseRequestHeaders(request);
for (const [name, value] of headersMap.entries()) {
if (headersToAttribs.has(name)) {
const attrValue = Array.isArray(value) ? value.join(', ') : value;
spanAttributes[`http.request.header.${name}`] = attrValue;
}
}
}
span.setAttributes(spanAttributes);
}
// This is the 3rd message we get for each request and it's fired when the server
// headers are received, body may not be accessible yet.
// From the response headers we can set the status and content length
onResponseHeaders({ request, response, }) {
const record = this._recordFromReq.get(request);
if (!record) {
return;
}
const { span, attributes } = record;
const spanAttributes = {
[semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE]: response.statusCode,
};
const config = this.getConfig();
// Execute the response hook if defined
(0, instrumentation_1.safeExecuteInTheMiddle)(() => config.responseHook?.(span, { request, response }), e => e && this._diag.error('caught responseHook error: ', e), true);
const headersToAttribs = new Set();
if (config.headersToSpanAttributes?.responseHeaders) {
config.headersToSpanAttributes?.responseHeaders.forEach(name => headersToAttribs.add(name.toLowerCase()));
}
for (let idx = 0; idx < response.headers.length; idx = idx + 2) {
const name = response.headers[idx].toString().toLowerCase();
const value = response.headers[idx + 1];
if (headersToAttribs.has(name)) {
spanAttributes[`http.response.header.${name}`] = value.toString();
}
if (name === 'content-length') {
const contentLength = Number(value.toString());
if (!isNaN(contentLength)) {
spanAttributes['http.response.header.content-length'] = contentLength;
}
}
}
span.setAttributes(spanAttributes);
span.setStatus({
code: response.statusCode >= 400
? api_1.SpanStatusCode.ERROR
: api_1.SpanStatusCode.UNSET,
});
record.attributes = Object.assign(attributes, spanAttributes);
}
// This is the last event we receive if the request went without any errors
onDone({ request }) {
const record = this._recordFromReq.get(request);
if (!record) {
return;
}
const { span, attributes, startTime } = record;
// End the span
span.end();
this._recordFromReq.delete(request);
// Record metrics
this.recordRequestDuration(attributes, startTime);
}
// This is the event we get when something is wrong in the request like
// - invalid options when calling `fetch` global API or any undici method for request
// - connectivity errors such as unreachable host
// - requests aborted through an `AbortController.signal`
// NOTE: server errors are considered valid responses and it's the lib consumer
// who should deal with that.
onError({ request, error }) {
const record = this._recordFromReq.get(request);
if (!record) {
return;
}
const { span, attributes, startTime } = record;
// NOTE: in `undici@6.3.0` when request aborted the error type changes from
// a custom error (`RequestAbortedError`) to a built-in `DOMException` carrying
// some differences:
// - `code` is from DOMEXception (ABORT_ERR: 20)
// - `message` changes
// - stacktrace is smaller and contains node internal frames
span.recordException(error);
span.setStatus({
code: api_1.SpanStatusCode.ERROR,
message: error.message,
});
span.end();
this._recordFromReq.delete(request);
// Record metrics (with the error)
attributes[semantic_conventions_1.ATTR_ERROR_TYPE] = error.message;
this.recordRequestDuration(attributes, startTime);
}
recordRequestDuration(attributes, startTime) {
// Time to record metrics
const metricsAttributes = {};
// Get the attribs already in span attributes
const keysToCopy = [
semantic_conventions_1.ATTR_HTTP_RESPONSE_STATUS_CODE,
semantic_conventions_1.ATTR_HTTP_REQUEST_METHOD,
semantic_conventions_1.ATTR_SERVER_ADDRESS,
semantic_conventions_1.ATTR_SERVER_PORT,
semantic_conventions_1.ATTR_URL_SCHEME,
semantic_conventions_1.ATTR_ERROR_TYPE,
];
keysToCopy.forEach(key => {
if (key in attributes) {
metricsAttributes[key] = attributes[key];
}
});
// Take the duration and record it
const durationSeconds = (0, core_1.hrTimeToMilliseconds)((0, core_1.hrTimeDuration)(startTime, (0, core_1.hrTime)())) / 1000;
this._httpClientDurationHistogram.record(durationSeconds, metricsAttributes);
}
getRequestMethod(original) {
const knownMethods = {
CONNECT: true,
OPTIONS: true,
HEAD: true,
GET: true,
POST: true,
PUT: true,
PATCH: true,
DELETE: true,
TRACE: true,
};
if (original.toUpperCase() in knownMethods) {
return original.toUpperCase();
}
return '_OTHER';
}
}
exports.UndiciInstrumentation = UndiciInstrumentation;
//# sourceMappingURL=undici.js.map

View File

@@ -0,0 +1,282 @@
#include <string>
#include <stack>
#include "../DirTree.hh"
#include "../shared/BruteForceBackend.hh"
#include "./WindowsBackend.hh"
#include "./win_utils.hh"
#define DEFAULT_BUF_SIZE 1024 * 1024
#define NETWORK_BUF_SIZE 64 * 1024
#define CONVERT_TIME(ft) ULARGE_INTEGER{ft.dwLowDateTime, ft.dwHighDateTime}.QuadPart
void BruteForceBackend::readTree(WatcherRef watcher, std::shared_ptr<DirTree> tree) {
std::stack<std::string> directories;
directories.push(watcher->mDir);
while (!directories.empty()) {
HANDLE hFind = INVALID_HANDLE_VALUE;
std::string path = directories.top();
std::string spec = path + "\\*";
directories.pop();
WIN32_FIND_DATA ffd;
hFind = FindFirstFile(spec.c_str(), &ffd);
if (hFind == INVALID_HANDLE_VALUE) {
if (path == watcher->mDir) {
FindClose(hFind);
throw WatcherError("Error opening directory", watcher);
}
tree->remove(path);
continue;
}
do {
if (strcmp(ffd.cFileName, ".") != 0 && strcmp(ffd.cFileName, "..") != 0) {
std::string fullPath = path + "\\" + ffd.cFileName;
if (watcher->isIgnored(fullPath)) {
continue;
}
tree->add(fullPath, CONVERT_TIME(ffd.ftLastWriteTime), ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
directories.push(fullPath);
}
}
} while (FindNextFile(hFind, &ffd) != 0);
FindClose(hFind);
}
}
void WindowsBackend::start() {
mRunning = true;
notifyStarted();
while (mRunning) {
SleepEx(INFINITE, true);
}
}
WindowsBackend::~WindowsBackend() {
// Mark as stopped, and queue a noop function in the thread to break the loop
mRunning = false;
QueueUserAPC([](__in ULONG_PTR) {}, mThread.native_handle(), (ULONG_PTR)this);
}
class Subscription: public WatcherState {
public:
Subscription(WindowsBackend *backend, WatcherRef watcher, std::shared_ptr<DirTree> tree) {
mRunning = true;
mBackend = backend;
mWatcher = watcher;
mTree = tree;
ZeroMemory(&mOverlapped, sizeof(OVERLAPPED));
mOverlapped.hEvent = this;
mReadBuffer.resize(DEFAULT_BUF_SIZE);
mWriteBuffer.resize(DEFAULT_BUF_SIZE);
mDirectoryHandle = CreateFileW(
utf8ToUtf16(watcher->mDir).data(),
FILE_LIST_DIRECTORY,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED,
NULL
);
if (mDirectoryHandle == INVALID_HANDLE_VALUE) {
throw WatcherError("Invalid handle", mWatcher);
}
// Ensure that the path is a directory
BY_HANDLE_FILE_INFORMATION info;
bool success = GetFileInformationByHandle(
mDirectoryHandle,
&info
);
if (!success) {
throw WatcherError("Could not get file information", mWatcher);
}
if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
throw WatcherError("Not a directory", mWatcher);
}
}
virtual ~Subscription() {
stop();
}
void run() {
try {
poll();
} catch (WatcherError &err) {
mBackend->handleWatcherError(err);
}
}
void stop() {
if (mRunning) {
mRunning = false;
CancelIo(mDirectoryHandle);
CloseHandle(mDirectoryHandle);
}
}
void poll() {
if (!mRunning) {
return;
}
// Asynchronously wait for changes.
int success = ReadDirectoryChangesW(
mDirectoryHandle,
mWriteBuffer.data(),
static_cast<DWORD>(mWriteBuffer.size()),
TRUE, // recursive
FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES
| FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE,
NULL,
&mOverlapped,
[](DWORD errorCode, DWORD numBytes, LPOVERLAPPED overlapped) {
auto subscription = reinterpret_cast<Subscription *>(overlapped->hEvent);
try {
subscription->processEvents(errorCode);
} catch (WatcherError &err) {
subscription->mBackend->handleWatcherError(err);
}
}
);
if (!success) {
throw WatcherError("Failed to read changes", mWatcher);
}
}
void processEvents(DWORD errorCode) {
if (!mRunning) {
return;
}
switch (errorCode) {
case ERROR_OPERATION_ABORTED:
return;
case ERROR_INVALID_PARAMETER:
// resize buffers to network size (64kb), and try again
mReadBuffer.resize(NETWORK_BUF_SIZE);
mWriteBuffer.resize(NETWORK_BUF_SIZE);
poll();
return;
case ERROR_NOTIFY_ENUM_DIR:
throw WatcherError("Buffer overflow. Some events may have been lost.", mWatcher);
case ERROR_ACCESS_DENIED: {
// This can happen if the watched directory is deleted. Check if that is the case,
// and if so emit a delete event. Otherwise, fall through to default error case.
DWORD attrs = GetFileAttributesW(utf8ToUtf16(mWatcher->mDir).data());
bool isDir = attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY);
if (!isDir) {
mWatcher->mEvents.remove(mWatcher->mDir);
mTree->remove(mWatcher->mDir);
mWatcher->notify();
stop();
return;
}
}
default:
if (errorCode != ERROR_SUCCESS) {
throw WatcherError("Unknown error", mWatcher);
}
}
// Swap read and write buffers, and poll again
std::swap(mWriteBuffer, mReadBuffer);
poll();
// Read change events
BYTE *base = mReadBuffer.data();
while (true) {
PFILE_NOTIFY_INFORMATION info = (PFILE_NOTIFY_INFORMATION)base;
processEvent(info);
if (info->NextEntryOffset == 0) {
break;
}
base += info->NextEntryOffset;
}
mWatcher->notify();
}
void processEvent(PFILE_NOTIFY_INFORMATION info) {
std::string path = mWatcher->mDir + "\\" + utf16ToUtf8(info->FileName, info->FileNameLength / sizeof(WCHAR));
if (mWatcher->isIgnored(path)) {
return;
}
switch (info->Action) {
case FILE_ACTION_ADDED:
case FILE_ACTION_RENAMED_NEW_NAME: {
WIN32_FILE_ATTRIBUTE_DATA data;
if (GetFileAttributesExW(utf8ToUtf16(path).data(), GetFileExInfoStandard, &data)) {
mWatcher->mEvents.create(path);
mTree->add(path, CONVERT_TIME(data.ftLastWriteTime), data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
}
break;
}
case FILE_ACTION_MODIFIED: {
WIN32_FILE_ATTRIBUTE_DATA data;
if (GetFileAttributesExW(utf8ToUtf16(path).data(), GetFileExInfoStandard, &data)) {
mTree->update(path, CONVERT_TIME(data.ftLastWriteTime));
if (!(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
mWatcher->mEvents.update(path);
}
}
break;
}
case FILE_ACTION_REMOVED:
case FILE_ACTION_RENAMED_OLD_NAME:
mWatcher->mEvents.remove(path);
mTree->remove(path);
break;
}
}
private:
WindowsBackend *mBackend;
std::shared_ptr<Watcher> mWatcher;
std::shared_ptr<DirTree> mTree;
bool mRunning;
HANDLE mDirectoryHandle;
std::vector<BYTE> mReadBuffer;
std::vector<BYTE> mWriteBuffer;
OVERLAPPED mOverlapped;
};
// This function is called by Backend::watch which takes a lock on mMutex
void WindowsBackend::subscribe(WatcherRef watcher) {
// Create a subscription for this watcher
auto sub = std::make_shared<Subscription>(this, watcher, getTree(watcher, false));
watcher->state = sub;
// Queue polling for this subscription in the correct thread.
bool success = QueueUserAPC([](__in ULONG_PTR ptr) {
Subscription *sub = (Subscription *)ptr;
sub->run();
}, mThread.native_handle(), (ULONG_PTR)sub.get());
if (!success) {
throw std::runtime_error("Unable to queue APC");
}
}
// This function is called by Backend::unwatch which takes a lock on mMutex
void WindowsBackend::unsubscribe(WatcherRef watcher) {
watcher->state = nullptr;
}

View File

@@ -0,0 +1,82 @@
'use strict';
const readline = require('readline');
const _require = require('../util'),
action = _require.action;
const EventEmitter = require('events');
const _require2 = require('sisteransi'),
beep = _require2.beep,
cursor = _require2.cursor;
const color = require('kleur');
/**
* Base prompt skeleton
* @param {Stream} [opts.stdin] The Readable stream to listen to
* @param {Stream} [opts.stdout] The Writable stream to write readline data to
*/
class Prompt extends EventEmitter {
constructor(opts = {}) {
super();
this.firstRender = true;
this.in = opts.stdin || process.stdin;
this.out = opts.stdout || process.stdout;
this.onRender = (opts.onRender || (() => void 0)).bind(this);
const rl = readline.createInterface({
input: this.in,
escapeCodeTimeout: 50
});
readline.emitKeypressEvents(this.in, rl);
if (this.in.isTTY) this.in.setRawMode(true);
const isSelect = ['SelectPrompt', 'MultiselectPrompt'].indexOf(this.constructor.name) > -1;
const keypress = (str, key) => {
let a = action(key, isSelect);
if (a === false) {
this._ && this._(str, key);
} else if (typeof this[a] === 'function') {
this[a](key);
} else {
this.bell();
}
};
this.close = () => {
this.out.write(cursor.show);
this.in.removeListener('keypress', keypress);
if (this.in.isTTY) this.in.setRawMode(false);
rl.close();
this.emit(this.aborted ? 'abort' : this.exited ? 'exit' : 'submit', this.value);
this.closed = true;
};
this.in.on('keypress', keypress);
}
fire() {
this.emit('state', {
value: this.value,
aborted: !!this.aborted,
exited: !!this.exited
});
}
bell() {
this.out.write(beep);
}
render() {
this.onRender(color);
if (this.firstRender) this.firstRender = false;
}
}
module.exports = Prompt;

View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const def = {
keyword: "id",
code() {
throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID');
},
};
exports.default = def;
//# sourceMappingURL=id.js.map

View File

@@ -0,0 +1,29 @@
import { DirectusPanel } from "../../../schema/panel.cjs";
import { NestedPartial } from "../../../types/utils.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/create/panels.d.ts
type CreatePanelOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusPanel<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Create multiple new panels.
*
* @param items The panel to create
* @param query Optional return data query
*
* @returns Returns the panel object for the created panel.
*/
declare const createPanels: <Schema, const TQuery extends Query<Schema, DirectusPanel<Schema>>>(items: NestedPartial<DirectusPanel<Schema>>[], query?: TQuery) => RestCommand<CreatePanelOutput<Schema, TQuery>[], Schema>;
/**
* Create a new panel.
*
* @param item The panel to create
* @param query Optional return data query
*
* @returns Returns the panel object for the created panel.
*/
declare const createPanel: <Schema, const TQuery extends Query<Schema, DirectusPanel<Schema>>>(item: NestedPartial<DirectusPanel<Schema>>, query?: TQuery) => RestCommand<CreatePanelOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreatePanelOutput, createPanel, createPanels };
//# sourceMappingURL=panels.d.cts.map

View File

@@ -0,0 +1,177 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const net_1 = __importDefault(require("net"));
const tls_1 = __importDefault(require("tls"));
const url_1 = __importDefault(require("url"));
const assert_1 = __importDefault(require("assert"));
const debug_1 = __importDefault(require("debug"));
const agent_base_1 = require("agent-base");
const parse_proxy_response_1 = __importDefault(require("./parse-proxy-response"));
const debug = debug_1.default('https-proxy-agent:agent');
/**
* The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
* the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
*
* Outgoing HTTP requests are first tunneled through the proxy server using the
* `CONNECT` HTTP request method to establish a connection to the proxy server,
* and then the proxy server connects to the destination target and issues the
* HTTP request from the proxy server.
*
* `https:` requests have their socket connection upgraded to TLS once
* the connection to the proxy server has been established.
*
* @api public
*/
class HttpsProxyAgent extends agent_base_1.Agent {
constructor(_opts) {
let opts;
if (typeof _opts === 'string') {
opts = url_1.default.parse(_opts);
}
else {
opts = _opts;
}
if (!opts) {
throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
}
debug('creating new HttpsProxyAgent instance: %o', opts);
super(opts);
const proxy = Object.assign({}, opts);
// If `true`, then connect to the proxy server over TLS.
// Defaults to `false`.
this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);
// Prefer `hostname` over `host`, and set the `port` if needed.
proxy.host = proxy.hostname || proxy.host;
if (typeof proxy.port === 'string') {
proxy.port = parseInt(proxy.port, 10);
}
if (!proxy.port && proxy.host) {
proxy.port = this.secureProxy ? 443 : 80;
}
// ALPN is supported by Node.js >= v5.
// attempt to negotiate http/1.1 for proxy servers that support http/2
if (this.secureProxy && !('ALPNProtocols' in proxy)) {
proxy.ALPNProtocols = ['http 1.1'];
}
if (proxy.host && proxy.path) {
// If both a `host` and `path` are specified then it's most likely
// the result of a `url.parse()` call... we need to remove the
// `path` portion so that `net.connect()` doesn't attempt to open
// that as a Unix socket file.
delete proxy.path;
delete proxy.pathname;
}
this.proxy = proxy;
}
/**
* Called when the node-core HTTP client library is creating a
* new HTTP request.
*
* @api protected
*/
callback(req, opts) {
return __awaiter(this, void 0, void 0, function* () {
const { proxy, secureProxy } = this;
// Create a socket connection to the proxy server.
let socket;
if (secureProxy) {
debug('Creating `tls.Socket`: %o', proxy);
socket = tls_1.default.connect(proxy);
}
else {
debug('Creating `net.Socket`: %o', proxy);
socket = net_1.default.connect(proxy);
}
const headers = Object.assign({}, proxy.headers);
const hostname = `${opts.host}:${opts.port}`;
let payload = `CONNECT ${hostname} HTTP/1.1\r\n`;
// Inject the `Proxy-Authorization` header if necessary.
if (proxy.auth) {
headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`;
}
// The `Host` header should only include the port
// number when it is not the default port.
let { host, port, secureEndpoint } = opts;
if (!isDefaultPort(port, secureEndpoint)) {
host += `:${port}`;
}
headers.Host = host;
headers.Connection = 'close';
for (const name of Object.keys(headers)) {
payload += `${name}: ${headers[name]}\r\n`;
}
const proxyResponsePromise = parse_proxy_response_1.default(socket);
socket.write(`${payload}\r\n`);
const { statusCode, buffered } = yield proxyResponsePromise;
if (statusCode === 200) {
req.once('socket', resume);
if (opts.secureEndpoint) {
// The proxy is connecting to a TLS server, so upgrade
// this socket connection to a TLS connection.
debug('Upgrading socket connection to TLS');
const servername = opts.servername || opts.host;
return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
servername }));
}
return socket;
}
// Some other status code that's not 200... need to re-play the HTTP
// header "data" events onto the socket once the HTTP machinery is
// attached so that the node core `http` can parse and handle the
// error status code.
// Close the original socket, and a new "fake" socket is returned
// instead, so that the proxy doesn't get the HTTP request
// written to it (which may contain `Authorization` headers or other
// sensitive data).
//
// See: https://hackerone.com/reports/541502
socket.destroy();
const fakeSocket = new net_1.default.Socket({ writable: false });
fakeSocket.readable = true;
// Need to wait for the "socket" event to re-play the "data" events.
req.once('socket', (s) => {
debug('replaying proxy buffer for failed request');
assert_1.default(s.listenerCount('data') > 0);
// Replay the "buffered" Buffer onto the fake `socket`, since at
// this point the HTTP module machinery has been hooked up for
// the user.
s.push(buffered);
s.push(null);
});
return fakeSocket;
});
}
}
exports.default = HttpsProxyAgent;
function resume(socket) {
socket.resume();
}
function isDefaultPort(port, secure) {
return Boolean((!secure && port === 80) || (secure && port === 443));
}
function isHTTPS(protocol) {
return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;
}
function omit(obj, ...keys) {
const ret = {};
let key;
for (key in obj) {
if (!keys.includes(key)) {
ret[key] = obj[key];
}
}
return ret;
}
//# sourceMappingURL=agent.js.map

View File

@@ -0,0 +1,12 @@
/**
* 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.
*
*/
import * as modDev from './LexicalClearEditorPlugin.dev.mjs';
import * as modProd from './LexicalClearEditorPlugin.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const ClearEditorPlugin = mod.ClearEditorPlugin;

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select.cjs.d.mts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","React","useAuth","EditDepthProvider","useTranslation","Drawer","DrawerToggler","useFormsManager","EditManyBulkUploadsDrawerContent","baseClass","EditManyBulkUploads","props","$","collection","t0","slug","undefined","permissions","t","forms","collectionPermissions","collections","hasUpdatePermission","update","drawerSlug","t1","_jsxs","className","children","_jsx","Header"],"sources":["../../../../src/elements/BulkUpload/EditMany/index.tsx"],"sourcesContent":["'use client'\n\nimport type { ClientCollectionConfig } from 'payload'\n\nimport React from 'react'\n\nimport { useAuth } from '../../../providers/Auth/index.js'\nimport { EditDepthProvider } from '../../../providers/EditDepth/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport { Drawer, DrawerToggler } from '../../Drawer/index.js'\nimport { useFormsManager } from '../FormsManager/index.js'\nimport { EditManyBulkUploadsDrawerContent } from './DrawerContent.js'\nimport './index.scss'\n\nexport const baseClass = 'edit-many-bulk-uploads'\n\nexport type EditManyBulkUploadsProps = {\n readonly collection: ClientCollectionConfig\n}\n\nexport const EditManyBulkUploads: React.FC<EditManyBulkUploadsProps> = (props) => {\n const { collection: { slug } = {}, collection } = props\n\n const { permissions } = useAuth()\n\n const { t } = useTranslation()\n const { forms } = useFormsManager() // Access forms managed in bulk uploads\n\n const collectionPermissions = permissions?.collections?.[slug]\n const hasUpdatePermission = collectionPermissions?.update\n\n const drawerSlug = `edit-${slug}-bulk-uploads`\n\n if (!hasUpdatePermission) {\n return null\n }\n\n return (\n <div className={baseClass}>\n <DrawerToggler\n aria-label={t('general:editAll')}\n className={`${baseClass}__toggle`}\n slug={drawerSlug}\n >\n {t('general:editAll')}\n </DrawerToggler>\n <EditDepthProvider>\n <Drawer Header={null} slug={drawerSlug}>\n <EditManyBulkUploadsDrawerContent\n collection={collection}\n drawerSlug={drawerSlug}\n forms={forms}\n />\n </Drawer>\n </EditDepthProvider>\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,OAAOC,KAAA,MAAW;AAElB,SAASC,OAAO,QAAQ;AACxB,SAASC,iBAAiB,QAAQ;AAClC,SAASC,cAAc,QAAQ;AAC/B,SAASC,MAAM,EAAEC,aAAa,QAAQ;AACtC,SAASC,eAAe,QAAQ;AAChC,SAASC,gCAAgC,QAAQ;AACjD,OAAO;AAEP,OAAO,MAAMC,SAAA,GAAY;AAMzB,OAAO,MAAMC,mBAAA,GAA0DC,KAAA;EAAA,MAAAC,CAAA,GAAAZ,EAAA;EACrE;IAAAa,UAAA,EAAAC,EAAA;IAAAD;EAAA,IAAkDF,KAAA;EAA9B;IAAAI;EAAA,IAAAD,EAAa,KAAAE,SAAA,QAAbF,EAAa;EAEjC;IAAAG;EAAA,IAAwBf,OAAA;EAExB;IAAAgB;EAAA,IAAcd,cAAA;EACd;IAAAe;EAAA,IAAkBZ,eAAA;EAElB,MAAAa,qBAAA,GAA8BH,WAAA,EAAAI,WAAA,GAA2BN,IAAA;EACzD,MAAAO,mBAAA,GAA4BF,qBAAA,EAAAG,MAAA;EAE5B,MAAAC,UAAA,GAAmB,QAAQT,IAAA,eAAmB;EAAA,KAEzCO,mBAAA;IAAA;EAAA;EAAA,IAAAG,EAAA;EAAA,IAAAb,CAAA,QAAAC,UAAA,IAAAD,CAAA,QAAAY,UAAA,IAAAZ,CAAA,QAAAO,KAAA,IAAAP,CAAA,QAAAM,CAAA;IAKHO,EAAA,GAAAC,KAAA,CAAC;MAAAC,SAAA,EAAAlB,SAAA;MAAAmB,QAAA,GACCC,IAAA,CAAAvB,aAAA;QAAA,cACcY,CAAA,CAAE;QAAAS,SAAA,EACH,GAAAlB,SAAA,UAAsB;QAAAM,IAAA,EAC3BS,UAAA;QAAAI,QAAA,EAELV,CAAA,CAAE;MAAA,C,GAELW,IAAA,CAAA1B,iBAAA;QAAAyB,QAAA,EACEC,IAAA,CAAAxB,MAAA;UAAAyB,MAAA;UAAAf,IAAA,EAA4BS,UAAA;UAAAI,QAAA,EAC1BC,IAAA,CAAArB,gCAAA;YAAAK,UAAA;YAAAW,UAAA;YAAAL;UAAA,C;;;;;;;;;;;;SAVNM,E;CAmBJ","ignoreList":[]}

View File

@@ -0,0 +1,228 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["да н.э.", "н.э."],
abbreviated: ["да н. э.", "н. э."],
wide: ["да нашай эры", "нашай эры"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1-ы кв.", "2-і кв.", "3-і кв.", "4-ы кв."],
wide: ["1-ы квартал", "2-і квартал", "3-і квартал", "4-ы квартал"],
};
const monthValues = {
narrow: ["С", "Л", "С", "К", "Т", "Ч", "Л", "Ж", "В", "К", "Л", "С"],
abbreviated: [
"студз.",
"лют.",
"сак.",
"крас.",
"трав.",
"чэрв.",
"ліп.",
"жн.",
"вер.",
"кастр.",
"ліст.",
"сьнеж.",
],
wide: [
"студзень",
"люты",
"сакавік",
"красавік",
"травень",
"чэрвень",
"ліпень",
"жнівень",
"верасень",
"кастрычнік",
"лістапад",
"сьнежань",
],
};
const formattingMonthValues = {
narrow: ["С", "Л", "С", "К", "Т", "Ч", "Л", "Ж", "В", "К", "Л", "С"],
abbreviated: [
"студз.",
"лют.",
"сак.",
"крас.",
"трав.",
"чэрв.",
"ліп.",
"жн.",
"вер.",
"кастр.",
"ліст.",
"сьнеж.",
],
wide: [
"студзеня",
"лютага",
"сакавіка",
"красавіка",
"траўня",
"чэрвеня",
"ліпеня",
"жніўня",
"верасня",
"кастрычніка",
"лістапада",
"сьнежня",
],
};
const dayValues = {
narrow: ["Н", "П", "А", "С", "Ч", "П", "С"],
short: ["нд", "пн", "аў", "ср", "чц", "пт", "сб"],
abbreviated: ["нядз", "пан", "аўт", "сер", "чаць", "пят", "суб"],
wide: [
"нядзеля",
"панядзелак",
"аўторак",
"серада",
"чацьвер",
"пятніца",
"субота",
],
};
const dayPeriodValues = {
narrow: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дзень",
evening: "веч.",
night: "ноч",
},
abbreviated: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дзень",
evening: "веч.",
night: "ноч",
},
wide: {
am: "ДП",
pm: "ПП",
midnight: "поўнач",
noon: "поўдзень",
morning: "раніца",
afternoon: "дзень",
evening: "вечар",
night: "ноч",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дня",
evening: "веч.",
night: "ночы",
},
abbreviated: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дня",
evening: "веч.",
night: "ночы",
},
wide: {
am: "ДП",
pm: "ПП",
midnight: "поўнач",
noon: "поўдзень",
morning: "раніцы",
afternoon: "дня",
evening: "вечара",
night: "ночы",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const unit = String(options?.unit);
const number = Number(dirtyNumber);
let suffix;
/** Though it's an incorrect ordinal form of a date we use it here for consistency with other similar locales (ru, uk)
* For date-month combinations should be used `d` formatter.
* Correct: `d MMMM` (4 верасня)
* Incorrect: `do MMMM` (4-га верасня)
*
* But following the consistency leads to mistakes for literal uses of `do` formatter (ordinal day of month).
* So for phrase "5th day of month" (`do дзень месяца`)
* library will produce: `5-га дзень месяца`
* but correct spelling should be: `5-ы дзень месяца`
*
* So I guess there should be a stand-alone and a formatting version of "day of month" formatters
*/
if (unit === "date") {
suffix = "-га";
} else if (unit === "hour" || unit === "minute" || unit === "second") {
suffix = "-я";
} else {
suffix =
(number % 10 === 2 || number % 10 === 3) &&
number % 100 !== 12 &&
number % 100 !== 13
? "-і"
: "-ы";
}
return number + suffix;
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "any",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1,84 @@
import { describe, it, expect } from 'vitest';
import { mimeTypeValidator } from './mimeTypeValidator';
const options = {
siblingData: {
filename: 'file.xyz'
}
};
describe('mimeTypeValidator', ()=>{
it('should validate single mimeType', ()=>{
const mimeTypes = [
'image/png'
];
const validate = mimeTypeValidator(mimeTypes);
expect(validate('image/png', options)).toBe(true);
});
it('should validate multiple mimeTypes', ()=>{
const mimeTypes = [
'image/png',
'application/pdf'
];
const validate = mimeTypeValidator(mimeTypes);
expect(validate('image/png', options)).toBe(true);
expect(validate('application/pdf', options)).toBe(true);
});
it('should validate using wildcard', ()=>{
const mimeTypes = [
'image/*'
];
const validate = mimeTypeValidator(mimeTypes);
expect(validate('image/png', options)).toBe(true);
expect(validate('image/gif', options)).toBe(true);
});
it('should validate multiple wildcards', ()=>{
const mimeTypes = [
'image/*',
'audio/*'
];
const validate = mimeTypeValidator(mimeTypes);
expect(validate('image/png', options)).toBe(true);
expect(validate('audio/mpeg', options)).toBe(true);
});
it('should not validate when unmatched', ()=>{
const mimeTypes = [
'image/png'
];
const validate = mimeTypeValidator(mimeTypes);
expect(validate('audio/mpeg', options)).toBe("Invalid file type: 'audio/mpeg'");
});
it('should not validate when unmatched - multiple mimeTypes', ()=>{
const mimeTypes = [
'image/png',
'application/pdf'
];
const validate = mimeTypeValidator(mimeTypes);
expect(validate('audio/mpeg', options)).toBe("Invalid file type: 'audio/mpeg'");
});
it('should not validate using wildcard - unmatched', ()=>{
const mimeTypes = [
'image/*'
];
const validate = mimeTypeValidator(mimeTypes);
expect(validate('audio/mpeg', options)).toBe("Invalid file type: 'audio/mpeg'");
});
it('should not validate multiple wildcards - unmatched', ()=>{
const mimeTypes = [
'image/*',
'audio/*'
];
const validate = mimeTypeValidator(mimeTypes);
expect(validate('video/mp4', options)).toBe("Invalid file type: 'video/mp4'");
expect(validate('application/pdf', options)).toBe("Invalid file type: 'application/pdf'");
});
it('should not error when mimeType is missing', ()=>{
const mimeTypes = [
'image/*',
'application/pdf'
];
const validate = mimeTypeValidator(mimeTypes);
let value;
expect(validate(value, options)).toBe('Invalid file type');
});
});
//# sourceMappingURL=mimeTypeValidator.spec.js.map

View File

@@ -0,0 +1,215 @@
/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
import { Stats } from 'fs';
import { EventEmitter } from 'events';
import { ReaddirpStream, ReaddirpOptions, EntryInfo } from 'readdirp';
import { NodeFsHandler, EventName, Path, EVENTS as EV, WatchHandlers } from './handler.js';
type AWF = {
stabilityThreshold: number;
pollInterval: number;
};
type BasicOpts = {
persistent: boolean;
ignoreInitial: boolean;
followSymlinks: boolean;
cwd?: string;
usePolling: boolean;
interval: number;
binaryInterval: number;
alwaysStat?: boolean;
depth?: number;
ignorePermissionErrors: boolean;
atomic: boolean | number;
};
export type Throttler = {
timeoutObject: NodeJS.Timeout;
clear: () => void;
count: number;
};
export type ChokidarOptions = Partial<BasicOpts & {
ignored: Matcher | Matcher[];
awaitWriteFinish: boolean | Partial<AWF>;
}>;
export type FSWInstanceOptions = BasicOpts & {
ignored: Matcher[];
awaitWriteFinish: false | AWF;
};
export type ThrottleType = 'readdir' | 'watch' | 'add' | 'remove' | 'change';
export type EmitArgs = [path: Path, stats?: Stats];
export type EmitErrorArgs = [error: Error, stats?: Stats];
export type EmitArgsWithName = [event: EventName, ...EmitArgs];
export type MatchFunction = (val: string, stats?: Stats) => boolean;
export interface MatcherObject {
path: string;
recursive?: boolean;
}
export type Matcher = string | RegExp | MatchFunction | MatcherObject;
/**
* Directory entry.
*/
declare class DirEntry {
path: Path;
_removeWatcher: (dir: string, base: string) => void;
items: Set<Path>;
constructor(dir: Path, removeWatcher: (dir: string, base: string) => void);
add(item: string): void;
remove(item: string): Promise<void>;
has(item: string): boolean | undefined;
getChildren(): string[];
dispose(): void;
}
export declare class WatchHelper {
fsw: FSWatcher;
path: string;
watchPath: string;
fullWatchPath: string;
dirParts: string[][];
followSymlinks: boolean;
statMethod: 'stat' | 'lstat';
constructor(path: string, follow: boolean, fsw: FSWatcher);
entryPath(entry: EntryInfo): Path;
filterPath(entry: EntryInfo): boolean;
filterDir(entry: EntryInfo): boolean;
}
export interface FSWatcherKnownEventMap {
[EV.READY]: [];
[EV.RAW]: Parameters<WatchHandlers['rawEmitter']>;
[EV.ERROR]: Parameters<WatchHandlers['errHandler']>;
[EV.ALL]: [event: EventName, ...EmitArgs];
}
export type FSWatcherEventMap = FSWatcherKnownEventMap & {
[k in Exclude<EventName, keyof FSWatcherKnownEventMap>]: EmitArgs;
};
/**
* Watches files & directories for changes. Emitted events:
* `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error`
*
* new FSWatcher()
* .add(directories)
* .on('add', path => log('File', path, 'was added'))
*/
export declare class FSWatcher extends EventEmitter<FSWatcherEventMap> {
closed: boolean;
options: FSWInstanceOptions;
_closers: Map<string, Array<any>>;
_ignoredPaths: Set<Matcher>;
_throttled: Map<ThrottleType, Map<any, any>>;
_streams: Set<ReaddirpStream>;
_symlinkPaths: Map<Path, string | boolean>;
_watched: Map<string, DirEntry>;
_pendingWrites: Map<string, any>;
_pendingUnlinks: Map<string, EmitArgsWithName>;
_readyCount: number;
_emitReady: () => void;
_closePromise?: Promise<void>;
_userIgnored?: MatchFunction;
_readyEmitted: boolean;
_emitRaw: WatchHandlers['rawEmitter'];
_boundRemove: (dir: string, item: string) => void;
_nodeFsHandler: NodeFsHandler;
constructor(_opts?: ChokidarOptions);
_addIgnoredPath(matcher: Matcher): void;
_removeIgnoredPath(matcher: Matcher): void;
/**
* Adds paths to be watched on an existing FSWatcher instance.
* @param paths_ file or file list. Other arguments are unused
*/
add(paths_: Path | Path[], _origAdd?: string, _internal?: boolean): FSWatcher;
/**
* Close watchers or start ignoring events from specified paths.
*/
unwatch(paths_: Path | Path[]): FSWatcher;
/**
* Close watchers and remove all listeners from watched paths.
*/
close(): Promise<void>;
/**
* Expose list of watched paths
* @returns for chaining
*/
getWatched(): Record<string, string[]>;
emitWithAll(event: EventName, args: EmitArgs): void;
/**
* Normalize and emit events.
* Calling _emit DOES NOT MEAN emit() would be called!
* @param event Type of event
* @param path File or directory path
* @param stats arguments to be passed with event
* @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
*/
_emit(event: EventName, path: Path, stats?: Stats): Promise<this | undefined>;
/**
* Common handler for errors
* @returns The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
*/
_handleError(error: Error): Error | boolean;
/**
* Helper utility for throttling
* @param actionType type being throttled
* @param path being acted upon
* @param timeout duration of time to suppress duplicate actions
* @returns tracking object or false if action should be suppressed
*/
_throttle(actionType: ThrottleType, path: Path, timeout: number): Throttler | false;
_incrReadyCount(): number;
/**
* Awaits write operation to finish.
* Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
* @param path being acted upon
* @param threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
* @param event
* @param awfEmit Callback to be called when ready for event to be emitted.
*/
_awaitWriteFinish(path: Path, threshold: number, event: EventName, awfEmit: (err?: Error, stat?: Stats) => void): void;
/**
* Determines whether user has asked to ignore this path.
*/
_isIgnored(path: Path, stats?: Stats): boolean;
_isntIgnored(path: Path, stat?: Stats): boolean;
/**
* Provides a set of common helpers and properties relating to symlink handling.
* @param path file or directory pattern being watched
*/
_getWatchHelpers(path: Path): WatchHelper;
/**
* Provides directory tracking objects
* @param directory path of the directory
*/
_getWatchedDir(directory: string): DirEntry;
/**
* Check for read permissions: https://stackoverflow.com/a/11781404/1358405
*/
_hasReadPermissions(stats: Stats): boolean;
/**
* Handles emitting unlink events for
* files and directories, and via recursion, for
* files and directories within directories that are unlinked
* @param directory within which the following item is located
* @param item base path of item/directory
*/
_remove(directory: string, item: string, isDirectory?: boolean): void;
/**
* Closes all watchers for a path
*/
_closePath(path: Path): void;
/**
* Closes only file-specific watchers
*/
_closeFile(path: Path): void;
_addPathCloser(path: Path, closer: () => void): void;
_readdirp(root: Path, opts?: Partial<ReaddirpOptions>): ReaddirpStream | undefined;
}
/**
* Instantiates watcher with paths to be tracked.
* @param paths file / directory paths
* @param options opts, such as `atomic`, `awaitWriteFinish`, `ignored`, and others
* @returns an instance of FSWatcher for chaining.
* @example
* const watcher = watch('.').on('all', (event, path) => { console.log(event, path); });
* watch('.', { atomic: true, awaitWriteFinish: true, ignored: (f, stats) => stats?.isFile() && !f.endsWith('.js') })
*/
export declare function watch(paths: string | string[], options?: ChokidarOptions): FSWatcher;
declare const _default: {
watch: typeof watch;
FSWatcher: typeof FSWatcher;
};
export default _default;

View File

@@ -0,0 +1,2 @@
import { findLastIndex } from "./index";
export = findLastIndex;

View File

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

View File

@@ -0,0 +1,24 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.trace = void 0;
// Split module-level variable definition into separate files to allow
// tree-shaking on each api instance.
const trace_1 = require("./api/trace");
/** Entrypoint for trace API */
exports.trace = trace_1.TraceAPI.getInstance();
//# sourceMappingURL=trace-api.js.map

View File

@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _asyncToGenerator;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
//# sourceMappingURL=asyncToGenerator.js.map

View File

@@ -0,0 +1,4 @@
export declare const getISOWeeksInYear: import("./types.js").FPFn1<
number,
string | number | Date
>;

View File

@@ -0,0 +1,83 @@
import { isValid } from "./isValid.mjs";
import { toDate } from "./toDate.mjs";
import { addLeadingZeros } from "./_lib/addLeadingZeros.mjs";
/**
* The {@link formatRFC3339} function options.
*/
/**
* @name formatRFC3339
* @category Common Helpers
* @summary Format the date according to the RFC 3339 standard (https://tools.ietf.org/html/rfc3339#section-5.6).
*
* @description
* Return the formatted date string in RFC 3339 format. Options may be passed to control the parts and notations of the date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The original date
* @param options - An object with options.
*
* @returns The formatted date string
*
* @throws `date` must not be Invalid Date
*
* @example
* // Represent 18 September 2019 in RFC 3339 format:
* formatRFC3339(new Date(2019, 8, 18, 19, 0, 52))
* //=> '2019-09-18T19:00:52Z'
*
* @example
* // Represent 18 September 2019 in RFC 3339 format, 3 digits of second fraction
* formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), {
* fractionDigits: 3
* })
* //=> '2019-09-18T19:00:52.234Z'
*/
export function formatRFC3339(date, options) {
const _date = toDate(date);
if (!isValid(_date)) {
throw new RangeError("Invalid time value");
}
const fractionDigits = options?.fractionDigits ?? 0;
const day = addLeadingZeros(_date.getDate(), 2);
const month = addLeadingZeros(_date.getMonth() + 1, 2);
const year = _date.getFullYear();
const hour = addLeadingZeros(_date.getHours(), 2);
const minute = addLeadingZeros(_date.getMinutes(), 2);
const second = addLeadingZeros(_date.getSeconds(), 2);
let fractionalSecond = "";
if (fractionDigits > 0) {
const milliseconds = _date.getMilliseconds();
const fractionalSeconds = Math.trunc(
milliseconds * Math.pow(10, fractionDigits - 3),
);
fractionalSecond = "." + addLeadingZeros(fractionalSeconds, fractionDigits);
}
let offset = "";
const tzOffset = _date.getTimezoneOffset();
if (tzOffset !== 0) {
const absoluteOffset = Math.abs(tzOffset);
const hourOffset = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);
const minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);
// If less than 0, the sign is +, because it is ahead of time.
const sign = tzOffset < 0 ? "+" : "-";
offset = `${sign}${hourOffset}:${minuteOffset}`;
} else {
offset = "Z";
}
return `${year}-${month}-${day}T${hour}:${minute}:${second}${fractionalSecond}${offset}`;
}
// Fallback for modularized imports:
export default formatRFC3339;

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _isNativeFunction;
function _isNativeFunction(fn) {
try {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
} catch (_e) {
return typeof fn === "function";
}
}
//# sourceMappingURL=isNativeFunction.js.map

View File

@@ -0,0 +1,25 @@
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(type == 'number' ||
(type != 'symbol' && reIsUint.test(value))) &&
(value > -1 && value % 1 == 0 && value < length);
}
module.exports = isIndex;

View File

@@ -0,0 +1,103 @@
import { RDSDataClient } from "@aws-sdk/client-rds-data";
import { entityKind, is } from "../../entity.js";
import { DefaultLogger } from "../../logger.js";
import { PgDatabase } from "../../pg-core/db.js";
import { PgDialect } from "../../pg-core/dialect.js";
import { PgArray } from "../../pg-core/index.js";
import {
createTableRelationsHelpers,
extractTablesRelationalConfig
} from "../../relations.js";
import { Param, sql } from "../../sql/sql.js";
import { Table } from "../../table.js";
import { AwsDataApiSession } from "./session.js";
class AwsDataApiPgDatabase extends PgDatabase {
static [entityKind] = "AwsDataApiPgDatabase";
execute(query) {
return super.execute(query);
}
}
class AwsPgDialect extends PgDialect {
static [entityKind] = "AwsPgDialect";
escapeParam(num) {
return `:${num + 1}`;
}
buildInsertQuery({ table, values, onConflict, returning, select, withList }) {
const columns = table[Table.Symbol.Columns];
if (!select) {
for (const value of values) {
for (const fieldName of Object.keys(columns)) {
const colValue = value[fieldName];
if (is(colValue, Param) && colValue.value !== void 0 && is(colValue.encoder, PgArray) && Array.isArray(colValue.value)) {
value[fieldName] = sql`cast(${colValue} as ${sql.raw(colValue.encoder.getSQLType())})`;
}
}
}
}
return super.buildInsertQuery({ table, values, onConflict, returning, withList });
}
buildUpdateSet(table, set) {
const columns = table[Table.Symbol.Columns];
for (const [colName, colValue] of Object.entries(set)) {
const currentColumn = columns[colName];
if (currentColumn && is(colValue, Param) && colValue.value !== void 0 && is(colValue.encoder, PgArray) && Array.isArray(colValue.value)) {
set[colName] = sql`cast(${colValue} as ${sql.raw(colValue.encoder.getSQLType())})`;
}
}
return super.buildUpdateSet(table, set);
}
}
function construct(client, config) {
const dialect = new AwsPgDialect({ casing: config.casing });
let logger;
if (config.logger === true) {
logger = new DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = extractTablesRelationalConfig(
config.schema,
createTableRelationsHelpers
);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const session = new AwsDataApiSession(client, dialect, schema, { ...config, logger, cache: config.cache }, void 0);
const db = new AwsDataApiPgDatabase(dialect, session, schema);
db.$client = client;
db.$cache = config.cache;
if (db.$cache) {
db.$cache["invalidate"] = config.cache?.onMutate;
}
return db;
}
function drizzle(...params) {
if (params[0] instanceof RDSDataClient || params[0].constructor.name !== "Object") {
return construct(params[0], params[1]);
}
if (params[0].client) {
const { client, ...drizzleConfig2 } = params[0];
return construct(client, drizzleConfig2);
}
const { connection, ...drizzleConfig } = params[0];
const { resourceArn, database, secretArn, ...rdsConfig } = connection;
const instance = new RDSDataClient(rdsConfig);
return construct(instance, { resourceArn, database, secretArn, ...drizzleConfig });
}
((drizzle2) => {
function mock(config) {
return construct({}, config);
}
drizzle2.mock = mock;
})(drizzle || (drizzle = {}));
export {
AwsDataApiPgDatabase,
AwsPgDialect,
drizzle
};
//# sourceMappingURL=driver.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"barcode.js","sources":["../../../src/icons/barcode.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Barcode\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA1djE0IiAvPgogIDxwYXRoIGQ9Ik04IDV2MTQiIC8+CiAgPHBhdGggZD0iTTEyIDV2MTQiIC8+CiAgPHBhdGggZD0iTTE3IDV2MTQiIC8+CiAgPHBhdGggZD0iTTIxIDV2MTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/barcode\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 Barcode = createLucideIcon('Barcode', [\n ['path', { d: 'M3 5v14', key: '1nt18q' }],\n ['path', { d: 'M8 5v14', key: '1ybrkv' }],\n ['path', { d: 'M12 5v14', key: 's699le' }],\n ['path', { d: 'M17 5v14', key: 'ycjyhj' }],\n ['path', { d: 'M21 5v14', key: 'nzette' }],\n]);\n\nexport default Barcode;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,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,CAAA,CACxC,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,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,73 @@
# OpenTelemetry Core
[![NPM Published Version][npm-img]][npm-url]
[![Apache License][license-image]][license-image]
This package provides default implementations of the OpenTelemetry API for trace and metrics. It's intended for use both on the server and in the browser.
## Built-in Implementations
- [OpenTelemetry Core](#opentelemetry-core)
- [Built-in Implementations](#built-in-implementations)
- [Built-in Propagators](#built-in-propagators)
- [W3CTraceContextPropagator Propagator](#w3ctracecontextpropagator-propagator)
- [Composite Propagator](#composite-propagator)
- [Baggage Propagator](#baggage-propagator)
- [Useful links](#useful-links)
- [License](#license)
### Built-in Propagators
#### W3CTraceContextPropagator Propagator
OpenTelemetry provides a text-based approach to propagate context to remote services using the [W3C Trace Context](https://www.w3.org/TR/trace-context/) HTTP headers.
```js
const api = require("@opentelemetry/api");
const { W3CTraceContextPropagator } = require("@opentelemetry/core");
/* Set Global Propagator */
api.propagation.setGlobalPropagator(new W3CTraceContextPropagator());
```
#### Composite Propagator
Combines multiple propagators into a single propagator.
> This is used as a default Propagator
```js
const api = require("@opentelemetry/api");
const { CompositePropagator } = require("@opentelemetry/core");
/* Set Global Propagator */
api.propagation.setGlobalPropagator(new CompositePropagator());
```
#### Baggage Propagator
Provides a text-based approach to propagate [baggage](https://w3c.github.io/baggage/) to remote services using the [OpenTelemetry Baggage Propagation](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/baggage/api.md#baggage-propagation) HTTP headers.
```js
const api = require("@opentelemetry/api");
const { W3CBaggagePropagator } = require("@opentelemetry/core");
/* Set Global Propagator */
api.propagation.setGlobalPropagator(new W3CBaggagePropagator());
```
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
## License
Apache 2.0 - See [LICENSE][license-url] for more information.
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/core
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fcore.svg

View File

@@ -0,0 +1 @@
{"version":3,"file":"with-options.cjs","names":["options"],"sources":["../../../src/rest/helpers/with-options.ts"],"sourcesContent":["import type { RequestTransformer } from '../../index.js';\nimport type { RestCommand } from '../types.js';\n\n/**\n * Add arbitrary options to a fetch request\n *\n * @param getOptions\n * @param onRequest\n *\n * @returns\n */\nexport function withOptions<Schema, Output>(\n\tgetOptions: RestCommand<Output, Schema>,\n\textraOptions: RequestTransformer | Partial<RequestInit>,\n): RestCommand<Output, Schema> {\n\treturn () => {\n\t\tconst options = getOptions();\n\n\t\tif (typeof extraOptions === 'function') {\n\t\t\toptions.onRequest = extraOptions;\n\t\t} else {\n\t\t\toptions.onRequest = (options) => ({\n\t\t\t\t...options,\n\t\t\t\t...extraOptions,\n\t\t\t});\n\t\t}\n\n\t\treturn options;\n\t};\n}\n"],"mappings":"AAWA,SAAgB,EACf,EACA,EAC8B,CAC9B,UAAa,CACZ,IAAM,EAAU,GAAY,CAW5B,OATI,OAAO,GAAiB,WAC3B,EAAQ,UAAY,EAEpB,EAAQ,UAAa,IAAa,CACjC,GAAGA,EACH,GAAG,EACH,EAGK"}

View File

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

View File

@@ -0,0 +1,26 @@
"use strict";
exports.isThursday = isThursday;
var _index = require("./toDate.js");
/**
* @name isThursday
* @category Weekday Helpers
* @summary Is the given date Thursday?
*
* @description
* Is the given date Thursday?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to check
*
* @returns The date is Thursday
*
* @example
* // Is 25 September 2014 Thursday?
* const result = isThursday(new Date(2014, 8, 25))
* //=> true
*/
function isThursday(date) {
return (0, _index.toDate)(date).getDay() === 4;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"isRrwebError.d.ts","sourceRoot":"","sources":["../../../../src/util/isRrwebError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErD;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAWnE"}

View File

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

View File

@@ -0,0 +1,2 @@
export { unleashIntegration } from './integration';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,219 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const attributes = require('../attributes.js');
const carrier = require('../carrier.js');
const currentScopes = require('../currentScopes.js');
const debugBuild = require('../debug-build.js');
const debugLogger = require('../utils/debug-logger.js');
const is = require('../utils/is.js');
const scopeData = require('../utils/scopeData.js');
const spanOnScope = require('../utils/spanOnScope.js');
const time = require('../utils/time.js');
const traceInfo = require('../utils/trace-info.js');
const constants = require('./constants.js');
const envelope = require('./envelope.js');
const MAX_LOG_BUFFER_SIZE = 100;
/**
* Sets a log attribute if the value exists and the attribute key is not already present.
*
* @param logAttributes - The log attributes object to modify.
* @param key - The attribute key to set.
* @param value - The value to set (only sets if truthy and key not present).
* @param setEvenIfPresent - Whether to set the attribute if it is present. Defaults to true.
*/
function setLogAttribute(
logAttributes,
key,
value,
setEvenIfPresent = true,
) {
if (value && (!logAttributes[key] || setEvenIfPresent)) {
logAttributes[key] = value;
}
}
/**
* Captures a serialized log event and adds it to the log buffer for the given client.
*
* @param client - A client. Uses the current client if not provided.
* @param serializedLog - The serialized log event to capture.
*
* @experimental This method will experience breaking changes. This is not yet part of
* the stable Sentry SDK API and can be changed or removed without warning.
*/
function _INTERNAL_captureSerializedLog(client, serializedLog) {
const bufferMap = _getBufferMap();
const logBuffer = _INTERNAL_getLogBuffer(client);
if (logBuffer === undefined) {
bufferMap.set(client, [serializedLog]);
} else {
if (logBuffer.length >= MAX_LOG_BUFFER_SIZE) {
_INTERNAL_flushLogsBuffer(client, logBuffer);
bufferMap.set(client, [serializedLog]);
} else {
bufferMap.set(client, [...logBuffer, serializedLog]);
}
}
}
/**
* Captures a log event and sends it to Sentry.
*
* @param log - The log event to capture.
* @param scope - A scope. Uses the current scope if not provided.
* @param client - A client. Uses the current client if not provided.
* @param captureSerializedLog - A function to capture the serialized log.
*
* @experimental This method will experience breaking changes. This is not yet part of
* the stable Sentry SDK API and can be changed or removed without warning.
*/
function _INTERNAL_captureLog(
beforeLog,
currentScope = currentScopes.getCurrentScope(),
captureSerializedLog = _INTERNAL_captureSerializedLog,
) {
const client = currentScope?.getClient() ?? currentScopes.getClient();
if (!client) {
debugBuild.DEBUG_BUILD && debugLogger.debug.warn('No client available to capture log.');
return;
}
const { release, environment, enableLogs = false, beforeSendLog } = client.getOptions();
if (!enableLogs) {
debugBuild.DEBUG_BUILD && debugLogger.debug.warn('logging option not enabled, log will not be captured.');
return;
}
const [, traceContext] = traceInfo._getTraceInfoFromScope(client, currentScope);
const processedLogAttributes = {
...beforeLog.attributes,
};
const {
user: { id, email, username },
attributes: scopeAttributes = {},
} = scopeData.getCombinedScopeData(currentScopes.getIsolationScope(), currentScope);
setLogAttribute(processedLogAttributes, 'user.id', id, false);
setLogAttribute(processedLogAttributes, 'user.email', email, false);
setLogAttribute(processedLogAttributes, 'user.name', username, false);
setLogAttribute(processedLogAttributes, 'sentry.release', release);
setLogAttribute(processedLogAttributes, 'sentry.environment', environment);
const { name, version } = client.getSdkMetadata()?.sdk ?? {};
setLogAttribute(processedLogAttributes, 'sentry.sdk.name', name);
setLogAttribute(processedLogAttributes, 'sentry.sdk.version', version);
const replay = client.getIntegrationByName
('Replay');
const replayId = replay?.getReplayId(true);
setLogAttribute(processedLogAttributes, 'sentry.replay_id', replayId);
if (replayId && replay?.getRecordingMode() === 'buffer') {
// We send this so we can identify cases where the replayId is attached but the replay itself might not have been sent to Sentry
setLogAttribute(processedLogAttributes, 'sentry._internal.replay_is_buffering', true);
}
const beforeLogMessage = beforeLog.message;
if (is.isParameterizedString(beforeLogMessage)) {
const { __sentry_template_string__, __sentry_template_values__ = [] } = beforeLogMessage;
if (__sentry_template_values__?.length) {
processedLogAttributes['sentry.message.template'] = __sentry_template_string__;
}
__sentry_template_values__.forEach((param, index) => {
processedLogAttributes[`sentry.message.parameter.${index}`] = param;
});
}
const span = spanOnScope._getSpanForScope(currentScope);
// Add the parent span ID to the log attributes for trace context
setLogAttribute(processedLogAttributes, 'sentry.trace.parent_span_id', span?.spanContext().spanId);
const processedLog = { ...beforeLog, attributes: processedLogAttributes };
client.emit('beforeCaptureLog', processedLog);
// We need to wrap this in `consoleSandbox` to avoid recursive calls to `beforeSendLog`
const log = beforeSendLog ? debugLogger.consoleSandbox(() => beforeSendLog(processedLog)) : processedLog;
if (!log) {
client.recordDroppedEvent('before_send', 'log_item', 1);
debugBuild.DEBUG_BUILD && debugLogger.debug.warn('beforeSendLog returned null, log will not be captured.');
return;
}
const { level, message, attributes: logAttributes = {}, severityNumber } = log;
const serializedLog = {
timestamp: time.timestampInSeconds(),
level,
body: message,
trace_id: traceContext?.trace_id,
severity_number: severityNumber ?? constants.SEVERITY_TEXT_TO_SEVERITY_NUMBER[level],
attributes: {
...attributes.serializeAttributes(scopeAttributes),
...attributes.serializeAttributes(logAttributes, true),
},
};
captureSerializedLog(client, serializedLog);
client.emit('afterCaptureLog', log);
}
/**
* Flushes the logs buffer to Sentry.
*
* @param client - A client.
* @param maybeLogBuffer - A log buffer. Uses the log buffer for the given client if not provided.
*
* @experimental This method will experience breaking changes. This is not yet part of
* the stable Sentry SDK API and can be changed or removed without warning.
*/
function _INTERNAL_flushLogsBuffer(client, maybeLogBuffer) {
const logBuffer = maybeLogBuffer ?? _INTERNAL_getLogBuffer(client) ?? [];
if (logBuffer.length === 0) {
return;
}
const clientOptions = client.getOptions();
const envelope$1 = envelope.createLogEnvelope(logBuffer, clientOptions._metadata, clientOptions.tunnel, client.getDsn());
// Clear the log buffer after envelopes have been constructed.
_getBufferMap().set(client, []);
client.emit('flushLogs');
// sendEnvelope should not throw
// eslint-disable-next-line @typescript-eslint/no-floating-promises
client.sendEnvelope(envelope$1);
}
/**
* Returns the log buffer for a given client.
*
* Exported for testing purposes.
*
* @param client - The client to get the log buffer for.
* @returns The log buffer for the given client.
*/
function _INTERNAL_getLogBuffer(client) {
return _getBufferMap().get(client);
}
function _getBufferMap() {
// The reference to the Client <> LogBuffer map is stored on the carrier to ensure it's always the same
return carrier.getGlobalSingleton('clientToLogBufferMap', () => new WeakMap());
}
exports._INTERNAL_captureLog = _INTERNAL_captureLog;
exports._INTERNAL_captureSerializedLog = _INTERNAL_captureSerializedLog;
exports._INTERNAL_flushLogsBuffer = _INTERNAL_flushLogsBuffer;
exports._INTERNAL_getLogBuffer = _INTERNAL_getLogBuffer;
//# sourceMappingURL=internal.js.map

View File

@@ -0,0 +1,4 @@
import React from 'react';
import './index.scss';
export declare function SortByPill(): React.JSX.Element;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,41 @@
import type {
ContextOptions,
DateArg,
LocalizedOptions,
WeekOptions,
} from "./types.js";
/**
* The {@link getWeeksInMonth} function options.
*/
export interface GetWeeksInMonthOptions
extends LocalizedOptions<"options">,
WeekOptions,
ContextOptions<Date> {}
/**
* @name getWeeksInMonth
* @category Week Helpers
* @summary Get the number of calendar weeks a month spans.
*
* @description
* Get the number of calendar weeks the month in the given date spans.
*
* @param date - The given date
* @param options - An object with options.
*
* @returns The number of calendar weeks
*
* @example
* // How many calendar weeks does February 2015 span?
* const result = getWeeksInMonth(new Date(2015, 1, 8))
* //=> 4
*
* @example
* // If the week starts on Monday,
* // how many calendar weeks does July 2017 span?
* const result = getWeeksInMonth(new Date(2017, 6, 5), { weekStartsOn: 1 })
* //=> 6
*/
export declare function getWeeksInMonth(
date: DateArg<Date> & {},
options?: GetWeeksInMonthOptions | undefined,
): number;

View File

@@ -0,0 +1,13 @@
'use strict';
var assert = require('assert');
var EventEmitter = require('../');
var EE = new EventEmitter();
assert.throws(function () {
EE.emit('error', 'Accepts a string');
}, 'Error: Unhandled error. (Accepts a string)');
assert.throws(function () {
EE.emit('error', { message: 'Error!' });
}, 'Unhandled error. ([object Object])');

View File

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

View File

@@ -0,0 +1,189 @@
/**
* Original by Samuel Flores
*
* Adds the following new token classes:
* constant, builtin, variable, symbol, regex
*/
(function (Prism) {
Prism.languages.ruby = Prism.languages.extend('clike', {
'comment': {
pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
greedy: true
},
'class-name': {
pattern: /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
lookbehind: true,
inside: {
'punctuation': /[.\\]/
}
},
'keyword': /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,
'operator': /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
'punctuation': /[(){}[\].,;]/,
});
Prism.languages.insertBefore('ruby', 'operator', {
'double-colon': {
pattern: /::/,
alias: 'punctuation'
},
});
var interpolation = {
pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
lookbehind: true,
inside: {
'content': {
pattern: /^(#\{)[\s\S]+(?=\}$)/,
lookbehind: true,
inside: Prism.languages.ruby
},
'delimiter': {
pattern: /^#\{|\}$/,
alias: 'punctuation'
}
}
};
delete Prism.languages.ruby.function;
var percentExpression = '(?:' + [
/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
].join('|') + ')';
var symbolName = /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;
Prism.languages.insertBefore('ruby', 'keyword', {
'regex-literal': [
{
pattern: RegExp(/%r/.source + percentExpression + /[egimnosux]{0,6}/.source),
greedy: true,
inside: {
'interpolation': interpolation,
'regex': /[\s\S]+/
}
},
{
pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
lookbehind: true,
greedy: true,
inside: {
'interpolation': interpolation,
'regex': /[\s\S]+/
}
}
],
'variable': /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
'symbol': [
{
pattern: RegExp(/(^|[^:]):/.source + symbolName),
lookbehind: true,
greedy: true
},
{
pattern: RegExp(/([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source),
lookbehind: true,
greedy: true
},
],
'method-definition': {
pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
lookbehind: true,
inside: {
'function': /\b\w+$/,
'keyword': /^self\b/,
'class-name': /^\w+/,
'punctuation': /\./
}
}
});
Prism.languages.insertBefore('ruby', 'string', {
'string-literal': [
{
pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
greedy: true,
inside: {
'interpolation': interpolation,
'string': /[\s\S]+/
}
},
{
pattern: /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
greedy: true,
inside: {
'interpolation': interpolation,
'string': /[\s\S]+/
}
},
{
pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
alias: 'heredoc-string',
greedy: true,
inside: {
'delimiter': {
pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
inside: {
'symbol': /\b\w+/,
'punctuation': /^<<[-~]?/
}
},
'interpolation': interpolation,
'string': /[\s\S]+/
}
},
{
pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
alias: 'heredoc-string',
greedy: true,
inside: {
'delimiter': {
pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
inside: {
'symbol': /\b\w+/,
'punctuation': /^<<[-~]?'|'$/,
}
},
'string': /[\s\S]+/
}
}
],
'command-literal': [
{
pattern: RegExp(/%x/.source + percentExpression),
greedy: true,
inside: {
'interpolation': interpolation,
'command': {
pattern: /[\s\S]+/,
alias: 'string'
}
}
},
{
pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
greedy: true,
inside: {
'interpolation': interpolation,
'command': {
pattern: /[\s\S]+/,
alias: 'string'
}
}
}
]
});
delete Prism.languages.ruby.string;
Prism.languages.insertBefore('ruby', 'number', {
'builtin': /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,
'constant': /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
});
Prism.languages.rb = Prism.languages.ruby;
}(Prism));

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAMA,OAAoB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,CAE9D;AAED,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAClF,WAAW,GACX,SAAS,CAEZ;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA2DrE;AAmBD,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG;IACzD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,CAqBA;AAqCD;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAmBhD;AAeD;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,SAAS,CA0FzD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,OAAO,EACP,sBAAsB,GACvB,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,OAAO,CAAC;CACjC,GAAG,aAAa,CAUhB;AAGD,wBAAgB,kCAAkC,CAAC,QAAQ,EAAE,GAAG,GAAG,aAAa,CAQ/E;AAED,wBAAgB,mBAAmB,IAAI;IACrC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,CAYA;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG9D;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,GACrD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,SAAS,CAAA;CAAE,GAAG,IAAI,CAmBzC;AAGD,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAI5E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CAUxF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAa3F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAkBzD;AAED,qBAAa,aAAa;IAMZ,OAAO,CAAC,IAAI;IAHxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2K;IAClM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;gBAExB,IAAI,GAAE,MAAW;IAE9B,IAAI,IAAI,MAAM;IAQd,OAAO,IAAI,OAAO;IAIlB,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI;IAQ1C,KAAK,IAAI,IAAI;IAIb,KAAK,IAAI,aAAa;CAG9B"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"selectDistinct.d.ts","sourceRoot":"","sources":["../../src/queries/selectDistinct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEzE,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,aAAa,EAEd,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAE5D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,cAAc,CAAA;IACvB,EAAE,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,kBAAkB,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,qBAAqB,CAAA;IAC5B,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,YAAY,CAAA;KAAE,KAAK,YAAY,CAAA;IACvD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,GAAG,CAAA;CACX,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,2GAUxB,IAAI,KAAG,YAAY,CAAC;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAmC/E,CAAA"}

View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _temporalRef;
var _temporalUndefined = require("./temporalUndefined.js");
var _tdz = require("./tdz.js");
function _temporalRef(val, name) {
return val === _temporalUndefined.default ? (0, _tdz.default)(name) : val;
}
//# sourceMappingURL=temporalRef.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mysql2.js","sources":["../../../../src/integrations/tracing/mysql2.ts"],"sourcesContent":["import { MySQL2Instrumentation } from '@opentelemetry/instrumentation-mysql2';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Mysql2';\n\nexport const instrumentMysql2 = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new MySQL2Instrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mysql2');\n },\n }),\n);\n\nconst _mysql2Integration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentMysql2();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [mysql2](https://www.npmjs.com/package/mysql2) library.\n *\n * For more information, see the [`mysql2Integration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql2/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.mysqlIntegration()],\n * });\n * ```\n */\nexport const mysql2Integration = defineIntegration(_mysql2Integration);\n"],"names":["generateInstrumentOnce","MySQL2Instrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,QAAQ;;AAE1B,MAAM,gBAAA,GAAmBA,+BAAsB;AACtD,EAAE,gBAAgB;AAClB,EAAE;AACF,IAAI,IAAIC,2CAAqB,CAAC;AAC9B,MAAM,YAAY,CAAC,IAAI,EAAE;AACzB,QAAQC,wBAAe,CAAC,IAAI,EAAE,qBAAqB,CAAC;AACpD,MAAM,CAAC;AACP,KAAK,CAAC;AACN;;AAEA,MAAM,kBAAA,IAAsB,MAAM;AAClC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,gBAAgB,EAAE;AACxB,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,iBAAA,GAAoBC,sBAAiB,CAAC,kBAAkB;;;;;"}

View File

@@ -0,0 +1,76 @@
import { c as createIntlFormatters, b as createCache } from './formatters-r4aAmsMP.js';
export { I as IntlError, a as IntlErrorCode } from './formatters-r4aAmsMP.js';
import { r as resolveNamespace, a as createBaseTranslator, d as defaultGetMessageFallback, b as defaultOnError } from './initializeConfig-DzxNJxi9.js';
export { c as createFormatter, i as initializeConfig } from './initializeConfig-DzxNJxi9.js';
function createTranslatorImpl({
messages,
namespace,
...rest
}, namespacePrefix) {
// The `namespacePrefix` is part of the type system.
// See the comment in the function invocation.
messages = messages[namespacePrefix];
namespace = resolveNamespace(namespace, namespacePrefix);
return createBaseTranslator({
...rest,
messages,
namespace
});
}
// This type is slightly more loose than `AbstractIntlMessages`
// in order to avoid a type error.
/**
* @private Not intended for direct use.
*/
/**
* Translates messages from the given namespace by using the ICU syntax.
* See https://formatjs.io/docs/core-concepts/icu-syntax.
*
* If no namespace is provided, all available messages are returned.
* The namespace can also indicate nesting by using a dot
* (e.g. `namespace.Component`).
*/
function createTranslator({
_cache = createCache(),
_formatters = createIntlFormatters(_cache),
getMessageFallback = defaultGetMessageFallback,
messages,
namespace,
onError = defaultOnError,
...rest
}) {
// We have to wrap the actual function so the type inference for the optional
// namespace works correctly. See https://stackoverflow.com/a/71529575/343045
// The prefix ("!") is arbitrary.
// @ts-expect-error Use the explicit annotation instead
return createTranslatorImpl({
...rest,
onError,
cache: _cache,
formatters: _formatters,
getMessageFallback,
// @ts-expect-error `messages` is allowed to be `undefined` here and will be handled internally
messages: {
'!': messages
},
namespace: namespace ? `!.${namespace}` : '!'
}, '!');
}
/**
* Checks if a locale exists in a list of locales.
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale
*/
function hasLocale(locales, candidate) {
return locales.includes(candidate);
}
export { createCache as _createCache, createIntlFormatters as _createIntlFormatters, createTranslator, hasLocale };

View File

@@ -0,0 +1,127 @@
"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 enum_exports = {};
__export(enum_exports, {
PgEnumColumn: () => PgEnumColumn,
PgEnumColumnBuilder: () => PgEnumColumnBuilder,
PgEnumObjectColumn: () => PgEnumObjectColumn,
PgEnumObjectColumnBuilder: () => PgEnumObjectColumnBuilder,
isPgEnum: () => isPgEnum,
pgEnum: () => pgEnum,
pgEnumObjectWithSchema: () => pgEnumObjectWithSchema,
pgEnumWithSchema: () => pgEnumWithSchema
});
module.exports = __toCommonJS(enum_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class PgEnumObjectColumnBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgEnumObjectColumnBuilder";
constructor(name, enumInstance) {
super(name, "string", "PgEnumObjectColumn");
this.config.enum = enumInstance;
}
/** @internal */
build(table) {
return new PgEnumObjectColumn(
table,
this.config
);
}
}
class PgEnumObjectColumn extends import_common.PgColumn {
static [import_entity.entityKind] = "PgEnumObjectColumn";
enum;
enumValues = this.config.enum.enumValues;
constructor(table, config) {
super(table, config);
this.enum = config.enum;
}
getSQLType() {
return this.enum.enumName;
}
}
const isPgEnumSym = Symbol.for("drizzle:isPgEnum");
function isPgEnum(obj) {
return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
}
class PgEnumColumnBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgEnumColumnBuilder";
constructor(name, enumInstance) {
super(name, "string", "PgEnumColumn");
this.config.enum = enumInstance;
}
/** @internal */
build(table) {
return new PgEnumColumn(
table,
this.config
);
}
}
class PgEnumColumn extends import_common.PgColumn {
static [import_entity.entityKind] = "PgEnumColumn";
enum = this.config.enum;
enumValues = this.config.enum.enumValues;
constructor(table, config) {
super(table, config);
this.enum = config.enum;
}
getSQLType() {
return this.enum.enumName;
}
}
function pgEnum(enumName, input) {
return Array.isArray(input) ? pgEnumWithSchema(enumName, [...input], void 0) : pgEnumObjectWithSchema(enumName, input, void 0);
}
function pgEnumWithSchema(enumName, values, schema) {
const enumInstance = Object.assign(
(name) => new PgEnumColumnBuilder(name ?? "", enumInstance),
{
enumName,
enumValues: values,
schema,
[isPgEnumSym]: true
}
);
return enumInstance;
}
function pgEnumObjectWithSchema(enumName, values, schema) {
const enumInstance = Object.assign(
(name) => new PgEnumObjectColumnBuilder(name ?? "", enumInstance),
{
enumName,
enumValues: Object.values(values),
schema,
[isPgEnumSym]: true
}
);
return enumInstance;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgEnumColumn,
PgEnumColumnBuilder,
PgEnumObjectColumn,
PgEnumObjectColumnBuilder,
isPgEnum,
pgEnum,
pgEnumObjectWithSchema,
pgEnumWithSchema
});
//# sourceMappingURL=enum.cjs.map

View File

@@ -0,0 +1,3 @@
import type { DrizzleSnapshotJSON } from 'drizzle-kit/api';
export declare const defaultDrizzleSnapshot: DrizzleSnapshotJSON;
//# sourceMappingURL=defaultSnapshot.d.ts.map

View File

@@ -0,0 +1,125 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
export const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "nombro";
}
case "object": {
if (Array.isArray(data)) {
return "tabelo";
}
if (data === null) {
return "senvalora";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "karaktrojn", verb: "havi" },
file: { unit: "bajtojn", verb: "havi" },
array: { unit: "elementojn", verb: "havi" },
set: { unit: "elementojn", verb: "havi" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "enigo",
email: "retadreso",
url: "URL",
emoji: "emoĝio",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO-datotempo",
date: "ISO-dato",
time: "ISO-tempo",
duration: "ISO-daŭro",
ipv4: "IPv4-adreso",
ipv6: "IPv6-adreso",
cidrv4: "IPv4-rango",
cidrv6: "IPv6-rango",
base64: "64-ume kodita karaktraro",
base64url: "URL-64-ume kodita karaktraro",
json_string: "JSON-karaktraro",
e164: "E.164-nombro",
jwt: "JWT",
template_literal: "enigo",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Nevalida enigo: atendiĝis ${issue.expected}, riceviĝis ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Nevalida enigo: atendiĝis ${util.stringifyPrimitive(issue.values[0])}`;
return `Nevalida opcio: atendiĝis unu el ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Tro malgranda: atendiĝis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Tro malgranda: atendiĝis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
return `Nevalida ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;
case "unrecognized_keys":
return `Nekonata${issue.keys.length > 1 ? "j" : ""} ŝlosilo${issue.keys.length > 1 ? "j" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Nevalida ŝlosilo en ${issue.origin}`;
case "invalid_union":
return "Nevalida enigo";
case "invalid_element":
return `Nevalida valoro en ${issue.origin}`;
default:
return `Nevalida enigo`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,36 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE, do MMMM y 'ж.'",
long: "do MMMM y 'ж.'",
medium: "d MMM y 'ж.'",
short: "dd.MM.yyyy",
};
const timeFormats = {
full: "H:mm:ss zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
any: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "any",
}),
};

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 WashingMachine = createLucideIcon("WashingMachine", [
["path", { d: "M3 6h3", key: "155dbl" }],
["path", { d: "M17 6h.01", key: "e2y6kg" }],
["rect", { width: "18", height: "20", x: "3", y: "2", rx: "2", key: "od3kk9" }],
["circle", { cx: "12", cy: "13", r: "5", key: "nlbqau" }],
["path", { d: "M12 18a2.5 2.5 0 0 0 0-5 2.5 2.5 0 0 1 0-5", key: "17lach" }]
]);
export { WashingMachine as default };
//# sourceMappingURL=washing-machine.js.map

View File

@@ -0,0 +1,9 @@
var arrayLikeToArray = require("./arrayLikeToArray.js");
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
}
}
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,43 @@
import { SentryVercelAiInstrumentation } from './instrumentation';
import { VercelAiOptions } from './types';
export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiInstrumentation) & {
id: string;
};
/**
* Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
* This integration is not enabled by default, you need to manually add it.
*
* For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.vercelAIIntegration()],
* });
* ```
*
* This integration adds tracing support to all `ai` function calls.
* You need to opt-in to collecting spans for a specific call,
* you can do so by setting `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.
*
* ```javascript
* const result = await generateText({
* model: openai('gpt-4-turbo'),
* experimental_telemetry: { isEnabled: true },
* });
* ```
*
* If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each
* function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`
* to `true`.
*
* ```javascript
* const result = await generateText({
* model: openai('gpt-4-turbo'),
* experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },
* });
*/
export declare const vercelAIIntegration: (options?: VercelAiOptions | undefined) => import("@sentry/core").Integration;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"createSchemaGenerator.d.ts","sourceRoot":"","sources":["../../src/utilities/createSchemaGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAM7C,OAAO,KAAK,EAAE,qBAAqB,EAAkB,MAAM,aAAa,CAAA;AAkCxE,eAAO,MAAM,qBAAqB,4GAO/B;IACD,qBAAqB,EAAE,qBAAqB,CAAA;IAC5C,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;CACpB,KAAG,cAmQH,CAAA"}

View File

@@ -0,0 +1,27 @@
# base64-arraybuffer
![CI](https://github.com/niklasvh/base64-arraybuffer/workflows/CI/badge.svg?branch=master)
[![NPM Downloads](https://img.shields.io/npm/dm/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer)
[![NPM Version](https://img.shields.io/npm/v/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer)
Encode/decode base64 data into ArrayBuffers
### Installing
You can install the module via npm:
npm install base64-arraybuffer
## API
The library encodes and decodes base64 to and from ArrayBuffers
- __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string
- __decode(str)__ - Decodes base64 string to `ArrayBuffer`
### Testing
You can run the test suite with:
npm test
## License
Copyright (c) 2012 Niklas von Hertzen
Licensed under the MIT license.

View File

@@ -0,0 +1 @@
{"version":3,"file":"dataloader.js","sources":["../../../../src/integrations/tracing/dataloader.ts"],"sourcesContent":["import { DataloaderInstrumentation } from '@opentelemetry/instrumentation-dataloader';\nimport type { IntegrationFn } from '@sentry/core';\nimport {\n defineIntegration,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n spanToJSON,\n} from '@sentry/core';\nimport { generateInstrumentOnce, instrumentWhenWrapped } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Dataloader';\n\nexport const instrumentDataloader = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new DataloaderInstrumentation({\n requireParentSpan: true,\n }),\n);\n\nconst _dataloaderIntegration = (() => {\n let instrumentationWrappedCallback: undefined | ((callback: () => void) => void);\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const instrumentation = instrumentDataloader();\n instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);\n },\n\n setup(client) {\n // This is called either immediately or when the instrumentation is wrapped\n instrumentationWrappedCallback?.(() => {\n client.on('spanStart', span => {\n const spanJSON = spanToJSON(span);\n if (spanJSON.description?.startsWith('dataloader')) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.dataloader');\n }\n\n // These are all possible dataloader span descriptions\n // Still checking for the future versions\n // in case they add support for `clear` and `prime`\n if (\n spanJSON.description === 'dataloader.load' ||\n spanJSON.description === 'dataloader.loadMany' ||\n spanJSON.description === 'dataloader.batch'\n ) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'cache.get');\n // TODO: We can try adding `key` to the `data` attribute upstream.\n // Or alternatively, we can add `requestHook` to the dataloader instrumentation.\n }\n });\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library.\n *\n * For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.dataloaderIntegration()],\n * });\n * ```\n */\nexport const dataloaderIntegration = defineIntegration(_dataloaderIntegration);\n"],"names":["generateInstrumentOnce","DataloaderInstrumentation","instrumentWhenWrapped","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_SENTRY_OP","defineIntegration"],"mappings":";;;;;;AAUA,MAAM,gBAAA,GAAmB,YAAY;;AAE9B,MAAM,oBAAA,GAAuBA,+BAAsB;AAC1D,EAAE,gBAAgB;AAClB,EAAE;AACF,IAAI,IAAIC,mDAAyB,CAAC;AAClC,MAAM,iBAAiB,EAAE,IAAI;AAC7B,KAAK,CAAC;AACN;;AAEA,MAAM,sBAAA,IAA0B,MAAM;AACtC,EAAE,IAAI,8BAA8B;;AAEpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,MAAM,eAAA,GAAkB,oBAAoB,EAAE;AACpD,MAAM,8BAAA,GAAiCC,8BAAqB,CAAC,eAAe,CAAC;AAC7E,IAAI,CAAC;;AAEL,IAAI,KAAK,CAAC,MAAM,EAAE;AAClB;AACA,MAAM,8BAA8B,GAAG,MAAM;AAC7C,QAAQ,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ;AACvC,UAAU,MAAM,QAAA,GAAWC,eAAU,CAAC,IAAI,CAAC;AAC3C,UAAU,IAAI,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE;AAC9D,YAAY,IAAI,CAAC,YAAY,CAACC,qCAAgC,EAAE,yBAAyB,CAAC;AAC1F,UAAU;;AAEV;AACA;AACA;AACA,UAAU;AACV,YAAY,QAAQ,CAAC,WAAA,KAAgB,iBAAA;AACrC,YAAY,QAAQ,CAAC,WAAA,KAAgB,qBAAA;AACrC,YAAY,QAAQ,CAAC,WAAA,KAAgB;AACrC,YAAY;AACZ,YAAY,IAAI,CAAC,YAAY,CAACC,iCAA4B,EAAE,WAAW,CAAC;AACxE;AACA;AACA,UAAU;AACV,QAAQ,CAAC,CAAC;AACV,MAAM,CAAC,CAAC;AACR,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,qBAAA,GAAwBC,sBAAiB,CAAC,sBAAsB;;;;;"}

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 './square-arrow-out-up-left.js';
//# sourceMappingURL=arrow-up-left-from-square.js.map

View File

@@ -0,0 +1,69 @@
# OpenTelemetry `fs` Instrumentation for Node.js
[![NPM Published Version][npm-img]][npm-url]
[![Apache License][license-image]][license-image]
This module provides automatic instrumentation for the [`fs`](http://nodejs.org/dist/latest/docs/api/fs.html) module, which can be registered using the [`@opentelemetry/instrumentation`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-instrumentation) package.
Compatible with OpenTelemetry JS API `1.3+`.
See the full list of instrumented functions in [constants.ts](src/constants.ts);
## Installation
```bash
npm install --save @opentelemetry/instrumentation-fs
```
## Supported Versions
- Node.js `>=18`
## Usage
```js
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { FsInstrumentation } = require('@opentelemetry/instrumentation-fs');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const provider = new NodeTracerProvider();
provider.register();
registerInstrumentations({
instrumentations: [
new FsInstrumentation({
// see below for available configuration
}),
],
});
```
### Instrumentation Options
You can set the following:
| Options | Type | Description |
| ------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `createHook` | `(functionName: FMember \| FPMember, info: { args: ArrayLike<unknown> }) => boolean` | Hook called before creating the span. If `false` is returned this and all the sibling calls will not be traced. |
| `endHook` | `( functionName: FMember \| FPMember, info: { args: ArrayLike<unknown>; span: api.Span } ) => void` | Function called just before the span is ended. Useful for adding attributes. |
| `requireParentSpan` | `boolean` | Require parent to create fs span, default when unset is `false`. |
## Semantic Conventions
This package does not currently generate any attributes from semantic conventions.
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
## License
Apache 2.0 - See [LICENSE][license-url] for more information.
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-fs
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-fs.svg

View File

@@ -0,0 +1,56 @@
import gensync, { type Handler } from "gensync";
import loadConfig from "./config/index.ts";
import type { InputOptions, ResolvedConfig } from "./config/index.ts";
import { run } from "./transformation/index.ts";
import type { FileResult, FileResultCallback } from "./transformation/index.ts";
import * as fs from "./gensync-utils/fs.ts";
type transformFileBrowserType = typeof import("./transform-file-browser");
type transformFileType = typeof import("./transform-file");
// Kind of gross, but essentially asserting that the exports of this module are the same as the
// exports of transform-file-browser, since this file may be replaced at bundle time with
// transform-file-browser.
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
({}) as any as transformFileBrowserType as transformFileType;
const transformFileRunner = gensync(function* (
filename: string,
opts?: InputOptions,
): Handler<FileResult | null> {
const options = { ...opts, filename };
const config: ResolvedConfig | null = yield* loadConfig(options);
if (config === null) return null;
const code = yield* fs.readFile(filename, "utf8");
return yield* run(config, code);
});
// @ts-expect-error TS doesn't detect that this signature is compatible
export function transformFile(
filename: string,
callback: FileResultCallback,
): void;
export function transformFile(
filename: string,
opts: InputOptions | undefined | null,
callback: FileResultCallback,
): void;
export function transformFile(
...args: Parameters<typeof transformFileRunner.errback>
) {
transformFileRunner.errback(...args);
}
export function transformFileSync(
...args: Parameters<typeof transformFileRunner.sync>
) {
return transformFileRunner.sync(...args);
}
export function transformFileAsync(
...args: Parameters<typeof transformFileRunner.async>
) {
return transformFileRunner.async(...args);
}

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