aiplang 2.11.5 → 2.11.6

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/bin/aiplang.js CHANGED
@@ -5,7 +5,7 @@ const fs = require('fs')
5
5
  const path = require('path')
6
6
  const http = require('http')
7
7
 
8
- const VERSION = '2.11.5'
8
+ const VERSION = '2.11.6'
9
9
  const RUNTIME_DIR = path.join(__dirname, '..', 'runtime')
10
10
  const cmd = process.argv[2]
11
11
  const args = process.argv.slice(3)
@@ -686,7 +686,7 @@ function generateTypes(app, srcFile) {
686
686
  }
687
687
 
688
688
  lines.push(`// ── aiplang version ──────────────────────────────────────────`)
689
- lines.push(`export const AIPLANG_VERSION = '2.11.5'`)
689
+ lines.push(`export const AIPLANG_VERSION = '2.11.6'`)
690
690
  lines.push(``)
691
691
  return lines.join('\n')
692
692
  }
@@ -1561,23 +1561,34 @@ function rStatsUpgraded(b) {
1561
1561
  return `<div class="fx-stats">${cells}</div>\n`
1562
1562
  }
1563
1563
 
1564
+
1565
+ // ── autoYear: substitui © YYYY por © <span data-fx-year></span> ──
1566
+ function autoYear(text) {
1567
+ // Substitui padrões como "© 2024", "© 2025", "© 2026" ou só "©" pelo ano dinâmico
1568
+ const replaced = esc(text).replace(/©\s*(\d{4})?/g, (_, yr) =>
1569
+ `© <span class="fx-year">${yr||new Date().getFullYear()}</span>`
1570
+ )
1571
+ return replaced
1572
+ }
1573
+
1564
1574
  function rFoot(b) {
1575
+ const _yearScript = `<script>document.querySelectorAll('.fx-year').forEach(function(el){el.textContent=new Date().getFullYear()})</script>`
1565
1576
  let brand='', links='', note=''
1566
1577
  let itemIdx = 0
1567
1578
  for(const item of (b.items||[])) for(const f of item){
1568
1579
  if(f.isLink) links+=`<a href="${esc(f.path)}" class="fx-footer-link">${esc(f.label)}</a>`
1569
1580
  else if(itemIdx===0) { brand=`<span class="fx-footer-brand">${esc(f.text)}</span>`; itemIdx++ }
1570
- else note=`<span class="fx-footer-note">${esc(f.text)}</span>`
1581
+ else note=`<span class="fx-footer-note">${autoYear(f.text)}</span>`
1571
1582
  }
1572
1583
  if(brand||links){
1573
- return `<footer class="fx-footer"><div class="fx-footer-inner">${brand}<div class="fx-footer-links">${links}</div>${note}</div></footer>
1584
+ return `<footer class="fx-footer"><div class="fx-footer-inner">${brand}<div class="fx-footer-links">${links}</div>${note}</div></footer>${_yearScript}
1574
1585
  `
1575
1586
  }
1576
1587
  // fallback centrado
1577
1588
  let inner=''
1578
1589
  for(const item of (b.items||[])) for(const f of item){
1579
1590
  if(f.isLink) inner+=`<a href="${esc(f.path)}" class="fx-footer-link">${esc(f.label)}</a>`
1580
- else inner+=`<p class="fx-footer-text">${esc(f.text)}</p>`
1591
+ else inner+=`<p class="fx-footer-text">${autoYear(f.text)}</p>`
1581
1592
  }
1582
1593
  return `<footer class="fx-footer">${inner}</footer>
1583
1594
  `
@@ -1746,6 +1757,7 @@ function css(theme) {
1746
1757
  .fx-footer-brand{font-size:1rem;font-weight:800;letter-spacing:-.02em}
1747
1758
  .fx-footer-links{display:flex;gap:1.5rem;flex-wrap:wrap}
1748
1759
  .fx-footer-note{font-size:.72rem;opacity:.3;font-family:monospace}
1760
+ .fx-year{font-variant-numeric:tabular-nums}
1749
1761
  .fx-hero-minimal{min-height:50vh!important}
1750
1762
  .fx-hero-minimal .fx-hero-inner{gap:1rem}
1751
1763
  .fx-hero-tall{min-height:98vh!important}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiplang",
3
- "version": "2.11.5",
3
+ "version": "2.11.6",
4
4
  "description": "AI-first web language. One .aip file = complete app. Frontend + backend + database + auth.",
5
5
  "keywords": [
6
6
  "aiplang",
package/server/server.js CHANGED
@@ -2432,7 +2432,7 @@ async function startServer(aipFile, port = 3000) {
2432
2432
  })
2433
2433
 
2434
2434
  srv.addRoute('GET', '/health', (req, res) => res.json(200, {
2435
- status:'ok', version:'2.11.5',
2435
+ status:'ok', version:'2.11.6',
2436
2436
  models: app.models.map(m=>m.name),
2437
2437
  routes: app.apis.length, pages: app.pages.length,
2438
2438
  admin: app.admin?.prefix || null,