@shipstatic/ship 3.4.0-beta.15 → 3.4.0-beta.17
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/SKILL.md +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.cjs.map +1 -1
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -116,7 +116,7 @@ Visitors get an unlock page until they enter the password. Length: 6–128 chara
|
|
|
116
116
|
|
|
117
117
|
### Client-side routing
|
|
118
118
|
|
|
119
|
-
A deployment whose only page is `index.html` serves it for every missing path, so a React, Vue, Svelte or Angular build works on its routes with nothing to configure. An app that ships other HTML files beside its shell declares the route itself: a `ship.json` rewrite from `/(.*)` to `/index.html`, the one the ship.json docs show. Your own rewrites run ahead of either. A root `404.html` of your own turns the automatic route off and is served for a missing path your rewrites do not claim. Every deployment states
|
|
119
|
+
A deployment whose only page is `index.html` serves it for every missing path, so a React, Vue, Svelte or Angular build works on its routes with nothing to configure. An app that ships other HTML files beside its shell declares the route itself: a `ship.json` rewrite from `/(.*)` to `/index.html`, the one the ship.json docs show. One exception needs nothing: a React Router build that prerenders with `ssr: false` leaves its shell at `__spa-fallback.html`, and that file is served for every missing path (do not add a rewrite to `/index.html` there; it would serve the prerendered home page). Your own rewrites run ahead of either. A root `404.html` of your own turns the automatic route off and is served for a missing path your rewrites do not claim. Every deployment states its default as `fallback`: the page declared for a missing path, or `null` when none is declared, so check it on the deploy response and add the rewrite when an app reads `null`.
|
|
120
120
|
|
|
121
121
|
## Authentication
|
|
122
122
|
|
package/dist/cli.cjs
CHANGED
|
@@ -150,7 +150,7 @@ ${t.join(`
|
|
|
150
150
|
`);else{let o=q(i=>on(rr(i)),`${q(be,"[",r)}info${q(be,"]",r)}`,r),n=q(rr,mt(e),r);console.log(`${o} ${n}
|
|
151
151
|
`)}};function ht(e,t,r){if(t&&typeof e!="string"){console.error(`${JSON.stringify(e.toResponse(),null,2)}
|
|
152
152
|
`);return}let o=q(a=>on(tr(a)),`${q(be,"[",r)}error${q(be,"]",r)}`,r),n=typeof e=="string"?e:e.message,i=q(tr,mt(n),r);console.error(`${o} ${i}
|
|
153
|
-
`)}var j_=(e,t="details",r)=>{if(e==null||e===0)return"-";let o=new Date(e*1e3).toISOString().replace(/\.\d{3}Z$/,"Z");return t==="table"?o.replace(/T/,q(be,"T",r)).replace(/Z$/,q(be,"Z",r)):o},Vo=(e,t,r="details",o)=>{if(e==="fallback"&&t===null)return"
|
|
153
|
+
`)}var j_=(e,t="details",r)=>{if(e==null||e===0)return"-";let o=new Date(e*1e3).toISOString().replace(/\.\d{3}Z$/,"Z");return t==="table"?o.replace(/T/,q(be,"T",r)).replace(/Z$/,q(be,"Z",r)):o},Vo=(e,t,r="details",o)=>{if(e==="fallback"&&t===null)return"none";if(t===null||Array.isArray(t)&&t.length===0)return"-";if(typeof t=="number"&&P_.includes(e))return j_(t,r,o);if(e==="size"&&typeof t=="number")return Ye(t);if(e==="config"||e==="password"){if(typeof t=="boolean")return t?"yes":"no";if(typeof t=="number")return t===1?"yes":"no"}if(A_(t)){let n=Object.entries(t);return n.length===0?"-":n.map(([i,a])=>`${i}=${Vo(i,a,r,o)}`).join(", ")}return String(t)},ln=(e,t,r,o)=>{if(!e||e.length===0)return"";let n=e[0],i=t||Object.keys(n).filter(c=>n[c]!==void 0&&!pp.includes(c)),a=e.map(c=>{let u=c,l={};return i.forEach(f=>{f in u&&u[f]!==void 0&&(l[f]=Vo(f,u[f],"table",r))}),l});return`${(0,Mo.default)(a,{columnSplitter:" ",columns:i,config:i.reduce((c,u)=>(c[u]={headingTransform:l=>q(Re,o?.[l]||l,r)},c),{})}).split(`
|
|
154
154
|
`).map(c=>c.replace(/\s+$/,"")).join(`
|
|
155
155
|
`)}
|
|
156
156
|
`},Le=(e,t)=>{let r=Object.entries(e).filter(([i,a])=>pp.includes(i)?!1:a!==void 0);if(r.length===0)return"";let o=r.map(([i,a])=>({property:`${i}:`,value:Vo(i,a,"details",t)}));return`${(0,Mo.default)(o,{columnSplitter:" ",showHeaders:!1,config:{property:{dataTransform:i=>q(Re,i,t)}}})}
|