From c71e26029f029bf40860811b47ba74eaf548deed Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Tue, 22 Nov 2022 12:40:51 -0800 Subject: [PATCH] Fix package docs and elm.json for publishing. --- elm.json | 2 + package-lock.json | 441 ------------------ review/src/ReviewConfig.elm | 1 + src/Pages/Generator.elm | 15 +- .../Platform/GeneratorApplication.elm | 45 +- 5 files changed, 28 insertions(+), 476 deletions(-) diff --git a/elm.json b/elm.json index 4e99e17d..d7ca7ff9 100644 --- a/elm.json +++ b/elm.json @@ -37,8 +37,10 @@ "Pages.Transition", "Pages.Generate", "Form.Validation", + "Pages.Generator", "Pages.Internal.Platform", "Pages.Internal.Platform.Cli", + "Pages.Internal.Platform.GeneratorApplication", "Pages.Internal.ResponseSketch", "Pages.Internal.Router", "Pages.Internal.RoutePattern", diff --git a/package-lock.json b/package-lock.json index 05d5f78f..526fb250 100644 --- a/package-lock.json +++ b/package-lock.json @@ -108,36 +108,6 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, - "node_modules/@esbuild/android-arm": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.14.tgz", - "integrity": "sha512-+Rb20XXxRGisNu2WmNKk+scpanb7nL5yhuI1KR9wQFiC43ddPj/V1fmNyzlFC9bKiG4mYzxW7egtoHVcynr+OA==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.14.tgz", - "integrity": "sha512-eQi9rosGNVQFJyJWV0HCA5WZae/qWIQME7s8/j8DMvnylfBv62Pbu+zJ2eUDqNf2O4u3WB+OEXyfkpBoe194sg==", - "cpu": [ - "loong64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -2302,51 +2272,6 @@ "esbuild-windows-arm64": "0.15.14" } }, - "node_modules/esbuild-android-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.14.tgz", - "integrity": "sha512-HuilVIb4rk9abT4U6bcFdU35UHOzcWVGLSjEmC58OVr96q5UiRqzDtWjPlCMugjhgUGKEs8Zf4ueIvYbOStbIg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-android-arm64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.14.tgz", - "integrity": "sha512-/QnxRVxsR2Vtf3XottAHj7hENAMW2wCs6S+OZcAbc/8nlhbAL/bCQRCVD78VtI5mdwqWkVi3wMqM94kScQCgqg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.14.tgz", - "integrity": "sha512-ToNuf1uifu8hhwWvoZJGCdLIX/1zpo8cOGnT0XAhDQXiKOKYaotVNx7pOVB1f+wHoWwTLInrOmh3EmA7Fd+8Vg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/esbuild-darwin-arm64": { "version": "0.15.14", "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.14.tgz", @@ -2362,246 +2287,6 @@ "node": ">=12" } }, - "node_modules/esbuild-freebsd-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.14.tgz", - "integrity": "sha512-xr0E2n5lyWw3uFSwwUXHc0EcaBDtsal/iIfLioflHdhAe10KSctV978Te7YsfnsMKzcoGeS366+tqbCXdqDHQA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-arm64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.14.tgz", - "integrity": "sha512-8XH96sOQ4b1LhMlO10eEWOjEngmZ2oyw3pW4o8kvBcpF6pULr56eeYVP5radtgw54g3T8nKHDHYEI5AItvskZg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-32": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.14.tgz", - "integrity": "sha512-6ssnvwaTAi8AzKN8By2V0nS+WF5jTP7SfuK6sStGnDP7MCJo/4zHgM9oE1eQTS2jPmo3D673rckuCzRlig+HMA==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.14.tgz", - "integrity": "sha512-ONySx3U0wAJOJuxGUlXBWxVKFVpWv88JEv0NZ6NlHknmDd1yCbf4AEdClSgLrqKQDXYywmw4gYDvdLsS6z0hcw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.14.tgz", - "integrity": "sha512-D2LImAIV3QzL7lHURyCHBkycVFbKwkDb1XEUWan+2fb4qfW7qAeUtul7ZIcIwFKZgPcl+6gKZmvLgPSj26RQ2Q==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.14.tgz", - "integrity": "sha512-kle2Ov6a1e5AjlHlMQl1e+c4myGTeggrRzArQFmWp6O6JoqqB9hT+B28EW4tjFWgV/NxUq46pWYpgaWXsXRPAg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-mips64le": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.14.tgz", - "integrity": "sha512-FVdMYIzOLXUq+OE7XYKesuEAqZhmAIV6qOoYahvUp93oXy0MOVTP370ECbPfGXXUdlvc0TNgkJa3YhEwyZ6MRA==", - "cpu": [ - "mips64el" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-ppc64le": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.14.tgz", - "integrity": "sha512-2NzH+iuzMDA+jjtPjuIz/OhRDf8tzbQ1tRZJI//aT25o1HKc0reMMXxKIYq/8nSHXiJSnYV4ODzTiv45s+h73w==", - "cpu": [ - "ppc64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-riscv64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.14.tgz", - "integrity": "sha512-VqxvutZNlQxmUNS7Ac+aczttLEoHBJ9e3OYGqnULrfipRvG97qLrAv9EUY9iSrRKBqeEbSvS9bSfstZqwz0T4Q==", - "cpu": [ - "riscv64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-s390x": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.14.tgz", - "integrity": "sha512-+KVHEUshX5n6VP6Vp/AKv9fZIl5kr2ph8EUFmQUJnDpHwcfTSn2AQgYYm0HTBR2Mr4d0Wlr0FxF/Cs5pbFgiOw==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-netbsd-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.14.tgz", - "integrity": "sha512-6D/dr17piEgevIm1xJfZP2SjB9Z+g8ERhNnBdlZPBWZl+KSPUKLGF13AbvC+nzGh8IxOH2TyTIdRMvKMP0nEzQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-openbsd-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.14.tgz", - "integrity": "sha512-rREQBIlMibBetgr2E9Lywt2Qxv2ZdpmYahR4IUlAQ1Efv/A5gYdO0/VIN3iowDbCNTLxp0bb57Vf0LFcffD6kA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-sunos-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.14.tgz", - "integrity": "sha512-DNVjSp/BY4IfwtdUAvWGIDaIjJXY5KI4uD82+15v6k/w7px9dnaDaJJ2R6Mu+KCgr5oklmFc0KjBjh311Gxl9Q==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-32": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.14.tgz", - "integrity": "sha512-pHBWrcA+/oLgvViuG9FO3kNPO635gkoVrRQwe6ZY1S0jdET07xe2toUvQoJQ8KT3/OkxqUasIty5hpuKFLD+eg==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.14.tgz", - "integrity": "sha512-CszIGQVk/P8FOS5UgAH4hKc9zOaFo69fe+k1rqgBHx3CSK3Opyk5lwYriIamaWOVjBt7IwEP6NALz+tkVWdFog==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-arm64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.14.tgz", - "integrity": "sha512-KW9W4psdZceaS9A7Jsgl4WialOznSURvqX/oHZk3gOP7KbjtHLSsnmSvNdzagGJfxbAe30UVGXRe8q8nDsOSQw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -6793,18 +6478,6 @@ } } }, - "@esbuild/android-arm": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.14.tgz", - "integrity": "sha512-+Rb20XXxRGisNu2WmNKk+scpanb7nL5yhuI1KR9wQFiC43ddPj/V1fmNyzlFC9bKiG4mYzxW7egtoHVcynr+OA==", - "optional": true - }, - "@esbuild/linux-loong64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.14.tgz", - "integrity": "sha512-eQi9rosGNVQFJyJWV0HCA5WZae/qWIQME7s8/j8DMvnylfBv62Pbu+zJ2eUDqNf2O4u3WB+OEXyfkpBoe194sg==", - "optional": true - }, "@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -8510,126 +8183,12 @@ "esbuild-windows-arm64": "0.15.14" } }, - "esbuild-android-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.14.tgz", - "integrity": "sha512-HuilVIb4rk9abT4U6bcFdU35UHOzcWVGLSjEmC58OVr96q5UiRqzDtWjPlCMugjhgUGKEs8Zf4ueIvYbOStbIg==", - "optional": true - }, - "esbuild-android-arm64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.14.tgz", - "integrity": "sha512-/QnxRVxsR2Vtf3XottAHj7hENAMW2wCs6S+OZcAbc/8nlhbAL/bCQRCVD78VtI5mdwqWkVi3wMqM94kScQCgqg==", - "optional": true - }, - "esbuild-darwin-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.14.tgz", - "integrity": "sha512-ToNuf1uifu8hhwWvoZJGCdLIX/1zpo8cOGnT0XAhDQXiKOKYaotVNx7pOVB1f+wHoWwTLInrOmh3EmA7Fd+8Vg==", - "optional": true - }, "esbuild-darwin-arm64": { "version": "0.15.14", "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.14.tgz", "integrity": "sha512-KgGP+y77GszfYJgceO0Wi/PiRtYo5y2Xo9rhBUpxTPaBgWDJ14gqYN0+NMbu+qC2fykxXaipHxN4Scaj9tUS1A==", "optional": true }, - "esbuild-freebsd-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.14.tgz", - "integrity": "sha512-xr0E2n5lyWw3uFSwwUXHc0EcaBDtsal/iIfLioflHdhAe10KSctV978Te7YsfnsMKzcoGeS366+tqbCXdqDHQA==", - "optional": true - }, - "esbuild-freebsd-arm64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.14.tgz", - "integrity": "sha512-8XH96sOQ4b1LhMlO10eEWOjEngmZ2oyw3pW4o8kvBcpF6pULr56eeYVP5radtgw54g3T8nKHDHYEI5AItvskZg==", - "optional": true - }, - "esbuild-linux-32": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.14.tgz", - "integrity": "sha512-6ssnvwaTAi8AzKN8By2V0nS+WF5jTP7SfuK6sStGnDP7MCJo/4zHgM9oE1eQTS2jPmo3D673rckuCzRlig+HMA==", - "optional": true - }, - "esbuild-linux-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.14.tgz", - "integrity": "sha512-ONySx3U0wAJOJuxGUlXBWxVKFVpWv88JEv0NZ6NlHknmDd1yCbf4AEdClSgLrqKQDXYywmw4gYDvdLsS6z0hcw==", - "optional": true - }, - "esbuild-linux-arm": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.14.tgz", - "integrity": "sha512-D2LImAIV3QzL7lHURyCHBkycVFbKwkDb1XEUWan+2fb4qfW7qAeUtul7ZIcIwFKZgPcl+6gKZmvLgPSj26RQ2Q==", - "optional": true - }, - "esbuild-linux-arm64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.14.tgz", - "integrity": "sha512-kle2Ov6a1e5AjlHlMQl1e+c4myGTeggrRzArQFmWp6O6JoqqB9hT+B28EW4tjFWgV/NxUq46pWYpgaWXsXRPAg==", - "optional": true - }, - "esbuild-linux-mips64le": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.14.tgz", - "integrity": "sha512-FVdMYIzOLXUq+OE7XYKesuEAqZhmAIV6qOoYahvUp93oXy0MOVTP370ECbPfGXXUdlvc0TNgkJa3YhEwyZ6MRA==", - "optional": true - }, - "esbuild-linux-ppc64le": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.14.tgz", - "integrity": "sha512-2NzH+iuzMDA+jjtPjuIz/OhRDf8tzbQ1tRZJI//aT25o1HKc0reMMXxKIYq/8nSHXiJSnYV4ODzTiv45s+h73w==", - "optional": true - }, - "esbuild-linux-riscv64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.14.tgz", - "integrity": "sha512-VqxvutZNlQxmUNS7Ac+aczttLEoHBJ9e3OYGqnULrfipRvG97qLrAv9EUY9iSrRKBqeEbSvS9bSfstZqwz0T4Q==", - "optional": true - }, - "esbuild-linux-s390x": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.14.tgz", - "integrity": "sha512-+KVHEUshX5n6VP6Vp/AKv9fZIl5kr2ph8EUFmQUJnDpHwcfTSn2AQgYYm0HTBR2Mr4d0Wlr0FxF/Cs5pbFgiOw==", - "optional": true - }, - "esbuild-netbsd-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.14.tgz", - "integrity": "sha512-6D/dr17piEgevIm1xJfZP2SjB9Z+g8ERhNnBdlZPBWZl+KSPUKLGF13AbvC+nzGh8IxOH2TyTIdRMvKMP0nEzQ==", - "optional": true - }, - "esbuild-openbsd-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.14.tgz", - "integrity": "sha512-rREQBIlMibBetgr2E9Lywt2Qxv2ZdpmYahR4IUlAQ1Efv/A5gYdO0/VIN3iowDbCNTLxp0bb57Vf0LFcffD6kA==", - "optional": true - }, - "esbuild-sunos-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.14.tgz", - "integrity": "sha512-DNVjSp/BY4IfwtdUAvWGIDaIjJXY5KI4uD82+15v6k/w7px9dnaDaJJ2R6Mu+KCgr5oklmFc0KjBjh311Gxl9Q==", - "optional": true - }, - "esbuild-windows-32": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.14.tgz", - "integrity": "sha512-pHBWrcA+/oLgvViuG9FO3kNPO635gkoVrRQwe6ZY1S0jdET07xe2toUvQoJQ8KT3/OkxqUasIty5hpuKFLD+eg==", - "optional": true - }, - "esbuild-windows-64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.14.tgz", - "integrity": "sha512-CszIGQVk/P8FOS5UgAH4hKc9zOaFo69fe+k1rqgBHx3CSK3Opyk5lwYriIamaWOVjBt7IwEP6NALz+tkVWdFog==", - "optional": true - }, - "esbuild-windows-arm64": { - "version": "0.15.14", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.14.tgz", - "integrity": "sha512-KW9W4psdZceaS9A7Jsgl4WialOznSURvqX/oHZk3gOP7KbjtHLSsnmSvNdzagGJfxbAe30UVGXRe8q8nDsOSQw==", - "optional": true - }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", diff --git a/review/src/ReviewConfig.elm b/review/src/ReviewConfig.elm index c77a024a..c4987c28 100644 --- a/review/src/ReviewConfig.elm +++ b/review/src/ReviewConfig.elm @@ -80,6 +80,7 @@ config = |> Rule.ignoreErrorsForFiles [ "src/Head/Seo.elm" , "src/DataSource/Glob.elm" -- incorrect result, + , "src/Pages/Internal/Platform/GeneratorApplication.elm" , "src/Pages/Internal/Platform/Effect.elm" , "src/Pages/Internal/Platform/Cli.elm" , "src/Pages/Internal/Platform.elm" diff --git a/src/Pages/Generator.elm b/src/Pages/Generator.elm index b3ea2482..769df0cb 100644 --- a/src/Pages/Generator.elm +++ b/src/Pages/Generator.elm @@ -1,16 +1,15 @@ module Pages.Generator exposing ( Generator(..) - , withCliOptions + , withCliOptions, withoutCliOptions , writeFile , log - , withoutCliOptions ) {-| @docs Generator -@docs simple, withCliOptions +@docs withCliOptions, withoutCliOptions ## File System Utilities @@ -34,6 +33,7 @@ import Json.Decode as Decode import Json.Encode as Encode +{-| -} type Generator = Generator ((Maybe { indent : Int, newLines : Bool } @@ -44,6 +44,7 @@ type Generator ) +{-| -} writeFile : { path : String, body : String } -> DataSource () writeFile { path, body } = DataSource.Internal.Request.request @@ -59,16 +60,18 @@ writeFile { path, body } = } +{-| -} log : String -> DataSource () -log message = +log _ = -- TODO implement an internal DataSource resolver for log DataSource.succeed () +{-| -} withoutCliOptions : DataSource () -> Generator withoutCliOptions execute = Generator - (\htmlToString -> + (\_ -> Program.config |> Program.add (OptionsParser.build ()) @@ -82,7 +85,7 @@ withoutCliOptions execute = withCliOptions : Program.Config cliOptions -> (cliOptions -> DataSource ()) -> Generator withCliOptions config execute = Generator - (\htmlToString -> + (\_ -> config |> Program.mapConfig execute ) diff --git a/src/Pages/Internal/Platform/GeneratorApplication.elm b/src/Pages/Internal/Platform/GeneratorApplication.elm index 9c95a6fa..90ad256e 100644 --- a/src/Pages/Internal/Platform/GeneratorApplication.elm +++ b/src/Pages/Internal/Platform/GeneratorApplication.elm @@ -1,11 +1,8 @@ -module Pages.Internal.Platform.GeneratorApplication exposing - ( Flags, Model, Msg(..), init, requestDecoder, update - , app - ) +module Pages.Internal.Platform.GeneratorApplication exposing (Flags, Model, Msg(..), init, requestDecoder, update, app) {-| Exposed for internal use only (used in generated code). -@docs Flags, Model, Msg, Program, cliApplication, init, requestDecoder, update +@docs Flags, Model, Msg, init, requestDecoder, update, app -} @@ -70,11 +67,11 @@ app config = Program.stateful { init = \flags cliOptions -> - init cliOptions config flags + init cliOptions flags |> Tuple.mapSecond (perform config) , update = \cliOptions msg model -> - update cliOptions config msg model + update cliOptions msg model |> Tuple.mapSecond (perform config) , subscriptions = \_ -> @@ -257,31 +254,28 @@ perform config effect = --flagsDecoder : -- Decode.Decoder -- { staticHttpCache : RequestsAndPending --- , isDevServer : Bool -- , compatibilityKey : Int -- } --flagsDecoder = -- Decode.map3 --- (\staticHttpCache isDevServer compatibilityKey -> +-- (\staticHttpCache compatibilityKey -> -- { staticHttpCache = staticHttpCache -- , isDevServer = isDevServer -- , compatibilityKey = compatibilityKey -- } -- ) -- (Decode.succeed Dict.empty) --- (Decode.field "mode" Decode.string |> Decode.map (\mode -> mode == "dev-server")) -- (Decode.field "compatibilityKey" Decode.int) {-| -} init : DataSource () - -> GeneratorProgramConfig -> FlagsIncludingArgv Flags -> ( Model, Effect ) -init execute config flags = +init execute flags = if flags.compatibilityKey == Pages.Internal.Platform.CompatibilityKey.currentCompatibilityKey then - initLegacy execute { staticHttpCache = Dict.empty, isDevServer = False } config + initLegacy execute { staticHttpCache = Dict.empty } else let @@ -300,7 +294,6 @@ init execute config flags = ) in updateAndSendPortIfDone execute - config { staticResponses = StaticResponses.empty , errors = [ { title = "Incompatible NPM and Elm package versions" @@ -316,10 +309,9 @@ init execute config flags = initLegacy : DataSource () - -> { staticHttpCache : RequestsAndPending, isDevServer : Bool } - -> GeneratorProgramConfig + -> { staticHttpCache : RequestsAndPending } -> ( Model, Effect ) -initLegacy execute { staticHttpCache, isDevServer } config = +initLegacy execute { staticHttpCache } = let staticResponses : StaticResponses staticResponses = @@ -335,30 +327,27 @@ initLegacy execute { staticHttpCache, isDevServer } config = in StaticResponses.nextStep initialModel Nothing |> nextStepToEffect execute - config initialModel updateAndSendPortIfDone : DataSource () - -> GeneratorProgramConfig -> Model -> ( Model, Effect ) -updateAndSendPortIfDone execute config model = +updateAndSendPortIfDone execute model = StaticResponses.nextStep model Nothing - |> nextStepToEffect execute config model + |> nextStepToEffect execute model {-| -} update : DataSource () - -> GeneratorProgramConfig -> Msg -> Model -> ( Model, Effect ) -update execute config msg model = +update execute msg model = case msg of GotDataBatch batch -> let @@ -370,7 +359,7 @@ update execute config msg model = StaticResponses.nextStep updatedModel Nothing - |> nextStepToEffect execute config updatedModel + |> nextStepToEffect execute updatedModel GotBuildError buildError -> let @@ -384,18 +373,17 @@ update execute config msg model = StaticResponses.nextStep updatedModel Nothing - |> nextStepToEffect execute config updatedModel + |> nextStepToEffect execute updatedModel nextStepToEffect : DataSource () - -> GeneratorProgramConfig -> Model -> ( StaticResponses, StaticResponses.NextStep route ) -> ( Model, Effect ) -nextStepToEffect execute config model ( updatedStaticResponsesModel, nextStep ) = +nextStepToEffect execute model ( updatedStaticResponsesModel, nextStep ) = case nextStep of - StaticResponses.Continue updatedAllRawResponses httpRequests maybeRoutes -> + StaticResponses.Continue updatedAllRawResponses httpRequests _ -> let updatedModel : Model updatedModel = @@ -406,7 +394,6 @@ nextStepToEffect execute config model ( updatedStaticResponsesModel, nextStep ) in if List.isEmpty httpRequests then nextStepToEffect execute - config updatedModel (StaticResponses.nextStep updatedModel