@kyro-cms/core 0.12.64 → 0.12.65
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/dist/api-handler-graphql.cjs +1 -1
- package/dist/api-handler-graphql.js +1 -1
- package/dist/api-handler-trpc.cjs +1 -1
- package/dist/api-handler-trpc.js +1 -1
- package/dist/api-handler.cjs +1 -1
- package/dist/api-handler.js +1 -1
- package/dist/chunk-2F4WPCVA.cjs +120 -0
- package/dist/{chunk-KTDAS6XO.cjs → chunk-7JCRN5ZH.cjs} +3 -3
- package/dist/{chunk-ONDPNSXC.js → chunk-H5BTDZXQ.js} +1 -1
- package/dist/chunk-HOX6BHKS.js +121 -0
- package/dist/chunk-JW4HRIVP.cjs +20 -0
- package/dist/{chunk-WBFEX36H.js → chunk-QBYXAKHH.js} +1 -1
- package/dist/chunk-QXWQELAM.js +21 -0
- package/dist/{chunk-O5754WOC.cjs → chunk-ZDMJOFKR.cjs} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +1 -1
- package/dist/integration.cjs +1 -1
- package/dist/integration.d.cts +1 -0
- package/dist/integration.d.ts +1 -0
- package/dist/integration.js +1 -1
- package/dist/rest/index.cjs +1 -1
- package/dist/rest/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-CBP2L6RO.js +0 -121
- package/dist/chunk-FJPY42VZ.cjs +0 -20
- package/dist/chunk-PCN6QV3Z.js +0 -21
- package/dist/chunk-QJ2V677Y.cjs +0 -120
package/dist/chunk-FJPY42VZ.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkBUNLC3II_cjs=require('./chunk-BUNLC3II.cjs'),r=require('path'),m=require('fs');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var r__default=/*#__PURE__*/_interopDefault(r);var m__default=/*#__PURE__*/_interopDefault(m);chunkBUNLC3II_cjs.h();var l=o=>{let s=r__default.default.join(process.cwd(),"node_modules","@kyro-cms","core"),e=r__default.default.resolve(s,"src",`${o}.ts`);return m__default.default.existsSync(e)?e:r__default.default.resolve(s,"dist",`${o}.js`)},g=l("api-handler"),A=l("api-handler-graphql"),P=l("api-handler-trpc"),S=["@kyro-cms/core","@kyro-cms/admin","@kyro-cms/astro","@kyro-cms/ai"],x=["@kyro-cms/connect"],R=[...S,...x],_=["better-sqlite3","pg","mongodb","ioredis","sharp","ssh2","cpu-features","ssh2-sftp-client","nodemailer","jsonwebtoken","@mapbox/node-pre-gyp","mock-aws-s3","aws-sdk","nock","cloudflare:workers"],N=["crypto","node:crypto","module","node:module","fs","node:fs","fs/promises","node:fs/promises","path","node:path","util","node:util","stream","node:stream","events","node:events","url","node:url","http","node:http","https","node:https","os","node:os","child_process","node:child_process","assert","node:assert","zlib","node:zlib","buffer","node:buffer"],h=[...S,..._],O=[...R,...N,..._];function k(o={}){let{configPath:s="./kyro.config.ts",apiPath:e="/api",adminPath:a="/admin",admin:v=true,enableGraphQL:c=false,enableTRPC:p=false,enableWebSocket:u=false}=o;return {name:"@kyro-cms/core",hooks:{"astro:config:setup":async({config:y,updateConfig:E,injectRoute:i,logger:n})=>{if(n.info(`Setting up Kyro CMS (API: ${e}, Admin: ${a})`),e===a)throw new Error(`Kyro CMS: apiPath and adminPath cannot be the same ("${e}")`);let d=r__default.default.resolve(y.root.pathname,s),b=d;m__default.default.existsSync(d)||n.warn(`Kyro config file not found at ${s}. The API will fail to boot if collections are needed.`),E({security:{checkOrigin:false},vite:{ssr:{external:O},build:{rollupOptions:{external:h}},optimizeDeps:{exclude:h},server:{watch:{ignored:["**/*.db","**/*.db-*","**/data/**","**/public/uploads/**","**/.kyro/**"]}},plugins:[{name:"use-sync-external-store-shim-fix",enforce:"pre",resolveId(t){if(t==="use-sync-external-store/shim"||t==="use-sync-external-store/shim/index.js")return "\0virtual:use-sync-external-store-shim";if(t==="use-sync-external-store/shim/with-selector"||t==="use-sync-external-store/shim/with-selector.js")return "\0virtual:use-sync-external-store-shim-with-selector"},load(t){if(t==="\0virtual:use-sync-external-store-shim")return 'export { useSyncExternalStore } from "react";';if(t==="\0virtual:use-sync-external-store-shim-with-selector")return `
|
|
2
|
-
import { useSyncExternalStore, useMemo } from "react";
|
|
3
|
-
export function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
4
|
-
const memoizedSelector = useMemo(() => {
|
|
5
|
-
let last, lastSnap, hasMemo = false;
|
|
6
|
-
return (snap) => {
|
|
7
|
-
if (!hasMemo || !Object.is(lastSnap, snap)) {
|
|
8
|
-
const next = selector(snap);
|
|
9
|
-
if (!hasMemo || !(isEqual ? isEqual(last, next) : Object.is(last, next))) {
|
|
10
|
-
last = next; lastSnap = snap; hasMemo = true;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return last;
|
|
14
|
-
};
|
|
15
|
-
}, [selector, isEqual]);
|
|
16
|
-
const getSelection = () => memoizedSelector(getSnapshot());
|
|
17
|
-
const getServerSelection = getServerSnapshot != null ? () => memoizedSelector(getServerSnapshot()) : undefined;
|
|
18
|
-
return useSyncExternalStore(subscribe, getSelection, getServerSelection);
|
|
19
|
-
}
|
|
20
|
-
`}}],resolve:{alias:{"kyro:config":b}},define:{__KYRO_API_PATH__:JSON.stringify(e),__KYRO_ADMIN_PATH__:JSON.stringify(a),__KYRO_ENABLE_GRAPHQL__:JSON.stringify(c),__KYRO_ENABLE_TRPC__:JSON.stringify(p),__KYRO_ENABLE_WS__:JSON.stringify(u)}}}),i({pattern:`${e}/[...path]`,entrypoint:g}),c&&(i({pattern:`${e}/graphql`,entrypoint:A}),n.info(`GraphQL endpoint enabled at ${e}/graphql`)),p&&(i({pattern:`${e}/trpc/[...path]`,entrypoint:P}),n.info(`tRPC endpoint enabled at ${e}/trpc`)),u&&n.info("WebSocket support enabled (auto-starts at first request)");}}}}exports.a=k;
|
package/dist/chunk-PCN6QV3Z.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {g as g$1}from'./chunk-Y2YAKDEQ.js';import r from'path';import m from'fs';if (typeof window === "undefined") { const { createRequire } = await import(/* @vite-ignore */ 'module'); createRequire(import.meta.url); }
|
|
2
|
-
g$1();var l=o=>{let s=r.join(process.cwd(),"node_modules","@kyro-cms","core"),e=r.resolve(s,"src",`${o}.ts`);return m.existsSync(e)?e:r.resolve(s,"dist",`${o}.js`)},g=l("api-handler"),A=l("api-handler-graphql"),P=l("api-handler-trpc"),S=["@kyro-cms/core","@kyro-cms/admin","@kyro-cms/astro","@kyro-cms/ai"],x=["@kyro-cms/connect"],R=[...S,...x],_=["better-sqlite3","pg","mongodb","ioredis","sharp","ssh2","cpu-features","ssh2-sftp-client","nodemailer","jsonwebtoken","@mapbox/node-pre-gyp","mock-aws-s3","aws-sdk","nock","cloudflare:workers"],N=["crypto","node:crypto","module","node:module","fs","node:fs","fs/promises","node:fs/promises","path","node:path","util","node:util","stream","node:stream","events","node:events","url","node:url","http","node:http","https","node:https","os","node:os","child_process","node:child_process","assert","node:assert","zlib","node:zlib","buffer","node:buffer"],h=[...S,..._],O=[...R,...N,..._];function k(o={}){let{configPath:s="./kyro.config.ts",apiPath:e="/api",adminPath:a="/admin",admin:v=true,enableGraphQL:c=false,enableTRPC:p=false,enableWebSocket:u=false}=o;return {name:"@kyro-cms/core",hooks:{"astro:config:setup":async({config:y,updateConfig:E,injectRoute:i,logger:n})=>{if(n.info(`Setting up Kyro CMS (API: ${e}, Admin: ${a})`),e===a)throw new Error(`Kyro CMS: apiPath and adminPath cannot be the same ("${e}")`);let d=r.resolve(y.root.pathname,s),b=d;m.existsSync(d)||n.warn(`Kyro config file not found at ${s}. The API will fail to boot if collections are needed.`),E({security:{checkOrigin:false},vite:{ssr:{external:O},build:{rollupOptions:{external:h}},optimizeDeps:{exclude:h},server:{watch:{ignored:["**/*.db","**/*.db-*","**/data/**","**/public/uploads/**","**/.kyro/**"]}},plugins:[{name:"use-sync-external-store-shim-fix",enforce:"pre",resolveId(t){if(t==="use-sync-external-store/shim"||t==="use-sync-external-store/shim/index.js")return "\0virtual:use-sync-external-store-shim";if(t==="use-sync-external-store/shim/with-selector"||t==="use-sync-external-store/shim/with-selector.js")return "\0virtual:use-sync-external-store-shim-with-selector"},load(t){if(t==="\0virtual:use-sync-external-store-shim")return 'export { useSyncExternalStore } from "react";';if(t==="\0virtual:use-sync-external-store-shim-with-selector")return `
|
|
3
|
-
import { useSyncExternalStore, useMemo } from "react";
|
|
4
|
-
export function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
5
|
-
const memoizedSelector = useMemo(() => {
|
|
6
|
-
let last, lastSnap, hasMemo = false;
|
|
7
|
-
return (snap) => {
|
|
8
|
-
if (!hasMemo || !Object.is(lastSnap, snap)) {
|
|
9
|
-
const next = selector(snap);
|
|
10
|
-
if (!hasMemo || !(isEqual ? isEqual(last, next) : Object.is(last, next))) {
|
|
11
|
-
last = next; lastSnap = snap; hasMemo = true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return last;
|
|
15
|
-
};
|
|
16
|
-
}, [selector, isEqual]);
|
|
17
|
-
const getSelection = () => memoizedSelector(getSnapshot());
|
|
18
|
-
const getServerSelection = getServerSnapshot != null ? () => memoizedSelector(getServerSnapshot()) : undefined;
|
|
19
|
-
return useSyncExternalStore(subscribe, getSelection, getServerSelection);
|
|
20
|
-
}
|
|
21
|
-
`}}],resolve:{alias:{"kyro:config":b}},define:{__KYRO_API_PATH__:JSON.stringify(e),__KYRO_ADMIN_PATH__:JSON.stringify(a),__KYRO_ENABLE_GRAPHQL__:JSON.stringify(c),__KYRO_ENABLE_TRPC__:JSON.stringify(p),__KYRO_ENABLE_WS__:JSON.stringify(u)}}}),i({pattern:`${e}/[...path]`,entrypoint:g}),c&&(i({pattern:`${e}/graphql`,entrypoint:A}),n.info(`GraphQL endpoint enabled at ${e}/graphql`)),p&&(i({pattern:`${e}/trpc/[...path]`,entrypoint:P}),n.info(`tRPC endpoint enabled at ${e}/trpc`)),u&&n.info("WebSocket support enabled (auto-starts at first request)");}}}}export{k as a};
|