update
This commit is contained in:
24
APP/nexus-remote/node_modules/@electron/osx-sign/LICENSE
generated
vendored
Normal file
24
APP/nexus-remote/node_modules/@electron/osx-sign/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
Copyright (c) Electron contributors
|
||||
Copyright (c) 2015-2016 Zhuo Lu, Jason Hinkle, et al.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
282
APP/nexus-remote/node_modules/@electron/osx-sign/README.md
generated
vendored
Normal file
282
APP/nexus-remote/node_modules/@electron/osx-sign/README.md
generated
vendored
Normal file
@@ -0,0 +1,282 @@
|
||||
# @electron/osx-sign [![npm][npm_img]][npm_url] [![Build Status][circleci_img]][circleci_url]
|
||||
|
||||
Codesign Electron macOS apps
|
||||
|
||||
## About
|
||||
|
||||
[`@electron/osx-sign`][electron-osx-sign] minimizes the extra work needed to eventually prepare
|
||||
your apps for shipping, providing options that work out of the box for most applications.
|
||||
Additional configuration is available via its API.
|
||||
|
||||
There are two main functionalities exposed via this package:
|
||||
* Signing macOS apps via `sign` functions. Under the hood, this uses the `codesign` utility.
|
||||
* Creating `.pkg` installer packages via `flat` functions. Under the hood, this uses the `productbuild` utility.
|
||||
|
||||
## Installation
|
||||
|
||||
`@electron/osx-sign` is integrated into other Electron packaging tools, and can be configured accordingly:
|
||||
* [Electron Packager](https://electron.github.io/packager/main/types/OsxSignOptions.html)
|
||||
* [Electron Forge](https://www.electronforge.io/guides/code-signing/code-signing-macos)
|
||||
|
||||
You can also install `@electron/osx-sign` separately if your packaging pipeline does not involve those tools:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @electron/osx-sign
|
||||
```
|
||||
|
||||
## Code signing
|
||||
|
||||
The signing procedure implemented in this package is based on what described in Electron's [Code Signing Guide](https://github.com/electron/electron/blob/main/docs/tutorial/code-signing.md).
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* You must be a registered member of the [Apple Developer Program](https://developer.apple.com/programs/).
|
||||
Please note that you could be charged by Apple in order to get issued with the required certificates.
|
||||
* You must have [Xcode](https://developer.apple.com/xcode/) installed from the
|
||||
[Mac App Store](https://apps.apple.com/us/app/xcode/id497799835). It is not recommended to download your
|
||||
copy from other 3rd party sources for security reasons.
|
||||
* You must have Xcode Command Line Tools installed. To check whether it is available,
|
||||
try `xcode-select --install` and follow the instructions.
|
||||
* To distribute your app on the Mac App Store, You must create a Mac App on [App Store Connect](https://appstoreconnect.apple.com/).
|
||||
* You must give your app a unique Bundle ID.
|
||||
* You must give your app a version number.
|
||||
|
||||
### Certificates
|
||||
|
||||
In order to distribute your application either inside or outside the Mac App Store,
|
||||
you will have to have the following certificates from Apple after becoming a registered developer.
|
||||
|
||||
Certificates can be created through the
|
||||
[Certificates, Identities & Profiles](https://developer.apple.com/account/resources/certificates/add)
|
||||
page in the Apple Developer website or via [Account Preferences in Xcode](https://help.apple.com/xcode/mac/current/#/dev3a05256b8).
|
||||
|
||||
For distribution inside the Mac App Store, you will need to create:
|
||||
* Mac App Distribution: `3rd Party Mac Developer Application: * (*)`
|
||||
* Mac Installer Distribution: `3rd Party Mac Developer Installer: * (*)`
|
||||
|
||||
For distribution outside the Mac App Store:
|
||||
* Developer ID Application: `Developer ID Application: * (*)`
|
||||
* Developer ID Installer: `Developer ID Installer: * (*)`
|
||||
|
||||
After you create the necessary certifications, download them and open each so that they are
|
||||
installed in your keychain. We recommend installing them in your system default keychain so
|
||||
that `@electron/osx-sign` can detect them automatically.
|
||||
|
||||
**Note:** They appear to come in pairs. It is preferred to have every one of them installed so not to
|
||||
are about which is not yet installed for future works. However, if you may only want to distribute
|
||||
outside the Mac App Store, there is no need to have the 3rd Party Mac Developer ones installed and vice versa.
|
||||
|
||||
### API
|
||||
|
||||
```javascript
|
||||
const { signAsync } = require('@electron/osx-sign')
|
||||
const opts = {
|
||||
app: 'path/to/my.app'
|
||||
};
|
||||
signAsync(opts)
|
||||
.then(function () {
|
||||
// Application signed
|
||||
})
|
||||
.catch(function (err) {
|
||||
// Handle the error
|
||||
})
|
||||
```
|
||||
|
||||
The only mandatory option for `signAsync` is a path to your `.app` package.
|
||||
Configuration for most Electron apps should work out of the box.
|
||||
For full configuration options, see the [API documentation].
|
||||
|
||||
### Usage examples
|
||||
|
||||
#### Signing for Mac App Store distribution
|
||||
|
||||
```javascript
|
||||
const { signAsync } = require('@electron/osx-sign')
|
||||
const opts = {
|
||||
app: 'path/to/my.app',
|
||||
// optional parameters for additional customization
|
||||
platform: "mas", // should be auto-detected if your app was packaged for MAS via Packager or Forge
|
||||
type: "distribution", // defaults to "distribution" for submission to App Store Connect
|
||||
provisioningProfile: 'path/to/my.provisionprofile', // defaults to the current working directory
|
||||
keychain: 'my-keychain', // defaults to the system default login keychain
|
||||
};
|
||||
signAsync(opts)
|
||||
.then(function () {
|
||||
// Application signed
|
||||
})
|
||||
.catch(function (err) {
|
||||
// Handle the error
|
||||
})
|
||||
```
|
||||
|
||||
Mac App Store apps require a [Provisioning Profile](https://www.electronjs.org/docs/latest/tutorial/mac-app-store-submission-guide#prepare-provisioning-profile)
|
||||
for submission to App Store Connect. We recommend having the provisioning profile for distribution
|
||||
placed in the current working directory and the signing identity installed in the default keychain.
|
||||
|
||||
The app is not expected to run after codesigning since there is no provisioned device, and it is
|
||||
intended only for submission to App Store Connect. Since `@electron/osx-sign` adds the entry
|
||||
`com.apple.developer.team-identifier` to a temporary copy of the specified entitlements file
|
||||
(with the default option `preAutoEntitlements`), distribution builds can no longer be run directly.
|
||||
|
||||
To run an app codesigned for distribution locally after codesigning, you may manually add
|
||||
`ElectronTeamID` in your `Info.plist` and `com.apple.security.application-groups` in the
|
||||
entitlements file, and set `preAutoEntitlements: false` for `@electron/osx-sign` to avoid
|
||||
this extra bit. Note that "certain features are only allowed across apps whose team-identifier value match"
|
||||
([Technical Note TN2415](https://developer.apple.com/library/content/technotes/tn2415/_index.html#//apple_ref/doc/uid/DTS40016427-CH1-ENTITLEMENTSLIST)).
|
||||
|
||||
Alternatively, set the app's `type` to `development` to codesign a development version of your app,
|
||||
which will allow it to be run on your development provisioned machine. Apps signed for development
|
||||
will not be eligible for submission via App Store Connect.
|
||||
|
||||
#### Signing with `--deep`
|
||||
|
||||
Some subresources that you may include in your Electron app may need to be signed with `--deep`.
|
||||
This is not typically safe to apply to the entire Electron app and therefore should be applied to _just_ your file.
|
||||
|
||||
```javascript
|
||||
signAsync({
|
||||
app: 'path/to/my.app',
|
||||
optionsForFile: (filePath) => {
|
||||
// For our one specific file we can pass extra options to be merged
|
||||
// with the default options
|
||||
if (path.basename(filePath) === 'myStrangeFile.jar') {
|
||||
return {
|
||||
additionalArguments: ['--deep'],
|
||||
};
|
||||
}
|
||||
|
||||
// Just use the default options for everything else
|
||||
return null;
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
#### Signing legacy versions of Electron
|
||||
|
||||
`@electron/osx-sign` maintains backwards compatibility with older versions of Electron, but
|
||||
generally assumes that you are on the latest stable version.
|
||||
|
||||
If you are running an older unsupported version of Electron, you should pass in the `version`
|
||||
option as such:
|
||||
|
||||
```javascript
|
||||
signAsync({
|
||||
app: 'path/to/my.app',
|
||||
version: '0.34.0',
|
||||
});
|
||||
```
|
||||
|
||||
## Flat installer packaging
|
||||
|
||||
This module also handles the creation of flat installer packages (`.pkg` installers).
|
||||
|
||||
> [!NOTE]
|
||||
> Modern `.pkg` installers are also named "flat" packages for historical purposes. Prior
|
||||
> to Mac OS X Leopard (10.5), installation packages were organized in hierarchical
|
||||
> directories. OS X Leopard introduced a new flat package format that is used for modern
|
||||
> `.pkg` installers.
|
||||
|
||||
### API usage
|
||||
|
||||
```javascript
|
||||
const { flatAsync } = require('@electron/osx-sign')
|
||||
flatAsync({
|
||||
app: 'path/to/my.app'
|
||||
})
|
||||
.then(function () {
|
||||
// Application flattened
|
||||
})
|
||||
.catch(function (err) {
|
||||
// Handle the error
|
||||
})
|
||||
```
|
||||
|
||||
The only mandatory option for `flatAsync` is a path to your `.app` package.
|
||||
For full configuration options, see the [API documentation].
|
||||
|
||||
## CLI
|
||||
|
||||
`@electron/osx-sign` also exposes a legacy command-line interface (CLI) for both signing
|
||||
and installer generation. However, we recommend using the JavaScript API as it has a more
|
||||
complete API surface (e.g. `optionsForFile` is only available via JS).
|
||||
|
||||
```sh
|
||||
# install the package locally into devDependencies
|
||||
npm install --save-dev @electron/osx-sign
|
||||
|
||||
# Sign a packaged .app bundle
|
||||
npx electron-osx-sign path/to/my.app [options ...]
|
||||
|
||||
# Create a .pkg installer from a packaged .app bundle
|
||||
npx electron-osx-flat path/to/my.app [options ...]
|
||||
```
|
||||
|
||||
For full options, use the `--help` flag for either command.
|
||||
|
||||
|
||||
## Debug
|
||||
|
||||
The [`debug`](https://www.npmjs.com/package/debug) module is used to display advanced logs and messages.
|
||||
If you are having problems with signing your app with `@electron/osx-sign`, run your signing scripts with
|
||||
the `DEBUG=electron-osx-sign*` environment variable.
|
||||
|
||||
## Test
|
||||
|
||||
The project's configured to run automated tests on CircleCI.
|
||||
|
||||
If you wish to manually test the module, first comment out `opts.identity` in `test/basic.js` to enable
|
||||
auto discovery. Then run the command `npm test` from the dev directory.
|
||||
|
||||
When this command is run for the first time: `@electron/get` will download macOS Electron releases defined
|
||||
in `test/config.json`, and save to `~/.electron/`, which might take up less than 1GB of disk space.
|
||||
|
||||
A successful testing should look something like:
|
||||
|
||||
```
|
||||
$ npm test
|
||||
|
||||
> electron-osx-sign@0.4.17 pretest electron-osx-sign
|
||||
> rimraf test/work
|
||||
|
||||
> electron-osx-sign@0.4.17 test electron-osx-sign
|
||||
> standard && tape test
|
||||
|
||||
Calling @electron/get before running tests...
|
||||
Running tests...
|
||||
TAP version 13
|
||||
# setup
|
||||
# defaults-test:v7.0.0-beta.3-darwin-x64
|
||||
ok 1 app signed
|
||||
# defaults-test:v7.0.0-beta.3-mas-x64
|
||||
ok 2 app signed
|
||||
# defaults-test:v6.0.3-darwin-x64
|
||||
ok 3 app signed
|
||||
# defaults-test:v6.0.3-mas-x64
|
||||
ok 4 app signed
|
||||
# defaults-test:v5.0.10-darwin-x64
|
||||
ok 5 app signed
|
||||
# defaults-test:v5.0.10-mas-x64
|
||||
ok 6 app signed
|
||||
# defaults-test:v4.2.9-darwin-x64
|
||||
ok 7 app signed
|
||||
# defaults-test:v4.2.9-mas-x64
|
||||
ok 8 app signed
|
||||
# defaults-test:v3.1.2-darwin-x64
|
||||
ok 9 app signed
|
||||
# defaults-test:v3.1.2-mas-x64
|
||||
ok 10 app signed
|
||||
# teardown
|
||||
|
||||
1..10
|
||||
# tests 10
|
||||
# pass 10
|
||||
|
||||
# ok
|
||||
```
|
||||
|
||||
[Electron]: https://github.com/electron/electron
|
||||
[electron-osx-sign]: https://github.com/electron/osx-sign
|
||||
[npm_img]: https://img.shields.io/npm/v/@electron/osx-sign.svg
|
||||
[npm_url]: https://npmjs.org/package/@electron/osx-sign
|
||||
[circleci_img]: https://img.shields.io/circleci/build/github/electron/osx-sign
|
||||
[circleci_url]: https://circleci.com/gh/electron/osx-sign
|
||||
41
APP/nexus-remote/node_modules/@electron/osx-sign/bin/electron-osx-flat-usage.txt
generated
vendored
Normal file
41
APP/nexus-remote/node_modules/@electron/osx-sign/bin/electron-osx-flat-usage.txt
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
NAME
|
||||
electron-osx-flat -- product building for Electron apps
|
||||
|
||||
SYNOPSIS
|
||||
electron-osx-flat app [options ...]
|
||||
|
||||
DESCRIPTION
|
||||
app
|
||||
Path to the application package.
|
||||
Needs file extension ``.app''.
|
||||
|
||||
--help
|
||||
Flag to display all commands.
|
||||
|
||||
--identity=identity
|
||||
Name of certificate to use when signing.
|
||||
Default to selected with respect to --platform from --keychain specified or keychain by system default.
|
||||
|
||||
--identityValidation, --no-identityValidation
|
||||
Flag to enable/disable validation for the signing identity.
|
||||
|
||||
--install=install-path
|
||||
Path to install the bundle.
|
||||
Default to ``/Applications''.
|
||||
|
||||
--keychain=keychain
|
||||
The keychain name.
|
||||
Default to system default keychain.
|
||||
|
||||
--platform=platform
|
||||
Build platform of Electron.
|
||||
Allowed values: ``darwin'', ``mas''.
|
||||
Default to auto detect from application bundle.
|
||||
|
||||
--pkg
|
||||
Path to the output the flattened package.
|
||||
Needs file extension ``.pkg''.
|
||||
|
||||
--scripts
|
||||
Path to a directory containing pre and/or post install scripts.
|
||||
34
APP/nexus-remote/node_modules/@electron/osx-sign/bin/electron-osx-flat.js
generated
vendored
Normal file
34
APP/nexus-remote/node_modules/@electron/osx-sign/bin/electron-osx-flat.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const args = require('minimist')(process.argv.slice(2), {
|
||||
boolean: [
|
||||
'help'
|
||||
]
|
||||
});
|
||||
const usage = fs.readFileSync(path.join(__dirname, 'electron-osx-flat-usage.txt')).toString();
|
||||
const flat = require('../').flat;
|
||||
|
||||
args.app = args._.shift();
|
||||
|
||||
if (!args.app || args.help) {
|
||||
console.log(usage);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Remove excess arguments
|
||||
delete args._;
|
||||
delete args.help;
|
||||
|
||||
flat(args, function done (err) {
|
||||
if (err) {
|
||||
console.error('Flat failed:');
|
||||
if (err.message) console.error(err.message);
|
||||
else if (err.stack) console.error(err.stack);
|
||||
else console.log(err);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('Application flattened, saved to:', args.pkg);
|
||||
process.exit(0);
|
||||
});
|
||||
60
APP/nexus-remote/node_modules/@electron/osx-sign/bin/electron-osx-sign-usage.txt
generated
vendored
Normal file
60
APP/nexus-remote/node_modules/@electron/osx-sign/bin/electron-osx-sign-usage.txt
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
|
||||
NAME
|
||||
electron-osx-sign -- code signing for Electron apps
|
||||
|
||||
SYNOPSIS
|
||||
electron-osx-sign app [embedded-binary ...] [options ...]
|
||||
|
||||
DESCRIPTION
|
||||
app
|
||||
Path to the application package.
|
||||
Needs file extension ``.app''.
|
||||
|
||||
embedded-binary ...
|
||||
Path to additional binaries that will be signed along with built-ins of Electron, spaced.
|
||||
|
||||
--help
|
||||
Flag to display all commands.
|
||||
|
||||
--identity=identity
|
||||
Name of certificate to use when signing.
|
||||
Default to selected with respect to --provisioning-profile and --platform from --keychain specified or keychain by system default.
|
||||
|
||||
--identityValidation, --no-identityValidation
|
||||
Flag to enable/disable validation for the signing identity.
|
||||
|
||||
--ignore=path
|
||||
Path to skip signing. The string will be treated as a regular expression when used to match the file paths.
|
||||
|
||||
--keychain=keychain
|
||||
The keychain name.
|
||||
Default to system default keychain.
|
||||
|
||||
--platform=platform
|
||||
Build platform of Electron.
|
||||
Allowed values: ``darwin'', ``mas''.
|
||||
Default to auto detect from application bundle.
|
||||
|
||||
--pre-auto-entitlements, --no-pre-auto-entitlements
|
||||
Flag to enable/disable automation of entitlements file and Info.plist.
|
||||
|
||||
--pre-embed-provisioning-profile, --no-pre-embed-provisioning-profile
|
||||
Flag to enable/disable embedding of provisioning profile.
|
||||
|
||||
--provisioning-profile=file
|
||||
Path to provisioning profile.
|
||||
|
||||
--strictVerify, --strictVerify=options, --no-strictVerify
|
||||
Flag to enable/disable ``--strict'' flag when verifying the signed application bundle.
|
||||
Each component should be separated in ``options'' with comma (``,'').
|
||||
Enabled by default.
|
||||
|
||||
--type=type
|
||||
Specify whether to sign app for development or for distribution.
|
||||
Allowed values: ``development'', ``distribution''.
|
||||
Default to ``distribution''.
|
||||
|
||||
--version=version
|
||||
Build version of Electron.
|
||||
Values may be: ``1.2.0''.
|
||||
Default to latest Electron version.
|
||||
46
APP/nexus-remote/node_modules/@electron/osx-sign/bin/electron-osx-sign.js
generated
vendored
Normal file
46
APP/nexus-remote/node_modules/@electron/osx-sign/bin/electron-osx-sign.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const args = require('minimist')(process.argv.slice(2), {
|
||||
string: [
|
||||
'signature-flags'
|
||||
],
|
||||
boolean: [
|
||||
'help',
|
||||
'pre-auto-entitlements',
|
||||
'pre-embed-provisioning-profile',
|
||||
'hardened-runtime',
|
||||
'restrict'
|
||||
],
|
||||
default: {
|
||||
'pre-auto-entitlements': true,
|
||||
'pre-embed-provisioning-profile': true
|
||||
}
|
||||
});
|
||||
const usage = fs.readFileSync(path.join(__dirname, 'electron-osx-sign-usage.txt')).toString();
|
||||
const sign = require('../').sign;
|
||||
|
||||
args.app = args._.shift();
|
||||
args.binaries = args._;
|
||||
|
||||
if (!args.app || args.help) {
|
||||
console.log(usage);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Remove excess arguments
|
||||
delete args._;
|
||||
delete args.help;
|
||||
|
||||
sign(args, function done (err) {
|
||||
if (err) {
|
||||
console.error('Sign failed:');
|
||||
if (err.message) console.error(err.message);
|
||||
else if (err.stack) console.error(err.stack);
|
||||
else console.log(err);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('Application signed:', args.app);
|
||||
process.exit(0);
|
||||
});
|
||||
8
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.darwin.gpu.plist
generated
vendored
Normal file
8
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.darwin.gpu.plist
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
20
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.darwin.plist
generated
vendored
Normal file
20
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.darwin.plist
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.audio-input</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.bluetooth</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.camera</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.print</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.usb</key>
|
||||
<true/>
|
||||
<key>com.apple.security.personal-information.location</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
10
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.darwin.plugin.plist
generated
vendored
Normal file
10
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.darwin.plugin.plist
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
8
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.darwin.renderer.plist
generated
vendored
Normal file
8
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.darwin.renderer.plist
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
10
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.mas.child.plist
generated
vendored
Normal file
10
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.mas.child.plist
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.inherit</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
22
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.mas.plist
generated
vendored
Normal file
22
APP/nexus-remote/node_modules/@electron/osx-sign/entitlements/default.mas.plist
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.files.bookmarks.app-scope</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.print</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.camera</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.microphone</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.usb</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
15
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/LICENSE
generated
vendored
Normal file
15
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2011-2017 JP Richardson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
|
||||
(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
262
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/README.md
generated
vendored
Normal file
262
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/README.md
generated
vendored
Normal file
@@ -0,0 +1,262 @@
|
||||
Node.js: fs-extra
|
||||
=================
|
||||
|
||||
`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
|
||||
|
||||
[](https://www.npmjs.org/package/fs-extra)
|
||||
[](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
|
||||
[](https://github.com/jprichardson/node-fs-extra/actions/workflows/ci.yml?query=branch%3Amaster)
|
||||
[](https://www.npmjs.org/package/fs-extra)
|
||||
[](https://standardjs.com)
|
||||
|
||||
Why?
|
||||
----
|
||||
|
||||
I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
|
||||
|
||||
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
npm install fs-extra
|
||||
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
|
||||
|
||||
You don't ever need to include the original `fs` module again:
|
||||
|
||||
```js
|
||||
const fs = require('fs') // this is no longer necessary
|
||||
```
|
||||
|
||||
you can now do this:
|
||||
|
||||
```js
|
||||
const fs = require('fs-extra')
|
||||
```
|
||||
|
||||
or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
|
||||
to name your `fs` variable `fse` like so:
|
||||
|
||||
```js
|
||||
const fse = require('fs-extra')
|
||||
```
|
||||
|
||||
you can also keep both, but it's redundant:
|
||||
|
||||
```js
|
||||
const fs = require('fs')
|
||||
const fse = require('fs-extra')
|
||||
```
|
||||
|
||||
Sync vs Async vs Async/Await
|
||||
-------------
|
||||
Most methods are async by default. All async methods will return a promise if the callback isn't passed.
|
||||
|
||||
Sync methods on the other hand will throw if an error occurs.
|
||||
|
||||
Also Async/Await will throw an error if one occurs.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
const fs = require('fs-extra')
|
||||
|
||||
// Async with promises:
|
||||
fs.copy('/tmp/myfile', '/tmp/mynewfile')
|
||||
.then(() => console.log('success!'))
|
||||
.catch(err => console.error(err))
|
||||
|
||||
// Async with callbacks:
|
||||
fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
|
||||
if (err) return console.error(err)
|
||||
console.log('success!')
|
||||
})
|
||||
|
||||
// Sync:
|
||||
try {
|
||||
fs.copySync('/tmp/myfile', '/tmp/mynewfile')
|
||||
console.log('success!')
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
|
||||
// Async/Await:
|
||||
async function copyFiles () {
|
||||
try {
|
||||
await fs.copy('/tmp/myfile', '/tmp/mynewfile')
|
||||
console.log('success!')
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
|
||||
copyFiles()
|
||||
```
|
||||
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
### Async
|
||||
|
||||
- [copy](docs/copy.md)
|
||||
- [emptyDir](docs/emptyDir.md)
|
||||
- [ensureFile](docs/ensureFile.md)
|
||||
- [ensureDir](docs/ensureDir.md)
|
||||
- [ensureLink](docs/ensureLink.md)
|
||||
- [ensureSymlink](docs/ensureSymlink.md)
|
||||
- [mkdirp](docs/ensureDir.md)
|
||||
- [mkdirs](docs/ensureDir.md)
|
||||
- [move](docs/move.md)
|
||||
- [outputFile](docs/outputFile.md)
|
||||
- [outputJson](docs/outputJson.md)
|
||||
- [pathExists](docs/pathExists.md)
|
||||
- [readJson](docs/readJson.md)
|
||||
- [remove](docs/remove.md)
|
||||
- [writeJson](docs/writeJson.md)
|
||||
|
||||
### Sync
|
||||
|
||||
- [copySync](docs/copy-sync.md)
|
||||
- [emptyDirSync](docs/emptyDir-sync.md)
|
||||
- [ensureFileSync](docs/ensureFile-sync.md)
|
||||
- [ensureDirSync](docs/ensureDir-sync.md)
|
||||
- [ensureLinkSync](docs/ensureLink-sync.md)
|
||||
- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
|
||||
- [mkdirpSync](docs/ensureDir-sync.md)
|
||||
- [mkdirsSync](docs/ensureDir-sync.md)
|
||||
- [moveSync](docs/move-sync.md)
|
||||
- [outputFileSync](docs/outputFile-sync.md)
|
||||
- [outputJsonSync](docs/outputJson-sync.md)
|
||||
- [pathExistsSync](docs/pathExists-sync.md)
|
||||
- [readJsonSync](docs/readJson-sync.md)
|
||||
- [removeSync](docs/remove-sync.md)
|
||||
- [writeJsonSync](docs/writeJson-sync.md)
|
||||
|
||||
|
||||
**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()`, `fs.write()`, & `fs.writev()`](docs/fs-read-write-writev.md)
|
||||
|
||||
### What happened to `walk()` and `walkSync()`?
|
||||
|
||||
They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
|
||||
|
||||
|
||||
Third Party
|
||||
-----------
|
||||
|
||||
### CLI
|
||||
|
||||
[fse-cli](https://www.npmjs.com/package/@atao60/fse-cli) allows you to run `fs-extra` from a console or from [npm](https://www.npmjs.com) scripts.
|
||||
|
||||
### TypeScript
|
||||
|
||||
If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
|
||||
|
||||
|
||||
### File / Directory Watching
|
||||
|
||||
If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
|
||||
|
||||
### Obtain Filesystem (Devices, Partitions) Information
|
||||
|
||||
[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
|
||||
|
||||
### Misc.
|
||||
|
||||
- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
|
||||
- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
|
||||
|
||||
|
||||
|
||||
Hacking on fs-extra
|
||||
-------------------
|
||||
|
||||
Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
|
||||
uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
|
||||
you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
|
||||
|
||||
[](https://github.com/feross/standard)
|
||||
|
||||
What's needed?
|
||||
- First, take a look at existing issues. Those are probably going to be where the priority lies.
|
||||
- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
|
||||
- Improve test coverage.
|
||||
|
||||
Note: If you make any big changes, **you should definitely file an issue for discussion first.**
|
||||
|
||||
### Running the Test Suite
|
||||
|
||||
fs-extra contains hundreds of tests.
|
||||
|
||||
- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
|
||||
- `npm run unit`: runs the unit tests
|
||||
- `npm test`: runs both the linter and the tests
|
||||
|
||||
|
||||
### Windows
|
||||
|
||||
If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
|
||||
because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
|
||||
account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
|
||||
However, I didn't have much luck doing this.
|
||||
|
||||
Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
|
||||
I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
|
||||
|
||||
net use z: "\\vmware-host\Shared Folders"
|
||||
|
||||
I can then navigate to my `fs-extra` directory and run the tests.
|
||||
|
||||
|
||||
Naming
|
||||
------
|
||||
|
||||
I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
|
||||
|
||||
* https://github.com/jprichardson/node-fs-extra/issues/2
|
||||
* https://github.com/flatiron/utile/issues/11
|
||||
* https://github.com/ryanmcgrath/wrench-js/issues/29
|
||||
* https://github.com/substack/node-mkdirp/issues/17
|
||||
|
||||
First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
|
||||
|
||||
For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
|
||||
|
||||
We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
|
||||
|
||||
My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
|
||||
|
||||
So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
|
||||
|
||||
|
||||
Credit
|
||||
------
|
||||
|
||||
`fs-extra` wouldn't be possible without using the modules from the following authors:
|
||||
|
||||
- [Isaac Shlueter](https://github.com/isaacs)
|
||||
- [Charlie McConnel](https://github.com/avianflu)
|
||||
- [James Halliday](https://github.com/substack)
|
||||
- [Andrew Kelley](https://github.com/andrewrk)
|
||||
|
||||
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Licensed under MIT
|
||||
|
||||
Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
|
||||
|
||||
[1]: http://nodejs.org/docs/latest/api/fs.html
|
||||
|
||||
|
||||
[jsonfile]: https://github.com/jprichardson/node-jsonfile
|
||||
169
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/copy/copy-sync.js
generated
vendored
Normal file
169
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/copy/copy-sync.js
generated
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
const path = require('path')
|
||||
const mkdirsSync = require('../mkdirs').mkdirsSync
|
||||
const utimesMillisSync = require('../util/utimes').utimesMillisSync
|
||||
const stat = require('../util/stat')
|
||||
|
||||
function copySync (src, dest, opts) {
|
||||
if (typeof opts === 'function') {
|
||||
opts = { filter: opts }
|
||||
}
|
||||
|
||||
opts = opts || {}
|
||||
opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
|
||||
opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
|
||||
|
||||
// Warn about using preserveTimestamps on 32-bit node
|
||||
if (opts.preserveTimestamps && process.arch === 'ia32') {
|
||||
process.emitWarning(
|
||||
'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
|
||||
'\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
|
||||
'Warning', 'fs-extra-WARN0002'
|
||||
)
|
||||
}
|
||||
|
||||
const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
|
||||
stat.checkParentPathsSync(src, srcStat, dest, 'copy')
|
||||
return handleFilterAndCopy(destStat, src, dest, opts)
|
||||
}
|
||||
|
||||
function handleFilterAndCopy (destStat, src, dest, opts) {
|
||||
if (opts.filter && !opts.filter(src, dest)) return
|
||||
const destParent = path.dirname(dest)
|
||||
if (!fs.existsSync(destParent)) mkdirsSync(destParent)
|
||||
return getStats(destStat, src, dest, opts)
|
||||
}
|
||||
|
||||
function startCopy (destStat, src, dest, opts) {
|
||||
if (opts.filter && !opts.filter(src, dest)) return
|
||||
return getStats(destStat, src, dest, opts)
|
||||
}
|
||||
|
||||
function getStats (destStat, src, dest, opts) {
|
||||
const statSync = opts.dereference ? fs.statSync : fs.lstatSync
|
||||
const srcStat = statSync(src)
|
||||
|
||||
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
|
||||
else if (srcStat.isFile() ||
|
||||
srcStat.isCharacterDevice() ||
|
||||
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
|
||||
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
|
||||
else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
|
||||
else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
|
||||
throw new Error(`Unknown file: ${src}`)
|
||||
}
|
||||
|
||||
function onFile (srcStat, destStat, src, dest, opts) {
|
||||
if (!destStat) return copyFile(srcStat, src, dest, opts)
|
||||
return mayCopyFile(srcStat, src, dest, opts)
|
||||
}
|
||||
|
||||
function mayCopyFile (srcStat, src, dest, opts) {
|
||||
if (opts.overwrite) {
|
||||
fs.unlinkSync(dest)
|
||||
return copyFile(srcStat, src, dest, opts)
|
||||
} else if (opts.errorOnExist) {
|
||||
throw new Error(`'${dest}' already exists`)
|
||||
}
|
||||
}
|
||||
|
||||
function copyFile (srcStat, src, dest, opts) {
|
||||
fs.copyFileSync(src, dest)
|
||||
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
|
||||
return setDestMode(dest, srcStat.mode)
|
||||
}
|
||||
|
||||
function handleTimestamps (srcMode, src, dest) {
|
||||
// Make sure the file is writable before setting the timestamp
|
||||
// otherwise open fails with EPERM when invoked with 'r+'
|
||||
// (through utimes call)
|
||||
if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
|
||||
return setDestTimestamps(src, dest)
|
||||
}
|
||||
|
||||
function fileIsNotWritable (srcMode) {
|
||||
return (srcMode & 0o200) === 0
|
||||
}
|
||||
|
||||
function makeFileWritable (dest, srcMode) {
|
||||
return setDestMode(dest, srcMode | 0o200)
|
||||
}
|
||||
|
||||
function setDestMode (dest, srcMode) {
|
||||
return fs.chmodSync(dest, srcMode)
|
||||
}
|
||||
|
||||
function setDestTimestamps (src, dest) {
|
||||
// The initial srcStat.atime cannot be trusted
|
||||
// because it is modified by the read(2) system call
|
||||
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
|
||||
const updatedSrcStat = fs.statSync(src)
|
||||
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
|
||||
}
|
||||
|
||||
function onDir (srcStat, destStat, src, dest, opts) {
|
||||
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
|
||||
return copyDir(src, dest, opts)
|
||||
}
|
||||
|
||||
function mkDirAndCopy (srcMode, src, dest, opts) {
|
||||
fs.mkdirSync(dest)
|
||||
copyDir(src, dest, opts)
|
||||
return setDestMode(dest, srcMode)
|
||||
}
|
||||
|
||||
function copyDir (src, dest, opts) {
|
||||
fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
|
||||
}
|
||||
|
||||
function copyDirItem (item, src, dest, opts) {
|
||||
const srcItem = path.join(src, item)
|
||||
const destItem = path.join(dest, item)
|
||||
const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
|
||||
return startCopy(destStat, srcItem, destItem, opts)
|
||||
}
|
||||
|
||||
function onLink (destStat, src, dest, opts) {
|
||||
let resolvedSrc = fs.readlinkSync(src)
|
||||
if (opts.dereference) {
|
||||
resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
|
||||
}
|
||||
|
||||
if (!destStat) {
|
||||
return fs.symlinkSync(resolvedSrc, dest)
|
||||
} else {
|
||||
let resolvedDest
|
||||
try {
|
||||
resolvedDest = fs.readlinkSync(dest)
|
||||
} catch (err) {
|
||||
// dest exists and is a regular file or directory,
|
||||
// Windows may throw UNKNOWN error. If dest already exists,
|
||||
// fs throws error anyway, so no need to guard against it here.
|
||||
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
|
||||
throw err
|
||||
}
|
||||
if (opts.dereference) {
|
||||
resolvedDest = path.resolve(process.cwd(), resolvedDest)
|
||||
}
|
||||
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
||||
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
|
||||
}
|
||||
|
||||
// prevent copy if src is a subdir of dest since unlinking
|
||||
// dest in this case would result in removing src contents
|
||||
// and therefore a broken symlink would be created.
|
||||
if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
||||
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
|
||||
}
|
||||
return copyLink(resolvedSrc, dest)
|
||||
}
|
||||
}
|
||||
|
||||
function copyLink (resolvedSrc, dest) {
|
||||
fs.unlinkSync(dest)
|
||||
return fs.symlinkSync(resolvedSrc, dest)
|
||||
}
|
||||
|
||||
module.exports = copySync
|
||||
235
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/copy/copy.js
generated
vendored
Normal file
235
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/copy/copy.js
generated
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
const path = require('path')
|
||||
const mkdirs = require('../mkdirs').mkdirs
|
||||
const pathExists = require('../path-exists').pathExists
|
||||
const utimesMillis = require('../util/utimes').utimesMillis
|
||||
const stat = require('../util/stat')
|
||||
|
||||
function copy (src, dest, opts, cb) {
|
||||
if (typeof opts === 'function' && !cb) {
|
||||
cb = opts
|
||||
opts = {}
|
||||
} else if (typeof opts === 'function') {
|
||||
opts = { filter: opts }
|
||||
}
|
||||
|
||||
cb = cb || function () {}
|
||||
opts = opts || {}
|
||||
|
||||
opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
|
||||
opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
|
||||
|
||||
// Warn about using preserveTimestamps on 32-bit node
|
||||
if (opts.preserveTimestamps && process.arch === 'ia32') {
|
||||
process.emitWarning(
|
||||
'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
|
||||
'\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
|
||||
'Warning', 'fs-extra-WARN0001'
|
||||
)
|
||||
}
|
||||
|
||||
stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
|
||||
if (err) return cb(err)
|
||||
const { srcStat, destStat } = stats
|
||||
stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
|
||||
if (err) return cb(err)
|
||||
if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
|
||||
return checkParentDir(destStat, src, dest, opts, cb)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function checkParentDir (destStat, src, dest, opts, cb) {
|
||||
const destParent = path.dirname(dest)
|
||||
pathExists(destParent, (err, dirExists) => {
|
||||
if (err) return cb(err)
|
||||
if (dirExists) return getStats(destStat, src, dest, opts, cb)
|
||||
mkdirs(destParent, err => {
|
||||
if (err) return cb(err)
|
||||
return getStats(destStat, src, dest, opts, cb)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function handleFilter (onInclude, destStat, src, dest, opts, cb) {
|
||||
Promise.resolve(opts.filter(src, dest)).then(include => {
|
||||
if (include) return onInclude(destStat, src, dest, opts, cb)
|
||||
return cb()
|
||||
}, error => cb(error))
|
||||
}
|
||||
|
||||
function startCopy (destStat, src, dest, opts, cb) {
|
||||
if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
|
||||
return getStats(destStat, src, dest, opts, cb)
|
||||
}
|
||||
|
||||
function getStats (destStat, src, dest, opts, cb) {
|
||||
const stat = opts.dereference ? fs.stat : fs.lstat
|
||||
stat(src, (err, srcStat) => {
|
||||
if (err) return cb(err)
|
||||
|
||||
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
|
||||
else if (srcStat.isFile() ||
|
||||
srcStat.isCharacterDevice() ||
|
||||
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
|
||||
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
|
||||
else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
|
||||
else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
|
||||
return cb(new Error(`Unknown file: ${src}`))
|
||||
})
|
||||
}
|
||||
|
||||
function onFile (srcStat, destStat, src, dest, opts, cb) {
|
||||
if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
|
||||
return mayCopyFile(srcStat, src, dest, opts, cb)
|
||||
}
|
||||
|
||||
function mayCopyFile (srcStat, src, dest, opts, cb) {
|
||||
if (opts.overwrite) {
|
||||
fs.unlink(dest, err => {
|
||||
if (err) return cb(err)
|
||||
return copyFile(srcStat, src, dest, opts, cb)
|
||||
})
|
||||
} else if (opts.errorOnExist) {
|
||||
return cb(new Error(`'${dest}' already exists`))
|
||||
} else return cb()
|
||||
}
|
||||
|
||||
function copyFile (srcStat, src, dest, opts, cb) {
|
||||
fs.copyFile(src, dest, err => {
|
||||
if (err) return cb(err)
|
||||
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
|
||||
return setDestMode(dest, srcStat.mode, cb)
|
||||
})
|
||||
}
|
||||
|
||||
function handleTimestampsAndMode (srcMode, src, dest, cb) {
|
||||
// Make sure the file is writable before setting the timestamp
|
||||
// otherwise open fails with EPERM when invoked with 'r+'
|
||||
// (through utimes call)
|
||||
if (fileIsNotWritable(srcMode)) {
|
||||
return makeFileWritable(dest, srcMode, err => {
|
||||
if (err) return cb(err)
|
||||
return setDestTimestampsAndMode(srcMode, src, dest, cb)
|
||||
})
|
||||
}
|
||||
return setDestTimestampsAndMode(srcMode, src, dest, cb)
|
||||
}
|
||||
|
||||
function fileIsNotWritable (srcMode) {
|
||||
return (srcMode & 0o200) === 0
|
||||
}
|
||||
|
||||
function makeFileWritable (dest, srcMode, cb) {
|
||||
return setDestMode(dest, srcMode | 0o200, cb)
|
||||
}
|
||||
|
||||
function setDestTimestampsAndMode (srcMode, src, dest, cb) {
|
||||
setDestTimestamps(src, dest, err => {
|
||||
if (err) return cb(err)
|
||||
return setDestMode(dest, srcMode, cb)
|
||||
})
|
||||
}
|
||||
|
||||
function setDestMode (dest, srcMode, cb) {
|
||||
return fs.chmod(dest, srcMode, cb)
|
||||
}
|
||||
|
||||
function setDestTimestamps (src, dest, cb) {
|
||||
// The initial srcStat.atime cannot be trusted
|
||||
// because it is modified by the read(2) system call
|
||||
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
|
||||
fs.stat(src, (err, updatedSrcStat) => {
|
||||
if (err) return cb(err)
|
||||
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
|
||||
})
|
||||
}
|
||||
|
||||
function onDir (srcStat, destStat, src, dest, opts, cb) {
|
||||
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
|
||||
return copyDir(src, dest, opts, cb)
|
||||
}
|
||||
|
||||
function mkDirAndCopy (srcMode, src, dest, opts, cb) {
|
||||
fs.mkdir(dest, err => {
|
||||
if (err) return cb(err)
|
||||
copyDir(src, dest, opts, err => {
|
||||
if (err) return cb(err)
|
||||
return setDestMode(dest, srcMode, cb)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function copyDir (src, dest, opts, cb) {
|
||||
fs.readdir(src, (err, items) => {
|
||||
if (err) return cb(err)
|
||||
return copyDirItems(items, src, dest, opts, cb)
|
||||
})
|
||||
}
|
||||
|
||||
function copyDirItems (items, src, dest, opts, cb) {
|
||||
const item = items.pop()
|
||||
if (!item) return cb()
|
||||
return copyDirItem(items, item, src, dest, opts, cb)
|
||||
}
|
||||
|
||||
function copyDirItem (items, item, src, dest, opts, cb) {
|
||||
const srcItem = path.join(src, item)
|
||||
const destItem = path.join(dest, item)
|
||||
stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
|
||||
if (err) return cb(err)
|
||||
const { destStat } = stats
|
||||
startCopy(destStat, srcItem, destItem, opts, err => {
|
||||
if (err) return cb(err)
|
||||
return copyDirItems(items, src, dest, opts, cb)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function onLink (destStat, src, dest, opts, cb) {
|
||||
fs.readlink(src, (err, resolvedSrc) => {
|
||||
if (err) return cb(err)
|
||||
if (opts.dereference) {
|
||||
resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
|
||||
}
|
||||
|
||||
if (!destStat) {
|
||||
return fs.symlink(resolvedSrc, dest, cb)
|
||||
} else {
|
||||
fs.readlink(dest, (err, resolvedDest) => {
|
||||
if (err) {
|
||||
// dest exists and is a regular file or directory,
|
||||
// Windows may throw UNKNOWN error. If dest already exists,
|
||||
// fs throws error anyway, so no need to guard against it here.
|
||||
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
|
||||
return cb(err)
|
||||
}
|
||||
if (opts.dereference) {
|
||||
resolvedDest = path.resolve(process.cwd(), resolvedDest)
|
||||
}
|
||||
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
||||
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
|
||||
}
|
||||
|
||||
// do not copy if src is a subdir of dest since unlinking
|
||||
// dest in this case would result in removing src contents
|
||||
// and therefore a broken symlink would be created.
|
||||
if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
||||
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
|
||||
}
|
||||
return copyLink(resolvedSrc, dest, cb)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function copyLink (resolvedSrc, dest, cb) {
|
||||
fs.unlink(dest, err => {
|
||||
if (err) return cb(err)
|
||||
return fs.symlink(resolvedSrc, dest, cb)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = copy
|
||||
7
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/copy/index.js
generated
vendored
Normal file
7
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/copy/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromCallback
|
||||
module.exports = {
|
||||
copy: u(require('./copy')),
|
||||
copySync: require('./copy-sync')
|
||||
}
|
||||
39
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/empty/index.js
generated
vendored
Normal file
39
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/empty/index.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromPromise
|
||||
const fs = require('../fs')
|
||||
const path = require('path')
|
||||
const mkdir = require('../mkdirs')
|
||||
const remove = require('../remove')
|
||||
|
||||
const emptyDir = u(async function emptyDir (dir) {
|
||||
let items
|
||||
try {
|
||||
items = await fs.readdir(dir)
|
||||
} catch {
|
||||
return mkdir.mkdirs(dir)
|
||||
}
|
||||
|
||||
return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
|
||||
})
|
||||
|
||||
function emptyDirSync (dir) {
|
||||
let items
|
||||
try {
|
||||
items = fs.readdirSync(dir)
|
||||
} catch {
|
||||
return mkdir.mkdirsSync(dir)
|
||||
}
|
||||
|
||||
items.forEach(item => {
|
||||
item = path.join(dir, item)
|
||||
remove.removeSync(item)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
emptyDirSync,
|
||||
emptydirSync: emptyDirSync,
|
||||
emptyDir,
|
||||
emptydir: emptyDir
|
||||
}
|
||||
69
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/file.js
generated
vendored
Normal file
69
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/file.js
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromCallback
|
||||
const path = require('path')
|
||||
const fs = require('graceful-fs')
|
||||
const mkdir = require('../mkdirs')
|
||||
|
||||
function createFile (file, callback) {
|
||||
function makeFile () {
|
||||
fs.writeFile(file, '', err => {
|
||||
if (err) return callback(err)
|
||||
callback()
|
||||
})
|
||||
}
|
||||
|
||||
fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
|
||||
if (!err && stats.isFile()) return callback()
|
||||
const dir = path.dirname(file)
|
||||
fs.stat(dir, (err, stats) => {
|
||||
if (err) {
|
||||
// if the directory doesn't exist, make it
|
||||
if (err.code === 'ENOENT') {
|
||||
return mkdir.mkdirs(dir, err => {
|
||||
if (err) return callback(err)
|
||||
makeFile()
|
||||
})
|
||||
}
|
||||
return callback(err)
|
||||
}
|
||||
|
||||
if (stats.isDirectory()) makeFile()
|
||||
else {
|
||||
// parent is not a directory
|
||||
// This is just to cause an internal ENOTDIR error to be thrown
|
||||
fs.readdir(dir, err => {
|
||||
if (err) return callback(err)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function createFileSync (file) {
|
||||
let stats
|
||||
try {
|
||||
stats = fs.statSync(file)
|
||||
} catch {}
|
||||
if (stats && stats.isFile()) return
|
||||
|
||||
const dir = path.dirname(file)
|
||||
try {
|
||||
if (!fs.statSync(dir).isDirectory()) {
|
||||
// parent is not a directory
|
||||
// This is just to cause an internal ENOTDIR error to be thrown
|
||||
fs.readdirSync(dir)
|
||||
}
|
||||
} catch (err) {
|
||||
// If the stat call above failed because the directory doesn't exist, create it
|
||||
if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
|
||||
else throw err
|
||||
}
|
||||
|
||||
fs.writeFileSync(file, '')
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
createFile: u(createFile),
|
||||
createFileSync
|
||||
}
|
||||
23
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/index.js
generated
vendored
Normal file
23
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/index.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
'use strict'
|
||||
|
||||
const { createFile, createFileSync } = require('./file')
|
||||
const { createLink, createLinkSync } = require('./link')
|
||||
const { createSymlink, createSymlinkSync } = require('./symlink')
|
||||
|
||||
module.exports = {
|
||||
// file
|
||||
createFile,
|
||||
createFileSync,
|
||||
ensureFile: createFile,
|
||||
ensureFileSync: createFileSync,
|
||||
// link
|
||||
createLink,
|
||||
createLinkSync,
|
||||
ensureLink: createLink,
|
||||
ensureLinkSync: createLinkSync,
|
||||
// symlink
|
||||
createSymlink,
|
||||
createSymlinkSync,
|
||||
ensureSymlink: createSymlink,
|
||||
ensureSymlinkSync: createSymlinkSync
|
||||
}
|
||||
64
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/link.js
generated
vendored
Normal file
64
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/link.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromCallback
|
||||
const path = require('path')
|
||||
const fs = require('graceful-fs')
|
||||
const mkdir = require('../mkdirs')
|
||||
const pathExists = require('../path-exists').pathExists
|
||||
const { areIdentical } = require('../util/stat')
|
||||
|
||||
function createLink (srcpath, dstpath, callback) {
|
||||
function makeLink (srcpath, dstpath) {
|
||||
fs.link(srcpath, dstpath, err => {
|
||||
if (err) return callback(err)
|
||||
callback(null)
|
||||
})
|
||||
}
|
||||
|
||||
fs.lstat(dstpath, (_, dstStat) => {
|
||||
fs.lstat(srcpath, (err, srcStat) => {
|
||||
if (err) {
|
||||
err.message = err.message.replace('lstat', 'ensureLink')
|
||||
return callback(err)
|
||||
}
|
||||
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
|
||||
|
||||
const dir = path.dirname(dstpath)
|
||||
pathExists(dir, (err, dirExists) => {
|
||||
if (err) return callback(err)
|
||||
if (dirExists) return makeLink(srcpath, dstpath)
|
||||
mkdir.mkdirs(dir, err => {
|
||||
if (err) return callback(err)
|
||||
makeLink(srcpath, dstpath)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function createLinkSync (srcpath, dstpath) {
|
||||
let dstStat
|
||||
try {
|
||||
dstStat = fs.lstatSync(dstpath)
|
||||
} catch {}
|
||||
|
||||
try {
|
||||
const srcStat = fs.lstatSync(srcpath)
|
||||
if (dstStat && areIdentical(srcStat, dstStat)) return
|
||||
} catch (err) {
|
||||
err.message = err.message.replace('lstat', 'ensureLink')
|
||||
throw err
|
||||
}
|
||||
|
||||
const dir = path.dirname(dstpath)
|
||||
const dirExists = fs.existsSync(dir)
|
||||
if (dirExists) return fs.linkSync(srcpath, dstpath)
|
||||
mkdir.mkdirsSync(dir)
|
||||
|
||||
return fs.linkSync(srcpath, dstpath)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
createLink: u(createLink),
|
||||
createLinkSync
|
||||
}
|
||||
99
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/symlink-paths.js
generated
vendored
Normal file
99
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/symlink-paths.js
generated
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const fs = require('graceful-fs')
|
||||
const pathExists = require('../path-exists').pathExists
|
||||
|
||||
/**
|
||||
* Function that returns two types of paths, one relative to symlink, and one
|
||||
* relative to the current working directory. Checks if path is absolute or
|
||||
* relative. If the path is relative, this function checks if the path is
|
||||
* relative to symlink or relative to current working directory. This is an
|
||||
* initiative to find a smarter `srcpath` to supply when building symlinks.
|
||||
* This allows you to determine which path to use out of one of three possible
|
||||
* types of source paths. The first is an absolute path. This is detected by
|
||||
* `path.isAbsolute()`. When an absolute path is provided, it is checked to
|
||||
* see if it exists. If it does it's used, if not an error is returned
|
||||
* (callback)/ thrown (sync). The other two options for `srcpath` are a
|
||||
* relative url. By default Node's `fs.symlink` works by creating a symlink
|
||||
* using `dstpath` and expects the `srcpath` to be relative to the newly
|
||||
* created symlink. If you provide a `srcpath` that does not exist on the file
|
||||
* system it results in a broken symlink. To minimize this, the function
|
||||
* checks to see if the 'relative to symlink' source file exists, and if it
|
||||
* does it will use it. If it does not, it checks if there's a file that
|
||||
* exists that is relative to the current working directory, if does its used.
|
||||
* This preserves the expectations of the original fs.symlink spec and adds
|
||||
* the ability to pass in `relative to current working direcotry` paths.
|
||||
*/
|
||||
|
||||
function symlinkPaths (srcpath, dstpath, callback) {
|
||||
if (path.isAbsolute(srcpath)) {
|
||||
return fs.lstat(srcpath, (err) => {
|
||||
if (err) {
|
||||
err.message = err.message.replace('lstat', 'ensureSymlink')
|
||||
return callback(err)
|
||||
}
|
||||
return callback(null, {
|
||||
toCwd: srcpath,
|
||||
toDst: srcpath
|
||||
})
|
||||
})
|
||||
} else {
|
||||
const dstdir = path.dirname(dstpath)
|
||||
const relativeToDst = path.join(dstdir, srcpath)
|
||||
return pathExists(relativeToDst, (err, exists) => {
|
||||
if (err) return callback(err)
|
||||
if (exists) {
|
||||
return callback(null, {
|
||||
toCwd: relativeToDst,
|
||||
toDst: srcpath
|
||||
})
|
||||
} else {
|
||||
return fs.lstat(srcpath, (err) => {
|
||||
if (err) {
|
||||
err.message = err.message.replace('lstat', 'ensureSymlink')
|
||||
return callback(err)
|
||||
}
|
||||
return callback(null, {
|
||||
toCwd: srcpath,
|
||||
toDst: path.relative(dstdir, srcpath)
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function symlinkPathsSync (srcpath, dstpath) {
|
||||
let exists
|
||||
if (path.isAbsolute(srcpath)) {
|
||||
exists = fs.existsSync(srcpath)
|
||||
if (!exists) throw new Error('absolute srcpath does not exist')
|
||||
return {
|
||||
toCwd: srcpath,
|
||||
toDst: srcpath
|
||||
}
|
||||
} else {
|
||||
const dstdir = path.dirname(dstpath)
|
||||
const relativeToDst = path.join(dstdir, srcpath)
|
||||
exists = fs.existsSync(relativeToDst)
|
||||
if (exists) {
|
||||
return {
|
||||
toCwd: relativeToDst,
|
||||
toDst: srcpath
|
||||
}
|
||||
} else {
|
||||
exists = fs.existsSync(srcpath)
|
||||
if (!exists) throw new Error('relative srcpath does not exist')
|
||||
return {
|
||||
toCwd: srcpath,
|
||||
toDst: path.relative(dstdir, srcpath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
symlinkPaths,
|
||||
symlinkPathsSync
|
||||
}
|
||||
31
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/symlink-type.js
generated
vendored
Normal file
31
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/symlink-type.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
|
||||
function symlinkType (srcpath, type, callback) {
|
||||
callback = (typeof type === 'function') ? type : callback
|
||||
type = (typeof type === 'function') ? false : type
|
||||
if (type) return callback(null, type)
|
||||
fs.lstat(srcpath, (err, stats) => {
|
||||
if (err) return callback(null, 'file')
|
||||
type = (stats && stats.isDirectory()) ? 'dir' : 'file'
|
||||
callback(null, type)
|
||||
})
|
||||
}
|
||||
|
||||
function symlinkTypeSync (srcpath, type) {
|
||||
let stats
|
||||
|
||||
if (type) return type
|
||||
try {
|
||||
stats = fs.lstatSync(srcpath)
|
||||
} catch {
|
||||
return 'file'
|
||||
}
|
||||
return (stats && stats.isDirectory()) ? 'dir' : 'file'
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
symlinkType,
|
||||
symlinkTypeSync
|
||||
}
|
||||
82
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/symlink.js
generated
vendored
Normal file
82
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/ensure/symlink.js
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromCallback
|
||||
const path = require('path')
|
||||
const fs = require('../fs')
|
||||
const _mkdirs = require('../mkdirs')
|
||||
const mkdirs = _mkdirs.mkdirs
|
||||
const mkdirsSync = _mkdirs.mkdirsSync
|
||||
|
||||
const _symlinkPaths = require('./symlink-paths')
|
||||
const symlinkPaths = _symlinkPaths.symlinkPaths
|
||||
const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
|
||||
|
||||
const _symlinkType = require('./symlink-type')
|
||||
const symlinkType = _symlinkType.symlinkType
|
||||
const symlinkTypeSync = _symlinkType.symlinkTypeSync
|
||||
|
||||
const pathExists = require('../path-exists').pathExists
|
||||
|
||||
const { areIdentical } = require('../util/stat')
|
||||
|
||||
function createSymlink (srcpath, dstpath, type, callback) {
|
||||
callback = (typeof type === 'function') ? type : callback
|
||||
type = (typeof type === 'function') ? false : type
|
||||
|
||||
fs.lstat(dstpath, (err, stats) => {
|
||||
if (!err && stats.isSymbolicLink()) {
|
||||
Promise.all([
|
||||
fs.stat(srcpath),
|
||||
fs.stat(dstpath)
|
||||
]).then(([srcStat, dstStat]) => {
|
||||
if (areIdentical(srcStat, dstStat)) return callback(null)
|
||||
_createSymlink(srcpath, dstpath, type, callback)
|
||||
})
|
||||
} else _createSymlink(srcpath, dstpath, type, callback)
|
||||
})
|
||||
}
|
||||
|
||||
function _createSymlink (srcpath, dstpath, type, callback) {
|
||||
symlinkPaths(srcpath, dstpath, (err, relative) => {
|
||||
if (err) return callback(err)
|
||||
srcpath = relative.toDst
|
||||
symlinkType(relative.toCwd, type, (err, type) => {
|
||||
if (err) return callback(err)
|
||||
const dir = path.dirname(dstpath)
|
||||
pathExists(dir, (err, dirExists) => {
|
||||
if (err) return callback(err)
|
||||
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
|
||||
mkdirs(dir, err => {
|
||||
if (err) return callback(err)
|
||||
fs.symlink(srcpath, dstpath, type, callback)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function createSymlinkSync (srcpath, dstpath, type) {
|
||||
let stats
|
||||
try {
|
||||
stats = fs.lstatSync(dstpath)
|
||||
} catch {}
|
||||
if (stats && stats.isSymbolicLink()) {
|
||||
const srcStat = fs.statSync(srcpath)
|
||||
const dstStat = fs.statSync(dstpath)
|
||||
if (areIdentical(srcStat, dstStat)) return
|
||||
}
|
||||
|
||||
const relative = symlinkPathsSync(srcpath, dstpath)
|
||||
srcpath = relative.toDst
|
||||
type = symlinkTypeSync(relative.toCwd, type)
|
||||
const dir = path.dirname(dstpath)
|
||||
const exists = fs.existsSync(dir)
|
||||
if (exists) return fs.symlinkSync(srcpath, dstpath, type)
|
||||
mkdirsSync(dir)
|
||||
return fs.symlinkSync(srcpath, dstpath, type)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
createSymlink: u(createSymlink),
|
||||
createSymlinkSync
|
||||
}
|
||||
128
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/fs/index.js
generated
vendored
Normal file
128
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/fs/index.js
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
'use strict'
|
||||
// This is adapted from https://github.com/normalize/mz
|
||||
// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
|
||||
const u = require('universalify').fromCallback
|
||||
const fs = require('graceful-fs')
|
||||
|
||||
const api = [
|
||||
'access',
|
||||
'appendFile',
|
||||
'chmod',
|
||||
'chown',
|
||||
'close',
|
||||
'copyFile',
|
||||
'fchmod',
|
||||
'fchown',
|
||||
'fdatasync',
|
||||
'fstat',
|
||||
'fsync',
|
||||
'ftruncate',
|
||||
'futimes',
|
||||
'lchmod',
|
||||
'lchown',
|
||||
'link',
|
||||
'lstat',
|
||||
'mkdir',
|
||||
'mkdtemp',
|
||||
'open',
|
||||
'opendir',
|
||||
'readdir',
|
||||
'readFile',
|
||||
'readlink',
|
||||
'realpath',
|
||||
'rename',
|
||||
'rm',
|
||||
'rmdir',
|
||||
'stat',
|
||||
'symlink',
|
||||
'truncate',
|
||||
'unlink',
|
||||
'utimes',
|
||||
'writeFile'
|
||||
].filter(key => {
|
||||
// Some commands are not available on some systems. Ex:
|
||||
// fs.opendir was added in Node.js v12.12.0
|
||||
// fs.rm was added in Node.js v14.14.0
|
||||
// fs.lchown is not available on at least some Linux
|
||||
return typeof fs[key] === 'function'
|
||||
})
|
||||
|
||||
// Export cloned fs:
|
||||
Object.assign(exports, fs)
|
||||
|
||||
// Universalify async methods:
|
||||
api.forEach(method => {
|
||||
exports[method] = u(fs[method])
|
||||
})
|
||||
|
||||
// We differ from mz/fs in that we still ship the old, broken, fs.exists()
|
||||
// since we are a drop-in replacement for the native module
|
||||
exports.exists = function (filename, callback) {
|
||||
if (typeof callback === 'function') {
|
||||
return fs.exists(filename, callback)
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
return fs.exists(filename, resolve)
|
||||
})
|
||||
}
|
||||
|
||||
// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args
|
||||
|
||||
exports.read = function (fd, buffer, offset, length, position, callback) {
|
||||
if (typeof callback === 'function') {
|
||||
return fs.read(fd, buffer, offset, length, position, callback)
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
|
||||
if (err) return reject(err)
|
||||
resolve({ bytesRead, buffer })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Function signature can be
|
||||
// fs.write(fd, buffer[, offset[, length[, position]]], callback)
|
||||
// OR
|
||||
// fs.write(fd, string[, position[, encoding]], callback)
|
||||
// We need to handle both cases, so we use ...args
|
||||
exports.write = function (fd, buffer, ...args) {
|
||||
if (typeof args[args.length - 1] === 'function') {
|
||||
return fs.write(fd, buffer, ...args)
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
|
||||
if (err) return reject(err)
|
||||
resolve({ bytesWritten, buffer })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// fs.writev only available in Node v12.9.0+
|
||||
if (typeof fs.writev === 'function') {
|
||||
// Function signature is
|
||||
// s.writev(fd, buffers[, position], callback)
|
||||
// We need to handle the optional arg, so we use ...args
|
||||
exports.writev = function (fd, buffers, ...args) {
|
||||
if (typeof args[args.length - 1] === 'function') {
|
||||
return fs.writev(fd, buffers, ...args)
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
|
||||
if (err) return reject(err)
|
||||
resolve({ bytesWritten, buffers })
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// fs.realpath.native sometimes not available if fs is monkey-patched
|
||||
if (typeof fs.realpath.native === 'function') {
|
||||
exports.realpath.native = u(fs.realpath.native)
|
||||
} else {
|
||||
process.emitWarning(
|
||||
'fs.realpath.native is not a function. Is fs being monkey-patched?',
|
||||
'Warning', 'fs-extra-WARN0003'
|
||||
)
|
||||
}
|
||||
16
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/index.js
generated
vendored
Normal file
16
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = {
|
||||
// Export promiseified graceful-fs:
|
||||
...require('./fs'),
|
||||
// Export extra methods:
|
||||
...require('./copy'),
|
||||
...require('./empty'),
|
||||
...require('./ensure'),
|
||||
...require('./json'),
|
||||
...require('./mkdirs'),
|
||||
...require('./move'),
|
||||
...require('./output-file'),
|
||||
...require('./path-exists'),
|
||||
...require('./remove')
|
||||
}
|
||||
16
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/json/index.js
generated
vendored
Normal file
16
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/json/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromPromise
|
||||
const jsonFile = require('./jsonfile')
|
||||
|
||||
jsonFile.outputJson = u(require('./output-json'))
|
||||
jsonFile.outputJsonSync = require('./output-json-sync')
|
||||
// aliases
|
||||
jsonFile.outputJSON = jsonFile.outputJson
|
||||
jsonFile.outputJSONSync = jsonFile.outputJsonSync
|
||||
jsonFile.writeJSON = jsonFile.writeJson
|
||||
jsonFile.writeJSONSync = jsonFile.writeJsonSync
|
||||
jsonFile.readJSON = jsonFile.readJson
|
||||
jsonFile.readJSONSync = jsonFile.readJsonSync
|
||||
|
||||
module.exports = jsonFile
|
||||
11
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/json/jsonfile.js
generated
vendored
Normal file
11
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/json/jsonfile.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
'use strict'
|
||||
|
||||
const jsonFile = require('jsonfile')
|
||||
|
||||
module.exports = {
|
||||
// jsonfile exports
|
||||
readJson: jsonFile.readFile,
|
||||
readJsonSync: jsonFile.readFileSync,
|
||||
writeJson: jsonFile.writeFile,
|
||||
writeJsonSync: jsonFile.writeFileSync
|
||||
}
|
||||
12
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/json/output-json-sync.js
generated
vendored
Normal file
12
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/json/output-json-sync.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict'
|
||||
|
||||
const { stringify } = require('jsonfile/utils')
|
||||
const { outputFileSync } = require('../output-file')
|
||||
|
||||
function outputJsonSync (file, data, options) {
|
||||
const str = stringify(data, options)
|
||||
|
||||
outputFileSync(file, str, options)
|
||||
}
|
||||
|
||||
module.exports = outputJsonSync
|
||||
12
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/json/output-json.js
generated
vendored
Normal file
12
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/json/output-json.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict'
|
||||
|
||||
const { stringify } = require('jsonfile/utils')
|
||||
const { outputFile } = require('../output-file')
|
||||
|
||||
async function outputJson (file, data, options = {}) {
|
||||
const str = stringify(data, options)
|
||||
|
||||
await outputFile(file, str, options)
|
||||
}
|
||||
|
||||
module.exports = outputJson
|
||||
14
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/mkdirs/index.js
generated
vendored
Normal file
14
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/mkdirs/index.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict'
|
||||
const u = require('universalify').fromPromise
|
||||
const { makeDir: _makeDir, makeDirSync } = require('./make-dir')
|
||||
const makeDir = u(_makeDir)
|
||||
|
||||
module.exports = {
|
||||
mkdirs: makeDir,
|
||||
mkdirsSync: makeDirSync,
|
||||
// alias
|
||||
mkdirp: makeDir,
|
||||
mkdirpSync: makeDirSync,
|
||||
ensureDir: makeDir,
|
||||
ensureDirSync: makeDirSync
|
||||
}
|
||||
27
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/mkdirs/make-dir.js
generated
vendored
Normal file
27
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/mkdirs/make-dir.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
'use strict'
|
||||
const fs = require('../fs')
|
||||
const { checkPath } = require('./utils')
|
||||
|
||||
const getMode = options => {
|
||||
const defaults = { mode: 0o777 }
|
||||
if (typeof options === 'number') return options
|
||||
return ({ ...defaults, ...options }).mode
|
||||
}
|
||||
|
||||
module.exports.makeDir = async (dir, options) => {
|
||||
checkPath(dir)
|
||||
|
||||
return fs.mkdir(dir, {
|
||||
mode: getMode(options),
|
||||
recursive: true
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.makeDirSync = (dir, options) => {
|
||||
checkPath(dir)
|
||||
|
||||
return fs.mkdirSync(dir, {
|
||||
mode: getMode(options),
|
||||
recursive: true
|
||||
})
|
||||
}
|
||||
21
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/mkdirs/utils.js
generated
vendored
Normal file
21
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/mkdirs/utils.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// Adapted from https://github.com/sindresorhus/make-dir
|
||||
// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
|
||||
// https://github.com/nodejs/node/issues/8987
|
||||
// https://github.com/libuv/libuv/pull/1088
|
||||
module.exports.checkPath = function checkPath (pth) {
|
||||
if (process.platform === 'win32') {
|
||||
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
|
||||
|
||||
if (pathHasInvalidWinCharacters) {
|
||||
const error = new Error(`Path contains invalid characters: ${pth}`)
|
||||
error.code = 'EINVAL'
|
||||
throw error
|
||||
}
|
||||
}
|
||||
}
|
||||
7
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/move/index.js
generated
vendored
Normal file
7
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/move/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromCallback
|
||||
module.exports = {
|
||||
move: u(require('./move')),
|
||||
moveSync: require('./move-sync')
|
||||
}
|
||||
54
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/move/move-sync.js
generated
vendored
Normal file
54
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/move/move-sync.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
const path = require('path')
|
||||
const copySync = require('../copy').copySync
|
||||
const removeSync = require('../remove').removeSync
|
||||
const mkdirpSync = require('../mkdirs').mkdirpSync
|
||||
const stat = require('../util/stat')
|
||||
|
||||
function moveSync (src, dest, opts) {
|
||||
opts = opts || {}
|
||||
const overwrite = opts.overwrite || opts.clobber || false
|
||||
|
||||
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts)
|
||||
stat.checkParentPathsSync(src, srcStat, dest, 'move')
|
||||
if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest))
|
||||
return doRename(src, dest, overwrite, isChangingCase)
|
||||
}
|
||||
|
||||
function isParentRoot (dest) {
|
||||
const parent = path.dirname(dest)
|
||||
const parsedPath = path.parse(parent)
|
||||
return parsedPath.root === parent
|
||||
}
|
||||
|
||||
function doRename (src, dest, overwrite, isChangingCase) {
|
||||
if (isChangingCase) return rename(src, dest, overwrite)
|
||||
if (overwrite) {
|
||||
removeSync(dest)
|
||||
return rename(src, dest, overwrite)
|
||||
}
|
||||
if (fs.existsSync(dest)) throw new Error('dest already exists.')
|
||||
return rename(src, dest, overwrite)
|
||||
}
|
||||
|
||||
function rename (src, dest, overwrite) {
|
||||
try {
|
||||
fs.renameSync(src, dest)
|
||||
} catch (err) {
|
||||
if (err.code !== 'EXDEV') throw err
|
||||
return moveAcrossDevice(src, dest, overwrite)
|
||||
}
|
||||
}
|
||||
|
||||
function moveAcrossDevice (src, dest, overwrite) {
|
||||
const opts = {
|
||||
overwrite,
|
||||
errorOnExist: true
|
||||
}
|
||||
copySync(src, dest, opts)
|
||||
return removeSync(src)
|
||||
}
|
||||
|
||||
module.exports = moveSync
|
||||
75
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/move/move.js
generated
vendored
Normal file
75
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/move/move.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
const path = require('path')
|
||||
const copy = require('../copy').copy
|
||||
const remove = require('../remove').remove
|
||||
const mkdirp = require('../mkdirs').mkdirp
|
||||
const pathExists = require('../path-exists').pathExists
|
||||
const stat = require('../util/stat')
|
||||
|
||||
function move (src, dest, opts, cb) {
|
||||
if (typeof opts === 'function') {
|
||||
cb = opts
|
||||
opts = {}
|
||||
}
|
||||
|
||||
opts = opts || {}
|
||||
|
||||
const overwrite = opts.overwrite || opts.clobber || false
|
||||
|
||||
stat.checkPaths(src, dest, 'move', opts, (err, stats) => {
|
||||
if (err) return cb(err)
|
||||
const { srcStat, isChangingCase = false } = stats
|
||||
stat.checkParentPaths(src, srcStat, dest, 'move', err => {
|
||||
if (err) return cb(err)
|
||||
if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb)
|
||||
mkdirp(path.dirname(dest), err => {
|
||||
if (err) return cb(err)
|
||||
return doRename(src, dest, overwrite, isChangingCase, cb)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function isParentRoot (dest) {
|
||||
const parent = path.dirname(dest)
|
||||
const parsedPath = path.parse(parent)
|
||||
return parsedPath.root === parent
|
||||
}
|
||||
|
||||
function doRename (src, dest, overwrite, isChangingCase, cb) {
|
||||
if (isChangingCase) return rename(src, dest, overwrite, cb)
|
||||
if (overwrite) {
|
||||
return remove(dest, err => {
|
||||
if (err) return cb(err)
|
||||
return rename(src, dest, overwrite, cb)
|
||||
})
|
||||
}
|
||||
pathExists(dest, (err, destExists) => {
|
||||
if (err) return cb(err)
|
||||
if (destExists) return cb(new Error('dest already exists.'))
|
||||
return rename(src, dest, overwrite, cb)
|
||||
})
|
||||
}
|
||||
|
||||
function rename (src, dest, overwrite, cb) {
|
||||
fs.rename(src, dest, err => {
|
||||
if (!err) return cb()
|
||||
if (err.code !== 'EXDEV') return cb(err)
|
||||
return moveAcrossDevice(src, dest, overwrite, cb)
|
||||
})
|
||||
}
|
||||
|
||||
function moveAcrossDevice (src, dest, overwrite, cb) {
|
||||
const opts = {
|
||||
overwrite,
|
||||
errorOnExist: true
|
||||
}
|
||||
copy(src, dest, opts, err => {
|
||||
if (err) return cb(err)
|
||||
return remove(src, cb)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = move
|
||||
40
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/output-file/index.js
generated
vendored
Normal file
40
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/output-file/index.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromCallback
|
||||
const fs = require('graceful-fs')
|
||||
const path = require('path')
|
||||
const mkdir = require('../mkdirs')
|
||||
const pathExists = require('../path-exists').pathExists
|
||||
|
||||
function outputFile (file, data, encoding, callback) {
|
||||
if (typeof encoding === 'function') {
|
||||
callback = encoding
|
||||
encoding = 'utf8'
|
||||
}
|
||||
|
||||
const dir = path.dirname(file)
|
||||
pathExists(dir, (err, itDoes) => {
|
||||
if (err) return callback(err)
|
||||
if (itDoes) return fs.writeFile(file, data, encoding, callback)
|
||||
|
||||
mkdir.mkdirs(dir, err => {
|
||||
if (err) return callback(err)
|
||||
|
||||
fs.writeFile(file, data, encoding, callback)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function outputFileSync (file, ...args) {
|
||||
const dir = path.dirname(file)
|
||||
if (fs.existsSync(dir)) {
|
||||
return fs.writeFileSync(file, ...args)
|
||||
}
|
||||
mkdir.mkdirsSync(dir)
|
||||
fs.writeFileSync(file, ...args)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
outputFile: u(outputFile),
|
||||
outputFileSync
|
||||
}
|
||||
12
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/path-exists/index.js
generated
vendored
Normal file
12
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/path-exists/index.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict'
|
||||
const u = require('universalify').fromPromise
|
||||
const fs = require('../fs')
|
||||
|
||||
function pathExists (path) {
|
||||
return fs.access(path).then(() => true).catch(() => false)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
pathExists: u(pathExists),
|
||||
pathExistsSync: fs.existsSync
|
||||
}
|
||||
22
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/remove/index.js
generated
vendored
Normal file
22
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/remove/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
const u = require('universalify').fromCallback
|
||||
const rimraf = require('./rimraf')
|
||||
|
||||
function remove (path, callback) {
|
||||
// Node 14.14.0+
|
||||
if (fs.rm) return fs.rm(path, { recursive: true, force: true }, callback)
|
||||
rimraf(path, callback)
|
||||
}
|
||||
|
||||
function removeSync (path) {
|
||||
// Node 14.14.0+
|
||||
if (fs.rmSync) return fs.rmSync(path, { recursive: true, force: true })
|
||||
rimraf.sync(path)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
remove: u(remove),
|
||||
removeSync
|
||||
}
|
||||
302
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/remove/rimraf.js
generated
vendored
Normal file
302
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/remove/rimraf.js
generated
vendored
Normal file
@@ -0,0 +1,302 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
const path = require('path')
|
||||
const assert = require('assert')
|
||||
|
||||
const isWindows = (process.platform === 'win32')
|
||||
|
||||
function defaults (options) {
|
||||
const methods = [
|
||||
'unlink',
|
||||
'chmod',
|
||||
'stat',
|
||||
'lstat',
|
||||
'rmdir',
|
||||
'readdir'
|
||||
]
|
||||
methods.forEach(m => {
|
||||
options[m] = options[m] || fs[m]
|
||||
m = m + 'Sync'
|
||||
options[m] = options[m] || fs[m]
|
||||
})
|
||||
|
||||
options.maxBusyTries = options.maxBusyTries || 3
|
||||
}
|
||||
|
||||
function rimraf (p, options, cb) {
|
||||
let busyTries = 0
|
||||
|
||||
if (typeof options === 'function') {
|
||||
cb = options
|
||||
options = {}
|
||||
}
|
||||
|
||||
assert(p, 'rimraf: missing path')
|
||||
assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
|
||||
assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
|
||||
assert(options, 'rimraf: invalid options argument provided')
|
||||
assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
|
||||
|
||||
defaults(options)
|
||||
|
||||
rimraf_(p, options, function CB (er) {
|
||||
if (er) {
|
||||
if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
|
||||
busyTries < options.maxBusyTries) {
|
||||
busyTries++
|
||||
const time = busyTries * 100
|
||||
// try again, with the same exact callback as this one.
|
||||
return setTimeout(() => rimraf_(p, options, CB), time)
|
||||
}
|
||||
|
||||
// already gone
|
||||
if (er.code === 'ENOENT') er = null
|
||||
}
|
||||
|
||||
cb(er)
|
||||
})
|
||||
}
|
||||
|
||||
// Two possible strategies.
|
||||
// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
|
||||
// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
|
||||
//
|
||||
// Both result in an extra syscall when you guess wrong. However, there
|
||||
// are likely far more normal files in the world than directories. This
|
||||
// is based on the assumption that a the average number of files per
|
||||
// directory is >= 1.
|
||||
//
|
||||
// If anyone ever complains about this, then I guess the strategy could
|
||||
// be made configurable somehow. But until then, YAGNI.
|
||||
function rimraf_ (p, options, cb) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
assert(typeof cb === 'function')
|
||||
|
||||
// sunos lets the root user unlink directories, which is... weird.
|
||||
// so we have to lstat here and make sure it's not a dir.
|
||||
options.lstat(p, (er, st) => {
|
||||
if (er && er.code === 'ENOENT') {
|
||||
return cb(null)
|
||||
}
|
||||
|
||||
// Windows can EPERM on stat. Life is suffering.
|
||||
if (er && er.code === 'EPERM' && isWindows) {
|
||||
return fixWinEPERM(p, options, er, cb)
|
||||
}
|
||||
|
||||
if (st && st.isDirectory()) {
|
||||
return rmdir(p, options, er, cb)
|
||||
}
|
||||
|
||||
options.unlink(p, er => {
|
||||
if (er) {
|
||||
if (er.code === 'ENOENT') {
|
||||
return cb(null)
|
||||
}
|
||||
if (er.code === 'EPERM') {
|
||||
return (isWindows)
|
||||
? fixWinEPERM(p, options, er, cb)
|
||||
: rmdir(p, options, er, cb)
|
||||
}
|
||||
if (er.code === 'EISDIR') {
|
||||
return rmdir(p, options, er, cb)
|
||||
}
|
||||
}
|
||||
return cb(er)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function fixWinEPERM (p, options, er, cb) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
assert(typeof cb === 'function')
|
||||
|
||||
options.chmod(p, 0o666, er2 => {
|
||||
if (er2) {
|
||||
cb(er2.code === 'ENOENT' ? null : er)
|
||||
} else {
|
||||
options.stat(p, (er3, stats) => {
|
||||
if (er3) {
|
||||
cb(er3.code === 'ENOENT' ? null : er)
|
||||
} else if (stats.isDirectory()) {
|
||||
rmdir(p, options, er, cb)
|
||||
} else {
|
||||
options.unlink(p, cb)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function fixWinEPERMSync (p, options, er) {
|
||||
let stats
|
||||
|
||||
assert(p)
|
||||
assert(options)
|
||||
|
||||
try {
|
||||
options.chmodSync(p, 0o666)
|
||||
} catch (er2) {
|
||||
if (er2.code === 'ENOENT') {
|
||||
return
|
||||
} else {
|
||||
throw er
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
stats = options.statSync(p)
|
||||
} catch (er3) {
|
||||
if (er3.code === 'ENOENT') {
|
||||
return
|
||||
} else {
|
||||
throw er
|
||||
}
|
||||
}
|
||||
|
||||
if (stats.isDirectory()) {
|
||||
rmdirSync(p, options, er)
|
||||
} else {
|
||||
options.unlinkSync(p)
|
||||
}
|
||||
}
|
||||
|
||||
function rmdir (p, options, originalEr, cb) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
assert(typeof cb === 'function')
|
||||
|
||||
// try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
|
||||
// if we guessed wrong, and it's not a directory, then
|
||||
// raise the original error.
|
||||
options.rmdir(p, er => {
|
||||
if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
|
||||
rmkids(p, options, cb)
|
||||
} else if (er && er.code === 'ENOTDIR') {
|
||||
cb(originalEr)
|
||||
} else {
|
||||
cb(er)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function rmkids (p, options, cb) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
assert(typeof cb === 'function')
|
||||
|
||||
options.readdir(p, (er, files) => {
|
||||
if (er) return cb(er)
|
||||
|
||||
let n = files.length
|
||||
let errState
|
||||
|
||||
if (n === 0) return options.rmdir(p, cb)
|
||||
|
||||
files.forEach(f => {
|
||||
rimraf(path.join(p, f), options, er => {
|
||||
if (errState) {
|
||||
return
|
||||
}
|
||||
if (er) return cb(errState = er)
|
||||
if (--n === 0) {
|
||||
options.rmdir(p, cb)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// this looks simpler, and is strictly *faster*, but will
|
||||
// tie up the JavaScript thread and fail on excessively
|
||||
// deep directory trees.
|
||||
function rimrafSync (p, options) {
|
||||
let st
|
||||
|
||||
options = options || {}
|
||||
defaults(options)
|
||||
|
||||
assert(p, 'rimraf: missing path')
|
||||
assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
|
||||
assert(options, 'rimraf: missing options')
|
||||
assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
|
||||
|
||||
try {
|
||||
st = options.lstatSync(p)
|
||||
} catch (er) {
|
||||
if (er.code === 'ENOENT') {
|
||||
return
|
||||
}
|
||||
|
||||
// Windows can EPERM on stat. Life is suffering.
|
||||
if (er.code === 'EPERM' && isWindows) {
|
||||
fixWinEPERMSync(p, options, er)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// sunos lets the root user unlink directories, which is... weird.
|
||||
if (st && st.isDirectory()) {
|
||||
rmdirSync(p, options, null)
|
||||
} else {
|
||||
options.unlinkSync(p)
|
||||
}
|
||||
} catch (er) {
|
||||
if (er.code === 'ENOENT') {
|
||||
return
|
||||
} else if (er.code === 'EPERM') {
|
||||
return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
|
||||
} else if (er.code !== 'EISDIR') {
|
||||
throw er
|
||||
}
|
||||
rmdirSync(p, options, er)
|
||||
}
|
||||
}
|
||||
|
||||
function rmdirSync (p, options, originalEr) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
|
||||
try {
|
||||
options.rmdirSync(p)
|
||||
} catch (er) {
|
||||
if (er.code === 'ENOTDIR') {
|
||||
throw originalEr
|
||||
} else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
|
||||
rmkidsSync(p, options)
|
||||
} else if (er.code !== 'ENOENT') {
|
||||
throw er
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function rmkidsSync (p, options) {
|
||||
assert(p)
|
||||
assert(options)
|
||||
options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
|
||||
|
||||
if (isWindows) {
|
||||
// We only end up here once we got ENOTEMPTY at least once, and
|
||||
// at this point, we are guaranteed to have removed all the kids.
|
||||
// So, we know that it won't be ENOENT or ENOTDIR or anything else.
|
||||
// try really hard to delete stuff on windows, because it has a
|
||||
// PROFOUNDLY annoying habit of not closing handles promptly when
|
||||
// files are deleted, resulting in spurious ENOTEMPTY errors.
|
||||
const startTime = Date.now()
|
||||
do {
|
||||
try {
|
||||
const ret = options.rmdirSync(p, options)
|
||||
return ret
|
||||
} catch {}
|
||||
} while (Date.now() - startTime < 500) // give up after 500ms
|
||||
} else {
|
||||
const ret = options.rmdirSync(p, options)
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = rimraf
|
||||
rimraf.sync = rimrafSync
|
||||
154
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/util/stat.js
generated
vendored
Normal file
154
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/util/stat.js
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('../fs')
|
||||
const path = require('path')
|
||||
const util = require('util')
|
||||
|
||||
function getStats (src, dest, opts) {
|
||||
const statFunc = opts.dereference
|
||||
? (file) => fs.stat(file, { bigint: true })
|
||||
: (file) => fs.lstat(file, { bigint: true })
|
||||
return Promise.all([
|
||||
statFunc(src),
|
||||
statFunc(dest).catch(err => {
|
||||
if (err.code === 'ENOENT') return null
|
||||
throw err
|
||||
})
|
||||
]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
|
||||
}
|
||||
|
||||
function getStatsSync (src, dest, opts) {
|
||||
let destStat
|
||||
const statFunc = opts.dereference
|
||||
? (file) => fs.statSync(file, { bigint: true })
|
||||
: (file) => fs.lstatSync(file, { bigint: true })
|
||||
const srcStat = statFunc(src)
|
||||
try {
|
||||
destStat = statFunc(dest)
|
||||
} catch (err) {
|
||||
if (err.code === 'ENOENT') return { srcStat, destStat: null }
|
||||
throw err
|
||||
}
|
||||
return { srcStat, destStat }
|
||||
}
|
||||
|
||||
function checkPaths (src, dest, funcName, opts, cb) {
|
||||
util.callbackify(getStats)(src, dest, opts, (err, stats) => {
|
||||
if (err) return cb(err)
|
||||
const { srcStat, destStat } = stats
|
||||
|
||||
if (destStat) {
|
||||
if (areIdentical(srcStat, destStat)) {
|
||||
const srcBaseName = path.basename(src)
|
||||
const destBaseName = path.basename(dest)
|
||||
if (funcName === 'move' &&
|
||||
srcBaseName !== destBaseName &&
|
||||
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
||||
return cb(null, { srcStat, destStat, isChangingCase: true })
|
||||
}
|
||||
return cb(new Error('Source and destination must not be the same.'))
|
||||
}
|
||||
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
||||
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
|
||||
}
|
||||
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
||||
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))
|
||||
}
|
||||
}
|
||||
|
||||
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
||||
return cb(new Error(errMsg(src, dest, funcName)))
|
||||
}
|
||||
return cb(null, { srcStat, destStat })
|
||||
})
|
||||
}
|
||||
|
||||
function checkPathsSync (src, dest, funcName, opts) {
|
||||
const { srcStat, destStat } = getStatsSync(src, dest, opts)
|
||||
|
||||
if (destStat) {
|
||||
if (areIdentical(srcStat, destStat)) {
|
||||
const srcBaseName = path.basename(src)
|
||||
const destBaseName = path.basename(dest)
|
||||
if (funcName === 'move' &&
|
||||
srcBaseName !== destBaseName &&
|
||||
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
||||
return { srcStat, destStat, isChangingCase: true }
|
||||
}
|
||||
throw new Error('Source and destination must not be the same.')
|
||||
}
|
||||
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
||||
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
|
||||
}
|
||||
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
||||
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
|
||||
}
|
||||
}
|
||||
|
||||
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
||||
throw new Error(errMsg(src, dest, funcName))
|
||||
}
|
||||
return { srcStat, destStat }
|
||||
}
|
||||
|
||||
// recursively check if dest parent is a subdirectory of src.
|
||||
// It works for all file types including symlinks since it
|
||||
// checks the src and dest inodes. It starts from the deepest
|
||||
// parent and stops once it reaches the src parent or the root path.
|
||||
function checkParentPaths (src, srcStat, dest, funcName, cb) {
|
||||
const srcParent = path.resolve(path.dirname(src))
|
||||
const destParent = path.resolve(path.dirname(dest))
|
||||
if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
|
||||
fs.stat(destParent, { bigint: true }, (err, destStat) => {
|
||||
if (err) {
|
||||
if (err.code === 'ENOENT') return cb()
|
||||
return cb(err)
|
||||
}
|
||||
if (areIdentical(srcStat, destStat)) {
|
||||
return cb(new Error(errMsg(src, dest, funcName)))
|
||||
}
|
||||
return checkParentPaths(src, srcStat, destParent, funcName, cb)
|
||||
})
|
||||
}
|
||||
|
||||
function checkParentPathsSync (src, srcStat, dest, funcName) {
|
||||
const srcParent = path.resolve(path.dirname(src))
|
||||
const destParent = path.resolve(path.dirname(dest))
|
||||
if (destParent === srcParent || destParent === path.parse(destParent).root) return
|
||||
let destStat
|
||||
try {
|
||||
destStat = fs.statSync(destParent, { bigint: true })
|
||||
} catch (err) {
|
||||
if (err.code === 'ENOENT') return
|
||||
throw err
|
||||
}
|
||||
if (areIdentical(srcStat, destStat)) {
|
||||
throw new Error(errMsg(src, dest, funcName))
|
||||
}
|
||||
return checkParentPathsSync(src, srcStat, destParent, funcName)
|
||||
}
|
||||
|
||||
function areIdentical (srcStat, destStat) {
|
||||
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev
|
||||
}
|
||||
|
||||
// return true if dest is a subdir of src, otherwise false.
|
||||
// It only checks the path strings.
|
||||
function isSrcSubdir (src, dest) {
|
||||
const srcArr = path.resolve(src).split(path.sep).filter(i => i)
|
||||
const destArr = path.resolve(dest).split(path.sep).filter(i => i)
|
||||
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
|
||||
}
|
||||
|
||||
function errMsg (src, dest, funcName) {
|
||||
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
checkPaths,
|
||||
checkPathsSync,
|
||||
checkParentPaths,
|
||||
checkParentPathsSync,
|
||||
isSrcSubdir,
|
||||
areIdentical
|
||||
}
|
||||
26
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/util/utimes.js
generated
vendored
Normal file
26
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/lib/util/utimes.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
'use strict'
|
||||
|
||||
const fs = require('graceful-fs')
|
||||
|
||||
function utimesMillis (path, atime, mtime, callback) {
|
||||
// if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
|
||||
fs.open(path, 'r+', (err, fd) => {
|
||||
if (err) return callback(err)
|
||||
fs.futimes(fd, atime, mtime, futimesErr => {
|
||||
fs.close(fd, closeErr => {
|
||||
if (callback) callback(futimesErr || closeErr)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function utimesMillisSync (path, atime, mtime) {
|
||||
const fd = fs.openSync(path, 'r+')
|
||||
fs.futimesSync(fd, atime, mtime)
|
||||
return fs.closeSync(fd)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
utimesMillis,
|
||||
utimesMillisSync
|
||||
}
|
||||
67
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/package.json
generated
vendored
Normal file
67
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/fs-extra/package.json
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"name": "fs-extra",
|
||||
"version": "10.1.0",
|
||||
"description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"homepage": "https://github.com/jprichardson/node-fs-extra",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jprichardson/node-fs-extra"
|
||||
},
|
||||
"keywords": [
|
||||
"fs",
|
||||
"file",
|
||||
"file system",
|
||||
"copy",
|
||||
"directory",
|
||||
"extra",
|
||||
"mkdirp",
|
||||
"mkdir",
|
||||
"mkdirs",
|
||||
"recursive",
|
||||
"json",
|
||||
"read",
|
||||
"write",
|
||||
"extra",
|
||||
"delete",
|
||||
"remove",
|
||||
"touch",
|
||||
"create",
|
||||
"text",
|
||||
"output",
|
||||
"move",
|
||||
"promise"
|
||||
],
|
||||
"author": "JP Richardson <jprichardson@gmail.com>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"at-least-node": "^1.0.0",
|
||||
"klaw": "^2.1.1",
|
||||
"klaw-sync": "^3.0.2",
|
||||
"minimist": "^1.1.1",
|
||||
"mocha": "^5.0.5",
|
||||
"nyc": "^15.0.0",
|
||||
"proxyquire": "^2.0.1",
|
||||
"read-dir-files": "^0.1.1",
|
||||
"standard": "^16.0.3"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"files": [
|
||||
"lib/",
|
||||
"!lib/**/__tests__/"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "standard",
|
||||
"test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
|
||||
"test": "npm run lint && npm run unit",
|
||||
"unit": "nyc node test.js"
|
||||
},
|
||||
"sideEffects": false
|
||||
}
|
||||
22
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/LICENSE.txt
generated
vendored
Normal file
22
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2019 Garen J. Torikian
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
70
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/README.md
generated
vendored
Normal file
70
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/README.md
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
# isBinaryFile
|
||||
|
||||
Detects if a file is binary in Node.js using ✨promises✨. Similar to [Perl's `-B` switch](http://stackoverflow.com/questions/899206/how-does-perl-know-a-file-is-binary), in that:
|
||||
- it reads the first few thousand bytes of a file
|
||||
- checks for a `null` byte; if it's found, it's binary
|
||||
- flags non-ASCII characters. After a certain number of "weird" characters, the file is flagged as binary
|
||||
|
||||
Much of the logic is pretty much ported from [ag](https://github.com/ggreer/the_silver_searcher).
|
||||
|
||||
Note: if the file doesn't exist or is a directory, an error is thrown.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install isbinaryfile
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Returns `Promise<boolean>` (or just `boolean` for `*Sync`). `true` if the file is binary, `false` otherwise.
|
||||
|
||||
### isBinaryFile(filepath)
|
||||
|
||||
* `filepath` - a `string` indicating the path to the file.
|
||||
|
||||
### isBinaryFile(bytes[, size])
|
||||
|
||||
* `bytes` - a `Buffer` of the file's contents.
|
||||
* `size` - an optional `number` indicating the file size.
|
||||
|
||||
### isBinaryFileSync(filepath)
|
||||
|
||||
* `filepath` - a `string` indicating the path to the file.
|
||||
|
||||
|
||||
### isBinaryFileSync(bytes[, size])
|
||||
|
||||
* `bytes` - a `Buffer` of the file's contents.
|
||||
* `size` - an optional `number` indicating the file size.
|
||||
|
||||
### Examples
|
||||
|
||||
Here's an arbitrary usage:
|
||||
|
||||
```javascript
|
||||
const isBinaryFile = require("isbinaryfile").isBinaryFile;
|
||||
const fs = require("fs");
|
||||
|
||||
const filename = "fixtures/pdf.pdf";
|
||||
const data = fs.readFileSync(filename);
|
||||
const stat = fs.lstatSync(filename);
|
||||
|
||||
isBinaryFile(data, stat.size).then((result) => {
|
||||
if (result) {
|
||||
console.log("It is binary!")
|
||||
}
|
||||
else {
|
||||
console.log("No it is not.")
|
||||
}
|
||||
});
|
||||
|
||||
const isBinaryFileSync = require("isbinaryfile").isBinaryFileSync;
|
||||
const bytes = fs.readFileSync(filename);
|
||||
const size = fs.lstatSync(filename).size;
|
||||
console.log(isBinaryFileSync(bytes, size)); // true or false
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Run `npm install`, then run `npm test`.
|
||||
3
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/lib/index.d.ts
generated
vendored
Normal file
3
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
export declare function isBinaryFile(file: string | Buffer, size?: number): Promise<boolean>;
|
||||
export declare function isBinaryFileSync(file: string | Buffer, size?: number): boolean;
|
||||
235
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/lib/index.js
generated
vendored
Normal file
235
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isBinaryFileSync = exports.isBinaryFile = void 0;
|
||||
const fs = require("fs");
|
||||
const util_1 = require("util");
|
||||
const statAsync = util_1.promisify(fs.stat);
|
||||
const openAsync = util_1.promisify(fs.open);
|
||||
const closeAsync = util_1.promisify(fs.close);
|
||||
const MAX_BYTES = 512;
|
||||
// A very basic non-exception raising reader. Read bytes and
|
||||
// at the end use hasError() to check whether this worked.
|
||||
class Reader {
|
||||
constructor(fileBuffer, size) {
|
||||
this.fileBuffer = fileBuffer;
|
||||
this.size = size;
|
||||
this.offset = 0;
|
||||
this.error = false;
|
||||
}
|
||||
hasError() {
|
||||
return this.error;
|
||||
}
|
||||
nextByte() {
|
||||
if (this.offset === this.size || this.hasError()) {
|
||||
this.error = true;
|
||||
return 0xff;
|
||||
}
|
||||
return this.fileBuffer[this.offset++];
|
||||
}
|
||||
next(len) {
|
||||
const n = new Array();
|
||||
for (let i = 0; i < len; i++) {
|
||||
n[i] = this.nextByte();
|
||||
}
|
||||
return n;
|
||||
}
|
||||
}
|
||||
// Read a Google Protobuf var(iable)int from the buffer.
|
||||
function readProtoVarInt(reader) {
|
||||
let idx = 0;
|
||||
let varInt = 0;
|
||||
while (!reader.hasError()) {
|
||||
const b = reader.nextByte();
|
||||
varInt = varInt | ((b & 0x7f) << (7 * idx));
|
||||
if ((b & 0x80) === 0) {
|
||||
break;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
return varInt;
|
||||
}
|
||||
// Attempt to taste a full Google Protobuf message.
|
||||
function readProtoMessage(reader) {
|
||||
const varInt = readProtoVarInt(reader);
|
||||
const wireType = varInt & 0x7;
|
||||
switch (wireType) {
|
||||
case 0:
|
||||
readProtoVarInt(reader);
|
||||
return true;
|
||||
case 1:
|
||||
reader.next(8);
|
||||
return true;
|
||||
case 2:
|
||||
const len = readProtoVarInt(reader);
|
||||
reader.next(len);
|
||||
return true;
|
||||
case 5:
|
||||
reader.next(4);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// Check whether this seems to be a valid protobuf file.
|
||||
function isBinaryProto(fileBuffer, totalBytes) {
|
||||
const reader = new Reader(fileBuffer, totalBytes);
|
||||
let numMessages = 0;
|
||||
while (true) {
|
||||
// Definitely not a valid protobuf
|
||||
if (!readProtoMessage(reader) && !reader.hasError()) {
|
||||
return false;
|
||||
}
|
||||
// Short read?
|
||||
if (reader.hasError()) {
|
||||
break;
|
||||
}
|
||||
numMessages++;
|
||||
}
|
||||
return numMessages > 0;
|
||||
}
|
||||
function isBinaryFile(file, size) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (isString(file)) {
|
||||
const stat = yield statAsync(file);
|
||||
isStatFile(stat);
|
||||
const fileDescriptor = yield openAsync(file, 'r');
|
||||
const allocBuffer = Buffer.alloc(MAX_BYTES);
|
||||
// Read the file with no encoding for raw buffer access.
|
||||
// NB: something is severely wrong with promisify, had to construct my own Promise
|
||||
return new Promise((fulfill, reject) => {
|
||||
fs.read(fileDescriptor, allocBuffer, 0, MAX_BYTES, 0, (err, bytesRead, _) => {
|
||||
closeAsync(fileDescriptor);
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
else {
|
||||
fulfill(isBinaryCheck(allocBuffer, bytesRead));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (size === undefined) {
|
||||
size = file.length;
|
||||
}
|
||||
return isBinaryCheck(file, size);
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.isBinaryFile = isBinaryFile;
|
||||
function isBinaryFileSync(file, size) {
|
||||
if (isString(file)) {
|
||||
const stat = fs.statSync(file);
|
||||
isStatFile(stat);
|
||||
const fileDescriptor = fs.openSync(file, 'r');
|
||||
const allocBuffer = Buffer.alloc(MAX_BYTES);
|
||||
const bytesRead = fs.readSync(fileDescriptor, allocBuffer, 0, MAX_BYTES, 0);
|
||||
fs.closeSync(fileDescriptor);
|
||||
return isBinaryCheck(allocBuffer, bytesRead);
|
||||
}
|
||||
else {
|
||||
if (size === undefined) {
|
||||
size = file.length;
|
||||
}
|
||||
return isBinaryCheck(file, size);
|
||||
}
|
||||
}
|
||||
exports.isBinaryFileSync = isBinaryFileSync;
|
||||
function isBinaryCheck(fileBuffer, bytesRead) {
|
||||
// empty file. no clue what it is.
|
||||
if (bytesRead === 0) {
|
||||
return false;
|
||||
}
|
||||
let suspiciousBytes = 0;
|
||||
const totalBytes = Math.min(bytesRead, MAX_BYTES);
|
||||
// UTF-8 BOM
|
||||
if (bytesRead >= 3 && fileBuffer[0] === 0xef && fileBuffer[1] === 0xbb && fileBuffer[2] === 0xbf) {
|
||||
return false;
|
||||
}
|
||||
// UTF-32 BOM
|
||||
if (bytesRead >= 4 &&
|
||||
fileBuffer[0] === 0x00 &&
|
||||
fileBuffer[1] === 0x00 &&
|
||||
fileBuffer[2] === 0xfe &&
|
||||
fileBuffer[3] === 0xff) {
|
||||
return false;
|
||||
}
|
||||
// UTF-32 LE BOM
|
||||
if (bytesRead >= 4 &&
|
||||
fileBuffer[0] === 0xff &&
|
||||
fileBuffer[1] === 0xfe &&
|
||||
fileBuffer[2] === 0x00 &&
|
||||
fileBuffer[3] === 0x00) {
|
||||
return false;
|
||||
}
|
||||
// GB BOM
|
||||
if (bytesRead >= 4 &&
|
||||
fileBuffer[0] === 0x84 &&
|
||||
fileBuffer[1] === 0x31 &&
|
||||
fileBuffer[2] === 0x95 &&
|
||||
fileBuffer[3] === 0x33) {
|
||||
return false;
|
||||
}
|
||||
if (totalBytes >= 5 && fileBuffer.slice(0, 5).toString() === '%PDF-') {
|
||||
/* PDF. This is binary. */
|
||||
return true;
|
||||
}
|
||||
// UTF-16 BE BOM
|
||||
if (bytesRead >= 2 && fileBuffer[0] === 0xfe && fileBuffer[1] === 0xff) {
|
||||
return false;
|
||||
}
|
||||
// UTF-16 LE BOM
|
||||
if (bytesRead >= 2 && fileBuffer[0] === 0xff && fileBuffer[1] === 0xfe) {
|
||||
return false;
|
||||
}
|
||||
for (let i = 0; i < totalBytes; i++) {
|
||||
if (fileBuffer[i] === 0) {
|
||||
// NULL byte--it's binary!
|
||||
return true;
|
||||
}
|
||||
else if ((fileBuffer[i] < 7 || fileBuffer[i] > 14) && (fileBuffer[i] < 32 || fileBuffer[i] > 127)) {
|
||||
// UTF-8 detection
|
||||
if (fileBuffer[i] > 193 && fileBuffer[i] < 224 && i + 1 < totalBytes) {
|
||||
i++;
|
||||
if (fileBuffer[i] > 127 && fileBuffer[i] < 192) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (fileBuffer[i] > 223 && fileBuffer[i] < 240 && i + 2 < totalBytes) {
|
||||
i++;
|
||||
if (fileBuffer[i] > 127 && fileBuffer[i] < 192 && fileBuffer[i + 1] > 127 && fileBuffer[i + 1] < 192) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
suspiciousBytes++;
|
||||
// Read at least 32 fileBuffer before making a decision
|
||||
if (i >= 32 && (suspiciousBytes * 100) / totalBytes > 10) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((suspiciousBytes * 100) / totalBytes > 10) {
|
||||
return true;
|
||||
}
|
||||
if (suspiciousBytes > 1 && isBinaryProto(fileBuffer, totalBytes)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function isString(x) {
|
||||
return typeof x === 'string';
|
||||
}
|
||||
function isStatFile(stat) {
|
||||
if (!stat.isFile()) {
|
||||
throw new Error(`Path provided was not a file!`);
|
||||
}
|
||||
}
|
||||
64
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/package.json
generated
vendored
Normal file
64
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/isbinaryfile/package.json
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"name": "isbinaryfile",
|
||||
"description": "Detects if a file is binary in Node.js. Similar to Perl's -B.",
|
||||
"version": "4.0.10",
|
||||
"keywords": [
|
||||
"text",
|
||||
"binary",
|
||||
"encoding",
|
||||
"istext",
|
||||
"is text",
|
||||
"isbinary",
|
||||
"is binary",
|
||||
"is text or binary",
|
||||
"is text or binary file",
|
||||
"isbinaryfile",
|
||||
"is binary file",
|
||||
"istextfile",
|
||||
"is text file"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/jest": "^23.3.14",
|
||||
"@types/node": "^10.17.59",
|
||||
"jest": "^26.5.5",
|
||||
"prettier": "^1.19.1",
|
||||
"release-it": "^14.13.1",
|
||||
"ts-jest": "^26.5.5",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typescript": "^3.9.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.0.0"
|
||||
},
|
||||
"files": [
|
||||
"lib/**/*"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Garen J. Torikian",
|
||||
"email": "gjtorikian@gmail.com"
|
||||
}
|
||||
],
|
||||
"funding": "https://github.com/sponsors/gjtorikian/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/gjtorikian/isBinaryFile"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\" && tslint --fix -c tslint.json 'src/**/*.ts'",
|
||||
"lint": "tslint -p tsconfig.json",
|
||||
"prepare": "npm run build",
|
||||
"release": "release-it",
|
||||
"prepublishOnly": "npm test && npm run lint",
|
||||
"preversion": "npm run lint",
|
||||
"version": "npm run format && git add -A src",
|
||||
"postversion": "git push && git push --tags",
|
||||
"test": "jest --config jestconfig.json",
|
||||
"watch": "tsc -w"
|
||||
}
|
||||
}
|
||||
15
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/LICENSE
generated
vendored
Normal file
15
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2012-2015, JP Richardson <jprichardson@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
|
||||
(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
230
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/README.md
generated
vendored
Normal file
230
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/README.md
generated
vendored
Normal file
@@ -0,0 +1,230 @@
|
||||
Node.js - jsonfile
|
||||
================
|
||||
|
||||
Easily read/write JSON files in Node.js. _Note: this module cannot be used in the browser._
|
||||
|
||||
[](https://www.npmjs.org/package/jsonfile)
|
||||
[](https://github.com/jprichardson/node-jsonfile/actions?query=branch%3Amaster)
|
||||
[](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master)
|
||||
|
||||
<a href="https://github.com/feross/standard"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="Standard JavaScript" width="100"></a>
|
||||
|
||||
Why?
|
||||
----
|
||||
|
||||
Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.
|
||||
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
npm install --save jsonfile
|
||||
|
||||
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
* [`readFile(filename, [options], callback)`](#readfilefilename-options-callback)
|
||||
* [`readFileSync(filename, [options])`](#readfilesyncfilename-options)
|
||||
* [`writeFile(filename, obj, [options], callback)`](#writefilefilename-obj-options-callback)
|
||||
* [`writeFileSync(filename, obj, [options])`](#writefilesyncfilename-obj-options)
|
||||
|
||||
----
|
||||
|
||||
### readFile(filename, [options], callback)
|
||||
|
||||
`options` (`object`, default `undefined`): Pass in any [`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
|
||||
- `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback.
|
||||
If `false`, returns `null` for the object.
|
||||
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
const file = '/tmp/data.json'
|
||||
jsonfile.readFile(file, function (err, obj) {
|
||||
if (err) console.error(err)
|
||||
console.dir(obj)
|
||||
})
|
||||
```
|
||||
|
||||
You can also use this method with promises. The `readFile` method will return a promise if you do not pass a callback function.
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
const file = '/tmp/data.json'
|
||||
jsonfile.readFile(file)
|
||||
.then(obj => console.dir(obj))
|
||||
.catch(error => console.error(error))
|
||||
```
|
||||
|
||||
----
|
||||
|
||||
### readFileSync(filename, [options])
|
||||
|
||||
`options` (`object`, default `undefined`): Pass in any [`fs.readFileSync`](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
|
||||
- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object.
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
const file = '/tmp/data.json'
|
||||
|
||||
console.dir(jsonfile.readFileSync(file))
|
||||
```
|
||||
|
||||
----
|
||||
|
||||
### writeFile(filename, obj, [options], callback)
|
||||
|
||||
`options`: Pass in any [`fs.writeFile`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
|
||||
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/data.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFile(file, obj, function (err) {
|
||||
if (err) console.error(err)
|
||||
})
|
||||
```
|
||||
Or use with promises as follows:
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/data.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFile(file, obj)
|
||||
.then(res => {
|
||||
console.log('Write complete')
|
||||
})
|
||||
.catch(error => console.error(error))
|
||||
```
|
||||
|
||||
|
||||
**formatting with spaces:**
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/data.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFile(file, obj, { spaces: 2 }, function (err) {
|
||||
if (err) console.error(err)
|
||||
})
|
||||
```
|
||||
|
||||
**overriding EOL:**
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/data.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFile(file, obj, { spaces: 2, EOL: '\r\n' }, function (err) {
|
||||
if (err) console.error(err)
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
**disabling the EOL at the end of file:**
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/data.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFile(file, obj, { spaces: 2, finalEOL: false }, function (err) {
|
||||
if (err) console.log(err)
|
||||
})
|
||||
```
|
||||
|
||||
**appending to an existing JSON file:**
|
||||
|
||||
You can use `fs.writeFile` option `{ flag: 'a' }` to achieve this.
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/mayAlreadyExistedData.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFile(file, obj, { flag: 'a' }, function (err) {
|
||||
if (err) console.error(err)
|
||||
})
|
||||
```
|
||||
|
||||
----
|
||||
|
||||
### writeFileSync(filename, obj, [options])
|
||||
|
||||
`options`: Pass in any [`fs.writeFileSync`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/data.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFileSync(file, obj)
|
||||
```
|
||||
|
||||
**formatting with spaces:**
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/data.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFileSync(file, obj, { spaces: 2 })
|
||||
```
|
||||
|
||||
**overriding EOL:**
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/data.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFileSync(file, obj, { spaces: 2, EOL: '\r\n' })
|
||||
```
|
||||
|
||||
**disabling the EOL at the end of file:**
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/data.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFileSync(file, obj, { spaces: 2, finalEOL: false })
|
||||
```
|
||||
|
||||
**appending to an existing JSON file:**
|
||||
|
||||
You can use `fs.writeFileSync` option `{ flag: 'a' }` to achieve this.
|
||||
|
||||
```js
|
||||
const jsonfile = require('jsonfile')
|
||||
|
||||
const file = '/tmp/mayAlreadyExistedData.json'
|
||||
const obj = { name: 'JP' }
|
||||
|
||||
jsonfile.writeFileSync(file, obj, { flag: 'a' })
|
||||
```
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
(MIT License)
|
||||
|
||||
Copyright 2012-2016, JP Richardson <jprichardson@gmail.com>
|
||||
88
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/index.js
generated
vendored
Normal file
88
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/index.js
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
let _fs
|
||||
try {
|
||||
_fs = require('graceful-fs')
|
||||
} catch (_) {
|
||||
_fs = require('fs')
|
||||
}
|
||||
const universalify = require('universalify')
|
||||
const { stringify, stripBom } = require('./utils')
|
||||
|
||||
async function _readFile (file, options = {}) {
|
||||
if (typeof options === 'string') {
|
||||
options = { encoding: options }
|
||||
}
|
||||
|
||||
const fs = options.fs || _fs
|
||||
|
||||
const shouldThrow = 'throws' in options ? options.throws : true
|
||||
|
||||
let data = await universalify.fromCallback(fs.readFile)(file, options)
|
||||
|
||||
data = stripBom(data)
|
||||
|
||||
let obj
|
||||
try {
|
||||
obj = JSON.parse(data, options ? options.reviver : null)
|
||||
} catch (err) {
|
||||
if (shouldThrow) {
|
||||
err.message = `${file}: ${err.message}`
|
||||
throw err
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
return obj
|
||||
}
|
||||
|
||||
const readFile = universalify.fromPromise(_readFile)
|
||||
|
||||
function readFileSync (file, options = {}) {
|
||||
if (typeof options === 'string') {
|
||||
options = { encoding: options }
|
||||
}
|
||||
|
||||
const fs = options.fs || _fs
|
||||
|
||||
const shouldThrow = 'throws' in options ? options.throws : true
|
||||
|
||||
try {
|
||||
let content = fs.readFileSync(file, options)
|
||||
content = stripBom(content)
|
||||
return JSON.parse(content, options.reviver)
|
||||
} catch (err) {
|
||||
if (shouldThrow) {
|
||||
err.message = `${file}: ${err.message}`
|
||||
throw err
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function _writeFile (file, obj, options = {}) {
|
||||
const fs = options.fs || _fs
|
||||
|
||||
const str = stringify(obj, options)
|
||||
|
||||
await universalify.fromCallback(fs.writeFile)(file, str, options)
|
||||
}
|
||||
|
||||
const writeFile = universalify.fromPromise(_writeFile)
|
||||
|
||||
function writeFileSync (file, obj, options = {}) {
|
||||
const fs = options.fs || _fs
|
||||
|
||||
const str = stringify(obj, options)
|
||||
// not sure if fs.writeFileSync returns anything, but just in case
|
||||
return fs.writeFileSync(file, str, options)
|
||||
}
|
||||
|
||||
// NOTE: do not change this export format; required for ESM compat
|
||||
// see https://github.com/jprichardson/node-jsonfile/pull/162 for details
|
||||
module.exports = {
|
||||
readFile,
|
||||
readFileSync,
|
||||
writeFile,
|
||||
writeFileSync
|
||||
}
|
||||
40
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/package.json
generated
vendored
Normal file
40
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/package.json
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "jsonfile",
|
||||
"version": "6.2.0",
|
||||
"description": "Easily read/write JSON files.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:jprichardson/node-jsonfile.git"
|
||||
},
|
||||
"keywords": [
|
||||
"read",
|
||||
"write",
|
||||
"file",
|
||||
"json",
|
||||
"fs",
|
||||
"fs-extra"
|
||||
],
|
||||
"author": "JP Richardson <jprichardson@gmail.com>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^8.2.0",
|
||||
"rimraf": "^2.4.0",
|
||||
"standard": "^16.0.1"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"index.js",
|
||||
"utils.js"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "standard",
|
||||
"test": "npm run lint && npm run unit",
|
||||
"unit": "mocha"
|
||||
}
|
||||
}
|
||||
14
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/utils.js
generated
vendored
Normal file
14
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/jsonfile/utils.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
function stringify (obj, { EOL = '\n', finalEOL = true, replacer = null, spaces } = {}) {
|
||||
const EOF = finalEOL ? EOL : ''
|
||||
const str = JSON.stringify(obj, replacer, spaces)
|
||||
|
||||
return str.replace(/\n/g, EOL) + EOF
|
||||
}
|
||||
|
||||
function stripBom (content) {
|
||||
// we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
|
||||
if (Buffer.isBuffer(content)) content = content.toString('utf8')
|
||||
return content.replace(/^\uFEFF/, '')
|
||||
}
|
||||
|
||||
module.exports = { stringify, stripBom }
|
||||
20
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/universalify/LICENSE
generated
vendored
Normal file
20
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/universalify/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2017, Ryan Zimmerman <opensrc@ryanzim.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the 'Software'), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
76
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/universalify/README.md
generated
vendored
Normal file
76
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/universalify/README.md
generated
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
# universalify
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
Make a callback- or promise-based function support both promises and callbacks.
|
||||
|
||||
Uses the native promise implementation.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install universalify
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `universalify.fromCallback(fn)`
|
||||
|
||||
Takes a callback-based function to universalify, and returns the universalified function.
|
||||
|
||||
Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with three or more arguments, and does not ensure that the callback is only called once.
|
||||
|
||||
```js
|
||||
function callbackFn (n, cb) {
|
||||
setTimeout(() => cb(null, n), 15)
|
||||
}
|
||||
|
||||
const fn = universalify.fromCallback(callbackFn)
|
||||
|
||||
// Works with Promises:
|
||||
fn('Hello World!')
|
||||
.then(result => console.log(result)) // -> Hello World!
|
||||
.catch(error => console.error(error))
|
||||
|
||||
// Works with Callbacks:
|
||||
fn('Hi!', (error, result) => {
|
||||
if (error) return console.error(error)
|
||||
console.log(result)
|
||||
// -> Hi!
|
||||
})
|
||||
```
|
||||
|
||||
### `universalify.fromPromise(fn)`
|
||||
|
||||
Takes a promise-based function to universalify, and returns the universalified function.
|
||||
|
||||
Function must return a valid JS promise. `universalify` does not ensure that a valid promise is returned.
|
||||
|
||||
```js
|
||||
function promiseFn (n) {
|
||||
return new Promise(resolve => {
|
||||
setTimeout(() => resolve(n), 15)
|
||||
})
|
||||
}
|
||||
|
||||
const fn = universalify.fromPromise(promiseFn)
|
||||
|
||||
// Works with Promises:
|
||||
fn('Hello World!')
|
||||
.then(result => console.log(result)) // -> Hello World!
|
||||
.catch(error => console.error(error))
|
||||
|
||||
// Works with Callbacks:
|
||||
fn('Hi!', (error, result) => {
|
||||
if (error) return console.error(error)
|
||||
console.log(result)
|
||||
// -> Hi!
|
||||
})
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
24
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/universalify/index.js
generated
vendored
Normal file
24
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/universalify/index.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict'
|
||||
|
||||
exports.fromCallback = function (fn) {
|
||||
return Object.defineProperty(function (...args) {
|
||||
if (typeof args[args.length - 1] === 'function') fn.apply(this, args)
|
||||
else {
|
||||
return new Promise((resolve, reject) => {
|
||||
args.push((err, res) => (err != null) ? reject(err) : resolve(res))
|
||||
fn.apply(this, args)
|
||||
})
|
||||
}
|
||||
}, 'name', { value: fn.name })
|
||||
}
|
||||
|
||||
exports.fromPromise = function (fn) {
|
||||
return Object.defineProperty(function (...args) {
|
||||
const cb = args[args.length - 1]
|
||||
if (typeof cb !== 'function') return fn.apply(this, args)
|
||||
else {
|
||||
args.pop()
|
||||
fn.apply(this, args).then(r => cb(null, r), cb)
|
||||
}
|
||||
}, 'name', { value: fn.name })
|
||||
}
|
||||
34
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/universalify/package.json
generated
vendored
Normal file
34
APP/nexus-remote/node_modules/@electron/osx-sign/node_modules/universalify/package.json
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "universalify",
|
||||
"version": "2.0.1",
|
||||
"description": "Make a callback- or promise-based function support both promises and callbacks.",
|
||||
"keywords": [
|
||||
"callback",
|
||||
"native",
|
||||
"promise"
|
||||
],
|
||||
"homepage": "https://github.com/RyanZim/universalify#readme",
|
||||
"bugs": "https://github.com/RyanZim/universalify/issues",
|
||||
"license": "MIT",
|
||||
"author": "Ryan Zimmerman <opensrc@ryanzim.com>",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/RyanZim/universalify.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "standard && nyc --reporter text --reporter lcovonly tape test/*.js | colortape"
|
||||
},
|
||||
"devDependencies": {
|
||||
"colortape": "^0.1.2",
|
||||
"coveralls": "^3.0.1",
|
||||
"nyc": "^15.0.0",
|
||||
"standard": "^14.3.1",
|
||||
"tape": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
}
|
||||
77
APP/nexus-remote/node_modules/@electron/osx-sign/package.json
generated
vendored
Normal file
77
APP/nexus-remote/node_modules/@electron/osx-sign/package.json
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"name": "@electron/osx-sign",
|
||||
"version": "1.3.1",
|
||||
"description": "Codesign Electron macOS apps",
|
||||
"main": "dist/cjs/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
"files": [
|
||||
"dist",
|
||||
"entitlements",
|
||||
"README.md",
|
||||
"LICENSE",
|
||||
"bin"
|
||||
],
|
||||
"bin": {
|
||||
"electron-osx-flat": "bin/electron-osx-flat.js",
|
||||
"electron-osx-sign": "bin/electron-osx-sign.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/electron/osx-sign.git"
|
||||
},
|
||||
"author": "electron",
|
||||
"license": "BSD-2-Clause",
|
||||
"bugs": {
|
||||
"url": "https://github.com/electron/osx-sign/issues"
|
||||
},
|
||||
"homepage": "https://github.com/electron/osx-sign",
|
||||
"dependencies": {
|
||||
"compare-version": "^0.1.2",
|
||||
"debug": "^4.3.4",
|
||||
"fs-extra": "^10.0.0",
|
||||
"isbinaryfile": "^4.0.8",
|
||||
"minimist": "^1.2.6",
|
||||
"plist": "^3.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron/get": "^2.0.2",
|
||||
"@types/compare-version": "^0.1.31",
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/node": "^16.11.6",
|
||||
"@types/plist": "^3.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||
"@typescript-eslint/parser": "^5.45.0",
|
||||
"eslint": "^8.29.0",
|
||||
"eslint-config-eslint": "^7.0.0",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"extract-zip": "^2.0.1",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rimraf": "^3.0.2",
|
||||
"run-series": "^1.1.9",
|
||||
"run-waterfall": "^1.1.7",
|
||||
"standard": "^17.0.0",
|
||||
"tape": "^4.7.1",
|
||||
"typedoc": "~0.25.13",
|
||||
"typescript": "^4.9.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc && tsc -p tsconfig.esm.json",
|
||||
"docs:build": "npx typedoc",
|
||||
"lint": "eslint --ext .ts,.js src bin test",
|
||||
"pretest": "rimraf test/work",
|
||||
"test": "yarn lint && tape test",
|
||||
"prepublishOnly": "yarn build"
|
||||
},
|
||||
"standard": {
|
||||
"ignore": [
|
||||
"test/work"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user