Add capacitorjs runtime
This commit is contained in:
parent
d0ece489ee
commit
f90c0e6c40
8362 changed files with 1502407 additions and 1 deletions
16
node_modules/get-pkg-repo/src/index.js
generated
vendored
Normal file
16
node_modules/get-pkg-repo/src/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
const hostedGitInfo = require(`hosted-git-info`);
|
||||
const parseRepositoryURL = require(`@hutson/parse-repository-url`);
|
||||
|
||||
module.exports = packageData => {
|
||||
if (!packageData ||
|
||||
!packageData.repository ||
|
||||
(typeof packageData.repository !== 'string' && !packageData.repository.url)) {
|
||||
throw new Error(`No valid "repository" data found in package metadata. Please see https://docs.npmjs.com/files/package.json#repository for proper syntax.`);
|
||||
}
|
||||
|
||||
const repositoryURL = typeof packageData.repository === 'string' ? packageData.repository : packageData.repository.url;
|
||||
|
||||
return hostedGitInfo.fromUrl(repositoryURL) || parseRepositoryURL(repositoryURL);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue