@lpdjs/firestore-repo-service 3.0.1 → 3.0.4
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/{create-servers-aWdDTcSu.d.ts → create-servers-2Hw0pkyz.d.ts} +2 -2
- package/dist/{create-servers-Cbvzs_ou.d.cts → create-servers-ASLcxpiS.d.cts} +2 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/llms-full.txt +1 -1
- package/dist/llms.txt +1 -1
- package/dist/{queue-CMiKvIW1.d.cts → queue-B9jCT62h.d.cts} +1 -1
- package/dist/{queue-BQxyuEXb.d.ts → queue-BWi6TBmf.d.ts} +1 -1
- package/dist/servers/index.d.cts +3 -3
- package/dist/servers/index.d.ts +3 -3
- package/dist/sync/bigquery.d.cts +1 -1
- package/dist/sync/bigquery.d.ts +1 -1
- package/dist/sync/index.cjs +1 -1
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +4 -4
- package/dist/sync/index.d.ts +4 -4
- package/dist/sync/index.js +1 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/meilisearch.cjs +2 -2
- package/dist/sync/meilisearch.cjs.map +1 -1
- package/dist/sync/meilisearch.d.cts +1 -1
- package/dist/sync/meilisearch.d.ts +1 -1
- package/dist/sync/meilisearch.js +2 -2
- package/dist/sync/meilisearch.js.map +1 -1
- package/dist/{types-BbFZ57eK.d.ts → types-BRPhmKFW.d.ts} +6 -4
- package/dist/{types-zFrp8RnM.d.cts → types-LZ8dyfBz.d.cts} +6 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SyncQueue } from './queue-
|
|
2
|
-
import { F as FirestoreSyncConfig, S as SyncEvent } from './types-
|
|
1
|
+
import { S as SyncQueue } from './queue-BWi6TBmf.js';
|
|
2
|
+
import { F as FirestoreSyncConfig, S as SyncEvent } from './types-BRPhmKFW.js';
|
|
3
3
|
import { O as OpenAPIDocument } from './openapi-BTu_1vSc.js';
|
|
4
4
|
import * as firebase_functions_v2_https from 'firebase-functions/v2/https';
|
|
5
5
|
import { onRequest, HttpsOptions } from 'firebase-functions/v2/https';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SyncQueue } from './queue-
|
|
2
|
-
import { F as FirestoreSyncConfig, S as SyncEvent } from './types-
|
|
1
|
+
import { S as SyncQueue } from './queue-B9jCT62h.cjs';
|
|
2
|
+
import { F as FirestoreSyncConfig, S as SyncEvent } from './types-LZ8dyfBz.cjs';
|
|
3
3
|
import { O as OpenAPIDocument } from './openapi-CoKsSOIU.cjs';
|
|
4
4
|
import * as firebase_functions_v2_https from 'firebase-functions/v2/https';
|
|
5
5
|
import { onRequest, HttpsOptions } from 'firebase-functions/v2/https';
|
package/dist/index.d.cts
CHANGED
|
@@ -3,15 +3,15 @@ import { Query, QuerySnapshot, Firestore } from 'firebase-admin/firestore';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { u as QueryOptions, v as PaginationOptions, l as RepositoryConfig, w as RelationConfig, C as ConfiguredRepository } from './types-B2e-T8EM.cjs';
|
|
5
5
|
export { A as ApiResponse, b as CrudRepoConfig, a as CrudServerOptions, E as ExtractDocumentRefSignature, x as ExtractUpdateSignature, n as FieldPath, F as FieldRole, T as GenerateGetMethods, V as GenerateQueryMethods, G as GetOptions, y as GetResult, X as IncludeConfigTyped, L as ListResponseData, J as PaginationResult, Y as PaginationWithIncludeOptionsTyped, Z as PopulateOptionsTyped, Q as QueryRequestBody, z as RelationalKeys, R as RepoFieldPath, h as RepoRelationKeys, K as SystemBackfillFailure, M as SystemBackfillOptions, N as SystemBackfillResult, U as UserFieldPath, W as WhereClause, B as createPaginationIterator, H as executePaginatedQuery } from './types-B2e-T8EM.cjs';
|
|
6
|
-
export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, d as BoundCrudServerOptions, e as BoundFirestoreSyncConfig, C as CreateServersDeps, c as createServers } from './create-servers-
|
|
6
|
+
export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, d as BoundCrudServerOptions, e as BoundFirestoreSyncConfig, C as CreateServersDeps, c as createServers } from './create-servers-ASLcxpiS.cjs';
|
|
7
7
|
export { AdminRepoConfig, AdminRepoEntry, AdminServerOptions, BasicAuthConfig } from './servers/admin/index.cjs';
|
|
8
8
|
export { h as MiniRouter } from './firebase-auth-Ds5P0kXT.cjs';
|
|
9
9
|
import 'firebase-functions/v2/firestore';
|
|
10
10
|
import './types-BIZz3sxN.cjs';
|
|
11
11
|
import 'hono';
|
|
12
12
|
import 'firebase-functions/v2/https';
|
|
13
|
-
import './queue-
|
|
14
|
-
import './types-
|
|
13
|
+
import './queue-B9jCT62h.cjs';
|
|
14
|
+
import './types-LZ8dyfBz.cjs';
|
|
15
15
|
import 'firebase-functions/v2/pubsub';
|
|
16
16
|
import './openapi-CoKsSOIU.cjs';
|
|
17
17
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3,15 +3,15 @@ import { Query, QuerySnapshot, Firestore } from 'firebase-admin/firestore';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { u as QueryOptions, v as PaginationOptions, l as RepositoryConfig, w as RelationConfig, C as ConfiguredRepository } from './types-XRjVKN9r.js';
|
|
5
5
|
export { A as ApiResponse, b as CrudRepoConfig, a as CrudServerOptions, E as ExtractDocumentRefSignature, x as ExtractUpdateSignature, n as FieldPath, F as FieldRole, T as GenerateGetMethods, V as GenerateQueryMethods, G as GetOptions, y as GetResult, X as IncludeConfigTyped, L as ListResponseData, J as PaginationResult, Y as PaginationWithIncludeOptionsTyped, Z as PopulateOptionsTyped, Q as QueryRequestBody, z as RelationalKeys, R as RepoFieldPath, h as RepoRelationKeys, K as SystemBackfillFailure, M as SystemBackfillOptions, N as SystemBackfillResult, U as UserFieldPath, W as WhereClause, B as createPaginationIterator, H as executePaginatedQuery } from './types-XRjVKN9r.js';
|
|
6
|
-
export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, d as BoundCrudServerOptions, e as BoundFirestoreSyncConfig, C as CreateServersDeps, c as createServers } from './create-servers-
|
|
6
|
+
export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, d as BoundCrudServerOptions, e as BoundFirestoreSyncConfig, C as CreateServersDeps, c as createServers } from './create-servers-2Hw0pkyz.js';
|
|
7
7
|
export { AdminRepoConfig, AdminRepoEntry, AdminServerOptions, BasicAuthConfig } from './servers/admin/index.js';
|
|
8
8
|
export { h as MiniRouter } from './firebase-auth-Ds5P0kXT.js';
|
|
9
9
|
import 'firebase-functions/v2/firestore';
|
|
10
10
|
import './types-DSMiiOrU.js';
|
|
11
11
|
import 'hono';
|
|
12
12
|
import 'firebase-functions/v2/https';
|
|
13
|
-
import './queue-
|
|
14
|
-
import './types-
|
|
13
|
+
import './queue-BWi6TBmf.js';
|
|
14
|
+
import './types-BRPhmKFW.js';
|
|
15
15
|
import 'firebase-functions/v2/pubsub';
|
|
16
16
|
import './openapi-BTu_1vSc.js';
|
|
17
17
|
|
package/dist/llms-full.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @lpdjs/firestore-repo-service (v3.0.
|
|
1
|
+
# @lpdjs/firestore-repo-service (v3.0.4) — full documentation
|
|
2
2
|
|
|
3
3
|
> ⚡ Type-safe Firestore ORM with auto-generated repositories, advanced queries, relations with typed select, pagination with include, batch/bulk operations, aggregations and transactions.
|
|
4
4
|
|
package/dist/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @lpdjs/firestore-repo-service (v3.0.
|
|
1
|
+
# @lpdjs/firestore-repo-service (v3.0.4)
|
|
2
2
|
|
|
3
3
|
> ⚡ Type-safe Firestore ORM with auto-generated repositories, advanced queries, relations with typed select, pagination with include, batch/bulk operations, aggregations and transactions.
|
|
4
4
|
|
package/dist/servers/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, d as BoundCrudServerOptions, e as BoundFirestoreSyncConfig, C as CreateServersDeps, c as createServers } from '../create-servers-
|
|
1
|
+
export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, d as BoundCrudServerOptions, e as BoundFirestoreSyncConfig, C as CreateServersDeps, c as createServers } from '../create-servers-ASLcxpiS.cjs';
|
|
2
2
|
export { AdminRepoConfig, AdminRepoEntry, AdminServerOptions, BasicAuthConfig, RepoRegistry } from './admin/index.cjs';
|
|
3
3
|
import { P as PageOptions, o as ColumnMeta, p as FilterState, m as RelationalFieldMeta, q as SortState, r as QueryError } from '../types-B2e-T8EM.cjs';
|
|
4
4
|
export { A as ApiResponse, b as CrudRepoConfig, c as CrudRepoEntry, d as CrudRepoRegistry, e as CrudRules, a as CrudServerOptions, f as CrudUpdateRuleContext, s as DEFAULT_HTML_CSP, D as DeepDiffReturn, F as FieldRole, I as IndexErrorCallback, g as IndexErrorContext, L as ListResponseData, Q as QueryRequestBody, R as RepoFieldPath, h as RepoRelationKeys, i as Rule, j as RuleResult, k as RulesMap, S as SecurityHeadersOptions, U as UserFieldPath, t as securityHeaders } from '../types-B2e-T8EM.cjs';
|
|
@@ -6,8 +6,8 @@ export { a as applyRules, c as computeDeepDiff, b as createBeforeRules, d as cre
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export { M as Middleware, h as MiniRouter, R as RouteHandler } from '../firebase-auth-Ds5P0kXT.cjs';
|
|
8
8
|
import * as hono_jsx_jsx_dev_runtime from 'hono/jsx/jsx-dev-runtime';
|
|
9
|
-
import '../queue-
|
|
10
|
-
import '../types-
|
|
9
|
+
import '../queue-B9jCT62h.cjs';
|
|
10
|
+
import '../types-LZ8dyfBz.cjs';
|
|
11
11
|
import 'firebase-functions/v2/firestore';
|
|
12
12
|
import 'firebase-functions/v2/https';
|
|
13
13
|
import 'firebase-functions/v2/pubsub';
|
package/dist/servers/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, d as BoundCrudServerOptions, e as BoundFirestoreSyncConfig, C as CreateServersDeps, c as createServers } from '../create-servers-
|
|
1
|
+
export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, d as BoundCrudServerOptions, e as BoundFirestoreSyncConfig, C as CreateServersDeps, c as createServers } from '../create-servers-2Hw0pkyz.js';
|
|
2
2
|
export { AdminRepoConfig, AdminRepoEntry, AdminServerOptions, BasicAuthConfig, RepoRegistry } from './admin/index.js';
|
|
3
3
|
import { P as PageOptions, o as ColumnMeta, p as FilterState, m as RelationalFieldMeta, q as SortState, r as QueryError } from '../types-XRjVKN9r.js';
|
|
4
4
|
export { A as ApiResponse, b as CrudRepoConfig, c as CrudRepoEntry, d as CrudRepoRegistry, e as CrudRules, a as CrudServerOptions, f as CrudUpdateRuleContext, s as DEFAULT_HTML_CSP, D as DeepDiffReturn, F as FieldRole, I as IndexErrorCallback, g as IndexErrorContext, L as ListResponseData, Q as QueryRequestBody, R as RepoFieldPath, h as RepoRelationKeys, i as Rule, j as RuleResult, k as RulesMap, S as SecurityHeadersOptions, U as UserFieldPath, t as securityHeaders } from '../types-XRjVKN9r.js';
|
|
@@ -6,8 +6,8 @@ export { a as applyRules, c as computeDeepDiff, b as createBeforeRules, d as cre
|
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export { M as Middleware, h as MiniRouter, R as RouteHandler } from '../firebase-auth-Ds5P0kXT.js';
|
|
8
8
|
import * as hono_jsx_jsx_dev_runtime from 'hono/jsx/jsx-dev-runtime';
|
|
9
|
-
import '../queue-
|
|
10
|
-
import '../types-
|
|
9
|
+
import '../queue-BWi6TBmf.js';
|
|
10
|
+
import '../types-BRPhmKFW.js';
|
|
11
11
|
import 'firebase-functions/v2/firestore';
|
|
12
12
|
import 'firebase-functions/v2/https';
|
|
13
13
|
import 'firebase-functions/v2/pubsub';
|
package/dist/sync/bigquery.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BigQuery } from '@google-cloud/bigquery';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { b as SqlAdapter, c as SqlDialect, R as RepoSyncConfig, d as SyncHealthResult, e as SqlTableDef, f as SqlColumn } from '../types-
|
|
3
|
+
import { b as SqlAdapter, c as SqlDialect, R as RepoSyncConfig, d as SyncHealthResult, e as SqlTableDef, f as SqlColumn } from '../types-LZ8dyfBz.cjs';
|
|
4
4
|
import '../firebase-auth-Ds5P0kXT.cjs';
|
|
5
5
|
import 'firebase-functions/v2/firestore';
|
|
6
6
|
import 'firebase-functions/v2/https';
|
package/dist/sync/bigquery.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BigQuery } from '@google-cloud/bigquery';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { b as SqlAdapter, c as SqlDialect, R as RepoSyncConfig, d as SyncHealthResult, e as SqlTableDef, f as SqlColumn } from '../types-
|
|
3
|
+
import { b as SqlAdapter, c as SqlDialect, R as RepoSyncConfig, d as SyncHealthResult, e as SqlTableDef, f as SqlColumn } from '../types-BRPhmKFW.js';
|
|
4
4
|
import '../firebase-auth-Ds5P0kXT.js';
|
|
5
5
|
import 'firebase-functions/v2/firestore';
|
|
6
6
|
import 'firebase-functions/v2/https';
|
package/dist/sync/index.cjs
CHANGED
|
@@ -107,5 +107,5 @@ ${t}
|
|
|
107
107
|
|
|
108
108
|
`)}async function We(n,e,t){let r={created:[],altered:[],upToDate:[],skipped:[]};for(let[s,o]of Object.entries(n)){let i=o.schema??void 0;if(!i){r.skipped.push(s);continue}let m=t?.repos?.[s],c=m?.tableName??s,g=o._systemKeys?.[0]??o.documentKey??"docId",C=I(i,e.dialect,{primaryKey:g,exclude:m?.exclude,columnMap:m?.columnMap}),y={tableName:c,columns:C};if(!await e.tableExists(c))await e.createTable(y),r.created.push(c);else {let k=new Set(await e.getTableColumns(c)),p=C.filter(u=>!k.has(u.name));p.length>0?(await e.addColumns(c,p),r.altered.push(c)):r.upToDate.push(c);}}return r}function Ue(n){if(n.client)return n.client;if(!n.host)throw new Error("MeilisearchAdapter requires either a `client` instance or a `host` option.");try{let{MeiliSearch:e}=ie("meilisearch");return new e({host:n.host,apiKey:n.apiKey})}catch(e){throw new Error(`Failed to load the "meilisearch" package. Please install it with:
|
|
109
109
|
bun add meilisearch # or npm install meilisearch
|
|
110
|
-
Original error: ${e?.message??String(e)}`)}}var oe=class{constructor(e){this.name="meilisearch";this._client=null;this.options=e,e.client&&(this._client=e.client);}get client(){return this._client||(this._client=Ue(this.options)),this._client}async targetExists(e){try{return await this.client.getIndex(e),!0}catch(t){if(t?.code==="index_not_found"||t?.statusCode===404||t?.status===404)return false;throw t}}async upsert(e,t,r){if(t.length===0)return;await this.client.index(e).addDocuments(t,{primaryKey:r});}async delete(e,t,r){if(r.length===0)return;await this.client.index(e).deleteDocuments(r);}async ensureTarget(e){let{targetName:t,primaryKey:r}=e;await this.targetExists(t)||await this.client.createIndex(t,{primaryKey:r});let o=this.options.indexesSettings?.[t];o&&await this.client.index(t).updateSettings(o);}async healthCheck(e){let{targetName:t}=e;try{if(!await this.targetExists(t))return {healthy:!1,targetName:t,targetExists:!1,error:`Meilisearch index "${t}" does not exist`};let s=this.client.index(t),o=await s.getStats(),i=typeof s.getRawInfo=="function"?await s.getRawInfo():{};return {healthy:!0,targetName:t,targetExists:!0,error:null,details:{numberOfDocuments:o?.numberOfDocuments??0,isIndexing:o?.isIndexing??!1,fieldDistribution:o?.fieldDistribution??{},primaryKey:i?.primaryKey??e.primaryKey}}}catch(r){return {healthy:false,targetName:t,targetExists:false,error:r?.message??String(r)}}}async checkConnection(){try{let e=!0;if(typeof this.client.isHealthy=="function"){let r=await this.client.isHealthy();e=r?.status==="available"||r===!0;}else if(typeof this.client.health=="function"){let r=await this.client.health();e=r?.status==="available"||r===!0;}let t;return typeof this.client.getVersion=="function"&&(t=(await this.client.getVersion())?.pkgVersion),{healthy:e,version:t}}catch(e){return {healthy:false,error:e?.message??String(e)}}}};exports.BigQueryAdapter=re;exports.MeilisearchAdapter=oe;exports.SchemaTypeMismatchError=q;exports.SyncQueue=Q;exports.addColumnsDDL=Qe;exports.autoMigrate=We;exports.bigqueryDialect=he;exports.createFirestoreSync=qe;exports.createSyncTriggers=ee;exports.createSyncWorker=se;exports.createTableDDL=Se;exports.createadminsyncServer=X;exports.generateDDL=Ke;exports.serializeDocument=F;exports.serializeValue=Y;exports.zodSchemaToColumns=I;exports.zodTypeToLogical=He;//# sourceMappingURL=index.cjs.map
|
|
110
|
+
Original error: ${e?.message??String(e)}`)}}var oe=class{constructor(e){this.name="meilisearch";this._client=null;this.options=e,e.client&&(this._client=e.client);}get client(){return this._client||(this._client=Ue(this.options)),this._client}async targetExists(e){try{return await this.client.getIndex(e),!0}catch(t){if(t?.code==="index_not_found"||t?.cause?.code==="index_not_found"||t?.statusCode===404||t?.status===404||t?.response?.status===404||t?.cause?.status===404||t?.cause?.statusCode===404||t?.cause?.response?.status===404)return false;throw t}}async upsert(e,t,r){if(t.length===0)return;await this.client.index(e).addDocuments(t,{primaryKey:r});}async delete(e,t,r){if(r.length===0)return;await this.client.index(e).deleteDocuments(r);}async ensureTarget(e){let{targetName:t,primaryKey:r}=e;await this.targetExists(t)||await this.client.createIndex(t,{primaryKey:r});let o=this.options.indexesSettings?.[t];o&&await this.client.index(t).updateSettings(o);}async healthCheck(e){let{targetName:t}=e;try{if(!await this.targetExists(t))return {healthy:!1,targetName:t,targetExists:!1,error:`Meilisearch index "${t}" does not exist`};let s=this.client.index(t),o=await s.getStats(),i=typeof s.getRawInfo=="function"?await s.getRawInfo():{};return {healthy:!0,targetName:t,targetExists:!0,error:null,details:{numberOfDocuments:o?.numberOfDocuments??0,isIndexing:o?.isIndexing??!1,fieldDistribution:o?.fieldDistribution??{},primaryKey:i?.primaryKey??e.primaryKey}}}catch(r){return {healthy:false,targetName:t,targetExists:false,error:r?.message??String(r)}}}async checkConnection(){try{let e=!0;if(typeof this.client.isHealthy=="function"){let r=await this.client.isHealthy();e=r?.status==="available"||r===!0;}else if(typeof this.client.health=="function"){let r=await this.client.health();e=r?.status==="available"||r===!0;}let t;return typeof this.client.getVersion=="function"&&(t=(await this.client.getVersion())?.pkgVersion),{healthy:e,version:t}}catch(e){return {healthy:false,error:e?.message??String(e)}}}};exports.BigQueryAdapter=re;exports.MeilisearchAdapter=oe;exports.SchemaTypeMismatchError=q;exports.SyncQueue=Q;exports.addColumnsDDL=Qe;exports.autoMigrate=We;exports.bigqueryDialect=he;exports.createFirestoreSync=qe;exports.createSyncTriggers=ee;exports.createSyncWorker=se;exports.createTableDDL=Se;exports.createadminsyncServer=X;exports.generateDDL=Ke;exports.serializeDocument=F;exports.serializeValue=Y;exports.zodSchemaToColumns=I;exports.zodTypeToLogical=He;//# sourceMappingURL=index.cjs.map
|
|
111
111
|
//# sourceMappingURL=index.cjs.map
|