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

speculate

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

speculate - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

test/fixtures/my-cool-api-environment.json

11

lib/serviceProperties.js
var truncate = require('./truncate');
var _ = require('lodash');
function getEnvironment(pkg) {
var environment = _.get(pkg, 'spec.environment', {});
return Object.keys(environment).map(function(key) {
return { key: key, value: environment[key]};
});
}
module.exports = function (pkg) {

@@ -7,4 +15,5 @@ return {

username: truncate(pkg.name),
description: pkg.description
description: pkg.description,
environment: getEnvironment(pkg)
};
};

2

package.json
{
"name": "speculate",
"version": "1.3.0",
"version": "1.4.0",
"description": "Automatically generates an RPM Spec file for your Node.js project",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -201,2 +201,17 @@ # speculate

### Environment variable
If you need to specify environment variables during startup (NODE_ENV for example) you can specify these inline using the spec.environment property:
```json
{
"spec": {
"environment": {
"NODE_ENV": "production",
"NODE_INSTANCE": "%i"
}
}
}
```
### Release Number

@@ -203,0 +218,0 @@

@@ -21,2 +21,10 @@ var createServiceFile = require('../lib/service');

});
it('includes environment variables from the spec.environment property in package.json', function() {
var pkg = require('./fixtures/my-cool-api-environment');
var expected = loadFixture('my-cool-api-environment.service');
var service = createServiceFile(pkg);
assert.equal(service, expected);
});
});

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