diff --git a/.github/main.workflow b/.github/main.workflow index d6dea5a..6bf2033 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -4,13 +4,18 @@ workflow "Verify the module" { } action "install" { - uses = "actions/npm@1.0.0" + uses = "actions/npm@master" args = "ci" } +action "peer_install" { + uses = "actions/npm@master" + args = "install --no-save @google-cloud/dlp" +} + action "verify_all" { - needs = "install" - uses = "actions/npm@1.0.0" + needs = "peer_install" + uses = "actions/npm@master" args = "run verify_all" } diff --git a/README.md b/README.md index 8f5876d..efa3e45 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,8 @@ Note that Google Cloud DLP already also provides a node.js library (https://www. - it is easy to add custom patterns or rules to redact-pii - `GoogleDLPRedactor` uses the `.inspectContent` instead of `.deidentifyContent` method of `@google-cloud/dlp` which has a pricing advantage for large scale redaction scenarios since you will be only charged "Inspection Units" and no additional "Transformation Units" (see https://cloud.google.com/dlp/pricing) . redact-pii only uses DLP to `identify` PII but does the replacement `transformation` by itself which saves you some 💰💰💰. +In order to use Google Data Loss Prevention you must install the peer dependency yourself with `npm install --save @google-cloud/dlp` since we are no longer bundling it with this package. + #### Use Google Data Loss Prevention only (this won't make use of redact-pii's built-in regex patterns) 1. Prequesites: diff --git a/package-lock.json b/package-lock.json index bb033bc..1b6fa0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -266,13 +266,6 @@ "integrity": "sha512-SmLNuPGlUur64bNS9aHZguqWDVQ8+Df1CGn+xsh7l6T2wiP5ArOMlywZ3TZo6z/rwKtGQgUJY9ZrPYUmHEXd/Q==", "requires": { "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" - } } }, "@grpc/proto-loader": { @@ -601,9 +594,9 @@ "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { - "version": "10.14.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.4.tgz", - "integrity": "sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg==" + "version": "10.14.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.6.tgz", + "integrity": "sha512-Fvm24+u85lGmV4hT5G++aht2C5I4Z4dYlWZIh62FAfFO/TfzXtPpoLI6I7AuBWkIFqZCnhFOoTT7RjjaIL5Fjg==" }, "@types/stack-utils": { "version": "1.0.1", @@ -930,8 +923,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", @@ -1071,7 +1063,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1496,8 +1487,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "configstore": { "version": "3.1.2", @@ -1626,6 +1616,14 @@ } } }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -1921,6 +1919,15 @@ "strip-eof": "^1.0.0" } }, + "executioner": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/executioner/-/executioner-2.0.1.tgz", + "integrity": "sha1-rdMo4DvEXdWY81j7tSn8C+Dsb80=", + "dev": true, + "requires": { + "mixly": "^1.0.0" + } + }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -2191,8 +2198,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { "version": "1.2.7", @@ -2742,6 +2748,12 @@ } } }, + "fulcon": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fulcon/-/fulcon-1.0.2.tgz", + "integrity": "sha1-ik39pMc/zZzGKnnVBFw5K0VUcyA=", + "dev": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -2749,9 +2761,9 @@ "dev": true }, "gaxios": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-1.8.3.tgz", - "integrity": "sha512-6Lc1P0NjbPNQ2FGgTRurz32P6FktNJbwLqXvrUNhfwzKb9iizcWuAJiHoSG2W186K9ZL0X6ST5xD9gJWhHI1sg==", + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-1.8.4.tgz", + "integrity": "sha512-BoENMnu1Gav18HcpV9IleMPZ9exM+AvUjrAOV4Mzs/vfz2Lu/ABv451iEXByKiMPn2M140uul1txXCg83sAENw==", "requires": { "abort-controller": "^3.0.0", "extend": "^3.0.2", @@ -2814,7 +2826,6 @@ "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2874,13 +2885,6 @@ "jws": "^3.1.5", "lru-cache": "^5.0.0", "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" - } } }, "google-gax": { @@ -2970,14 +2974,14 @@ "dev": true }, "grpc": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.19.0.tgz", - "integrity": "sha512-xX+jZ1M3YXjngsRj/gTxB4EwM0WoWUr54DmyNq9xTeg1oSuVaTPD/PK9wnZKOJWTt1pkeFspXqwJPhddZNxHOA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.20.3.tgz", + "integrity": "sha512-GsEsi0NVj6usS/xor8pF/xDbDiwZQR59aZl5NUZ59Sy2bdPQFZ3UePr5wevZjHboirRCIQCKRI1cCgvSWUe2ag==", "requires": { "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", - "nan": "^2.0.0", - "node-pre-gyp": "^0.12.0", + "nan": "^2.13.2", + "node-pre-gyp": "^0.13.0", "protobufjs": "^5.0.3" }, "dependencies": { @@ -3033,13 +3037,6 @@ "version": "1.0.2", "bundled": true }, - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - } - }, "deep-extend": { "version": "0.6.0", "bundled": true @@ -3077,18 +3074,6 @@ "wide-align": "^1.1.0" } }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "has-unicode": { "version": "2.0.1", "bundled": true @@ -3154,7 +3139,7 @@ } }, "minizlib": { - "version": "1.1.1", + "version": "1.2.1", "bundled": true, "requires": { "minipass": "^2.2.1" @@ -3173,21 +3158,30 @@ } } }, - "ms": { - "version": "2.0.0", - "bundled": true - }, "needle": { - "version": "2.2.4", + "version": "2.3.1", "bundled": true, "requires": { - "debug": "^2.1.2", + "debug": "^4.1.0", "iconv-lite": "^0.4.4", "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "bundled": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true + } } }, "node-pre-gyp": { - "version": "0.12.0", + "version": "0.13.0", "bundled": true, "requires": { "detect-libc": "^1.0.2", @@ -3211,11 +3205,11 @@ } }, "npm-bundled": { - "version": "1.0.5", + "version": "1.0.6", "bundled": true }, "npm-packlist": { - "version": "1.1.12", + "version": "1.4.1", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -3306,10 +3300,24 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.6.3", "bundled": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } } }, "safe-buffer": { @@ -3325,7 +3333,7 @@ "bundled": true }, "semver": { - "version": "5.6.0", + "version": "5.7.0", "bundled": true }, "set-blocking": { @@ -3552,21 +3560,6 @@ "requires": { "agent-base": "^4.1.0", "debug": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - } } }, "iconv-lite": { @@ -3613,7 +3606,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -3630,6 +3622,15 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, + "install-peers": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/install-peers/-/install-peers-1.0.3.tgz", + "integrity": "sha512-MAlSHlrn4p+g3fhx8ZVxQZXX+MkeinKLu/ThfAmrVnN5c2L8Vof7myb0UsgowJEiGcFNHYnTvo37r3uap5asYA==", + "dev": true, + "requires": { + "executioner": "^2.0.1" + } + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -5305,7 +5306,6 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5347,6 +5347,15 @@ } } }, + "mixly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mixly/-/mixly-1.0.0.tgz", + "integrity": "sha1-m1ouH2Pm37oNMOZ5f/rmKrHcJO8=", + "dev": true, + "requires": { + "fulcon": "^1.0.1" + } + }, "mkdirp": { "version": "0.5.1", "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -5367,8 +5376,7 @@ "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, "nan": { "version": "2.13.2", @@ -5413,9 +5421,9 @@ "dev": true }, "node-fetch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz", - "integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz", + "integrity": "sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw==" }, "node-forge": { "version": "0.8.2", @@ -5629,7 +5637,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { "lcid": "^1.0.0" @@ -5741,8 +5749,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-is-inside": { "version": "1.0.2", @@ -6268,8 +6275,7 @@ "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" }, "semver-diff": { "version": "2.1.0", @@ -7433,7 +7439,7 @@ }, "yargs": { "version": "3.32.0", - "resolved": "http://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", "requires": { "camelcase": "^2.0.1", diff --git a/package.json b/package.json index 4aa6a9f..4f3d87d 100644 --- a/package.json +++ b/package.json @@ -24,14 +24,17 @@ "author": "Christian Theilemann ", "license": "MIT", "dependencies": { - "@google-cloud/dlp": "~0.11.0", "lodash": "^4.17.11" }, + "peerDependencies": { + "@google-cloud/dlp": "~0.11.0" + }, "devDependencies": { "@types/jest": "24.0.11", "@types/lodash": "4.14.123", "changelog-verify": "1.1.2", "del-cli": "1.1.0", + "install-peers": "^1.0.3", "jest": "24.7.1", "prettier": "1.17.0", "ts-jest": "24.0.2",