Commit Graph

985 Commits

Author SHA1 Message Date
Dillon Kearns
69feca1c42 Add distillBytes with some lamdera wire encoder/decoders. 2022-01-21 09:31:18 -08:00
Dillon Kearns
08e635cbeb Try all secrets in list for decoding signed cookies. 2022-01-20 19:09:37 -08:00
Dillon Kearns
30ab850c90 Add prototype for withSession helper. 2022-01-20 18:00:38 -08:00
Dillon Kearns
ea5be72234 Update generator. 2022-01-17 20:59:17 -08:00
Dillon Kearns
51aea3b539 Simplify Server.Response API by combining render repsonses and server responses into the same API. 2022-01-17 20:56:37 -08:00
Dillon Kearns
03dd16a86f Wire through custom headers and status codes for RenderPage server responses. 2022-01-17 16:56:40 -08:00
Dillon Kearns
67cc4e045a Update add cli command. 2022-01-05 15:12:38 -08:00
Dillon Kearns
08138e7a26 Use () instead of Never for Msg's in stateless pages. That way, you can map Msg's (unlike never). 2022-01-05 14:09:37 -08:00
Dillon Kearns
7b743cf72d Rename module. 2021-12-31 16:15:41 -08:00
Dillon Kearns
86142cb6d8 Remove obsolete server request code from initial prototype. 2021-12-31 11:52:37 -08:00
Dillon Kearns
3aae8c1adf Remove Handler type in favor of a type variable for ServerRequest type. 2021-12-31 11:14:23 -08:00
Dillon Kearns
bfbb5866f2 Capture multiple matching errors for server requests. 2021-12-30 19:55:45 -08:00
Dillon Kearns
9e9eb26a02 Try different lamda file read root. 2021-12-30 09:31:24 -08:00
Dillon Kearns
d0d205bee4 Try new filename resolution for netlify function. 2021-12-30 09:27:20 -08:00
Dillon Kearns
2a90dc9d51 Try adding path.resolve for netlify file paths. 2021-12-29 21:57:35 -08:00
Dillon Kearns
701d949304 Remove resolved path netlify file path read trick to see if it works. 2021-12-29 21:46:47 -08:00
Dillon Kearns
6684c36852 Try resolving filepath from serverless function root. 2021-12-29 21:31:53 -08:00
Dillon Kearns
c14a38bfc6 Fix in-memory cache reset. 2021-12-29 17:38:45 -08:00
Dillon Kearns
d13a397507 Use in-memory fs or real fs for http cache depending on whether context is serverless. 2021-12-29 17:18:37 -08:00
Dillon Kearns
9a60119484 Rearrange template. 2021-12-29 16:02:18 -08:00
Dillon Kearns
862c48d134 Update template. 2021-12-29 15:57:12 -08:00
Dillon Kearns
4444ef6fc0 Update render result types and adapter script. 2021-12-29 13:58:21 -08:00
Dillon Kearns
b2c1a31c68 Handle multipart forms in dev server and adapter script. 2021-12-29 13:02:45 -08:00
Dillon Kearns
0ac78944ce Update adapter. 2021-12-28 11:53:43 -08:00
Dillon Kearns
572f6f2336 Add greet api function. 2021-12-28 11:53:33 -08:00
Dillon Kearns
5136dd50a6 Use Server.Request for ApiRoutes. 2021-12-28 08:32:25 -08:00
Dillon Kearns
0a849061b0 Add --with-fallback scaffolding option. 2021-12-27 13:46:21 -08:00
Dillon Kearns
010a6e4526 Update scaffolding template for server-rendered. 2021-12-27 10:09:10 -08:00
Dillon Kearns
10bbeb491d Use more declarative interface for Server Requests. 2021-12-26 21:56:33 -08:00
Dillon Kearns
43a7e4fda9 Add elm-pages codegen command. 2021-12-23 14:37:31 -08:00
Dillon Kearns
bf67cff13e Rename TemplateModulesBeta.elm entrypoint file -> Main.elm. 2021-12-23 14:28:52 -08:00
Dillon Kearns
6f82aa59f8 Add ServerRequest.withRequestTime, and make body nullable. 2021-12-23 13:34:54 -08:00
Dillon Kearns
4fedf9ee19 Rename prerender -> preRender. 2021-12-23 13:34:19 -08:00
Dillon Kearns
afb81f7224 Replace handleFallback with PageServerResponse for prerenderWithFallback. 2021-12-23 11:14:46 -08:00
Dillon Kearns
f43e57e265 Add withBody. 2021-12-22 15:28:19 -08:00
Dillon Kearns
fc00121c27 Update serverless generator. 2021-12-22 12:07:14 -08:00
Dillon Kearns
c43d7f474b Wire through key for accessing DataSource.ServerRequest. 2021-12-22 11:29:16 -08:00
Dillon Kearns
5037ae757a Update cli generator with serverless option. 2021-12-22 10:13:02 -08:00
Dillon Kearns
9a8bf732a0 Remove duplicate of ServerResponse.toJson function. 2021-12-21 17:33:02 -08:00
Dillon Kearns
862d0ce46f Handle ServerPageResponse variants in Platform.elm. 2021-12-21 15:34:17 -08:00
Dillon Kearns
f6c13c0404 Handle API responses from serverless Page Modules. 2021-12-21 12:01:08 -08:00
Dillon Kearns
7f2d47c6de Add serverless ApiRoute builder and some examples in pokedex app. 2021-12-21 07:47:47 -08:00
Dillon Kearns
59fb56f8c6 Handle new data format in dev server. 2021-12-20 15:48:10 -08:00
Dillon Kearns
843ca0bacd Wire through headers, statusCode, and body from ServerResponse. Add redirect example. 2021-12-20 14:45:18 -08:00
Dillon Kearns
c79d76f473 Include kind in API routes to tell the rendering mode. Generate redirects for serverless API routes. 2021-12-20 13:35:34 -08:00
Dillon Kearns
7eaa94a9e4 Include Pattern information for ApiRoutes. 2021-12-20 11:26:12 -08:00
Dillon Kearns
35c5be1ee0 Transform AWS event payload into event for DataSource.ServerRequest JSON. 2021-12-16 12:05:59 -08:00
Dillon Kearns
9769e7a95c Pass through request from NodeJS and update the ServerRequest API. 2021-12-15 20:10:54 -08:00
Dillon Kearns
7a57c331bc Use route-patterns.json to generate _redirects file. 2021-12-15 15:39:35 -08:00
Dillon Kearns
4da2ab9209 Reset in-memory filesystem on each render request. 2021-12-15 12:39:15 -08:00
Dillon Kearns
dca81657ee Try in-memory fs. 2021-12-15 12:22:25 -08:00
Dillon Kearns
c113fd8008 Temp - comment out line to see what serverless function does. 2021-12-15 09:32:24 -08:00
Dillon Kearns
dacba7358e Update pokedex example. 2021-12-15 09:26:23 -08:00
Dillon Kearns
ff22d58bf3 Add --debug flag for elm-pages dev (default is now with no --debug like in elm make). 2021-12-14 15:38:20 -08:00
Dillon Kearns
9455a6fc3e
Merge pull request #261 from dillonkearns/remove-obsolete-file-from-dist
Remove obsolete script from dist folder (it is now inlined as a <script>)
2021-12-14 14:09:18 -08:00
Dillon Kearns
a5910cc672 If elm-review doesn't catch any implicit contract errors, show the raw TemplateModulesBeta.elm Elm compiler error. 2021-12-14 14:06:08 -08:00
Dillon Kearns
1d459071cf Remove obsolete script from dist folder (it is now inlined as a <script> in the HTML). Fixes #219. 2021-12-11 15:06:29 -08:00
Dillon Kearns
d51b9f0cc1
Merge pull request #260 from dillonkearns/move-internals-outside-package
Move internals outside package
2021-12-11 15:05:31 -08:00
Dillon Kearns
446525294c Remove none option from elm-pages add. 2021-12-11 12:01:47 -08:00
Dillon Kearns
86eeb4cef9 Move internal-only modules outside of Elm package and into generated code folders. 2021-12-11 11:42:35 -08:00
Dillon Kearns
00e8fd82bd Ensure that copy elm.json happens before starting elm-pages docs server. 2021-12-11 11:34:41 -08:00
Dillon Kearns
d5de1137e5 Fix typo in docs. 2021-12-10 16:11:56 -08:00
Dillon Kearns
010cfb9c2a Rename routes to pages. Routes are the category of page, pages are the specific things to pre-render for a given route, so this terminology is more consistent and clear. 2021-12-10 16:03:07 -08:00
Dillon Kearns
6583738ab2 Change font to avoid system-ui. 2021-12-10 15:38:04 -08:00
Dillon Kearns
b18ff938ca Update font. 2021-12-10 15:28:09 -08:00
Dillon Kearns
0fe75971eb Use system-ui for starter. 2021-12-10 12:08:22 -08:00
Dillon Kearns
e2a64693ff Update Page.elm docs. 2021-12-10 12:05:31 -08:00
Dillon Kearns
7b53e782a3 Update starter template app. 2021-12-10 11:34:51 -08:00
Dillon Kearns
b67a66d052 Update template. 2021-12-10 11:21:39 -08:00
Dillon Kearns
d675b2c13f Change syntax for constructor function to avoid constructor error. 2021-12-10 10:50:27 -08:00
Dillon Kearns
d752866d4e Use empty records instead of empty tuples for stateless Page Module's Model. Tweak Page builder API. Add option for local and shared state in generators. 2021-12-10 09:52:12 -08:00
Dillon Kearns
0649fb6bad Update init template. 2021-12-01 15:38:08 -08:00
Shea Kelly
ce6fb34b1b adding https support using devcert 2021-11-06 12:13:26 +11:00
Dillon Kearns
840cb83d36 Add meta tag that needs escaping to end-to-end escaping test, and fix escaping issue in SEO attributes. 2021-10-26 10:40:04 -07:00
Dillon Kearns
26101b402a
Merge pull request #236 from j-maas/fix-head-path-separator
Use Posix-style separators in head tags
2021-10-20 14:16:15 -07:00
Dillon Kearns
c2793585ac Merge branch 'master' into pr/234 2021-10-16 14:29:44 -07:00
Dillon Kearns
807ea6517b Merge branch 'master' into pr/236 2021-10-16 09:23:47 -07:00
Dillon Kearns
3ece0dddc5
Merge pull request #237 from j-maas/fix-manifest-missing-base
Fix manifest URL missing base
2021-10-16 09:19:33 -07:00
Dillon Kearns
51acc3263c Extract constant. 2021-10-07 13:15:25 -07:00
Dillon Kearns
b876f06139 Test escaping examples both with and without --debug flag. Fix output without debug flag. 2021-10-07 12:05:13 -07:00
Dillon Kearns
c91b01d5a4 Port over HTML to string helpers from elm-explorations/test. TODO - still need to port the escaping fixes I did to the elm-explorations/test implementation. 2021-10-07 11:34:08 -07:00
Dillon Kearns
81fbbb6518 Add missing closing quote. 2021-10-02 16:54:32 -07:00
Dillon Kearns
6e6e0beeb0 Run prettier on file. 2021-10-02 16:53:16 -07:00
Johannes Maas
0359f916d4 Fix manifest URL missing base 2021-10-02 19:27:52 +02:00
Johannes Maas
b445856ad2 Use Posix-style separators in head tags
Previously, on Windows some <head> tags contained backslashes as separators.
2021-10-02 19:17:46 +02:00
Johannes Maas
cbad8ad8ad Fix empty base handling 2021-10-02 17:26:05 +02:00
Johannes Maas
42e465b4d8 Document why req.url is always the path 2021-10-02 17:02:25 +02:00
Johannes Maas
483381aaaa Fix base middleware infix detection and refactor it 2021-10-02 16:52:42 +02:00
Johannes Maas
1c83d4e219 Fix deprecated URL parsing 2021-10-02 16:45:21 +02:00
Johannes Maas
1b3859ab9a Fix error message for invalid base 2021-10-02 15:29:51 +02:00
Johannes Maas
beca0367e3 Refactor base normalization 2021-10-02 15:29:26 +02:00
Y0hy0h
7ba44a27af Fix issues with trailing slashes in the base 2021-10-02 14:55:25 +02:00
Dillon Kearns
5ed983a92f Allow some more dead-code elimination in browser Elm code through the generated code stripping off some CLI-only code. 2021-09-27 10:19:49 -07:00
Dillon Kearns
93955b00e3 Create .elm-pages folder from init command to ensure that the initial project is valid when running elm install command. Fixes #205. 2021-08-27 15:05:40 -07:00
Dillon Kearns
01dfc4b157 Update package version. 2021-08-27 11:41:30 -07:00
Dillon Kearns
f93252e79f Add elm-review to starter template. 2021-08-27 11:37:34 -07:00
Dillon Kearns
7d25c16ee8 Run elm-review in build if there are errors. 2021-08-27 11:36:03 -07:00
Dillon Kearns
7d88bc74f2 Remove extra log statement. 2021-08-27 11:35:46 -07:00
Dillon Kearns
f40e1d0db2 Give an error if elm-review isn't found on the PATH. 2021-08-27 10:59:35 -07:00
Dillon Kearns
87b60e4856 Run elm-review when errors point to generated code. 2021-08-27 10:27:37 -07:00