alex-c-line 1.16.1 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,11 +37,13 @@ declare let scripts: {
37
37
  "format-prettier": string;
38
38
  "format-prettier-javascript": string;
39
39
  "format-prettier-typescript": string;
40
+ "format-prettier-yml": string;
40
41
  lint: string;
41
42
  "lint-eslint": string;
42
43
  "lint-prettier": string;
43
44
  "lint-prettier-javascript": string;
44
45
  "lint-prettier-typescript": string;
46
+ "lint-prettier-yml": string;
45
47
  "lint-tsc": string;
46
48
  "pre-commit": string;
47
49
  prepare: string;
@@ -37,11 +37,13 @@ declare let scripts: {
37
37
  "format-prettier": string;
38
38
  "format-prettier-javascript": string;
39
39
  "format-prettier-typescript": string;
40
+ "format-prettier-yml": string;
40
41
  lint: string;
41
42
  "lint-eslint": string;
42
43
  "lint-prettier": string;
43
44
  "lint-prettier-javascript": string;
44
45
  "lint-prettier-typescript": string;
46
+ "lint-prettier-yml": string;
45
47
  "lint-tsc": string;
46
48
  "pre-commit": string;
47
49
  prepare: string;
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-with-key.ts
361
+ function encryptWithKey(program$1) {
362
+ program$1.command("encrypt-with-key").alias("encrypt").description("Encrypt a secret given the public base64 key and the thing you want to encrypt.").argument("<key>", "The public base64 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_with_key_default = encryptWithKey;
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
+ encryptWithKey: encrypt_with_key_default,
689
712
  getVersionType: get_version_type_default,
690
713
  gitPostMergeCleanup: git_post_merge_cleanup_default,
691
714
  incrementVersion: increment_version_default,
@@ -699,14 +722,14 @@ var commands_default = createCommands;
699
722
 
700
723
  //#endregion
701
724
  //#region package.json
702
- var version = "1.16.1";
725
+ var version = "1.17.1";
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",
@@ -738,14 +761,16 @@ var package_default = {
738
761
  "create-release-note-patch": "git pull origin main && pnpm run command create-release-note patch",
739
762
  "format": "pnpm run format-prettier && pnpm run format-eslint",
740
763
  "format-eslint": "eslint --fix --suppress-all \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\" && rm -f eslint-suppressions.json",
741
- "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",
742
765
  "format-prettier-javascript": "prettier --write \"./**/*.js\"",
743
766
  "format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
767
+ "format-prettier-yml": "prettier --write \"./**/*.{yml,yaml}\"",
744
768
  "lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier",
745
769
  "lint-eslint": "eslint \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\"",
746
- "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",
747
771
  "lint-prettier-javascript": "prettier --check \"./**.js\"",
748
772
  "lint-prettier-typescript": "prettier --check --parser typescript \"./**/*.ts\"",
773
+ "lint-prettier-yml": "prettier --check \"./**/*.{yml,yaml}\"",
749
774
  "lint-tsc": "tsc --noEmit",
750
775
  "pre-commit": "pnpm run command pre-commit-2",
751
776
  "prepare": "husky",
@@ -762,32 +787,38 @@ var package_default = {
762
787
  "use-local-utility": "pnpm run prepare-local-utility"
763
788
  },
764
789
  dependencies: {
765
- "@alextheman/utility": "^4.3.6",
790
+ "@alextheman/utility": "^4.4.2",
766
791
  "commander": "^14.0.2",
767
792
  "dotenv": "^17.2.3",
768
793
  "dotenv-stringify": "^3.0.1",
769
794
  "execa": "^9.6.1",
795
+ "libsodium-wrappers": "^0.8.0",
770
796
  "update-notifier": "^7.3.1",
771
- "zod": "^4.3.4"
797
+ "zod": "^4.3.5"
772
798
  },
773
799
  devDependencies: {
774
800
  "@alextheman/eslint-plugin": "^5.4.2",
775
801
  "@types/eslint": "^9.6.1",
802
+ "@types/libsodium-wrappers": "^0.7.14",
776
803
  "@types/node": "^25.0.3",
777
804
  "@types/update-notifier": "^6.0.8",
778
805
  "dotenv-cli": "^11.0.0",
779
806
  "eslint": "^9.39.2",
780
- "eslint-plugin-perfectionist": "^5.2.0",
807
+ "eslint-plugin-perfectionist": "^5.3.1",
781
808
  "husky": "^9.1.7",
782
809
  "prettier": "^3.7.4",
783
810
  "tempy": "^3.1.0",
784
811
  "ts-node": "^10.9.2",
785
- "tsdown": "0.19.0-beta.1",
812
+ "tsdown": "^0.18.4",
786
813
  "typescript": "^5.9.3",
787
- "vite-tsconfig-paths": "^6.0.3",
814
+ "vite-tsconfig-paths": "^6.0.4",
788
815
  "vitest": "^4.0.16"
789
816
  },
790
- 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
+ }
791
822
  };
792
823
 
793
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-with-key.ts
327
+ function encryptWithKey(program$1) {
328
+ program$1.command("encrypt-with-key").alias("encrypt").description("Encrypt a secret given the public base64 key and the thing you want to encrypt.").argument("<key>", "The public base64 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_with_key_default = encryptWithKey;
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
+ encryptWithKey: encrypt_with_key_default,
656
678
  getVersionType: get_version_type_default,
657
679
  gitPostMergeCleanup: git_post_merge_cleanup_default,
658
680
  incrementVersion: increment_version_default,
@@ -666,14 +688,14 @@ var commands_default = createCommands;
666
688
 
667
689
  //#endregion
668
690
  //#region package.json
669
- var version = "1.16.1";
691
+ var version = "1.17.1";
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",
@@ -705,14 +727,16 @@ var package_default = {
705
727
  "create-release-note-patch": "git pull origin main && pnpm run command create-release-note patch",
706
728
  "format": "pnpm run format-prettier && pnpm run format-eslint",
707
729
  "format-eslint": "eslint --fix --suppress-all \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\" && rm -f eslint-suppressions.json",
708
- "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",
709
731
  "format-prettier-javascript": "prettier --write \"./**/*.js\"",
710
732
  "format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
733
+ "format-prettier-yml": "prettier --write \"./**/*.{yml,yaml}\"",
711
734
  "lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier",
712
735
  "lint-eslint": "eslint \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\"",
713
- "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",
714
737
  "lint-prettier-javascript": "prettier --check \"./**.js\"",
715
738
  "lint-prettier-typescript": "prettier --check --parser typescript \"./**/*.ts\"",
739
+ "lint-prettier-yml": "prettier --check \"./**/*.{yml,yaml}\"",
716
740
  "lint-tsc": "tsc --noEmit",
717
741
  "pre-commit": "pnpm run command pre-commit-2",
718
742
  "prepare": "husky",
@@ -729,32 +753,38 @@ var package_default = {
729
753
  "use-local-utility": "pnpm run prepare-local-utility"
730
754
  },
731
755
  dependencies: {
732
- "@alextheman/utility": "^4.3.6",
756
+ "@alextheman/utility": "^4.4.2",
733
757
  "commander": "^14.0.2",
734
758
  "dotenv": "^17.2.3",
735
759
  "dotenv-stringify": "^3.0.1",
736
760
  "execa": "^9.6.1",
761
+ "libsodium-wrappers": "^0.8.0",
737
762
  "update-notifier": "^7.3.1",
738
- "zod": "^4.3.4"
763
+ "zod": "^4.3.5"
739
764
  },
740
765
  devDependencies: {
741
766
  "@alextheman/eslint-plugin": "^5.4.2",
742
767
  "@types/eslint": "^9.6.1",
768
+ "@types/libsodium-wrappers": "^0.7.14",
743
769
  "@types/node": "^25.0.3",
744
770
  "@types/update-notifier": "^6.0.8",
745
771
  "dotenv-cli": "^11.0.0",
746
772
  "eslint": "^9.39.2",
747
- "eslint-plugin-perfectionist": "^5.2.0",
773
+ "eslint-plugin-perfectionist": "^5.3.1",
748
774
  "husky": "^9.1.7",
749
775
  "prettier": "^3.7.4",
750
776
  "tempy": "^3.1.0",
751
777
  "ts-node": "^10.9.2",
752
- "tsdown": "0.19.0-beta.1",
778
+ "tsdown": "^0.18.4",
753
779
  "typescript": "^5.9.3",
754
- "vite-tsconfig-paths": "^6.0.3",
780
+ "vite-tsconfig-paths": "^6.0.4",
755
781
  "vitest": "^4.0.16"
756
782
  },
757
- 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
+ }
758
788
  };
759
789
 
760
790
  //#endregion
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "alex-c-line",
3
- "version": "1.16.1",
3
+ "version": "1.17.1",
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",
@@ -33,29 +33,31 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@alextheman/utility": "^4.3.6",
36
+ "@alextheman/utility": "^4.4.2",
37
37
  "commander": "^14.0.2",
38
38
  "dotenv": "^17.2.3",
39
39
  "dotenv-stringify": "^3.0.1",
40
40
  "execa": "^9.6.1",
41
+ "libsodium-wrappers": "^0.8.0",
41
42
  "update-notifier": "^7.3.1",
42
- "zod": "^4.3.4"
43
+ "zod": "^4.3.5"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@alextheman/eslint-plugin": "^5.4.2",
46
47
  "@types/eslint": "^9.6.1",
48
+ "@types/libsodium-wrappers": "^0.7.14",
47
49
  "@types/node": "^25.0.3",
48
50
  "@types/update-notifier": "^6.0.8",
49
51
  "dotenv-cli": "^11.0.0",
50
52
  "eslint": "^9.39.2",
51
- "eslint-plugin-perfectionist": "^5.2.0",
53
+ "eslint-plugin-perfectionist": "^5.3.1",
52
54
  "husky": "^9.1.7",
53
55
  "prettier": "^3.7.4",
54
56
  "tempy": "^3.1.0",
55
57
  "ts-node": "^10.9.2",
56
- "tsdown": "0.19.0-beta.1",
58
+ "tsdown": "^0.18.4",
57
59
  "typescript": "^5.9.3",
58
- "vite-tsconfig-paths": "^6.0.3",
60
+ "vite-tsconfig-paths": "^6.0.4",
59
61
  "vitest": "^4.0.16"
60
62
  },
61
63
  "scripts": {
@@ -66,14 +68,16 @@
66
68
  "create-release-note-patch": "git pull origin main && pnpm run command create-release-note patch",
67
69
  "format": "pnpm run format-prettier && pnpm run format-eslint",
68
70
  "format-eslint": "eslint --fix --suppress-all \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\" && rm -f eslint-suppressions.json",
69
- "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",
70
72
  "format-prettier-javascript": "prettier --write \"./**/*.js\"",
71
73
  "format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
74
+ "format-prettier-yml": "prettier --write \"./**/*.{yml,yaml}\"",
72
75
  "lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier",
73
76
  "lint-eslint": "eslint \"package.json\" \"src/**/*.ts\" \"tests/**/*.ts\"",
74
- "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",
75
78
  "lint-prettier-javascript": "prettier --check \"./**.js\"",
76
79
  "lint-prettier-typescript": "prettier --check --parser typescript \"./**/*.ts\"",
80
+ "lint-prettier-yml": "prettier --check \"./**/*.{yml,yaml}\"",
77
81
  "lint-tsc": "tsc --noEmit",
78
82
  "pre-commit": "pnpm run command pre-commit-2",
79
83
  "prepare-live-eslint-plugin": "pnpm uninstall @alextheman/eslint-plugin && pnpm install --save-dev @alextheman/eslint-plugin",