alex-c-line 1.33.4 → 2.0.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/README.md CHANGED
@@ -104,3 +104,9 @@ Private configs can be treated in the same way, except the type would be `AlexCL
104
104
  ## Documentation
105
105
 
106
106
  A full documentation site is coming soon. In the meantime, you may run `alex-c-line --help` for more information about how to use all commands.
107
+
108
+ ## The Official `alex-c-line` Theme Song
109
+
110
+ Here's the official lyric video for the `alex-c-line` theme song:
111
+
112
+ [![Watch on YouTube](https://img.youtube.com/vi/GNCaywHm88s/maxresdefault.jpg)](https://www.youtube.com/watch?v=GNCaywHm88s)
@@ -31,22 +31,7 @@ let zod = require("zod");
31
31
  zod = __toESM(zod);
32
32
  let _alextheman_utility_internal = require("@alextheman/utility/internal");
33
33
 
34
- //#region src/configs/helpers/defineCreatePullRequestTemplateConfig.ts
35
- const createPullRequestTemplateBaseSchema = zod.default.strictObject({ projectName: zod.default.string().optional() });
36
- const createPullRequestTemplateSchema = zod.default.discriminatedUnion("category", [createPullRequestTemplateBaseSchema.extend({
37
- category: zod.default.literal("general"),
38
- projectType: zod.default.string()
39
- }), createPullRequestTemplateBaseSchema.extend({
40
- category: zod.default.literal("infrastructure"),
41
- infrastructureProvider: zod.default.string(),
42
- requireConfirmationFrom: zod.default.string()
43
- })]);
44
- function defineCreatePullRequestTemplateConfig(config) {
45
- return config;
46
- }
47
-
48
- //#endregion
49
- //#region src/configs/helpers/definePreCommitConfig.ts
34
+ //#region src/configs/helpers/preCommit/definePreCommitConfig.ts
50
35
  const preCommitStepOptionsSchema = zod.default.strictObject({ arguments: zod.default.array(zod.default.string()).optional() });
51
36
  const preCommitConfigSchema = zod.default.strictObject({
52
37
  packageManager: zod.default.enum(_alextheman_utility_internal.PackageManager).optional(),
@@ -65,11 +50,26 @@ function definePreCommitConfig(config) {
65
50
  return config;
66
51
  }
67
52
 
53
+ //#endregion
54
+ //#region src/configs/helpers/template/pullRequest/defineTemplatePullRequestSchema.ts
55
+ const templatePullRequestBaseSchema = zod.default.strictObject({ projectName: zod.default.string().optional() });
56
+ const templatePullRequestSchema = zod.default.discriminatedUnion("category", [templatePullRequestBaseSchema.extend({
57
+ category: zod.default.literal("general"),
58
+ projectType: zod.default.string()
59
+ }), templatePullRequestBaseSchema.extend({
60
+ category: zod.default.literal("infrastructure"),
61
+ infrastructureProvider: zod.default.string(),
62
+ requireConfirmationFrom: zod.default.string()
63
+ })]);
64
+ function defineCreatePullRequestTemplateConfig(config) {
65
+ return config;
66
+ }
67
+
68
68
  //#endregion
69
69
  //#region src/configs/helpers/defineAlexCLineConfig.ts
70
70
  const alexCLineConfigSchema = zod.default.strictObject({
71
71
  preCommit: preCommitConfigSchema,
72
- createPullRequestTemplate: createPullRequestTemplateSchema
72
+ template: zod.default.object({ pullRequest: templatePullRequestSchema })
73
73
  }).partial();
74
74
  function defineAlexCLineConfig(config) {
75
75
  return config;
@@ -84,14 +84,7 @@ const ConfigFileName = {
84
84
  };
85
85
 
86
86
  //#endregion
87
- //#region src/configs/types/DependencyGroup.ts
88
- const DependencyGroup = {
89
- DEPENDENCIES: "dependencies",
90
- DEV_DEPENDENCIES: "devDependencies"
91
- };
92
-
93
- //#endregion
94
- //#region src/configs/types/PullRequestTemplateCategory.ts
87
+ //#region src/configs/types/template/pullRequest/PullRequestTemplateCategory.ts
95
88
  const PullRequestTemplateCategory = {
96
89
  GENERAL: "general",
97
90
  INFRASTRUCTURE: "infrastructure"
@@ -99,13 +92,13 @@ const PullRequestTemplateCategory = {
99
92
 
100
93
  //#endregion
101
94
  //#region src/configs/helpers/defineAlexCLinePrivateConfig.ts
102
- const alexCLinePrivateConfigSchema = zod.default.object({ useLocalPackage: zod.default.strictObject({
95
+ const alexCLinePrivateConfigSchema = zod.default.object({ localPackage: zod.default.strictObject({
103
96
  enableCache: zod.default.boolean().optional(),
104
97
  localPackages: zod.default.record(zod.default.string(), zod.default.strictObject({
105
98
  packageManager: zod.default.enum(_alextheman_utility_internal.PackageManager),
106
99
  path: zod.default.string(),
107
100
  prepareScript: zod.default.string().optional(),
108
- dependencyGroup: zod.default.enum(DependencyGroup).optional(),
101
+ dependencyGroup: zod.default.enum(_alextheman_utility_internal.DependencyGroup).optional(),
109
102
  keepOldTarballs: zod.default.boolean().optional()
110
103
  }))
111
104
  }) });
@@ -114,7 +107,7 @@ function defineAlexCLinePrivateConfig(config) {
114
107
  }
115
108
 
116
109
  //#endregion
117
- //#region src/configs/helpers/definePreCommitPrivateConfig.ts
110
+ //#region src/configs/helpers/preCommit/definePreCommitPrivateConfig.ts
118
111
  const preCommitPrivateConfigSchema = zod.default.strictObject({ disableSteps: zod.default.array(zod.default.string()).optional() });
119
112
  function definePreCommitPrivateConfig(config) {
120
113
  return config;
@@ -122,7 +115,12 @@ function definePreCommitPrivateConfig(config) {
122
115
 
123
116
  //#endregion
124
117
  exports.ConfigFileName = ConfigFileName;
125
- exports.DependencyGroup = DependencyGroup;
118
+ Object.defineProperty(exports, 'DependencyGroup', {
119
+ enumerable: true,
120
+ get: function () {
121
+ return _alextheman_utility_internal.DependencyGroup;
122
+ }
123
+ });
126
124
  exports.PullRequestTemplateCategory = PullRequestTemplateCategory;
127
125
  exports.defineAlexCLineConfig = defineAlexCLineConfig;
128
126
  exports.defineAlexCLinePrivateConfig = defineAlexCLinePrivateConfig;
@@ -1,29 +1,8 @@
1
- import { PackageManager } from "@alextheman/utility/internal";
1
+ import { DependencyGroup, DependencyGroup as DependencyGroup$1, PackageManager } from "@alextheman/utility/internal";
2
2
  import { Options, Result, TemplateExpression } from "execa";
3
3
  import { CreateEnumType } from "@alextheman/utility";
4
4
 
5
- //#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
6
- interface CreatePullRequestTemplateBaseConfig {
7
- /** The name of the project. */
8
- projectName?: string;
9
- }
10
- interface CreatePullRequestTemplateGeneralConfig extends CreatePullRequestTemplateBaseConfig {
11
- /** The category of pull requests to get. */
12
- category: "general";
13
- /** The type of the project (this is what will be used as the noun in the pull request templates themselves). */
14
- projectType: string;
15
- }
16
- interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullRequestTemplateBaseConfig {
17
- /** The category of pull requests to get. */
18
- category: "infrastructure";
19
- /** The provider of the infrastructure */
20
- infrastructureProvider: string;
21
- /** Who to get confirmation from in the case of a manual change needed. */
22
- requireConfirmationFrom: string;
23
- }
24
- type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
25
- //#endregion
26
- //#region src/cli/commands/pre-commit/createStepRunner.d.ts
5
+ //#region src/cli/commands/root/pre-commit/createStepRunner.d.ts
27
6
  interface BaseOptions {
28
7
  stdio: "inherit";
29
8
  reject: false;
@@ -34,7 +13,7 @@ interface StepRunner<ExecaOptions extends Options = BaseOptions> {
34
13
  (strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result<ExecaOptions>>;
35
14
  }
36
15
  //#endregion
37
- //#region src/configs/types/PreCommitConfig.d.ts
16
+ //#region src/configs/types/preCommit/PreCommitConfig.d.ts
38
17
  interface PreCommitStepOptions {
39
18
  /** Arguments to pass to the given script */
40
19
  arguments?: string[];
@@ -51,22 +30,40 @@ interface PreCommitConfig<ScriptName extends string = string> {
51
30
  updateIndex?: boolean;
52
31
  }
53
32
  //#endregion
33
+ //#region src/configs/types/template/pullRequest/TemplatePullRequestConfig.d.ts
34
+ interface TemplatePullRequestBaseConfig {
35
+ /** The name of the project. */
36
+ projectName?: string;
37
+ }
38
+ interface TemplatePullRequestGeneralConfig extends TemplatePullRequestBaseConfig {
39
+ /** The category of pull requests to get. */
40
+ category: "general";
41
+ /** The type of the project (this is what will be used as the noun in the pull request templates themselves). */
42
+ projectType: string;
43
+ }
44
+ interface TemplatePullRequestInfrastructureConfig extends TemplatePullRequestBaseConfig {
45
+ /** The category of pull requests to get. */
46
+ category: "infrastructure";
47
+ /** The provider of the infrastructure */
48
+ infrastructureProvider: string;
49
+ /** Who to get confirmation from in the case of a manual change needed. */
50
+ requireConfirmationFrom: string;
51
+ }
52
+ type TemplatePullRequestConfig = TemplatePullRequestGeneralConfig | TemplatePullRequestInfrastructureConfig;
53
+ //#endregion
54
54
  //#region src/configs/types/AlexCLineConfig.d.ts
55
55
  interface AlexCLineConfig<ScriptName extends string = string> {
56
- createPullRequestTemplate?: CreatePullRequestTemplateConfig;
56
+ /** Configure settings related to the `alex-c-line` templates. */
57
+ template?: {
58
+ /** Configure settings related to the pull request templates. */pullRequest?: TemplatePullRequestConfig;
59
+ };
60
+ /** Configure the behaviour of the pre-commit command. */
57
61
  preCommit?: PreCommitConfig<ScriptName>;
58
62
  }
59
63
  //#endregion
60
64
  //#region src/configs/helpers/defineAlexCLineConfig.d.ts
61
65
  declare function defineAlexCLineConfig<ScriptName extends string = string>(config: AlexCLineConfig<ScriptName>): AlexCLineConfig<ScriptName>;
62
66
  //#endregion
63
- //#region src/configs/types/DependencyGroup.d.ts
64
- declare const DependencyGroup: {
65
- readonly DEPENDENCIES: "dependencies";
66
- readonly DEV_DEPENDENCIES: "devDependencies";
67
- };
68
- type DependencyGroup = CreateEnumType<typeof DependencyGroup>;
69
- //#endregion
70
67
  //#region src/configs/types/AlexCLinePrivateConfig.d.ts
71
68
  interface LocalPackage<ScriptName extends string = string> {
72
69
  /** 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. */
@@ -76,7 +73,7 @@ interface LocalPackage<ScriptName extends string = string> {
76
73
  /** The path to the local package repository. */
77
74
  path: string;
78
75
  /** The dependency group to save the package in (defaults to `dependencies`) */
79
- dependencyGroup?: DependencyGroup;
76
+ dependencyGroup?: DependencyGroup$1;
80
77
  /** Whether to keep old .tgz files before creating new ones (defaults to false) */
81
78
  keepOldTarballs?: boolean;
82
79
  }
@@ -87,12 +84,24 @@ interface UseLocalPackageConfig<ScriptName extends string = string> {
87
84
  localPackages: Record<string, LocalPackage<ScriptName>>;
88
85
  }
89
86
  interface AlexCLinePrivateConfig<ScriptName extends string = string> {
90
- useLocalPackage: UseLocalPackageConfig<ScriptName>;
87
+ localPackage: UseLocalPackageConfig<ScriptName>;
91
88
  }
92
89
  //#endregion
93
90
  //#region src/configs/helpers/defineAlexCLinePrivateConfig.d.ts
94
91
  declare function defineAlexCLinePrivateConfig(config: AlexCLinePrivateConfig): AlexCLinePrivateConfig;
95
92
  //#endregion
93
+ //#region src/configs/helpers/preCommit/definePreCommitConfig.d.ts
94
+ declare function definePreCommitConfig<ScriptName extends string = string>(config: PreCommitConfig<ScriptName>): PreCommitConfig<ScriptName>;
95
+ //#endregion
96
+ //#region src/configs/types/preCommit/PreCommitPrivateConfig.d.ts
97
+ interface PreCommitPrivateConfig<ScriptName extends string = string> {
98
+ /** List of script names to skip */
99
+ disableSteps?: ScriptName[];
100
+ }
101
+ //#endregion
102
+ //#region src/configs/helpers/preCommit/definePreCommitPrivateConfig.d.ts
103
+ declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig<ScriptName>;
104
+ //#endregion
96
105
  //#region src/configs/types/ConfigFileName.d.ts
97
106
  declare const ConfigFileName: {
98
107
  readonly STANDARD_JAVASCRIPT: "alex-c-line.config.js";
@@ -101,26 +110,14 @@ declare const ConfigFileName: {
101
110
  };
102
111
  type ConfigFileName = CreateEnumType<typeof ConfigFileName>;
103
112
  //#endregion
104
- //#region src/configs/types/PullRequestTemplateCategory.d.ts
113
+ //#region src/configs/types/template/pullRequest/PullRequestTemplateCategory.d.ts
105
114
  declare const PullRequestTemplateCategory: {
106
115
  readonly GENERAL: "general";
107
116
  readonly INFRASTRUCTURE: "infrastructure";
108
117
  };
109
118
  type PullRequestTemplateCategory = CreateEnumType<typeof PullRequestTemplateCategory>;
110
119
  //#endregion
111
- //#region src/configs/helpers/defineCreatePullRequestTemplateConfig.d.ts
112
- declare function defineCreatePullRequestTemplateConfig(config: CreatePullRequestTemplateConfig): CreatePullRequestTemplateConfig;
113
- //#endregion
114
- //#region src/configs/helpers/definePreCommitConfig.d.ts
115
- declare function definePreCommitConfig<ScriptName extends string = string>(config: PreCommitConfig<ScriptName>): PreCommitConfig<ScriptName>;
116
- //#endregion
117
- //#region src/configs/types/PreCommitPrivateConfig.d.ts
118
- interface PreCommitPrivateConfig<ScriptName extends string = string> {
119
- /** List of script names to skip */
120
- disableSteps?: ScriptName[];
121
- }
122
- //#endregion
123
- //#region src/configs/helpers/definePreCommitPrivateConfig.d.ts
124
- declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig<ScriptName>;
120
+ //#region src/configs/helpers/template/pullRequest/defineTemplatePullRequestSchema.d.ts
121
+ declare function defineCreatePullRequestTemplateConfig(config: TemplatePullRequestConfig): TemplatePullRequestConfig;
125
122
  //#endregion
126
- export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, DependencyGroup, PreCommitConfig, PreCommitStepOptions, PullRequestTemplateCategory, StepFunction, defineAlexCLineConfig, defineAlexCLinePrivateConfig, defineCreatePullRequestTemplateConfig, definePreCommitConfig, definePreCommitPrivateConfig };
123
+ export { AlexCLineConfig, ConfigFileName, DependencyGroup, PreCommitConfig, PreCommitPrivateConfig, PreCommitStepOptions, PullRequestTemplateCategory, StepFunction, TemplatePullRequestBaseConfig, TemplatePullRequestConfig, TemplatePullRequestGeneralConfig, TemplatePullRequestInfrastructureConfig, defineAlexCLineConfig, defineAlexCLinePrivateConfig, defineCreatePullRequestTemplateConfig, definePreCommitConfig, definePreCommitPrivateConfig };
@@ -1,30 +1,9 @@
1
1
  import { CreateEnumType } from "@alextheman/utility";
2
2
  import z from "zod";
3
- import { PackageManager } from "@alextheman/utility/internal";
3
+ import { DependencyGroup, DependencyGroup as DependencyGroup$1, PackageManager } from "@alextheman/utility/internal";
4
4
  import { Options, Result, TemplateExpression } from "execa";
5
5
 
6
- //#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
7
- interface CreatePullRequestTemplateBaseConfig {
8
- /** The name of the project. */
9
- projectName?: string;
10
- }
11
- interface CreatePullRequestTemplateGeneralConfig extends CreatePullRequestTemplateBaseConfig {
12
- /** The category of pull requests to get. */
13
- category: "general";
14
- /** The type of the project (this is what will be used as the noun in the pull request templates themselves). */
15
- projectType: string;
16
- }
17
- interface CreatePullRequestTemplateInfrastructureConfig extends CreatePullRequestTemplateBaseConfig {
18
- /** The category of pull requests to get. */
19
- category: "infrastructure";
20
- /** The provider of the infrastructure */
21
- infrastructureProvider: string;
22
- /** Who to get confirmation from in the case of a manual change needed. */
23
- requireConfirmationFrom: string;
24
- }
25
- type CreatePullRequestTemplateConfig = CreatePullRequestTemplateGeneralConfig | CreatePullRequestTemplateInfrastructureConfig;
26
- //#endregion
27
- //#region src/cli/commands/pre-commit/createStepRunner.d.ts
6
+ //#region src/cli/commands/root/pre-commit/createStepRunner.d.ts
28
7
  interface BaseOptions {
29
8
  stdio: "inherit";
30
9
  reject: false;
@@ -35,7 +14,7 @@ interface StepRunner<ExecaOptions extends Options = BaseOptions> {
35
14
  (strings: TemplateStringsArray, ...interpolations: TemplateExpression[]): Promise<Result<ExecaOptions>>;
36
15
  }
37
16
  //#endregion
38
- //#region src/configs/types/PreCommitConfig.d.ts
17
+ //#region src/configs/types/preCommit/PreCommitConfig.d.ts
39
18
  interface PreCommitStepOptions {
40
19
  /** Arguments to pass to the given script */
41
20
  arguments?: string[];
@@ -52,22 +31,40 @@ interface PreCommitConfig<ScriptName extends string = string> {
52
31
  updateIndex?: boolean;
53
32
  }
54
33
  //#endregion
34
+ //#region src/configs/types/template/pullRequest/TemplatePullRequestConfig.d.ts
35
+ interface TemplatePullRequestBaseConfig {
36
+ /** The name of the project. */
37
+ projectName?: string;
38
+ }
39
+ interface TemplatePullRequestGeneralConfig extends TemplatePullRequestBaseConfig {
40
+ /** The category of pull requests to get. */
41
+ category: "general";
42
+ /** The type of the project (this is what will be used as the noun in the pull request templates themselves). */
43
+ projectType: string;
44
+ }
45
+ interface TemplatePullRequestInfrastructureConfig extends TemplatePullRequestBaseConfig {
46
+ /** The category of pull requests to get. */
47
+ category: "infrastructure";
48
+ /** The provider of the infrastructure */
49
+ infrastructureProvider: string;
50
+ /** Who to get confirmation from in the case of a manual change needed. */
51
+ requireConfirmationFrom: string;
52
+ }
53
+ type TemplatePullRequestConfig = TemplatePullRequestGeneralConfig | TemplatePullRequestInfrastructureConfig;
54
+ //#endregion
55
55
  //#region src/configs/types/AlexCLineConfig.d.ts
56
56
  interface AlexCLineConfig<ScriptName extends string = string> {
57
- createPullRequestTemplate?: CreatePullRequestTemplateConfig;
57
+ /** Configure settings related to the `alex-c-line` templates. */
58
+ template?: {
59
+ /** Configure settings related to the pull request templates. */pullRequest?: TemplatePullRequestConfig;
60
+ };
61
+ /** Configure the behaviour of the pre-commit command. */
58
62
  preCommit?: PreCommitConfig<ScriptName>;
59
63
  }
60
64
  //#endregion
61
65
  //#region src/configs/helpers/defineAlexCLineConfig.d.ts
62
66
  declare function defineAlexCLineConfig<ScriptName extends string = string>(config: AlexCLineConfig<ScriptName>): AlexCLineConfig<ScriptName>;
63
67
  //#endregion
64
- //#region src/configs/types/DependencyGroup.d.ts
65
- declare const DependencyGroup: {
66
- readonly DEPENDENCIES: "dependencies";
67
- readonly DEV_DEPENDENCIES: "devDependencies";
68
- };
69
- type DependencyGroup = CreateEnumType<typeof DependencyGroup>;
70
- //#endregion
71
68
  //#region src/configs/types/AlexCLinePrivateConfig.d.ts
72
69
  interface LocalPackage<ScriptName extends string = string> {
73
70
  /** 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. */
@@ -77,7 +74,7 @@ interface LocalPackage<ScriptName extends string = string> {
77
74
  /** The path to the local package repository. */
78
75
  path: string;
79
76
  /** The dependency group to save the package in (defaults to `dependencies`) */
80
- dependencyGroup?: DependencyGroup;
77
+ dependencyGroup?: DependencyGroup$1;
81
78
  /** Whether to keep old .tgz files before creating new ones (defaults to false) */
82
79
  keepOldTarballs?: boolean;
83
80
  }
@@ -88,12 +85,24 @@ interface UseLocalPackageConfig<ScriptName extends string = string> {
88
85
  localPackages: Record<string, LocalPackage<ScriptName>>;
89
86
  }
90
87
  interface AlexCLinePrivateConfig<ScriptName extends string = string> {
91
- useLocalPackage: UseLocalPackageConfig<ScriptName>;
88
+ localPackage: UseLocalPackageConfig<ScriptName>;
92
89
  }
93
90
  //#endregion
94
91
  //#region src/configs/helpers/defineAlexCLinePrivateConfig.d.ts
95
92
  declare function defineAlexCLinePrivateConfig(config: AlexCLinePrivateConfig): AlexCLinePrivateConfig;
96
93
  //#endregion
94
+ //#region src/configs/helpers/preCommit/definePreCommitConfig.d.ts
95
+ declare function definePreCommitConfig<ScriptName extends string = string>(config: PreCommitConfig<ScriptName>): PreCommitConfig<ScriptName>;
96
+ //#endregion
97
+ //#region src/configs/types/preCommit/PreCommitPrivateConfig.d.ts
98
+ interface PreCommitPrivateConfig<ScriptName extends string = string> {
99
+ /** List of script names to skip */
100
+ disableSteps?: ScriptName[];
101
+ }
102
+ //#endregion
103
+ //#region src/configs/helpers/preCommit/definePreCommitPrivateConfig.d.ts
104
+ declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig<ScriptName>;
105
+ //#endregion
97
106
  //#region src/configs/types/ConfigFileName.d.ts
98
107
  declare const ConfigFileName: {
99
108
  readonly STANDARD_JAVASCRIPT: "alex-c-line.config.js";
@@ -102,26 +111,14 @@ declare const ConfigFileName: {
102
111
  };
103
112
  type ConfigFileName = CreateEnumType<typeof ConfigFileName>;
104
113
  //#endregion
105
- //#region src/configs/types/PullRequestTemplateCategory.d.ts
114
+ //#region src/configs/types/template/pullRequest/PullRequestTemplateCategory.d.ts
106
115
  declare const PullRequestTemplateCategory: {
107
116
  readonly GENERAL: "general";
108
117
  readonly INFRASTRUCTURE: "infrastructure";
109
118
  };
110
119
  type PullRequestTemplateCategory = CreateEnumType<typeof PullRequestTemplateCategory>;
111
120
  //#endregion
112
- //#region src/configs/helpers/defineCreatePullRequestTemplateConfig.d.ts
113
- declare function defineCreatePullRequestTemplateConfig(config: CreatePullRequestTemplateConfig): CreatePullRequestTemplateConfig;
114
- //#endregion
115
- //#region src/configs/helpers/definePreCommitConfig.d.ts
116
- declare function definePreCommitConfig<ScriptName extends string = string>(config: PreCommitConfig<ScriptName>): PreCommitConfig<ScriptName>;
117
- //#endregion
118
- //#region src/configs/types/PreCommitPrivateConfig.d.ts
119
- interface PreCommitPrivateConfig<ScriptName extends string = string> {
120
- /** List of script names to skip */
121
- disableSteps?: ScriptName[];
122
- }
123
- //#endregion
124
- //#region src/configs/helpers/definePreCommitPrivateConfig.d.ts
125
- declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig<ScriptName>;
121
+ //#region src/configs/helpers/template/pullRequest/defineTemplatePullRequestSchema.d.ts
122
+ declare function defineCreatePullRequestTemplateConfig(config: TemplatePullRequestConfig): TemplatePullRequestConfig;
126
123
  //#endregion
127
- export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, DependencyGroup, PreCommitConfig, PreCommitStepOptions, PullRequestTemplateCategory, StepFunction, defineAlexCLineConfig, defineAlexCLinePrivateConfig, defineCreatePullRequestTemplateConfig, definePreCommitConfig, definePreCommitPrivateConfig };
124
+ export { AlexCLineConfig, ConfigFileName, DependencyGroup, PreCommitConfig, PreCommitPrivateConfig, PreCommitStepOptions, PullRequestTemplateCategory, StepFunction, TemplatePullRequestBaseConfig, TemplatePullRequestConfig, TemplatePullRequestGeneralConfig, TemplatePullRequestInfrastructureConfig, defineAlexCLineConfig, defineAlexCLinePrivateConfig, defineCreatePullRequestTemplateConfig, definePreCommitConfig, definePreCommitPrivateConfig };
@@ -1,23 +1,8 @@
1
1
  import "@alextheman/utility";
2
2
  import z from "zod";
3
- import { PackageManager } from "@alextheman/utility/internal";
3
+ import { DependencyGroup, PackageManager } from "@alextheman/utility/internal";
4
4
 
5
- //#region src/configs/helpers/defineCreatePullRequestTemplateConfig.ts
6
- const createPullRequestTemplateBaseSchema = z.strictObject({ projectName: z.string().optional() });
7
- const createPullRequestTemplateSchema = z.discriminatedUnion("category", [createPullRequestTemplateBaseSchema.extend({
8
- category: z.literal("general"),
9
- projectType: z.string()
10
- }), createPullRequestTemplateBaseSchema.extend({
11
- category: z.literal("infrastructure"),
12
- infrastructureProvider: z.string(),
13
- requireConfirmationFrom: z.string()
14
- })]);
15
- function defineCreatePullRequestTemplateConfig(config) {
16
- return config;
17
- }
18
-
19
- //#endregion
20
- //#region src/configs/helpers/definePreCommitConfig.ts
5
+ //#region src/configs/helpers/preCommit/definePreCommitConfig.ts
21
6
  const preCommitStepOptionsSchema = z.strictObject({ arguments: z.array(z.string()).optional() });
22
7
  const preCommitConfigSchema = z.strictObject({
23
8
  packageManager: z.enum(PackageManager).optional(),
@@ -36,11 +21,26 @@ function definePreCommitConfig(config) {
36
21
  return config;
37
22
  }
38
23
 
24
+ //#endregion
25
+ //#region src/configs/helpers/template/pullRequest/defineTemplatePullRequestSchema.ts
26
+ const templatePullRequestBaseSchema = z.strictObject({ projectName: z.string().optional() });
27
+ const templatePullRequestSchema = z.discriminatedUnion("category", [templatePullRequestBaseSchema.extend({
28
+ category: z.literal("general"),
29
+ projectType: z.string()
30
+ }), templatePullRequestBaseSchema.extend({
31
+ category: z.literal("infrastructure"),
32
+ infrastructureProvider: z.string(),
33
+ requireConfirmationFrom: z.string()
34
+ })]);
35
+ function defineCreatePullRequestTemplateConfig(config) {
36
+ return config;
37
+ }
38
+
39
39
  //#endregion
40
40
  //#region src/configs/helpers/defineAlexCLineConfig.ts
41
41
  const alexCLineConfigSchema = z.strictObject({
42
42
  preCommit: preCommitConfigSchema,
43
- createPullRequestTemplate: createPullRequestTemplateSchema
43
+ template: z.object({ pullRequest: templatePullRequestSchema })
44
44
  }).partial();
45
45
  function defineAlexCLineConfig(config) {
46
46
  return config;
@@ -55,14 +55,7 @@ const ConfigFileName = {
55
55
  };
56
56
 
57
57
  //#endregion
58
- //#region src/configs/types/DependencyGroup.ts
59
- const DependencyGroup = {
60
- DEPENDENCIES: "dependencies",
61
- DEV_DEPENDENCIES: "devDependencies"
62
- };
63
-
64
- //#endregion
65
- //#region src/configs/types/PullRequestTemplateCategory.ts
58
+ //#region src/configs/types/template/pullRequest/PullRequestTemplateCategory.ts
66
59
  const PullRequestTemplateCategory = {
67
60
  GENERAL: "general",
68
61
  INFRASTRUCTURE: "infrastructure"
@@ -70,7 +63,7 @@ const PullRequestTemplateCategory = {
70
63
 
71
64
  //#endregion
72
65
  //#region src/configs/helpers/defineAlexCLinePrivateConfig.ts
73
- const alexCLinePrivateConfigSchema = z.object({ useLocalPackage: z.strictObject({
66
+ const alexCLinePrivateConfigSchema = z.object({ localPackage: z.strictObject({
74
67
  enableCache: z.boolean().optional(),
75
68
  localPackages: z.record(z.string(), z.strictObject({
76
69
  packageManager: z.enum(PackageManager),
@@ -85,7 +78,7 @@ function defineAlexCLinePrivateConfig(config) {
85
78
  }
86
79
 
87
80
  //#endregion
88
- //#region src/configs/helpers/definePreCommitPrivateConfig.ts
81
+ //#region src/configs/helpers/preCommit/definePreCommitPrivateConfig.ts
89
82
  const preCommitPrivateConfigSchema = z.strictObject({ disableSteps: z.array(z.string()).optional() });
90
83
  function definePreCommitPrivateConfig(config) {
91
84
  return config;
@@ -2,10 +2,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  //#region src/configs/internal/alexCLineConfig.ts
4
4
  const alexCLineConfig = {
5
- createPullRequestTemplate: {
6
- category: "general",
7
- projectType: "package"
8
- },
9
5
  preCommit: {
10
6
  packageManager: "pnpm",
11
7
  steps: [
@@ -14,17 +10,16 @@ const alexCLineConfig = {
14
10
  "test"
15
11
  ],
16
12
  updateIndex: true
17
- }
13
+ },
14
+ template: { pullRequest: {
15
+ category: "general",
16
+ projectType: "package"
17
+ } }
18
18
  };
19
19
 
20
20
  //#endregion
21
21
  //#region src/configs/internal/infrastructureConfig.ts
22
22
  const infrastructureConfig = {
23
- createPullRequestTemplate: {
24
- category: "infrastructure",
25
- infrastructureProvider: "Terraform",
26
- requireConfirmationFrom: "AlexMan123456"
27
- },
28
23
  preCommit: {
29
24
  packageManager: "pnpm",
30
25
  steps: [
@@ -34,7 +29,12 @@ const infrastructureConfig = {
34
29
  "format",
35
30
  "lint"
36
31
  ]
37
- }
32
+ },
33
+ template: { pullRequest: {
34
+ category: "infrastructure",
35
+ infrastructureProvider: "Terraform",
36
+ requireConfirmationFrom: "AlexMan123456"
37
+ } }
38
38
  };
39
39
 
40
40
  //#endregion
@@ -46,29 +46,29 @@ function packageConfig(steps = [
46
46
  "test"
47
47
  ]) {
48
48
  return {
49
- createPullRequestTemplate: {
50
- category: "general",
51
- projectType: "package"
52
- },
53
49
  preCommit: {
54
50
  packageManager: "pnpm",
55
51
  steps
56
- }
52
+ },
53
+ template: { pullRequest: {
54
+ category: "general",
55
+ projectType: "package"
56
+ } }
57
57
  };
58
58
  }
59
59
 
60
60
  //#endregion
61
61
  //#region src/configs/internal/testConfig.ts
62
62
  const testConfig = {
63
- createPullRequestTemplate: {
64
- category: "general",
65
- projectType: "package"
66
- },
67
63
  preCommit: {
68
64
  packageManager: "pnpm",
69
65
  steps: ["artwork"],
70
66
  updateIndex: false
71
- }
67
+ },
68
+ template: { pullRequest: {
69
+ category: "general",
70
+ projectType: "package"
71
+ } }
72
72
  };
73
73
 
74
74
  //#endregion