From 9926f006c8d79422408aba5dc7a5c807bb0a002d Mon Sep 17 00:00:00 2001 From: mikepsinn Date: Sat, 3 Jul 2021 12:10:56 -0500 Subject: [PATCH 1/3] Gulp imports --- gulpfile.js | 225 ++++------------------------------------------------ 1 file changed, 14 insertions(+), 211 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 812e18aa0c..8e135bcd6e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,11 +1,18 @@ -/* eslint-disable no-process-env */ -try { - var dotenv = require('dotenv') - dotenv.config({path: './secrets/.env'}); +/* eslint-disable no-process-env,object-shorthand,semi,block-spacing,comma-dangle,one-var,space-infix-ops,no-unused-vars,no-multi-spaces,no-useless-concat,no-empty */ +const {loadEnv} = require("./ts/env-helper"); +const {envs} = require("./ts/env-helper"); +const {paths} = require("./ts/env-helper"); +const {qmPlatform} = require("./ts/env-helper"); +const {getenvOrException} = require("./ts/env-helper"); +var qmLog = require("./ts/qm.log"); +var pump = require('pump'); +const {getQMClientIdOrException} = require("./ts/env-helper"); +try{ + loadEnv(".env") } catch (e) { - console.error(e); + qmLog.info(e.message); } -var QUANTIMODO_CLIENT_ID = process.env.QUANTIMODO_CLIENT_ID || process.env.CLIENT_ID; +var QUANTIMODO_CLIENT_ID = getQMClientIdOrException() var devCredentials; var androidArm7DebugApkName = 'android-armv7-debug'; var androidX86DebugApkName = 'android-x86-debug'; @@ -19,66 +26,6 @@ function isTruthy(value) {return (value && value !== "false");} var buildPath = 'build'; var circleCIPathToRepo = '~/quantimodo-android-chrome-ios-web-app'; var chromeExtensionBuildPath = buildPath + '/chrome_extension'; -var qmPlatform = { - buildingFor: { - getPlatformBuildingFor: function(){ - if(qmPlatform.buildingFor.android()){return 'android';} - if(qmPlatform.buildingFor.ios()){return 'ios';} - if(qmPlatform.buildingFor.chrome()){return 'chrome';} - if(qmPlatform.buildingFor.web()){return 'web';} - qmLog.error("What platform are we building for?"); - return null; - }, - setChrome: function(){ - qmPlatform.buildingFor.platform = qmPlatform.chrome; - }, - platform: null, - web: function () { - return !qmPlatform.buildingFor.android() && !qmPlatform.buildingFor.ios() && !qmPlatform.buildingFor.chrome(); - }, - android: function () { - if (qmPlatform.buildingFor.platform === 'android'){ return true; } - if (process.env.BUDDYBUILD_SECURE_FILES) { return true; } - if (process.env.TRAVIS_OS_NAME === "osx") { return false; } - return process.env.BUILD_ANDROID; - }, - ios: function () { - if (qmPlatform.buildingFor.platform === qmPlatform.ios){ return true; } - if (process.env.BUDDYBUILD_SCHEME) {return true;} - if (process.env.TRAVIS_OS_NAME === "osx") { return true; } - return process.env.BUILD_IOS; - }, - chrome: function () { - if (qmPlatform.buildingFor.platform === qmPlatform.chrome){ return true; } - return process.env.BUILD_CHROME; - }, - mobile: function () { - return qmPlatform.buildingFor.android() || qmPlatform.buildingFor.ios(); - } - }, - setBuildingFor: function(platform){ - qmPlatform.buildingFor.platform = platform; - }, - isOSX: function(){ - return process.platform === 'darwin'; - }, - isLinux: function(){ - return process.platform === 'linux'; - }, - isWindows: function(){ - return !qmPlatform.isOSX() && !qmPlatform.isLinux(); - }, - getPlatform: function(){ - if(qmPlatform.buildingFor){return qmPlatform.buildingFor;} - if(qmPlatform.isOSX()){return qmPlatform.ios;} - if(qmPlatform.isWindows()){return qmPlatform.android;} - return qmPlatform.web; - }, - ios: 'ios', - android: 'android', - web: 'web', - chrome: 'chrome' -}; // Setup platforms to build that are supported on current hardware // See https://taco.visualstudio.com/en-us/docs/tutorial-gulp-readme/ //var winPlatforms = ["android", "windows"], //Android is having problems so I'm only building windows for now @@ -117,36 +64,6 @@ var appIds = { 'quantimodo': true, 'medimodo': true }; -var paths = { - apk: {//android\app\build\outputs\apk\release\app-release.apk - combinedRelease: "platforms/android/app/build/outputs/apk/release/app-release.apk", - combinedDebug: "platforms/android/app/build/outputs/apk/release/app-debug.apk", - arm7Release: "platforms/android/app/build/outputs/apk/release/app-arm7-release.apk", - x86Release: "platforms/android/app/build/outputs/apk/release/app-x86-release.apk", - outputFolder: "platforms/android/app/build/outputs/apk", - builtApk: null, - }, - sass: ['./src/scss/**/*.scss'], - src:{ - devCredentials: "src/dev-credentials.json", - defaultPrivateConfig: "src/default.private_config.json", - icons: "src/img/icons", - firebase: "src/lib/firebase/**/*", - js: "src/js/*.js", - serviceWorker: "src/firebase-messaging-sw.js", - staticData: 'src/data/qmStaticData.js', - }, - www: { - devCredentials: "www/dev-credentials.json", - defaultPrivateConfig: "www/default.private_config.json", - icons: "www/img/icons", - firebase: "www/lib/firebase/", - js: "www/js/", - scripts: "www/scripts", - staticData: 'src/data/qmStaticData.js', - }, - chcpLogin: '.chcplogin', -}; var argv = require('yargs').argv; var defaultRequestOptions = {strictSSL: false}; var fs = require('fs'); @@ -157,120 +74,6 @@ var runSequence = require('run-sequence'); var AWS_ACCESS_KEY_ID = process.env.QM_AWS_ACCESS_KEY_ID || process.env.AWS_ACCESS_KEY_ID; // Netlify has their own var AWS_SECRET_ACCESS_KEY = process.env.QM_AWS_SECRET_ACCESS_KEY || process.env.AWS_SECRET_ACCESS_KEY; // Netlify has their own var s3Options = {accessKeyId: AWS_ACCESS_KEY_ID, secretAccessKey: AWS_SECRET_ACCESS_KEY}; -var qmLog = { - error: function (message, metaData, maxCharacters) { - metaData = qmLog.addMetaData(metaData); - console.error(qmLog.obfuscateStringify(message, metaData, maxCharacters)); - metaData.build_info = qmGulp.buildInfoHelper.getCurrentBuildInfo(); - bugsnag.notify(new Error(qmLog.obfuscateStringify(message), qmLog.obfuscateSecrets(metaData))); - }, - info: function (message, object, maxCharacters) { - if(typeof message !== "string"){ - object = message; - message = null; - } - console.log(qmLog.obfuscateStringify(message, object, maxCharacters)); - }, - debug: function (message, object, maxCharacters) { - if(isTruthy(process.env.BUILD_DEBUG || process.env.DEBUG_BUILD)){ - qmLog.info("DEBUG: " + message, object, maxCharacters); - } - }, - logErrorAndThrowException: function (message, object) { - qmLog.error(message, object); - throw message; - }, - addMetaData: function(metaData){ - metaData = metaData || {}; - metaData.environment = qmLog.obfuscateSecrets(process.env); - metaData.subsystem = { name: qmLog.getCurrentServerContext() }; - metaData.client_id = QUANTIMODO_CLIENT_ID; - metaData.build_link = qmGulp.buildInfoHelper.getBuildLink(); - return metaData; - }, - obfuscateStringify: function(message, object, maxCharacters) { - if(maxCharacters !== false){maxCharacters = maxCharacters || 140;} - var objectString = ''; - if(object){ - object = qmLog.obfuscateSecrets(object); - objectString = ': ' + qmLog.prettyJSONStringify(object); - } - if (maxCharacters !== false && objectString.length > maxCharacters) {objectString = objectString.substring(0, maxCharacters) + '...';} - message += objectString; - if(process.env.QUANTIMODO_CLIENT_SECRET){message = message.replace(process.env.QUANTIMODO_CLIENT_SECRET, 'HIDDEN');} - if(AWS_SECRET_ACCESS_KEY){message = message.replace(AWS_SECRET_ACCESS_KEY, 'HIDDEN');} - if(process.env.ENCRYPTION_SECRET){message = message.replace(process.env.ENCRYPTION_SECRET, 'HIDDEN');} - if(process.env.QUANTIMODO_ACCESS_TOKEN){message = message.replace(process.env.QUANTIMODO_ACCESS_TOKEN, 'HIDDEN');} - message = qmLog.obfuscateString(message); - return message; - }, - isSecretWord: function(propertyName){ - var lowerCaseProperty = propertyName.toLowerCase(); - return lowerCaseProperty.indexOf('secret') !== -1 || - lowerCaseProperty.indexOf('password') !== -1 || - lowerCaseProperty.indexOf('key') !== -1 || - lowerCaseProperty.indexOf('database') !== -1 || - lowerCaseProperty.indexOf('token') !== -1; - }, - obfuscateString: function(string){ - var env = process.env; - for (var propertyName in env) { - if (env.hasOwnProperty(propertyName)) { - if(qmLog.isSecretWord(propertyName)){ - string = string.replace(env[propertyName], '[SECURE]'); - } - } - } - return string; - }, - obfuscateSecrets: function(object){ - if(typeof object !== 'object'){return object;} - object = JSON.parse(JSON.stringify(object)); // Decouple so we don't screw up original object - for (var propertyName in object) { - if (object.hasOwnProperty(propertyName)) { - if(qmLog.isSecretWord(propertyName)){ - object[propertyName] = "[SECURE]"; - } else { - object[propertyName] = qmLog.obfuscateSecrets(object[propertyName]); - } - } - } - return object; - }, - getCurrentServerContext: function() { - if(process.env.CIRCLE_BRANCH){return "circleci";} - if(process.env.BUDDYBUILD_BRANCH){return "buddybuild";} - return process.env.HOSTNAME; - }, - prettyJSONStringify: function(object) {return JSON.stringify(object, null, '\t');}, - slugify: function(str){ - str = str.replace(/^\s+|\s+$/g, ''); // trim - str = str.toLowerCase(); - // remove accents, swap ñ for n, etc - var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; - var to = "aaaaeeeeiiiioooouuuunc------"; - for (var i=0, l=from.length ; i Date: Sat, 3 Jul 2021 13:06:18 -0500 Subject: [PATCH 2/3] readJsonFile --- gulpfile.js | 15 +++++---------- ts/cypress-runner.js | 3 ++- ts/cypress-runner.js.map | 2 +- ts/env-helper.js | 1 + ts/env-helper.js.map | 2 +- ts/env-helper.ts | 1 + ts/qm.file-helper.js | 13 ++++++++++++- ts/qm.file-helper.js.map | 2 +- ts/qm.file-helper.ts | 11 +++++++++++ ts/qm.git.js | 16 ++++++++++++++-- ts/qm.git.js.map | 2 +- ts/qm.log.js | 11 ++++++++++- ts/qm.log.js.map | 2 +- ts/qm.log.ts | 9 +++++++++ 14 files changed, 70 insertions(+), 20 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 8e135bcd6e..c2f949ab48 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,4 +1,6 @@ /* eslint-disable no-process-env,object-shorthand,semi,block-spacing,comma-dangle,one-var,space-infix-ops,no-unused-vars,no-multi-spaces,no-useless-concat,no-empty */ +const {missingRequiredParameter} = require("./ts/qm.log"); +const {readJsonFile} = require("./ts/qm.file-helper"); const {loadEnv} = require("./ts/env-helper"); const {envs} = require("./ts/env-helper"); const {paths} = require("./ts/env-helper"); @@ -362,7 +364,7 @@ var qmGulp = { return qmGulp.buildInfoHelper.currentBuildInfo; }, getPreviousBuildInfo: function () { - var previousBuildInfo = readFile(paths.src.buildInfo); + var previousBuildInfo = readJsonFile(paths.src.buildInfo); if(!previousBuildInfo){ qmLog.info("No previous BuildInfo file at "+paths.src.buildInfo); qmGulp.buildInfoHelper.previousBuildInfo = false; @@ -599,21 +601,14 @@ function getPathToChromeExtensionZip() {return buildPath + '/' + getChromeExtens function getPathToUnzippedChromeExtension() {return buildPath + '/' + QUANTIMODO_CLIENT_ID + '-chrome-extension';} function readDevCredentials(){ try{ - devCredentials = JSON.parse(fs.readFileSync(paths.src.devCredentials)); + devCredentials = readJsonFile(paths.src.devCredentials); qmLog.info("Using dev credentials from " + paths.src.devCredentials + ". This file is ignored in .gitignore and should never be committed to any repository."); } catch (error){ qmLog.debug('No existing dev credentials found'); devCredentials = {}; } } -function readFile(path){ - try { - return JSON.parse(fs.readFileSync(path)); - } catch (e) { - qmLog.error("Could not read "+path); - return false; - } -} + function outputFileContents(path){ qmLog.info(path+": "+fs.readFileSync(path)); } diff --git a/ts/cypress-runner.js b/ts/cypress-runner.js index 860ff760bc..f7cf9790f0 100644 --- a/ts/cypress-runner.js +++ b/ts/cypress-runner.js @@ -20,7 +20,8 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); var qmTests = __importStar(require("./cypress-functions")); -// loadEnv("local") +var env_helper_1 = require("./env-helper"); +env_helper_1.loadEnv("local"); if (!process.env.ELECTRON_ENABLE_LOGGING) { console.log("set env ELECTRON_ENABLE_LOGGING=\"1\" if you want to log to CI. Disabled by default to avoid leaking secrets on Travis"); } diff --git a/ts/cypress-runner.js.map b/ts/cypress-runner.js.map index 14400c5d2a..9fd5993538 100644 --- a/ts/cypress-runner.js.map +++ b/ts/cypress-runner.js.map @@ -1 +1 @@ -{"version":3,"file":"cypress-runner.js","sourceRoot":"","sources":["cypress-runner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2DAA8C;AAE9C,mBAAmB;AACnB,IAAG,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE;IACrC,OAAO,CAAC,GAAG,CAAC,yHAAyH,CAAC,CAAA;CACzI;AACD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AAiB,CAAC,QAAQ,EAAE;QAChC,OAAO,CAAC,IAAI,CAAC,YAAY,GAAC,QAAQ,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;CACL;KAAM,IAAI,QAAQ,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAA;IACxC,OAAO,CAAC,yBAAyB,EAAE,CAAA;CACtC;KAAM;IACH,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAA;IACpE,OAAO,CAAC,wBAAwB,CAAC,UAAS,GAAQ;QAC9C,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAA;QAC1E,IAAI,GAAG,EAAE;YAAE,MAAM,GAAG,CAAA;SAAE;QACtB,OAAO,CAAC,eAAe,EAAE,CAAA;IAC7B,CAAC,CAAC,CAAA;CACL"} \ No newline at end of file diff --git a/ts/env-helper.js b/ts/env-helper.js index 14b7b9782a..00f5a63cba 100644 --- a/ts/env-helper.js +++ b/ts/env-helper.js @@ -52,6 +52,7 @@ exports.paths = { chcpLogin: ".chcplogin", sass: ["./src/scss/**/*.scss"], src: { + buildInfo: "src/data/build-info.json", defaultPrivateConfig: "src/default.private_config.json", devCredentials: "src/dev-credentials.json", firebase: "src/lib/firebase/**/*", diff --git a/ts/env-helper.js.map b/ts/env-helper.js.map index 6b62fc2ddf..1efcb3cfa5 100644 --- a/ts/env-helper.js.map +++ b/ts/env-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"env-helper.js","sourceRoot":"","sources":["env-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA2B;AAC3B,2DAA8C;AAC9C,8CAAiC;AAEpB,QAAA,IAAI,GAAG;IAChB,aAAa,EAAE,eAAe;IAC9B,iBAAiB,EAAE,mBAAmB;IACtC,qBAAqB,EAAE,uBAAuB;IAC9C,eAAe,EAAE,iBAAiB;IAClC,QAAQ,EAAE,UAAU;IACpB,mBAAmB,EAAE,qBAAqB;IAC1C,8BAA8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,CAAC,kBAAU,CAAC,KAAK,EAAE,IAAI,CAAC,kBAAU,CAAC,OAAO,EAAE,CAAA;IACvD,CAAC;IACD,WAAW;QACP,IAAG,kBAAU,CAAC,WAAW,EAAE;YAAC,OAAO,kBAAU,CAAC,WAAW,CAAA;SAAC;QAC1D,IAAG,kBAAU,CAAC,KAAK,EAAE,EAAE;YAAC,OAAO,kBAAU,CAAC,GAAG,CAAA;SAAC;QAC9C,IAAG,kBAAU,CAAC,SAAS,EAAE,EAAE;YAAC,OAAO,kBAAU,CAAC,OAAO,CAAA;SAAC;QACtD,OAAO,kBAAU,CAAC,GAAG,CAAA;IACzB,CAAC;IACD,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,SAAS;QACL,OAAO,OAAO,MAAM,KAAK,WAAW,CAAA;IACxC,CAAC;CACJ,CAAA"} \ No newline at end of file diff --git a/ts/env-helper.ts b/ts/env-helper.ts index e88d247dcc..baf5886a3f 100644 --- a/ts/env-helper.ts +++ b/ts/env-helper.ts @@ -29,6 +29,7 @@ export let paths = { chcpLogin: ".chcplogin", sass: ["./src/scss/**/*.scss"], src: { + buildInfo: "src/data/build-info.json", defaultPrivateConfig: "src/default.private_config.json", devCredentials: "src/dev-credentials.json", firebase: "src/lib/firebase/**/*", diff --git a/ts/qm.file-helper.js b/ts/qm.file-helper.js index a22e0763d7..371c94ee87 100644 --- a/ts/qm.file-helper.js +++ b/ts/qm.file-helper.js @@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.listFilesRecursively = exports.uploadFolderToS3 = exports.download = exports.getAbsolutePath = exports.writeToFile = exports.uploadToS3 = exports.uploadToS3InSubFolderWithCurrentDateTime = exports.downloadFromS3 = exports.getS3Client = exports.deleteFile = exports.createFile = exports.exists = exports.assertExists = exports.assertDoesNotExist = void 0; +exports.readJsonFile = exports.listFilesRecursively = exports.uploadFolderToS3 = exports.download = exports.getAbsolutePath = exports.writeToFile = exports.uploadToS3 = exports.uploadToS3InSubFolderWithCurrentDateTime = exports.downloadFromS3 = exports.getS3Client = exports.deleteFile = exports.createFile = exports.exists = exports.assertExists = exports.assertDoesNotExist = void 0; // noinspection JSUnusedGlobalSymbols,JSUnusedGlobalSymbols var aws_sdk_1 = __importDefault(require("aws-sdk")); var fs = __importStar(require("fs")); @@ -255,4 +255,15 @@ function listFilesRecursively(dir) { return deferred.promise; } exports.listFilesRecursively = listFilesRecursively; +function readJsonFile(jsonPath) { + try { + var content = fs.readFileSync(jsonPath).toString(); + return JSON.parse(content); + } + catch (e) { + qmLog.error("Could not read " + jsonPath); + return false; + } +} +exports.readJsonFile = readJsonFile; //# sourceMappingURL=qm.file-helper.js.map \ No newline at end of file diff --git a/ts/qm.file-helper.js.map b/ts/qm.file-helper.js.map index ebb40d2548..baa13698be 100644 --- a/ts/qm.file-helper.js.map +++ b/ts/qm.file-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"qm.file-helper.js","sourceRoot":"","sources":["qm.file-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA2D;AAC3D,oDAAyB;AACzB,qCAAwB;AACxB,2CAA8B;AAC9B,yCAA4B;AAC5B,yCAA4B;AAC5B,mCAAsB;AACtB,kDAA2B;AAC3B,2CAAoD;AACpD,8CAAiC;AACjC,IAAM,eAAe,GAAG,UAAU,CAAA;AAClC,SAAgB,kBAAkB,CAAC,QAAgB;IAC/C,IAAM,GAAG,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAA;IACrC,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QACpB,MAAM,KAAK,CAAC,GAAG,GAAG,UAAU,CAAC,CAAA;KAChC;AACL,CAAC;AALD,gDAKC;AAED,SAAgB,YAAY,CAAC,QAAgB;IACzC,IAAM,GAAG,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAA;IACrC,IAAI,C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AC,CAAC,CAAA;QACN,CAAC,CAAC,EAAE,CAAA;IACR,CAAC,CAAC,CAAA;IACF,OAAO,QAAQ,CAAC,OAAO,CAAA;AAC3B,CAAC;AA9BD,oDA8BC;AAED,SAAgB,YAAY,CAAC,QAAgB;IACzC,IAAI;QACA,IAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAA;QACpD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;KAC7B;IAAC,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,KAAK,CAAC,iBAAiB,GAAC,QAAQ,CAAC,CAAA;QACvC,OAAO,KAAK,CAAA;KACf;AACL,CAAC;AARD,oCAQC"} \ No newline at end of file diff --git a/ts/qm.file-helper.ts b/ts/qm.file-helper.ts index 07b5be1580..929aae6c18 100644 --- a/ts/qm.file-helper.ts +++ b/ts/qm.file-helper.ts @@ -8,6 +8,7 @@ import * as Q from "q" import rimraf from "rimraf" import {envs, getenvOrException} from "./env-helper" import * as qmLog from "./qm.log" +import {missingRequiredParameter} from "./qm.log" const defaultS3Bucket = "qmimages" export function assertDoesNotExist(relative: string) { const abs = getAbsolutePath(relative) @@ -235,3 +236,13 @@ export function listFilesRecursively(dir: string) { }) return deferred.promise } + +export function readJsonFile(jsonPath: string ) { + try { + const content = fs.readFileSync(jsonPath).toString() + return JSON.parse(content) + } catch (e) { + qmLog.error("Could not read "+jsonPath) + return false + } +} diff --git a/ts/qm.git.js b/ts/qm.git.js index 6c37228f2a..a252751758 100644 --- a/ts/qm.git.js +++ b/ts/qm.git.js @@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.createFeatureBranch = exports.deleteLocalFeatureBranches = exports.getBranchName = exports.createCommitComment = exports.setGithubStatus = exports.githubStatusStates = exports.getRepoUserName = exports.getRepoName = exports.getRepoParts = exports.getRepoUrl = exports.getCurrentGitCommitSha = exports.getOctoKit = void 0; +exports.createFeatureBranch = exports.deleteLocalFeatureBranches = exports.getBranchName = exports.createCommitComment = exports.setGithubStatus = exports.githubStatusStates = exports.getRepoUserName = exports.getRepoName = exports.getRepoParts = exports.getRepoUrl = exports.getAccessToken = exports.getCurrentGitCommitSha = exports.getOctoKit = void 0; var rest_1 = __importDefault(require("@octokit/rest")); // @ts-ignore var git = __importStar(require("simple-git")); @@ -34,7 +34,7 @@ var test_helpers_1 = require("./test-helpers"); // tslint:disable-next-line:no-var-requires var qm = require("../src/js/qmHelpers.js"); function getOctoKit() { - return new rest_1.default({ auth: env_helper_1.getGithubAccessToken() }); + return new rest_1.default({ auth: getAccessToken() }); } exports.getOctoKit = getOctoKit; function getCurrentGitCommitSha() { @@ -61,6 +61,18 @@ function getCurrentGitCommitSha() { } } exports.getCurrentGitCommitSha = getCurrentGitCommitSha; +function getAccessToken() { + var t = process.env.GITHUB_ACCESS_TOKEN_FOR_STATUS || process.env.GITHUB_ACCESS_TOKEN || process.env.GH_TOKEN; + if (!t) { + env_helper_1.loadEnv("local"); + t = process.env.GITHUB_ACCESS_TOKEN_FOR_STATUS || process.env.GITHUB_ACCESS_TOKEN || process.env.GH_TOKEN; + } + if (!t) { + throw new Error("Please set GITHUB_ACCESS_TOKEN or GH_TOKEN env"); + } + return t; +} +exports.getAccessToken = getAccessToken; function getRepoUrl() { if (process.env.REPOSITORY_URL_FOR_STATUS) { return process.env.REPOSITORY_URL_FOR_STATUS; diff --git a/ts/qm.git.js.map b/ts/qm.git.js.map index 1b130836ab..552c92e8b9 100644 --- a/ts/qm.git.js.map +++ b/ts/qm.git.js.map @@ -1 +1 @@ -{"version":3,"file":"qm.git.js","sourceRoot":"","sources":["qm.git.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAmC;AACnC,aAAa;AACb,8CAAiC;AACjC,wEAAoC;AACpC,2CAAwE;AACxE,8CAAiC;A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,gEAQC;AACD,SAAgB,mBAAmB,CAAC,WAAmB;IACnD,IAAM,UAAU,GAAG,UAAU,GAAG,WAAW,CAAA;IAC3C,IAAI;QACA,OAAO,CAAC,oBAAoB,CAAC,qBAAmB,UAAU,aAAU,EAAE,KAAK,CAAC,CAAA;KAC/E;IAAC,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACd,OAAM;KACT;AACL,CAAC;AARD,kDAQC"} \ No newline at end of file diff --git a/ts/qm.log.js b/ts/qm.log.js index 490bf249ad..bb59c55c46 100644 --- a/ts/qm.log.js +++ b/ts/qm.log.js @@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.logErrorAndThrowException = exports.slugify = exports.throwError = exports.getCurrentServerContext = exports.logBugsnagLink = exports.prettyJSONStringify = exports.obfuscateSecrets = exports.obfuscateString = exports.isSecretWord = exports.obfuscateStringify = exports.addMetaData = exports.debug = exports.info = exports.error = void 0; +exports.missingRequiredParameter = exports.le = exports.logErrorAndThrowException = exports.slugify = exports.throwError = exports.getCurrentServerContext = exports.logBugsnagLink = exports.prettyJSONStringify = exports.obfuscateSecrets = exports.obfuscateString = exports.isSecretWord = exports.obfuscateStringify = exports.addMetaData = exports.debug = exports.info = exports.error = void 0; var js_1 = __importDefault(require("@bugsnag/js")); // @ts-ignore var qmHelpers_js_1 = __importDefault(require("../src/js/qmHelpers.js")); @@ -166,4 +166,13 @@ function logErrorAndThrowException(message, object) { throw message; } exports.logErrorAndThrowException = logErrorAndThrowException; +function le(message, object) { + error(message, object); + throw message; +} +exports.le = le; +function missingRequiredParameter(paramName, funcName) { + le("Please provide " + paramName + " to " + funcName); +} +exports.missingRequiredParameter = missingRequiredParameter; //# sourceMappingURL=qm.log.js.map \ No newline at end of file diff --git a/ts/qm.log.js.map b/ts/qm.log.js.map index f8464a043e..761175d3b0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AAA;IACtB,MAAM,OAAO,CAAA;AACjB,CAAC;AAHD,8DAGC;AAED,SAAgB,EAAE,CAAC,OAAe,EAAE,MAAY;IAC5C,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IACtB,MAAM,OAAO,CAAA;AACjB,CAAC;AAHD,gBAGC;AAED,SAAgB,wBAAwB,CAAC,SAAiB,EAAE,QAAgB;IACxE,EAAE,CAAC,iBAAiB,GAAC,SAAS,GAAC,MAAM,GAAC,QAAQ,CAAC,CAAA;AACnD,CAAC;AAFD,4DAEC"} \ No newline at end of file diff --git a/ts/qm.log.ts b/ts/qm.log.ts index 131f2be896..e3366b5b42 100644 --- a/ts/qm.log.ts +++ b/ts/qm.log.ts @@ -161,3 +161,12 @@ export function logErrorAndThrowException(message: string, object?: any) { error(message, object) throw message } + +export function le(message: string, object?: any) { + error(message, object) + throw message +} + +export function missingRequiredParameter(paramName: string, funcName: string) { + le("Please provide "+paramName+" to "+funcName) +} From dc1348e56a86ba14f5cae4eba4e00e9b1ce4fbd2 Mon Sep 17 00:00:00 2001 From: mikepsinn Date: Sat, 3 Jul 2021 13:40:03 -0500 Subject: [PATCH 3/3] Docs --- docs/logs.md | 1 + docs/testing.md | 7 +++++++ ts/qm.git.js | 16 ++-------------- ts/qm.git.js.map | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) create mode 100644 docs/logs.md create mode 100644 docs/testing.md diff --git a/docs/logs.md b/docs/logs.md new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/docs/logs.md @@ -0,0 +1 @@ + diff --git a/docs/testing.md b/docs/testing.md new file mode 100644 index 0000000000..e15726d2df --- /dev/null +++ b/docs/testing.md @@ -0,0 +1,7 @@ +# Integration Tests + +## Heroku Test App +https://dashboard.heroku.com/apps/medimodo + +### Logs +https://dashboard.heroku.com/apps/medimodo/resources diff --git a/ts/qm.git.js b/ts/qm.git.js index a252751758..6c37228f2a 100644 --- a/ts/qm.git.js +++ b/ts/qm.git.js @@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.createFeatureBranch = exports.deleteLocalFeatureBranches = exports.getBranchName = exports.createCommitComment = exports.setGithubStatus = exports.githubStatusStates = exports.getRepoUserName = exports.getRepoName = exports.getRepoParts = exports.getRepoUrl = exports.getAccessToken = exports.getCurrentGitCommitSha = exports.getOctoKit = void 0; +exports.createFeatureBranch = exports.deleteLocalFeatureBranches = exports.getBranchName = exports.createCommitComment = exports.setGithubStatus = exports.githubStatusStates = exports.getRepoUserName = exports.getRepoName = exports.getRepoParts = exports.getRepoUrl = exports.getCurrentGitCommitSha = exports.getOctoKit = void 0; var rest_1 = __importDefault(require("@octokit/rest")); // @ts-ignore var git = __importStar(require("simple-git")); @@ -34,7 +34,7 @@ var test_helpers_1 = require("./test-helpers"); // tslint:disable-next-line:no-var-requires var qm = require("../src/js/qmHelpers.js"); function getOctoKit() { - return new rest_1.default({ auth: getAccessToken() }); + return new rest_1.default({ auth: env_helper_1.getGithubAccessToken() }); } exports.getOctoKit = getOctoKit; function getCurrentGitCommitSha() { @@ -61,18 +61,6 @@ function getCurrentGitCommitSha() { } } exports.getCurrentGitCommitSha = getCurrentGitCommitSha; -function getAccessToken() { - var t = process.env.GITHUB_ACCESS_TOKEN_FOR_STATUS || process.env.GITHUB_ACCESS_TOKEN || process.env.GH_TOKEN; - if (!t) { - env_helper_1.loadEnv("local"); - t = process.env.GITHUB_ACCESS_TOKEN_FOR_STATUS || process.env.GITHUB_ACCESS_TOKEN || process.env.GH_TOKEN; - } - if (!t) { - throw new Error("Please set GITHUB_ACCESS_TOKEN or GH_TOKEN env"); - } - return t; -} -exports.getAccessToken = getAccessToken; function getRepoUrl() { if (process.env.REPOSITORY_URL_FOR_STATUS) { return process.env.REPOSITORY_URL_FOR_STATUS; diff --git a/ts/qm.git.js.map b/ts/qm.git.js.map index 552c92e8b9..1b130836ab 100644 --- a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