elm-pages 3.0.7 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generator/dead-code-review/elm-stuff/tests-0.19.1/elm-stuff/0.19.1/d.dat +0 -0
- package/generator/dead-code-review/elm-stuff/tests-0.19.1/js/node_runner.js +1 -1
- package/generator/dead-code-review/elm-stuff/tests-0.19.1/js/node_supervisor.js +1 -1
- package/generator/review/elm-stuff/tests-0.19.1/elm-stuff/0.19.1/d.dat +0 -0
- package/generator/review/elm-stuff/tests-0.19.1/js/node_runner.js +1 -1
- package/generator/review/elm-stuff/tests-0.19.1/js/node_supervisor.js +1 -1
- package/generator/src/build.js +1 -1
- package/generator/src/compatibility-key.js +1 -1
- package/generator/src/dev-server.js +1 -1
- package/generator/src/generate-template-module-connector.js +2 -2
- package/generator/src/vite-utils.js +1 -1
- package/generator/static-code/elm-pages.js +1 -1
- package/package.json +1 -1
- package/src/Pages/Internal/Platform.elm +17 -8
|
Binary file
|
|
@@ -75,7 +75,7 @@ console.elmlog = (str) => logs.push(str + "\n");
|
|
|
75
75
|
const { Elm } = require("./Runner.elm.js");
|
|
76
76
|
|
|
77
77
|
// Start the Elm app
|
|
78
|
-
const flags = { initialSeed:
|
|
78
|
+
const flags = { initialSeed: 2473597562, fuzzRuns: 100, filter: null };
|
|
79
79
|
const app = Elm.Runner.init({ flags: flags });
|
|
80
80
|
|
|
81
81
|
// Record the timing at which we received the last "runTest" message
|
|
Binary file
|
|
@@ -75,7 +75,7 @@ console.elmlog = (str) => logs.push(str + "\n");
|
|
|
75
75
|
const { Elm } = require("./Runner.elm.js");
|
|
76
76
|
|
|
77
77
|
// Start the Elm app
|
|
78
|
-
const flags = { initialSeed:
|
|
78
|
+
const flags = { initialSeed: 4202591380, fuzzRuns: 100, filter: null };
|
|
79
79
|
const app = Elm.Runner.init({ flags: flags });
|
|
80
80
|
|
|
81
81
|
// Record the timing at which we received the last "runTest" message
|
package/generator/src/build.js
CHANGED
|
@@ -73,7 +73,7 @@ export async function run(options) {
|
|
|
73
73
|
// This is a temporary hack to avoid this warning. elm-pages manages compiling the Elm code without Vite's involvement, so it is external to Vite.
|
|
74
74
|
// There is a pending issue to allow having external scripts in Vite, once this issue is fixed we can remove this hack:
|
|
75
75
|
// https://github.com/vitejs/vite/issues/3533
|
|
76
|
-
if (!messages[0]
|
|
76
|
+
if (messages && messages[0] && !messages[0].startsWith(`<script src="/elm.js">`)) {
|
|
77
77
|
console.info(...messages);
|
|
78
78
|
}
|
|
79
79
|
};
|
|
@@ -37,7 +37,7 @@ const __dirname = path.dirname(__filename);
|
|
|
37
37
|
*/
|
|
38
38
|
export async function start(options) {
|
|
39
39
|
console.error = function (...messages) {
|
|
40
|
-
if (!messages[0]
|
|
40
|
+
if (messages && messages[0] && !messages[0].startsWith("Failed to load url")) {
|
|
41
41
|
console.info(...messages);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
@@ -3,7 +3,7 @@ import * as path from "path";
|
|
|
3
3
|
import { default as mm } from "micromatch";
|
|
4
4
|
import * as routeHelpers from "./route-codegen-helpers.js";
|
|
5
5
|
import { restoreColorSafe } from "./error-formatter.js";
|
|
6
|
-
import { fileURLToPath } from "url";
|
|
6
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @param {string} basePath
|
|
@@ -66,7 +66,7 @@ export async function generateTemplateModuleConnector(basePath, phase) {
|
|
|
66
66
|
async function runElmCodegenCli(templates, basePath, phase) {
|
|
67
67
|
const __filename = fileURLToPath(import.meta.url);
|
|
68
68
|
const __dirname = path.dirname(__filename);
|
|
69
|
-
const filePath = path.join(__dirname, `../../codegen/elm-pages-codegen.cjs`);
|
|
69
|
+
const filePath = pathToFileURL(path.join(__dirname, `../../codegen/elm-pages-codegen.cjs`)).href;
|
|
70
70
|
|
|
71
71
|
const promise = new Promise(async (resolve, reject) => {
|
|
72
72
|
const elmPagesCodegen = (await import(filePath)).default.Elm.Generate;
|
|
@@ -106,7 +106,7 @@ function find_anchor(node) {
|
|
|
106
106
|
Object.defineProperty(SubmitEvent.prototype, "fields", {
|
|
107
107
|
get: function fields() {
|
|
108
108
|
let formData = new FormData(this.currentTarget);
|
|
109
|
-
if (this.submitter
|
|
109
|
+
if (this.submitter && this.submitter.name) {
|
|
110
110
|
formData.append(this.submitter.name, this.submitter.value);
|
|
111
111
|
}
|
|
112
112
|
return [...formData.entries()];
|
package/package.json
CHANGED
|
@@ -392,7 +392,7 @@ update config appMsg model =
|
|
|
392
392
|
let
|
|
393
393
|
navigatingToSamePage : Bool
|
|
394
394
|
navigatingToSamePage =
|
|
395
|
-
url.path == model.url.path
|
|
395
|
+
url.path == model.url.path && url.query == model.url.query && url.fragment /= Nothing
|
|
396
396
|
in
|
|
397
397
|
if navigatingToSamePage then
|
|
398
398
|
-- this is a workaround for an issue with anchor fragment navigation
|
|
@@ -403,7 +403,7 @@ update config appMsg model =
|
|
|
403
403
|
|
|
404
404
|
else
|
|
405
405
|
( model
|
|
406
|
-
, BrowserPushUrl url
|
|
406
|
+
, BrowserPushUrl (Url.toString url)
|
|
407
407
|
)
|
|
408
408
|
|
|
409
409
|
Browser.External href ->
|
|
@@ -425,12 +425,21 @@ update config appMsg model =
|
|
|
425
425
|
|
|
426
426
|
Nothing ->
|
|
427
427
|
if model.url.path == url.path && model.url.query == url.query then
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
428
|
+
if url.fragment == Nothing then
|
|
429
|
+
( { model
|
|
430
|
+
| -- update the URL in case query params or fragment changed
|
|
431
|
+
url = url
|
|
432
|
+
}
|
|
433
|
+
, ScrollToTop
|
|
434
|
+
)
|
|
435
|
+
|
|
436
|
+
else
|
|
437
|
+
( { model
|
|
438
|
+
| -- update the URL in case query params or fragment changed
|
|
439
|
+
url = url
|
|
440
|
+
}
|
|
441
|
+
, NoEffect
|
|
442
|
+
)
|
|
434
443
|
|
|
435
444
|
else
|
|
436
445
|
( model
|