@journeyapps/cloudcode
Advanced tools
Comparing version 0.0.0-dev.dc613a1 to 0.0.0-dev.ddc61d4
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Headers } from 'node-fetch'; | ||
@@ -3,0 +4,0 @@ import { URL, URLSearchParams } from 'url'; |
@@ -15,3 +15,2 @@ import { TaskContextBackend } from './TaskContextBackend'; | ||
private startTime; | ||
token: string; | ||
backend: TaskContextBackend; | ||
@@ -29,2 +28,3 @@ monitor: TaskMonitor; | ||
setToken(token: string): void; | ||
get token(): any; | ||
setBackend(opts: { | ||
@@ -31,0 +31,0 @@ baseUrl?: string; |
@@ -14,2 +14,3 @@ 'use strict'; | ||
const _backendUrl = Symbol(); | ||
const _token = Symbol(); | ||
class InternalTaskContext { | ||
@@ -24,3 +25,3 @@ constructor(opts) { | ||
this[_backendUrl] = opts.backendUrl; | ||
this.token = null; | ||
this[_token] = null; | ||
this.backend = new TaskContextBackend_1.TaskContextBackend(this[_backendUrl]); | ||
@@ -36,4 +37,9 @@ this.userContext = new TaskContext_1.TaskContext(this); | ||
setToken(token) { | ||
this.token = token; | ||
this[_token] = token; | ||
} | ||
get token() { | ||
// By having a non-enumerable getter instead of a direct writable property, we avoid broken versions of Rollbar | ||
// attempting to replace the token with '********'. | ||
return this[_token]; | ||
} | ||
setBackend(opts) { | ||
@@ -40,0 +46,0 @@ assert(this.token, 'No token set'); |
{ | ||
"name": "@journeyapps/cloudcode", | ||
"version": "0.0.0-dev.dc613a1", | ||
"version": "0.0.0-dev.ddc61d4", | ||
"main": "./dist/index", | ||
@@ -32,4 +32,3 @@ "types": "./dist/index", | ||
"build": "tsc --build" | ||
}, | ||
"readme": "# @journeyapps/cloudcode\n\nNode environment for CloudCode tasks.\n" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159429
2779