alex-c-line 1.16.0 → 1.17.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.
@@ -29,18 +29,6 @@ let _alextheman_utility = require("@alextheman/utility");
29
29
  let zod = require("zod");
30
30
  zod = __toESM(zod);
31
31
 
32
- //#region src/configs/internalConfig.ts
33
- const internalConfig = { preCommit: {
34
- packageManager: "pnpm",
35
- steps: [
36
- "format",
37
- "lint",
38
- "test"
39
- ]
40
- } };
41
- var internalConfig_default = internalConfig;
42
-
43
- //#endregion
44
32
  //#region src/configs/types/PreCommitConfig.ts
45
33
  const PackageManager = {
46
34
  NPM: "npm",
@@ -89,5 +77,4 @@ var ConfigFileName_default = ConfigFileName;
89
77
  exports.ConfigFileName = ConfigFileName_default;
90
78
  exports.defineAlexCLineConfig = defineAlexCLineConfig_default;
91
79
  exports.definePreCommitConfig = definePreCommitConfig_default;
92
- exports.definePreCommitPrivateConfig = definePreCommitPrivateConfig_default;
93
- exports.internalConfig = internalConfig_default;
80
+ exports.definePreCommitPrivateConfig = definePreCommitPrivateConfig_default;
@@ -2,8 +2,8 @@ import { CreateEnumType } from "@alextheman/utility";
2
2
 
3
3
  //#region src/configs/types/PreCommitConfig.d.ts
4
4
  declare const PackageManager: {
5
- NPM: string;
6
- PNPM: string;
5
+ readonly NPM: "npm";
6
+ readonly PNPM: "pnpm";
7
7
  };
8
8
  type PackageManager = CreateEnumType<typeof PackageManager>;
9
9
  interface PreCommitStepOptions {
@@ -24,43 +24,6 @@ interface AlexCLineConfig<ScriptName extends string = string> {
24
24
  preCommit: PreCommitConfig<ScriptName>;
25
25
  }
26
26
  //#endregion
27
- //#region package.d.ts
28
-
29
- declare let scripts: {
30
- build: string;
31
- command: string;
32
- "create-release-note-major": string;
33
- "create-release-note-minor": string;
34
- "create-release-note-patch": string;
35
- format: string;
36
- "format-eslint": string;
37
- "format-prettier": string;
38
- "format-prettier-javascript": string;
39
- "format-prettier-typescript": string;
40
- lint: string;
41
- "lint-eslint": string;
42
- "lint-prettier": string;
43
- "lint-prettier-javascript": string;
44
- "lint-prettier-typescript": string;
45
- "lint-tsc": string;
46
- "pre-commit": string;
47
- prepare: string;
48
- "prepare-live-eslint-plugin": string;
49
- "prepare-live-utility": string;
50
- "prepare-local-eslint-plugin": string;
51
- "prepare-local-utility": string;
52
- test: string;
53
- "test-watch": string;
54
- "update-dependencies": string;
55
- "use-live-eslint-plugin": string;
56
- "use-live-utility": string;
57
- "use-local-eslint-plugin": string;
58
- "use-local-utility": string;
59
- };
60
- //#endregion
61
- //#region src/configs/internalConfig.d.ts
62
- declare const internalConfig: AlexCLineConfig<keyof typeof scripts>;
63
- //#endregion
64
27
  //#region src/configs/helpers/defineAlexCLineConfig.d.ts
65
28
  declare function defineAlexCLineConfig<ScriptName extends string = string>(config: AlexCLineConfig<ScriptName>): AlexCLineConfig;
66
29
  //#endregion
@@ -84,4 +47,4 @@ declare const ConfigFileName: {
84
47
  };
85
48
  type ConfigFileName = CreateEnumType<typeof ConfigFileName>;
86
49
  //#endregion
87
- export { AlexCLineConfig, ConfigFileName, PackageManager, PreCommitConfig, PreCommitStepOptions, defineAlexCLineConfig, definePreCommitConfig, definePreCommitPrivateConfig, internalConfig };
50
+ export { AlexCLineConfig, ConfigFileName, PackageManager, PreCommitConfig, PreCommitStepOptions, defineAlexCLineConfig, definePreCommitConfig, definePreCommitPrivateConfig };
@@ -3,8 +3,8 @@ import z from "zod";
3
3
 
4
4
  //#region src/configs/types/PreCommitConfig.d.ts
5
5
  declare const PackageManager: {
6
- NPM: string;
7
- PNPM: string;
6
+ readonly NPM: "npm";
7
+ readonly PNPM: "pnpm";
8
8
  };
9
9
  type PackageManager = CreateEnumType<typeof PackageManager>;
10
10
  interface PreCommitStepOptions {
@@ -25,43 +25,6 @@ interface AlexCLineConfig<ScriptName extends string = string> {
25
25
  preCommit: PreCommitConfig<ScriptName>;
26
26
  }
27
27
  //#endregion
28
- //#region package.d.ts
29
-
30
- declare let scripts: {
31
- build: string;
32
- command: string;
33
- "create-release-note-major": string;
34
- "create-release-note-minor": string;
35
- "create-release-note-patch": string;
36
- format: string;
37
- "format-eslint": string;
38
- "format-prettier": string;
39
- "format-prettier-javascript": string;
40
- "format-prettier-typescript": string;
41
- lint: string;
42
- "lint-eslint": string;
43
- "lint-prettier": string;
44
- "lint-prettier-javascript": string;
45
- "lint-prettier-typescript": string;
46
- "lint-tsc": string;
47
- "pre-commit": string;
48
- prepare: string;
49
- "prepare-live-eslint-plugin": string;
50
- "prepare-live-utility": string;
51
- "prepare-local-eslint-plugin": string;
52
- "prepare-local-utility": string;
53
- test: string;
54
- "test-watch": string;
55
- "update-dependencies": string;
56
- "use-live-eslint-plugin": string;
57
- "use-live-utility": string;
58
- "use-local-eslint-plugin": string;
59
- "use-local-utility": string;
60
- };
61
- //#endregion
62
- //#region src/configs/internalConfig.d.ts
63
- declare const internalConfig: AlexCLineConfig<keyof typeof scripts>;
64
- //#endregion
65
28
  //#region src/configs/helpers/defineAlexCLineConfig.d.ts
66
29
  declare function defineAlexCLineConfig<ScriptName extends string = string>(config: AlexCLineConfig<ScriptName>): AlexCLineConfig;
67
30
  //#endregion
@@ -85,4 +48,4 @@ declare const ConfigFileName: {
85
48
  };
86
49
  type ConfigFileName = CreateEnumType<typeof ConfigFileName>;
87
50
  //#endregion
88
- export { AlexCLineConfig, ConfigFileName, PackageManager, PreCommitConfig, PreCommitStepOptions, defineAlexCLineConfig, definePreCommitConfig, definePreCommitPrivateConfig, internalConfig };
51
+ export { AlexCLineConfig, ConfigFileName, PackageManager, PreCommitConfig, PreCommitStepOptions, defineAlexCLineConfig, definePreCommitConfig, definePreCommitPrivateConfig };
@@ -1,18 +1,6 @@
1
1
  import { DataError, parseZodSchema } from "@alextheman/utility";
2
2
  import z from "zod";
3
3
 
4
- //#region src/configs/internalConfig.ts
5
- const internalConfig = { preCommit: {
6
- packageManager: "pnpm",
7
- steps: [
8
- "format",
9
- "lint",
10
- "test"
11
- ]
12
- } };
13
- var internalConfig_default = internalConfig;
14
-
15
- //#endregion
16
4
  //#region src/configs/types/PreCommitConfig.ts
17
5
  const PackageManager = {
18
6
  NPM: "npm",
@@ -58,4 +46,4 @@ const ConfigFileName = {
58
46
  var ConfigFileName_default = ConfigFileName;
59
47
 
60
48
  //#endregion
61
- export { ConfigFileName_default as ConfigFileName, defineAlexCLineConfig_default as defineAlexCLineConfig, definePreCommitConfig_default as definePreCommitConfig, definePreCommitPrivateConfig_default as definePreCommitPrivateConfig, internalConfig_default as internalConfig };
49
+ export { ConfigFileName_default as ConfigFileName, defineAlexCLineConfig_default as defineAlexCLineConfig, definePreCommitConfig_default as definePreCommitConfig, definePreCommitPrivateConfig_default as definePreCommitPrivateConfig };
@@ -0,0 +1,28 @@
1
+
2
+ //#region src/configs/internal/alexCLineConfig.ts
3
+ const alexCLineConfig = { preCommit: {
4
+ packageManager: "pnpm",
5
+ steps: [
6
+ "format",
7
+ "lint",
8
+ "test"
9
+ ]
10
+ } };
11
+ var alexCLineConfig_default = alexCLineConfig;
12
+
13
+ //#endregion
14
+ //#region src/configs/internal/packageConfig.ts
15
+ const packageConfig = { preCommit: {
16
+ packageManager: "pnpm",
17
+ steps: [
18
+ "build",
19
+ "format",
20
+ "lint",
21
+ "test"
22
+ ]
23
+ } };
24
+ var packageConfig_default = packageConfig;
25
+
26
+ //#endregion
27
+ exports.alexCLineConfig = alexCLineConfig_default;
28
+ exports.packageConfig = packageConfig_default;
@@ -0,0 +1,69 @@
1
+ import { CreateEnumType } from "@alextheman/utility";
2
+
3
+ //#region src/configs/types/PreCommitConfig.d.ts
4
+ declare const PackageManager: {
5
+ readonly NPM: "npm";
6
+ readonly PNPM: "pnpm";
7
+ };
8
+ type PackageManager = CreateEnumType<typeof PackageManager>;
9
+ interface PreCommitStepOptions {
10
+ /** Arguments to pass to the given script */
11
+ arguments?: string[];
12
+ }
13
+ interface PreCommitConfig<ScriptName extends string = string> {
14
+ /** 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. */
15
+ packageManager?: PackageManager;
16
+ /** Allow the hook to run even if there are no staged changes. */
17
+ allowNoStagedChanges?: boolean;
18
+ /** The steps to run in the pre-commit hook. */
19
+ steps: ScriptName[] | [ScriptName, PreCommitStepOptions][];
20
+ }
21
+ //#endregion
22
+ //#region src/configs/types/AlexCLineConfig.d.ts
23
+ interface AlexCLineConfig<ScriptName extends string = string> {
24
+ preCommit: PreCommitConfig<ScriptName>;
25
+ }
26
+ //#endregion
27
+ //#region package.d.ts
28
+
29
+ declare let scripts: {
30
+ build: string;
31
+ command: string;
32
+ "create-release-note-major": string;
33
+ "create-release-note-minor": string;
34
+ "create-release-note-patch": string;
35
+ format: string;
36
+ "format-eslint": string;
37
+ "format-prettier": string;
38
+ "format-prettier-javascript": string;
39
+ "format-prettier-typescript": string;
40
+ "format-prettier-yml": string;
41
+ lint: string;
42
+ "lint-eslint": string;
43
+ "lint-prettier": string;
44
+ "lint-prettier-javascript": string;
45
+ "lint-prettier-typescript": string;
46
+ "lint-prettier-yml": string;
47
+ "lint-tsc": string;
48
+ "pre-commit": string;
49
+ prepare: string;
50
+ "prepare-live-eslint-plugin": string;
51
+ "prepare-live-utility": string;
52
+ "prepare-local-eslint-plugin": string;
53
+ "prepare-local-utility": string;
54
+ test: string;
55
+ "test-watch": string;
56
+ "update-dependencies": string;
57
+ "use-live-eslint-plugin": string;
58
+ "use-live-utility": string;
59
+ "use-local-eslint-plugin": string;
60
+ "use-local-utility": string;
61
+ };
62
+ //#endregion
63
+ //#region src/configs/internal/alexCLineConfig.d.ts
64
+ declare const alexCLineConfig: AlexCLineConfig<keyof typeof scripts>;
65
+ //#endregion
66
+ //#region src/configs/internal/packageConfig.d.ts
67
+ declare const packageConfig: AlexCLineConfig<"build" | "format" | "lint" | "test">;
68
+ //#endregion
69
+ export { alexCLineConfig, packageConfig };
@@ -0,0 +1,69 @@
1
+ import { CreateEnumType } from "@alextheman/utility";
2
+
3
+ //#region src/configs/types/PreCommitConfig.d.ts
4
+ declare const PackageManager: {
5
+ readonly NPM: "npm";
6
+ readonly PNPM: "pnpm";
7
+ };
8
+ type PackageManager = CreateEnumType<typeof PackageManager>;
9
+ interface PreCommitStepOptions {
10
+ /** Arguments to pass to the given script */
11
+ arguments?: string[];
12
+ }
13
+ interface PreCommitConfig<ScriptName extends string = string> {
14
+ /** 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. */
15
+ packageManager?: PackageManager;
16
+ /** Allow the hook to run even if there are no staged changes. */
17
+ allowNoStagedChanges?: boolean;
18
+ /** The steps to run in the pre-commit hook. */
19
+ steps: ScriptName[] | [ScriptName, PreCommitStepOptions][];
20
+ }
21
+ //#endregion
22
+ //#region src/configs/types/AlexCLineConfig.d.ts
23
+ interface AlexCLineConfig<ScriptName extends string = string> {
24
+ preCommit: PreCommitConfig<ScriptName>;
25
+ }
26
+ //#endregion
27
+ //#region package.d.ts
28
+
29
+ declare let scripts: {
30
+ build: string;
31
+ command: string;
32
+ "create-release-note-major": string;
33
+ "create-release-note-minor": string;
34
+ "create-release-note-patch": string;
35
+ format: string;
36
+ "format-eslint": string;
37
+ "format-prettier": string;
38
+ "format-prettier-javascript": string;
39
+ "format-prettier-typescript": string;
40
+ "format-prettier-yml": string;
41
+ lint: string;
42
+ "lint-eslint": string;
43
+ "lint-prettier": string;
44
+ "lint-prettier-javascript": string;
45
+ "lint-prettier-typescript": string;
46
+ "lint-prettier-yml": string;
47
+ "lint-tsc": string;
48
+ "pre-commit": string;
49
+ prepare: string;
50
+ "prepare-live-eslint-plugin": string;
51
+ "prepare-live-utility": string;
52
+ "prepare-local-eslint-plugin": string;
53
+ "prepare-local-utility": string;
54
+ test: string;
55
+ "test-watch": string;
56
+ "update-dependencies": string;
57
+ "use-live-eslint-plugin": string;
58
+ "use-live-utility": string;
59
+ "use-local-eslint-plugin": string;
60
+ "use-local-utility": string;
61
+ };
62
+ //#endregion
63
+ //#region src/configs/internal/alexCLineConfig.d.ts
64
+ declare const alexCLineConfig: AlexCLineConfig<keyof typeof scripts>;
65
+ //#endregion
66
+ //#region src/configs/internal/packageConfig.d.ts
67
+ declare const packageConfig: AlexCLineConfig<"build" | "format" | "lint" | "test">;
68
+ //#endregion
69
+ export { alexCLineConfig, packageConfig };
@@ -0,0 +1,26 @@
1
+ //#region src/configs/internal/alexCLineConfig.ts
2
+ const alexCLineConfig = { preCommit: {
3
+ packageManager: "pnpm",
4
+ steps: [
5
+ "format",
6
+ "lint",
7
+ "test"
8
+ ]
9
+ } };
10
+ var alexCLineConfig_default = alexCLineConfig;
11
+
12
+ //#endregion
13
+ //#region src/configs/internal/packageConfig.ts
14
+ const packageConfig = { preCommit: {
15
+ packageManager: "pnpm",
16
+ steps: [
17
+ "build",
18
+ "format",
19
+ "lint",
20
+ "test"
21
+ ]
22
+ } };
23
+ var packageConfig_default = packageConfig;
24
+
25
+ //#endregion
26
+ export { alexCLineConfig_default as alexCLineConfig, packageConfig_default as packageConfig };
package/dist/index.cjs CHANGED
@@ -39,6 +39,8 @@ let dotenv = require("dotenv");
39
39
  dotenv = __toESM(dotenv);
40
40
  let dotenv_stringify = require("dotenv-stringify");
41
41
  dotenv_stringify = __toESM(dotenv_stringify);
42
+ let libsodium_wrappers = require("libsodium-wrappers");
43
+ libsodium_wrappers = __toESM(libsodium_wrappers);
42
44
  let node_os = require("node:os");
43
45
  node_os = __toESM(node_os);
44
46
  let zod = require("zod");
@@ -354,6 +356,26 @@ function editEnv(program$1) {
354
356
  }
355
357
  var edit_env_default = editEnv;
356
358
 
359
+ //#endregion
360
+ //#region src/commands/encrypt.ts
361
+ function encrypt(program$1) {
362
+ program$1.command("encrypt").description("Encrypt a secret given the public key and the thing you want to encrypt.").argument("<key>", "The public key to encrypt with").argument("<value>", "The value to encrypt in plaintext").action(async (key, value) => {
363
+ try {
364
+ await libsodium_wrappers.default.ready;
365
+ const base64Key = libsodium_wrappers.default.from_base64(key, libsodium_wrappers.default.base64_variants.ORIGINAL);
366
+ const encryptedValue = libsodium_wrappers.default.crypto_box_seal(value, base64Key);
367
+ const encryptedBase64Value = libsodium_wrappers.default.to_base64(encryptedValue, libsodium_wrappers.default.base64_variants.ORIGINAL);
368
+ console.info(encryptedBase64Value);
369
+ } catch {
370
+ program$1.error("Encryption failed. Please double-check that the given key is a valid base 64 string.", {
371
+ exitCode: 1,
372
+ code: "ENCRYPTION_FAILED"
373
+ });
374
+ }
375
+ });
376
+ }
377
+ var encrypt_default = encrypt;
378
+
357
379
  //#endregion
358
380
  //#region src/commands/get-version-type.ts
359
381
  function getVersionType(program$1) {
@@ -686,6 +708,7 @@ function createCommands(program$1) {
686
708
  createPullRequestTemplates: create_pull_request_templates_default,
687
709
  createReleaseNote: create_release_note_default,
688
710
  editEnv: edit_env_default,
711
+ encrypt: encrypt_default,
689
712
  getVersionType: get_version_type_default,
690
713
  gitPostMergeCleanup: git_post_merge_cleanup_default,
691
714
  incrementVersion: increment_version_default,
@@ -699,24 +722,32 @@ var commands_default = createCommands;
699
722
 
700
723
  //#endregion
701
724
  //#region package.json
702
- var version = "1.16.0";
725
+ var version = "1.17.0";
703
726
  var package_default = {
704
727
  name: "alex-c-line",
705
728
  version,
706
729
  description: "Command-line tool with commands to streamline the developer workflow.",
707
730
  repository: {
708
731
  "type": "git",
709
- "url": "git+https://github.com/AlexMan123456/alex-c-line.git"
732
+ "url": "git+https://github.com/alextheman231/alex-c-line.git"
710
733
  },
711
734
  license: "ISC",
712
735
  author: "alextheman",
713
736
  type: "module",
714
- exports: { "./configs": {
715
- "types": "./dist/configs/index.d.ts",
716
- "require": "./dist/configs/index.cjs",
717
- "import": "./dist/configs/index.js",
718
- "default": "./dist/configs/index.js"
719
- } },
737
+ exports: {
738
+ "./configs": {
739
+ "types": "./dist/configs/index.d.ts",
740
+ "require": "./dist/configs/index.cjs",
741
+ "import": "./dist/configs/index.js",
742
+ "default": "./dist/configs/index.js"
743
+ },
744
+ "./configs/internal": {
745
+ "types": "./dist/configs/internal/index.d.ts",
746
+ "require": "./dist/configs/internal/index.cjs",
747
+ "import": "./dist/configs/internal/index.js",
748
+ "default": "./dist/configs/internal/index.js"
749
+ }
750
+ },
720
751
  main: "dist/index.js",
721
752
  module: "dist/index.cjs",
722
753
  types: "dist/index.d.ts",
@@ -730,14 +761,16 @@ var package_default = {
730
761
  "create-release-note-patch": "git pull origin main && pnpm run command create-release-note patch",
731
762
  "format": "pnpm run format-prettier && pnpm run format-eslint",
732
763
  "format-eslint": "eslint --fix --suppress-all \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\" && rm -f eslint-suppressions.json",
733
- "format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript",
764
+ "format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript && pnpm run format-prettier-yml",
734
765
  "format-prettier-javascript": "prettier --write \"./**/*.js\"",
735
766
  "format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
767
+ "format-prettier-yml": "prettier --write \"./**/*.yml\"",
736
768
  "lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier",
737
769
  "lint-eslint": "eslint \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\"",
738
- "lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript",
770
+ "lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript && pnpm run lint-prettier-yml",
739
771
  "lint-prettier-javascript": "prettier --check \"./**.js\"",
740
772
  "lint-prettier-typescript": "prettier --check --parser typescript \"./**/*.ts\"",
773
+ "lint-prettier-yml": "prettier --check \"./**/*.yml\"",
741
774
  "lint-tsc": "tsc --noEmit",
742
775
  "pre-commit": "pnpm run command pre-commit-2",
743
776
  "prepare": "husky",
@@ -754,32 +787,38 @@ var package_default = {
754
787
  "use-local-utility": "pnpm run prepare-local-utility"
755
788
  },
756
789
  dependencies: {
757
- "@alextheman/utility": "^4.3.6",
790
+ "@alextheman/utility": "^4.4.2",
758
791
  "commander": "^14.0.2",
759
792
  "dotenv": "^17.2.3",
760
793
  "dotenv-stringify": "^3.0.1",
761
794
  "execa": "^9.6.1",
795
+ "libsodium-wrappers": "^0.8.0",
762
796
  "update-notifier": "^7.3.1",
763
- "zod": "^4.3.4"
797
+ "zod": "^4.3.5"
764
798
  },
765
799
  devDependencies: {
766
800
  "@alextheman/eslint-plugin": "^5.4.2",
767
801
  "@types/eslint": "^9.6.1",
802
+ "@types/libsodium-wrappers": "^0.7.14",
768
803
  "@types/node": "^25.0.3",
769
804
  "@types/update-notifier": "^6.0.8",
770
805
  "dotenv-cli": "^11.0.0",
771
806
  "eslint": "^9.39.2",
772
- "eslint-plugin-perfectionist": "^5.2.0",
807
+ "eslint-plugin-perfectionist": "^5.3.1",
773
808
  "husky": "^9.1.7",
774
809
  "prettier": "^3.7.4",
775
810
  "tempy": "^3.1.0",
776
811
  "ts-node": "^10.9.2",
777
- "tsdown": "0.19.0-beta.1",
812
+ "tsdown": "^0.18.4",
778
813
  "typescript": "^5.9.3",
779
- "vite-tsconfig-paths": "^6.0.3",
814
+ "vite-tsconfig-paths": "^6.0.4",
780
815
  "vitest": "^4.0.16"
781
816
  },
782
- packageManager: "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
817
+ packageManager: "pnpm@10.28.0+sha512.05df71d1421f21399e053fde567cea34d446fa02c76571441bfc1c7956e98e363088982d940465fd34480d4d90a0668bc12362f8aa88000a64e83d0b0e47be48",
818
+ pnpm: {
819
+ "onlyBuiltDependencies": ["esbuild", "unrs-resolver"],
820
+ "overrides": { "tsdown": "<0.19.0" }
821
+ }
783
822
  };
784
823
 
785
824
  //#endregion
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ import { DataError, VersionNumber, kebabToCamel, normaliseIndents, parseVersionT
9
9
  import { ExecaError, execa } from "execa";
10
10
  import dotenv from "dotenv";
11
11
  import dotenvStringify from "dotenv-stringify";
12
+ import sodium from "libsodium-wrappers";
12
13
  import os from "node:os";
13
14
  import z from "zod";
14
15
  import { pathToFileURL } from "node:url";
@@ -321,6 +322,26 @@ function editEnv(program$1) {
321
322
  }
322
323
  var edit_env_default = editEnv;
323
324
 
325
+ //#endregion
326
+ //#region src/commands/encrypt.ts
327
+ function encrypt(program$1) {
328
+ program$1.command("encrypt").description("Encrypt a secret given the public key and the thing you want to encrypt.").argument("<key>", "The public key to encrypt with").argument("<value>", "The value to encrypt in plaintext").action(async (key, value) => {
329
+ try {
330
+ await sodium.ready;
331
+ const base64Key = sodium.from_base64(key, sodium.base64_variants.ORIGINAL);
332
+ const encryptedValue = sodium.crypto_box_seal(value, base64Key);
333
+ const encryptedBase64Value = sodium.to_base64(encryptedValue, sodium.base64_variants.ORIGINAL);
334
+ console.info(encryptedBase64Value);
335
+ } catch {
336
+ program$1.error("Encryption failed. Please double-check that the given key is a valid base 64 string.", {
337
+ exitCode: 1,
338
+ code: "ENCRYPTION_FAILED"
339
+ });
340
+ }
341
+ });
342
+ }
343
+ var encrypt_default = encrypt;
344
+
324
345
  //#endregion
325
346
  //#region src/commands/get-version-type.ts
326
347
  function getVersionType(program$1) {
@@ -653,6 +674,7 @@ function createCommands(program$1) {
653
674
  createPullRequestTemplates: create_pull_request_templates_default,
654
675
  createReleaseNote: create_release_note_default,
655
676
  editEnv: edit_env_default,
677
+ encrypt: encrypt_default,
656
678
  getVersionType: get_version_type_default,
657
679
  gitPostMergeCleanup: git_post_merge_cleanup_default,
658
680
  incrementVersion: increment_version_default,
@@ -666,24 +688,32 @@ var commands_default = createCommands;
666
688
 
667
689
  //#endregion
668
690
  //#region package.json
669
- var version = "1.16.0";
691
+ var version = "1.17.0";
670
692
  var package_default = {
671
693
  name: "alex-c-line",
672
694
  version,
673
695
  description: "Command-line tool with commands to streamline the developer workflow.",
674
696
  repository: {
675
697
  "type": "git",
676
- "url": "git+https://github.com/AlexMan123456/alex-c-line.git"
698
+ "url": "git+https://github.com/alextheman231/alex-c-line.git"
677
699
  },
678
700
  license: "ISC",
679
701
  author: "alextheman",
680
702
  type: "module",
681
- exports: { "./configs": {
682
- "types": "./dist/configs/index.d.ts",
683
- "require": "./dist/configs/index.cjs",
684
- "import": "./dist/configs/index.js",
685
- "default": "./dist/configs/index.js"
686
- } },
703
+ exports: {
704
+ "./configs": {
705
+ "types": "./dist/configs/index.d.ts",
706
+ "require": "./dist/configs/index.cjs",
707
+ "import": "./dist/configs/index.js",
708
+ "default": "./dist/configs/index.js"
709
+ },
710
+ "./configs/internal": {
711
+ "types": "./dist/configs/internal/index.d.ts",
712
+ "require": "./dist/configs/internal/index.cjs",
713
+ "import": "./dist/configs/internal/index.js",
714
+ "default": "./dist/configs/internal/index.js"
715
+ }
716
+ },
687
717
  main: "dist/index.js",
688
718
  module: "dist/index.cjs",
689
719
  types: "dist/index.d.ts",
@@ -697,14 +727,16 @@ var package_default = {
697
727
  "create-release-note-patch": "git pull origin main && pnpm run command create-release-note patch",
698
728
  "format": "pnpm run format-prettier && pnpm run format-eslint",
699
729
  "format-eslint": "eslint --fix --suppress-all \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\" && rm -f eslint-suppressions.json",
700
- "format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript",
730
+ "format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript && pnpm run format-prettier-yml",
701
731
  "format-prettier-javascript": "prettier --write \"./**/*.js\"",
702
732
  "format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
733
+ "format-prettier-yml": "prettier --write \"./**/*.yml\"",
703
734
  "lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier",
704
735
  "lint-eslint": "eslint \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\"",
705
- "lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript",
736
+ "lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript && pnpm run lint-prettier-yml",
706
737
  "lint-prettier-javascript": "prettier --check \"./**.js\"",
707
738
  "lint-prettier-typescript": "prettier --check --parser typescript \"./**/*.ts\"",
739
+ "lint-prettier-yml": "prettier --check \"./**/*.yml\"",
708
740
  "lint-tsc": "tsc --noEmit",
709
741
  "pre-commit": "pnpm run command pre-commit-2",
710
742
  "prepare": "husky",
@@ -721,32 +753,38 @@ var package_default = {
721
753
  "use-local-utility": "pnpm run prepare-local-utility"
722
754
  },
723
755
  dependencies: {
724
- "@alextheman/utility": "^4.3.6",
756
+ "@alextheman/utility": "^4.4.2",
725
757
  "commander": "^14.0.2",
726
758
  "dotenv": "^17.2.3",
727
759
  "dotenv-stringify": "^3.0.1",
728
760
  "execa": "^9.6.1",
761
+ "libsodium-wrappers": "^0.8.0",
729
762
  "update-notifier": "^7.3.1",
730
- "zod": "^4.3.4"
763
+ "zod": "^4.3.5"
731
764
  },
732
765
  devDependencies: {
733
766
  "@alextheman/eslint-plugin": "^5.4.2",
734
767
  "@types/eslint": "^9.6.1",
768
+ "@types/libsodium-wrappers": "^0.7.14",
735
769
  "@types/node": "^25.0.3",
736
770
  "@types/update-notifier": "^6.0.8",
737
771
  "dotenv-cli": "^11.0.0",
738
772
  "eslint": "^9.39.2",
739
- "eslint-plugin-perfectionist": "^5.2.0",
773
+ "eslint-plugin-perfectionist": "^5.3.1",
740
774
  "husky": "^9.1.7",
741
775
  "prettier": "^3.7.4",
742
776
  "tempy": "^3.1.0",
743
777
  "ts-node": "^10.9.2",
744
- "tsdown": "0.19.0-beta.1",
778
+ "tsdown": "^0.18.4",
745
779
  "typescript": "^5.9.3",
746
- "vite-tsconfig-paths": "^6.0.3",
780
+ "vite-tsconfig-paths": "^6.0.4",
747
781
  "vitest": "^4.0.16"
748
782
  },
749
- packageManager: "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
783
+ packageManager: "pnpm@10.28.0+sha512.05df71d1421f21399e053fde567cea34d446fa02c76571441bfc1c7956e98e363088982d940465fd34480d4d90a0668bc12362f8aa88000a64e83d0b0e47be48",
784
+ pnpm: {
785
+ "onlyBuiltDependencies": ["esbuild", "unrs-resolver"],
786
+ "overrides": { "tsdown": "<0.19.0" }
787
+ }
750
788
  };
751
789
 
752
790
  //#endregion
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "alex-c-line",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "description": "Command-line tool with commands to streamline the developer workflow.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/AlexMan123456/alex-c-line.git"
7
+ "url": "git+https://github.com/alextheman231/alex-c-line.git"
8
8
  },
9
9
  "license": "ISC",
10
10
  "author": "alextheman",
@@ -15,6 +15,12 @@
15
15
  "require": "./dist/configs/index.cjs",
16
16
  "import": "./dist/configs/index.js",
17
17
  "default": "./dist/configs/index.js"
18
+ },
19
+ "./configs/internal": {
20
+ "types": "./dist/configs/internal/index.d.ts",
21
+ "require": "./dist/configs/internal/index.cjs",
22
+ "import": "./dist/configs/internal/index.js",
23
+ "default": "./dist/configs/internal/index.js"
18
24
  }
19
25
  },
20
26
  "main": "dist/index.js",
@@ -27,29 +33,31 @@
27
33
  "dist"
28
34
  ],
29
35
  "dependencies": {
30
- "@alextheman/utility": "^4.3.6",
36
+ "@alextheman/utility": "^4.4.2",
31
37
  "commander": "^14.0.2",
32
38
  "dotenv": "^17.2.3",
33
39
  "dotenv-stringify": "^3.0.1",
34
40
  "execa": "^9.6.1",
41
+ "libsodium-wrappers": "^0.8.0",
35
42
  "update-notifier": "^7.3.1",
36
- "zod": "^4.3.4"
43
+ "zod": "^4.3.5"
37
44
  },
38
45
  "devDependencies": {
39
46
  "@alextheman/eslint-plugin": "^5.4.2",
40
47
  "@types/eslint": "^9.6.1",
48
+ "@types/libsodium-wrappers": "^0.7.14",
41
49
  "@types/node": "^25.0.3",
42
50
  "@types/update-notifier": "^6.0.8",
43
51
  "dotenv-cli": "^11.0.0",
44
52
  "eslint": "^9.39.2",
45
- "eslint-plugin-perfectionist": "^5.2.0",
53
+ "eslint-plugin-perfectionist": "^5.3.1",
46
54
  "husky": "^9.1.7",
47
55
  "prettier": "^3.7.4",
48
56
  "tempy": "^3.1.0",
49
57
  "ts-node": "^10.9.2",
50
- "tsdown": "0.19.0-beta.1",
58
+ "tsdown": "^0.18.4",
51
59
  "typescript": "^5.9.3",
52
- "vite-tsconfig-paths": "^6.0.3",
60
+ "vite-tsconfig-paths": "^6.0.4",
53
61
  "vitest": "^4.0.16"
54
62
  },
55
63
  "scripts": {
@@ -60,14 +68,16 @@
60
68
  "create-release-note-patch": "git pull origin main && pnpm run command create-release-note patch",
61
69
  "format": "pnpm run format-prettier && pnpm run format-eslint",
62
70
  "format-eslint": "eslint --fix --suppress-all \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\" && rm -f eslint-suppressions.json",
63
- "format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript",
71
+ "format-prettier": "pnpm run format-prettier-typescript && pnpm run format-prettier-javascript && pnpm run format-prettier-yml",
64
72
  "format-prettier-javascript": "prettier --write \"./**/*.js\"",
65
73
  "format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
74
+ "format-prettier-yml": "prettier --write \"./**/*.yml\"",
66
75
  "lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier",
67
76
  "lint-eslint": "eslint \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\"",
68
- "lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript",
77
+ "lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript && pnpm run lint-prettier-yml",
69
78
  "lint-prettier-javascript": "prettier --check \"./**.js\"",
70
79
  "lint-prettier-typescript": "prettier --check --parser typescript \"./**/*.ts\"",
80
+ "lint-prettier-yml": "prettier --check \"./**/*.yml\"",
71
81
  "lint-tsc": "tsc --noEmit",
72
82
  "pre-commit": "pnpm run command pre-commit-2",
73
83
  "prepare-live-eslint-plugin": "pnpm uninstall @alextheman/eslint-plugin && pnpm install --save-dev @alextheman/eslint-plugin",