@ohos-ports/flow-bin 0.77.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SHASUM256.txt +1 -0
- package/cli.js +18 -0
- package/flow-openharmony-arm64-v0.77.0-beta.0/flow +0 -0
- package/index.js +21 -0
- package/license +23 -0
- package/package.json +51 -0
- package/readme.md +68 -0
- package/vendor/flow +9 -0
- package/vendor/flow.cmd +13 -0
package/SHASUM256.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bf3b27b4e96665886488f7d48b1287d1dfd59721f82f815c4b8c26e25714e474 flow-openharmony-arm64-v0.77.0-beta.0/flow
|
package/cli.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
var spawn = require('child_process').spawn;
|
|
9
|
+
|
|
10
|
+
var input = process.argv.slice(2);
|
|
11
|
+
var bin = require('./');
|
|
12
|
+
|
|
13
|
+
if (bin !== null) {
|
|
14
|
+
spawn(bin, input, {stdio: 'inherit'})
|
|
15
|
+
.on('exit', process.exit);
|
|
16
|
+
} else {
|
|
17
|
+
throw new Error('Platform not supported.');
|
|
18
|
+
}
|
|
Binary file
|
package/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
* This source code is licensed under the MIT license found in the
|
|
4
|
+
* LICENSE file in the root directory of this source tree.
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
var VERSION = require('./package.json').version;
|
|
9
|
+
|
|
10
|
+
var path = require('path');
|
|
11
|
+
|
|
12
|
+
module.exports =
|
|
13
|
+
process.platform === 'darwin'
|
|
14
|
+
? path.join(__dirname, 'flow-osx-v' + VERSION, 'flow') :
|
|
15
|
+
process.platform === 'linux' && process.arch === 'x64'
|
|
16
|
+
? path.join(__dirname, 'flow-linux64-v' + VERSION, 'flow') :
|
|
17
|
+
process.platform === 'win32' && process.arch === 'x64'
|
|
18
|
+
? path.join(__dirname, 'flow-win64-v' + VERSION, 'flow.exe') :
|
|
19
|
+
process.platform === 'openharmony' && process.arch === 'arm64'
|
|
20
|
+
? path.join(__dirname, 'flow-openharmony-arm64-v' + VERSION, 'flow') :
|
|
21
|
+
null;
|
package/license
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
For flow-bin software
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2015-present, Facebook, Inc.
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ohos-ports/flow-bin",
|
|
3
|
+
"version": "0.77.0-beta.0",
|
|
4
|
+
"description": "Binary wrapper for Flow - A static type checker for JavaScript",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/ohos-ports/ohos-ports.git",
|
|
9
|
+
"directory": "ports/flow-bin/0.77.0"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Sindre Sorhus",
|
|
13
|
+
"email": "sindresorhus@gmail.com",
|
|
14
|
+
"url": "sindresorhus.com"
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"flow": "cli.js"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"test": "echo \"Error: Run 'make test' instead.\" && exit 1",
|
|
21
|
+
"verify": "shasum -c SHASUM256.txt"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=0.10.0"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"flow-openharmony-arm64-v*/flow",
|
|
28
|
+
"vendor",
|
|
29
|
+
"cli.js",
|
|
30
|
+
"index.js",
|
|
31
|
+
"SHASUM256.txt"
|
|
32
|
+
],
|
|
33
|
+
"keywords": [
|
|
34
|
+
"cli-app",
|
|
35
|
+
"cli",
|
|
36
|
+
"bin",
|
|
37
|
+
"binary",
|
|
38
|
+
"flow",
|
|
39
|
+
"facebook",
|
|
40
|
+
"type",
|
|
41
|
+
"inference",
|
|
42
|
+
"check",
|
|
43
|
+
"checker",
|
|
44
|
+
"javascript",
|
|
45
|
+
"js",
|
|
46
|
+
"wrapper"
|
|
47
|
+
],
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/ohos-ports/ohos-ports/issues"
|
|
50
|
+
}
|
|
51
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# flow-bin [](https://travis-ci.org/flowtype/flow-bin)
|
|
2
|
+
|
|
3
|
+
> Binary wrapper for [Flow](http://flowtype.org) - A static type checker for JavaScript
|
|
4
|
+
|
|
5
|
+
OS X, Linux (64-bit) and Windows binaries are currently [provided](http://flowtype.org/docs/getting-started.html#_).
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## CLI
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
$ npm install --global flow-bin
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
$ flow --help
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## API
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
$ npm install --save flow-bin
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
const execFile = require('child_process').execFile;
|
|
27
|
+
const flow = require('flow-bin');
|
|
28
|
+
|
|
29
|
+
execFile(flow, ['check'], (err, stdout) => {
|
|
30
|
+
console.log(stdout);
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
flow-bin is MIT-licensed.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Releases
|
|
41
|
+
|
|
42
|
+
### New Release
|
|
43
|
+
|
|
44
|
+
1. Update the "version" in `package.json` to reflect the flow version to publish. (For now, `flow-bin`'s version is also the version of the `flow` binary).
|
|
45
|
+
2. Run `make`.
|
|
46
|
+
* There should be 2 uncommitted changes at this point: `SHASUM256.txt` and `package.json`.
|
|
47
|
+
3. Commit the changes with the message `Updated binary to v0.30.0`, with the correct version.
|
|
48
|
+
4. Push/merge to `master`.
|
|
49
|
+
5. Tag the update:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
git checkout master &&
|
|
53
|
+
git pull &&
|
|
54
|
+
make test &&
|
|
55
|
+
git tag v$(node -p 'require("./package.json").version') &&
|
|
56
|
+
git push v$(node -p 'require("./package.json").version')
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
6. Publish to npm.
|
|
60
|
+
|
|
61
|
+
### Inspect a Release Before Publishing
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
npm pack
|
|
65
|
+
tar xf "flow-bin-$(node -p 'require("./package.json").version').tgz"
|
|
66
|
+
cd package
|
|
67
|
+
npm run verify
|
|
68
|
+
```
|
package/vendor/flow
ADDED
package/vendor/flow.cmd
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
::
|
|
2
|
+
:: Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
:: This source code is licensed under the MIT license found in the
|
|
4
|
+
:: LICENSE file in the root directory of this source tree.
|
|
5
|
+
::
|
|
6
|
+
|
|
7
|
+
@IF EXIST "%~dp0\node.exe" (
|
|
8
|
+
"%~dp0\node.exe" "%~dp0\..\cli.js" %*
|
|
9
|
+
) ELSE (
|
|
10
|
+
@SETLOCAL
|
|
11
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
12
|
+
node "%~dp0\..\cli.js" %*
|
|
13
|
+
)
|