@aiquants/contact-map 0.10.0 → 0.11.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.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { b as ContactRecordForTree, c as ContactMapTreeNaming, C as ContactMapDirectoryEntry } from "./tree-types-CDq16q63.mjs";
2
2
  export { D as DEFAULT_LIST_LAYOUT_SPEC, d as DEFAULT_TREE_LAYOUT_SPEC, R as ResponsiveLayoutSpec, a as ResponsiveThresholds, e as calculateResponsiveThresholds, g as getHysteresisBreakpointState } from "./tree-types-CDq16q63.mjs";
3
- import { e as SearchResultEntry, C as ContactRecord } from "./wire-BghOEeyw.mjs";
4
- export { d as ContactMapLogger, c as ContactMapOutletContext, b as ContactMapSearchOutletContext, a as ContactMapStreamPhase, f as ContactMapStreamState, F as FieldPerformanceMetric, I as IndexWorkerMetrics, J as JsonSerialized, L as LevenshteinWorkerMetrics, S as SerializedContactStreamRow, g as StreamChunkWire, h as StreamCursor, i as StreamErrorWire, j as StreamLineWire, k as StreamMetadataWire, l as defaultLogger } from "./wire-BghOEeyw.mjs";
3
+ import { e as SearchResultEntry, C as ContactRecord } from "./wire-CVZNwmQx.mjs";
4
+ export { d as ContactMapLogger, c as ContactMapOutletContext, b as ContactMapSearchOutletContext, a as ContactMapStreamPhase, f as ContactMapStreamState, F as FieldPerformanceMetric, I as IndexWorkerMetrics, J as JsonSerialized, L as LevenshteinWorkerMetrics, S as SerializedContactStreamRow, g as StreamChunkWire, h as StreamCursor, i as StreamErrorWire, j as StreamLineWire, k as StreamMetadataWire, l as defaultLogger } from "./wire-CVZNwmQx.mjs";
5
5
  import { z } from "zod";
6
6
  declare const assertContactMapTreeNaming: (naming: ContactMapTreeNaming) => void;
