@enjoys/context-engine 1.0.6 → 1.0.8
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 +477 -100
- package/data/commands/dockerfile.json +66 -0
- package/data/commands/lua.json +66 -0
- package/data/commands/manifest.json +3 -0
- package/data/commands/sql.json +34 -0
- package/data/completion/caddy.json +1589 -0
- package/data/completion/dockerfile.json +1062 -313
- package/data/completion/lua.json +2283 -617
- package/data/completion/nginx.json +804 -1
- package/data/completion/redis-cli.json +3405 -0
- package/data/completion/sql.json +2684 -552
- package/data/defination/caddy.json +428 -0
- package/data/defination/dockerfile.json +211 -29
- package/data/defination/lua.json +875 -125
- package/data/defination/nginx.json +164 -1
- package/data/defination/redis-cli.json +1853 -0
- package/data/defination/sql.json +998 -326
- package/data/hover/caddy.json +458 -0
- package/data/hover/dockerfile.json +180 -42
- package/data/hover/lua.json +775 -69
- package/data/hover/nginx.json +760 -0
- package/data/hover/redis-cli.json +1088 -0
- package/data/hover/sql.json +1119 -76
- package/data/manifest.json +14 -2
- package/package.json +6 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dockerfile",
|
|
3
|
+
"description": "Dockerfile — instructions to build Docker container images",
|
|
4
|
+
"category": "containerization",
|
|
5
|
+
"platforms": ["linux", "macos", "windows"],
|
|
6
|
+
"shells": ["bash", "zsh", "fish", "powershell"],
|
|
7
|
+
"subcommands": [],
|
|
8
|
+
"globalOptions": [],
|
|
9
|
+
"examples": [
|
|
10
|
+
"FROM node:20-alpine",
|
|
11
|
+
"FROM python:3.12-slim AS builder",
|
|
12
|
+
"WORKDIR /app",
|
|
13
|
+
"COPY package*.json ./",
|
|
14
|
+
"COPY . .",
|
|
15
|
+
"RUN npm ci --production",
|
|
16
|
+
"RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*",
|
|
17
|
+
"ENV NODE_ENV=production",
|
|
18
|
+
"EXPOSE 3000",
|
|
19
|
+
"CMD [\"node\", \"server.js\"]",
|
|
20
|
+
"ENTRYPOINT [\"python\", \"app.py\"]",
|
|
21
|
+
"ARG BUILD_VERSION=latest",
|
|
22
|
+
"LABEL maintainer=\"dev@example.com\"",
|
|
23
|
+
"HEALTHCHECK --interval=30s --timeout=3s CMD curl -f http://localhost:3000/health || exit 1",
|
|
24
|
+
"USER node",
|
|
25
|
+
"VOLUME /data",
|
|
26
|
+
"ADD https://example.com/file.tar.gz /tmp/",
|
|
27
|
+
"SHELL [\"/bin/bash\", \"-c\"]",
|
|
28
|
+
"STOPSIGNAL SIGTERM",
|
|
29
|
+
"# Multi-stage: FROM builder AS final"
|
|
30
|
+
],
|
|
31
|
+
"relatedCommands": ["docker", "docker-compose", "podman", "buildah"],
|
|
32
|
+
"contextEngine": {
|
|
33
|
+
"detectors": [
|
|
34
|
+
{
|
|
35
|
+
"name": "docker_version",
|
|
36
|
+
"description": "Docker engine version",
|
|
37
|
+
"command": "docker version --format '{{.Server.Version}}' 2>/dev/null",
|
|
38
|
+
"parser": "text",
|
|
39
|
+
"cacheFor": 300,
|
|
40
|
+
"requiresCmd": "docker"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "buildkit_enabled",
|
|
44
|
+
"description": "Check if BuildKit is enabled",
|
|
45
|
+
"command": "echo $DOCKER_BUILDKIT",
|
|
46
|
+
"parser": "text",
|
|
47
|
+
"cacheFor": 300
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "local_images",
|
|
51
|
+
"description": "Local Docker images",
|
|
52
|
+
"command": "docker images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | head -20",
|
|
53
|
+
"parser": "lines",
|
|
54
|
+
"cacheFor": 60,
|
|
55
|
+
"requiresCmd": "docker"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "dockerfiles_present",
|
|
59
|
+
"description": "Dockerfiles in current directory",
|
|
60
|
+
"command": "find . -maxdepth 2 -name 'Dockerfile*' -o -name '*.dockerfile' 2>/dev/null | head -10",
|
|
61
|
+
"parser": "lines",
|
|
62
|
+
"cacheFor": 60
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lua",
|
|
3
|
+
"description": "Lua — lightweight, embeddable scripting language",
|
|
4
|
+
"category": "language",
|
|
5
|
+
"platforms": ["linux", "macos", "windows"],
|
|
6
|
+
"shells": ["bash", "zsh", "fish", "powershell"],
|
|
7
|
+
"subcommands": [],
|
|
8
|
+
"globalOptions": [
|
|
9
|
+
{ "name": "-e", "description": "Execute a Lua statement", "type": "string" },
|
|
10
|
+
{ "name": "-l", "description": "Require library before executing script", "type": "string" },
|
|
11
|
+
{ "name": "-i", "description": "Enter interactive mode after executing script" },
|
|
12
|
+
{ "name": "-v", "description": "Show version information" },
|
|
13
|
+
{ "name": "-E", "description": "Ignore environment variables" },
|
|
14
|
+
{ "name": "-W", "description": "Turn warnings on" },
|
|
15
|
+
{ "name": "--", "description": "Stop handling options" }
|
|
16
|
+
],
|
|
17
|
+
"examples": [
|
|
18
|
+
"lua",
|
|
19
|
+
"lua script.lua",
|
|
20
|
+
"lua -e \"print('hello')\"",
|
|
21
|
+
"lua -i script.lua",
|
|
22
|
+
"lua -l mylib script.lua",
|
|
23
|
+
"lua -v",
|
|
24
|
+
"lua -e \"for i=1,10 do print(i) end\"",
|
|
25
|
+
"lua -e \"dofile('script.lua')\"",
|
|
26
|
+
"lua -W script.lua",
|
|
27
|
+
"lua -E script.lua"
|
|
28
|
+
],
|
|
29
|
+
"relatedCommands": ["luac", "luajit", "python", "node", "ruby"],
|
|
30
|
+
"contextEngine": {
|
|
31
|
+
"detectors": [
|
|
32
|
+
{
|
|
33
|
+
"name": "version",
|
|
34
|
+
"description": "Lua interpreter version",
|
|
35
|
+
"command": "lua -v 2>&1 | head -1",
|
|
36
|
+
"parser": "text",
|
|
37
|
+
"cacheFor": 300,
|
|
38
|
+
"requiresCmd": "lua"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "lua_path",
|
|
42
|
+
"description": "Lua module search path",
|
|
43
|
+
"command": "lua -e \"print(package.path)\" 2>/dev/null",
|
|
44
|
+
"parser": "text",
|
|
45
|
+
"cacheFor": 120,
|
|
46
|
+
"requiresCmd": "lua"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "lua_cpath",
|
|
50
|
+
"description": "Lua C module search path",
|
|
51
|
+
"command": "lua -e \"print(package.cpath)\" 2>/dev/null",
|
|
52
|
+
"parser": "text",
|
|
53
|
+
"cacheFor": 120,
|
|
54
|
+
"requiresCmd": "lua"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "luarocks_list",
|
|
58
|
+
"description": "Installed LuaRocks packages",
|
|
59
|
+
"command": "luarocks list --porcelain 2>/dev/null | head -20",
|
|
60
|
+
"parser": "lines",
|
|
61
|
+
"cacheFor": 120,
|
|
62
|
+
"requiresCmd": "luarocks"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"deno.json",
|
|
38
38
|
"django-admin.json",
|
|
39
39
|
"dnf.json",
|
|
40
|
+
"dockerfile.json",
|
|
40
41
|
"docker-compose.json",
|
|
41
42
|
"docker.json",
|
|
42
43
|
"doctl.json",
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
"linode-cli.json",
|
|
76
77
|
"linux.json",
|
|
77
78
|
"locust.json",
|
|
79
|
+
"lua.json",
|
|
78
80
|
"ls.json",
|
|
79
81
|
"make.json",
|
|
80
82
|
"minikube.json",
|
|
@@ -129,6 +131,7 @@
|
|
|
129
131
|
"rustup.json",
|
|
130
132
|
"scp.json",
|
|
131
133
|
"sed.json",
|
|
134
|
+
"sql.json",
|
|
132
135
|
"sqlite3.json",
|
|
133
136
|
"ssh-keygen.json",
|
|
134
137
|
"ssh.json",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sql",
|
|
3
|
+
"description": "SQL — Structured Query Language for relational databases",
|
|
4
|
+
"category": "database",
|
|
5
|
+
"platforms": ["linux", "macos", "windows"],
|
|
6
|
+
"shells": ["bash", "zsh", "fish", "powershell"],
|
|
7
|
+
"subcommands": [],
|
|
8
|
+
"globalOptions": [],
|
|
9
|
+
"examples": [
|
|
10
|
+
"SELECT * FROM users;",
|
|
11
|
+
"SELECT id, name FROM users WHERE active = 1;",
|
|
12
|
+
"INSERT INTO users (name, email) VALUES ('John', 'john@example.com');",
|
|
13
|
+
"UPDATE users SET active = 0 WHERE id = 5;",
|
|
14
|
+
"DELETE FROM users WHERE id = 5;",
|
|
15
|
+
"CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100));",
|
|
16
|
+
"ALTER TABLE users ADD COLUMN email VARCHAR(255);",
|
|
17
|
+
"DROP TABLE IF EXISTS temp_users;",
|
|
18
|
+
"CREATE INDEX idx_email ON users(email);",
|
|
19
|
+
"SELECT u.name, o.total FROM users u JOIN orders o ON u.id = o.user_id;",
|
|
20
|
+
"SELECT department, COUNT(*) FROM employees GROUP BY department HAVING COUNT(*) > 5;",
|
|
21
|
+
"SELECT * FROM users ORDER BY created_at DESC LIMIT 10;",
|
|
22
|
+
"BEGIN TRANSACTION; UPDATE accounts SET balance = balance - 100 WHERE id = 1; COMMIT;",
|
|
23
|
+
"CREATE VIEW active_users AS SELECT * FROM users WHERE active = 1;",
|
|
24
|
+
"EXPLAIN ANALYZE SELECT * FROM users WHERE email = 'test@example.com';",
|
|
25
|
+
"WITH cte AS (SELECT * FROM users WHERE active = 1) SELECT * FROM cte;",
|
|
26
|
+
"SELECT COALESCE(nickname, name) AS display_name FROM users;",
|
|
27
|
+
"GRANT SELECT, INSERT ON users TO readonly_user;",
|
|
28
|
+
"CREATE TRIGGER log_update AFTER UPDATE ON users FOR EACH ROW EXECUTE FUNCTION log_changes();"
|
|
29
|
+
],
|
|
30
|
+
"relatedCommands": ["psql", "mysql", "sqlite3", "mongosh", "redis-cli"],
|
|
31
|
+
"contextEngine": {
|
|
32
|
+
"detectors": []
|
|
33
|
+
}
|
|
34
|
+
}
|