@flatjs/evolve 2.1.3 → 2.1.4

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.
@@ -1 +1 @@
1
- import{arrayUnique,chalk,logger,urlJoin}from"@flatjs/common";import{attachMockMiddlewares}from"@flatjs/mock";import{ignoreEntryOptionKeys,moduleName}from"../constants.js";import{createAppPageRoute,createDevServer,createDevServerCompilerTask,createDevServerEntries}from"../dev-server/index.js";import{flatEntryMap,openPage}from"../helpers/index.js";import{normalizePageProxy}from"../helpers/normalize-page-proxy.js";import{splitToEntryGroup}from"../helpers/split-to-entry-group.js";import{verifyGroupEntryOptions}from"../helpers/verify-group-entry-options.js";import{envVerify}from"./env-verify.js";export const prepareServe=async(e,r,o)=>{await envVerify(e,o);const t=splitToEntryGroup(r,o,ignoreEntryOptionKeys,!0);if(!t.length)return void logger.warn("No served entries provided!");const n=[],{app:i,devPort:a,devHostUri:p,publicIp:s}=await createDevServer(o),c=o.devServer?.mockOptions?.mockFilters||[];for(const[,e]of Object.entries(r))c.push(...e.options?.mockFilters||[]);await attachMockMiddlewares(i,{...o.devServer?.mockOptions,mockFilters:arrayUnique(c),projectCwd:e});let m=a;const l=[];for(const e of t){if(!verifyGroupEntryOptions(e,ignoreEntryOptionKeys,!0))throw new Error("The entry options in a group must be the same.");m++;const r=await createDevServerEntries(m,e,o);l.push(r)}const v=flatEntryMap(l);createAppPageRoute(e,i,p,v,o);const y=normalizePageProxy(o.devServer?.pageProxy||"/pages"),f=urlJoin(p,[y]);o.devServer?.autoOpen&&openPage(f);for(const e of l){const r=createDevServerCompilerTask(s,e,l,o);n.push(r)}return Promise.all(n).then((()=>(logger.info(`debug page ➩ ${chalk(["cyan"])(f)}`,moduleName),i)))};
1
+ import{arrayUnique,chalk,logger,urlJoin}from"@flatjs/common";import{attachMockMiddlewares}from"@flatjs/mock";import{ignoreEntryOptionKeys,moduleName}from"../constants.js";import{createAppPageRoute,createDevServer,createDevServerCompilerTask,createDevServerEntries}from"../dev-server/index.js";import{flatEntryMap,openPage}from"../helpers/index.js";import{normalizePageProxy}from"../helpers/normalize-page-proxy.js";import{splitToEntryGroup}from"../helpers/split-to-entry-group.js";import{verifyGroupEntryOptions}from"../helpers/verify-group-entry-options.js";import{envVerify}from"./env-verify.js";export const prepareServe=async(e,r,o)=>{await envVerify(e,o);const t=splitToEntryGroup(r,o,ignoreEntryOptionKeys,!0);if(!t.length)return void logger.warn("No served entries provided!");const n=[],{app:s,devPort:i,devHostUri:a,publicIp:p}=await createDevServer(o),c=o.devServer?.mockOptions?.mockFilters||[];for(const[,e]of Object.entries(r))c.push(...e.options?.mockFilters||[]);await attachMockMiddlewares(s,{...o.devServer?.mockOptions,mockFilters:arrayUnique(c),projectCwd:e});let l=i;const m=[];for(const e of t){if(!verifyGroupEntryOptions(e,ignoreEntryOptionKeys,!0))throw new Error("The entry options in a group must be the same.");l++;const r=await createDevServerEntries(l,e,o);m.push(r)}const v=flatEntryMap(m);createAppPageRoute(e,s,a,v,o);const d=normalizePageProxy(o.devServer?.pageProxy||"/pages"),f=urlJoin(a,[d]);o.devServer?.autoOpen&&openPage(f);for(const e of m){const r=createDevServerCompilerTask(p,e,m,o);n.push(r)}return Promise.all(n).then((()=>(logger.info(`debug page ➩ ${chalk(["cyan"])(f)}`,moduleName),process.stdin.resume(),process.stdin.setEncoding("utf8"),process.stdin.on("data",(e=>{const r=e.toString();12===r.charCodeAt(0)?console.clear():[102,70].includes(r.charCodeAt(0))&&logger.info(`debug page ➩ ${chalk(["cyan"])(f)}`,moduleName)})),s)))};
@@ -18,6 +18,7 @@ export type MultiHtmlCDNEntryItem = {
18
18
  title?: string;
19
19
  /**
20
20
  * The favicon url to use for the generated HTML document
21
+ * Should be an path of (32 x 32).png
21
22
  */
22
23
  favicon?: string;
23
24
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatjs/evolve",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -35,8 +35,7 @@
35
35
  </script>
36
36
  <% } %>
37
37
  <% if (favicon) { %>
38
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
38
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
40
39
  <% } %>
41
40
  <% if (headBeforeStyles) { %>
42
41
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
@@ -36,8 +36,7 @@
36
36
  </script>
37
37
  <% } %>
38
38
  <% if (favicon) { %>
39
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
40
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" type="image/png" sizes="32x32" href="<%= favicon %>" />
41
40
  <% } %>
42
41
  <% if (headBeforeStyles) { %>
43
42
  <% for (let index = 0; index < headBeforeStyles.length; index++) { %>