From c7f9feea47f76ec492ba75e2c018877c757d6da4 Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Thu, 18 Jan 2024 09:43:45 -0500 Subject: [PATCH] Remove old .env files --- .env | 67 ------------------------------------------ .env.production | 5 ---- .env.staging | 5 ---- src/api/document.js | 4 +-- webpack.base.config.js | 3 +- 5 files changed, 3 insertions(+), 81 deletions(-) delete mode 100644 .env delete mode 100644 .env.production delete mode 100644 .env.staging diff --git a/.env b/.env deleted file mode 100644 index 272f4e2b3..000000000 --- a/.env +++ /dev/null @@ -1,67 +0,0 @@ -DC_BASE=https://api.dev.documentcloud.org -APP_URL=https://www.dev.documentcloud.org/ -EMBED_URL=https://www.dev.documentcloud.org/ -SQUARELET_BASE=https://dev.squarelet.com - -DC_LOGIN=/accounts/login/squarelet -DC_LOGOUT=/accounts/logout/ -SQUARELET_SIGNUP=/accounts/signup/?intent=documentcloud&next= - -POLL_INTERVAL=5000 -IMAGE_WIDTHS=xlarge:2000,large:1000,normal:700,small:180,thumbnail:60 - -MAX_PER_PAGE=100 - -PDF_SIZE_LIMIT=525336576 -PDF_SIZE_LIMIT_READABLE=500 MB - -DOCUMENT_SIZE_LIMIT=27262976 -DOCUMENT_SIZE_LIMIT_READABLE=25 MB - -TOAST_LENGTH=5000 -TOAST_FADE=800 - -LEGACY_CUT_OFF=20000000 - -HIGHLIGHT_START= -HIGHLIGHT_END= - -API=/api/ - -UPLOAD_LIMIT=1000 -UPLOAD_BATCH=25 -UPLOAD_BATCH_DELAY=1000 -GET_BATCH=25 -GET_BATCH_DELAY=1000 - -TAG_KEY=_tag - -SPECIAL_VERSION=Thanks for using DocumentCloud! -SPECIAL_CONTACT=mailto:info@documentcloud.org?subject=DocumentCloud Feedback -TIP_OF_THE_DAY=tipofday/ -LOGIN_ERROR=DocumentCloud is only available to users we have explicitly granted permission. - -LANGUAGE_CODES=afr|amh|ara|asm|aze|aze_cyrl|bel|ben|bod|bos|bul|cat|ceb|ces|zho|tra|chr|cym|dan|deu|dzo|ell|eng|enm|epo|est|eus|fas|fin|fra|frk|frm|gle|glg|grc|guj|hat|heb|hin|hrv|hun|iku|ind|isl|ita|ita_old|jav|jpn|kan|kat|kat_old|kaz|khm|kir|kor|kur|lao|lat|lav|lit|mal|mar|mkd|mlt|msa|mya|nep|nld|nor|ori|pan|pol|por|pus|ron|rus|san|sin|slk|slv|spa|spa_old|sqi|srp|srp_latn|swa|swe|syr|tam|tel|tgk|tgl|tha|tir|tur|uig|ukr|urd|uzb|uzb_cyrl|vie|yid -LANGUAGE_NAMES=Afrikaans|Amharic|Arabic|Assamese|Azerbaijani|Azerbaijani - Cyrillic|Belarusian|Bengali|Tibetan|Bosnian|Bulgarian|Catalan|Cebuano|Czech|Chinese - Simplified|Chinese - Traditional|Cherokee|Welsh|Danish|German|Dzongkha|Greek|English|Middle English|Esperanto|Estonian|Basque|Persian|Finnish|French|German Fraktur|Middle French|Irish|Galician|Ancient Greek|Gujarati|Haitian; Haitian Creole|Hebrew|Hindi|Croatian|Hungarian|Inuktitut|Indonesian|Icelandic|Italian|Italian - Old|Javanese|Japanese|Kannada|Georgian|Georgian - Old|Kazakh|Central Khmer|Kirghiz; Kyrgyz|Korean|Kurdish|Lao|Latin|Latvian|Lithuanian|Malayalam|Marathi|Macedonian|Maltese|Malay|Burmese|Nepali|Dutch; Flemish|Norwegian|Oriya|Panjabi; Punjabi|Polish|Portuguese|Pushto; Pashto|Romanian; Moldavian; Moldovan|Russian|Sanskrit|Sinhala; Sinhalese|Slovak|Slovenian|Spanish; Castilian|Spanish; Castilian - Old|Albanian|Serbian|Serbian - Latin|Swahili|Swedish|Syriac|Tamil|Telugu|Tajik|Tagalog|Thai|Tigrinya|Turkish|Uighur; Uyghur|Ukrainian|Urdu|Uzbek|Uzbek - Cyrillic|Vietnamese|Yiddish -DEFAULT_LANGUAGE=eng - -DOCUMENT_TYPES=123,602,abw,agd,bmp,cdr,cgm,cmx,csv,cwk,dbf,dif,doc,docx,dot,emf,eps,fb2,fhd,fodg,fodp,fods,fodt,gif,gnm,gnumeric,htm,html,hwp,jpeg,jpg,jtd,jtt,key,kth,mml,numbers,odb,odf,odg,odp,ods,odt,p65,pages,pbm,pcd,pct,pcx,pdf,pgm,plt,pm3,pm4,pm5,pm6,pmd,png,pot,ppm,pps,ppt,pptx,psd,pub,qxp,ras,rlf,rtf,sda,sdc,sdd,sdp,sdw,sgf,sgl,sgv,slk,stc,std,sti,stw,svg,svm,sxc,sxd,sxi,sxm,sxw,tga,tif,tiff,txt,uof,uop,uos,uot,vor,vsd,wb2,wdb,wk1,wk3,wk4,wks,wpd,wps,wq1,wq2,wri,xbm,xls,xlsx,xlt,xlw,xml,xpm,zabw,zmf - -STAFF_ONLY_S3_URL=http://minio.documentcloud.org:9000/minio/documents/documents/$$ID$$/ - - -DOCUMENT_TITLE_CHAR_LIMIT=1000 -DOCUMENT_DESCRIPTION_CHAR_LIMIT=4000 -DOCUMENT_SOURCE_CHAR_LIMIT=1000 -RELATED_ARTICLE_URL_CHAR_LIMIT=1024 -PUBLISHED_URL_CHAR_LIMIT=1024 - -PROJECT_DESCRIPTION_CHAR_LIMIT=1000 -PROJECT_TITLE_CHAR_LIMIT=255 - -NOTE_TITLE_CHAR_LIMIT=500 -NOTE_CONTENT_CHAR_LIMIT=2000 -SECTION_TITLE_CHAR_LIMIT=200 - -PROJECT_REDIRECT_HASH_URL=https://s3.amazonaws.com/s3.documentcloud.org/legacy/project_redirects.bin -ORG_REDIRECT_HASH_URL=https://s3.amazonaws.com/s3.documentcloud.org/legacy/org_redirects.bin diff --git a/.env.production b/.env.production deleted file mode 100644 index e0f709935..000000000 --- a/.env.production +++ /dev/null @@ -1,5 +0,0 @@ -DC_BASE=https://api.www.documentcloud.org -APP_URL=https://www.documentcloud.org/ -EMBED_URL=https://embed.documentcloud.org/ -SQUARELET_BASE=https://accounts.muckrock.com -STAFF_ONLY_S3_URL=https://s3.console.aws.amazon.com/s3/buckets/s3.documentcloud.org?region=us-east-1&prefix=documents/$$ID$$/&showversions=false diff --git a/.env.staging b/.env.staging deleted file mode 100644 index 47bb2951d..000000000 --- a/.env.staging +++ /dev/null @@ -1,5 +0,0 @@ -DC_BASE=https://api.muckcloud.com -APP_URL=https://muckcloud.com -EMBED_URL=https://muckcloud.com -SQUARELET_BASE=https://squarelet-staging.herokuapp.com -STAFF_ONLY_S3_URL=https://s3.console.aws.amazon.com/s3/buckets/documentcloud-staging-files?region=us-east-1&prefix=documents/$$ID$$/&showversions=false diff --git a/src/api/document.js b/src/api/document.js index 493c4fec0..5539f52a9 100644 --- a/src/api/document.js +++ b/src/api/document.js @@ -16,7 +16,7 @@ import axios from "axios"; import { Document, transformHighlights } from "@/structure/document.js"; import { - POLL_TIMEOUT, + POLL_INTERVAL, GET_BATCH, GET_BATCH_DELAY, UPLOAD_BATCH, @@ -254,7 +254,7 @@ export async function pollDocument( } // Retrigger after timeout - await timeout(POLL_TIMEOUT); + await timeout(POLL_INTERVAL); pollDocument(id, docFn, doneFn, conditionFn); } diff --git a/webpack.base.config.js b/webpack.base.config.js index 35a69086d..a8190d2c7 100644 --- a/webpack.base.config.js +++ b/webpack.base.config.js @@ -120,8 +120,7 @@ export default wrap({ filename: "assets/[name].[contenthash].css", }), new DotEnv({ - path: prod ? `.env.${environment}` : ".env", - defaults: ".env", + path: ".env", systemvars: true, }), new CircularDependencyPlugin({