@coreframe/vite 0.1.37 → 0.1.38
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/client.d.ts +1 -0
- package/dist/plugins/cloudflare.d.ts +5 -0
- package/dist/plugins/cloudflare.js +1 -1
- package/dist/plugins/favicon.d.ts +7 -0
- package/dist/plugins/favicon.js +1 -0
- package/dist/plugins/preset.d.ts +6 -2
- package/dist/plugins/preset.js +1 -1
- package/package.json +9 -4
- package/dist/plugins/panda.d.ts +0 -31
- package/dist/plugins/panda.js +0 -1
package/client.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite-plugin-hashed-favicons/virtual" />
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
3
3
|
[key: string]: JsonValue;
|
|
4
4
|
};
|
|
5
|
+
type CloudflareAssetsConfig = {
|
|
6
|
+
[key: string]: JsonValue | undefined;
|
|
7
|
+
run_worker_first?: boolean | string[];
|
|
8
|
+
};
|
|
5
9
|
type CloudflareWorkerConfig = {
|
|
10
|
+
assets?: CloudflareAssetsConfig;
|
|
6
11
|
vars?: Record<string, JsonValue>;
|
|
7
12
|
};
|
|
8
13
|
declare function coreframeCloudflareConfig(config: CloudflareWorkerConfig): CloudflareWorkerConfig | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=[`DATABASE_URL`,`PGDATABASE`,`PGHOST`,`PGPASSWORD`,`PGPORT`,`PGUSER`,`TURSO_AUTH_TOKEN`,`TURSO_DATABASE_URL`,`PORTLESS_URL`];function
|
|
1
|
+
const e=`/cdn-cgi/*`,t=[`DATABASE_URL`,`PGDATABASE`,`PGHOST`,`PGPASSWORD`,`PGPORT`,`PGUSER`,`TURSO_AUTH_TOKEN`,`TURSO_DATABASE_URL`,`PORTLESS_URL`];function n(n){if(process.env.CLOUDFLARE_ENV!==`development`)return;let r=n.assets?.run_worker_first,i=r!==!0&&!(Array.isArray(r)?r:[]).includes(e),a=Object.fromEntries(t.flatMap(e=>{let t=process.env[e];return t?[[e,t]]:[]}));if(!(!i&&Object.keys(a).length===0))return{...i?{assets:{run_worker_first:[e]}}:{},...Object.keys(a).length>0?{vars:{...n.vars,...a}}:{}}}export{n as coreframeCloudflareConfig};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HashedFaviconsOptions } from "vite-plugin-hashed-favicons";
|
|
2
|
+
import { Plugin } from "vite";
|
|
3
|
+
|
|
4
|
+
//#region plugins/favicon.d.ts
|
|
5
|
+
declare function coreframeFaviconPlugin(options?: HashedFaviconsOptions): Plugin[];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { coreframeFaviconPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"vite-plugin-hashed-favicons";const t=`virtual:hashed-favicons`,n=`\0${t}`;function r(r={}){return[{name:`coreframe:dev-favicon`,apply:`serve`,resolveId(e){return e===t?n:null},load(e){return e===n?`export default ${JSON.stringify([{href:`/src/assets/favicon.svg`,rel:`icon`,type:`image/svg+xml`}])}`:null}},{...e(`./src/assets/favicon.svg`,r),apply:`build`}]}export{r as coreframeFaviconPlugin};
|
package/dist/plugins/preset.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { HashedFaviconsOptions } from "vite-plugin-hashed-favicons";
|
|
1
2
|
import { Plugin } from "vite";
|
|
2
3
|
|
|
3
4
|
//#region plugins/preset.d.ts
|
|
4
|
-
|
|
5
|
+
type CoreframeVitePresetOptions = {
|
|
6
|
+
favicon?: HashedFaviconsOptions;
|
|
7
|
+
};
|
|
8
|
+
declare function coreframeVitePreset(options?: CoreframeVitePresetOptions): Plugin[];
|
|
5
9
|
//#endregion
|
|
6
|
-
export { coreframeVitePreset };
|
|
10
|
+
export { CoreframeVitePresetOptions, coreframeVitePreset };
|
package/dist/plugins/preset.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{coreframeAssetsPlugin as e}from"./assets.js";import{coreframeDashboardPlugin as t}from"./dashboard.js";import{
|
|
1
|
+
import{coreframeAssetsPlugin as e}from"./assets.js";import{coreframeDashboardPlugin as t}from"./dashboard.js";import{coreframeFaviconPlugin as n}from"./favicon.js";import{t as r}from"../icons-vb_lG-av.js";import{coreframeManagedDevPlugin as i}from"./managed-dev.js";import{coreframeStartupTimingPlugin as a}from"./startup-timing.js";import{t as o}from"../worktree-head-BZrhW1-Q.js";function s(s={}){return[a(),e(),...r(),i(),o(),t(),...n(s.favicon)]}export{s as coreframeVitePreset};
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreframe/vite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/airlock-labs/coreframe.git",
|
|
7
7
|
"directory": "vite"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist/"
|
|
10
|
+
"dist/",
|
|
11
|
+
"client.d.ts"
|
|
11
12
|
],
|
|
12
13
|
"type": "module",
|
|
13
14
|
"exports": {
|
|
@@ -15,6 +16,9 @@
|
|
|
15
16
|
"types": "./dist/plugins/index.d.ts",
|
|
16
17
|
"default": "./dist/plugins/index.js"
|
|
17
18
|
},
|
|
19
|
+
"./client": {
|
|
20
|
+
"types": "./client.d.ts"
|
|
21
|
+
},
|
|
18
22
|
"./managed-dev-overlay": {
|
|
19
23
|
"types": "./dist/overlay/managed-dev-overlay.d.ts",
|
|
20
24
|
"default": "./dist/overlay/managed-dev-overlay.js"
|
|
@@ -36,9 +40,10 @@
|
|
|
36
40
|
"lucide-react": "^1.24.0",
|
|
37
41
|
"obug": "^2.1.3",
|
|
38
42
|
"unplugin": "^2.3.11",
|
|
39
|
-
"
|
|
43
|
+
"vite-plugin-hashed-favicons": "^2.1.1",
|
|
44
|
+
"@coreframe/dashboard": "^0.2.25",
|
|
40
45
|
"@coreframe/lib": "^0.1.17",
|
|
41
|
-
"@coreframe/scripts": "^0.1.
|
|
46
|
+
"@coreframe/scripts": "^0.1.47"
|
|
42
47
|
},
|
|
43
48
|
"devDependencies": {
|
|
44
49
|
"@tsdown/css": "0.22.3",
|
package/dist/plugins/panda.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Plugin } from "vite";
|
|
2
|
-
import { spawn } from "node:child_process";
|
|
3
|
-
|
|
4
|
-
//#region plugins/panda.d.ts
|
|
5
|
-
type CoreframePandaPluginOptions = {
|
|
6
|
-
env?: NodeJS.ProcessEnv;
|
|
7
|
-
spawnWatcher?: typeof spawnPandaWatcher;
|
|
8
|
-
};
|
|
9
|
-
type PandaWatcher = {
|
|
10
|
-
stop(): void;
|
|
11
|
-
};
|
|
12
|
-
type SpawnPandaWatcherOptions = {
|
|
13
|
-
cwd: string;
|
|
14
|
-
env: NodeJS.ProcessEnv;
|
|
15
|
-
onFailure(error: Error): void;
|
|
16
|
-
onOutput(line: string): void;
|
|
17
|
-
spawnProcess?: typeof spawn;
|
|
18
|
-
};
|
|
19
|
-
declare function coreframePandaPlugin({
|
|
20
|
-
env,
|
|
21
|
-
spawnWatcher
|
|
22
|
-
}?: CoreframePandaPluginOptions): Plugin;
|
|
23
|
-
declare function spawnPandaWatcher({
|
|
24
|
-
cwd,
|
|
25
|
-
env,
|
|
26
|
-
onFailure,
|
|
27
|
-
onOutput,
|
|
28
|
-
spawnProcess
|
|
29
|
-
}: SpawnPandaWatcherOptions): PandaWatcher;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { CoreframePandaPluginOptions, coreframePandaPlugin, spawnPandaWatcher };
|
package/dist/plugins/panda.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{spawn as e}from"node:child_process";import{createInterface as t}from"node:readline";const n=process.platform===`win32`?`pnpm.cmd`:`pnpm`;function r({env:e=process.env,spawnWatcher:t=i}={}){return{name:`coreframe:panda`,apply:`serve`,configureServer(n){let r=!1,i=t({cwd:n.config.root,env:e,onFailure:e=>{r||(n.config.logger.error(`Panda CSS watcher failed: ${e.message}`,{error:e}),process.exitCode=1,n.close())},onOutput:e=>n.config.logger.info(`[panda] ${e}`)});n.httpServer?.once(`close`,()=>{r=!0,i.stop()})}}}function i({cwd:r,env:i,onFailure:a,onOutput:o,spawnProcess:s=e}){let c=s(n,[`exec`,`panda`,`dev`,`--no-color`],{cwd:r,env:i,stdio:[`ignore`,`pipe`,`pipe`]}),l=!1,u=!1,d=e=>{l||u||(l=!0,a(e))},f=e=>{t({input:e}).on(`line`,e=>{o(e)})};return f(c.stdout),f(c.stderr),c.once(`error`,e=>{d(e)}),c.once(`exit`,(e,t)=>{d(Error(`Panda CSS watcher exited unexpectedly${t?` from ${t}`:` with code ${e??`unknown`}`}.`))}),{stop(){u||(u=!0,c.kill(`SIGTERM`))}}}export{r as coreframePandaPlugin,i as spawnPandaWatcher};
|