@develit-io/backend-sdk 5.17.3 → 5.17.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.cjs CHANGED
@@ -4,16 +4,14 @@ const drizzleOrm = require('drizzle-orm');
4
4
  const pgCore = require('drizzle-orm/pg-core');
5
5
  const sqliteCore = require('drizzle-orm/sqlite-core');
6
6
  const generalCodes = require('@develit-io/general-codes');
7
- const commentJson = require('comment-json');
8
- const node_fs = require('node:fs');
9
- const path = require('@std/path');
10
7
  const text = require('@std/text');
11
8
  require('http-status-codes');
12
9
  const z = require('zod/v4/core');
13
10
  const h3 = require('h3');
14
11
  const fs = require('fs');
15
12
  const crypto$1 = require('node:crypto');
16
- const path$1 = require('path');
13
+ const path = require('path');
14
+ const commentJson = require('comment-json');
17
15
  const superjson = require('superjson');
18
16
 
19
17
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
@@ -33,7 +31,7 @@ function _interopNamespaceCompat(e) {
33
31
  const z__namespace = /*#__PURE__*/_interopNamespaceCompat(z);
34
32
  const fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
35
33
  const crypto__default = /*#__PURE__*/_interopDefaultCompat(crypto$1);
36
- const path__default = /*#__PURE__*/_interopDefaultCompat(path$1);
34
+ const path__default = /*#__PURE__*/_interopDefaultCompat(path);
37
35
  const superjson__default = /*#__PURE__*/_interopDefaultCompat(superjson);
38
36
 
39
37
  const base = {
@@ -138,11 +136,6 @@ const composeR2Arguments = ({
138
136
  };
139
137
  };
140
138
 
141
- async function loadWorkerConfig({ path: path$1 }) {
142
- const workerConfigFile = node_fs.readFileSync(path.join(path$1, "./wrangler.jsonc"), "utf-8");
143
- return commentJson.parse(workerConfigFile);
144
- }
145
-
146
139
  const composeBindingName = ({
147
140
  resource,
148
141
  resourceName,
@@ -911,7 +904,6 @@ exports.handleAction = handleAction;
911
904
  exports.handleActionResponse = handleActionResponse;
912
905
  exports.ibanZodSchema = ibanZodSchema;
913
906
  exports.isInternalError = isInternalError;
914
- exports.loadWorkerConfig = loadWorkerConfig;
915
907
  exports.paginationQuerySchema = paginationQuerySchema;
916
908
  exports.paginationSchema = paginationSchema;
917
909
  exports.service = service;
package/dist/index.d.cts CHANGED
@@ -4,7 +4,6 @@ import * as drizzle_orm from 'drizzle-orm';
4
4
  import { ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult } from 'drizzle-orm';
5
5
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
6
6
  import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
7
- import * as comment_json from 'comment-json';
8
7
  import { StatusCodes, ReasonPhrases } from 'http-status-codes';
9
8
  export { ReasonPhrases as InternalResponsePhrase, StatusCodes as InternalResponseStatus } from 'http-status-codes';
10
9
  import * as z from 'zod/v4/core';
@@ -131,10 +130,6 @@ declare class Infrastructure {
131
130
  }): any;
132
131
  }
133
132
 
134
- declare function loadWorkerConfig({ path }: {
135
- path: string;
136
- }): Promise<comment_json.CommentJSONValue>;
137
-
138
133
  type Resource = 'kv' | 'd1' | 'queue' | 'r2' | 'worker' | 'service' | 'orchestrator';
139
134
 
140
135
  type InternalErrorResponseStatus = Exclude<StatusCodes, 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207>;
@@ -529,5 +524,5 @@ interface WithRetryCounterOptions {
529
524
  type AsyncMethod<TArgs extends unknown[] = unknown[], TResult = unknown> = (...args: TArgs) => Promise<TResult>;
530
525
  declare function cloudflareQueue<TArgs extends unknown[] = unknown[], TResult = unknown>(options: WithRetryCounterOptions): (target: unknown, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<AsyncMethod<TArgs, TResult>>) => void;
531
526
 
532
- export { DatabaseTransaction, ENVIRONMENT, Infrastructure, RPCResponse, action, bankAccount, bankAccountBankCodeEnum, bankAccountCountryCodeEnum, bankAccountCurrencyEnum, bankAccountPostgres, base, basePostgres, calculateExponentialBackoff, cloudflareQueue, composeBindingName, createAuditLogWriter, createInternalError, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getDrizzlePgConfig, getPgCredentials, getPgDatabaseIdFromWrangler, getPgLocalConnectionString, handleAction, handleActionResponse, ibanZodSchema, isInternalError, loadWorkerConfig, paginationQuerySchema, paginationSchema, service, swiftZodSchema, useResult, useResultSync, uuidv4, validateEnvironment };
527
+ export { DatabaseTransaction, ENVIRONMENT, Infrastructure, RPCResponse, action, bankAccount, bankAccountBankCodeEnum, bankAccountCountryCodeEnum, bankAccountCurrencyEnum, bankAccountPostgres, base, basePostgres, calculateExponentialBackoff, cloudflareQueue, composeBindingName, createAuditLogWriter, createInternalError, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getDrizzlePgConfig, getPgCredentials, getPgDatabaseIdFromWrangler, getPgLocalConnectionString, handleAction, handleActionResponse, ibanZodSchema, isInternalError, paginationQuerySchema, paginationSchema, service, swiftZodSchema, useResult, useResultSync, uuidv4, validateEnvironment };
533
528
  export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IncludeRelation, InferResultType, InternalError, InternalErrorResponseStatus, Project, ValidatedInput };
package/dist/index.d.mts CHANGED
@@ -4,7 +4,6 @@ import * as drizzle_orm from 'drizzle-orm';
4
4
  import { ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult } from 'drizzle-orm';
5
5
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
6
6
  import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
7
- import * as comment_json from 'comment-json';
8
7
  import { StatusCodes, ReasonPhrases } from 'http-status-codes';
9
8
  export { ReasonPhrases as InternalResponsePhrase, StatusCodes as InternalResponseStatus } from 'http-status-codes';
10
9
  import * as z from 'zod/v4/core';
@@ -131,10 +130,6 @@ declare class Infrastructure {
131
130
  }): any;
132
131
  }
