Socket
Socket
Sign inDemoInstall

@netlify/framework-info

Package Overview
Dependencies
Maintainers
12
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/framework-info - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

7

CHANGELOG.md

@@ -10,2 +10,9 @@ # Changelog

### [1.1.1](https://www.github.com/netlify/framework-info/compare/v1.1.0...v1.1.1) (2020-12-17)
### Bug Fixes
* **angular:** update watch command ([#72](https://www.github.com/netlify/framework-info/issues/72)) ([fb5425f](https://www.github.com/netlify/framework-info/commit/fb5425f49fcd11eac1043a0a620300be53870628))
## [1.1.0](https://www.github.com/netlify/framework-info/compare/v1.0.0...v1.1.0) (2020-12-16)

@@ -12,0 +19,0 @@

2

dist/index.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.frameworkInfo=t():e.frameworkInfo=t()}(globalThis,(function(){return e={806:e=>{"use strict";e.exports=(e,t)=>{const n={},r=Array.isArray(t);for(const[c,s]of Object.entries(e))(r?t.includes(c):t(c,s,e))&&(n[c]=s);return n}},310:e=>{"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},115:(e,t,n)=>{"use strict";const r=n(301),c=async(e,t,n)=>(await r(e,((e,n)=>Promise.all([t(e,n),e])),n)).filter((e=>Boolean(e[0]))).map((e=>e[1]));e.exports=c,e.exports.default=c},406:(e,t,n)=>{"use strict";const r=n(161),c=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const t=[];let n=0;const c=()=>{n--,t.length>0&&t.shift()()},s=(e,t,...s)=>{n++;const o=r(e,...s);t(o),o.then(c,c)},o=(r,...c)=>new Promise((o=>((r,c,...o)=>{n<e?s(r,c,...o):t.push(s.bind(null,r,c,...o))})(r,o,...c)));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}}),o};e.exports=c,e.exports.default=c},885:(e,t,n)=>{"use strict";const r=n(406);class c extends Error{constructor(e){super(),this.value=e}}const s=async(e,t)=>t(await e),o=async e=>{const t=await Promise.all(e);if(!0===t[1])throw new c(t[0]);return!1},a=async(e,t,n)=>{n={concurrency:1/0,preserveOrder:!0,...n};const a=r(n.concurrency),i=[...e].map((e=>[e,a(s,e,t)])),p=r(n.preserveOrder?1:1/0);try{await Promise.all(i.map((e=>p(o,e))))}catch(e){if(e instanceof c)return e.value;throw e}};e.exports=a,e.exports.default=a},301:e=>{"use strict";const t=(e,t,n)=>new Promise(((r,c)=>{if(n=Object.assign({concurrency:1/0},n),"function"!=typeof t)throw new TypeError("Mapper function is required");const{concurrency:s}=n;if(!("number"==typeof s&&s>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${s}\` (${typeof s})`);const o=[],a=e[Symbol.iterator]();let i=!1,p=!1,d=0,u=0;const m=()=>{if(i)return;const e=a.next(),n=u;if(u++,e.done)return p=!0,void(0===d&&r(o));d++,Promise.resolve(e.value).then((e=>t(e,n))).then((e=>{o[n]=e,d--,m()}),(e=>{i=!0,c(e)}))};for(let e=0;e<s&&(m(),!p);e++);}));e.exports=t,e.exports.default=t},161:e=>{"use strict";const t=(e,...t)=>new Promise((n=>{n(e(...t))}));e.exports=t,e.exports.default=t},470:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",c=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(r.length<2||2!==c||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var i=r.lastIndexOf("/");if(i!==r.length-1){-1===i?(r="",c=0):c=(r=r.slice(0,i)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",c=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",c=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),c=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",c=!1,s=arguments.length-1;s>=-1&&!c;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,c=47===o.charCodeAt(0))}return r=n(r,!c),c?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),c=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&c&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var c=arguments[n];t(c),c.length>0&&(void 0===e?e=c:e+="/"+c)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var c=1;c<e.length&&47===e.charCodeAt(c);++c);for(var s=e.length,o=s-c,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var i=n.length-a,p=o<i?o:i,d=-1,u=0;u<=p;++u){if(u===p){if(i>p){if(47===n.charCodeAt(a+u))return n.slice(a+u+1);if(0===u)return n.slice(a+u)}else o>p&&(47===e.charCodeAt(c+u)?d=u:0===u&&(d=0));break}var m=e.charCodeAt(c+u);if(m!==n.charCodeAt(a+u))break;47===m&&(d=u)}var l="";for(u=c+d+1;u<=s;++u)u!==s&&47!==e.charCodeAt(u)||(0===l.length?l+="..":l+="/..");return l.length>0?l+n.slice(a+d):(a+=d,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,c=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){c=o;break}}else s=!1;return-1===c?r?"/":".":r&&1===c?"//":e.slice(0,c)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,c=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,i=-1;for(r=e.length-1;r>=0;--r){var p=e.charCodeAt(r);if(47===p){if(!o){c=r+1;break}}else-1===i&&(o=!1,i=r+1),a>=0&&(p===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=i))}return c===s?s=i:-1===s&&(s=e.length),e.slice(c,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){c=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(c,s)},extname:function(e){t(e);for(var n=-1,r=0,c=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var i=e.charCodeAt(a);if(47!==i)-1===c&&(s=!1,c=a+1),46===i?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===c||0===o||1===o&&n===c-1&&n===r+1?"":e.slice(n,c)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,c=e.charCodeAt(0),s=47===c;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,i=-1,p=!0,d=e.length-1,u=0;d>=r;--d)if(47!==(c=e.charCodeAt(d)))-1===i&&(p=!1,i=d+1),46===c?-1===o?o=d:1!==u&&(u=1):-1!==o&&(u=-1);else if(!p){a=d+1;break}return-1===o||-1===i||0===u||1===u&&o===i-1&&o===a+1?-1!==i&&(n.base=n.name=0===a&&s?e.slice(1,i):e.slice(a,i)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,i)):(n.name=e.slice(a,o),n.base=e.slice(a,i)),n.ext=e.slice(o,i)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},895:(e,t,n)=>{const r=n(115),{usesFramework:c}=n(567),{FRAMEWORKS:s}=n(198),{getPackageJsonContent:o}=n(304),{getRunScriptCommand:a}=n(887),{getWatchCommands:i}=n(645),p=e=>{const{pathExists:t,packageJson:n,packageJsonPath:r="."}=e;return{pathExists:t,packageJson:n,packageJsonPath:r}},d=function(e){const t=s.find((({name:t})=>t===e));if(void 0===t){const t=s.map(u).join(", ");throw new Error(`Invalid framework "${e}". It should be one of: ${t}`)}return t},u=function({name:e}){return e},m=async function({pathExists:e,packageJson:t,packageJsonPath:n}){const{npmDependencies:r,scripts:c}=await o({packageJson:t});return{npmDependencies:r,scripts:c,runScriptCommand:await a({pathExists:e,packageJsonPath:n})}},l=function({name:e,category:t,watch:{command:n,directory:r,port:c},env:s},{scripts:o,runScriptCommand:a}){return{name:e,category:t,watch:{commands:i({frameworkWatchCommand:n,scripts:o,runScriptCommand:a}),directory:r,port:c},env:s}};e.exports={listFrameworks:async function(e){const{pathExists:t,packageJson:n,packageJsonPath:o}=p(e),{npmDependencies:a,scripts:i,runScriptCommand:d}=await m({pathExists:t,packageJson:n,packageJsonPath:o});return(await r(s,(e=>c(e,{pathExists:t,npmDependencies:a})))).map((e=>l(e,{scripts:i,runScriptCommand:d})))},hasFramework:async function(e,t){const n=d(e),{pathExists:r,packageJson:s,packageJsonPath:o}=p(t),{npmDependencies:a}=await m({pathExists:r,packageJson:s,packageJsonPath:o});return await c(n,{pathExists:r,npmDependencies:a})},getFramework:async function(e,t){const n=d(e),{pathExists:r,packageJson:c,packageJsonPath:s}=p(t),{scripts:o,runScriptCommand:a}=await m({pathExists:r,packageJson:c,packageJsonPath:s});return l(n,{scripts:o,runScriptCommand:a})}}},567:(e,t,n)=>{const r=n(885);e.exports={usesFramework:async function({detect:{npmDependencies:e,excludedNpmDependencies:t,configFiles:n}},{pathExists:c,npmDependencies:s}){return function(e,t){return 0===e.length||e.some((e=>t.includes(e)))}(e,s)&&function(e,t){return 0===e.length||e.every((e=>!t.includes(e)))}(t,s)&&await async function(e,t){return 0===e.length||await(async(e,t)=>await r(e,(e=>t(e))))(e,t)}(n,c)}}},743:e=>{"use strict";e.exports=JSON.parse('{"name":"angular","category":"frontend_framework","detect":{"npmDependencies":["@angular/cli"],"excludedNpmDependencies":[],"configFiles":["angular.json"]},"watch":{"command":"ng build --prod","directory":"dist","port":4200},"env":{}}')},777:e=>{"use strict";e.exports=JSON.parse('{"name":"brunch","category":"build_tool","detect":{"npmDependencies":["brunch"],"excludedNpmDependencies":[],"configFiles":["brunch-config.js"]},"watch":{"command":"brunch watch --server","directory":"app/assets","port":3333},"env":{}}')},764:e=>{"use strict";e.exports=JSON.parse('{"name":"create-react-app","category":"frontend_framework","detect":{"npmDependencies":["react-scripts"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"react-scripts start","directory":"public","port":3000},"env":{"BROWSER":"none","PORT":"3000"}}')},496:e=>{"use strict";e.exports=JSON.parse('{"name":"docusaurus-v2","category":"static_site_generator","detect":{"npmDependencies":["@docusaurus/core"],"excludedNpmDependencies":[],"configFiles":["docusaurus.config.js"]},"watch":{"command":"docusaurus start","directory":"static","port":3000},"env":{"BROWSER":"none"}}')},44:e=>{"use strict";e.exports=JSON.parse('{"name":"docusaurus","category":"static_site_generator","detect":{"npmDependencies":["docusaurus"],"excludedNpmDependencies":[],"configFiles":["siteConfig.js"]},"watch":{"command":"docusaurus-start","directory":"static","port":3000},"env":{"BROWSER":"none"}}')},333:e=>{"use strict";e.exports=JSON.parse('{"name":"eleventy","category":"static_site_generator","detect":{"npmDependencies":["@11ty/eleventy"],"excludedNpmDependencies":[],"configFiles":[".eleventy.js"]},"watch":{"command":"npx eleventy --serve --watch","directory":"_site","port":8080},"env":{}}')},789:e=>{"use strict";e.exports=JSON.parse('{"name":"ember","category":"frontend_framework","detect":{"npmDependencies":["ember-cli"],"excludedNpmDependencies":[],"configFiles":["ember-cli-build.js"]},"watch":{"command":"ember serve","directory":"dist","port":4200},"env":{}}')},575:e=>{"use strict";e.exports=JSON.parse('{"name":"expo","category":"frontend_framework","detect":{"npmDependencies":["expo"],"excludedNpmDependencies":[],"configFiles":["app.json"]},"watch":{"command":"expo start --web","directory":"web-build","port":19006},"env":{}}')},473:e=>{"use strict";e.exports=JSON.parse('{"name":"gatsby","category":"static_site_generator","detect":{"npmDependencies":["gatsby"],"excludedNpmDependencies":[],"configFiles":["gatsby-config.js"]},"watch":{"command":"gatsby develop","directory":"public","port":8000},"env":{"GATSBY_LOGGER":"yurnalist"}}')},595:e=>{"use strict";e.exports=JSON.parse('{"name":"gridsome","category":"static_site_generator","detect":{"npmDependencies":["gridsome"],"excludedNpmDependencies":[],"configFiles":["gridsome.config.js"]},"watch":{"command":"gridsome develop","directory":"dist","port":8080},"env":{}}')},173:e=>{"use strict";e.exports=JSON.parse('{"name":"hexo","category":"static_site_generator","detect":{"npmDependencies":["hexo"],"excludedNpmDependencies":[],"configFiles":["_config.yml"]},"watch":{"command":"hexo server","directory":"public","port":4000},"env":{}}')},527:e=>{"use strict";e.exports=JSON.parse('{"name":"hugo","category":"static_site_generator","detect":{"npmDependencies":[],"excludedNpmDependencies":[],"configFiles":["config.toml","config.yaml"]},"watch":{"command":"hugo server -w","directory":"public","port":1313},"env":{}}')},755:e=>{"use strict";e.exports=JSON.parse('{"name":"jekyll","category":"static_site_generator","detect":{"npmDependencies":[],"excludedNpmDependencies":[],"configFiles":["_config.yml"]},"watch":{"command":"bundle exec jekyll serve -w","directory":"_site","port":4000},"env":{}}')},198:(e,t,n)=>{const r=[n(44),n(496),n(333),n(473),n(595),n(173),n(527),n(755),n(436),n(587),n(853),n(481),n(323),n(331),n(454),n(743),n(764),n(789),n(575),n(354),n(25),n(648),n(823),n(920),n(777),n(863)];e.exports={FRAMEWORKS:r}},436:e=>{"use strict";e.exports=JSON.parse('{"name":"middleman","category":"static_site_generator","detect":{"npmDependencies":[],"excludedNpmDependencies":[],"configFiles":["config.rb"]},"watch":{"command":"bundle exec middleman server","directory":"build","port":4567},"env":{}}')},587:e=>{"use strict";e.exports=JSON.parse('{"name":"next","category":"static_site_generator","detect":{"npmDependencies":["next"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"next","directory":"out","port":3000},"env":{}}')},853:e=>{"use strict";e.exports=JSON.parse('{"name":"nuxt","category":"static_site_generator","detect":{"npmDependencies":["nuxt"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"nuxt","directory":"dist","port":3000},"env":{}}')},863:e=>{"use strict";e.exports=JSON.parse('{"name":"parcel","category":"build_tool","detect":{"npmDependencies":["parcel-bundler","parcel"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"parcel","directory":"dist","port":1234},"env":{}}')},481:e=>{"use strict";e.exports=JSON.parse('{"name":"phenomic","category":"static_site_generator","detect":{"npmDependencies":["@phenomic/core"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"phenomic start","directory":"public","port":3333},"env":{}}')},25:e=>{"use strict";e.exports=JSON.parse('{"name":"quasar-v0.17","category":"frontend_framework","detect":{"npmDependencies":["quasar-cli"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"quasar dev -p 8080","directory":".quasar","port":8080},"env":{}}')},354:e=>{"use strict";e.exports=JSON.parse('{"name":"quasar","category":"frontend_framework","detect":{"npmDependencies":["@quasar/app"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"quasar dev -p 8081","directory":".quasar","port":8081},"env":{}}')},323:e=>{"use strict";e.exports=JSON.parse('{"name":"react-static","category":"static_site_generator","detect":{"npmDependencies":["react-static"],"excludedNpmDependencies":[],"configFiles":["static.config.js"]},"watch":{"command":"react-static start","directory":"dist","port":3000},"env":{}}')},648:e=>{"use strict";e.exports=JSON.parse('{"name":"sapper","category":"frontend_framework","detect":{"npmDependencies":["sapper"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"sapper dev","directory":"static","port":3000},"env":{}}')},331:e=>{"use strict";e.exports=JSON.parse('{"name":"stencil","category":"static_site_generator","detect":{"npmDependencies":["@stencil/core"],"excludedNpmDependencies":[],"configFiles":["stencil.config.ts"]},"watch":{"command":"stencil build --dev --watch --serve","directory":"www","port":3333},"env":{"BROWSER":"none","PORT":"3000"}}')},823:e=>{"use strict";e.exports=JSON.parse('{"name":"svelte","category":"frontend_framework","detect":{"npmDependencies":["svelte"],"excludedNpmDependencies":["sapper"],"configFiles":[]},"watch":{"command":"npm run dev","directory":"public","port":5000},"env":{}}')},920:e=>{"use strict";e.exports=JSON.parse('{"name":"vue","category":"frontend_framework","detect":{"npmDependencies":["@vue/cli-service"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"vue-cli-service serve","directory":"dist","port":8080},"env":{}}')},454:e=>{"use strict";e.exports=JSON.parse('{"name":"vuepress","category":"static_site_generator","detect":{"npmDependencies":["vuepress"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"vuepress dev","directory":".vuepress/dist","port":8080},"env":{}}')},304:(e,t,n)=>{const r=n(806),c=n(310),s=function({dependencies:e,devDependencies:t}){return[...o(e),...o(t)]},o=function(e){return c(e)?Object.keys(e):[]},a=function({scripts:e}){return c(e)?r(e,i):{}},i=function(e,t){return"string"==typeof t};e.exports={getPackageJsonContent:function({packageJson:e}){return void 0===e?{npmDependencies:[],scripts:{}}:{npmDependencies:s(e),scripts:a(e)}}}},887:(e,t,n)=>{const{dirname:r}=n(470);e.exports={getRunScriptCommand:async function({pathExists:e,packageJsonPath:t}){return await e(`${r(t)}/yarn.lock`)?"yarn":"npm run"}}},645:e=>{const t=function(e,t){return Object.entries(e).filter((([,e])=>e.includes(t))).map(n)},n=function([e]){return e},r=function(e){return s.some((t=>c(e,t)))},c=function(e,t){return e===t||e.endsWith(`:${t}`)},s=["serve","dev","develop","start","run","build","web"];e.exports={getWatchCommands:function({frameworkWatchCommand:e,scripts:n,runScriptCommand:c}){const s=function(e,n){const c=t(e,n);return 0!==c.length?c:Object.keys(e).filter(r)}(n,e).map((e=>`${c} ${e}`));return 0!==s.length?s:[e]}}}},t={},function n(r){if(t[r])return t[r].exports;var c=t[r]={exports:{}};return e[r](c,c.exports,n),c.exports}(895);var e,t}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.frameworkInfo=t():e.frameworkInfo=t()}(globalThis,(function(){return e={806:e=>{"use strict";e.exports=(e,t)=>{const n={},r=Array.isArray(t);for(const[c,s]of Object.entries(e))(r?t.includes(c):t(c,s,e))&&(n[c]=s);return n}},310:e=>{"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},115:(e,t,n)=>{"use strict";const r=n(301),c=async(e,t,n)=>(await r(e,((e,n)=>Promise.all([t(e,n),e])),n)).filter((e=>Boolean(e[0]))).map((e=>e[1]));e.exports=c,e.exports.default=c},406:(e,t,n)=>{"use strict";const r=n(161),c=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const t=[];let n=0;const c=()=>{n--,t.length>0&&t.shift()()},s=(e,t,...s)=>{n++;const o=r(e,...s);t(o),o.then(c,c)},o=(r,...c)=>new Promise((o=>((r,c,...o)=>{n<e?s(r,c,...o):t.push(s.bind(null,r,c,...o))})(r,o,...c)));return Object.defineProperties(o,{activeCount:{get:()=>n},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}}),o};e.exports=c,e.exports.default=c},885:(e,t,n)=>{"use strict";const r=n(406);class c extends Error{constructor(e){super(),this.value=e}}const s=async(e,t)=>t(await e),o=async e=>{const t=await Promise.all(e);if(!0===t[1])throw new c(t[0]);return!1},a=async(e,t,n)=>{n={concurrency:1/0,preserveOrder:!0,...n};const a=r(n.concurrency),i=[...e].map((e=>[e,a(s,e,t)])),p=r(n.preserveOrder?1:1/0);try{await Promise.all(i.map((e=>p(o,e))))}catch(e){if(e instanceof c)return e.value;throw e}};e.exports=a,e.exports.default=a},301:e=>{"use strict";const t=(e,t,n)=>new Promise(((r,c)=>{if(n=Object.assign({concurrency:1/0},n),"function"!=typeof t)throw new TypeError("Mapper function is required");const{concurrency:s}=n;if(!("number"==typeof s&&s>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${s}\` (${typeof s})`);const o=[],a=e[Symbol.iterator]();let i=!1,p=!1,d=0,u=0;const m=()=>{if(i)return;const e=a.next(),n=u;if(u++,e.done)return p=!0,void(0===d&&r(o));d++,Promise.resolve(e.value).then((e=>t(e,n))).then((e=>{o[n]=e,d--,m()}),(e=>{i=!0,c(e)}))};for(let e=0;e<s&&(m(),!p);e++);}));e.exports=t,e.exports.default=t},161:e=>{"use strict";const t=(e,...t)=>new Promise((n=>{n(e(...t))}));e.exports=t,e.exports.default=t},470:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",c=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)n=e.charCodeAt(a);else{if(47===n)break;n=47}if(47===n){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(r.length<2||2!==c||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var i=r.lastIndexOf("/");if(i!==r.length-1){-1===i?(r="",c=0):c=(r=r.slice(0,i)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",c=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",c=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),c=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",c=!1,s=arguments.length-1;s>=-1&&!c;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,c=47===o.charCodeAt(0))}return r=n(r,!c),c?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),c=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&c&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var c=arguments[n];t(c),c.length>0&&(void 0===e?e=c:e+="/"+c)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var c=1;c<e.length&&47===e.charCodeAt(c);++c);for(var s=e.length,o=s-c,a=1;a<n.length&&47===n.charCodeAt(a);++a);for(var i=n.length-a,p=o<i?o:i,d=-1,u=0;u<=p;++u){if(u===p){if(i>p){if(47===n.charCodeAt(a+u))return n.slice(a+u+1);if(0===u)return n.slice(a+u)}else o>p&&(47===e.charCodeAt(c+u)?d=u:0===u&&(d=0));break}var m=e.charCodeAt(c+u);if(m!==n.charCodeAt(a+u))break;47===m&&(d=u)}var l="";for(u=c+d+1;u<=s;++u)u!==s&&47!==e.charCodeAt(u)||(0===l.length?l+="..":l+="/..");return l.length>0?l+n.slice(a+d):(a+=d,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,c=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){c=o;break}}else s=!1;return-1===c?r?"/":".":r&&1===c?"//":e.slice(0,c)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,c=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,i=-1;for(r=e.length-1;r>=0;--r){var p=e.charCodeAt(r);if(47===p){if(!o){c=r+1;break}}else-1===i&&(o=!1,i=r+1),a>=0&&(p===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=i))}return c===s?s=i:-1===s&&(s=e.length),e.slice(c,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){c=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(c,s)},extname:function(e){t(e);for(var n=-1,r=0,c=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var i=e.charCodeAt(a);if(47!==i)-1===c&&(s=!1,c=a+1),46===i?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===c||0===o||1===o&&n===c-1&&n===r+1?"":e.slice(n,c)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,c=e.charCodeAt(0),s=47===c;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,i=-1,p=!0,d=e.length-1,u=0;d>=r;--d)if(47!==(c=e.charCodeAt(d)))-1===i&&(p=!1,i=d+1),46===c?-1===o?o=d:1!==u&&(u=1):-1!==o&&(u=-1);else if(!p){a=d+1;break}return-1===o||-1===i||0===u||1===u&&o===i-1&&o===a+1?-1!==i&&(n.base=n.name=0===a&&s?e.slice(1,i):e.slice(a,i)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,i)):(n.name=e.slice(a,o),n.base=e.slice(a,i)),n.ext=e.slice(o,i)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},895:(e,t,n)=>{const r=n(115),{usesFramework:c}=n(567),{FRAMEWORKS:s}=n(198),{getPackageJsonContent:o}=n(304),{getRunScriptCommand:a}=n(887),{getWatchCommands:i}=n(645),p=e=>{const{pathExists:t,packageJson:n,packageJsonPath:r="."}=e;return{pathExists:t,packageJson:n,packageJsonPath:r}},d=function(e){const t=s.find((({name:t})=>t===e));if(void 0===t){const t=s.map(u).join(", ");throw new Error(`Invalid framework "${e}". It should be one of: ${t}`)}return t},u=function({name:e}){return e},m=async function({pathExists:e,packageJson:t,packageJsonPath:n}){const{npmDependencies:r,scripts:c}=await o({packageJson:t});return{npmDependencies:r,scripts:c,runScriptCommand:await a({pathExists:e,packageJsonPath:n})}},l=function({name:e,category:t,watch:{command:n,directory:r,port:c},env:s},{scripts:o,runScriptCommand:a}){return{name:e,category:t,watch:{commands:i({frameworkWatchCommand:n,scripts:o,runScriptCommand:a}),directory:r,port:c},env:s}};e.exports={listFrameworks:async function(e){const{pathExists:t,packageJson:n,packageJsonPath:o}=p(e),{npmDependencies:a,scripts:i,runScriptCommand:d}=await m({pathExists:t,packageJson:n,packageJsonPath:o});return(await r(s,(e=>c(e,{pathExists:t,npmDependencies:a})))).map((e=>l(e,{scripts:i,runScriptCommand:d})))},hasFramework:async function(e,t){const n=d(e),{pathExists:r,packageJson:s,packageJsonPath:o}=p(t),{npmDependencies:a}=await m({pathExists:r,packageJson:s,packageJsonPath:o});return await c(n,{pathExists:r,npmDependencies:a})},getFramework:async function(e,t){const n=d(e),{pathExists:r,packageJson:c,packageJsonPath:s}=p(t),{scripts:o,runScriptCommand:a}=await m({pathExists:r,packageJson:c,packageJsonPath:s});return l(n,{scripts:o,runScriptCommand:a})}}},567:(e,t,n)=>{const r=n(885);e.exports={usesFramework:async function({detect:{npmDependencies:e,excludedNpmDependencies:t,configFiles:n}},{pathExists:c,npmDependencies:s}){return function(e,t){return 0===e.length||e.some((e=>t.includes(e)))}(e,s)&&function(e,t){return 0===e.length||e.every((e=>!t.includes(e)))}(t,s)&&await async function(e,t){return 0===e.length||await(async(e,t)=>await r(e,(e=>t(e))))(e,t)}(n,c)}}},743:e=>{"use strict";e.exports=JSON.parse('{"name":"angular","category":"frontend_framework","detect":{"npmDependencies":["@angular/cli"],"excludedNpmDependencies":[],"configFiles":["angular.json"]},"watch":{"command":"ng serve","directory":"dist","port":4200},"env":{}}')},777:e=>{"use strict";e.exports=JSON.parse('{"name":"brunch","category":"build_tool","detect":{"npmDependencies":["brunch"],"excludedNpmDependencies":[],"configFiles":["brunch-config.js"]},"watch":{"command":"brunch watch --server","directory":"app/assets","port":3333},"env":{}}')},764:e=>{"use strict";e.exports=JSON.parse('{"name":"create-react-app","category":"frontend_framework","detect":{"npmDependencies":["react-scripts"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"react-scripts start","directory":"public","port":3000},"env":{"BROWSER":"none","PORT":"3000"}}')},496:e=>{"use strict";e.exports=JSON.parse('{"name":"docusaurus-v2","category":"static_site_generator","detect":{"npmDependencies":["@docusaurus/core"],"excludedNpmDependencies":[],"configFiles":["docusaurus.config.js"]},"watch":{"command":"docusaurus start","directory":"static","port":3000},"env":{"BROWSER":"none"}}')},44:e=>{"use strict";e.exports=JSON.parse('{"name":"docusaurus","category":"static_site_generator","detect":{"npmDependencies":["docusaurus"],"excludedNpmDependencies":[],"configFiles":["siteConfig.js"]},"watch":{"command":"docusaurus-start","directory":"static","port":3000},"env":{"BROWSER":"none"}}')},333:e=>{"use strict";e.exports=JSON.parse('{"name":"eleventy","category":"static_site_generator","detect":{"npmDependencies":["@11ty/eleventy"],"excludedNpmDependencies":[],"configFiles":[".eleventy.js"]},"watch":{"command":"npx eleventy --serve --watch","directory":"_site","port":8080},"env":{}}')},789:e=>{"use strict";e.exports=JSON.parse('{"name":"ember","category":"frontend_framework","detect":{"npmDependencies":["ember-cli"],"excludedNpmDependencies":[],"configFiles":["ember-cli-build.js"]},"watch":{"command":"ember serve","directory":"dist","port":4200},"env":{}}')},575:e=>{"use strict";e.exports=JSON.parse('{"name":"expo","category":"frontend_framework","detect":{"npmDependencies":["expo"],"excludedNpmDependencies":[],"configFiles":["app.json"]},"watch":{"command":"expo start --web","directory":"web-build","port":19006},"env":{}}')},473:e=>{"use strict";e.exports=JSON.parse('{"name":"gatsby","category":"static_site_generator","detect":{"npmDependencies":["gatsby"],"excludedNpmDependencies":[],"configFiles":["gatsby-config.js"]},"watch":{"command":"gatsby develop","directory":"public","port":8000},"env":{"GATSBY_LOGGER":"yurnalist"}}')},595:e=>{"use strict";e.exports=JSON.parse('{"name":"gridsome","category":"static_site_generator","detect":{"npmDependencies":["gridsome"],"excludedNpmDependencies":[],"configFiles":["gridsome.config.js"]},"watch":{"command":"gridsome develop","directory":"dist","port":8080},"env":{}}')},173:e=>{"use strict";e.exports=JSON.parse('{"name":"hexo","category":"static_site_generator","detect":{"npmDependencies":["hexo"],"excludedNpmDependencies":[],"configFiles":["_config.yml"]},"watch":{"command":"hexo server","directory":"public","port":4000},"env":{}}')},527:e=>{"use strict";e.exports=JSON.parse('{"name":"hugo","category":"static_site_generator","detect":{"npmDependencies":[],"excludedNpmDependencies":[],"configFiles":["config.toml","config.yaml"]},"watch":{"command":"hugo server -w","directory":"public","port":1313},"env":{}}')},755:e=>{"use strict";e.exports=JSON.parse('{"name":"jekyll","category":"static_site_generator","detect":{"npmDependencies":[],"excludedNpmDependencies":[],"configFiles":["_config.yml"]},"watch":{"command":"bundle exec jekyll serve -w","directory":"_site","port":4000},"env":{}}')},198:(e,t,n)=>{const r=[n(44),n(496),n(333),n(473),n(595),n(173),n(527),n(755),n(436),n(587),n(853),n(481),n(323),n(331),n(454),n(743),n(764),n(789),n(575),n(354),n(25),n(648),n(823),n(920),n(777),n(863)];e.exports={FRAMEWORKS:r}},436:e=>{"use strict";e.exports=JSON.parse('{"name":"middleman","category":"static_site_generator","detect":{"npmDependencies":[],"excludedNpmDependencies":[],"configFiles":["config.rb"]},"watch":{"command":"bundle exec middleman server","directory":"build","port":4567},"env":{}}')},587:e=>{"use strict";e.exports=JSON.parse('{"name":"next","category":"static_site_generator","detect":{"npmDependencies":["next"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"next","directory":"out","port":3000},"env":{}}')},853:e=>{"use strict";e.exports=JSON.parse('{"name":"nuxt","category":"static_site_generator","detect":{"npmDependencies":["nuxt"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"nuxt","directory":"dist","port":3000},"env":{}}')},863:e=>{"use strict";e.exports=JSON.parse('{"name":"parcel","category":"build_tool","detect":{"npmDependencies":["parcel-bundler","parcel"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"parcel","directory":"dist","port":1234},"env":{}}')},481:e=>{"use strict";e.exports=JSON.parse('{"name":"phenomic","category":"static_site_generator","detect":{"npmDependencies":["@phenomic/core"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"phenomic start","directory":"public","port":3333},"env":{}}')},25:e=>{"use strict";e.exports=JSON.parse('{"name":"quasar-v0.17","category":"frontend_framework","detect":{"npmDependencies":["quasar-cli"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"quasar dev -p 8080","directory":".quasar","port":8080},"env":{}}')},354:e=>{"use strict";e.exports=JSON.parse('{"name":"quasar","category":"frontend_framework","detect":{"npmDependencies":["@quasar/app"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"quasar dev -p 8081","directory":".quasar","port":8081},"env":{}}')},323:e=>{"use strict";e.exports=JSON.parse('{"name":"react-static","category":"static_site_generator","detect":{"npmDependencies":["react-static"],"excludedNpmDependencies":[],"configFiles":["static.config.js"]},"watch":{"command":"react-static start","directory":"dist","port":3000},"env":{}}')},648:e=>{"use strict";e.exports=JSON.parse('{"name":"sapper","category":"frontend_framework","detect":{"npmDependencies":["sapper"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"sapper dev","directory":"static","port":3000},"env":{}}')},331:e=>{"use strict";e.exports=JSON.parse('{"name":"stencil","category":"static_site_generator","detect":{"npmDependencies":["@stencil/core"],"excludedNpmDependencies":[],"configFiles":["stencil.config.ts"]},"watch":{"command":"stencil build --dev --watch --serve","directory":"www","port":3333},"env":{"BROWSER":"none","PORT":"3000"}}')},823:e=>{"use strict";e.exports=JSON.parse('{"name":"svelte","category":"frontend_framework","detect":{"npmDependencies":["svelte"],"excludedNpmDependencies":["sapper"],"configFiles":[]},"watch":{"command":"npm run dev","directory":"public","port":5000},"env":{}}')},920:e=>{"use strict";e.exports=JSON.parse('{"name":"vue","category":"frontend_framework","detect":{"npmDependencies":["@vue/cli-service"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"vue-cli-service serve","directory":"dist","port":8080},"env":{}}')},454:e=>{"use strict";e.exports=JSON.parse('{"name":"vuepress","category":"static_site_generator","detect":{"npmDependencies":["vuepress"],"excludedNpmDependencies":[],"configFiles":[]},"watch":{"command":"vuepress dev","directory":".vuepress/dist","port":8080},"env":{}}')},304:(e,t,n)=>{const r=n(806),c=n(310),s=function({dependencies:e,devDependencies:t}){return[...o(e),...o(t)]},o=function(e){return c(e)?Object.keys(e):[]},a=function({scripts:e}){return c(e)?r(e,i):{}},i=function(e,t){return"string"==typeof t};e.exports={getPackageJsonContent:function({packageJson:e}){return void 0===e?{npmDependencies:[],scripts:{}}:{npmDependencies:s(e),scripts:a(e)}}}},887:(e,t,n)=>{const{dirname:r}=n(470);e.exports={getRunScriptCommand:async function({pathExists:e,packageJsonPath:t}){return await e(`${r(t)}/yarn.lock`)?"yarn":"npm run"}}},645:e=>{const t=function(e,t){return Object.entries(e).filter((([,e])=>e.includes(t))).map(n)},n=function([e]){return e},r=function(e){return s.some((t=>c(e,t)))},c=function(e,t){return e===t||e.endsWith(`:${t}`)},s=["serve","dev","develop","start","run","build","web"];e.exports={getWatchCommands:function({frameworkWatchCommand:e,scripts:n,runScriptCommand:c}){const s=function(e,n){const c=t(e,n);return 0!==c.length?c:Object.keys(e).filter(r)}(n,e).map((e=>`${c} ${e}`));return 0!==s.length?s:[e]}}}},t={},function n(r){if(t[r])return t[r].exports;var c=t[r]={exports:{}};return e[r](c,c.exports,n),c.exports}(895);var e,t}));
//# sourceMappingURL=index.js.map
{
"name": "@netlify/framework-info",
"version": "1.1.0",
"version": "1.1.1",
"description": "Framework detection utility",

@@ -72,3 +72,3 @@ "main": "./src/main.js",

"scriptsArgs": {
"eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"src/**/*.js\" \"test/*.js\" \"test/helpers/**/*.js\"",
"eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{src,site,scripts,test}/**/*.{js,jsx,html}\" --ignore-pattern \"test/fixtures/**/*\"",
"prettier": "--ignore-path .gitignore --loglevel warn \"{src,site,scripts,test}/**/*.js\" \"*.{js,md,yml,json}\" \"!package-lock.json\" \"!CHANGELOG.md\""

@@ -89,5 +89,3 @@ },

"@babel/preset-react": "^7.12.10",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@netlify/eslint-config-node": "^2.0.0",
"@netlify/eslint-config-node": "^2.2.2",
"ajv": "^6.12.3",

@@ -94,0 +92,0 @@ "ava": "^2.4.0",

@@ -10,3 +10,3 @@ {

"watch": {
"command": "ng build --prod",
"command": "ng serve",
"directory": "dist",

@@ -13,0 +13,0 @@ "port": 4200

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc