Izmjenjena struktura, dodan backand

This commit is contained in:
GotPPay
2017-10-16 11:19:46 +02:00
parent 1ec88afacb
commit 048e32c4aa
37153 changed files with 2975854 additions and 1 deletions

4
web/node_modules/jest-changed-files/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,4 @@
**/__mocks__/**
**/__tests__/**
src
yarn.lock

48
web/node_modules/jest-changed-files/README.md generated vendored Normal file
View File

@@ -0,0 +1,48 @@
# jest-changed-files
A module used internally by Jest to check which files have changed since you
last committed in git or hg.
## Install
```sh
$ npm install --save jest-changed-files
```
## API
### `hg.isHGRepository(cwd: string): Promise<?string>`
Get the root of the mercurial repository containing `cwd` or return `null` if
`cwd` is not inside a mercurial repository.
### `git.isGitRepository(cwd: string): Promise<?string>`
Get the root of the git repository containing `cwd` or return `null` if
`cwd` is not inside a git repository.
### `hg.findChangedFiles / git.findChangedFiles (root: string): Promise<Array<string>>`
Get the list of files in a git/mecurial repository that have changed since the
last commit.
## Usage
```javascript
import {git, hg} from 'jest-changed-files';
function changedFiles(cwd) {
return Promise.all([
git.isGitRepository(cwd),
hg.isHGRepository(cwd),
]).then(([gitRoot, hgRoot]) => {
if (gitRoot !== null) {
return git.findChangedFiles(gitRoot);
} else if (hgRoot !== null) {
return hg.findChangedFiles(hgRoot);
} else {
throw new Error('Not in a git or hg repo');
}
});
}
```

71
web/node_modules/jest-changed-files/build/git.js generated vendored Normal file
View File

@@ -0,0 +1,71 @@
'use strict';
const path = require('path'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const childProcess = require('child_process');function findChangedFiles(
cwd,
options)
{
return new Promise((resolve, reject) => {
const args = options && options.lastCommit ?
['show', '--name-only', '--pretty=%b', 'HEAD'] :
['ls-files', '--other', '--modified', '--exclude-standard'];
const child = childProcess.spawn('git', args, { cwd });
let stdout = '';
let stderr = '';
child.stdout.on('data', data => stdout += data);
child.stderr.on('data', data => stderr += data);
child.on('error', e => reject(e));
child.on('close', code => {
if (code === 0) {
stdout = stdout.trim();
if (stdout === '') {
resolve([]);
} else {
resolve(
stdout.
split('\n').
map(changedPath => path.resolve(cwd, changedPath)));
}
} else {
reject(code + ': ' + stderr);
}
});
});
}
function isGitRepository(cwd) {
return new Promise(resolve => {
try {
let stdout = '';
const options = ['rev-parse', '--show-toplevel'];
const child = childProcess.spawn('git', options, { cwd });
child.stdout.on('data', data => stdout += data);
child.on('error', () => resolve(null));
child.on('close', code => resolve(code === 0 ? stdout.trim() : null));
} catch (e) {
resolve(null);
}
});
}
module.exports = {
findChangedFiles,
isGitRepository };

74
web/node_modules/jest-changed-files/build/hg.js generated vendored Normal file
View File

@@ -0,0 +1,74 @@
'use strict';
const path = require('path'); /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const childProcess = require('child_process');const env = Object.assign({}, process.env, { HGPLAIN: 1 });
function findChangedFiles(cwd, options) {
return new Promise((resolve, reject) => {
let args = ['status', '-amn'];
if (options && options.withAncestor) {
args.push('--rev', 'ancestor(.^)');
} else if (options && options.lastCommit === true) {
args = ['tip', '--template', '{files%"{file}\n"}'];
}
const child = childProcess.spawn('hg', args, { cwd, env });
let stdout = '';
let stderr = '';
child.stdout.on('data', data => stdout += data);
child.stderr.on('data', data => stderr += data);
child.on('error', e => reject(e));
child.on('close', code => {
if (code === 0) {
stdout = stdout.trim();
if (stdout === '') {
resolve([]);
} else {
resolve(
stdout.
split('\n').
map(changedPath => path.resolve(cwd, changedPath)));
}
} else {
reject(code + ': ' + stderr);
}
});
});
}
function isHGRepository(cwd) {
return new Promise(resolve => {
try {
let stdout = '';
const child = childProcess.spawn('hg', ['root'], { cwd, env });
child.stdout.on('data', data => stdout += data);
child.on('error', () => resolve(null));
child.on('close', code => resolve(code === 0 ? stdout.trim() : null));
} catch (e) {
resolve(null);
}
});
}
module.exports = {
findChangedFiles,
isHGRepository };

13
web/node_modules/jest-changed-files/build/index.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
'use strict'; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
module.exports = {
git: require('./git'),
hg: require('./hg') };

40
web/node_modules/jest-changed-files/package.json generated vendored Normal file
View File

@@ -0,0 +1,40 @@
{
"_from": "jest-changed-files@^20.0.3",
"_id": "jest-changed-files@20.0.3",
"_inBundle": false,
"_integrity": "sha1-k5TVzGXEOEBhSb7xv01Sto4D4/g=",
"_location": "/jest-changed-files",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "jest-changed-files@^20.0.3",
"name": "jest-changed-files",
"escapedName": "jest-changed-files",
"rawSpec": "^20.0.3",
"saveSpec": null,
"fetchSpec": "^20.0.3"
},
"_requiredBy": [
"/jest/jest-cli"
],
"_resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-20.0.3.tgz",
"_shasum": "9394d5cc65c438406149bef1bf4d52b68e03e3f8",
"_spec": "jest-changed-files@^20.0.3",
"_where": "/home/bilal/Saburly/slucajna-televizija/node_modules/jest/node_modules/jest-cli",
"bugs": {
"url": "https://github.com/facebook/jest/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "A module used internally by Jest to check which files have changed since you last committed in git or hg.",
"homepage": "https://github.com/facebook/jest#readme",
"license": "BSD-3-Clause",
"main": "build/index.js",
"name": "jest-changed-files",
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/jest.git"
},
"version": "20.0.3"
}