diff --git a/examples/complex/src/lib/rest/index.ts b/examples/complex/src/lib/rest/index.ts index cda7d67..b61f1cf 100644 --- a/examples/complex/src/lib/rest/index.ts +++ b/examples/complex/src/lib/rest/index.ts @@ -3,4 +3,4 @@ import { router } from "./router"; export const { serverHook, client } = - createRESTInterface(router); + createRESTInterface(router); \ No newline at end of file diff --git a/package/src/lib/components/SvelteKitRest.ts b/package/src/lib/components/SvelteKitRest.ts index 66e4c7b..f4e9ee7 100644 --- a/package/src/lib/components/SvelteKitRest.ts +++ b/package/src/lib/components/SvelteKitRest.ts @@ -1,13 +1,6 @@ import type { z } from 'zod'; -import type { Route, RouteMethod, Params, TContext, CombineTypes } from './types.js'; -import type { RequestEvent } from '@sveltejs/kit'; -type Options = { - contentType: string; - headers: { - client: Record; - server: Record; - }; -}; +import type { Route, Params, TContext, CombineTypes,Options } from './types.js'; + class SvelteKitREST { public get; public post; @@ -37,52 +30,57 @@ class SvelteKitREST { return this.getRouter(inp); } - middleware(func: (inp: { context: TContext }) => U) { + middleware>(func: (inp: { context: TContext }) => U) { const middlewares = this.middlewares; return SvelteKitREST.getMiddlewareInstance,Awaited>>(middlewares, func); } private getRouter(schema?: z.ZodSchema) { return { - get: (cb: (inp: Params) => U): Route => { + get: (cb: (inp: Params) => U,options?:Partial): Route => { return { method: 'GET', cb, schema: schema, - middlewares:this.middlewares + middlewares:this.middlewares, + options }; }, - post: (cb: (inp: Params) => U): Route => { + post: (cb: (inp: Params) => U,options?:Partial): Route => { return { method: 'POST', cb, schema: schema, - middlewares:this.middlewares + middlewares:this.middlewares, + options }; }, - put: (cb: (inp: Params) => U): Route => { + put: (cb: (inp: Params) => U,options?:Partial): Route => { return { method: 'PUT', cb, schema: schema, - middlewares:this.middlewares + middlewares:this.middlewares, + options }; }, - patch: (cb: (inp: Params) => U): Route => { + patch: (cb: (inp: Params) => U,options?:Partial): Route => { return { method: 'PATCH', cb, schema: schema, - middlewares:this.middlewares + middlewares:this.middlewares, + options }; }, - delete: (cb: (inp: Params) => U): Route => { + delete: (cb: (inp: Params) => U,options?:Partial): Route => { return { method: 'DELETE', cb, schema: schema, - middlewares:this.middlewares + middlewares:this.middlewares, + options }; } }; diff --git a/package/src/lib/components/interface/index.ts b/package/src/lib/components/interface/index.ts index 524dba7..7302714 100644 --- a/package/src/lib/components/interface/index.ts +++ b/package/src/lib/components/interface/index.ts @@ -1,25 +1,18 @@ import type { RequestEvent } from '@sveltejs/kit'; -import type { Context, SingleOrMultipleRoutes } from '../types.js'; +import type { Context, RESTInterfaceOptions, SingleOrMultipleRoutes } from '../types.js'; import { createClient } from './client.js'; import { createServerHandle } from './server.js'; - -/** - * @param {Record} input - * @param {{ - * createContext?: Context; - * routePrefiex?: `/${string}` - * }} - * @returns {{client: any;serverHook: any;}} - */ -export function createRESTInterface(input: Record,options:{ createContext?:Context , - /** Default to /api */ - routePrefiex?: `/${string}`}={}) { +export function createRESTInterface( + input: Record, + options?: RESTInterfaceOptions +) { + options = options ? options : {}; if (!options.routePrefiex) { - options.routePrefiex = "/api" + options.routePrefiex = '/api'; } return { client: createClient(input, options.routePrefiex), - serverHook: createServerHandle(input,options.routePrefiex,options.createContext) // createContext makes user to use db on routes. + serverHook: createServerHandle(input, options.routePrefiex, options.createContext,options.cacheContext) // createContext makes user to use db on routes. }; -} \ No newline at end of file +} diff --git a/package/src/lib/components/interface/server.ts b/package/src/lib/components/interface/server.ts index bca8899..b688501 100644 --- a/package/src/lib/components/interface/server.ts +++ b/package/src/lib/components/interface/server.ts @@ -1,33 +1,32 @@ import { json, type Handle, error, type RequestEvent } from '@sveltejs/kit'; -import type { SingleOrMultipleRoutes, Route, Context } from '../types.js'; +import type { SingleOrMultipleRoutes, Route, Context, Options } from '../types.js'; +import { handleCacheControl } from '../options.js'; export function createServerHandle( input: Record, routePrefiex: `/${string}`, - createContext?: Context + createContext?: Context, + cacheContext: boolean = false ): Handle { + // Regular Context with no cache + const createNonCachedContext = () => { + return async (event: RequestEvent) => { + const context = createContext ? await createContext(event) : undefined; + return context; + }; + }; /* Caching the createContext might be good idea to avoid called db instances upon every request*/ - const createCachedContext = () => { let cachedContext: T | undefined; - return async (event: RequestEvent) => { if (!cachedContext) { - cachedContext = createContext ? await createContext(event) : undefined; - if (cachedContext instanceof Promise) { - console.log('Context is promise type'); - cachedContext - .then((val) => { - cachedContext = val; - }) - .catch((err) => console.log(err)); - } + cachedContext = createContext ? await createContext(event) : undefined; } return cachedContext; }; }; - const getContext = createCachedContext(); + const getContext = cacheContext ? createCachedContext() : createNonCachedContext(); return async ({ event, resolve }) => { const url = event.url.pathname; @@ -45,15 +44,25 @@ export function createServerHandle( } else { data = await event.request.json(); } + const parsedData = currentRouteObject.schema?.parse(data); - const cachedContext = getContext ? await getContext(event) : undefined; // cachedContext - const context = cachedContext ? cachedContext : { event } - const middlewaredContext =await handleMiddlewares(context,currentRouteObject.middlewares) + const obtainedContext = await getContext(event); // cachedContext + const context = obtainedContext ? obtainedContext : { event }; + const middlewaredContext = await handleMiddlewares(context, currentRouteObject.middlewares); const result = await currentRouteObject.cb({ input: parsedData, context: middlewaredContext }); - return json({ output: result }); + //handling custom headers and options + const headers = handleOptions(currentRouteObject.options); + + //Return json + return json( + { output: result }, + { + headers + } + ); } else { throw error(405); } @@ -76,18 +85,28 @@ function getCurrentObject(obj: Record, keys: str return undefined; } } - if (currentObj && 'cb' in currentObj && 'method' in currentObj) { + if (currentObj && 'cb' in currentObj && 'method' in currentObj && 'schema' in currentObj) { return currentObj as Route; } else { return undefined; } } -async function handleMiddlewares(currentContext:any,middlewares:((...inp:any)=>any)[]){ - let context = {...currentContext} +async function handleMiddlewares(currentContext: any, middlewares: ((...inp: any) => any)[]) { + let context = { ...currentContext }; for (const middleware of middlewares) { - const result = await middleware({context}) - context = {...context,...result} + const result = await middleware({ context }); + context = { ...context, ...result }; + } + return context; +} + +function handleOptions(options?: Partial):Record { + let cacheControl: string = ''; + if (options?.cacheControl) { + cacheControl = `max-age=${handleCacheControl(options.cacheControl)}`; } - return context -} \ No newline at end of file + const headers = options?.responseHeaders ? options.responseHeaders : {}; + const cacheHeaders = cacheControl? { 'Cache-Control': cacheControl } : {} + return { ...headers,...cacheHeaders}; +} diff --git a/package/src/lib/components/options.ts b/package/src/lib/components/options.ts new file mode 100644 index 0000000..3741e8a --- /dev/null +++ b/package/src/lib/components/options.ts @@ -0,0 +1,27 @@ + + +export function handleCacheControl(input:`${number}s` | `${number}h` | `${number}m` | `${number}d` ) { + const regex = /^(\d+)([smhd])$/; // Regex to match patterns like '2s', '4h', '5m', '2d' + const matches = input.match(regex); + + if (matches) { + const value = parseInt(matches[1], 10); // Extract the numeric value + const unit = matches[2]; // Extract the unit + + switch (unit) { + case 's': + return value; // Seconds + case 'm': + return value * 60; // Minutes to Seconds + case 'h': + return value * 60 * 60; // Hours to Seconds + case 'd': + return value * 24 * 60 * 60; // Days to Seconds + default: + throw new Error("Invalid Value for Cache Control , please use 1s or 1m or 1h or 1d "); + // Return the original string if the unit is not recognized + } + } else { + throw new Error("Invalid Value for Cache Control , please use 1s or 1m or 1h or 1d ");; // Return the original string if the input format doesn't match + } + } diff --git a/package/src/lib/components/types.d.ts b/package/src/lib/components/types.d.ts index 65a3154..701a6de 100644 --- a/package/src/lib/components/types.d.ts +++ b/package/src/lib/components/types.d.ts @@ -2,7 +2,7 @@ import type { RequestEvent } from '@sveltejs/kit'; import type { ResolvedUrl } from 'vite'; import type { z } from 'zod'; -type TContext = T extends undefined ? {event:RequestEvent} : ContextReturnType; +type TContext = T extends undefined ? { event: RequestEvent } : ContextReturnType; type Params = T extends undefined ? { context: TContext } @@ -11,7 +11,8 @@ type Route = { method: string; cb: (inp: Params) => U; schema: z.ZodSchema | undefined; - middlewares:((...inp:any)=>any)[] + middlewares: ((...inp: any) => any)[]; + options?: Partial; }; type SingleOrMultipleRoutes = Route | Record; @@ -34,4 +35,18 @@ type ContextReturnType = T extends (...args: any[]) => infer R ? Awaited : type CombineTypes = { [K in keyof A]: K extends keyof B ? B[K] : A[K]; - } & B; \ No newline at end of file +} & B; + +type Options = { + responseHeaders: { + [key: string]: string; + }; +} & { + cacheControl: `${number}s` | `${number}h` | `${number}m` | `${number}d`; +}; + +type RESTInterfaceOptions = Partial<{ + createContext: Context; + routePrefiex: `/${string}`; + cacheContext: boolean; +}>; diff --git a/plugins/README.md b/plugins/README.md new file mode 100644 index 0000000..e69de29 diff --git a/plugins/svelte-query-plugin/.gitignore b/plugins/svelte-query-plugin/.gitignore new file mode 100644 index 0000000..ac7211b --- /dev/null +++ b/plugins/svelte-query-plugin/.gitignore @@ -0,0 +1,11 @@ +.DS_Store +node_modules +/build +/dist +/.svelte-kit +/package +.env +.env.* +!.env.example +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/plugins/svelte-query-plugin/.npmrc b/plugins/svelte-query-plugin/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/plugins/svelte-query-plugin/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/plugins/svelte-query-plugin/README.md b/plugins/svelte-query-plugin/README.md new file mode 100644 index 0000000..4fee31f --- /dev/null +++ b/plugins/svelte-query-plugin/README.md @@ -0,0 +1,58 @@ +# create-svelte + +Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). + +Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging). + +## Creating a project + +If you're seeing this, you've probably already done this step. Congrats! + +```bash +# create a new project in the current directory +npm create svelte@latest + +# create a new project in my-app +npm create svelte@latest my-app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app. + +## Building + +To build your library: + +```bash +npm run package +``` + +To create a production version of your showcase app: + +```bash +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. + +## Publishing + +Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)). + +To publish your library to [npm](https://www.npmjs.com): + +```bash +npm publish +``` diff --git a/plugins/svelte-query-plugin/package.json b/plugins/svelte-query-plugin/package.json new file mode 100644 index 0000000..9868c22 --- /dev/null +++ b/plugins/svelte-query-plugin/package.json @@ -0,0 +1,43 @@ +{ + "name": "@sveltekit-rest/svelte-query-plugin", + "version": "0.0.1", + "scripts": { + "dev": "vite dev", + "build": "vite build && npm run package", + "preview": "vite preview", + "package": "svelte-kit sync && svelte-package && publint", + "prepublishOnly": "npm run package", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + }, + "files": [ + "dist", + "!dist/**/*.test.*", + "!dist/**/*.spec.*" + ], + "peerDependencies": { + "svelte": "^4.0.0", + "sveltekit-rest":"^0.6.1" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/package": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "publint": "^0.1.9", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", + "type": "module" +} diff --git a/plugins/svelte-query-plugin/src/app.d.ts b/plugins/svelte-query-plugin/src/app.d.ts new file mode 100644 index 0000000..743f07b --- /dev/null +++ b/plugins/svelte-query-plugin/src/app.d.ts @@ -0,0 +1,13 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export {}; diff --git a/plugins/svelte-query-plugin/src/app.html b/plugins/svelte-query-plugin/src/app.html new file mode 100644 index 0000000..f22aeaa --- /dev/null +++ b/plugins/svelte-query-plugin/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/plugins/svelte-query-plugin/src/lib/index.ts b/plugins/svelte-query-plugin/src/lib/index.ts new file mode 100644 index 0000000..47d3c46 --- /dev/null +++ b/plugins/svelte-query-plugin/src/lib/index.ts @@ -0,0 +1 @@ +// Reexport your entry components here diff --git a/plugins/svelte-query-plugin/src/routes/+page.svelte b/plugins/svelte-query-plugin/src/routes/+page.svelte new file mode 100644 index 0000000..0a45b69 --- /dev/null +++ b/plugins/svelte-query-plugin/src/routes/+page.svelte @@ -0,0 +1,3 @@ +

Welcome to your library project

+

Create your package using @sveltejs/package and preview/showcase your work with SvelteKit

+

Visit kit.svelte.dev to read the documentation

diff --git a/plugins/svelte-query-plugin/static/favicon.png b/plugins/svelte-query-plugin/static/favicon.png new file mode 100644 index 0000000..825b9e6 Binary files /dev/null and b/plugins/svelte-query-plugin/static/favicon.png differ diff --git a/plugins/svelte-query-plugin/svelte.config.js b/plugins/svelte-query-plugin/svelte.config.js new file mode 100644 index 0000000..2b35fe1 --- /dev/null +++ b/plugins/svelte-query-plugin/svelte.config.js @@ -0,0 +1,18 @@ +import adapter from '@sveltejs/adapter-auto'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), + + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter() + } +}; + +export default config; diff --git a/plugins/svelte-query-plugin/tsconfig.json b/plugins/svelte-query-plugin/tsconfig.json new file mode 100644 index 0000000..6f788f1 --- /dev/null +++ b/plugins/svelte-query-plugin/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "module": "NodeNext", + "moduleResolution": "NodeNext" + } +} diff --git a/plugins/svelte-query-plugin/vite.config.ts b/plugins/svelte-query-plugin/vite.config.ts new file mode 100644 index 0000000..bbf8c7d --- /dev/null +++ b/plugins/svelte-query-plugin/vite.config.ts @@ -0,0 +1,6 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [sveltekit()] +}); diff --git a/plugins/svelte-store-plugin/.gitignore b/plugins/svelte-store-plugin/.gitignore new file mode 100644 index 0000000..ac7211b --- /dev/null +++ b/plugins/svelte-store-plugin/.gitignore @@ -0,0 +1,11 @@ +.DS_Store +node_modules +/build +/dist +/.svelte-kit +/package +.env +.env.* +!.env.example +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/plugins/svelte-store-plugin/.npmrc b/plugins/svelte-store-plugin/.npmrc new file mode 100644 index 0000000..4fd0219 --- /dev/null +++ b/plugins/svelte-store-plugin/.npmrc @@ -0,0 +1 @@ +engine-strict=true \ No newline at end of file diff --git a/plugins/svelte-store-plugin/README.md b/plugins/svelte-store-plugin/README.md new file mode 100644 index 0000000..4fee31f --- /dev/null +++ b/plugins/svelte-store-plugin/README.md @@ -0,0 +1,58 @@ +# create-svelte + +Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). + +Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging). + +## Creating a project + +If you're seeing this, you've probably already done this step. Congrats! + +```bash +# create a new project in the current directory +npm create svelte@latest + +# create a new project in my-app +npm create svelte@latest my-app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app. + +## Building + +To build your library: + +```bash +npm run package +``` + +To create a production version of your showcase app: + +```bash +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. + +## Publishing + +Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)). + +To publish your library to [npm](https://www.npmjs.com): + +```bash +npm publish +``` diff --git a/plugins/svelte-store-plugin/package.json b/plugins/svelte-store-plugin/package.json new file mode 100644 index 0000000..5810931 --- /dev/null +++ b/plugins/svelte-store-plugin/package.json @@ -0,0 +1,43 @@ +{ + "name": "@sveltekit-rest/svelte-store-plugin", + "version": "0.0.1", + "scripts": { + "dev": "vite dev", + "build": "vite build && npm run package", + "preview": "vite preview", + "package": "svelte-kit sync && svelte-package && publint", + "prepublishOnly": "npm run package", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + }, + "files": [ + "dist", + "!dist/**/*.test.*", + "!dist/**/*.spec.*" + ], + "peerDependencies": { + "svelte": "^4.0.0", + "sveltekit-rest":"^0.6.1" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/package": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "publint": "^0.1.9", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts", + "type": "module" +} diff --git a/plugins/svelte-store-plugin/src/app.d.ts b/plugins/svelte-store-plugin/src/app.d.ts new file mode 100644 index 0000000..743f07b --- /dev/null +++ b/plugins/svelte-store-plugin/src/app.d.ts @@ -0,0 +1,13 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export {}; diff --git a/plugins/svelte-store-plugin/src/app.html b/plugins/svelte-store-plugin/src/app.html new file mode 100644 index 0000000..f22aeaa --- /dev/null +++ b/plugins/svelte-store-plugin/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/plugins/svelte-store-plugin/src/lib/components/store.ts b/plugins/svelte-store-plugin/src/lib/components/store.ts new file mode 100644 index 0000000..f8b3ebb --- /dev/null +++ b/plugins/svelte-store-plugin/src/lib/components/store.ts @@ -0,0 +1 @@ +import { writable,readable } from "svelte/store"; \ No newline at end of file diff --git a/plugins/svelte-store-plugin/src/lib/index.ts b/plugins/svelte-store-plugin/src/lib/index.ts new file mode 100644 index 0000000..47d3c46 --- /dev/null +++ b/plugins/svelte-store-plugin/src/lib/index.ts @@ -0,0 +1 @@ +// Reexport your entry components here diff --git a/plugins/svelte-store-plugin/src/routes/+page.svelte b/plugins/svelte-store-plugin/src/routes/+page.svelte new file mode 100644 index 0000000..0a45b69 --- /dev/null +++ b/plugins/svelte-store-plugin/src/routes/+page.svelte @@ -0,0 +1,3 @@ +

Welcome to your library project

+

Create your package using @sveltejs/package and preview/showcase your work with SvelteKit

+

Visit kit.svelte.dev to read the documentation

diff --git a/plugins/svelte-store-plugin/static/favicon.png b/plugins/svelte-store-plugin/static/favicon.png new file mode 100644 index 0000000..825b9e6 Binary files /dev/null and b/plugins/svelte-store-plugin/static/favicon.png differ diff --git a/plugins/svelte-store-plugin/svelte.config.js b/plugins/svelte-store-plugin/svelte.config.js new file mode 100644 index 0000000..2b35fe1 --- /dev/null +++ b/plugins/svelte-store-plugin/svelte.config.js @@ -0,0 +1,18 @@ +import adapter from '@sveltejs/adapter-auto'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), + + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter() + } +}; + +export default config; diff --git a/plugins/svelte-store-plugin/tsconfig.json b/plugins/svelte-store-plugin/tsconfig.json new file mode 100644 index 0000000..6f788f1 --- /dev/null +++ b/plugins/svelte-store-plugin/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "module": "NodeNext", + "moduleResolution": "NodeNext" + } +} diff --git a/plugins/svelte-store-plugin/vite.config.ts b/plugins/svelte-store-plugin/vite.config.ts new file mode 100644 index 0000000..bbf8c7d --- /dev/null +++ b/plugins/svelte-store-plugin/vite.config.ts @@ -0,0 +1,6 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [sveltekit()] +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af7be85..bd57f3a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -132,6 +132,80 @@ importers: specifier: ^0.34.6 version: 0.34.6 + plugins/svelte-query-plugin: + dependencies: + sveltekit-rest: + specifier: ^0.6.1 + version: link:../../package + devDependencies: + '@sveltejs/adapter-auto': + specifier: ^3.0.0 + version: 3.0.0(@sveltejs/kit@2.0.0) + '@sveltejs/kit': + specifier: ^2.0.0 + version: 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.7)(vite@5.0.10) + '@sveltejs/package': + specifier: ^2.0.0 + version: 2.2.3(svelte@4.2.7)(typescript@5.3.2) + '@sveltejs/vite-plugin-svelte': + specifier: ^3.0.0 + version: 3.0.1(svelte@4.2.7)(vite@5.0.10) + publint: + specifier: ^0.1.9 + version: 0.1.16 + svelte: + specifier: ^4.2.7 + version: 4.2.7 + svelte-check: + specifier: ^3.6.0 + version: 3.6.2(postcss@8.4.31)(svelte@4.2.7) + tslib: + specifier: ^2.4.1 + version: 2.6.2 + typescript: + specifier: ^5.0.0 + version: 5.3.2 + vite: + specifier: ^5.0.3 + version: 5.0.10 + + plugins/svelte-store-plugin: + dependencies: + sveltekit-rest: + specifier: ^0.6.1 + version: link:../../package + devDependencies: + '@sveltejs/adapter-auto': + specifier: ^3.0.0 + version: 3.0.0(@sveltejs/kit@2.0.0) + '@sveltejs/kit': + specifier: ^2.0.0 + version: 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.7)(vite@5.0.10) + '@sveltejs/package': + specifier: ^2.0.0 + version: 2.2.3(svelte@4.2.7)(typescript@5.3.2) + '@sveltejs/vite-plugin-svelte': + specifier: ^3.0.0 + version: 3.0.1(svelte@4.2.7)(vite@5.0.10) + publint: + specifier: ^0.1.9 + version: 0.1.16 + svelte: + specifier: ^4.2.7 + version: 4.2.7 + svelte-check: + specifier: ^3.6.0 + version: 3.6.2(postcss@8.4.31)(svelte@4.2.7) + tslib: + specifier: ^2.4.1 + version: 2.6.2 + typescript: + specifier: ^5.0.0 + version: 5.3.2 + vite: + specifier: ^5.0.3 + version: 5.0.10 + www: dependencies: '@astrojs/check': @@ -625,7 +699,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: false optional: true /@esbuild/android-arm@0.18.20: @@ -642,7 +715,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: false optional: true /@esbuild/android-x64@0.18.20: @@ -659,7 +731,6 @@ packages: cpu: [x64] os: [android] requiresBuild: true - dev: false optional: true /@esbuild/darwin-arm64@0.18.20: @@ -676,7 +747,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: false optional: true /@esbuild/darwin-x64@0.18.20: @@ -693,7 +763,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: false optional: true /@esbuild/freebsd-arm64@0.18.20: @@ -710,7 +779,6 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true - dev: false optional: true /@esbuild/freebsd-x64@0.18.20: @@ -727,7 +795,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: false optional: true /@esbuild/linux-arm64@0.18.20: @@ -744,7 +811,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-arm@0.18.20: @@ -761,7 +827,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-ia32@0.18.20: @@ -778,7 +843,6 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-loong64@0.18.20: @@ -795,7 +859,6 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-mips64el@0.18.20: @@ -812,7 +875,6 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-ppc64@0.18.20: @@ -829,7 +891,6 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-riscv64@0.18.20: @@ -846,7 +907,6 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-s390x@0.18.20: @@ -863,7 +923,6 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-x64@0.18.20: @@ -880,7 +939,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/netbsd-x64@0.18.20: @@ -897,7 +955,6 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true - dev: false optional: true /@esbuild/openbsd-x64@0.18.20: @@ -914,7 +971,6 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true - dev: false optional: true /@esbuild/sunos-x64@0.18.20: @@ -931,7 +987,6 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true - dev: false optional: true /@esbuild/win32-arm64@0.18.20: @@ -948,7 +1003,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: false optional: true /@esbuild/win32-ia32@0.18.20: @@ -965,7 +1019,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: false optional: true /@esbuild/win32-x64@0.18.20: @@ -982,7 +1035,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: false optional: true /@expressive-code/core@0.29.1: @@ -1144,6 +1196,110 @@ packages: resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==} dev: true + /@rollup/rollup-android-arm-eabi@4.9.0: + resolution: {integrity: sha512-+1ge/xmaJpm1KVBuIH38Z94zj9fBD+hp+/5WLaHgyY8XLq1ibxk/zj6dTXaqM2cAbYKq8jYlhHd6k05If1W5xA==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.9.0: + resolution: {integrity: sha512-im6hUEyQ7ZfoZdNvtwgEJvBWZYauC9KVKq1w58LG2Zfz6zMd8gRrbN+xCVoqA2hv/v6fm9lp5LFGJ3za8EQH3A==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.9.0: + resolution: {integrity: sha512-u7aTMskN6Dmg1lCT0QJ+tINRt+ntUrvVkhbPfFz4bCwRZvjItx2nJtwJnJRlKMMaQCHRjrNqHRDYvE4mBm3DlQ==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.9.0: + resolution: {integrity: sha512-8FvEl3w2ExmpcOmX5RJD0yqXcVSOqAJJUJ29Lca29Ik+3zPS1yFimr2fr5JSZ4Z5gt8/d7WqycpgkX9nocijSw==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.9.0: + resolution: {integrity: sha512-lHoKYaRwd4gge+IpqJHCY+8Vc3hhdJfU6ukFnnrJasEBUvVlydP8PuwndbWfGkdgSvZhHfSEw6urrlBj0TSSfg==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.9.0: + resolution: {integrity: sha512-JbEPfhndYeWHfOSeh4DOFvNXrj7ls9S/2omijVsao+LBPTPayT1uKcK3dHW3MwDJ7KO11t9m2cVTqXnTKpeaiw==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.9.0: + resolution: {integrity: sha512-ahqcSXLlcV2XUBM3/f/C6cRoh7NxYA/W7Yzuv4bDU1YscTFw7ay4LmD7l6OS8EMhTNvcrWGkEettL1Bhjf+B+w==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.9.0: + resolution: {integrity: sha512-uwvOYNtLw8gVtrExKhdFsYHA/kotURUmZYlinH2VcQxNCQJeJXnkmWgw2hI9Xgzhgu7J9QvWiq9TtTVwWMDa+w==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.9.0: + resolution: {integrity: sha512-m6pkSwcZZD2LCFHZX/zW2aLIISyzWLU3hrLLzQKMI12+OLEzgruTovAxY5sCZJkipklaZqPy/2bEEBNjp+Y7xg==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.9.0: + resolution: {integrity: sha512-VFAC1RDRSbU3iOF98X42KaVicAfKf0m0OvIu8dbnqhTe26Kh6Ym9JrDulz7Hbk7/9zGc41JkV02g+p3BivOdAg==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.9.0: + resolution: {integrity: sha512-9jPgMvTKXARz4inw6jezMLA2ihDBvgIU9Ml01hjdVpOcMKyxFBJrn83KVQINnbeqDv0+HdO1c09hgZ8N0s820Q==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.9.0: + resolution: {integrity: sha512-WE4pT2kTXQN2bAv40Uog0AsV7/s9nT9HBWXAou8+++MBCnY51QS02KYtm6dQxxosKi1VIz/wZIrTQO5UP2EW+Q==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.9.0: + resolution: {integrity: sha512-aPP5Q5AqNGuT0tnuEkK/g4mnt3ZhheiXrDIiSVIHN9mcN21OyXDVbEMqmXPE7e2OplNLDkcvV+ZoGJa2ZImFgw==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true @@ -1157,6 +1313,15 @@ packages: import-meta-resolve: 4.0.0 dev: true + /@sveltejs/adapter-auto@3.0.0(@sveltejs/kit@2.0.0): + resolution: {integrity: sha512-UNWSs/rOReBRfI/xFwSO2WYF1a7PT74SrWOHJmSNLY3Lq+zbH0uuvnlP+TmrTUBvOTkou3WJDjL6lK3n6aOUgQ==} + peerDependencies: + '@sveltejs/kit': ^2.0.0 + dependencies: + '@sveltejs/kit': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.7)(vite@5.0.10) + import-meta-resolve: 4.0.0 + dev: true + /@sveltejs/kit@1.27.6(svelte@4.2.7)(vite@4.5.0): resolution: {integrity: sha512-GsjTkMbKzXdbeRg0tk8S7HNShQ4879ftRr0ZHaZfjbig1xQwG57Bvcm9U9/mpLJtCapLbLWUnygKrgcLISLC8A==} engines: {node: ^16.14 || >=18} @@ -1185,6 +1350,32 @@ packages: - supports-color dev: true + /@sveltejs/kit@2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.7)(vite@5.0.10): + resolution: {integrity: sha512-/GFxvit+q7PztRbgGTFXhVB6jvb0fZSeWuz5f4siQ2r/5BVhxYh7++Bw3/ZUjiOuyoZFiNBmOPcRNQbkzEce0g==} + engines: {node: '>=18.13'} + hasBin: true + requiresBuild: true + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^3.0.0 + svelte: ^4.0.0 || ^5.0.0-next.0 + vite: ^5.0.3 + dependencies: + '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.2.7)(vite@5.0.10) + '@types/cookie': 0.6.0 + cookie: 0.6.0 + devalue: 4.3.2 + esm-env: 1.0.0 + kleur: 4.1.5 + magic-string: 0.30.5 + mrmime: 1.0.1 + sade: 1.8.1 + set-cookie-parser: 2.6.0 + sirv: 2.0.3 + svelte: 4.2.7 + tiny-glob: 0.2.9 + vite: 5.0.10 + dev: true + /@sveltejs/package@2.2.3(svelte@4.2.7)(typescript@5.3.2): resolution: {integrity: sha512-iZEC5qw+2RIjfIAHR3O+IeokJIjVM/ieoxPxj6YmZCwu5JKFADtC4jzjSUJ7GkCMUQ4HqE7u4/3cCxXBocxi8A==} engines: {node: ^16.14 || >=18} @@ -1218,6 +1409,22 @@ packages: - supports-color dev: true + /@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.7)(vite@5.0.10): + resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==} + engines: {node: ^18.0.0 || >=20} + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^3.0.0 + svelte: ^4.0.0 || ^5.0.0-next.0 + vite: ^5.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.2.7)(vite@5.0.10) + debug: 4.3.4 + svelte: 4.2.7 + vite: 5.0.10 + transitivePeerDependencies: + - supports-color + dev: true + /@sveltejs/vite-plugin-svelte@2.5.3(svelte@4.2.7)(vite@4.5.0): resolution: {integrity: sha512-erhNtXxE5/6xGZz/M9eXsmI7Pxa6MS7jyTy06zN3Ck++ldrppOnOlJwHHTsMC7DHDQdgUp4NAc4cDNQ9eGdB/w==} engines: {node: ^14.18.0 || >= 16} @@ -1238,6 +1445,26 @@ packages: - supports-color dev: true + /@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.2.7)(vite@5.0.10): + resolution: {integrity: sha512-CGURX6Ps+TkOovK6xV+Y2rn8JKa8ZPUHPZ/NKgCxAmgBrXReavzFl8aOSCj3kQ1xqT7yGJj53hjcV/gqwDAaWA==} + engines: {node: ^18.0.0 || >=20} + peerDependencies: + svelte: ^4.0.0 || ^5.0.0-next.0 + vite: ^5.0.0 + dependencies: + '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.7)(vite@5.0.10) + debug: 4.3.4 + deepmerge: 4.3.1 + kleur: 4.1.5 + magic-string: 0.30.5 + svelte: 4.2.7 + svelte-hmr: 0.15.3(svelte@4.2.7) + vite: 5.0.10 + vitefu: 0.2.5(vite@5.0.10) + transitivePeerDependencies: + - supports-color + dev: true + /@types/acorn@4.0.6: resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} dependencies: @@ -1287,6 +1514,10 @@ packages: resolution: {integrity: sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA==} dev: true + /@types/cookie@0.6.0: + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + dev: true + /@types/debug@4.1.12: resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} dependencies: @@ -2003,6 +2234,11 @@ packages: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} + /cookie@0.6.0: + resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + engines: {node: '>= 0.6'} + dev: true + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2251,7 +2487,6 @@ packages: '@esbuild/win32-arm64': 0.19.8 '@esbuild/win32-ia32': 0.19.8 '@esbuild/win32-x64': 0.19.8 - dev: false /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -4185,6 +4420,15 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 + /postcss@8.4.32: + resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /prebuild-install@7.1.1: resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} engines: {node: '>=10'} @@ -4508,6 +4752,27 @@ packages: optionalDependencies: fsevents: 2.3.3 + /rollup@4.9.0: + resolution: {integrity: sha512-bUHW/9N21z64gw8s6tP4c88P382Bq/L5uZDowHlHx6s/QWpjJXivIAbEw6LZthgSvlEizZBfLC4OAvWe7aoF7A==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.9.0 + '@rollup/rollup-android-arm64': 4.9.0 + '@rollup/rollup-darwin-arm64': 4.9.0 + '@rollup/rollup-darwin-x64': 4.9.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.0 + '@rollup/rollup-linux-arm64-gnu': 4.9.0 + '@rollup/rollup-linux-arm64-musl': 4.9.0 + '@rollup/rollup-linux-riscv64-gnu': 4.9.0 + '@rollup/rollup-linux-x64-gnu': 4.9.0 + '@rollup/rollup-linux-x64-musl': 4.9.0 + '@rollup/rollup-win32-arm64-msvc': 4.9.0 + '@rollup/rollup-win32-ia32-msvc': 4.9.0 + '@rollup/rollup-win32-x64-msvc': 4.9.0 + fsevents: 2.3.3 + dev: true + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -5387,6 +5652,41 @@ packages: optionalDependencies: fsevents: 2.3.3 + /vite@5.0.10: + resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.19.8 + postcss: 8.4.32 + rollup: 4.9.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /vitefu@0.2.5(vite@4.5.0): resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} peerDependencies: @@ -5397,6 +5697,17 @@ packages: dependencies: vite: 4.5.0(@types/node@20.10.2) + /vitefu@0.2.5(vite@5.0.10): + resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + vite: 5.0.10 + dev: true + /vitest@0.34.6: resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} engines: {node: '>=v14.18.0'} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index a0eb242..1f3a422 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,5 @@ packages: - 'package/' - 'www/' - - 'examples/*' \ No newline at end of file + - 'examples/*' + - 'plugins/*' \ No newline at end of file