Comparing version 3.0.0 to 3.0.1
@@ -26,2 +26,3 @@ "use strict"; | ||
const util = require("../util"); | ||
const j = require("jscodeshift"); | ||
const config_1 = require("../config"); | ||
@@ -84,2 +85,16 @@ const assertion_1 = require("./assertion"); | ||
} | ||
else if (sec === 'm') { | ||
const mAST = j(util.removeComments(value)); | ||
let hasEscape = false; | ||
mAST.find(j.Literal).forEach(path => { | ||
let n = path.value.value; | ||
if (typeof n === 'string' && n.includes('.')) { | ||
hasEscape = true; | ||
n = n.replace(/\./g, '\\.'); | ||
j(path).replaceWith(j.literal(n)); | ||
} | ||
}); | ||
value = util.escapeAssertion(mAST.toSource()); | ||
ast.value = hasEscape ? value.replace(/\\\\./g, '.') : value; | ||
} | ||
else { | ||
@@ -86,0 +101,0 @@ ast.value = util.removeComments(util.escapeAssertion(value)); |
{ | ||
"name": "casbin", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "An authorization library that supports access control models like ACL, RBAC, ABAC in Node.JS", | ||
@@ -18,2 +18,3 @@ "main": "lib/index.js", | ||
"@types/jest": "^24.0.11", | ||
"@types/jscodeshift": "^0.6.0", | ||
"@types/lodash": "^4.14.113", | ||
@@ -34,2 +35,3 @@ "@types/node": "^10.5.3", | ||
"ip": "^1.1.5", | ||
"jscodeshift": "^0.6.4", | ||
"lodash": "^4.17.10" | ||
@@ -36,0 +38,0 @@ }, |
@@ -23,2 +23,14 @@ # node-Casbin | ||
## All the languages supported by Casbin: | ||
[![golang](https://casbin.org/img/langs/golang.png)](https://github.com/casbin/casbin) | [![java](https://casbin.org/img/langs/java.png)](https://github.com/casbin/jcasbin) | [![nodejs](https://casbin.org/img/langs/nodejs.png)](https://github.com/casbin/node-casbin) | [![php](https://casbin.org/img/langs/php.png)](https://github.com/php-casbin/php-casbin) | ||
----|----|----|---- | ||
[Casbin](https://github.com/casbin/casbin) | [jCasbin](https://github.com/casbin/jcasbin) | [node-Casbin](https://github.com/casbin/node-casbin) | [PHP-Casbin](https://github.com/php-casbin/php-casbin) | ||
production-ready | production-ready | production-ready | production-ready | ||
[![python](https://casbin.org/img/langs/python.png)](https://github.com/casbin/pycasbin) | [![dotnet](https://casbin.org/img/langs/dotnet.png)](https://github.com/casbin-net/Casbin.NET) | [![delphi](https://casbin.org/img/langs/delphi.png)](https://github.com/casbin4d/Casbin4D) | [![rust](https://casbin.org/img/langs/rust.png)](https://github.com/Devolutions/casbin-rs) | ||
----|----|----|---- | ||
[PyCasbin](https://github.com/casbin/pycasbin) | [Casbin.NET](https://github.com/casbin-net/Casbin.NET) | [Casbin4D](https://github.com/casbin4d/Casbin4D) | [Casbin-RS](https://github.com/Devolutions/casbin-rs) | ||
production-ready | production-ready | experimental | WIP | ||
## Installation | ||
@@ -25,0 +37,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
166051
3819
92
4
14
+ Addedjscodeshift@^0.6.4
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/compat-data@7.26.3(transitive)
+ Added@babel/core@7.26.0(transitive)
+ Added@babel/generator@7.26.3(transitive)
+ Added@babel/helper-annotate-as-pure@7.25.9(transitive)
+ Added@babel/helper-compilation-targets@7.25.9(transitive)
+ Added@babel/helper-create-class-features-plugin@7.25.9(transitive)
+ Added@babel/helper-create-regexp-features-plugin@7.26.3(transitive)
+ Added@babel/helper-define-polyfill-provider@0.6.3(transitive)
+ Added@babel/helper-member-expression-to-functions@7.25.9(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-module-transforms@7.26.0(transitive)
+ Added@babel/helper-optimise-call-expression@7.25.9(transitive)
+ Added@babel/helper-plugin-utils@7.25.9(transitive)
+ Added@babel/helper-remap-async-to-generator@7.25.9(transitive)
+ Added@babel/helper-replace-supers@7.25.9(transitive)
+ Added@babel/helper-skip-transparent-expression-wrappers@7.25.9(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/helper-validator-option@7.25.9(transitive)
+ Added@babel/helper-wrap-function@7.25.9(transitive)
+ Added@babel/helpers@7.26.0(transitive)
+ Added@babel/parser@7.26.3(transitive)
+ Added@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(transitive)
+ Added@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9(transitive)
+ Added@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9(transitive)
+ Added@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9(transitive)
+ Added@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9(transitive)
+ Added@babel/plugin-proposal-class-properties@7.18.6(transitive)
+ Added@babel/plugin-proposal-object-rest-spread@7.20.7(transitive)
+ Added@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(transitive)
+ Added@babel/plugin-syntax-flow@7.26.0(transitive)
+ Added@babel/plugin-syntax-import-assertions@7.26.0(transitive)
+ Added@babel/plugin-syntax-import-attributes@7.26.0(transitive)
+ Added@babel/plugin-syntax-jsx@7.25.9(transitive)
+ Added@babel/plugin-syntax-object-rest-spread@7.8.3(transitive)
+ Added@babel/plugin-syntax-typescript@7.25.9(transitive)
+ Added@babel/plugin-syntax-unicode-sets-regex@7.18.6(transitive)
+ Added@babel/plugin-transform-arrow-functions@7.25.9(transitive)
+ Added@babel/plugin-transform-async-generator-functions@7.25.9(transitive)
+ Added@babel/plugin-transform-async-to-generator@7.25.9(transitive)
+ Added@babel/plugin-transform-block-scoped-functions@7.25.9(transitive)
+ Added@babel/plugin-transform-block-scoping@7.25.9(transitive)
+ Added@babel/plugin-transform-class-properties@7.25.9(transitive)
+ Added@babel/plugin-transform-class-static-block@7.26.0(transitive)
+ Added@babel/plugin-transform-classes@7.25.9(transitive)
+ Added@babel/plugin-transform-computed-properties@7.25.9(transitive)
+ Added@babel/plugin-transform-destructuring@7.25.9(transitive)
+ Added@babel/plugin-transform-dotall-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-duplicate-keys@7.25.9(transitive)
+ Added@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-dynamic-import@7.25.9(transitive)
+ Added@babel/plugin-transform-exponentiation-operator@7.26.3(transitive)
+ Added@babel/plugin-transform-export-namespace-from@7.25.9(transitive)
+ Added@babel/plugin-transform-flow-strip-types@7.25.9(transitive)
+ Added@babel/plugin-transform-for-of@7.25.9(transitive)
+ Added@babel/plugin-transform-function-name@7.25.9(transitive)
+ Added@babel/plugin-transform-json-strings@7.25.9(transitive)
+ Added@babel/plugin-transform-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-logical-assignment-operators@7.25.9(transitive)
+ Added@babel/plugin-transform-member-expression-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-modules-amd@7.25.9(transitive)
+ Added@babel/plugin-transform-modules-commonjs@7.26.3(transitive)
+ Added@babel/plugin-transform-modules-systemjs@7.25.9(transitive)
+ Added@babel/plugin-transform-modules-umd@7.25.9(transitive)
+ Added@babel/plugin-transform-named-capturing-groups-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-new-target@7.25.9(transitive)
+ Added@babel/plugin-transform-nullish-coalescing-operator@7.25.9(transitive)
+ Added@babel/plugin-transform-numeric-separator@7.25.9(transitive)
+ Added@babel/plugin-transform-object-rest-spread@7.25.9(transitive)
+ Added@babel/plugin-transform-object-super@7.25.9(transitive)
+ Added@babel/plugin-transform-optional-catch-binding@7.25.9(transitive)
+ Added@babel/plugin-transform-optional-chaining@7.25.9(transitive)
+ Added@babel/plugin-transform-parameters@7.25.9(transitive)
+ Added@babel/plugin-transform-private-methods@7.25.9(transitive)
+ Added@babel/plugin-transform-private-property-in-object@7.25.9(transitive)
+ Added@babel/plugin-transform-property-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-regenerator@7.25.9(transitive)
+ Added@babel/plugin-transform-regexp-modifiers@7.26.0(transitive)
+ Added@babel/plugin-transform-reserved-words@7.25.9(transitive)
+ Added@babel/plugin-transform-shorthand-properties@7.25.9(transitive)
+ Added@babel/plugin-transform-spread@7.25.9(transitive)
+ Added@babel/plugin-transform-sticky-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-template-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-typeof-symbol@7.25.9(transitive)
+ Added@babel/plugin-transform-typescript@7.26.3(transitive)
+ Added@babel/plugin-transform-unicode-escapes@7.25.9(transitive)
+ Added@babel/plugin-transform-unicode-property-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-unicode-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-unicode-sets-regex@7.25.9(transitive)
+ Added@babel/preset-env@7.26.0(transitive)
+ Added@babel/preset-flow@7.25.9(transitive)
+ Added@babel/preset-modules@0.1.6-no-external-plugins(transitive)
+ Added@babel/preset-typescript@7.26.0(transitive)
+ Added@babel/register@7.25.9(transitive)
+ Added@babel/runtime@7.26.0(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.26.3(transitive)
+ Added@babel/types@7.26.3(transitive)
+ Added@jridgewell/gen-mapping@0.3.5(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedarr-diff@4.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@3.1.0(transitive)
+ Addedarray-unique@0.3.2(transitive)
+ Addedassign-symbols@1.0.0(transitive)
+ Addedast-types@0.11.7(transitive)
+ Addedatob@2.1.2(transitive)
+ Addedbabel-core@7.0.0-bridge.0(transitive)
+ Addedbabel-plugin-polyfill-corejs2@0.4.12(transitive)
+ Addedbabel-plugin-polyfill-corejs3@0.10.6(transitive)
+ Addedbabel-plugin-polyfill-regenerator@0.6.3(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbase@0.11.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbraces@2.3.2(transitive)
+ Addedbrowserslist@4.24.2(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcache-base@1.0.1(transitive)
+ Addedcaniuse-lite@1.0.30001686(transitive)
+ Addedclass-utils@0.3.6(transitive)
+ Addedclone-deep@4.0.1(transitive)
+ Addedcollection-visit@1.0.0(transitive)
+ Addedcolors@1.4.0(transitive)
+ Addedcommondir@1.0.1(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addedcopy-descriptor@0.1.1(transitive)
+ Addedcore-js-compat@3.39.0(transitive)
+ Addeddebug@2.6.94.3.7(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddefine-property@0.2.51.0.02.0.2(transitive)
+ Addedelectron-to-chromium@1.5.68(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedexpand-brackets@2.1.4(transitive)
+ Addedextend-shallow@2.0.13.0.2(transitive)
+ Addedextglob@2.0.4(transitive)
+ Addedfill-range@4.0.0(transitive)
+ Addedfind-cache-dir@2.1.0(transitive)
+ Addedfind-up@3.0.0(transitive)
+ Addedflow-parser@0.255.0(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfragment-cache@0.2.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedget-value@2.0.6(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-value@0.3.11.0.0(transitive)
+ Addedhas-values@0.1.41.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-accessor-descriptor@1.0.1(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedis-data-descriptor@1.0.1(transitive)
+ Addedis-descriptor@0.1.71.0.3(transitive)
+ Addedis-extendable@0.1.11.0.1(transitive)
+ Addedis-number@3.0.0(transitive)
+ Addedis-plain-object@2.0.4(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisobject@2.1.03.0.1(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjscodeshift@0.6.4(transitive)
+ Addedjsesc@3.0.2(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedkind-of@3.2.24.0.06.0.3(transitive)
+ Addedlocate-path@3.0.0(transitive)
+ Addedlodash.debounce@4.0.8(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedmake-dir@2.1.0(transitive)
+ Addedmap-cache@0.2.2(transitive)
+ Addedmap-visit@1.0.0(transitive)
+ Addedmicromatch@3.1.10(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedmixin-deep@1.3.2(transitive)
+ Addedms@2.0.02.1.3(transitive)
+ Addednanomatch@1.2.13(transitive)
+ Addedneo-async@2.6.2(transitive)
+ Addednode-dir@0.1.17(transitive)
+ Addednode-releases@2.0.18(transitive)
+ Addedobject-copy@0.1.0(transitive)
+ Addedobject-visit@1.0.1(transitive)
+ Addedobject.pick@1.3.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@3.0.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpascalcase@0.1.1(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedpirates@4.0.6(transitive)
+ Addedpkg-dir@3.0.0(transitive)
+ Addedposix-character-classes@0.1.1(transitive)
+ Addedprivate@0.1.8(transitive)
+ Addedrecast@0.16.2(transitive)
+ Addedregenerate@1.4.2(transitive)
+ Addedregenerate-unicode-properties@10.2.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedregenerator-transform@0.15.2(transitive)
+ Addedregex-not@1.0.2(transitive)
+ Addedregexpu-core@6.2.0(transitive)
+ Addedregjsgen@0.8.0(transitive)
+ Addedregjsparser@0.12.0(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedresolve-url@0.2.1(transitive)
+ Addedret@0.1.15(transitive)
+ Addedrimraf@2.6.3(transitive)
+ Addedsafe-regex@1.1.0(transitive)
+ Addedsemver@5.7.26.3.1(transitive)
+ Addedset-value@2.0.1(transitive)
+ Addedshallow-clone@3.0.1(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsnapdragon@0.8.2(transitive)
+ Addedsnapdragon-node@2.1.1(transitive)
+ Addedsnapdragon-util@3.0.1(transitive)
+ Addedsource-map@0.5.70.6.1(transitive)
+ Addedsource-map-resolve@0.5.3(transitive)
+ Addedsource-map-support@0.5.21(transitive)
+ Addedsource-map-url@0.4.1(transitive)
+ Addedsplit-string@3.1.0(transitive)
+ Addedstatic-extend@0.1.2(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedtemp@0.8.4(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedto-regex@3.0.2(transitive)
+ Addedto-regex-range@2.1.1(transitive)
+ Addedunicode-canonical-property-names-ecmascript@2.0.1(transitive)
+ Addedunicode-match-property-ecmascript@2.0.0(transitive)
+ Addedunicode-match-property-value-ecmascript@2.2.0(transitive)
+ Addedunicode-property-aliases-ecmascript@2.1.0(transitive)
+ Addedunion-value@1.0.1(transitive)
+ Addedunset-value@1.0.0(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedurix@0.1.0(transitive)
+ Addeduse@3.1.1(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedwrite-file-atomic@2.4.3(transitive)
+ Addedyallist@3.1.1(transitive)