@mainqueueio/playground 0.1.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.
- package/.bun-version +1 -0
- package/.codebeatignore +12 -0
- package/.github/CODEOWNERS +15 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +27 -0
- package/.github/workflows/lint.yml +23 -0
- package/.github/workflows/release.yml +46 -0
- package/.github/workflows/semantic.yml +40 -0
- package/.github/workflows/stale.yml +53 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +0 -0
- package/.nvmrc +1 -0
- package/.release-it.json +67 -0
- package/Brewfile +1 -0
- package/CHANGELOG.md +13 -0
- package/README.md +15 -0
- package/build.ts +5 -0
- package/bun.lock +838 -0
- package/bunfig.toml +9 -0
- package/commitlint.config.js +3 -0
- package/package.json +34 -0
- package/src/index.spec.ts +25 -0
- package/src/index.ts +8 -0
- package/tsconfig.json +28 -0
package/.bun-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.2.8
|
package/.codebeatignore
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# The code owners will appear as the default reviewers in every PR.
|
|
2
|
+
|
|
3
|
+
# More information about this file at: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
|
|
4
|
+
|
|
5
|
+
# Default code owners
|
|
6
|
+
|
|
7
|
+
* @diegocuehdz
|
|
8
|
+
|
|
9
|
+
# Only super-priviledge users should be able to edit this file
|
|
10
|
+
|
|
11
|
+
/.github/workflows/\*\* @MainQueueIO/admins
|
|
12
|
+
|
|
13
|
+
# Prevent mods to this file (Codeowners)
|
|
14
|
+
|
|
15
|
+
/.github/CODEOWNERS @MainQueueIO/admins
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<-- Add a description of your changes !-->
|
|
4
|
+
|
|
5
|
+
## Change summary per file, functionality or module
|
|
6
|
+
|
|
7
|
+
<-- List or group the changes that you made !-->
|
|
8
|
+
|
|
9
|
+
## Issue list that the PR addresses
|
|
10
|
+
|
|
11
|
+
- [Issue Number](https://github.com/MainQueueIO/playground/issues)
|
|
12
|
+
|
|
13
|
+
## Checklist
|
|
14
|
+
|
|
15
|
+
- [ ] The project compiled correctly
|
|
16
|
+
- [ ] The documentation was updated
|
|
17
|
+
- [ ] Unit tests were added successfully
|
|
18
|
+
|
|
19
|
+
## Notes
|
|
20
|
+
|
|
21
|
+
<-- Add any additional notes !-->
|
|
22
|
+
|
|
23
|
+
## ScreenShots (If required)
|
|
24
|
+
|
|
25
|
+
| Before | After |
|
|
26
|
+
| ------ | ------ |
|
|
27
|
+
| Screen | Screen |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: "[PR] Lint & Format Code"
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
run-linters:
|
|
7
|
+
name: Run linters
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
|
|
10
|
+
steps:
|
|
11
|
+
- name: Check out Git repository
|
|
12
|
+
uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Set up Bun
|
|
15
|
+
uses: oven-sh/setup-bun@v2
|
|
16
|
+
with:
|
|
17
|
+
bun-version-file: ".bun-version"
|
|
18
|
+
|
|
19
|
+
- name: Install Deps via Bun
|
|
20
|
+
run: bun install
|
|
21
|
+
|
|
22
|
+
- name: Run linters
|
|
23
|
+
run: bun test # TBD: Replace with the actual command to run linters after creating linting repo
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
name: "[Release] Release"
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- name: Checkout Repository
|
|
12
|
+
uses: actions/checkout@v4.2.2
|
|
13
|
+
|
|
14
|
+
- name: Initialize Git user
|
|
15
|
+
run: |
|
|
16
|
+
git config --global user.email "bot@mainqueue.io"
|
|
17
|
+
git config --global user.name "MainQueue.io Bot"
|
|
18
|
+
|
|
19
|
+
- name: Setup Node.js
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version-file: ".nvmrc"
|
|
23
|
+
registry-url: https://registry.npmjs.org/
|
|
24
|
+
|
|
25
|
+
- name: Setup Bun.js
|
|
26
|
+
uses: oven-sh/setup-bun@v2
|
|
27
|
+
with:
|
|
28
|
+
bun-version-file: ".bun-version"
|
|
29
|
+
|
|
30
|
+
- name: Install the dependancies
|
|
31
|
+
run: bun install
|
|
32
|
+
|
|
33
|
+
- name: Authenticate with NPM
|
|
34
|
+
run: |
|
|
35
|
+
echo "//registry.npmjs.org/:_authToken=${{ secrets.ORG_MQIO_NPM_TOKEN }}" > ~/.npmrc
|
|
36
|
+
|
|
37
|
+
- name: Build dist files with tsc
|
|
38
|
+
run: bun run build.ts
|
|
39
|
+
|
|
40
|
+
- name: Create Release
|
|
41
|
+
run: |
|
|
42
|
+
bun release:ci
|
|
43
|
+
env:
|
|
44
|
+
NODE_AUTH_TOKEN: ${{ secrets.ORG_MQIO_NPM_TOKEN }}
|
|
45
|
+
NPM_TOKEN: ${{ secrets.ORG_MQIO_NPM_TOKEN }}
|
|
46
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: "[PR] Semantic Pull Request"
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
types:
|
|
5
|
+
- opened
|
|
6
|
+
- edited
|
|
7
|
+
- synchronize
|
|
8
|
+
- reopened
|
|
9
|
+
- labeled
|
|
10
|
+
- unlabeled
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
check-pullrequest-label:
|
|
14
|
+
name: Check for labeled PR
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- name: Platform label
|
|
18
|
+
uses: agilepathway/label-checker@v1.6.65
|
|
19
|
+
with:
|
|
20
|
+
any_of: ci,config,deps,npm,jsr,github-packages
|
|
21
|
+
none_of: "@:"
|
|
22
|
+
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
23
|
+
|
|
24
|
+
check-pullrequest-title:
|
|
25
|
+
name: Check for semantic PR title
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: amannn/action-semantic-pull-request@v5.5.3
|
|
29
|
+
env:
|
|
30
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
31
|
+
with:
|
|
32
|
+
wip: true
|
|
33
|
+
validateSingleCommit: true
|
|
34
|
+
scopes: |
|
|
35
|
+
ci
|
|
36
|
+
config
|
|
37
|
+
deps
|
|
38
|
+
npm
|
|
39
|
+
jsr
|
|
40
|
+
github-packages
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: "[Cron] Close stale elements"
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 0 * * *"
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
close-stale-issues-and-prs:
|
|
9
|
+
name: Close stale issues and PRs
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
issues: write
|
|
13
|
+
pull-requests: write
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/stale@v9
|
|
16
|
+
with:
|
|
17
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
18
|
+
|
|
19
|
+
# Issues cron logic
|
|
20
|
+
days-before-issue-stale: 20
|
|
21
|
+
days-before-issue-close: 10
|
|
22
|
+
stale-issue-label: "stale"
|
|
23
|
+
stale-issue-message: "This issue has been marked as stale because it hasn't had any activity for 20 days. If this is still active, please comment on the issue and it will be marked as active again."
|
|
24
|
+
close-issue-message: "This issue has been closed because it has not had any activity for 30 days. Re-open it if you still want/need to work on it."
|
|
25
|
+
exempt-issue-labels: "skip-cron-ci"
|
|
26
|
+
|
|
27
|
+
# PR cron logic
|
|
28
|
+
days-before-pr-stale: 20
|
|
29
|
+
days-before-pr-close: 10
|
|
30
|
+
stale-pr-label: "stale"
|
|
31
|
+
stale-pr-message: "This PR has been marked as stale because it hasn't had any activity for 20 days. If this PR is still active, please comment on the PR or push new changes and it will be marked as active again."
|
|
32
|
+
close-pr-message: "This PR has been closed because it has not had any activity for 30 days. Either create a new PR or re-open this one."
|
|
33
|
+
exempt-pr-labels: "skip-cron-ci"
|
|
34
|
+
|
|
35
|
+
close-stale-branches: # here are what each param does https://github.com/beatlabs/delete-old-branches-action/blob/master/action.yml
|
|
36
|
+
name: Close stale branches
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
steps:
|
|
39
|
+
- name: Checkout repository
|
|
40
|
+
uses: actions/checkout@v4
|
|
41
|
+
- name: Run delete-old-branches-action
|
|
42
|
+
uses: beatlabs/delete-old-branches-action@v0.0.10
|
|
43
|
+
with:
|
|
44
|
+
repo_token: ${{ github.token }}
|
|
45
|
+
date: '2 months ago'
|
|
46
|
+
delete_tags: false
|
|
47
|
+
minimum_tags: false
|
|
48
|
+
default_branches: main,develop,master
|
|
49
|
+
#extra_protected_branch_regex: master.*|main|develop|^release.*$
|
|
50
|
+
#extra_protected_tag_regex: '^v.*'
|
|
51
|
+
exclude_open_pr_branches: true
|
|
52
|
+
dry_run: false #move this to false to actually delete branches after being sure
|
|
53
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bunx --no -- commitlint --edit $1
|
|
File without changes
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
22.14.0
|
package/.release-it.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"git": {
|
|
3
|
+
"commitMessage": "chore: release v${version}",
|
|
4
|
+
"requireBranch": "main"
|
|
5
|
+
},
|
|
6
|
+
"github": {
|
|
7
|
+
"release": true,
|
|
8
|
+
"releaseName": "v${version}",
|
|
9
|
+
"autoGenerate": true,
|
|
10
|
+
"tokenRef": "GITHUB_TOKEN",
|
|
11
|
+
"comments": {
|
|
12
|
+
"submit": true,
|
|
13
|
+
"issue": ":rocket: _This issue has been resolved in version ${version}. See [${releaseName}](${releaseUrl}) for release notes._",
|
|
14
|
+
"pr": ":rocket: _This pull request is included in version ${version}. See [${releaseName}](${releaseUrl}) for release notes._"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"npm": {
|
|
18
|
+
"publish": true,
|
|
19
|
+
"skipChecks": true,
|
|
20
|
+
"publishArgs": [
|
|
21
|
+
"--access=public"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"plugins": {
|
|
25
|
+
"@release-it/conventional-changelog": {
|
|
26
|
+
"infile": "CHANGELOG.md",
|
|
27
|
+
"header": "# Changelog",
|
|
28
|
+
"preset": {
|
|
29
|
+
"name": "conventionalcommits",
|
|
30
|
+
"types": [
|
|
31
|
+
{
|
|
32
|
+
"section": "๐ New Features",
|
|
33
|
+
"type": "feat"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"section": "๐ Bug Fixes",
|
|
37
|
+
"type": "fix"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"section": "๐ฆ Miscellaneous tasks",
|
|
41
|
+
"type": "chore"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"section": "๐ Documentation",
|
|
45
|
+
"type": "docs"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"section": "๐ Code improvements",
|
|
49
|
+
"type": "style"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"section": "โป๏ธ Refactors",
|
|
53
|
+
"type": "refactor"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"section": "๐๏ธ Performance upgrades",
|
|
57
|
+
"type": "perf"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"section": "๐งช Tests",
|
|
61
|
+
"type": "test"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
package/Brewfile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
brew "oven-sh/bun/bun"
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.1 (2025-04-07)
|
|
4
|
+
|
|
5
|
+
### ๐ Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **ci:** activate NPM publish ([4fe09a2](https://github.com/MainQueueIO/playground/commit/4fe09a2fe547e6aa7f0b907b8daddb0e438ea7ce))
|
|
8
|
+
|
|
9
|
+
## 0.1.0 (2025-04-07)
|
|
10
|
+
|
|
11
|
+
### ๐ New Features
|
|
12
|
+
|
|
13
|
+
* initial commit ([e84b3c2](https://github.com/MainQueueIO/playground/commit/e84b3c22f67d12f77a76089c74aef8e72e73145a))
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# playground
|
|
2
|
+
|
|
3
|
+
To install dependencies:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bun install
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
To run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun run index.ts
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This project was created using `bun init` in bun v1.2.7. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
|