@nawc/cli 0.1.1 → 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/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createNawcServer } from "./server-B0NGps95.mjs";
1
+ import { t as createNawcServer } from "./server-BlYU6s3Y.mjs";
2
2
  import { configShape } from "@nawc/config";
3
3
  import { vscode } from "@nawc/editor-vscode";
4
4
  import { nawcDark, nawcLight, nawcLight as nawcLight$1 } from "@nawc/theme-nawc";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as assertGitRepository, t as createNawcServer } from "./server-B0NGps95.mjs";
2
+ import { n as assertGitRepository, t as createNawcServer } from "./server-BlYU6s3Y.mjs";
3
3
  import path from "node:path";
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { createJiti } from "jiti";
@@ -150,7 +150,7 @@ async function readDirectory(directory) {
150
150
  return notes.sort();
151
151
  }
152
152
  //#endregion
153
- //#region src/cli.ts
153
+ //#region src/nawc.ts
154
154
  async function loadConfig(projectDir, configFile) {
155
155
  const file = path.resolve(projectDir, configFile);
156
156
  return createJiti(import.meta.url, { interopDefault: true }).import(file, { default: true });
@@ -8,6 +8,7 @@ import { fileURLToPath } from "node:url";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { access, mkdir, readFile, readdir, realpath, rename, rm, rmdir, stat, writeFile } from "node:fs/promises";
10
10
  import { getRequestListener } from "@hono/node-server";
11
+ import tailwindcss from "@tailwindcss/vite";
11
12
  import { watch } from "chokidar";
12
13
  import { Hono } from "hono";
13
14
  import { streamSSE } from "hono/streaming";
@@ -1458,6 +1459,18 @@ async function createNawcServer(options) {
1458
1459
  const vite = await createServer$1({
1459
1460
  root: uiRoot,
1460
1461
  appType: "spa",
1462
+ optimizeDeps: {
1463
+ entries: ["src/**/*.{ts,tsx}"],
1464
+ include: [
1465
+ "highlight.js/lib/common",
1466
+ "react",
1467
+ "react/jsx-runtime",
1468
+ "react-dom",
1469
+ "react-dom/client",
1470
+ "use-sync-external-store/shim",
1471
+ "use-sync-external-store/shim/with-selector"
1472
+ ]
1473
+ },
1461
1474
  resolve: {
1462
1475
  alias: { "@nawcui": path.join(uiRoot, "src") },
1463
1476
  dedupe: ["react", "react-dom"]
@@ -1476,15 +1489,19 @@ async function createNawcServer(options) {
1476
1489
  uiRoot
1477
1490
  ] }
1478
1491
  },
1479
- plugins: [...vitePlugins, {
1480
- name: "nawc-configured-plugins",
1481
- resolveId(id) {
1482
- return id === "virtual:nawc-plugins" ? "\0virtual:nawc-plugins" : void 0;
1483
- },
1484
- load(id) {
1485
- return id === "\0virtual:nawc-plugins" ? `${pluginImports}\nexport const syntaxes = ${JSON.stringify(clientSyntax)};\nexport default [${pluginArray}];` : void 0;
1492
+ plugins: [
1493
+ tailwindcss(),
1494
+ ...vitePlugins,
1495
+ {
1496
+ name: "nawc-configured-plugins",
1497
+ resolveId(id) {
1498
+ return id === "virtual:nawc-plugins" ? "\0virtual:nawc-plugins" : void 0;
1499
+ },
1500
+ load(id) {
1501
+ return id === "\0virtual:nawc-plugins" ? `${pluginImports}\nexport const syntaxes = ${JSON.stringify(clientSyntax)};\nexport default [${pluginArray}];` : void 0;
1502
+ }
1486
1503
  }
1487
- }]
1504
+ ]
1488
1505
  });
1489
1506
  const api = getRequestListener(app.fetch);
1490
1507
  const server = createServer((request, response) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nawc/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Local HTML-backed notebooks for specification- and test-driven development with coding agents.",
5
5
  "keywords": [
6
6
  "coding-agents",
@@ -19,7 +19,7 @@
19
19
  "directory": "packages/nawc"
20
20
  },
21
21
  "bin": {
22
- "cli": "./dist/cli.mjs"
22
+ "nawc": "./dist/nawc.mjs"
23
23
  },
24
24
  "files": [
25
25
  "dist"
@@ -27,7 +27,7 @@
27
27
  "type": "module",
28
28
  "exports": {
29
29
  ".": "./dist/index.mjs",
30
- "./cli": "./dist/cli.mjs",
30
+ "./nawc": "./dist/nawc.mjs",
31
31
  "./package.json": "./package.json"
32
32
  },
33
33
  "publishConfig": {
@@ -36,6 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@hono/node-server": "^2.0.11",
39
+ "@tailwindcss/vite": "^4.1.18",
39
40
  "chokidar": "^5.0.0",
40
41
  "commander": "^15.0.0",
41
42
  "hono": "^4.12.29",
@@ -46,19 +47,19 @@
46
47
  "vite": "^8.1.4",
47
48
  "ws": "^8.18.3",
48
49
  "zod": "^4.4.3",
49
- "@nawc/config": "0.1.1",
50
- "@nawc/editor-vscode": "0.1.1",
51
- "@nawc/plugin": "0.1.1",
52
- "@nawc/theme-nawc": "0.1.1",
53
- "@nawc/ui": "0.1.1"
50
+ "@nawc/config": "0.1.2",
51
+ "@nawc/plugin": "0.1.2",
52
+ "@nawc/theme-nawc": "0.1.2",
53
+ "@nawc/ui": "0.1.2",
54
+ "@nawc/editor-vscode": "0.1.2"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@types/node": "^24",
57
58
  "@types/ws": "^8.18.1",
58
59
  "typescript": "^6",
59
60
  "vite-plus": "latest",
60
- "@nawc/core": "0.1.1",
61
- "@nawc/react": "0.1.1"
61
+ "@nawc/core": "0.1.2",
62
+ "@nawc/react": "0.1.2"
62
63
  },
63
64
  "engines": {
64
65
  "node": ">=22.12.0"
File without changes