Commit Graph

1299 Commits

Author SHA1 Message Date
Dillon Kearns
7b4aafa03e Fix renderer code error. 2023-01-06 10:34:57 -08:00
Dillon Kearns
89491a9515 Use HTTP conditional requests, and fix some handling of HTTP error cases for BackendTask error paths (return the error data instead of handling them as build errors). 2023-01-06 10:03:19 -08:00
Dillon Kearns
fef2cbf6a4 Avoid creating unnecessary Elm Dicts by directly using JSON values for CLI Batch data from resolving BackendTask data. 2023-01-03 08:52:20 -08:00
Dillon Kearns
0e4c33e01b Add Exception import when needed. 2023-01-02 11:31:59 -08:00
Dillon Kearns
a2a558992a Handle port-data-source errors in BackendTasks. 2023-01-02 11:02:22 -08:00
Dillon Kearns
7f23779816 Rename DataSource -> BackendTask. 2023-01-01 14:45:54 -08:00
Dillon Kearns
0a9cfa60e6 Use reference to import alias for Exception.fromString. 2022-12-30 17:48:49 -08:00
Dillon Kearns
e5d8ada046 Remove some Debug.todo's. 2022-12-30 17:10:58 -08:00
Dillon Kearns
6c54713f02 Fix test. 2022-12-29 16:38:13 -08:00
Dillon Kearns
09e5c389b5 Update docs and fix some errors in elm-pages run. 2022-12-28 19:22:58 -07:00
Dillon Kearns
c982947c7d Make Throwable/Catchable exceptions. 2022-12-28 18:45:49 -07:00
Dillon Kearns
d78a3ca91d Add initial prototype for error type variable in DataSources. 2022-12-26 10:53:06 -07:00
Dillon Kearns
acd79028a8 Add test harness file for running a renderer. 2022-12-22 09:35:45 -08:00
Dillon Kearns
6bfd23ff02 Pass in reference to request payload directly instead of going through Http DataSource. 2022-12-16 19:41:57 -08:00
Dillon Kearns
7b08b86060 Add code path for skipping write to file system for performing DataSource's. 2022-12-07 11:50:34 -08:00
Dillon Kearns
e229c6d3e9 Bump compatability key. 2022-12-07 10:19:04 -08:00
Dillon Kearns
b0dfe853d6 Handle case where port-data-source module doesn't exist in elm-pages run. 2022-12-07 09:29:57 -08:00
Dillon Kearns
5a392a1757 Ensure that http-response-cache folder exists before running elm-pages run. 2022-12-07 09:27:13 -08:00
Dillon Kearns
fa68be3069 Update dependencies. 2022-11-30 09:38:24 -08:00
Dillon Kearns
2c22cd3d14 Revert dependency upgrade. 2022-11-30 09:11:09 -08:00
Dillon Kearns
088e9b297d Print formatted error in another location. 2022-11-30 09:02:30 -08:00
Dillon Kearns
edbd68abe1 Implement Script.log. 2022-11-23 09:32:02 -08:00
Dillon Kearns
e8f9c566db Bump compatability key. 2022-11-23 09:18:56 -08:00
Dillon Kearns
ba7e0199de Only run elm-codegen if ./codegen/ folder is present. 2022-11-23 09:04:17 -08:00
Dillon Kearns
b7f78559d5 Rename generator functions. 2022-11-22 12:45:40 -08:00
Dillon Kearns
6967822047 Use latest elm-pages run script format for route scaffolding example. 2022-11-22 12:27:53 -08:00
Dillon Kearns
642bbc3398 Change generators to elm-pages run instead of elm-pages codegen, and resolve DataSource's through new generator API. 2022-11-22 11:21:11 -08:00
Dillon Kearns
19fd31793b Update dependencies. 2022-11-15 16:40:02 -08:00
Dillon Kearns
3d12a15c04 Move compatability key file to make sure it's in NPM bundle. 2022-11-15 12:00:40 -08:00
Dillon Kearns
91192ca39a Add script to automate updating compatibility key. 2022-11-15 11:43:18 -08:00
Dillon Kearns
9f6bd8f583 Add Head.nonLoadingNode. 2022-11-15 11:05:30 -08:00
Dillon Kearns
f6450f8b84 Remove warning noise from port-data-source (unless there is a port-data-source file with errors loading). 2022-11-07 11:56:34 +05:30
Dillon Kearns
f10d1c7a0c Add a compatability key to ensure that the Elm and NPM package versions are compatible. 2022-11-07 11:17:47 +05:30
Dillon Kearns
6bf1881de4 Include preload tags by default from Vite processing, and add config hook for customizing preload tags. 2022-11-02 15:14:36 +05:30
Dillon Kearns
7c229cc88a Include new function in default config. 2022-11-02 14:51:02 +05:30
Dillon Kearns
6a06767120 Include optional parameter for htmlToString configuration. 2022-10-29 19:38:19 +05:30
Dillon Kearns
7c9fb152c8 Move some meta tags from elm-pages.config.mjs template to Elm code. 2022-10-29 18:54:03 +05:30
Dillon Kearns
219204b8e9 Remove some extra whitespace. 2022-10-29 18:26:20 +05:30
Dillon Kearns
9fe5ebe1b8 Pull charset into hardcoded value since it isn't configurable and needs to be placed within the first 1024 bytes of the document: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset. 2022-10-29 10:34:02 +05:30
Dillon Kearns
39ec4f20cc Fix import in html template. 2022-10-28 11:46:25 +05:30
Dillon Kearns
cc5c6a07a3 Fix default head tags config function. 2022-10-28 11:29:07 +05:30
Dillon Kearns
0f8cd29c14 Allow for user-customized head tags template that is processed by Vite. 2022-10-28 10:58:36 +05:30
Dillon Kearns
d8ea1a60b3 Merge vite config options from user configuration using a deep merge utility from the svelte-kit codebase. 2022-10-24 15:40:45 -07:00
Dillon Kearns
f4f7d955f5 Remove log statement. 2022-10-14 12:36:08 -07:00
Dillon Kearns
71df2495a0 Support aliased or non aliased imports of DataSource module in codemod. 2022-10-14 11:26:42 -07:00
Dillon Kearns
07a71e9b37 Support aliased and unaliased imports for Server.Request in codemod rule. 2022-10-14 11:20:47 -07:00
Dillon Kearns
a2c79f73cb Add missing imports in tests. 2022-10-14 10:44:07 -07:00
Dillon Kearns
8ff1f21754 Change document's body to List of Html instead of a single element. 2022-10-05 12:40:06 -07:00
Dillon Kearns
3064f9ee93 Remove unused code. 2022-10-05 08:44:52 -07:00
Dillon Kearns
630e458b0e Build elm-pages-codegen.js compiled code for generator in bundle. 2022-10-04 14:28:00 -07:00
Dillon Kearns
96dd80e8a0 Move elm-review dependencies out into hidden review sub-projects. 2022-10-04 13:15:20 -07:00
Dillon Kearns
381b5844f5 Move some code back to package instead of copied code. 2022-10-03 14:38:54 -07:00
Dillon Kearns
520961ec32 Copy over some more internal modules in codegen step. 2022-10-03 09:56:17 -07:00
Dillon Kearns
131f7b750c Remove unused. 2022-09-27 08:49:31 -07:00
Dillon Kearns
4f13650b73 Delete unused. 2022-09-27 08:47:51 -07:00
Dillon Kearns
54d6184b64 Remove elm-pages add command. 2022-09-27 08:31:20 -07:00
Dillon Kearns
975eff210c Remove obsolete code. 2022-09-23 14:28:43 -07:00
Dillon Kearns
3672ad15c9 Print better message on error. 2022-09-20 13:22:40 -07:00
Dillon Kearns
2f6650d904 Wire up elm-codegen init function. 2022-09-19 18:58:47 -07:00
Dillon Kearns
a20d920852 Print nicer errors for codegen errors. 2022-09-15 16:38:56 -07:00
Dillon Kearns
bf8e94d787 Wire through phase string. 2022-09-15 13:21:30 -07:00
Dillon Kearns
d98fbfe2bf Add starting point for wiring up elm-codegen for Main.elm. 2022-09-15 10:59:33 -07:00
Dillon Kearns
83f9adcf94 Rename property. 2022-09-15 09:22:10 -07:00
Dillon Kearns
c3d3909eb5 Improve error output for elm-pages codegen command. 2022-09-15 08:07:50 -07:00
Dillon Kearns
d9f0a3ea08 Remove unused code. 2022-09-13 10:58:03 -07:00
Dillon Kearns
08015f49b9 Wire up baseUrl for Route module generation. 2022-09-13 10:49:51 -07:00
Dillon Kearns
7df5986d80 Sort routes for elm-codegen generator flag. 2022-09-12 12:16:35 -07:00
Dillon Kearns
d8639e617b Pass in list of templates to new code generation for Route module. 2022-09-12 11:49:02 -07:00
Dillon Kearns
ba6f0903ce Add boilerplate for elm-codegen. 2022-09-12 10:16:00 -07:00
Dillon Kearns
a0fa6c2188 Run the elm-pages code generation step and elm-codegen install as part of codegen command. 2022-09-11 07:50:41 -07:00
Dillon Kearns
be28313594 Fix module name patterns. 2022-09-10 10:53:46 -07:00
Dillon Kearns
efc81b9401 Report errors for missing modules or invalid module name syntax. 2022-09-10 10:52:39 -07:00
Dillon Kearns
74826014ef Use safe subscriptions to ports for codegen CLI. 2022-09-10 10:44:07 -07:00
Dillon Kearns
ab0fd3a593 elm-pages codegen finds a matching module from the codegen/ folder. 2022-09-10 10:37:24 -07:00
Dillon Kearns
7c61db1f55 Change command names. 2022-09-10 10:20:40 -07:00
Dillon Kearns
a8cfc508a1 Compile Elm for scaffold task. Turn off docs.json generation in that step for now because of intermittent JSON parse error. 2022-09-09 16:22:15 -07:00
Dillon Kearns
d6597b43ce Generate docs.json file as part of scaffold command. 2022-09-09 15:19:08 -07:00
Dillon Kearns
b409ef1957 Parse RouteParams in scaffolding generator. 2022-09-09 12:45:28 -07:00
Dillon Kearns
8711b7185a Add basic setup for a scaffold command using elm-codegen. 2022-09-09 10:56:54 -07:00
Dillon Kearns
67af0e53d0 Include View and Effect modules in elm-application.json, and include @docs comments to make them valid. 2022-09-09 10:53:19 -07:00
Dillon Kearns
3cdc466e3f Add wiring for storing done fetchers with actionData. 2022-08-31 08:37:11 -07:00
Dillon Kearns
3180b9c6d1 Remove unused. 2022-08-30 18:25:25 -07:00
Dillon Kearns
3c668d83e3 Don't fail when elm-optimize-level-2 prints warnings. 2022-08-30 16:41:48 -07:00
Dillon Kearns
abc91541e2 Add another HTML printing test case and handle lazy HTML nodes nested under keyed nodes. 2022-08-25 12:07:23 -07:00
Dillon Kearns
5415fd83d7 Pass in fetchers with their formId's, and implement isTransitioning status for fetchers. 2022-08-25 10:59:39 -07:00
Dillon Kearns
2b5737d0fb Evaluate thunks for Keyed nodes with Lazy children.
Minimal reproduction:

