
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@makemogic/runtime
Advanced tools
用于构建 Mogic 平台交互式应用的运行时库。
import { mogicRuntime } from '@makemogic/runtime'
创建可在父应用中实时调整的可配置参数。
import remixConfig from './remix.json'
const tweaks = mogicRuntime.tweaks(remixConfig)
// 在 React 组件中使用
function App() {
const bgColor = tweaks.bg.useState()
const speed = tweaks.speed.useState()
return <div style={{ backgroundColor: bgColor }}>Speed: {speed}</div>
}
// 编程式更新
mogicRuntime.updateTweaks({ bg: '#00FF00', speed: 5 })
支持类型: text, slider, toggle, color, select, theme, image/video/audio
注意: 每个应用仅调用一次 tweaks()。
const response = await mogicRuntime.generateText({
prompt: 'Write a short story'
})
console.log(response.text)
选项: prompt (必填)
const response = await mogicRuntime.generateImage({
prompt: 'A beautiful sunset',
aspectRatio: '16:9',
referenceImages: ['https://example.com/image1.jpg']
})
const img = document.createElement('img')
img.src = response.img?.url ?? ''
document.body.appendChild(img)
选项: prompt (必填), aspectRatio, referenceImages
const file = fileInput.files[0]
const response = await mogicRuntime.uploadFile(file)
console.log(response.url)
mogicRuntime.performHaptic('medium')
震动强度: 'light', 'medium', 'heavy', 'rigid', 'soft'
const unsubscribe = mogicRuntime.addMotionListener((motion) => {
console.log(motion)
})
const removeShake = mogicRuntime.addShakeListener(() => {
console.log('Shaken!')
})
// 清理监听
unsubscribe()
removeShake()
mogicRuntime.destroy()
FAQs
Mogic Runtime Libra
We found that @makemogic/runtime demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.