@modern-js/utils 2.69.7 → 3.0.0-alpha.1
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/dist/cjs/cli/alias.js +76 -70
- package/dist/cjs/cli/applyOptionsChain.js +44 -45
- package/dist/cjs/cli/babel.js +100 -119
- package/dist/cjs/cli/commands.js +61 -59
- package/dist/cjs/cli/common.js +45 -37
- package/dist/cjs/cli/config.js +36 -30
- package/dist/cjs/cli/constants.js +124 -161
- package/dist/cjs/cli/ensure.js +52 -45
- package/dist/cjs/cli/fs.js +41 -38
- package/dist/cjs/cli/get/config.js +43 -38
- package/dist/cjs/cli/get/data.js +108 -125
- package/dist/cjs/cli/get/index.js +109 -58
- package/dist/cjs/cli/index.js +202 -63
- package/dist/cjs/cli/is/config.js +75 -71
- package/dist/cjs/cli/is/env.js +49 -37
- package/dist/cjs/cli/is/index.js +76 -25
- package/dist/cjs/cli/is/project.js +139 -135
- package/dist/cjs/cli/is/type.js +65 -49
- package/dist/cjs/cli/logger.js +36 -27
- package/dist/cjs/cli/monorepo.js +100 -96
- package/dist/cjs/cli/package.js +85 -82
- package/dist/cjs/cli/path.js +101 -82
- package/dist/cjs/cli/port.js +71 -74
- package/dist/cjs/cli/prettyInstructions.js +106 -116
- package/dist/cjs/cli/require.js +116 -136
- package/dist/cjs/cli/route.js +67 -77
- package/dist/cjs/cli/runtimeExports.js +16 -70
- package/dist/cjs/cli/version.js +53 -42
- package/dist/cjs/cli/watch.js +79 -72
- package/dist/cjs/compiled.js +199 -128
- package/dist/cjs/import.js +58 -33
- package/dist/cjs/index.js +69 -23
- package/dist/cjs/universal/constants.js +77 -67
- package/dist/cjs/universal/index.js +33 -25
- package/dist/cjs/universal/path.js +33 -27
- package/dist/cjs/universal/pluginDagSort.js +69 -68
- package/dist/compiled/address/index.js +171 -1
- package/dist/compiled/browserslist/index.js +1329 -1
- package/dist/compiled/chalk/index.js +2368 -1
- package/dist/compiled/chokidar/index.js +4138 -16
- package/dist/compiled/chokidar/index.js.LICENSE.txt +41 -0
- package/dist/compiled/commander/index.js +1540 -1
- package/dist/compiled/debug/index.js +621 -1
- package/dist/compiled/dotenv/index.js +101 -1
- package/dist/compiled/dotenv-expand/index.js +54 -1
- package/dist/compiled/execa/index.js +1738 -1
- package/dist/compiled/fast-glob/index.js +4645 -17
- package/dist/compiled/fast-glob/index.js.LICENSE.txt +38 -0
- package/dist/compiled/filesize/index.js +193 -4
- package/dist/compiled/filesize/index.js.LICENSE.txt +7 -0
- package/dist/compiled/fs-extra/index.js +2222 -1
- package/dist/compiled/glob/index.js +2011 -1
- package/dist/compiled/globby/index.js +690 -1
- package/dist/compiled/gzip-size/index.js +157 -1
- package/dist/compiled/import-lazy/index.js +45 -1
- package/dist/compiled/inquirer/index.js +20162 -4
- package/dist/compiled/inquirer/index.js.LICENSE.txt +7 -0
- package/dist/compiled/js-yaml/index.js +2188 -1
- package/dist/compiled/json5/index.js +983 -1
- package/dist/compiled/lodash/index.js +0 -4
- package/dist/compiled/mime-types/index.js +108 -6
- package/dist/compiled/mime-types/index.js.LICENSE.txt +13 -0
- package/dist/compiled/minimist/index.js +202 -1
- package/dist/compiled/nanoid/index.js +83 -1
- package/dist/compiled/ora/index.js +3936 -3
- package/dist/compiled/ora/index.js.LICENSE.txt +1 -0
- package/dist/compiled/pkg-up/index.js +177 -1
- package/dist/compiled/semver/index.js +1779 -1
- package/dist/compiled/signale/index.js +1704 -1
- package/dist/compiled/slash/index.js +32 -1
- package/dist/compiled/strip-ansi/index.js +34 -1
- package/dist/compiled/tsconfig-paths/index.js +629 -1
- package/dist/compiled/upath/index.js +135 -1
- package/dist/compiled/url-join/index.js +61 -1
- package/dist/compiled/webpack-chain/index.js +1475 -1
- package/dist/esm/cli/alias.mjs +31 -0
- package/dist/esm/cli/applyOptionsChain.mjs +16 -0
- package/dist/esm/cli/babel.mjs +76 -0
- package/dist/esm/cli/commands.mjs +23 -0
- package/dist/esm/cli/common.mjs +11 -0
- package/dist/esm/cli/config.mjs +5 -0
- package/dist/esm/cli/constants.mjs +29 -0
- package/dist/esm/cli/ensure.mjs +9 -0
- package/dist/esm/cli/fs.mjs +9 -0
- package/dist/esm/cli/get/config.mjs +14 -0
- package/dist/esm/cli/get/data.mjs +57 -0
- package/dist/esm/cli/get/index.mjs +18 -0
- package/dist/{esm-node/cli/index.js → esm/cli/index.mjs} +0 -1
- package/dist/esm/cli/is/config.mjs +34 -0
- package/dist/esm/cli/is/env.mjs +6 -0
- package/dist/esm/cli/is/project.mjs +104 -0
- package/dist/esm/cli/is/type.mjs +26 -0
- package/dist/esm/cli/logger.mjs +2 -0
- package/dist/esm/cli/monorepo.mjs +50 -0
- package/dist/esm/cli/package.mjs +51 -0
- package/dist/esm/cli/path.mjs +35 -0
- package/dist/esm/cli/port.mjs +35 -0
- package/dist/esm/cli/prettyInstructions.mjs +68 -0
- package/dist/esm/cli/require.mjs +79 -0
- package/dist/esm/cli/route.mjs +36 -0
- package/dist/esm/cli/runtimeExports.mjs +0 -0
- package/dist/esm/cli/version.mjs +21 -0
- package/dist/esm/cli/watch.mjs +40 -0
- package/dist/esm/compiled.mjs +115 -0
- package/dist/esm/import.mjs +25 -0
- package/dist/esm/universal/constants.mjs +13 -0
- package/dist/{esm-node/universal/index.js → esm/universal/index.mjs} +1 -3
- package/dist/esm/universal/path.mjs +2 -0
- package/dist/esm/universal/pluginDagSort.mjs +41 -0
- package/dist/esm-node/cli/alias.mjs +31 -0
- package/dist/esm-node/cli/applyOptionsChain.mjs +16 -0
- package/dist/esm-node/cli/babel.mjs +76 -0
- package/dist/esm-node/cli/commands.mjs +23 -0
- package/dist/esm-node/cli/common.mjs +11 -0
- package/dist/esm-node/cli/config.mjs +5 -0
- package/dist/esm-node/cli/constants.mjs +29 -0
- package/dist/esm-node/cli/ensure.mjs +9 -0
- package/dist/esm-node/cli/fs.mjs +9 -0
- package/dist/esm-node/cli/get/config.mjs +14 -0
- package/dist/esm-node/cli/get/data.mjs +57 -0
- package/dist/esm-node/cli/get/index.mjs +18 -0
- package/dist/esm-node/cli/index.mjs +22 -0
- package/dist/esm-node/cli/is/config.mjs +34 -0
- package/dist/esm-node/cli/is/env.mjs +6 -0
- package/dist/esm-node/cli/is/index.mjs +4 -0
- package/dist/esm-node/cli/is/project.mjs +104 -0
- package/dist/esm-node/cli/is/type.mjs +26 -0
- package/dist/esm-node/cli/logger.mjs +2 -0
- package/dist/esm-node/cli/monorepo.mjs +50 -0
- package/dist/esm-node/cli/package.mjs +51 -0
- package/dist/esm-node/cli/path.mjs +35 -0
- package/dist/esm-node/cli/port.mjs +35 -0
- package/dist/esm-node/cli/prettyInstructions.mjs +68 -0
- package/dist/esm-node/cli/require.mjs +79 -0
- package/dist/esm-node/cli/route.mjs +36 -0
- package/dist/esm-node/cli/runtimeExports.mjs +0 -0
- package/dist/esm-node/cli/version.mjs +21 -0
- package/dist/esm-node/cli/watch.mjs +40 -0
- package/dist/esm-node/compiled.mjs +115 -0
- package/dist/esm-node/import.mjs +25 -0
- package/dist/esm-node/index.mjs +3 -0
- package/dist/esm-node/universal/constants.mjs +13 -0
- package/dist/esm-node/universal/index.mjs +2 -0
- package/dist/esm-node/universal/path.mjs +2 -0
- package/dist/esm-node/universal/pluginDagSort.mjs +41 -0
- package/dist/types/cli/constants.d.ts +2 -26
- package/dist/types/cli/get/data.d.ts +0 -1
- package/dist/types/cli/index.d.ts +0 -1
- package/dist/types/cli/is/config.d.ts +1 -1
- package/dist/types/cli/runtimeExports.d.ts +1 -4
- package/dist/types/cli/watch.d.ts +1 -1
- package/dist/types/compiled.d.ts +0 -5
- package/dist/types/universal/constants.d.ts +4 -7
- package/package.json +27 -27
- package/rslib.config.mts +140 -0
- package/dist/cjs/cli/action.js +0 -55
- package/dist/cjs/universal/formatWebpack.js +0 -127
- package/dist/esm/cli/action.js +0 -68
- package/dist/esm/cli/alias.js +0 -43
- package/dist/esm/cli/applyOptionsChain.js +0 -29
- package/dist/esm/cli/babel.js +0 -122
- package/dist/esm/cli/commands.js +0 -39
- package/dist/esm/cli/common.js +0 -20
- package/dist/esm/cli/config.js +0 -11
- package/dist/esm/cli/constants.js +0 -114
- package/dist/esm/cli/ensure.js +0 -16
- package/dist/esm/cli/fs.js +0 -65
- package/dist/esm/cli/get/config.js +0 -19
- package/dist/esm/cli/get/data.js +0 -143
- package/dist/esm/cli/get/index.js +0 -38
- package/dist/esm/cli/index.js +0 -23
- package/dist/esm/cli/is/config.js +0 -70
- package/dist/esm/cli/is/env.js +0 -22
- package/dist/esm/cli/is/index.js +0 -4
- package/dist/esm/cli/is/project.js +0 -146
- package/dist/esm/cli/is/type.js +0 -39
- package/dist/esm/cli/logger.js +0 -5
- package/dist/esm/cli/monorepo.js +0 -82
- package/dist/esm/cli/package.js +0 -203
- package/dist/esm/cli/path.js +0 -66
- package/dist/esm/cli/port.js +0 -97
- package/dist/esm/cli/prettyInstructions.js +0 -102
- package/dist/esm/cli/require.js +0 -235
- package/dist/esm/cli/route.js +0 -64
- package/dist/esm/cli/runtimeExports.js +0 -44
- package/dist/esm/cli/version.js +0 -26
- package/dist/esm/cli/watch.js +0 -112
- package/dist/esm/compiled.js +0 -66
- package/dist/esm/import.js +0 -11
- package/dist/esm/index.js +0 -3
- package/dist/esm/universal/constants.js +0 -32
- package/dist/esm/universal/formatWebpack.js +0 -95
- package/dist/esm/universal/index.js +0 -4
- package/dist/esm/universal/path.js +0 -6
- package/dist/esm/universal/pluginDagSort.js +0 -73
- package/dist/esm-node/cli/action.js +0 -30
- package/dist/esm-node/cli/alias.js +0 -40
- package/dist/esm-node/cli/applyOptionsChain.js +0 -27
- package/dist/esm-node/cli/babel.js +0 -107
- package/dist/esm-node/cli/commands.js +0 -39
- package/dist/esm-node/cli/common.js +0 -15
- package/dist/esm-node/cli/config.js +0 -9
- package/dist/esm-node/cli/constants.js +0 -114
- package/dist/esm-node/cli/ensure.js +0 -14
- package/dist/esm-node/cli/fs.js +0 -18
- package/dist/esm-node/cli/get/config.js +0 -19
- package/dist/esm-node/cli/get/data.js +0 -96
- package/dist/esm-node/cli/get/index.js +0 -22
- package/dist/esm-node/cli/is/config.js +0 -50
- package/dist/esm-node/cli/is/env.js +0 -12
- package/dist/esm-node/cli/is/project.js +0 -105
- package/dist/esm-node/cli/is/type.js +0 -36
- package/dist/esm-node/cli/logger.js +0 -5
- package/dist/esm-node/cli/monorepo.js +0 -67
- package/dist/esm-node/cli/package.js +0 -66
- package/dist/esm-node/cli/path.js +0 -48
- package/dist/esm-node/cli/port.js +0 -48
- package/dist/esm-node/cli/prettyInstructions.js +0 -90
- package/dist/esm-node/cli/require.js +0 -111
- package/dist/esm-node/cli/route.js +0 -60
- package/dist/esm-node/cli/runtimeExports.js +0 -38
- package/dist/esm-node/cli/version.js +0 -26
- package/dist/esm-node/cli/watch.js +0 -45
- package/dist/esm-node/compiled.js +0 -66
- package/dist/esm-node/import.js +0 -11
- package/dist/esm-node/universal/constants.js +0 -32
- package/dist/esm-node/universal/formatWebpack.js +0 -102
- package/dist/esm-node/universal/path.js +0 -6
- package/dist/esm-node/universal/pluginDagSort.js +0 -50
- package/dist/types/cli/action.d.ts +0 -2
- package/dist/types/universal/formatWebpack.d.ts +0 -26
- /package/dist/{esm-node/cli/is/index.js → esm/cli/is/index.mjs} +0 -0
- /package/dist/{esm-node/index.js → esm/index.mjs} +0 -0
|
@@ -1 +1,629 @@
|
|
|
1
|
-
(()=>{"use strict";var e={308:e=>{e.exports=e=>{if(typeof e!=="string"){throw new TypeError("Expected a string, got "+typeof e)}if(e.charCodeAt(0)===65279){return e.slice(1)}return e}},154:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.configLoader=t.loadConfig=void 0;var n=r(131);var i=r(17);function loadConfig(e){if(e===void 0){e=process.cwd()}return configLoader({cwd:e})}t.loadConfig=loadConfig;function configLoader(e){var t=e.cwd,r=e.explicitParams,a=e.tsConfigLoader,o=a===void 0?n.tsConfigLoader:a;if(r){var s=i.isAbsolute(r.baseUrl)?r.baseUrl:i.join(t,r.baseUrl);return{resultType:"success",configFileAbsolutePath:"",baseUrl:r.baseUrl,absoluteBaseUrl:s,paths:r.paths,mainFields:r.mainFields,addMatchAll:r.addMatchAll}}var u=o({cwd:t,getEnv:function(e){return process.env[e]}});if(!u.tsConfigPath){return{resultType:"failed",message:"Couldn't find tsconfig.json"}}return{resultType:"success",configFileAbsolutePath:u.tsConfigPath,baseUrl:u.baseUrl,absoluteBaseUrl:i.resolve(i.dirname(u.tsConfigPath),u.baseUrl||""),paths:u.paths||{},addMatchAll:u.baseUrl!==undefined}}t.configLoader=configLoader},133:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.removeExtension=t.fileExistsAsync=t.readJsonFromDiskAsync=t.readJsonFromDiskSync=t.fileExistsSync=void 0;var n=r(147);function fileExistsSync(e){if(!n.existsSync(e)){return false}try{var t=n.statSync(e);return t.isFile()}catch(e){return false}}t.fileExistsSync=fileExistsSync;function readJsonFromDiskSync(e){if(!n.existsSync(e)){return undefined}return require(e)}t.readJsonFromDiskSync=readJsonFromDiskSync;function readJsonFromDiskAsync(e,t){n.readFile(e,"utf8",(function(e,r){if(e||!r){return t()}var n=JSON.parse(r);return t(undefined,n)}))}t.readJsonFromDiskAsync=readJsonFromDiskAsync;function fileExistsAsync(e,t){n.stat(e,(function(e,r){if(e){return t(undefined,false)}t(undefined,r?r.isFile():false)}))}t.fileExistsAsync=fileExistsAsync;function removeExtension(e){return e.substring(0,e.lastIndexOf("."))||e}t.removeExtension=removeExtension},188:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getAbsoluteMappingEntries=void 0;var n=r(17);function getAbsoluteMappingEntries(e,t,r){var i=sortByLongestPrefix(Object.keys(t));var a=[];for(var o=0,s=i;o<s.length;o++){var u=s[o];a.push({pattern:u,paths:t[u].map((function(t){return n.resolve(e,t)}))})}if(!t["*"]&&r){a.push({pattern:"*",paths:["".concat(e.replace(/\/$/,""),"/*")]})}return a}t.getAbsoluteMappingEntries=getAbsoluteMappingEntries;function sortByLongestPrefix(e){return e.concat().sort((function(e,t){return getPrefixLength(t)-getPrefixLength(e)}))}function getPrefixLength(e){var t=e.indexOf("*");return e.substr(0,t).length}},947:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.matchFromAbsolutePathsAsync=t.createMatchPathAsync=void 0;var n=r(17);var i=r(813);var a=r(188);var o=r(133);function createMatchPathAsync(e,t,r,n){if(r===void 0){r=["main"]}if(n===void 0){n=true}var i=a.getAbsoluteMappingEntries(e,t,n);return function(e,t,n,a,o){return matchFromAbsolutePathsAsync(i,e,t,n,a,o,r)}}t.createMatchPathAsync=createMatchPathAsync;function matchFromAbsolutePathsAsync(e,t,r,n,a,s,u){if(r===void 0){r=o.readJsonFromDiskAsync}if(n===void 0){n=o.fileExistsAsync}if(a===void 0){a=Object.keys(require.extensions)}if(u===void 0){u=["main"]}var f=i.getPathsToTry(a,e,t);if(!f){return s()}findFirstExistingPath(f,r,n,s,0,u)}t.matchFromAbsolutePathsAsync=matchFromAbsolutePathsAsync;function findFirstExistingMainFieldMappedFile(e,t,r,i,a,o){if(o===void 0){o=0}if(o>=t.length){return a(undefined,undefined)}var tryNext=function(){return findFirstExistingMainFieldMappedFile(e,t,r,i,a,o+1)};var s=t[o];var u=typeof s==="string"?e[s]:s.reduce((function(e,t){return e[t]}),e);if(typeof u!=="string"){return tryNext()}var f=n.join(n.dirname(r),u);i(f,(function(e,t){if(e){return a(e)}if(t){return a(undefined,f)}return tryNext()}))}function findFirstExistingPath(e,t,r,n,a,o){if(a===void 0){a=0}if(o===void 0){o=["main"]}var s=e[a];if(s.type==="file"||s.type==="extension"||s.type==="index"){r(s.path,(function(u,f){if(u){return n(u)}if(f){return n(undefined,i.getStrippedPath(s))}if(a===e.length-1){return n()}return findFirstExistingPath(e,t,r,n,a+1,o)}))}else if(s.type==="package"){t(s.path,(function(i,u){if(i){return n(i)}if(u){return findFirstExistingMainFieldMappedFile(u,o,s.path,r,(function(i,s){if(i){return n(i)}if(s){return n(undefined,s)}return findFirstExistingPath(e,t,r,n,a+1,o)}))}return findFirstExistingPath(e,t,r,n,a+1,o)}))}else{i.exhaustiveTypeException(s.type)}}},31:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.matchFromAbsolutePaths=t.createMatchPath=void 0;var n=r(17);var i=r(133);var a=r(188);var o=r(813);function createMatchPath(e,t,r,n){if(r===void 0){r=["main"]}if(n===void 0){n=true}var i=a.getAbsoluteMappingEntries(e,t,n);return function(e,t,n,a){return matchFromAbsolutePaths(i,e,t,n,a,r)}}t.createMatchPath=createMatchPath;function matchFromAbsolutePaths(e,t,r,n,a,s){if(r===void 0){r=i.readJsonFromDiskSync}if(n===void 0){n=i.fileExistsSync}if(a===void 0){a=Object.keys(require.extensions)}if(s===void 0){s=["main"]}var u=o.getPathsToTry(a,e,t);if(!u){return undefined}return findFirstExistingPath(u,r,n,s)}t.matchFromAbsolutePaths=matchFromAbsolutePaths;function findFirstExistingMainFieldMappedFile(e,t,r,i){for(var a=0;a<t.length;a++){var o=t[a];var s=typeof o==="string"?e[o]:o.reduce((function(e,t){return e[t]}),e);if(s&&typeof s==="string"){var u=n.join(n.dirname(r),s);if(i(u)){return u}}}return undefined}function findFirstExistingPath(e,t,r,n){if(t===void 0){t=i.readJsonFromDiskSync}if(n===void 0){n=["main"]}for(var a=0,s=e;a<s.length;a++){var u=s[a];if(u.type==="file"||u.type==="extension"||u.type==="index"){if(r(u.path)){return o.getStrippedPath(u)}}else if(u.type==="package"){var f=t(u.path);if(f){var c=findFirstExistingMainFieldMappedFile(f,n,u.path,r);if(c){return c}}}else{o.exhaustiveTypeException(u.type)}}return undefined}},704:function(e,t,r){var n=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++){if(a||!(n in t)){if(!a)a=Array.prototype.slice.call(t,0,n);a[n]=t[n]}}return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:true});t.register=void 0;var i=r(31);var a=r(154);var noOp=function(){return void 0};function getCoreModules(e){e=e||["assert","buffer","child_process","cluster","crypto","dgram","dns","domain","events","fs","http","https","net","os","path","punycode","querystring","readline","stream","string_decoder","tls","tty","url","util","v8","vm","zlib"];var t={};for(var r=0,n=e;r<n.length;r++){var i=n[r];t[i]=true}return t}function register(e){var t;var o;if(e){t=e.cwd;if(e.baseUrl||e.paths){o=e}}else{var s=r(227);var u=s(process.argv.slice(2),{string:["project"],alias:{project:["P"]}});t=u.project}var f=(0,a.configLoader)({cwd:t!==null&&t!==void 0?t:process.cwd(),explicitParams:o});if(f.resultType==="failed"){console.warn("".concat(f.message,". tsconfig-paths will be skipped"));return noOp}var c=(0,i.createMatchPath)(f.absoluteBaseUrl,f.paths,f.mainFields,f.addMatchAll);var d=r(503);var l=d._resolveFilename;var p=getCoreModules(d.builtinModules);d._resolveFilename=function(e,t){var r=p.hasOwnProperty(e);if(!r){var i=c(e);if(i){var a=n([i],[].slice.call(arguments,1),true);return l.apply(this,a)}}return l.apply(this,arguments)};return function(){d._resolveFilename=l}}t.register=register},813:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.exhaustiveTypeException=t.getStrippedPath=t.getPathsToTry=void 0;var n=r(17);var i=r(17);var a=r(133);function getPathsToTry(e,t,r){if(!t||!r||r[0]==="."){return undefined}var i=[];for(var a=0,o=t;a<o.length;a++){var s=o[a];var u=s.pattern===r?"":matchStar(s.pattern,r);if(u!==undefined){var _loop_1=function(t){var r=t.replace("*",u);i.push({type:"file",path:r});i.push.apply(i,e.map((function(e){return{type:"extension",path:r+e}})));i.push({type:"package",path:n.join(r,"/package.json")});var a=n.join(r,"/index");i.push.apply(i,e.map((function(e){return{type:"index",path:a+e}})))};for(var f=0,c=s.paths;f<c.length;f++){var d=c[f];_loop_1(d)}}}return i.length===0?undefined:i}t.getPathsToTry=getPathsToTry;function getStrippedPath(e){return e.type==="index"?(0,i.dirname)(e.path):e.type==="file"?e.path:e.type==="extension"?(0,a.removeExtension)(e.path):e.type==="package"?e.path:exhaustiveTypeException(e.type)}t.getStrippedPath=getStrippedPath;function exhaustiveTypeException(e){throw new Error("Unknown type ".concat(e))}t.exhaustiveTypeException=exhaustiveTypeException;function matchStar(e,t){if(t.length<e.length){return undefined}if(e==="*"){return t}var r=e.indexOf("*");if(r===-1){return undefined}var n=e.substring(0,r);var i=e.substring(r+1);if(t.substr(0,r)!==n){return undefined}if(t.substr(t.length-i.length)!==i){return undefined}return t.substr(r,t.length-i.length)}},131:function(e,t,r){var n=this&&this.__assign||function(){n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:true});t.loadTsconfig=t.walkForTsConfig=t.tsConfigLoader=void 0;var i=r(17);var a=r(147);var o=r(278);var s=r(308);function tsConfigLoader(e){var t=e.getEnv,r=e.cwd,n=e.loadSync,i=n===void 0?loadSyncDefault:n;var a=t("TS_NODE_PROJECT");var o=t("TS_NODE_BASEURL");var s=i(r,a,o);return s}t.tsConfigLoader=tsConfigLoader;function loadSyncDefault(e,t,r){var n=resolveConfigPath(e,t);if(!n){return{tsConfigPath:undefined,baseUrl:undefined,paths:undefined}}var i=loadTsconfig(n);return{tsConfigPath:n,baseUrl:r||i&&i.compilerOptions&&i.compilerOptions.baseUrl,paths:i&&i.compilerOptions&&i.compilerOptions.paths}}function resolveConfigPath(e,t){if(t){var r=a.lstatSync(t).isDirectory()?i.resolve(t,"./tsconfig.json"):i.resolve(e,t);return r}if(a.statSync(e).isFile()){return i.resolve(e)}var n=walkForTsConfig(e);return n?i.resolve(n):undefined}function walkForTsConfig(e,t){if(t===void 0){t=a.readdirSync}var r=t(e);var n=["tsconfig.json","jsconfig.json"];for(var o=0,s=n;o<s.length;o++){var u=s[o];if(r.indexOf(u)!==-1){return i.join(e,u)}}var f=i.dirname(e);if(e===f){return undefined}return walkForTsConfig(f,t)}t.walkForTsConfig=walkForTsConfig;function loadTsconfig(e,t,r){if(t===void 0){t=a.existsSync}if(r===void 0){r=function(e){return a.readFileSync(e,"utf8")}}if(!t(e)){return undefined}var u=r(e);var f=s(u);var c;try{c=o.parse(f)}catch(t){throw new Error("".concat(e," is malformed ").concat(t.message))}var d=c.extends;if(d){if(typeof d==="string"&&d.indexOf(".json")===-1){d+=".json"}var l=i.dirname(e);var p=i.join(l,d);if(d.indexOf("/")!==-1&&d.indexOf(".")!==-1&&!t(p)){p=i.join(l,"node_modules",d)}var v=loadTsconfig(p,t,r)||{};if(v.compilerOptions&&v.compilerOptions.baseUrl){var h=i.dirname(d);v.compilerOptions.baseUrl=i.join(h,v.compilerOptions.baseUrl)}return n(n(n({},v),c),{compilerOptions:n(n({},v.compilerOptions),c.compilerOptions)})}return c}t.loadTsconfig=loadTsconfig},278:e=>{e.exports=require("../json5")},227:e=>{e.exports=require("../minimist")},147:e=>{e.exports=require("fs")},503:e=>{e.exports=require("module")},17:e=>{e.exports=require("path")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var a=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);a=false}finally{if(a)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.loadConfig=e.register=e.matchFromAbsolutePathsAsync=e.createMatchPathAsync=e.matchFromAbsolutePaths=e.createMatchPath=void 0;var t=__nccwpck_require__(31);Object.defineProperty(e,"createMatchPath",{enumerable:true,get:function(){return t.createMatchPath}});Object.defineProperty(e,"matchFromAbsolutePaths",{enumerable:true,get:function(){return t.matchFromAbsolutePaths}});var n=__nccwpck_require__(947);Object.defineProperty(e,"createMatchPathAsync",{enumerable:true,get:function(){return n.createMatchPathAsync}});Object.defineProperty(e,"matchFromAbsolutePathsAsync",{enumerable:true,get:function(){return n.matchFromAbsolutePathsAsync}});var i=__nccwpck_require__(704);Object.defineProperty(e,"register",{enumerable:true,get:function(){return i.register}});var a=__nccwpck_require__(154);Object.defineProperty(e,"loadConfig",{enumerable:true,get:function(){return a.loadConfig}})})();module.exports=r})();
|
|
1
|
+
(()=>{
|
|
2
|
+
"use strict";
|
|
3
|
+
var e = {
|
|
4
|
+
308: (e)=>{
|
|
5
|
+
e.exports = (e)=>{
|
|
6
|
+
if ("string" != typeof e) throw new TypeError("Expected a string, got " + typeof e);
|
|
7
|
+
if (65279 === e.charCodeAt(0)) return e.slice(1);
|
|
8
|
+
return e;
|
|
9
|
+
};
|
|
10
|
+
},
|
|
11
|
+
154: (e, t, r)=>{
|
|
12
|
+
Object.defineProperty(t, "__esModule", {
|
|
13
|
+
value: true
|
|
14
|
+
});
|
|
15
|
+
t.configLoader = t.loadConfig = void 0;
|
|
16
|
+
var n = r(131);
|
|
17
|
+
var i = r(17);
|
|
18
|
+
function loadConfig(e) {
|
|
19
|
+
if (void 0 === e) e = process.cwd();
|
|
20
|
+
return configLoader({
|
|
21
|
+
cwd: e
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
t.loadConfig = loadConfig;
|
|
25
|
+
function configLoader(e) {
|
|
26
|
+
var t = e.cwd, r = e.explicitParams, a = e.tsConfigLoader, o = void 0 === a ? n.tsConfigLoader : a;
|
|
27
|
+
if (r) {
|
|
28
|
+
var s = i.isAbsolute(r.baseUrl) ? r.baseUrl : i.join(t, r.baseUrl);
|
|
29
|
+
return {
|
|
30
|
+
resultType: "success",
|
|
31
|
+
configFileAbsolutePath: "",
|
|
32
|
+
baseUrl: r.baseUrl,
|
|
33
|
+
absoluteBaseUrl: s,
|
|
34
|
+
paths: r.paths,
|
|
35
|
+
mainFields: r.mainFields,
|
|
36
|
+
addMatchAll: r.addMatchAll
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
var u = o({
|
|
40
|
+
cwd: t,
|
|
41
|
+
getEnv: function(e) {
|
|
42
|
+
return process.env[e];
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
if (!u.tsConfigPath) return {
|
|
46
|
+
resultType: "failed",
|
|
47
|
+
message: "Couldn't find tsconfig.json"
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
resultType: "success",
|
|
51
|
+
configFileAbsolutePath: u.tsConfigPath,
|
|
52
|
+
baseUrl: u.baseUrl,
|
|
53
|
+
absoluteBaseUrl: i.resolve(i.dirname(u.tsConfigPath), u.baseUrl || ""),
|
|
54
|
+
paths: u.paths || {},
|
|
55
|
+
addMatchAll: void 0 !== u.baseUrl
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
t.configLoader = configLoader;
|
|
59
|
+
},
|
|
60
|
+
133: (e, t, r)=>{
|
|
61
|
+
Object.defineProperty(t, "__esModule", {
|
|
62
|
+
value: true
|
|
63
|
+
});
|
|
64
|
+
t.removeExtension = t.fileExistsAsync = t.readJsonFromDiskAsync = t.readJsonFromDiskSync = t.fileExistsSync = void 0;
|
|
65
|
+
var n = r(147);
|
|
66
|
+
function fileExistsSync(e) {
|
|
67
|
+
if (!n.existsSync(e)) return false;
|
|
68
|
+
try {
|
|
69
|
+
var t = n.statSync(e);
|
|
70
|
+
return t.isFile();
|
|
71
|
+
} catch (e) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
t.fileExistsSync = fileExistsSync;
|
|
76
|
+
function readJsonFromDiskSync(e) {
|
|
77
|
+
if (!n.existsSync(e)) return;
|
|
78
|
+
return require(e);
|
|
79
|
+
}
|
|
80
|
+
t.readJsonFromDiskSync = readJsonFromDiskSync;
|
|
81
|
+
function readJsonFromDiskAsync(e, t) {
|
|
82
|
+
n.readFile(e, "utf8", function(e, r) {
|
|
83
|
+
if (e || !r) return t();
|
|
84
|
+
var n = JSON.parse(r);
|
|
85
|
+
return t(void 0, n);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
t.readJsonFromDiskAsync = readJsonFromDiskAsync;
|
|
89
|
+
function fileExistsAsync(e, t) {
|
|
90
|
+
n.stat(e, function(e, r) {
|
|
91
|
+
if (e) return t(void 0, false);
|
|
92
|
+
t(void 0, r ? r.isFile() : false);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
t.fileExistsAsync = fileExistsAsync;
|
|
96
|
+
function removeExtension(e) {
|
|
97
|
+
return e.substring(0, e.lastIndexOf(".")) || e;
|
|
98
|
+
}
|
|
99
|
+
t.removeExtension = removeExtension;
|
|
100
|
+
},
|
|
101
|
+
188: (e, t, r)=>{
|
|
102
|
+
Object.defineProperty(t, "__esModule", {
|
|
103
|
+
value: true
|
|
104
|
+
});
|
|
105
|
+
t.getAbsoluteMappingEntries = void 0;
|
|
106
|
+
var n = r(17);
|
|
107
|
+
function getAbsoluteMappingEntries(e, t, r) {
|
|
108
|
+
var i = sortByLongestPrefix(Object.keys(t));
|
|
109
|
+
var a = [];
|
|
110
|
+
for(var o = 0, s = i; o < s.length; o++){
|
|
111
|
+
var u = s[o];
|
|
112
|
+
a.push({
|
|
113
|
+
pattern: u,
|
|
114
|
+
paths: t[u].map(function(t) {
|
|
115
|
+
return n.resolve(e, t);
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
if (!t["*"] && r) a.push({
|
|
120
|
+
pattern: "*",
|
|
121
|
+
paths: [
|
|
122
|
+
"".concat(e.replace(/\/$/, ""), "/*")
|
|
123
|
+
]
|
|
124
|
+
});
|
|
125
|
+
return a;
|
|
126
|
+
}
|
|
127
|
+
t.getAbsoluteMappingEntries = getAbsoluteMappingEntries;
|
|
128
|
+
function sortByLongestPrefix(e) {
|
|
129
|
+
return e.concat().sort(function(e, t) {
|
|
130
|
+
return getPrefixLength(t) - getPrefixLength(e);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function getPrefixLength(e) {
|
|
134
|
+
var t = e.indexOf("*");
|
|
135
|
+
return e.substr(0, t).length;
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
947: (e, t, r)=>{
|
|
139
|
+
Object.defineProperty(t, "__esModule", {
|
|
140
|
+
value: true
|
|
141
|
+
});
|
|
142
|
+
t.matchFromAbsolutePathsAsync = t.createMatchPathAsync = void 0;
|
|
143
|
+
var n = r(17);
|
|
144
|
+
var i = r(813);
|
|
145
|
+
var a = r(188);
|
|
146
|
+
var o = r(133);
|
|
147
|
+
function createMatchPathAsync(e, t, r, n) {
|
|
148
|
+
if (void 0 === r) r = [
|
|
149
|
+
"main"
|
|
150
|
+
];
|
|
151
|
+
if (void 0 === n) n = true;
|
|
152
|
+
var i = a.getAbsoluteMappingEntries(e, t, n);
|
|
153
|
+
return function(e, t, n, a, o) {
|
|
154
|
+
return matchFromAbsolutePathsAsync(i, e, t, n, a, o, r);
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
t.createMatchPathAsync = createMatchPathAsync;
|
|
158
|
+
function matchFromAbsolutePathsAsync(e, t, r, n, a, s, u) {
|
|
159
|
+
if (void 0 === r) r = o.readJsonFromDiskAsync;
|
|
160
|
+
if (void 0 === n) n = o.fileExistsAsync;
|
|
161
|
+
if (void 0 === a) a = Object.keys(require.extensions);
|
|
162
|
+
if (void 0 === u) u = [
|
|
163
|
+
"main"
|
|
164
|
+
];
|
|
165
|
+
var f = i.getPathsToTry(a, e, t);
|
|
166
|
+
if (!f) return s();
|
|
167
|
+
findFirstExistingPath(f, r, n, s, 0, u);
|
|
168
|
+
}
|
|
169
|
+
t.matchFromAbsolutePathsAsync = matchFromAbsolutePathsAsync;
|
|
170
|
+
function findFirstExistingMainFieldMappedFile(e, t, r, i, a, o) {
|
|
171
|
+
if (void 0 === o) o = 0;
|
|
172
|
+
if (o >= t.length) return a(void 0, void 0);
|
|
173
|
+
var tryNext = function() {
|
|
174
|
+
return findFirstExistingMainFieldMappedFile(e, t, r, i, a, o + 1);
|
|
175
|
+
};
|
|
176
|
+
var s = t[o];
|
|
177
|
+
var u = "string" == typeof s ? e[s] : s.reduce(function(e, t) {
|
|
178
|
+
return e[t];
|
|
179
|
+
}, e);
|
|
180
|
+
if ("string" != typeof u) return tryNext();
|
|
181
|
+
var f = n.join(n.dirname(r), u);
|
|
182
|
+
i(f, function(e, t) {
|
|
183
|
+
if (e) return a(e);
|
|
184
|
+
if (t) return a(void 0, f);
|
|
185
|
+
return tryNext();
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function findFirstExistingPath(e, t, r, n, a, o) {
|
|
189
|
+
if (void 0 === a) a = 0;
|
|
190
|
+
if (void 0 === o) o = [
|
|
191
|
+
"main"
|
|
192
|
+
];
|
|
193
|
+
var s = e[a];
|
|
194
|
+
if ("file" === s.type || "extension" === s.type || "index" === s.type) r(s.path, function(u, f) {
|
|
195
|
+
if (u) return n(u);
|
|
196
|
+
if (f) return n(void 0, i.getStrippedPath(s));
|
|
197
|
+
if (a === e.length - 1) return n();
|
|
198
|
+
return findFirstExistingPath(e, t, r, n, a + 1, o);
|
|
199
|
+
});
|
|
200
|
+
else if ("package" === s.type) t(s.path, function(i, u) {
|
|
201
|
+
if (i) return n(i);
|
|
202
|
+
if (u) return findFirstExistingMainFieldMappedFile(u, o, s.path, r, function(i, s) {
|
|
203
|
+
if (i) return n(i);
|
|
204
|
+
if (s) return n(void 0, s);
|
|
205
|
+
return findFirstExistingPath(e, t, r, n, a + 1, o);
|
|
206
|
+
});
|
|
207
|
+
return findFirstExistingPath(e, t, r, n, a + 1, o);
|
|
208
|
+
});
|
|
209
|
+
else i.exhaustiveTypeException(s.type);
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
31: (e, t, r)=>{
|
|
213
|
+
Object.defineProperty(t, "__esModule", {
|
|
214
|
+
value: true
|
|
215
|
+
});
|
|
216
|
+
t.matchFromAbsolutePaths = t.createMatchPath = void 0;
|
|
217
|
+
var n = r(17);
|
|
218
|
+
var i = r(133);
|
|
219
|
+
var a = r(188);
|
|
220
|
+
var o = r(813);
|
|
221
|
+
function createMatchPath(e, t, r, n) {
|
|
222
|
+
if (void 0 === r) r = [
|
|
223
|
+
"main"
|
|
224
|
+
];
|
|
225
|
+
if (void 0 === n) n = true;
|
|
226
|
+
var i = a.getAbsoluteMappingEntries(e, t, n);
|
|
227
|
+
return function(e, t, n, a) {
|
|
228
|
+
return matchFromAbsolutePaths(i, e, t, n, a, r);
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
t.createMatchPath = createMatchPath;
|
|
232
|
+
function matchFromAbsolutePaths(e, t, r, n, a, s) {
|
|
233
|
+
if (void 0 === r) r = i.readJsonFromDiskSync;
|
|
234
|
+
if (void 0 === n) n = i.fileExistsSync;
|
|
235
|
+
if (void 0 === a) a = Object.keys(require.extensions);
|
|
236
|
+
if (void 0 === s) s = [
|
|
237
|
+
"main"
|
|
238
|
+
];
|
|
239
|
+
var u = o.getPathsToTry(a, e, t);
|
|
240
|
+
if (!u) return;
|
|
241
|
+
return findFirstExistingPath(u, r, n, s);
|
|
242
|
+
}
|
|
243
|
+
t.matchFromAbsolutePaths = matchFromAbsolutePaths;
|
|
244
|
+
function findFirstExistingMainFieldMappedFile(e, t, r, i) {
|
|
245
|
+
for(var a = 0; a < t.length; a++){
|
|
246
|
+
var o = t[a];
|
|
247
|
+
var s = "string" == typeof o ? e[o] : o.reduce(function(e, t) {
|
|
248
|
+
return e[t];
|
|
249
|
+
}, e);
|
|
250
|
+
if (s && "string" == typeof s) {
|
|
251
|
+
var u = n.join(n.dirname(r), s);
|
|
252
|
+
if (i(u)) return u;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
function findFirstExistingPath(e, t, r, n) {
|
|
257
|
+
if (void 0 === t) t = i.readJsonFromDiskSync;
|
|
258
|
+
if (void 0 === n) n = [
|
|
259
|
+
"main"
|
|
260
|
+
];
|
|
261
|
+
for(var a = 0, s = e; a < s.length; a++){
|
|
262
|
+
var u = s[a];
|
|
263
|
+
if ("file" === u.type || "extension" === u.type || "index" === u.type) {
|
|
264
|
+
if (r(u.path)) return o.getStrippedPath(u);
|
|
265
|
+
} else if ("package" === u.type) {
|
|
266
|
+
var f = t(u.path);
|
|
267
|
+
if (f) {
|
|
268
|
+
var c = findFirstExistingMainFieldMappedFile(f, n, u.path, r);
|
|
269
|
+
if (c) return c;
|
|
270
|
+
}
|
|
271
|
+
} else o.exhaustiveTypeException(u.type);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
704: function(e, t, r) {
|
|
276
|
+
var n = this && this.__spreadArray || function(e, t, r) {
|
|
277
|
+
if (r || 2 === arguments.length) {
|
|
278
|
+
for(var n = 0, i = t.length, a; n < i; n++)if (a || !(n in t)) {
|
|
279
|
+
if (!a) a = Array.prototype.slice.call(t, 0, n);
|
|
280
|
+
a[n] = t[n];
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
284
|
+
};
|
|
285
|
+
Object.defineProperty(t, "__esModule", {
|
|
286
|
+
value: true
|
|
287
|
+
});
|
|
288
|
+
t.register = void 0;
|
|
289
|
+
var i = r(31);
|
|
290
|
+
var a = r(154);
|
|
291
|
+
var noOp = function() {};
|
|
292
|
+
function getCoreModules(e) {
|
|
293
|
+
e = e || [
|
|
294
|
+
"assert",
|
|
295
|
+
"buffer",
|
|
296
|
+
"child_process",
|
|
297
|
+
"cluster",
|
|
298
|
+
"crypto",
|
|
299
|
+
"dgram",
|
|
300
|
+
"dns",
|
|
301
|
+
"domain",
|
|
302
|
+
"events",
|
|
303
|
+
"fs",
|
|
304
|
+
"http",
|
|
305
|
+
"https",
|
|
306
|
+
"net",
|
|
307
|
+
"os",
|
|
308
|
+
"path",
|
|
309
|
+
"punycode",
|
|
310
|
+
"querystring",
|
|
311
|
+
"readline",
|
|
312
|
+
"stream",
|
|
313
|
+
"string_decoder",
|
|
314
|
+
"tls",
|
|
315
|
+
"tty",
|
|
316
|
+
"url",
|
|
317
|
+
"util",
|
|
318
|
+
"v8",
|
|
319
|
+
"vm",
|
|
320
|
+
"zlib"
|
|
321
|
+
];
|
|
322
|
+
var t = {};
|
|
323
|
+
for(var r = 0, n = e; r < n.length; r++){
|
|
324
|
+
var i = n[r];
|
|
325
|
+
t[i] = true;
|
|
326
|
+
}
|
|
327
|
+
return t;
|
|
328
|
+
}
|
|
329
|
+
function register(e) {
|
|
330
|
+
var t;
|
|
331
|
+
var o;
|
|
332
|
+
if (e) {
|
|
333
|
+
t = e.cwd;
|
|
334
|
+
if (e.baseUrl || e.paths) o = e;
|
|
335
|
+
} else {
|
|
336
|
+
var s = r(227);
|
|
337
|
+
var u = s(process.argv.slice(2), {
|
|
338
|
+
string: [
|
|
339
|
+
"project"
|
|
340
|
+
],
|
|
341
|
+
alias: {
|
|
342
|
+
project: [
|
|
343
|
+
"P"
|
|
344
|
+
]
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
t = u.project;
|
|
348
|
+
}
|
|
349
|
+
var f = (0, a.configLoader)({
|
|
350
|
+
cwd: null != t ? t : process.cwd(),
|
|
351
|
+
explicitParams: o
|
|
352
|
+
});
|
|
353
|
+
if ("failed" === f.resultType) {
|
|
354
|
+
console.warn("".concat(f.message, ". tsconfig-paths will be skipped"));
|
|
355
|
+
return noOp;
|
|
356
|
+
}
|
|
357
|
+
var c = (0, i.createMatchPath)(f.absoluteBaseUrl, f.paths, f.mainFields, f.addMatchAll);
|
|
358
|
+
var d = r(503);
|
|
359
|
+
var l = d._resolveFilename;
|
|
360
|
+
var p = getCoreModules(d.builtinModules);
|
|
361
|
+
d._resolveFilename = function(e, t) {
|
|
362
|
+
var r = p.hasOwnProperty(e);
|
|
363
|
+
if (!r) {
|
|
364
|
+
var i = c(e);
|
|
365
|
+
if (i) {
|
|
366
|
+
var a = n([
|
|
367
|
+
i
|
|
368
|
+
], [].slice.call(arguments, 1), true);
|
|
369
|
+
return l.apply(this, a);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return l.apply(this, arguments);
|
|
373
|
+
};
|
|
374
|
+
return function() {
|
|
375
|
+
d._resolveFilename = l;
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
t.register = register;
|
|
379
|
+
},
|
|
380
|
+
813: (e, t, r)=>{
|
|
381
|
+
Object.defineProperty(t, "__esModule", {
|
|
382
|
+
value: true
|
|
383
|
+
});
|
|
384
|
+
t.exhaustiveTypeException = t.getStrippedPath = t.getPathsToTry = void 0;
|
|
385
|
+
var n = r(17);
|
|
386
|
+
var i = r(17);
|
|
387
|
+
var a = r(133);
|
|
388
|
+
function getPathsToTry(e, t, r) {
|
|
389
|
+
if (!t || !r || "." === r[0]) return;
|
|
390
|
+
var i = [];
|
|
391
|
+
for(var a = 0, o = t; a < o.length; a++){
|
|
392
|
+
var s = o[a];
|
|
393
|
+
var u = s.pattern === r ? "" : matchStar(s.pattern, r);
|
|
394
|
+
if (void 0 !== u) {
|
|
395
|
+
var _loop_1 = function(t) {
|
|
396
|
+
var r = t.replace("*", u);
|
|
397
|
+
i.push({
|
|
398
|
+
type: "file",
|
|
399
|
+
path: r
|
|
400
|
+
});
|
|
401
|
+
i.push.apply(i, e.map(function(e) {
|
|
402
|
+
return {
|
|
403
|
+
type: "extension",
|
|
404
|
+
path: r + e
|
|
405
|
+
};
|
|
406
|
+
}));
|
|
407
|
+
i.push({
|
|
408
|
+
type: "package",
|
|
409
|
+
path: n.join(r, "/package.json")
|
|
410
|
+
});
|
|
411
|
+
var a = n.join(r, "/index");
|
|
412
|
+
i.push.apply(i, e.map(function(e) {
|
|
413
|
+
return {
|
|
414
|
+
type: "index",
|
|
415
|
+
path: a + e
|
|
416
|
+
};
|
|
417
|
+
}));
|
|
418
|
+
};
|
|
419
|
+
for(var f = 0, c = s.paths; f < c.length; f++){
|
|
420
|
+
var d = c[f];
|
|
421
|
+
_loop_1(d);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return 0 === i.length ? void 0 : i;
|
|
426
|
+
}
|
|
427
|
+
t.getPathsToTry = getPathsToTry;
|
|
428
|
+
function getStrippedPath(e) {
|
|
429
|
+
return "index" === e.type ? (0, i.dirname)(e.path) : "file" === e.type ? e.path : "extension" === e.type ? (0, a.removeExtension)(e.path) : "package" === e.type ? e.path : exhaustiveTypeException(e.type);
|
|
430
|
+
}
|
|
431
|
+
t.getStrippedPath = getStrippedPath;
|
|
432
|
+
function exhaustiveTypeException(e) {
|
|
433
|
+
throw new Error("Unknown type ".concat(e));
|
|
434
|
+
}
|
|
435
|
+
t.exhaustiveTypeException = exhaustiveTypeException;
|
|
436
|
+
function matchStar(e, t) {
|
|
437
|
+
if (t.length < e.length) return;
|
|
438
|
+
if ("*" === e) return t;
|
|
439
|
+
var r = e.indexOf("*");
|
|
440
|
+
if (-1 === r) return;
|
|
441
|
+
var n = e.substring(0, r);
|
|
442
|
+
var i = e.substring(r + 1);
|
|
443
|
+
if (t.substr(0, r) !== n) return;
|
|
444
|
+
if (t.substr(t.length - i.length) !== i) return;
|
|
445
|
+
return t.substr(r, t.length - i.length);
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
131: function(e, t, r) {
|
|
449
|
+
var n = this && this.__assign || function() {
|
|
450
|
+
n = Object.assign || function(e) {
|
|
451
|
+
for(var t, r = 1, n = arguments.length; r < n; r++){
|
|
452
|
+
t = arguments[r];
|
|
453
|
+
for(var i in t)if (Object.prototype.hasOwnProperty.call(t, i)) e[i] = t[i];
|
|
454
|
+
}
|
|
455
|
+
return e;
|
|
456
|
+
};
|
|
457
|
+
return n.apply(this, arguments);
|
|
458
|
+
};
|
|
459
|
+
Object.defineProperty(t, "__esModule", {
|
|
460
|
+
value: true
|
|
461
|
+
});
|
|
462
|
+
t.loadTsconfig = t.walkForTsConfig = t.tsConfigLoader = void 0;
|
|
463
|
+
var i = r(17);
|
|
464
|
+
var a = r(147);
|
|
465
|
+
var o = r(278);
|
|
466
|
+
var s = r(308);
|
|
467
|
+
function tsConfigLoader(e) {
|
|
468
|
+
var t = e.getEnv, r = e.cwd, n = e.loadSync, i = void 0 === n ? loadSyncDefault : n;
|
|
469
|
+
var a = t("TS_NODE_PROJECT");
|
|
470
|
+
var o = t("TS_NODE_BASEURL");
|
|
471
|
+
var s = i(r, a, o);
|
|
472
|
+
return s;
|
|
473
|
+
}
|
|
474
|
+
t.tsConfigLoader = tsConfigLoader;
|
|
475
|
+
function loadSyncDefault(e, t, r) {
|
|
476
|
+
var n = resolveConfigPath(e, t);
|
|
477
|
+
if (!n) return {
|
|
478
|
+
tsConfigPath: void 0,
|
|
479
|
+
baseUrl: void 0,
|
|
480
|
+
paths: void 0
|
|
481
|
+
};
|
|
482
|
+
var i = loadTsconfig(n);
|
|
483
|
+
return {
|
|
484
|
+
tsConfigPath: n,
|
|
485
|
+
baseUrl: r || i && i.compilerOptions && i.compilerOptions.baseUrl,
|
|
486
|
+
paths: i && i.compilerOptions && i.compilerOptions.paths
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
function resolveConfigPath(e, t) {
|
|
490
|
+
if (t) {
|
|
491
|
+
var r = a.lstatSync(t).isDirectory() ? i.resolve(t, "./tsconfig.json") : i.resolve(e, t);
|
|
492
|
+
return r;
|
|
493
|
+
}
|
|
494
|
+
if (a.statSync(e).isFile()) return i.resolve(e);
|
|
495
|
+
var n = walkForTsConfig(e);
|
|
496
|
+
return n ? i.resolve(n) : void 0;
|
|
497
|
+
}
|
|
498
|
+
function walkForTsConfig(e, t) {
|
|
499
|
+
if (void 0 === t) t = a.readdirSync;
|
|
500
|
+
var r = t(e);
|
|
501
|
+
var n = [
|
|
502
|
+
"tsconfig.json",
|
|
503
|
+
"jsconfig.json"
|
|
504
|
+
];
|
|
505
|
+
for(var o = 0, s = n; o < s.length; o++){
|
|
506
|
+
var u = s[o];
|
|
507
|
+
if (-1 !== r.indexOf(u)) return i.join(e, u);
|
|
508
|
+
}
|
|
509
|
+
var f = i.dirname(e);
|
|
510
|
+
if (e === f) return;
|
|
511
|
+
return walkForTsConfig(f, t);
|
|
512
|
+
}
|
|
513
|
+
t.walkForTsConfig = walkForTsConfig;
|
|
514
|
+
function loadTsconfig(e, t, r) {
|
|
515
|
+
if (void 0 === t) t = a.existsSync;
|
|
516
|
+
if (void 0 === r) r = function(e) {
|
|
517
|
+
return a.readFileSync(e, "utf8");
|
|
518
|
+
};
|
|
519
|
+
if (!t(e)) return;
|
|
520
|
+
var u = r(e);
|
|
521
|
+
var f = s(u);
|
|
522
|
+
var c;
|
|
523
|
+
try {
|
|
524
|
+
c = o.parse(f);
|
|
525
|
+
} catch (t) {
|
|
526
|
+
throw new Error("".concat(e, " is malformed ").concat(t.message));
|
|
527
|
+
}
|
|
528
|
+
var d = c.extends;
|
|
529
|
+
if (d) {
|
|
530
|
+
if ("string" == typeof d && -1 === d.indexOf(".json")) d += ".json";
|
|
531
|
+
var l = i.dirname(e);
|
|
532
|
+
var p = i.join(l, d);
|
|
533
|
+
if (-1 !== d.indexOf("/") && -1 !== d.indexOf(".") && !t(p)) p = i.join(l, "node_modules", d);
|
|
534
|
+
var v = loadTsconfig(p, t, r) || {};
|
|
535
|
+
if (v.compilerOptions && v.compilerOptions.baseUrl) {
|
|
536
|
+
var h = i.dirname(d);
|
|
537
|
+
v.compilerOptions.baseUrl = i.join(h, v.compilerOptions.baseUrl);
|
|
538
|
+
}
|
|
539
|
+
return n(n(n({}, v), c), {
|
|
540
|
+
compilerOptions: n(n({}, v.compilerOptions), c.compilerOptions)
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
return c;
|
|
544
|
+
}
|
|
545
|
+
t.loadTsconfig = loadTsconfig;
|
|
546
|
+
},
|
|
547
|
+
278: (e)=>{
|
|
548
|
+
e.exports = require("../json5");
|
|
549
|
+
},
|
|
550
|
+
227: (e)=>{
|
|
551
|
+
e.exports = require("../minimist");
|
|
552
|
+
},
|
|
553
|
+
147: (e)=>{
|
|
554
|
+
e.exports = require("fs");
|
|
555
|
+
},
|
|
556
|
+
503: (e)=>{
|
|
557
|
+
e.exports = require("module");
|
|
558
|
+
},
|
|
559
|
+
17: (e)=>{
|
|
560
|
+
e.exports = require("path");
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
var t = {};
|
|
564
|
+
function __nccwpck_require__(r) {
|
|
565
|
+
var n = t[r];
|
|
566
|
+
if (void 0 !== n) return n.exports;
|
|
567
|
+
var i = t[r] = {
|
|
568
|
+
exports: {}
|
|
569
|
+
};
|
|
570
|
+
var a = true;
|
|
571
|
+
try {
|
|
572
|
+
e[r].call(i.exports, i, i.exports, __nccwpck_require__);
|
|
573
|
+
a = false;
|
|
574
|
+
} finally{
|
|
575
|
+
if (a) delete t[r];
|
|
576
|
+
}
|
|
577
|
+
return i.exports;
|
|
578
|
+
}
|
|
579
|
+
if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
|
|
580
|
+
var r = {};
|
|
581
|
+
(()=>{
|
|
582
|
+
var e = r;
|
|
583
|
+
Object.defineProperty(e, "__esModule", {
|
|
584
|
+
value: true
|
|
585
|
+
});
|
|
586
|
+
e.loadConfig = e.register = e.matchFromAbsolutePathsAsync = e.createMatchPathAsync = e.matchFromAbsolutePaths = e.createMatchPath = void 0;
|
|
587
|
+
var t = __nccwpck_require__(31);
|
|
588
|
+
Object.defineProperty(e, "createMatchPath", {
|
|
589
|
+
enumerable: true,
|
|
590
|
+
get: function() {
|
|
591
|
+
return t.createMatchPath;
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
Object.defineProperty(e, "matchFromAbsolutePaths", {
|
|
595
|
+
enumerable: true,
|
|
596
|
+
get: function() {
|
|
597
|
+
return t.matchFromAbsolutePaths;
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
var n = __nccwpck_require__(947);
|
|
601
|
+
Object.defineProperty(e, "createMatchPathAsync", {
|
|
602
|
+
enumerable: true,
|
|
603
|
+
get: function() {
|
|
604
|
+
return n.createMatchPathAsync;
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
Object.defineProperty(e, "matchFromAbsolutePathsAsync", {
|
|
608
|
+
enumerable: true,
|
|
609
|
+
get: function() {
|
|
610
|
+
return n.matchFromAbsolutePathsAsync;
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
var i = __nccwpck_require__(704);
|
|
614
|
+
Object.defineProperty(e, "register", {
|
|
615
|
+
enumerable: true,
|
|
616
|
+
get: function() {
|
|
617
|
+
return i.register;
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
var a = __nccwpck_require__(154);
|
|
621
|
+
Object.defineProperty(e, "loadConfig", {
|
|
622
|
+
enumerable: true,
|
|
623
|
+
get: function() {
|
|
624
|
+
return a.loadConfig;
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
})();
|
|
628
|
+
module.exports = r;
|
|
629
|
+
})();
|