Skip to content

Commit 8de088f

Browse files
committed
patch: migrate to prebuilidify + flowzone + upgrade all deps
1 parent d6179f4 commit 8de088f

10 files changed

Lines changed: 3021 additions & 142 deletions

File tree

.github/workflows/flowzone.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Flowzone
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, closed]
6+
branches: [main, master]
7+
# allow external contributions to use secrets within trusted code
8+
pull_request_target:
9+
types: [opened, synchronize, closed]
10+
branches: [main, master]
11+
12+
jobs:
13+
flowzone:
14+
name: Flowzone
15+
uses: product-os/flowzone/.github/workflows/flowzone.yml@master
16+
# prevent duplicate workflow executions for pull_request and pull_request_target
17+
if: |
18+
(
19+
github.event.pull_request.head.repo.full_name == github.repository &&
20+
github.event_name == 'pull_request'
21+
) || (
22+
github.event.pull_request.head.repo.full_name != github.repository &&
23+
github.event_name == 'pull_request_target'
24+
)
25+
26+
# Workflows in the same org or enterprise can use the inherit keyword to implicitly pass secrets
27+
secrets: inherit

.travis.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

README.md

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,74 @@
1-
mountutils
2-
==========
1+
# mountutils
32

43
[![npm](https://img.shields.io/npm/v/mountutils.svg?style=flat-square)](https://npmjs.com/package/mountutils)
54
[![npm license](https://img.shields.io/npm/l/mountutils.svg?style=flat-square)](https://npmjs.com/package/mountutils)
65
[![npm downloads](https://img.shields.io/npm/dm/mountutils.svg?style=flat-square)](https://npmjs.com/package/mountutils)
7-
[![Travis CI status](https://img.shields.io/travis/resin-io-modules/mountutils/master.svg?style=flat-square&label=linux%20|%20mac)](https://travis-ci.org/resin-io-modules/mountutils/branches)
8-
[![AppVeyor status](https://img.shields.io/appveyor/ci/resin-io/mountutils/master.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/resin-io/mountutils/branch/master)
96

107
> Cross platform mount related utilities
118
12-
Installation
13-
------------
9+
## Installation
1410

1511
Install `mountutils` by running:
1612

1713
```sh
1814
$ npm install --save mountutils
1915
```
2016

21-
Debug mode
22-
----------
17+
## Debug mode
2318

2419
You can enable debug mode by setting the `MOUNTUTILS_DEBUG` environment
2520
variable.
2621

27-
Documentation
28-
-------------
22+
## Documentation
2923

3024
<a name="module_mountutils.unmountDisk"></a>
3125

3226
### mountutils.unmountDisk(device, callback)
27+
3328
**Kind**: static method of <code>[mountutils](#module_mountutils)</code>
3429
**Summary**: Unmount a whole disk
35-
**Access**: public
30+
**Access**: public
3631

37-
| Param | Type | Description |
38-
| --- | --- | --- |
39-
| device | <code>String</code> | device |
32+
| Param | Type | Description |
33+
| -------- | --------------------- | ---------------- |
34+
| device | <code>String</code> | device |
4035
| callback | <code>function</code> | callback (error) |
4136

42-
**Example**
37+
**Example**
38+
4339
```js
4440
// macOS
45-
const drive = '/dev/disk2';
41+
const drive = "/dev/disk2";
4642

4743
// GNU/Linux
48-
const drive = '/dev/sdb';
44+
const drive = "/dev/sdb";
4945

5046
// Windows
51-
const drive = '\\\\.\\PHYSICALDRIVE2';
47+
const drive = "\\\\.\\PHYSICALDRIVE2";
5248

5349
mountutils.unmountDisk(drive, (error) => {
5450
if (error) {
5551
throw error;
5652
}
5753

58-
console.log('Done!');
54+
console.log("Done!");
5955
});
6056
```
6157

62-
Support
63-
-------
58+
## Support
6459

6560
If you're having any problem, please [raise an issue][newissue] on GitHub and
6661
the Resin.io team will be happy to help.
6762

68-
Tests
69-
-----
63+
## Tests
7064

7165
Run the test suite by doing:
7266

7367
```sh
7468
$ npm test
7569
```
7670

77-
Troubleshooting
78-
---------------
71+
## Troubleshooting
7972

8073
### `error C2373: '__pfnDliNotifyHook2': redefinition`
8174

@@ -88,8 +81,7 @@ npm install -g npm@latest
8881

8982
See the [following `node-gyp` issue](https://github.com/nodejs/node-gyp/issues/972) for more details.
9083

91-
Contribute
92-
----------
84+
## Contribute
9385

9486
- Issue Tracker: [github.com/resin-io-modules/mountutils/issues][issues]
9587
- Source Code: [github.com/resin-io-modules/mountutils][source]
@@ -105,8 +97,7 @@ linters run without any warning:
10597
$ npm run lint
10698
```
10799

108-
License
109-
-------
100+
## License
110101

111102
The project is licensed under the Apache 2.0 license.
112103

appveyor.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

binding.gyp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,7 @@
6363
],
6464
}
6565
],
66+
'variables' : {
67+
'openssl_fips': '',
68+
},
6669
}

index.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* @module mountutils
1919
*/
2020

21-
'use strict';
21+
"use strict";
2222

2323
/**
2424
* @summary Unmount a whole disk
@@ -49,9 +49,8 @@
4949
* });
5050
*/
5151

52-
module.exports = require('bindings')({
53-
bindings: 'MountUtils',
54-
/* eslint-disable camelcase */
55-
module_root: __dirname
56-
/* eslint-enable camelcase */
57-
});
52+
// Will load a compiled build if present or a prebuild.
53+
// If no build if found it will throw an exception
54+
const binding = require('node-gyp-build')(__dirname);
55+
56+
module.exports = binding;

0 commit comments

Comments
 (0)