133
132
 
134
- declare function loadWorkerConfig({ path }: {
135
- path: string;
136
- }): Promise<comment_json.CommentJSONValue>;
137
-
138
133
  type Resource = 'kv' | 'd1' | 'queue' | 'r2' | 'worker' | 'service' | 'orchestrator';
139
134
 
140
135
  type InternalErrorResponseStatus = Exclude<StatusCodes, 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207>;
@@ -529,5 +524,5 @@ interface WithRetryCounterOptions {
529
524
  type AsyncMethod<TArgs extends unknown[] = unknown[], TResult = unknown> = (...args: TArgs) => Promise<TResult>;
530
525
  declare function cloudflareQueue<TArgs extends unknown[] = unknown[], TResult = unknown>(options: WithRetryCounterOptions): (target: unknown, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<AsyncMethod<TArgs, TResult>>) => void;
531
526
 
532
- export { DatabaseTransaction, ENVIRONMENT, Infrastructure, RPCResponse, action, bankAccount, bankAccountBankCodeEnum, bankAccountCountryCodeEnum, bankAccountCurrencyEnum, bankAccountPostgres, base, basePostgres, calculateExponentialBackoff, cloudflareQueue, composeBindingName, createAuditLogWriter, createInternalError, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getDrizzlePgConfig, getPgCredentials, getPgDatabaseIdFromWrangler, getPgLocalConnectionString, handleAction, handleActionResponse, ibanZodSchema, isInternalError, loadWorkerConfig, paginationQuerySchema, paginationSchema, service, swiftZodSchema, useResult, useResultSync, uuidv4, validateEnvironment };
527
+ export { DatabaseTransaction, ENVIRONMENT, Infrastructure, RPCResponse, action, bankAccount, bankAccountBankCodeEnum, bankAccountCountryCodeEnum, bankAccountCurrencyEnum, bankAccountPostgres, base, basePostgres, calculateExponentialBackoff, cloudflareQueue, composeBindingName, createAuditLogWriter, createInternalError, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getDrizzlePgConfig, getPgCredentials, getPgDatabaseIdFromWrangler, getPgLocalConnectionString, handleAction, handleActionResponse, ibanZodSchema, isInternalError, paginationQuerySchema, paginationSchema, service, swiftZodSchema, useResult, useResultSync, uuidv4, validateEnvironment };
533
528
  export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IncludeRelation, InferResultType, InternalError, InternalErrorResponseStatus, Project, ValidatedInput };
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ import * as drizzle_orm from 'drizzle-orm';
4
4
  import { ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult } from 'drizzle-orm';
5
5
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
6
6
  import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
7
- import * as comment_json from 'comment-json';
8
7
  import { StatusCodes, ReasonPhrases } from 'http-status-codes';
9
8
  export { ReasonPhrases as InternalResponsePhrase, StatusCodes as InternalResponseStatus } from 'http-status-codes';
10
9
  import * as z from 'zod/v4/core';
@@ -131,10 +130,6 @@ declare class Infrastructure {
131
130
  }): any;
132
131
  }
133
132
 
134
- declare function loadWorkerConfig({ path }: {
135
- path: string;
136
- }): Promise<comment_json.CommentJSONValue>;
137
-
138
133
  type Resource = 'kv' | 'd1' | 'queue' | 'r2' | 'worker' | 'service' | 'orchestrator';
139
134
 
140
135
  type InternalErrorResponseStatus = Exclude<StatusCodes, 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207>;
