Files
smart-city-digital-twin-mar…/smart-app-city/frontend/node_modules/image-size/bin/image-size.js
Eric FELIXINE e30ae8ed09 feat(smart-app): implement complete mobile app MVP
- App.tsx: full navigation (Auth stack + Main tabs with 5 screens)
- Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen
- HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors
- MapScreen: interactive map with layer toggles (6 layers)
- MarketplaceScreen: categories (6), products (5), search
- ChatScreen: AI chat with quick prompts (4), bot responses
- ProfileScreen: user info, stats, menu (9 items), logout
- AlertsScreen: alert list with severity, acknowledge
- SensorsScreen: sensor list with type filters (6 types), search
- ZonesScreen: zone cards with stats
- SettingsScreen: language picker (FR/EN/ES/DE), privacy, about
- Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n
- Hooks: useSensors, useAlerts, useNotifications, useLocation
- Components: Card, Button, LoadingSpinner, ErrorBoundary, Header
- Services: iotService, notificationService (with axios API client)
- Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN)
- Theme: colors.ts with full design system (Blue Ocean palette)
- Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
2026-06-01 18:00:35 -04:00

54 lines
1.3 KiB
JavaScript
Executable File

#!/usr/bin/env node
/* eslint-disable @typescript-eslint/no-var-requires */
'use strict'
const fs = require('fs')
const path = require('path')
const { imageSize } = require('..')
const files = process.argv.slice(2)
if (!files.length) {
console.error('Usage: image-size image1 [image2] [image3] ...')
process.exit(-1)
}
const red = ['\x1B[31m', '\x1B[39m']
// const bold = ['\x1B[1m', '\x1B[22m']
const grey = ['\x1B[90m', '\x1B[39m']
const green = ['\x1B[32m', '\x1B[39m']
function colorize(text, color) {
return color[0] + text + color[1]
}
files.forEach(function (image) {
try {
if (fs.existsSync(path.resolve(image))) {
const greyX = colorize('x', grey)
const greyImage = colorize(image, grey)
const size = imageSize(image)
const sizes = size.images || [size]
sizes.forEach((size) => {
let greyType = ''
if (size.type) {
greyType = colorize(' (' + size.type + ')', grey)
}
console.info(
colorize(size.width, green) +
greyX +
colorize(size.height, green) +
' - ' +
greyImage +
greyType,
)
})
} else {
console.error("file doesn't exist - ", image)
}
} catch (e) {
// console.error(e.stack)
console.error(colorize(e.message, red), '-', image)
}
})