@quincarter/create-lit-app 1.1.2 → 1.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.
@@ -12,6 +12,6 @@ const child = spawn("bash", [scriptPath, ...process.argv.slice(2)], {
12
12
  stdio: "inherit",
13
13
  });
14
14
 
15
- child.on("exit", (code: number | null) => {
15
+ child.on("exit", (code) => {
16
16
  process.exit(code ?? 0);
17
17
  });
@@ -12,6 +12,6 @@ const child = spawn("bash", [scriptPath, ...process.argv.slice(2)], {
12
12
  stdio: "inherit",
13
13
  });
14
14
 
15
- child.on("exit", (code: number | null) => {
15
+ child.on("exit", (code) => {
16
16
  process.exit(code ?? 0);
17
17
  });
@@ -1607,7 +1607,6 @@ export const ViewMixin = <T extends Constructor<LitElement>>(superClass: T) => {
1607
1607
 
1608
1608
  connectedCallback(): void {
1609
1609
  super.connectedCallback();
1610
- this.featureIsEnabled = true;
1611
1610
  this.mfeLoader?.init();
1612
1611
  }
1613
1612
 
@@ -1799,7 +1798,14 @@ if [ "$ENABLE_CONTEXT" = true ]; then
1799
1798
  IMPORTS="$IMPORTS
1800
1799
  import { provide } from '@lit/context';
1801
1800
  import { AccessesContext } from './shared/contexts/accesses.context';
1802
- import { NavigationContext } from './shared/contexts/navigation.context';
1801
+ import { NavigationContext } from './shared/contexts/navigation.context';"
1802
+ fi
1803
+
1804
+ # MFE loader context is provided independently of ENABLE_CONTEXT so the
1805
+ # micro-frontend (MFE) utility works even when context features are off.
1806
+ if [ "$ENABLE_MFE_LOADER" = true ]; then
1807
+ IMPORTS="$IMPORTS
1808
+ import { provide } from '@lit/context';
1803
1809
  import { MfeLoaderContext } from './shared/contexts/mfe-loader.context';"
1804
1810
  fi
1805
1811
 
@@ -1841,13 +1847,16 @@ cat <<EOF >> src/app-shell.ts
1841
1847
  @property({ type: Array })
1842
1848
  accesses: string[] = ["public"];
1843
1849
  EOF
1844
- if [ "$ENABLE_MFE_LOADER" = true ]; then
1850
+ fi
1851
+
1852
+ # Provide the MFE loader independently of ENABLE_CONTEXT so that the MFE
1853
+ # utility initializes even when context features are disabled.
1854
+ if [ "$ENABLE_MFE_LOADER" = true ]; then
1845
1855
  cat <<EOF >> src/app-shell.ts
1846
1856
  @provide({ context: MfeLoaderContext })
1847
1857
  @state()
1848
1858
  mfeLoader = new MfeLoader(MFE_LOADER_CONFIG);
1849
1859
  EOF
1850
- fi
1851
1860
  fi
1852
1861
 
1853
1862
  if [ "$ENABLE_ROUTER" = true ]; then
@@ -1870,6 +1879,14 @@ cat <<EOF >> src/app-shell.ts
1870
1879
  EOF
1871
1880
  fi
1872
1881
 
1882
+ # Initialize the MFE loader at the shell level (independent of ENABLE_CONTEXT)
1883
+ # so micro-frontend bundles are injected regardless of context feature state.
1884
+ if [ "$ENABLE_MFE_LOADER" = true ]; then
1885
+ cat <<EOF >> src/app-shell.ts
1886
+ await this.mfeLoader?.init();
1887
+ EOF
1888
+ fi
1889
+
1873
1890
  cat <<EOF >> src/app-shell.ts
1874
1891
  }
1875
1892
  EOF
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quincarter/create-lit-app",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Interactive CLI initializer for Lit Element App Shell architecture",
5
5
  "type": "module",
6
6
  "bin": {