7
7
  declare class IncrementalTreeBuilder<T extends ContactRecordForTree = ContactRecordForTree> {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { b as ContactRecordForTree, c as ContactMapTreeNaming, C as ContactMapDirectoryEntry } from "./tree-types-CDq16q63.js";
2
2
  export { D as DEFAULT_LIST_LAYOUT_SPEC, d as DEFAULT_TREE_LAYOUT_SPEC, R as ResponsiveLayoutSpec, a as ResponsiveThresholds, e as calculateResponsiveThresholds, g as getHysteresisBreakpointState } from "./tree-types-CDq16q63.js";
3
- import { e as SearchResultEntry, C as ContactRecord } from "./wire-BghOEeyw.js";
4
- export { d as ContactMapLogger, c as ContactMapOutletContext, b as ContactMapSearchOutletContext, a as ContactMapStreamPhase, f as ContactMapStreamState, F as FieldPerformanceMetric, I as IndexWorkerMetrics, J as JsonSerialized, L as LevenshteinWorkerMetrics, S as SerializedContactStreamRow, g as StreamChunkWire, h as StreamCursor, i as StreamErrorWire, j as StreamLineWire, k as StreamMetadataWire, l as defaultLogger } from "./wire-BghOEeyw.js";
3
+ import { e as SearchResultEntry, C as ContactRecord } from "./wire-CVZNwmQx.js";
4
+ export { d as ContactMapLogger, c as ContactMapOutletContext, b as ContactMapSearchOutletContext, a as ContactMapStreamPhase, f as ContactMapStreamState, F as FieldPerformanceMetric, I as IndexWorkerMetrics, J as JsonSerialized, L as LevenshteinWorkerMetrics, S as SerializedContactStreamRow, g as StreamChunkWire, h as StreamCursor, i as StreamErrorWire, j as StreamLineWire, k as StreamMetadataWire, l as defaultLogger } from "./wire-CVZNwmQx.js";
5
5
  import { z } from "zod";
6
6
  declare const assertContactMapTreeNaming: (naming: ContactMapTreeNaming) => void;
7
7
  declare class IncrementalTreeBuilder<T extends ContactRecordForTree = ContactRecordForTree> {
package/dist/server.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as ContactMapLogger, C as ContactRecord, h as StreamCursor } from "./wire-BghOEeyw.mjs";
1
+ import { d as ContactMapLogger, C as ContactRecord, h as StreamCursor } from "./wire-CVZNwmQx.mjs";
2
2
  import { AnyMsSqlColumn, mssqlSchema } from "drizzle-orm/mssql-core";
3
3
  interface ContactRecordTable {
4
4
  person_id: AnyMsSqlColumn;
package/dist/server.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as ContactMapLogger, C as ContactRecord, h as StreamCursor } from "./wire-BghOEeyw.js";
1
+ import { d as ContactMapLogger, C as ContactRecord, h as StreamCursor } from "./wire-CVZNwmQx.js";
2
2
  import { AnyMsSqlColumn, mssqlSchema } from "drizzle-orm/mssql-core";
3
3
  interface ContactRecordTable {
4
4
  person_id: AnyMsSqlColumn;
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var N=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var Q=Object.prototype.hasOwnProperty;var B=(e,t)=>{for(var n in t)N(e,n,{get:t[n],enumerable:!0})},W=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of F(t))!Q.call(e,a)&&a!==n&&N(e,a,{get:()=>t[a],enumerable:!(s=z(t,a))||s.enumerable});return e};var H=e=>W(N({},"__esModule",{value:!0}),e);var re={};B(re,{DEFAULT_STREAM_CHUNK_SIZE:()=>$,DEFAULT_STREAM_ERROR_CLIENT_MESSAGE:()=>I,countActiveContactsQuery:()=>k,createContactMapServer:()=>ee,createContactMapStreamHandler:()=>q,defineContactMapTable:()=>te,getContactsStreamChunkQuery:()=>T});module.exports=H(re);var _=e=>{switch(typeof e){case"string":return JSON.stringify(e);case"bigint":return`${e}n`;case"symbol":return e.toString();case"object":return e===null?"null":L(e);case"function":return L(e);case"number":return Object.is(e,-0)?"-0":String(e);default:return String(e)}},L=e=>{try{return Object.prototype.toString.call(e)}catch{return"[object ?]"}};var P={info:(e,...t)=>console.info(`[contact-map] ${e}`,...t),warn:(e,...t)=>console.warn(`[contact-map] ${e}`,...t),error:(e,...t)=>console.error(`[contact-map] ${e}`,...t)};var O=`an integer from 1 to ${Number.MAX_SAFE_INTEGER}`,R=(e,t,n="")=>{if(typeof t!="number")throw new TypeError(`[contact-map] ${e} must be ${O}${n}; got ${_(t)}`);if(!(Number.isSafeInteger(t)&&t>0))throw new RangeError(`[contact-map] ${e} must be ${O}${n}; got ${_(t)}`)};var o=require("drizzle-orm");var $=200,w=e=>{if(e?.aborted)throw new DOMException("The operation was aborted","AbortError")};async function k(e,t,n,s){return w(s?.signal),await n(),w(s?.signal),(await e.select({count:o.sql`count(*)`}).from(t).where((0,o.eq)(t.is_active,!0)))[0]?.count??0}async function T(e,t,n,s,a,i){R("getContactsStreamChunkQuery limit",s),w(i?.signal),await a(),w(i?.signal);let f=(0,o.eq)(t.is_active,!0),b=f;if(n){let{contacted_at:d,person_id:y}=n;if(d!==null){let l=o.sql`CAST(${d.slice(0,23)} AS datetime2(3))`,S=(0,o.and)(f,(0,o.or)((0,o.lt)(t.contacted_at,l),(0,o.and)((0,o.eq)(t.contacted_at,l),(0,o.lt)(t.person_id,y)),(0,o.isNull)(t.contacted_at)));S&&(b=S)}else{let l=(0,o.and)(f,(0,o.isNull)(t.contacted_at),(0,o.lt)(t.person_id,y));l&&(b=l)}}let g=await e.select().from(t).where(b).orderBy((0,o.desc)(t.contacted_at),(0,o.desc)(t.person_id)).offset(0).fetch(s);w(i?.signal);let u=g.length>0?g[g.length-1]:null,h=u?{contacted_at:u.contacted_at?new Date(u.contacted_at).toISOString():null,person_id:u.person_id}:null,C=g.length<s;return{records:g,nextCursor:h,isLast:C}}var Z=100,J=300,I="stream interrupted by server error",K=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/,V=/^(0|[1-9]\d*)$/,X=e=>{if(!K.test(e))return!1;let t=new Date(e);return!Number.isNaN(t.getTime())&&t.toISOString()===e&&t.getUTCFullYear()>=1};function G(e){let t=e.get("cursor_person_id"),n=e.get("cursor_contacted_at");if(t===null)return n!==null?{ok:!1,message:"cursor_contacted_at requires cursor_person_id"}:{ok:!0,cursor:null};let s=V.test(t)?Number(t):Number.NaN;return Number.isSafeInteger(s)?n===null?{ok:!0,cursor:{contacted_at:null,person_id:s}}:X(n)?{ok:!0,cursor:{contacted_at:n,person_id:s}}:{ok:!1,message:`Invalid cursor_contacted_at: ${n}`}:{ok:!1,message:`Invalid cursor_person_id: ${t}`}}function Y(e){if(e.db===void 0||e.db===null)throw new TypeError(`[contact-map] server config db must be the Drizzle database the contact records are read from; got ${_(e.db)}`);if(e.table===void 0||e.table===null)throw new TypeError(`[contact-map] server config table must be the Drizzle table of the contact records; got ${_(e.table)}`);if(typeof e.ensureConnection!="function")throw new TypeError(`[contact-map] server config ensureConnection must be the function that connects the database pool before each query (pass async () => {} for a pool that is always connected); got ${_(e.ensureConnection)}`);if(typeof e.authenticate!="function")throw new TypeError(`[contact-map] server config authenticate must be the function that returns the request's user (to serve the stream without authentication, pass one that always returns a user); got ${_(e.authenticate)}`);for(let t of["firstBatchSize","nextBatchSize"])e[t]!==void 0&&R(`server config ${t}`,e[t]," (leave it out for the default)")}function q(e){Y(e);let{db:t,table:n,ensureConnection:s,authenticate:a,logger:i=P,firstBatchSize:f=Z,nextBatchSize:b=J,streamErrorClientMessage:g=I}=e;return async u=>{let h=u instanceof Request?u:u.request,C=G(new URL(h.url).searchParams);if(!C.ok)return Response.json({error:C.message},{status:400});let d,y;try{let c=await a(h,{failureRedirect:null});y=c.user,d=c.cookie}catch(c){return i.error("Authentication infrastructure error:",c),Response.json({error:"\u8A8D\u8A3C\u51E6\u7406\u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002"},{status:500})}if(!y)return Response.json({error:"Unauthorized"},{status:401,headers:d?{"Set-Cookie":d}:void 0});let l=C.cursor,S=f,v=!0,E=null,A=new TextEncoder,m=new AbortController;h.signal.aborted?m.abort():h.signal.addEventListener("abort",()=>{m.abort()},{once:!0});let U=new ReadableStream({async pull(c){if(m.signal.aborted||h.signal.aborted){c.close();return}try{let p=await T(t,n,l,S,s,{signal:m.signal});S=b;let j={records:p.records,nextCursor:p.nextCursor,isLast:p.isLast};if(v&&(v=!1,E=k(t,n,s,{signal:m.signal}).then(x=>{if(!m.signal.aborted)try{let D={type:"METADATA",total:x};c.enqueue(A.encode(`${JSON.stringify(D)}
2
- `))}catch{}}).catch(x=>{i.warn("Non-blocking countActiveContacts failed:",x)})),c.enqueue(A.encode(`${JSON.stringify(j)}
3
- `)),p.isLast||!p.nextCursor){E&&await E,c.close();return}l=p.nextCursor}catch(p){if(m.signal.aborted){try{c.close()}catch{}return}i.error("Streaming error during chunk fetch:",p);try{c.enqueue(A.encode(`${JSON.stringify({error:g})}
4
- `)),c.close()}catch{}}},cancel(){m.abort()}}),M=new Headers({"Content-Type":"application/x-ndjson; charset=utf-8","Cache-Control":"no-store, no-transform","X-Content-Type-Options":"nosniff"});return d&&M.set("Set-Cookie",d),new Response(U,{headers:M})}}function ee(e){return{streamLoader:q(e),countActiveContacts:a=>k(e.db,e.table,e.ensureConnection,a),getContactsStreamChunk:(a=null,i=$,f)=>T(e.db,e.table,a,i,e.ensureConnection,f)}}var r=require("drizzle-orm/mssql-core");function te(e,t){return e.table(t,{person_id:(0,r.bigint)("person_id",{mode:"number"}).identity().notNull(),person_id_redirect_to:(0,r.bigint)("person_id_redirect_to",{mode:"number"}),full_name:(0,r.nvarchar)("full_name",{length:1e3}),full_name_reading:(0,r.nvarchar)("full_name_reading",{length:1e3}),company_name:(0,r.nvarchar)("company_name",{length:1e3}),company_name_reading:(0,r.nvarchar)("company_name_reading",{length:1e3}),department:(0,r.nvarchar)("department",{length:1e3}),title:(0,r.nvarchar)("title",{length:1e3}),address:(0,r.nvarchar)("address",{length:1e3}),postal_code:(0,r.nvarchar)("postal_code",{length:100}),email:(0,r.nvarchar)("email",{length:100}),custom_email:(0,r.nvarchar)("custom_email",{length:100}),company_phone_number:(0,r.nvarchar)("company_phone_number",{length:100}),custom_company_phone_number:(0,r.nvarchar)("custom_company_phone_number",{length:100}),company_fax_number:(0,r.nvarchar)("company_fax_number",{length:100}),mobile_phone_number:(0,r.nvarchar)("mobile_phone_number",{length:100}),custom_mobile_phone_number:(0,r.nvarchar)("custom_mobile_phone_number",{length:100}),url:(0,r.nvarchar)("url",{length:100}),contacted_at:(0,r.datetime2)("contacted_at",{precision:7}),contacted_by:(0,r.nvarchar)("contacted_by",{length:100}),is_in_eight:(0,r.bit)("is_in_eight").default(!0).notNull(),is_contact_synced:(0,r.bit)("is_contact_synced").default(!1).notNull(),is_active:(0,r.bit)("is_active").default(!0).notNull(),is_incomplete:(0,r.bit)("is_incomplete").default(!1).notNull(),created_at:(0,r.datetime2)("created_at",{precision:7}),created_by:(0,r.nvarchar)("created_by",{length:50}),updated_at:(0,r.datetime2)("updated_at",{precision:7}),updated_by:(0,r.nvarchar)("updated_by",{length:50})},n=>[(0,r.primaryKey)({columns:[n.person_id]})])}0&&(module.exports={DEFAULT_STREAM_CHUNK_SIZE,DEFAULT_STREAM_ERROR_CLIENT_MESSAGE,countActiveContactsQuery,createContactMapServer,createContactMapStreamHandler,defineContactMapTable,getContactsStreamChunkQuery});
1
+ "use strict";var x=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var tt=Object.prototype.hasOwnProperty;var et=(t,e)=>{for(var r in e)x(t,r,{get:e[r],enumerable:!0})},rt=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of J(e))!tt.call(t,c)&&c!==r&&x(t,c,{get:()=>e[c],enumerable:!(s=G(e,c))||s.enumerable});return t};var nt=t=>rt(x({},"__esModule",{value:!0}),t);var _t={};et(_t,{DEFAULT_STREAM_CHUNK_SIZE:()=>O,DEFAULT_STREAM_ERROR_CLIENT_MESSAGE:()=>B,countActiveContactsQuery:()=>R,createContactMapServer:()=>pt,createContactMapStreamHandler:()=>H,defineContactMapTable:()=>ft,getContactsStreamChunkQuery:()=>A});module.exports=nt(_t);var a=t=>{switch(typeof t){case"string":return JSON.stringify(t);case"bigint":return`${t}n`;case"symbol":return t.toString();case"object":return t===null?"null":M(t);case"function":return M(t);case"number":return Object.is(t,-0)?"-0":String(t);default:return String(t)}},M=t=>{try{return Object.prototype.toString.call(t)}catch{return"[object ?]"}};var L={info:(t,...e)=>console.info(`[contact-map] ${t}`,...e),warn:(t,...e)=>console.warn(`[contact-map] ${t}`,...e),error:(t,...e)=>console.error(`[contact-map] ${t}`,...e)};var v=`an integer from 1 to ${Number.MAX_SAFE_INTEGER}`,T=(t,e,r="")=>{if(typeof e!="number")throw new TypeError(`[contact-map] ${t} must be ${v}${r}; got ${a(e)}`);if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`[contact-map] ${t} must be ${v}${r}; got ${a(e)}`)};var o=require("drizzle-orm");var D=t=>{if(typeof t!="object"||t===null)return!1;try{let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}catch{return!1}};var ot=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{7}Z$/,st=/^(0|-?[1-9]\d*)$/,at=/^(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2}\.\d{7})$/,ct=23,j="a UTC timestamp with 7 fractional digits as the server writes it (YYYY-MM-DDThh:mm:ss.fffffffZ), or null",U=`an integer from ${Number.MIN_SAFE_INTEGER} to ${Number.MAX_SAFE_INTEGER}`,E=t=>{if(!ot.test(t))return!1;let e=`${t.slice(0,ct)}Z`,r=new Date(e);return!Number.isNaN(r.getTime())&&r.toISOString()===e&&r.getUTCFullYear()>=1},q=t=>{let e=at.exec(t),r=e===null?null:`${e[1]}T${e[2]}Z`;if(r===null||!E(r))throw new TypeError(`[contact-map] the database text of the stream cursor's contacted_at must be YYYY-MM-DD hh:mm:ss.fffffff (CONVERT style 121 of datetime2(7)); got ${a(t)}`);return r},Q=t=>t.slice(0,-1),z=t=>Number.isSafeInteger(t),F=(t,e)=>{if(typeof e!="number")throw new TypeError(`[contact-map] ${t} must be ${U}; got ${a(e)}`);if(!z(e))throw new RangeError(`[contact-map] ${t} must be ${U}; got ${a(e)}`);return e},V=t=>{if(!st.test(t))return null;let e=Number(t);return z(e)?e:null},Y=t=>F("the database value of the stream cursor's person_id",t),Z=t=>{if(t===null)return;if(!D(t))throw new TypeError(`[contact-map] getContactsStreamChunkQuery cursor must be null or a plain object { contacted_at, person_id } as the server writes it; got ${a(t)}`);let e=t.contacted_at;if(e!==null){if(typeof e!="string")throw new TypeError(`[contact-map] getContactsStreamChunkQuery cursor.contacted_at must be ${j}; got ${a(e)}`);if(!E(e))throw new RangeError(`[contact-map] getContactsStreamChunkQuery cursor.contacted_at must be ${j}; got ${a(e)}`)}F("getContactsStreamChunkQuery cursor.person_id",t.person_id)};var O=200,w=t=>{if(t?.aborted)throw new DOMException("The operation was aborted","AbortError")};async function R(t,e,r,s){return w(s?.signal),await r(),w(s?.signal),(await t.select({count:o.sql`count(*)`}).from(e).where((0,o.eq)(e.is_active,!0)))[0]?.count??0}async function A(t,e,r,s,c,d){T("getContactsStreamChunkQuery limit",s),Z(r),w(d?.signal),await c(),w(d?.signal);let _=(0,o.eq)(e.is_active,!0),C=_;if(r){let{contacted_at:u,person_id:y}=r;if(u!==null){let l=o.sql`CAST(${Q(u)} AS datetime2(7))`,S=(0,o.and)(_,(0,o.or)((0,o.lt)(e.contacted_at,l),(0,o.and)((0,o.eq)(e.contacted_at,l),(0,o.lt)(e.person_id,y)),(0,o.isNull)(e.contacted_at)));S&&(C=S)}else{let l=(0,o.and)(_,(0,o.isNull)(e.contacted_at),(0,o.lt)(e.person_id,y));l&&(C=l)}}let g=await t.select({record:e,cursorContactedAt:o.sql`CONVERT(varchar(27), CAST(${e.contacted_at} AS datetime2(7)), 121)`}).from(e).where(C).orderBy((0,o.desc)(e.contacted_at),(0,o.desc)(e.person_id)).offset(0).fetch(s);w(d?.signal);let m=g.length>0?g[g.length-1]:null,h=m?{contacted_at:m.cursorContactedAt===null?null:q(m.cursorContactedAt),person_id:Y(m.record.person_id)}:null,b=g.length<s;return{records:g.map(u=>u.record),nextCursor:h,isLast:b}}var it=100,ut=300,B="stream interrupted by server error",dt=/^datetime2(\([0-7]\))?$/;function mt(t){let e=t.get("cursor_person_id"),r=t.get("cursor_contacted_at");if(e===null)return r!==null?{ok:!1,message:"cursor_contacted_at requires cursor_person_id"}:{ok:!0,cursor:null};let s=V(e);return s===null?{ok:!1,message:`Invalid cursor_person_id: ${e}`}:r===null?{ok:!0,cursor:{contacted_at:null,person_id:s}}:E(r)?{ok:!0,cursor:{contacted_at:r,person_id:s}}:{ok:!1,message:`Invalid cursor_contacted_at: ${r}`}}function lt(t){if(t.db===void 0||t.db===null)throw new TypeError(`[contact-map] server config db must be the Drizzle database the contact records are read from; got ${a(t.db)}`);if(t.table===void 0||t.table===null)throw new TypeError(`[contact-map] server config table must be the Drizzle table of the contact records; got ${a(t.table)}`);let e=t.table.contacted_at;if(typeof e?.getSQLType!="function")throw new TypeError(`[contact-map] server config table.contacted_at must be a Drizzle datetime2 column; got ${a(e)}`);let r=e.getSQLType();if(typeof r!="string"||!dt.test(r))throw new RangeError(`[contact-map] server config table.contacted_at must be a Drizzle datetime2 column; got ${a(r)}`);if(typeof t.ensureConnection!="function")throw new TypeError(`[contact-map] server config ensureConnection must be the function that connects the database pool before each query (pass async () => {} for a pool that is always connected); got ${a(t.ensureConnection)}`);if(typeof t.authenticate!="function")throw new TypeError(`[contact-map] server config authenticate must be the function that returns the request's user (to serve the stream without authentication, pass one that always returns a user); got ${a(t.authenticate)}`);for(let s of["firstBatchSize","nextBatchSize"])t[s]!==void 0&&T(`server config ${s}`,t[s]," (leave it out for the default)")}function H(t){lt(t);let{db:e,table:r,ensureConnection:s,authenticate:c,logger:d=L,firstBatchSize:_=it,nextBatchSize:C=ut,streamErrorClientMessage:g=B}=t;return async m=>{let h=m instanceof Request?m:m.request,b=mt(new URL(h.url).searchParams);if(!b.ok)return Response.json({error:b.message},{status:400});let u,y;try{let i=await c(h,{failureRedirect:null});y=i.user,u=i.cookie}catch(i){return d.error("Authentication infrastructure error:",i),Response.json({error:"\u8A8D\u8A3C\u51E6\u7406\u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002"},{status:500})}if(!y)return Response.json({error:"Unauthorized"},{status:401,headers:u?{"Set-Cookie":u}:void 0});let l=b.cursor,S=_,P=!0,k=null,$=new TextEncoder,p=new AbortController;h.signal.aborted?p.abort():h.signal.addEventListener("abort",()=>{p.abort()},{once:!0});let K=new ReadableStream({async pull(i){if(p.signal.aborted||h.signal.aborted){i.close();return}try{let f=await A(e,r,l,S,s,{signal:p.signal});S=C;let W={records:f.records,nextCursor:f.nextCursor,isLast:f.isLast};if(P&&(P=!1,k=R(e,r,s,{signal:p.signal}).then(N=>{if(!p.signal.aborted)try{let X={type:"METADATA",total:N};i.enqueue($.encode(`${JSON.stringify(X)}
2
+ `))}catch{}}).catch(N=>{d.warn("Non-blocking countActiveContacts failed:",N)})),i.enqueue($.encode(`${JSON.stringify(W)}
3
+ `)),f.isLast||!f.nextCursor){k&&await k,i.close();return}l=f.nextCursor}catch(f){if(p.signal.aborted){try{i.close()}catch{}return}d.error("Streaming error during chunk fetch:",f);try{i.enqueue($.encode(`${JSON.stringify({error:g})}
4
+ `)),i.close()}catch{}}},cancel(){p.abort()}}),I=new Headers({"Content-Type":"application/x-ndjson; charset=utf-8","Cache-Control":"no-store, no-transform","X-Content-Type-Options":"nosniff"});return u&&I.set("Set-Cookie",u),new Response(K,{headers:I})}}function pt(t){return{streamLoader:H(t),countActiveContacts:c=>R(t.db,t.table,t.ensureConnection,c),getContactsStreamChunk:(c=null,d=O,_)=>A(t.db,t.table,c,d,t.ensureConnection,_)}}var n=require("drizzle-orm/mssql-core");function ft(t,e){return t.table(e,{person_id:(0,n.bigint)("person_id",{mode:"number"}).identity().notNull(),person_id_redirect_to:(0,n.bigint)("person_id_redirect_to",{mode:"number"}),full_name:(0,n.nvarchar)("full_name",{length:1e3}),full_name_reading:(0,n.nvarchar)("full_name_reading",{length:1e3}),company_name:(0,n.nvarchar)("company_name",{length:1e3}),company_name_reading:(0,n.nvarchar)("company_name_reading",{length:1e3}),department:(0,n.nvarchar)("department",{length:1e3}),title:(0,n.nvarchar)("title",{length:1e3}),address:(0,n.nvarchar)("address",{length:1e3}),postal_code:(0,n.nvarchar)("postal_code",{length:100}),email:(0,n.nvarchar)("email",{length:100}),custom_email:(0,n.nvarchar)("custom_email",{length:100}),company_phone_number:(0,n.nvarchar)("company_phone_number",{length:100}),custom_company_phone_number:(0,n.nvarchar)("custom_company_phone_number",{length:100}),company_fax_number:(0,n.nvarchar)("company_fax_number",{length:100}),mobile_phone_number:(0,n.nvarchar)("mobile_phone_number",{length:100}),custom_mobile_phone_number:(0,n.nvarchar)("custom_mobile_phone_number",{length:100}),url:(0,n.nvarchar)("url",{length:100}),contacted_at:(0,n.datetime2)("contacted_at",{precision:7}),contacted_by:(0,n.nvarchar)("contacted_by",{length:100}),is_in_eight:(0,n.bit)("is_in_eight").default(!0).notNull(),is_contact_synced:(0,n.bit)("is_contact_synced").default(!1).notNull(),is_active:(0,n.bit)("is_active").default(!0).notNull(),is_incomplete:(0,n.bit)("is_incomplete").default(!1).notNull(),created_at:(0,n.datetime2)("created_at",{precision:7}),created_by:(0,n.nvarchar)("created_by",{length:50}),updated_at:(0,n.datetime2)("updated_at",{precision:7}),updated_by:(0,n.nvarchar)("updated_by",{length:50})},r=>[(0,n.primaryKey)({columns:[r.person_id]})])}0&&(module.exports={DEFAULT_STREAM_CHUNK_SIZE,DEFAULT_STREAM_ERROR_CLIENT_MESSAGE,countActiveContactsQuery,createContactMapServer,createContactMapStreamHandler,defineContactMapTable,getContactsStreamChunkQuery});
package/dist/server.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var p=e=>{switch(typeof e){case"string":return JSON.stringify(e);case"bigint":return`${e}n`;case"symbol":return e.toString();case"object":return e===null?"null":O(e);case"function":return O(e);case"number":return Object.is(e,-0)?"-0":String(e);default:return String(e)}},O=e=>{try{return Object.prototype.toString.call(e)}catch{return"[object ?]"}};var I={info:(e,...t)=>console.info(`[contact-map] ${e}`,...t),warn:(e,...t)=>console.warn(`[contact-map] ${e}`,...t),error:(e,...t)=>console.error(`[contact-map] ${e}`,...t)};var q=`an integer from 1 to ${Number.MAX_SAFE_INTEGER}`,w=(e,t,r="")=>{if(typeof t!="number")throw new TypeError(`[contact-map] ${e} must be ${q}${r}; got ${p(t)}`);if(!(Number.isSafeInteger(t)&&t>0))throw new RangeError(`[contact-map] ${e} must be ${q}${r}; got ${p(t)}`)};import{and as A,desc as U,eq as N,isNull as j,lt as x,or as H,sql as D}from"drizzle-orm";var z=200,S=e=>{if(e?.aborted)throw new DOMException("The operation was aborted","AbortError")};async function $(e,t,r,o){return S(o?.signal),await r(),S(o?.signal),(await e.select({count:D`count(*)`}).from(t).where(N(t.is_active,!0)))[0]?.count??0}async function v(e,t,r,o,c,a){w("getContactsStreamChunkQuery limit",o),S(a?.signal),await c(),S(a?.signal);let _=N(t.is_active,!0),h=_;if(r){let{contacted_at:u,person_id:C}=r;if(u!==null){let d=D`CAST(${u.slice(0,23)} AS datetime2(3))`,y=A(_,H(x(t.contacted_at,d),A(N(t.contacted_at,d),x(t.person_id,C)),j(t.contacted_at)));y&&(h=y)}else{let d=A(_,j(t.contacted_at),x(t.person_id,C));d&&(h=d)}}let f=await e.select().from(t).where(h).orderBy(U(t.contacted_at),U(t.person_id)).offset(0).fetch(o);S(a?.signal);let i=f.length>0?f[f.length-1]:null,g=i?{contacted_at:i.contacted_at?new Date(i.contacted_at).toISOString():null,person_id:i.person_id}:null,b=f.length<o;return{records:f,nextCursor:g,isLast:b}}var Z=100,J=300,K="stream interrupted by server error",V=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/,X=/^(0|[1-9]\d*)$/,G=e=>{if(!V.test(e))return!1;let t=new Date(e);return!Number.isNaN(t.getTime())&&t.toISOString()===e&&t.getUTCFullYear()>=1};function Y(e){let t=e.get("cursor_person_id"),r=e.get("cursor_contacted_at");if(t===null)return r!==null?{ok:!1,message:"cursor_contacted_at requires cursor_person_id"}:{ok:!0,cursor:null};let o=X.test(t)?Number(t):Number.NaN;return Number.isSafeInteger(o)?r===null?{ok:!0,cursor:{contacted_at:null,person_id:o}}:G(r)?{ok:!0,cursor:{contacted_at:r,person_id:o}}:{ok:!1,message:`Invalid cursor_contacted_at: ${r}`}:{ok:!1,message:`Invalid cursor_person_id: ${t}`}}function ee(e){if(e.db===void 0||e.db===null)throw new TypeError(`[contact-map] server config db must be the Drizzle database the contact records are read from; got ${p(e.db)}`);if(e.table===void 0||e.table===null)throw new TypeError(`[contact-map] server config table must be the Drizzle table of the contact records; got ${p(e.table)}`);if(typeof e.ensureConnection!="function")throw new TypeError(`[contact-map] server config ensureConnection must be the function that connects the database pool before each query (pass async () => {} for a pool that is always connected); got ${p(e.ensureConnection)}`);if(typeof e.authenticate!="function")throw new TypeError(`[contact-map] server config authenticate must be the function that returns the request's user (to serve the stream without authentication, pass one that always returns a user); got ${p(e.authenticate)}`);for(let t of["firstBatchSize","nextBatchSize"])e[t]!==void 0&&w(`server config ${t}`,e[t]," (leave it out for the default)")}function te(e){ee(e);let{db:t,table:r,ensureConnection:o,authenticate:c,logger:a=I,firstBatchSize:_=Z,nextBatchSize:h=J,streamErrorClientMessage:f=K}=e;return async i=>{let g=i instanceof Request?i:i.request,b=Y(new URL(g.url).searchParams);if(!b.ok)return Response.json({error:b.message},{status:400});let u,C;try{let s=await c(g,{failureRedirect:null});C=s.user,u=s.cookie}catch(s){return a.error("Authentication infrastructure error:",s),Response.json({error:"\u8A8D\u8A3C\u51E6\u7406\u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002"},{status:500})}if(!C)return Response.json({error:"Unauthorized"},{status:401,headers:u?{"Set-Cookie":u}:void 0});let d=b.cursor,y=_,L=!0,k=null,T=new TextEncoder,l=new AbortController;g.signal.aborted?l.abort():g.signal.addEventListener("abort",()=>{l.abort()},{once:!0});let Q=new ReadableStream({async pull(s){if(l.signal.aborted||g.signal.aborted){s.close();return}try{let m=await v(t,r,d,y,o,{signal:l.signal});y=h;let B={records:m.records,nextCursor:m.nextCursor,isLast:m.isLast};if(L&&(L=!1,k=$(t,r,o,{signal:l.signal}).then(E=>{if(!l.signal.aborted)try{let W={type:"METADATA",total:E};s.enqueue(T.encode(`${JSON.stringify(W)}
2
- `))}catch{}}).catch(E=>{a.warn("Non-blocking countActiveContacts failed:",E)})),s.enqueue(T.encode(`${JSON.stringify(B)}
3
- `)),m.isLast||!m.nextCursor){k&&await k,s.close();return}d=m.nextCursor}catch(m){if(l.signal.aborted){try{s.close()}catch{}return}a.error("Streaming error during chunk fetch:",m);try{s.enqueue(T.encode(`${JSON.stringify({error:f})}
4
- `)),s.close()}catch{}}},cancel(){l.abort()}}),P=new Headers({"Content-Type":"application/x-ndjson; charset=utf-8","Cache-Control":"no-store, no-transform","X-Content-Type-Options":"nosniff"});return u&&P.set("Set-Cookie",u),new Response(Q,{headers:P})}}function _e(e){return{streamLoader:te(e),countActiveContacts:c=>$(e.db,e.table,e.ensureConnection,c),getContactsStreamChunk:(c=null,a=z,_)=>v(e.db,e.table,c,a,e.ensureConnection,_)}}import{bigint as F,bit as R,datetime2 as M,nvarchar as n,primaryKey as re}from"drizzle-orm/mssql-core";function he(e,t){return e.table(t,{person_id:F("person_id",{mode:"number"}).identity().notNull(),person_id_redirect_to:F("person_id_redirect_to",{mode:"number"}),full_name:n("full_name",{length:1e3}),full_name_reading:n("full_name_reading",{length:1e3}),company_name:n("company_name",{length:1e3}),company_name_reading:n("company_name_reading",{length:1e3}),department:n("department",{length:1e3}),title:n("title",{length:1e3}),address:n("address",{length:1e3}),postal_code:n("postal_code",{length:100}),email:n("email",{length:100}),custom_email:n("custom_email",{length:100}),company_phone_number:n("company_phone_number",{length:100}),custom_company_phone_number:n("custom_company_phone_number",{length:100}),company_fax_number:n("company_fax_number",{length:100}),mobile_phone_number:n("mobile_phone_number",{length:100}),custom_mobile_phone_number:n("custom_mobile_phone_number",{length:100}),url:n("url",{length:100}),contacted_at:M("contacted_at",{precision:7}),contacted_by:n("contacted_by",{length:100}),is_in_eight:R("is_in_eight").default(!0).notNull(),is_contact_synced:R("is_contact_synced").default(!1).notNull(),is_active:R("is_active").default(!0).notNull(),is_incomplete:R("is_incomplete").default(!1).notNull(),created_at:M("created_at",{precision:7}),created_by:n("created_by",{length:50}),updated_at:M("updated_at",{precision:7}),updated_by:n("updated_by",{length:50})},r=>[re({columns:[r.person_id]})])}export{z as DEFAULT_STREAM_CHUNK_SIZE,K as DEFAULT_STREAM_ERROR_CLIENT_MESSAGE,$ as countActiveContactsQuery,_e as createContactMapServer,te as createContactMapStreamHandler,he as defineContactMapTable,v as getContactsStreamChunkQuery};
1
+ var s=t=>{switch(typeof t){case"string":return JSON.stringify(t);case"bigint":return`${t}n`;case"symbol":return t.toString();case"object":return t===null?"null":D(t);case"function":return D(t);case"number":return Object.is(t,-0)?"-0":String(t);default:return String(t)}},D=t=>{try{return Object.prototype.toString.call(t)}catch{return"[object ?]"}};var j={info:(t,...e)=>console.info(`[contact-map] ${t}`,...e),warn:(t,...e)=>console.warn(`[contact-map] ${t}`,...e),error:(t,...e)=>console.error(`[contact-map] ${t}`,...e)};var U=`an integer from 1 to ${Number.MAX_SAFE_INTEGER}`,w=(t,e,r="")=>{if(typeof e!="number")throw new TypeError(`[contact-map] ${t} must be ${U}${r}; got ${s(e)}`);if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`[contact-map] ${t} must be ${U}${r}; got ${s(e)}`)};import{and as $,desc as W,eq as x,isNull as X,lt as N,or as ct,sql as O}from"drizzle-orm";var q=t=>{if(typeof t!="object"||t===null)return!1;try{let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}catch{return!1}};var nt=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{7}Z$/,ot=/^(0|-?[1-9]\d*)$/,st=/^(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2}\.\d{7})$/,at=23,Q="a UTC timestamp with 7 fractional digits as the server writes it (YYYY-MM-DDThh:mm:ss.fffffffZ), or null",z=`an integer from ${Number.MIN_SAFE_INTEGER} to ${Number.MAX_SAFE_INTEGER}`,T=t=>{if(!nt.test(t))return!1;let e=`${t.slice(0,at)}Z`,r=new Date(e);return!Number.isNaN(r.getTime())&&r.toISOString()===e&&r.getUTCFullYear()>=1},F=t=>{let e=st.exec(t),r=e===null?null:`${e[1]}T${e[2]}Z`;if(r===null||!T(r))throw new TypeError(`[contact-map] the database text of the stream cursor's contacted_at must be YYYY-MM-DD hh:mm:ss.fffffff (CONVERT style 121 of datetime2(7)); got ${s(t)}`);return r},V=t=>t.slice(0,-1),Y=t=>Number.isSafeInteger(t),Z=(t,e)=>{if(typeof e!="number")throw new TypeError(`[contact-map] ${t} must be ${z}; got ${s(e)}`);if(!Y(e))throw new RangeError(`[contact-map] ${t} must be ${z}; got ${s(e)}`);return e},B=t=>{if(!ot.test(t))return null;let e=Number(t);return Y(e)?e:null},H=t=>Z("the database value of the stream cursor's person_id",t),K=t=>{if(t===null)return;if(!q(t))throw new TypeError(`[contact-map] getContactsStreamChunkQuery cursor must be null or a plain object { contacted_at, person_id } as the server writes it; got ${s(t)}`);let e=t.contacted_at;if(e!==null){if(typeof e!="string")throw new TypeError(`[contact-map] getContactsStreamChunkQuery cursor.contacted_at must be ${Q}; got ${s(e)}`);if(!T(e))throw new RangeError(`[contact-map] getContactsStreamChunkQuery cursor.contacted_at must be ${Q}; got ${s(e)}`)}Z("getContactsStreamChunkQuery cursor.person_id",t.person_id)};var G=200,S=t=>{if(t?.aborted)throw new DOMException("The operation was aborted","AbortError")};async function P(t,e,r,o){return S(o?.signal),await r(),S(o?.signal),(await t.select({count:O`count(*)`}).from(e).where(x(e.is_active,!0)))[0]?.count??0}async function I(t,e,r,o,u,i){w("getContactsStreamChunkQuery limit",o),K(r),S(i?.signal),await u(),S(i?.signal);let f=x(e.is_active,!0),h=f;if(r){let{contacted_at:c,person_id:b}=r;if(c!==null){let m=O`CAST(${V(c)} AS datetime2(7))`,y=$(f,ct(N(e.contacted_at,m),$(x(e.contacted_at,m),N(e.person_id,b)),X(e.contacted_at)));y&&(h=y)}else{let m=$(f,X(e.contacted_at),N(e.person_id,b));m&&(h=m)}}let _=await t.select({record:e,cursorContactedAt:O`CONVERT(varchar(27), CAST(${e.contacted_at} AS datetime2(7)), 121)`}).from(e).where(h).orderBy(W(e.contacted_at),W(e.person_id)).offset(0).fetch(o);S(i?.signal);let d=_.length>0?_[_.length-1]:null,g=d?{contacted_at:d.cursorContactedAt===null?null:F(d.cursorContactedAt),person_id:H(d.record.person_id)}:null,C=_.length<o;return{records:_.map(c=>c.record),nextCursor:g,isLast:C}}var it=100,ut=300,dt="stream interrupted by server error",mt=/^datetime2(\([0-7]\))?$/;function lt(t){let e=t.get("cursor_person_id"),r=t.get("cursor_contacted_at");if(e===null)return r!==null?{ok:!1,message:"cursor_contacted_at requires cursor_person_id"}:{ok:!0,cursor:null};let o=B(e);return o===null?{ok:!1,message:`Invalid cursor_person_id: ${e}`}:r===null?{ok:!0,cursor:{contacted_at:null,person_id:o}}:T(r)?{ok:!0,cursor:{contacted_at:r,person_id:o}}:{ok:!1,message:`Invalid cursor_contacted_at: ${r}`}}function pt(t){if(t.db===void 0||t.db===null)throw new TypeError(`[contact-map] server config db must be the Drizzle database the contact records are read from; got ${s(t.db)}`);if(t.table===void 0||t.table===null)throw new TypeError(`[contact-map] server config table must be the Drizzle table of the contact records; got ${s(t.table)}`);let e=t.table.contacted_at;if(typeof e?.getSQLType!="function")throw new TypeError(`[contact-map] server config table.contacted_at must be a Drizzle datetime2 column; got ${s(e)}`);let r=e.getSQLType();if(typeof r!="string"||!mt.test(r))throw new RangeError(`[contact-map] server config table.contacted_at must be a Drizzle datetime2 column; got ${s(r)}`);if(typeof t.ensureConnection!="function")throw new TypeError(`[contact-map] server config ensureConnection must be the function that connects the database pool before each query (pass async () => {} for a pool that is always connected); got ${s(t.ensureConnection)}`);if(typeof t.authenticate!="function")throw new TypeError(`[contact-map] server config authenticate must be the function that returns the request's user (to serve the stream without authentication, pass one that always returns a user); got ${s(t.authenticate)}`);for(let o of["firstBatchSize","nextBatchSize"])t[o]!==void 0&&w(`server config ${o}`,t[o]," (leave it out for the default)")}function ft(t){pt(t);let{db:e,table:r,ensureConnection:o,authenticate:u,logger:i=j,firstBatchSize:f=it,nextBatchSize:h=ut,streamErrorClientMessage:_=dt}=t;return async d=>{let g=d instanceof Request?d:d.request,C=lt(new URL(g.url).searchParams);if(!C.ok)return Response.json({error:C.message},{status:400});let c,b;try{let a=await u(g,{failureRedirect:null});b=a.user,c=a.cookie}catch(a){return i.error("Authentication infrastructure error:",a),Response.json({error:"\u8A8D\u8A3C\u51E6\u7406\u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002"},{status:500})}if(!b)return Response.json({error:"Unauthorized"},{status:401,headers:c?{"Set-Cookie":c}:void 0});let m=C.cursor,y=f,L=!0,R=null,A=new TextEncoder,l=new AbortController;g.signal.aborted?l.abort():g.signal.addEventListener("abort",()=>{l.abort()},{once:!0});let tt=new ReadableStream({async pull(a){if(l.signal.aborted||g.signal.aborted){a.close();return}try{let p=await I(e,r,m,y,o,{signal:l.signal});y=h;let et={records:p.records,nextCursor:p.nextCursor,isLast:p.isLast};if(L&&(L=!1,R=P(e,r,o,{signal:l.signal}).then(k=>{if(!l.signal.aborted)try{let rt={type:"METADATA",total:k};a.enqueue(A.encode(`${JSON.stringify(rt)}
2
+ `))}catch{}}).catch(k=>{i.warn("Non-blocking countActiveContacts failed:",k)})),a.enqueue(A.encode(`${JSON.stringify(et)}
3
+ `)),p.isLast||!p.nextCursor){R&&await R,a.close();return}m=p.nextCursor}catch(p){if(l.signal.aborted){try{a.close()}catch{}return}i.error("Streaming error during chunk fetch:",p);try{a.enqueue(A.encode(`${JSON.stringify({error:_})}
4
+ `)),a.close()}catch{}}},cancel(){l.abort()}}),v=new Headers({"Content-Type":"application/x-ndjson; charset=utf-8","Cache-Control":"no-store, no-transform","X-Content-Type-Options":"nosniff"});return c&&v.set("Set-Cookie",c),new Response(tt,{headers:v})}}function It(t){return{streamLoader:ft(t),countActiveContacts:u=>P(t.db,t.table,t.ensureConnection,u),getContactsStreamChunk:(u=null,i=G,f)=>I(t.db,t.table,u,i,t.ensureConnection,f)}}import{bigint as J,bit as E,datetime2 as M,nvarchar as n,primaryKey as _t}from"drizzle-orm/mssql-core";function vt(t,e){return t.table(e,{person_id:J("person_id",{mode:"number"}).identity().notNull(),person_id_redirect_to:J("person_id_redirect_to",{mode:"number"}),full_name:n("full_name",{length:1e3}),full_name_reading:n("full_name_reading",{length:1e3}),company_name:n("company_name",{length:1e3}),company_name_reading:n("company_name_reading",{length:1e3}),department:n("department",{length:1e3}),title:n("title",{length:1e3}),address:n("address",{length:1e3}),postal_code:n("postal_code",{length:100}),email:n("email",{length:100}),custom_email:n("custom_email",{length:100}),company_phone_number:n("company_phone_number",{length:100}),custom_company_phone_number:n("custom_company_phone_number",{length:100}),company_fax_number:n("company_fax_number",{length:100}),mobile_phone_number:n("mobile_phone_number",{length:100}),custom_mobile_phone_number:n("custom_mobile_phone_number",{length:100}),url:n("url",{length:100}),contacted_at:M("contacted_at",{precision:7}),contacted_by:n("contacted_by",{length:100}),is_in_eight:E("is_in_eight").default(!0).notNull(),is_contact_synced:E("is_contact_synced").default(!1).notNull(),is_active:E("is_active").default(!0).notNull(),is_incomplete:E("is_incomplete").default(!1).notNull(),created_at:M("created_at",{precision:7}),created_by:n("created_by",{length:50}),updated_at:M("updated_at",{precision:7}),updated_by:n("updated_by",{length:50})},r=>[_t({columns:[r.person_id]})])}export{G as DEFAULT_STREAM_CHUNK_SIZE,dt as DEFAULT_STREAM_ERROR_CLIENT_MESSAGE,P as countActiveContactsQuery,It as createContactMapServer,ft as createContactMapStreamHandler,vt as defineContactMapTable,I as getContactsStreamChunkQuery};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiquants/contact-map",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Reusable contact-map feature package: shared types/schemas, React (Router v7 / v8) UI with virtual scrolling + tree view + incremental Web Worker + fuzzy search + resize panels, and a drizzle (mssql) server layer with DI ports.",
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -59,12 +59,12 @@
59
59
  "tailwind-merge": "^3.5.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@aiquants/directory-tree": "^4.1.0",
