Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: template V2 #80

Merged
merged 161 commits into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
bac3dc6
chore(deps): Remove eslint
caffeine-addictt Aug 9, 2024
fbdf1b9
feat: Remove javascript
caffeine-addictt Aug 9, 2024
c66ca7e
ci: Remove dist/ check
caffeine-addictt Aug 9, 2024
1885bd5
ci: Temporary ci patch
caffeine-addictt Aug 9, 2024
270a1be
ci: Only run linting and test on main or PR
caffeine-addictt Aug 9, 2024
da89c5d
ci: Remote template syncing
caffeine-addictt Aug 9, 2024
7c0bd8d
ci: Update dependabot
caffeine-addictt Aug 9, 2024
6677dee
chore: Remove settings.yml
caffeine-addictt Aug 9, 2024
f5fdfd6
chore: Update editorconfig
caffeine-addictt Aug 9, 2024
e96028d
feat: Cleanup javascript stuff (#77)
caffeine-addictt Aug 9, 2024
9d10f83
chore: Cleanup npm stuff
caffeine-addictt Aug 26, 2024
6cf7b5b
chore: Create Makefile
caffeine-addictt Aug 26, 2024
ec61a72
style: Fix styling
caffeine-addictt Aug 26, 2024
9788543
ci: Improve CI
caffeine-addictt Aug 26, 2024
5099e87
chore: Update Makefile
caffeine-addictt Aug 26, 2024
7c4faed
feat: Use goreleaser
caffeine-addictt Aug 26, 2024
e3cf455
revert: Remove release drafter
caffeine-addictt Aug 26, 2024
7b9daa9
feat: Basic implementation
caffeine-addictt Aug 27, 2024
f76dd30
chore: Update configs (#79)
caffeine-addictt Aug 26, 2024
8a4a959
chore(deps): Add cobra
caffeine-addictt Aug 27, 2024
23526e9
feat: Add value guarded struct
caffeine-addictt Aug 27, 2024
e5c1776
feat: Add options
caffeine-addictt Aug 27, 2024
0454da8
test: Add testing helpers
caffeine-addictt Aug 27, 2024
f88f71a
feat: Add root command
caffeine-addictt Aug 27, 2024
95eee32
feat: Add version command (conforming to semver)
caffeine-addictt Aug 27, 2024
6d82eec
style: Tidying up code
caffeine-addictt Aug 27, 2024
f04ccad
ci: Use golang latest in CI
caffeine-addictt Aug 27, 2024
d281da1
feat: A simple CLI implementation (#81)
caffeine-addictt Aug 27, 2024
a84da38
feat: Add caching dir and resolving option (#82)
caffeine-addictt Aug 28, 2024
fcb1c6e
ci: Fix field name language-version -> go-version (#83)
caffeine-addictt Aug 28, 2024
f424159
style: Errors should start with lowercase
caffeine-addictt Aug 28, 2024
1a7bb48
style: Command flags should start with lowercase
caffeine-addictt Aug 28, 2024
6855521
style: Only long desc should start with uppercase
caffeine-addictt Aug 28, 2024
22eb44e
feat: Add short and long desc to version cmd
caffeine-addictt Aug 28, 2024
0ff08c3
style: Standardize string casing (#84)
caffeine-addictt Aug 28, 2024
4ea3586
refactor: Rename Options -> GlobalOptions
caffeine-addictt Aug 28, 2024
921f0ca
feat: Add verbose flag
caffeine-addictt Aug 28, 2024
0d2c202
refactor: Move option init into struct declaration
caffeine-addictt Aug 28, 2024
2189b8e
refactor: Move repo and cache to new command
caffeine-addictt Aug 28, 2024
0ee1d93
feat: Add new command
caffeine-addictt Aug 28, 2024
18a41cf
refactor: Abstract typeString text
caffeine-addictt Aug 28, 2024
3e080ef
feat: Add dir option
caffeine-addictt Aug 28, 2024
ab1841a
feat: Add branch option
caffeine-addictt Aug 28, 2024
eeae4f3
refactor: Mark options as non persistent
caffeine-addictt Aug 28, 2024
a4f0c05
refactor: Remove cache in favor of tmp dirs
caffeine-addictt Aug 28, 2024
a90fc58
feat: Provide default values for repo and dir
caffeine-addictt Aug 28, 2024
b3a5b2b
feat: Add cloning repository to tmp
caffeine-addictt Aug 28, 2024
3e5a2a2
feat: Add "new repo" command alias for "new"
caffeine-addictt Aug 29, 2024
c5bdfb8
feat: Add isExecutable check
caffeine-addictt Aug 29, 2024
72a5f4b
security: Ensure that git args is sanitized
caffeine-addictt Aug 29, 2024
24d450f
feat: Add hex color type
caffeine-addictt Aug 29, 2024
c8fc2f0
fix: Resolve spinner import
caffeine-addictt Aug 29, 2024
d844e0f
feat: Add configuration structs
caffeine-addictt Aug 29, 2024
e3fba19
fix: Missing check for exec perms
caffeine-addictt Aug 30, 2024
1c3a020
feat: Add isFile utility
caffeine-addictt Aug 30, 2024
1462733
feat: Add check command
caffeine-addictt Aug 30, 2024
2a3e57e
test: Add hex color test
caffeine-addictt Aug 30, 2024
f5330d8
fix: Running regex on wrong varaible
caffeine-addictt Aug 30, 2024
69ebe65
feat: Clean filepath for check cmd
caffeine-addictt Aug 30, 2024
cbbacc0
fix: Have errors exit with status 1
caffeine-addictt Aug 30, 2024
a6c4d2a
fix: Error message describing wrongly
caffeine-addictt Aug 30, 2024
7c08781
refactor: Abstract unmarshalling
caffeine-addictt Aug 30, 2024
f8cbe98
feat: Require parsed path to be subtree local
caffeine-addictt Aug 30, 2024
832eb30
feat: Do not allow same dir to be used
caffeine-addictt Aug 30, 2024
12a9b27
feat: Add name field
caffeine-addictt Aug 30, 2024
33757f2
test: Make tests verbose
caffeine-addictt Aug 30, 2024
e5a1874
chore: Add "make bench" helper
caffeine-addictt Aug 30, 2024
1e73765
feat: Improve string cleaning to strip esc chars
caffeine-addictt Aug 30, 2024
a53c12e
security: Clean filepath before open() call
caffeine-addictt Aug 30, 2024
259c468
feat: Add cleanString type helper
caffeine-addictt Aug 30, 2024
c93b085
feat: Update styles struct
caffeine-addictt Aug 30, 2024
50ccbc9
feat: Add Set type
caffeine-addictt Aug 31, 2024
9fb966a
chore(deps): Add testify
caffeine-addictt Aug 31, 2024
fdf441b
fix: Validation logic error
caffeine-addictt Aug 31, 2024
949aad6
feat: Use set
caffeine-addictt Aug 31, 2024
f9248b3
test: Use asserts instead of t.Fatalf
caffeine-addictt Aug 31, 2024
44b8866
feat: Add string starts with utility
caffeine-addictt Sep 1, 2024
5c283fe
feat: Make valueguard jsonify-able
caffeine-addictt Sep 1, 2024
c92e9b3
feat: Add Regex cleaned string
caffeine-addictt Sep 1, 2024
a23f944
feat: Implement templater
caffeine-addictt Sep 1, 2024
162822c
feat: Implement quicksort
caffeine-addictt Sep 2, 2024
662bbe3
feat: Improve default repo and dir setting
caffeine-addictt Sep 2, 2024
f178a89
feat: Improve check cmd help msg
caffeine-addictt Sep 2, 2024
455a552
refactor: Use a new variable instead of mutating
caffeine-addictt Sep 2, 2024
0db923e
feat: Handle parsing json template
caffeine-addictt Sep 2, 2024
bf6a2f2
feat: Implement binary search
caffeine-addictt Sep 2, 2024
488298c
feat: Implement resolving file paths to include
caffeine-addictt Sep 2, 2024
5e02903
feat: Implement Set.Copy()
caffeine-addictt Sep 2, 2024
b86e18e
feat: Add basic template.json file
caffeine-addictt Sep 2, 2024
620b2fd
feat: Only require root "name" if no "styles"
caffeine-addictt Sep 2, 2024
7bedcbc
feat: Require a style name
caffeine-addictt Sep 2, 2024
3de406a
feat: Implement recursive walking directory
caffeine-addictt Sep 2, 2024
957ac7d
feat: Fetch file paths in "new" command
caffeine-addictt Sep 2, 2024
fe63467
feat: Handle ignored paths in "new" command
caffeine-addictt Sep 2, 2024
12db103
revert: Style name is the key value
caffeine-addictt Sep 2, 2024
0557ace
feat: Add json schema
caffeine-addictt Sep 2, 2024
1715b03
feat: Move current style into simple-github
caffeine-addictt Sep 2, 2024
a92ac02
fix: Set repo value if empty
caffeine-addictt Sep 2, 2024
029e5fc
feat: Add logging helper
caffeine-addictt Sep 2, 2024
b27bc91
revert: No spinner when git cloning
caffeine-addictt Sep 2, 2024
9dddc8b
fix: Pass file path instead of dir path
caffeine-addictt Sep 2, 2024
101f2d4
fix: os.Exit() not running deferred funcs
caffeine-addictt Sep 2, 2024
758dee1
feat: Add some logs
caffeine-addictt Sep 2, 2024
33f1463
fix: Ignore directoried
caffeine-addictt Sep 2, 2024
2f17419
fix: Force / paths
caffeine-addictt Sep 2, 2024
20e2617
feat: Make name illegal if styles is provided
caffeine-addictt Sep 2, 2024
4c38382
feat: Add accessibility flag
caffeine-addictt Sep 3, 2024
300ce6d
revert: Remove "[default: false]" text
caffeine-addictt Sep 3, 2024
96e1fcc
feat: Add prompts to templatejson
caffeine-addictt Sep 3, 2024
a7d5cbe
revert: Remove skip from templatejson
caffeine-addictt Sep 3, 2024
1b5d7cd
chore(deps): Add huh
caffeine-addictt Sep 3, 2024
11d2474
feat: Add license fetching
caffeine-addictt Sep 4, 2024
12fafd4
feat: Add name flag to new cmd
caffeine-addictt Sep 4, 2024
aa48c5f
feat: Ask for project name
caffeine-addictt Sep 4, 2024
234aad0
feat: Create project directory
caffeine-addictt Sep 4, 2024
20a33df
style: Fix formatting
caffeine-addictt Sep 5, 2024
2433301
feat: Separate struct from map[string]T
caffeine-addictt Sep 6, 2024
9ad49ed
feat: Add license and style flags
caffeine-addictt Sep 6, 2024
4917177
refactor: Update flag descriptions
caffeine-addictt Sep 6, 2024
92e8386
feat: Use context for handling cancellations
caffeine-addictt Sep 6, 2024
e304906
refactor: Remove state and return huh.Input
caffeine-addictt Sep 6, 2024
b5fc203
feat: Implement prompting for license
caffeine-addictt Sep 6, 2024
1bbcc41
feat: Implement prompting for style
caffeine-addictt Sep 6, 2024
0199289
feat: Ask to license and project name together
caffeine-addictt Sep 6, 2024
733a0ba
feat: Handle resolving style to use
caffeine-addictt Sep 6, 2024
77a68cf
refactor: Make print start with lowercase
caffeine-addictt Sep 6, 2024
b1a7128
feat: Handle extra prompts (from templatejson)
caffeine-addictt Sep 6, 2024
f22b69b
feat: Handle license prompts (from gh API)
caffeine-addictt Sep 6, 2024
3e4bb14
fix: Walk rootDir (tmp) instead of proj (new)
caffeine-addictt Sep 6, 2024
981a8ba
feat: Account for non * regex in ignore rules
caffeine-addictt Sep 6, 2024
7ef7163
style: Fix linting
caffeine-addictt Sep 6, 2024
9798d62
fix: CWE-276 write files with owner-only perms
caffeine-addictt Sep 6, 2024
60f8c3d
feat: Handle ignores
caffeine-addictt Sep 6, 2024
99274e9
feat: Implement writing files concurrently/parallel
caffeine-addictt Sep 6, 2024
e05e539
chore: Tidy mod file
caffeine-addictt Sep 6, 2024
d1622da
feat: Ignore setup scripts by default too
caffeine-addictt Sep 6, 2024
4d07d17
docs: Add go report badge
caffeine-addictt Sep 6, 2024
59a3da9
docs: Add documentation link
caffeine-addictt Sep 6, 2024
ccbfb0f
docs: Update description
caffeine-addictt Sep 6, 2024
8535ef4
docs: Update getting started section
caffeine-addictt Sep 6, 2024
412cd9d
docs: Add docs page with default md file
caffeine-addictt Sep 6, 2024
54323a4
chore: Remove citation cff
caffeine-addictt Sep 6, 2024
a4ba349
chore!: License template under AGpl-3.0
caffeine-addictt Sep 6, 2024
f2c4594
feat: Add docker
caffeine-addictt Sep 6, 2024
7996e23
chore: Update project name template -> waku
caffeine-addictt Sep 7, 2024
b91577c
fix: File/Dir perms issue
caffeine-addictt Sep 7, 2024
d172682
feat: Show cmd stdOut and stdErr on verbose/debug
caffeine-addictt Sep 7, 2024
7aa9e24
fix: Generated files are root only
caffeine-addictt Sep 7, 2024
1dee763
chore: Add built waku bin to ignore list
caffeine-addictt Sep 7, 2024
b5933b8
fix: Testing command in goreleaser
caffeine-addictt Sep 7, 2024
fbe1a60
chore: Add AUR to goreleaser
caffeine-addictt Sep 7, 2024
5c5a299
ci: Add docker releases
caffeine-addictt Sep 7, 2024
3dfc3d7
chore: Update license
caffeine-addictt Sep 7, 2024
470f8a3
chore: Remove explicit license and readme to arch
caffeine-addictt Sep 7, 2024
9162482
chore: Update regex for release drafting
caffeine-addictt Sep 7, 2024
7aff476
ci: Add AUR key
caffeine-addictt Sep 7, 2024
f7bc95d
feat: Add install scripts
caffeine-addictt Sep 7, 2024
acada08
docs: Add install docs
caffeine-addictt Sep 7, 2024
b3de589
chore: Un-skip uploads
caffeine-addictt Sep 7, 2024
8517a7c
docs: Add docker img disclaimer
caffeine-addictt Sep 7, 2024
dba9614
docs: Add templating docs
caffeine-addictt Sep 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ root = true

# All
[*]
indent_size = 2
end_of_line = lf
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
indent_size = 2
indent_style = space
quote_type = single

# Programming languages
[*.{py,js,ts,jsx,tsx}]
charset = utf-8
# Makefile
[Makefile]
indent_style = tab

# Python
[*.py]
indent_style = space
# Golang
[*.go]
charset = utf-8
indent_size = 4
indent_style = tab
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CODESTYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Please ensure that your code passes linting before merging a Pull Request.
```ts
/** Get a greeting string */
const myFunction = (): string => {
return 'hi';
return "hi";
};
```

Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/1-bug-report.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: 'Bug Report'
about: 'Report an issue to help the project improve.'
title: '[Bug] '
labels: 'Type: Bug'
name: "Bug Report"
about: "Report an issue to help the project improve."
title: "[Bug] "
labels: "Type: Bug"
assignees: caffeine-addictt
---

# Bug report

Your issue may already be reported!
Please check out our [active issues](https://github.com/caffeine-addictt/template/issues) before creating one.
Please check out our [active issues](https://github.com/caffeine-addictt/waku/issues) before creating one.

## Expected Behavior

Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/2-failing-test.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: 'Failing Test'
about: 'Report failing tests or CI jobs.'
title: '[Test] '
labels: 'Type: Test'
name: "Failing Test"
about: "Report failing tests or CI jobs."
title: "[Test] "
labels: "Type: Test"
assignees: caffeine-addictt
---

# Failing Test

Your issue may already be reported!
Please check out our [active issues](https://github.com/caffeine-addictt/template/issues) before creating one.
Please check out our [active issues](https://github.com/caffeine-addictt/waku/issues) before creating one.

## Which Jobs/Tests are Failing?

Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/3-docs-bug.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: 'Documentation or README.md issue report'
name: "Documentation or README.md issue report"
about: "Report an issue in the project's documentation or README.md file."
title: ''
labels: 'Documentation'
title: ""
labels: "Documentation"
assignees: caffeine-addictt
---

# Documentation Issue Report

Your issue may already be reported!
Please check out our [active issues](https://github.com/caffeine-addictt/template/issues) before creating one.
Please check out our [active issues](https://github.com/caffeine-addictt/waku/issues) before creating one.

## Describe the Bug

Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/4-feature-request.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: 'Feature Request'
about: 'Suggest an idea or possible new feature for this project.'
title: ''
labels: 'Type: Feature'
name: "Feature Request"
about: "Suggest an idea or possible new feature for this project."
title: ""
labels: "Type: Feature"
assignees: caffeine-addictt
---

# Feature Request

Your issue may already be reported!
Please check out our [active issues](https://github.com/caffeine-addictt/template/issues) before creating one.
Please check out our [active issues](https://github.com/caffeine-addictt/waku/issues) before creating one.

## Is Your Feature Request Related to an Issue?

Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/5-enhancement-request.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: 'Enhancement Request'
about: 'Suggest an enhancement for this project. Improve an existing feature'
title: ''
labels: 'Type: Enhancement'
name: "Enhancement Request"
about: "Suggest an enhancement for this project. Improve an existing feature"
title: ""
labels: "Type: Enhancement"
assignees: caffeine-addictt
---

# Enhancement Request

Your issue may already be reported!
Please check out our [active issues](https://github.com/caffeine-addictt/template/issues) before creating one.
Please check out our [active issues](https://github.com/caffeine-addictt/waku/issues) before creating one.

## Is Your Enhancement Request Related to an Issue?

Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/6-security-report.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: 'Security Report'
about: 'Report an issue to help the project improve.'
title: ''
labels: 'Type: Security'
name: "Security Report"
about: "Report an issue to help the project improve."
title: ""
labels: "Type: Security"
assignees: caffeine-addictt
---

Expand Down Expand Up @@ -45,7 +45,7 @@ The data that must NOT be posted here:
# Security Report

Your issue may already be reported!
Please check out our [active issues](https://github.com/caffeine-addictt/template/issues) before creating one.
Please check out our [active issues](https://github.com/caffeine-addictt/waku/issues) before creating one.

## Describe the Security Issue

Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/7-question-support.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: 'Question or Support Request'
about: 'Questions and requests for support.'
title: ''
labels: ['Type: Question', 'help wanted']
name: "Question or Support Request"
about: "Questions and requests for support."
title: ""
labels: ["Type: Question", "help wanted"]
assignees: caffeine-addictt
---

Expand Down
28 changes: 17 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: 'github-actions'
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
directory: '/'
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: 'weekly'
interval: "weekly"

# - package-ecosystem: "npm" # See documentation for possible values
# directory: "/" # Location of package manifests
# schedule:
# interval: "weekly"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
6 changes: 3 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

Documentation:
- changed-files:
- any-glob-to-any-file: [docs/**, './*.{md,mdx}']
- any-glob-to-any-file: [docs/**, "./*.{md,mdx}"]

'Type: Test':
"Type: Test":
- changed-files:
- any-glob-to-any-file: [tests/**, ./*test*]

'Type: CI':
"Type: CI":
- changed-files:
- any-glob-to-any-file: [.github/workflows/**]
40 changes: 0 additions & 40 deletions .github/release-drafter.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/check-dist.yml

This file was deleted.

6 changes: 1 addition & 5 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ name: Labeler
on:
- pull_request_target

# This workflow will require write permissions on pull requests
# 1. Repository Settings -> Actions -> General -> Workflow permissions
# Check "Read and write permissions"

jobs:
labeler:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
repo-token: "${{ secrets.GITHUB_TOKEN }}"
Loading
Loading