retouche-dev 0.1.0 → 0.1.2

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/next.js CHANGED
@@ -1,10 +1,17 @@
1
- import { t as createRouteHandler } from "./handler-O-I_szZX.js";
1
+ import { a as appEnvs, i as appEnvFolders, t as createRouteHandler } from "./handler-CoK5CtV4.js";
2
2
  // src/server/next.ts
3
3
  function createRoute(options = {}) {
4
4
  let handler = null;
5
5
  const serve = async (request) => {
6
6
  if (process.env.NODE_ENV !== "development") return new Response(null, { status: 404 });
7
- handler ??= createRouteHandler(options);
7
+ if (handler === null) {
8
+ const files = {
9
+ folders: appEnvFolders(options),
10
+ mode: "development"
11
+ };
12
+ const { env, spawnEnv } = appEnvs(process.env, files, options);
13
+ handler = createRouteHandler(options, env, spawnEnv);
14
+ }
8
15
  return await handler(request);
9
16
  };
10
17
  return {
package/dist/vite.js CHANGED
@@ -1,10 +1,10 @@
1
- import { d as ROUTE_BASE } from "./clock-DPQ0w5RJ.js";
2
- import { a as withEnvFiles, i as isLoopbackAddress, n as BODY_LIMIT_ERROR, t as createRouteHandler } from "./handler-O-I_szZX.js";
3
- import { h as errorResponse } from "./follow-files-VmBxVLp-.js";
1
+ import { d as ROUTE_BASE } from "./clock-BJi08VJS.js";
2
+ import { a as appEnvs, n as BODY_LIMIT_ERROR, o as isLoopbackAddress, t as createRouteHandler } from "./handler-CoK5CtV4.js";
3
+ import { g as errorResponse, h as deferred } from "./follow-files-Dcya6bMQ.js";
4
4
  import { loadEnv } from "vite";
5
5
  // src/server/node-http.ts
6
6
  async function readBody(request) {
7
- const { promise, reject, resolve } = Promise.withResolvers();
7
+ const { promise, reject, resolve } = deferred();
8
8
  const chunks = [];
9
9
  let size = 0;
10
10
  const onData = (chunk) => {
@@ -80,10 +80,17 @@ function retouche(options = {}) {
80
80
  return {
81
81
  apply: "serve",
82
82
  configResolved(config) {
83
+ const { env, spawnEnv } = appEnvs({
84
+ ...process.env,
85
+ ...loadEnv(config.mode, config.envDir, "")
86
+ }, {
87
+ folders: config.envDir === false ? [] : [config.envDir],
88
+ mode: config.mode
89
+ }, options);
83
90
  handler = createRouteHandler({
84
91
  ...options,
85
92
  root: options.root ?? config.root
86
- }, withEnvFiles(loadEnv(config.mode, config.envDir, ""), options));
93
+ }, env, spawnEnv);
87
94
  },
88
95
  configureServer(server) {
89
96
  server.middlewares.use(ROUTE_BASE, (request, response, next) => {
@@ -1,4 +1,4 @@
1
- import { n as recordedMs, r as pendingPassages, t as clock } from "./clock-DPQ0w5RJ.js";
1
+ import { n as recordedMs, r as pendingPassages, t as clock } from "./clock-BJi08VJS.js";
2
2
  // src/voice/follow-prompt.ts
3
3
  const FOLLOW_TOOL = "next_feedback";
4
4
  const FOLLOW_PROMPT = "follow";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "retouche-dev",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Dots on every element whose call site overrides your design system's typography.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -67,7 +67,7 @@
67
67
  "pack": "tsdown && bun pm pack --filename retouche.tgz --quiet",
68
68
  "prepublishOnly": "tsdown",
69
69
  "test": "vitest run",
70
- "typecheck": "tsc --noEmit"
70
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.server.json"
71
71
  },
72
72
  "dependencies": {
73
73
  "@agentclientprotocol/sdk": "^2.12.0",
@@ -101,5 +101,8 @@
101
101
  "vite": {
102
102
  "optional": true
103
103
  }
104
+ },
105
+ "engines": {
106
+ "node": ">=20.9"
104
107
  }
105
108
  }