@cocreate/docs
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -0,1 +1,9 @@ | ||
## [1.0.5](https://github.com/CoCreate-app/CoCreate-docs/compare/v1.0.4...v1.0.5) (2021-01-18) | ||
### Bug Fixes | ||
* (replace json config with js) ([7fb3c83](https://github.com/CoCreate-app/CoCreate-docs/commit/7fb3c8350e4f9b45835b6c444c588ba3708e6579)) | ||
* (replace json config with js) ([1201389](https://github.com/CoCreate-app/CoCreate-docs/commit/12013892505c3c26c2cb12509d5bd85c45be4f5b)) | ||
## [1.0.4](https://github.com/CoCreate-app/CoCreate-docs/compare/v1.0.3...v1.0.4) (2021-01-16) | ||
@@ -2,0 +10,0 @@ |
{ | ||
"name": "@cocreate/docs", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Documentation generator ", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
const CoCreateExtract = require('./extract') | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const { directory, ignores, extensions, socket, sources} = require(path.resolve(process.cwd(), 'CoCreate.config.json')); | ||
const {CoCreateSocketInit, CoCreateUpdateDocument, CoCreateCreateDocument } = require("./socket_process.js") | ||
let config; | ||
let jsConfig = path.resolve(process.cwd(), 'CoCreate.config.js'); | ||
let jsonConfig = path.resolve(process.cwd(), 'CoCreate.config.json') | ||
if (fs.exists(jsConfig)) | ||
config = require(jsConfig); | ||
else | ||
config = require(jsonConfig); | ||
const { directory, ignores, extensions, socket, sources } = config; | ||
const { CoCreateSocketInit, CoCreateUpdateDocument, CoCreateCreateDocument } = require("./socket_process.js") | ||
/** | ||
@@ -25,4 +37,5 @@ * Socket init | ||
if (!doc.document_id) { | ||
CoCreateCreateDocument(doc, socket.config); | ||
} else { | ||
CoCreateCreateDocument(doc, socket.config); | ||
} | ||
else { | ||
CoCreateUpdateDocument(doc, socket.config); | ||
@@ -36,3 +49,3 @@ } | ||
*/ | ||
sources.forEach(({path, collection, document_id, name, category, ...rest}) => { | ||
sources.forEach(({ path, collection, document_id, name, category, ...rest }) => { | ||
let content = fs.readFileSync(path, 'utf8'); | ||
@@ -52,2 +65,1 @@ if (content) { | ||
}) | ||
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
58723
1187
4