Commit Graph

1085 Commits

Author SHA1 Message Date
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
Dillon Kearns
d7109bfe40 Add missing await. 2022-02-09 15:08:06 -08:00
Dillon Kearns
fedda39a4f Remove manifest from Site.elm and move it into user-space. 2022-02-09 10:47:59 -08:00
Dillon Kearns
1d144996d8 Use an async version to check if file exists. 2022-02-08 11:41:05 -08:00
Dillon Kearns
50e81ca5de Remove some special cases for DataSource resolvers. 2022-02-07 17:49:14 -08:00
Dillon Kearns
364753694f Improve build error message ouptut. 2022-02-05 20:34:42 -08:00
Dillon Kearns
6663151122 Handle redirects when doing client-side navigations (through content.dat fetches). 2022-02-05 13:14:07 -08:00
Dillon Kearns
cb8509f519 Fix template for server-rendered page. 2022-02-04 11:44:26 -08:00
Dillon Kearns
5c2cdb93e1 Return empty list when listing files if directory doesn't existing. 2022-02-04 10:59:10 -08:00
Dillon Kearns
4c2f779477 Format errors if type is list. 2022-02-04 10:53:41 -08:00
Dillon Kearns
c1febe27b6 Try temporarily moving code back into source directory for better elm-review fixes. 2022-02-04 09:12:19 -08:00
Dillon Kearns
55131aa828 Delete obsolete variant. 2022-02-04 09:09:12 -08:00
Dillon Kearns
ac687f398e Remove calls to distillBytes. 2022-02-04 09:01:08 -08:00
Dillon Kearns
18831846aa Remove distillBytes calls from generated entrypoint and make sure that DataSource's resolve without it. 2022-02-04 08:59:11 -08:00
Dillon Kearns
5f181ad1bc Update error formatter to handle being passed direct JSON values. 2022-02-04 08:56:40 -08:00
Dillon Kearns
194337c80d Delete log statement. 2022-02-03 20:44:18 -08:00
Dillon Kearns
38cd1c35c6 Review fixes. 2022-02-03 20:17:00 -08:00
Dillon Kearns
1ed1d8bb8a Remove some ContentCache references. 2022-02-03 20:11:22 -08:00
Dillon Kearns
69cdf963cf Remove some instances of content.json. 2022-02-03 20:08:45 -08:00
Dillon Kearns
550c66dacb Send shared data updates for dev server to make sure shared data hot reloads. 2022-02-03 18:30:49 -08:00
Dillon Kearns
6892ee8bc7 Inline value. 2022-02-03 17:45:57 -08:00
Dillon Kearns
d3e54fcff2 Inline value. 2022-02-03 16:56:48 -08:00
Dillon Kearns
1c9d6340f1 Simplify case expression. 2022-02-03 16:38:54 -08:00
Dillon Kearns
c9f78e7c5f Encode NotFound pages for dev server. 2022-02-03 14:59:54 -08:00
Dillon Kearns
062cbea918 Send wrapper type instead of individual page data for Bytes content.dat. 2022-02-03 14:01:45 -08:00
Dillon Kearns
163f611894 Prettier formatting. 2022-02-03 11:51:34 -08:00
Dillon Kearns
159c075324 Send content.dat updates for hot reloading. 2022-02-03 11:51:17 -08:00
Dillon Kearns
e435c994b5 Uncomment hot reload watcher. 2022-02-02 09:53:47 -08:00
Dillon Kearns
103433ade6 Use Lamdera Wire decoders to decode initial page data from flags. 2022-02-01 17:59:57 -08:00
Dillon Kearns
1ee6cef81e Render base64 string without btoa function to avoid error. 2022-02-01 11:07:24 -08:00
Dillon Kearns
934846b697 Use byte decoder fail instead of Debug.todo in generated code. 2022-02-01 11:01:50 -08:00
Dillon Kearns
502b2cf42b Delete log statements. 2022-02-01 11:01:40 -08:00
Dillon Kearns
8df1439025 Write content.dat files instead of content.json for build step, and include bytes format in pre-rendered HTML output. 2022-02-01 10:57:21 -08:00
Dillon Kearns
0418d98de3 Update package-lock. 2022-02-01 10:55:46 -08:00
Dillon Kearns
db4e2f289e Add missing variable. 2022-02-01 10:38:42 -08:00
Dillon Kearns
34db57235c Add TODO comment. 2022-02-01 10:11:56 -08:00
Dillon Kearns
fcdd39b910 Use byte encodings for content.dat in dev server. 2022-02-01 10:11:47 -08:00
Dillon Kearns
cfbbf71bf5 Check if port is defined before subscribing to avoid error if port is unused. 2022-01-29 09:15:19 -08:00
Dillon Kearns
8e3736d051 Use restoreColorSafe in more places. 2022-01-29 09:01:27 -08:00
Dillon Kearns
e638bd13fd Fix error with sending api responses from dev server. 2022-01-29 09:00:38 -08:00
Dillon Kearns
c3b8032683 Add missing report option to restore dev server compiler errors. 2022-01-28 18:01:04 -08:00
Dillon Kearns
2180ee09e1 Run elm-optimize-level-2 on lamdera output. 2022-01-28 12:03:47 -08:00
Dillon Kearns
b6135799fc Skip elm-optimize-level-2 for the lamdera build for now. 2022-01-28 11:26:30 -08:00
Dillon Kearns
a0462a647e Add safe error formatter function that prints raw error if it can't be JSON parsed, and improve error output for build. 2022-01-28 11:26:14 -08:00
Dillon Kearns
7ac4ceecde Add NoPrematureLetComputation review rule. 2022-01-28 08:27:04 -08:00
Dillon Kearns
59346721b5 Remove log. 2022-01-27 20:13:30 -08:00
Dillon Kearns
59fb87782a elm-review fixes. 2022-01-27 16:16:40 -08:00
Dillon Kearns
f82ae79e24 Remove obsolete SecretsDict usage. 2022-01-27 15:50:59 -08:00
Dillon Kearns
ed956ae341 Remove now obsolete Secrets API! 2022-01-27 15:45:51 -08:00
Dillon Kearns
d7dd124880 Show error output if it can't be parsed as JSON. 2022-01-26 15:03:44 -08:00
Dillon Kearns
7497934772 Merge branch 'lamdera-wire' into serverless-latest
# Conflicts:
#	examples/pokedex/netlify.toml
#	examples/pokedex/src/Api.elm
#	examples/pokedex/src/Page/Greet.elm
#	examples/pokedex/src/Page/Login.elm
#	src/Session.elm
2022-01-26 14:32:39 -08:00
Dillon Kearns
e2145a5844 Restore --report json option to make command. 2022-01-26 14:27:24 -08:00
Dillon Kearns
b979c5bc3c Run lamdera compiler instead of elm to make wire encoders available. 2022-01-26 14:27:15 -08:00
Dillon Kearns
d15a191d5a Distill shared data. 2022-01-26 10:45:05 -08:00
Dillon Kearns
9b4e4dab9b Log dev server errors in case they can't be decoded to JSON. 2022-01-26 08:36:48 -08:00
Dillon Kearns
3e9a93c636 Generate distillBytes with wire codecs for all page modules. 2022-01-25 21:56:02 -08:00
Dillon Kearns
21d9ae9e35 Add port to reload current page's data. 2022-01-25 11:20:18 -08:00
Dillon Kearns
e84232d67a Include form helper in build output elm file. 2022-01-24 20:54:53 -08:00
Dillon Kearns
f21b8b61b1 Add form data decoder and example. 2022-01-24 15:50:25 -08:00
Dillon Kearns
1becbff897 Wire through errors with session checksums. 2022-01-23 13:35:04 -08:00
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