Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ecklf-tmp-runtime-test

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecklf-tmp-runtime-test - npm Package Compare versions

Comparing version 1.0.117 to 1.0.118

dist/lib/routes.js

52

dist/index.js

@@ -22,2 +22,3 @@ "use strict";

const utils_1 = require("./lib/utils");
const routes_1 = require("./lib/routes");
function buildHandler(options) {

@@ -69,14 +70,40 @@ var _a;

});
const handlerFiles = yield (0, build_utils_1.glob)('api/**/*.rs', workPath);
const routes = (0, routes_1.generateRoutes)(Object.keys(handlerFiles));
(0, build_utils_1.debug)(JSON.stringify(routes, null, 2));
return {
output: lambda,
routes: [
{
src: '/api/foo',
dest: '/api/index',
},
{
src: '/api/bar/baz',
dest: '/api/index',
},
],
// Dynamic routes
// \/product\/(?<id>[^\/]+)
// Catch all routes
// \/product\/(\S+)
// Optional catch all
// \/product(\/\S+)?
routes,
/* routes: [ */
/* { */
/* src: '/api/foo', */
/* dest: '/api/index', */
/* }, */
/* { */
/* src: '/api/bar/baz', */
/* dest: '/api/index', */
/* }, */
/* { */
/* src: '/api/dynamic/(?<path>[^/]+)', */
/* dest: '/api/index?path=$path', */
/* }, */
/* { */
/* src: '/api/all/(\\S+)', */
/* dest: '/api/index', */
/* }, */
/* { */
/* src: '/api/optional/(/\\S+)?', */
/* dest: '/api/index', */
/* }, */
/* { */
/* src: '/api/(\\S+)', */
/* dest: '/api/index', */
/* }, */
/* ], */
};

@@ -107,6 +134,7 @@ });

shouldServe: (options) => __awaiter(void 0, void 0, void 0, function* () {
(0, build_utils_1.debug)(`Serve: ${JSON.stringify(options)}`);
return Promise.resolve(options.requestPath === options.entrypoint);
/* debug(`Requested ${options.requestPath} for ${options.entrypoint}`); */
/* return Promise.resolve(options.requestPath === options.entrypoint); */
return Promise.resolve(options.entrypoint.startsWith('api/'));
}),
};
exports.version = runtime.version, exports.build = runtime.build, exports.prepareCache = runtime.prepareCache, exports.shouldServe = runtime.shouldServe;
{
"name": "ecklf-tmp-runtime-test",
"version": "1.0.117",
"version": "1.0.118",
"description": "Rust runtime for Vercel Functions.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/vercel-community/rust",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc