@benshawmean/envedit 1.3.2-2 → 1.3.5

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/.gitlab-ci.yml CHANGED
@@ -1,13 +1,14 @@
1
1
  stages:
2
2
  - test
3
3
  - publish
4
+ - release
4
5
 
5
6
  workflow:
6
7
  rules:
7
8
  - if: $CI_COMMIT_BRANCH
8
9
  - if: $CI_COMMIT_TAG
9
10
 
10
- default:
11
+ .base: &default
11
12
  image: oven/bun:debian
12
13
  before_script:
13
14
  - apt-get update -y > /dev/null
@@ -21,6 +22,7 @@ variables:
21
22
  VERSION_REGEX: /^v\d+\.\d+\.\d+(-\S*)?$/
22
23
 
23
24
  test:
25
+ <<: *default
24
26
  stage: test
25
27
 
26
28
  rules:
@@ -48,6 +50,8 @@ test:
48
50
  path: ./coverage/cobertura-coverage.xml
49
51
 
50
52
  publish:
53
+ <<: *default
54
+
51
55
  stage: publish
52
56
 
53
57
  id_tokens:
@@ -83,8 +87,42 @@ publish:
83
87
  - bunx npm publish ${PUBLISH_FLAGS[*]} package.tgz
84
88
  - sh ci/npm.sh
85
89
  - bun publish ${PUBLISH_FLAGS[*]} package.tgz
86
- - rm package.tgz .npmrc
87
-
90
+ after_script:
91
+ - echo "Preparing environment variables for release job"
92
+ - echo "PACKAGE_NAME=$PACKAGE_NAME" >> variables.env
93
+ - echo "CURR_VER=$CURR_VER" >> variables.env
94
+ - echo "IS_PRE_RELEASE=$IS_PRE_RELEASE" >> variables.env
95
+ - bunx git-cliff -r . > CI-CHANGELOG.md
96
+ artifacts:
97
+ paths:
98
+ - CI-CHANGELOG.md
99
+ reports:
100
+ dotenv: variables.env
88
101
  allow_failure:
89
102
  exit_codes:
90
103
  - 9001
