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

speculate

Package Overview
Dependencies
Maintainers
12
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 2.0.0-alpha.2 to 2.0.0-alpha.3

test/fixtures/my-cool-api-with-unit-options.json

3

lib/serviceProperties.js

@@ -20,5 +20,6 @@ 'use strict';

environment: convertToKeyValueFromSpec(pkg.spec, 'environment'),
serviceOptions: convertToKeyValueFromSpec(pkg.spec, 'serviceOptions')
serviceOptions: convertToKeyValueFromSpec(pkg.spec, 'serviceOptions'),
unitOptions: convertToKeyValueFromSpec(pkg.spec, 'unitOptions')
}
);
};
{
"name": "speculate",
"version": "2.0.0-alpha.2",
"version": "2.0.0-alpha.3",
"description": "Automatically generates an RPM Spec file for your Node.js project",

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

@@ -292,2 +292,25 @@ # speculate

#### Unit Options
You can set specific [systemd unit options](https://www.freedesktop.org/software/systemd/man/systemd.unit.html) - in the `[Unit]` section of the .service file, you can specify these using the spec.unitOptions property:
```json
{
"spec": {
"unitOptions": {
"After": "my-cooler-api.service",
"Before": "my-coolest-api.service",
"Requires": "my-very-cool-api.service",
}
}
}
```
If you do not require any specific unit options Speculate will use default options:
```
[Unit]
Description=My Cool API
After=network.target nss-lookup.target
```
### Release Number

@@ -294,0 +317,0 @@

@@ -39,2 +39,10 @@ 'use strict';

});
it('incudes unit options from the spec.unitOptions property in the package.json', () => {
const pkg = require('./fixtures/my-cool-api-with-unit-options');
const expected = loadFixture('my-cool-api-with-unit-options.service');
const 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