@seangalie/precast 0.0.0-stage → 0.2.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.
- package/CHANGELOG.md +64 -0
- package/LICENSE +202 -0
- package/README.md +274 -2
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +3 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +251 -0
- package/dist/collect.d.ts +17 -0
- package/dist/collect.js +143 -0
- package/dist/context.d.ts +38 -0
- package/dist/context.js +206 -0
- package/dist/errors.d.ts +8 -0
- package/dist/errors.js +8 -0
- package/dist/fnmatch.d.ts +9 -0
- package/dist/fnmatch.js +110 -0
- package/dist/generate.d.ts +23 -0
- package/dist/generate.js +76 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/output-path.d.ts +30 -0
- package/dist/output-path.js +84 -0
- package/dist/platforms.d.ts +22 -0
- package/dist/platforms.js +81 -0
- package/dist/profiles.d.ts +23 -0
- package/dist/profiles.js +79 -0
- package/dist/prompts.d.ts +30 -0
- package/dist/prompts.js +103 -0
- package/dist/style.d.ts +14 -0
- package/dist/style.js +34 -0
- package/dist/tiers.d.ts +23 -0
- package/dist/tiers.js +96 -0
- package/package.json +44 -4
- package/platforms/forgejo/files/.forgejo/CODEOWNERS.tmpl +2 -0
- package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/01_bug_report.yml.tmpl +83 -0
- package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/02_feature_request.yml.tmpl +57 -0
- package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/03_codebase_improvement.yml.tmpl +44 -0
- package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/04_support_question.yml.tmpl +47 -0
- package/platforms/forgejo/files/.forgejo/ISSUE_TEMPLATE/config.yml.tmpl +13 -0
- package/platforms/forgejo/files/.forgejo/PULL_REQUEST_TEMPLATE.md.tmpl +49 -0
- package/platforms/forgejo/files/.forgejo/SETUP.md.tmpl +65 -0
- package/platforms/forgejo/files/.forgejo/labels.yml.tmpl +99 -0
- package/platforms/forgejo/files/.forgejo/scripts/check-labels.sh.tmpl +91 -0
- package/platforms/forgejo/files/.forgejo/scripts/sync-labels.sh.tmpl +165 -0
- package/platforms/forgejo/files/.forgejo/workflows/labels.yml.tmpl +45 -0
- package/platforms/forgejo/files/.forgejo/workflows/lint.yml.tmpl +78 -0
- package/platforms/forgejo/files/.forgejo/workflows/pr-labels.yml.tmpl +51 -0
- package/platforms/forgejo/files/.forgejo/workflows/pre-commit.yml.tmpl +24 -0
- package/platforms/forgejo/files/.forgejo/workflows/release.yml.tmpl +130 -0
- package/platforms/forgejo/files/.forgejo/workflows/renovate.yml.tmpl +61 -0
- package/platforms/forgejo/files/.forgejo/workflows/stale.yml.tmpl +260 -0
- package/platforms/forgejo/files/renovate.json +36 -0
- package/platforms/forgejo/platform.json +41 -0
- package/platforms/github/files/.github/CODEOWNERS.tmpl +2 -0
- package/platforms/github/files/.github/ISSUE_TEMPLATE/01_bug_report.yml.tmpl +83 -0
- package/platforms/github/files/.github/ISSUE_TEMPLATE/02_feature_request.yml.tmpl +57 -0
- package/platforms/github/files/.github/ISSUE_TEMPLATE/03_codebase_improvement.yml.tmpl +44 -0
- package/platforms/github/files/.github/ISSUE_TEMPLATE/04_support_question.yml.tmpl +47 -0
- package/platforms/github/files/.github/ISSUE_TEMPLATE/config.yml.tmpl +16 -0
- package/platforms/github/files/.github/PULL_REQUEST_TEMPLATE.md.tmpl +49 -0
- package/platforms/github/files/.github/SETUP.md.tmpl +46 -0
- package/platforms/github/files/.github/dependabot.yml.tmpl +75 -0
- package/platforms/github/files/.github/labels.yml.tmpl +103 -0
- package/platforms/github/files/.github/release.yml.tmpl +47 -0
- package/platforms/github/files/.github/workflows/ci.yml.tmpl +55 -0
- package/platforms/github/files/.github/workflows/codeql.yml.tmpl +63 -0
- package/platforms/github/files/.github/workflows/labels.yml.tmpl +34 -0
- package/platforms/github/files/.github/workflows/lint-workflows.yml.tmpl +75 -0
- package/platforms/github/files/.github/workflows/lint.yml.tmpl +69 -0
- package/platforms/github/files/.github/workflows/lock.yml.tmpl +46 -0
- package/platforms/github/files/.github/workflows/pr-labels.yml.tmpl +26 -0
- package/platforms/github/files/.github/workflows/pre-commit.yml.tmpl +25 -0
- package/platforms/github/files/.github/workflows/release.yml.tmpl +101 -0
- package/platforms/github/files/.github/workflows/stale.yml.tmpl +57 -0
- package/platforms/github/platform.json +44 -0
- package/platforms/gitlab/files/.gitlab/CODEOWNERS.tmpl +2 -0
- package/platforms/gitlab/files/.gitlab/SETUP.md.tmpl +65 -0
- package/platforms/gitlab/files/.gitlab/issue_templates/01_bug_report.md +18 -0
- package/platforms/gitlab/files/.gitlab/issue_templates/02_feature_request.md +11 -0
- package/platforms/gitlab/files/.gitlab/issue_templates/03_codebase_improvement.md +11 -0
- package/platforms/gitlab/files/.gitlab/issue_templates/04_support_question.md +12 -0
- package/platforms/gitlab/files/.gitlab/labels.json +122 -0
- package/platforms/gitlab/files/.gitlab/merge_request_templates/Default.md +14 -0
- package/platforms/gitlab/files/.gitlab/scripts/project.py +159 -0
- package/platforms/gitlab/files/.gitlab-ci.yml.tmpl +56 -0
- package/platforms/gitlab/platform.json +38 -0
- package/template/.editorconfig.tmpl +54 -0
- package/template/.gitattributes +107 -0
- package/template/.gitignore.tmpl +244 -0
- package/template/.pre-commit-config.yaml.tmpl +55 -0
- package/template/.repo/check-secrets.py +40 -0
- package/template/.repo/ci-checks.sh +20 -0
- package/template/AGENTS.md.tmpl +78 -0
- package/template/CHANGELOG.md.tmpl +24 -0
- package/template/CLAUDE.md +1 -0
- package/template/LICENSE +202 -0
- package/template/README.md.tmpl +101 -0
- package/template/SETUP.md.tmpl +56 -0
- package/template/docs/CODE_OF_CONDUCT.md +85 -0
- package/template/docs/CONTRIBUTING.md.tmpl +59 -0
- package/template/docs/SECURITY.md.tmpl +26 -0
- package/template/docs/SUPPORT.md.tmpl +19 -0
- package/template/docs/logo.svg +84 -0
- package/template/docs/screenshot.png +0 -0
- package/tiers.json +10 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Validate the starter, synchronize labels, or publish changelog release notes."""
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import re
|
|
8
|
+
import sys
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from urllib.error import HTTPError, URLError
|
|
11
|
+
from urllib.parse import quote, urlsplit
|
|
12
|
+
from urllib.request import HTTPRedirectHandler, Request, build_opener
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
ROOT = Path(__file__).resolve().parents[2]
|
|
16
|
+
VERSION = re.compile(
|
|
17
|
+
r"v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
|
|
18
|
+
r"(?:-((?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)"
|
|
19
|
+
r"(?:\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?"
|
|
20
|
+
r"(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?"
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def read_labels(root=ROOT):
|
|
25
|
+
labels = json.loads((root / ".gitlab/labels.json").read_text())
|
|
26
|
+
names = set()
|
|
27
|
+
for label in labels:
|
|
28
|
+
if (not label.get("name") or label["name"] in names
|
|
29
|
+
or not re.fullmatch(r"#[0-9a-fA-F]{6}", label.get("color", ""))):
|
|
30
|
+
raise ValueError("Label names must be unique and colors must be #RRGGBB")
|
|
31
|
+
names.add(label["name"])
|
|
32
|
+
return labels
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def release_notes(tag, root=ROOT):
|
|
36
|
+
if not VERSION.fullmatch(tag):
|
|
37
|
+
raise ValueError("Release tag must use v-prefixed Semantic Versioning")
|
|
38
|
+
version = tag[1:]
|
|
39
|
+
changelog = (root / "CHANGELOG.md").read_text()
|
|
40
|
+
headings = list(re.finditer(r"^## \[([^\]]+)\].*$", changelog, re.M))
|
|
41
|
+
matches = [index for index, heading in enumerate(headings) if heading.group(1) == version]
|
|
42
|
+
if len(matches) != 1:
|
|
43
|
+
raise ValueError(f"CHANGELOG.md must contain exactly one section for {version}")
|
|
44
|
+
index = matches[0]
|
|
45
|
+
end = headings[index + 1].start() if index + 1 < len(headings) else len(changelog)
|
|
46
|
+
body = changelog[headings[index].end():end]
|
|
47
|
+
body = re.sub(r"^\[[^\]]+\]:.*\n?", "", body, flags=re.M).strip()
|
|
48
|
+
if not body:
|
|
49
|
+
raise ValueError(f"CHANGELOG.md section for {version} is empty")
|
|
50
|
+
return body
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class NoRedirect(HTTPRedirectHandler):
|
|
54
|
+
def redirect_request(self, request, fp, code, msg, headers, newurl):
|
|
55
|
+
raise ValueError("API redirects are refused; check the configured API URL")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class API:
|
|
59
|
+
def __init__(self, url, project, token, job_token=False):
|
|
60
|
+
parsed = urlsplit(url)
|
|
61
|
+
if (parsed.scheme != "https" or not parsed.hostname or parsed.username
|
|
62
|
+
or parsed.password or parsed.query or parsed.fragment):
|
|
63
|
+
raise ValueError("The API URL must be HTTPS and contain no credentials, query or fragment")
|
|
64
|
+
if not project or not token:
|
|
65
|
+
raise ValueError("A project and token are required for API operations")
|
|
66
|
+
self.base = f"{url.rstrip('/')}/projects/{quote(project, safe='')}"
|
|
67
|
+
self.header = "JOB-TOKEN" if job_token else "PRIVATE-TOKEN"
|
|
68
|
+
self.token = token
|
|
69
|
+
self.opener = build_opener(NoRedirect())
|
|
70
|
+
|
|
71
|
+
def request(self, method, path, payload=None):
|
|
72
|
+
data = json.dumps(payload).encode() if payload is not None else None
|
|
73
|
+
request = Request(self.base + path, data=data, method=method, headers={
|
|
74
|
+
self.header: self.token, "Content-Type": "application/json", "Accept": "application/json",
|
|
75
|
+
})
|
|
76
|
+
try:
|
|
77
|
+
with self.opener.open(request, timeout=30) as response:
|
|
78
|
+
body = response.read()
|
|
79
|
+
return response.status, json.loads(body) if body else None
|
|
80
|
+
except HTTPError as error:
|
|
81
|
+
error.close()
|
|
82
|
+
if error.code == 404 and method == "GET":
|
|
83
|
+
return 404, None
|
|
84
|
+
# Do not echo response bodies, headers, or credentials.
|
|
85
|
+
raise ValueError(f"GitLab {method} request failed (HTTP {error.code})") from None
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def sync_labels(api, labels):
|
|
89
|
+
existing = {}
|
|
90
|
+
page = 1
|
|
91
|
+
while True:
|
|
92
|
+
status, batch = api.request("GET", f"/labels?per_page=100&page={page}")
|
|
93
|
+
if status != 200 or not isinstance(batch, list):
|
|
94
|
+
raise ValueError("Could not list GitLab project labels")
|
|
95
|
+
existing.update((label["name"], label) for label in batch)
|
|
96
|
+
if len(batch) < 100:
|
|
97
|
+
break
|
|
98
|
+
page += 1
|
|
99
|
+
for label in labels:
|
|
100
|
+
if label["name"] in existing:
|
|
101
|
+
# Leave inherited group labels under the group's control.
|
|
102
|
+
current = existing[label["name"]]
|
|
103
|
+
if not current.get("is_project_label", False):
|
|
104
|
+
print(f"Keeping inherited label: {label['name']}")
|
|
105
|
+
continue
|
|
106
|
+
api.request("PUT", f"/labels/{current['id']}", label)
|
|
107
|
+
else:
|
|
108
|
+
api.request("POST", "/labels", label)
|
|
109
|
+
print("Synchronized starter labels; unrelated and inherited labels were preserved.")
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def publish_release(api, tag, notes):
|
|
113
|
+
path = f"/releases/{quote(tag, safe='')}"
|
|
114
|
+
status, _ = api.request("GET", path)
|
|
115
|
+
payload = {"name": tag, "description": notes}
|
|
116
|
+
if status == 200:
|
|
117
|
+
api.request("PUT", path, payload)
|
|
118
|
+
elif status == 404:
|
|
119
|
+
api.request("POST", "/releases", {**payload, "tag_name": tag})
|
|
120
|
+
else:
|
|
121
|
+
raise ValueError("Could not inspect the existing GitLab release")
|
|
122
|
+
print(f"Published release notes for {tag}.")
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def main():
|
|
126
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
127
|
+
parser.add_argument("command", choices=("check", "labels", "release"))
|
|
128
|
+
parser.add_argument("--api-url", default=os.getenv("CI_API_V4_URL") or os.getenv("GITLAB_API_URL"))
|
|
129
|
+
parser.add_argument("--project", default=os.getenv("CI_PROJECT_ID"))
|
|
130
|
+
parser.add_argument("--tag", default=os.getenv("CI_COMMIT_TAG"))
|
|
131
|
+
args = parser.parse_args()
|
|
132
|
+
try:
|
|
133
|
+
if args.command == "check":
|
|
134
|
+
read_labels()
|
|
135
|
+
required = ["README.md", "AGENTS.md", "CHANGELOG.md", ".gitlab/CODEOWNERS",
|
|
136
|
+
".gitlab/merge_request_templates/Default.md"]
|
|
137
|
+
for path in required:
|
|
138
|
+
if not (ROOT / path).is_file():
|
|
139
|
+
raise ValueError(f"Missing scaffold file: {path}")
|
|
140
|
+
print("Starter files and label definitions are valid. Project tests are not configured here.")
|
|
141
|
+
return 0
|
|
142
|
+
# Validate local inputs before sending any network request.
|
|
143
|
+
labels = read_labels() if args.command == "labels" else None
|
|
144
|
+
notes = release_notes(args.tag or "") if args.command == "release" else None
|
|
145
|
+
private_token = os.getenv("GITLAB_TOKEN")
|
|
146
|
+
token = private_token or (os.getenv("CI_JOB_TOKEN") if args.command == "release" else None)
|
|
147
|
+
api = API(args.api_url or "", args.project, token, job_token=not private_token)
|
|
148
|
+
if args.command == "labels":
|
|
149
|
+
sync_labels(api, labels)
|
|
150
|
+
else:
|
|
151
|
+
publish_release(api, args.tag, notes)
|
|
152
|
+
except (ValueError, OSError, KeyError, URLError) as error:
|
|
153
|
+
print(f"error: {error}", file=sys.stderr)
|
|
154
|
+
return 1
|
|
155
|
+
return 0
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
if __name__ == "__main__":
|
|
159
|
+
sys.exit(main())
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Required jobs need Git, Bash, and Python 3.10+ with pip and venv.
|
|
2
|
+
# Pre-commit needs outbound access to the configured Python package index,
|
|
3
|
+
# GitHub hook sources, and Go toolchain/module services (including go.dev,
|
|
4
|
+
# dl.google.com, proxy.golang.org, and sum.golang.org), or approved mirrors.
|
|
5
|
+
# See .gitlab/SETUP.md before using this on a restricted runner.
|
|
6
|
+
# Projects generated for GitLab.com use a public Python image. On other instances,
|
|
7
|
+
# a Docker or Kubernetes executor needs a suitable default image on the runner or
|
|
8
|
+
# an approved `image:` below; no executor or institutional image is assumed.
|
|
9
|
+
@@TIERS regular@@
|
|
10
|
+
stages: [validate, test]
|
|
11
|
+
@@END_TIERS@@
|
|
12
|
+
@@TIERS full@@
|
|
13
|
+
stages: [validate, test, release]
|
|
14
|
+
@@END_TIERS@@
|
|
15
|
+
|
|
16
|
+
workflow:
|
|
17
|
+
rules:
|
|
18
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
19
|
+
- if: '$CI_COMMIT_TAG'
|
|
20
|
+
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
|
|
21
|
+
when: never
|
|
22
|
+
- if: '$CI_COMMIT_BRANCH'
|
|
23
|
+
|
|
24
|
+
default:
|
|
25
|
+
tags: @@RUNNER_TAGS_YAML@@
|
|
26
|
+
@@CI_IMAGE@@
|
|
27
|
+
|
|
28
|
+
pre-commit:
|
|
29
|
+
stage: validate
|
|
30
|
+
script:
|
|
31
|
+
- bash .repo/ci-checks.sh
|
|
32
|
+
@@TIERS full@@
|
|
33
|
+
|
|
34
|
+
validate-scaffold:
|
|
35
|
+
stage: validate
|
|
36
|
+
script:
|
|
37
|
+
- python3 .gitlab/scripts/project.py check
|
|
38
|
+
@@END_TIERS@@
|
|
39
|
+
|
|
40
|
+
# Add real project build/test jobs before requiring a test status for merges.
|
|
41
|
+
# This job is manual so an empty starter cannot claim that project tests passed.
|
|
42
|
+
project-tests:
|
|
43
|
+
stage: test
|
|
44
|
+
when: manual
|
|
45
|
+
allow_failure: true
|
|
46
|
+
script:
|
|
47
|
+
- 'echo "Configure this job with the project build and test commands."'
|
|
48
|
+
@@TIERS full@@
|
|
49
|
+
|
|
50
|
+
release:
|
|
51
|
+
stage: release
|
|
52
|
+
rules:
|
|
53
|
+
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/'
|
|
54
|
+
script:
|
|
55
|
+
- python3 .gitlab/scripts/project.py release
|
|
56
|
+
@@END_TIERS@@
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"server_url": "https://gitlab.com",
|
|
3
|
+
"nested_namespaces": true,
|
|
4
|
+
"runner": "",
|
|
5
|
+
"codeowners_pattern": "*",
|
|
6
|
+
"tiers": {
|
|
7
|
+
"regular": [
|
|
8
|
+
".gitlab/CODEOWNERS",
|
|
9
|
+
".gitlab/issue_templates/*",
|
|
10
|
+
".gitlab/merge_request_templates/*",
|
|
11
|
+
".gitlab-ci.yml"
|
|
12
|
+
],
|
|
13
|
+
"full": [
|
|
14
|
+
".gitlab/labels.json",
|
|
15
|
+
".gitlab/scripts/*"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"context": {
|
|
19
|
+
"PLATFORM_NAME": "GitLab",
|
|
20
|
+
"PLATFORM_DIR": ".gitlab",
|
|
21
|
+
"CI_FILE": ".gitlab-ci.yml",
|
|
22
|
+
"ISSUES_URL": "{REPO_URL}/-/issues",
|
|
23
|
+
"CHANGES_URL": "{REPO_URL}/-/merge_requests",
|
|
24
|
+
"CONTRIBUTORS_URL": "{REPO_URL}/-/graphs/{BRANCH_URL}",
|
|
25
|
+
"HISTORY_URL": "{REPO_URL}/-/commits/{BRANCH_URL}",
|
|
26
|
+
"FILE_URL": "{REPO_URL}/-/blob/{BRANCH_URL}",
|
|
27
|
+
"CODEOWNERS_NOTE": "GitLab uses glob patterns. Set a user or group with project access. Enforced Code Owner approvals depend on the installed tier and project settings.",
|
|
28
|
+
"AUTOMATION_NOTE": "Use GitLab CI, CI_API_V4_URL and CI_PROJECT_ID. Namespaces can contain subgroups; do not split them into only owner/repository.",
|
|
29
|
+
"SECURITY_CHANNEL": "Set a private reporting address below and follow institutional reporting requirements before publishing this project.",
|
|
30
|
+
"LABEL_NOTE": "Labels and merge-request policies are configured in GitLab settings; `.gitlab/labels.json` contains the starting label definitions.",
|
|
31
|
+
"EXTRA_SETUP": "Review `.gitlab/SETUP.md` for runner requirements, releases and organization-specific checks. This template does not assume a GitLab subscription tier.",
|
|
32
|
+
"PRE_COMMIT_WORKFLOW_HOOKS": "# GitLab CI is checked by the shared YAML hook above.",
|
|
33
|
+
"CI_IMAGE": " # image: an approved image with Git, Bash, and Python 3.10+ with venv, if the runner has no suitable default"
|
|
34
|
+
},
|
|
35
|
+
"default_server_context": {
|
|
36
|
+
"CI_IMAGE": " # GitLab.com's hosted runners default to an image without Python's venv.\n image: python:3.14-trixie"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# EditorConfig keeps indentation and line endings consistent across editors.
|
|
2
|
+
# It complements .gitattributes, which enforces the same line endings in git.
|
|
3
|
+
# See https://editorconfig.org -- most editors need a plugin to honor this.
|
|
4
|
+
|
|
5
|
+
root = true
|
|
6
|
+
|
|
7
|
+
[*]
|
|
8
|
+
charset = utf-8
|
|
9
|
+
end_of_line = lf
|
|
10
|
+
insert_final_newline = true
|
|
11
|
+
trim_trailing_whitespace = true
|
|
12
|
+
indent_style = space
|
|
13
|
+
indent_size = 4
|
|
14
|
+
|
|
15
|
+
[*.{yml,yaml,json,jsonc,toml}]
|
|
16
|
+
indent_size = 2
|
|
17
|
+
|
|
18
|
+
[*.{js,jsx,ts,tsx,css,scss,html,htm,svg}]
|
|
19
|
+
indent_size = 2
|
|
20
|
+
|
|
21
|
+
[*.{sh,bash,rb}]
|
|
22
|
+
indent_size = 2
|
|
23
|
+
|
|
24
|
+
[*.{py,go}]
|
|
25
|
+
indent_size = 4
|
|
26
|
+
|
|
27
|
+
[*.go]
|
|
28
|
+
indent_style = tab
|
|
29
|
+
|
|
30
|
+
[Makefile]
|
|
31
|
+
indent_style = tab
|
|
32
|
+
|
|
33
|
+
[*.md]
|
|
34
|
+
# Two trailing spaces are a hard line break in Markdown.
|
|
35
|
+
trim_trailing_whitespace = false
|
|
36
|
+
# List continuation and nested code blocks follow the list marker, not a
|
|
37
|
+
# fixed step, so there is no single indent size to enforce.
|
|
38
|
+
indent_size = unset
|
|
39
|
+
|
|
40
|
+
[LICENSE]
|
|
41
|
+
# Verbatim license text; its layout is not ours to change.
|
|
42
|
+
indent_style = unset
|
|
43
|
+
indent_size = unset
|
|
44
|
+
|
|
45
|
+
[.gitignore]
|
|
46
|
+
# The macOS "Icon\r" pattern needs a literal carriage return mid-line, which
|
|
47
|
+
# editorconfig-checker would otherwise report as a wrong line ending.
|
|
48
|
+
end_of_line = unset
|
|
49
|
+
|
|
50
|
+
# These must keep CRLF on checkout -- see .gitattributes. EditorConfig does
|
|
51
|
+
# expand {a,b} braces; git attribute patterns do not, so the two files spell
|
|
52
|
+
# the same rule differently on purpose.
|
|
53
|
+
[*.{csv,ps1,psm1,psd1,cmd,bat}]
|
|
54
|
+
end_of_line = crlf
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Normalize all text files to LF in the repository AND on checkout, so that
|
|
2
|
+
# every platform sees the same bytes. Without the explicit eol=lf, a Windows
|
|
3
|
+
# checkout would convert these back to CRLF and contradict .editorconfig.
|
|
4
|
+
# The CRLF exceptions are listed further down.
|
|
5
|
+
* text=auto eol=lf
|
|
6
|
+
*.sh text eol=lf diff=bash
|
|
7
|
+
*.bash text eol=lf diff=bash
|
|
8
|
+
*.py text eol=lf diff=python
|
|
9
|
+
*.go text eol=lf diff=golang
|
|
10
|
+
*.rb text eol=lf diff=ruby
|
|
11
|
+
*.toml text eol=lf
|
|
12
|
+
*.xml text eol=lf
|
|
13
|
+
*.yaml text eol=lf
|
|
14
|
+
*.yml text eol=lf
|
|
15
|
+
*.json text eol=lf
|
|
16
|
+
*.md text eol=lf diff=markdown
|
|
17
|
+
*.txt text eol=lf
|
|
18
|
+
*.htm text eol=lf diff=html
|
|
19
|
+
*.html text eol=lf diff=html
|
|
20
|
+
*.css text eol=lf diff=css
|
|
21
|
+
*.php text eol=lf diff=php
|
|
22
|
+
*.sql text eol=lf
|
|
23
|
+
*.js text eol=lf
|
|
24
|
+
*.ts text eol=lf
|
|
25
|
+
*.jsx text eol=lf
|
|
26
|
+
*.tsx text eol=lf
|
|
27
|
+
|
|
28
|
+
# Files that must use CRLF on checkout. Git attribute patterns use
|
|
29
|
+
# gitignore-style matching and do NOT expand {a,b} braces, so extensions that
|
|
30
|
+
# are commonly written in either case are spelled as character classes.
|
|
31
|
+
*.csv text eol=crlf
|
|
32
|
+
*.ps1 text eol=crlf
|
|
33
|
+
*.psm1 text eol=crlf
|
|
34
|
+
*.psd1 text eol=crlf
|
|
35
|
+
*.[cC][mM][dD] text eol=crlf
|
|
36
|
+
*.[bB][aA][tT] text eol=crlf
|
|
37
|
+
|
|
38
|
+
# These files are text and should have LF line endings on checkout
|
|
39
|
+
.gitattributes text eol=lf
|
|
40
|
+
.gitignore text eol=lf
|
|
41
|
+
.gitmodules text eol=lf
|
|
42
|
+
.editorconfig text eol=lf
|
|
43
|
+
|
|
44
|
+
# Fix syntax highlighting on GitHub/Forgejo to allow comments
|
|
45
|
+
.vscode/*.json linguist-language=JSON-with-Comments
|
|
46
|
+
|
|
47
|
+
# Configs
|
|
48
|
+
package.json text eol=lf
|
|
49
|
+
package-lock.json text eol=lf -diff
|
|
50
|
+
pnpm-lock.yaml text eol=lf -diff
|
|
51
|
+
|
|
52
|
+
# Other Text-based Assets
|
|
53
|
+
*.svg text eol=lf
|
|
54
|
+
|
|
55
|
+
# Images
|
|
56
|
+
*.png binary
|
|
57
|
+
*.jpg binary
|
|
58
|
+
*.jpeg binary
|
|
59
|
+
*.gif binary
|
|
60
|
+
*.ico binary
|
|
61
|
+
*.webp binary
|
|
62
|
+
*.psd binary
|
|
63
|
+
*.ai binary
|
|
64
|
+
|
|
65
|
+
# Compiled objects and archives
|
|
66
|
+
*.a binary
|
|
67
|
+
*.o binary
|
|
68
|
+
*.so binary
|
|
69
|
+
*.dylib binary
|
|
70
|
+
*.dll binary
|
|
71
|
+
*.exe binary
|
|
72
|
+
*.zip binary
|
|
73
|
+
*.tar binary
|
|
74
|
+
*.gz binary
|
|
75
|
+
*.tgz binary
|
|
76
|
+
*.7z binary
|
|
77
|
+
*.bz binary
|
|
78
|
+
*.bz2 binary
|
|
79
|
+
*.bzip2 binary
|
|
80
|
+
*.rar binary
|
|
81
|
+
*.txz binary
|
|
82
|
+
*.xz binary
|
|
83
|
+
|
|
84
|
+
# Office documents
|
|
85
|
+
*.pdf binary
|
|
86
|
+
*.doc binary
|
|
87
|
+
*.docx binary
|
|
88
|
+
*.xls binary
|
|
89
|
+
*.xlsx binary
|
|
90
|
+
*.ppt binary
|
|
91
|
+
*.pptx binary
|
|
92
|
+
|
|
93
|
+
# SQLite databases
|
|
94
|
+
*.db binary
|
|
95
|
+
*.sqlite binary
|
|
96
|
+
*.sqlite3 binary
|
|
97
|
+
|
|
98
|
+
# Fonts
|
|
99
|
+
*.woff binary
|
|
100
|
+
*.woff2 binary
|
|
101
|
+
*.ttf binary
|
|
102
|
+
*.otf binary
|
|
103
|
+
*.eot binary
|
|
104
|
+
|
|
105
|
+
# Text files where line endings should be preserved
|
|
106
|
+
*.patch -text
|
|
107
|
+
*.diff -text
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# ---------------------------------
|
|
2
|
+
# .gitignore for Linux environments
|
|
3
|
+
# ---------------------------------
|
|
4
|
+
|
|
5
|
+
*~
|
|
6
|
+
|
|
7
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
8
|
+
.fuse_hidden*
|
|
9
|
+
|
|
10
|
+
# KDE directory preferences
|
|
11
|
+
.directory
|
|
12
|
+
|
|
13
|
+
# Linux trash folder which might appear on any partition or disk
|
|
14
|
+
.Trash-*
|
|
15
|
+
|
|
16
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
17
|
+
.nfs*
|
|
18
|
+
|
|
19
|
+
# Log files created by default by the nohup command
|
|
20
|
+
nohup.out
|
|
21
|
+
|
|
22
|
+
# ---------------------------------
|
|
23
|
+
# .gitignore for macOS environments
|
|
24
|
+
# ---------------------------------
|
|
25
|
+
|
|
26
|
+
# General
|
|
27
|
+
.DS_Store
|
|
28
|
+
.localized
|
|
29
|
+
__MACOSX/
|
|
30
|
+
.AppleDouble
|
|
31
|
+
.LSOverride
|
|
32
|
+
# Custom folder icons are named "Icon" plus a carriage return. The brackets
|
|
33
|
+
# below hold a literal CR (invisible in most editors): "Icon?" would also
|
|
34
|
+
# ignore folders such as Icons/, and "Icon[\r]" matches "Iconr" instead.
|
|
35
|
+
Icon[
|
|
36
|
+
|
|
37
|
+
# Thumbnails & Resource forks
|
|
38
|
+
._*
|
|
39
|
+
|
|
40
|
+
# Files that might appear in the root of a volume
|
|
41
|
+
.DocumentRevisions-V100
|
|
42
|
+
.fseventsd
|
|
43
|
+
.Spotlight-V100
|
|
44
|
+
.TemporaryItems
|
|
45
|
+
.Trashes
|
|
46
|
+
.VolumeIcon.icns
|
|
47
|
+
.com.apple.timemachine.donotpresent
|
|
48
|
+
.com.apple.timemachine.supported
|
|
49
|
+
.PKInstallSandboxManager
|
|
50
|
+
.PKInstallSandboxManager-SystemSoftware
|
|
51
|
+
.hotfiles.btree
|
|
52
|
+
.vol
|
|
53
|
+
.file
|
|
54
|
+
.disk_label*
|
|
55
|
+
lost+found
|
|
56
|
+
.HFS+ Private Directory Data?
|
|
57
|
+
|
|
58
|
+
# Directories potentially created on remote AFP share
|
|
59
|
+
.AppleDB
|
|
60
|
+
.AppleDesktop
|
|
61
|
+
Network Trash Folder
|
|
62
|
+
Temporary Items
|
|
63
|
+
.apdisk
|
|
64
|
+
|
|
65
|
+
# iCloud generated files
|
|
66
|
+
*.icloud
|
|
67
|
+
|
|
68
|
+
# Quota system
|
|
69
|
+
.quota.group
|
|
70
|
+
.quota.user
|
|
71
|
+
.quota.ops.group
|
|
72
|
+
.quota.ops.user
|
|
73
|
+
|
|
74
|
+
# TimeMachine
|
|
75
|
+
Backups.backupdb
|
|
76
|
+
.MobileBackups
|
|
77
|
+
.MobileBackups.trash
|
|
78
|
+
MobileBackups.trash
|
|
79
|
+
tmbootpicker.efi
|
|
80
|
+
|
|
81
|
+
# -----------------------------------
|
|
82
|
+
# .gitignore for Windows environments
|
|
83
|
+
# -----------------------------------
|
|
84
|
+
|
|
85
|
+
# Windows thumbnail cache files
|
|
86
|
+
Thumbs.db
|
|
87
|
+
Thumbs.db:encryptable
|
|
88
|
+
ehthumbs.db
|
|
89
|
+
ehthumbs_vista.db
|
|
90
|
+
|
|
91
|
+
# Dump file
|
|
92
|
+
*.stackdump
|
|
93
|
+
|
|
94
|
+
# Folder config file
|
|
95
|
+
[Dd]esktop.ini
|
|
96
|
+
|
|
97
|
+
# Recycle Bin used on file shares
|
|
98
|
+
$RECYCLE.BIN/
|
|
99
|
+
|
|
100
|
+
# Windows Installer files
|
|
101
|
+
*.cab
|
|
102
|
+
*.msi
|
|
103
|
+
*.msix
|
|
104
|
+
*.msm
|
|
105
|
+
*.msp
|
|
106
|
+
|
|
107
|
+
# Windows shortcuts
|
|
108
|
+
*.lnk
|
|
109
|
+
|
|
110
|
+
# ------------------------------------
|
|
111
|
+
# .gitignore for Environment Variables
|
|
112
|
+
# ------------------------------------
|
|
113
|
+
|
|
114
|
+
.env
|
|
115
|
+
.env.*
|
|
116
|
+
!.env.example
|
|
117
|
+
!.env.sample
|
|
118
|
+
|
|
119
|
+
# -----------------------------
|
|
120
|
+
# .gitignore for JetBrains IDEs
|
|
121
|
+
# -----------------------------
|
|
122
|
+
|
|
123
|
+
# Covers IntelliJ IDEA, PyCharm, GoLand, WebStorm, Rider and the rest. Shared
|
|
124
|
+
# run configurations and code style can be committed by un-ignoring them, e.g.
|
|
125
|
+
# !.idea/runConfigurations/ and !.idea/codeStyles/. That only works because the
|
|
126
|
+
# rule below ignores what is inside .idea rather than the directory itself: git
|
|
127
|
+
# cannot re-include a file whose parent directory is excluded.
|
|
128
|
+
.idea/*
|
|
129
|
+
*.iml
|
|
130
|
+
*.ipr
|
|
131
|
+
*.iws
|
|
132
|
+
|
|
133
|
+
# ------------------------------------
|
|
134
|
+
# .gitignore for Agents and Assistants
|
|
135
|
+
# ------------------------------------
|
|
136
|
+
|
|
137
|
+
# These files are often intentionally committed and shared within the repository
|
|
138
|
+
# to assist teams working on projects collaboratively with agentic tools. Only
|
|
139
|
+
# uncomment the examples below if they need to remain local-only instructions or
|
|
140
|
+
# configuration files.
|
|
141
|
+
|
|
142
|
+
# AGENTS.md
|
|
143
|
+
# CRUSH.md
|
|
144
|
+
# GEMINI.md
|
|
145
|
+
# WARP.md
|
|
146
|
+
# QWEN.md
|
|
147
|
+
|
|
148
|
+
# .warp/
|
|
149
|
+
# .crush/
|
|
150
|
+
# .codeium/
|
|
151
|
+
# .deepseek/
|
|
152
|
+
# .amazon-codewhisperer/
|
|
153
|
+
# .tabnineignore
|
|
154
|
+
# .tabnine/
|
|
155
|
+
|
|
156
|
+
# OpenAI Codex
|
|
157
|
+
# .codex/
|
|
158
|
+
|
|
159
|
+
# Claude Code
|
|
160
|
+
CLAUDE.local.md
|
|
161
|
+
# .claude/
|
|
162
|
+
.claude/*.local.json
|
|
163
|
+
.claude/**/*.log
|
|
164
|
+
.claude/worktrees/
|
|
165
|
+
|
|
166
|
+
# Aider
|
|
167
|
+
.aider.input.history
|
|
168
|
+
.aider.chat.history.md
|
|
169
|
+
.aider.llm.history
|
|
170
|
+
.aider.tags.cache.v*
|
|
171
|
+
# .aiderignore
|
|
172
|
+
|
|
173
|
+
# Cursor AI
|
|
174
|
+
# .cursorignore and .cursorindexingignore are normally committed, like .gitignore
|
|
175
|
+
# .cursorrules
|
|
176
|
+
# .cursor/
|
|
177
|
+
# .cursor.json
|
|
178
|
+
# .cursor-settings.yaml
|
|
179
|
+
|
|
180
|
+
# Continue
|
|
181
|
+
# .continue/
|
|
182
|
+
# .continuerc.json
|
|
183
|
+
|
|
184
|
+
# Cline
|
|
185
|
+
# .cline/
|
|
186
|
+
# .clinerules
|
|
187
|
+
# cline.json
|
|
188
|
+
|
|
189
|
+
# Gemini CLI
|
|
190
|
+
# .gemini/
|
|
191
|
+
gemini-debug.log
|
|
192
|
+
.gemini-clipboard/
|
|
193
|
+
|
|
194
|
+
# GitHub Copilot
|
|
195
|
+
# .github/copilot-instructions.md
|
|
196
|
+
|
|
197
|
+
# Windsurf Editor
|
|
198
|
+
# .windsurfrules
|
|
199
|
+
# .windsurf/
|
|
200
|
+
|
|
201
|
+
# ---------------------------
|
|
202
|
+
# .gitignore for Zed projects
|
|
203
|
+
# ---------------------------
|
|
204
|
+
|
|
205
|
+
.zed/*
|
|
206
|
+
!.zed/settings.json
|
|
207
|
+
!.zed/tasks.json
|
|
208
|
+
!.zed/debug.json
|
|
209
|
+
|
|
210
|
+
# ------------------------------------------
|
|
211
|
+
# .gitignore for Visual Studio Code projects
|
|
212
|
+
# ------------------------------------------
|
|
213
|
+
|
|
214
|
+
.vscode/*
|
|
215
|
+
!.vscode/settings.json
|
|
216
|
+
!.vscode/tasks.json
|
|
217
|
+
!.vscode/launch.json
|
|
218
|
+
!.vscode/extensions.json
|
|
219
|
+
!.vscode/*.code-snippets
|
|
220
|
+
|
|
221
|
+
# Local History for Visual Studio Code
|
|
222
|
+
.history/
|
|
223
|
+
|
|
224
|
+
# Built Visual Studio Code Extensions
|
|
225
|
+
*.vsix
|
|
226
|
+
|
|
227
|
+
# Ionide (F#) workspace state
|
|
228
|
+
.ionide
|
|
229
|
+
|
|
230
|
+
# -----------------------------
|
|
231
|
+
# .gitignore for Xcode projects
|
|
232
|
+
# -----------------------------
|
|
233
|
+
|
|
234
|
+
# User settings
|
|
235
|
+
xcuserdata/
|
|
236
|
+
|
|
237
|
+
# Xcode Patch
|
|
238
|
+
*.xcodeproj/*
|
|
239
|
+
!*.xcodeproj/project.pbxproj
|
|
240
|
+
!*.xcodeproj/xcshareddata/
|
|
241
|
+
!*.xcodeproj/project.xcworkspace/
|
|
242
|
+
!*.xcworkspace/contents.xcworkspacedata
|
|
243
|
+
/*.gcno
|
|
244
|
+
**/xcshareddata/WorkspaceSettings.xcsettings
|