@dlzn-ui/node-utils 2.0.35 → 2.0.36
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/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +6 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,8 @@ import { ProjectManifest } from '@pnpm/types';
|
|
|
3
3
|
declare function getDirectDirs(patterns: string | string[], cwd?: string | URL): Promise<string[]>;
|
|
4
4
|
declare function getDirectFiles(patterns: string | string[], cwd?: string | URL): Promise<string[]>;
|
|
5
5
|
|
|
6
|
+
declare function isCI(): boolean;
|
|
7
|
+
|
|
6
8
|
type Awaitable<T> = Promise<T> | T;
|
|
7
9
|
declare function errorAndExit(err: Error): never;
|
|
8
10
|
declare function execCommand<T extends () => Awaitable<any>>(fnc: T, overrideName?: string): Promise<void>;
|
|
@@ -14,4 +16,4 @@ declare function run(command: string, cwd: string): Promise<void>;
|
|
|
14
16
|
|
|
15
17
|
declare function upperFirst(str: string): string;
|
|
16
18
|
|
|
17
|
-
export { errorAndExit, execCommand, getDirectDirs, getDirectFiles, getPackageDependencies, getPackageManifest, run, upperFirst };
|
|
19
|
+
export { errorAndExit, execCommand, getDirectDirs, getDirectFiles, getPackageDependencies, getPackageManifest, isCI, run, upperFirst };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { ProjectManifest } from '@pnpm/types';
|
|
|
3
3
|
declare function getDirectDirs(patterns: string | string[], cwd?: string | URL): Promise<string[]>;
|
|
4
4
|
declare function getDirectFiles(patterns: string | string[], cwd?: string | URL): Promise<string[]>;
|
|
5
5
|
|
|
6
|
+
declare function isCI(): boolean;
|
|
7
|
+
|
|
6
8
|
type Awaitable<T> = Promise<T> | T;
|
|
7
9
|
declare function errorAndExit(err: Error): never;
|
|
8
10
|
declare function execCommand<T extends () => Awaitable<any>>(fnc: T, overrideName?: string): Promise<void>;
|
|
@@ -14,4 +16,4 @@ declare function run(command: string, cwd: string): Promise<void>;
|
|
|
14
16
|
|
|
15
17
|
declare function upperFirst(str: string): string;
|
|
16
18
|
|
|
17
|
-
export { errorAndExit, execCommand, getDirectDirs, getDirectFiles, getPackageDependencies, getPackageManifest, run, upperFirst };
|
|
19
|
+
export { errorAndExit, execCommand, getDirectDirs, getDirectFiles, getPackageDependencies, getPackageManifest, isCI, run, upperFirst };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { basename, extname } from 'node:path';
|
|
2
2
|
import { glob } from 'tinyglobby';
|
|
3
|
+
import ci from 'ci-info';
|
|
3
4
|
import { performance } from 'node:perf_hooks';
|
|
4
5
|
import process from 'node:process';
|
|
5
6
|
import { styleText } from 'node:util';
|
|
@@ -24,6 +25,10 @@ async function getDirectFiles(patterns, cwd) {
|
|
|
24
25
|
return result.map((file) => basename(file, extname(file)));
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
function isCI() {
|
|
29
|
+
return ci.isCI;
|
|
30
|
+
}
|
|
31
|
+
|
|
27
32
|
function errorAndExit(err) {
|
|
28
33
|
consola.error(err);
|
|
29
34
|
process.exit(1);
|
|
@@ -82,4 +87,4 @@ function upperFirst(str) {
|
|
|
82
87
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
83
88
|
}
|
|
84
89
|
|
|
85
|
-
export { errorAndExit, execCommand, getDirectDirs, getDirectFiles, getPackageDependencies, getPackageManifest, run, upperFirst };
|
|
90
|
+
export { errorAndExit, execCommand, getDirectDirs, getDirectFiles, getPackageDependencies, getPackageManifest, isCI, run, upperFirst };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dlzn-ui/node-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.36",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@pnpm/types": "^1101.9.0",
|
|
20
|
+
"ci-info": "^4.4.0",
|
|
20
21
|
"consola": "^3.4.2",
|
|
21
22
|
"tinyglobby": "^0.2.17"
|
|
22
23
|
},
|