This repository was archived by the owner on May 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplugin.yaml
More file actions
73 lines (73 loc) · 1.98 KB
/
plugin.yaml
File metadata and controls
73 lines (73 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: lambda-api
description: Plugin to create lambda API with Fast-API and serverless
display-name: lambda-api
picture: plugin.png
category: backend # Ref: https://docs.stackspot.com/latest/docs/creators-guide/yaml/#category
compatibility:
- python
about: docs/about.md
usage: docs/usage.md
use-case: docs/use-case.md
implementation: docs/implementation.md
technologies: # Ref: https://docs.stackspot.com/latest/docs/creators-guide/yaml/#technologies
- "Api"
- "Lambda"
- "Serverless"
types:
- app
inputs:
- label: Input Example
type: text
name: example
default: any text
hooks:
- type: run-script
trigger: before-render
script: scripts/rm_folders.py {{project_name_sanitized}}
- type: edit
trigger: before-render
path: "src/pyproject.toml"
changes:
- search:
string: "[tool.poetry.dependencies]"
replace-by:
snippet: "snippets/uvicorn"
when:
not-exists: "uvicorn"
- search:
string: "[tool.poetry.dependencies]"
replace-by:
snippet: "snippets/mangum"
when:
not-exists: "mangum"
- search:
string: "[tool.poetry.dependencies]"
replace-by:
snippet: "snippets/fastapi"
when:
not-exists: "fastapi"
- search:
string: "[tool.poetry.dev-dependencies]"
replace-by:
snippet: "snippets/requests"
when:
not-exists: "requests"
- type: edit
trigger: before-render
path: "Makefile"
changes:
- search:
string: "cd src; pytest -v tests/"
replace-by:
value: "pytest -v tests/"
- search:
string: "python src/{{project_name_sanitized}}/__init__.py"
replace-by:
value: "python3 local.py"
when:
not-exists: "python3 local.py"
- type: run
trigger: after-render
working-dir: "{{project_name_sanitized}}"
commands:
- npm install