main and exports point to dist
This commit is contained in:
Vendored
+1
-1
@@ -14,6 +14,6 @@
|
||||
} : {}
|
||||
});
|
||||
return result;
|
||||
} //# sourceMappingURL=getGlobal.js.map
|
||||
}
|
||||
|
||||
//# sourceMappingURL=getGlobal.js.map
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"sources":["getGlobal.js"],"sourcesContent":["import type { BasePayload } from 'payload'\n\n/** Locale argument accepted by the global helpers. */\nexport type GlobalQueryOptions = {\n /** Relationship population depth. Defaults to Payload's config default. */\n depth?: number\n /** Locale to fetch, or 'all' for every locale's values. Defaults to Payload's default. */\n locale?: string\n}\n\n/**\n * Thin wrapper over payload.findGlobal that keeps locale/depth handling in one\n * place. The plugin never calls getPayload itself — the caller passes the\n * instance (from getPayload in their app, or req.payload in a hook), matching\n * the plugin's data-access rule: logic here, instance from outside.\n */\nexport async function getGlobal<T = Record<string, unknown>>(\n payload: BasePayload,\n slug: string,\n options: GlobalQueryOptions = {},\n): Promise<T> {\n const result = await payload.findGlobal({\n slug,\n ...(options.locale ? { locale: options.locale as never } : {}),\n ...(typeof options.depth === 'number' ? { depth: options.depth } : {}),\n })\n\n return result as T\n}\n"],"names":["getGlobal","payload","slug","options","result","findGlobal","locale","depth"],"mappings":"AAUA;;;;;CAKC,GACD,OAAO,eAAeA,UACpBC,OAAoB,EACpBC,IAAY,EACZC,UAA8B,CAAC,CAAC;IAEhC,MAAMC,SAAS,MAAMH,QAAQI,UAAU,CAAC;QACtCH;QACA,GAAIC,QAAQG,MAAM,GAAG;YAAEA,QAAQH,QAAQG,MAAM;QAAU,IAAI,CAAC,CAAC;QAC7D,GAAI,OAAOH,QAAQI,KAAK,KAAK,WAAW;YAAEA,OAAOJ,QAAQI,KAAK;QAAC,IAAI,CAAC,CAAC;IACvE;IAEA,OAAOH;AACT"}
|
||||
{"version":3,"sources":["../../../src/modules/payload/getGlobal.ts"],"sourcesContent":["import type { BasePayload } from 'payload'\n\n/** Locale argument accepted by the global helpers. */\nexport type GlobalQueryOptions = {\n /** Relationship population depth. Defaults to Payload's config default. */\n depth?: number\n /** Locale to fetch, or 'all' for every locale's values. Defaults to Payload's default. */\n locale?: string\n}\n\n/**\n * Thin wrapper over payload.findGlobal that keeps locale/depth handling in one\n * place. The plugin never calls getPayload itself — the caller passes the\n * instance (from getPayload in their app, or req.payload in a hook), matching\n * the plugin's data-access rule: logic here, instance from outside.\n */\nexport async function getGlobal<T = Record<string, unknown>>(\n payload: BasePayload,\n slug: string,\n options: GlobalQueryOptions = {},\n): Promise<T> {\n const result = await payload.findGlobal({\n slug,\n ...(options.locale ? { locale: options.locale as never } : {}),\n ...(typeof options.depth === 'number' ? { depth: options.depth } : {}),\n })\n\n return result as T\n}\n"],"names":["getGlobal","payload","slug","options","result","findGlobal","locale","depth"],"mappings":"AAUA;;;;;CAKC,GACD,OAAO,eAAeA,UACpBC,OAAoB,EACpBC,IAAY,EACZC,UAA8B,CAAC,CAAC;IAEhC,MAAMC,SAAS,MAAMH,QAAQI,UAAU,CAAC;QACtCH;QACA,GAAIC,QAAQG,MAAM,GAAG;YAAEA,QAAQH,QAAQG,MAAM;QAAU,IAAI,CAAC,CAAC;QAC7D,GAAI,OAAOH,QAAQI,KAAK,KAAK,WAAW;YAAEA,OAAOJ,QAAQI,KAAK;QAAC,IAAI,CAAC,CAAC;IACvE;IAEA,OAAOH;AACT"}
|
||||
+1
-1
@@ -17,6 +17,6 @@ import { getGlobal } from './getGlobal.js';
|
||||
* const integrations = await getSiteIntegrations<SiteIntegration>(payload)
|
||||
*/ export function getSiteIntegrations(payload, options) {
|
||||
return getGlobal(payload, SITE_INTEGRATIONS_SLUG, options);
|
||||
} //# sourceMappingURL=getSiteIntegrations.js.map
|
||||
}
|
||||
|
||||
//# sourceMappingURL=getSiteIntegrations.js.map
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"sources":["getSiteIntegrations.js"],"sourcesContent":["import type { BasePayload } from 'payload'\n\nimport type { GlobalQueryOptions } from './getGlobal.js'\n\nimport { getGlobal } from './getGlobal.js'\n\n/** Slug of the SiteIntegrations global defined by the plugin. */\nexport const SITE_INTEGRATIONS_SLUG = 'site-integrations'\n\n/**\n * Fetches the SiteIntegrations global.\n *\n * This global is admin-only through access control, but the Local API bypasses\n * access control by default (overrideAccess: true), so server-side callers get\n * the secrets they need (SMTP password, Turnstile secret, R2 keys). Never\n * expose the raw result to the client — read the specific values you need\n * server-side and pass only what's safe to the browser.\n *\n * Generic over the return type so the client can pass their generated\n * `SiteIntegration` type.\n *\n * @example\n * import type { SiteIntegration } from '@/payload-types'\n * const integrations = await getSiteIntegrations<SiteIntegration>(payload)\n */\nexport function getSiteIntegrations<T = Record<string, unknown>>(\n payload: BasePayload,\n options?: GlobalQueryOptions,\n): Promise<T> {\n return getGlobal<T>(payload, SITE_INTEGRATIONS_SLUG, options)\n}\n"],"names":["getGlobal","SITE_INTEGRATIONS_SLUG","getSiteIntegrations","payload","options"],"mappings":"AAIA,SAASA,SAAS,QAAQ,iBAAgB;AAE1C,+DAA+D,GAC/D,OAAO,MAAMC,yBAAyB,oBAAmB;AAEzD;;;;;;;;;;;;;;;CAeC,GACD,OAAO,SAASC,oBACdC,OAAoB,EACpBC,OAA4B;IAE5B,OAAOJ,UAAaG,SAASF,wBAAwBG;AACvD"}
|
||||
{"version":3,"sources":["../../../src/modules/payload/getSiteIntegrations.ts"],"sourcesContent":["import type { BasePayload } from 'payload'\n\nimport type { GlobalQueryOptions } from './getGlobal.js'\n\nimport { getGlobal } from './getGlobal.js'\n\n/** Slug of the SiteIntegrations global defined by the plugin. */\nexport const SITE_INTEGRATIONS_SLUG = 'site-integrations'\n\n/**\n * Fetches the SiteIntegrations global.\n *\n * This global is admin-only through access control, but the Local API bypasses\n * access control by default (overrideAccess: true), so server-side callers get\n * the secrets they need (SMTP password, Turnstile secret, R2 keys). Never\n * expose the raw result to the client — read the specific values you need\n * server-side and pass only what's safe to the browser.\n *\n * Generic over the return type so the client can pass their generated\n * `SiteIntegration` type.\n *\n * @example\n * import type { SiteIntegration } from '@/payload-types'\n * const integrations = await getSiteIntegrations<SiteIntegration>(payload)\n */\nexport function getSiteIntegrations<T = Record<string, unknown>>(\n payload: BasePayload,\n options?: GlobalQueryOptions,\n): Promise<T> {\n return getGlobal<T>(payload, SITE_INTEGRATIONS_SLUG, options)\n}\n"],"names":["getGlobal","SITE_INTEGRATIONS_SLUG","getSiteIntegrations","payload","options"],"mappings":"AAIA,SAASA,SAAS,QAAQ,iBAAgB;AAE1C,+DAA+D,GAC/D,OAAO,MAAMC,yBAAyB,oBAAmB;AAEzD;;;;;;;;;;;;;;;CAeC,GACD,OAAO,SAASC,oBACdC,OAAoB,EACpBC,OAA4B;IAE5B,OAAOJ,UAAaG,SAASF,wBAAwBG;AACvD"}
|
||||
+1
-1
@@ -11,6 +11,6 @@ import { getGlobal } from './getGlobal.js';
|
||||
* const settings = await getSiteSettings<SiteSetting>(payload, { locale: 'pl' })
|
||||
*/ export function getSiteSettings(payload, options) {
|
||||
return getGlobal(payload, SITE_SETTINGS_SLUG, options);
|
||||
} //# sourceMappingURL=getSiteSettings.js.map
|
||||
}
|
||||
|
||||
//# sourceMappingURL=getSiteSettings.js.map
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"sources":["getSiteSettings.js"],"sourcesContent":["import type { BasePayload } from 'payload'\n\nimport type { GlobalQueryOptions } from './getGlobal.js'\n\nimport { getGlobal } from './getGlobal.js'\n\n/** Slug of the SiteSettings global defined by the plugin. */\nexport const SITE_SETTINGS_SLUG = 'site-settings'\n\n/**\n * Fetches the SiteSettings global.\n *\n * Generic over the return type so the client can pass their generated\n * `SiteSetting` type for full type safety, while still working without it.\n *\n * @example\n * import type { SiteSetting } from '@/payload-types'\n * const settings = await getSiteSettings<SiteSetting>(payload, { locale: 'pl' })\n */\nexport function getSiteSettings<T = Record<string, unknown>>(\n payload: BasePayload,\n options?: GlobalQueryOptions,\n): Promise<T> {\n return getGlobal<T>(payload, SITE_SETTINGS_SLUG, options)\n}\n"],"names":["getGlobal","SITE_SETTINGS_SLUG","getSiteSettings","payload","options"],"mappings":"AAIA,SAASA,SAAS,QAAQ,iBAAgB;AAE1C,2DAA2D,GAC3D,OAAO,MAAMC,qBAAqB,gBAAe;AAEjD;;;;;;;;;CASC,GACD,OAAO,SAASC,gBACdC,OAAoB,EACpBC,OAA4B;IAE5B,OAAOJ,UAAaG,SAASF,oBAAoBG;AACnD"}
|
||||
{"version":3,"sources":["../../../src/modules/payload/getSiteSettings.ts"],"sourcesContent":["import type { BasePayload } from 'payload'\n\nimport type { GlobalQueryOptions } from './getGlobal.js'\n\nimport { getGlobal } from './getGlobal.js'\n\n/** Slug of the SiteSettings global defined by the plugin. */\nexport const SITE_SETTINGS_SLUG = 'site-settings'\n\n/**\n * Fetches the SiteSettings global.\n *\n * Generic over the return type so the client can pass their generated\n * `SiteSetting` type for full type safety, while still working without it.\n *\n * @example\n * import type { SiteSetting } from '@/payload-types'\n * const settings = await getSiteSettings<SiteSetting>(payload, { locale: 'pl' })\n */\nexport function getSiteSettings<T = Record<string, unknown>>(\n payload: BasePayload,\n options?: GlobalQueryOptions,\n): Promise<T> {\n return getGlobal<T>(payload, SITE_SETTINGS_SLUG, options)\n}\n"],"names":["getGlobal","SITE_SETTINGS_SLUG","getSiteSettings","payload","options"],"mappings":"AAIA,SAASA,SAAS,QAAQ,iBAAgB;AAE1C,2DAA2D,GAC3D,OAAO,MAAMC,qBAAqB,gBAAe;AAEjD;;;;;;;;;CASC,GACD,OAAO,SAASC,gBACdC,OAAoB,EACpBC,OAA4B;IAE5B,OAAOJ,UAAaG,SAASF,oBAAoBG;AACnD"}
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
export { getGlobal } from './getGlobal.js';
|
||||
export { getSiteIntegrations, SITE_INTEGRATIONS_SLUG } from './getSiteIntegrations.js';
|
||||
export { getSiteSettings, SITE_SETTINGS_SLUG } from './getSiteSettings.js'; //# sourceMappingURL=index.js.map
|
||||
export { getSiteSettings, SITE_SETTINGS_SLUG } from './getSiteSettings.js';
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"sources":["index.js"],"sourcesContent":["export type { GlobalQueryOptions } from './getGlobal.js'\nexport { getGlobal } from './getGlobal.js'\nexport { getSiteIntegrations, SITE_INTEGRATIONS_SLUG } from './getSiteIntegrations.js'\nexport { getSiteSettings, SITE_SETTINGS_SLUG } from './getSiteSettings.js'\n"],"names":["getGlobal","getSiteIntegrations","SITE_INTEGRATIONS_SLUG","getSiteSettings","SITE_SETTINGS_SLUG"],"mappings":"AACA,SAASA,SAAS,QAAQ,iBAAgB;AAC1C,SAASC,mBAAmB,EAAEC,sBAAsB,QAAQ,2BAA0B;AACtF,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,uBAAsB"}
|
||||
{"version":3,"sources":["../../../src/modules/payload/index.ts"],"sourcesContent":["export type { GlobalQueryOptions } from './getGlobal.js'\nexport { getGlobal } from './getGlobal.js'\nexport { getSiteIntegrations, SITE_INTEGRATIONS_SLUG } from './getSiteIntegrations.js'\nexport { getSiteSettings, SITE_SETTINGS_SLUG } from './getSiteSettings.js'\n"],"names":["getGlobal","getSiteIntegrations","SITE_INTEGRATIONS_SLUG","getSiteSettings","SITE_SETTINGS_SLUG"],"mappings":"AACA,SAASA,SAAS,QAAQ,iBAAgB;AAC1C,SAASC,mBAAmB,EAAEC,sBAAsB,QAAQ,2BAA0B;AACtF,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,uBAAsB"}
|
||||
Reference in New Issue
Block a user