From 4111b795559088398fbea2ce760fc44af7ecd443 Mon Sep 17 00:00:00 2001 From: Dong Nguyen Date: Fri, 3 Jun 2022 15:40:23 +0700 Subject: [PATCH 1/2] v3.0.2 - Update dependencies - Use GitHub CodeQL instead of SonarCloud --- README.md | 2 +- dist/cjs/package.json | 2 +- dist/cjs/txtgen.js | 8 ++++---- dist/txtgen.esm.js | 8 ++++---- dist/txtgen.min.js | 6 +++--- package.json | 28 +++++++++++----------------- 6 files changed, 24 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 586c799..51d5e2e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Lightweight util for generating random sentences, paragraphs and articles in Eng [![NPM](https://badge.fury.io/js/txtgen.svg)](https://badge.fury.io/js/txtgen) [![CI test](https://github.com/ndaidong/txtgen/workflows/ci-test/badge.svg)](https://github.com/ndaidong/txtgen/actions) [![Coverage Status](https://coveralls.io/repos/github/ndaidong/txtgen/badge.svg)](https://coveralls.io/github/ndaidong/txtgen) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ndaidong_txtgen&metric=alert_status)](https://sonarcloud.io/dashboard?id=ndaidong_txtgen) +![CodeQL](https://github.com/ndaidong/txtgen/workflows/CodeQL/badge.svg) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) diff --git a/dist/cjs/package.json b/dist/cjs/package.json index f6aab06..33e04df 100644 --- a/dist/cjs/package.json +++ b/dist/cjs/package.json @@ -1,5 +1,5 @@ { "name": "txtgen-cjs", - "version": "3.0.1", + "version": "3.0.2", "main": "./txtgen.js" } \ No newline at end of file diff --git a/dist/cjs/txtgen.js b/dist/cjs/txtgen.js index 1b074af..aa7deb0 100644 --- a/dist/cjs/txtgen.js +++ b/dist/cjs/txtgen.js @@ -1,10 +1,10 @@ /** - * txtgen@3.0.1 - * built with esbuild at: 2022-01-07T04:26:08.703Z + * txtgen@3.0.2 + * built with esbuild at: 2022-06-03T08:39:59.112Z * repository: https://github.com/ndaidong/txtgen * maintainer: @ndaidong * License: MIT **/ -var u=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var R=e=>u(e,"__esModule",{value:!0});var W=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})},C=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P(t))!L.call(e,o)&&(n||o!=="default")&&u(e,o,{get:()=>t[o],enumerable:!(r=$(t,o))||r.enumerable});return e};var F=(e=>(t,n)=>e&&e.get(t)||(n=C(R({}),t,1),e&&e.set(t,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var J={};W(J,{addAdjectives:()=>v,addNouns:()=>b,addTemplates:()=>y,article:()=>I,getAdjectives:()=>z,getNouns:()=>j,getTemplates:()=>A,paragraph:()=>_,sentence:()=>M,setAdjectives:()=>x,setNouns:()=>w,setRandom:()=>h,setTemplates:()=>k});var a=["alligator","ant","bear","bee","bird","camel","cat","cheetah","chicken","chimpanzee","cow","crocodile","deer","dog","dolphin","duck","eagle","elephant","fish","fly","fox","frog","giraffe","goat","goldfish","hamster","hippopotamus","horse","kangaroo","kitten","lion","lobster","monkey","octopus","owl","panda","pig","puppy","rabbit","rat","scorpion","seal","shark","sheep","snail","snake","spider","squirrel","tiger","turtle","wolf","zebra","apple","apricot","banana","blackberry","blueberry","cherry","cranberry","currant","fig","grape","grapefruit","grapes","kiwi","kumquat","lemon","lime","melon","nectarine","orange","peach","pear","persimmon","pineapple","plum","pomegranate","prune","raspberry","strawberry","tangerine","watermelon"],i=["adaptable","adventurous","affable","affectionate","agreeable","alert","alluring","ambitious","ambitious","amiable","amicable","amused","amusing","boundless","brave","brave","bright","bright","broad-minded","calm","calm","capable","careful","charming","charming","cheerful","coherent","comfortable","communicative","compassionate","confident","conscientious","considerate","convivial","cooperative","courageous","courageous","courteous","creative","credible","cultured","dashing","dazzling","debonair","decisive","decisive","decorous","delightful","detailed","determined","determined","diligent","diligent","diplomatic","discreet","discreet","dynamic","dynamic","eager","easygoing","efficient","elated","eminent","emotional","enchanting","encouraging","endurable","energetic","energetic","entertaining","enthusiastic","enthusiastic","excellent","excited","exclusive","exuberant","exuberant","fabulous","fair","fair-minded","faithful","faithful","fantastic","fearless","fearless","fine","forceful","frank","frank","friendly","friendly","funny","funny","generous","generous","gentle","gentle","glorious","good","good","gregarious","happy","hard-working","harmonious","helpful","helpful","hilarious","honest","honorable","humorous","imaginative","impartial","impartial","independent","industrious","instinctive","intellectual","intelligent","intuitive","inventive","jolly","joyous","kind","kind","kind-hearted","knowledgeable","level","likeable","lively","lovely","loving","loving","loyal","lucky","mature","modern","modest","neat","nice","nice","obedient","optimistic","painstaking","passionate","patient","peaceful","perfect","persistent","philosophical","pioneering","placid","placid","plausible","pleasant","plucky","plucky","polite","powerful","practical","pro-active","productive","protective","proud","punctual","quick-witted","quiet","quiet","rational","receptive","reflective","reliable","relieved","reserved","resolute","resourceful","responsible","rhetorical","righteous","romantic","romantic","sedate","seemly","selective","self-assured","self-confident","self-disciplined","sensible","sensitive","sensitive","shrewd","shy","silly","sincere","sincere","skillful","smiling","sociable","splendid","steadfast","stimulating","straightforward","successful","succinct","sympathetic","talented","thoughtful","thoughtful","thrifty","tidy","tough","tough","trustworthy","unassuming","unbiased","understanding","unusual","upbeat","versatile","vigorous","vivacious","warm","warmhearted","willing","willing","wise","witty","witty","wonderful"],m=["a","e","i","o","u","y"],l=["however, {{nouns}} have begun to rent {{nouns}} over the past few months, specifically for {{nouns}} associated with their {{nouns}}"],f=["to be more specific, ","in recent years, ","however, ","by the way","of course, ","some assert that ","if this was somewhat unclear, ","unfortunately, that is wrong; on the contrary, ","it's very tricky, if not impossible, ","this could be, or perhaps ","this is not to discredit the idea that ","we know that ","it's an undeniable fact, really; ","framed in a different way, ","what we don't know for sure is whether or not ","as far as we can estimate, ","as far as he is concerned, ","the zeitgeist contends that ","though we assume the latter, ","far from the truth, ","extending this logic, ","nowhere is it disputed that ","in modern times ","in ancient times ","recent controversy aside, ","washing and polishing the car,","having been a gymnast, ","after a long day at school and work, ","waking to the buzz of the alarm clock, ","draped neatly on a hanger, ","shouting with happiness, "],p=(e=[],t=[])=>[...new Set([...e,...t])],b=(e=[])=>(a=p(a,e),a.length),v=(e=[])=>(i=p(i,e),i.length),y=(e=[])=>(l=p(l,e),l.length),w=(e=[])=>(a=[...new Set([...e])],a.length),x=(e=[])=>(i=[...new Set([...e])],i.length),k=(e=[])=>(l=[...new Set([...e])],l.length),j=()=>[...a],z=()=>[...i],A=()=>[...l];var T,h=e=>{T=e};h(Math.random);var d=()=>T(),c=(e,t)=>{let n=e,r=t-e+1;return Math.floor(d()*r)+n},s=e=>{let t;for(;!t;)t=e[c(0,e.length-1)];return t},N=()=>{let e=".......!?!?;...".split("");return s(e)},U=e=>e.endsWith("s")?e:(e.match(/(ss|ish|ch|x|us)$/)?e+="e":e.endsWith("y")&&!m.includes(e.charAt(e.length-2))&&(e=e.slice(0,e.length-1),e+="ie"),e+"s"),S=e=>{let t="a";return e.match(/^(a|e|heir|herb|hour|i|o)/)&&(t="an"),`${t} ${e}`},q={noun:()=>s(a),a_noun:()=>S(s(a)),nouns:()=>U(s(a)),adjective:()=>s(i),an_adjective:()=>S(s(i))};var B=["noun","a_noun","nouns","adjective","an_adjective"],D=e=>e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").replace(/\r?\n|\r/g," ").replace(/\s\s+|\r/g," "),E=e=>{let t=e,n=e.match(/\{\{(.+?)\}\}/g);if(n&&n.length)for(let r=0;rd()<.33?s(f):"",H=()=>E(s(l));var M=()=>{let t=G()+H();return t=t.charAt(0).toUpperCase()+t.slice(1),t+=N(),t},_=(e=0)=>{e||(e=c(3,10));let t=Math.min(e,15),n=[];for(;n.length{e||(e=c(3,10));let t=Math.min(e,15),n=[];for(;n.length{for(var n in t)u(e,n,{get:t[n],enumerable:!0})},W=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P(t))!L.call(e,o)&&o!==n&&u(e,o,{get:()=>t[o],enumerable:!(r=$(t,o))||r.enumerable});return e};var C=e=>W(u({},"__esModule",{value:!0}),e);var I={};R(I,{addAdjectives:()=>v,addNouns:()=>b,addTemplates:()=>y,article:()=>H,getAdjectives:()=>z,getNouns:()=>j,getTemplates:()=>A,paragraph:()=>_,sentence:()=>M,setAdjectives:()=>x,setNouns:()=>w,setRandom:()=>h,setTemplates:()=>k});module.exports=C(I);var a=["alligator","ant","bear","bee","bird","camel","cat","cheetah","chicken","chimpanzee","cow","crocodile","deer","dog","dolphin","duck","eagle","elephant","fish","fly","fox","frog","giraffe","goat","goldfish","hamster","hippopotamus","horse","kangaroo","kitten","lion","lobster","monkey","octopus","owl","panda","pig","puppy","rabbit","rat","scorpion","seal","shark","sheep","snail","snake","spider","squirrel","tiger","turtle","wolf","zebra","apple","apricot","banana","blackberry","blueberry","cherry","cranberry","currant","fig","grape","grapefruit","grapes","kiwi","kumquat","lemon","lime","melon","nectarine","orange","peach","pear","persimmon","pineapple","plum","pomegranate","prune","raspberry","strawberry","tangerine","watermelon"],i=["adaptable","adventurous","affable","affectionate","agreeable","alert","alluring","ambitious","ambitious","amiable","amicable","amused","amusing","boundless","brave","brave","bright","bright","broad-minded","calm","calm","capable","careful","charming","charming","cheerful","coherent","comfortable","communicative","compassionate","confident","conscientious","considerate","convivial","cooperative","courageous","courageous","courteous","creative","credible","cultured","dashing","dazzling","debonair","decisive","decisive","decorous","delightful","detailed","determined","determined","diligent","diligent","diplomatic","discreet","discreet","dynamic","dynamic","eager","easygoing","efficient","elated","eminent","emotional","enchanting","encouraging","endurable","energetic","energetic","entertaining","enthusiastic","enthusiastic","excellent","excited","exclusive","exuberant","exuberant","fabulous","fair","fair-minded","faithful","faithful","fantastic","fearless","fearless","fine","forceful","frank","frank","friendly","friendly","funny","funny","generous","generous","gentle","gentle","glorious","good","good","gregarious","happy","hard-working","harmonious","helpful","helpful","hilarious","honest","honorable","humorous","imaginative","impartial","impartial","independent","industrious","instinctive","intellectual","intelligent","intuitive","inventive","jolly","joyous","kind","kind","kind-hearted","knowledgeable","level","likeable","lively","lovely","loving","loving","loyal","lucky","mature","modern","modest","neat","nice","nice","obedient","optimistic","painstaking","passionate","patient","peaceful","perfect","persistent","philosophical","pioneering","placid","placid","plausible","pleasant","plucky","plucky","polite","powerful","practical","pro-active","productive","protective","proud","punctual","quick-witted","quiet","quiet","rational","receptive","reflective","reliable","relieved","reserved","resolute","resourceful","responsible","rhetorical","righteous","romantic","romantic","sedate","seemly","selective","self-assured","self-confident","self-disciplined","sensible","sensitive","sensitive","shrewd","shy","silly","sincere","sincere","skillful","smiling","sociable","splendid","steadfast","stimulating","straightforward","successful","succinct","sympathetic","talented","thoughtful","thoughtful","thrifty","tidy","tough","tough","trustworthy","unassuming","unbiased","understanding","unusual","upbeat","versatile","vigorous","vivacious","warm","warmhearted","willing","willing","wise","witty","witty","wonderful"],m=["a","e","i","o","u","y"],l=["however, {{nouns}} have begun to rent {{nouns}} over the past few months, specifically for {{nouns}} associated with their {{nouns}}"],f=["to be more specific, ","in recent years, ","however, ","by the way","of course, ","some assert that ","if this was somewhat unclear, ","unfortunately, that is wrong; on the contrary, ","it's very tricky, if not impossible, ","this could be, or perhaps ","this is not to discredit the idea that ","we know that ","it's an undeniable fact, really; ","framed in a different way, ","what we don't know for sure is whether or not ","as far as we can estimate, ","as far as he is concerned, ","the zeitgeist contends that ","though we assume the latter, ","far from the truth, ","extending this logic, ","nowhere is it disputed that ","in modern times ","in ancient times ","recent controversy aside, ","washing and polishing the car,","having been a gymnast, ","after a long day at school and work, ","waking to the buzz of the alarm clock, ","draped neatly on a hanger, ","shouting with happiness, "],p=(e=[],t=[])=>[...new Set([...e,...t])],b=(e=[])=>(a=p(a,e),a.length),v=(e=[])=>(i=p(i,e),i.length),y=(e=[])=>(l=p(l,e),l.length),w=(e=[])=>(a=[...new Set([...e])],a.length),x=(e=[])=>(i=[...new Set([...e])],i.length),k=(e=[])=>(l=[...new Set([...e])],l.length),j=()=>[...a],z=()=>[...i],A=()=>[...l];var N,h=e=>{N=e};h(Math.random);var d=()=>N(),c=(e,t)=>{let n=e,r=t-e+1;return Math.floor(d()*r)+n},s=e=>{let t;for(;!t;)t=e[c(0,e.length-1)];return t},S=()=>{let e=".......!?!?;...".split("");return s(e)},F=e=>e.endsWith("s")?e:(e.match(/(ss|ish|ch|x|us)$/)?e+="e":e.endsWith("y")&&!m.includes(e.charAt(e.length-2))&&(e=e.slice(0,e.length-1),e+="ie"),e+"s"),T=e=>{let t="a";return e.match(/^(a|e|heir|herb|hour|i|o)/)&&(t="an"),`${t} ${e}`},q={noun:()=>s(a),a_noun:()=>T(s(a)),nouns:()=>F(s(a)),adjective:()=>s(i),an_adjective:()=>T(s(i))};var U=["noun","a_noun","nouns","adjective","an_adjective"],B=e=>e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").replace(/\r?\n|\r/g," ").replace(/\s\s+|\r/g," "),D=e=>{let t=e,n=e.match(/\{\{(.+?)\}\}/g);if(n&&n.length)for(let r=0;rd()<.33?s(f):"",G=()=>D(s(l));var M=()=>{let t=E()+G();return t=t.charAt(0).toUpperCase()+t.slice(1),t+=S(),t},_=(e=0)=>{e||(e=c(3,10));let t=Math.min(e,15),n=[];for(;n.length{e||(e=c(3,10));let t=Math.min(e,15),n=[];for(;n.length[...new Set([...e,...t])],w=(e=[])=>(a=c(a,e),a.length),x=(e=[])=>(i=c(i,e),i.length),k=(e=[])=>(o=c(o,e),o.length),j=(e=[])=>(a=[...new Set([...e])],a.length),z=(e=[])=>(i=[...new Set([...e])],i.length),A=(e=[])=>(o=[...new Set([...e])],o.length),T=()=>[...a],N=()=>[...i],S=()=>[...o];var m,f=e=>{m=e};f(Math.random);var u=()=>m(),l=(e,t)=>{let n=e,r=t-e+1;return Math.floor(u()*r)+n},s=e=>{let t;for(;!t;)t=e[l(0,e.length-1)];return t},b=()=>{let e=".......!?!?;...".split("");return s(e)},q=e=>e.endsWith("s")?e:(e.match(/(ss|ish|ch|x|us)$/)?e+="e":e.endsWith("y")&&!d.includes(e.charAt(e.length-2))&&(e=e.slice(0,e.length-1),e+="ie"),e+"s"),v=e=>{let t="a";return e.match(/^(a|e|heir|herb|hour|i|o)/)&&(t="an"),`${t} ${e}`},y={noun:()=>s(a),a_noun:()=>v(s(a)),nouns:()=>q(s(a)),adjective:()=>s(i),an_adjective:()=>v(s(i))};var M=["noun","a_noun","nouns","adjective","an_adjective"],_=e=>e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").replace(/\r?\n|\r/g," ").replace(/\s\s+|\r/g," "),$=e=>{let t=e,n=e.match(/\{\{(.+?)\}\}/g);if(n&&n.length)for(let r=0;ru()<.33?s(g):"",L=()=>$(s(o));var R=()=>{let t=P()+L();return t=t.charAt(0).toUpperCase()+t.slice(1),t+=b(),t},W=(e=0)=>{e||(e=l(3,10));let t=Math.min(e,15),n=[];for(;n.length{e||(e=l(3,10));let t=Math.min(e,15),n=[];for(;n.length[...new Set([...e,...t])],w=(e=[])=>(a=c(a,e),a.length),x=(e=[])=>(i=c(i,e),i.length),k=(e=[])=>(o=c(o,e),o.length),j=(e=[])=>(a=[...new Set([...e])],a.length),z=(e=[])=>(i=[...new Set([...e])],i.length),A=(e=[])=>(o=[...new Set([...e])],o.length),T=()=>[...a],N=()=>[...i],S=()=>[...o];var f,b=e=>{f=e};b(Math.random);var u=()=>f(),l=(e,t)=>{let n=e,r=t-e+1;return Math.floor(u()*r)+n},s=e=>{let t;for(;!t;)t=e[l(0,e.length-1)];return t},v=()=>{let e=".......!?!?;...".split("");return s(e)},q=e=>e.endsWith("s")?e:(e.match(/(ss|ish|ch|x|us)$/)?e+="e":e.endsWith("y")&&!d.includes(e.charAt(e.length-2))&&(e=e.slice(0,e.length-1),e+="ie"),e+"s"),m=e=>{let t="a";return e.match(/^(a|e|heir|herb|hour|i|o)/)&&(t="an"),`${t} ${e}`},y={noun:()=>s(a),a_noun:()=>m(s(a)),nouns:()=>q(s(a)),adjective:()=>s(i),an_adjective:()=>m(s(i))};var M=["noun","a_noun","nouns","adjective","an_adjective"],_=e=>e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").replace(/\r?\n|\r/g," ").replace(/\s\s+|\r/g," "),$=e=>{let t=e,n=e.match(/\{\{(.+?)\}\}/g);if(n&&n.length)for(let r=0;ru()<.33?s(g):"",L=()=>$(s(o));var R=()=>{let t=P()+L();return t=t.charAt(0).toUpperCase()+t.slice(1),t+=v(),t},W=(e=0)=>{e||(e=l(3,10));let t=Math.min(e,15),n=[];for(;n.length{e||(e=l(3,10));let t=Math.min(e,15),n=[];for(;n.length{var u=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var R=e=>u(e,"__esModule",{value:!0});var W=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})},C=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P(t))!L.call(e,o)&&(n||o!=="default")&&u(e,o,{get:()=>t[o],enumerable:!(r=$(t,o))||r.enumerable});return e};var F=(e=>(t,n)=>e&&e.get(t)||(n=C(R({}),t,1),e&&e.set(t,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var J={};W(J,{addAdjectives:()=>v,addNouns:()=>b,addTemplates:()=>y,article:()=>I,getAdjectives:()=>z,getNouns:()=>j,getTemplates:()=>A,paragraph:()=>_,sentence:()=>M,setAdjectives:()=>x,setNouns:()=>w,setRandom:()=>h,setTemplates:()=>k});var a=["alligator","ant","bear","bee","bird","camel","cat","cheetah","chicken","chimpanzee","cow","crocodile","deer","dog","dolphin","duck","eagle","elephant","fish","fly","fox","frog","giraffe","goat","goldfish","hamster","hippopotamus","horse","kangaroo","kitten","lion","lobster","monkey","octopus","owl","panda","pig","puppy","rabbit","rat","scorpion","seal","shark","sheep","snail","snake","spider","squirrel","tiger","turtle","wolf","zebra","apple","apricot","banana","blackberry","blueberry","cherry","cranberry","currant","fig","grape","grapefruit","grapes","kiwi","kumquat","lemon","lime","melon","nectarine","orange","peach","pear","persimmon","pineapple","plum","pomegranate","prune","raspberry","strawberry","tangerine","watermelon"],i=["adaptable","adventurous","affable","affectionate","agreeable","alert","alluring","ambitious","ambitious","amiable","amicable","amused","amusing","boundless","brave","brave","bright","bright","broad-minded","calm","calm","capable","careful","charming","charming","cheerful","coherent","comfortable","communicative","compassionate","confident","conscientious","considerate","convivial","cooperative","courageous","courageous","courteous","creative","credible","cultured","dashing","dazzling","debonair","decisive","decisive","decorous","delightful","detailed","determined","determined","diligent","diligent","diplomatic","discreet","discreet","dynamic","dynamic","eager","easygoing","efficient","elated","eminent","emotional","enchanting","encouraging","endurable","energetic","energetic","entertaining","enthusiastic","enthusiastic","excellent","excited","exclusive","exuberant","exuberant","fabulous","fair","fair-minded","faithful","faithful","fantastic","fearless","fearless","fine","forceful","frank","frank","friendly","friendly","funny","funny","generous","generous","gentle","gentle","glorious","good","good","gregarious","happy","hard-working","harmonious","helpful","helpful","hilarious","honest","honorable","humorous","imaginative","impartial","impartial","independent","industrious","instinctive","intellectual","intelligent","intuitive","inventive","jolly","joyous","kind","kind","kind-hearted","knowledgeable","level","likeable","lively","lovely","loving","loving","loyal","lucky","mature","modern","modest","neat","nice","nice","obedient","optimistic","painstaking","passionate","patient","peaceful","perfect","persistent","philosophical","pioneering","placid","placid","plausible","pleasant","plucky","plucky","polite","powerful","practical","pro-active","productive","protective","proud","punctual","quick-witted","quiet","quiet","rational","receptive","reflective","reliable","relieved","reserved","resolute","resourceful","responsible","rhetorical","righteous","romantic","romantic","sedate","seemly","selective","self-assured","self-confident","self-disciplined","sensible","sensitive","sensitive","shrewd","shy","silly","sincere","sincere","skillful","smiling","sociable","splendid","steadfast","stimulating","straightforward","successful","succinct","sympathetic","talented","thoughtful","thoughtful","thrifty","tidy","tough","tough","trustworthy","unassuming","unbiased","understanding","unusual","upbeat","versatile","vigorous","vivacious","warm","warmhearted","willing","willing","wise","witty","witty","wonderful"],m=["a","e","i","o","u","y"],l=["however, {{nouns}} have begun to rent {{nouns}} over the past few months, specifically for {{nouns}} associated with their {{nouns}}"],f=["to be more specific, ","in recent years, ","however, ","by the way","of course, ","some assert that ","if this was somewhat unclear, ","unfortunately, that is wrong; on the contrary, ","it's very tricky, if not impossible, ","this could be, or perhaps ","this is not to discredit the idea that ","we know that ","it's an undeniable fact, really; ","framed in a different way, ","what we don't know for sure is whether or not ","as far as we can estimate, ","as far as he is concerned, ","the zeitgeist contends that ","though we assume the latter, ","far from the truth, ","extending this logic, ","nowhere is it disputed that ","in modern times ","in ancient times ","recent controversy aside, ","washing and polishing the car,","having been a gymnast, ","after a long day at school and work, ","waking to the buzz of the alarm clock, ","draped neatly on a hanger, ","shouting with happiness, "],p=(e=[],t=[])=>[...new Set([...e,...t])],b=(e=[])=>(a=p(a,e),a.length),v=(e=[])=>(i=p(i,e),i.length),y=(e=[])=>(l=p(l,e),l.length),w=(e=[])=>(a=[...new Set([...e])],a.length),x=(e=[])=>(i=[...new Set([...e])],i.length),k=(e=[])=>(l=[...new Set([...e])],l.length),j=()=>[...a],z=()=>[...i],A=()=>[...l];var T,h=e=>{T=e};h(Math.random);var d=()=>T(),c=(e,t)=>{let n=e,r=t-e+1;return Math.floor(d()*r)+n},s=e=>{let t;for(;!t;)t=e[c(0,e.length-1)];return t},N=()=>{let e=".......!?!?;...".split("");return s(e)},U=e=>e.endsWith("s")?e:(e.match(/(ss|ish|ch|x|us)$/)?e+="e":e.endsWith("y")&&!m.includes(e.charAt(e.length-2))&&(e=e.slice(0,e.length-1),e+="ie"),e+"s"),S=e=>{let t="a";return e.match(/^(a|e|heir|herb|hour|i|o)/)&&(t="an"),`${t} ${e}`},q={noun:()=>s(a),a_noun:()=>S(s(a)),nouns:()=>U(s(a)),adjective:()=>s(i),an_adjective:()=>S(s(i))};var B=["noun","a_noun","nouns","adjective","an_adjective"],D=e=>e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").replace(/\r?\n|\r/g," ").replace(/\s\s+|\r/g," "),E=e=>{let t=e,n=e.match(/\{\{(.+?)\}\}/g);if(n&&n.length)for(let r=0;rd()<.33?s(f):"",H=()=>E(s(l));var M=()=>{let t=G()+H();return t=t.charAt(0).toUpperCase()+t.slice(1),t+=N(),t},_=(e=0)=>{e||(e=c(3,10));let t=Math.min(e,15),n=[];for(;n.length{e||(e=c(3,10));let t=Math.min(e,15),n=[];for(;n.length{var u=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var R=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})},W=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P(t))!L.call(e,o)&&o!==n&&u(e,o,{get:()=>t[o],enumerable:!(r=$(t,o))||r.enumerable});return e};var C=e=>W(u({},"__esModule",{value:!0}),e);var I={};R(I,{addAdjectives:()=>v,addNouns:()=>b,addTemplates:()=>y,article:()=>H,getAdjectives:()=>z,getNouns:()=>j,getTemplates:()=>A,paragraph:()=>_,sentence:()=>M,setAdjectives:()=>x,setNouns:()=>w,setRandom:()=>h,setTemplates:()=>k});var a=["alligator","ant","bear","bee","bird","camel","cat","cheetah","chicken","chimpanzee","cow","crocodile","deer","dog","dolphin","duck","eagle","elephant","fish","fly","fox","frog","giraffe","goat","goldfish","hamster","hippopotamus","horse","kangaroo","kitten","lion","lobster","monkey","octopus","owl","panda","pig","puppy","rabbit","rat","scorpion","seal","shark","sheep","snail","snake","spider","squirrel","tiger","turtle","wolf","zebra","apple","apricot","banana","blackberry","blueberry","cherry","cranberry","currant","fig","grape","grapefruit","grapes","kiwi","kumquat","lemon","lime","melon","nectarine","orange","peach","pear","persimmon","pineapple","plum","pomegranate","prune","raspberry","strawberry","tangerine","watermelon"],i=["adaptable","adventurous","affable","affectionate","agreeable","alert","alluring","ambitious","ambitious","amiable","amicable","amused","amusing","boundless","brave","brave","bright","bright","broad-minded","calm","calm","capable","careful","charming","charming","cheerful","coherent","comfortable","communicative","compassionate","confident","conscientious","considerate","convivial","cooperative","courageous","courageous","courteous","creative","credible","cultured","dashing","dazzling","debonair","decisive","decisive","decorous","delightful","detailed","determined","determined","diligent","diligent","diplomatic","discreet","discreet","dynamic","dynamic","eager","easygoing","efficient","elated","eminent","emotional","enchanting","encouraging","endurable","energetic","energetic","entertaining","enthusiastic","enthusiastic","excellent","excited","exclusive","exuberant","exuberant","fabulous","fair","fair-minded","faithful","faithful","fantastic","fearless","fearless","fine","forceful","frank","frank","friendly","friendly","funny","funny","generous","generous","gentle","gentle","glorious","good","good","gregarious","happy","hard-working","harmonious","helpful","helpful","hilarious","honest","honorable","humorous","imaginative","impartial","impartial","independent","industrious","instinctive","intellectual","intelligent","intuitive","inventive","jolly","joyous","kind","kind","kind-hearted","knowledgeable","level","likeable","lively","lovely","loving","loving","loyal","lucky","mature","modern","modest","neat","nice","nice","obedient","optimistic","painstaking","passionate","patient","peaceful","perfect","persistent","philosophical","pioneering","placid","placid","plausible","pleasant","plucky","plucky","polite","powerful","practical","pro-active","productive","protective","proud","punctual","quick-witted","quiet","quiet","rational","receptive","reflective","reliable","relieved","reserved","resolute","resourceful","responsible","rhetorical","righteous","romantic","romantic","sedate","seemly","selective","self-assured","self-confident","self-disciplined","sensible","sensitive","sensitive","shrewd","shy","silly","sincere","sincere","skillful","smiling","sociable","splendid","steadfast","stimulating","straightforward","successful","succinct","sympathetic","talented","thoughtful","thoughtful","thrifty","tidy","tough","tough","trustworthy","unassuming","unbiased","understanding","unusual","upbeat","versatile","vigorous","vivacious","warm","warmhearted","willing","willing","wise","witty","witty","wonderful"],m=["a","e","i","o","u","y"],l=["however, {{nouns}} have begun to rent {{nouns}} over the past few months, specifically for {{nouns}} associated with their {{nouns}}"],f=["to be more specific, ","in recent years, ","however, ","by the way","of course, ","some assert that ","if this was somewhat unclear, ","unfortunately, that is wrong; on the contrary, ","it's very tricky, if not impossible, ","this could be, or perhaps ","this is not to discredit the idea that ","we know that ","it's an undeniable fact, really; ","framed in a different way, ","what we don't know for sure is whether or not ","as far as we can estimate, ","as far as he is concerned, ","the zeitgeist contends that ","though we assume the latter, ","far from the truth, ","extending this logic, ","nowhere is it disputed that ","in modern times ","in ancient times ","recent controversy aside, ","washing and polishing the car,","having been a gymnast, ","after a long day at school and work, ","waking to the buzz of the alarm clock, ","draped neatly on a hanger, ","shouting with happiness, "],p=(e=[],t=[])=>[...new Set([...e,...t])],b=(e=[])=>(a=p(a,e),a.length),v=(e=[])=>(i=p(i,e),i.length),y=(e=[])=>(l=p(l,e),l.length),w=(e=[])=>(a=[...new Set([...e])],a.length),x=(e=[])=>(i=[...new Set([...e])],i.length),k=(e=[])=>(l=[...new Set([...e])],l.length),j=()=>[...a],z=()=>[...i],A=()=>[...l];var N,h=e=>{N=e};h(Math.random);var d=()=>N(),c=(e,t)=>{let n=e,r=t-e+1;return Math.floor(d()*r)+n},s=e=>{let t;for(;!t;)t=e[c(0,e.length-1)];return t},S=()=>{let e=".......!?!?;...".split("");return s(e)},F=e=>e.endsWith("s")?e:(e.match(/(ss|ish|ch|x|us)$/)?e+="e":e.endsWith("y")&&!m.includes(e.charAt(e.length-2))&&(e=e.slice(0,e.length-1),e+="ie"),e+"s"),T=e=>{let t="a";return e.match(/^(a|e|heir|herb|hour|i|o)/)&&(t="an"),`${t} ${e}`},q={noun:()=>s(a),a_noun:()=>T(s(a)),nouns:()=>F(s(a)),adjective:()=>s(i),an_adjective:()=>T(s(i))};var U=["noun","a_noun","nouns","adjective","an_adjective"],B=e=>e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").replace(/\r?\n|\r/g," ").replace(/\s\s+|\r/g," "),D=e=>{let t=e,n=e.match(/\{\{(.+?)\}\}/g);if(n&&n.length)for(let r=0;rd()<.33?s(f):"",G=()=>D(s(l));var M=()=>{let t=E()+G();return t=t.charAt(0).toUpperCase()+t.slice(1),t+=S(),t},_=(e=0)=>{e||(e=c(3,10));let t=Math.min(e,15),n=[];for(;n.length{e||(e=c(3,10));let t=Math.min(e,15),n=[];for(;n.length Date: Fri, 3 Jun 2022 15:42:46 +0700 Subject: [PATCH 2/2] Add test with Node 18 - Also add CI test for CodeQL --- .github/workflows/ci-test.yml | 2 +- .github/workflows/codeql-analysis.yml | 70 +++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 6d696fe..560615d 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node_version: [14.x, 15.x, 16.x, 17.x] + node_version: [14.x, 15.x, 16.x, 17.x, 18.x] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..2124bd6 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,70 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '33 18 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2