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.127 to 1.0.128

62

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,5 +70,5 @@ var _a;

});
// const handlerFiles = await glob('api/**/*.rs', workPath);
// const routes = generateRoutes(Object.keys(handlerFiles));
// debug(JSON.stringify(routes, null, 2));
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 {

@@ -81,29 +82,29 @@ output: lambda,

// \/product(\/\S+)?
/* routes, */
routes: [
{
src: '/api/foo',
dest: '/api/vercel/index',
},
{
src: '/api/bar/baz',
dest: '/api/vercel/index',
},
{
src: '/api/dynamic/(?<path>[^/]+)',
dest: '/api/vercel/index?path=$path',
},
{
src: '/api/all/(\\S+)',
dest: '/api/vercel/index',
},
{
src: '/api/optional/(/\\S+)?',
dest: '/api/vercel/index',
},
{
src: '/api/(\\S+)',
dest: '/api/vercel/index',
},
],
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', */
/* }, */
/* ], */
};

@@ -134,2 +135,3 @@ });

shouldServe: (options) => __awaiter(void 0, void 0, void 0, function* () {
// TODO
/* debug(`Requested ${options.requestPath} for ${options.entrypoint}`); */

@@ -136,0 +138,0 @@ /* return Promise.resolve(options.requestPath === options.entrypoint); */

@@ -61,2 +61,45 @@ "use strict";

});
it('should sort all routes correctly', () => {
const allRoutes = [
'api/foo.rs',
'api/bar/baz.rs',
'api/post/[id].rs',
'api/post/[id]/comments/[commentId].rs',
'api/[...rootAll].rs',
'api/all/[...all].rs',
'api/optional/[[...id]].rs',
];
expect((0, routes_1.generateRoutes)(allRoutes)).toMatchInlineSnapshot(`
[
{
"dest": "/api/vercel/index",
"src": "/api/bar/baz",
},
{
"dest": "/api/vercel/index",
"src": "/api/foo",
},
{
"dest": "/api/vercel/index?id=$id&commentId=$commentId",
"src": "/api/post/(?<id>[^/]+)/comments/(?<commentId>[^/]+)",
},
{
"dest": "/api/vercel/index?id=$id",
"src": "/api/post/(?<id>[^/]+)",
},
{
"dest": "/api/vercel/index",
"src": "/api/all/(\\S+)",
},
{
"dest": "/api/vercel/index",
"src": "/api/optional/(/\\S+)?",
},
{
"dest": "/api/vercel/index",
"src": "/api/(\\S+)",
},
]
`);
});
});
{
"name": "ecklf-tmp-runtime-test",
"version": "1.0.127",
"version": "1.0.128",
"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