From 4f3a67a21f4ad5eae349d6fcb9a3e5720c068d62 Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Tue, 1 Nov 2022 07:27:52 +0000 Subject: [PATCH] ci(cf): remove plain snort2.rules - over 25MB limit of cf pages - use phishing-filter-snort2.rules.gz or phishing-filter-snort2.rules.br --- src/build.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/build.js b/src/build.js index 29e57e6c..d1011877 100644 --- a/src/build.js +++ b/src/build.js @@ -6,7 +6,7 @@ const { stream: gotStream } = require('got') const got = require('got') const unzip = require('extract-zip') const { join } = require('path') -const { mkdir } = require('fs/promises') +const { mkdir, rm } = require('fs/promises') const { createWriteStream } = require('fs') const { pipeline } = require('stream/promises') @@ -64,9 +64,12 @@ const f = async () => { console.log('Extracting artifacts.zip...') if (isMirror === false) { await unzip(zipPath, { dir: rootPath }) + // snort2.rules is over 25MB limit of CF Pages + await rm('phishing-filter-snort2.rules', { force: true }) } else { await mkdir(publicPath, { recursive: true }) await unzip(zipPath, { dir: publicPath }) + await rm(join(publicPath, 'phishing-filter-snort2.rules'), { force: true }) } }