@catladder/cli 0.0.0-next-6916db3c → 0.0.0-next-dbb75f51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +1 -1
- package/README.md +2 -2
- package/dist/apps/cli/src/security/topics.json +15 -15
- package/dist/bundles/catci/index.js +1 -1
- package/dist/bundles/cli/index.js +1 -1
- package/dist/bundles/runner-images/kubernetes/helm-charts/the-panter-chart/README.md +2 -2
- package/dist/bundles/skills/catladder-config/SKILL.md +1 -1
- package/dist/packages/pipeline/src/types/config.d.ts +1 -1
- package/dist/packages/pipeline/src/types/hooks.d.ts +1 -1
- package/dist/runner-images/kubernetes/helm-charts/the-panter-chart/README.md +2 -2
- package/dist/skills/catladder-config/SKILL.md +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/includes/envrc +1 -1
- package/package.json +5 -5
- package/src/security/topics.json +15 -15
package/CONTRIBUTING.md
CHANGED
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
[See the documentation][docs-getting-started].
|
|
8
8
|
|
|
9
|
-
[docs-getting-started]: https://
|
|
9
|
+
[docs-getting-started]: https://panter.github.io/catladder/docs/getting_started "Getting started"
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
@@ -33,4 +33,4 @@ catladder -y project delete dev:web
|
|
|
33
33
|
|
|
34
34
|
[See contribution guide][docs-contribute].
|
|
35
35
|
|
|
36
|
-
[docs-contribute]: https://
|
|
36
|
+
[docs-contribute]: https://panter.github.io/catladder/docs/contribute "Contribution guide"
|
|
@@ -17,67 +17,67 @@
|
|
|
17
17
|
{
|
|
18
18
|
"description": "No sensitive information (passwords, keys, user data, ...) is logged or traced",
|
|
19
19
|
"responsibles": 1,
|
|
20
|
-
"more": "
|
|
20
|
+
"more": ""
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"description": "Passwords are stored hashed with salt and salt is not stored in the repository",
|
|
24
24
|
"responsibles": 1,
|
|
25
|
-
"more": "
|
|
25
|
+
"more": ""
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"description": "Input that ends up in DOM is properly sanitized",
|
|
29
29
|
"responsibles": 1,
|
|
30
|
-
"more": "
|
|
30
|
+
"more": ""
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"description": "All user inputs have reasonable validations",
|
|
34
34
|
"responsibles": 1,
|
|
35
|
-
"more": "
|
|
35
|
+
"more": ""
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"description": "The app is not using cookies",
|
|
39
39
|
"responsibles": 1,
|
|
40
|
-
"more": "
|
|
40
|
+
"more": ""
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"description": "The app is using cookies and cookies are properly configured",
|
|
44
44
|
"responsibles": 1,
|
|
45
|
-
"more": "
|
|
45
|
+
"more": ""
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"description": "The app uses JWT with a secret and the secret is not stored in the repository",
|
|
49
49
|
"responsibles": 1,
|
|
50
|
-
"more": "
|
|
50
|
+
"more": ""
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"description": "Authorization and user roles (RBAC) were reviewed thoroughly",
|
|
54
54
|
"responsibles": 2,
|
|
55
|
-
"more": "
|
|
55
|
+
"more": ""
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"description": "CORS headers do not use `*`",
|
|
59
59
|
"responsibles": 1,
|
|
60
|
-
"more": "
|
|
60
|
+
"more": ""
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"description": "CSP headers are properly configured (no `unsafe-inline` or `unsafe-eval`)",
|
|
64
64
|
"responsibles": 1,
|
|
65
|
-
"more": "
|
|
65
|
+
"more": ""
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"description": "DoS defense mechanism is implemented",
|
|
69
69
|
"responsibles": 1,
|
|
70
|
-
"more": "
|
|
70
|
+
"more": ""
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"description": "YAML/XML parsing is not used or used YAML/XML parsers have disabled DTD",
|
|
74
74
|
"responsibles": 1,
|
|
75
|
-
"more": "
|
|
75
|
+
"more": ""
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"description": "The app implements CSRF prevention",
|
|
79
79
|
"responsibles": 1,
|
|
80
|
-
"more": "
|
|
80
|
+
"more": ""
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"description": "The app has a rate limitter",
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
{
|
|
88
88
|
"description": "The app has disabled GraphQL introspection and schema registry",
|
|
89
89
|
"responsibles": 1,
|
|
90
|
-
"more": "
|
|
90
|
+
"more": ""
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"description": "The app has set GraphQL complexity query limits",
|
|
94
94
|
"responsibles": 1,
|
|
95
|
-
"more": "
|
|
95
|
+
"more": ""
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"description": "`sitemap.xml` does not leak any routes with sensitive data",
|
|
@@ -22,4 +22,4 @@ e.exports=function(){var e=process.versions.node;var t=e.split(".");return{origi
|
|
|
22
22
|
*
|
|
23
23
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
24
24
|
* Released under the MIT License.
|
|
25
|
-
*/const n=r(7850);const toRegexRange=(e,t,r)=>{if(n(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(n(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let s={relaxZeros:true,...r};if(typeof s.strictZeros==="boolean"){s.relaxZeros=s.strictZeros===false}let o=String(s.relaxZeros);let i=String(s.shorthand);let a=String(s.capture);let u=String(s.wrap);let c=e+":"+t+"="+o+i+a+u;if(toRegexRange.cache.hasOwnProperty(c)){return toRegexRange.cache[c].result}let l=Math.min(e,t);let p=Math.max(e,t);if(Math.abs(l-p)===1){let r=e+"|"+t;if(s.capture){return`(${r})`}if(s.wrap===false){return r}return`(?:${r})`}let d=hasPadding(e)||hasPadding(t);let f={min:e,max:t,a:l,b:p};let h=[];let g=[];if(d){f.isPadded=d;f.maxLen=String(f.max).length}if(l<0){let e=p<0?Math.abs(p):1;g=splitToPatterns(e,Math.abs(l),f,s);l=f.a=0}if(p>=0){h=splitToPatterns(l,p,f,s)}f.negatives=g;f.positives=h;f.result=collatePatterns(g,h,s);if(s.capture===true){f.result=`(${f.result})`}else if(s.wrap!==false&&h.length+g.length>1){f.result=`(?:${f.result})`}toRegexRange.cache[c]=f;return f.result};function collatePatterns(e,t,r){let n=filterPatterns(e,t,"-",false,r)||[];let s=filterPatterns(t,e,"",false,r)||[];let o=filterPatterns(e,t,"-?",true,r)||[];let i=n.concat(o).concat(s);return i.join("|")}function splitToRanges(e,t){let r=1;let n=1;let s=countNines(e,r);let o=new Set([t]);while(e<=s&&s<=t){o.add(s);r+=1;s=countNines(e,r)}s=countZeros(t+1,n)-1;while(e<s&&s<=t){o.add(s);n+=1;s=countZeros(t+1,n)-1}o=[...o];o.sort(compare);return o}function rangeToPattern(e,t,r){if(e===t){return{pattern:e,count:[],digits:0}}let n=zip(e,t);let s=n.length;let o="";let i=0;for(let e=0;e<s;e++){let[t,s]=n[e];if(t===s){o+=t}else if(t!=="0"||s!=="9"){o+=toCharacterClass(t,s,r)}else{i++}}if(i){o+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:o,count:[i],digits:s}}function splitToPatterns(e,t,r,n){let s=splitToRanges(e,t);let o=[];let i=e;let a;for(let e=0;e<s.length;e++){let t=s[e];let u=rangeToPattern(String(i),String(t),n);let c="";if(!r.isPadded&&a&&a.pattern===u.pattern){if(a.count.length>1){a.count.pop()}a.count.push(u.count[0]);a.string=a.pattern+toQuantifier(a.count);i=t+1;continue}if(r.isPadded){c=padZeros(t,r,n)}u.string=c+u.pattern+toQuantifier(u.count);o.push(u);i=t+1;a=u}return o}function filterPatterns(e,t,r,n,s){let o=[];for(let s of e){let{string:e}=s;if(!n&&!contains(t,"string",e)){o.push(r+e)}if(n&&contains(t,"string",e)){o.push(r+e)}}return o}function zip(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let n=Math.abs(t.maxLen-String(e).length);let s=r.relaxZeros!==false;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:{return s?`0{0,${n}}`:`0{${n}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},3340:(e,t,r)=>{e.exports=which;which.sync=whichSync;var n=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var s=r(6928);var o=n?";":":";var i=r(9648);function getNotFoundError(e){var t=new Error("not found: "+e);t.code="ENOENT";return t}function getPathInfo(e,t){var r=t.colon||o;var s=t.path||process.env.PATH||"";var i=[""];s=s.split(r);var a="";if(n){s.unshift(process.cwd());a=t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";i=a.split(r);if(e.indexOf(".")!==-1&&i[0]!=="")i.unshift("")}if(e.match(/\//)||n&&e.match(/\\/))s=[""];return{env:s,ext:i,extExe:a}}function which(e,t,r){if(typeof t==="function"){r=t;t={}}var n=getPathInfo(e,t);var o=n.env;var a=n.ext;var u=n.extExe;var c=[];(function F(n,l){if(n===l){if(t.all&&c.length)return r(null,c);else return r(getNotFoundError(e))}var p=o[n];if(p.charAt(0)==='"'&&p.slice(-1)==='"')p=p.slice(1,-1);var d=s.join(p,e);if(!p&&/^\.[\\\/]/.test(e)){d=e.slice(0,2)+d}(function E(e,s){if(e===s)return F(n+1,l);var o=a[e];i(d+o,{pathExt:u},(function(n,i){if(!n&&i){if(t.all)c.push(d+o);else return r(null,d+o)}return E(e+1,s)}))})(0,a.length)})(0,o.length)}function whichSync(e,t){t=t||{};var r=getPathInfo(e,t);var n=r.env;var o=r.ext;var a=r.extExe;var u=[];for(var c=0,l=n.length;c<l;c++){var p=n[c];if(p.charAt(0)==='"'&&p.slice(-1)==='"')p=p.slice(1,-1);var d=s.join(p,e);if(!p&&/^\.[\\\/]/.test(e)){d=e.slice(0,2)+d}for(var f=0,h=o.length;f<h;f++){var g=d+o[f];var m;try{m=i.sync(g,{pathExt:a});if(m){if(t.all)u.push(g);else return g}}catch(e){}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw getNotFoundError(e)}},5872:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol?"symbol":typeof e};function isLower(e){return e>=97&&e<=122}function isUpper(e){return e>=65&&e<=90}function isDigit(e){return e>=48&&e<=57}function toUpper(e){return e-32}function toUpperSafe(e){if(isLower(e)){return e-32}return e}function toLower(e){return e+32}function camelize$1(e,t){var r=e.charCodeAt(0);if(isDigit(r)||isUpper(r)||r==t){return e}var n=[];var s=false;if(isUpper(r)){s=true;n.push(toLower(r))}else{n.push(r)}var o=e.length;for(var i=1;i<o;++i){var a=e.charCodeAt(i);if(a===t){s=true;a=e.charCodeAt(++i);if(isNaN(a)){return e}n.push(toUpperSafe(a))}else{n.push(a)}}return s?String.fromCharCode.apply(undefined,n):e}function decamelize$1(e,t){var r=e.charCodeAt(0);if(!isLower(r)){return e}var n=e.length;var s=false;var o=[];for(var i=0;i<n;++i){var a=e.charCodeAt(i);if(isUpper(a)){o.push(t);o.push(toLower(a));s=true}else{o.push(a)}}return s?String.fromCharCode.apply(undefined,o):e}function pascalize$1(e,t){var r=e.charCodeAt(0);if(isDigit(r)||r==t){return e}var n=e.length;var s=false;var o=[];for(var i=0;i<n;++i){var a=e.charCodeAt(i);if(a===t){s=true;a=e.charCodeAt(++i);if(isNaN(a)){return e}o.push(toUpperSafe(a))}else if(i===0&&isLower(a)){s=true;o.push(toUpper(a))}else{o.push(a)}}return s?String.fromCharCode.apply(undefined,o):e}function depascalize$1(e,t){var r=e.charCodeAt(0);if(!isUpper(r)){return e}var n=e.length;var s=false;var o=[];for(var i=0;i<n;++i){var a=e.charCodeAt(i);if(isUpper(a)){if(i>0){o.push(t)}o.push(toLower(a));s=true}else{o.push(a)}}return s?String.fromCharCode.apply(undefined,o):e}function shouldProcessValue(e){return e&&(typeof e==="undefined"?"undefined":r(e))=="object"&&!(e instanceof Date)&&!(e instanceof Function)}function processKeys(e,t,r){var n=void 0;if(e instanceof Array){n=[]}else{if(typeof e.prototype!=="undefined"){return e}n={}}for(var s in e){var o=e[s];if(typeof s==="string")s=t(s,r&&r.separator);if(shouldProcessValue(o)){n[s]=processKeys(o,t,r)}else{n[s]=o}}return n}function processKeysInPlace(e,t,r){var n=Object.keys(e);for(var s=0;s<n.length;++s){var o=n[s];var i=e[o];var a=t(o,r&&r.separator);if(a!==o){delete e[o]}if(shouldProcessValue(i)){e[a]=processKeys(i,t,r)}else{e[a]=i}}return e}function camelize$$1(e,t){return camelize$1(e,t&&t.charCodeAt(0)||95)}function decamelize$$1(e,t){return decamelize$1(e,t&&t.charCodeAt(0)||95)}function pascalize$$1(e,t){return pascalize$1(e,t&&t.charCodeAt(0)||95)}function depascalize$$1(e,t){return depascalize$1(e,t&&t.charCodeAt(0)||95)}function camelizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,camelize$$1,t);return processKeys(e,camelize$$1,t)}function decamelizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,decamelize$$1,t);return processKeys(e,decamelize$$1,t)}function pascalizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,pascalize$$1,t);return processKeys(e,pascalize$$1,t)}function depascalizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,depascalize$$1,t);return processKeys(e,depascalize$$1,t)}t.camelize=camelize$$1;t.decamelize=decamelize$$1;t.pascalize=pascalize$$1;t.depascalize=depascalize$$1;t.camelizeKeys=camelizeKeys;t.decamelizeKeys=decamelizeKeys;t.pascalizeKeys=pascalizeKeys;t.depascalizeKeys=depascalizeKeys},505:module=>{module.exports=eval("require")("spawn-sync")},5317:e=>{"use strict";e.exports=require("child_process")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},1943:e=>{"use strict";e.exports=require("fs/promises")},5692:e=>{"use strict";e.exports=require("https")},6928:e=>{"use strict";e.exports=require("path")},9023:e=>{"use strict";e.exports=require("util")},1955:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var s=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,i;return i={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function verb(e){return function(t){return step([e,t])}}function step(a){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(r=0)),r)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;s=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.AsyncOption=void 0;var o=r(4883);var i=r(8593);var a=function(){function AsyncOption(e){this.promise=Promise.resolve(e)}AsyncOption.prototype.andThen=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){if(r.isNone()){return[2,r]}t=e(r.value);return[2,t instanceof AsyncOption?t.promise:t]}))}))}))};AsyncOption.prototype.map=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:if(r.isNone()){return[2,r]}t=i.Some;return[4,e(r.value)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}))};AsyncOption.prototype.or=function(e){return this.orElse((function(){return e}))};AsyncOption.prototype.orElse=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){if(r.isSome()){return[2,r]}t=e();return[2,t instanceof AsyncOption?t.promise:t]}))}))}))};AsyncOption.prototype.toResult=function(e){return new o.AsyncResult(this.promise.then((function(t){return t.toResult(e)})))};AsyncOption.prototype.thenInternal=function(e){return new AsyncOption(this.promise.then(e))};return AsyncOption}();t.AsyncOption=a},4883:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var s=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,i;return i={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function verb(e){return function(t){return step([e,t])}}function step(a){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(r=0)),r)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;s=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.AsyncResult=void 0;var o=r(1955);var i=r(7493);var a=function(){function AsyncResult(e){this.promise=Promise.resolve(e)}AsyncResult.prototype.andThen=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){if(r.isErr()){return[2,r]}t=e(r.value);return[2,t instanceof AsyncResult?t.promise:t]}))}))}))};AsyncResult.prototype.map=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:if(r.isErr()){return[2,r]}t=i.Ok;return[4,e(r.value)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}))};AsyncResult.prototype.mapErr=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:if(r.isOk()){return[2,r]}t=i.Err;return[4,e(r.error)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}))};AsyncResult.prototype.or=function(e){return this.orElse((function(){return e}))};AsyncResult.prototype.orElse=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){if(r.isOk()){return[2,r]}t=e(r.error);return[2,t instanceof AsyncResult?t.promise:t]}))}))}))};AsyncResult.prototype.toOption=function(){return new o.AsyncOption(this.promise.then((function(e){return e.toOption()})))};AsyncResult.prototype.thenInternal=function(e){return new AsyncResult(this.promise.then(e))};return AsyncResult}();t.AsyncResult=a},1709:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(1955),t);s(r(4883),t);s(r(7493),t);s(r(8593),t)},8593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Option=t.Some=t.None=void 0;var n=r(1955);var s=r(9483);var o=r(7493);var i=function(){function NoneImpl(){}NoneImpl.prototype.isSome=function(){return false};NoneImpl.prototype.isNone=function(){return true};NoneImpl.prototype[Symbol.iterator]=function(){return{next:function(){return{done:true,value:undefined}}}};NoneImpl.prototype.unwrapOr=function(e){return e};NoneImpl.prototype.expect=function(e){throw new Error("".concat(e))};NoneImpl.prototype.unwrap=function(){throw new Error("Tried to unwrap None")};NoneImpl.prototype.map=function(e){return this};NoneImpl.prototype.mapOr=function(e,t){return e};NoneImpl.prototype.mapOrElse=function(e,t){return e()};NoneImpl.prototype.or=function(e){return e};NoneImpl.prototype.orElse=function(e){return e()};NoneImpl.prototype.andThen=function(e){return this};NoneImpl.prototype.toResult=function(e){return(0,o.Err)(e)};NoneImpl.prototype.toString=function(){return"None"};NoneImpl.prototype.toAsyncOption=function(){return new n.AsyncOption(t.None)};return NoneImpl}();t.None=new i;Object.freeze(t.None);var a=function(){function SomeImpl(e){if(!(this instanceof SomeImpl)){return new SomeImpl(e)}this.value=e}SomeImpl.prototype.isSome=function(){return true};SomeImpl.prototype.isNone=function(){return false};SomeImpl.prototype[Symbol.iterator]=function(){var e=Object(this.value);return Symbol.iterator in e?e[Symbol.iterator]():{next:function(){return{done:true,value:undefined}}}};SomeImpl.prototype.unwrapOr=function(e){return this.value};SomeImpl.prototype.expect=function(e){return this.value};SomeImpl.prototype.unwrap=function(){return this.value};SomeImpl.prototype.map=function(e){return(0,t.Some)(e(this.value))};SomeImpl.prototype.mapOr=function(e,t){return t(this.value)};SomeImpl.prototype.mapOrElse=function(e,t){return t(this.value)};SomeImpl.prototype.or=function(e){return this};SomeImpl.prototype.orElse=function(e){return this};SomeImpl.prototype.andThen=function(e){return e(this.value)};SomeImpl.prototype.toResult=function(e){return(0,o.Ok)(this.value)};SomeImpl.prototype.toAsyncOption=function(){return new n.AsyncOption(this)};SomeImpl.prototype.safeUnwrap=function(){return this.value};SomeImpl.prototype.toString=function(){return"Some(".concat((0,s.toString)(this.value),")")};SomeImpl.EMPTY=new SomeImpl(undefined);return SomeImpl}();t.Some=a;var u;(function(e){function all(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var n=[];for(var s=0,o=e;s<o.length;s++){var i=o[s];if(i.isSome()){n.push(i.value)}else{return i}}return(0,t.Some)(n)}e.all=all;function any(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}for(var n=0,s=e;n<s.length;n++){var o=s[n];if(o.isSome()){return o}else{continue}}return t.None}e.any=any;function isOption(e){return e instanceof t.Some||e===t.None}e.isOption=isOption})(u||(t.Option=u={}))},7493:function(e,t,r){"use strict";var n=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:true});t.Result=t.Ok=t.OkImpl=t.Err=t.ErrImpl=void 0;var s=r(9483);var o=r(8593);var i=r(4883);var a=function(){function ErrImpl(e){if(!(this instanceof ErrImpl)){return new ErrImpl(e)}this.error=e;var t=(new Error).stack.split("\n").slice(2);if(t&&t.length>0&&t[0].includes("ErrImpl")){t.shift()}this._stack=t.join("\n")}ErrImpl.prototype.isOk=function(){return false};ErrImpl.prototype.isErr=function(){return true};ErrImpl.prototype[Symbol.iterator]=function(){return{next:function(){return{done:true,value:undefined}}}};ErrImpl.prototype.else=function(e){return e};ErrImpl.prototype.unwrapOr=function(e){return e};ErrImpl.prototype.expect=function(e){throw new Error("".concat(e," - Error: ").concat((0,s.toString)(this.error),"\n").concat(this._stack),{cause:this.error})};ErrImpl.prototype.expectErr=function(e){return this.error};ErrImpl.prototype.unwrap=function(){throw new Error("Tried to unwrap Error: ".concat((0,s.toString)(this.error),"\n").concat(this._stack),{cause:this.error})};ErrImpl.prototype.unwrapErr=function(){return this.error};ErrImpl.prototype.map=function(e){return this};ErrImpl.prototype.andThen=function(e){return this};ErrImpl.prototype.mapErr=function(e){return new t.Err(e(this.error))};ErrImpl.prototype.mapOr=function(e,t){return e};ErrImpl.prototype.mapOrElse=function(e,t){return e(this.error)};ErrImpl.prototype.or=function(e){return e};ErrImpl.prototype.orElse=function(e){return e(this.error)};ErrImpl.prototype.toOption=function(){return o.None};ErrImpl.prototype.toString=function(){return"Err(".concat((0,s.toString)(this.error),")")};Object.defineProperty(ErrImpl.prototype,"stack",{get:function(){return"".concat(this,"\n").concat(this._stack)},enumerable:false,configurable:true});ErrImpl.prototype.toAsyncResult=function(){return new i.AsyncResult(this)};ErrImpl.EMPTY=new ErrImpl(undefined);return ErrImpl}();t.ErrImpl=a;t.Err=a;var u=function(){function OkImpl(e){if(!(this instanceof OkImpl)){return new OkImpl(e)}this.value=e}OkImpl.prototype.isOk=function(){return true};OkImpl.prototype.isErr=function(){return false};OkImpl.prototype[Symbol.iterator]=function(){var e=Object(this.value);return Symbol.iterator in e?e[Symbol.iterator]():{next:function(){return{done:true,value:undefined}}}};OkImpl.prototype.else=function(e){return this.value};OkImpl.prototype.unwrapOr=function(e){return this.value};OkImpl.prototype.expect=function(e){return this.value};OkImpl.prototype.expectErr=function(e){throw new Error(e)};OkImpl.prototype.unwrap=function(){return this.value};OkImpl.prototype.unwrapErr=function(){throw new Error("Tried to unwrap Ok: ".concat((0,s.toString)(this.value)),{cause:this.value})};OkImpl.prototype.map=function(e){return new t.Ok(e(this.value))};OkImpl.prototype.andThen=function(e){return e(this.value)};OkImpl.prototype.mapErr=function(e){return this};OkImpl.prototype.mapOr=function(e,t){return t(this.value)};OkImpl.prototype.mapOrElse=function(e,t){return t(this.value)};OkImpl.prototype.or=function(e){return this};OkImpl.prototype.orElse=function(e){return this};OkImpl.prototype.toOption=function(){return(0,o.Some)(this.value)};OkImpl.prototype.safeUnwrap=function(){return this.value};OkImpl.prototype.toString=function(){return"Ok(".concat((0,s.toString)(this.value),")")};OkImpl.prototype.toAsyncResult=function(){return new i.AsyncResult(this)};OkImpl.EMPTY=new OkImpl(undefined);return OkImpl}();t.OkImpl=u;t.Ok=u;var c;(function(e){function all(e){var r=[];for(var s=1;s<arguments.length;s++){r[s-1]=arguments[s]}var o=e===undefined?[]:Array.isArray(e)?e:n([e],r,true);var i=[];for(var a=0,u=o;a<u.length;a++){var c=u[a];if(c.isOk()){i.push(c.value)}else{return c}}return new t.Ok(i)}e.all=all;function any(e){var r=[];for(var s=1;s<arguments.length;s++){r[s-1]=arguments[s]}var o=e===undefined?[]:Array.isArray(e)?e:n([e],r,true);var i=[];for(var a=0,u=o;a<u.length;a++){var c=u[a];if(c.isOk()){return c}else{i.push(c.error)}}return new t.Err(i)}e.any=any;function wrap(e){try{return new t.Ok(e())}catch(e){return new t.Err(e)}}e.wrap=wrap;function wrapAsync(e){try{return e().then((function(e){return new t.Ok(e)})).catch((function(e){return new t.Err(e)}))}catch(e){return Promise.resolve(new t.Err(e))}}e.wrapAsync=wrapAsync;function partition(e){return e.reduce((function(e,t){var r=e[0],s=e[1];return t.isOk()?[n(n([],r,true),[t.value],false),s]:[r,n(n([],s,true),[t.error],false)]}),[[],[]])}e.partition=partition;function isResult(e){return e instanceof t.Err||e instanceof t.Ok}e.isResult=isResult})(c||(t.Result=c={}))},9483:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toString=void 0;function toString(e){var t=String(e);if(t==="[object Object]"){try{t=JSON.stringify(e)}catch(e){}}return t}t.toString=toString},6743:e=>{"use strict";e.exports=JSON.parse('[{"description":"No API keys or secrets are stored in repository","responsibles":1,"more":""},{"description":"The app does not provide password login","responsibles":1,"more":""},{"description":"Passwords are not stored","responsibles":1,"more":""},{"description":"No sensitive information (passwords, keys, user data, ...) is logged or traced","responsibles":1,"more":"[Logging guide](https://www.notion.so/panterch/Long-story-logging-022722bb878f4724ae5b49e17667b630?pvs=4#9e5a36b7158a4953b73ec6a345bd8989), [Tracing guide](https://www.notion.so/panterch/Long-story-tracing-d8a9ec1ac2ff4fa78cefa8991233224e?pvs=4#535121b5bf9741fbaf8654b4b64d879d)"},{"description":"Passwords are stored hashed with salt and salt is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/hash.md)"},{"description":"Input that ends up in DOM is properly sanitized","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/xss.md)"},{"description":"All user inputs have reasonable validations","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/validation.md)"},{"description":"The app is not using cookies","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app is using cookies and cookies are properly configured","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"The app uses JWT with a secret and the secret is not stored in the repository","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cookies.md)"},{"description":"Authorization and user roles (RBAC) were reviewed thoroughly","responsibles":2,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/authorization.md)"},{"description":"CORS headers do not use `*`","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/cors.md)"},{"description":"CSP headers are properly configured (no `unsafe-inline` or `unsafe-eval`)","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csp.md)"},{"description":"DoS defense mechanism is implemented","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"YAML/XML parsing is not used or used YAML/XML parsers have disabled DTD","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/dos.md)"},{"description":"The app implements CSRF prevention","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/csrf.md)"},{"description":"The app has a rate limitter","responsibles":1,"more":""},{"description":"The app has disabled GraphQL introspection and schema registry","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"The app has set GraphQL complexity query limits","responsibles":1,"more":"[guide](https://git.panter.ch/panter/security-guide/-/blob/main/docs/audit/graphql.md)"},{"description":"`sitemap.xml` does not leak any routes with sensitive data","responsibles":1,"more":""},{"description":"Cloud storage is (private) configured to not leak any sensitive data publicly","responsibles":1,"more":""},{"description":"Security Dashboard checks weekly vulnerable dependencies https://dep.panter.swiss/","responsibles":1,"more":""},{"description":"The app has `.well-known/security.txt` https://securitytxt.org/","responsibles":1,"more":""}]')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}return r.exports}(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(r,n){if(n&1)r=this(r);if(n&8)return r;if(typeof r==="object"&&r){if(n&4&&r.__esModule)return r;if(n&16&&typeof r.then==="function")return r}var s=Object.create(null);__nccwpck_require__.r(s);var o={};t=t||[null,e({}),e([]),e(e)];for(var i=n&2&&r;typeof i=="object"&&!~t.indexOf(i);i=e(i)){Object.getOwnPropertyNames(i).forEach((e=>o[e]=()=>r[e]))}o["default"]=()=>r;__nccwpck_require__.d(s,o);return s}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{"use strict";var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(7650);const r=__nccwpck_require__(9392);const n=__nccwpck_require__(1276);const s=__nccwpck_require__(1206);const o=__nccwpck_require__(4472);const i=__nccwpck_require__(2596);const a=__nccwpck_require__(906);const u=__nccwpck_require__(3534);const c=`catci — catladder CI companion\n\nusage:\n catci security-audit ci-job <path> <gitlab-token> <main-branch> <project-id> <user-id>\n evaluates ${n.SECURITY_AUDIT_FILE_NAME}; creates a gitlab MR with the\n audit template when the document is missing (and exits 1)\n\n catci security-audit check <path>\n evaluates ${n.SECURITY_AUDIT_FILE_NAME}; exits 1 with instructions when\n the document is missing or unanswered (no remediation — works on\n any CI, including github)\n\n catci release changesets\n consumes pending .changeset/*.md files: computes the next version\n from the last v* tag, writes the changelog, commits, tags and\n pushes (no-op when no changesets are pending)\n\n catci release changeset-check\n MR/PR pipelines: reports which changesets the merge request adds,\n what is pending and what version merging would release (job log,\n changeset-report.md, sticky MR/PR comment where a token allows);\n exits 1 when the merge request adds no changeset\n\n catci release dispatch-tagged-workflow <tag>\n github only: dispatches the generated taggedRelease workflow for\n the tag (tags pushed with the job token don't trigger it)\n\n catci release github-queue-check\n github only, first step of the manual create-release task:\n releases right away when the main workflow run for HEAD is green\n (queued=false step output), queues the release when it is still\n running (queued=true, marker ref for the release-on-green\n workflow), fails when it concluded red\n\n catci release github-queued-guard <head-sha> <conclusion>\n github only, guard of the release-on-green workflow: consumes the\n queue marker when it matches the completed main run and decides\n whether the release step runs (release=true step output)\n\n catci publish npm --dir <dir> --env-type <envType> [--access <access>] [--registry <url>] [--dist-tag <tag>]\n npmPackage deploy job: derives version + dist-tag from the\n pipeline trigger (tagged release -> tag version @latest; branch/MR\n -> 0.0.0-<slug>-<sha> canary, with next/beta branches publishing\n under their own dist-tag), stamps package.json and runs npm\n publish (authenticated via the NPM_TOKEN secret)\n`;const fail=e=>{console.error(e);process.exit(1)};const evaluateGate=async e=>{const t=await(0,r.evaluateSecurityAudit)({path:e});if(t.isErr()){return null}if(t.value.score.answeredTopics===0){fail(`audit document has no answered topics\n`+`please answer security topics in ${n.SECURITY_AUDIT_FILE_NAME} by adding responsible people and check/cross in the table`)}console.log((0,r.makeSecurityAuditOverview)(t.value));return t.value};const securityAuditCheck=async e=>{const t=await evaluateGate(e);if(!t){fail(`could not evaluate ${n.SECURITY_AUDIT_FILE_NAME}\n`+`please add a ${n.SECURITY_AUDIT_FILE_NAME} security audit document to the repository `+`(run \`catladder security audit create\` locally to generate the template)`)}};const securityAuditCiJob=async(e,r,s,o,i)=>{const a=await evaluateGate(e);if(a){return}console.log("could not evaluate security audit document");console.log("creating new merge request with security audit template...");const c=new t.Gitlab({host:await(0,u.getGitlabHostUrl)(),token:r});const l=await(0,n.createSecurityAuditMergeRequest)({api:c,mainBranch:s,projectId:o,userId:parseInt(i)});if(l.isErr()){fail(`could not create merge request with security audit template: ${l.error}`);return}console.log("security audit merge request created successfully");console.log(`please finish the MR by updating ${n.SECURITY_AUDIT_FILE_NAME}: ${l.value.web_url}`);process.exit(1)};const main=async()=>{const[e,t,...r]=process.argv.slice(2);if(e==="security-audit"&&t==="ci-job"&&r.length===5){const[e,t,n,s,o]=r;return securityAuditCiJob(e,t,n,s,o)}if(e==="security-audit"&&t==="check"&&r.length===1){return securityAuditCheck(r[0])}if(e==="release"&&t==="changesets"&&r.length===0){return(0,s.changesetsReleaseJob)()}if(e==="release"&&t==="changeset-check"&&r.length===0){return(0,o.changesetCheckJob)()}if(e==="release"&&t==="dispatch-tagged-workflow"&&r.length===1){return(0,s.dispatchTaggedReleaseWorkflow)(r[0])}if(e==="release"&&t==="github-queue-check"&&r.length===0){return(0,i.githubQueueCheckJob)()}if(e==="release"&&t==="github-queued-guard"&&r.length===2){return(0,i.githubQueuedGuardJob)(r[0],r[1])}if(e==="publish"&&t==="npm"){const e=(0,a.parseNpmPublishArgs)(r);if(e){return(0,a.npmPublishJob)(e)}}fail(c)};main().catch((e=>{fail(`catci failed: ${e instanceof Error?e.message:e}`)}))})();module.exports=__webpack_exports__})();
|
|
25
|
+
*/const n=r(7850);const toRegexRange=(e,t,r)=>{if(n(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(n(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let s={relaxZeros:true,...r};if(typeof s.strictZeros==="boolean"){s.relaxZeros=s.strictZeros===false}let o=String(s.relaxZeros);let i=String(s.shorthand);let a=String(s.capture);let u=String(s.wrap);let c=e+":"+t+"="+o+i+a+u;if(toRegexRange.cache.hasOwnProperty(c)){return toRegexRange.cache[c].result}let l=Math.min(e,t);let p=Math.max(e,t);if(Math.abs(l-p)===1){let r=e+"|"+t;if(s.capture){return`(${r})`}if(s.wrap===false){return r}return`(?:${r})`}let d=hasPadding(e)||hasPadding(t);let f={min:e,max:t,a:l,b:p};let h=[];let g=[];if(d){f.isPadded=d;f.maxLen=String(f.max).length}if(l<0){let e=p<0?Math.abs(p):1;g=splitToPatterns(e,Math.abs(l),f,s);l=f.a=0}if(p>=0){h=splitToPatterns(l,p,f,s)}f.negatives=g;f.positives=h;f.result=collatePatterns(g,h,s);if(s.capture===true){f.result=`(${f.result})`}else if(s.wrap!==false&&h.length+g.length>1){f.result=`(?:${f.result})`}toRegexRange.cache[c]=f;return f.result};function collatePatterns(e,t,r){let n=filterPatterns(e,t,"-",false,r)||[];let s=filterPatterns(t,e,"",false,r)||[];let o=filterPatterns(e,t,"-?",true,r)||[];let i=n.concat(o).concat(s);return i.join("|")}function splitToRanges(e,t){let r=1;let n=1;let s=countNines(e,r);let o=new Set([t]);while(e<=s&&s<=t){o.add(s);r+=1;s=countNines(e,r)}s=countZeros(t+1,n)-1;while(e<s&&s<=t){o.add(s);n+=1;s=countZeros(t+1,n)-1}o=[...o];o.sort(compare);return o}function rangeToPattern(e,t,r){if(e===t){return{pattern:e,count:[],digits:0}}let n=zip(e,t);let s=n.length;let o="";let i=0;for(let e=0;e<s;e++){let[t,s]=n[e];if(t===s){o+=t}else if(t!=="0"||s!=="9"){o+=toCharacterClass(t,s,r)}else{i++}}if(i){o+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:o,count:[i],digits:s}}function splitToPatterns(e,t,r,n){let s=splitToRanges(e,t);let o=[];let i=e;let a;for(let e=0;e<s.length;e++){let t=s[e];let u=rangeToPattern(String(i),String(t),n);let c="";if(!r.isPadded&&a&&a.pattern===u.pattern){if(a.count.length>1){a.count.pop()}a.count.push(u.count[0]);a.string=a.pattern+toQuantifier(a.count);i=t+1;continue}if(r.isPadded){c=padZeros(t,r,n)}u.string=c+u.pattern+toQuantifier(u.count);o.push(u);i=t+1;a=u}return o}function filterPatterns(e,t,r,n,s){let o=[];for(let s of e){let{string:e}=s;if(!n&&!contains(t,"string",e)){o.push(r+e)}if(n&&contains(t,"string",e)){o.push(r+e)}}return o}function zip(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,r){return e.some((e=>e[t]===r))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,r=""]=e;if(r||t>1){return`{${t+(r?","+r:"")}}`}return""}function toCharacterClass(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,r){if(!t.isPadded){return e}let n=Math.abs(t.maxLen-String(e).length);let s=r.relaxZeros!==false;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:{return s?`0{0,${n}}`:`0{${n}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};e.exports=toRegexRange},3340:(e,t,r)=>{e.exports=which;which.sync=whichSync;var n=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var s=r(6928);var o=n?";":":";var i=r(9648);function getNotFoundError(e){var t=new Error("not found: "+e);t.code="ENOENT";return t}function getPathInfo(e,t){var r=t.colon||o;var s=t.path||process.env.PATH||"";var i=[""];s=s.split(r);var a="";if(n){s.unshift(process.cwd());a=t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";i=a.split(r);if(e.indexOf(".")!==-1&&i[0]!=="")i.unshift("")}if(e.match(/\//)||n&&e.match(/\\/))s=[""];return{env:s,ext:i,extExe:a}}function which(e,t,r){if(typeof t==="function"){r=t;t={}}var n=getPathInfo(e,t);var o=n.env;var a=n.ext;var u=n.extExe;var c=[];(function F(n,l){if(n===l){if(t.all&&c.length)return r(null,c);else return r(getNotFoundError(e))}var p=o[n];if(p.charAt(0)==='"'&&p.slice(-1)==='"')p=p.slice(1,-1);var d=s.join(p,e);if(!p&&/^\.[\\\/]/.test(e)){d=e.slice(0,2)+d}(function E(e,s){if(e===s)return F(n+1,l);var o=a[e];i(d+o,{pathExt:u},(function(n,i){if(!n&&i){if(t.all)c.push(d+o);else return r(null,d+o)}return E(e+1,s)}))})(0,a.length)})(0,o.length)}function whichSync(e,t){t=t||{};var r=getPathInfo(e,t);var n=r.env;var o=r.ext;var a=r.extExe;var u=[];for(var c=0,l=n.length;c<l;c++){var p=n[c];if(p.charAt(0)==='"'&&p.slice(-1)==='"')p=p.slice(1,-1);var d=s.join(p,e);if(!p&&/^\.[\\\/]/.test(e)){d=e.slice(0,2)+d}for(var f=0,h=o.length;f<h;f++){var g=d+o[f];var m;try{m=i.sync(g,{pathExt:a});if(m){if(t.all)u.push(g);else return g}}catch(e){}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw getNotFoundError(e)}},5872:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol?"symbol":typeof e};function isLower(e){return e>=97&&e<=122}function isUpper(e){return e>=65&&e<=90}function isDigit(e){return e>=48&&e<=57}function toUpper(e){return e-32}function toUpperSafe(e){if(isLower(e)){return e-32}return e}function toLower(e){return e+32}function camelize$1(e,t){var r=e.charCodeAt(0);if(isDigit(r)||isUpper(r)||r==t){return e}var n=[];var s=false;if(isUpper(r)){s=true;n.push(toLower(r))}else{n.push(r)}var o=e.length;for(var i=1;i<o;++i){var a=e.charCodeAt(i);if(a===t){s=true;a=e.charCodeAt(++i);if(isNaN(a)){return e}n.push(toUpperSafe(a))}else{n.push(a)}}return s?String.fromCharCode.apply(undefined,n):e}function decamelize$1(e,t){var r=e.charCodeAt(0);if(!isLower(r)){return e}var n=e.length;var s=false;var o=[];for(var i=0;i<n;++i){var a=e.charCodeAt(i);if(isUpper(a)){o.push(t);o.push(toLower(a));s=true}else{o.push(a)}}return s?String.fromCharCode.apply(undefined,o):e}function pascalize$1(e,t){var r=e.charCodeAt(0);if(isDigit(r)||r==t){return e}var n=e.length;var s=false;var o=[];for(var i=0;i<n;++i){var a=e.charCodeAt(i);if(a===t){s=true;a=e.charCodeAt(++i);if(isNaN(a)){return e}o.push(toUpperSafe(a))}else if(i===0&&isLower(a)){s=true;o.push(toUpper(a))}else{o.push(a)}}return s?String.fromCharCode.apply(undefined,o):e}function depascalize$1(e,t){var r=e.charCodeAt(0);if(!isUpper(r)){return e}var n=e.length;var s=false;var o=[];for(var i=0;i<n;++i){var a=e.charCodeAt(i);if(isUpper(a)){if(i>0){o.push(t)}o.push(toLower(a));s=true}else{o.push(a)}}return s?String.fromCharCode.apply(undefined,o):e}function shouldProcessValue(e){return e&&(typeof e==="undefined"?"undefined":r(e))=="object"&&!(e instanceof Date)&&!(e instanceof Function)}function processKeys(e,t,r){var n=void 0;if(e instanceof Array){n=[]}else{if(typeof e.prototype!=="undefined"){return e}n={}}for(var s in e){var o=e[s];if(typeof s==="string")s=t(s,r&&r.separator);if(shouldProcessValue(o)){n[s]=processKeys(o,t,r)}else{n[s]=o}}return n}function processKeysInPlace(e,t,r){var n=Object.keys(e);for(var s=0;s<n.length;++s){var o=n[s];var i=e[o];var a=t(o,r&&r.separator);if(a!==o){delete e[o]}if(shouldProcessValue(i)){e[a]=processKeys(i,t,r)}else{e[a]=i}}return e}function camelize$$1(e,t){return camelize$1(e,t&&t.charCodeAt(0)||95)}function decamelize$$1(e,t){return decamelize$1(e,t&&t.charCodeAt(0)||95)}function pascalize$$1(e,t){return pascalize$1(e,t&&t.charCodeAt(0)||95)}function depascalize$$1(e,t){return depascalize$1(e,t&&t.charCodeAt(0)||95)}function camelizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,camelize$$1,t);return processKeys(e,camelize$$1,t)}function decamelizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,decamelize$$1,t);return processKeys(e,decamelize$$1,t)}function pascalizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,pascalize$$1,t);return processKeys(e,pascalize$$1,t)}function depascalizeKeys(e,t){t=t||{};if(!shouldProcessValue(e))return e;if(t.inPlace)return processKeysInPlace(e,depascalize$$1,t);return processKeys(e,depascalize$$1,t)}t.camelize=camelize$$1;t.decamelize=decamelize$$1;t.pascalize=pascalize$$1;t.depascalize=depascalize$$1;t.camelizeKeys=camelizeKeys;t.decamelizeKeys=decamelizeKeys;t.pascalizeKeys=pascalizeKeys;t.depascalizeKeys=depascalizeKeys},505:module=>{module.exports=eval("require")("spawn-sync")},5317:e=>{"use strict";e.exports=require("child_process")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},1943:e=>{"use strict";e.exports=require("fs/promises")},5692:e=>{"use strict";e.exports=require("https")},6928:e=>{"use strict";e.exports=require("path")},9023:e=>{"use strict";e.exports=require("util")},1955:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var s=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,i;return i={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function verb(e){return function(t){return step([e,t])}}function step(a){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(r=0)),r)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;s=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.AsyncOption=void 0;var o=r(4883);var i=r(8593);var a=function(){function AsyncOption(e){this.promise=Promise.resolve(e)}AsyncOption.prototype.andThen=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){if(r.isNone()){return[2,r]}t=e(r.value);return[2,t instanceof AsyncOption?t.promise:t]}))}))}))};AsyncOption.prototype.map=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:if(r.isNone()){return[2,r]}t=i.Some;return[4,e(r.value)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}))};AsyncOption.prototype.or=function(e){return this.orElse((function(){return e}))};AsyncOption.prototype.orElse=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){if(r.isSome()){return[2,r]}t=e();return[2,t instanceof AsyncOption?t.promise:t]}))}))}))};AsyncOption.prototype.toResult=function(e){return new o.AsyncResult(this.promise.then((function(t){return t.toResult(e)})))};AsyncOption.prototype.thenInternal=function(e){return new AsyncOption(this.promise.then(e))};return AsyncOption}();t.AsyncOption=a},4883:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var s=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,i;return i={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function verb(e){return function(t){return step([e,t])}}function step(a){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(r=0)),r)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:r.label++;return{value:a[1],done:false};case 5:r.label++;s=a[1];a=[0];continue;case 7:a=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(a[0]===6&&r.label<o[1]){r.label=o[1];o=a;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(a);break}if(o[2])r.ops.pop();r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.AsyncResult=void 0;var o=r(1955);var i=r(7493);var a=function(){function AsyncResult(e){this.promise=Promise.resolve(e)}AsyncResult.prototype.andThen=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){if(r.isErr()){return[2,r]}t=e(r.value);return[2,t instanceof AsyncResult?t.promise:t]}))}))}))};AsyncResult.prototype.map=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:if(r.isErr()){return[2,r]}t=i.Ok;return[4,e(r.value)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}))};AsyncResult.prototype.mapErr=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){switch(n.label){case 0:if(r.isOk()){return[2,r]}t=i.Err;return[4,e(r.error)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}))};AsyncResult.prototype.or=function(e){return this.orElse((function(){return e}))};AsyncResult.prototype.orElse=function(e){var t=this;return this.thenInternal((function(r){return n(t,void 0,void 0,(function(){var t;return s(this,(function(n){if(r.isOk()){return[2,r]}t=e(r.error);return[2,t instanceof AsyncResult?t.promise:t]}))}))}))};AsyncResult.prototype.toOption=function(){return new o.AsyncOption(this.promise.then((function(e){return e.toOption()})))};AsyncResult.prototype.thenInternal=function(e){return new AsyncResult(this.promise.then(e))};return AsyncResult}();t.AsyncResult=a},1709:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(1955),t);s(r(4883),t);s(r(7493),t);s(r(8593),t)},8593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Option=t.Some=t.None=void 0;var n=r(1955);var s=r(9483);var o=r(7493);var i=function(){function NoneImpl(){}NoneImpl.prototype.isSome=function(){return false};NoneImpl.prototype.isNone=function(){return true};NoneImpl.prototype[Symbol.iterator]=function(){return{next:function(){return{done:true,value:undefined}}}};NoneImpl.prototype.unwrapOr=function(e){return e};NoneImpl.prototype.expect=function(e){throw new Error("".concat(e))};NoneImpl.prototype.unwrap=function(){throw new Error("Tried to unwrap None")};NoneImpl.prototype.map=function(e){return this};NoneImpl.prototype.mapOr=function(e,t){return e};NoneImpl.prototype.mapOrElse=function(e,t){return e()};NoneImpl.prototype.or=function(e){return e};NoneImpl.prototype.orElse=function(e){return e()};NoneImpl.prototype.andThen=function(e){return this};NoneImpl.prototype.toResult=function(e){return(0,o.Err)(e)};NoneImpl.prototype.toString=function(){return"None"};NoneImpl.prototype.toAsyncOption=function(){return new n.AsyncOption(t.None)};return NoneImpl}();t.None=new i;Object.freeze(t.None);var a=function(){function SomeImpl(e){if(!(this instanceof SomeImpl)){return new SomeImpl(e)}this.value=e}SomeImpl.prototype.isSome=function(){return true};SomeImpl.prototype.isNone=function(){return false};SomeImpl.prototype[Symbol.iterator]=function(){var e=Object(this.value);return Symbol.iterator in e?e[Symbol.iterator]():{next:function(){return{done:true,value:undefined}}}};SomeImpl.prototype.unwrapOr=function(e){return this.value};SomeImpl.prototype.expect=function(e){return this.value};SomeImpl.prototype.unwrap=function(){return this.value};SomeImpl.prototype.map=function(e){return(0,t.Some)(e(this.value))};SomeImpl.prototype.mapOr=function(e,t){return t(this.value)};SomeImpl.prototype.mapOrElse=function(e,t){return t(this.value)};SomeImpl.prototype.or=function(e){return this};SomeImpl.prototype.orElse=function(e){return this};SomeImpl.prototype.andThen=function(e){return e(this.value)};SomeImpl.prototype.toResult=function(e){return(0,o.Ok)(this.value)};SomeImpl.prototype.toAsyncOption=function(){return new n.AsyncOption(this)};SomeImpl.prototype.safeUnwrap=function(){return this.value};SomeImpl.prototype.toString=function(){return"Some(".concat((0,s.toString)(this.value),")")};SomeImpl.EMPTY=new SomeImpl(undefined);return SomeImpl}();t.Some=a;var u;(function(e){function all(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var n=[];for(var s=0,o=e;s<o.length;s++){var i=o[s];if(i.isSome()){n.push(i.value)}else{return i}}return(0,t.Some)(n)}e.all=all;function any(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}for(var n=0,s=e;n<s.length;n++){var o=s[n];if(o.isSome()){return o}else{continue}}return t.None}e.any=any;function isOption(e){return e instanceof t.Some||e===t.None}e.isOption=isOption})(u||(t.Option=u={}))},7493:function(e,t,r){"use strict";var n=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:true});t.Result=t.Ok=t.OkImpl=t.Err=t.ErrImpl=void 0;var s=r(9483);var o=r(8593);var i=r(4883);var a=function(){function ErrImpl(e){if(!(this instanceof ErrImpl)){return new ErrImpl(e)}this.error=e;var t=(new Error).stack.split("\n").slice(2);if(t&&t.length>0&&t[0].includes("ErrImpl")){t.shift()}this._stack=t.join("\n")}ErrImpl.prototype.isOk=function(){return false};ErrImpl.prototype.isErr=function(){return true};ErrImpl.prototype[Symbol.iterator]=function(){return{next:function(){return{done:true,value:undefined}}}};ErrImpl.prototype.else=function(e){return e};ErrImpl.prototype.unwrapOr=function(e){return e};ErrImpl.prototype.expect=function(e){throw new Error("".concat(e," - Error: ").concat((0,s.toString)(this.error),"\n").concat(this._stack),{cause:this.error})};ErrImpl.prototype.expectErr=function(e){return this.error};ErrImpl.prototype.unwrap=function(){throw new Error("Tried to unwrap Error: ".concat((0,s.toString)(this.error),"\n").concat(this._stack),{cause:this.error})};ErrImpl.prototype.unwrapErr=function(){return this.error};ErrImpl.prototype.map=function(e){return this};ErrImpl.prototype.andThen=function(e){return this};ErrImpl.prototype.mapErr=function(e){return new t.Err(e(this.error))};ErrImpl.prototype.mapOr=function(e,t){return e};ErrImpl.prototype.mapOrElse=function(e,t){return e(this.error)};ErrImpl.prototype.or=function(e){return e};ErrImpl.prototype.orElse=function(e){return e(this.error)};ErrImpl.prototype.toOption=function(){return o.None};ErrImpl.prototype.toString=function(){return"Err(".concat((0,s.toString)(this.error),")")};Object.defineProperty(ErrImpl.prototype,"stack",{get:function(){return"".concat(this,"\n").concat(this._stack)},enumerable:false,configurable:true});ErrImpl.prototype.toAsyncResult=function(){return new i.AsyncResult(this)};ErrImpl.EMPTY=new ErrImpl(undefined);return ErrImpl}();t.ErrImpl=a;t.Err=a;var u=function(){function OkImpl(e){if(!(this instanceof OkImpl)){return new OkImpl(e)}this.value=e}OkImpl.prototype.isOk=function(){return true};OkImpl.prototype.isErr=function(){return false};OkImpl.prototype[Symbol.iterator]=function(){var e=Object(this.value);return Symbol.iterator in e?e[Symbol.iterator]():{next:function(){return{done:true,value:undefined}}}};OkImpl.prototype.else=function(e){return this.value};OkImpl.prototype.unwrapOr=function(e){return this.value};OkImpl.prototype.expect=function(e){return this.value};OkImpl.prototype.expectErr=function(e){throw new Error(e)};OkImpl.prototype.unwrap=function(){return this.value};OkImpl.prototype.unwrapErr=function(){throw new Error("Tried to unwrap Ok: ".concat((0,s.toString)(this.value)),{cause:this.value})};OkImpl.prototype.map=function(e){return new t.Ok(e(this.value))};OkImpl.prototype.andThen=function(e){return e(this.value)};OkImpl.prototype.mapErr=function(e){return this};OkImpl.prototype.mapOr=function(e,t){return t(this.value)};OkImpl.prototype.mapOrElse=function(e,t){return t(this.value)};OkImpl.prototype.or=function(e){return this};OkImpl.prototype.orElse=function(e){return this};OkImpl.prototype.toOption=function(){return(0,o.Some)(this.value)};OkImpl.prototype.safeUnwrap=function(){return this.value};OkImpl.prototype.toString=function(){return"Ok(".concat((0,s.toString)(this.value),")")};OkImpl.prototype.toAsyncResult=function(){return new i.AsyncResult(this)};OkImpl.EMPTY=new OkImpl(undefined);return OkImpl}();t.OkImpl=u;t.Ok=u;var c;(function(e){function all(e){var r=[];for(var s=1;s<arguments.length;s++){r[s-1]=arguments[s]}var o=e===undefined?[]:Array.isArray(e)?e:n([e],r,true);var i=[];for(var a=0,u=o;a<u.length;a++){var c=u[a];if(c.isOk()){i.push(c.value)}else{return c}}return new t.Ok(i)}e.all=all;function any(e){var r=[];for(var s=1;s<arguments.length;s++){r[s-1]=arguments[s]}var o=e===undefined?[]:Array.isArray(e)?e:n([e],r,true);var i=[];for(var a=0,u=o;a<u.length;a++){var c=u[a];if(c.isOk()){return c}else{i.push(c.error)}}return new t.Err(i)}e.any=any;function wrap(e){try{return new t.Ok(e())}catch(e){return new t.Err(e)}}e.wrap=wrap;function wrapAsync(e){try{return e().then((function(e){return new t.Ok(e)})).catch((function(e){return new t.Err(e)}))}catch(e){return Promise.resolve(new t.Err(e))}}e.wrapAsync=wrapAsync;function partition(e){return e.reduce((function(e,t){var r=e[0],s=e[1];return t.isOk()?[n(n([],r,true),[t.value],false),s]:[r,n(n([],s,true),[t.error],false)]}),[[],[]])}e.partition=partition;function isResult(e){return e instanceof t.Err||e instanceof t.Ok}e.isResult=isResult})(c||(t.Result=c={}))},9483:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toString=void 0;function toString(e){var t=String(e);if(t==="[object Object]"){try{t=JSON.stringify(e)}catch(e){}}return t}t.toString=toString},6743:e=>{"use strict";e.exports=JSON.parse('[{"description":"No API keys or secrets are stored in repository","responsibles":1,"more":""},{"description":"The app does not provide password login","responsibles":1,"more":""},{"description":"Passwords are not stored","responsibles":1,"more":""},{"description":"No sensitive information (passwords, keys, user data, ...) is logged or traced","responsibles":1,"more":""},{"description":"Passwords are stored hashed with salt and salt is not stored in the repository","responsibles":1,"more":""},{"description":"Input that ends up in DOM is properly sanitized","responsibles":1,"more":""},{"description":"All user inputs have reasonable validations","responsibles":1,"more":""},{"description":"The app is not using cookies","responsibles":1,"more":""},{"description":"The app is using cookies and cookies are properly configured","responsibles":1,"more":""},{"description":"The app uses JWT with a secret and the secret is not stored in the repository","responsibles":1,"more":""},{"description":"Authorization and user roles (RBAC) were reviewed thoroughly","responsibles":2,"more":""},{"description":"CORS headers do not use `*`","responsibles":1,"more":""},{"description":"CSP headers are properly configured (no `unsafe-inline` or `unsafe-eval`)","responsibles":1,"more":""},{"description":"DoS defense mechanism is implemented","responsibles":1,"more":""},{"description":"YAML/XML parsing is not used or used YAML/XML parsers have disabled DTD","responsibles":1,"more":""},{"description":"The app implements CSRF prevention","responsibles":1,"more":""},{"description":"The app has a rate limitter","responsibles":1,"more":""},{"description":"The app has disabled GraphQL introspection and schema registry","responsibles":1,"more":""},{"description":"The app has set GraphQL complexity query limits","responsibles":1,"more":""},{"description":"`sitemap.xml` does not leak any routes with sensitive data","responsibles":1,"more":""},{"description":"Cloud storage is (private) configured to not leak any sensitive data publicly","responsibles":1,"more":""},{"description":"Security Dashboard checks weekly vulnerable dependencies https://dep.panter.swiss/","responsibles":1,"more":""},{"description":"The app has `.well-known/security.txt` https://securitytxt.org/","responsibles":1,"more":""}]')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}return r.exports}(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(r,n){if(n&1)r=this(r);if(n&8)return r;if(typeof r==="object"&&r){if(n&4&&r.__esModule)return r;if(n&16&&typeof r.then==="function")return r}var s=Object.create(null);__nccwpck_require__.r(s);var o={};t=t||[null,e({}),e([]),e(e)];for(var i=n&2&&r;typeof i=="object"&&!~t.indexOf(i);i=e(i)){Object.getOwnPropertyNames(i).forEach((e=>o[e]=()=>r[e]))}o["default"]=()=>r;__nccwpck_require__.d(s,o);return s}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{"use strict";var e=__webpack_exports__;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(7650);const r=__nccwpck_require__(9392);const n=__nccwpck_require__(1276);const s=__nccwpck_require__(1206);const o=__nccwpck_require__(4472);const i=__nccwpck_require__(2596);const a=__nccwpck_require__(906);const u=__nccwpck_require__(3534);const c=`catci — catladder CI companion\n\nusage:\n catci security-audit ci-job <path> <gitlab-token> <main-branch> <project-id> <user-id>\n evaluates ${n.SECURITY_AUDIT_FILE_NAME}; creates a gitlab MR with the\n audit template when the document is missing (and exits 1)\n\n catci security-audit check <path>\n evaluates ${n.SECURITY_AUDIT_FILE_NAME}; exits 1 with instructions when\n the document is missing or unanswered (no remediation — works on\n any CI, including github)\n\n catci release changesets\n consumes pending .changeset/*.md files: computes the next version\n from the last v* tag, writes the changelog, commits, tags and\n pushes (no-op when no changesets are pending)\n\n catci release changeset-check\n MR/PR pipelines: reports which changesets the merge request adds,\n what is pending and what version merging would release (job log,\n changeset-report.md, sticky MR/PR comment where a token allows);\n exits 1 when the merge request adds no changeset\n\n catci release dispatch-tagged-workflow <tag>\n github only: dispatches the generated taggedRelease workflow for\n the tag (tags pushed with the job token don't trigger it)\n\n catci release github-queue-check\n github only, first step of the manual create-release task:\n releases right away when the main workflow run for HEAD is green\n (queued=false step output), queues the release when it is still\n running (queued=true, marker ref for the release-on-green\n workflow), fails when it concluded red\n\n catci release github-queued-guard <head-sha> <conclusion>\n github only, guard of the release-on-green workflow: consumes the\n queue marker when it matches the completed main run and decides\n whether the release step runs (release=true step output)\n\n catci publish npm --dir <dir> --env-type <envType> [--access <access>] [--registry <url>] [--dist-tag <tag>]\n npmPackage deploy job: derives version + dist-tag from the\n pipeline trigger (tagged release -> tag version @latest; branch/MR\n -> 0.0.0-<slug>-<sha> canary, with next/beta branches publishing\n under their own dist-tag), stamps package.json and runs npm\n publish (authenticated via the NPM_TOKEN secret)\n`;const fail=e=>{console.error(e);process.exit(1)};const evaluateGate=async e=>{const t=await(0,r.evaluateSecurityAudit)({path:e});if(t.isErr()){return null}if(t.value.score.answeredTopics===0){fail(`audit document has no answered topics\n`+`please answer security topics in ${n.SECURITY_AUDIT_FILE_NAME} by adding responsible people and check/cross in the table`)}console.log((0,r.makeSecurityAuditOverview)(t.value));return t.value};const securityAuditCheck=async e=>{const t=await evaluateGate(e);if(!t){fail(`could not evaluate ${n.SECURITY_AUDIT_FILE_NAME}\n`+`please add a ${n.SECURITY_AUDIT_FILE_NAME} security audit document to the repository `+`(run \`catladder security audit create\` locally to generate the template)`)}};const securityAuditCiJob=async(e,r,s,o,i)=>{const a=await evaluateGate(e);if(a){return}console.log("could not evaluate security audit document");console.log("creating new merge request with security audit template...");const c=new t.Gitlab({host:await(0,u.getGitlabHostUrl)(),token:r});const l=await(0,n.createSecurityAuditMergeRequest)({api:c,mainBranch:s,projectId:o,userId:parseInt(i)});if(l.isErr()){fail(`could not create merge request with security audit template: ${l.error}`);return}console.log("security audit merge request created successfully");console.log(`please finish the MR by updating ${n.SECURITY_AUDIT_FILE_NAME}: ${l.value.web_url}`);process.exit(1)};const main=async()=>{const[e,t,...r]=process.argv.slice(2);if(e==="security-audit"&&t==="ci-job"&&r.length===5){const[e,t,n,s,o]=r;return securityAuditCiJob(e,t,n,s,o)}if(e==="security-audit"&&t==="check"&&r.length===1){return securityAuditCheck(r[0])}if(e==="release"&&t==="changesets"&&r.length===0){return(0,s.changesetsReleaseJob)()}if(e==="release"&&t==="changeset-check"&&r.length===0){return(0,o.changesetCheckJob)()}if(e==="release"&&t==="dispatch-tagged-workflow"&&r.length===1){return(0,s.dispatchTaggedReleaseWorkflow)(r[0])}if(e==="release"&&t==="github-queue-check"&&r.length===0){return(0,i.githubQueueCheckJob)()}if(e==="release"&&t==="github-queued-guard"&&r.length===2){return(0,i.githubQueuedGuardJob)(r[0],r[1])}if(e==="publish"&&t==="npm"){const e=(0,a.parseNpmPublishArgs)(r);if(e){return(0,a.npmPublishJob)(e)}}fail(c)};main().catch((e=>{fail(`catci failed: ${e instanceof Error?e.message:e}`)}))})();module.exports=__webpack_exports__})();
|
|
@@ -330169,7 +330169,7 @@ if (lodash_default_symIterator) {
|
|
|
330169
330169
|
/***/ ((module) => {
|
|
330170
330170
|
|
|
330171
330171
|
"use strict";
|
|
330172
|
-
module.exports = /*#__PURE__*/JSON.parse('[{"description":"No API keys or secrets are stored in repository","responsibles":1,"more":""},{"description":"The app does not provide password login","responsibles":1,"more":""},{"description":"Passwords are not stored","responsibles":1,"more":""},{"description":"No sensitive information (passwords, keys, user data, ...) is logged or traced","responsibles":1,"more":"
|
|
330172
|
+
module.exports = /*#__PURE__*/JSON.parse('[{"description":"No API keys or secrets are stored in repository","responsibles":1,"more":""},{"description":"The app does not provide password login","responsibles":1,"more":""},{"description":"Passwords are not stored","responsibles":1,"more":""},{"description":"No sensitive information (passwords, keys, user data, ...) is logged or traced","responsibles":1,"more":""},{"description":"Passwords are stored hashed with salt and salt is not stored in the repository","responsibles":1,"more":""},{"description":"Input that ends up in DOM is properly sanitized","responsibles":1,"more":""},{"description":"All user inputs have reasonable validations","responsibles":1,"more":""},{"description":"The app is not using cookies","responsibles":1,"more":""},{"description":"The app is using cookies and cookies are properly configured","responsibles":1,"more":""},{"description":"The app uses JWT with a secret and the secret is not stored in the repository","responsibles":1,"more":""},{"description":"Authorization and user roles (RBAC) were reviewed thoroughly","responsibles":2,"more":""},{"description":"CORS headers do not use `*`","responsibles":1,"more":""},{"description":"CSP headers are properly configured (no `unsafe-inline` or `unsafe-eval`)","responsibles":1,"more":""},{"description":"DoS defense mechanism is implemented","responsibles":1,"more":""},{"description":"YAML/XML parsing is not used or used YAML/XML parsers have disabled DTD","responsibles":1,"more":""},{"description":"The app implements CSRF prevention","responsibles":1,"more":""},{"description":"The app has a rate limitter","responsibles":1,"more":""},{"description":"The app has disabled GraphQL introspection and schema registry","responsibles":1,"more":""},{"description":"The app has set GraphQL complexity query limits","responsibles":1,"more":""},{"description":"`sitemap.xml` does not leak any routes with sensitive data","responsibles":1,"more":""},{"description":"Cloud storage is (private) configured to not leak any sensitive data publicly","responsibles":1,"more":""},{"description":"Security Dashboard checks weekly vulnerable dependencies https://dep.panter.swiss/","responsibles":1,"more":""},{"description":"The app has `.well-known/security.txt` https://securitytxt.org/","responsibles":1,"more":""}]');
|
|
330173
330173
|
|
|
330174
330174
|
/***/ }),
|
|
330175
330175
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# The panter chart
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**The default chart catladder deploys kubernetes components with.**
|
|
4
4
|
|
|
5
5
|
Developing helm charts can be complex and they tend to be very verbose.
|
|
6
6
|
Our goal is therefore to provide a common chart that provides all functionalities that you might need
|
|
@@ -21,4 +21,4 @@ This way we avoid having complexity in the projects and make it easier to share
|
|
|
21
21
|
- support for namespace secrets and custom env-vars (using catladder-shell and gitlab-ci)
|
|
22
22
|
- optional prisam1 (_deprecated, prisma2 does not need a separate instance anymore_)
|
|
23
23
|
|
|
24
|
-
See https://
|
|
24
|
+
See https://github.com/panter/catladder for usage information
|
|
@@ -103,7 +103,7 @@ first.
|
|
|
103
103
|
a dev needs `customJobs` or a transform hook, it almost always means
|
|
104
104
|
catladder is missing a capability that other projects will need too.
|
|
105
105
|
**Open an issue at
|
|
106
|
-
https://
|
|
106
|
+
https://github.com/panter/catladder/issues** describing the use
|
|
107
107
|
case (what you're trying to achieve and why the existing config can't
|
|
108
108
|
express it) so it can be generalized into a supported feature — and,
|
|
109
109
|
where possible, offer to help the dev write that issue. The goal is for
|
|
@@ -152,7 +152,7 @@ export type ComponentConfig<C extends ConfigProps = never> = {
|
|
|
152
152
|
* config option whenever one exists.
|
|
153
153
|
*
|
|
154
154
|
* Please raise an issue on
|
|
155
|
-
* https://
|
|
155
|
+
* https://github.com/panter/catladder/issues
|
|
156
156
|
* to let us know about why you need to use custom jobs.
|
|
157
157
|
* This feedback will help us to generalize use cases
|
|
158
158
|
*/
|
|
@@ -29,7 +29,7 @@ type MaybePromise<T> = T | Promise<T>;
|
|
|
29
29
|
* them silently. Prefer a first-class config option whenever one exists.
|
|
30
30
|
*
|
|
31
31
|
* If you need a hook, please raise an issue on
|
|
32
|
-
* https://
|
|
32
|
+
* https://github.com/panter/catladder/issues describing the use
|
|
33
33
|
* case. This feedback helps us generalize it into a supported feature.
|
|
34
34
|
*/
|
|
35
35
|
export type Hooks = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# The panter chart
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**The default chart catladder deploys kubernetes components with.**
|
|
4
4
|
|
|
5
5
|
Developing helm charts can be complex and they tend to be very verbose.
|
|
6
6
|
Our goal is therefore to provide a common chart that provides all functionalities that you might need
|
|
@@ -21,4 +21,4 @@ This way we avoid having complexity in the projects and make it easier to share
|
|
|
21
21
|
- support for namespace secrets and custom env-vars (using catladder-shell and gitlab-ci)
|
|
22
22
|
- optional prisam1 (_deprecated, prisma2 does not need a separate instance anymore_)
|
|
23
23
|
|
|
24
|
-
See https://
|
|
24
|
+
See https://github.com/panter/catladder for usage information
|
|
@@ -103,7 +103,7 @@ first.
|
|
|
103
103
|
a dev needs `customJobs` or a transform hook, it almost always means
|
|
104
104
|
catladder is missing a capability that other projects will need too.
|
|
105
105
|
**Open an issue at
|
|
106
|
-
https://
|
|
106
|
+
https://github.com/panter/catladder/issues** describing the use
|
|
107
107
|
case (what you're trying to achieve and why the existing config can't
|
|
108
108
|
express it) so it can be generalized into a supported feature — and,
|
|
109
109
|
where possible, offer to help the dev write that issue. The goal is for
|