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

@based/cli

Package Overview
Dependencies
Maintainers
1
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@based/cli - npm Package Compare versions

Comparing version 5.9.1-alpha to 5.9.1-alpha2

1

dist/commands/dev/fileServer.d.ts

@@ -1,2 +0,1 @@

/// <reference types="node" />
import http from 'http';

@@ -3,0 +2,0 @@ declare const _default: (port: number) => http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;

36

dist/commands/dev/index.js

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

const config = files.find(utils_2.isConfigFile);
let configObj;
if (!index) {

@@ -208,10 +209,39 @@ throw new Error('no index file found');

sourcemap: 'external',
}, async ({ outputFiles }) => {
}, async ({ outputFiles, errors }) => {
if (errors.length) {
if (configObj) {
server.functions.add({
[configObj.name]: {
async fn() {
return getErrorHtml(errors, lrPort);
},
uninstallAfterIdleTime: -1,
closeAfterIdleTime: 5e3,
...DEFAULTS.function,
...configObj,
type: 'function',
},
});
}
else {
console.error(errors);
}
return;
}
const config = outputFiles.find(({ path }) => (0, path_1.basename)(path) === 'based.config.js');
const fn = outputFiles.find(({ path }) => (0, path_1.basename)(path) === 'index.js');
const sourcemap = outputFiles.find(({ path }) => (0, path_1.basename)(path) === 'index.js.map');
let configObj = (0, utils_1.requireFromString)(config.text, config.path);
configObj = (0, utils_1.requireFromString)(config.text, config.path);
configObj = configObj.default || configObj;
if (configObj.type === 'app' && configObj.main) {
const r = (0, utils_1.requireFromString)(fn.text, fn.path);
let r;
try {
r = (0, utils_1.requireFromString)(fn.text, fn.path);
}
catch (e) {
r = () => {
throw e;
};
console.error(e);
}
const fnDefault = r.default || r;

@@ -218,0 +248,0 @@ const opts = {

{
"name": "@based/cli",
"version": "5.9.1-alpha",
"version": "5.9.1-alpha2",
"description": "",

@@ -5,0 +5,0 @@ "bin": "bin/cmd.js",

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

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