
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@zesty-io/fetch-page
Advanced tools
Fetches relative URL based JSON from a Zesty.io content instance
NPM Javascript package for fetching JSON data of a Zesty.io CMS page
Install from NPM or Yarn
npm install @zesty-io/fetch-page
Fetch page requires on the url of the page you're fetching data for and an env value with Zesty Config JSON object. Having access to the URL from window.location.pathname
or your routing middle ware is neccesary to feed the function.
Zesty config value in your ENV are a requirement. An Example of the Zesty.io JSON object is below, you may also copy the JSON file from the examples
folder. This value must be stringfied when it is saved.
{
"instance_zuid": "8-xyzxyz-7xyzxy",
"stage": "https://xyz-dev.webengine.zesty.io",
"production": "https://www.myproductiondomain.com",
"stage_password": "",
"auth": "",
"src_dir": "",
"options": {
"skip_config_overwrite": false,
"model_ignore_list": ["6-xyz"]
},
"runinstaller": true
}
Import fetchPage into your App.js
import React from 'react';
import { fetchPage } from '@zesty-io/fetch-page';
In your App.js function, use setState and useEffect hooks to access the data
import './App.css';
import React from 'react';
import { fetchPage } from '@zesty-io/fetch-page';
function App() {
const [content, setContent] = React.useState({ title: 'missing'});
React.useEffect(() => {
// declare the data fetching function
const fetchData = async () => {
setContent(await fetchPage(window.location.pathname));
}
// call the function
fetchData();
}, [])
return (
<div className="App">
{content?.title && <h1>{content.title}</h1>}
</div>
);
}
export default App;
FAQs
Fetches relative URL based JSON from a Zesty.io content instance
We found that @zesty-io/fetch-page demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.