@ray-js/shared 1.6.25 → 1.6.26
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/lib/index.d.ts +67 -3
- package/lib/index.js +29 -20
- package/package.json +10 -6
- package/lib/file.d.ts +0 -8
- package/lib/file.js +0 -54
- package/lib/log.d.ts +0 -2
- package/lib/log.js +0 -11
- package/lib/path.d.ts +0 -3
- package/lib/path.js +0 -43
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from './log';
|
|
1
|
+
import { outputFileSync } from 'fs-extra';
|
|
2
|
+
import npmlog from 'npmlog';
|
|
4
3
|
export * from 'change-case';
|
|
4
|
+
|
|
5
|
+
declare function writeFileSync(...params: Parameters<typeof outputFileSync>): void;
|
|
6
|
+
declare function searchJSFile(fileName: string, options: {
|
|
7
|
+
cwd: string;
|
|
8
|
+
extensions?: string[];
|
|
9
|
+
}): string;
|
|
10
|
+
declare function requireJSFile(file: string, specifier?: string): any;
|
|
11
|
+
declare function replaceExtension(file: string, ext?: string): string;
|
|
12
|
+
|
|
13
|
+
declare function resolvePath(paths: string[], options?: {
|
|
14
|
+
cwd: string;
|
|
15
|
+
}): string;
|
|
16
|
+
|
|
17
|
+
declare const log: npmlog.Logger;
|
|
18
|
+
|
|
19
|
+
declare const zhLocals: {
|
|
20
|
+
buildDesc: string;
|
|
21
|
+
sourceFolder: string;
|
|
22
|
+
outputFolder: string;
|
|
23
|
+
enableMini: string;
|
|
24
|
+
blended: string;
|
|
25
|
+
disableMini: string;
|
|
26
|
+
enableSourcemap: string;
|
|
27
|
+
disableSourcemap: string;
|
|
28
|
+
targetPlatform: string;
|
|
29
|
+
enableAnalyze: string;
|
|
30
|
+
removeLogs: string;
|
|
31
|
+
buildType: string;
|
|
32
|
+
transformMode: string;
|
|
33
|
+
bundlerDesc: string;
|
|
34
|
+
enableDebug: string;
|
|
35
|
+
startDesc: string;
|
|
36
|
+
emitDeclarationDev: string;
|
|
37
|
+
rayRuntimeLog: string;
|
|
38
|
+
rayCoreRuntimeLog: string;
|
|
39
|
+
upgradeNodeVersion: string;
|
|
40
|
+
rayCliTool: string;
|
|
41
|
+
devMode: string;
|
|
42
|
+
showDetailedLogs: string;
|
|
43
|
+
addCssRule: string;
|
|
44
|
+
esbuildMode: string;
|
|
45
|
+
wantHelp: string;
|
|
46
|
+
smartCssModulesWarning: string;
|
|
47
|
+
autoCssModulesDeprecated: string;
|
|
48
|
+
addModulesParam: string;
|
|
49
|
+
asReplacement: string;
|
|
50
|
+
pluginMethodDeprecated: string;
|
|
51
|
+
configWebpackDeprecated: string;
|
|
52
|
+
tabBarInvalidStructure: string;
|
|
53
|
+
tabBarPagePathNotInRoutes: string;
|
|
54
|
+
tabBarNoParams: string;
|
|
55
|
+
tabBarRouteNotMatched: string;
|
|
56
|
+
tabBarRouteMatchedMultiple: string;
|
|
57
|
+
tabBarPatternMatchWarning: string;
|
|
58
|
+
tabBarCountLimit: string;
|
|
59
|
+
tabBarDuplicatePages: string;
|
|
60
|
+
missingConfigFile: string;
|
|
61
|
+
forWechatPlatform: string;
|
|
62
|
+
devtools: string;
|
|
63
|
+
};
|
|
64
|
+
declare const i18n: {
|
|
65
|
+
__: (key: keyof typeof zhLocals, data?: Record<string, string | number>) => any;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export { i18n, log, replaceExtension, requireJSFile, resolvePath, searchJSFile, writeFileSync };
|
package/lib/index.js
CHANGED
|
@@ -1,20 +1,29 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
var h=Object.create;var d=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var o in t)d(e,o,{get:t[o],enumerable:!0})},c=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of y(t))!P.call(e,a)&&a!==o&&d(e,a,{get:()=>t[a],enumerable:!(r=v(t,a))||r.enumerable});return e},n=(e,t,o)=>(c(e,t,"default"),o&&c(o,t,"default")),l=(e,t,o)=>(o=e!=null?h(B(e)):{},c(t||!e||!e.__esModule?d(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>c(d({},"__esModule",{value:!0}),e);var s={};x(s,{i18n:()=>z,log:()=>N,replaceExtension:()=>R,requireJSFile:()=>D,resolvePath:()=>C,searchJSFile:()=>S,writeFileSync:()=>M});module.exports=L(s);var p=l(require("path")),m=require("fs-extra"),g=l(require("slash"));function M(...e){(0,m.outputFileSync)(...e)}function S(e,t){let{cwd:o,extensions:r=[".ts",".js"]}=t;for(let a of r){let u=p.default.join(o,e+a);if((0,m.existsSync)(u))return(0,g.default)(u)}}function D(e,t="default"){if(!p.default.isAbsolute(e))throw new Error("require(file) must be absolute path");e.endsWith(".ts")&&require("@babel/register")({presets:[[require.resolve("@babel/preset-env"),{modules:"auto"}],require.resolve("@babel/preset-typescript")],extensions:[".ts"],cache:!1});try{delete require.cache[require.resolve(e)];let o=require(e);return o.default&&t==="default"?o.default:o}catch(o){console.error(o),console.error("requireJSFile load failed:",e)}}function R(e,t=""){return e.replace(p.default.extname(e),t)}var i=l(require("path"));function C(e,t){let o=i.isAbsolute(e[0]),{cwd:r=process.cwd()}=t||{},a=e.join(i.sep);return o?i.resolve(a):i.resolve(r,a)}var b=l(require("npmlog")),w=["verbose","info","error","warn"],E=w.indexOf(process.env.LOG_LEVEL)!==-1?process.env.LOG_LEVEL:"info";b.default.level=E;var N=b.default;var I={buildDesc:"\u6267\u884C\u6784\u5EFA\u5E94\u7528/\u7EC4\u4EF6",sourceFolder:"\u6E90\u7801\u76EE\u5F55",outputFolder:"\u4EA7\u7269\u76EE\u5F55",enableMini:"\u542F\u7528\u538B\u7F29\u6784\u5EFA\u4EA7\u7269",blended:"\u6DF7\u5408\u7F16\u8BD1",disableMini:"\u7981\u7528\u538B\u7F29\u6784\u5EFA\u4EA7\u7269",enableSourcemap:"\u542F\u52A8 sourcemap",disableSourcemap:"\u7981\u7528 sourcemap",targetPlatform:"\u76EE\u6807\u5E73\u53F0",enableAnalyze:"\u5F00\u542F analyze \u5206\u6790",removeLogs:"\u79FB\u9664 console debugger \u7B49",buildType:"\u6784\u5EFA\u7C7B\u578B eg: app | component",transformMode:"\u7EC4\u4EF6\u8F6C\u6362\u7C7B\u578B eg: auto | pure",bundlerDesc:"\u9ED8\u8BA4\u4F7F\u7528 esbuild \u6781\u901F\u6784\u5EFA(\u516C\u6D4B\u9636\u6BB5), \u5982\u9700\u964D\u7EA7\u8BBE\u7F6E\u4E3A webpack",enableDebug:"\u5F00\u542F\u8FD0\u884C\u65F6\u65E5\u5FD7",startDesc:"\u542F\u52A8\u5B9E\u65F6\u7F16\u8BD1/\u9884\u89C8",emitDeclarationDev:"\u7EC4\u4EF6\u5F00\u53D1\u6A21\u5F0F\u4E0B\u751F\u6210dts\u6587\u4EF6",rayRuntimeLog:"ray \u8FD0\u884C\u65F6\u65E5\u5FD7",rayCoreRuntimeLog:"ray-core \u8FD0\u884C\u65F6\u65E5\u5FD7",upgradeNodeVersion:"\u8BF7\u5347\u7EA7 Node.js \u7248\u672C",rayCliTool:"Ray \u547D\u4EE4\u884C\u5DE5\u5177",devMode:"\u5F00\u53D1\u8C03\u8BD5",showDetailedLogs:"\u663E\u793A\u8BE6\u7EC6\u8FD0\u884C\u65E5\u5FD7",addCssRule:"addCSSRule \u5DF2\u4E0D\u518D\u652F\u6301, \u8BF7\u79FB\u9664! \u5DF2\u5185\u7F6E less sass \u6A21\u5757.",esbuildMode:"\u9ED8\u8BA4\u542F\u7528 esbuild \u6781\u901F\u6784\u5EFA, \u5982\u9047\u5F02\u5E38\u53EF\u5C1D\u8BD5\u4F7F\u7528 webpack \u6A21\u5F0F",wantHelp:"\u8054\u7CFB\u5F00\u53D1\u4EBA\u5458\u8FDB\u884C\u6392\u67E5, \u611F\u8C22\u60A8\u7684\u652F\u6301.",smartCssModulesWarning:"\u667A\u80FD css-modules \u5BFC\u5165\u6A21\u5F0F, \u4F1A\u5927\u5E45\u964D\u4F4E\u6784\u5EFA\u901F\u5EA6, \u8BF7\u6839\u636E\u4EE5\u4E0B\u63D0\u793A\u65B9\u5F0F\u8C03\u6574:",autoCssModulesDeprecated:"\u81EA\u52A8\u89E3\u6790\u4E3A CSS Modules \u4E0D\u518D\u652F\u6301.",addModulesParam:"\u5982\u5B58\u5728\u6B64\u5199\u6CD5, \u8BF7\u589E\u52A0\u53C2\u6570\u58F0\u660E",asReplacement:"\u4EE3\u66FF.",pluginMethodDeprecated:"\u63D2\u4EF6 {name} \u5DF2\u5E9F\u5F03 {method} \u65B9\u6CD5!",configWebpackDeprecated:"configWebpack \u5DF2\u5E9F\u5F03, \u4EC5\u4FDD\u7559\u652F\u6301 resolve.alias \u914D\u7F6E!",tabBarInvalidStructure:"tabBar.list \u6570\u636E\u7ED3\u6784\u4E0D\u5BF9",tabBarPagePathNotInRoutes:`tabBar.list[{index}].pagePath: {pagePath} \u9700\u8981\u5728\u8DEF\u7531\u914D\u7F6E\u4E2D:
|
|
2
|
+
{routes}`,tabBarNoParams:"tabBar.list[{index}]: {pagePath} \u4E0D\u80FD\u643A\u5E26\u53C2\u6570",tabBarRouteNotMatched:`tabBar.list[{index}]
|
|
3
|
+
.route: {route}
|
|
4
|
+
.pagePath: {pagePath}
|
|
5
|
+
\u65E0\u6CD5\u88AB\u8DEF\u7531\u547D\u4E2D:
|
|
6
|
+
{routeInfo}`,tabBarRouteMatchedMultiple:`tabBar.list[{index}]
|
|
7
|
+
.route: {route}
|
|
8
|
+
.pagePath: {pagePath}
|
|
9
|
+
\u5E94\u88AB\u8DEF\u7531\u547D\u4E2D\uFF1A
|
|
10
|
+
{matchedRoute}
|
|
11
|
+
\u4F46\u540C\u65F6\u53C8\u88AB\u5176\u5B83\u8DEF\u7531\u547D\u4E2D\uFF1A
|
|
12
|
+
{otherRoutes}`,tabBarPatternMatchWarning:`tabBar.list[{index}].route: {route} \u547D\u4E2D\u7684\u8DEF\u7531
|
|
13
|
+
{routeInfo}.route: {mRoute} \u4E3A\u6A21\u5F0F\u5339\u914D
|
|
14
|
+
tab\u9875\u4E0D\u80FD\u643A\u5E26\u53C2\u6570`,tabBarCountLimit:"tabBar.list \u6700\u5C11 2 \u4E2A\u3001\u6700\u591A 5 \u4E2A tab",tabBarDuplicatePages:`tabBar.list\u4E0D\u80FD\u6709\u91CD\u590D\u7684\u9875\u9762:
|
|
15
|
+
{duplicates}`,missingConfigFile:"\u7F3A\u5C11\u914D\u7F6E\u6587\u4EF6 (routes.config.{ts|js})",forWechatPlatform:"\u7528\u4E8E\u5FAE\u4FE1\u5E73\u53F0",devtools:"\u5F00\u542F devtools \u5F00\u53D1\u8005\u5DE5\u5177\u73AF\u5883\u53D8\u91CF"},W={buildDesc:"Build application/component",sourceFolder:"Source directory",outputFolder:"Output directory",enableMini:"Enable compressed build output",blended:"Blended compilation",disableMini:"Disable compressed build output",enableSourcemap:"Enable sourcemap",disableSourcemap:"Disable sourcemap",targetPlatform:"Target platform",enableAnalyze:"Enable analyze mode",removeLogs:"Remove console, debugger, etc.",buildType:"Build type e.g.: app | component",transformMode:"Component transform mode e.g.: auto | pure",bundlerDesc:"Default to esbuild for fast builds (beta). Set to webpack to downgrade",enableDebug:"Enable runtime logs",startDesc:"Start real-time compilation/preview",emitDeclarationDev:"Generate dts files in component development mode",rayRuntimeLog:"Ray runtime logs",rayCoreRuntimeLog:"Ray-core runtime logs",upgradeNodeVersion:"Please upgrade Node.js version",rayCliTool:"Ray CLI tool",devMode:"Development mode",showDetailedLogs:"Show detailed logs",addCssRule:"addCSSRule is no longer supported, please remove! Less sass modules are built-in.",esbuildMode:"Default to esbuild for fast builds, switch to webpack if exceptions occur",wantHelp:"Contact developers for troubleshooting, thank you for your support.",smartCssModulesWarning:"Smart css-modules import mode significantly reduces build speed, please adjust according to the following suggestions:",autoCssModulesDeprecated:"Automatic parsing as CSS Modules is no longer supported.",addModulesParam:"If this pattern exists, please add the parameter declaration",asReplacement:"instead.",pluginMethodDeprecated:"Plugin {name} has deprecated the {method} method!",configWebpackDeprecated:"configWebpack is deprecated, only resolve.alias configuration is supported!",tabBarInvalidStructure:"tabBar.list data structure is incorrect",tabBarPagePathNotInRoutes:`tabBar.list[{index}].pagePath: {pagePath} must be in route configuration:
|
|
16
|
+
{routes}`,tabBarNoParams:"tabBar.list[{index}]: {pagePath} cannot carry parameters",tabBarRouteNotMatched:`tabBar.list[{index}]
|
|
17
|
+
.route: {route}
|
|
18
|
+
.pagePath: {pagePath}
|
|
19
|
+
cannot be matched by route:
|
|
20
|
+
{routeInfo}`,tabBarRouteMatchedMultiple:`tabBar.list[{index}]
|
|
21
|
+
.route: {route}
|
|
22
|
+
.pagePath: {pagePath}
|
|
23
|
+
should be matched by route\uFF1A
|
|
24
|
+
{matchedRoute}
|
|
25
|
+
but is also matched by other routes\uFF1A
|
|
26
|
+
{otherRoutes}`,tabBarPatternMatchWarning:`tabBar.list[{index}].route: {route} matched route
|
|
27
|
+
{routeInfo}.route: {mRoute} is a pattern match
|
|
28
|
+
tab page cannot carry parameters`,tabBarCountLimit:"tabBar.list must have at least 2 and at most 5 tabs",tabBarDuplicatePages:`tabBar.list cannot have duplicate pages:
|
|
29
|
+
{duplicates}`,missingConfigFile:"Missing configuration file (routes.config.{ts|js})",forWechatPlatform:"for WeChat platform",devtools:"Enable devtools developer tool environment variables"},f={zh:I,en:W};function A(e){return e?e.split(".")[0].startsWith("zh")?"zh":"en":"Unknown"}var F=process.env.IDE_LANG||process.env.MINIPACK_LANG||process.env.LANG||process.env.LC_ALL||process.env.LC_MESSAGES,k=A(F),z={__:(e,t)=>{let r=(f[k]||f.en)[e]||e;return t?r.replace(/\{(\w+)\}/g,(a,u)=>t[u]||""):r}};n(s,require("change-case"),module.exports);0&&(module.exports={i18n,log,replaceExtension,requireJSFile,resolvePath,searchJSFile,writeFileSync,...require("change-case")});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/shared",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.26",
|
|
4
4
|
"description": "Ray shared (Node Client)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ray"
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
"lib"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "
|
|
21
|
+
"build": "tsup src/index.ts --minify --dts --format cjs --out-dir lib --tsconfig tsconfig.build.json",
|
|
22
22
|
"clean": "rm -rf lib",
|
|
23
|
-
"watch": "
|
|
23
|
+
"watch": "npm run build -- --watch"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/preset-env": "^7.26.0",
|
|
27
27
|
"@babel/preset-typescript": "^7.26.0",
|
|
28
28
|
"@babel/register": "^7.25.9",
|
|
29
|
-
"@ray-js/types": "1.6.
|
|
29
|
+
"@ray-js/types": "1.6.26",
|
|
30
30
|
"change-case": "^4.1.2",
|
|
31
31
|
"fs-extra": "^10.1.0",
|
|
32
32
|
"merge": "^2.1.1",
|
|
@@ -34,12 +34,16 @@
|
|
|
34
34
|
"slash": "^3.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
+
"@swc/cli": "^0.6.0",
|
|
38
|
+
"@swc/core": "^1.11.11",
|
|
37
39
|
"@types/fs-extra": "^11.0.4",
|
|
38
|
-
"@types/npmlog": "^7.0.0"
|
|
40
|
+
"@types/npmlog": "^7.0.0",
|
|
41
|
+
"tsup": "^8.4.0",
|
|
42
|
+
"typescript": "^5.8.2"
|
|
39
43
|
},
|
|
40
44
|
"publishConfig": {
|
|
41
45
|
"access": "public",
|
|
42
46
|
"registry": "https://registry.npmjs.com"
|
|
43
47
|
},
|
|
44
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "d842231dd15303495069483a809a71dbc640ebaf"
|
|
45
49
|
}
|
package/lib/file.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { outputFileSync } from 'fs-extra';
|
|
2
|
-
export declare function writeFileSync(...params: Parameters<typeof outputFileSync>): void;
|
|
3
|
-
export declare function searchJSFile(fileName: string, options: {
|
|
4
|
-
cwd: string;
|
|
5
|
-
extensions?: string[];
|
|
6
|
-
}): string;
|
|
7
|
-
export declare function requireJSFile(file: string, specifier?: string): any;
|
|
8
|
-
export declare function replaceExtension(file: string, ext?: string): string;
|
package/lib/file.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.writeFileSync = writeFileSync;
|
|
7
|
-
exports.searchJSFile = searchJSFile;
|
|
8
|
-
exports.requireJSFile = requireJSFile;
|
|
9
|
-
exports.replaceExtension = replaceExtension;
|
|
10
|
-
const fs_extra_1 = require("fs-extra");
|
|
11
|
-
const path_1 = __importDefault(require("path"));
|
|
12
|
-
const slash_1 = __importDefault(require("slash"));
|
|
13
|
-
function writeFileSync(...params) {
|
|
14
|
-
(0, fs_extra_1.outputFileSync)(...params);
|
|
15
|
-
}
|
|
16
|
-
function searchJSFile(fileName, options) {
|
|
17
|
-
const { cwd, extensions = ['.ts', '.js'] } = options;
|
|
18
|
-
for (const extension of extensions) {
|
|
19
|
-
const file = path_1.default.join(cwd, fileName + extension);
|
|
20
|
-
if ((0, fs_extra_1.existsSync)(file)) {
|
|
21
|
-
return (0, slash_1.default)(file);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function requireJSFile(file, specifier = 'default') {
|
|
26
|
-
if (!path_1.default.isAbsolute(file)) {
|
|
27
|
-
throw new Error('require(file) must be absolute path');
|
|
28
|
-
}
|
|
29
|
-
if (file.endsWith('.ts')) {
|
|
30
|
-
require('@babel/register')({
|
|
31
|
-
presets: [
|
|
32
|
-
[require.resolve('@babel/preset-env'), { modules: 'auto' }],
|
|
33
|
-
require.resolve('@babel/preset-typescript'),
|
|
34
|
-
],
|
|
35
|
-
extensions: ['.ts'],
|
|
36
|
-
cache: false,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
try {
|
|
40
|
-
delete require.cache[require.resolve(file)];
|
|
41
|
-
const module = require(file);
|
|
42
|
-
if (module.default && specifier === 'default') {
|
|
43
|
-
return module.default;
|
|
44
|
-
}
|
|
45
|
-
return module;
|
|
46
|
-
}
|
|
47
|
-
catch (err) {
|
|
48
|
-
console.error(err);
|
|
49
|
-
console.error('requireJSFile load failed:', file);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function replaceExtension(file, ext = '') {
|
|
53
|
-
return file.replace(path_1.default.extname(file), ext);
|
|
54
|
-
}
|
package/lib/log.d.ts
DELETED
package/lib/log.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.log = void 0;
|
|
7
|
-
const npmlog_1 = __importDefault(require("npmlog"));
|
|
8
|
-
const envs = ['verbose', 'info', 'error', 'warn'];
|
|
9
|
-
const logLevel = envs.indexOf(process.env.LOG_LEVEL) !== -1 ? process.env.LOG_LEVEL : 'info';
|
|
10
|
-
npmlog_1.default.level = logLevel;
|
|
11
|
-
exports.log = npmlog_1.default;
|
package/lib/path.d.ts
DELETED
package/lib/path.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.resolvePath = resolvePath;
|
|
37
|
-
const path = __importStar(require("path"));
|
|
38
|
-
function resolvePath(paths, options) {
|
|
39
|
-
const isAbsolute = path.isAbsolute(paths[0]);
|
|
40
|
-
const { cwd = process.cwd() } = options || {};
|
|
41
|
-
const p = paths.join(path.sep);
|
|
42
|
-
return isAbsolute ? path.resolve(p) : path.resolve(cwd, p);
|
|
43
|
-
}
|