Skip to content

Commit ed6088b

Browse files
committed
chore: initial commit 🤖📦
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
0 parents  commit ed6088b

File tree

98 files changed

+16151
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+16151
-0
lines changed

‎.cursor/plugins.json‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"marketplaces": {
3+
"demo": {
4+
"source": "directory",
5+
"path": "/tmp/test-marketplace"
6+
},
7+
"example-git": {
8+
"source": "git",
9+
"url": "https://github.com/example/cursor-plugins.git",
10+
"branch": "main"
11+
}
12+
},
13+
"plugins": {
14+
"my-plugin@demo": {
15+
"enabled": true
16+
},
17+
"example-plugin@example-git": {
18+
"enabled": false
19+
}
20+
}
21+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": {}
3+
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
alwaysApply: true
3+
---
4+
Default to using Bun instead of Node.js.
5+
6+
- Use `bun <file>` instead of `node <file>` or `ts-node <file>`
7+
- Use `bun test` instead of `jest` or `vitest`
8+
- Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
9+
- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
10+
- Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
11+
- Bun automatically loads .env, so don't use dotenv.
12+
13+
## APIs
14+
15+
- `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
16+
- `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
17+
- `Bun.redis` for Redis. Don't use `ioredis`.
18+
- `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
19+
- `WebSocket` is built-in. Don't use `ws`.
20+
- Prefer `Bun.file` over `node:fs`'s readFile/writeFile
21+
- Bun.$`ls` instead of execa.
22+
23+
## Testing
24+
25+
Use `bun test` to run tests.
26+
27+
```ts#index.test.ts
28+
import { test, expect } from "bun:test";
29+
30+
test("hello world", () => {
31+
expect(1).toBe(1);
32+
});
33+
```
34+
35+
## Frontend
36+
37+
Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.
38+
39+
Server:
40+
41+
```ts#index.ts
42+
import index from "./index.html"
43+
44+
Bun.serve({
45+
routes: {
46+
"/": index,
47+
"/api/users/:id": {
48+
GET: (req) => {
49+
return new Response(JSON.stringify({ id: req.params.id }));
50+
},
51+
},
52+
},
53+
// optional websocket support
54+
websocket: {
55+
open: (ws) => {
56+
ws.send("Hello, world!");
57+
},
58+
message: (ws, message) => {
59+
ws.send(message);
60+
},
61+
close: (ws) => {
62+
// handle close
63+
}
64+
},
65+
development: {
66+
hmr: true,
67+
console: true,
68+
}
69+
})
70+
```
71+
72+
HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.
73+
74+
```html#index.html
75+
<html>
76+
<body>
77+
<h1>Hello, world!</h1>
78+
<script type="module" src="./frontend.tsx"></script>
79+
</body>
80+
</html>
81+
```
82+
83+
With the following `frontend.tsx`:
84+
85+
```tsx#frontend.tsx
86+
import React from "react";
87+
88+
// import .css files directly and it works
89+
import './index.css';
90+
91+
import { createRoot } from "react-dom/client";
92+
93+
const root = createRoot(document.body);
94+
95+
export default function Frontend() {
96+
return <h1>Hello, world!</h1>;
97+
}
98+
99+
root.render(<Frontend />);
100+
```
101+
102+
Then, run index.ts
103+
104+
```sh
105+
bun --hot ./index.ts
106+
```
107+
108+
For more information, read the Bun API docs in `node_modules/bun-types/docs/**.md`.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Bug Description
10+
11+
<!-- A clear and concise description of what the bug is -->
12+
13+
## Steps to Reproduce
14+
15+
1. Run command '...'
16+
2. See error '...'
17+
3. Expected behavior '...'
18+
19+
## Expected Behavior
20+
21+
<!-- What you expected to happen -->
22+
23+
## Actual Behavior
24+
25+
<!-- What actually happened -->
26+
27+
## Environment
28+
29+
- OS: [e.g., macOS 13.0, Ubuntu 22.04, Windows 11]
30+
- aipm version: [run `aipm --version`]
31+
- Installation method: [npm, binary, source]
32+
- Shell: [e.g., bash, zsh, fish]
33+
- Bun version (if applicable): [run `bun --version`]
34+
35+
## Configuration
36+
37+
<!-- Share relevant parts of your .cursor/plugins.json (remove sensitive data) -->
38+
39+
```json
40+
{
41+
"marketplaces": {
42+
// ...
43+
}
44+
}
45+
```
46+
47+
## Error Messages
48+
49+
<!-- Paste any error messages or logs -->
50+
51+
```
52+
Error message here
53+
```
54+
55+
## Additional Context
56+
57+
<!-- Add any other context about the problem here -->
58+
59+
## Possible Solution
60+
61+
<!-- Optional: suggest a fix or reason for the bug -->
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
11+
<!-- A clear and concise description of the feature you'd like -->
12+
13+
## Problem Statement
14+
15+
<!-- What problem does this feature solve? -->
16+
17+
## Proposed Solution
18+
19+
<!-- Describe how you envision this feature working -->
20+
21+
## Example Usage
22+
23+
<!-- Show how users would interact with this feature -->
24+
25+
```bash
26+
# Example command or workflow
27+
aipm <new-command> --option value
28+
```
29+
30+
## Alternatives Considered
31+
32+
<!-- Describe alternative solutions or features you've considered -->
33+
34+
## Additional Context
35+
36+
<!-- Add any other context, mockups, or examples about the feature request -->
37+
38+
## Benefits
39+
40+
<!-- How would this feature benefit the project and its users? -->
41+
42+
- [ ] Improves user experience
43+
- [ ] Adds missing functionality
44+
- [ ] Improves performance
45+
- [ ] Better error handling
46+
- [ ] Other: ___
47+
48+
## Willing to Contribute
49+
50+
<!-- Are you willing to work on this feature? -->
51+
52+
- [ ] Yes, I can submit a PR for this
53+
- [ ] I need guidance to implement this
54+
- [ ] I can help with testing
55+
- [ ] Just suggesting, can't contribute code
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## Description
2+
3+
<!-- Describe your changes in detail -->
4+
5+
## Type of Change
6+
7+
<!-- Mark the relevant option with an "x" -->
8+
9+
- [ ] Bug fix (non-breaking change which fixes an issue)
10+
- [ ] New feature (non-breaking change which adds functionality)
11+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] Documentation update
13+
- [ ] Refactoring (no functional changes)
14+
- [ ] Performance improvement
15+
- [ ] Test addition or modification
16+
17+
## Checklist
18+
19+
- [ ] My code follows the code style of this project (ran `bun run format`)
20+
- [ ] I have performed a self-review of my code
21+
- [ ] I have commented my code, particularly in hard-to-understand areas
22+
- [ ] I have made corresponding changes to the documentation
23+
- [ ] My changes generate no new warnings or errors
24+
- [ ] I have added tests that prove my fix is effective or that my feature works
25+
- [ ] New and existing unit tests pass locally with my changes (`bun test`)
26+
- [ ] All CI checks pass (`bun run ci`)
27+
- [ ] I have updated the CHANGELOG.md (if applicable)
28+
29+
## Testing
30+
31+
<!-- Describe the tests you ran and how to reproduce them -->
32+
33+
```bash
34+
# Example commands used to test
35+
aipm init
36+
aipm marketplace add local ./test-marketplace
37+
```
38+
39+
## Related Issues
40+
41+
<!-- Link related issues here -->
42+
43+
Closes #
44+
Related to #
45+
46+
## Additional Context
47+
48+
<!-- Add any other context, screenshots, or information about the PR here -->

‎.github/workflows/ci.yml‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
lint-and-test:
11+
name: Lint and Test
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Bun
17+
uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: latest
20+
21+
- name: Install dependencies
22+
run: bun install --frozen-lockfile
23+
24+
- name: Format check
25+
run: bun run format:check
26+
27+
- name: Lint check
28+
run: bun run lint:check
29+
30+
- name: Type check
31+
run: bun run typecheck
32+
33+
- name: Run tests with coverage
34+
run: bun run test:coverage
35+
36+
build:
37+
name: Build Executables
38+
runs-on: ${{ matrix.os }}
39+
strategy:
40+
matrix:
41+
include:
42+
- os: ubuntu-latest
43+
target: linux
44+
artifact: aipm-linux-x64
45+
- os: macos-latest
46+
target: darwin
47+
artifact: aipm-darwin-x64
48+
- os: macos-latest
49+
target: darwin-arm
50+
artifact: aipm-darwin-arm64
51+
- os: windows-latest
52+
target: windows
53+
artifact: aipm-windows-x64.exe
54+
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- name: Setup Bun
59+
uses: oven-sh/setup-bun@v2
60+
with:
61+
bun-version: latest
62+
63+
- name: Install dependencies
64+
run: bun install --frozen-lockfile
65+
66+
- name: Build executable
67+
run: bun run build:${{ matrix.target }}
68+
69+
- name: Upload artifact
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: ${{ matrix.artifact }}
73+
path: dist/${{ matrix.artifact }}
74+
retention-days: 7

0 commit comments

Comments
 (0)