mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-20 14:47:18 +02:00
update dependencies & remove google analytics
This commit is contained in:
1 parent
406330d957
commit
e24d1b4630
11 files changed
+1435
-1873
No files matched your search
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM node:15-slim
|
||||
FROM node:18-slim
|
||||
|
||||
ENV PORT 5000
|
||||
EXPOSE $PORT
|
||||
|
||||
+2
-3
@@ -2,9 +2,9 @@ module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "AnonymousGitHub",
|
||||
script: "./index.ts",
|
||||
script: "build/index.js",
|
||||
exec_mode: "fork",
|
||||
watch: true,
|
||||
watch: false,
|
||||
ignore_watch: [
|
||||
"node_modules",
|
||||
"repositories",
|
||||
@@ -15,7 +15,6 @@ module.exports = {
|
||||
"build",
|
||||
],
|
||||
interpreter: "node",
|
||||
interpreter_args: "--require ts-node/register",
|
||||
},
|
||||
],
|
||||
};
|
||||
Generated
+1405
-1828
File diff suppressed because it is too large.
Load diff
+12
-12
@@ -30,36 +30,36 @@
|
||||
"build"
|
||||
],
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.321.1",
|
||||
"@aws-sdk/node-http-handler": "^3.321.1",
|
||||
"@octokit/oauth-app": "^4.2.1",
|
||||
"@aws-sdk/client-s3": "^3.354.0",
|
||||
"@aws-sdk/node-http-handler": "^3.350.0",
|
||||
"@octokit/oauth-app": "^4.2.4",
|
||||
"@octokit/plugin-paginate-rest": "^7.1.2",
|
||||
"@octokit/rest": "^19.0.5",
|
||||
"@pm2/io": "^5.0.0",
|
||||
"archiver": "^5.3.1",
|
||||
"aws-sdk": "^2.1368.0",
|
||||
"bullmq": "^2.3.2",
|
||||
"compression": "^1.7.4",
|
||||
"connect-redis": "^7.0.1",
|
||||
"decompress-stream-to-s3": "^2.0.1",
|
||||
"dotenv": "^16.0.3",
|
||||
"express": "^4.18.2",
|
||||
"express-rate-limit": "^6.6.0",
|
||||
"express-rate-limit": "^6.7.0",
|
||||
"express-session": "^1.17.3",
|
||||
"express-slow-down": "^1.5.0",
|
||||
"express-slow-down": "^1.6.0",
|
||||
"got": "^11.8.5",
|
||||
"inquirer": "^8.2.5",
|
||||
"istextorbinary": "^6.0.0",
|
||||
"marked": "^4.1.1",
|
||||
"marked": "^5.1.0",
|
||||
"mime-types": "^2.1.35",
|
||||
"mongoose": "^7.1.0",
|
||||
"node-schedule": "^2.1.0",
|
||||
"mongoose": "^7.3.0",
|
||||
"node-schedule": "^2.1.1",
|
||||
"parse-github-url": "^1.0.2",
|
||||
"passport": "^0.6.0",
|
||||
"passport-github2": "^0.1.12",
|
||||
"rate-limit-redis": "^3.0.1",
|
||||
"redis": "^4.6.6",
|
||||
"rate-limit-redis": "^3.0.2",
|
||||
"redis": "^4.6.7",
|
||||
"textextensions": "^5.16.0",
|
||||
"ts-custom-error": "^3.3.0",
|
||||
"ts-custom-error": "^3.3.1",
|
||||
"unzip-stream": "^0.3.1",
|
||||
"xml-flow": "^1.0.4"
|
||||
},
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
<script src="/script/external/angular-translate-loader-static-files.min.js"></script>
|
||||
<script src="/script/external/angular-sanitize.min.js"></script>
|
||||
<script src="/script/external/angular-route.min.js"></script>
|
||||
<script src="/script/external/ana.min.js"></script>
|
||||
|
||||
<script src="/script/external/jquery-3.4.1.min.js"></script>
|
||||
<script src="/script/external/popper.min.js"></script>
|
||||
|
||||
+1
-10
@@ -5,17 +5,9 @@ angular
|
||||
"ui.ace",
|
||||
"ngPDFViewer",
|
||||
"pascalprecht.translate",
|
||||
"angular-google-analytics",
|
||||
"admin",
|
||||
])
|
||||
.config(function (
|
||||
$routeProvider,
|
||||
$locationProvider,
|
||||
$translateProvider,
|
||||
AnalyticsProvider
|
||||
) {
|
||||
AnalyticsProvider.setAccount("UA-5954162-28");
|
||||
|
||||
.config(function ($routeProvider, $locationProvider, $translateProvider) {
|
||||
$translateProvider.useStaticFilesLoader({
|
||||
prefix: "/i18n/locale-",
|
||||
suffix: ".json",
|
||||
@@ -142,7 +134,6 @@ angular
|
||||
});
|
||||
$locationProvider.html5Mode(true);
|
||||
})
|
||||
.run(["Analytics", function (Analytics) {}])
|
||||
.filter("humanFileSize", function () {
|
||||
return function humanFileSize(bytes, si = false, dp = 1) {
|
||||
const thresh = si ? 1000 : 1024;
|
||||
|
||||
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Angular Google Analytics - Easy tracking for your AngularJS application
|
||||
* @version v1.1.8 - 2016-12-30
|
||||
* @link http://github.com/revolunet/angular-google-analytics
|
||||
* @author Julien Bouquillon <julien@revolunet.com> (https://github.com/revolunet)
|
||||
* @contributors Julien Bouquillon (https://github.com/revolunet),Justin Saunders (https://github.com/justinsa),Chris Esplin (https://github.com/deltaepsilon),Adam Misiorny (https://github.com/adam187)
|
||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
!function(a,b){"use strict";"undefined"!=typeof module&&module.exports?(b("undefined"==typeof angular?require("angular"):angular),module.exports="angular-google-analytics"):"function"==typeof define&&define.amd?define(["angular"],b):b(a.angular)}(this,function(a,b){"use strict";return a.module("angular-google-analytics",[]).provider("Analytics",function(){var c,d,e,f,g,h=!0,i="auto",j=!1,k=!1,l="USD",m=!1,n=!1,o=!1,p=!1,q=!1,r=!1,s=!1,t=!1,u=!1,v=!1,w=!1,x="$routeChangeSuccess",y=!1,z=!1,A=!1,B="",C=!0,D=!1;this.log=[],this.offlineQueue=[],this.setAccount=function(d){return c=a.isUndefined(d)||d===!1?b:a.isArray(d)?d:a.isObject(d)?[d]:[{tracker:d,trackEvent:!0}],this},this.trackPages=function(a){return C=!!a,this},this.trackPrefix=function(a){return B=a,this},this.setDomainName=function(a){return e=a,this},this.useDisplayFeatures=function(a){return o=!!a,this},this.useAnalytics=function(a){return h=!!a,this},this.useEnhancedLinkAttribution=function(a){return s=!!a,this},this.useCrossDomainLinker=function(a){return k=!!a,this},this.setCrossLinkDomains=function(a){return d=a,this},this.setPageEvent=function(a){return x=a,this},this.setCookieConfig=function(a){return i=a,this},this.useECommerce=function(a,b){return q=!!a,r=!!b,this},this.setCurrency=function(a){return l=a,this},this.setRemoveRegExp=function(a){return a instanceof RegExp&&(g=a),this},this.setExperimentId=function(a){return f=a,this},this.ignoreFirstPageLoad=function(a){return t=!!a,this},this.trackUrlParams=function(a){return D=!!a,this},this.disableAnalytics=function(a){return p=!!a,this},this.setHybridMobileSupport=function(a){return v=!!a,this},this.startOffline=function(a){return w=!!a,w===!0&&this.delayScriptTag(!0),this},this.delayScriptTag=function(a){return n=!!a,this},this.logAllCalls=function(a){return u=!!a,this},this.enterTestMode=function(){return z=!0,this},this.enterDebugMode=function(a){return m=!0,A=!!a,this},this.readFromRoute=function(a){return y=!!a,this},this.$get=["$document","$location","$log","$rootScope","$window","$injector",function(E,F,G,H,I,J){var K=this,L=function(b,c){return a.isObject(c)&&a.isDefined(c[b])},M=function(a,b,c){return L(a,b)&&b[a]===c},N=function(b,c){return a.isString(c)?c+"."+b:L("name",c)?c.name+"."+b:b},O={};y&&(J.has("$route")?O=J.get("$route"):G.warn("$route service is not available. Make sure you have included ng-route in your application dependencies."));var P=function(){if(y&&O.current&&"pageTrack"in O.current)return O.current.pageTrack;var a=D?F.url():F.path();return g?a.replace(g,""):a},Q=function(){var b={utm_source:"campaignSource",utm_medium:"campaignMedium",utm_term:"campaignTerm",utm_content:"campaignContent",utm_campaign:"campaignName"},c={};return a.forEach(F.search(),function(d,e){var f=b[e];a.isDefined(f)&&(c[f]=d)}),c},R=function(a,b,c,d,e,f,g,h,i){var j={};return a&&(j.id=a),b&&(j.affiliation=b),c&&(j.revenue=c),d&&(j.tax=d),e&&(j.shipping=e),f&&(j.coupon=f),g&&(j.list=g),h&&(j.step=h),i&&(j.option=i),j},S=function(b,c){var d="",e="https:"===document.location.protocol,f="chrome-extension:"===document.location.protocol,g=h===!0&&v===!0;return b=a.isString(b)?b:"",c=a.isString(c)?c:"",""!==b&&(d="http:"+b),(f||g||e&&""!==c)&&(d="https:"+c),d},T=function(a){!h&&I._gaq&&"function"==typeof a&&a()},U=function(){var a=Array.prototype.slice.call(arguments);return w===!0?void K.offlineQueue.push([U,a]):(I._gaq||(I._gaq=[]),u===!0&&K._log.apply(K,a),void I._gaq.push(a))},V=function(a){h&&I.ga&&"function"==typeof a&&a()},W=function(){var a=Array.prototype.slice.call(arguments);return w===!0?void K.offlineQueue.push([W,a]):"function"!=typeof I.ga?void K._log("warn","ga function not set on window"):(u===!0&&K._log.apply(K,a),void I.ga.apply(null,a))},X=function(a){var b=Array.prototype.slice.call(arguments,1),d=b[0],e=[];return"function"==typeof a?c.forEach(function(b){a(b)&&e.push(b)}):e=c,0===e.length?void W.apply(K,b):void e.forEach(function(a){L("select",a)&&"function"==typeof a.select&&!a.select(b)||(b[0]=N(d,a),W.apply(K,b))})};return this._log=function(){var a=Array.prototype.slice.call(arguments);if(a.length>0){if(a.length>1)switch(a[0]){case"debug":case"error":case"info":case"log":case"warn":G[a[0]](a.slice(1))}K.log.push(a)}},this._createScriptTag=function(){K._registerScriptTags(),K._registerTrackers()},this._createAnalyticsScriptTag=function(){K._registerScriptTags(),K._registerTrackers()},this._registerScriptTags=function(){var a,b=E[0],d=S();if(j===!0)return void K._log("warn","Script tags already created");if(p===!0&&c.forEach(function(a){K._log("info","Analytics disabled: "+a.tracker),I["ga-disable-"+a.tracker]=!0}),h===!0){if(a=d+"//ana.durieux.me/"+(m?"analytics_debug.js":"analytics.js"),z!==!0?!function(a,b,c,d,e,f,g){a.GoogleAnalyticsObject=e,a[e]=a[e]||function(){(a[e].q=a[e].q||[]).push(arguments)},a[e].l=1*new Date,f=b.createElement(c),g=b.getElementsByTagName(c)[0],f.async=1,f.src=d,g.parentNode.insertBefore(f,g)}(window,b,"script",a,"ga"):("function"!=typeof I.ga&&Line truncated
|
||||
+9
-6
@@ -64,12 +64,15 @@ export default class PullRequest {
|
||||
repo,
|
||||
pull_number,
|
||||
}),
|
||||
octokit.paginate(octokit.rest.issues.listComments, {
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
issue_number: pull_number,
|
||||
per_page: 100,
|
||||
}),
|
||||
octokit.paginate(
|
||||
"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments",
|
||||
{
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
pull_number: pull_number,
|
||||
per_page: 100,
|
||||
}
|
||||
),
|
||||
got(`https://github.com/${owner}/${repo}/pull/${pull_number}.diff`),
|
||||
]);
|
||||
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ export default class User {
|
||||
// get the list of repo from github
|
||||
const octokit = new Octokit({ auth: this.accessToken });
|
||||
const repositories = (
|
||||
await octokit.paginate(octokit.repos.listForAuthenticatedUser, {
|
||||
await octokit.paginate("GET /user/repos", {
|
||||
visibility: "all",
|
||||
sort: "pushed",
|
||||
per_page: 100,
|
||||
|
||||
@@ -103,7 +103,9 @@ async function webView(req: express.Request, res: express.Response) {
|
||||
}
|
||||
if (f.extension() == "md") {
|
||||
const content = await streamToString(await f.anonymizedContent());
|
||||
res.contentType("html").send(marked.marked(content));
|
||||
res
|
||||
.contentType("html")
|
||||
.send(marked.marked(content, { headerIds: false, mangle: false }));
|
||||
} else {
|
||||
f.send(res);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export class GitHubRepository {
|
||||
const octokit = new Octokit({ auth: opt.accessToken });
|
||||
try {
|
||||
const branches = (
|
||||
await octokit.paginate(octokit.repos.listBranches, {
|
||||
await octokit.paginate("GET /repos/{owner}/{repo}/branches", {
|
||||
owner: this.owner,
|
||||
repo: this.repo,
|
||||
per_page: 100,
|
||||
|
||||
Reference in new issue
Block a user