opencommit 2.2.10 → 2.4.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.
@@ -27411,10 +27411,10 @@ function G3(t, e2) {
27411
27411
  }
27412
27412
 
27413
27413
  // src/commands/config.ts
27414
- var import_path = require("path");
27415
- var import_ini = __toESM(require_ini(), 1);
27416
27414
  var import_fs = require("fs");
27415
+ var import_ini = __toESM(require_ini(), 1);
27417
27416
  var import_os = require("os");
27417
+ var import_path = require("path");
27418
27418
 
27419
27419
  // src/i18n/en.json
27420
27420
  var en_default = {
@@ -27699,8 +27699,21 @@ var configValidators = {
27699
27699
  ["OCO_MODEL" /* OCO_MODEL */](value) {
27700
27700
  validateConfig(
27701
27701
  "OCO_MODEL" /* OCO_MODEL */,
27702
- ["gpt-3.5-turbo", "gpt-4"].includes(value),
27703
- `${value} is not supported yet, use 'gpt-4' or 'gpt-3.5-turbo' (default)`
27702
+ [
27703
+ "gpt-3.5-turbo",
27704
+ "gpt-4",
27705
+ "gpt-3.5-turbo-16k",
27706
+ "gpt-3.5-turbo-0613"
27707
+ ].includes(value),
27708
+ `${value} is not supported yet, use 'gpt-4', 'gpt-3.5-turbo-0613', 'gpt-3.5-turbo-0613' or 'gpt-3.5-turbo' (default)`
27709
+ );
27710
+ return value;
27711
+ },
27712
+ ["OCO_MESSAGE_TEMPLATE_PLACEHOLDER" /* OCO_MESSAGE_TEMPLATE_PLACEHOLDER */](value) {
27713
+ validateConfig(
27714
+ "OCO_MESSAGE_TEMPLATE_PLACEHOLDER" /* OCO_MESSAGE_TEMPLATE_PLACEHOLDER */,
27715
+ value.startsWith("$"),
27716
+ `${value} must start with $, for example: '$msg'`
27704
27717
  );
27705
27718
  return value;
27706
27719
  }
@@ -27713,8 +27726,9 @@ var getConfig = () => {
27713
27726
  OCO_OPENAI_BASE_PATH: process.env.OCO_OPENAI_BASE_PATH,
27714
27727
  OCO_DESCRIPTION: process.env.OCO_DESCRIPTION === "true" ? true : false,
27715
27728
  OCO_EMOJI: process.env.OCO_EMOJI === "true" ? true : false,
27716
- OCO_MODEL: process.env.OCO_MODEL || "gpt-3.5-turbo",
27717
- OCO_LANGUAGE: process.env.OCO_LANGUAGE || "en"
27729
+ OCO_MODEL: process.env.OCO_MODEL || "gpt-3.5-turbo-16k",
27730
+ OCO_LANGUAGE: process.env.OCO_LANGUAGE || "en",
27731
+ OCO_MESSAGE_TEMPLATE_PLACEHOLDER: process.env.OCO_MESSAGE_TEMPLATE_PLACEHOLDER || "$msg"
27718
27732
  };
27719
27733
  const configExists = (0, import_fs.existsSync)(configPath);
27720
27734
  if (!configExists)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencommit",
3
- "version": "2.2.10",
3
+ "version": "2.4.1",
4
4
  "description": "Auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
5
5
  "keywords": [
6
6
  "git",
@@ -41,7 +41,7 @@
41
41
  "start": "node ./out/cli.cjs",
42
42
  "dev": "ts-node ./src/cli.ts",
43
43
  "build": "rimraf out && node esbuild.config.js",
44
- "deploy": "npm run build:push && git push --tags && npm publish --tag latest",
44
+ "deploy": "npm run build:push && npm version patch && git push --tags && npm publish --tag latest",
45
45
  "build:push": "npm run build && git add . && git commit -m 'build' && git push",
46
46
  "lint": "eslint src --ext ts && tsc --noEmit",
47
47
  "format": "prettier --write src"