Skip to content

Commit c4ad43b

Browse files
committed
support defining static dir
1 parent f5acf42 commit c4ad43b

File tree

7 files changed

+13
-3
lines changed

7 files changed

+13
-3
lines changed

assets/bindata.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:e9b580aafd5a47d0bad7558b237135df022aac7c952c854de05c55e547560824
3-
size 4848597
2+
oid sha256:8db756703e2380a5fc5652c44e64a0d8be071843e9d65c5c5400e20f2f923e9f
3+
size 4848967

clients/python/lambda_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from dataclasses import dataclass
44

5-
from typing import Any, List, Optional
65
from base64 import decodebytes, encodebytes
6+
from typing import Any, List, Optional
77

88

99

@@ -68,6 +68,7 @@ class Manifest:
6868
tokens: 'Optional[Any]'
6969
aliases: 'Optional[Any]'
7070
cron: 'Optional[List[Schedule]]'
71+
static: 'Optional[str]'
7172

7273
def to_json(self) -> dict:
7374
return {
@@ -89,6 +90,7 @@ def to_json(self) -> dict:
8990
"tokens": self.tokens,
9091
"aliases": self.aliases,
9192
"cron": [x.to_json() for x in self.cron],
93+
"static": self.static,
9294
}
9395

9496
@staticmethod
@@ -112,6 +114,7 @@ def from_json(payload: dict) -> 'Manifest':
112114
tokens=payload['tokens'],
113115
aliases=payload['aliases'],
114116
cron=[Schedule.from_json(x) for x in (payload['cron'] or [])],
117+
static=payload['static'],
115118
)
116119

117120

clients/python/project_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ class Manifest:
109109
tokens: 'Optional[Any]'
110110
aliases: 'Optional[Any]'
111111
cron: 'Optional[List[Schedule]]'
112+
static: 'Optional[str]'
112113

113114
def to_json(self) -> dict:
114115
return {
@@ -130,6 +131,7 @@ def to_json(self) -> dict:
130131
"tokens": self.tokens,
131132
"aliases": self.aliases,
132133
"cron": [x.to_json() for x in self.cron],
134+
"static": self.static,
133135
}
134136

135137
@staticmethod
@@ -153,6 +155,7 @@ def from_json(payload: dict) -> 'Manifest':
153155
tokens=payload['tokens'],
154156
aliases=payload['aliases'],
155157
cron=[Schedule.from_json(x) for x in (payload['cron'] or [])],
158+
static=payload['static'],
156159
)
157160

158161

clients/ts/lambda_api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export interface Manifest {
4242
tokens: any | null
4343
aliases: JsonStringSet | null
4444
cron: Array<Schedule> | null
45+
static: string | null
4546
}
4647

4748
export type JsonDuration = string; // suffixes: ns, us, ms, s, m, h

clients/ts/project_api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export interface Manifest {
5353
tokens: any | null
5454
aliases: JsonStringSet | null
5555
cron: Array<Schedule> | null
56+
static: string | null
5657
}
5758

5859
export type JsonDuration = string; // suffixes: ns, us, ms, s, m, h

docs/api/lambda_api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ EOF
312312
| tokens | `map[string]string` | |
313313
| aliases | `JsonStringSet` | |
314314
| cron | `[]Schedule` | |
315+
| static | `string` | |
315316

316317
### Token
317318

types/manifest.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type Manifest struct {
2727
Tokens map[string]string `json:"tokens,omitempty"` // limit request by value in Authorization header (token => title)
2828
Aliases JsonStringSet `json:"aliases,omitempty"` // aliases to the current app
2929
Cron []Schedule `json:"cron,omitempty"` // crontab expression and action name to invoke
30+
Static string `json:"static,omitempty"` // relative path to static folder
3031
}
3132

3233
type Schedule struct {

0 commit comments

Comments
 (0)