Socket
Socket
Sign inDemoInstall

apidoc

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apidoc - npm Package Compare versions

Comparing version 0.13.1 to 0.13.2

14

CHANGELOG.md
# apiDoc Changelog
#### 0.13.2
* Parser
* Remove p-Tags from type-Field.
* Update dependencies.
* Update fixtures (type-Fields and line endings).
#### 0.13.1
* Template
* Update French and Russian translation files.
#### 0.13.0

@@ -5,0 +19,0 @@

8

lib/index.js

@@ -154,7 +154,7 @@ var _ = require('lodash');

if( ! app.options.simulate)
fs.writeFileSync(app.options.dest + './api_data.json', api.data);
fs.writeFileSync(app.options.dest + './api_data.json', api.data + '\n');
app.log.verbose('write js file: ' + app.options.dest + 'api_data.js');
if( ! app.options.simulate)
fs.writeFileSync(app.options.dest + './api_data.js', 'define({ "api": ' + api.data + ' });');
fs.writeFileSync(app.options.dest + './api_data.js', 'define({ "api": ' + api.data + ' });' + '\n');

@@ -164,7 +164,7 @@ // Write api_project

if( ! app.options.simulate)
fs.writeFileSync(app.options.dest + './api_project.json', api.project);
fs.writeFileSync(app.options.dest + './api_project.json', api.project + '\n');
app.log.verbose('write js file: ' + app.options.dest + 'api_project.js');
if( ! app.options.simulate)
fs.writeFileSync(app.options.dest + './api_project.js', 'define(' + api.project + ');');
fs.writeFileSync(app.options.dest + './api_project.js', 'define(' + api.project + ');' + '\n');
}

@@ -171,0 +171,0 @@