104
+
105
+ release:
106
+ stage: release
107
+
108
+ image: registry.gitlab.com/gitlab-org/cli:latest
109
+
110
+ rules:
111
+ - if: $CI_COMMIT_REF_PROTECTED && $CI_COMMIT_TAG && $CI_COMMIT_TAG =~ $VERSION_REGEX
112
+
113
+ needs:
114
+ - job: publish
115
+ artifacts: true
116
+
117
+ script:
118
+ - echo "running release_job"
119
+
120
+ release:
121
+ name: "Release $CI_COMMIT_TAG"
122
+ tag_name: '$CI_COMMIT_TAG'
123
+ description: CI-CHANGELOG.md
124
+ assets:
125
+ links:
126
+ - name: "General NPM Registry Release"
127
+ url: "https://www.npmjs.com/package/$PACKAGE_NAME/v/$CI_COMMIT_TAG"
128
+ link_type: package
package/CHANGELOG.md ADDED
@@ -0,0 +1,168 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.3.4] - 2026-09-05
9
+
10
+ ### Bug Fixes
11
+ - Fix "before_script" from failing
12
+
13
+ ### Changed
14
+ - Make some needed changes
15
+ - V1.3.4
16
+
17
+ ## [1.3.3] - 2026-09-05
18
+
19
+ ### Added
20
+ - Add in automated release pipelines
21
+
22
+ ### Bug Fixes
23
+ - Ensure that the process is running with bun
24
+
25
+ ### Changed
26
+ - Show how to add JSON support
27
+ - V1.3.3
28
+
29
+ ### Documentation
30
+ - Add documentation for JetBrains IDE
31
+
32
+ ## [1.3.2-2] - 2026-08-20
33
+
34
+ ### Bug Fixes
35
+ - Fix ci/cd pipeline
36
+
37
+ ### Changed
38
+ - V1.3.2-2
39
+
40
+ ## [1.3.2-1] - 2026-08-20
41
+
42
+ ### Changed
43
+ - V1.3.2-1
44
+
45
+ ### Continuous Integration
46
+ - Fix deploy tags
47
+
48
+ ## [1.3.2-0] - 2026-08-20
49
+
50
+ ### Changed
51
+ - V1.3.2-0
52
+
53
+ ### Refactor
54
+ - Refactor
55
+
56
+ ## [1.3.1] - 2026-08-20
57
+
58
+ ### Changed
59
+ - V1.3.1
60
+
61
+ ### Refactor
62
+ - Do some refactoring of the code to ensure everything works properly
63
+ - Refactor(test)
64
+
65
+ ## [1.3.0] - 2026-08-19
66
+
67
+ ### Changed
68
+ - I hate testing stuff oml
69
+ - Only print failures
70
+ - V1.3.0
71
+
72
+ ## [1.2.3] - 2026-08-16
73
+
74
+ ### Changed
75
+ - Edit README.md
76
+ - V1.2.3
77
+
78
+ ### Refactor
79
+ - Update logging utilities
80
+
81
+ ## [1.2.2] - 2026-08-09
82
+
83
+ ### Changed
84
+ - V1.2.2
85
+
86
+ ### Continuous Integration
87
+ - Try and fix CI pipelines
88
+
89
+ ## [1.2.1] - 2026-08-08
90
+
91
+ ### Changed
92
+ - Try and get this to work because otherwise its gonna piss me off
93
+ - V1.2.1
94
+
95
+ ## [1.2.0] - 2026-08-08
96
+
97
+ ### Changed
98
+ - Lets try this one more time
99
+ - V1.2.0
100
+
101
+ ## [1.1.4] - 2026-08-08
102
+
103
+ ### Changed
104
+ - Try and fix the issue
105
+ - V1.1.4
106
+
107
+ ### Removed
108
+ - Remove "semver.ts" as Bun natively handles version bumping
109
+
110
+ ## [1.1.3] - 2026-08-08
111
+
112
+ ### Changed
113
+ - Do some more changes to reduce the size of the package
114
+ - V1.1.3
115
+
116
+ ### Continuous Integration
117
+ - Make the code a bit more readable
118
+ - Disable testing on tag pushes
119
+ - Add some more checks
120
+ - Try and fix CI prevention
121
+ - Allow global multiline checks
122
+ - Fix regex
123
+ - Try to fix ci prevention
124
+
125
+ ## [1.1.2] - 2026-08-08
126
+
127
+ ### Added
128
+ - Add in automated deployment systems into the pipeline
129
+
130
+ ### Bug Fixes
131
+ - Fix some bugs with selecting active enviornments
132
+ - Fix package.json
133
+
134
+ ### Changed
135
+ - Initial Commit
136
+ - Prepare deployment for the code!
137
+ - Make executable
138
+ - Try again!
139
+ - This is pissing me off
140
+ - Try and prepare new pipeline maybe?
141
+ - Allow for better release deployments using a singular connection
142
+ - Try to do more fixes
143
+ - V1.1.2
144
+
145
+ ### Documentation
146
+ - Fix up some documentation and other files to make the project look cleaner
147
+
148
+ ### Refactor
149
+ - Handle saving and loading config files within the Config class
150
+ - (refactor)
151
+
152
+ ### Testing
153
+ - Add in testing abilities
154
+
155
+ [1.3.4]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.3.3...v1.3.4
156
+ [1.3.3]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.3.2-2...v1.3.3
157
+ [1.3.2-2]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.3.2-1...v1.3.2-2
158
+ [1.3.2-1]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.3.2-0...v1.3.2-1
159
+ [1.3.2-0]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.3.1...v1.3.2-0
160
+ [1.3.1]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.3.0...v1.3.1
161
+ [1.3.0]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.2.3...v1.3.0
162
+ [1.2.3]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.2.2...v1.2.3
163
+ [1.2.2]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.2.1...v1.2.2
164
+ [1.2.1]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.2.0...v1.2.1
165
+ [1.2.0]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.1.4...v1.2.0
166
+ [1.1.4]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.1.3...v1.1.4
167
+ [1.1.3]: https://gitlab.com/benshawmean/BanManagerWebUIv2/-/compare/v1.1.2...v1.1.3
168
+
package/README.md CHANGED
@@ -51,6 +51,47 @@ and selecting the environment you want to use from the list of available environ
51
51
  envedit use
52
52
  ```
53
53
 
54
+ ## Schema
55
+
56
+ I have released a JSON Schema spec. file for the outputted file. It can be found at <https://benshawmean.com/api/schema/envedit>.
57
+
58
+
59
+ ### IDE Support for Schema
60
+
61
+ To add validation and description support for the schema, please try the following things:
62
+
63
+ #### VSCode
64
+
65
+ For VSCode (and/or VSCode Insiders), add the following to your `settings.json` file:
66
+
67
+ ```json
68
+ "json.schemaDownload.trustedDomains": {
69
+ "https://benshawmean.com/": true,
70
+ },
71
+ "json.schemas": [
72
+ {
73
+ "fileMatch": ["**/env.config.yaml"],
74
+ "url": "https://benshawmean.com/api/schema/envedit",
75
+ }
76
+ ],
77
+ "yaml.schemas": {
78
+ "https://benshawmean.com/api/schema/envedit": "**/env.config.yaml"
79
+ }
80
+ ```
81
+
82
+ #### JetBrains IDEs
83
+
84
+ For JetBrains IDEs, you can do this by doing these steps:
85
+
86
+ 1. In Settings, head to Languages & Frameworks > Schemas and DTDs > JSON Schema Mappings
87
+ 2. Click the + (Add) icon
88
+ 3. Name your mapping "EnvEdit"
89
+ 4. Provide the URL `https://benshawmean.com/api/schema/envedit`
90
+ 5. Define the file path pattern `**/env.config.yaml`
91
+ 6. Click OK
92
+
93
+ Do note that this is on a project level, so you will need to do this for each project you want to use the schema in.
94
+
54
95
  ## License
