alex-c-line 1.27.1 → 1.28.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/configs/index.cjs +5 -10
- package/dist/configs/index.d.cts +16 -11
- package/dist/configs/index.d.ts +16 -11
- package/dist/configs/index.js +3 -8
- package/dist/configs/internal/index.cjs +18 -2
- package/dist/configs/internal/index.d.cts +20 -12
- package/dist/configs/internal/index.d.ts +20 -12
- package/dist/configs/internal/index.js +17 -2
- package/dist/index.cjs +99 -125
- package/dist/index.js +90 -116
- package/package.json +12 -10
package/dist/configs/index.cjs
CHANGED
|
@@ -29,6 +29,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
require("@alextheman/utility");
|
|
30
30
|
let zod = require("zod");
|
|
31
31
|
zod = __toESM(zod);
|
|
32
|
+
let _alextheman_utility_internal = require("@alextheman/utility/internal");
|
|
32
33
|
|
|
33
34
|
//#region src/configs/helpers/defineCreatePullRequestTemplateConfig.ts
|
|
34
35
|
const createPullRequestTemplateBaseSchema = zod.default.strictObject({ projectName: zod.default.string().optional() });
|
|
@@ -44,18 +45,11 @@ function defineCreatePullRequestTemplateConfig(config) {
|
|
|
44
45
|
return config;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/configs/types/PreCommitConfig.ts
|
|
49
|
-
const PackageManager = {
|
|
50
|
-
NPM: "npm",
|
|
51
|
-
PNPM: "pnpm"
|
|
52
|
-
};
|
|
53
|
-
|
|
54
48
|
//#endregion
|
|
55
49
|
//#region src/configs/helpers/definePreCommitConfig.ts
|
|
56
50
|
const preCommitStepOptionsSchema = zod.default.strictObject({ arguments: zod.default.array(zod.default.string()).optional() });
|
|
57
51
|
const preCommitConfigSchema = zod.default.strictObject({
|
|
58
|
-
packageManager: zod.default.enum(PackageManager).optional(),
|
|
52
|
+
packageManager: zod.default.enum(_alextheman_utility_internal.PackageManager).optional(),
|
|
59
53
|
allowNoStagedChanges: zod.default.boolean().optional(),
|
|
60
54
|
steps: zod.default.array(zod.default.union([
|
|
61
55
|
zod.default.function({
|
|
@@ -64,7 +58,8 @@ const preCommitConfigSchema = zod.default.strictObject({
|
|
|
64
58
|
}),
|
|
65
59
|
zod.default.string(),
|
|
66
60
|
zod.default.tuple([zod.default.string(), preCommitStepOptionsSchema])
|
|
67
|
-
]))
|
|
61
|
+
])),
|
|
62
|
+
updateIndex: zod.default.boolean().optional()
|
|
68
63
|
});
|
|
69
64
|
function definePreCommitConfig(config) {
|
|
70
65
|
return config;
|
|
@@ -105,7 +100,7 @@ const PullRequestTemplateCategory = {
|
|
|
105
100
|
//#endregion
|
|
106
101
|
//#region src/configs/helpers/defineAlexCLinePrivateConfig.ts
|
|
107
102
|
const alexCLinePrivateConfigSchema = zod.default.object({ useLocalPackage: zod.default.strictObject({ localPackages: zod.default.record(zod.default.string(), zod.default.strictObject({
|
|
108
|
-
packageManager: zod.default.enum(PackageManager),
|
|
103
|
+
packageManager: zod.default.enum(_alextheman_utility_internal.PackageManager),
|
|
109
104
|
path: zod.default.string(),
|
|
110
105
|
prepareScript: zod.default.string().optional(),
|
|
111
106
|
dependencyGroup: zod.default.enum(DependencyGroup).optional(),
|
package/dist/configs/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { PackageManager } from "@alextheman/utility/internal";
|
|
2
|
+
import { Options, Result, TemplateExpression } from "execa";
|
|
1
3
|
import { CreateEnumType } from "@alextheman/utility";
|
|
2
|
-
import { Result, TemplateExpression } from "execa";
|
|
3
4
|
|
|
4
5
|
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
5
6
|
interface CreatePullRequestTemplateBaseConfig {
|
|
@@ -22,20 +23,22 @@ interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullReques
|
|
|
22
23
|
}
|
|
23
24
|
type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
|
|
24
25
|
//#endregion
|
|
26
|
+
//#region src/commands/pre-commit/createStepRunner.d.ts
|
|
27
|
+
interface BaseOptions {
|
|
28
|
+
stdio: "inherit";
|
|
29
|
+
reject: false;
|
|
30
|
+
}
|
|
31
|
+
interface StepRunner<ExecaOptions extends Options = BaseOptions> {
|
|
32
|
+
<NewOpts extends Options>(options: NewOpts): StepRunner<ExecaOptions & NewOpts>;
|
|
33
|
+
(command: string, args?: readonly string[]): Promise<Result<ExecaOptions>>;
|
|
34
|
+
(strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result<ExecaOptions>>;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
25
37
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
26
|
-
declare const PackageManager: {
|
|
27
|
-
readonly NPM: "npm";
|
|
28
|
-
readonly PNPM: "pnpm";
|
|
29
|
-
};
|
|
30
|
-
type PackageManager = CreateEnumType<typeof PackageManager>;
|
|
31
38
|
interface PreCommitStepOptions {
|
|
32
39
|
/** Arguments to pass to the given script */
|
|
33
40
|
arguments?: string[];
|
|
34
41
|
}
|
|
35
|
-
interface StepRunner {
|
|
36
|
-
(command: string, args?: readonly string[]): Promise<Result>;
|
|
37
|
-
(strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result>;
|
|
38
|
-
}
|
|
39
42
|
type StepFunction = (stepRunner: StepRunner) => void | Promise<void>;
|
|
40
43
|
interface PreCommitConfig<ScriptName extends string = string> {
|
|
41
44
|
/** The name of the package manager being used (can choose from `npm` or `pnpm`). If not provided, can be inferred from the packageManager field in package.json. */
|
|
@@ -44,6 +47,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
44
47
|
allowNoStagedChanges?: boolean;
|
|
45
48
|
/** The steps to run in the pre-commit hook. */
|
|
46
49
|
steps: (StepFunction | ScriptName | [ScriptName, PreCommitStepOptions])[];
|
|
50
|
+
/** Update the git index after the run */
|
|
51
|
+
updateIndex?: boolean;
|
|
47
52
|
}
|
|
48
53
|
//#endregion
|
|
49
54
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
@@ -116,4 +121,4 @@ interface PreCommitPrivateConfig<ScriptName extends string = string> {
|
|
|
116
121
|
//#region src/configs/helpers/definePreCommitPrivateConfig.d.ts
|
|
117
122
|
declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig<ScriptName>;
|
|
118
123
|
//#endregion
|
|
119
|
-
export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, DependencyGroup,
|
|
124
|
+
export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, DependencyGroup, PreCommitConfig, PreCommitStepOptions, PullRequestTemplateCategory, StepFunction, defineAlexCLineConfig, defineAlexCLinePrivateConfig, defineCreatePullRequestTemplateConfig, definePreCommitConfig, definePreCommitPrivateConfig };
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CreateEnumType } from "@alextheman/utility";
|
|
2
2
|
import z from "zod";
|
|
3
|
-
import {
|
|
3
|
+
import { PackageManager } from "@alextheman/utility/internal";
|
|
4
|
+
import { Options, Result, TemplateExpression } from "execa";
|
|
4
5
|
|
|
5
6
|
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
6
7
|
interface CreatePullRequestTemplateBaseConfig {
|
|
@@ -23,20 +24,22 @@ interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullReques
|
|
|
23
24
|
}
|
|
24
25
|
type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
|
|
25
26
|
//#endregion
|
|
27
|
+
//#region src/commands/pre-commit/createStepRunner.d.ts
|
|
28
|
+
interface BaseOptions {
|
|
29
|
+
stdio: "inherit";
|
|
30
|
+
reject: false;
|
|
31
|
+
}
|
|
32
|
+
interface StepRunner<ExecaOptions extends Options = BaseOptions> {
|
|
33
|
+
<NewOpts extends Options>(options: NewOpts): StepRunner<ExecaOptions & NewOpts>;
|
|
34
|
+
(command: string, args?: readonly string[]): Promise<Result<ExecaOptions>>;
|
|
35
|
+
(strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result<ExecaOptions>>;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
26
38
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
27
|
-
declare const PackageManager: {
|
|
28
|
-
readonly NPM: "npm";
|
|
29
|
-
readonly PNPM: "pnpm";
|
|
30
|
-
};
|
|
31
|
-
type PackageManager = CreateEnumType<typeof PackageManager>;
|
|
32
39
|
interface PreCommitStepOptions {
|
|
33
40
|
/** Arguments to pass to the given script */
|
|
34
41
|
arguments?: string[];
|
|
35
42
|
}
|
|
36
|
-
interface StepRunner {
|
|
37
|
-
(command: string, args?: readonly string[]): Promise<Result>;
|
|
38
|
-
(strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result>;
|
|
39
|
-
}
|
|
40
43
|
type StepFunction = (stepRunner: StepRunner) => void | Promise<void>;
|
|
41
44
|
interface PreCommitConfig<ScriptName extends string = string> {
|
|
42
45
|
/** The name of the package manager being used (can choose from `npm` or `pnpm`). If not provided, can be inferred from the packageManager field in package.json. */
|
|
@@ -45,6 +48,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
45
48
|
allowNoStagedChanges?: boolean;
|
|
46
49
|
/** The steps to run in the pre-commit hook. */
|
|
47
50
|
steps: (StepFunction | ScriptName | [ScriptName, PreCommitStepOptions])[];
|
|
51
|
+
/** Update the git index after the run */
|
|
52
|
+
updateIndex?: boolean;
|
|
48
53
|
}
|
|
49
54
|
//#endregion
|
|
50
55
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
@@ -117,4 +122,4 @@ interface PreCommitPrivateConfig<ScriptName extends string = string> {
|
|
|
117
122
|
//#region src/configs/helpers/definePreCommitPrivateConfig.d.ts
|
|
118
123
|
declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig<ScriptName>;
|
|
119
124
|
//#endregion
|
|
120
|
-
export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, DependencyGroup,
|
|
125
|
+
export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, DependencyGroup, PreCommitConfig, PreCommitStepOptions, PullRequestTemplateCategory, StepFunction, defineAlexCLineConfig, defineAlexCLinePrivateConfig, defineCreatePullRequestTemplateConfig, definePreCommitConfig, definePreCommitPrivateConfig };
|
package/dist/configs/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "@alextheman/utility";
|
|
2
2
|
import z from "zod";
|
|
3
|
+
import { PackageManager } from "@alextheman/utility/internal";
|
|
3
4
|
|
|
4
5
|
//#region src/configs/helpers/defineCreatePullRequestTemplateConfig.ts
|
|
5
6
|
const createPullRequestTemplateBaseSchema = z.strictObject({ projectName: z.string().optional() });
|
|
@@ -15,13 +16,6 @@ function defineCreatePullRequestTemplateConfig(config) {
|
|
|
15
16
|
return config;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/configs/types/PreCommitConfig.ts
|
|
20
|
-
const PackageManager = {
|
|
21
|
-
NPM: "npm",
|
|
22
|
-
PNPM: "pnpm"
|
|
23
|
-
};
|
|
24
|
-
|
|
25
19
|
//#endregion
|
|
26
20
|
//#region src/configs/helpers/definePreCommitConfig.ts
|
|
27
21
|
const preCommitStepOptionsSchema = z.strictObject({ arguments: z.array(z.string()).optional() });
|
|
@@ -35,7 +29,8 @@ const preCommitConfigSchema = z.strictObject({
|
|
|
35
29
|
}),
|
|
36
30
|
z.string(),
|
|
37
31
|
z.tuple([z.string(), preCommitStepOptionsSchema])
|
|
38
|
-
]))
|
|
32
|
+
])),
|
|
33
|
+
updateIndex: z.boolean().optional()
|
|
39
34
|
});
|
|
40
35
|
function definePreCommitConfig(config) {
|
|
41
36
|
return config;
|
|
@@ -12,7 +12,8 @@ const alexCLineConfig = {
|
|
|
12
12
|
"format",
|
|
13
13
|
"lint",
|
|
14
14
|
"test"
|
|
15
|
-
]
|
|
15
|
+
],
|
|
16
|
+
updateIndex: true
|
|
16
17
|
}
|
|
17
18
|
};
|
|
18
19
|
|
|
@@ -56,7 +57,22 @@ function packageConfig(steps = [
|
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/configs/internal/testConfig.ts
|
|
62
|
+
const testConfig = {
|
|
63
|
+
createPullRequestTemplate: {
|
|
64
|
+
category: "general",
|
|
65
|
+
projectType: "package"
|
|
66
|
+
},
|
|
67
|
+
preCommit: {
|
|
68
|
+
packageManager: "pnpm",
|
|
69
|
+
steps: ["artwork"],
|
|
70
|
+
updateIndex: false
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
59
74
|
//#endregion
|
|
60
75
|
exports.alexCLineConfig = alexCLineConfig;
|
|
61
76
|
exports.infrastructureConfig = infrastructureConfig;
|
|
62
|
-
exports.packageConfig = packageConfig;
|
|
77
|
+
exports.packageConfig = packageConfig;
|
|
78
|
+
exports.testConfig = testConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Result, TemplateExpression } from "execa";
|
|
1
|
+
import { PackageManager } from "@alextheman/utility/internal";
|
|
2
|
+
import { Options, Result, TemplateExpression } from "execa";
|
|
3
3
|
|
|
4
4
|
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
5
5
|
interface CreatePullRequestTemplateBaseConfig {
|
|
@@ -22,20 +22,22 @@ interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullReques
|
|
|
22
22
|
}
|
|
23
23
|
type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
|
|
24
24
|
//#endregion
|
|
25
|
+
//#region src/commands/pre-commit/createStepRunner.d.ts
|
|
26
|
+
interface BaseOptions {
|
|
27
|
+
stdio: "inherit";
|
|
28
|
+
reject: false;
|
|
29
|
+
}
|
|
30
|
+
interface StepRunner<ExecaOptions extends Options = BaseOptions> {
|
|
31
|
+
<NewOpts extends Options>(options: NewOpts): StepRunner<ExecaOptions & NewOpts>;
|
|
32
|
+
(command: string, args?: readonly string[]): Promise<Result<ExecaOptions>>;
|
|
33
|
+
(strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result<ExecaOptions>>;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
25
36
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
26
|
-
declare const PackageManager: {
|
|
27
|
-
readonly NPM: "npm";
|
|
28
|
-
readonly PNPM: "pnpm";
|
|
29
|
-
};
|
|
30
|
-
type PackageManager = CreateEnumType<typeof PackageManager>;
|
|
31
37
|
interface PreCommitStepOptions {
|
|
32
38
|
/** Arguments to pass to the given script */
|
|
33
39
|
arguments?: string[];
|
|
34
40
|
}
|
|
35
|
-
interface StepRunner {
|
|
36
|
-
(command: string, args?: readonly string[]): Promise<Result>;
|
|
37
|
-
(strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result>;
|
|
38
|
-
}
|
|
39
41
|
type StepFunction = (stepRunner: StepRunner) => void | Promise<void>;
|
|
40
42
|
interface PreCommitConfig<ScriptName extends string = string> {
|
|
41
43
|
/** The name of the package manager being used (can choose from `npm` or `pnpm`). If not provided, can be inferred from the packageManager field in package.json. */
|
|
@@ -44,6 +46,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
44
46
|
allowNoStagedChanges?: boolean;
|
|
45
47
|
/** The steps to run in the pre-commit hook. */
|
|
46
48
|
steps: (StepFunction | ScriptName | [ScriptName, PreCommitStepOptions])[];
|
|
49
|
+
/** Update the git index after the run */
|
|
50
|
+
updateIndex?: boolean;
|
|
47
51
|
}
|
|
48
52
|
//#endregion
|
|
49
53
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
@@ -78,6 +82,7 @@ declare let scripts: {
|
|
|
78
82
|
"prepare-local-eslint-plugin": string;
|
|
79
83
|
"prepare-local-utility": string;
|
|
80
84
|
test: string;
|
|
85
|
+
"test-end-to-end": string;
|
|
81
86
|
"test-watch": string;
|
|
82
87
|
"update-dependencies": string;
|
|
83
88
|
"use-live-eslint-plugin": string;
|
|
@@ -104,4 +109,7 @@ type PreCommitStep = "build" | "format" | "lint" | "test";
|
|
|
104
109
|
//#region src/configs/internal/packageConfig.d.ts
|
|
105
110
|
declare function packageConfig<ScriptName extends string = PreCommitStep>(steps?: (StepFunction | ScriptName | PreCommitStep | [ScriptName | PreCommitStep, PreCommitStepOptions])[]): AlexCLineConfig<PreCommitStep>;
|
|
106
111
|
//#endregion
|
|
107
|
-
|
|
112
|
+
//#region src/configs/internal/testConfig.d.ts
|
|
113
|
+
declare const testConfig: AlexCLineConfig<"artwork">;
|
|
114
|
+
//#endregion
|
|
115
|
+
export { alexCLineConfig, infrastructureConfig, packageConfig, testConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Result, TemplateExpression } from "execa";
|
|
1
|
+
import { PackageManager } from "@alextheman/utility/internal";
|
|
2
|
+
import { Options, Result, TemplateExpression } from "execa";
|
|
3
3
|
|
|
4
4
|
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
5
5
|
interface CreatePullRequestTemplateBaseConfig {
|
|
@@ -22,20 +22,22 @@ interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullReques
|
|
|
22
22
|
}
|
|
23
23
|
type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
|
|
24
24
|
//#endregion
|
|
25
|
+
//#region src/commands/pre-commit/createStepRunner.d.ts
|
|
26
|
+
interface BaseOptions {
|
|
27
|
+
stdio: "inherit";
|
|
28
|
+
reject: false;
|
|
29
|
+
}
|
|
30
|
+
interface StepRunner<ExecaOptions extends Options = BaseOptions> {
|
|
31
|
+
<NewOpts extends Options>(options: NewOpts): StepRunner<ExecaOptions & NewOpts>;
|
|
32
|
+
(command: string, args?: readonly string[]): Promise<Result<ExecaOptions>>;
|
|
33
|
+
(strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result<ExecaOptions>>;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
25
36
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
26
|
-
declare const PackageManager: {
|
|
27
|
-
readonly NPM: "npm";
|
|
28
|
-
readonly PNPM: "pnpm";
|
|
29
|
-
};
|
|
30
|
-
type PackageManager = CreateEnumType<typeof PackageManager>;
|
|
31
37
|
interface PreCommitStepOptions {
|
|
32
38
|
/** Arguments to pass to the given script */
|
|
33
39
|
arguments?: string[];
|
|
34
40
|
}
|
|
35
|
-
interface StepRunner {
|
|
36
|
-
(command: string, args?: readonly string[]): Promise<Result>;
|
|
37
|
-
(strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result>;
|
|
38
|
-
}
|
|
39
41
|
type StepFunction = (stepRunner: StepRunner) => void | Promise<void>;
|
|
40
42
|
interface PreCommitConfig<ScriptName extends string = string> {
|
|
41
43
|
/** The name of the package manager being used (can choose from `npm` or `pnpm`). If not provided, can be inferred from the packageManager field in package.json. */
|
|
@@ -44,6 +46,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
44
46
|
allowNoStagedChanges?: boolean;
|
|
45
47
|
/** The steps to run in the pre-commit hook. */
|
|
46
48
|
steps: (StepFunction | ScriptName | [ScriptName, PreCommitStepOptions])[];
|
|
49
|
+
/** Update the git index after the run */
|
|
50
|
+
updateIndex?: boolean;
|
|
47
51
|
}
|
|
48
52
|
//#endregion
|
|
49
53
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
@@ -78,6 +82,7 @@ declare let scripts: {
|
|
|
78
82
|
"prepare-local-eslint-plugin": string;
|
|
79
83
|
"prepare-local-utility": string;
|
|
80
84
|
test: string;
|
|
85
|
+
"test-end-to-end": string;
|
|
81
86
|
"test-watch": string;
|
|
82
87
|
"update-dependencies": string;
|
|
83
88
|
"use-live-eslint-plugin": string;
|
|
@@ -104,4 +109,7 @@ type PreCommitStep = "build" | "format" | "lint" | "test";
|
|
|
104
109
|
//#region src/configs/internal/packageConfig.d.ts
|
|
105
110
|
declare function packageConfig<ScriptName extends string = PreCommitStep>(steps?: (StepFunction | ScriptName | PreCommitStep | [ScriptName | PreCommitStep, PreCommitStepOptions])[]): AlexCLineConfig<PreCommitStep>;
|
|
106
111
|
//#endregion
|
|
107
|
-
|
|
112
|
+
//#region src/configs/internal/testConfig.d.ts
|
|
113
|
+
declare const testConfig: AlexCLineConfig<"artwork">;
|
|
114
|
+
//#endregion
|
|
115
|
+
export { alexCLineConfig, infrastructureConfig, packageConfig, testConfig };
|
|
@@ -10,7 +10,8 @@ const alexCLineConfig = {
|
|
|
10
10
|
"format",
|
|
11
11
|
"lint",
|
|
12
12
|
"test"
|
|
13
|
-
]
|
|
13
|
+
],
|
|
14
|
+
updateIndex: true
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
17
|
|
|
@@ -55,4 +56,18 @@ function packageConfig(steps = [
|
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
//#endregion
|
|
58
|
-
|
|
59
|
+
//#region src/configs/internal/testConfig.ts
|
|
60
|
+
const testConfig = {
|
|
61
|
+
createPullRequestTemplate: {
|
|
62
|
+
category: "general",
|
|
63
|
+
projectType: "package"
|
|
64
|
+
},
|
|
65
|
+
preCommit: {
|
|
66
|
+
packageManager: "pnpm",
|
|
67
|
+
steps: ["artwork"],
|
|
68
|
+
updateIndex: false
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
export { alexCLineConfig, infrastructureConfig, packageConfig, testConfig };
|