typerighter 0.32.5 → 0.36.0

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.
@@ -786,7 +786,7 @@ function ot(e) {
786
786
  return t;
787
787
  }
788
788
  function st(e) {
789
- return e.replaceAll("{{", "{{");
789
+ return e.replaceAll("{{", "{{").replaceAll("}}", "}}");
790
790
  }
791
791
  //#endregion
792
792
  //#region src/node/lib/typedown-context.ts
@@ -806,8 +806,8 @@ var ct = class {
806
806
  }), e.onContentChanged(({ filepath: e, affectedFiles: t = [] }) => {
807
807
  this.cachedFileMap.delete(e);
808
808
  for (let e of t) this.cachedFileMap.delete(e);
809
- }), e.onContentCreated(() => {
810
- this.cachedFiles = void 0;
809
+ }), e.onContentCreated(({ filepath: e }) => {
810
+ this.cachedFiles = void 0, this.cachedFileMap.delete(e);
811
811
  }), e.onContentRenamed(({ filepath: e, renamedTo: t }) => {
812
812
  this.cachedFiles = void 0, this.cachedFileMap.delete(e), t !== void 0 && this.cachedFileMap.delete(t);
813
813
  }), e.onContentDeleted(({ filepath: e }) => {
@@ -1378,33 +1378,37 @@ function $(t = {}) {
1378
1378
  0 < e.diagnostics.length && (console.error(""), Bt(e.diagnostics));
1379
1379
  }), t.rpc.onConfigChanged(() => {
1380
1380
  i && (d.devHtml = void 0, l.clear(), s.invalidate(i), c.invalidate(i), Lt(i), l.fetch(t, i));
1381
- }), t.rpc.onContentChanged(({ filepath: e, affectedFiles: n = [] }) => {
1382
- i && (u.reindex(r, e), u.invalidate(i), t.getConfig().then((t) => {
1381
+ });
1382
+ function o(...e) {
1383
+ i && t.getConfig().then((t) => {
1383
1384
  if (!i) return;
1384
- let r = [e, ...n], a = [];
1385
- for (let e of r) {
1386
- let n = re(w(i.config.root, t.rootDir, e)), r = i.moduleGraph.getModulesByFile(n);
1387
- if (r?.size) {
1388
- for (let e of r) i?.moduleGraph.invalidateModule(e), a.push(zt(e));
1389
- c.invalidatePageData(i, e);
1385
+ let n = [];
1386
+ for (let r of e) {
1387
+ let e = re(w(i.config.root, t.rootDir, r)), a = i.moduleGraph.getModulesByFile(e);
1388
+ if (a?.size) {
1389
+ for (let e of a) i.moduleGraph.invalidateModule(e), n.push(zt(e));
1390
+ c.invalidatePageData(i, r);
1390
1391
  }
1391
1392
  }
1392
- 0 < a.length && i.hot.send({
1393
+ 0 < n.length && i.hot.send({
1393
1394
  type: "update",
1394
- updates: a
1395
+ updates: n
1395
1396
  });
1396
- }).catch(() => {}), a());
1397
+ }).catch(() => {});
1398
+ }
1399
+ t.rpc.onContentChanged(({ filepath: e, affectedFiles: t = [] }) => {
1400
+ i && (u.reindex(r, e), u.invalidate(i), o(e, ...t), a());
1397
1401
  });
1398
- function o() {
1399
- i && (u.index(r), u.invalidate(i), c.invalidate(i), l.clear(), l.fetch(t, i));
1402
+ function m({ filepath: e }) {
1403
+ i && (u.index(r), u.invalidate(i), c.invalidate(i), l.clear(), l.fetch(t, i), o(e));
1400
1404
  }
1401
- t.rpc.onContentCreated(o), t.rpc.onContentDeleted(o), t.rpc.onContentRenamed(o);
1402
- function m() {
1405
+ t.rpc.onContentCreated(m), t.rpc.onContentDeleted(m), t.rpc.onContentRenamed(m);
1406
+ function h() {
1403
1407
  i && (l.clear(), Rt(i), l.fetch(t, i));
1404
1408
  }
1405
- t.rpc.onSchemaChanged(m), t.rpc.onSchemaCreated(m), t.rpc.onSchemaDeleted(m);
1406
- let h = await t.getConfig();
1407
- d.basePath = h.basePath, d.rootDirectory = h.rootDir, t.rpc.onConfigChanged((e) => {
1409
+ t.rpc.onSchemaChanged(h), t.rpc.onSchemaCreated(h), t.rpc.onSchemaDeleted(h);
1410
+ let g = await t.getConfig();
1411
+ d.basePath = g.basePath, d.rootDirectory = g.rootDir, t.rpc.onConfigChanged((e) => {
1408
1412
  d.basePath = e.basePath, d.rootDirectory = e.rootDir, d.devHtml = void 0;
1409
1413
  }), e.middlewares.use(Nt(e, d)), e.middlewares.use(Pt(e, t, d));
1410
1414
  },
package/dist/vite.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./vite-DHp_mMcQ.js";
1
+ import { n as e, t } from "./vite-3b1YMuxJ.js";
2
2
  export { e as generateClientAppEntry, t as typedown };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "typerighter",
4
- "version": "0.32.5",
4
+ "version": "0.36.0",
5
5
  "description": "Typedown: A typed content framework.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -69,8 +69,8 @@
69
69
  "temml": "^0.13.5",
70
70
  "vite": "^8.2.2",
71
71
  "vue": "^3.5.42",
72
- "@typerighter/rpc-client": "0.32.5",
73
- "@typerighter/rpc-server": "0.32.5"
72
+ "@typerighter/rpc-server": "0.36.0",
73
+ "@typerighter/rpc-client": "0.36.0"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@hdnax/nuclint": "^0.17.5",