opencode-skills-antigravity 0.0.7 → 0.0.9
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/README.md +5 -3
- package/bundled-skills/007/scripts/full_audit.py +6 -4
- package/bundled-skills/007/scripts/score_calculator.py +67 -7
- package/bundled-skills/algorithmic-art/templates/viewer.html +2 -2
- package/bundled-skills/apify-actorization/SKILL.md +1 -2
- package/bundled-skills/apify-actorization/references/cli-actorization.md +4 -4
- package/bundled-skills/docs/COMMUNITY_GUIDELINES.md +1 -1
- package/bundled-skills/docs/contributors/community-guidelines.md +3 -32
- package/bundled-skills/docs/integrations/jetski-gemini-loader/loader.ts +21 -3
- package/bundled-skills/docs/maintainers/security-findings-triage-2026-03-18-addendum.md +22 -0
- package/bundled-skills/docs/users/getting-started.md +1 -1
- package/bundled-skills/docs/users/walkthrough.md +21 -17
- package/bundled-skills/dotnet-backend-patterns/resources/implementation-playbook.md +2 -2
- package/bundled-skills/instagram/scripts/auth.py +15 -6
- package/bundled-skills/landing-page-generator/SKILL.md +203 -0
- package/bundled-skills/landing-page-generator/references/conversion-patterns.md +176 -0
- package/bundled-skills/landing-page-generator/references/frameworks.md +177 -0
- package/bundled-skills/landing-page-generator/references/landing-page-patterns.md +98 -0
- package/bundled-skills/landing-page-generator/references/seo-checklist.md +109 -0
- package/bundled-skills/landing-page-generator/scripts/landing_page_scaffolder.py +568 -0
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +33 -1073
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +7 -4
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/src/db/migrations.ts +15 -3
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/src/routes/todos.ts +85 -88
- package/bundled-skills/loki-mode/examples/todo-app-generated/frontend/package-lock.json +260 -456
- package/bundled-skills/loki-mode/examples/todo-app-generated/frontend/package.json +4 -2
- package/bundled-skills/notebooklm/scripts/auth_manager.py +17 -3
- package/bundled-skills/notebooklm/scripts/browser_session.py +11 -2
- package/bundled-skills/radix-ui-design-system/examples/README.md +1 -1
- package/bundled-skills/whatsapp-cloud-api/assets/boilerplate/nodejs/src/webhook-handler.ts +5 -3
- package/bundled-skills/whatsapp-cloud-api/assets/boilerplate/python/app.py +21 -13
- package/bundled-skills/whatsapp-cloud-api/assets/boilerplate/python/webhook_handler.py +11 -4
- package/package.json +1 -1
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/src/db/db.ts +0 -35
- /package/bundled-skills/dotnet-backend-patterns/assets/{repository-template.cs → repository-template.cs.template} +0 -0
- /package/bundled-skills/dotnet-backend-patterns/assets/{service-template.cs → service-template.cs.template} +0 -0
- /package/bundled-skills/radix-ui-design-system/templates/{component-template.tsx → component-template.tsx.template} +0 -0
|
@@ -9,18 +9,21 @@
|
|
|
9
9
|
"dev": "ts-node src/index.ts"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"better-sqlite3": "^
|
|
12
|
+
"better-sqlite3": "^12.8.0",
|
|
13
13
|
"cors": "^2.8.5",
|
|
14
14
|
"express": "^4.18.2",
|
|
15
|
-
"
|
|
15
|
+
"express-rate-limit": "^8.3.1"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@types/better-sqlite3": "^7.6.
|
|
18
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
19
19
|
"@types/cors": "^2.8.19",
|
|
20
20
|
"@types/express": "^4.17.20",
|
|
21
21
|
"@types/node": "^20.10.0",
|
|
22
|
-
"@types/sqlite3": "^3.1.11",
|
|
23
22
|
"ts-node": "^10.9.1",
|
|
24
23
|
"typescript": "^5.3.0"
|
|
24
|
+
},
|
|
25
|
+
"overrides": {
|
|
26
|
+
"diff": "4.0.4",
|
|
27
|
+
"qs": "^6.15.0"
|
|
25
28
|
}
|
|
26
29
|
}
|
|
@@ -2,12 +2,25 @@ import { getDatabase } from './database';
|
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function resolveSchemaPath(): string {
|
|
6
|
+
const candidates = [
|
|
7
|
+
path.join(__dirname, 'schema.sql'),
|
|
8
|
+
path.join(__dirname, '../../src/db/schema.sql'),
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
for (const candidate of candidates) {
|
|
12
|
+
if (fs.existsSync(candidate)) {
|
|
13
|
+
return candidate;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
throw new Error(`Unable to locate schema.sql. Checked: ${candidates.join(', ')}`);
|
|
18
|
+
}
|
|
6
19
|
|
|
7
20
|
export function runMigrations(): void {
|
|
8
21
|
try {
|
|
9
22
|
const db = getDatabase();
|
|
10
|
-
const schema = fs.readFileSync(
|
|
23
|
+
const schema = fs.readFileSync(resolveSchemaPath(), 'utf-8');
|
|
11
24
|
|
|
12
25
|
// Execute the schema SQL
|
|
13
26
|
db.exec(schema);
|
|
@@ -28,4 +41,3 @@ export function initializeDatabase(): void {
|
|
|
28
41
|
throw error;
|
|
29
42
|
}
|
|
30
43
|
}
|
|
31
|
-
|
|
@@ -1,27 +1,48 @@
|
|
|
1
1
|
import { Router, Request, Response } from 'express';
|
|
2
|
-
import
|
|
2
|
+
import { rateLimit } from 'express-rate-limit';
|
|
3
|
+
import { getDatabase } from '../db';
|
|
3
4
|
import { ApiResponse, Todo } from '../types/index';
|
|
4
5
|
|
|
5
6
|
const router = Router();
|
|
7
|
+
const WINDOW_MS = 60_000;
|
|
8
|
+
const MAX_REQUESTS_PER_WINDOW = 60;
|
|
9
|
+
const db = getDatabase();
|
|
10
|
+
|
|
11
|
+
type TodoRow = Omit<Todo, 'completed'> & { completed: number };
|
|
12
|
+
|
|
13
|
+
function toTodo(row: TodoRow): Todo {
|
|
14
|
+
return {
|
|
15
|
+
...row,
|
|
16
|
+
completed: Boolean(row.completed),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
router.use(
|
|
21
|
+
rateLimit({
|
|
22
|
+
windowMs: WINDOW_MS,
|
|
23
|
+
limit: MAX_REQUESTS_PER_WINDOW,
|
|
24
|
+
standardHeaders: 'draft-8',
|
|
25
|
+
legacyHeaders: false,
|
|
26
|
+
message: { error: 'Too many requests. Please retry later.' },
|
|
27
|
+
})
|
|
28
|
+
);
|
|
6
29
|
|
|
7
30
|
// GET /api/todos - Retrieve all todos
|
|
8
31
|
router.get('/todos', (_req: Request, res: Response): void => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const errorResponse: ApiResponse<null> = {
|
|
12
|
-
success: false,
|
|
13
|
-
error: 'Database error',
|
|
14
|
-
};
|
|
15
|
-
res.status(500).json(errorResponse);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
32
|
+
try {
|
|
33
|
+
const rows = db.prepare('SELECT * FROM todos ORDER BY createdAt DESC').all() as TodoRow[];
|
|
19
34
|
const successResponse: ApiResponse<Todo[]> = {
|
|
20
35
|
success: true,
|
|
21
|
-
data: rows
|
|
36
|
+
data: rows.map(toTodo),
|
|
22
37
|
};
|
|
23
38
|
res.json(successResponse);
|
|
24
|
-
}
|
|
39
|
+
} catch {
|
|
40
|
+
const errorResponse: ApiResponse<null> = {
|
|
41
|
+
success: false,
|
|
42
|
+
error: 'Database error',
|
|
43
|
+
};
|
|
44
|
+
res.status(500).json(errorResponse);
|
|
45
|
+
}
|
|
25
46
|
});
|
|
26
47
|
|
|
27
48
|
// POST /api/todos - Create new todo
|
|
@@ -37,30 +58,28 @@ router.post('/todos', (req: Request, res: Response): void => {
|
|
|
37
58
|
const trimmedTitle = title.trim();
|
|
38
59
|
const now = new Date().toISOString();
|
|
39
60
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (err) {
|
|
52
|
-
res.status(500).json({ error: 'Database error', details: err.message });
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const successResponse: ApiResponse<Todo> = {
|
|
57
|
-
success: true,
|
|
58
|
-
data: row,
|
|
59
|
-
};
|
|
60
|
-
res.status(201).json(successResponse);
|
|
61
|
-
});
|
|
61
|
+
try {
|
|
62
|
+
const insertResult = db
|
|
63
|
+
.prepare('INSERT INTO todos (title, completed, createdAt, updatedAt) VALUES (?, ?, ?, ?)')
|
|
64
|
+
.run(trimmedTitle, 0, now, now);
|
|
65
|
+
const row = db
|
|
66
|
+
.prepare('SELECT * FROM todos WHERE id = ?')
|
|
67
|
+
.get(insertResult.lastInsertRowid) as TodoRow | undefined;
|
|
68
|
+
|
|
69
|
+
if (!row) {
|
|
70
|
+
res.status(500).json({ error: 'Database error' });
|
|
71
|
+
return;
|
|
62
72
|
}
|
|
63
|
-
|
|
73
|
+
|
|
74
|
+
const successResponse: ApiResponse<Todo> = {
|
|
75
|
+
success: true,
|
|
76
|
+
data: toTodo(row),
|
|
77
|
+
};
|
|
78
|
+
res.status(201).json(successResponse);
|
|
79
|
+
} catch (error) {
|
|
80
|
+
const details = error instanceof Error ? error.message : 'Unknown error';
|
|
81
|
+
res.status(500).json({ error: 'Database error', details });
|
|
82
|
+
}
|
|
64
83
|
});
|
|
65
84
|
|
|
66
85
|
// PATCH /api/todos/:id - Update todo completion status
|
|
@@ -74,45 +93,35 @@ router.patch('/todos/:id', (req: Request, res: Response): void => {
|
|
|
74
93
|
return;
|
|
75
94
|
}
|
|
76
95
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (err) {
|
|
80
|
-
res.status(500).json({ error: 'Database error', details: err.message });
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
96
|
+
try {
|
|
97
|
+
const row = db.prepare('SELECT * FROM todos WHERE id = ?').get(id) as TodoRow | undefined;
|
|
83
98
|
if (!row) {
|
|
84
99
|
res.status(404).json({ error: 'Todo not found' });
|
|
85
100
|
return;
|
|
86
101
|
}
|
|
87
|
-
|
|
88
102
|
const now = new Date().toISOString();
|
|
89
103
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
function(err: Error | null) {
|
|
95
|
-
if (err) {
|
|
96
|
-
res.status(500).json({ error: 'Database error', details: err.message });
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Return updated todo
|
|
101
|
-
db.get('SELECT * FROM todos WHERE id = ?', [id], (err: any, updatedRow: Todo) => {
|
|
102
|
-
if (err) {
|
|
103
|
-
res.status(500).json({ error: 'Database error', details: err.message });
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const successResponse: ApiResponse<Todo> = {
|
|
108
|
-
success: true,
|
|
109
|
-
data: updatedRow,
|
|
110
|
-
};
|
|
111
|
-
res.json(successResponse);
|
|
112
|
-
});
|
|
113
|
-
}
|
|
104
|
+
db.prepare('UPDATE todos SET completed = ?, updatedAt = ? WHERE id = ?').run(
|
|
105
|
+
completed ? 1 : 0,
|
|
106
|
+
now,
|
|
107
|
+
id
|
|
114
108
|
);
|
|
115
|
-
|
|
109
|
+
const updatedRow = db.prepare('SELECT * FROM todos WHERE id = ?').get(id) as TodoRow | undefined;
|
|
110
|
+
|
|
111
|
+
if (!updatedRow) {
|
|
112
|
+
res.status(500).json({ error: 'Database error' });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const successResponse: ApiResponse<Todo> = {
|
|
117
|
+
success: true,
|
|
118
|
+
data: toTodo(updatedRow),
|
|
119
|
+
};
|
|
120
|
+
res.json(successResponse);
|
|
121
|
+
} catch (error) {
|
|
122
|
+
const details = error instanceof Error ? error.message : 'Unknown error';
|
|
123
|
+
res.status(500).json({ error: 'Database error', details });
|
|
124
|
+
}
|
|
116
125
|
});
|
|
117
126
|
|
|
118
127
|
// DELETE /api/todos/:id - Delete todo by id
|
|
@@ -125,31 +134,19 @@ router.delete('/todos/:id', (req: Request, res: Response): void => {
|
|
|
125
134
|
return;
|
|
126
135
|
}
|
|
127
136
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (err) {
|
|
131
|
-
res.status(500).json({ error: 'Database error', details: err.message });
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
137
|
+
try {
|
|
138
|
+
const row = db.prepare('SELECT * FROM todos WHERE id = ?').get(id) as TodoRow | undefined;
|
|
134
139
|
if (!row) {
|
|
135
140
|
res.status(404).json({ error: 'Todo not found' });
|
|
136
141
|
return;
|
|
137
142
|
}
|
|
138
143
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
res.status(500).json({ error: 'Database error', details: err.message });
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
res.json({ message: 'Todo deleted successfully' });
|
|
150
|
-
}
|
|
151
|
-
);
|
|
152
|
-
});
|
|
144
|
+
db.prepare('DELETE FROM todos WHERE id = ?').run(id);
|
|
145
|
+
res.json({ message: 'Todo deleted successfully' });
|
|
146
|
+
} catch (error) {
|
|
147
|
+
const details = error instanceof Error ? error.message : 'Unknown error';
|
|
148
|
+
res.status(500).json({ error: 'Database error', details });
|
|
149
|
+
}
|
|
153
150
|
});
|
|
154
151
|
|
|
155
152
|
export default router;
|