{"size": 12141, "ext": "js", "max_stars_repo_path": ".vscode/extensions/salesforce.salesforcedx-vscode-apex-replay-debugger-54.6.1/node_modules/@salesforce/salesforcedx-utils-vscode/out/src/helpers/index.js", "max_stars_repo_name": "DeepakAvattotte21/DevOpsDemo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": ".vscode/extensions/salesforce.salesforcedx-vscode-apex-replay-debugger-54.6.1/node_modules/@salesforce/salesforcedx-utils-vscode/out/src/helpers/index.js", "max_issues_repo_name": "DeepakAvattotte21/DevOpsDemo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": ".vscode/extensions/salesforce.salesforcedx-vscode-apex-replay-debugger-54.6.1/node_modules/@salesforce/salesforcedx-utils-vscode/out/src/helpers/index.js", "max_forks_repo_name": "DeepakAvattotte21/DevOpsDemo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 6070.5, "max_line_length": 12107, "alphanum_fraction": 0.7575982209}
module.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(10),r=n(3);t.nls=new o.Localization(function(e){const t=new o.Message(r.messages);if(!e||!e.locale||e.locale===o.DEFAULT_LOCALE)return t;try{return new o.Message(n(14)("./"+(i=e.locale,i===o.DEFAULT_LOCALE?`${o.BASE_FILE_NAME}.${o.BASE_FILE_EXTENSION}`:`${o.BASE_FILE_NAME}.${i}.${o.BASE_FILE_EXTENSION}`)).messages,t)}catch(n){return console.error(`Cannot find ${e.locale}, defaulting to en`),t}var i}(function(){const e=process.env.VSCODE_NLS_CONFIG;return e?JSON.parse(e):null}()))},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("util")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.messages={sfdx_cli_not_found:"Salesforce CLI is not installed. Install it from [%s](%s)",telemetry_legal_dialog_message:"You agree that Salesforce Extensions for VS Code may collect usage information, user environment, and crash reports for product improvements. Learn how to [opt out](%s).",telemetry_legal_dialog_button_text:"Read more",progress_notification_text:"Running %s",notification_successful_execution_text:"%s successfully ran",notification_canceled_execution_text:"%s was canceled",notification_unsuccessful_execution_text:"%s failed to run",notification_show_button_text:"Show",notification_show_in_status_bar_button_text:"Show Only in Status Bar",error_no_default_username:'No default org is set. Run "SFDX: Create a Default Scratch Org" or "SFDX: Authorize an Org" to set one.',channel_name:"Salesforce CLI",channel_starting_message:"Starting ",channel_end_with_exit_code:"ended with exit code %s",channel_end_with_sfdx_not_found:"Salesforce CLI is not installed. Install it from https://developer.salesforce.com/tools/sfdxcli",channel_end_with_error:"ended with error %s",channel_end:"ended",predicates_no_folder_opened_text:"No folder opened. Open a Salesforce DX project in VS Code.",predicates_no_sfdx_project_found_text:"No sfdx-project.json found in the root directory of your open project. Open a Salesforce DX project in VS Code.",trace_flags_unknown_user:"Unknown user",trace_flags_failed_to_create_debug_level:"Failed to create a debug level"}},function(e,t){e.exports=require("fs")},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.messages={sfdx_cli_not_found:"Salesforce CLI がインストールされていません。[%s](%s) からインストールしてください。",telemetry_legal_dialog_message:"VS Code の Salesforce 拡張機能が製品の改善のために、利用状況、ユーザ環境、クラッシュレポートを収集することに同意しました。[オプトアウトの方法について参照する](%s)。",telemetry_legal_dialog_button_text:"さらに表示",progress_notification_text:"%s を実行しています。",notification_successful_execution_text:"%s が正常に実行されました。",notification_canceled_execution_text:"%s がキャンセルされました。",notification_unsuccessful_execution_text:"%s が失敗しました。",notification_show_button_text:"表示",notification_show_in_status_bar_button_text:"ステータスバーだけに表示",error_no_default_username:'デフォルトの組織が設定されていません。"SFDX: デフォルトのスクラッチ組織を作成" または "SFDX: 組織を認証" を実行し組織を設定してください。',channel_name:"Salesforce CLI",channel_starting_message:"開始しています: ",channel_end_with_exit_code:"が終了コード %s で終了しました。",channel_end_with_sfdx_not_found:"Salesforce CLI がインストールされていません。https://developer.salesforce.com/tools/sfdxcli からインストールしてください。",channel_end_with_error:"がエラーで終了しました。%s",channel_end:"が終了しました。",predicates_no_folder_opened_text:"フォルダが開かれていません。VS Code で Salesforce DX 形式のプロジェクトを開いてください。",predicates_no_sfdx_project_found_text:"開かれたプロジェクトのルートディレクトリに sfdx-project.json ファイルが見つかりませんでした。VS Code で Salesforce DX 形式のプロジェクトを開いてください。"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(32);t.isNullOrUndefined=o.isNullOrUndefined,t.extractJsonObject=o.extractJsonObject;var r=n(33);t.isAlphaNumString=r.isAlphaNumString,t.isInteger=r.isInteger,t.isIntegerInRange=r.isIntegerInRange,t.isAlphaNumSpaceString=r.isAlphaNumSpaceString,t.isRecordIdFormat=r.isRecordIdFormat;var i=n(34);t.ensureDirectoryExists=i.ensureDirectoryExists,t.getTestResultsFolder=i.getTestResultsFolder,t.getRelativeProjectPath=i.getRelativeProjectPath,t.fileExtensionsMatch=i.fileExtensionsMatch;var s=n(24);t.TraceFlags=s.TraceFlags;var a=n(35);t.TraceFlagsRemover=a.TraceFlagsRemover},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(11);t.BASE_FILE_EXTENSION=o.BASE_FILE_EXTENSION,t.BASE_FILE_NAME=o.BASE_FILE_NAME,t.DEFAULT_LOCALE=o.DEFAULT_LOCALE,t.Localization=o.Localization,t.Message=o.Message,t.MISSING_LABEL_MSG=o.MISSING_LABEL_MSG},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2);t.BASE_FILE_NAME="i18n",t.BASE_FILE_EXTENSION="js",t.DEFAULT_LOCALE="en",t.MISSING_LABEL_MSG="!!! MISSING LABEL !!!";t.Localization=class{constructor(e){this.delegate=e}localize(e,...t){return this.delegate.localize(e,...t)}};t.Message=class{constructor(e,t){this.messages=e,this.delegate=t}localize(e,...n){let r=this.getLabel(e);if(!r)return console.warn("Missing label for key: "+e),r=`${t.MISSING_LABEL_MSG} ${e}`,n.length>=1&&n.forEach(e=>{r+=` (${e})`}),r;if(n.length>=1){const t=r.split("%s").length-1;return n.length!==t&&console.log(`Arguments do not match for label '${e}', got ${n.length} but want ${t}`),n.unshift(r),o.format.apply(o,n)}return r}getLabel(e){return this.messages[e]?this.messages[e]:this.delegate?this.delegate.messages[e]:void 0}}},,,function(e,t,n){var o={"./":0,"./i18n":3,"./i18n.ja":7,"./i18n.ja.ts":7,"./i18n.ts":3,"./index":0,"./index.ts":0};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=14},,,,,,,,,,function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function s(e){try{c(o.next(e))}catch(e){i(e)}}function a(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const r=n(8),i=n(0);t.TraceFlags=class{constructor(e){this.LOG_TIMER_LENGTH_MINUTES=30,this.MILLISECONDS_PER_MINUTE=6e4,this.connection=e}ensureTraceFlags(){return o(this,void 0,void 0,(function*(){const e=this.connection.getUsername();if(!e)throw new Error(i.nls.localize("error_no_default_username"));const t=(yield this.getUserIdOrThrow(e)).Id,n=yield this.getTraceFlagForUser(t);if(n){if(!(yield this.updateDebugLevel(n.DebugLevelId)))return!1;const e=this.calculateExpirationDate(n.ExpirationDate?new Date(n.ExpirationDate):new Date);return yield this.updateTraceFlag(n.Id,e)}{const e=yield this.createDebugLevel();if(!e)throw new Error(i.nls.localize("trace_flags_failed_to_create_debug_level"));const n=this.calculateExpirationDate(new Date);if(!(yield this.createTraceFlag(t,e,n)))return!1}return!0}))}updateDebugLevel(e){return o(this,void 0,void 0,(function*(){const t={Id:e,ApexCode:"FINEST",Visualforce:"FINER"};return(yield this.connection.tooling.update("DebugLevel",t)).success}))}createDebugLevel(){return o(this,void 0,void 0,(function*(){const e="ReplayDebuggerLevels"+Date.now(),t={developerName:e,MasterLabel:e,ApexCode:"FINEST",Visualforce:"FINER"},n=yield this.connection.tooling.create("DebugLevel",t);return n.success&&n.id?n.id:void 0}))}updateTraceFlag(e,t){return o(this,void 0,void 0,(function*(){const n={Id:e,StartDate:Date.now(),ExpirationDate:t.toUTCString()};return(yield this.connection.tooling.update("TraceFlag",n)).success}))}createTraceFlag(e,t,n){return o(this,void 0,void 0,(function*(){const o={tracedentityid:e,logtype:"developer_log",debuglevelid:t,StartDate:Date.now(),ExpirationDate:n.toUTCString()},i=yield this.connection.tooling.create("TraceFlag",o);return i.success&&i.id?(r.TraceFlagsRemover.getInstance(this.connection).addNewTraceFlagId(i.id),i.id):void 0}))}isValidDateLength(e){const t=(new Date).valueOf();return e.getTime()-t>this.LOG_TIMER_LENGTH_MINUTES*this.MILLISECONDS_PER_MINUTE}calculateExpirationDate(e){return this.isValidDateLength(e)||(e=new Date(Date.now()+this.LOG_TIMER_LENGTH_MINUTES*this.MILLISECONDS_PER_MINUTE)),e}getUserIdOrThrow(e){return o(this,void 0,void 0,(function*(){const t=`SELECT id FROM User WHERE username='${e}'`,n=yield this.connection.query(t);if(!n.totalSize||0===n.totalSize)throw new Error(i.nls.localize("trace_flags_unknown_user"));return n.records[0]}))}getTraceFlagForUser(e){return o(this,void 0,void 0,(function*(){const t=`\n      SELECT id, logtype, startdate, expirationdate, debuglevelid, debuglevel.apexcode, debuglevel.visualforce\n      FROM TraceFlag\n      WHERE logtype='DEVELOPER_LOG' AND TracedEntityId='${e}'\n    `,n=yield this.connection.tooling.query(t);if(n.totalSize>0)return n.records[0]}))}}},,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNullOrUndefined=function(e){return null==e},t.extractJsonObject=function(e){const t=e.substring(e.indexOf("{"),e.lastIndexOf("}")+1);return JSON.parse(t)}},function(e,t,n){"use strict";function o(e){return void 0!==e&&!/\D/.test(e)&&Number.isSafeInteger(Number.parseInt(e))}function r(e){return void 0!==e&&""!==e&&!/\W/.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isInteger=o,t.isIntegerInRange=function(e,t){return void 0!==e&&o(e)&&Number.parseInt(e)>=t[0]&&Number.parseInt(e)<=t[1]},t.isAlphaNumString=r,t.isRecordIdFormat=function(e="",t){return r(e)&&e.startsWith(t)&&(15===e.length||18===e.length)},t.isAlphaNumSpaceString=function(e){return void 0!==e&&/^\w+( *\w*)*$/.test(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(4),r=n(1);function i(e){o.existsSync(e)||(i(r.dirname(e)),o.mkdirSync(e))}t.ensureDirectoryExists=i,t.getTestResultsFolder=function(e,t){const n=r.join(e,".sfdx","tools","testresults",t);return i(n),n},t.getRelativeProjectPath=function(e="",t){let n;for(let o of t)if(o.startsWith(r.sep)||(o=r.sep+o),o.endsWith(r.sep)||(o+=r.sep),n=e.indexOf(o),-1!==n){n+=1;break}return-1!==n?e.slice(n):e},t.fileExtensionsMatch=function(e,t){var n;return(null===(n=e.path.split(".").pop())||void 0===n?void 0:n.toLowerCase())===t.toLowerCase()}},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function s(e){try{c(o.next(e))}catch(e){i(e)}}function a(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){if(this.newTraceFlagIds=new Array,!e)throw Error("connection passed to TraceFlagsRemover is invalid");this.connection=e}static getInstance(e){return r._instance||(r._instance=new r(e)),r._instance}static resetInstance(){r._instance=void 0}addNewTraceFlagId(e){e&&this.newTraceFlagIds.push(e)}removeNewTraceFlags(){return o(this,void 0,void 0,(function*(){for(;this.newTraceFlagIds&&this.newTraceFlagIds.length>0;){const e=this.newTraceFlagIds.pop();e&&(yield this.connection.tooling.delete("TraceFlag",e))}}))}}t.TraceFlagsRemover=r}]);
//# sourceMappingURL=index.js.map