-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathake
More file actions
executable file
·42 lines (31 loc) · 2.86 KB
/
ake
File metadata and controls
executable file
·42 lines (31 loc) · 2.86 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
#!/usr/bin/env script.js
await mixins('package-manager', 'test')
globalThis.PACKAGE_MANAGER = 'bun'
const HELP = `
`
app.name(PROJECT_NAME).enableCompletion().addHelpText('after', HELP.trimEnd())
app.command('start').action(async () => {
$`bun start`
})
app.command('types').action(async () => {
$`bun run types`
})
app.command('deploy').action(async () => {
$`bun run deploy`
})
const localtest = app.command('localtest')
localtest.command('error').action(async () => {
$`http POST 'http://localhost:8787'`
})
localtest.command('komodo').action(async () => {
$`
echo '{ "ts": 1756926007932, "resolved": true, "level": "OK", "target": { "type": "Procedure", "id": "68b7b4ff743c4a609742e01b" }, "data": { "type": "ScheduleRun", "data": { "resource_type": "Procedure", "id": "68b7b4ff743c4a609742e01b", "name": "Global Auto Update" } }, "resolved_ts": 1756926007932 }' | \
http 'http://localhost:8787/a?_template=Komodo&_serverName=Server1&_komodoHost=https://komodo.com'
`
})
localtest.command('jellyfin').action(async () => {
$`
echo '{ "ServerName": "Server1", "NotificationType": "ItemAdded", "ItemType": "Movie", "SeriesName": "Series1", "Name": "Movie1", "ServerUrl": "https://jellyfin.com", "ServerId": "123", "ServerVersion": "1.0.0", "Timestamp": "2021-01-01T00:00:00Z", "UtcTimestamp": "2021-01-01T00:00:00Z", "Overview": "Overview1", "Tagline": "Tagline1", "ItemId": "123", "RunTimeTicks": 123, "RunTime": "123", "Year": 2021, "PremiereDate": "2021-01-01T00:00:00Z", "SeriesId": "123", "SeasonId": "123", "SeriesPremiereDate": "2021-01-01T00:00:00Z", "SeasonNumber": 1, "SeasonNumber00": "01", "SeasonNumber000": "001", "EpisodeNumber": 1, "EpisodeNumber00": "01", "EpisodeNumber000": "001", "Video_0_Title": "Video1", "Video_0_Type": "Video", "Video_0_Codec": "Codec1", "Video_0_Profile": "Profile1", "Video_0_Level": 1, "Video_0_Height": 123, "Video_0_Width": 123, "Video_0_AspectRatio": "1:1", "Video_0_Interlaced": true, "Video_0_FrameRate": 123, "Video_0_VideoRange": "VideoRange1", "Video_0_ColorSpace": "ColorSpace1", "Video_0_ColorTransfer": "ColorTransfer1", "Video_0_ColorPrimaries": "ColorPrimaries1", "Video_0_PixelFormat": "PixelFormat1", "Video_0_RefFrames": 123, "Audio_0_Title": "Audio1", "Audio_0_Type": "Audio", "Audio_0_Language": "Language1", "Audio_0_Codec": "Codec1", "Audio_0_Channels": 1, "Audio_0_Bitrate": 123, "Audio_0_SampleRate": 123, "Audio_0_Default": true, "PlaybackPositionTicks": 123, "PlaybackPosition": "123", "MediaSourceId": "123", "IsPaused": true, "IsAutomated": true, "DeviceId": "123", "DeviceName": "Device1", "ClientName": "Client1", "PlayMethod": "PlayMethod1", "Id": "123", "UserId": "123", "NotificationUsername": "NotificationUsername1", "Client": "Client1", "LastActivityDate": "2021-01-01T00:00:00Z", "LastPlaybackCheckIn": "2021-01-01T00:00:00Z", "RemoteEndPoint": "RemoteEndPoint1" }' | \
http 'http://localhost:8787/a?_template=Jellyfin'
`
})