alex-c-line 1.17.2 → 1.18.0
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 +33 -1
- package/dist/configs/index.d.cts +42 -10
- package/dist/configs/index.d.ts +42 -10
- package/dist/configs/index.js +32 -2
- package/dist/configs/internal/index.cjs +14 -8
- package/dist/configs/internal/index.d.cts +23 -1
- package/dist/configs/internal/index.d.ts +23 -1
- package/dist/configs/internal/index.js +14 -8
- package/dist/index.cjs +287 -146
- package/dist/index.js +285 -145
- package/package.json +12 -7
package/dist/configs/index.cjs
CHANGED
|
@@ -29,6 +29,25 @@ let _alextheman_utility = require("@alextheman/utility");
|
|
|
29
29
|
let zod = require("zod");
|
|
30
30
|
zod = __toESM(zod);
|
|
31
31
|
|
|
32
|
+
//#region src/configs/helpers/defineCreatePullRequestTemplateConfig.ts
|
|
33
|
+
const createPullRequestTemplateBaseSchema = zod.default.object({ projectName: zod.default.string().optional() });
|
|
34
|
+
const createPullRequestTemplateSchema = zod.default.discriminatedUnion("category", [createPullRequestTemplateBaseSchema.extend({
|
|
35
|
+
category: zod.default.literal("general"),
|
|
36
|
+
projectType: zod.default.string()
|
|
37
|
+
}), createPullRequestTemplateBaseSchema.extend({
|
|
38
|
+
category: zod.default.literal("infrastructure"),
|
|
39
|
+
infrastructureProvider: zod.default.string(),
|
|
40
|
+
requireConfirmationFrom: zod.default.string()
|
|
41
|
+
})]);
|
|
42
|
+
function parseCreatePullRequestTemplateConfig(input) {
|
|
43
|
+
return (0, _alextheman_utility.parseZodSchema)(createPullRequestTemplateSchema, input, new _alextheman_utility.DataError(input, "INVALID_PRE_COMMIT_CONFIG", "The config provided does not match the expected shape."));
|
|
44
|
+
}
|
|
45
|
+
function defineCreatePullRequestTemplateConfig(config) {
|
|
46
|
+
return parseCreatePullRequestTemplateConfig(config);
|
|
47
|
+
}
|
|
48
|
+
var defineCreatePullRequestTemplateConfig_default = defineCreatePullRequestTemplateConfig;
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
32
51
|
//#region src/configs/types/PreCommitConfig.ts
|
|
33
52
|
const PackageManager = {
|
|
34
53
|
NPM: "npm",
|
|
@@ -50,7 +69,10 @@ var definePreCommitConfig_default = definePreCommitConfig;
|
|
|
50
69
|
|
|
51
70
|
//#endregion
|
|
52
71
|
//#region src/configs/helpers/defineAlexCLineConfig.ts
|
|
53
|
-
const alexCLineConfigSchema = zod.default.object({
|
|
72
|
+
const alexCLineConfigSchema = zod.default.object({
|
|
73
|
+
preCommit: preCommitConfigSchema,
|
|
74
|
+
createPullRequestTemplate: createPullRequestTemplateSchema
|
|
75
|
+
}).partial();
|
|
54
76
|
function defineAlexCLineConfig(config) {
|
|
55
77
|
return (0, _alextheman_utility.parseZodSchema)(alexCLineConfigSchema, config, new _alextheman_utility.DataError(config, "INVALID_ALEX_C_LINE_CONFIG", "The config provided does not match the expected shape."));
|
|
56
78
|
}
|
|
@@ -73,8 +95,18 @@ const ConfigFileName = {
|
|
|
73
95
|
};
|
|
74
96
|
var ConfigFileName_default = ConfigFileName;
|
|
75
97
|
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/configs/types/PullRequestTemplateCategory.ts
|
|
100
|
+
const PullRequestTemplateCategory = {
|
|
101
|
+
GENERAL: "general",
|
|
102
|
+
INFRASTRUCTURE: "infrastructure"
|
|
103
|
+
};
|
|
104
|
+
var PullRequestTemplateCategory_default = PullRequestTemplateCategory;
|
|
105
|
+
|
|
76
106
|
//#endregion
|
|
77
107
|
exports.ConfigFileName = ConfigFileName_default;
|
|
108
|
+
exports.PullRequestTemplateCategory = PullRequestTemplateCategory_default;
|
|
78
109
|
exports.defineAlexCLineConfig = defineAlexCLineConfig_default;
|
|
110
|
+
exports.defineCreatePullRequestTemplateConfig = defineCreatePullRequestTemplateConfig_default;
|
|
79
111
|
exports.definePreCommitConfig = definePreCommitConfig_default;
|
|
80
112
|
exports.definePreCommitPrivateConfig = definePreCommitPrivateConfig_default;
|
package/dist/configs/index.d.cts
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { CreateEnumType } from "@alextheman/utility";
|
|
2
2
|
|
|
3
|
+
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
4
|
+
interface CreatePullRequestTemplateBaseConfig {
|
|
5
|
+
/** The name of the project. */
|
|
6
|
+
projectName?: string;
|
|
7
|
+
}
|
|
8
|
+
interface CreatePullRequestTemplateGeneralConfig extends CreatePullRequestTemplateBaseConfig {
|
|
9
|
+
/** The category of pull requests to get. */
|
|
10
|
+
category: "general";
|
|
11
|
+
/** The type of the project (this is what will be used as the noun in the pull request templates themselves). */
|
|
12
|
+
projectType: string;
|
|
13
|
+
}
|
|
14
|
+
interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullRequestTemplateBaseConfig {
|
|
15
|
+
/** The category of pull requests to get. */
|
|
16
|
+
category: "infrastructure";
|
|
17
|
+
/** The provider of the infrastructure */
|
|
18
|
+
infrastructureProvider: string;
|
|
19
|
+
/** Who to get confirmation from in the case of a manual change needed. */
|
|
20
|
+
requireConfirmationFrom: string;
|
|
21
|
+
}
|
|
22
|
+
type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
|
|
23
|
+
//#endregion
|
|
3
24
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
4
25
|
declare const PackageManager: {
|
|
5
26
|
readonly NPM: "npm";
|
|
@@ -21,12 +42,31 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
21
42
|
//#endregion
|
|
22
43
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
23
44
|
interface AlexCLineConfig<ScriptName extends string = string> {
|
|
24
|
-
|
|
45
|
+
createPullRequestTemplate?: CreatePullRequestTemplateConfig;
|
|
46
|
+
preCommit?: PreCommitConfig<ScriptName>;
|
|
25
47
|
}
|
|
26
48
|
//#endregion
|
|
27
49
|
//#region src/configs/helpers/defineAlexCLineConfig.d.ts
|
|
28
50
|
declare function defineAlexCLineConfig<ScriptName extends string = string>(config: AlexCLineConfig<ScriptName>): AlexCLineConfig;
|
|
29
51
|
//#endregion
|
|
52
|
+
//#region src/configs/types/ConfigFileName.d.ts
|
|
53
|
+
declare const ConfigFileName: {
|
|
54
|
+
readonly STANDARD_JAVASCRIPT: "alex-c-line.config.js";
|
|
55
|
+
readonly ES_MODULES_JAVASCRIPT: "alex-c-line.config.mjs";
|
|
56
|
+
readonly COMMON_JS_JAVASCRIPT: "alex-c-line.config.cjs";
|
|
57
|
+
};
|
|
58
|
+
type ConfigFileName = CreateEnumType<typeof ConfigFileName>;
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/configs/types/PullRequestTemplateCategory.d.ts
|
|
61
|
+
declare const PullRequestTemplateCategory: {
|
|
62
|
+
readonly GENERAL: "general";
|
|
63
|
+
readonly INFRASTRUCTURE: "infrastructure";
|
|
64
|
+
};
|
|
65
|
+
type PullRequestTemplateCategory = CreateEnumType<typeof PullRequestTemplateCategory>;
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/configs/helpers/defineCreatePullRequestTemplateConfig.d.ts
|
|
68
|
+
declare function defineCreatePullRequestTemplateConfig(config: CreatePullRequestTemplateConfig): CreatePullRequestTemplateConfig;
|
|
69
|
+
//#endregion
|
|
30
70
|
//#region src/configs/helpers/definePreCommitConfig.d.ts
|
|
31
71
|
declare function definePreCommitConfig<ScriptName extends string = string>(config: PreCommitConfig<ScriptName>): PreCommitConfig;
|
|
32
72
|
//#endregion
|
|
@@ -39,12 +79,4 @@ interface PreCommitPrivateConfig<ScriptName extends string = string> {
|
|
|
39
79
|
//#region src/configs/helpers/definePreCommitPrivateConfig.d.ts
|
|
40
80
|
declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig;
|
|
41
81
|
//#endregion
|
|
42
|
-
|
|
43
|
-
declare const ConfigFileName: {
|
|
44
|
-
readonly STANDARD_JAVASCRIPT: "alex-c-line.config.js";
|
|
45
|
-
readonly ES_MODULES_JAVASCRIPT: "alex-c-line.config.mjs";
|
|
46
|
-
readonly COMMON_JS_JAVASCRIPT: "alex-c-line.config.cjs";
|
|
47
|
-
};
|
|
48
|
-
type ConfigFileName = CreateEnumType<typeof ConfigFileName>;
|
|
49
|
-
//#endregion
|
|
50
|
-
export { AlexCLineConfig, ConfigFileName, PackageManager, PreCommitConfig, PreCommitStepOptions, defineAlexCLineConfig, definePreCommitConfig, definePreCommitPrivateConfig };
|
|
82
|
+
export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, PackageManager, PreCommitConfig, PreCommitStepOptions, PullRequestTemplateCategory, defineAlexCLineConfig, defineCreatePullRequestTemplateConfig, definePreCommitConfig, definePreCommitPrivateConfig };
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { CreateEnumType } from "@alextheman/utility";
|
|
2
2
|
import z from "zod";
|
|
3
3
|
|
|
4
|
+
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
5
|
+
interface CreatePullRequestTemplateBaseConfig {
|
|
6
|
+
/** The name of the project. */
|
|
7
|
+
projectName?: string;
|
|
8
|
+
}
|
|
9
|
+
interface CreatePullRequestTemplateGeneralConfig extends CreatePullRequestTemplateBaseConfig {
|
|
10
|
+
/** The category of pull requests to get. */
|
|
11
|
+
category: "general";
|
|
12
|
+
/** The type of the project (this is what will be used as the noun in the pull request templates themselves). */
|
|
13
|
+
projectType: string;
|
|
14
|
+
}
|
|
15
|
+
interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullRequestTemplateBaseConfig {
|
|
16
|
+
/** The category of pull requests to get. */
|
|
17
|
+
category: "infrastructure";
|
|
18
|
+
/** The provider of the infrastructure */
|
|
19
|
+
infrastructureProvider: string;
|
|
20
|
+
/** Who to get confirmation from in the case of a manual change needed. */
|
|
21
|
+
requireConfirmationFrom: string;
|
|
22
|
+
}
|
|
23
|
+
type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
|
|
24
|
+
//#endregion
|
|
4
25
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
5
26
|
declare const PackageManager: {
|
|
6
27
|
readonly NPM: "npm";
|
|
@@ -22,12 +43,31 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
22
43
|
//#endregion
|
|
23
44
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
24
45
|
interface AlexCLineConfig<ScriptName extends string = string> {
|
|
25
|
-
|
|
46
|
+
createPullRequestTemplate?: CreatePullRequestTemplateConfig;
|
|
47
|
+
preCommit?: PreCommitConfig<ScriptName>;
|
|
26
48
|
}
|
|
27
49
|
//#endregion
|
|
28
50
|
//#region src/configs/helpers/defineAlexCLineConfig.d.ts
|
|
29
51
|
declare function defineAlexCLineConfig<ScriptName extends string = string>(config: AlexCLineConfig<ScriptName>): AlexCLineConfig;
|
|
30
52
|
//#endregion
|
|
53
|
+
//#region src/configs/types/ConfigFileName.d.ts
|
|
54
|
+
declare const ConfigFileName: {
|
|
55
|
+
readonly STANDARD_JAVASCRIPT: "alex-c-line.config.js";
|
|
56
|
+
readonly ES_MODULES_JAVASCRIPT: "alex-c-line.config.mjs";
|
|
57
|
+
readonly COMMON_JS_JAVASCRIPT: "alex-c-line.config.cjs";
|
|
58
|
+
};
|
|
59
|
+
type ConfigFileName = CreateEnumType<typeof ConfigFileName>;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/configs/types/PullRequestTemplateCategory.d.ts
|
|
62
|
+
declare const PullRequestTemplateCategory: {
|
|
63
|
+
readonly GENERAL: "general";
|
|
64
|
+
readonly INFRASTRUCTURE: "infrastructure";
|
|
65
|
+
};
|
|
66
|
+
type PullRequestTemplateCategory = CreateEnumType<typeof PullRequestTemplateCategory>;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/configs/helpers/defineCreatePullRequestTemplateConfig.d.ts
|
|
69
|
+
declare function defineCreatePullRequestTemplateConfig(config: CreatePullRequestTemplateConfig): CreatePullRequestTemplateConfig;
|
|
70
|
+
//#endregion
|
|
31
71
|
//#region src/configs/helpers/definePreCommitConfig.d.ts
|
|
32
72
|
declare function definePreCommitConfig<ScriptName extends string = string>(config: PreCommitConfig<ScriptName>): PreCommitConfig;
|
|
33
73
|
//#endregion
|
|
@@ -40,12 +80,4 @@ interface PreCommitPrivateConfig<ScriptName extends string = string> {
|
|
|
40
80
|
//#region src/configs/helpers/definePreCommitPrivateConfig.d.ts
|
|
41
81
|
declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig;
|
|
42
82
|
//#endregion
|
|
43
|
-
|
|
44
|
-
declare const ConfigFileName: {
|
|
45
|
-
readonly STANDARD_JAVASCRIPT: "alex-c-line.config.js";
|
|
46
|
-
readonly ES_MODULES_JAVASCRIPT: "alex-c-line.config.mjs";
|
|
47
|
-
readonly COMMON_JS_JAVASCRIPT: "alex-c-line.config.cjs";
|
|
48
|
-
};
|
|
49
|
-
type ConfigFileName = CreateEnumType<typeof ConfigFileName>;
|
|
50
|
-
//#endregion
|
|
51
|
-
export { AlexCLineConfig, ConfigFileName, PackageManager, PreCommitConfig, PreCommitStepOptions, defineAlexCLineConfig, definePreCommitConfig, definePreCommitPrivateConfig };
|
|
83
|
+
export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, PackageManager, PreCommitConfig, PreCommitStepOptions, PullRequestTemplateCategory, defineAlexCLineConfig, defineCreatePullRequestTemplateConfig, definePreCommitConfig, definePreCommitPrivateConfig };
|
package/dist/configs/index.js
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import { DataError, parseZodSchema } from "@alextheman/utility";
|
|
2
2
|
import z from "zod";
|
|
3
3
|
|
|
4
|
+
//#region src/configs/helpers/defineCreatePullRequestTemplateConfig.ts
|
|
5
|
+
const createPullRequestTemplateBaseSchema = z.object({ projectName: z.string().optional() });
|
|
6
|
+
const createPullRequestTemplateSchema = z.discriminatedUnion("category", [createPullRequestTemplateBaseSchema.extend({
|
|
7
|
+
category: z.literal("general"),
|
|
8
|
+
projectType: z.string()
|
|
9
|
+
}), createPullRequestTemplateBaseSchema.extend({
|
|
10
|
+
category: z.literal("infrastructure"),
|
|
11
|
+
infrastructureProvider: z.string(),
|
|
12
|
+
requireConfirmationFrom: z.string()
|
|
13
|
+
})]);
|
|
14
|
+
function parseCreatePullRequestTemplateConfig(input) {
|
|
15
|
+
return parseZodSchema(createPullRequestTemplateSchema, input, new DataError(input, "INVALID_PRE_COMMIT_CONFIG", "The config provided does not match the expected shape."));
|
|
16
|
+
}
|
|
17
|
+
function defineCreatePullRequestTemplateConfig(config) {
|
|
18
|
+
return parseCreatePullRequestTemplateConfig(config);
|
|
19
|
+
}
|
|
20
|
+
var defineCreatePullRequestTemplateConfig_default = defineCreatePullRequestTemplateConfig;
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
4
23
|
//#region src/configs/types/PreCommitConfig.ts
|
|
5
24
|
const PackageManager = {
|
|
6
25
|
NPM: "npm",
|
|
@@ -22,7 +41,10 @@ var definePreCommitConfig_default = definePreCommitConfig;
|
|
|
22
41
|
|
|
23
42
|
//#endregion
|
|
24
43
|
//#region src/configs/helpers/defineAlexCLineConfig.ts
|
|
25
|
-
const alexCLineConfigSchema = z.object({
|
|
44
|
+
const alexCLineConfigSchema = z.object({
|
|
45
|
+
preCommit: preCommitConfigSchema,
|
|
46
|
+
createPullRequestTemplate: createPullRequestTemplateSchema
|
|
47
|
+
}).partial();
|
|
26
48
|
function defineAlexCLineConfig(config) {
|
|
27
49
|
return parseZodSchema(alexCLineConfigSchema, config, new DataError(config, "INVALID_ALEX_C_LINE_CONFIG", "The config provided does not match the expected shape."));
|
|
28
50
|
}
|
|
@@ -46,4 +68,12 @@ const ConfigFileName = {
|
|
|
46
68
|
var ConfigFileName_default = ConfigFileName;
|
|
47
69
|
|
|
48
70
|
//#endregion
|
|
49
|
-
|
|
71
|
+
//#region src/configs/types/PullRequestTemplateCategory.ts
|
|
72
|
+
const PullRequestTemplateCategory = {
|
|
73
|
+
GENERAL: "general",
|
|
74
|
+
INFRASTRUCTURE: "infrastructure"
|
|
75
|
+
};
|
|
76
|
+
var PullRequestTemplateCategory_default = PullRequestTemplateCategory;
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
export { ConfigFileName_default as ConfigFileName, PullRequestTemplateCategory_default as PullRequestTemplateCategory, defineAlexCLineConfig_default as defineAlexCLineConfig, defineCreatePullRequestTemplateConfig_default as defineCreatePullRequestTemplateConfig, definePreCommitConfig_default as definePreCommitConfig, definePreCommitPrivateConfig_default as definePreCommitPrivateConfig };
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/configs/internal/alexCLineConfig.ts
|
|
3
|
-
const alexCLineConfig = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
const alexCLineConfig = {
|
|
4
|
+
preCommit: {
|
|
5
|
+
packageManager: "pnpm",
|
|
6
|
+
steps: [
|
|
7
|
+
"format",
|
|
8
|
+
"lint",
|
|
9
|
+
"test"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
createPullRequestTemplate: {
|
|
13
|
+
category: "general",
|
|
14
|
+
projectType: "package"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
11
17
|
var alexCLineConfig_default = alexCLineConfig;
|
|
12
18
|
|
|
13
19
|
//#endregion
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { CreateEnumType } from "@alextheman/utility";
|
|
2
2
|
|
|
3
|
+
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
4
|
+
interface CreatePullRequestTemplateBaseConfig {
|
|
5
|
+
/** The name of the project. */
|
|
6
|
+
projectName?: string;
|
|
7
|
+
}
|
|
8
|
+
interface CreatePullRequestTemplateGeneralConfig extends CreatePullRequestTemplateBaseConfig {
|
|
9
|
+
/** The category of pull requests to get. */
|
|
10
|
+
category: "general";
|
|
11
|
+
/** The type of the project (this is what will be used as the noun in the pull request templates themselves). */
|
|
12
|
+
projectType: string;
|
|
13
|
+
}
|
|
14
|
+
interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullRequestTemplateBaseConfig {
|
|
15
|
+
/** The category of pull requests to get. */
|
|
16
|
+
category: "infrastructure";
|
|
17
|
+
/** The provider of the infrastructure */
|
|
18
|
+
infrastructureProvider: string;
|
|
19
|
+
/** Who to get confirmation from in the case of a manual change needed. */
|
|
20
|
+
requireConfirmationFrom: string;
|
|
21
|
+
}
|
|
22
|
+
type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
|
|
23
|
+
//#endregion
|
|
3
24
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
4
25
|
declare const PackageManager: {
|
|
5
26
|
readonly NPM: "npm";
|
|
@@ -21,7 +42,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
21
42
|
//#endregion
|
|
22
43
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
23
44
|
interface AlexCLineConfig<ScriptName extends string = string> {
|
|
24
|
-
|
|
45
|
+
createPullRequestTemplate?: CreatePullRequestTemplateConfig;
|
|
46
|
+
preCommit?: PreCommitConfig<ScriptName>;
|
|
25
47
|
}
|
|
26
48
|
//#endregion
|
|
27
49
|
//#region package.d.ts
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { CreateEnumType } from "@alextheman/utility";
|
|
2
2
|
|
|
3
|
+
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
4
|
+
interface CreatePullRequestTemplateBaseConfig {
|
|
5
|
+
/** The name of the project. */
|
|
6
|
+
projectName?: string;
|
|
7
|
+
}
|
|
8
|
+
interface CreatePullRequestTemplateGeneralConfig extends CreatePullRequestTemplateBaseConfig {
|
|
9
|
+
/** The category of pull requests to get. */
|
|
10
|
+
category: "general";
|
|
11
|
+
/** The type of the project (this is what will be used as the noun in the pull request templates themselves). */
|
|
12
|
+
projectType: string;
|
|
13
|
+
}
|
|
14
|
+
interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullRequestTemplateBaseConfig {
|
|
15
|
+
/** The category of pull requests to get. */
|
|
16
|
+
category: "infrastructure";
|
|
17
|
+
/** The provider of the infrastructure */
|
|
18
|
+
infrastructureProvider: string;
|
|
19
|
+
/** Who to get confirmation from in the case of a manual change needed. */
|
|
20
|
+
requireConfirmationFrom: string;
|
|
21
|
+
}
|
|
22
|
+
type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
|
|
23
|
+
//#endregion
|
|
3
24
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
4
25
|
declare const PackageManager: {
|
|
5
26
|
readonly NPM: "npm";
|
|
@@ -21,7 +42,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
21
42
|
//#endregion
|
|
22
43
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
23
44
|
interface AlexCLineConfig<ScriptName extends string = string> {
|
|
24
|
-
|
|
45
|
+
createPullRequestTemplate?: CreatePullRequestTemplateConfig;
|
|
46
|
+
preCommit?: PreCommitConfig<ScriptName>;
|
|
25
47
|
}
|
|
26
48
|
//#endregion
|
|
27
49
|
//#region package.d.ts
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
//#region src/configs/internal/alexCLineConfig.ts
|
|
2
|
-
const alexCLineConfig = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
const alexCLineConfig = {
|
|
3
|
+
preCommit: {
|
|
4
|
+
packageManager: "pnpm",
|
|
5
|
+
steps: [
|
|
6
|
+
"format",
|
|
7
|
+
"lint",
|
|
8
|
+
"test"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
createPullRequestTemplate: {
|
|
12
|
+
category: "general",
|
|
13
|
+
projectType: "package"
|
|
14
|
+
}
|
|
15
|
+
};
|
|
10
16
|
var alexCLineConfig_default = alexCLineConfig;
|
|
11
17
|
|
|
12
18
|
//#endregion
|