{
"name": "apidoc",
"version": "0.13.1",
"version": "0.13.2",
"description": "RESTful web API Documentation Generator",

@@ -39,17 +39,17 @@ "author": "Peter Rottmann <rottmann@inveris.de>",

"dependencies": {
"apidoc-core": "~0.4.0",
"fs-extra": "~0.18.2",
"lodash": "~3.8.0",
"markdown-it": "^4.2.1",
"apidoc-core": "~0.4.2",
"fs-extra": "~0.26.2",
"lodash": "~3.10.1",
"markdown-it": "^5.0.2",
"nomnom": "~1.8.1",
"winston": "~1.0.0"
"winston": "~2.1.1"
},
"devDependencies": {
"apidoc-example": "*",
"jshint": "^2.7.0",
"mocha": "~2.2.4",
"npm-check-updates": "^1.5.1",
"path-to-regexp": "^1.0.3",
"semver": "^4.3.4",
"should": "~6.0.1"
"jshint": "^2.9.1-rc1",
"mocha": "~2.3.4",
"npm-check-updates": "^2.5.4",
"path-to-regexp": "^1.2.1",
"semver": "^5.1.0",
"should": "~8.0.1"
},

@@ -56,0 +56,0 @@ "jshintConfig": {

@@ -116,12 +116,9 @@ # apiDoc

## Grunt Module
## Build tools
[grunt-apidoc](https://github.com/apidoc/grunt-apidoc) `npm install grunt-apidoc`.
* [flask-apidoc](https://pypi.python.org/pypi/flask-apidoc/) `pip install flask-apidoc`
* [grunt-apidoc](https://github.com/apidoc/grunt-apidoc) `npm install grunt-apidoc`.
* [gulp-apidoc](https://github.com/ayhankuru/gulp-apidoc) `npm install gulp-apidoc`.
## Gulp Module
[gulp-apidoc](https://github.com/ayhankuru/gulp-apidoc) `npm install gulp-apidoc`.
## Editor integration

@@ -139,2 +136,7 @@

## FAQ
* [Filter for public / private API](https://github.com/apidoc/grunt-apidoc/issues/27#issuecomment-147664797)
## Help

@@ -141,0 +143,0 @@

@@ -14,3 +14,3 @@ define({

'No response values.' : 'Aucune valeur de réponse.',
'optional' : 'optionel',
'optional' : 'optionnel',
'Parameter' : 'Paramètre',

@@ -26,2 +26,2 @@ 'Permission:' : 'Permission :',

}
});
});

@@ -1,2 +0,2 @@

var isarray = Array.isArray || function (arr) {
var isArray = Array.isArray || function (arr) {
return Object.prototype.toString.call(arr) == '[object Array]';

@@ -27,3 +27,3 @@ };

'([.+*?=^!:${}()[\\]|\\/])'
].join('|'), 'g')
].join('|'), 'g');

@@ -37,3 +37,3 @@ /**

function escapeGroup (group) {
return group.replace(/([=!:$\/()])/g, '\\$1')
return group.replace(/([=!:$\/()])/g, '\\$1');
}

@@ -49,4 +49,4 @@

function attachKeys (re, keys) {
re.keys = keys
return re
re.keys = keys;
return re;
}

@@ -61,3 +61,3 @@

function flags (options) {
return options.sensitive ? '' : 'i'
return options.sensitive ? '' : 'i';
}

@@ -74,3 +74,3 @@

// Use a negative lookahead to match only capturing groups.
var groups = path.source.match(/\((?!\?)/g)
var groups = path.source.match(/\((?!\?)/g);

@@ -80,11 +80,11 @@ if (groups) {

keys.push({
name: i,
name: i,
delimiter: null,
optional: false,
repeat: false
})
optional: false,
repeat: false
});
}
}
return attachKeys(path, keys)
return attachKeys(path, keys);
}

@@ -101,10 +101,10 @@

function arrayToRegexp (path, keys, options) {
var parts = []
var parts = [];
for (var i = 0; i < path.length; i++) {
parts.push(pathToRegexp(path[i], keys, options).source)
parts.push(pathToRegexp(path[i], keys, options).source);
}
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
return attachKeys(regexp, keys)
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));
return attachKeys(regexp, keys);
}

@@ -120,39 +120,39 @@

function replacePath (path, keys) {
var index = 0
var index = 0;
function replace (_, escaped, prefix, key, capture, group, suffix, escape) {
if (escaped) {
return escaped
return escaped;
}
if (escape) {
return '\\' + escape
return '\\' + escape;
}
var repeat = suffix === '+' || suffix === '*'
var optional = suffix === '?' || suffix === '*'
var repeat = suffix === '+' || suffix === '*';
var optional = suffix === '?' || suffix === '*';
keys.push({
name: key || index++,
name: key || index++,
delimiter: prefix || '/',
optional: optional,
repeat: repeat
})
optional: optional,
repeat: repeat
});
prefix = prefix ? ('\\' + prefix) : ''
capture = escapeGroup(capture || group || '[^' + (prefix || '\\/') + ']+?')
prefix = prefix ? ('\\' + prefix) : '';
capture = escapeGroup(capture || group || '[^' + (prefix || '\\/') + ']+?');
if (repeat) {
capture = capture + '(?:' + prefix + capture + ')*'
capture = capture + '(?:' + prefix + capture + ')*';
}
if (optional) {
return '(?:' + prefix + '(' + capture + '))?'
return '(?:' + prefix + '(' + capture + '))?';
}
// Basic parameter support.
return prefix + '(' + capture + ')'
return prefix + '(' + capture + ')';
}
return path.replace(PATH_REGEXP, replace)
return path.replace(PATH_REGEXP, replace);
}

@@ -173,23 +173,23 @@

function pathToRegexp (path, keys, options) {
keys = keys || []
keys = keys || [];
if (!isarray(keys)) {
options = keys
keys = []
if (!isArray(keys)) {
options = keys;
keys = [];
} else if (!options) {
options = {}
options = {};
}
if (path instanceof RegExp) {
return regexpToRegexp(path, keys, options)
return regexpToRegexp(path, keys, options);
}
if (isarray(path)) {
return arrayToRegexp(path, keys, options)
if (isArray(path)) {
return arrayToRegexp(path, keys, options);
}
var strict = options.strict
var end = options.end !== false
var route = replacePath(path, keys)
var endsWithSlash = path.charAt(path.length - 1) === '/'
var strict = options.strict;
var end = options.end !== false;
var route = replacePath(path, keys);
var endsWithSlash = path.charAt(path.length - 1) === '/';

@@ -201,15 +201,14 @@ // In non-strict mode we allow a slash at the end of match. If the path to

if (!strict) {
route = (endsWithSlash ? route.slice(0, -2) : route) + '(?:\\/(?=$))?'
route = (endsWithSlash ? route.slice(0, -2) : route) + '(?:\\/(?=$))?';
}
if (end) {
route += '$'
route += '$';
} else {
// In non-ending mode, we need the capturing groups to match as much as
// possible by using a positive lookahead to the end or next path segment.
route += strict && endsWithSlash ? '' : '(?=\\/|$)'
route += strict && endsWithSlash ? '' : '(?=\\/|$)';
}
return attachKeys(new RegExp('^' + route, flags(options)), keys)
return attachKeys(new RegExp('^' + route, flags(options)), keys);
}
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