Skip to content

Commit da847fc

Browse files
committed
SOFIE-31 | apply code review suggestions
1 parent c8b8947 commit da847fc

File tree

4 files changed

+252
-180
lines changed

4 files changed

+252
-180
lines changed

apps/single-app/app/expectedPackages.json

Lines changed: 171 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,80 @@
2525
}
2626
}
2727
},
28+
"thumbnails0": {
29+
"label": "Thumbnails",
30+
"accessors": {
31+
"local": {
32+
"type": "http_proxy",
33+
"label": "http proxy",
34+
"baseUrl": "http://localhost:8080/package",
35+
"allowRead": true,
36+
"allowWrite": true
37+
}
38+
}
39+
},
40+
"thumbnails0_local": {
41+
"label": "Thumbnails",
42+
"accessors": {
43+
"local": {
44+
"type": "local_folder",
45+
"label": "Local",
46+
"folderPath": "C:\\temp\\thumbnails",
47+
"allowRead": true,
48+
"allowWrite": true
49+
}
50+
}
51+
},
52+
"http0": {
53+
"label": "Local HTTP",
54+
"accessors": {
55+
"http": {
56+
"type": "http",
57+
"label": "http",
58+
"baseUrl": "http://127.0.0.1:8080",
59+
"allowRead": true,
60+
"allowWrite": false
61+
}
62+
}
63+
},
64+
"core0": {
65+
"label": "Core",
66+
"accessors": {
67+
"packageInfo0": {
68+
"type": "core_package_info",
69+
"label": "Package Info",
70+
"allowRead": true,
71+
"allowWrite": true
72+
}
73+
}
74+
},
75+
"ftp": {
76+
"label": "FTP",
77+
"accessors": {
78+
"ftp": {
79+
"type": "ftp",
80+
"label": "FTP",
81+
"host": "127.0.0.1",
82+
"serverType": "sftp",
83+
"allowRead": true,
84+
"allowWrite": true,
85+
"username": "test",
86+
"password": "test"
87+
}
88+
}
89+
},
90+
"theinternet": {
91+
"label": "HTTP",
92+
"accessors": {
93+
"http": {
94+
"type": "http",
95+
"label": "http",
96+
"baseUrl": "",
97+
"allowRead": true,
98+
"allowWrite": false
99+
}
100+
}
101+
},
28102
"s3": {
29103
"label": "S3",
30104
"accessors": {
@@ -42,41 +116,122 @@
42116
"forcePathStyle": true
43117
}
44118
}
45-
},
46-
"thumbnails0_local": {
47-
"label": "Thumbnails",
48-
"accessors": {
49-
"local": {
50-
"type": "local_folder",
51-
"label": "Local",
52-
"folderPath": "C:\\temp\\thumbnails",
53-
"allowRead": true,
54-
"allowWrite": true
55-
}
56-
}
57119
}
58120
},
59121
"expectedPackages": [
60122
{
61123
"type": "media_file",
62124
"_id": "test",
63-
"contentVersionHash": "abc12234",
125+
"contentVersionHash": "abc1234",
64126
"content": {
65127
"filePath": "amb.mp4"
66128
},
67129
"version": {},
68130
"sources": [
69131
{
70-
"containerId": "s3",
132+
"containerId": "source0",
71133
"accessors": {
72134
"local": {
73-
"type": "s3",
135+
"type": "local_folder",
74136
"filePath": "amb.mp4"
75137
}
76138
}
77139
}
78140
],
79-
"layers": ["target0"]
141+
"layers": ["target0"],
142+
"sideEffect": {
143+
"previewContainerId": null,
144+
"previewPackageSettings": null,
145+
"thumbnailContainerId": "thumbnails0_local",
146+
"thumbnailPackageSettings": {
147+
"path": "thumbnail.png"
148+
},
149+
"loudnessPackageSettings": {
150+
"channelSpec": ["0", "0+1"],
151+
"inPhaseDifference": true,
152+
"balanceDifference": true
153+
},
154+
"iframes": true
155+
}
156+
},
157+
{
158+
"type": "json_data",
159+
"_id": "json0",
160+
"contentVersionHash": "abc1234",
161+
"content": {
162+
"path": "test.json"
163+
},
164+
"version": {},
165+
"sources": [
166+
{
167+
"containerId": "http0",
168+
"accessors": {
169+
"local": {
170+
"type": "http",
171+
"isImmutable": true
172+
}
173+
}
174+
}
175+
],
176+
"layers": ["core0"],
177+
"sideEffect": {}
178+
},
179+
{
180+
"type": "html_template",
181+
"_id": "test-html",
182+
"contentVersionHash": "abc1234",
183+
"content": {
184+
"path": "https://www.bouncingdvdlogo.com/"
185+
},
186+
"version": {
187+
"renderer": {
188+
"width": 1920,
189+
"height": 1080,
190+
"scale": 0.25,
191+
"background": "black"
192+
},
193+
"steps": [
194+
{
195+
"do": "waitForLoad"
196+
},
197+
{
198+
"do": "startRecording",
199+
"fileName": "bouncingdvdlogo_recording.webm"
200+
},
201+
{
202+
"do": "sleep",
203+
"duration": 1000
204+
},
205+
{
206+
"do": "takeScreenshot",
207+
"fileName": "bouncingdvdlogo_screenshot.png"
208+
},
209+
{
210+
"do": "sleep",
211+
"duration": 2000
212+
},
213+
{
214+
"do": "stopRecording"
215+
},
216+
{
217+
"do": "cropRecording",
218+
"fileName": "bouncingdvdlogo_recording-cropped.webm"
219+
}
220+
]
221+
},
222+
"sources": [
223+
{
224+
"containerId": "theinternet",
225+
"accessors": {
226+
"http": {
227+
"type": "http",
228+
"url": ""
229+
}
230+
}
231+
}
232+
],
233+
"layers": ["thumbnails0_local"],
234+
"sideEffect": {}
80235
}
81236
],
82237
"settings": {

shared/packages/api/src/inputApi.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,10 +596,11 @@ export namespace Accessor {
596596
/** Base URL for the S3 bucket */
597597
s3PublicBaseUrl: string
598598

599-
/** S3 endpoint (obligatory for non-AWS S3 deployments) */
599+
/** S3 endpoint (obligatory for non-AWS S3 deployments). If undefined, AWS S3 is assumed */
600600
endpoint?: string
601601

602-
/** If true, forces path-style URLs (required for some S3-compatible storage solutions) */
602+
/** If true, forces path-style URLs (required for some S3-compatible storage solutions that use path-style URLs for buckets)
603+
* i.e. use this is bucket URL is `http://localhost/test` instead of `http://test.localhost` */
603604
forcePathStyle?: boolean
604605
}
605606
}

0 commit comments

Comments
 (0)