@ape-egg/vibe-compiler 4.3.0 → 4.3.2

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.
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ape-egg/vibe-compiler",
3
- "version": "4.3.0",
3
+ "version": "4.3.2",
4
4
  "type": "module",
5
5
  "description": "Optional Rust compiler for Vibe \u2014 pre-renders, inlines components, and optimizes iterations. The runtime never needs it.",
6
6
  "homepage": "https://vibe.korte.kim",
package/src/Cargo.lock CHANGED
@@ -1599,7 +1599,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
1599
1599
 
1600
1600
  [[package]]
1601
1601
  name = "vibe-compiler"
1602
- version = "4.3.0"
1602
+ version = "4.3.2"
1603
1603
  dependencies = [
1604
1604
  "clap",
1605
1605
  "colored",
package/src/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "vibe-compiler"
3
- version = "4.3.0"
3
+ version = "4.3.2"
4
4
  edition = "2021"
5
5
  description = "Vibe framework compiler - compiles Vibe source files into optimized output"
6
6
  authors = ["Kim Korte"]
@@ -9,7 +9,7 @@
9
9
  // filter over pages, not a rework.
10
10
 
11
11
  use regex::Regex;
12
- use crate::constants::{SPA_FRAGMENTS_DIR, FOUC_ATTR};
12
+ use crate::constants::{SPA_FRAGMENTS_DIR, FOUC_ATTR, HYPERSPEED_DIR, MANIFEST_SUFFIX};
13
13
 
14
14
  /// One page of the pages tree, dissected for SPA output.
15
15
  pub struct SpaPage {
@@ -507,6 +507,10 @@ pub fn compose_shell(
507
507
  html.push_str(line);
508
508
  html.push('\n');
509
509
  }
510
+ html.push_str(&format!(
511
+ "\n <script>window.__MANIFEST__ = \"/{}/index.html{}\";</script>\n",
512
+ HYPERSPEED_DIR, MANIFEST_SUFFIX
513
+ ));
510
514
  html.push_str("\n <script type=\"module\">\n");
511
515
  html.push_str(&format!(" import vibe from \"{}\";\n", vibe_spec));
512
516
  html.push_str(&format!(
@@ -594,6 +598,17 @@ mod tests {
594
598
  );
595
599
  }
596
600
 
601
+ #[test]
602
+ fn shell_names_its_own_manifest_before_vibe_boots() {
603
+ let pages = vec![page("/"), page("/about")];
604
+ let order = route_order(&pages);
605
+ let shell = compose_shell(&pages, &order, None).html;
606
+ let hint = shell
607
+ .find("<script>window.__MANIFEST__ = \"/vibe-hyperspeed/index.html.manifest.js\";</script>")
608
+ .expect("shell hints its manifest");
609
+ assert!(hint < shell.find("<script type=\"module\">").unwrap());
610
+ }
611
+
597
612
  #[test]
598
613
  fn harvests_and_derives_shell_imports() {
599
614
  assert_eq!(