alex-c-line 1.28.0 → 1.29.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 +14 -16
- package/dist/configs/index.d.cts +7 -7
- package/dist/configs/index.d.ts +6 -6
- package/dist/configs/index.js +13 -15
- package/dist/configs/internal/index.cjs +18 -2
- package/dist/configs/internal/index.d.cts +8 -7
- package/dist/configs/internal/index.d.ts +8 -7
- package/dist/configs/internal/index.js +17 -2
- package/dist/index.cjs +150 -240
- package/dist/index.js +140 -230
- package/package.json +13 -11
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;
|
|
@@ -104,13 +99,16 @@ const PullRequestTemplateCategory = {
|
|
|
104
99
|
|
|
105
100
|
//#endregion
|
|
106
101
|
//#region src/configs/helpers/defineAlexCLinePrivateConfig.ts
|
|
107
|
-
const alexCLinePrivateConfigSchema = zod.default.object({ useLocalPackage: zod.default.strictObject({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
102
|
+
const alexCLinePrivateConfigSchema = zod.default.object({ useLocalPackage: zod.default.strictObject({
|
|
103
|
+
enableCache: zod.default.boolean().optional(),
|
|
104
|
+
localPackages: zod.default.record(zod.default.string(), zod.default.strictObject({
|
|
105
|
+
packageManager: zod.default.enum(_alextheman_utility_internal.PackageManager),
|
|
106
|
+
path: zod.default.string(),
|
|
107
|
+
prepareScript: zod.default.string().optional(),
|
|
108
|
+
dependencyGroup: zod.default.enum(DependencyGroup).optional(),
|
|
109
|
+
keepOldTarballs: zod.default.boolean().optional()
|
|
110
|
+
}))
|
|
111
|
+
}) });
|
|
114
112
|
function defineAlexCLinePrivateConfig(config) {
|
|
115
113
|
return config;
|
|
116
114
|
}
|
package/dist/configs/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PackageManager } from "@alextheman/utility/internal";
|
|
2
2
|
import { Options, Result, TemplateExpression } from "execa";
|
|
3
|
+
import { CreateEnumType } from "@alextheman/utility";
|
|
3
4
|
|
|
4
5
|
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
5
6
|
interface CreatePullRequestTemplateBaseConfig {
|
|
@@ -34,11 +35,6 @@ interface StepRunner<ExecaOptions extends Options = BaseOptions> {
|
|
|
34
35
|
}
|
|
35
36
|
//#endregion
|
|
36
37
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
37
|
-
declare const PackageManager: {
|
|
38
|
-
readonly NPM: "npm";
|
|
39
|
-
readonly PNPM: "pnpm";
|
|
40
|
-
};
|
|
41
|
-
type PackageManager = CreateEnumType<typeof PackageManager>;
|
|
42
38
|
interface PreCommitStepOptions {
|
|
43
39
|
/** Arguments to pass to the given script */
|
|
44
40
|
arguments?: string[];
|
|
@@ -51,6 +47,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
51
47
|
allowNoStagedChanges?: boolean;
|
|
52
48
|
/** The steps to run in the pre-commit hook. */
|
|
53
49
|
steps: (StepFunction | ScriptName | [ScriptName, PreCommitStepOptions])[];
|
|
50
|
+
/** Update the git index after the run */
|
|
51
|
+
updateIndex?: boolean;
|
|
54
52
|
}
|
|
55
53
|
//#endregion
|
|
56
54
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
@@ -83,6 +81,8 @@ interface LocalPackage<ScriptName extends string = string> {
|
|
|
83
81
|
keepOldTarballs?: boolean;
|
|
84
82
|
}
|
|
85
83
|
interface UseLocalPackageConfig<ScriptName extends string = string> {
|
|
84
|
+
/** Enable caching of the previous version number. */
|
|
85
|
+
enableCache?: boolean;
|
|
86
86
|
/** A record of all packages that we may want to consider using locally. */
|
|
87
87
|
localPackages: Record<string, LocalPackage<ScriptName>>;
|
|
88
88
|
}
|
|
@@ -123,4 +123,4 @@ interface PreCommitPrivateConfig<ScriptName extends string = string> {
|
|
|
123
123
|
//#region src/configs/helpers/definePreCommitPrivateConfig.d.ts
|
|
124
124
|
declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig<ScriptName>;
|
|
125
125
|
//#endregion
|
|
126
|
-
export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, DependencyGroup,
|
|
126
|
+
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,5 +1,6 @@
|
|
|
1
1
|
import { CreateEnumType } from "@alextheman/utility";
|
|
2
2
|
import z from "zod";
|
|
3
|
+
import { PackageManager } from "@alextheman/utility/internal";
|
|
3
4
|
import { Options, Result, TemplateExpression } from "execa";
|
|
4
5
|
|
|
5
6
|
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
@@ -35,11 +36,6 @@ interface StepRunner<ExecaOptions extends Options = BaseOptions> {
|
|
|
35
36
|
}
|
|
36
37
|
//#endregion
|
|
37
38
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
38
|
-
declare const PackageManager: {
|
|
39
|
-
readonly NPM: "npm";
|
|
40
|
-
readonly PNPM: "pnpm";
|
|
41
|
-
};
|
|
42
|
-
type PackageManager = CreateEnumType<typeof PackageManager>;
|
|
43
39
|
interface PreCommitStepOptions {
|
|
44
40
|
/** Arguments to pass to the given script */
|
|
45
41
|
arguments?: string[];
|
|
@@ -52,6 +48,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
52
48
|
allowNoStagedChanges?: boolean;
|
|
53
49
|
/** The steps to run in the pre-commit hook. */
|
|
54
50
|
steps: (StepFunction | ScriptName | [ScriptName, PreCommitStepOptions])[];
|
|
51
|
+
/** Update the git index after the run */
|
|
52
|
+
updateIndex?: boolean;
|
|
55
53
|
}
|
|
56
54
|
//#endregion
|
|
57
55
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
@@ -84,6 +82,8 @@ interface LocalPackage<ScriptName extends string = string> {
|
|
|
84
82
|
keepOldTarballs?: boolean;
|
|
85
83
|
}
|
|
86
84
|
interface UseLocalPackageConfig<ScriptName extends string = string> {
|
|
85
|
+
/** Enable caching of the previous version number. */
|
|
86
|
+
enableCache?: boolean;
|
|
87
87
|
/** A record of all packages that we may want to consider using locally. */
|
|
88
88
|
localPackages: Record<string, LocalPackage<ScriptName>>;
|
|
89
89
|
}
|
|
@@ -124,4 +124,4 @@ interface PreCommitPrivateConfig<ScriptName extends string = string> {
|
|
|
124
124
|
//#region src/configs/helpers/definePreCommitPrivateConfig.d.ts
|
|
125
125
|
declare function definePreCommitPrivateConfig<ScriptName extends string = string>(config: PreCommitPrivateConfig<ScriptName>): PreCommitPrivateConfig<ScriptName>;
|
|
126
126
|
//#endregion
|
|
127
|
-
export { AlexCLineConfig, ConfigFileName, CreatePullRequestTemplateBaseConfig, CreatePullRequestTemplateConfig, CreatePullRequestTemplateGeneralConfig, CreatePullRequestTemplateInfrastructureConfig, DependencyGroup,
|
|
127
|
+
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;
|
|
@@ -75,13 +70,16 @@ const PullRequestTemplateCategory = {
|
|
|
75
70
|
|
|
76
71
|
//#endregion
|
|
77
72
|
//#region src/configs/helpers/defineAlexCLinePrivateConfig.ts
|
|
78
|
-
const alexCLinePrivateConfigSchema = z.object({ useLocalPackage: z.strictObject({
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
73
|
+
const alexCLinePrivateConfigSchema = z.object({ useLocalPackage: z.strictObject({
|
|
74
|
+
enableCache: z.boolean().optional(),
|
|
75
|
+
localPackages: z.record(z.string(), z.strictObject({
|
|
76
|
+
packageManager: z.enum(PackageManager),
|
|
77
|
+
path: z.string(),
|
|
78
|
+
prepareScript: z.string().optional(),
|
|
79
|
+
dependencyGroup: z.enum(DependencyGroup).optional(),
|
|
80
|
+
keepOldTarballs: z.boolean().optional()
|
|
81
|
+
}))
|
|
82
|
+
}) });
|
|
85
83
|
function defineAlexCLinePrivateConfig(config) {
|
|
86
84
|
return config;
|
|
87
85
|
}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PackageManager } from "@alextheman/utility/internal";
|
|
2
2
|
import { Options, Result, TemplateExpression } from "execa";
|
|
3
3
|
|
|
4
4
|
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
@@ -34,11 +34,6 @@ interface StepRunner<ExecaOptions extends Options = BaseOptions> {
|
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
37
|
-
declare const PackageManager: {
|
|
38
|
-
readonly NPM: "npm";
|
|
39
|
-
readonly PNPM: "pnpm";
|
|
40
|
-
};
|
|
41
|
-
type PackageManager = CreateEnumType<typeof PackageManager>;
|
|
42
37
|
interface PreCommitStepOptions {
|
|
43
38
|
/** Arguments to pass to the given script */
|
|
44
39
|
arguments?: string[];
|
|
@@ -51,6 +46,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
51
46
|
allowNoStagedChanges?: boolean;
|
|
52
47
|
/** The steps to run in the pre-commit hook. */
|
|
53
48
|
steps: (StepFunction | ScriptName | [ScriptName, PreCommitStepOptions])[];
|
|
49
|
+
/** Update the git index after the run */
|
|
50
|
+
updateIndex?: boolean;
|
|
54
51
|
}
|
|
55
52
|
//#endregion
|
|
56
53
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
@@ -85,6 +82,7 @@ declare let scripts: {
|
|
|
85
82
|
"prepare-local-eslint-plugin": string;
|
|
86
83
|
"prepare-local-utility": string;
|
|
87
84
|
test: string;
|
|
85
|
+
"test-end-to-end": string;
|
|
88
86
|
"test-watch": string;
|
|
89
87
|
"update-dependencies": string;
|
|
90
88
|
"use-live-eslint-plugin": string;
|
|
@@ -111,4 +109,7 @@ type PreCommitStep = "build" | "format" | "lint" | "test";
|
|
|
111
109
|
//#region src/configs/internal/packageConfig.d.ts
|
|
112
110
|
declare function packageConfig<ScriptName extends string = PreCommitStep>(steps?: (StepFunction | ScriptName | PreCommitStep | [ScriptName | PreCommitStep, PreCommitStepOptions])[]): AlexCLineConfig<PreCommitStep>;
|
|
113
111
|
//#endregion
|
|
114
|
-
|
|
112
|
+
//#region src/configs/internal/testConfig.d.ts
|
|
113
|
+
declare const testConfig: AlexCLineConfig<"artwork">;
|
|
114
|
+
//#endregion
|
|
115
|
+
export { alexCLineConfig, infrastructureConfig, packageConfig, testConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PackageManager } from "@alextheman/utility/internal";
|
|
2
2
|
import { Options, Result, TemplateExpression } from "execa";
|
|
3
3
|
|
|
4
4
|
//#region src/configs/types/CreatePullRequestTemplateConfig.d.ts
|
|
@@ -34,11 +34,6 @@ interface StepRunner<ExecaOptions extends Options = BaseOptions> {
|
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/configs/types/PreCommitConfig.d.ts
|
|
37
|
-
declare const PackageManager: {
|
|
38
|
-
readonly NPM: "npm";
|
|
39
|
-
readonly PNPM: "pnpm";
|
|
40
|
-
};
|
|
41
|
-
type PackageManager = CreateEnumType<typeof PackageManager>;
|
|
42
37
|
interface PreCommitStepOptions {
|
|
43
38
|
/** Arguments to pass to the given script */
|
|
44
39
|
arguments?: string[];
|
|
@@ -51,6 +46,8 @@ interface PreCommitConfig<ScriptName extends string = string> {
|
|
|
51
46
|
allowNoStagedChanges?: boolean;
|
|
52
47
|
/** The steps to run in the pre-commit hook. */
|
|
53
48
|
steps: (StepFunction | ScriptName | [ScriptName, PreCommitStepOptions])[];
|
|
49
|
+
/** Update the git index after the run */
|
|
50
|
+
updateIndex?: boolean;
|
|
54
51
|
}
|
|
55
52
|
//#endregion
|
|
56
53
|
//#region src/configs/types/AlexCLineConfig.d.ts
|
|
@@ -85,6 +82,7 @@ declare let scripts: {
|
|
|
85
82
|
"prepare-local-eslint-plugin": string;
|
|
86
83
|
"prepare-local-utility": string;
|
|
87
84
|
test: string;
|
|
85
|
+
"test-end-to-end": string;
|
|
88
86
|
"test-watch": string;
|
|
89
87
|
"update-dependencies": string;
|
|
90
88
|
"use-live-eslint-plugin": string;
|
|
@@ -111,4 +109,7 @@ type PreCommitStep = "build" | "format" | "lint" | "test";
|
|
|
111
109
|
//#region src/configs/internal/packageConfig.d.ts
|
|
112
110
|
declare function packageConfig<ScriptName extends string = PreCommitStep>(steps?: (StepFunction | ScriptName | PreCommitStep | [ScriptName | PreCommitStep, PreCommitStepOptions])[]): AlexCLineConfig<PreCommitStep>;
|
|
113
111
|
//#endregion
|
|
114
|
-
|
|
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 };
|