```elm
 [ 1 ]
    |> List.indexedMap
        (\index _ ->
            ( String.fromInt index, lazy2 (\_ _ -> li [] []) () () )
        )
    |> Keyed.ul []
```
2022-08-25 09:46:42 -07:00
Dillon Kearns
1cfdc839b6 Fix typo. 2022-08-24 12:45:40 -07:00
Dillon Kearns
9cd76dc614 Include Json_wrap in HTML rendering code for all compile modes. 2022-08-24 12:11:52 -07:00
Dillon Kearns
3745c76ecb Only run elm-optimize-level-2 for --optimize flag. 2022-08-24 11:55:36 -07:00
Dillon Kearns
5595493fcc Don't use --optimize in CLI prod build for now. 2022-08-24 11:50:50 -07:00
Dillon Kearns
68d9e687b7 Restore executables check. 2022-08-22 13:39:13 -07:00
Dillon Kearns
f4c50f9310 Comment out required executables check temporarily to see if windows ci succeeds without that check. 2022-08-22 09:20:35 -07:00
Dillon Kearns
1b3c7b8ce8 Add logging timing output. 2022-08-18 20:19:11 -07:00
Dillon Kearns
9beeddc4a8 Remove unused require. 2022-08-17 14:03:44 -07:00
Dillon Kearns
d5e97e7673 Fix error in test. 2022-08-08 10:58:34 -07:00
Dillon Kearns
b8909834b0 Wire through hardcoded flag to turn HTTP caching on or off for DataSources. 2022-07-12 01:45:45 -07:00
Dillon Kearns
ba1823cd82 Delete log noise. 2022-07-09 08:57:24 -07:00
Dillon Kearns
a8bb62a40e Rename variable in route module template. 2022-07-08 14:46:55 -07:00
Dillon Kearns
da29205702 Fix arguments for dev server CLI compilation. 2022-07-08 09:56:58 -07:00
Dillon Kearns
b2a97219f5 Re-order arguments for consistency. 2022-07-08 09:38:14 -07:00