@storm-software/eslint 0.170.155 → 0.170.157
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/README.md +1 -1
- package/dist/astro-CKzo6xci.d.mts +5 -0
- package/dist/banner-YnHf4ewf.d.mts +5 -0
- package/dist/bun-OJPLvfnX.d.mts +5 -0
- package/dist/cspell-CfGd6g7m.d.mts +8 -0
- package/dist/disables-Dx5b56Fi.d.mts +5 -0
- package/dist/find-workspace-root-D3UHWbgn.mjs +211 -0
- package/dist/formatters-VU6Zu_ju.d.mts +5 -0
- package/dist/graphql-ClFinA5J.d.mts +5 -0
- package/dist/helpers-mce_MNwt.mjs +72 -0
- package/dist/ignores-CPeru9Fz.d.mts +5 -0
- package/dist/imports-CQToT7JW.d.mts +5 -0
- package/dist/index.d.mts +41 -0
- package/dist/index.mjs +42 -0
- package/dist/javascript-BR8uv0Wr.d.mts +5 -0
- package/dist/jsdoc-Dy8bHykP.d.mts +5 -0
- package/dist/jsonc-YqDXTIOi.d.mts +5 -0
- package/dist/jsx-DzqEJSYd.d.mts +5 -0
- package/dist/markdown-C5lFEI83.d.mts +5 -0
- package/dist/mdx-CDEhveb1.d.mts +5 -0
- package/dist/next-DGhspeMc.d.mts +8 -0
- package/dist/node-CQgsZ8nv.d.mts +5 -0
- package/dist/nx-CLRc6QRM.d.mts +8 -0
- package/dist/perfectionist-CgSgqAjV.d.mts +10 -0
- package/dist/plugins-CZWNS7l4.mjs +8291 -0
- package/dist/plugins.d.mts +616 -0
- package/dist/plugins.mjs +2 -0
- package/dist/pnpm-Cp9VzsCv.d.mts +5 -0
- package/dist/preset-x6MId9-7.mjs +265 -0
- package/dist/preset.d.mts +30 -0
- package/dist/preset.mjs +3 -0
- package/dist/prettier-CboafVRp.d.mts +8 -0
- package/dist/react-C5HWHYPh.d.mts +5 -0
- package/dist/react-native-DjQo3PXB.d.mts +8 -0
- package/dist/regexp-D2Fm6vg7.d.mts +5 -0
- package/dist/rolldown-runtime-CMFfr-1z.mjs +26 -0
- package/dist/secrets-DfvPNLCF.d.mts +10 -0
- package/dist/sort-9_xeGmal.d.mts +16 -0
- package/dist/storybook-DqDJ5exI.d.mts +5 -0
- package/dist/stylistic-9jDGqsHH.d.mts +9 -0
- package/dist/test-Dw-h86ig.d.mts +5 -0
- package/dist/toml-ConAZLXy.d.mts +5 -0
- package/dist/tsdoc-DcYWMVl0.d.mts +5 -0
- package/dist/{types.d.ts → typegen.d.mts} +8536 -11156
- package/dist/types-XIthLTox.d.mts +852 -0
- package/dist/types.d.mts +3 -0
- package/dist/types.mjs +2 -0
- package/dist/typescript-BFiiMXDt.d.mts +5 -0
- package/dist/unicorn-CQ3PTdfT.d.mts +5 -0
- package/dist/unocss-Uw-vEvNU.d.mts +5 -0
- package/dist/yaml-Ddbh49WY.d.mts +5 -0
- package/dist/zod-7F7dUsU5.d.mts +8 -0
- package/package.json +58 -79
- package/dist/chunk-2TYJ2VM7.js +0 -46
- package/dist/chunk-F7ZJ6N35.js +0 -43
- package/dist/chunk-I4ZWVHOG.js +0 -220
- package/dist/chunk-JBIA43L4.js +0 -75
- package/dist/chunk-T6GDWDAB.js +0 -167
- package/dist/chunk-XFFMMX6A.js +0 -96
- package/dist/chunk-XSM4AYON.js +0 -19822
- package/dist/chunk-Y5JY2DPL.js +0 -19
- package/dist/index.cjs +0 -21965
- package/dist/index.d.cts +0 -127
- package/dist/index.d.ts +0 -127
- package/dist/index.js +0 -15
- package/dist/preset.cjs +0 -21922
- package/dist/preset.d.cts +0 -34
- package/dist/preset.d.ts +0 -34
- package/dist/preset.js +0 -8
- package/dist/src-TAWYAYRW.js +0 -887
- package/dist/src-XRFRLUCW.js +0 -57
- package/dist/src-YPCQHGJY.js +0 -91
- package/dist/types.cjs +0 -2
- package/dist/types.d.cts +0 -19537
- package/dist/types.js +0 -4
- package/dist/utils/combine.cjs +0 -9
- package/dist/utils/combine.d.cts +0 -14
- package/dist/utils/combine.d.ts +0 -14
- package/dist/utils/combine.js +0 -10
- package/dist/utils/correct-paths.cjs +0 -232
- package/dist/utils/correct-paths.d.cts +0 -30
- package/dist/utils/correct-paths.d.ts +0 -30
- package/dist/utils/correct-paths.js +0 -2
- package/dist/utils/find-workspace-root.cjs +0 -201
- package/dist/utils/find-workspace-root.d.cts +0 -16
- package/dist/utils/find-workspace-root.d.ts +0 -16
- package/dist/utils/find-workspace-root.js +0 -3
- package/dist/utils/format-config.cjs +0 -20
- package/dist/utils/format-config.d.cts +0 -5
- package/dist/utils/format-config.d.ts +0 -5
- package/dist/utils/format-config.js +0 -21
- package/dist/utils/helpers.cjs +0 -87
- package/dist/utils/helpers.d.cts +0 -55
- package/dist/utils/helpers.d.ts +0 -55
- package/dist/utils/helpers.js +0 -2
- package/dist/utils/package-manager.cjs +0 -199
- package/dist/utils/package-manager.d.cts +0 -8
- package/dist/utils/package-manager.d.ts +0 -8
- package/dist/utils/package-manager.js +0 -4
- package/dist/utils/tsconfig.cjs +0 -297
- package/dist/utils/tsconfig.d.cts +0 -25
- package/dist/utils/tsconfig.d.ts +0 -25
- package/dist/utils/tsconfig.js +0 -4
package/dist/utils/helpers.cjs
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var localPkg = require('local-pkg');
|
|
4
|
-
var process = require('process');
|
|
5
|
-
var url = require('url');
|
|
6
|
-
|
|
7
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var process__default = /*#__PURE__*/_interopDefault(process);
|
|
10
|
-
|
|
11
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=a9def7e06ce25c19654987ab91979289197bf4d3e7e124c514a4487c3e8d68c6__c60dfe8a33249c9fe1a3f42b452f3236/node_modules/tsup/assets/cjs_shims.js
|
|
12
|
-
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
13
|
-
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
14
|
-
var scopeUrl = url.fileURLToPath(new URL(".", importMetaUrl));
|
|
15
|
-
var isCwdInScope = localPkg.isPackageExists("@storm-software/eslint");
|
|
16
|
-
var parserPlain = {
|
|
17
|
-
meta: {
|
|
18
|
-
name: "parser-plain"
|
|
19
|
-
},
|
|
20
|
-
parseForESLint: (code) => ({
|
|
21
|
-
ast: {
|
|
22
|
-
body: [],
|
|
23
|
-
comments: [],
|
|
24
|
-
loc: { end: code.length, start: 0 },
|
|
25
|
-
range: [0, code.length],
|
|
26
|
-
tokens: [],
|
|
27
|
-
type: "Program"
|
|
28
|
-
},
|
|
29
|
-
scopeManager: null,
|
|
30
|
-
services: { isPlain: true },
|
|
31
|
-
visitorKeys: {
|
|
32
|
-
Program: []
|
|
33
|
-
}
|
|
34
|
-
})
|
|
35
|
-
};
|
|
36
|
-
function isInGitHooksOrLintStaged() {
|
|
37
|
-
return !!(process__default.default.env.GIT_PARAMS || process__default.default.env.VSCODE_GIT_COMMAND || process__default.default.env.npm_lifecycle_script?.startsWith("lint-staged") || process__default.default.env.npm_lifecycle_script?.startsWith("lefthook") || process__default.default.env.npm_lifecycle_script === "push");
|
|
38
|
-
}
|
|
39
|
-
function isInEditorEnv() {
|
|
40
|
-
if (process__default.default.env.CI) return false;
|
|
41
|
-
if (isInGitHooksOrLintStaged()) return false;
|
|
42
|
-
return !!(process__default.default.env.VSCODE_PID || process__default.default.env.VSCODE_CWD || process__default.default.env.JETBRAINS_IDE || process__default.default.env.VIM || process__default.default.env.NVIM);
|
|
43
|
-
}
|
|
44
|
-
async function interopDefault(m) {
|
|
45
|
-
const resolved = await m;
|
|
46
|
-
return resolved.default || resolved;
|
|
47
|
-
}
|
|
48
|
-
function isPackageInScope(name) {
|
|
49
|
-
return localPkg.isPackageExists(name, { paths: [scopeUrl] });
|
|
50
|
-
}
|
|
51
|
-
async function ensurePackages(packages) {
|
|
52
|
-
if (process__default.default.env.CI || process__default.default.stdout.isTTY === false || isCwdInScope === false)
|
|
53
|
-
return;
|
|
54
|
-
const nonExistingPackages = packages.filter(
|
|
55
|
-
(i) => i && !isPackageInScope(i)
|
|
56
|
-
);
|
|
57
|
-
if (nonExistingPackages.length === 0) return;
|
|
58
|
-
const p = await import('@clack/prompts');
|
|
59
|
-
const result = await p.confirm({
|
|
60
|
-
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(
|
|
61
|
-
", "
|
|
62
|
-
)}. Do you want to install them?`
|
|
63
|
-
});
|
|
64
|
-
if (result)
|
|
65
|
-
await import('@antfu/install-pkg').then(
|
|
66
|
-
(i) => i.installPackage(nonExistingPackages, { dev: true })
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
function renameRules(rules, map) {
|
|
70
|
-
return Object.fromEntries(
|
|
71
|
-
Object.entries(rules).map(([key, value]) => {
|
|
72
|
-
for (const [from, to] of Object.entries(map)) {
|
|
73
|
-
if (key.startsWith(`${from}/`))
|
|
74
|
-
return [to + key.slice(from.length), value];
|
|
75
|
-
}
|
|
76
|
-
return [key, value];
|
|
77
|
-
})
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
exports.ensurePackages = ensurePackages;
|
|
82
|
-
exports.interopDefault = interopDefault;
|
|
83
|
-
exports.isInEditorEnv = isInEditorEnv;
|
|
84
|
-
exports.isInGitHooksOrLintStaged = isInGitHooksOrLintStaged;
|
|
85
|
-
exports.isPackageInScope = isPackageInScope;
|
|
86
|
-
exports.parserPlain = parserPlain;
|
|
87
|
-
exports.renameRules = renameRules;
|
package/dist/utils/helpers.d.cts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Awaitable } from 'eslint-flat-config-utils';
|
|
2
|
-
|
|
3
|
-
declare const parserPlain: {
|
|
4
|
-
meta: {
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
parseForESLint: (code: string) => {
|
|
8
|
-
ast: {
|
|
9
|
-
body: never[];
|
|
10
|
-
comments: never[];
|
|
11
|
-
loc: {
|
|
12
|
-
end: number;
|
|
13
|
-
start: number;
|
|
14
|
-
};
|
|
15
|
-
range: number[];
|
|
16
|
-
tokens: never[];
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
scopeManager: null;
|
|
20
|
-
services: {
|
|
21
|
-
isPlain: boolean;
|
|
22
|
-
};
|
|
23
|
-
visitorKeys: {
|
|
24
|
-
Program: never[];
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
declare function isInGitHooksOrLintStaged(): boolean;
|
|
29
|
-
declare function isInEditorEnv(): boolean;
|
|
30
|
-
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
31
|
-
default: infer U;
|
|
32
|
-
} ? U : T>;
|
|
33
|
-
declare function isPackageInScope(name: string): boolean;
|
|
34
|
-
declare function ensurePackages(packages: (string | undefined)[]): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Rename plugin prefixes in a rule object.
|
|
37
|
-
* Accepts a map of prefixes to rename.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* import { renameRules } from '@storm-software/eslint'
|
|
42
|
-
*
|
|
43
|
-
* export default [{
|
|
44
|
-
* rules: renameRules(
|
|
45
|
-
* {
|
|
46
|
-
* '@typescript-eslint/indent': 'error'
|
|
47
|
-
* },
|
|
48
|
-
* { '@typescript-eslint': 'ts' }
|
|
49
|
-
* )
|
|
50
|
-
* }]
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
54
|
-
|
|
55
|
-
export { ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, renameRules };
|
package/dist/utils/helpers.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Awaitable } from 'eslint-flat-config-utils';
|
|
2
|
-
|
|
3
|
-
declare const parserPlain: {
|
|
4
|
-
meta: {
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
parseForESLint: (code: string) => {
|
|
8
|
-
ast: {
|
|
9
|
-
body: never[];
|
|
10
|
-
comments: never[];
|
|
11
|
-
loc: {
|
|
12
|
-
end: number;
|
|
13
|
-
start: number;
|
|
14
|
-
};
|
|
15
|
-
range: number[];
|
|
16
|
-
tokens: never[];
|
|
17
|
-
type: string;
|
|
18
|
-
};
|
|
19
|
-
scopeManager: null;
|
|
20
|
-
services: {
|
|
21
|
-
isPlain: boolean;
|
|
22
|
-
};
|
|
23
|
-
visitorKeys: {
|
|
24
|
-
Program: never[];
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
declare function isInGitHooksOrLintStaged(): boolean;
|
|
29
|
-
declare function isInEditorEnv(): boolean;
|
|
30
|
-
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
31
|
-
default: infer U;
|
|
32
|
-
} ? U : T>;
|
|
33
|
-
declare function isPackageInScope(name: string): boolean;
|
|
34
|
-
declare function ensurePackages(packages: (string | undefined)[]): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Rename plugin prefixes in a rule object.
|
|
37
|
-
* Accepts a map of prefixes to rename.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* import { renameRules } from '@storm-software/eslint'
|
|
42
|
-
*
|
|
43
|
-
* export default [{
|
|
44
|
-
* rules: renameRules(
|
|
45
|
-
* {
|
|
46
|
-
* '@typescript-eslint/indent': 'error'
|
|
47
|
-
* },
|
|
48
|
-
* { '@typescript-eslint': 'ts' }
|
|
49
|
-
* )
|
|
50
|
-
* }]
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
54
|
-
|
|
55
|
-
export { ensurePackages, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, renameRules };
|
package/dist/utils/helpers.js
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('fs');
|
|
4
|
-
var path = require('path');
|
|
5
|
-
|
|
6
|
-
// src/utils/package-manager.ts
|
|
7
|
-
|
|
8
|
-
// src/utils/correct-paths.ts
|
|
9
|
-
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
10
|
-
function normalizeWindowsPath(input = "") {
|
|
11
|
-
if (!input) {
|
|
12
|
-
return input;
|
|
13
|
-
}
|
|
14
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
15
|
-
}
|
|
16
|
-
var _UNC_REGEX = /^[/\\]{2}/;
|
|
17
|
-
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
18
|
-
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
19
|
-
var correctPaths = function(path) {
|
|
20
|
-
if (!path || path.length === 0) {
|
|
21
|
-
return ".";
|
|
22
|
-
}
|
|
23
|
-
path = normalizeWindowsPath(path);
|
|
24
|
-
const isUNCPath = path.match(_UNC_REGEX);
|
|
25
|
-
const isPathAbsolute = isAbsolute(path);
|
|
26
|
-
const trailingSeparator = path[path.length - 1] === "/";
|
|
27
|
-
path = normalizeString(path, !isPathAbsolute);
|
|
28
|
-
if (path.length === 0) {
|
|
29
|
-
if (isPathAbsolute) {
|
|
30
|
-
return "/";
|
|
31
|
-
}
|
|
32
|
-
return trailingSeparator ? "./" : ".";
|
|
33
|
-
}
|
|
34
|
-
if (trailingSeparator) {
|
|
35
|
-
path += "/";
|
|
36
|
-
}
|
|
37
|
-
if (_DRIVE_LETTER_RE.test(path)) {
|
|
38
|
-
path += "/";
|
|
39
|
-
}
|
|
40
|
-
if (isUNCPath) {
|
|
41
|
-
if (!isPathAbsolute) {
|
|
42
|
-
return `//./${path}`;
|
|
43
|
-
}
|
|
44
|
-
return `//${path}`;
|
|
45
|
-
}
|
|
46
|
-
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
47
|
-
};
|
|
48
|
-
function normalizeString(path, allowAboveRoot) {
|
|
49
|
-
let res = "";
|
|
50
|
-
let lastSegmentLength = 0;
|
|
51
|
-
let lastSlash = -1;
|
|
52
|
-
let dots = 0;
|
|
53
|
-
let char = null;
|
|
54
|
-
for (let index = 0; index <= path.length; ++index) {
|
|
55
|
-
if (index < path.length) {
|
|
56
|
-
char = path[index];
|
|
57
|
-
} else if (char === "/") {
|
|
58
|
-
break;
|
|
59
|
-
} else {
|
|
60
|
-
char = "/";
|
|
61
|
-
}
|
|
62
|
-
if (char === "/") {
|
|
63
|
-
if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
|
|
64
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
65
|
-
if (res.length > 2) {
|
|
66
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
67
|
-
if (lastSlashIndex === -1) {
|
|
68
|
-
res = "";
|
|
69
|
-
lastSegmentLength = 0;
|
|
70
|
-
} else {
|
|
71
|
-
res = res.slice(0, lastSlashIndex);
|
|
72
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
73
|
-
}
|
|
74
|
-
lastSlash = index;
|
|
75
|
-
dots = 0;
|
|
76
|
-
continue;
|
|
77
|
-
} else if (res.length > 0) {
|
|
78
|
-
res = "";
|
|
79
|
-
lastSegmentLength = 0;
|
|
80
|
-
lastSlash = index;
|
|
81
|
-
dots = 0;
|
|
82
|
-
continue;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (allowAboveRoot) {
|
|
86
|
-
res += res.length > 0 ? "/.." : "..";
|
|
87
|
-
lastSegmentLength = 2;
|
|
88
|
-
}
|
|
89
|
-
} else {
|
|
90
|
-
if (res.length > 0) {
|
|
91
|
-
res += `/${path.slice(lastSlash + 1, index)}`;
|
|
92
|
-
} else {
|
|
93
|
-
res = path.slice(lastSlash + 1, index);
|
|
94
|
-
}
|
|
95
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
96
|
-
}
|
|
97
|
-
lastSlash = index;
|
|
98
|
-
dots = 0;
|
|
99
|
-
} else if (char === "." && dots !== -1) {
|
|
100
|
-
++dots;
|
|
101
|
-
} else {
|
|
102
|
-
dots = -1;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return res;
|
|
106
|
-
}
|
|
107
|
-
var isAbsolute = function(p) {
|
|
108
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// src/utils/find-workspace-root.ts
|
|
112
|
-
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
113
|
-
var depth = 0;
|
|
114
|
-
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
115
|
-
const _startPath = startPath ?? process.cwd();
|
|
116
|
-
if (endDirectoryNames.some(
|
|
117
|
-
(endDirName) => fs.existsSync(path.join(_startPath, endDirName))
|
|
118
|
-
)) {
|
|
119
|
-
return _startPath;
|
|
120
|
-
}
|
|
121
|
-
if (endFileNames.some((endFileName) => fs.existsSync(path.join(_startPath, endFileName)))) {
|
|
122
|
-
return _startPath;
|
|
123
|
-
}
|
|
124
|
-
if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
|
|
125
|
-
const parent = path.join(_startPath, "..");
|
|
126
|
-
return findFolderUp(parent, endFileNames, endDirectoryNames);
|
|
127
|
-
}
|
|
128
|
-
return void 0;
|
|
129
|
-
}
|
|
130
|
-
var rootFiles = [
|
|
131
|
-
"storm-workspace.json",
|
|
132
|
-
"storm-workspace.json",
|
|
133
|
-
"storm-workspace.yaml",
|
|
134
|
-
"storm-workspace.yml",
|
|
135
|
-
"storm-workspace.js",
|
|
136
|
-
"storm-workspace.ts",
|
|
137
|
-
".storm-workspace.json",
|
|
138
|
-
".storm-workspace.yaml",
|
|
139
|
-
".storm-workspace.yml",
|
|
140
|
-
".storm-workspace.js",
|
|
141
|
-
".storm-workspace.ts",
|
|
142
|
-
"lerna.json",
|
|
143
|
-
"nx.json",
|
|
144
|
-
"turbo.json",
|
|
145
|
-
"npm-workspace.json",
|
|
146
|
-
"yarn-workspace.json",
|
|
147
|
-
"pnpm-workspace.json",
|
|
148
|
-
"npm-workspace.yaml",
|
|
149
|
-
"yarn-workspace.yaml",
|
|
150
|
-
"pnpm-workspace.yaml",
|
|
151
|
-
"npm-workspace.yml",
|
|
152
|
-
"yarn-workspace.yml",
|
|
153
|
-
"pnpm-workspace.yml",
|
|
154
|
-
"npm-lock.json",
|
|
155
|
-
"yarn-lock.json",
|
|
156
|
-
"pnpm-lock.json",
|
|
157
|
-
"npm-lock.yaml",
|
|
158
|
-
"yarn-lock.yaml",
|
|
159
|
-
"pnpm-lock.yaml",
|
|
160
|
-
"npm-lock.yml",
|
|
161
|
-
"yarn-lock.yml",
|
|
162
|
-
"pnpm-lock.yml",
|
|
163
|
-
"bun.lockb"
|
|
164
|
-
];
|
|
165
|
-
var rootDirectories = [
|
|
166
|
-
".storm-workspace",
|
|
167
|
-
".nx",
|
|
168
|
-
".github",
|
|
169
|
-
".vscode",
|
|
170
|
-
".verdaccio"
|
|
171
|
-
];
|
|
172
|
-
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
173
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
174
|
-
return correctPaths(
|
|
175
|
-
process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
return correctPaths(
|
|
179
|
-
findFolderUp(
|
|
180
|
-
process.cwd(),
|
|
181
|
-
rootFiles,
|
|
182
|
-
rootDirectories
|
|
183
|
-
)
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// src/utils/package-manager.ts
|
|
188
|
-
function detectPackageManager() {
|
|
189
|
-
const workspaceRoot = findWorkspaceRootSafe() ?? process.cwd();
|
|
190
|
-
if (fs.existsSync(path.join(workspaceRoot, "bun.lockb")) || fs.existsSync(path.join(workspaceRoot, "bun.lock")) || fs.existsSync(path.join(workspaceRoot, "bunfig.toml")) || fs.existsSync(path.join(workspaceRoot, "bunfig.yml"))) {
|
|
191
|
-
return "bun";
|
|
192
|
-
}
|
|
193
|
-
if (fs.existsSync(path.join(workspaceRoot, "pnpm-lock.yaml")) || fs.existsSync(path.join(workspaceRoot, "pnpm-lock.yml")) || fs.existsSync(path.join(workspaceRoot, "pnpm-workpace.yaml"))) {
|
|
194
|
-
return "pnpm";
|
|
195
|
-
}
|
|
196
|
-
return "npm";
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
exports.detectPackageManager = detectPackageManager;
|