safesafar-common 1.0.74 → 1.0.76
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +12 -3
- package/dist/index.mjs +11 -3
- package/dist/proto/user.management.proto +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -93,6 +93,8 @@ interface IFormatPrismaErrorResponse {
|
|
|
93
93
|
declare function formatPrismaError(module: string, action: 'create' | 'update' | 'delete' | 'find', error: any): IFormatPrismaErrorResponse;
|
|
94
94
|
declare function formateCustomError(module: string, action: 'not_found' | 'duplicate' | 'soft_deleted'): string;
|
|
95
95
|
|
|
96
|
+
declare const resolveDistFolderPath: (folder: string, filePath: string) => string;
|
|
97
|
+
|
|
96
98
|
interface IResponse {
|
|
97
99
|
errors: {
|
|
98
100
|
message: string;
|
|
@@ -179,4 +181,4 @@ declare class PaginationInput {
|
|
|
179
181
|
after?: string;
|
|
180
182
|
}
|
|
181
183
|
|
|
182
|
-
export { CreateDispatcherUserInputBase, CreateIdentityUserInputBase, CreateStoreUserInputBase, CreateTenantUserInputBase, CreateUserInputBase, CurrentUser, DecimalGraphQLScalar, GqlExceptionFilter, HttpExceptionFilter, IsDecimal, IsDecimalConstraint, JwtAuthGuard, LoggerModule, NATS_SERVICE, NatsClientModule, PaginationInput, RetryInterceptor, type TCustomLogger, TransformToDecimal, ValidationKeys, ValidationMessages, ValidationValues, type XApiTokenPayload, convertToDecimal, createLogger, exceptionFactory, formatGatewayError, formatPrismaError, formateCustomError, loadSharedSchemas, mergeSchema, sharedSchemas, subGraphAuthContext };
|
|
184
|
+
export { CreateDispatcherUserInputBase, CreateIdentityUserInputBase, CreateStoreUserInputBase, CreateTenantUserInputBase, CreateUserInputBase, CurrentUser, DecimalGraphQLScalar, GqlExceptionFilter, HttpExceptionFilter, IsDecimal, IsDecimalConstraint, JwtAuthGuard, LoggerModule, NATS_SERVICE, NatsClientModule, PaginationInput, RetryInterceptor, type TCustomLogger, TransformToDecimal, ValidationKeys, ValidationMessages, ValidationValues, type XApiTokenPayload, convertToDecimal, createLogger, exceptionFactory, formatGatewayError, formatPrismaError, formateCustomError, loadSharedSchemas, mergeSchema, resolveDistFolderPath, sharedSchemas, subGraphAuthContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -93,6 +93,8 @@ interface IFormatPrismaErrorResponse {
|
|
|
93
93
|
declare function formatPrismaError(module: string, action: 'create' | 'update' | 'delete' | 'find', error: any): IFormatPrismaErrorResponse;
|
|
94
94
|
declare function formateCustomError(module: string, action: 'not_found' | 'duplicate' | 'soft_deleted'): string;
|
|
95
95
|
|
|
96
|
+
declare const resolveDistFolderPath: (folder: string, filePath: string) => string;
|
|
97
|
+
|
|
96
98
|
interface IResponse {
|
|
97
99
|
errors: {
|
|
98
100
|
message: string;
|
|
@@ -179,4 +181,4 @@ declare class PaginationInput {
|
|
|
179
181
|
after?: string;
|
|
180
182
|
}
|
|
181
183
|
|
|
182
|
-
export { CreateDispatcherUserInputBase, CreateIdentityUserInputBase, CreateStoreUserInputBase, CreateTenantUserInputBase, CreateUserInputBase, CurrentUser, DecimalGraphQLScalar, GqlExceptionFilter, HttpExceptionFilter, IsDecimal, IsDecimalConstraint, JwtAuthGuard, LoggerModule, NATS_SERVICE, NatsClientModule, PaginationInput, RetryInterceptor, type TCustomLogger, TransformToDecimal, ValidationKeys, ValidationMessages, ValidationValues, type XApiTokenPayload, convertToDecimal, createLogger, exceptionFactory, formatGatewayError, formatPrismaError, formateCustomError, loadSharedSchemas, mergeSchema, sharedSchemas, subGraphAuthContext };
|
|
184
|
+
export { CreateDispatcherUserInputBase, CreateIdentityUserInputBase, CreateStoreUserInputBase, CreateTenantUserInputBase, CreateUserInputBase, CurrentUser, DecimalGraphQLScalar, GqlExceptionFilter, HttpExceptionFilter, IsDecimal, IsDecimalConstraint, JwtAuthGuard, LoggerModule, NATS_SERVICE, NatsClientModule, PaginationInput, RetryInterceptor, type TCustomLogger, TransformToDecimal, ValidationKeys, ValidationMessages, ValidationValues, type XApiTokenPayload, convertToDecimal, createLogger, exceptionFactory, formatGatewayError, formatPrismaError, formateCustomError, loadSharedSchemas, mergeSchema, resolveDistFolderPath, sharedSchemas, subGraphAuthContext };
|
package/dist/index.js
CHANGED
|
@@ -62,6 +62,7 @@ __export(libs_exports, {
|
|
|
62
62
|
formateCustomError: () => formateCustomError,
|
|
63
63
|
loadSharedSchemas: () => loadSharedSchemas,
|
|
64
64
|
mergeSchema: () => mergeSchema,
|
|
65
|
+
resolveDistFolderPath: () => resolveDistFolderPath,
|
|
65
66
|
sharedSchemas: () => sharedSchemas,
|
|
66
67
|
subGraphAuthContext: () => subGraphAuthContext
|
|
67
68
|
});
|
|
@@ -487,6 +488,13 @@ function formateCustomError(module2, action) {
|
|
|
487
488
|
}
|
|
488
489
|
__name(formateCustomError, "formateCustomError");
|
|
489
490
|
|
|
491
|
+
// method/resolve-dist-folder-path.ts
|
|
492
|
+
var import_path2 = require("path");
|
|
493
|
+
var resolveDistFolderPath = /* @__PURE__ */ __name((folder, filePath) => {
|
|
494
|
+
const safesafarCommonPath = (0, import_path2.dirname)(require.resolve("safesafar-common/package.json"));
|
|
495
|
+
return (0, import_path2.join)(safesafarCommonPath, `dist/${folder}`, filePath);
|
|
496
|
+
}, "resolveDistFolderPath");
|
|
497
|
+
|
|
490
498
|
// decorators/is-decimal.ts
|
|
491
499
|
function _ts_decorate5(decorators, target, key, desc) {
|
|
492
500
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -891,11 +899,11 @@ var subGraphAuthContext = /* @__PURE__ */ __name(async (context) => {
|
|
|
891
899
|
|
|
892
900
|
// type-defs/index.ts
|
|
893
901
|
var import_fs2 = require("fs");
|
|
894
|
-
var
|
|
902
|
+
var import_path3 = require("path");
|
|
895
903
|
var loadSharedSchemas = /* @__PURE__ */ __name((filePaths) => {
|
|
896
|
-
const safesafarCommonPath = (0,
|
|
904
|
+
const safesafarCommonPath = (0, import_path3.dirname)(require.resolve("safesafar-common/package.json"));
|
|
897
905
|
return filePaths.map((filePath) => {
|
|
898
|
-
const resolvedPath = (0,
|
|
906
|
+
const resolvedPath = (0, import_path3.join)(safesafarCommonPath, "dist/type-defs", filePath);
|
|
899
907
|
return (0, import_fs2.readFileSync)(resolvedPath, "utf8");
|
|
900
908
|
});
|
|
901
909
|
}, "loadSharedSchemas");
|
|
@@ -1221,6 +1229,7 @@ PaginationInput = _ts_decorate13([
|
|
|
1221
1229
|
formateCustomError,
|
|
1222
1230
|
loadSharedSchemas,
|
|
1223
1231
|
mergeSchema,
|
|
1232
|
+
resolveDistFolderPath,
|
|
1224
1233
|
sharedSchemas,
|
|
1225
1234
|
subGraphAuthContext
|
|
1226
1235
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -431,6 +431,13 @@ function formateCustomError(module, action) {
|
|
|
431
431
|
}
|
|
432
432
|
__name(formateCustomError, "formateCustomError");
|
|
433
433
|
|
|
434
|
+
// method/resolve-dist-folder-path.ts
|
|
435
|
+
import { dirname, join as join2 } from "path";
|
|
436
|
+
var resolveDistFolderPath = /* @__PURE__ */ __name((folder, filePath) => {
|
|
437
|
+
const safesafarCommonPath = dirname(__require.resolve("safesafar-common/package.json"));
|
|
438
|
+
return join2(safesafarCommonPath, `dist/${folder}`, filePath);
|
|
439
|
+
}, "resolveDistFolderPath");
|
|
440
|
+
|
|
434
441
|
// decorators/is-decimal.ts
|
|
435
442
|
function _ts_decorate5(decorators, target, key, desc) {
|
|
436
443
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -835,11 +842,11 @@ var subGraphAuthContext = /* @__PURE__ */ __name(async (context) => {
|
|
|
835
842
|
|
|
836
843
|
// type-defs/index.ts
|
|
837
844
|
import { readFileSync as readFileSync2 } from "fs";
|
|
838
|
-
import { join as
|
|
845
|
+
import { join as join3, dirname as dirname2 } from "path";
|
|
839
846
|
var loadSharedSchemas = /* @__PURE__ */ __name((filePaths) => {
|
|
840
|
-
const safesafarCommonPath =
|
|
847
|
+
const safesafarCommonPath = dirname2(__require.resolve("safesafar-common/package.json"));
|
|
841
848
|
return filePaths.map((filePath) => {
|
|
842
|
-
const resolvedPath =
|
|
849
|
+
const resolvedPath = join3(safesafarCommonPath, "dist/type-defs", filePath);
|
|
843
850
|
return readFileSync2(resolvedPath, "utf8");
|
|
844
851
|
});
|
|
845
852
|
}, "loadSharedSchemas");
|
|
@@ -1164,6 +1171,7 @@ export {
|
|
|
1164
1171
|
formateCustomError,
|
|
1165
1172
|
loadSharedSchemas,
|
|
1166
1173
|
mergeSchema,
|
|
1174
|
+
resolveDistFolderPath,
|
|
1167
1175
|
sharedSchemas,
|
|
1168
1176
|
subGraphAuthContext
|
|
1169
1177
|
};
|