New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nodescript/cli

Package Overview
Dependencies
Maintainers
2
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodescript/cli - npm Package Compare versions

Comparing version 0.7.11 to 0.8.0

2

out/main/managers/builder.d.ts

@@ -7,4 +7,2 @@ export declare class BuilderManager {

}>;
private compileCompute;
private compileModuleJson;
}
import { createHash } from 'node:crypto';
import * as bundler from '@nodescript/bundler';
import { ModuleSpecSchema } from '@nodescript/core/schema';
import { evalEsmModule } from '@nodescript/core/util';
import { build } from 'esbuild';
export class BuilderManager {
async buildModuleFile(file) {
const computeCode = await this.compileCompute(file);
const moduleCode = await this.compileModuleJson(file);
const computeCode = await bundler.bundleModuleCompute(file);
const moduleCode = await bundler.bundleModuleJson(file);
const { module } = await evalEsmModule(moduleCode);

@@ -14,39 +14,3 @@ const moduleSpec = ModuleSpecSchema.decode(module);

}
async compileCompute(file) {
const res = await build({
bundle: true,
stdin: {
resolveDir: process.cwd(),
loader: /\.ts/i.test(file) ? 'ts' : 'js',
contents: [
`import { compute } from ${JSON.stringify('./' + file)};`,
`export { compute };`,
].join('\n'),
},
write: false,
minify: true,
keepNames: true,
format: 'esm',
});
return res.outputFiles[0].text;
}
async compileModuleJson(file) {
const res = await build({
bundle: true,
stdin: {
resolveDir: process.cwd(),
loader: /\.ts/i.test(file) ? 'ts' : 'js',
contents: [
`import { module } from ${JSON.stringify('./' + file)};`,
`export { module };`,
].join('\n'),
},
write: false,
minify: true,
keepNames: true,
format: 'esm',
});
return res.outputFiles[0].text;
}
}
//# sourceMappingURL=builder.js.map

4

package.json
{
"name": "@nodescript/cli",
"version": "0.7.11",
"version": "0.8.0",
"type": "module",

@@ -34,2 +34,3 @@ "description": "NodeScript CLI",

"dependencies": {
"@nodescript/bundler": "^1.0.0",
"@nodescript/core": "^5.5.1",

@@ -42,3 +43,2 @@ "@nodescript/logger": "^1.4.1",

"dotenv": "^16.0.2",
"esbuild": "^0.15.9",
"glob": "^8.0.3",

@@ -45,0 +45,0 @@ "mesh-ioc": "^3.1.4",

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