62
+ "@aiquants/directory-tree": "^4.1.1",
63
63
  "@aiquants/fuzzy-search": "^3.2.0",
64
64
  "@aiquants/resize-panels": "^2.1.0",
65
65
  "@aiquants/select-box": "^0.16.3",
66
66
  "@aiquants/swipe-overlay": "^1.2.5",
67
- "@aiquants/virtualscroll": "^3.12.0",
67
+ "@aiquants/virtualscroll": "^3.16.0",
68
68
  "@tailwindcss/cli": "^4.1.18",
69
69
  "@testing-library/jest-dom": "^6.9.1",
70
70
  "@testing-library/react": "^16.3.2",
@@ -85,12 +85,12 @@
85
85
  "zod": "^3.25.76"
86
86
  },
87
87
  "peerDependencies": {
88
- "@aiquants/directory-tree": "^4.1.0",
88
+ "@aiquants/directory-tree": "^4.1.1",
89
89
  "@aiquants/fuzzy-search": "^3.2.0",
90
90
  "@aiquants/resize-panels": "^2.1.0",
91
91
  "@aiquants/select-box": "^0.16.3",
92
92
  "@aiquants/swipe-overlay": "^1.2.5",
93
- "@aiquants/virtualscroll": "^3.12.0",
93
+ "@aiquants/virtualscroll": "^3.16.0",
94
94
  "drizzle-orm": ">=1.0.0-beta.4 <2.0.0",
95
95
  "react": ">=18",
96
96
  "react-dom": ">=18",
File without changes