repokeeper 0.1.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.
Files changed (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +54 -0
  3. package/dist/cli.js +106 -0
  4. package/dist/commands/check.js +45 -0
  5. package/dist/commands/context.js +7 -0
  6. package/dist/commands/init.js +89 -0
  7. package/dist/commands/report.js +27 -0
  8. package/dist/commands/update.js +42 -0
  9. package/dist/config/load.js +99 -0
  10. package/dist/config/schema.js +45 -0
  11. package/dist/config/types.js +21 -0
  12. package/dist/errors.js +26 -0
  13. package/dist/git.js +44 -0
  14. package/dist/model.js +21 -0
  15. package/dist/modules/ci.js +5 -0
  16. package/dist/modules/commits.js +35 -0
  17. package/dist/modules/deps.js +5 -0
  18. package/dist/modules/editorconfig.js +44 -0
  19. package/dist/modules/gitignore.js +20 -0
  20. package/dist/modules/health.js +58 -0
  21. package/dist/modules/hooks.js +41 -0
  22. package/dist/modules/index.js +18 -0
  23. package/dist/modules/release.js +10 -0
  24. package/dist/plan.js +19 -0
  25. package/dist/platforms/github.js +168 -0
  26. package/dist/stacks/dart.js +35 -0
  27. package/dist/stacks/dotnet.js +47 -0
  28. package/dist/stacks/index.js +23 -0
  29. package/dist/stacks/java.js +52 -0
  30. package/dist/stacks/node.js +81 -0
  31. package/dist/stacks/python.js +68 -0
  32. package/dist/stacks/script.js +29 -0
  33. package/dist/stacks/support.js +50 -0
  34. package/dist/stacks/types.js +1 -0
  35. package/dist/sync/apply.js +82 -0
  36. package/dist/sync/block.js +51 -0
  37. package/dist/sync/decide.js +21 -0
  38. package/dist/sync/hash.js +8 -0
  39. package/dist/sync/json.js +31 -0
  40. package/dist/sync/lock.js +40 -0
  41. package/dist/sync/state.js +50 -0
  42. package/dist/sync/sync.js +32 -0
  43. package/dist/sync/yaml.js +49 -0
  44. package/dist/templates.js +6 -0
  45. package/dist/version.js +23 -0
  46. package/package.json +56 -0
  47. package/templates/CODE_OF_CONDUCT.md +83 -0
  48. package/templates/gitignore/Dart.gitignore +29 -0
  49. package/templates/gitignore/Gradle.gitignore +21 -0
  50. package/templates/gitignore/Java.gitignore +24 -0
  51. package/templates/gitignore/Maven.gitignore +17 -0
  52. package/templates/gitignore/Node.gitignore +149 -0
  53. package/templates/gitignore/Python.gitignore +220 -0
  54. package/templates/gitignore/VisualStudio.gitignore +432 -0
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "repokeeper",
3
+ "version": "0.1.0",
4
+ "description": "Keep every repository on one maintained standard: commits, git hooks, CI, releases, dependency updates and repo settings.",
5
+ "type": "module",
6
+ "bin": {
7
+ "repokeeper": "dist/cli.js"
8
+ },
9
+ "files": [
10
+ "dist/",
11
+ "templates/"
12
+ ],
13
+ "engines": {
14
+ "node": ">=22.12.0"
15
+ },
16
+ "scripts": {
17
+ "build": "tsc -p tsconfig.build.json",
18
+ "typecheck": "tsc -p tsconfig.json --noEmit",
19
+ "lint": "biome check .",
20
+ "format": "biome check --write .",
21
+ "test": "vitest run",
22
+ "standard": "node dist/cli.js check",
23
+ "prepublishOnly": "npm run typecheck && npm run lint && npm test && npm run build"
24
+ },
25
+ "dependencies": {
26
+ "ajv": "^8.20.0",
27
+ "yaml": "^2.9.1"
28
+ },
29
+ "devDependencies": {
30
+ "@biomejs/biome": "2.5.14",
31
+ "@commitlint/cli": "^21.2.3",
32
+ "@commitlint/config-conventional": "^21.2.3",
33
+ "@types/node": "^22.20.4",
34
+ "lefthook": "^2.1.14",
35
+ "typescript": "^7.0.2",
36
+ "vitest": "^5.0.2"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/vannt-dev/repokeeper.git"
41
+ },
42
+ "homepage": "https://github.com/vannt-dev/repokeeper#readme",
43
+ "bugs": {
44
+ "url": "https://github.com/vannt-dev/repokeeper/issues"
45
+ },
46
+ "keywords": [
47
+ "repository",
48
+ "standard",
49
+ "conventional-commits",
50
+ "lefthook",
51
+ "github-actions",
52
+ "dependabot"
53
+ ],
54
+ "author": "vannt-dev",
55
+ "license": "MIT"
56
+ }
@@ -0,0 +1,83 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
22
+ * Trolling, insulting or derogatory comments, and personal or political attacks
23
+ * Public or private harassment
24
+ * Publishing others' private information, such as a physical or email address, without their explicit permission
25
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Enforcement Responsibilities
28
+
29
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
+
33
+ ## Scope
34
+
35
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
+
37
+ ## Enforcement
38
+
39
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.
40
+
41
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
+
43
+ ## Enforcement Guidelines
44
+
45
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
+
47
+ ### 1. Correction
48
+
49
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
+
51
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
+
53
+ ### 2. Warning
54
+
55
+ **Community Impact**: A violation through a single incident or series of actions.
56
+
57
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
+
59
+ ### 3. Temporary Ban
60
+
61
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
+
63
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
+
65
+ ### 4. Permanent Ban
66
+
67
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
+
69
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
70
+
71
+ ## Attribution
72
+
73
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74
+
75
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76
+
77
+ For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78
+
79
+ [homepage]: https://www.contributor-covenant.org
80
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81
+ [Mozilla CoC]: https://github.com/mozilla/diversity
82
+ [FAQ]: https://www.contributor-covenant.org/faq
83
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,29 @@
1
+ # See https://www.dartlang.org/guides/libraries/private-files
2
+
3
+ # Files and directories created by pub
4
+ .dart_tool/
5
+ .packages
6
+ build/
7
+ # If you're building an application, you may want to check-in your pubspec.lock
8
+ pubspec.lock
9
+
10
+ # Directory created by dartdoc
11
+ # If you don't generate documentation locally you can remove this line.
12
+ doc/api/
13
+
14
+ # dotenv environment variables file
15
+ .env*
16
+
17
+ # Avoid committing generated Javascript files:
18
+ *.dart.js
19
+ # Produced by the --dump-info flag.
20
+ *.info.json
21
+ # When generated by dart2js. Don't specify *.js if your
22
+ # project includes source files written in JavaScript.
23
+ *.js
24
+ *.js_
25
+ *.js.deps
26
+ *.js.map
27
+
28
+ .flutter-plugins
29
+ .flutter-plugins-dependencies
@@ -0,0 +1,21 @@
1
+ .gradle
2
+ **/build/
3
+ !**/src/**/build/
4
+
5
+ # Ignore Gradle GUI config
6
+ gradle-app.setting
7
+
8
+ # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
9
+ !gradle-wrapper.jar
10
+
11
+ # Avoid ignore Gradle wrapper properties
12
+ !gradle-wrapper.properties
13
+
14
+ # Cache of project
15
+ .gradletasknamecache
16
+
17
+ # Eclipse Gradle plugin generated files
18
+ # Eclipse Core
19
+ .project
20
+ # JDT-specific (Eclipse Java Development Tools)
21
+ .classpath
@@ -0,0 +1,24 @@
1
+ # Compiled class file
2
+ *.class
3
+
4
+ # Log file
5
+ *.log
6
+
7
+ # BlueJ files
8
+ *.ctxt
9
+
10
+ # Mobile Tools for Java (J2ME)
11
+ .mtj.tmp/
12
+
13
+ # Package Files #
14
+ *.jar
15
+ *.war
16
+ *.nar
17
+ *.ear
18
+ *.zip
19
+ *.tar.gz
20
+ *.rar
21
+
22
+ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23
+ hs_err_pid*
24
+ replay_pid*
@@ -0,0 +1,17 @@
1
+ target/
2
+ pom.xml.tag
3
+ pom.xml.releaseBackup
4
+ pom.xml.versionsBackup
5
+ pom.xml.next
6
+ release.properties
7
+ dependency-reduced-pom.xml
8
+ buildNumber.properties
9
+ .mvn/timing.properties
10
+ # https://maven.apache.org/tools/wrapper/#Usage_with_or_without_Binary_JAR
11
+ .mvn/wrapper/maven-wrapper.jar
12
+
13
+ # Eclipse m2e generated files
14
+ # Eclipse Core
15
+ .project
16
+ # JDT-specific (Eclipse Java Development Tools)
17
+ .classpath
@@ -0,0 +1,149 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ lerna-debug.log*
8
+
9
+ # Diagnostic reports (https://nodejs.org/api/report.html)
10
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11
+
12
+ # Runtime data
13
+ pids
14
+ *.pid
15
+ *.seed
16
+ *.pid.lock
17
+
18
+ # Directory for instrumented libs generated by jscoverage/JSCover
19
+ lib-cov
20
+
21
+ # Coverage directory used by tools like istanbul
22
+ coverage
23
+ *.lcov
24
+
25
+ # nyc test coverage
26
+ .nyc_output
27
+
28
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29
+ .grunt
30
+
31
+ # Bower dependency directory (https://bower.io/)
32
+ bower_components
33
+
34
+ # node-waf configuration
35
+ .lock-wscript
36
+
37
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
38
+ build/Release
39
+
40
+ # Dependency directories
41
+ node_modules/
42
+ jspm_packages/
43
+
44
+ # Snowpack dependency directory (https://snowpack.dev/)
45
+ web_modules/
46
+
47
+ # TypeScript cache
48
+ *.tsbuildinfo
49
+
50
+ # Optional npm cache directory
51
+ .npm
52
+
53
+ # Optional eslint cache
54
+ .eslintcache
55
+
56
+ # Optional stylelint cache
57
+ .stylelintcache
58
+
59
+ # Optional REPL history
60
+ .node_repl_history
61
+
62
+ # Output of 'npm pack'
63
+ *.tgz
64
+
65
+ # Yarn Integrity file
66
+ .yarn-integrity
67
+
68
+ # dotenv environment variable files
69
+ .env
70
+ .env.*
71
+ !.env.example
72
+
73
+ # parcel-bundler cache (https://parceljs.org/)
74
+ .cache
75
+ .parcel-cache
76
+
77
+ # Next.js build output
78
+ .next
79
+ out
80
+
81
+ # Nuxt.js build / generate output
82
+ .nuxt
83
+ dist
84
+ .output
85
+
86
+ # Gatsby files
87
+ .cache/
88
+ # Comment in the public line in if your project uses Gatsby and not Next.js
89
+ # https://nextjs.org/blog/next-9-1#public-directory-support
90
+ # public
91
+
92
+ # vuepress build output
93
+ .vuepress/dist
94
+
95
+ # vuepress v2.x temp directory
96
+ .temp
97
+
98
+ # Sveltekit cache directory
99
+ .svelte-kit/
100
+
101
+ # vitepress build output
102
+ **/.vitepress/dist
103
+
104
+ # vitepress cache directory
105
+ **/.vitepress/cache
106
+
107
+ # Docusaurus cache and generated files
108
+ .docusaurus
109
+
110
+ # Serverless directories
111
+ .serverless/
112
+
113
+ # FuseBox cache
114
+ .fusebox/
115
+
116
+ # DynamoDB Local files
117
+ .dynamodb/
118
+
119
+ # Firebase cache directory
120
+ .firebase/
121
+
122
+ # TernJS port file
123
+ .tern-port
124
+
125
+ # Stores Visual Studio Code versions used for testing Visual Studio Code extensions
126
+ .vscode-test
127
+
128
+ # pnpm
129
+ .pnpm-store
130
+
131
+ # yarn v3
132
+ .pnp.*
133
+ .yarn/*
134
+ !.yarn/patches
135
+ !.yarn/plugins
136
+ !.yarn/releases
137
+ !.yarn/sdks
138
+ !.yarn/versions
139
+
140
+ # Vite files
141
+ vite.config.js.timestamp-*
142
+ vite.config.ts.timestamp-*
143
+ .vite/
144
+
145
+ # Astro generated types
146
+ .astro/
147
+
148
+ # Turbo Repo
149
+ .turbo
@@ -0,0 +1,220 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ *.lcov
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ # Pipfile.lock
97
+
98
+ # uv
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ # poetry.lock
110
+ # poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ # pdm.lock
117
+ # pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ # pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi/*
127
+ !.pixi/config.toml
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule*
134
+ celerybeat.pid
135
+
136
+ # Redis
137
+ *.rdb
138
+ *.aof
139
+ *.pid
140
+
141
+ # RabbitMQ
142
+ mnesia/
143
+ rabbitmq/
144
+ rabbitmq-data/
145
+
146
+ # ActiveMQ
147
+ activemq-data/
148
+
149
+ # SageMath parsed files
150
+ *.sage.py
151
+
152
+ # Environments
153
+ .env
154
+ .envrc
155
+ .venv
156
+ env/
157
+ venv/
158
+ ENV/
159
+ env.bak/
160
+ venv.bak/
161
+
162
+ # Spyder project settings
163
+ .spyderproject
164
+ .spyproject
165
+
166
+ # Rope project settings
167
+ .ropeproject
168
+
169
+ # mkdocs documentation
170
+ /site
171
+
172
+ # mypy
173
+ .mypy_cache/
174
+ .dmypy.json
175
+ dmypy.json
176
+
177
+ # Pyre type checker
178
+ .pyre/
179
+
180
+ # pytype static type analyzer
181
+ .pytype/
182
+
183
+ # Cython debug symbols
184
+ cython_debug/
185
+
186
+ # PyCharm
187
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
188
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
189
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
190
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
191
+ # .idea/
192
+
193
+ # Abstra
194
+ # Abstra is an AI-powered process automation framework.
195
+ # Ignore directories containing user credentials, local state, and settings.
196
+ # Learn more at https://abstra.io/docs
197
+ .abstra/
198
+
199
+ # Visual Studio Code
200
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
201
+ # can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
202
+ # and can be added to the global gitignore or merged into this file. However, if you prefer, you
203
+ # could uncomment the following to ignore the entire vscode folder
204
+ # .vscode/
205
+ # Temporary file for partial code execution
206
+ tempCodeRunnerFile.py
207
+
208
+ # Ruff stuff:
209
+ .ruff_cache/
210
+
211
+ # PyPI configuration file
212
+ .pypirc
213
+
214
+ # Marimo
215
+ marimo/_static/
216
+ marimo/_lsp/
217
+ __marimo__/
218
+
219
+ # Streamlit
220
+ .streamlit/secrets.toml