Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nitunity/api-compiler

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nitunity/api-compiler - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

.env

85

modules/index.js

@@ -60,15 +60,8 @@ const request = require('./request')

.then((response) => {
let counter = 0
let interval = setInterval( () => {
if (counter >= response.length) {
clearInterval(interval)
counter = 0
return
}
let slug = response[counter]
let cnt = 1
let int = setInterval(() => {
request.categoryPosts(slug, cnt)
response.forEach((slug) => {
let counter = 1
let interval = setInterval(() => {
request.categoryPosts(slug, counter)
.then((res) => {
if (res.posts.current_page <= res.posts.last_page) {
if (res.posts.data.length > 0) {
params.category = res

@@ -79,4 +72,4 @@ params.posts = res.posts

.then(() => {
console.log('CategoryPosts is compiled')
cnt++
console.log('У Категорий компилировались посты')
counter++
})

@@ -87,4 +80,4 @@ .catch(e => {

} else {
clearInterval(int)
cnt = 1
clearInterval(interval)
counter = 1
}

@@ -95,6 +88,4 @@ })

})
}, 2000)
counter++
}, 4000)
})
})

@@ -119,3 +110,3 @@ .catch(e => {

.then(() => {
console.log(`Post-${slug} is compiled`)
console.log(`Пост ${slug} скомпилирован`)
})

@@ -131,3 +122,3 @@ .catch(e => {

counter++
}, 2000)
}, 1000)
})

@@ -143,3 +134,3 @@ .catch(e => {

.then(() => {
console.log('Tags compiled')
console.log('Страница тегов скомпилирован')
})

@@ -156,30 +147,24 @@ .catch(e => {

.then((response) => {
let counter = 0
let interval = setInterval(async () => {
if (counter >= response.length) {
clearInterval(interval)
return
}
let slug = response[counter]
let cnt = 1;
request.tagPosts(slug, cnt)
.then((res) => {
params.tag = res
params.posts = res.posts
params.paginator = new paginator(res.posts, process.env.APP_URL + '/tags')
engine.tagPosts(config, params, slug, counter)
.then(() => {
console.log('TagPosts is compiled')
cnt++
})
.catch(e => {
console.log(e.message)
})
})
.catch(e => {
console.log(e.message)
})
counter++
}, 2000)
response.forEach((slug) => {
let counter = 1;
request.tagPosts(slug, counter)
.then((res) => {
if (res.posts.data.length > 0) {
params.tag = res
params.posts = res.posts
params.paginator = new paginator(res.posts, process.env.APP_URL + '/tags')
engine.tagPosts(config, params, slug, counter)
.then(() => {
console.log('У Тегов посты скомпилированы')
counter++
})
.catch(e => {
console.log(e.message)
})
}
})
.catch(e => {
console.log(e.message)
})
})
})

@@ -186,0 +171,0 @@ .catch(e => {

{
"name": "@nitunity/api-compiler",
"version": "0.2.3",
"version": "0.2.4",
"description": "This package is API for compiling HTML templates using Nunjucks template engine",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc