TheDesk modify
This commit is contained in:
5
app/node_modules/about-window/.npmignore
generated
vendored
Normal file
5
app/node_modules/about-window/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/typings
|
||||
/.git
|
||||
/example
|
||||
npm-debug.log
|
||||
node_modules
|
3
app/node_modules/about-window/.stylelintrc.json
generated
vendored
Normal file
3
app/node_modules/about-window/.stylelintrc.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "stylelint-config-standard"
|
||||
}
|
19
app/node_modules/about-window/LICENSE.txt
generated
vendored
Normal file
19
app/node_modules/about-window/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2015 rhysd
|
||||
|
||||
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.
|
||||
|
100
app/node_modules/about-window/README.md
generated
vendored
Normal file
100
app/node_modules/about-window/README.md
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
'About This App' Window for [Electron](https://github.com/atom/electron) Apps
|
||||
=============================================================================
|
||||
[](https://www.npmjs.com/package/about-window)
|
||||
|
||||
[This package](https://www.npmjs.com/package/about-window) provides 'About This App' window for [Electron](https://github.com/atom/electron) applications.
|
||||
|
||||
- [x] Create 'About This App' window from given parameters
|
||||
- [x] Icon path
|
||||
- [x] Copy right
|
||||
- [x] App name and Versions
|
||||
- [x] Description
|
||||
- [x] Gather package information from package.json
|
||||
- [x] Automatically detect package.json
|
||||
- [x] Adjust window size to its contents automatically
|
||||
- [x] CSS customizability
|
||||
|
||||
You can install this module via [npm](https://www.npmjs.com/).
|
||||
|
||||
```sh
|
||||
$ npm install about-window
|
||||
```
|
||||
|
||||
Only one function is exported as default. Please see [TypeScript type definition](index.d.ts).
|
||||
The function can be called from both main process and renderer process.
|
||||
|
||||
```typescript
|
||||
export default function openAboutWindow(info: {
|
||||
icon_path: string;
|
||||
package_json_dir?: string;
|
||||
bug_report_url?: string;
|
||||
copyright?: string;
|
||||
homepage?: string;
|
||||
description?: string;
|
||||
license?: string;
|
||||
css_path?: string;
|
||||
adjust_window_size?: boolean;
|
||||
win_options?: BrowserWindowOptions;
|
||||
}): BrowserWindow
|
||||
```
|
||||
|
||||
Only `icon_path` property is required, others are optional.
|
||||
I recommend to specify as below to extract information from package.json as much as possible.
|
||||
Path to package.json is also automatically detected if possible.
|
||||
|
||||
```typescript
|
||||
openAboutWindow({
|
||||
icon_path: 'path/to/icon.png'
|
||||
});
|
||||
```
|
||||
|
||||
You can check [an example app](example) to know how to use this package.
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/rhysd/about-window.git
|
||||
$ cd about-window/example
|
||||
$ npm install
|
||||
$ npm start
|
||||
|
||||
# Or for debug
|
||||
$ npm run debug
|
||||
```
|
||||
|
||||
### Parameter's properties of `openAboutWindow()`
|
||||
|
||||
| Name | Description | Type |
|
||||
|------|-------------|------|
|
||||
| `icon_path` | Path to icon file of the application. The path is passed to `src` property of `<img>` element. **Required** | string |
|
||||
| `package_json_dir` | Path to directory which contains package.json. If not specified, it will try to detect a path to package.json. If also failed, it gives up and show less information in 'About This App' window. **Optional** | string |
|
||||
| `bug_report_url` | URL to bug report page. If not specified, 'bugs' entry in package.json is used. **Optional** | string |
|
||||
| `copyright` | Copyright notice shown in window. If not specified, it is replaced with license description generated by 'license' entry of package.json. **Optional** | string |
|
||||
| `homepage` | URL of application's web page. If not specified, 'homepage' entry of package.json is used instead. **Optional** | string |
|
||||
| `description` | Description of the application. If not specified, 'description' entry of package.json is used instead. **Optional** | string |
|
||||
| `license` | License of the application. If not specified, 'license' entry of package.json is used instead. This property is used when `copyright` is not specified. **Optional** | string |
|
||||
| `win_options` | Options of 'About This App' window. It is merged into default options. **Optional** | [BrowserWindow options object](https://github.com/atom/electron/blob/master/docs/api/browser-window.md#new-browserwindowoptions) |
|
||||
| `css_path` | Path to user-defined CSS file. It will be inserted to DOM of the window. **Optional** | string |
|
||||
| `adjust_window_size` | Adjust the window size to its content not to show scroll bar. **Optional** | boolean |
|
||||
| `open_devtools` | For debug purpose, Chrome DevTools will start when the window is opened **Optional** | boolean |
|
||||
| `use_inner_html` | If `true`, set the value with `.innerHTML` on copyright, license and description Default is `false` **Optional** | boolean |
|
||||
|
||||
**Note:** If you set `use_inner_html` to `true`, please ensure that contents don't contain any untrusted external input
|
||||
in order to avoid XSS. Be careful.
|
||||
|
||||
## Screen Shots
|
||||
|
||||
### Linux
|
||||
|
||||

|
||||
|
||||
### OS X
|
||||
|
||||

|
||||
|
||||
### Windows
|
||||
|
||||

|
||||
|
||||
## License
|
||||
|
||||
[MIT License](/LICENSE.txt).
|
||||
|
27
app/node_modules/about-window/about.html
generated
vendored
Normal file
27
app/node_modules/about-window/about.html
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
<title>About This App</title>
|
||||
<link rel="stylesheet" href="./styles/ui.css">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<div class="logo">
|
||||
<img id="app-icon" alt="App icon" height="200">
|
||||
</div>
|
||||
<h2 class="title"></h2>
|
||||
<span class="description"></span>
|
||||
<div class="copyright"></div>
|
||||
<table class="versions"></table>
|
||||
<footer class="footer">
|
||||
<div class="link bug-report-link"></div>
|
||||
</footer>
|
||||
|
||||
<!-- https://github.com/electron/electron/issues/2863 -->
|
||||
<script>var exports = exports || {};</script>
|
||||
|
||||
<script src="./src/renderer.js"></script>
|
||||
</body>
|
||||
</html>
|
18
app/node_modules/about-window/index.d.ts
generated
vendored
Normal file
18
app/node_modules/about-window/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/// <reference types="electron" />
|
||||
|
||||
export interface AboutWindowInfo {
|
||||
icon_path: string;
|
||||
package_json_dir?: string;
|
||||
bug_report_url?: string;
|
||||
copyright?: string;
|
||||
homepage?: string;
|
||||
description?: string;
|
||||
license?: string;
|
||||
win_options?: Electron.BrowserWindowConstructorOptions;
|
||||
css_path?: string;
|
||||
adjust_window_size?: boolean;
|
||||
open_devtools?: boolean;
|
||||
use_inner_html?: boolean;
|
||||
}
|
||||
|
||||
export default function openAboutWindow(into: AboutWindowInfo): Electron.BrowserWindow;
|
105
app/node_modules/about-window/package.json
generated
vendored
Normal file
105
app/node_modules/about-window/package.json
generated
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "about-window",
|
||||
"scope": null,
|
||||
"escapedName": "about-window",
|
||||
"name": "about-window",
|
||||
"rawSpec": "",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk"
|
||||
]
|
||||
],
|
||||
"_from": "about-window@latest",
|
||||
"_id": "about-window@1.8.0",
|
||||
"_inCache": true,
|
||||
"_location": "/about-window",
|
||||
"_nodeVersion": "6.10.3",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/about-window-1.8.0.tgz_1506494385445_0.4268775100354105"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "rhysd",
|
||||
"email": "lin90162@yahoo.co.jp"
|
||||
},
|
||||
"_npmVersion": "3.10.10",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "about-window",
|
||||
"scope": null,
|
||||
"escapedName": "about-window",
|
||||
"name": "about-window",
|
||||
"rawSpec": "",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/about-window/-/about-window-1.8.0.tgz",
|
||||
"_shasum": "3e183cfaef4342e1fea6c442f4e43f682e9da580",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "about-window",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk",
|
||||
"author": {
|
||||
"name": "rhysd",
|
||||
"email": "lin90162@yahoo.co.jp"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/rhysd/electron-about-window/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "'About App' window for Electron application",
|
||||
"devDependencies": {
|
||||
"@types/node": "^8.0.24",
|
||||
"electron": "^1.7.5",
|
||||
"stylelint": "^8.0.0",
|
||||
"stylelint-config-standard": "^17.0.0",
|
||||
"tslint": "^5.6.0",
|
||||
"typescript": "^2.4.2"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "3e183cfaef4342e1fea6c442f4e43f682e9da580",
|
||||
"tarball": "https://registry.npmjs.org/about-window/-/about-window-1.8.0.tgz"
|
||||
},
|
||||
"gitHead": "c2dac96372fcde38f2f842c00a34f024d0bdf4c1",
|
||||
"homepage": "https://github.com/rhysd/electron-about-window#readme",
|
||||
"keywords": [
|
||||
"Electron",
|
||||
"electron-component",
|
||||
"about",
|
||||
"window"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "src/index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "rhysd",
|
||||
"email": "lin90162@yahoo.co.jp"
|
||||
}
|
||||
],
|
||||
"name": "about-window",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rhysd/electron-about-window.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p src/",
|
||||
"debug": "electron ./example",
|
||||
"dep": "npm install",
|
||||
"example": "NODE_ENV=production electron ./example",
|
||||
"lint": "npm run tslint && npm run stylelint",
|
||||
"preversion": "npm run lint && npm run build",
|
||||
"start": "npm run dep && npm run build && npm run example",
|
||||
"stylelint": "stylelint styles/*.css",
|
||||
"tslint": "tslint -p ./src --type-check"
|
||||
},
|
||||
"version": "1.8.0"
|
||||
}
|
115
app/node_modules/about-window/src/index.js
generated
vendored
Normal file
115
app/node_modules/about-window/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const electron_1 = require("electron");
|
||||
const fs_1 = require("fs");
|
||||
const path = require("path");
|
||||
let window = null;
|
||||
function loadPackageJson(pkg_path) {
|
||||
try {
|
||||
return require(pkg_path);
|
||||
}
|
||||
catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
function detectPackageJson(specified_dir) {
|
||||
if (specified_dir) {
|
||||
const pkg = loadPackageJson(path.join(specified_dir, 'package.json'));
|
||||
if (pkg !== null) {
|
||||
return pkg;
|
||||
}
|
||||
else {
|
||||
console.warn('about-window: package.json is not found in specified directory path: ' + specified_dir);
|
||||
}
|
||||
}
|
||||
const app_name = electron_1.app.getName();
|
||||
for (const mod_path of module.paths) {
|
||||
if (!path.isAbsolute(mod_path)) {
|
||||
continue;
|
||||
}
|
||||
const p = path.join(mod_path, '..', 'package.json');
|
||||
try {
|
||||
const stats = fs_1.statSync(p);
|
||||
if (stats.isFile()) {
|
||||
const pkg = loadPackageJson(p);
|
||||
if (pkg !== null && pkg.productName === app_name) {
|
||||
return pkg;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function injectInfoFromPackageJson(info) {
|
||||
const pkg = detectPackageJson(info.package_json_dir);
|
||||
if (pkg === null) {
|
||||
return info;
|
||||
}
|
||||
if (!info.description) {
|
||||
info.description = pkg.description;
|
||||
}
|
||||
if (!info.license && pkg.license) {
|
||||
const l = pkg.license;
|
||||
info.license = typeof l === 'string' ? l : l.type;
|
||||
}
|
||||
if (!info.homepage) {
|
||||
info.homepage = pkg.homepage;
|
||||
}
|
||||
if (!info.bug_report_url && typeof (pkg.bugs) === 'object') {
|
||||
info.bug_report_url = pkg.bugs.url;
|
||||
}
|
||||
if (info.use_inner_html === undefined) {
|
||||
info.use_inner_html = false;
|
||||
}
|
||||
return info;
|
||||
}
|
||||
function openAboutWindow(info) {
|
||||
if (window !== null) {
|
||||
window.focus();
|
||||
return window;
|
||||
}
|
||||
const index_html = 'file://' + path.join(__dirname, '..', 'about.html');
|
||||
const options = Object.assign({
|
||||
width: 400,
|
||||
height: 400,
|
||||
useContentSize: true,
|
||||
titleBarStyle: 'hidden-inset',
|
||||
show: !info.adjust_window_size,
|
||||
icon: info.icon_path,
|
||||
}, info.win_options || {});
|
||||
window = new (electron_1.BrowserWindow || electron_1.remote.BrowserWindow)(options);
|
||||
window.once('closed', () => {
|
||||
window = null;
|
||||
});
|
||||
window.loadURL(index_html);
|
||||
window.webContents.on('will-navigate', (e, url) => {
|
||||
e.preventDefault();
|
||||
electron_1.shell.openExternal(url);
|
||||
});
|
||||
window.webContents.on('new-window', (e, url) => {
|
||||
e.preventDefault();
|
||||
electron_1.shell.openExternal(url);
|
||||
});
|
||||
window.webContents.once('dom-ready', () => {
|
||||
delete info.win_options;
|
||||
window.webContents.send('about-window:info', info);
|
||||
if (info.open_devtools) {
|
||||
if (process.versions.electron >= '1.4') {
|
||||
window.webContents.openDevTools({ mode: 'detach' });
|
||||
}
|
||||
else {
|
||||
window.webContents.openDevTools();
|
||||
}
|
||||
}
|
||||
});
|
||||
window.once('ready-to-show', () => {
|
||||
window.show();
|
||||
});
|
||||
window.setMenu(null);
|
||||
info = injectInfoFromPackageJson(info);
|
||||
return window;
|
||||
}
|
||||
exports.default = openAboutWindow;
|
||||
//# sourceMappingURL=index.js.map
|
1
app/node_modules/about-window/src/index.js.map
generated
vendored
Normal file
1
app/node_modules/about-window/src/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"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"}
|
134
app/node_modules/about-window/src/index.ts
generated
vendored
Normal file
134
app/node_modules/about-window/src/index.ts
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
import {app, BrowserWindow, remote, shell} from 'electron';
|
||||
import {statSync} from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
let window: Electron.BrowserWindow = null;
|
||||
|
||||
function loadPackageJson(pkg_path: string): PackageJson {
|
||||
try {
|
||||
return require(pkg_path);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function detectPackageJson(specified_dir: string) {
|
||||
if (specified_dir) {
|
||||
const pkg = loadPackageJson(path.join(specified_dir, 'package.json'));
|
||||
if (pkg !== null) {
|
||||
return pkg;
|
||||
} else {
|
||||
console.warn('about-window: package.json is not found in specified directory path: ' + specified_dir);
|
||||
}
|
||||
}
|
||||
|
||||
const app_name = app.getName();
|
||||
|
||||
for (const mod_path of (module as any).paths) {
|
||||
if (!path.isAbsolute(mod_path)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const p = path.join(mod_path, '..', 'package.json');
|
||||
try {
|
||||
const stats = statSync(p);
|
||||
if (stats.isFile()) {
|
||||
const pkg = loadPackageJson(p);
|
||||
if (pkg !== null && pkg.productName === app_name) {
|
||||
return pkg;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// File not found. Ignored.
|
||||
}
|
||||
}
|
||||
|
||||
// Note: Not found.
|
||||
return null;
|
||||
}
|
||||
|
||||
function injectInfoFromPackageJson(info: AboutWindowInfo) {
|
||||
const pkg = detectPackageJson(info.package_json_dir);
|
||||
if (pkg === null) {
|
||||
// Note: Give up.
|
||||
return info;
|
||||
}
|
||||
|
||||
if (!info.description) {
|
||||
info.description = pkg.description;
|
||||
}
|
||||
if (!info.license && pkg.license) {
|
||||
const l = pkg.license;
|
||||
info.license = typeof l === 'string' ? l : l.type;
|
||||
}
|
||||
if (!info.homepage) {
|
||||
info.homepage = pkg.homepage;
|
||||
}
|
||||
if (!info.bug_report_url && typeof (pkg.bugs) === 'object') {
|
||||
info.bug_report_url = pkg.bugs.url;
|
||||
}
|
||||
if (info.use_inner_html === undefined) {
|
||||
info.use_inner_html = false;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
export default function openAboutWindow(info: AboutWindowInfo) {
|
||||
if (window !== null) {
|
||||
window.focus();
|
||||
return window;
|
||||
}
|
||||
|
||||
const index_html = 'file://' + path.join(__dirname, '..', 'about.html');
|
||||
|
||||
const options = Object.assign(
|
||||
{
|
||||
width: 400,
|
||||
height: 400,
|
||||
useContentSize: true,
|
||||
titleBarStyle: 'hidden-inset',
|
||||
show: !info.adjust_window_size,
|
||||
icon: info.icon_path,
|
||||
},
|
||||
info.win_options || {},
|
||||
);
|
||||
|
||||
window = new (BrowserWindow || remote.BrowserWindow)(options);
|
||||
|
||||
window.once('closed', () => {
|
||||
window = null;
|
||||
});
|
||||
window.loadURL(index_html);
|
||||
|
||||
window.webContents.on('will-navigate', (e, url) => {
|
||||
e.preventDefault();
|
||||
shell.openExternal(url);
|
||||
});
|
||||
window.webContents.on('new-window', (e, url) => {
|
||||
e.preventDefault();
|
||||
shell.openExternal(url);
|
||||
});
|
||||
|
||||
window.webContents.once('dom-ready', () => {
|
||||
delete info.win_options;
|
||||
window.webContents.send('about-window:info', info);
|
||||
if (info.open_devtools) {
|
||||
if (process.versions.electron >= '1.4') {
|
||||
window.webContents.openDevTools({mode: 'detach'});
|
||||
} else {
|
||||
window.webContents.openDevTools();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
window.once('ready-to-show', () => {
|
||||
window.show();
|
||||
});
|
||||
|
||||
window.setMenu(null);
|
||||
|
||||
info = injectInfoFromPackageJson(info);
|
||||
|
||||
return window;
|
||||
}
|
37
app/node_modules/about-window/src/lib.d.ts
generated
vendored
Normal file
37
app/node_modules/about-window/src/lib.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/// <reference types="electron" />
|
||||
|
||||
interface LicenseEntry {
|
||||
type: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
interface PackageJson {
|
||||
productName?: string;
|
||||
description?: string;
|
||||
homepage?: string;
|
||||
license?: string | LicenseEntry;
|
||||
bugs?: {
|
||||
url: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface AboutWindowInfo {
|
||||
icon_path: string;
|
||||
copyright?: string;
|
||||
homepage?: string;
|
||||
description?: string;
|
||||
package_json_dir?: string;
|
||||
license?: string;
|
||||
bug_report_url?: string;
|
||||
css_path?: string;
|
||||
adjust_window_size?: boolean;
|
||||
win_options?: Electron.BrowserWindowConstructorOptions;
|
||||
open_devtools?: boolean;
|
||||
use_inner_html?: boolean;
|
||||
}
|
||||
|
||||
declare namespace NodeJS {
|
||||
interface ProcessVersions {
|
||||
[name: string]: string;
|
||||
}
|
||||
}
|
65
app/node_modules/about-window/src/renderer.js
generated
vendored
Normal file
65
app/node_modules/about-window/src/renderer.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const electron_1 = require("electron");
|
||||
electron_1.ipcRenderer.on('about-window:info', (_, info) => {
|
||||
const app_name = electron_1.remote.app.getName();
|
||||
const open_home = () => electron_1.shell.openExternal(info.homepage);
|
||||
const content = info.use_inner_html ? 'innerHTML' : 'innerText';
|
||||
document.title = `About ${app_name}`;
|
||||
const title_elem = document.querySelector('.title');
|
||||
title_elem.innerText = `${app_name} ${electron_1.remote.app.getVersion()}`;
|
||||
title_elem.addEventListener('click', open_home);
|
||||
if (info.homepage) {
|
||||
document
|
||||
.querySelector('.logo')
|
||||
.addEventListener('click', open_home);
|
||||
}
|
||||
const copyright_elem = document.querySelector('.copyright');
|
||||
if (info.copyright) {
|
||||
copyright_elem[content] = info.copyright;
|
||||
}
|
||||
else if (info.license) {
|
||||
copyright_elem[content] = `Distributed under ${info.license} license.`;
|
||||
}
|
||||
const icon_elem = document.getElementById('app-icon');
|
||||
icon_elem.src = info.icon_path;
|
||||
if (info.description) {
|
||||
const desc_elem = document.querySelector('.description');
|
||||
desc_elem[content] = info.description;
|
||||
}
|
||||
if (info.bug_report_url) {
|
||||
const bug_report = document.querySelector('.bug-report-link');
|
||||
bug_report.innerText = 'found bug?';
|
||||
bug_report.addEventListener('click', e => {
|
||||
e.preventDefault();
|
||||
electron_1.shell.openExternal(info.bug_report_url);
|
||||
});
|
||||
}
|
||||
if (info.css_path) {
|
||||
const link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = info.css_path;
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
if (info.adjust_window_size) {
|
||||
const height = document.body.scrollHeight;
|
||||
const width = document.body.scrollWidth;
|
||||
const win = electron_1.remote.getCurrentWindow();
|
||||
if (height > 0 && width > 0) {
|
||||
win.setContentSize(width, height + 40);
|
||||
}
|
||||
}
|
||||
});
|
||||
const versions = document.querySelector('.versions');
|
||||
const vs = process.versions;
|
||||
for (const name of ['electron', 'chrome', 'node', 'v8']) {
|
||||
const tr = document.createElement('tr');
|
||||
const name_td = document.createElement('td');
|
||||
name_td.innerText = name;
|
||||
tr.appendChild(name_td);
|
||||
const version_td = document.createElement('td');
|
||||
version_td.innerText = ' : ' + vs[name];
|
||||
tr.appendChild(version_td);
|
||||
versions.appendChild(tr);
|
||||
}
|
||||
//# sourceMappingURL=renderer.js.map
|
1
app/node_modules/about-window/src/renderer.js.map
generated
vendored
Normal file
1
app/node_modules/about-window/src/renderer.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["renderer.ts"],"names":[],"mappings":"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"}
|
73
app/node_modules/about-window/src/renderer.ts
generated
vendored
Normal file
73
app/node_modules/about-window/src/renderer.ts
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
import {ipcRenderer, remote, shell} from 'electron';
|
||||
|
||||
ipcRenderer.on('about-window:info', (_: any, info: AboutWindowInfo) => {
|
||||
const app_name = remote.app.getName();
|
||||
const open_home = () => shell.openExternal(info.homepage);
|
||||
const content = info.use_inner_html ? 'innerHTML' : 'innerText';
|
||||
document.title = `About ${app_name}`;
|
||||
|
||||
const title_elem = document.querySelector('.title') as HTMLHeadingElement;
|
||||
title_elem.innerText = `${app_name} ${remote.app.getVersion()}`;
|
||||
title_elem.addEventListener('click', open_home);
|
||||
|
||||
if (info.homepage) {
|
||||
document
|
||||
.querySelector('.logo')
|
||||
.addEventListener('click', open_home);
|
||||
}
|
||||
|
||||
const copyright_elem = document.querySelector('.copyright') as any;
|
||||
if (info.copyright) {
|
||||
copyright_elem[content] = info.copyright;
|
||||
} else if (info.license) {
|
||||
copyright_elem[content] = `Distributed under ${info.license} license.`;
|
||||
}
|
||||
|
||||
const icon_elem = document.getElementById('app-icon') as HTMLImageElement;
|
||||
icon_elem.src = info.icon_path;
|
||||
|
||||
if (info.description) {
|
||||
const desc_elem = document.querySelector('.description') as any;
|
||||
desc_elem[content] = info.description;
|
||||
}
|
||||
|
||||
if (info.bug_report_url) {
|
||||
const bug_report = document.querySelector('.bug-report-link') as HTMLDivElement;
|
||||
bug_report.innerText = 'found bug?';
|
||||
bug_report.addEventListener('click', e => {
|
||||
e.preventDefault();
|
||||
shell.openExternal(info.bug_report_url);
|
||||
});
|
||||
}
|
||||
|
||||
if (info.css_path) {
|
||||
const link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = info.css_path;
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
|
||||
if (info.adjust_window_size) {
|
||||
const height = document.body.scrollHeight;
|
||||
const width = document.body.scrollWidth;
|
||||
const win = remote.getCurrentWindow();
|
||||
if (height > 0 && width > 0) {
|
||||
// Note:
|
||||
// Add 30px(= about 2em) to add padding in window
|
||||
win.setContentSize(width, height + 40);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const versions = document.querySelector('.versions');
|
||||
const vs = process.versions;
|
||||
for (const name of ['electron', 'chrome', 'node', 'v8']) {
|
||||
const tr = document.createElement('tr');
|
||||
const name_td = document.createElement('td');
|
||||
name_td.innerText = name;
|
||||
tr.appendChild(name_td);
|
||||
const version_td = document.createElement('td');
|
||||
version_td.innerText = ' : ' + vs[name];
|
||||
tr.appendChild(version_td);
|
||||
versions.appendChild(tr);
|
||||
}
|
20
app/node_modules/about-window/src/tsconfig.json
generated
vendored
Normal file
20
app/node_modules/about-window/src/tsconfig.json
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"removeComments": true,
|
||||
"preserveConstEnums": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noEmitOnError": true,
|
||||
"strictNullChecks": false,
|
||||
"target": "es2015",
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
]
|
||||
}
|
64
app/node_modules/about-window/styles/ui.css
generated
vendored
Normal file
64
app/node_modules/about-window/styles/ui.css
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
body,
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #333;
|
||||
background-color: #eee;
|
||||
font-size: 12px;
|
||||
font-family: 'Helvetica', 'Arial', 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'MS Pゴシック', 'MS PGothic', sans-serif;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 200px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.title,
|
||||
.copyright,
|
||||
.description {
|
||||
margin: 0.2em;
|
||||
}
|
||||
|
||||
.title {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-bottom: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.versions {
|
||||
border-collapse: collapse;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.copyright,
|
||||
.versions {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.link {
|
||||
cursor: pointer;
|
||||
color: #80a0c2;
|
||||
}
|
||||
|
||||
.bug-report-link {
|
||||
-webkit-app-region: no-drag;
|
||||
position: absolute;
|
||||
right: 0.5em;
|
||||
bottom: 0.5em;
|
||||
}
|
127
app/node_modules/about-window/tslint.json
generated
vendored
Normal file
127
app/node_modules/about-window/tslint.json
generated
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
{
|
||||
"extends": ["tslint:recommended"],
|
||||
"rules": {
|
||||
"align": [
|
||||
true,
|
||||
"parameters",
|
||||
"statements"
|
||||
],
|
||||
"ban": false,
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"curly": true,
|
||||
"eofline": true,
|
||||
"forin": false,
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"interface-name": false,
|
||||
"jsdoc-format": true,
|
||||
"label-position": true,
|
||||
"max-line-length": false,
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
true,
|
||||
"public-before-private",
|
||||
"static-before-instance",
|
||||
"variables-before-functions"
|
||||
],
|
||||
"no-any": false,
|
||||
"no-arg": true,
|
||||
"no-bitwise": false,
|
||||
"no-conditional-assignment": true,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-construct": true,
|
||||
"no-constructor-vars": false,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": true,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": true,
|
||||
"no-require-imports": false,
|
||||
"no-shadowed-variable": true,
|
||||
"no-string-literal": true,
|
||||
"no-switch-case-fall-through": false,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-unused-expression": true,
|
||||
"no-unsafe-finally": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-keyword": true,
|
||||
"no-var-requires": true,
|
||||
"object-literal-sort-keys": false,
|
||||
"object-literal-key-quotes": [
|
||||
true,
|
||||
"as-needed"
|
||||
],
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-whitespace"
|
||||
],
|
||||
"quotemark": [
|
||||
true,
|
||||
"single",
|
||||
"avoid-escape",
|
||||
"jsx-double"
|
||||
],
|
||||
"radix": true,
|
||||
"semicolon": true,
|
||||
"switch-default": true,
|
||||
"trailing-comma": [
|
||||
true,
|
||||
{
|
||||
"multiline": "always",
|
||||
"singleline": "never"
|
||||
}
|
||||
],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"typedef": [
|
||||
false
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"use-strict": false,
|
||||
"variable-name": [
|
||||
false,
|
||||
"check-format",
|
||||
"allow-leading-underscore",
|
||||
"ban-keywords"
|
||||
],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
],
|
||||
"no-namespace": false,
|
||||
"arrow-parens": false
|
||||
}
|
||||
}
|
134
app/node_modules/electron-dl/index.js
generated
vendored
Normal file
134
app/node_modules/electron-dl/index.js
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
'use strict';
|
||||
const path = require('path');
|
||||
const electron = require('electron');
|
||||
const unusedFilename = require('unused-filename');
|
||||
const pupa = require('pupa');
|
||||
const extName = require('ext-name');
|
||||
|
||||
const app = electron.app;
|
||||
const shell = electron.shell;
|
||||
|
||||
function getFilenameFromMime(name, mime) {
|
||||
const exts = extName.mime(mime);
|
||||
|
||||
if (exts.length !== 1) {
|
||||
return name;
|
||||
}
|
||||
|
||||
return `${name}.${exts[0].ext}`;
|
||||
}
|
||||
|
||||
function registerListener(session, opts = {}, cb = () => {}) {
|
||||
const downloadItems = new Set();
|
||||
let receivedBytes = 0;
|
||||
let completedBytes = 0;
|
||||
let totalBytes = 0;
|
||||
const activeDownloadItems = () => downloadItems.size;
|
||||
const progressDownloadItems = () => receivedBytes / totalBytes;
|
||||
|
||||
const listener = (e, item, webContents) => {
|
||||
downloadItems.add(item);
|
||||
totalBytes += item.getTotalBytes();
|
||||
|
||||
let hostWebContents = webContents;
|
||||
if (webContents.getType() === 'webview') {
|
||||
hostWebContents = webContents.hostWebContents;
|
||||
}
|
||||
const win = electron.BrowserWindow.fromWebContents(hostWebContents);
|
||||
|
||||
const dir = opts.directory || app.getPath('downloads');
|
||||
let filePath;
|
||||
if (opts.filename) {
|
||||
filePath = path.join(dir, opts.filename);
|
||||
} else {
|
||||
const filename = item.getFilename();
|
||||
const name = path.extname(filename) ? filename : getFilenameFromMime(filename, item.getMimeType());
|
||||
|
||||
filePath = unusedFilename.sync(path.join(dir, name));
|
||||
}
|
||||
|
||||
const errorMessage = opts.errorMessage || 'The download of {filename} was interrupted';
|
||||
const errorTitle = opts.errorTitle || 'Download Error';
|
||||
|
||||
if (!opts.saveAs) {
|
||||
item.setSavePath(filePath);
|
||||
}
|
||||
|
||||
item.on('updated', () => {
|
||||
receivedBytes = [...downloadItems].reduce((receivedBytes, item) => {
|
||||
receivedBytes += item.getReceivedBytes();
|
||||
return receivedBytes;
|
||||
}, completedBytes);
|
||||
|
||||
if (['darwin', 'linux'].includes(process.platform)) {
|
||||
app.setBadgeCount(activeDownloadItems());
|
||||
}
|
||||
|
||||
if (!win.isDestroyed()) {
|
||||
win.setProgressBar(progressDownloadItems());
|
||||
}
|
||||
|
||||
if (typeof opts.onProgress === 'function') {
|
||||
opts.onProgress(progressDownloadItems());
|
||||
}
|
||||
});
|
||||
|
||||
item.on('done', (e, state) => {
|
||||
completedBytes += item.getTotalBytes();
|
||||
downloadItems.delete(item);
|
||||
|
||||
if (['darwin', 'linux'].includes(process.platform)) {
|
||||
app.setBadgeCount(activeDownloadItems());
|
||||
}
|
||||
|
||||
if (!win.isDestroyed() && !activeDownloadItems()) {
|
||||
win.setProgressBar(-1);
|
||||
receivedBytes = 0;
|
||||
completedBytes = 0;
|
||||
totalBytes = 0;
|
||||
}
|
||||
|
||||
if (state === 'interrupted') {
|
||||
const message = pupa(errorMessage, {filename: item.getFilename()});
|
||||
electron.dialog.showErrorBox(errorTitle, message);
|
||||
cb(new Error(message));
|
||||
} else if (state === 'completed') {
|
||||
if (process.platform === 'darwin') {
|
||||
app.dock.downloadFinished(filePath);
|
||||
}
|
||||
|
||||
if (opts.openFolderWhenDone) {
|
||||
shell.showItemInFolder(filePath);
|
||||
}
|
||||
|
||||
if (opts.unregisterWhenDone) {
|
||||
session.removeListener('will-download', listener);
|
||||
}
|
||||
|
||||
cb(null, item);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
session.on('will-download', listener);
|
||||
}
|
||||
|
||||
module.exports = (opts = {}) => {
|
||||
app.on('session-created', session => {
|
||||
registerListener(session, opts);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.download = (win, url, opts) => new Promise((resolve, reject) => {
|
||||
opts = Object.assign({}, opts, {unregisterWhenDone: true});
|
||||
|
||||
registerListener(win.webContents.session, opts, (err, item) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(item);
|
||||
}
|
||||
});
|
||||
|
||||
win.webContents.downloadURL(url);
|
||||
});
|
9
app/node_modules/electron-dl/license
generated
vendored
Normal file
9
app/node_modules/electron-dl/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
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.
|
116
app/node_modules/electron-dl/package.json
generated
vendored
Normal file
116
app/node_modules/electron-dl/package.json
generated
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "electron-dl",
|
||||
"scope": null,
|
||||
"escapedName": "electron-dl",
|
||||
"name": "electron-dl",
|
||||
"rawSpec": "",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk"
|
||||
]
|
||||
],
|
||||
"_from": "electron-dl@latest",
|
||||
"_id": "electron-dl@1.10.0",
|
||||
"_inCache": true,
|
||||
"_location": "/electron-dl",
|
||||
"_nodeVersion": "4.8.3",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/electron-dl-1.10.0.tgz_1502139802256_0.5021310658194125"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.15.11",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "electron-dl",
|
||||
"scope": null,
|
||||
"escapedName": "electron-dl",
|
||||
"name": "electron-dl",
|
||||
"rawSpec": "",
|
||||
"spec": "latest",
|
||||
"type": "tag"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-1.10.0.tgz",
|
||||
"_shasum": "f94416064056fc6f2a86ae498614c93526890af9",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "electron-dl",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/electron-dl/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"ext-name": "^5.0.0",
|
||||
"pupa": "^1.0.0",
|
||||
"unused-filename": "^1.0.0"
|
||||
},
|
||||
"description": "Simplified file downloads for your Electron app",
|
||||
"devDependencies": {
|
||||
"ava": "^0.21.0",
|
||||
"cp-file": "^4.2.0",
|
||||
"electron": "^1.3.3",
|
||||
"minimist": "^1.2.0",
|
||||
"node-static": "^0.7.9",
|
||||
"pify": "^3.0.0",
|
||||
"spectron": "^3.7.2",
|
||||
"uuid": "^3.1.0",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "f94416064056fc6f2a86ae498614c93526890af9",
|
||||
"tarball": "https://registry.npmjs.org/electron-dl/-/electron-dl-1.10.0.tgz"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "b47d7e9ee5e8c89b08ed86e9e395aa052e39f4bf",
|
||||
"homepage": "https://github.com/sindresorhus/electron-dl#readme",
|
||||
"keywords": [
|
||||
"electron",
|
||||
"app",
|
||||
"file",
|
||||
"download",
|
||||
"downloader",
|
||||
"progress"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "electron-dl",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/electron-dl.git"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "electron run.js",
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.10.0",
|
||||
"xo": {
|
||||
"envs": [
|
||||
"node",
|
||||
"browser"
|
||||
]
|
||||
}
|
||||
}
|
155
app/node_modules/electron-dl/readme.md
generated
vendored
Normal file
155
app/node_modules/electron-dl/readme.md
generated
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
# electron-dl [](https://travis-ci.org/sindresorhus/electron-dl)
|
||||
|
||||
> Simplified file downloads for your [Electron](http://electron.atom.io) app
|
||||
|
||||
|
||||
## Why?
|
||||
|
||||
- One function call instead of having to manually implement a lot of [boilerplate](index.js).
|
||||
- Saves the file to the users Downloads directory instead of prompting.
|
||||
- Bounces the Downloads directory in the dock when done. *(macOS)*
|
||||
- Handles multiple downloads.
|
||||
- Shows badge count *(macOS & Linux only)* and download progress. Example on macOS:
|
||||
|
||||
<img src="screenshot.png" width="82">
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install electron-dl
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Register it for all windows
|
||||
|
||||
This is probably what you want for your app.
|
||||
|
||||
```js
|
||||
const {app, BrowserWindow} = require('electron');
|
||||
|
||||
require('electron-dl')();
|
||||
|
||||
let win;
|
||||
|
||||
app.on('ready', () => {
|
||||
win = new BrowserWindow();
|
||||
});
|
||||
```
|
||||
|
||||
### Use it manually
|
||||
|
||||
This can be useful if you need download functionality in a reusable module.
|
||||
|
||||
```js
|
||||
const {app, BrowserWindow, ipcMain} = require('electron');
|
||||
const {download} = require('electron-dl');
|
||||
|
||||
ipcMain.on('download-btn', (e, args) => {
|
||||
download(BrowserWindow.getFocusedWindow(), args.url)
|
||||
.then(dl => console.log(dl.getSavePath()))
|
||||
.catch(console.error);
|
||||
});
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### electronDl([options])
|
||||
|
||||
### electronDl.download(window, url, [options]): Promise<[DownloadItem](https://github.com/electron/electron/blob/master/docs/api/download-item.md)>
|
||||
|
||||
### window
|
||||
|
||||
Type: `BrowserWindow`
|
||||
|
||||
Window to register the behavior on.
|
||||
|
||||
### url
|
||||
|
||||
Type: `string`
|
||||
|
||||
URL to download.
|
||||
|
||||
### options
|
||||
|
||||
#### saveAs
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Show a `Save As…` dialog instead of downloading immediately.
|
||||
|
||||
Note: Only use this option when strictly necessary. Downloading directly without a prompt is a much better user experience.
|
||||
|
||||
#### directory
|
||||
|
||||
Type: `string`<br>
|
||||
Default: [User's downloads directory](http://electron.atom.io/docs/api/app/#appgetpathname)
|
||||
|
||||
Directory to save the file in.
|
||||
|
||||
#### filename
|
||||
|
||||
Type: `string`<br>
|
||||
Default: [`downloadItem.getFilename()`](https://electron.atom.io/docs/api/download-item/#downloaditemgetfilename)
|
||||
|
||||
Name of the saved file.
|
||||
|
||||
This option only makes sense for `electronDl.download()`.
|
||||
|
||||
#### errorTitle
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `Download Error`
|
||||
|
||||
Title of the error dialog. Can be customized for localization.
|
||||
|
||||
#### errorMessage
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `The download of {filename} was interrupted`
|
||||
|
||||
Message of the error dialog. `{filename}` is replaced with the name of the actual file. Can be customized for localization.
|
||||
|
||||
#### onProgress
|
||||
|
||||
Type: `Function`
|
||||
|
||||
Optional callback that receives a number between `0` and `1` representing the progress of the current download.
|
||||
|
||||
#### openFolderWhenDone
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Reveal the downloaded file in the system file manager, and if possible, select the file.
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
After making changes, run the automated tests:
|
||||
|
||||
```
|
||||
$ npm test
|
||||
```
|
||||
|
||||
And before submitting a pull request, run the manual tests to manually verify that everything works:
|
||||
|
||||
```
|
||||
npm start
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [electron-debug](https://github.com/sindresorhus/electron-debug) - Adds useful debug features to your Electron app
|
||||
- [electron-context-menu](https://github.com/sindresorhus/electron-context-menu) - Context menu for your Electron app
|
||||
- [electron-store](https://github.com/sindresorhus/electron-store) - Save and load data like user preferences, app state, cache, etc
|
||||
- [electron-unhandled](https://github.com/sindresorhus/electron-unhandled) - Catch unhandled errors and promise rejections in your Electron app
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
18
app/node_modules/ext-list/index.js
generated
vendored
Normal file
18
app/node_modules/ext-list/index.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
var mimeDb = require('mime-db');
|
||||
|
||||
module.exports = function () {
|
||||
var ret = {};
|
||||
|
||||
Object.keys(mimeDb).forEach(function (x) {
|
||||
var val = mimeDb[x];
|
||||
|
||||
if (val.extensions && val.extensions.length > 0) {
|
||||
val.extensions.forEach(function (y) {
|
||||
ret[y] = x;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return ret;
|
||||
};
|
21
app/node_modules/ext-list/license
generated
vendored
Normal file
21
app/node_modules/ext-list/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Kevin Mårtensson <kevinmartensson@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.
|
100
app/node_modules/ext-list/package.json
generated
vendored
Normal file
100
app/node_modules/ext-list/package.json
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "ext-list@^2.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "ext-list",
|
||||
"name": "ext-list",
|
||||
"rawSpec": "^2.0.0",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-name"
|
||||
]
|
||||
],
|
||||
"_from": "ext-list@>=2.0.0 <3.0.0",
|
||||
"_id": "ext-list@2.2.2",
|
||||
"_inCache": true,
|
||||
"_location": "/ext-list",
|
||||
"_nodeVersion": "8.0.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/ext-list-2.2.2.tgz_1496309328028_0.20976057252846658"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
},
|
||||
"_npmVersion": "5.0.0",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "ext-list@^2.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "ext-list",
|
||||
"name": "ext-list",
|
||||
"rawSpec": "^2.0.0",
|
||||
"spec": ">=2.0.0 <3.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ext-name"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz",
|
||||
"_shasum": "0b98e64ed82f5acf0f2931babf69212ef52ddd37",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "ext-list@^2.0.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-name",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"url": "https://github.com/kevva"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kevva/ext-list/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"mime-db": "^1.28.0"
|
||||
},
|
||||
"description": "List of known file extensions and their MIME types",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==",
|
||||
"shasum": "0b98e64ed82f5acf0f2931babf69212ef52ddd37",
|
||||
"tarball": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "cef670e7ccc4a8c239b8d58526556b6ec23d1e96",
|
||||
"homepage": "https://github.com/kevva/ext-list#readme",
|
||||
"keywords": [
|
||||
"ext",
|
||||
"mime"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "ext-list",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kevva/ext-list.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "2.2.2"
|
||||
}
|
25
app/node_modules/ext-list/readme.md
generated
vendored
Normal file
25
app/node_modules/ext-list/readme.md
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# ext-list [](https://travis-ci.org/kevva/ext-list)
|
||||
|
||||
> Return a list of known [file extensions](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) and their MIME types
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ext-list
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const extList = require('ext-list');
|
||||
|
||||
extList();
|
||||
//=> {'123': 'application/vnd.lotus-1-2-3', ez: 'application/andrew-inset', aw: 'application/applixware', ...}
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Kevin Mårtensson](https://github.com/kevva)
|
31
app/node_modules/ext-name/index.js
generated
vendored
Normal file
31
app/node_modules/ext-name/index.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
const extList = require('ext-list');
|
||||
const sortKeysLength = require('sort-keys-length');
|
||||
|
||||
module.exports = str => {
|
||||
const obj = sortKeysLength.desc(extList());
|
||||
const exts = Object.keys(obj).filter(x => str.endsWith(x));
|
||||
|
||||
if (exts.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return exts.map(x => ({
|
||||
ext: x,
|
||||
mime: obj[x]
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports.mime = str => {
|
||||
const obj = sortKeysLength.desc(extList());
|
||||
const exts = Object.keys(obj).filter(x => obj[x] === str);
|
||||
|
||||
if (exts.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return exts.map(x => ({
|
||||
ext: x,
|
||||
mime: obj[x]
|
||||
}));
|
||||
};
|
21
app/node_modules/ext-name/license
generated
vendored
Normal file
21
app/node_modules/ext-name/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Kevin Mårtensson <kevinmartensson@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.
|
102
app/node_modules/ext-name/package.json
generated
vendored
Normal file
102
app/node_modules/ext-name/package.json
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "ext-name@^5.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "ext-name",
|
||||
"name": "ext-name",
|
||||
"rawSpec": "^5.0.0",
|
||||
"spec": ">=5.0.0 <6.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\electron-dl"
|
||||
]
|
||||
],
|
||||
"_from": "ext-name@>=5.0.0 <6.0.0",
|
||||
"_id": "ext-name@5.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/ext-name",
|
||||
"_nodeVersion": "8.0.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/ext-name-5.0.0.tgz_1496851886409_0.42046912061050534"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
},
|
||||
"_npmVersion": "5.0.3",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "ext-name@^5.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "ext-name",
|
||||
"name": "ext-name",
|
||||
"rawSpec": "^5.0.0",
|
||||
"spec": ">=5.0.0 <6.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/electron-dl"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz",
|
||||
"_shasum": "70781981d183ee15d13993c8822045c506c8f0a6",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "ext-name@^5.0.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\electron-dl",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"url": "https://github.com/kevva"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kevva/ext-name/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"ext-list": "^2.0.0",
|
||||
"sort-keys-length": "^1.0.0"
|
||||
},
|
||||
"description": "Get the file extension and MIME type from a file",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==",
|
||||
"shasum": "70781981d183ee15d13993c8822045c506c8f0a6",
|
||||
"tarball": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "4d84e68c9876d1d0933bd832f60d84ed1eeac9da",
|
||||
"homepage": "https://github.com/kevva/ext-name#readme",
|
||||
"keywords": [
|
||||
"ext",
|
||||
"extname",
|
||||
"mime"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "ext-name",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kevva/ext-name.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "5.0.0"
|
||||
}
|
57
app/node_modules/ext-name/readme.md
generated
vendored
Normal file
57
app/node_modules/ext-name/readme.md
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
# ext-name [](https://travis-ci.org/kevva/ext-name)
|
||||
|
||||
> Get the file extension and MIME type from a file
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ext-name
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const extName = require('ext-name');
|
||||
|
||||
console.log(extName('foobar.tar'));
|
||||
//=> [{ext: 'tar', mime: 'application/x-tar'}]
|
||||
|
||||
console.log(extName.mime('application/x-tar'));
|
||||
//=> [{ext: 'tar', mime: 'application/x-tar'}]
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### extName(filename)
|
||||
|
||||
Returns an `Array` with objects with the file extension and MIME type.
|
||||
|
||||
#### filename
|
||||
|
||||
Type: `string`
|
||||
|
||||
Get the extension and MIME type from a filename.
|
||||
|
||||
### extName.mime(mimetype)
|
||||
|
||||
Returns an `Array` with objects with the file extension and MIME type.
|
||||
|
||||
#### mimetype
|
||||
|
||||
Type: `string`
|
||||
|
||||
Get the extension and MIME type from a MIME type.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
* [ext-name-cli](https://github.com/kevva/ext-name-cli) - CLI for this module
|
||||
* [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Kevin Mårtensson](https://github.com/kevva)
|
7
app/node_modules/is-plain-obj/index.js
generated
vendored
Normal file
7
app/node_modules/is-plain-obj/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
var toString = Object.prototype.toString;
|
||||
|
||||
module.exports = function (x) {
|
||||
var prototype;
|
||||
return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));
|
||||
};
|
21
app/node_modules/is-plain-obj/license
generated
vendored
Normal file
21
app/node_modules/is-plain-obj/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
100
app/node_modules/is-plain-obj/package.json
generated
vendored
Normal file
100
app/node_modules/is-plain-obj/package.json
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "is-plain-obj@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "is-plain-obj",
|
||||
"name": "is-plain-obj",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\sort-keys"
|
||||
]
|
||||
],
|
||||
"_from": "is-plain-obj@>=1.0.0 <2.0.0",
|
||||
"_id": "is-plain-obj@1.1.0",
|
||||
"_inCache": true,
|
||||
"_location": "/is-plain-obj",
|
||||
"_nodeVersion": "4.2.1",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.14.7",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "is-plain-obj@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "is-plain-obj",
|
||||
"name": "is-plain-obj",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/sort-keys"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
|
||||
"_shasum": "71a50c8429dfca773c92a390a4a03b39fcd51d3e",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "is-plain-obj@^1.0.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\sort-keys",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/is-plain-obj/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Check if a value is a plain object",
|
||||
"devDependencies": {
|
||||
"ava": "0.0.4"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "71a50c8429dfca773c92a390a4a03b39fcd51d3e",
|
||||
"tarball": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "b687098cc30d85bbec07f1633dee4c2d6acb1aa5",
|
||||
"homepage": "https://github.com/sindresorhus/is-plain-obj",
|
||||
"keywords": [
|
||||
"obj",
|
||||
"object",
|
||||
"is",
|
||||
"check",
|
||||
"test",
|
||||
"type",
|
||||
"plain",
|
||||
"vanilla",
|
||||
"pure",
|
||||
"simple"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "is-plain-obj",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/is-plain-obj.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
35
app/node_modules/is-plain-obj/readme.md
generated
vendored
Normal file
35
app/node_modules/is-plain-obj/readme.md
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# is-plain-obj [](https://travis-ci.org/sindresorhus/is-plain-obj)
|
||||
|
||||
> Check if a value is a plain object
|
||||
|
||||
An object is plain if it's created by either `{}`, `new Object()` or `Object.create(null)`.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save is-plain-obj
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isPlainObj = require('is-plain-obj');
|
||||
|
||||
isPlainObj({foo: 'bar'});
|
||||
//=> true
|
||||
|
||||
isPlainObj([1, 2, 3]);
|
||||
//=> false
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [is-obj](https://github.com/sindresorhus/is-obj) - Check if a value is an object
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
360
app/node_modules/mime-db/HISTORY.md
generated
vendored
Normal file
360
app/node_modules/mime-db/HISTORY.md
generated
vendored
Normal file
@@ -0,0 +1,360 @@
|
||||
1.32.0 / 2017-11-29
|
||||
===================
|
||||
|
||||
* Add new upstream MIME types
|
||||
* Update `text/hjson` to registered `application/hjson`
|
||||
* Add `text/shex` with extension `.shex`
|
||||
|
||||
1.31.0 / 2017-10-25
|
||||
===================
|
||||
|
||||
* Add `application/raml+yaml` with extension `.raml`
|
||||
* Add `application/wasm` with extension `.wasm`
|
||||
* Add new `font` type from IANA
|
||||
* Add new upstream font extensions
|
||||
* Add new upstream MIME types
|
||||
* Add extensions for JPEG-2000 images
|
||||
|
||||
1.30.0 / 2017-08-27
|
||||
===================
|
||||
|
||||
* Add `application/vnd.ms-outlook`
|
||||
* Add `application/x-arj`
|
||||
* Add extension `.mjs` to `application/javascript`
|
||||
* Add glTF types and extensions
|
||||
* Add new upstream MIME types
|
||||
* Add `text/x-org`
|
||||
* Add VirtualBox MIME types
|
||||
* Fix `source` records for `video/*` types that are IANA
|
||||
* Update `font/opentype` to registered `font/otf`
|
||||
|
||||
1.29.0 / 2017-07-10
|
||||
===================
|
||||
|
||||
* Add `application/fido.trusted-apps+json`
|
||||
* Add extension `.wadl` to `application/vnd.sun.wadl+xml`
|
||||
* Add new upstream MIME types
|
||||
* Add `UTF-8` as default charset for `text/css`
|
||||
|
||||
1.28.0 / 2017-05-14
|
||||
===================
|
||||
|
||||
* Add new upstream MIME types
|
||||
* Add extension `.gz` to `application/gzip`
|
||||
* Update extensions `.md` and `.markdown` to be `text/markdown`
|
||||
|
||||
1.27.0 / 2017-03-16
|
||||
===================
|
||||
|
||||
* Add new upstream MIME types
|
||||
* Add `image/apng` with extension `.apng`
|
||||
|
||||
1.26.0 / 2017-01-14
|
||||
===================
|
||||
|
||||
* Add new upstream MIME types
|
||||
* Add extension `.geojson` to `application/geo+json`
|
||||
|
||||
1.25.0 / 2016-11-11
|
||||
===================
|
||||
|
||||
* Add new upstream MIME types
|
||||
|
||||
1.24.0 / 2016-09-18
|
||||
===================
|
||||
|
||||
* Add `audio/mp3`
|
||||
* Add new upstream MIME types
|
||||
|
||||
1.23.0 / 2016-05-01
|
||||
===================
|
||||
|
||||
* Add new upstream MIME types
|
||||
* Add extension `.3gpp` to `audio/3gpp`
|
||||
|
||||
1.22.0 / 2016-02-15
|
||||
===================
|
||||
|
||||
* Add `text/slim`
|
||||
* Add extension `.rng` to `application/xml`
|
||||
* Add new upstream MIME types
|
||||
* Fix extension of `application/dash+xml` to be `.mpd`
|
||||
* Update primary extension to `.m4a` for `audio/mp4`
|
||||
|
||||
1.21.0 / 2016-01-06
|
||||
===================
|
||||
|
||||
* Add Google document types
|
||||
* Add new upstream MIME types
|
||||
|
||||
1.20.0 / 2015-11-10
|
||||
===================
|
||||
|
||||
* Add `text/x-suse-ymp`
|
||||
* Add new upstream MIME types
|
||||
|
||||
1.19.0 / 2015-09-17
|
||||
===================
|
||||
|
||||
* Add `application/vnd.apple.pkpass`
|
||||
* Add new upstream MIME types
|
||||
|
||||
1.18.0 / 2015-09-03
|
||||
===================
|
||||
|
||||
* Add new upstream MIME types
|
||||
|
||||
1.17.0 / 2015-08-13
|
||||
===================
|
||||
|
||||
* Add `application/x-msdos-program`
|
||||
* Add `audio/g711-0`
|
||||
* Add `image/vnd.mozilla.apng`
|
||||
* Add extension `.exe` to `application/x-msdos-program`
|
||||
|
||||
1.16.0 / 2015-07-29
|
||||
===================
|
||||
|
||||
* Add `application/vnd.uri-map`
|
||||
|
||||
1.15.0 / 2015-07-13
|
||||
===================
|
||||
|
||||
* Add `application/x-httpd-php`
|
||||
|
||||
1.14.0 / 2015-06-25
|
||||
===================
|
||||
|
||||
* Add `application/scim+json`
|
||||
* Add `application/vnd.3gpp.ussd+xml`
|
||||
* Add `application/vnd.biopax.rdf+xml`
|
||||
* Add `text/x-processing`
|
||||
|
||||
1.13.0 / 2015-06-07
|
||||
===================
|
||||
|
||||
* Add nginx as a source
|
||||
* Add `application/x-cocoa`
|
||||
* Add `application/x-java-archive-diff`
|
||||
* Add `application/x-makeself`
|
||||
* Add `application/x-perl`
|
||||
* Add `application/x-pilot`
|
||||
* Add `application/x-redhat-package-manager`
|
||||
* Add `application/x-sea`
|
||||
* Add `audio/x-m4a`
|
||||
* Add `audio/x-realaudio`
|
||||
* Add `image/x-jng`
|
||||
* Add `text/mathml`
|
||||
|
||||
1.12.0 / 2015-06-05
|
||||
===================
|
||||
|
||||
* Add `application/bdoc`
|
||||
* Add `application/vnd.hyperdrive+json`
|
||||
* Add `application/x-bdoc`
|
||||
* Add extension `.rtf` to `text/rtf`
|
||||
|
||||
1.11.0 / 2015-05-31
|
||||
===================
|
||||
|
||||
* Add `audio/wav`
|
||||
* Add `audio/wave`
|
||||
* Add extension `.litcoffee` to `text/coffeescript`
|
||||
* Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data`
|
||||
* Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install`
|
||||
|
||||
1.10.0 / 2015-05-19
|
||||
===================
|
||||
|
||||
* Add `application/vnd.balsamiq.bmpr`
|
||||
* Add `application/vnd.microsoft.portable-executable`
|
||||
* Add `application/x-ns-proxy-autoconfig`
|
||||
|
||||
1.9.1 / 2015-04-19
|
||||
==================
|
||||
|
||||
* Remove `.json` extension from `application/manifest+json`
|
||||
- This is causing bugs downstream
|
||||
|
||||
1.9.0 / 2015-04-19
|
||||
==================
|
||||
|
||||
* Add `application/manifest+json`
|
||||
* Add `application/vnd.micro+json`
|
||||
* Add `image/vnd.zbrush.pcx`
|
||||
* Add `image/x-ms-bmp`
|
||||
|
||||
1.8.0 / 2015-03-13
|
||||
==================
|
||||
|
||||
* Add `application/vnd.citationstyles.style+xml`
|
||||
* Add `application/vnd.fastcopy-disk-image`
|
||||
* Add `application/vnd.gov.sk.xmldatacontainer+xml`
|
||||
* Add extension `.jsonld` to `application/ld+json`
|
||||
|
||||
1.7.0 / 2015-02-08
|
||||
==================
|
||||
|
||||
* Add `application/vnd.gerber`
|
||||
* Add `application/vnd.msa-disk-image`
|
||||
|
||||
1.6.1 / 2015-02-05
|
||||
==================
|
||||
|
||||
* Community extensions ownership transferred from `node-mime`
|
||||
|
||||
1.6.0 / 2015-01-29
|
||||
==================
|
||||
|
||||
* Add `application/jose`
|
||||
* Add `application/jose+json`
|
||||
* Add `application/json-seq`
|
||||
* Add `application/jwk+json`
|
||||
* Add `application/jwk-set+json`
|
||||
* Add `application/jwt`
|
||||
* Add `application/rdap+json`
|
||||
* Add `application/vnd.gov.sk.e-form+xml`
|
||||
* Add `application/vnd.ims.imsccv1p3`
|
||||
|
||||
1.5.0 / 2014-12-30
|
||||
==================
|
||||
|
||||
* Add `application/vnd.oracle.resource+json`
|
||||
* Fix various invalid MIME type entries
|
||||
- `application/mbox+xml`
|
||||
- `application/oscp-response`
|
||||
- `application/vwg-multiplexed`
|
||||
- `audio/g721`
|
||||
|
||||
1.4.0 / 2014-12-21
|
||||
==================
|
||||
|
||||
* Add `application/vnd.ims.imsccv1p2`
|
||||
* Fix various invalid MIME type entries
|
||||
- `application/vnd-acucobol`
|
||||
- `application/vnd-curl`
|
||||
- `application/vnd-dart`
|
||||
- `application/vnd-dxr`
|
||||
- `application/vnd-fdf`
|
||||
- `application/vnd-mif`
|
||||
- `application/vnd-sema`
|
||||
- `application/vnd-wap-wmlc`
|
||||
- `application/vnd.adobe.flash-movie`
|
||||
- `application/vnd.dece-zip`
|
||||
- `application/vnd.dvb_service`
|
||||
- `application/vnd.micrografx-igx`
|
||||
- `application/vnd.sealed-doc`
|
||||
- `application/vnd.sealed-eml`
|
||||
- `application/vnd.sealed-mht`
|
||||
- `application/vnd.sealed-ppt`
|
||||
- `application/vnd.sealed-tiff`
|
||||
- `application/vnd.sealed-xls`
|
||||
- `application/vnd.sealedmedia.softseal-html`
|
||||
- `application/vnd.sealedmedia.softseal-pdf`
|
||||
- `application/vnd.wap-slc`
|
||||
- `application/vnd.wap-wbxml`
|
||||
- `audio/vnd.sealedmedia.softseal-mpeg`
|
||||
- `image/vnd-djvu`
|
||||
- `image/vnd-svf`
|
||||
- `image/vnd-wap-wbmp`
|
||||
- `image/vnd.sealed-png`
|
||||
- `image/vnd.sealedmedia.softseal-gif`
|
||||
- `image/vnd.sealedmedia.softseal-jpg`
|
||||
- `model/vnd-dwf`
|
||||
- `model/vnd.parasolid.transmit-binary`
|
||||
- `model/vnd.parasolid.transmit-text`
|
||||
- `text/vnd-a`
|
||||
- `text/vnd-curl`
|
||||
- `text/vnd.wap-wml`
|
||||
* Remove example template MIME types
|
||||
- `application/example`
|
||||
- `audio/example`
|
||||
- `image/example`
|
||||
- `message/example`
|
||||
- `model/example`
|
||||
- `multipart/example`
|
||||
- `text/example`
|
||||
- `video/example`
|
||||
|
||||
1.3.1 / 2014-12-16
|
||||
==================
|
||||
|
||||
* Fix missing extensions
|
||||
- `application/json5`
|
||||
- `text/hjson`
|
||||
|
||||
1.3.0 / 2014-12-07
|
||||
==================
|
||||
|
||||
* Add `application/a2l`
|
||||
* Add `application/aml`
|
||||
* Add `application/atfx`
|
||||
* Add `application/atxml`
|
||||
* Add `application/cdfx+xml`
|
||||
* Add `application/dii`
|
||||
* Add `application/json5`
|
||||
* Add `application/lxf`
|
||||
* Add `application/mf4`
|
||||
* Add `application/vnd.apache.thrift.compact`
|
||||
* Add `application/vnd.apache.thrift.json`
|
||||
* Add `application/vnd.coffeescript`
|
||||
* Add `application/vnd.enphase.envoy`
|
||||
* Add `application/vnd.ims.imsccv1p1`
|
||||
* Add `text/csv-schema`
|
||||
* Add `text/hjson`
|
||||
* Add `text/markdown`
|
||||
* Add `text/yaml`
|
||||
|
||||
1.2.0 / 2014-11-09
|
||||
==================
|
||||
|
||||
* Add `application/cea`
|
||||
* Add `application/dit`
|
||||
* Add `application/vnd.gov.sk.e-form+zip`
|
||||
* Add `application/vnd.tmd.mediaflex.api+xml`
|
||||
* Type `application/epub+zip` is now IANA-registered
|
||||
|
||||
1.1.2 / 2014-10-23
|
||||
==================
|
||||
|
||||
* Rebuild database for `application/x-www-form-urlencoded` change
|
||||
|
||||
1.1.1 / 2014-10-20
|
||||
==================
|
||||
|
||||
* Mark `application/x-www-form-urlencoded` as compressible.
|
||||
|
||||
1.1.0 / 2014-09-28
|
||||
==================
|
||||
|
||||
* Add `application/font-woff2`
|
||||
|
||||
1.0.3 / 2014-09-25
|
||||
==================
|
||||
|
||||
* Fix engine requirement in package
|
||||
|
||||
1.0.2 / 2014-09-25
|
||||
==================
|
||||
|
||||
* Add `application/coap-group+json`
|
||||
* Add `application/dcd`
|
||||
* Add `application/vnd.apache.thrift.binary`
|
||||
* Add `image/vnd.tencent.tap`
|
||||
* Mark all JSON-derived types as compressible
|
||||
* Update `text/vtt` data
|
||||
|
||||
1.0.1 / 2014-08-30
|
||||
==================
|
||||
|
||||
* Fix extension ordering
|
||||
|
||||
1.0.0 / 2014-08-30
|
||||
==================
|
||||
|
||||
* Add `application/atf`
|
||||
* Add `application/merge-patch+json`
|
||||
* Add `multipart/x-mixed-replace`
|
||||
* Add `source: 'apache'` metadata
|
||||
* Add `source: 'iana'` metadata
|
||||
* Remove badly-assumed charset data
|
22
app/node_modules/mime-db/LICENSE
generated
vendored
Normal file
22
app/node_modules/mime-db/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong me@jongleberry.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.
|
94
app/node_modules/mime-db/README.md
generated
vendored
Normal file
94
app/node_modules/mime-db/README.md
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
# mime-db
|
||||
|
||||
[![NPM Version][npm-version-image]][npm-url]
|
||||
[![NPM Downloads][npm-downloads-image]][npm-url]
|
||||
[![Node.js Version][node-image]][node-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Coverage Status][coveralls-image]][coveralls-url]
|
||||
|
||||
This is a database of all mime types.
|
||||
It consists of a single, public JSON file and does not include any logic,
|
||||
allowing it to remain as un-opinionated as possible with an API.
|
||||
It aggregates data from the following sources:
|
||||
|
||||
- http://www.iana.org/assignments/media-types/media-types.xhtml
|
||||
- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
|
||||
- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install mime-db
|
||||
```
|
||||
|
||||
### Database Download
|
||||
|
||||
If you're crazy enough to use this in the browser, you can just grab the
|
||||
JSON file using [RawGit](https://rawgit.com/). It is recommended to replace
|
||||
`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the
|
||||
JSON format may change in the future.
|
||||
|
||||
```
|
||||
https://cdn.rawgit.com/jshttp/mime-db/master/db.json
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var db = require('mime-db');
|
||||
|
||||
// grab data on .js files
|
||||
var data = db['application/javascript'];
|
||||
```
|
||||
|
||||
## Data Structure
|
||||
|
||||
The JSON file is a map lookup for lowercased mime types.
|
||||
Each mime type has the following properties:
|
||||
|
||||
- `.source` - where the mime type is defined.
|
||||
If not set, it's probably a custom media type.
|
||||
- `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
|
||||
- `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
|
||||
- `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)
|
||||
- `.extensions[]` - known extensions associated with this mime type.
|
||||
- `.compressible` - whether a file of this type can be gzipped.
|
||||
- `.charset` - the default charset associated with this type, if any.
|
||||
|
||||
If unknown, every property could be `undefined`.
|
||||
|
||||
## Contributing
|
||||
|
||||
To edit the database, only make PRs against `src/custom.json` or
|
||||
`src/custom-suffix.json`.
|
||||
|
||||
The `src/custom.json` file is a JSON object with the MIME type as the keys
|
||||
and the values being an object with the following keys:
|
||||
|
||||
- `compressible` - leave out if you don't know, otherwise `true`/`false` for
|
||||
if the data represented by the time is typically compressible.
|
||||
- `extensions` - include an array of file extensions that are associated with
|
||||
the type.
|
||||
- `notes` - human-readable notes about the type, typically what the type is.
|
||||
- `sources` - include an array of URLs of where the MIME type and the associated
|
||||
extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source);
|
||||
links to type aggregating sites and Wikipedia are _not acceptible_.
|
||||
|
||||
To update the build, run `npm run build`.
|
||||
|
||||
## Adding Custom Media Types
|
||||
|
||||
The best way to get new media types included in this library is to register
|
||||
them with the IANA. The community registration procedure is outlined in
|
||||
[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
|
||||
registered with the IANA are automatically pulled into this library.
|
||||
|
||||
[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg
|
||||
[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg
|
||||
[npm-url]: https://npmjs.org/package/mime-db
|
||||
[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg
|
||||
[travis-url]: https://travis-ci.org/jshttp/mime-db
|
||||
[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
|
||||
[node-image]: https://img.shields.io/node/v/mime-db.svg
|
||||
[node-url]: https://nodejs.org/en/download/
|
7047
app/node_modules/mime-db/db.json
generated
vendored
Normal file
7047
app/node_modules/mime-db/db.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
app/node_modules/mime-db/index.js
generated
vendored
Normal file
11
app/node_modules/mime-db/index.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/*!
|
||||
* mime-db
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
*/
|
||||
|
||||
module.exports = require('./db.json')
|
141
app/node_modules/mime-db/package.json
generated
vendored
Normal file
141
app/node_modules/mime-db/package.json
generated
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "mime-db@^1.28.0",
|
||||
"scope": null,
|
||||
"escapedName": "mime-db",
|
||||
"name": "mime-db",
|
||||
"rawSpec": "^1.28.0",
|
||||
"spec": ">=1.28.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-list"
|
||||
]
|
||||
],
|
||||
"_from": "mime-db@>=1.28.0 <2.0.0",
|
||||
"_id": "mime-db@1.32.0",
|
||||
"_inCache": true,
|
||||
"_location": "/mime-db",
|
||||
"_nodeVersion": "6.12.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "s3://npm-registry-packages",
|
||||
"tmp": "tmp/mime-db-1.32.0.tgz_1511989647467_0.298956407699734"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "dougwilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
"_npmVersion": "5.5.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "mime-db@^1.28.0",
|
||||
"scope": null,
|
||||
"escapedName": "mime-db",
|
||||
"name": "mime-db",
|
||||
"rawSpec": "^1.28.0",
|
||||
"spec": ">=1.28.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ext-list"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.32.0.tgz",
|
||||
"_shasum": "485b3848b01a3cda5f968b4882c0771e58e09414",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "mime-db@^1.28.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-list",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jshttp/mime-db/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Douglas Christopher Wilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Ong",
|
||||
"email": "me@jongleberry.com",
|
||||
"url": "http://jongleberry.com"
|
||||
},
|
||||
{
|
||||
"name": "Robert Kieffer",
|
||||
"email": "robert@broofa.com",
|
||||
"url": "http://github.com/broofa"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "Media Type Database",
|
||||
"devDependencies": {
|
||||
"bluebird": "3.5.1",
|
||||
"co": "4.6.0",
|
||||
"cogent": "1.0.1",
|
||||
"csv-parse": "1.3.1",
|
||||
"eslint": "3.19.0",
|
||||
"eslint-config-standard": "10.2.1",
|
||||
"eslint-plugin-import": "2.8.0",
|
||||
"eslint-plugin-node": "5.2.1",
|
||||
"eslint-plugin-promise": "3.6.0",
|
||||
"eslint-plugin-standard": "3.0.1",
|
||||
"gnode": "0.1.2",
|
||||
"mocha": "1.21.5",
|
||||
"nyc": "11.3.0",
|
||||
"raw-body": "2.3.2",
|
||||
"stream-to-array": "2.3.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-+ZWo/xZN40Tt6S+HyakUxnSOgff+JEdaneLWIm0Z6LmpCn5DMcZntLyUY5c/rTDog28LhXLKOUZKoTxTCAdBVw==",
|
||||
"shasum": "485b3848b01a3cda5f968b4882c0771e58e09414",
|
||||
"tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.32.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
},
|
||||
"files": [
|
||||
"HISTORY.md",
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"db.json",
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "555f55537d688a6ba935253d8d36bf270a4a0ffa",
|
||||
"homepage": "https://github.com/jshttp/mime-db#readme",
|
||||
"keywords": [
|
||||
"mime",
|
||||
"db",
|
||||
"type",
|
||||
"types",
|
||||
"database",
|
||||
"charset",
|
||||
"charsets"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "dougwilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
{
|
||||
"name": "jongleberry",
|
||||
"email": "jonathanrichardong@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "mime-db",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/jshttp/mime-db.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node scripts/build",
|
||||
"fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx",
|
||||
"lint": "eslint .",
|
||||
"test": "mocha --reporter spec --bail --check-leaks test/",
|
||||
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
||||
"test-travis": "nyc --reporter=text npm test",
|
||||
"update": "npm run fetch && npm run build"
|
||||
},
|
||||
"version": "1.32.0"
|
||||
}
|
17
app/node_modules/modify-filename/index.js
generated
vendored
Normal file
17
app/node_modules/modify-filename/index.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
var path = require('path');
|
||||
|
||||
module.exports = function modifyFilename(pth, modifier) {
|
||||
if (arguments.length !== 2) {
|
||||
throw new Error('`path` and `modifier` required');
|
||||
}
|
||||
|
||||
if (Array.isArray(pth)) {
|
||||
return pth.map(function (el) {
|
||||
return modifyFilename(el, modifier);
|
||||
});
|
||||
}
|
||||
|
||||
var ext = path.extname(pth);
|
||||
return path.join(path.dirname(pth), modifier(path.basename(pth, ext), ext));
|
||||
};
|
21
app/node_modules/modify-filename/license
generated
vendored
Normal file
21
app/node_modules/modify-filename/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
97
app/node_modules/modify-filename/package.json
generated
vendored
Normal file
97
app/node_modules/modify-filename/package.json
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "modify-filename@^1.1.0",
|
||||
"scope": null,
|
||||
"escapedName": "modify-filename",
|
||||
"name": "modify-filename",
|
||||
"rawSpec": "^1.1.0",
|
||||
"spec": ">=1.1.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\unused-filename"
|
||||
]
|
||||
],
|
||||
"_from": "modify-filename@>=1.1.0 <2.0.0",
|
||||
"_id": "modify-filename@1.1.0",
|
||||
"_inCache": true,
|
||||
"_location": "/modify-filename",
|
||||
"_nodeVersion": "0.12.5",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.11.2",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "modify-filename@^1.1.0",
|
||||
"scope": null,
|
||||
"escapedName": "modify-filename",
|
||||
"name": "modify-filename",
|
||||
"rawSpec": "^1.1.0",
|
||||
"spec": ">=1.1.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/unused-filename"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/modify-filename/-/modify-filename-1.1.0.tgz",
|
||||
"_shasum": "9a2dec83806fbb2d975f22beec859ca26b393aa1",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "modify-filename@^1.1.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\unused-filename",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/modify-filename/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Modify the filename in a path",
|
||||
"devDependencies": {
|
||||
"ava": "0.0.4"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9a2dec83806fbb2d975f22beec859ca26b393aa1",
|
||||
"tarball": "https://registry.npmjs.org/modify-filename/-/modify-filename-1.1.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "d672c2faf0dd26991cd679953347b063c3e3dd7a",
|
||||
"homepage": "https://github.com/sindresorhus/modify-filename",
|
||||
"keywords": [
|
||||
"modify",
|
||||
"change",
|
||||
"replace",
|
||||
"filename",
|
||||
"file",
|
||||
"name",
|
||||
"path"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "modify-filename",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/modify-filename.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
32
app/node_modules/modify-filename/readme.md
generated
vendored
Normal file
32
app/node_modules/modify-filename/readme.md
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# modify-filename [](https://travis-ci.org/sindresorhus/modify-filename)
|
||||
|
||||
> Modify the filename in a path
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save modify-filename
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var modifyFilename = require('modify-filename');
|
||||
|
||||
modifyFilename('src/unicorn.png', function (filename, extension) {
|
||||
return filename + '-rainbow' + extension;
|
||||
});
|
||||
//=> 'src/unicorn-rainbow.png'
|
||||
|
||||
modifyFilename(['src/unicorn.png', 'src/pony.png'], function (filename, extension) {
|
||||
return filename + '-rainbow' + extension;
|
||||
});
|
||||
//=> ['src/unicorn-rainbow.png', 'src/pony-rainbow.png']
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
17
app/node_modules/path-exists/index.js
generated
vendored
Normal file
17
app/node_modules/path-exists/index.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
const fs = require('fs');
|
||||
|
||||
module.exports = fp => new Promise(resolve => {
|
||||
fs.access(fp, err => {
|
||||
resolve(!err);
|
||||
});
|
||||
});
|
||||
|
||||
module.exports.sync = fp => {
|
||||
try {
|
||||
fs.accessSync(fp);
|
||||
return true;
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
};
|
21
app/node_modules/path-exists/license
generated
vendored
Normal file
21
app/node_modules/path-exists/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
108
app/node_modules/path-exists/package.json
generated
vendored
Normal file
108
app/node_modules/path-exists/package.json
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "path-exists@^3.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "path-exists",
|
||||
"name": "path-exists",
|
||||
"rawSpec": "^3.0.0",
|
||||
"spec": ">=3.0.0 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\unused-filename"
|
||||
]
|
||||
],
|
||||
"_from": "path-exists@>=3.0.0 <4.0.0",
|
||||
"_id": "path-exists@3.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/path-exists",
|
||||
"_nodeVersion": "4.4.2",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/path-exists-3.0.0.tgz_1462103091696_0.5805528531782329"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.8.9",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "path-exists@^3.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "path-exists",
|
||||
"name": "path-exists",
|
||||
"rawSpec": "^3.0.0",
|
||||
"spec": ">=3.0.0 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/unused-filename"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
||||
"_shasum": "ce0ebeaa5f78cb18925ea7d810d7b59b010fd515",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "path-exists@^3.0.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\unused-filename",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/path-exists/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Check if a path exists",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "ce0ebeaa5f78cb18925ea7d810d7b59b010fd515",
|
||||
"tarball": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "4696c60a8b2b9ac61902aa9eab7cb326ab6005c8",
|
||||
"homepage": "https://github.com/sindresorhus/path-exists#readme",
|
||||
"keywords": [
|
||||
"path",
|
||||
"exists",
|
||||
"exist",
|
||||
"file",
|
||||
"filepath",
|
||||
"fs",
|
||||
"filesystem",
|
||||
"file-system",
|
||||
"access",
|
||||
"stat"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "path-exists",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/path-exists.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "3.0.0",
|
||||
"xo": {
|
||||
"esnext": true
|
||||
}
|
||||
}
|
50
app/node_modules/path-exists/readme.md
generated
vendored
Normal file
50
app/node_modules/path-exists/readme.md
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# path-exists [](https://travis-ci.org/sindresorhus/path-exists)
|
||||
|
||||
> Check if a path exists
|
||||
|
||||
Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
|
||||
|
||||
Never use this before handling a file though:
|
||||
|
||||
> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save path-exists
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
const pathExists = require('path-exists');
|
||||
|
||||
pathExists('foo.js').then(exists => {
|
||||
console.log(exists);
|
||||
//=> true
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### pathExists(path)
|
||||
|
||||
Returns a promise for a boolean of whether the path exists.
|
||||
|
||||
### pathExists.sync(path)
|
||||
|
||||
Returns a boolean of whether the path exists.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
22
app/node_modules/pupa/index.js
generated
vendored
Normal file
22
app/node_modules/pupa/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
module.exports = (tpl, data) => {
|
||||
if (typeof tpl !== 'string') {
|
||||
throw new TypeError(`Expected a string in the first argument, got ${typeof tpl}`);
|
||||
}
|
||||
|
||||
if (typeof data !== 'object') {
|
||||
throw new TypeError(`Expected an Object/Array in the second argument, got ${typeof data}`);
|
||||
}
|
||||
|
||||
const re = /{(.*?)}/g;
|
||||
|
||||
return tpl.replace(re, (_, key) => {
|
||||
let ret = data;
|
||||
|
||||
for (const prop of key.split('.')) {
|
||||
ret = ret ? ret[prop] : '';
|
||||
}
|
||||
|
||||
return ret || '';
|
||||
});
|
||||
};
|
21
app/node_modules/pupa/license
generated
vendored
Normal file
21
app/node_modules/pupa/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
117
app/node_modules/pupa/package.json
generated
vendored
Normal file
117
app/node_modules/pupa/package.json
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "pupa@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "pupa",
|
||||
"name": "pupa",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\electron-dl"
|
||||
]
|
||||
],
|
||||
"_from": "pupa@>=1.0.0 <2.0.0",
|
||||
"_id": "pupa@1.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/pupa",
|
||||
"_nodeVersion": "4.6.2",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/pupa-1.0.0.tgz_1484024976343_0.21447648899629712"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.15.11",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "pupa@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "pupa",
|
||||
"name": "pupa",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/electron-dl"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/pupa/-/pupa-1.0.0.tgz",
|
||||
"_shasum": "9a9568a5af7e657b8462a6e9d5328743560ceff6",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "pupa@^1.0.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\electron-dl",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/pupa/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Simple micro templating",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9a9568a5af7e657b8462a6e9d5328743560ceff6",
|
||||
"tarball": "https://registry.npmjs.org/pupa/-/pupa-1.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "05a5d7e3cbe99cb303b6d0fda6984c45e59ec45d",
|
||||
"homepage": "https://github.com/sindresorhus/pupa#readme",
|
||||
"keywords": [
|
||||
"string",
|
||||
"formatting",
|
||||
"template",
|
||||
"object",
|
||||
"format",
|
||||
"interpolate",
|
||||
"interpolation",
|
||||
"templating",
|
||||
"str",
|
||||
"obj",
|
||||
"tpl",
|
||||
"expand",
|
||||
"simple",
|
||||
"replace",
|
||||
"placeholders",
|
||||
"values",
|
||||
"fmt",
|
||||
"transform",
|
||||
"micro"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "pupa",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/pupa.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"xo": {
|
||||
"esnext": true
|
||||
}
|
||||
}
|
59
app/node_modules/pupa/readme.md
generated
vendored
Normal file
59
app/node_modules/pupa/readme.md
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
# pupa [](https://travis-ci.org/sindresorhus/pupa)
|
||||
|
||||
> Simple micro templating
|
||||
|
||||
Useful when all you need is to fill in some placeholders.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save pupa
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const pupa = require('pupa');
|
||||
|
||||
pupa('The mobile number of {name} is {phone.mobile}', {
|
||||
name: 'Sindre',
|
||||
phone: {
|
||||
mobile: '609 24 363'
|
||||
}
|
||||
});
|
||||
//=> 'The mobile number of Sindre is 609 24 363'
|
||||
|
||||
pupa('I like {0} and {1}', ['🦄', '🐮']);
|
||||
//=> 'I like 🦄 and 🐮'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### pupa(template, data)
|
||||
|
||||
#### template
|
||||
|
||||
Type: `string`
|
||||
|
||||
Text with placeholders for `data` properties.
|
||||
|
||||
#### data
|
||||
|
||||
Type: `Object` `Array`
|
||||
|
||||
Data to interpolate into `template`.
|
||||
|
||||
|
||||
## FAQ
|
||||
|
||||
### What about template literals?
|
||||
|
||||
Template literals expand on creation. This module expands the template on execution, which can be useful if either or both template and data are lazily created or user-supplied.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
19
app/node_modules/sort-keys-length/LICENSE.md
generated
vendored
Normal file
19
app/node_modules/sort-keys-length/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) Kevin Mårtensson
|
||||
|
||||
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.
|
35
app/node_modules/sort-keys-length/README.md
generated
vendored
Normal file
35
app/node_modules/sort-keys-length/README.md
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# sort-keys-length [](http://travis-ci.org/kevva/sort-keys-length)
|
||||
|
||||
> Sort object keys by length
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save sort-keys-length
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var sortKeysLength = require('sort-keys-length');
|
||||
|
||||
sortKeysLength.asc({ ab: 'x', a: 'y', abc: 'z' });
|
||||
//=> { a: 'y', ab: 'x', abc: 'z' }
|
||||
|
||||
sortKeysLength.desc({ ab: 'x', a: 'y', abc: 'z' });
|
||||
//=> { abc: 'z', ab: 'x', a: 'y' }
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### .asc
|
||||
|
||||
Ascending sort.
|
||||
|
||||
### .desc
|
||||
|
||||
Descending sort.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Kevin Mårtensson](https://github.com/kevva)
|
22
app/node_modules/sort-keys-length/index.js
generated
vendored
Normal file
22
app/node_modules/sort-keys-length/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var sortKeys = require('sort-keys');
|
||||
|
||||
/**
|
||||
* Sort object keys by length
|
||||
*
|
||||
* @param obj
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports.desc = function (obj) {
|
||||
return sortKeys(obj, function (a, b) {
|
||||
return b.length - a.length;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.asc = function (obj) {
|
||||
return sortKeys(obj, function (a, b) {
|
||||
return a.length - b.length;
|
||||
});
|
||||
}
|
95
app/node_modules/sort-keys-length/package.json
generated
vendored
Normal file
95
app/node_modules/sort-keys-length/package.json
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "sort-keys-length@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "sort-keys-length",
|
||||
"name": "sort-keys-length",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-name"
|
||||
]
|
||||
],
|
||||
"_from": "sort-keys-length@>=1.0.0 <2.0.0",
|
||||
"_id": "sort-keys-length@1.0.1",
|
||||
"_inCache": true,
|
||||
"_location": "/sort-keys-length",
|
||||
"_nodeVersion": "1.0.3",
|
||||
"_npmUser": {
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.2.0",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "sort-keys-length@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "sort-keys-length",
|
||||
"name": "sort-keys-length",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ext-name"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz",
|
||||
"_shasum": "9cb6f4f4e9e48155a6aa0671edd336ff1479a188",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "sort-keys-length@^1.0.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-name",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"url": "https://github.com/kevva"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kevva/sort-keys-length/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"sort-keys": "^1.0.0"
|
||||
},
|
||||
"description": "Sort objecy keys by length",
|
||||
"devDependencies": {
|
||||
"ava": "^0.0.4"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9cb6f4f4e9e48155a6aa0671edd336ff1479a188",
|
||||
"tarball": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "745e75f1ca4bcb50f120a899afd1508d0b6c7a31",
|
||||
"homepage": "https://github.com/kevva/sort-keys-length",
|
||||
"keywords": [
|
||||
"length",
|
||||
"object",
|
||||
"sort"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "sort-keys-length",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kevva/sort-keys-length.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
44
app/node_modules/sort-keys/index.js
generated
vendored
Normal file
44
app/node_modules/sort-keys/index.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
'use strict';
|
||||
var isPlainObj = require('is-plain-obj');
|
||||
|
||||
module.exports = function (obj, opts) {
|
||||
if (!isPlainObj(obj)) {
|
||||
throw new TypeError('Expected a plain object');
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
// DEPRECATED
|
||||
if (typeof opts === 'function') {
|
||||
opts = {compare: opts};
|
||||
}
|
||||
|
||||
var deep = opts.deep;
|
||||
var seenInput = [];
|
||||
var seenOutput = [];
|
||||
|
||||
var sortKeys = function (x) {
|
||||
var seenIndex = seenInput.indexOf(x);
|
||||
|
||||
if (seenIndex !== -1) {
|
||||
return seenOutput[seenIndex];
|
||||
}
|
||||
|
||||
var ret = {};
|
||||
var keys = Object.keys(x).sort(opts.compare);
|
||||
|
||||
seenInput.push(x);
|
||||
seenOutput.push(ret);
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
var val = x[key];
|
||||
|
||||
ret[key] = deep && isPlainObj(val) ? sortKeys(val) : val;
|
||||
}
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
||||
return sortKeys(obj);
|
||||
};
|
21
app/node_modules/sort-keys/license
generated
vendored
Normal file
21
app/node_modules/sort-keys/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
107
app/node_modules/sort-keys/package.json
generated
vendored
Normal file
107
app/node_modules/sort-keys/package.json
generated
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "sort-keys@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "sort-keys",
|
||||
"name": "sort-keys",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\sort-keys-length"
|
||||
]
|
||||
],
|
||||
"_from": "sort-keys@>=1.0.0 <2.0.0",
|
||||
"_id": "sort-keys@1.1.2",
|
||||
"_inCache": true,
|
||||
"_location": "/sort-keys",
|
||||
"_nodeVersion": "4.4.2",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/sort-keys-1.1.2.tgz_1463546673008_0.6780793990474194"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.15.0",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "sort-keys@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "sort-keys",
|
||||
"name": "sort-keys",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/sort-keys-length"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz",
|
||||
"_shasum": "441b6d4d346798f1b4e49e8920adfba0e543f9ad",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "sort-keys@^1.0.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\sort-keys-length",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/sort-keys/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-plain-obj": "^1.0.0"
|
||||
},
|
||||
"description": "Sort the keys of an object",
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "441b6d4d346798f1b4e49e8920adfba0e543f9ad",
|
||||
"tarball": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "daad509046075f30586f295eefa36bab18384eae",
|
||||
"homepage": "https://github.com/sindresorhus/sort-keys#readme",
|
||||
"keywords": [
|
||||
"sort",
|
||||
"object",
|
||||
"keys",
|
||||
"obj",
|
||||
"key",
|
||||
"stable",
|
||||
"deterministic",
|
||||
"deep",
|
||||
"recursive",
|
||||
"recursively"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "sort-keys",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/sort-keys.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && mocha"
|
||||
},
|
||||
"version": "1.1.2"
|
||||
}
|
60
app/node_modules/sort-keys/readme.md
generated
vendored
Normal file
60
app/node_modules/sort-keys/readme.md
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
# sort-keys [](https://travis-ci.org/sindresorhus/sort-keys)
|
||||
|
||||
> Sort the keys of an object
|
||||
|
||||
Useful to get a deterministically ordered object, as the order of keys can vary between engines.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save sort-keys
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const sortKeys = require('sort-keys');
|
||||
|
||||
sortKeys({c: 0, a: 0, b: 0});
|
||||
//=> {a: 0, b: 0, c: 0}
|
||||
|
||||
sortKeys({b: {b: 0, a: 0}, a: 0}, {deep: true});
|
||||
//=> {a: 0, b: {a: 0, b: 0}}
|
||||
|
||||
sortKeys({c: 0, a: 0, b: 0}, {
|
||||
compare: (a, b) => -a.localeCompare(b)
|
||||
});
|
||||
//=> {c: 0, b: 0, a: 0}
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### sortKeys(input, [options])
|
||||
|
||||
Returns a new object with sorted keys.
|
||||
|
||||
#### input
|
||||
|
||||
Type: `Object`
|
||||
|
||||
#### options
|
||||
|
||||
##### deep
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Recursively sort keys.
|
||||
|
||||
##### compare
|
||||
|
||||
Type: `Function`
|
||||
|
||||
[Compare function.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
20
app/node_modules/unused-filename/index.js
generated
vendored
Normal file
20
app/node_modules/unused-filename/index.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
const pathExists = require('path-exists');
|
||||
const modifyFilename = require('modify-filename');
|
||||
|
||||
const incrementer = fp => {
|
||||
let i = 0;
|
||||
return () => modifyFilename(fp, (filename, ext) => `${filename} (${++i})${ext}`);
|
||||
};
|
||||
|
||||
module.exports = fp => {
|
||||
const getFp = incrementer(fp);
|
||||
const find = newFp => pathExists(newFp).then(x => x ? find(getFp()) : newFp);
|
||||
return find(fp);
|
||||
};
|
||||
|
||||
module.exports.sync = fp => {
|
||||
const getFp = incrementer(fp);
|
||||
const find = newFp => pathExists.sync(newFp) ? find(getFp()) : newFp;
|
||||
return find(fp);
|
||||
};
|
21
app/node_modules/unused-filename/license
generated
vendored
Normal file
21
app/node_modules/unused-filename/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
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.
|
111
app/node_modules/unused-filename/package.json
generated
vendored
Normal file
111
app/node_modules/unused-filename/package.json
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "unused-filename@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "unused-filename",
|
||||
"name": "unused-filename",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\electron-dl"
|
||||
]
|
||||
],
|
||||
"_from": "unused-filename@>=1.0.0 <2.0.0",
|
||||
"_id": "unused-filename@1.0.0",
|
||||
"_inCache": true,
|
||||
"_location": "/unused-filename",
|
||||
"_nodeVersion": "6.9.1",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-18-east.internal.npmjs.com",
|
||||
"tmp": "tmp/unused-filename-1.0.0.tgz_1494950679307_0.34259403264150023"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"_npmVersion": "3.10.8",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "unused-filename@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "unused-filename",
|
||||
"name": "unused-filename",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/electron-dl"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/unused-filename/-/unused-filename-1.0.0.tgz",
|
||||
"_shasum": "d340880f71ae2115ebaa1325bef05cc6684469c6",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "unused-filename@^1.0.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\electron-dl",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/unused-filename/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"modify-filename": "^1.1.0",
|
||||
"path-exists": "^3.0.0"
|
||||
},
|
||||
"description": "Get an unused filename by appending a number if it exists: `file.txt` → `file (1).txt`",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "d340880f71ae2115ebaa1325bef05cc6684469c6",
|
||||
"tarball": "https://registry.npmjs.org/unused-filename/-/unused-filename-1.0.0.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "e58bdb5e6d81af48439c9f9b04f5ee9d6aaac89c",
|
||||
"homepage": "https://github.com/sindresorhus/unused-filename#readme",
|
||||
"keywords": [
|
||||
"unused",
|
||||
"filename",
|
||||
"filepath",
|
||||
"file",
|
||||
"name",
|
||||
"available",
|
||||
"safe",
|
||||
"unique",
|
||||
"usable",
|
||||
"filesystem",
|
||||
"fs",
|
||||
"exists",
|
||||
"path"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "unused-filename",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/unused-filename.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
56
app/node_modules/unused-filename/readme.md
generated
vendored
Normal file
56
app/node_modules/unused-filename/readme.md
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
# unused-filename [](https://travis-ci.org/sindresorhus/unused-filename)
|
||||
|
||||
> Get an unused filename by appending a number if it exists: `file.txt` → `file (1).txt`
|
||||
|
||||
Useful for safely writing, copying, moving files without overwriting existing files.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save unused-filename
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
.
|
||||
├── rainbow (1).txt
|
||||
├── rainbow.txt
|
||||
└── unicorn.txt
|
||||
```
|
||||
|
||||
```js
|
||||
const unusedFilename = require('unused-filename');
|
||||
|
||||
unusedFilename('rainbow.txt').then(filename => {
|
||||
console.log(filename);
|
||||
//=> 'rainbow (2).txt'
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### unusedFilename(filepath)
|
||||
|
||||
Returns a `Promise<string>`.
|
||||
|
||||
### unusedFilename.sync(filepath)
|
||||
|
||||
Returns a `string`.
|
||||
|
||||
#### filepath
|
||||
|
||||
Type: `string`
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [filenamify](https://github.com/sindresorhus/filenamify) - Convert a string to a valid safe filename
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
Reference in New Issue
Block a user