Commit Graph

1146 Commits

Author SHA1 Message Date
Dillon Kearns
339d54a9e9 Update examples to use ErrorPage, and add to NoContractViolations. 2022-03-29 15:32:43 -07:00
Dillon Kearns
34f428f1df Add proof of concept for error pages. 2022-03-29 11:48:04 -07:00
Dillon Kearns
3790fbe7b7
Merge pull request #282 from j-maas/fix-port-data-source-import-windows
Fix port data source import on Windows
2022-03-25 11:28:41 -07:00
Dillon Kearns
4f58d763f4 Generate preload directive for hashed entrypoint JS file. 2022-03-25 09:50:50 -07:00
Dillon Kearns
9e498ca93b Update examples. 2022-03-25 09:03:22 -07:00
Dillon Kearns
05bd7b0bff Fix build step logic to show elm-review contract violation errors. 2022-03-24 15:27:46 -07:00
Dillon Kearns
9262399fdc Remove redundant fields from dev server adapter. 2022-03-21 12:10:52 -07:00
Dillon Kearns
2d0f0f2651 Wire up Effect type. 2022-03-21 09:45:11 -07:00
Dillon Kearns
67c0fb57b0 Add missing argument to generator. 2022-03-21 08:16:48 -07:00
Dillon Kearns
a437459865 Merge remote-tracking branch 'origin/master' into serverless-latest 2022-03-20 07:31:15 -07:00
Johannes Maas
d9ecd328d8 Differentiate between missing port data source file and import error 2022-03-20 15:22:00 +01:00
Johannes Maas
10cf930226 Fix import of port-data-source.js on Windows. 2022-03-20 14:28:49 +01:00
Sev Furneaux
74ca559626 Upgrade elm-optimize-level-2 to 0.3.4 2022-03-15 22:47:06 +00:00
Dillon Kearns
7ff9b555f3 Add DataSource request mocking prototype. 2022-03-14 19:17:19 -07:00
Dillon Kearns
55ac3da02d Update starter template. 2022-03-14 11:39:41 -07:00
Dillon Kearns
f2f51cd40d Remove app dying messages from compiled lamdera output. 2022-03-11 11:50:02 -08:00
Dillon Kearns
6ecc087a0f Improve error message. 2022-03-11 11:46:13 -08:00
Dillon Kearns
44ffec84c1 Use strict lamdera bytes decoder. 2022-03-11 11:32:29 -08:00
Dillon Kearns
a116989ab2 Simplify file read command. 2022-03-11 11:11:10 -08:00
Dillon Kearns
25972e5724 Run adapter script from build step (if configured). 2022-03-10 11:49:07 -08:00
Dillon Kearns
3e12b48112 Update template project. 2022-03-09 15:06:49 -08:00
Dillon Kearns
6eafb379ee Make sure lamdera is on path for dev-server. 2022-03-09 14:05:22 -08:00
Dillon Kearns
32705e11a8 Fix error message. 2022-03-09 10:59:57 -08:00
Dillon Kearns
8ac95844cd Merge branch 'master' into serverless-latest
# Conflicts:
#	package-lock.json
2022-03-09 10:50:43 -08:00
Dillon Kearns
d5055ce03f Fix scaffolding generator. 2022-03-08 10:22:40 -08:00
Dillon Kearns
8911ef9bb3 Rename Server.Request.Request -> Server.Request.Parser. 2022-03-08 08:57:46 -08:00
Dillon Kearns
b7495d73bb Change exported value from page -> route from Route Modules. 2022-03-05 10:35:17 -08:00
Dillon Kearns
f16a30320d Rename Page.elm -> RouteBuilder.elm. 2022-03-05 09:50:01 -08:00
Dillon Kearns
0310152df4 Change Page.* modules to be Route.* modules. 2022-03-05 09:05:12 -08:00
Dillon Kearns
a828ecee58 Add some todo comments. 2022-03-05 08:56:20 -08:00
Dillon Kearns
0c469c225b Return headers for content.dat responses. 2022-03-04 20:45:03 -08:00
Dillon Kearns
55ae855f7c Formatting. 2022-03-04 12:33:04 -08:00
Dillon Kearns
8df43bcd71 Use pure Elm for parsing cookies header. 2022-03-04 10:43:32 -08:00
Dillon Kearns
dd2474b6a7 Remove some log noise. 2022-03-03 10:33:45 -08:00
Dillon Kearns
c71b7681e9 Add annotation. 2022-03-03 10:29:49 -08:00
Dillon Kearns
cc134dc363 Add todo comment. 2022-03-03 10:29:43 -08:00
Dillon Kearns
d27b00a110 Remove unused. 2022-03-03 10:29:29 -08:00
Dillon Kearns
5c983e5334 Include port-data-source file in serverless function output, and include example in netlify project. 2022-03-03 09:29:50 -08:00
Dillon Kearns
e03afdc95e Remove messy log statement from CLI command. 2022-03-03 09:18:14 -08:00
Dillon Kearns
8f1e25e605 Improve error handling when there is no port-data-source file present. 2022-03-02 14:45:34 -08:00
Dillon Kearns
f572ee7218 Run esbuild to compile ports file from build command. 2022-03-02 14:35:48 -08:00
Dillon Kearns
2a14ba1941 Fix error handling for internal data source handlers. 2022-03-02 14:25:11 -08:00
Dillon Kearns
8489f44a3d Use esbuild to transpile port-data-source file, and watch for changes. 2022-03-02 10:14:55 -08:00
Dillon Kearns
288dc1c266 Add Glob.toDataSourceWithOptions. 2022-03-01 15:46:10 -08:00
Dillon Kearns
c8c7a884da Pass glob options in JSON body. 2022-02-28 20:37:39 -08:00
Dillon Kearns
5652b9b3d1 Remove obsolete field. 2022-02-28 19:49:43 -08:00
Dillon Kearns
8990555331 Remove unused. 2022-02-28 19:40:09 -08:00
Dillon Kearns
ca9b80d34e Change await ordering to improve build speed. 2022-02-28 19:38:35 -08:00
Dillon Kearns
7376fcffe8 Remove lamdera's generated "App dying" log message (and no need to generate app.die function anymore since lamdera provides one). 2022-02-28 19:38:07 -08:00
Dillon Kearns
ddff730b26 Add Glob.listDirectories. 2022-02-28 16:52:41 -08:00
Dillon Kearns
a636e5ed31 Delete unused. 2022-02-28 14:51:51 -08:00
Dillon Kearns
81ab07897f Use micromatch to get glob captures to ensure that they match with the globby matching logic. 2022-02-27 11:27:49 -08:00
Dillon Kearns
3468ac0a20 Simplify GotBatch decoder. 2022-02-25 11:59:02 -08:00
Dillon Kearns
1c56e82258 Simplify gotBatchPort payload (bytes are being handled as base64 string so may as well remove the Bytes part now since it's unused - might change it back for performance if it makes a difference). 2022-02-25 11:50:24 -08:00
Dillon Kearns
2d81800317 Add dev server styles into a css file and make sure that not found page styles are included. 2022-02-25 11:22:32 -08:00
Dillon Kearns
9d50907053 Add some end-to-end test cases for API handlers and remove some obsolete request payload pre-processing in JavaScript (optimizations that were there for OptimizedDecoder's before but aren't needed with Lamdera Wire). 2022-02-25 09:07:57 -08:00
Dillon Kearns
1706880175 Add some more error handling around showing error messages to ensure that errors aren't dropped. 2022-02-25 09:02:36 -08:00
Dillon Kearns
d48d062ed7 Make sure build error is printed. 2022-02-23 16:25:40 -08:00
Dillon Kearns
6f2a29a1f1 Fix ssr option. 2022-02-23 16:25:34 -08:00
Dillon Kearns
caea3f7c56 Don't fail build when missing config. 2022-02-23 16:25:28 -08:00
Dillon Kearns
033db9fa59 Add favicon to template project. 2022-02-23 14:55:32 -08:00
Dillon Kearns
463adc8007 Move template's index.js and style.css entrypoints for new Vite setup. 2022-02-23 14:55:21 -08:00
Dillon Kearns
b9b68b06cc Add initial elm-pages.config.mjs file to template. 2022-02-23 14:39:31 -08:00
Dillon Kearns
da08e1e1b3 Add try catch to ensure dev error shows up even if console logging it fails. 2022-02-23 14:39:17 -08:00
Dillon Kearns
45126cdf1f Simplify value. 2022-02-23 14:38:50 -08:00
Dillon Kearns
f007f79ec1 Improve error when using implicit config file. 2022-02-23 14:38:32 -08:00
Dillon Kearns
b3216ea5db Update Site and Index.elm to use latest type contract in template. 2022-02-23 14:36:28 -08:00
Dillon Kearns
4226f3ecfb Update dependencies in template. 2022-02-23 14:36:07 -08:00
Dillon Kearns
f49595a578 Change elm-pages setup code so it works on root route (Vite had an issue loading it from a script module import). 2022-02-23 12:20:38 -08:00
Dillon Kearns
c617baa3d3 Use vite config from elm-pages.config.mjs. 2022-02-23 10:06:15 -08:00
Dillon Kearns
1ae88f181a Use node-fetch instead of undici for Node 14 compatability. 2022-02-22 11:37:09 -08:00
Dillon Kearns
763fc37695 Remove some log statements. 2022-02-22 11:19:10 -08:00
Dillon Kearns
846ddad4f9 Add missing return. 2022-02-22 10:55:20 -08:00
Dillon Kearns
93a44b6c78 Add error logging to debug netlify issue. 2022-02-21 18:16:16 -08:00
Dillon Kearns
ff71b62321 Try using vite-generated HTML template in adapter-generated scripts. 2022-02-21 16:54:51 -08:00
Dillon Kearns
bc4612ddab Use elm-review option --fix-all-without-prompt instead of stdin pipe. 2022-02-21 15:50:42 -08:00
Dillon Kearns
939635eec4 Remove hardcoded index.html project file. 2022-02-21 15:37:24 -08:00
Dillon Kearns
7da42c9ffd Delete unused. 2022-02-21 14:56:38 -08:00
Dillon Kearns
0964448ae5 Remove obsolete code. 2022-02-21 14:46:51 -08:00
Dillon Kearns
8287623f23 Pass through root tag to HTML template replacement. 2022-02-21 09:57:23 -08:00
Dillon Kearns
8ee5b2a649 Add missing. (+2 squashed commits)
Squashed commits:
[ea4646e3] Fix two errors.
[31faf674] Add initial Vite SSR setup.
2022-02-21 09:30:31 -08:00
Dillon Kearns
fbcbfa3c27 Add optional body parameter to reload page data port in order to avoid an extra round trip for form POST. 2022-02-17 11:52:21 -08:00
Dillon Kearns
c5b5f35504 Add expectBytesResponse. 2022-02-16 21:25:43 -08:00
Dillon Kearns
edc808ac37 Add DataSource.Http.expectWhatever. 2022-02-16 21:13:04 -08:00
Dillon Kearns
2215a63580 Add expectBytes. 2022-02-16 20:54:56 -08:00
Dillon Kearns
f5a3d6f897 Move decrypt/encrypt logic into interal request code path. 2022-02-16 16:54:15 -08:00
Dillon Kearns
c91077ad56 Change GotBatch data type to support different response types. 2022-02-16 16:51:59 -08:00
Dillon Kearns
370afc6703 Return build error instead of caching HTTP response in cases where HTTP errors are not handled (expectJson and expectString).
SInce it's always going to fail, caching the bad response would keep it stuck in a build failure state.
2022-02-16 10:51:26 -08:00
Dillon Kearns
2b6d13234f Add DataSource.Http.expectStringResponse which allows you to get response headers and handle bad status codes. 2022-02-15 16:01:23 -08:00
Dillon Kearns
c98001161a Formatting. 2022-02-14 15:59:06 -08:00
Dillon Kearns
83dcf70b0e Support global head tags from API Routes so plugins can add head tags like sitemap and RSS links. 2022-02-14 11:05:42 -08:00
Dillon Kearns
11de872c7c Remove unused imports. 2022-02-13 16:08:10 -08:00
Dillon Kearns
b4e9278284 Fix path for compiling CLI app. 2022-02-13 14:40:25 -08:00
Dillon Kearns
3c61e908bb Pass in --compiler flag to elm-review to use lamdera compiler. 2022-02-13 13:59:23 -08:00
Dillon Kearns
88ca2f8a02 Remove DataSource code from bundle. 2022-02-13 12:42:31 -08:00
Dillon Kearns
b91f978d24 Move Page Modules and special elm-pages modules into app folder. 2022-02-10 16:27:56 -08:00
Dillon Kearns
ce8a3c9e5c Delete log statement. 2022-02-10 14:51:41 -08:00
Dillon Kearns
6c2524e72a Fix Env.get. 2022-02-10 10:06:51 -08:00
Dillon Kearns
b10b247d99 Use more threads for build process. 2022-02-09 17:21:33 -08:00
Dillon Kearns
f777ecad07 Fix error decoding. 2022-02-09 16:26:28 -08:00