@@ -529,5 +524,5 @@ interface WithRetryCounterOptions {
529
524
  type AsyncMethod<TArgs extends unknown[] = unknown[], TResult = unknown> = (...args: TArgs) => Promise<TResult>;
530
525
  declare function cloudflareQueue<TArgs extends unknown[] = unknown[], TResult = unknown>(options: WithRetryCounterOptions): (target: unknown, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<AsyncMethod<TArgs, TResult>>) => void;
531
526
 
532
- export { DatabaseTransaction, ENVIRONMENT, Infrastructure, RPCResponse, action, bankAccount, bankAccountBankCodeEnum, bankAccountCountryCodeEnum, bankAccountCurrencyEnum, bankAccountPostgres, base, basePostgres, calculateExponentialBackoff, cloudflareQueue, composeBindingName, createAuditLogWriter, createInternalError, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getDrizzlePgConfig, getPgCredentials, getPgDatabaseIdFromWrangler, getPgLocalConnectionString, handleAction, handleActionResponse, ibanZodSchema, isInternalError, loadWorkerConfig, paginationQuerySchema, paginationSchema, service, swiftZodSchema, useResult, useResultSync, uuidv4, validateEnvironment };
527
+ export { DatabaseTransaction, ENVIRONMENT, Infrastructure, RPCResponse, action, bankAccount, bankAccountBankCodeEnum, bankAccountCountryCodeEnum, bankAccountCurrencyEnum, bankAccountPostgres, base, basePostgres, calculateExponentialBackoff, cloudflareQueue, composeBindingName, createAuditLogWriter, createInternalError, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getDrizzlePgConfig, getPgCredentials, getPgDatabaseIdFromWrangler, getPgLocalConnectionString, handleAction, handleActionResponse, ibanZodSchema, isInternalError, paginationQuerySchema, paginationSchema, service, swiftZodSchema, useResult, useResultSync, uuidv4, validateEnvironment };
533
528
  export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IncludeRelation, InferResultType, InternalError, InternalErrorResponseStatus, Project, ValidatedInput };
package/dist/index.mjs CHANGED
@@ -2,9 +2,6 @@ import { sql } from 'drizzle-orm';
2
2
  import { timestamp, uuid, pgEnum, text as text$1 } from 'drizzle-orm/pg-core';
3
3
  import { integer, text } from 'drizzle-orm/sqlite-core';
4
4
  import { COUNTRY_CODES_2, CURRENCY_CODES, BANK_CODES } from '@develit-io/general-codes';
5
- import { parse } from 'comment-json';
6
- import { readFileSync } from 'node:fs';
7
- import { join } from '@std/path';
8
5
  import { toSnakeCase } from '@std/text';
9
6
  import 'http-status-codes';
10
7
  import * as z from 'zod/v4/core';
@@ -12,6 +9,7 @@ import { createError } from 'h3';
12
9
  import fs from 'fs';
13
10
  import crypto$1 from 'node:crypto';
14
11
  import path from 'path';
12
+ import { parse } from 'comment-json';
15
13
  import superjson from 'superjson';
16
14
 
17
15
  const base = {
@@ -116,11 +114,6 @@ const composeR2Arguments = ({
116
114
  };
117
115
  };
118
116
 
119
- async function loadWorkerConfig({ path }) {
120
- const workerConfigFile = readFileSync(join(path, "./wrangler.jsonc"), "utf-8");
121
- return parse(workerConfigFile);
122
- }
123
-
124
117
  const composeBindingName = ({
125
118
  resource,
126
119
  resourceName,
@@ -855,4 +848,4 @@ function develitWorker(Worker) {
855
848
  return DevelitWorker;
856
849
  }
857
850
 
858
- export { DatabaseTransaction, ENVIRONMENT, Infrastructure, RPCResponse, action, bankAccount, bankAccountBankCodeEnum, bankAccountCountryCodeEnum, bankAccountCurrencyEnum, bankAccountPostgres, base, basePostgres, calculateExponentialBackoff, cloudflareQueue, composeBindingName, createAuditLogWriter, createInternalError, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getDrizzlePgConfig, getPgCredentials, getPgDatabaseIdFromWrangler, getPgLocalConnectionString, handleAction, handleActionResponse, ibanZodSchema, isInternalError, loadWorkerConfig, paginationQuerySchema, paginationSchema, service, swiftZodSchema, useResult, useResultSync, uuidv4, validateEnvironment };
851
+ export { DatabaseTransaction, ENVIRONMENT, Infrastructure, RPCResponse, action, bankAccount, bankAccountBankCodeEnum, bankAccountCountryCodeEnum, bankAccountCurrencyEnum, bankAccountPostgres, base, basePostgres, calculateExponentialBackoff, cloudflareQueue, composeBindingName, createAuditLogWriter, createInternalError, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getDrizzlePgConfig, getPgCredentials, getPgDatabaseIdFromWrangler, getPgLocalConnectionString, handleAction, handleActionResponse, ibanZodSchema, isInternalError, paginationQuerySchema, paginationSchema, service, swiftZodSchema, useResult, useResultSync, uuidv4, validateEnvironment };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-io/backend-sdk",
3
- "version": "5.17.3",
3
+ "version": "5.17.4",
4
4
  "description": "Develit Backend SDK",
5
5
  "author": "Develit.io",
6
6
  "license": "ISC",