@disposabl/cli 4.0.0 → 4.1.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // auth.ts
4
4
  import { lock } from "proper-lockfile";
5
5
  // package.json
6
- var version = "4.0.0";
6
+ var version = "4.1.0";
7
7
  var package_default = {
8
8
  name: "@disposabl/cli",
9
9
  version,
@@ -535,10 +535,10 @@ import { Command } from "commander";
535
535
  // ../disposabl-kit/lib/observability.ts
536
536
  var traceparentPattern = /^00-([0-9a-f]{32})-([0-9a-f]{16})-01$/;
537
537
  function parseTraceparent(value) {
538
- const match = traceparentPattern.exec(value ?? "");
539
- if (!match || /^0+$/.test(match[1]) || /^0+$/.test(match[2]))
538
+ const [, traceId, parentSpanId] = traceparentPattern.exec(value ?? "") ?? [];
539
+ if (!traceId || !parentSpanId || /^0+$/.test(traceId) || /^0+$/.test(parentSpanId))
540
540
  return null;
541
- return { traceId: match[1], parentSpanId: match[2] };
541
+ return { traceId, parentSpanId };
542
542
  }
543
543
  function startSpan(parent) {
544
544
  const context = parseTraceparent(parent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@disposabl/cli",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "type": "module",
5
5
  "description": "Command-line access to your Disposabl app",
6
6
  "license": "MIT",