5htp-core 0.6.1-4 → 0.6.1-5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "5htp-core",
3
3
  "description": "Convenient TypeScript framework designed for Performance and Productivity.",
4
- "version": "0.6.1-4",
4
+ "version": "0.6.1-5",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/5htp-core.git",
7
7
  "license": "MIT",
@@ -222,24 +222,23 @@ export default class ServerRouter
222
222
  ----------------------------------*/
223
223
 
224
224
  public async renderStatic(
225
- path: string,
225
+ url: string,
226
226
  options: TRouteOptions["static"],
227
227
  rendered?: any
228
228
  ) {
229
229
 
230
230
  // Wildcard: tell that the newly rendered pages should be cached
231
- if (path === '*' || !path)
231
+ if (url === '*' || !url)
232
232
  return;
233
233
 
234
234
  if (!rendered) {
235
235
 
236
- const fullUrl = this.url(path + '#bypassCache', {}, true);
237
- console.log('[router] renderStatic', fullUrl);
238
-
236
+ const fullUrl = this.url(url, {}, true);
239
237
  const response = await got( fullUrl, {
240
238
  method: 'GET',
241
239
  headers: {
242
- 'Accept': 'text/html'
240
+ 'Accept': 'text/html',
241
+ 'bypasscache': '1'
243
242
  },
244
243
  throwHttpErrors: false,
245
244
  });
@@ -252,7 +251,7 @@ export default class ServerRouter
252
251
  rendered = response.body;
253
252
  }
254
253
 
255
- this.cache[path] = {
254
+ this.cache[url] = {
256
255
  rendered: rendered,
257
256
  options: options,
258
257
  expire: typeof options === 'object'
@@ -501,7 +500,7 @@ export default class ServerRouter
501
500
 
502
501
  // Create request
503
502
  let requestId = uuid();
504
- const cachedPage = req.url.endsWith('#bypassCache')
503
+ const cachedPage = req.headers['bypasscache']
505
504
  ? undefined
506
505
  : this.cache[req.path];
507
506
 
package/types/icons.d.ts CHANGED
@@ -1 +1 @@
1
- export type TIcones = "solid/spinner-third"|"long-arrow-right"|"times-circle"|"brands/whatsapp"|"times"|"search"|"user"|"rocket"|"globe"|"bullhorn"|"briefcase"|"chart-line"|"handshake"|"ellipsis-h"|"brands/google"|"brands/reddit-alien"|"brands/linkedin-in"|"brands/github"|"robot"|"comments"|"user-friends"|"angle-down"|"mouse-pointer"|"thumbs-up"|"dollar-sign"|"info-circle"|"check-circle"|"exclamation-circle"|"heart"|"lock"|"eye"|"credit-card"|"at"|"brands/linkedin"|"key"|"chart-bar"|"power-off"|"bars"|"font"|"tag"|"compress"|"bolt"|"puzzle-piece"|"planet-ringed"|"exclamation"|"solid/download"|"seedling"|"palette"|"car"|"plane"|"university"|"hard-hat"|"graduation-cap"|"cogs"|"film"|"leaf"|"tshirt"|"utensils"|"map-marked-alt"|"dumbbell"|"stethoscope"|"concierge-bell"|"book"|"shield-alt"|"gavel"|"industry"|"square-root-alt"|"newspaper"|"pills"|"medal"|"capsules"|"balance-scale"|"home"|"praying-hands"|"shopping-cart"|"flask"|"futbol"|"microchip"|"satellite-dish"|"shipping-fast"|"passport"|"tools"|"database"|"solid/fire"|"usd-circle"|"lightbulb"|"solid/dollar-sign"|"download"|"code"|"solid/clock"|"user-circle"|"plus-circle"|"brands/twitter"|"brands/facebook"|"comment-alt"|"paper-plane"|"check"|"long-arrow-left"|"angle-left"|"angle-right"|"trash"|"meh-rolling-eyes"|"arrow-left"|"arrow-right"|"bold"|"italic"|"underline"|"link"|"strikethrough"|"subscript"|"superscript"|"empty-set"|"horizontal-rule"|"page-break"|"image"|"table"|"poll"|"columns"|"sticky-note"|"caret-right"|"unlink"|"pen"|"file"|"plus"|"list-ul"|"check-square"|"h1"|"h2"|"h3"|"h4"|"list-ol"|"paragraph"|"quote-left"|"align-left"|"align-center"|"align-right"|"align-justify"|"indent"|"outdent"
1
+ export type TIcones = "solid/spinner-third"|"long-arrow-right"|"times-circle"|"brands/whatsapp"|"times"|"search"|"user"|"rocket"|"globe"|"bullhorn"|"briefcase"|"chart-line"|"handshake"|"ellipsis-h"|"brands/google"|"brands/reddit-alien"|"brands/linkedin-in"|"brands/github"|"robot"|"comments"|"user-friends"|"mouse-pointer"|"thumbs-up"|"dollar-sign"|"angle-down"|"info-circle"|"check-circle"|"exclamation-circle"|"bars"|"font"|"tag"|"compress"|"bolt"|"puzzle-piece"|"planet-ringed"|"chart-bar"|"power-off"|"heart"|"lock"|"eye"|"credit-card"|"at"|"brands/linkedin"|"key"|"exclamation"|"solid/download"|"seedling"|"palette"|"car"|"plane"|"university"|"hard-hat"|"graduation-cap"|"cogs"|"film"|"leaf"|"tshirt"|"utensils"|"map-marked-alt"|"dumbbell"|"stethoscope"|"concierge-bell"|"book"|"shield-alt"|"gavel"|"industry"|"square-root-alt"|"newspaper"|"pills"|"medal"|"capsules"|"balance-scale"|"home"|"praying-hands"|"shopping-cart"|"flask"|"futbol"|"microchip"|"satellite-dish"|"shipping-fast"|"passport"|"tools"|"database"|"solid/fire"|"usd-circle"|"lightbulb"|"solid/dollar-sign"|"download"|"code"|"solid/clock"|"user-circle"|"plus-circle"|"brands/twitter"|"brands/facebook"|"comment-alt"|"angle-left"|"angle-right"|"check"|"paper-plane"|"long-arrow-left"|"trash"|"meh-rolling-eyes"|"arrow-left"|"arrow-right"|"unlink"|"pen"|"link"|"file"|"bold"|"italic"|"underline"|"strikethrough"|"subscript"|"superscript"|"empty-set"|"horizontal-rule"|"page-break"|"image"|"table"|"poll"|"columns"|"sticky-note"|"caret-right"|"plus"|"list-ul"|"check-square"|"h1"|"h2"|"h3"|"h4"|"list-ol"|"paragraph"|"quote-left"|"align-left"|"align-center"|"align-right"|"align-justify"|"indent"|"outdent"