dd-trace 5.8.0 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-3rdparty.csv +0 -1
- package/ci/init.js +3 -3
- package/package.json +5 -6
- package/packages/datadog-esbuild/index.js +2 -2
- package/packages/datadog-instrumentations/src/apollo-server.js +1 -1
- package/packages/datadog-instrumentations/src/apollo.js +5 -3
- package/packages/datadog-instrumentations/src/aws-sdk.js +4 -1
- package/packages/datadog-instrumentations/src/cassandra-driver.js +1 -1
- package/packages/datadog-instrumentations/src/cucumber.js +6 -2
- package/packages/datadog-instrumentations/src/fs.js +0 -1
- package/packages/datadog-instrumentations/src/google-cloud-pubsub.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/hooks.js +56 -56
- package/packages/datadog-instrumentations/src/helpers/instrument.js +2 -2
- package/packages/datadog-instrumentations/src/http/client.js +1 -0
- package/packages/datadog-instrumentations/src/jest.js +94 -15
- package/packages/datadog-instrumentations/src/kafkajs.js +6 -8
- package/packages/datadog-instrumentations/src/ldapjs.js +2 -1
- package/packages/datadog-instrumentations/src/mocha.js +1 -1
- package/packages/datadog-instrumentations/src/mongodb-core.js +3 -3
- package/packages/datadog-instrumentations/src/net.js +1 -1
- package/packages/datadog-instrumentations/src/oracledb.js +1 -1
- package/packages/datadog-instrumentations/src/passport-utils.js +1 -0
- package/packages/datadog-instrumentations/src/playwright.js +8 -2
- package/packages/datadog-instrumentations/src/rhea.js +5 -2
- package/packages/datadog-instrumentations/src/tedious.js +1 -1
- package/packages/datadog-plugin-apollo/src/gateway/fetch.js +1 -1
- package/packages/datadog-plugin-apollo/src/gateway/plan.js +0 -1
- package/packages/datadog-plugin-apollo/src/gateway/request.js +2 -17
- package/packages/datadog-plugin-apollo/src/gateway/validate.js +6 -2
- package/packages/datadog-plugin-aws-sdk/src/base.js +3 -3
- package/packages/datadog-plugin-aws-sdk/src/services/cloudwatchlogs.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/dynamodb.js +2 -2
- package/packages/datadog-plugin-aws-sdk/src/services/eventbridge.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/kinesis.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/lambda.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/redshift.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/s3.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/sns.js +1 -1
- package/packages/datadog-plugin-aws-sdk/src/services/sqs.js +2 -2
- package/packages/datadog-plugin-child_process/src/index.js +1 -1
- package/packages/datadog-plugin-couchbase/src/index.js +2 -1
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +1 -0
- package/packages/datadog-plugin-fetch/src/index.js +1 -1
- package/packages/datadog-plugin-graphql/src/resolve.js +1 -1
- package/packages/datadog-plugin-grpc/src/client.js +2 -2
- package/packages/datadog-plugin-grpc/src/server.js +2 -2
- package/packages/datadog-plugin-http/src/client.js +2 -2
- package/packages/datadog-plugin-http2/src/client.js +4 -3
- package/packages/datadog-plugin-jest/src/index.js +1 -0
- package/packages/datadog-plugin-kafkajs/src/consumer.js +1 -1
- package/packages/datadog-plugin-kafkajs/src/producer.js +1 -1
- package/packages/datadog-plugin-next/src/index.js +1 -1
- package/packages/datadog-plugin-openai/src/index.js +4 -4
- package/packages/datadog-plugin-playwright/src/index.js +7 -2
- package/packages/datadog-plugin-rhea/src/consumer.js +1 -1
- package/packages/datadog-plugin-rhea/src/producer.js +1 -1
- package/packages/datadog-plugin-router/src/index.js +1 -1
- package/packages/datadog-plugin-tedious/src/index.js +1 -1
- package/packages/dd-trace/src/appsec/blocking.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/analyzers.js +17 -17
- package/packages/dd-trace/src/appsec/iast/analyzers/cookie-analyzer.js +1 -0
- package/packages/dd-trace/src/appsec/iast/analyzers/hardcoded-secrets-rules.js +132 -132
- package/packages/dd-trace/src/appsec/iast/analyzers/hsts-header-missing-analyzer.js +1 -0
- package/packages/dd-trace/src/appsec/iast/analyzers/nosql-injection-mongodb-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/analyzers/weak-hash-analyzer.js +6 -2
- package/packages/dd-trace/src/appsec/iast/overhead-controller.js +2 -1
- package/packages/dd-trace/src/appsec/iast/taint-tracking/index.js +3 -3
- package/packages/dd-trace/src/appsec/iast/taint-tracking/plugin.js +4 -4
- package/packages/dd-trace/src/appsec/iast/taint-tracking/taint-tracking-impl.js +1 -1
- package/packages/dd-trace/src/appsec/iast/telemetry/namespaces.js +27 -18
- package/packages/dd-trace/src/appsec/iast/telemetry/span-tags.js +1 -1
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/evidence-redaction/sensitive-analyzers/sql-sensitive-analyzer.js +1 -1
- package/packages/dd-trace/src/appsec/iast/vulnerabilities-formatter/utils.js +7 -4
- package/packages/dd-trace/src/appsec/waf/waf_context_wrapper.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +9 -3
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +2 -1
- package/packages/dd-trace/src/ci-visibility/test-api-manual/test-api-manual-plugin.js +1 -0
- package/packages/dd-trace/src/config.js +16 -14
- package/packages/dd-trace/src/datastreams/pathway.js +1 -1
- package/packages/dd-trace/src/datastreams/processor.js +15 -15
- package/packages/dd-trace/src/encode/agentless-ci-visibility.js +2 -2
- package/packages/dd-trace/src/encode/coverage-ci-visibility.js +1 -1
- package/packages/dd-trace/src/exporters/common/request.js +1 -0
- package/packages/dd-trace/src/exporters/span-stats/writer.js +0 -1
- package/packages/dd-trace/src/external-logger/src/index.js +5 -5
- package/packages/dd-trace/src/opentelemetry/span.js +2 -0
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +1 -1
- package/packages/dd-trace/src/opentracing/span.js +1 -1
- package/packages/dd-trace/src/plugins/apollo.js +3 -1
- package/packages/dd-trace/src/plugins/ci_plugin.js +2 -1
- package/packages/dd-trace/src/plugins/composite.js +3 -4
- package/packages/dd-trace/src/plugins/database.js +1 -0
- package/packages/dd-trace/src/plugins/index.js +43 -43
- package/packages/dd-trace/src/plugins/plugin.js +1 -1
- package/packages/dd-trace/src/plugins/tracing.js +1 -1
- package/packages/dd-trace/src/plugins/util/git.js +33 -11
- package/packages/dd-trace/src/plugins/util/test.js +2 -1
- package/packages/dd-trace/src/plugins/util/web.js +4 -4
- package/packages/dd-trace/src/profiling/config.js +1 -1
- package/packages/dd-trace/src/profiling/loggers/console.js +1 -1
- package/packages/dd-trace/src/runtime_metrics.js +8 -5
- package/packages/dd-trace/src/serverless.js +3 -2
- package/packages/dd-trace/src/service-naming/schemas/v1/storage.js +0 -1
- package/packages/dd-trace/src/span_processor.js +2 -2
- package/packages/dd-trace/src/span_stats.js +1 -1
- package/packages/dd-trace/src/telemetry/dependencies.js +4 -5
- package/packages/dd-trace/src/telemetry/index.js +12 -13
- package/packages/dd-trace/src/telemetry/send-data.js +0 -1
- package/packages/dd-trace/src/util.js +7 -7
|
@@ -28,7 +28,7 @@ const {
|
|
|
28
28
|
const { filterSensitiveInfoFromRepository } = require('./url')
|
|
29
29
|
const { storage } = require('../../../../datadog-core')
|
|
30
30
|
|
|
31
|
-
const GIT_REV_LIST_MAX_BUFFER =
|
|
31
|
+
const GIT_REV_LIST_MAX_BUFFER = 12 * 1024 * 1024 // 12MB
|
|
32
32
|
|
|
33
33
|
function sanitizedExec (
|
|
34
34
|
cmd,
|
|
@@ -53,11 +53,15 @@ function sanitizedExec (
|
|
|
53
53
|
distributionMetric(durationMetric.name, durationMetric.tags, Date.now() - startTime)
|
|
54
54
|
}
|
|
55
55
|
return result
|
|
56
|
-
} catch (
|
|
56
|
+
} catch (err) {
|
|
57
57
|
if (errorMetric) {
|
|
58
|
-
incrementCountMetric(errorMetric.name, {
|
|
58
|
+
incrementCountMetric(errorMetric.name, {
|
|
59
|
+
...errorMetric.tags,
|
|
60
|
+
errorType: err.code,
|
|
61
|
+
exitCode: err.status || err.errno
|
|
62
|
+
})
|
|
59
63
|
}
|
|
60
|
-
log.error(
|
|
64
|
+
log.error(err)
|
|
61
65
|
return ''
|
|
62
66
|
} finally {
|
|
63
67
|
storage.enterWith(store)
|
|
@@ -129,7 +133,10 @@ function unshallowRepository () {
|
|
|
129
133
|
} catch (err) {
|
|
130
134
|
// If the local HEAD is a commit that has not been pushed to the remote, the above command will fail.
|
|
131
135
|
log.error(err)
|
|
132
|
-
incrementCountMetric(
|
|
136
|
+
incrementCountMetric(
|
|
137
|
+
TELEMETRY_GIT_COMMAND_ERRORS,
|
|
138
|
+
{ command: 'unshallow', errorType: err.code, exitCode: err.status || err.errno }
|
|
139
|
+
)
|
|
133
140
|
const upstreamRemote = sanitizedExec('git', ['rev-parse', '--abbrev-ref', '--symbolic-full-name', '@{upstream}'])
|
|
134
141
|
try {
|
|
135
142
|
cp.execFileSync('git', [
|
|
@@ -139,7 +146,10 @@ function unshallowRepository () {
|
|
|
139
146
|
} catch (err) {
|
|
140
147
|
// If the CI is working on a detached HEAD or branch tracking hasn’t been set up, the above command will fail.
|
|
141
148
|
log.error(err)
|
|
142
|
-
incrementCountMetric(
|
|
149
|
+
incrementCountMetric(
|
|
150
|
+
TELEMETRY_GIT_COMMAND_ERRORS,
|
|
151
|
+
{ command: 'unshallow', errorType: err.code, exitCode: err.status || err.errno }
|
|
152
|
+
)
|
|
143
153
|
// We use sanitizedExec here because if this last option fails, we'll give up.
|
|
144
154
|
sanitizedExec(
|
|
145
155
|
'git',
|
|
@@ -175,13 +185,16 @@ function getLatestCommits () {
|
|
|
175
185
|
return result
|
|
176
186
|
} catch (err) {
|
|
177
187
|
log.error(`Get latest commits failed: ${err.message}`)
|
|
178
|
-
incrementCountMetric(
|
|
188
|
+
incrementCountMetric(
|
|
189
|
+
TELEMETRY_GIT_COMMAND_ERRORS,
|
|
190
|
+
{ command: 'get_local_commits', errorType: err.status }
|
|
191
|
+
)
|
|
179
192
|
return []
|
|
180
193
|
}
|
|
181
194
|
}
|
|
182
195
|
|
|
183
196
|
function getCommitsRevList (commitsToExclude, commitsToInclude) {
|
|
184
|
-
let result =
|
|
197
|
+
let result = null
|
|
185
198
|
|
|
186
199
|
const commitsToExcludeString = commitsToExclude.map(commit => `^${commit}`)
|
|
187
200
|
|
|
@@ -205,7 +218,10 @@ function getCommitsRevList (commitsToExclude, commitsToInclude) {
|
|
|
205
218
|
.filter(commit => commit)
|
|
206
219
|
} catch (err) {
|
|
207
220
|
log.error(`Get commits to upload failed: ${err.message}`)
|
|
208
|
-
incrementCountMetric(
|
|
221
|
+
incrementCountMetric(
|
|
222
|
+
TELEMETRY_GIT_COMMAND_ERRORS,
|
|
223
|
+
{ command: 'get_objects', errorType: err.code, exitCode: err.status || err.errno } // err.status might be null
|
|
224
|
+
)
|
|
209
225
|
}
|
|
210
226
|
distributionMetric(TELEMETRY_GIT_COMMAND_MS, { command: 'get_objects' }, Date.now() - startTime)
|
|
211
227
|
return result
|
|
@@ -245,7 +261,10 @@ function generatePackFilesForCommits (commitsToUpload) {
|
|
|
245
261
|
result = execGitPackObjects(temporaryPath)
|
|
246
262
|
} catch (err) {
|
|
247
263
|
log.error(err)
|
|
248
|
-
incrementCountMetric(
|
|
264
|
+
incrementCountMetric(
|
|
265
|
+
TELEMETRY_GIT_COMMAND_ERRORS,
|
|
266
|
+
{ command: 'pack_objects', exitCode: err.status || err.errno, errorType: err.code }
|
|
267
|
+
)
|
|
249
268
|
/**
|
|
250
269
|
* The generation of pack files in the temporary folder (from `os.tmpdir()`)
|
|
251
270
|
* sometimes fails in certain CI setups with the error message
|
|
@@ -262,7 +281,10 @@ function generatePackFilesForCommits (commitsToUpload) {
|
|
|
262
281
|
result = execGitPackObjects(cwdPath)
|
|
263
282
|
} catch (err) {
|
|
264
283
|
log.error(err)
|
|
265
|
-
incrementCountMetric(
|
|
284
|
+
incrementCountMetric(
|
|
285
|
+
TELEMETRY_GIT_COMMAND_ERRORS,
|
|
286
|
+
{ command: 'pack_objects', exitCode: err.status || err.errno, errorType: err.code }
|
|
287
|
+
)
|
|
266
288
|
}
|
|
267
289
|
}
|
|
268
290
|
distributionMetric(TELEMETRY_GIT_COMMAND_MS, { command: 'pack_objects' }, Date.now() - startTime)
|
|
@@ -288,7 +288,8 @@ function getTestSuitePath (testSuiteAbsolutePath, sourceRoot) {
|
|
|
288
288
|
return sourceRoot
|
|
289
289
|
}
|
|
290
290
|
const testSuitePath = testSuiteAbsolutePath === sourceRoot
|
|
291
|
-
? testSuiteAbsolutePath
|
|
291
|
+
? testSuiteAbsolutePath
|
|
292
|
+
: path.relative(sourceRoot, testSuiteAbsolutePath)
|
|
292
293
|
|
|
293
294
|
return testSuitePath.replace(path.sep, '/')
|
|
294
295
|
}
|
|
@@ -63,7 +63,7 @@ const web = {
|
|
|
63
63
|
if (!span) return
|
|
64
64
|
|
|
65
65
|
span.context()._name = `${name}.request`
|
|
66
|
-
span.context()._tags
|
|
66
|
+
span.context()._tags.component = name
|
|
67
67
|
|
|
68
68
|
web.setConfig(req, config)
|
|
69
69
|
},
|
|
@@ -263,7 +263,7 @@ const web = {
|
|
|
263
263
|
const context = contexts.get(req)
|
|
264
264
|
const span = context.span
|
|
265
265
|
const error = context.error
|
|
266
|
-
const hasExistingError = span.context()._tags
|
|
266
|
+
const hasExistingError = span.context()._tags.error || span.context()._tags[ERROR_MESSAGE]
|
|
267
267
|
|
|
268
268
|
if (!hasExistingError && !context.config.validateStatus(statusCode)) {
|
|
269
269
|
span.setTag(ERROR, error || true)
|
|
@@ -405,7 +405,7 @@ function addAllowHeaders (req, res, headers) {
|
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
function isOriginAllowed (req, headers) {
|
|
408
|
-
const origin = req.headers
|
|
408
|
+
const origin = req.headers.origin
|
|
409
409
|
const allowOrigin = headers['access-control-allow-origin']
|
|
410
410
|
|
|
411
411
|
return origin && (allowOrigin === '*' || allowOrigin === origin)
|
|
@@ -498,7 +498,7 @@ function extractURL (req) {
|
|
|
498
498
|
return `${headers[HTTP2_HEADER_SCHEME]}://${headers[HTTP2_HEADER_AUTHORITY]}${headers[HTTP2_HEADER_PATH]}`
|
|
499
499
|
} else {
|
|
500
500
|
const protocol = getProtocol(req)
|
|
501
|
-
return `${protocol}://${req.headers
|
|
501
|
+
return `${protocol}://${req.headers.host}${req.originalUrl || req.url}`
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
|
|
@@ -238,12 +238,15 @@ function captureHistograms () {
|
|
|
238
238
|
*
|
|
239
239
|
* performance.eventLoopUtilization available in Node.js >= v14.10, >= v12.19, >= v16
|
|
240
240
|
*/
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
241
|
+
let captureELU = () => {}
|
|
242
|
+
if ('eventLoopUtilization' in performance) {
|
|
243
|
+
captureELU = () => {
|
|
244
|
+
// if elu is undefined (first run) the measurement is from start of process
|
|
245
|
+
elu = performance.eventLoopUtilization(elu)
|
|
244
246
|
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
+
client.gauge('runtime.node.event_loop.utilization', elu.utilization)
|
|
248
|
+
}
|
|
249
|
+
}
|
|
247
250
|
|
|
248
251
|
function captureCommonMetrics () {
|
|
249
252
|
captureMemoryUsage()
|
|
@@ -4,7 +4,7 @@ const log = require('./log')
|
|
|
4
4
|
|
|
5
5
|
function maybeStartServerlessMiniAgent (config) {
|
|
6
6
|
if (process.platform !== 'win32' && process.platform !== 'linux') {
|
|
7
|
-
log.error(
|
|
7
|
+
log.error('Serverless Mini Agent is only supported on Windows and Linux.')
|
|
8
8
|
return
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -34,7 +34,8 @@ function getRustBinaryPath (config) {
|
|
|
34
34
|
|
|
35
35
|
const rustBinaryPathRoot = config.isGCPFunction ? '/workspace' : '/home/site/wwwroot'
|
|
36
36
|
const rustBinaryPathOsFolder = process.platform === 'win32'
|
|
37
|
-
? 'datadog-serverless-agent-windows-amd64'
|
|
37
|
+
? 'datadog-serverless-agent-windows-amd64'
|
|
38
|
+
: 'datadog-serverless-agent-linux-amd64'
|
|
38
39
|
|
|
39
40
|
const rustBinaryExtension = process.platform === 'win32' ? '.exe' : ''
|
|
40
41
|
|
|
@@ -181,7 +181,7 @@ class SpanStatsProcessor {
|
|
|
181
181
|
const { bucketSizeNs } = this
|
|
182
182
|
const serializedBuckets = []
|
|
183
183
|
|
|
184
|
-
for (const [
|
|
184
|
+
for (const [timeNs, bucket] of this.buckets.entries()) {
|
|
185
185
|
const bucketAggStats = []
|
|
186
186
|
|
|
187
187
|
for (const stats of bucket.values()) {
|
|
@@ -12,7 +12,7 @@ const savedDependenciesToSend = new Set()
|
|
|
12
12
|
const detectedDependencyKeys = new Set()
|
|
13
13
|
const detectedDependencyVersions = new Set()
|
|
14
14
|
|
|
15
|
-
const FILE_URI_START =
|
|
15
|
+
const FILE_URI_START = 'file://'
|
|
16
16
|
const moduleLoadStartChannel = dc.channel('dd-trace:moduleLoadStart')
|
|
17
17
|
|
|
18
18
|
let immediate, config, application, host, initialLoad
|
|
@@ -21,12 +21,11 @@ let getRetryData
|
|
|
21
21
|
let updateRetryData
|
|
22
22
|
|
|
23
23
|
function createBatchPayload (payload) {
|
|
24
|
-
const batchPayload =
|
|
25
|
-
|
|
26
|
-
batchPayload.push({
|
|
24
|
+
const batchPayload = payload.map(item => {
|
|
25
|
+
return {
|
|
27
26
|
request_type: item.reqType,
|
|
28
27
|
payload: item.payload
|
|
29
|
-
}
|
|
28
|
+
}
|
|
30
29
|
})
|
|
31
30
|
|
|
32
31
|
return batchPayload
|
|
@@ -35,7 +35,7 @@ function updateRetryData (error, retryObj) {
|
|
|
35
35
|
if (retryObj.reqType === 'message-batch') {
|
|
36
36
|
const payload = retryObj.payload[0].payload
|
|
37
37
|
const reqType = retryObj.payload[0].request_type
|
|
38
|
-
retryData = { payload
|
|
38
|
+
retryData = { payload, reqType }
|
|
39
39
|
|
|
40
40
|
// Since this payload failed twice it now gets save in to the extended heartbeat
|
|
41
41
|
const failedPayload = retryObj.payload[1].payload
|
|
@@ -43,17 +43,17 @@ function updateRetryData (error, retryObj) {
|
|
|
43
43
|
|
|
44
44
|
// save away the dependencies and integration request for extended heartbeat.
|
|
45
45
|
if (failedReqType === 'app-integrations-change') {
|
|
46
|
-
if (extendedHeartbeatPayload
|
|
47
|
-
extendedHeartbeatPayload
|
|
46
|
+
if (extendedHeartbeatPayload.integrations) {
|
|
47
|
+
extendedHeartbeatPayload.integrations.push(failedPayload)
|
|
48
48
|
} else {
|
|
49
|
-
extendedHeartbeatPayload
|
|
49
|
+
extendedHeartbeatPayload.integrations = [failedPayload]
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
if (failedReqType === 'app-dependencies-loaded') {
|
|
53
|
-
if (extendedHeartbeatPayload
|
|
54
|
-
extendedHeartbeatPayload
|
|
53
|
+
if (extendedHeartbeatPayload.dependencies) {
|
|
54
|
+
extendedHeartbeatPayload.dependencies.push(failedPayload)
|
|
55
55
|
} else {
|
|
56
|
-
extendedHeartbeatPayload
|
|
56
|
+
extendedHeartbeatPayload.dependencies = [failedPayload]
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
} else {
|
|
@@ -187,12 +187,11 @@ function getTelemetryData () {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
function createBatchPayload (payload) {
|
|
190
|
-
const batchPayload =
|
|
191
|
-
|
|
192
|
-
batchPayload.push({
|
|
190
|
+
const batchPayload = payload.map(item => {
|
|
191
|
+
return {
|
|
193
192
|
request_type: item.reqType,
|
|
194
193
|
payload: item.payload
|
|
195
|
-
}
|
|
194
|
+
}
|
|
196
195
|
})
|
|
197
196
|
|
|
198
197
|
return batchPayload
|
|
@@ -202,10 +201,10 @@ function createPayload (currReqType, currPayload = {}) {
|
|
|
202
201
|
if (getRetryData()) {
|
|
203
202
|
const payload = { reqType: currReqType, payload: currPayload }
|
|
204
203
|
const batchPayload = createBatchPayload([payload, retryData])
|
|
205
|
-
return {
|
|
204
|
+
return { reqType: 'message-batch', payload: batchPayload }
|
|
206
205
|
}
|
|
207
206
|
|
|
208
|
-
return {
|
|
207
|
+
return { reqType: currReqType, payload: currPayload }
|
|
209
208
|
}
|
|
210
209
|
|
|
211
210
|
function heartbeat (config, application, host) {
|
|
@@ -32,13 +32,6 @@ function globMatch (pattern, subject) {
|
|
|
32
32
|
if (px < pattern.length) {
|
|
33
33
|
const c = pattern[px]
|
|
34
34
|
switch (c) {
|
|
35
|
-
default: // ordinary character
|
|
36
|
-
if (sx < subject.length && subject[sx] === c) {
|
|
37
|
-
px++
|
|
38
|
-
sx++
|
|
39
|
-
continue
|
|
40
|
-
}
|
|
41
|
-
break
|
|
42
35
|
case '?':
|
|
43
36
|
if (sx < subject.length) {
|
|
44
37
|
px++
|
|
@@ -51,6 +44,13 @@ function globMatch (pattern, subject) {
|
|
|
51
44
|
nextSx = sx + 1
|
|
52
45
|
px++
|
|
53
46
|
continue
|
|
47
|
+
default: // ordinary character
|
|
48
|
+
if (sx < subject.length && subject[sx] === c) {
|
|
49
|
+
px++
|
|
50
|
+
sx++
|
|
51
|
+
continue
|
|
52
|
+
}
|
|
53
|
+
break
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
if (nextSx > 0 && nextSx <= subject.length) {
|