dineway 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +9 -0
- package/README.md +89 -0
- package/dist/adapters-BlzWJG82.d.mts +106 -0
- package/dist/apply-CAPvMfoU.mjs +1339 -0
- package/dist/astro/index.d.mts +50 -0
- package/dist/astro/index.mjs +1326 -0
- package/dist/astro/middleware/auth.d.mts +30 -0
- package/dist/astro/middleware/auth.mjs +708 -0
- package/dist/astro/middleware/redirect.d.mts +21 -0
- package/dist/astro/middleware/redirect.mjs +62 -0
- package/dist/astro/middleware/request-context.d.mts +17 -0
- package/dist/astro/middleware/request-context.mjs +1371 -0
- package/dist/astro/middleware/setup.d.mts +19 -0
- package/dist/astro/middleware/setup.mjs +46 -0
- package/dist/astro/middleware.d.mts +12 -0
- package/dist/astro/middleware.mjs +1716 -0
- package/dist/astro/types.d.mts +269 -0
- package/dist/astro/types.mjs +1 -0
- package/dist/base64-F8-DUraK.mjs +58 -0
- package/dist/byline-DeWCMU_i.mjs +234 -0
- package/dist/bylines-DyqBV9EQ.mjs +137 -0
- package/dist/chunk-ClPoSABd.mjs +21 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.mjs +3987 -0
- package/dist/client/external-auth-headers.d.mts +38 -0
- package/dist/client/external-auth-headers.mjs +101 -0
- package/dist/client/index.d.mts +397 -0
- package/dist/client/index.mjs +345 -0
- package/dist/config-Cq8H0SfX.mjs +46 -0
- package/dist/connection-C9pxzuag.mjs +52 -0
- package/dist/content-zSgdNmnt.mjs +836 -0
- package/dist/db/index.d.mts +4 -0
- package/dist/db/index.mjs +62 -0
- package/dist/db/libsql.d.mts +10 -0
- package/dist/db/libsql.mjs +21 -0
- package/dist/db/postgres.d.mts +10 -0
- package/dist/db/postgres.mjs +29 -0
- package/dist/db/sqlite.d.mts +10 -0
- package/dist/db/sqlite.mjs +15 -0
- package/dist/default-WYlzADZL.mjs +80 -0
- package/dist/dialect-helpers-B9uSp2GJ.mjs +89 -0
- package/dist/error-DrxtnGPg.mjs +26 -0
- package/dist/index-C-jx21qs.d.mts +4771 -0
- package/dist/index.d.mts +16 -0
- package/dist/index.mjs +30 -0
- package/dist/load-C6FCD1FU.mjs +27 -0
- package/dist/loader-qKmo0wAY.mjs +446 -0
- package/dist/manifest-schema-CTSEyIJ3.mjs +186 -0
- package/dist/media/index.d.mts +25 -0
- package/dist/media/index.mjs +54 -0
- package/dist/media/local-runtime.d.mts +38 -0
- package/dist/media/local-runtime.mjs +132 -0
- package/dist/media-DMTr80Gv.mjs +199 -0
- package/dist/mode-BlyYtIFO.mjs +22 -0
- package/dist/page/index.d.mts +148 -0
- package/dist/page/index.mjs +419 -0
- package/dist/placeholder-B3knXwNc.mjs +267 -0
- package/dist/placeholder-bOx1xCTY.d.mts +283 -0
- package/dist/plugin-utils.d.mts +57 -0
- package/dist/plugin-utils.mjs +77 -0
- package/dist/plugins/adapt-sandbox-entry.d.mts +21 -0
- package/dist/plugins/adapt-sandbox-entry.mjs +112 -0
- package/dist/query-BiaPl_g2.mjs +459 -0
- package/dist/redirect-JPqLAbxa.mjs +328 -0
- package/dist/registry-DSd1GWB8.mjs +851 -0
- package/dist/request-context.d.mts +49 -0
- package/dist/request-context.mjs +42 -0
- package/dist/runner-B5l1JfOj.d.mts +26 -0
- package/dist/runner-BGUGywgG.mjs +1529 -0
- package/dist/runtime.d.mts +25 -0
- package/dist/runtime.mjs +41 -0
- package/dist/search-BNruJHDL.mjs +11054 -0
- package/dist/seed/index.d.mts +3 -0
- package/dist/seed/index.mjs +15 -0
- package/dist/seo/index.d.mts +69 -0
- package/dist/seo/index.mjs +69 -0
- package/dist/storage/local.d.mts +38 -0
- package/dist/storage/local.mjs +165 -0
- package/dist/storage/s3.d.mts +31 -0
- package/dist/storage/s3.mjs +174 -0
- package/dist/tokens-4vgYuXsZ.mjs +170 -0
- package/dist/transport-C5FYnid7.mjs +417 -0
- package/dist/transport-gIL-e43D.d.mts +41 -0
- package/dist/types-BawVha09.mjs +30 -0
- package/dist/types-BgQeVaPj.d.mts +192 -0
- package/dist/types-CLLdsG3g.d.mts +103 -0
- package/dist/types-D38djUXv.d.mts +1196 -0
- package/dist/types-DShnjzb6.mjs +15 -0
- package/dist/types-DkvMXalq.d.mts +425 -0
- package/dist/types-DuNbGKjF.mjs +74 -0
- package/dist/types-ju-_ORz7.d.mts +182 -0
- package/dist/validate-CXnRKfJK.mjs +327 -0
- package/dist/validate-CqRJb_xU.mjs +96 -0
- package/dist/validate-DVKJJ-M_.d.mts +377 -0
- package/locals.d.ts +47 -0
- package/package.json +313 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { f as MediaProvider } from "./placeholder-bOx1xCTY.mjs";
|
|
2
|
+
import "./types-DkvMXalq.mjs";
|
|
3
|
+
import { Gn as EntryFilter, Kn as dinewayLoader, Un as CollectionFilter, Wn as EntryData, qn as getDb } from "./index-C-jx21qs.mjs";
|
|
4
|
+
import "./runner-B5l1JfOj.mjs";
|
|
5
|
+
import "./types-D38djUXv.mjs";
|
|
6
|
+
import "./validate-DVKJJ-M_.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/media/provider-loader.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* Get a media provider by ID.
|
|
11
|
+
*
|
|
12
|
+
* Used by DinewayMedia component for frontend rendering.
|
|
13
|
+
* Providers are lazy-loaded from virtual module and cached.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const provider = await getMediaProvider("image-cdn");
|
|
18
|
+
* if (provider) {
|
|
19
|
+
* const embed = provider.getEmbed(mediaValue, { width: 800 });
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare function getMediaProvider(providerId: string): Promise<MediaProvider | undefined>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { type CollectionFilter, type EntryData, type EntryFilter, dinewayLoader, getDb, getMediaProvider };
|
package/dist/runtime.mjs
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import "./dialect-helpers-B9uSp2GJ.mjs";
|
|
2
|
+
import "./base64-F8-DUraK.mjs";
|
|
3
|
+
import "./types-BawVha09.mjs";
|
|
4
|
+
import { n as getDb, t as dinewayLoader } from "./loader-qKmo0wAY.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/media/provider-loader.ts
|
|
7
|
+
let virtualMediaProviders;
|
|
8
|
+
const mediaProviderInstances = /* @__PURE__ */ new Map();
|
|
9
|
+
/**
|
|
10
|
+
* Load media providers from virtual module
|
|
11
|
+
*/
|
|
12
|
+
async function loadMediaProviders() {
|
|
13
|
+
if (virtualMediaProviders === void 0) virtualMediaProviders = (await import("virtual:dineway/media-providers")).mediaProviders || [];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get a media provider by ID.
|
|
17
|
+
*
|
|
18
|
+
* Used by DinewayMedia component for frontend rendering.
|
|
19
|
+
* Providers are lazy-loaded from virtual module and cached.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const provider = await getMediaProvider("image-cdn");
|
|
24
|
+
* if (provider) {
|
|
25
|
+
* const embed = provider.getEmbed(mediaValue, { width: 800 });
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
async function getMediaProvider(providerId) {
|
|
30
|
+
const cached = mediaProviderInstances.get(providerId);
|
|
31
|
+
if (cached) return cached;
|
|
32
|
+
await loadMediaProviders();
|
|
33
|
+
const entry = virtualMediaProviders?.find((p) => p.id === providerId);
|
|
34
|
+
if (!entry) return;
|
|
35
|
+
const provider = entry.createProvider({});
|
|
36
|
+
mediaProviderInstances.set(providerId, provider);
|
|
37
|
+
return provider;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { dinewayLoader, getDb, getMediaProvider };
|