55
96
 
56
97
  This project is licensed under the GNU General Public License version 3.
package/cli/index.ts CHANGED
@@ -2,7 +2,11 @@
2
2
  import yargs from "yargs";
3
3
  import { hideBin } from "yargs/helpers";
4
4
 
5
- import Commands from "./cmd";
5
+ if (!process.isBun) {
6
+ const [red, reset] = process.stdout.isTTY && process.env.TERM !== "dumb" ? ["\x1b[31m", "\x1b[0m"] : ["", ""];
7
+ console.error(`${red}This script is intended to be run with Bun.${reset}`);
8
+ process.exit(1);
9
+ }
6
10
 
7
11
  await yargs(hideBin(process.argv))
8
12
  .option("level", {
@@ -14,7 +18,7 @@ await yargs(hideBin(process.argv))
14
18
  .env('ENVEDIT')
15
19
  .scriptName("envedit")
16
20
  .usage("Usage: $0 <command>")
17
- .command(Commands)
21
+ .command(await import("./cmd/index.ts").then((mod) => mod.default))
18
22
  .showHelpOnFail(false)
19
23
  .demandCommand()
20
24
  .strict()
package/cliff.toml ADDED
@@ -0,0 +1,151 @@
1
+ [remote.gitlab]
2
+ owner = "benshawmean"
3
+ repo = "BanManagerWebUIv2"
4
+
5
+ [bump]
6
+ features_always_bump_minor = true
7
+ breaking_always_bump_major = true
8
+ initial_tag = "0.1.0"
9
+
10
+ [changelog]
11
+ # A Tera template to be rendered as the changelog's header.
12
+ # See https://keats.github.io/tera/#getting-started
13
+ header = """
14
+ # Changelog\n
15
+ All notable changes to this project will be documented in this file.
16
+
17
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
18
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
19
+ """
20
+ # A Tera template to be rendered for each release in the changelog.
21
+ # See https://keats.github.io/tera/#getting-started
22
+ body = """
23
+ {%- macro project_url() -%}
24
+ {%- set ci_project_url = get_env(name="CI_PROJECT_URL", default="") -%}
25
+ {%- if ci_project_url != "" -%}
26
+ {{ ci_project_url }}
27
+ {%- elif remote.gitlab.api_url and remote.gitlab.owner and remote.gitlab.repo -%}
28
+ {{ remote.gitlab.api_url | trim_end_matches(pat="/api/v4") }}/{{ remote.gitlab.owner }}/{{ remote.gitlab.repo }}
29
+ {%- elif remote.gitlab.owner and remote.gitlab.repo -%}
30
+ https://gitlab.com/{{ remote.gitlab.owner }}/{{ remote.gitlab.repo }}
31
+ {%- else -%}
32
+
33
+ {%- endif -%}
34
+ {%- endmacro -%}
35
+
36
+ {% if version -%}
37
+ ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
38
+ {% else -%}
39
+ ## [Unreleased]
40
+ {% endif -%}
41
+
42
+ {% for group, commits in commits | group_by(attribute="group") %}
43
+ ### {{ group | upper_first }}
44
+ {%- for commit in commits %}
45
+ - {{ commit.message | split(pat="\n") | first | upper_first | trim }}\
46
+ {% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}
47
+ {% if commit.remote.pr_number %} in \
48
+ [!{{ commit.remote.pr_number }}]({{ self::project_url() }}/-/merge_requests/{{ commit.remote.pr_number }}) \
49
+ {%- endif -%}
50
+ {% endfor %}
51
+ {% endfor %}
52
+
53
+ {%- if gitlab.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
54
+ ### New Contributors
55
+ {%- endif -%}
56
+
57
+ {% for contributor in gitlab.contributors | filter(attribute="is_first_time", value=true) %}
58
+ * @{{ contributor.username }} made their first contribution
59
+ {%- if contributor.pr_number %} in \
60
+ [!{{ contributor.pr_number }}]({{ self::project_url() }}/-/merge_requests/{{ contributor.pr_number }}) \
61
+ {%- endif %}
62
+ {%- endfor %}\n
63
+
64
+ {%- if gitlab.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}{% raw %}\n{% endraw -%}{% endif %}
65
+
66
+ """
67
+ # A Tera template to be rendered as the changelog's footer.
68
+ # See https://keats.github.io/tera/#getting-started
69
+ footer = """
70
+ {%- macro project_url() -%}
71
+ {%- set ci_project_url = get_env(name="CI_PROJECT_URL", default="") -%}
72
+ {%- if ci_project_url != "" -%}
73
+ {{ ci_project_url }}
74
+ {%- elif remote.gitlab.api_url and remote.gitlab.owner and remote.gitlab.repo -%}
75
+ {{ remote.gitlab.api_url | trim_end_matches(pat="/api/v4") }}/{{ remote.gitlab.owner }}/{{ remote.gitlab.repo }}
76
+ {%- elif remote.gitlab.owner and remote.gitlab.repo -%}
77
+ https://gitlab.com/{{ remote.gitlab.owner }}/{{ remote.gitlab.repo }}
78
+ {%- else -%}
79
+
80
+ {%- endif -%}
81
+ {%- endmacro -%}
82
+
83
+ {% for release in releases -%}
84
+ {% if release.version -%}
85
+ {% if release.previous.version -%}
86
+ [{{ release.version | trim_start_matches(pat="v") }}]: \
87
+ {{ self::project_url() }}/-/compare/{{ release.previous.version }}...{{ release.version }}
88
+ {% endif -%}
89
+ {% else -%}
90
+ [unreleased]: {{ self::project_url() }}/-/compare/{{ release.previous.version }}...HEAD
91
+ {% endif -%}
92
+ {% endfor %}
93
+ """
94
+ # Remove leading and trailing whitespaces from the changelog's body.
95
+ trim = true
96
+ output = "CHANGELOG.md"
97
+ postprocessors = [
98
+ { pattern = "\\s+\\* @Benjamin made their first contribution", replace = "" },
99
+ { pattern = "Benjamin", replace = "benshawmean" },
100
+ ]
101
+
102
+ [git]
103
+ conventional_commits = true
104
+ filter_unconventional = false
105
+ require_conventional = false
106
+ split_commits = false
107
+ commit_parsers = [
108
+ { message = "^\\(*feat", group = "Features" },
109
+ { message = "^\\(*fix", group = "Bug Fixes" },
110
+ { message = "^\\(*doc", group = "Documentation" },
111
+ { message = "^\\(*perf", group = "Performance" },
112
+ { message = "^\\(*refactor", group = "Refactor" },
113
+ { message = "^\\(*style", group = "Styling" },
114
+ { message = "^\\(*test", group = "Testing" },
115
+ { message = "^\\(*chore", group = "Chores" },
116
+ { message = "^\\(*ci", group = "Continuous Integration" },
117
+ { message = "^\\(*build", group = "Build System" },
118
+ { message = "^\\(*revert", group = "Reverts" },
119
+ { message = "^[a|A]dd", group = "Added" },
120
+ { message = "^[s|S]upport", group = "Added" },
121
+ { message = "^[r|R]emove", group = "Removed" },
122
+ { message = "^.*: add", group = "Added" },
123
+ { message = "^.*: support", group = "Added" },
124
+ { message = "^.*: remove", group = "Removed" },
125
+ { message = "^.*: delete", group = "Removed" },
126
+ { message = "^test", group = "Fixed" },
127
+ { message = "^fix", group = "Fixed" },
128
+ { message = "^.*: fix", group = "Fixed" },
129
+ { message = "^.*", group = "Changed" },
130
+ ]
131
+ protect_breaking_commits = false
132
+ filter_commits = false
133
+ fail_on_unmatched_commit = false
134
+ tag_pattern = "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9]+(\\.[a-zA-Z0-9]+)*)?$"
135
+
136
+ topo_order = false
137
+ topo_order_commits = true
138
+ sort_commits = "oldest"
139
+ link_parsers = [
140
+ { pattern = "RFC(\\d+)", text = "ietf-rfc$1", href = "https://datatracker.ietf.org/doc/html/rfc$1" },
141
+ ]
142
+ processing_order = [
143
+ "commit_preprocessors",
144
+ "split_commits",
145
+ "conventional_commits",
146
+ "commit_parsers",
147
+ "link_parsers",
148
+ ]
149
+ limit_commits = 1000
150
+ recurse_submodules = false
151
+ exclude_paths = ["unrelated/"]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@benshawmean/envedit",
3
3
  "type": "module",
4
- "version": "1.3.2-2",
4
+ "version": "1.3.5",
5
5
  "license": "GPL-3.0-only",
6
6
  "bin": {
7
7
  "envedit": "cli/index.ts"