@develit-io/backend-sdk 10.0.3 → 10.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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as drizzle_orm from 'drizzle-orm';
2
- import { Table, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, AnyColumn } from 'drizzle-orm';
2
+ import { Table, AnyColumn } from 'drizzle-orm';
3
3
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
4
4
  import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
5
5
  import { z as z$1, ZodObject, ZodType, ZodOptional } from 'zod';
@@ -944,26 +944,6 @@ type IdentityContextVariables = {
944
944
  };
945
945
  };
946
946
 
947
- /**
948
- * Utility type to infer possible relation includes (`with`) for a given table.
949
- * This helps define which relations (one-to-many, many-to-one) can be included in a query.
950
- *
951
- * @template Tables - The Drizzle ORM schema object.
952
- * @template TableName - The table for which relations should be inferred.
953
- */
954
- type IncludeRelation<Tables extends Record<string, unknown>, TableName extends keyof ExtractTablesWithRelations<Tables>> = DBQueryConfig<'one' | 'many', boolean, ExtractTablesWithRelations<Tables>, ExtractTablesWithRelations<Tables>[TableName]>['with'];
955
- /**
956
- * Infers the result type of Drizzle ORM select query with optional relations.
957
- * This ensures correct TypeScript inference when querying tables and their relations.
958
- *
959
- * @template Tables - The Drizzle ORM schema object.
960
- * @template TableName - The table for which the query result is being inferred.
961
- * @template With - (Optional) Specifies which relations should be included in the result.
962
- */
963
- type InferResultType<Tables extends Record<string, unknown>, TableName extends keyof ExtractTablesWithRelations<Tables>, With extends IncludeRelation<Tables, TableName> | undefined = undefined> = BuildQueryResult<ExtractTablesWithRelations<Tables>, ExtractTablesWithRelations<Tables>[TableName], {
964
- with: With;
965
- }>;
966
-
967
947
  interface RequestLog {
968
948
  method: string;
969
949
  path: string;
@@ -1137,11 +1117,8 @@ type AuditLogWriter<TAuditAction = string> = (logs: AuditLogPayload<TAuditAction
1137
1117
  declare function createAuditLogWriter<TAuditAction = string>(table: AuditLogTable): AuditLogWriter<TAuditAction>;
1138
1118
 
1139
1119
  declare function durableObjectNamespaceIdFromName(uniqueKey: string, name: string): string;
1140
- declare const getD1DatabaseIdFromWrangler: () => string | undefined;
1141
- declare const getD1Credentials: () => {
1142
- driver?: undefined;
1143
- dbCredentials?: undefined;
1144
- } | {
1120
+ declare const getLocalD1DatabaseIdFromWrangler: () => string | undefined;
1121
+ declare const getD1Credentials: () => Promise<{
1145
1122
  driver: string;
1146
1123
  dbCredentials: {
1147
1124
  accountId: string | undefined;
@@ -1157,14 +1134,8 @@ declare const getD1Credentials: () => {
1157
1134
  token?: undefined;
1158
1135
  };
1159
1136
  driver?: undefined;
1160
- };
1161
- declare const getDrizzleD1Config: () => {
1162
- driver?: undefined;
1163
- dbCredentials?: undefined;
1164
- schema: string;
1165
- out: string;
1166
- dialect: "sqlite";
1167
- } | {
1137
+ }>;
1138
+ declare const getDrizzleD1Config: () => Promise<{
1168
1139
  driver: string;
1169
1140
  dbCredentials: {
1170
1141
  accountId: string | undefined;
@@ -1186,7 +1157,7 @@ declare const getDrizzleD1Config: () => {
1186
1157
  schema: string;
1187
1158
  out: string;
1188
1159
  dialect: "sqlite";
1189
- };
1160
+ }>;
1190
1161
 
1191
1162
  type Operator = 'like' | 'ilike';
1192
1163
  type Wrap = 'both' | 'prefix' | 'suffix' | 'none';
@@ -1339,5 +1310,5 @@ interface WithRetryCounterOptions {
1339
1310
  type AsyncMethod<TArgs extends unknown[] = unknown[], TResult = unknown> = (...args: TArgs) => Promise<TResult>;
1340
1311
  declare function cloudflareQueue<TArgs extends unknown[] = unknown[], TResult = unknown>(options: WithRetryCounterOptions): (target: unknown, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<AsyncMethod<TArgs, TResult>>) => void;
1341
1312
 
1342
- export { DatabaseTransaction, ENVIRONMENT, RPCResponse, USER_ROLES, action, asNonEmpty, bankAccount, bankAccountMetadataSchema, base, bicSchema, buildMultiFilterConditions, buildRangeFilterConditions, buildSearchConditions, calculateExponentialBackoff, cloudflareQueue, composeWranglerBase, createAuditLogWriter, createInsertSchema, createInternalError, createPatchSchema, createUpdateSchema, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getSecret, handleAction, ibanSchema, isInternalError, nullToOptional, optionalToNull, paginationQuerySchema, paginationSchema, resolveColumn, service, structuredAddressSchema, useFetch, useResult, useResultSync, uuidv4, uuidv5, workflowInstanceStatusSchema };
1343
- export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, BankAccountMetadata, BaseEvent, BuildSearchOptions, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IdempotencyContextVariables, IdentityContextVariables, IncludeRelation, InferResultType, InternalError, InternalErrorResponseStatus, Project, RequestLog, ResponseLog, StructuredAddress, UserRole, ValidatedInput, WorkflowInstanceStatus };
1313
+ export { DatabaseTransaction, ENVIRONMENT, RPCResponse, USER_ROLES, action, asNonEmpty, bankAccount, bankAccountMetadataSchema, base, bicSchema, buildMultiFilterConditions, buildRangeFilterConditions, buildSearchConditions, calculateExponentialBackoff, cloudflareQueue, composeWranglerBase, createAuditLogWriter, createInsertSchema, createInternalError, createPatchSchema, createUpdateSchema, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getDrizzleD1Config, getLocalD1DatabaseIdFromWrangler, getSecret, handleAction, ibanSchema, isInternalError, nullToOptional, optionalToNull, paginationQuerySchema, paginationSchema, resolveColumn, service, structuredAddressSchema, useFetch, useResult, useResultSync, uuidv4, uuidv5, workflowInstanceStatusSchema };
1314
+ export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, BankAccountMetadata, BaseEvent, BuildSearchOptions, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IdempotencyContextVariables, IdentityContextVariables, InternalError, InternalErrorResponseStatus, Project, RequestLog, ResponseLog, StructuredAddress, UserRole, ValidatedInput, WorkflowInstanceStatus };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as drizzle_orm from 'drizzle-orm';
2
- import { Table, ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, AnyColumn } from 'drizzle-orm';
2
+ import { Table, AnyColumn } from 'drizzle-orm';
3
3
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
4
4
  import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
5
5
  import { z as z$1, ZodObject, ZodType, ZodOptional } from 'zod';
@@ -944,26 +944,6 @@ type IdentityContextVariables = {
944
944
  };
945
945
  };
946
946
 
947
- /**
948
- * Utility type to infer possible relation includes (`with`) for a given table.
949
- * This helps define which relations (one-to-many, many-to-one) can be included in a query.
950
- *
951
- * @template Tables - The Drizzle ORM schema object.
952
- * @template TableName - The table for which relations should be inferred.
953
- */
954
- type IncludeRelation<Tables extends Record<string, unknown>, TableName extends keyof ExtractTablesWithRelations<Tables>> = DBQueryConfig<'one' | 'many', boolean, ExtractTablesWithRelations<Tables>, ExtractTablesWithRelations<Tables>[TableName]>['with'];
955
- /**
956
- * Infers the result type of Drizzle ORM select query with optional relations.
957
- * This ensures correct TypeScript inference when querying tables and their relations.
958
- *
959
- * @template Tables - The Drizzle ORM schema object.
960
- * @template TableName - The table for which the query result is being inferred.
961
- * @template With - (Optional) Specifies which relations should be included in the result.
962
- */
963
- type InferResultType<Tables extends Record<string, unknown>, TableName extends keyof ExtractTablesWithRelations<Tables>, With extends IncludeRelation<Tables, TableName> | undefined = undefined> = BuildQueryResult<ExtractTablesWithRelations<Tables>, ExtractTablesWithRelations<Tables>[TableName], {
964
- with: With;
965
- }>;
966
-
967
947
  interface RequestLog {
968
948
  method: string;
969
949
  path: string;
@@ -1137,11 +1117,8 @@ type AuditLogWriter<TAuditAction = string> = (logs: AuditLogPayload<TAuditAction
1137
1117
  declare function createAuditLogWriter<TAuditAction = string>(table: AuditLogTable): AuditLogWriter<TAuditAction>;
1138
1118
 
1139
1119
  declare function durableObjectNamespaceIdFromName(uniqueKey: string, name: string): string;
1140
- declare const getD1DatabaseIdFromWrangler: () => string | undefined;
1141
- declare const getD1Credentials: () => {
1142
- driver?: undefined;
1143
- dbCredentials?: undefined;
1144
- } | {
1120
+ declare const getLocalD1DatabaseIdFromWrangler: () => string | undefined;
1121
+ declare const getD1Credentials: () => Promise<{
1145
1122
  driver: string;
1146
1123
  dbCredentials: {
1147
1124
  accountId: string | undefined;
@@ -1157,14 +1134,8 @@ declare const getD1Credentials: () => {
1157
1134
  token?: undefined;
1158
1135
  };
1159
1136
  driver?: undefined;
1160
- };
1161
- declare const getDrizzleD1Config: () => {
1162
- driver?: undefined;
1163
- dbCredentials?: undefined;
1164
- schema: string;
1165
- out: string;
1166
- dialect: "sqlite";
1167
- } | {
1137
+ }>;
1138
+ declare const getDrizzleD1Config: () => Promise<{
1168
1139
  driver: string;
1169
1140
  dbCredentials: {
1170
1141
  accountId: string | undefined;
@@ -1186,7 +1157,7 @@ declare const getDrizzleD1Config: () => {
1186
1157
  schema: string;
1187
1158
  out: string;
1188
1159
  dialect: "sqlite";
1189
- };
1160
+ }>;
1190
1161
 
1191
1162
  type Operator = 'like' | 'ilike';
1192
1163
  type Wrap = 'both' | 'prefix' | 'suffix' | 'none';
@@ -1339,5 +1310,5 @@ interface WithRetryCounterOptions {
1339
1310
  type AsyncMethod<TArgs extends unknown[] = unknown[], TResult = unknown> = (...args: TArgs) => Promise<TResult>;
1340
1311
  declare function cloudflareQueue<TArgs extends unknown[] = unknown[], TResult = unknown>(options: WithRetryCounterOptions): (target: unknown, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<AsyncMethod<TArgs, TResult>>) => void;
1341
1312
 
1342
- export { DatabaseTransaction, ENVIRONMENT, RPCResponse, USER_ROLES, action, asNonEmpty, bankAccount, bankAccountMetadataSchema, base, bicSchema, buildMultiFilterConditions, buildRangeFilterConditions, buildSearchConditions, calculateExponentialBackoff, cloudflareQueue, composeWranglerBase, createAuditLogWriter, createInsertSchema, createInternalError, createPatchSchema, createUpdateSchema, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getSecret, handleAction, ibanSchema, isInternalError, nullToOptional, optionalToNull, paginationQuerySchema, paginationSchema, resolveColumn, service, structuredAddressSchema, useFetch, useResult, useResultSync, uuidv4, uuidv5, workflowInstanceStatusSchema };
1343
- export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, BankAccountMetadata, BaseEvent, BuildSearchOptions, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IdempotencyContextVariables, IdentityContextVariables, IncludeRelation, InferResultType, InternalError, InternalErrorResponseStatus, Project, RequestLog, ResponseLog, StructuredAddress, UserRole, ValidatedInput, WorkflowInstanceStatus };
1313
+ export { DatabaseTransaction, ENVIRONMENT, RPCResponse, USER_ROLES, action, asNonEmpty, bankAccount, bankAccountMetadataSchema, base, bicSchema, buildMultiFilterConditions, buildRangeFilterConditions, buildSearchConditions, calculateExponentialBackoff, cloudflareQueue, composeWranglerBase, createAuditLogWriter, createInsertSchema, createInternalError, createPatchSchema, createUpdateSchema, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getDrizzleD1Config, getLocalD1DatabaseIdFromWrangler, getSecret, handleAction, ibanSchema, isInternalError, nullToOptional, optionalToNull, paginationQuerySchema, paginationSchema, resolveColumn, service, structuredAddressSchema, useFetch, useResult, useResultSync, uuidv4, uuidv5, workflowInstanceStatusSchema };
1314
+ export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, BankAccountMetadata, BaseEvent, BuildSearchOptions, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IdempotencyContextVariables, IdentityContextVariables, InternalError, InternalErrorResponseStatus, Project, RequestLog, ResponseLog, StructuredAddress, UserRole, ValidatedInput, WorkflowInstanceStatus };
package/dist/index.mjs CHANGED
@@ -6,11 +6,11 @@ import { createInsertSchema as createInsertSchema$1 } from 'drizzle-zod';
6
6
  export { createSelectSchema } from 'drizzle-zod';
7
7
  import { z as z$1 } from 'zod';
8
8
  import * as z from 'zod/v4/core';
9
- import 'cloudflare';
10
- import fs from 'node:fs';
9
+ import Cloudflare from 'cloudflare';
10
+ import { parse } from 'comment-json';
11
11
  import crypto$1 from 'node:crypto';
12
+ import fs from 'node:fs';
12
13
  import path from 'node:path';
13
- import { parse } from 'comment-json';
14
14
  import superjson from 'superjson';
15
15
 
16
16
  const ENVIRONMENT = ["dev", "test", "staging", "production"];
@@ -470,41 +470,42 @@ function derivePortFromId(id, base = 4e3, range = 1e4) {
470
470
  return base + hash % range;
471
471
  }
472
472
 
473
+ const readWranglerConfig = () => {
474
+ try {
475
+ const content = fs.readFileSync(path.resolve("./wrangler.jsonc"), "utf-8");
476
+ return parse(content);
477
+ } catch (err) {
478
+ console.warn(`Warning: Could not read wrangler.jsonc: ${err}`);
479
+ }
480
+ };
473
481
  function durableObjectNamespaceIdFromName(uniqueKey, name) {
474
482
  const key = crypto$1.createHash("sha256").update(uniqueKey).digest();
475
483
  const nameHmac = crypto$1.createHmac("sha256", key).update(name).digest().subarray(0, 16);
476
484
  const hmac = crypto$1.createHmac("sha256", key).update(nameHmac).digest().subarray(0, 16);
477
485
  return Buffer.concat([nameHmac, hmac]).toString("hex");
478
486
  }
479
- const getD1DatabaseIdFromWrangler = () => {
480
- try {
481
- const wranglerPath = path.resolve("./wrangler.jsonc");
482
- const wranglerContent = fs.readFileSync(wranglerPath, "utf-8");
483
- const config = parse(wranglerContent);
484
- const environment = process.env.ENVIRONMENT || "localhost";
485
- let databaseId;
486
- if (environment !== "localhost" && config.env?.[environment]) {
487
- databaseId = config.env[environment].d1_databases?.[0]?.database_id;
488
- console.log(
489
- `Using database_id for environment '${environment}': ${databaseId}`
490
- );
491
- }
492
- if (!databaseId) {
493
- databaseId = config.d1_databases?.[0]?.database_id;
494
- console.log(
495
- `Using default database_id for environment '${environment}': ${databaseId}`
496
- );
497
- }
498
- if (!databaseId) {
499
- throw new Error("database_id not found in wrangler.jsonc");
487
+ const getD1DatabaseId = async (instanceName) => {
488
+ const cloudflare = new Cloudflare({
489
+ apiToken: process.env.CLOUDFLARE_API_TOKEN
490
+ });
491
+ const databases = cloudflare.d1.database.list({
492
+ account_id: process.env.CLOUDFLARE_ACCOUNT_ID
493
+ });
494
+ for await (const db of databases) {
495
+ if (db.name === instanceName) {
496
+ return db.uuid;
500
497
  }
501
- return databaseId;
502
- } catch (err) {
503
- console.warn(
504
- `Warning: Could not read database_id from wrangler.jsonc: ${err}`
505
- );
506
498
  }
507
499
  };
500
+ const getLocalD1DatabaseIdFromWrangler = () => {
501
+ const databaseId = readWranglerConfig()?.d1_databases?.[0]?.database_id;
502
+ if (!databaseId) {
503
+ console.warn("Warning: database_id not found in wrangler.jsonc");
504
+ return;
505
+ }
506
+ console.log(`Using local database_id: ${databaseId}`);
507
+ return databaseId;
508
+ };
508
509
  const getLocalD1 = (databaseId) => {
509
510
  const name = durableObjectNamespaceIdFromName(
510
511
  "miniflare-D1DatabaseObject",
@@ -532,13 +533,12 @@ const getLocalD1 = (databaseId) => {
532
533
  }
533
534
  }
534
535
  };
535
- const getD1Credentials = () => {
536
+ const getD1Credentials = async () => {
536
537
  const environment = process.env.ENVIRONMENT;
537
- if (environment === "localhost") {
538
- return {};
539
- }
540
- const databaseId = getD1DatabaseIdFromWrangler() ?? "";
541
538
  if (isRemoteEnvironment()) {
539
+ const workerName = readWranglerConfig()?.name ?? "";
540
+ const instanceName = environment === "production" ? workerName : `${workerName}-${environment}`;
541
+ const databaseId = await getD1DatabaseId(instanceName) ?? "";
542
542
  return {
543
543
  driver: "d1-http",
544
544
  dbCredentials: {
@@ -547,19 +547,18 @@ const getD1Credentials = () => {
547
547
  token: process.env.CLOUDFLARE_API_TOKEN
548
548
  }
549
549
  };
550
- } else {
551
- return {
552
- dbCredentials: {
553
- url: getLocalD1(databaseId)
554
- }
555
- };
556
550
  }
551
+ return {
552
+ dbCredentials: {
553
+ url: getLocalD1(getLocalD1DatabaseIdFromWrangler() ?? "")
554
+ }
555
+ };
557
556
  };
558
- const getDrizzleD1Config = () => ({
557
+ const getDrizzleD1Config = async () => ({
559
558
  schema: "./src/database/schema/",
560
559
  out: "./src/database/migrations/",
561
560
  dialect: "sqlite",
562
- ...getD1Credentials()
561
+ ...await getD1Credentials()
563
562
  });
564
563
 
565
564
  const buildSearchConditions = (search, columns, opts = {}) => {
@@ -795,29 +794,13 @@ function develitWorker(Worker) {
795
794
  class DevelitWorker extends Worker {
796
795
  name = "not-set";
797
796
  action = "not-set";
798
- // public db!: DatabaseTransaction<string>
799
797
  async fetch() {
800
798
  return new Response("Service is up and running!");
801
799
  }
802
- // initializeDB<TAuditAction = string>(
803
- // database: D1Database,
804
- // schema: Record<string, unknown>,
805
- // auditLogWriter?: AuditLogWriter<TAuditAction>,
806
- // ): void {
807
- // const drizzleInstance = drizzle(database, {
808
- // schema,
809
- // }) as DrizzleD1Database<Record<string, unknown>>
810
- // this.db = new DatabaseTransaction<TAuditAction>(
811
- // drizzleInstance,
812
- // this.name,
813
- // auditLogWriter,
814
- // ) as unknown as DatabaseTransaction<string>
815
- // }
816
800
  handleInput({
817
801
  input,
818
802
  schema
819
803
  }) {
820
- this.logInput({ input });
821
804
  const parseResult = z.safeParse(schema, input);
822
805
  if (!parseResult.success) {
823
806
  const parseError = {
@@ -880,15 +863,17 @@ function develitWorker(Worker) {
880
863
  `${this.name}:${this.action}:error`
881
864
  );
882
865
  }
883
- pushToQueue(queue, message) {
866
+ async pushToQueue(queue, message) {
884
867
  if (!queue) {
885
868
  throw new Error(
886
869
  "[pushToQueue] Queue binding is undefined \u2014 check your wrangler config"
887
870
  );
888
871
  }
889
- if (!Array.isArray(message))
890
- return queue.send(message, { contentType: "v8" });
891
- return queue.sendBatch(
872
+ if (!Array.isArray(message)) {
873
+ await queue.send(message, { contentType: "v8" });
874
+ return;
875
+ }
876
+ await queue.sendBatch(
892
877
  message.map((m) => ({
893
878
  body: m,
894
879
  contentType: "v8"
@@ -906,4 +891,4 @@ function develitWorker(Worker) {
906
891
  return DevelitWorker;
907
892
  }
908
893
 
909
- export { DatabaseTransaction, ENVIRONMENT, RPCResponse, USER_ROLES, action, asNonEmpty, bankAccount, bankAccountMetadataSchema, base, bicSchema, buildMultiFilterConditions, buildRangeFilterConditions, buildSearchConditions, calculateExponentialBackoff, cloudflareQueue, composeWranglerBase, createAuditLogWriter, createInsertSchema, createInternalError, createPatchSchema, createUpdateSchema, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getSecret, handleAction, ibanSchema, isInternalError, nullToOptional, optionalToNull, paginationQuerySchema, paginationSchema, resolveColumn, service, structuredAddressSchema, useFetch, useResult, useResultSync, workflowInstanceStatusSchema };
894
+ export { DatabaseTransaction, ENVIRONMENT, RPCResponse, USER_ROLES, action, asNonEmpty, bankAccount, bankAccountMetadataSchema, base, bicSchema, buildMultiFilterConditions, buildRangeFilterConditions, buildSearchConditions, calculateExponentialBackoff, cloudflareQueue, composeWranglerBase, createAuditLogWriter, createInsertSchema, createInternalError, createPatchSchema, createUpdateSchema, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getDrizzleD1Config, getLocalD1DatabaseIdFromWrangler, getSecret, handleAction, ibanSchema, isInternalError, nullToOptional, optionalToNull, paginationQuerySchema, paginationSchema, resolveColumn, service, structuredAddressSchema, useFetch, useResult, useResultSync, workflowInstanceStatusSchema };
@@ -2,10 +2,10 @@ import { createMiddleware } from 'hono/factory';
2
2
  import { HTTPException } from 'hono/http-exception';
3
3
  import { z } from 'zod';
4
4
  import 'cloudflare';
5
- import 'node:fs';
5
+ import 'comment-json';
6
6
  import 'node:crypto';
7
+ import 'node:fs';
7
8
  import 'node:path';
8
- import 'comment-json';
9
9
  import 'drizzle-orm';
10
10
  import { u as uuidv4 } from './shared/backend-sdk.D_gzDKeC.mjs';
11
11
  import { verifyPayloadSignature } from './utils/signature.util.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-io/backend-sdk",
3
- "version": "10.0.3",
3
+ "version": "10.0.4",
4
4
  "description": "Develit Backend SDK",
5
5
  "author": "Develit.io",
6
6
  "license": "ISC",
@@ -41,8 +41,8 @@
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@develit-io/general-codes": "^1.19.0",
44
- "drizzle-orm": "^0.45.1",
45
- "drizzle-zod": "^0.8.3",
44
+ "drizzle-orm": "1.0.0-rc.1",
45
+ "drizzle-zod": "1.0.0-rc.1",
46
46
  "hono": "^4.12.7",
47
47
  "zod": "^4.3.6"
48
48
  },