diff --git a/add-sailthru-paths.js b/add-sailthru-paths.js index 4780257..9aa8959 100644 --- a/add-sailthru-paths.js +++ b/add-sailthru-paths.js @@ -11,28 +11,28 @@ * pattern was removed, it removes the corresponding encoded pattern. */ -const fs = require("fs") +const fs = require('fs') -const filename = "apple-app-site-association.json" +const filename = 'apple-app-site-association.json' function updateFile(block) { - const json = JSON.parse(fs.readFileSync(filename, { encoding: "utf8" })) + const json = JSON.parse(fs.readFileSync(filename, { encoding: 'utf8' })) block(json) - fs.writeFileSync(filename, JSON.stringify(json, null, 2) + "\n", { - encoding: "utf8" + fs.writeFileSync(filename, JSON.stringify(json, null, 2) + '\n', { + encoding: 'utf8' }) } function unencodedPatterns(patterns) { - return patterns.filter(pattern => pattern.includes("/")) + return patterns.filter(pattern => pattern.includes('/')) } function encodePath(path) { return path - .split("*") + .split('*') .filter(component => component.length) - .map(component => new Buffer(component).toString("base64")) - .join("*") + .map(component => new Buffer(component).toString('base64')) + .join('*') } function isNotSailthruPattern(pattern) { @@ -47,7 +47,7 @@ function isNotSailthruPattern(pattern) { */ function encodePattern(pattern) { const path = pattern.match(/^NOT (.+)$/)[1] - const encoded = encodePath(path.slice(0, -(path.length % 3))) + const encoded = encodePath(path.slice(0, path.length - (path.length % 3))) return `NOT *${encoded}*` } @@ -58,6 +58,6 @@ updateFile(json => { ...patterns.concat( patterns.filter(isNotSailthruPattern).map(encodePattern) ), - "*" + '*' ] }) diff --git a/apple-app-site-association.json b/apple-app-site-association.json index 4773482..d658b3f 100644 --- a/apple-app-site-association.json +++ b/apple-app-site-association.json @@ -28,19 +28,28 @@ "NOT /venice-biennale*", "NOT /gender-equality*", "NOT /collections", + "NOT /log_in", + "NOT /sign_up", "NOT /click/*/aHR0cHM6Ly9pdHVuZXMuYXBwbGUuY29tL3VzL3BvZGNhc3QvYXJ0c3kv*", "NOT /click/*/aHR0cHM6Ly9hcnRzeS5uZXQv*", "NOT /click/*/aHR0cHM6Ly9hcnRzeS50eXBlZm9ybS5j*", "NOT /click/*/aHR0cHM6Ly9hcHAuYWRqdXN0LmNv*", "NOT /users/auth/facebook/callback*", "NOT /identity-verification*", + "NOT *L2FydGljbGVz*", "NOT *L2FydGljbGUv*", + "NOT *L3Nlcmllcy8=*", "NOT *L3ZpZGVv*", "NOT *L25l*", "NOT *L25ld3Mv*", + "NOT *L2VkaXRvcmlhbC8=*", "NOT *LzIwMTYteWVhci1pbi1h*", "NOT *L3ZlbmljZS1iaWVubmFs*", "NOT *L2dlbmRlci1lcXVhbGl0*", + "NOT *L2NvbGxlY3Rpb25z*", + "NOT *L2xvZ19p*", + "NOT *L3NpZ25f*", + "NOT *L3VzZXJzL2F1dGgvZmFjZWJvb2svY2FsbGJhY2s=*", "NOT *L2lkZW50aXR5LXZlcmlmaWNhdGlv*", "*" ]