Commit Graph

1331 Commits

Author SHA1 Message Date
Dillon Kearns
7ef56571bf Use ESM for mocha tests. 2023-01-24 15:59:53 -08:00
Dillon Kearns
8978ed1ac9 Change CLI output file path extension to .cjs. 2023-01-24 15:52:42 -08:00
Dillon Kearns
645dd4e5dd Write compiled Elm CLI output with .cjs extension to make it compatible with "type": "module" in package.json file. 2023-01-23 16:03:52 -08:00
Dillon Kearns
e835b494c9 Update adapter script. 2023-01-22 15:47:51 -08:00
Dillon Kearns
2ecbc16eb9 Restart thread pool when Elm code changes to clear import cache. 2023-01-22 13:52:02 -08:00
Dillon Kearns
3622c715ad Remove references to obsolete staticHttpCache. 2023-01-22 09:45:18 -08:00
Dillon Kearns
9600de126b Convert to ESM. 2023-01-22 09:33:32 -08:00
Dillon Kearns
6c35bb9146 Include script module name in help text. 2023-01-19 08:43:15 -08:00
Dillon Kearns
56007d751b Include "elm-pages run" as executable name for scripts. 2023-01-19 08:31:06 -08:00
Dillon Kearns
6a50fe64d2 Fix BackendTask resolution logic. 2023-01-17 12:08:57 -08:00
Dillon Kearns
f7825c45c7 Look for BackendTask.Custom definitions in custom-backend-task instead of port-data-source. 2023-01-17 07:08:15 -08:00
Dillon Kearns
ea29d1bbb3 Rename BackendTask.Port -> BackendTask.Custom. 2023-01-17 07:04:18 -08:00
Dillon Kearns
904af360ad Update compatability key. 2023-01-16 21:46:40 -08:00
Dillon Kearns
8ebfd2ea2d Fix stalling for BackendTask worker. 2023-01-16 18:21:42 -08:00
Dillon Kearns
60afaee624 Rename Exception -> RecoverableError. 2023-01-16 17:48:46 -08:00
Dillon Kearns
99012b71a8 Handle another possible format from elm-review error JSON output. 2023-01-13 11:08:47 -08:00
Dillon Kearns
be32cbd2be Update docs and rename a BackendTask.Port Error variant. 2023-01-13 10:03:39 -08:00
Dillon Kearns
cf46e1582a Add missing cachePath option to fix HTTP Conditional Request caching behavior. 2023-01-13 08:48:32 -08:00
Dillon Kearns
18b77bbfa1 Bump compatability key. 2023-01-13 08:34:48 -08:00
Dillon Kearns
e12e4fb7f3 Remove obsolete code. 2023-01-13 08:30:05 -08:00
Dillon Kearns
233da2cb54 Fix issue with BackendTask being called twice in some cases. 2023-01-13 08:29:29 -08:00
Dillon Kearns
a93c4f68a3 Remove debug logs. 2023-01-09 16:46:33 -08:00
Dillon Kearns
830c4f90b5 Try different approach to ensure that fetch cache is accessible. 2023-01-09 15:13:42 -08:00
Dillon Kearns
0caf864ad3 Add some debug output for netlify function debugging. 2023-01-09 14:51:19 -08:00
Dillon Kearns
311b248eef Tweak safeFetch. 2023-01-09 13:30:14 -08:00
Dillon Kearns
0f11b031fb Try safeFetch wrapper to handle ENOENT errors if server environment has a filesystem error. 2023-01-09 13:17:22 -08:00
Dillon Kearns
4998458706 Bump compatability key. 2023-01-08 13:03:18 -08:00
Dillon Kearns
d5a6c3c53f Remove unused dependency. 2023-01-08 11:51:38 -08:00
Dillon Kearns
91d009e70d Resolve port-data-source functions directly instead of writing them to cache. 2023-01-08 10:29:09 -08:00
Dillon Kearns
766d6b02d7 Rename field. 2023-01-07 15:31:54 -08:00
Dillon Kearns
8f34381954 Add BackendTask.Http.bytesBody. 2023-01-07 15:26:31 -08:00
Dillon Kearns
9c07ae57b8 Pass through caching options from request. 2023-01-06 12:53:48 -08:00
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