@decaf-ts/utils 0.3.13 → 0.4.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/README.md +20 -2
- package/dist/utils.cjs +298 -141
- package/dist/utils.esm.cjs +225 -80
- package/lib/cli/commands/build-scripts.cjs +227 -77
- package/lib/cli/commands/build-scripts.d.ts +18 -4
- package/lib/esm/cli/commands/build-scripts.d.ts +18 -4
- package/lib/esm/cli/commands/build-scripts.js +225 -78
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +10 -9
|
@@ -2,6 +2,9 @@ import { Command } from "../command";
|
|
|
2
2
|
import { CommandOptions } from "../types";
|
|
3
3
|
import { DefaultCommandValues } from "../constants";
|
|
4
4
|
import { LoggingConfig } from "@decaf-ts/logging";
|
|
5
|
+
export declare function parseList(input?: string | string[]): string[];
|
|
6
|
+
export declare function packageToGlobal(name: string): string;
|
|
7
|
+
export declare function getPackageDependencies(): string[];
|
|
5
8
|
declare enum Modes {
|
|
6
9
|
CJS = "commonjs",
|
|
7
10
|
ESM = "es2022"
|
|
@@ -24,6 +27,14 @@ declare const options: {
|
|
|
24
27
|
type: string;
|
|
25
28
|
default: BuildMode;
|
|
26
29
|
};
|
|
30
|
+
includes: {
|
|
31
|
+
type: string;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
externals: {
|
|
35
|
+
type: string;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
27
38
|
docs: {
|
|
28
39
|
type: string;
|
|
29
40
|
default: boolean;
|
|
@@ -44,15 +55,18 @@ export declare class BuildScripts extends Command<CommandOptions<typeof options>
|
|
|
44
55
|
constructor();
|
|
45
56
|
patchFiles(p: string): void;
|
|
46
57
|
private reportDiagnostics;
|
|
58
|
+
private formatDiagnostics;
|
|
47
59
|
private readConfigFile;
|
|
60
|
+
private evalDiagnostics;
|
|
61
|
+
private preCheckDiagnostics;
|
|
62
|
+
private checkTsDiagnostics;
|
|
48
63
|
private buildTs;
|
|
49
64
|
private build;
|
|
50
65
|
copyAssets(mode: Modes): void;
|
|
51
|
-
|
|
52
|
-
bundle(mode: Modes, isDev: boolean, isLib: boolean, entryFile?: string, nameOverride?: string, externals?: string[], include?: string[]): Promise<void>;
|
|
66
|
+
bundle(mode: Modes, isDev: boolean, isLib: boolean, entryFile?: string, nameOverride?: string, externalsArg?: string | string[], includeArg?: string | string[]): Promise<void>;
|
|
53
67
|
private buildByEnv;
|
|
54
|
-
buildDev(mode?: BuildMode): Promise<void>;
|
|
55
|
-
buildProd(mode?: BuildMode): Promise<void>;
|
|
68
|
+
buildDev(mode?: BuildMode, includesArg?: string | string[], externalsArg?: string | string[]): Promise<void>;
|
|
69
|
+
buildProd(mode?: BuildMode, includesArg?: string | string[], externalsArg?: string | string[]): Promise<void>;
|
|
56
70
|
buildDocs(): Promise<void>;
|
|
57
71
|
protected run<R>(answers: LoggingConfig & typeof DefaultCommandValues & {
|
|
58
72
|
[k in keyof typeof options]: unknown;
|
|
@@ -2,6 +2,9 @@ import { Command } from "../command";
|
|
|
2
2
|
import { CommandOptions } from "../types";
|
|
3
3
|
import { DefaultCommandValues } from "../constants";
|
|
4
4
|
import { LoggingConfig } from "@decaf-ts/logging";
|
|
5
|
+
export declare function parseList(input?: string | string[]): string[];
|
|
6
|
+
export declare function packageToGlobal(name: string): string;
|
|
7
|
+
export declare function getPackageDependencies(): string[];
|
|
5
8
|
declare enum Modes {
|
|
6
9
|
CJS = "commonjs",
|
|
7
10
|
ESM = "es2022"
|
|
@@ -24,6 +27,14 @@ declare const options: {
|
|
|
24
27
|
type: string;
|
|
25
28
|
default: BuildMode;
|
|
26
29
|
};
|
|
30
|
+
includes: {
|
|
31
|
+
type: string;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
externals: {
|
|
35
|
+
type: string;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
27
38
|
docs: {
|
|
28
39
|
type: string;
|
|
29
40
|
default: boolean;
|
|
@@ -44,15 +55,18 @@ export declare class BuildScripts extends Command<CommandOptions<typeof options>
|
|
|
44
55
|
constructor();
|
|
45
56
|
patchFiles(p: string): void;
|
|
46
57
|
private reportDiagnostics;
|
|
58
|
+
private formatDiagnostics;
|
|
47
59
|
private readConfigFile;
|
|
60
|
+
private evalDiagnostics;
|
|
61
|
+
private preCheckDiagnostics;
|
|
62
|
+
private checkTsDiagnostics;
|
|
48
63
|
private buildTs;
|
|
49
64
|
private build;
|
|
50
65
|
copyAssets(mode: Modes): void;
|
|
51
|
-
|
|
52
|
-
bundle(mode: Modes, isDev: boolean, isLib: boolean, entryFile?: string, nameOverride?: string, externals?: string[], include?: string[]): Promise<void>;
|
|
66
|
+
bundle(mode: Modes, isDev: boolean, isLib: boolean, entryFile?: string, nameOverride?: string, externalsArg?: string | string[], includeArg?: string | string[]): Promise<void>;
|
|
53
67
|
private buildByEnv;
|
|
54
|
-
buildDev(mode?: BuildMode): Promise<void>;
|
|
55
|
-
buildProd(mode?: BuildMode): Promise<void>;
|
|
68
|
+
buildDev(mode?: BuildMode, includesArg?: string | string[], externalsArg?: string | string[]): Promise<void>;
|
|
69
|
+
buildProd(mode?: BuildMode, includesArg?: string | string[], externalsArg?: string | string[]): Promise<void>;
|
|
56
70
|
buildDocs(): Promise<void>;
|
|
57
71
|
protected run<R>(answers: LoggingConfig & typeof DefaultCommandValues & {
|
|
58
72
|
[k in keyof typeof options]: unknown;
|