Commit Graph

1820 Commits

Author SHA1 Message Date
Dillon Kearns
95a49f6ec9 Remove unused function. 2023-01-16 21:30:26 -08:00
Dillon Kearns
5b19e2dc3e Rename BackendTask.throw -> BackendTask.allowFatal. 2023-01-16 18:24:48 -08:00
Dillon Kearns
60afaee624 Rename Exception -> RecoverableError. 2023-01-16 17:48:46 -08:00
Dillon Kearns
38e55cd9cd Make more type variables concrete in Pages.Generate scaffolding. 2023-01-13 16:27:58 -08:00
Dillon Kearns
2ddd0c89e8 Use record for parameters in Pages.Generate to make it more manageable to keep track of names. 2023-01-13 15:53:57 -08:00
Dillon Kearns
d6efc56152 Fix error in route generator helper where it didn't complete the builder chain in one case. 2023-01-13 11:37:20 -08:00
Dillon Kearns
c66720bc99 Revert vendoring of elm-program-test. 2023-01-13 11:36:55 -08:00
Dillon Kearns
be32cbd2be Update docs and rename a BackendTask.Port Error variant. 2023-01-13 10:03:39 -08:00
Dillon Kearns
5ab296f91c Update doc. 2023-01-13 09:35:50 -08:00
Dillon Kearns
ac366d663c Update Env docs. 2023-01-13 08:52:54 -08:00
Dillon Kearns
18b77bbfa1 Bump compatability key. 2023-01-13 08:34:48 -08:00
Dillon Kearns
f9703151e8 Review fixes. 2023-01-13 08:31:25 -08:00
Dillon Kearns
2b8c848703 Remove some extra model state. 2023-01-12 12:09:18 -08:00
Dillon Kearns
52e0a4fab8 Remove duplicate function, add some unit tests for BackendTask resolution. 2023-01-12 10:29:46 -08:00
Dillon Kearns
82e34921db Remove unused parameter. 2023-01-11 15:02:57 -08:00
Dillon Kearns
ceb0113198 Update docs and add Exception.unwrap helper. 2023-01-10 16:23:15 -08:00
Dillon Kearns
e5bcdf2d6e Rename Exception.Catchable -> Exception.Exception to reduce number of terms. 2023-01-10 11:06:20 -08:00
Dillon Kearns
d68f943967 Update docs. 2023-01-10 10:40:20 -08:00
Dillon Kearns
0afe0b37ca Update example to latest and fix some types in API. 2023-01-09 11:24:50 -08:00
Dillon Kearns
4998458706 Bump compatability key. 2023-01-08 13:03:18 -08:00
Dillon Kearns
68e7eedf55 Update codegen script to include Throwable type variable in BackendTask. 2023-01-08 11:44:28 -08:00
Dillon Kearns
fd1c27e6b8 Update HTTP API. 2023-01-08 10:50:56 -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
ef0f091790 Make BackendTask.Http.get take an Expect, add Http.getJson and Http.post helpers. 2023-01-07 10:38:52 -08:00
Dillon Kearns
2ffea79f0b Merge requestWithOptions into a Maybe Options for BackendTask.Http.Request. 2023-01-07 10:22:10 -08:00
Dillon Kearns
55e94c3970 Update withMetadata to accept a combine function. 2023-01-07 09:56:51 -08:00
Dillon Kearns
f3170ecb81 Review fixes. 2023-01-07 09:52:12 -08:00
Dillon Kearns
23aa988413 Review fixes. 2023-01-06 18:24:34 -08:00
Dillon Kearns
223f2b69d5 Remove obsolete onError. 2023-01-06 18:24:15 -08:00
Dillon Kearns
2abf10a468 Replace BackendTask.Http.expect*Response helpers with a more composable withMetadata expect builder. 2023-01-06 18:17:36 -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
a2a558992a Handle port-data-source errors in BackendTasks. 2023-01-02 11:02:22 -08:00
Dillon Kearns
4146ed1a11 Use raw string instead of TerminalText to let user use whichever ansi package they prefer. 2023-01-01 16:54:36 -08:00
Dillon Kearns
7f23779816 Rename DataSource -> BackendTask. 2023-01-01 14:45:54 -08:00
Dillon Kearns
5d4953a92f Use errors with more formatting. 2023-01-01 14:41:10 -08:00
Dillon Kearns
a24b3fb6e5 Remove unused. 2022-12-31 13:31:30 -08:00
Dillon Kearns
6bd91eb68e Make DataSource.Port error catchable. 2022-12-31 13:24:00 -08:00
Dillon Kearns
1f109fca7c Add missing doc comment. 2022-12-31 13:19:08 -08:00
Dillon Kearns
dddaea17f2 Use Http error type in Http module. 2022-12-31 12:45:01 -08:00
Dillon Kearns
049e508fc9 Address review errors. 2022-12-31 12:15:45 -08:00
Dillon Kearns
e5d8ada046 Remove some Debug.todo's. 2022-12-30 17:10:58 -08:00
Dillon Kearns
499390aeae Fix errors. 2022-12-29 14:14:08 -07:00
Dillon Kearns
12935c577b Expose Script.Error type. 2022-12-29 13:45:46 -07:00
Dillon Kearns
ad42776fb2 Update docs. 2022-12-28 19:29:08 -07: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
38b043b2ee Fix error in generator code. 2022-12-22 15:21:21 -08:00
Dillon Kearns
80eb85c5ca Address review errors. 2022-12-22 15:17:54 -08:00
Dillon Kearns
cf763d3ef6 Address review errors. 2022-12-22 15:08:25 -08:00
Dillon Kearns
3c4df2fb28 Remove unused. 2022-12-22 15:04:50 -08:00
Dillon Kearns
b58d148e31 Remove unused code. 2022-12-22 14:27:07 -08:00
Dillon Kearns
4092544f62 Remove unused. 2022-12-22 10:50:52 -08:00
Dillon Kearns
dc2ef65efe Review fixes. 2022-12-22 10:50:17 -08:00
Dillon Kearns
0716ad8abf Clean up DataSource resolution logic so it doesn't need hack to union responses but instead contains exactly the responses required at each tick. 2022-12-22 10:48:23 -08:00
Dillon Kearns
c245d4efe8 Address review errors. 2022-12-22 09:36:59 -08:00
Dillon Kearns
3380ccd0fc Fix test case with temporary unioning - should probably clean up logic to have more precise use of the resolved data. 2022-12-22 09:35:27 -08:00
Dillon Kearns
76d33afb39 Simplify type. 2022-12-21 20:51:27 -08:00
Dillon Kearns
0096bc667e Remove unused from extensible record. 2022-12-21 20:29:45 -08:00
Dillon Kearns
b21a954b90 Remove some levels of indirection. 2022-12-21 10:06:02 -08:00
Dillon Kearns
7d409f611a Simplify function. 2022-12-21 09:32:09 -08:00
Dillon Kearns
23f32f8cce Remove redundant code path. 2022-12-21 08:45:26 -08:00
Dillon Kearns
8c9ca1fb79 Make a step towards removing a level of indirection for resolving DataSource's into Effects. 2022-12-21 08:35:25 -08:00
Dillon Kearns
0f6aa025c3 Remove unused. 2022-12-19 17:21:33 -08:00
Dillon Kearns
6f2157c31d Review fixes. 2022-12-19 17:19:03 -08:00
Dillon Kearns
315c62b233 Wire through server request payload with new architecture for Api Routes. 2022-12-19 17:13:33 -08:00
Dillon Kearns
5e7336938b Fix infinite recursion in DataSource andThen resolution. 2022-12-19 15:55:12 -08:00
Dillon Kearns
4a70a4d79c Add todo comment. 2022-12-19 15:47:18 -08:00
Dillon Kearns
86e76ae9f6 Avoid a case of infinite recursion for DataSource resolution. 2022-12-18 18:02:50 -08:00
Dillon Kearns
a716e4eb23 Remove redundant variants. 2022-12-16 21:34:01 -08:00
Dillon Kearns
e7dc80df8d Remove unused. 2022-12-16 21:15:19 -08:00
Dillon Kearns
e36938ab37 Remove no-op case match. 2022-12-16 21:05:45 -08:00
Dillon Kearns
9cfaef7b26 Use uncached helper. 2022-12-16 21:04:33 -08:00
Dillon Kearns
dd5c6a25e3 Simplify destructure expression. 2022-12-16 21:04:22 -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
b013dde63e Remove unused custom type argument. 2022-12-16 19:33:01 -08:00
Dillon Kearns
682e793a00 Inline a destructure. 2022-12-15 09:54:27 -08:00
Dillon Kearns
3462441c0e Remove some unused code and hardcoding. 2022-12-15 09:50:31 -08:00
Dillon Kearns
915fe12c80 Address todo. 2022-12-15 09:49:17 -08:00
Dillon Kearns
e489ccf8fa Fix errors in script-runner harness. 2022-12-14 15:52:36 -08:00
Dillon Kearns
aa56d6dfd2 Remove unused variant. 2022-12-14 15:36:51 -08:00
Dillon Kearns
8da992b86f Remove unused code. 2022-12-14 15:34:18 -08:00
Dillon Kearns
8e5f162c66 Wire up new DataSource resolution logic in Cli module. 2022-12-13 11:22:49 -08:00
Dillon Kearns
3a32d469b6 Add type variable for return type in StaticResponses handlers. 2022-12-12 14:42:31 -08:00
Dillon Kearns
0c133f72d7 Remove obsolete custom type argument. 2022-12-09 15:06:18 -08:00
Dillon Kearns
9614c246a0 Remove duplicate DataSource requests being performed at the same level. 2022-12-08 11:15:58 -08:00
Dillon Kearns
79e91fd421 Use empty value for unused custom type parameter. 2022-12-08 10:35:07 -08:00
Dillon Kearns
3bcba2002c Remove unused param. 2022-12-08 10:34:47 -08:00
Dillon Kearns
ff7a65ac5f Simplify logic for resolving pending DataSource requests, and try to avoid duplicate computation but ensure that duplicate requests are all peformed by only doing a single level of execution at a time. 2022-12-08 09:58:08 -08:00
Dillon Kearns
1c746bef8d Temp - try out avoiding duplicate DataSource requests. 2022-12-07 11:51:33 -08:00
Dillon Kearns
e229c6d3e9 Bump compatability key. 2022-12-07 10:19:04 -08:00
Dillon Kearns
dc8461b5ab Avoid redundant DataSource lambda execution by updating the Model in the CLI runner with the follow-up lambdas as each one is executed. 2022-12-07 09:21:35 -08:00
Dillon Kearns
2d91992c6e Fix import. 2022-11-23 18:06:02 -08:00
Dillon Kearns
689c9cb7eb Make Script type opaque. 2022-11-23 17:35:43 -08:00
Dillon Kearns
c9e1eecc3c Rename variant. 2022-11-23 16:38:36 -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
f368bb358e Give error status code for invalid CLI arguments. 2022-11-23 08:52:24 -08:00
Dillon Kearns
4c93e64cae Add missing doc comment. 2022-11-23 08:23:46 -08:00
Dillon Kearns
3a0534a6a0 Rename Generator to Script. 2022-11-22 12:44:08 -08:00
Dillon Kearns
c71e26029f Fix package docs and elm.json for publishing. 2022-11-22 12:40:51 -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
88500941be Update some links. 2022-11-18 10:38:10 -08:00
Dillon Kearns
2a2950dcff Add an escape hatch for including arbitrary fields in manifest.json. 2022-11-16 16:12:19 -08:00
Dillon Kearns
8bf9259687 Update docs. 2022-11-16 09:59:53 -08:00
Dillon Kearns
80221864db Update docs. 2022-11-16 09:29:09 -08:00
Dillon Kearns
c268c483d2 Update docs. 2022-11-16 09:03:45 -08:00
Dillon Kearns
4861f9fdca Update docs. 2022-11-16 08:58:55 -08:00
Dillon Kearns
9d71623356 Update docs. 2022-11-16 07:35:52 -08:00
Dillon Kearns
e1e1819ba3 Update docs. 2022-11-16 07:27:51 -08:00
Dillon Kearns
db4d382b0f Update docs. 2022-11-16 07:15:11 -08:00
Dillon Kearns
eaadf697a3 Resolve conflict between vendored elm-program-test result-extra package and installed package in example folder. 2022-11-15 16:47:42 -08:00
Dillon Kearns
2b454134fb Vendor elm-program-test (unvendor once elm-test 2.0 PR is merged). 2022-11-15 16:40:43 -08:00
Dillon Kearns
62170644e1 Update to latest elm-review. 2022-11-15 16:02:17 -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
3a24ac361e Add missing annotation. 2022-11-15 10:59:58 -08:00
Dillon Kearns
4ad3e4a4c8 Update docs for 3.0 changes. 2022-11-10 17:18:42 +05:30
Dillon Kearns
eebc34d078 Remove out-of-date comment for 3.0. 2022-11-10 16:48:54 +05:30
Dillon Kearns
cb246adcaf Add buildWithSharedState helper. 2022-11-10 11:46:22 +05:30
Dillon Kearns
23371014cd Improve error message. 2022-11-08 13:41:00 +05:30
Dillon Kearns
6d6640d5f4 Fix test. 2022-11-07 11:36:08 +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
6a06767120 Include optional parameter for htmlToString configuration. 2022-10-29 19:38:19 +05:30
Dillon Kearns
82afc3a493 Change pattern matching order to improve performance (the catchall cases seem to be slower, so put them last). And use a foldl instead of foldr for performance. 2022-10-28 06:27:40 +05:30
Dillon Kearns
98736e0a39 Don't call a route's init when staying on the same path. 2022-10-19 15:14:57 -07:00
Dillon Kearns
23202cc650 Expose Generate.single helper. 2022-10-18 13:50:00 -07:00
Dillon Kearns
f726d128fa Add a way to scaffold pre-rendered pages in Generate API. 2022-10-18 11:02:39 -07:00
Dillon Kearns
7604b62593 Rename variant. 2022-10-18 10:17:24 -07:00
Dillon Kearns
0bdcb74e73 Fix format in link in doc comment. 2022-10-14 10:00:49 -07:00
Dillon Kearns
98136765e3 Update to latest date-or-date-time. 2022-10-10 14:48:09 -07:00
Dillon Kearns
9ae9797735 Pass through headers from actions in a case where they were dropped. 2022-10-07 10:39:20 -07:00
Dillon Kearns
78f2657c85 Remove exposed phantom variants. 2022-10-07 10:17:33 -07:00
Dillon Kearns
ebb4aa4b96 Update SetCookie docs. 2022-10-07 10:11:12 -07:00
Dillon Kearns
eb398c30e3 Move nested Maybe wrapped in Result to flat Err variant in Session API, and remove obsolete expectSession helper. 2022-10-06 09:50:44 -07:00
Dillon Kearns
b4a603fca8 Change argument order. 2022-10-06 09:35:42 -07:00
Dillon Kearns
7fea8a2853 Remove some obsolete exposed values from Session API, and update docs. 2022-10-06 08:54:25 -07:00
Dillon Kearns
1adc07126e Remove unused. 2022-10-06 08:12:56 -07:00
Dillon Kearns
96ad324e4b Make HttpOnly cookies the default (opt in to JS visibile cookies instead of opting out). 2022-10-06 07:56:14 -07:00
Dillon Kearns
fbfcd49721 Separate out SetCookie records from Options so the Options can be passed as standalone value. 2022-10-05 15:30:29 -07:00
Dillon Kearns
fe5263aa24 Rename some values to better reflect that signed cookies aren't encrypted, only signed. 2022-10-05 14:42:27 -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
3e0a0dbccc Replace DateOrDateTime with type defined in external package. 2022-10-05 12:21:21 -07:00
Dillon Kearns
1d27e96dfb Update docs. 2022-10-05 08:44:38 -07:00
Dillon Kearns
9a1823af75 Run elm-format. 2022-10-04 17:20:05 -07:00
Dillon Kearns
613f7df781 Add missing docs and add elm-review-documentation. 2022-10-04 16:38:43 -07:00
Dillon Kearns
e81c3e1b42 Use DateOrDateTime custom type instead of a string for more safety in Seo API. 2022-10-04 16:28:58 -07:00
Dillon Kearns
880dfdca9e Use MimeType custom type instead of type alias for String for better safety in Seo API. 2022-10-04 16:10:55 -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
20ecc04c8c Review fixes. 2022-10-04 09:44:40 -07:00
Dillon Kearns
21527217cf Review fix. 2022-10-04 08:15:39 -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
c08d3e9be6 Update docs. 2022-10-03 08:52:16 -07:00
Dillon Kearns
59a237dda6 Apply simplifications. 2022-09-26 16:29:55 -07:00
Dillon Kearns
20e13f84e6 Remove extra param. 2022-09-23 13:46:20 -07:00
Dillon Kearns
2f6650d904 Wire up elm-codegen init function. 2022-09-19 18:58:47 -07:00
Dillon Kearns
34be346d73 Migrate more code generation. 2022-09-16 07:23:27 -07:00
Dillon Kearns
3eb61c8151 Build up more generated Main code. 2022-09-15 14:05:21 -07:00
Dillon Kearns
3bb7c37e4a Handle endings in toModuleName. 2022-09-15 10:39:22 -07:00
Dillon Kearns
ac57661c61 Add starting point for RoutePattern.toModuleName helper. 2022-09-15 10:36:56 -07:00
Dillon Kearns
cddf0ca412 Update docs. 2022-09-15 08:10:01 -07:00
Dillon Kearns
6b6e2c851a Review fixes. 2022-09-15 07:51:14 -07:00
Dillon Kearns
59a0bc1306 Review fixes. 2022-09-15 07:45:10 -07:00
Dillon Kearns
e9ecdf582e Fix casing in route matching. 2022-09-14 15:53:27 -07:00
Dillon Kearns
ea5ad24b0b Delete commented code. 2022-09-14 14:34:25 -07:00
Dillon Kearns
4c14042d6c Extract some common code. 2022-09-13 14:53:47 -07:00
Dillon Kearns
c24f8fe4c1 Remove duplication. 2022-09-13 14:33:55 -07:00
Dillon Kearns
a39c381264 Inline code. 2022-09-13 14:31:50 -07:00
Dillon Kearns
4c2e9d264a Add additional param types. 2022-09-13 14:25:51 -07:00
Dillon Kearns
ba517563f7 Remove hardcoded value. 2022-09-13 10:54:19 -07:00
Dillon Kearns
c93e3d8f85 Fix case for index route codegen. 2022-09-13 08:55:41 -07:00
Dillon Kearns
f07f5feac9 Remove debug.todo. 2022-09-13 08:50:24 -07:00
Dillon Kearns
24622df871 Generate routeToPath. 2022-09-13 08:17:23 -07:00
Dillon Kearns
c81649d93b Handle required splats in generated route module. 2022-09-13 06:51:21 -07:00
Dillon Kearns
27e58f1027 Handle optional case with correctly generating record argument. 2022-09-13 06:37:51 -07:00
Dillon Kearns
27d13c5a15 Prepare for generating 2 branches for optional params. 2022-09-12 21:45:34 -07:00
Dillon Kearns
0e942f0a5d Add annotation. 2022-09-12 21:38:24 -07:00
Dillon Kearns
00a59d6756 Extract function. 2022-09-12 21:37:01 -07:00
Dillon Kearns
aba66fef3b Handle optional ending. 2022-09-12 21:24:14 -07:00
Dillon Kearns
693094e6bf Generate records and case expression with no ending. 2022-09-12 21:05:01 -07:00
Dillon Kearns
b75e285247 Remove some hardcoding. 2022-09-12 17:02:54 -07:00
Dillon Kearns
378a8d7b41 Remove some hardcoding. 2022-09-12 17:02:19 -07:00
Dillon Kearns
b93c98ba23 Remove hardcoded name. 2022-09-12 17:00:58 -07:00
Dillon Kearns
9e9cf969e9 Use elm-syntax-dsl for case expression. 2022-09-12 16:59:11 -07:00
Dillon Kearns
fe3c79f30a Add test setup for branch generator. 2022-09-12 15:08:11 -07:00
Dillon Kearns
261cd64ed5 Handle optional splat. 2022-09-12 13:20:44 -07:00
Dillon Kearns
2115b9be9d Handle splat route for generating variants. 2022-09-12 13:19:25 -07:00
Dillon Kearns
3f12c6ccb5 Add test for dynamic route param. 2022-09-12 12:16:18 -07:00
Dillon Kearns
c27459fa8d Add RoutePattern.toVariant helper. 2022-09-12 11:59:36 -07:00
Dillon Kearns
aafbfd22d2 Move decapitlize logic out of parsing for RoutePattern and into building up record fields. 2022-09-12 11:47:51 -07:00
Dillon Kearns
c628c073a0 Add missing doc comments. 2022-09-10 11:05:25 -07:00
Dillon Kearns
cddaab7264 Add function for generator with buildNoState. 2022-09-10 10:18:39 -07:00
Dillon Kearns
2a1cd5cb8d Use builder pattern for Pages.Generate. 2022-09-09 17:18:23 -07:00
Dillon Kearns
d6597b43ce Generate docs.json file as part of scaffold command. 2022-09-09 15:19:08 -07:00