Comparing version 2.0.55 to 2.0.56
@@ -19,3 +19,3 @@ /// <reference types="node" /> | ||
} | ||
export declare const initBridge: <Routes extends BridgeRoutes<{}>>({ routes, errorHandler, formidable, logs, }: { | ||
export declare const initBridge: <Routes extends BridgeRoutes>({ routes, errorHandler, formidable, logs, }: { | ||
routes: Routes; | ||
@@ -22,0 +22,0 @@ formidable?: any; |
@@ -86,3 +86,3 @@ "use strict"; | ||
StatusCode[StatusCode["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED"; | ||
})(StatusCode = exports.StatusCode || (exports.StatusCode = {})); | ||
})(StatusCode || (exports.StatusCode = StatusCode = {})); | ||
const errorStatus = [ | ||
@@ -89,0 +89,0 @@ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, |
@@ -1,2 +0,3 @@ | ||
export declare const sdkHandler: import("./routes/method").BridgeMethod<import("./core").BridgeHandler<() => string, never>, null, null, null, null>; | ||
/// <reference types="node" /> | ||
export declare const sdkHandler: import("./routes/method").BridgeMethod<import("./core").BridgeHandler<() => Buffer, never>, null, null, null, null>; | ||
//# sourceMappingURL=sdk.d.ts.map |
@@ -9,9 +9,13 @@ "use strict"; | ||
const method_1 = require("./routes/method"); | ||
const utilities_1 = require("./utilities"); | ||
const path_1 = __importDefault(require("path")); | ||
const adm_zip_1 = __importDefault(require("adm-zip")); | ||
const sdkPath = path_1.default.join(process.cwd(), 'sdk'); | ||
const dirExists = (0, utilities_1.directoryExists)(sdkPath); | ||
exports.sdkHandler = (0, method_1.method)({ | ||
GET: (0, core_1.handler)({ | ||
resolve: () => { | ||
const sdkPath = path_1.default.join(process.cwd(), 'sdk'); | ||
console.log(sdkPath); | ||
return sdkPath; | ||
if (dirExists && typeof adm_zip_1.default === undefined) | ||
throw new Error(`You need to install adm-zip to fetch your sdk: "npm i adm-zip"`); | ||
return new adm_zip_1.default(sdkPath).toBuffer(); | ||
}, | ||
@@ -18,0 +22,0 @@ }), |
export * from './types'; | ||
export * from './apply'; | ||
export * from './formidable'; | ||
export * from './dirExists'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -20,2 +20,3 @@ "use strict"; | ||
__exportStar(require("./formidable"), exports); | ||
__exportStar(require("./dirExists"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "bridge", | ||
"version": "2.0.55", | ||
"version": "2.0.56", | ||
"description": "Bridge is a Typescript Node.js framework that provides an easy and scalable way to create REST APIs while generating the client code.", | ||
@@ -35,9 +35,10 @@ "author": "Bridge Team <support@bridge.codes>", | ||
], | ||
"devDependencies": { | ||
"dependencies": { | ||
"@types/adm-zip": "^0.5.0", | ||
"@types/express": "^4.17.17", | ||
"@types/node": "^18.11.15", | ||
"nodemon": "^2.0.20", | ||
"@types/node": "^20.2.5", | ||
"nodemon": "^2.0.22", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.3" | ||
"typescript": "^5.1.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115628
0
138
1279
6
1
+ Added@types/adm-zip@^0.5.0
+ Added@types/express@^4.17.17
+ Added@types/node@^20.2.5
+ Addednodemon@^2.0.22
+ Addedts-node@^10.9.1
+ Addedtypescript@^5.1.3
+ Added@cspotcode/source-map-support@0.8.1(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.9(transitive)
+ Added@tsconfig/node10@1.0.11(transitive)
+ Added@tsconfig/node12@1.0.11(transitive)
+ Added@tsconfig/node14@1.0.3(transitive)
+ Added@tsconfig/node16@1.0.4(transitive)
+ Added@types/adm-zip@0.5.7(transitive)
+ Added@types/body-parser@1.19.5(transitive)
+ Added@types/connect@3.4.38(transitive)
+ Added@types/express@4.17.21(transitive)
+ Added@types/express-serve-static-core@4.19.6(transitive)
+ Added@types/http-errors@2.0.4(transitive)
+ Added@types/mime@1.3.5(transitive)
+ Added@types/node@20.17.10(transitive)
+ Added@types/qs@6.9.17(transitive)
+ Added@types/range-parser@1.2.7(transitive)
+ Added@types/send@0.17.4(transitive)
+ Added@types/serve-static@1.15.7(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-walk@8.3.4(transitive)
+ Addedanymatch@3.1.3(transitive)
+ Addedarg@4.1.3(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbinary-extensions@2.3.0(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedchokidar@3.6.0(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcreate-require@1.1.1(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addeddiff@4.0.2(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedignore-by-default@1.0.1(transitive)
+ Addedis-binary-path@2.1.0(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedmake-error@1.3.6(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedms@2.1.3(transitive)
+ Addednodemon@2.0.22(transitive)
+ Addednormalize-path@3.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedpstree.remy@1.1.8(transitive)
+ Addedreaddirp@3.6.0(transitive)
+ Addedsemver@5.7.27.0.0(transitive)
+ Addedsimple-update-notifier@1.1.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedtouch@3.1.1(transitive)
+ Addedts-node@10.9.2(transitive)
+ Addedtypescript@5.7.2(transitive)
+ Addedundefsafe@2.0.5(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedv8-compile-cache-lib@3.0.1(transitive)
+ Addedyn@3.1.1(transitive)