@zuplo/cli 7.3.1 → 7.4.1
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/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/cmds/lint.d.ts +9 -0
- package/dist/cmds/lint.d.ts.map +1 -0
- package/dist/cmds/lint.js +67 -0
- package/dist/cmds/lint.js.map +1 -0
- package/dist/lint/handler.d.ts +10 -0
- package/dist/lint/handler.d.ts.map +1 -0
- package/dist/lint/handler.js +60 -0
- package/dist/lint/handler.js.map +1 -0
- package/dist/lint/resolve-binary.d.ts +20 -0
- package/dist/lint/resolve-binary.d.ts.map +1 -0
- package/dist/lint/resolve-binary.js +71 -0
- package/dist/lint/resolve-binary.js.map +1 -0
- package/dist/lint/resolve-binary.test.d.ts +2 -0
- package/dist/lint/resolve-binary.test.d.ts.map +1 -0
- package/dist/lint/resolve-binary.test.js +155 -0
- package/dist/lint/resolve-binary.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@zuplo/core/customer.cli.minified.js +20 -20
- package/node_modules/@zuplo/core/index.minified.js +27 -27
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/out/esm/chunk-DFCQVD4U.js +26 -0
- package/node_modules/@zuplo/otel/out/esm/chunk-DFCQVD4U.js.map +1 -0
- package/node_modules/@zuplo/otel/out/esm/index.js +1 -1
- package/node_modules/@zuplo/otel/out/types/index.d.ts +23 -3
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-IZE65N7D.js +26 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-IZE65N7D.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-JKIKT5LB.js +409 -0
- package/node_modules/@zuplo/runtime/out/esm/chunk-JKIKT5LB.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +70 -72
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +6 -0
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +13 -6
- package/node_modules/@zuplo/otel/out/esm/chunk-6AFSG5YF.js +0 -26
- package/node_modules/@zuplo/otel/out/esm/chunk-6AFSG5YF.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-B3D32RUX.js +0 -26
- package/node_modules/@zuplo/runtime/out/esm/chunk-B3D32RUX.js.map +0 -1
- package/node_modules/@zuplo/runtime/out/esm/chunk-WH7LSEQF.js +0 -409
- package/node_modules/@zuplo/runtime/out/esm/chunk-WH7LSEQF.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-WH7LSEQF.js.LEGAL.txt → chunk-JKIKT5LB.js.LEGAL.txt} +0 -0
|
@@ -244,8 +244,9 @@ export declare type AIGatewayCapability =
|
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
246
|
* Loads the app configuration for the request (when auth or the configuration
|
|
247
|
-
* loader has not already)
|
|
248
|
-
* configuration
|
|
247
|
+
* loader has not already), runs the inbound policy chain from that
|
|
248
|
+
* configuration, and enforces limits inherited from parent teams or the
|
|
249
|
+
* gateway root.
|
|
249
250
|
*
|
|
250
251
|
* Place this policy on AI Gateway routes after optional authentication and
|
|
251
252
|
* optional `ai-gateway-configuration-loader-v2-inbound`. When either of those
|
|
@@ -274,6 +275,11 @@ export declare class AIGatewayConfigurationExecutorV2InboundPolicy extends Inbou
|
|
|
274
275
|
request: ZuploRequest,
|
|
275
276
|
context: ZuploContext
|
|
276
277
|
): Promise<ZuploRequest | Response>;
|
|
278
|
+
private enforceHierarchyLimits;
|
|
279
|
+
private emitHierarchyWarning;
|
|
280
|
+
private getConsumerSub;
|
|
281
|
+
private requestCapability;
|
|
282
|
+
private createQuotaExceededResponse;
|
|
277
283
|
}
|
|
278
284
|
|
|
279
285
|
/**
|
|
@@ -339,8 +345,9 @@ export declare interface AIGatewayConfigurationLoaderV2InboundPolicyOptions {
|
|
|
339
345
|
* identifiers, API keys and other credentials) using the in-gateway DLP
|
|
340
346
|
* engine, and applies per-rule actions: mask, block, or log. Detection runs
|
|
341
347
|
* entirely inside the gateway; nothing is sent to a third-party scanning
|
|
342
|
-
* service. Streaming responses are scanned as they stream
|
|
343
|
-
* with a sliding boundary window
|
|
348
|
+
* service. Streaming responses are scanned as they stream by default (chunk
|
|
349
|
+
* by chunk with a sliding boundary window); `streaming.mode: "buffer"`
|
|
350
|
+
* instead collects the whole response and scans it once as one document.
|
|
344
351
|
*
|
|
345
352
|
* Options are validated at request time and invalid options fail closed with
|
|
346
353
|
* a ConfigurationError. Content that cannot be inspected is denied by
|
|
@@ -361,13 +368,13 @@ export declare function AIGatewayDlpInboundPolicy(
|
|
|
361
368
|
): Promise<ZuploRequest | Response>;
|
|
362
369
|
|
|
363
370
|
/**
|
|
364
|
-
* The options for the Data Loss Prevention (DLP) policy. Scans the content of AI requests and responses — system prompts, messages, and tool-call arguments — for sensitive data such as credit cards, national identifiers, and API keys, applying a per-rule action (mask, block, or log). Detection runs entirely inside the gateway
|
|
371
|
+
* The options for the Data Loss Prevention (DLP) policy. Scans the content of AI requests and responses — system prompts, messages, and tool-call arguments — for sensitive data such as credit cards, national identifiers, and API keys, applying a per-rule action (mask, block, or log). Detection runs entirely inside the gateway; streaming responses are scanned as they stream (or collected and scanned whole with `streaming.mode: "buffer"`).
|
|
365
372
|
* @public
|
|
366
373
|
*/
|
|
367
374
|
export declare interface AIGatewayDlpInboundPolicyOptions {
|
|
368
375
|
rules: DlpRules;
|
|
369
376
|
/**
|
|
370
|
-
* Your own
|
|
377
|
+
* Your own detectors: a `name`, a regex `pattern`, and optional `context` words. A detector does nothing by itself — activate it by name inside `rules.inbound` or `rules.outbound`, exactly like a built-in type, with its own action, detection level, and mask per direction.
|
|
371
378
|
*/
|
|
372
379
|
customRules?: DlpCustomRule[];
|
|
373
380
|
/**
|
|
@@ -597,10 +604,7 @@ export declare interface AIGatewayMeteringInboundPolicyOptions {
|
|
|
597
604
|
}
|
|
598
605
|
|
|
599
606
|
/**
|
|
600
|
-
* Meters AI Gateway usage and enforces
|
|
601
|
-
*
|
|
602
|
-
* Limits configured on parent teams or the bucket root are enforced through a
|
|
603
|
-
* server-side hierarchical check.
|
|
607
|
+
* Meters AI Gateway usage and enforces limits configured by the application.
|
|
604
608
|
*
|
|
605
609
|
* The authentication policy must run before this policy so the app
|
|
606
610
|
* configuration id is available for meter storage and analytics.
|
|
@@ -668,7 +672,6 @@ export declare class AIGatewayMeteringV2InboundPolicy extends InboundPolicy<AIGa
|
|
|
668
672
|
): Promise<ZuploRequest | Response>;
|
|
669
673
|
private resolveConfiguration;
|
|
670
674
|
private fetchCurrentMeters;
|
|
671
|
-
private checkHierarchicalViolation;
|
|
672
675
|
private checkWarnings;
|
|
673
676
|
private hasWarning;
|
|
674
677
|
private findViolation;
|
|
@@ -2846,6 +2849,20 @@ export declare class BackgroundDispatcher<TPayload> {
|
|
|
2846
2849
|
options: BatchDispatcherOptions
|
|
2847
2850
|
);
|
|
2848
2851
|
enqueue: (payload: TPayload) => void;
|
|
2852
|
+
/**
|
|
2853
|
+
* Dispatches whatever is queued right now and waits for it — plus any
|
|
2854
|
+
* dispatch already in flight — to settle, without waiting out the batching
|
|
2855
|
+
* delay. Use this to drain deterministically at a shutdown or flush point.
|
|
2856
|
+
*/
|
|
2857
|
+
flush: () => Promise<void>;
|
|
2858
|
+
/**
|
|
2859
|
+
* Total payloads dropped because the queue was full (`maxQueueSize`).
|
|
2860
|
+
*
|
|
2861
|
+
* Dropping is silent data loss, so a caller that must report delivery
|
|
2862
|
+
* honestly can compare this before and after an {@link enqueue} to learn
|
|
2863
|
+
* whether that particular payload was accepted.
|
|
2864
|
+
*/
|
|
2865
|
+
get totalDropped(): number;
|
|
2849
2866
|
}
|
|
2850
2867
|
|
|
2851
2868
|
/**
|
|
@@ -4845,7 +4862,7 @@ declare interface DlpCustomPattern_2 {
|
|
|
4845
4862
|
|
|
4846
4863
|
declare interface DlpCustomRule {
|
|
4847
4864
|
/**
|
|
4848
|
-
*
|
|
4865
|
+
* The detector's name — the key you use to activate it inside `rules.inbound` or `rules.outbound`, exactly like a built-in type id. Must be distinct and must not reuse a built-in type id or group selector.
|
|
4849
4866
|
*/
|
|
4850
4867
|
name: string;
|
|
4851
4868
|
/**
|
|
@@ -4853,68 +4870,16 @@ declare interface DlpCustomRule {
|
|
|
4853
4870
|
*/
|
|
4854
4871
|
pattern: string;
|
|
4855
4872
|
/**
|
|
4856
|
-
* Context words for this
|
|
4873
|
+
* Context words for this detector. An activation with `detection: "corroborated"` then only fires when one of these words appears near the match.
|
|
4857
4874
|
*/
|
|
4858
4875
|
context?: string[];
|
|
4859
|
-
/**
|
|
4860
|
-
* What happens when this rule matches, in BOTH directions. `mask` replaces the matched text with a placeholder and the conversation continues; `block` rejects the request or terminates the response with an error naming only the rule's name (never the values); `log` records a finding and lets the traffic pass unchanged; `off` disables the rule. A rule states either `action` or the directional pair (`inboundAction`/`outboundAction`), never both.
|
|
4861
|
-
*/
|
|
4862
|
-
action?: "mask" | "block" | "log" | "off";
|
|
4863
|
-
/**
|
|
4864
|
-
* What happens when this rule matches in what callers send the model. Use with `outboundAction` to give the rule different behavior per direction. Omitting it (or `off`) leaves the inbound direction unscanned for this rule. Cannot be combined with `action`.
|
|
4865
|
-
*/
|
|
4866
|
-
inboundAction?: "mask" | "block" | "log" | "off";
|
|
4867
|
-
/**
|
|
4868
|
-
* What happens when this rule matches in what the model sends back. Omitting it (or `off`) leaves the outbound direction unscanned for this rule. Cannot be combined with `action`.
|
|
4869
|
-
*/
|
|
4870
|
-
outboundAction?: "mask" | "block" | "log" | "off";
|
|
4871
|
-
/**
|
|
4872
|
-
* How much evidence a match needs before this rule acts. `corroborated` additionally requires one of the type's context words near the match (types that define no context words behave as `standard`); `standard` uses the catalog as tuned — distinctive shapes act on their own while ambiguous shapes need nearby context; `aggressive` counts every pattern match and is false-positive-prone — pair it with the `log` action for audits. Overrides the policy-level `detection` for this rule.
|
|
4873
|
-
*/
|
|
4874
|
-
detection?: "corroborated" | "standard" | "aggressive";
|
|
4875
|
-
/**
|
|
4876
|
-
* Replacement text for this rule's masked matches. The `{type}` token inserts the detected type id in UPPER_SNAKE form, so the default turns a matched email into `[CONTACT_EMAIL]` — typed placeholders keep masked conversations legible to the model. Set a literal like `[REDACTED]` to hide the type.
|
|
4877
|
-
*/
|
|
4878
|
-
mask?: string;
|
|
4879
|
-
partialMask?: DlpPartialMask;
|
|
4880
|
-
}
|
|
4881
|
-
|
|
4882
|
-
declare interface DlpPartialMask {
|
|
4883
|
-
/**
|
|
4884
|
-
* Keep the last N characters of the matched value unmasked and replace the rest with `*`, preserving length (for example `**** **** **** 4242`). Values no longer than N characters are fully masked.
|
|
4885
|
-
*/
|
|
4886
|
-
keepLast: number;
|
|
4887
|
-
}
|
|
4888
|
-
|
|
4889
|
-
declare interface DlpRule {
|
|
4890
|
-
/**
|
|
4891
|
-
* What happens when this type is found, in BOTH directions. `mask` replaces the matched text with a placeholder and the conversation continues; `block` rejects the request or terminates the response with an error naming only the detected types (never the values); `log` records a finding and lets the traffic pass unchanged — use it to trial a rule before enforcing it; `off` excludes this type from a group enabled by a broader key. A rule states either `action` or the directional pair (`inboundAction`/`outboundAction`), never both.
|
|
4892
|
-
*/
|
|
4893
|
-
action?: "mask" | "block" | "log" | "off";
|
|
4894
|
-
/**
|
|
4895
|
-
* What happens when this type is found in what callers send the model (system prompt, message text, and tool-call arguments). Use with `outboundAction` to give one type different behavior per direction — for example mask PII on the way in and block it on the way out. Omitting it (or `off`) leaves the inbound direction unscanned for this type. Cannot be combined with `action`.
|
|
4896
|
-
*/
|
|
4897
|
-
inboundAction?: "mask" | "block" | "log" | "off";
|
|
4898
|
-
/**
|
|
4899
|
-
* What happens when this type is found in what the model sends back (buffered responses whole, streaming responses as they stream). Omitting it (or `off`) leaves the outbound direction unscanned for this type. Cannot be combined with `action`.
|
|
4900
|
-
*/
|
|
4901
|
-
outboundAction?: "mask" | "block" | "log" | "off";
|
|
4902
|
-
/**
|
|
4903
|
-
* How much evidence a match needs before this rule acts. `corroborated` additionally requires one of the type's context words near the match (types that define no context words behave as `standard`); `standard` uses the catalog as tuned — distinctive shapes act on their own while ambiguous shapes need nearby context; `aggressive` counts every pattern match and is false-positive-prone — pair it with the `log` action for audits. Overrides the policy-level `detection` for this rule.
|
|
4904
|
-
*/
|
|
4905
|
-
detection?: "corroborated" | "standard" | "aggressive";
|
|
4906
|
-
/**
|
|
4907
|
-
* Replacement text for this rule's masked matches. The `{type}` token inserts the detected type id in UPPER_SNAKE form, so the default turns a matched email into `[CONTACT_EMAIL]` — typed placeholders keep masked conversations legible to the model. Set a literal like `[REDACTED]` to hide the type.
|
|
4908
|
-
*/
|
|
4909
|
-
mask?: string;
|
|
4910
|
-
partialMask?: DlpPartialMask;
|
|
4911
4876
|
}
|
|
4912
4877
|
|
|
4913
4878
|
/**
|
|
4914
|
-
* What to find and what to do about it. Each key is a built-in data type id (like `id-us-ssn`)
|
|
4879
|
+
* What to find in this direction and what to do about it. Each key is a built-in data type id (like `id-us-ssn`), a group selector (like `pii` or `secret`, plus any dash-aligned id prefix such as `secret-aws`), or one of your custom detectors by name; each value is a rule object whose required `action` says what happens on a match. Types you do not mention are not scanned in this direction. The most specific key wins — an exact id beats a prefix beats a group — and the winning entry decides everything for its type in this direction. When one stretch of text matches multiple rules, the severest action wins (block > mask > log).
|
|
4915
4880
|
* @public
|
|
4916
4881
|
*/
|
|
4917
|
-
declare interface
|
|
4882
|
+
declare interface DlpDirectionRules {
|
|
4918
4883
|
contact?: DlpRule;
|
|
4919
4884
|
finance?: DlpRule;
|
|
4920
4885
|
"finance-us"?: DlpRule;
|
|
@@ -4998,23 +4963,56 @@ declare interface DlpRules {
|
|
|
4998
4963
|
"secret-terraform"?: DlpRule;
|
|
4999
4964
|
"secret-twilio"?: DlpRule;
|
|
5000
4965
|
"secret-zuplo"?: DlpRule;
|
|
4966
|
+
[k: string]: unknown;
|
|
4967
|
+
}
|
|
4968
|
+
|
|
4969
|
+
declare interface DlpPartialMask {
|
|
4970
|
+
/**
|
|
4971
|
+
* Keep the last N characters of the matched value unmasked and replace the rest with `*`, preserving length (for example `**** **** **** 4242`). Values no longer than N characters are fully masked.
|
|
4972
|
+
*/
|
|
4973
|
+
keepLast: number;
|
|
4974
|
+
}
|
|
4975
|
+
|
|
4976
|
+
declare interface DlpRule {
|
|
4977
|
+
/**
|
|
4978
|
+
* What happens when this rule matches in this direction. `mask` replaces the matched text with a placeholder and the conversation continues; `block` rejects the request or terminates the response with an error naming only the detected types (never the values); `log` records a finding and lets the traffic pass unchanged — use it to trial a rule before enforcing it; `off` excludes this type from a group enabled by a broader key in the same section.
|
|
4979
|
+
*/
|
|
4980
|
+
action: "mask" | "block" | "log" | "off";
|
|
4981
|
+
/**
|
|
4982
|
+
* How much evidence a match needs before this rule acts. `corroborated` additionally requires one of the type's context words near the match (types that define no context words behave as `standard`); `standard` uses the catalog as tuned — distinctive shapes act on their own while ambiguous shapes need nearby context; `aggressive` counts every pattern match and is false-positive-prone — pair it with the `log` action for audits. Overrides the policy-level `detection` for this rule.
|
|
4983
|
+
*/
|
|
4984
|
+
detection?: "corroborated" | "standard" | "aggressive";
|
|
4985
|
+
/**
|
|
4986
|
+
* Replacement text for this rule's masked matches. The `{type}` token inserts the detected type id in UPPER_SNAKE form, so the default turns a matched email into `[CONTACT_EMAIL]` — typed placeholders keep masked conversations legible to the model. Set a literal like `[REDACTED]` to hide the type.
|
|
4987
|
+
*/
|
|
4988
|
+
mask?: string;
|
|
4989
|
+
partialMask?: DlpPartialMask;
|
|
5001
4990
|
}
|
|
5002
4991
|
|
|
5003
4992
|
/**
|
|
5004
|
-
*
|
|
4993
|
+
* The scan configuration, split by direction: `inbound` covers what callers send the model (system prompt, message text, and tool-call arguments); `outbound` covers what the model sends back (buffered responses whole, streaming responses as they stream). Each direction you include is scanned; each you omit is left untouched — there is no "both" shorthand and no mirroring, so wanting the same behavior on both sides means stating it in both sections. At least one section must enable at least one rule.
|
|
4994
|
+
* @public
|
|
4995
|
+
*/
|
|
4996
|
+
declare interface DlpRules {
|
|
4997
|
+
inbound?: DlpDirectionRules;
|
|
4998
|
+
outbound?: DlpDirectionRules;
|
|
4999
|
+
}
|
|
5000
|
+
|
|
5001
|
+
/**
|
|
5002
|
+
* How streaming (SSE) responses are inspected. `stream` (the default) scans deltas as they flow, holding each chunk until the boundary scan that includes its successor passes — values split across chunks stay maskable at the cost of one chunk of latency. `buffer` collects the entire response and scans it once as one document — exact detection for values of any length, and a blocked response is a clean 400 because nothing has been delivered yet — at the cost of the client waiting for the full generation. `off` passes streaming responses through unscanned.
|
|
5005
5003
|
* @public
|
|
5006
5004
|
*/
|
|
5007
5005
|
declare interface DlpStreamingSettings {
|
|
5008
5006
|
/**
|
|
5009
|
-
*
|
|
5007
|
+
* `stream` scans deltas in flight with the windowed scanner. `buffer` holds the entire response and scans it once, exactly like a non-streaming response: values of any length are caught (no carry window) and a block is a native 400 error instead of a mid-stream termination, but the client receives nothing until the model finishes. `off` skips scanning of streaming responses entirely, even when rules cover the outbound direction.
|
|
5010
5008
|
*/
|
|
5011
|
-
|
|
5009
|
+
mode?: "stream" | "buffer" | "off";
|
|
5012
5010
|
/**
|
|
5013
|
-
* Scan across chunk boundaries using a carried tail of already-scanned text. When false, each chunk is scanned alone and released immediately — lower cost, but values split across two chunks are missed.
|
|
5011
|
+
* Scan across chunk boundaries using a carried tail of already-scanned text. When false, each chunk is scanned alone and released immediately — lower cost, but values split across two chunks are missed. Applies to `stream` mode only.
|
|
5014
5012
|
*/
|
|
5015
5013
|
boundaryScan?: boolean;
|
|
5016
5014
|
/**
|
|
5017
|
-
* How many trailing characters are carried from one chunk into the next boundary scan. Bounds memory and re-scan cost; must be larger than the longest value you need to catch.
|
|
5015
|
+
* How many trailing characters are carried from one chunk into the next boundary scan. Bounds memory and re-scan cost; must be larger than the longest value you need to catch. Applies to `stream` mode only — `buffer` mode always scans the complete text.
|
|
5018
5016
|
*/
|
|
5019
5017
|
maxCarryChars?: number;
|
|
5020
5018
|
}
|
|
@@ -1719,6 +1719,10 @@ export declare interface RouteData {
|
|
|
1719
1719
|
|
|
1720
1720
|
/* Excluded from this release type: sanitizedIdentifierName */
|
|
1721
1721
|
|
|
1722
|
+
export declare function setGlobalZuploEventContext(
|
|
1723
|
+
event: ZuploEventContext
|
|
1724
|
+
): void;
|
|
1725
|
+
|
|
1722
1726
|
/* Excluded from this release type: StandardEnv */
|
|
1723
1727
|
|
|
1724
1728
|
declare interface UrlConfig {
|
|
@@ -1854,6 +1858,8 @@ declare interface ZuploContext extends EventTarget {
|
|
|
1854
1858
|
): void;
|
|
1855
1859
|
}
|
|
1856
1860
|
|
|
1861
|
+
/* Excluded from this release type: ZuploEventContext */
|
|
1862
|
+
|
|
1857
1863
|
/**
|
|
1858
1864
|
* Enhanced Request class that extends the standard Web Request API with
|
|
1859
1865
|
* convenient properties for accessing path parameters, query strings, and user data.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@opentelemetry/api": "1.9.0",
|
|
29
29
|
"@opentelemetry/api-logs": "0.220.0",
|
|
30
30
|
"@swc/core": "1.10.18",
|
|
31
|
-
"@zuplo/core": "7.
|
|
31
|
+
"@zuplo/core": "7.4.1",
|
|
32
32
|
"@zuplo/editor": "1.0.31094607111",
|
|
33
|
-
"@zuplo/openapi-tools": "7.
|
|
34
|
-
"@zuplo/runtime": "7.
|
|
33
|
+
"@zuplo/openapi-tools": "7.4.1",
|
|
34
|
+
"@zuplo/runtime": "7.4.1",
|
|
35
35
|
"chalk": "5.4.1",
|
|
36
36
|
"chokidar": "3.5.3",
|
|
37
37
|
"cookie": "1.0.2",
|
|
@@ -62,8 +62,15 @@
|
|
|
62
62
|
"workerd": "1.20241230.0",
|
|
63
63
|
"yargs": "17.7.2",
|
|
64
64
|
"zod": "4.4.3",
|
|
65
|
-
"@zuplo/graphql": "7.
|
|
66
|
-
"@zuplo/otel": "7.
|
|
65
|
+
"@zuplo/graphql": "7.4.1",
|
|
66
|
+
"@zuplo/otel": "7.4.1"
|
|
67
|
+
},
|
|
68
|
+
"optionalDependencies": {
|
|
69
|
+
"@zuplo/lint-darwin-arm64": "7.4.1",
|
|
70
|
+
"@zuplo/lint-darwin-x64": "7.4.1",
|
|
71
|
+
"@zuplo/lint-linux-x64": "7.4.1",
|
|
72
|
+
"@zuplo/lint-linux-arm64": "7.4.1",
|
|
73
|
+
"@zuplo/lint-win32-x64": "7.4.1"
|
|
67
74
|
},
|
|
68
75
|
"bundleDependencies": [
|
|
69
76
|
"@inquirer/prompts",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Zuplo, Inc. All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* This software and associated documentation files (the "Software") is intended to be used
|
|
6
|
-
* only by Zuplo customers solely to develop and test applications that will be deployed
|
|
7
|
-
* to Zuplo hosted services. You and others in your organization may use these files on your
|
|
8
|
-
* Development Devices solely for the above stated purpose.
|
|
9
|
-
*
|
|
10
|
-
* Outside of uses stated above, no license is granted for any other purpose including
|
|
11
|
-
* without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
12
|
-
* sublicense, host, and/or sell copies of the Software.
|
|
13
|
-
*
|
|
14
|
-
* The software may include third party components with separate legal notices or governed by
|
|
15
|
-
* other agreements, as described in licenses either embedded in or accompanying the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
18
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
19
|
-
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
20
|
-
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
-
* DEALINGS IN THE SOFTWARE.
|
|
23
|
-
*--------------------------------------------------------------------------------------------*/
|
|
24
|
-
|
|
25
|
-
var Et=Object.defineProperty;var o=(t,e)=>Et(t,"name",{value:e,configurable:!0});import{Buffer as _t}from"node:buffer";Object.assign(globalThis,{Buffer:_t});import{ExportResultCode as _e}from"@opentelemetry/core";import{JsonLogsSerializer as At,JsonTraceSerializer as wt}from"@opentelemetry/otlp-transformer";import{BackgroundDispatchError as Pe,BackgroundDispatcher as ve}from"@zuplo/runtime";function vt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}o(vt,"isPlainObject");function be(t){if(t==null)return"";if(Array.isArray(t)){for(let e=0;e<t.length;e+=1)t[e]=be(t[e]);return t}return vt(t)&&k(t),t}o(be,"sanitizeValue");function k(t){Object.keys(t).forEach(e=>{t[e]=be(t[e])})}o(k,"sanitizeEmptyAttributes");var ne=Symbol("unwrap");function ye(t){return t&&!!t[ne]}o(ye,"isWrapped");function Lt(t){return t!==null&&typeof t=="object"||typeof t=="function"}o(Lt,"isProxyable");function N(t,e,r=!0){if(ye(t)||!Lt(t))return t;let n=Object.assign({},e);return n.get=(s,i,a)=>{if(i===ne)return t;if(e.get)return e.get(s,i,a);if(i==="bind")return()=>a;if(r)return oe(s,i)},n.apply=(s,i,a)=>{if(e.apply)return e.apply(_(s),_(i),a)},new Proxy(t,n)}o(N,"wrap");function _(t){return t&&ye(t)?t[ne]:t}o(_,"unwrap");function oe(t,e,r){let n=_(t);r=_(r)||n;let s=Reflect.get(n,e);return typeof s=="function"?s.constructor.name==="RpcProperty"?(...i)=>n[e](...i):s.bind(r):s}o(oe,"passthroughGet");var Le={accept:"application/json","content-type":"application/json"},Ot=new Set(["accept","content-encoding","content-type"]);function It(t){try{let e=new URL(t);return e.username="",e.password="",e.search="",e.hash="",e.toString()}catch{return"<invalid-url>"}}o(It,"sanitizeOtlpUrl");function Ft(t){let e={};for(let[r,n]of Object.entries(t)){let s=r.toLowerCase();Ot.has(s)&&(e[s]=n)}return e}o(Ft,"sanitizeOtlpRequestHeaders");function Ee(t,e){return{message:"OpenTelemetry collector request failed; request metadata is sanitized: URL credentials, search parameters, fragments, and non-allowlisted headers are omitted",fields:{otelSignal:t.signal,request:{method:"POST",url:It(t.url),headers:Ft(t.headers),bodySizeBytes:t.bodySizeBytes,itemCount:t.itemCount},...e?{response:{status:e.status,statusText:e.statusText}}:{}}}}o(Ee,"requestDebugLog");async function Ae(t){let e;try{e=await _(fetch)(t.url,{method:"POST",body:t.body,headers:t.headers})}catch(r){throw new Pe(`OTLP ${t.signal} export could not reach the collector. Verify the collector URL and network access.`,{cause:r,debugLog:Ee(t)})}if(!e.ok)throw new Pe(`OTLP ${t.signal} export failed with HTTP ${e.status} ${e.statusText}. Verify the collector URL and authentication headers.`,{debugLog:Ee(t,e)})}o(Ae,"sendOtlpRequest");var C=class{static{o(this,"OTLPSpanExporter")}headers;url;constructor(e){this.url=e.url,this.headers=Object.assign({},Le,e.headers)}export(e,r){e.forEach(n=>{this.batcher.enqueue(n)}),r({code:_e.SUCCESS})}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}dispatchFunction=o(async e=>{if(e.length===0)return;e.forEach(n=>{k(n.attributes)});let r=wt.serializeRequest(e);await Ae({signal:"traces",url:this.url,headers:this.headers,body:r??"",bodySizeBytes:r?.byteLength??0,itemCount:e.length})},"dispatchFunction");batcher=new ve(this.dispatchFunction,{msDelay:10})},D=class{static{o(this,"OTLPLogExporter")}headers;url;batcher;constructor(e,r){this.url=e.url,this.headers=Object.assign({},Le,e.headers),this.batcher=new ve(this.dispatchFunction,{msDelay:r?.scheduledDelayMillis??10})}export(e,r){e.forEach(n=>{this.batcher.enqueue(n)}),r({code:_e.SUCCESS})}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}dispatchFunction=o(async e=>{if(e.length===0)return;e.forEach(n=>{k(n.attributes)});let r=At.serializeRequest(e);await Ae({signal:"logs",url:this.url,headers:this.headers,body:r??"",bodySizeBytes:r?.byteLength??0,itemCount:e.length})},"dispatchFunction")};import{TelemetryPlugin as Wr,trackFeature as $r}from"@zuplo/runtime";import{context as U,propagation as $e,SpanKind as Ze,SpanStatusCode as Kt,trace as Wt}from"@opentelemetry/api";import{context as qe}from"@opentelemetry/api";import{W3CTraceContextPropagator as jt}from"@opentelemetry/core";var M=class{static{o(this,"DefaultLogProcessor")}exporter;constructor(e){this.exporter=e}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}onEmit(e){this.exporter.export([e],r=>{})}};import{SpanStatusCode as kt,TraceFlags as we}from"@opentelemetry/api";import{ParentBasedSampler as Oe,TraceIdRatioBasedSampler as Nt}from"@opentelemetry/sdk-trace-base";import{SemanticAttributes as se}from"@zuplo/runtime";function Ie(t){return e=>{let r=e.localRootSpan;return r.attributes[se.SystemTrace]??r.attributes[se.RouteSystem]??r.attributes[se.RouteTrace]===!1?!1:t(e)}}o(Ie,"internalTailSampler");function Fe(t){return e=>t.reduce((r,n)=>r||n(e),!1)}o(Fe,"multiTailSampler");var ke=o(t=>(t.localRootSpan.spanContext().traceFlags&we.SAMPLED)===we.SAMPLED,"isHeadSampled"),Ne=o(t=>t.localRootSpan.status.code===kt.ERROR,"isRootErrorSpan");function De(t){let e=new Nt(t.ratio);return typeof t.acceptRemote=="boolean"&&!t.acceptRemote?new Oe({root:e,remoteParentSampled:e,remoteParentNotSampled:e}):new Oe({root:e})}o(De,"createSampler");import{ExportResultCode as Ht}from"@opentelemetry/core";import{createContextKey as Dt}from"@opentelemetry/api";var He=Dt("zuplo.otel.invocation_id"),Mt="\0",Me=0;function Ue(){return Me+=1,Me.toString(36)}o(Ue,"nextInvocationId");function ze(t,e){return t.setValue(He,e)}o(ze,"withInvocationId");function je(t){let e=t.getValue(He);return typeof e=="string"?e:void 0}o(je,"getInvocationId");function H(t,e){return e===void 0?t:`${t}${Mt}${e}`}o(H,"traceStateKey");function Ut(){let t=b();return t||console.log("Could not find config for sampling, sending everything by default"),t?t.sampling.tailSampler:()=>!0}o(Ut,"getSampler");var ae=class{static{o(this,"TraceState")}unexportedSpans=[];inprogressSpans=new Set;exporter;exportPromises=new Set;localRootSpan;traceDecision;isFlushed=!1;constructor(e){this.exporter=e}addSpan(e){let r=e;this.localRootSpan=this.localRootSpan||r,this.unexportedSpans.push(r),this.inprogressSpans.add(e.spanContext().spanId)}hasFinished(){return this.inprogressSpans.size===0&&this.isFlushed}async endSpan(e){this.inprogressSpans.delete(e.spanContext().spanId),this.inprogressSpans.size===0&&await this.flush()}sample(){if(this.traceDecision===void 0&&this.unexportedSpans.length>0){let e=Ut();this.traceDecision=e({traceId:this.localRootSpan.spanContext().traceId,localRootSpan:this.localRootSpan,spans:this.unexportedSpans})}this.unexportedSpans=this.traceDecision?this.unexportedSpans:[]}async flush(){try{if(this.unexportedSpans.length>0){let e=this.unexportedSpans.filter(r=>this.isSpanInProgress(r));for(let r of e)console.log(`Span ${r.spanContext().spanId} was not ended properly`),r.end();if(this.sample(),this.unexportedSpans.length>0){let r=this.exportSpans([...this.unexportedSpans]);this.unexportedSpans=[],this.exportPromises.add(r),r.catch(()=>{}).finally(()=>{this.exportPromises.delete(r)})}}for(;this.exportPromises.size>0;)await Promise.allSettled([...this.exportPromises])}finally{this.isFlushed=!0}}isSpanInProgress(e){return this.inprogressSpans.has(e.spanContext().spanId)}async exportSpans(e){let r=b();if(!r){console.log("No config found for exporting spans, skipping export");return}let n=r.postProcessor(e);await scheduler.wait(1),await new Promise((i,a)=>{this.exporter.export(n,c=>{c.code===Ht.SUCCESS?i():(console.log(`exporting spans failed! ${c.error}`),a(c.error))})})}},ie=1e3,zt=1e3,x=class{constructor(e){this.exporter=e}exporter;static{o(this,"BatchTraceSpanProcessor")}traces=new Map;totalEvicted=0;spanTraceKeys=new WeakMap;getTraceState(e){let r=this.traces.get(e);return r||(this.evictOverflow(),r=new ae(this.exporter),this.traces.set(e,r)),r}evictOverflow(){if(this.traces.size<ie)return;let e=this.traces.size-ie+1,r=0;for(let n of this.traces.keys()){if(r>=e)break;this.traces.delete(n),r++}this.totalEvicted+=r,(this.totalEvicted===r||this.totalEvicted%zt<r)&&console.log(`BatchTraceSpanProcessor: buffered trace limit (${ie}) reached; evicting oldest trace(s)`,{totalEvicted:this.totalEvicted})}onStart(e,r){let n=H(e.spanContext().traceId,je(r));this.spanTraceKeys.set(e,n),this.getTraceState(n).addSpan(e)}onEnd(e){let r=this.spanTraceKeys.get(e)??e.spanContext().traceId,n=this.traces.get(r);n&&n.endSpan(e).catch(s=>{console.log(s,"Failed to end span")}).finally(()=>{n.hasFinished()&&this.traces.get(r)===n&&this.traces.delete(r)})}async forceFlush(e){if(e){let r=this.traces.get(e);if(!r)return;try{await r.flush()}finally{this.traces.get(e)===r&&this.traces.delete(e)}}else{let r=[...this.traces.entries()];await Promise.allSettled(r.map(([,n])=>n.flush()));for(let[n,s]of r)this.traces.get(n)===s&&this.traces.delete(n)}}async shutdown(){await this.forceFlush()}};function Ve(t){return!!t.spanProcessors}o(Ve,"isSpanProcessorConfig");function Be(t){let e=!!t.spanProcessors,r=!!t.logProcessors;return e&&r}o(Be,"isProcessorConfig");var Ge=Symbol("Otel Tracing Configuration");function Ke(t,e=qe.active()){return e.setValue(Ge,t)}o(Ke,"setConfig");function b(){return qe.active().getValue(Ge)||void 0}o(b,"getActiveConfig");function Vt(t){return!!t.shouldSample}o(Vt,"isSampler");function Bt(t){return!!t.exporter}o(Bt,"isTraceConfigExporter");function qt(t){return typeof t.export=="function"}o(qt,"isSpanExporterInstance");function Gt(t){return!!t.logUrl&&!!t.traceUrl&&!!t.headers}o(Gt,"isTraceAndLogConfigExporter");function ce(t){let e=[],r=[];if(Bt(t)){let i=qt(t.exporter)?t.exporter:new C(t.exporter);e=[new x(i)]}else Gt(t)?(e=[new x(new C({url:t.traceUrl,headers:t.headers}))],r=[new M(new D({url:t.logUrl,headers:t.headers}))]):Be(t)?(e=Array.isArray(t.spanProcessors)?t.spanProcessors:[t.spanProcessors],r=Array.isArray(t.logProcessors)?t.logProcessors:[t.logProcessors]):Ve(t)&&(e=Array.isArray(t.spanProcessors)?t.spanProcessors:[t.spanProcessors]);let n=t.sampling?.headSampler||{ratio:1},s=Vt(n)?n:De(n);return{fetch:{includeTraceContext:t.fetch?.includeTraceContext??!0},handlers:{fetch:{acceptTraceContext:t.handlers?.fetch?.acceptTraceContext??!0}},postProcessor:t.postProcessor||(i=>i),sampling:{headSampler:s,tailSampler:Ie(t.sampling?.tailSampler??Fe([ke,Ne]))},service:t.service,resourceAttributes:t.resourceAttributes,spanProcessors:e,propagator:t.propagator||new jt,instrumentation:{instrumentGlobalFetch:t.instrumentation?.instrumentGlobalFetch??!0},logProcessors:r}}o(ce,"parseConfig");function Xe(t,e){let r={},n=t.headers;r["http.request.method"]=t.method.toUpperCase(),r["http.request.body.size"]=n.get("content-length"),r["user_agent.original"]=n.get("user-agent"),r["http.mime_type"]=n.get("content-type"),r["http.accepts"]=n.get("accept");let s=e??new URL(t.url);return r["url.full"]=`${s.protocol}//${s.host}${s.pathname}${s.search}`,r["server.address"]=s.host,r["url.scheme"]=s.protocol,r["url.path"]=s.pathname,r["url.query"]=s.search,r}o(Xe,"gatherRequestAttributes");function Ye(t){let e={};return e["http.response.status_code"]=t.status,t.headers.get("content-length")==null&&(e["http.response.body.size"]=t.headers.get("content-length")),e["http.mime_type"]=t.headers.get("content-type"),e}o(Ye,"gatherResponseAttributes");function $t(t){return $e.extract(U.active(),t,{get(e,r){return e.get(r)||void 0},keys(e){return[...e.keys()]}})}o($t,"getParentContextFromHeaders");function Zt(t){let e=b();return e===void 0?U.active():(typeof e.handlers.fetch.acceptTraceContext=="function"?e.handlers.fetch.acceptTraceContext(t):e.handlers.fetch.acceptTraceContext??!0)?$t(t.headers):U.active()}o(Zt,"getParentContextFromRequest");function We(t,e){let r=t;if(r.attributes["http.route"]){let n=e.method.toUpperCase();t.updateName(`${n} ${r.attributes["http.route"]}`)}}o(We,"updateSpanNameOnRoute");var Je={getInitialSpanInfo:o(t=>{let e=Zt(t),r={"faas.trigger":"http","faas.invocation_id":t.headers.get("zp-rid")??void 0,"cf.ray_id":t.headers.get("cf-ray")??void 0};return Object.assign(r,Xe(t)),{name:`fetchHandler ${t.method.toUpperCase()}`,options:{attributes:r,kind:Ze.SERVER},context:e}},"getInitialSpanInfo"),getAttributesFromResult:o(t=>Ye(t),"getAttributesFromResult"),executionSuccess:We,executionFailed:We};function Xt(t,e,r){return N(t,{apply:o((s,i,a)=>{let c=new Request(a[0],a[1]),p=a[1]?.zuplo,l=p?[c,{zuplo:p}]:[c];if(!c.url.startsWith("http"))return Reflect.apply(s,i,a);let h=b();if(!h)return Reflect.apply(s,i,l);let f=e(h),T=Wt.getTracer("fetcher"),S={kind:Ze.CLIENT,attributes:r},m=new URL(c.url),O=c.method.toUpperCase(),d=typeof r?.name=="string"?r?.name:`${O}: ${m.host}`;return T.startActiveSpan(d,S,async R=>{try{((typeof f.includeTraceContext=="function"?f.includeTraceContext(c):f.includeTraceContext)??!0)&&$e.inject(U.active(),c.headers,{set:o((F,L,A)=>F.set(L,typeof A=="string"?A:String(A)),"set")}),R.setAttributes(Xe(c,m));let I=await Reflect.apply(s,i,l);return R.setAttributes(Ye(I)),I}catch(v){throw R.recordException(v),R.setStatus({code:Kt.ERROR}),v}finally{R.end()}})},"apply")},!0)}o(Xt,"instrumentClientFetch");function Qe(){globalThis.fetch=Xt(globalThis.fetch,t=>t.fetch)}o(Qe,"instrumentGlobalFetch");import{context as St,context as wr,propagation as Or,SpanStatusCode as Ir,trace as xt}from"@opentelemetry/api";import{resourceFromAttributes as Re}from"@opentelemetry/resources";import{ATTR_CLOUD_ACCOUNT_ID as Fr,ATTR_CLOUD_PLATFORM as kr,ATTR_CLOUD_PROVIDER as Nr,ATTR_SERVICE_NAME as Dr,ATTR_SERVICE_NAMESPACE as Mr,ATTR_SERVICE_VERSION as Hr,ATTR_TELEMETRY_SDK_NAME as Ur}from"@opentelemetry/semantic-conventions/incubating";import{SemanticAttributes as re}from"@zuplo/runtime";import{AsyncLocalStorage as Yt}from"node:async_hooks";import{EventEmitter as Jt}from"node:events";import{ROOT_CONTEXT as Qt}from"@opentelemetry/api";var er=["addListener","on","once","prependListener","prependOnceListener"],pe=class{static{o(this,"AbstractAsyncHooksContextManager")}bind(e,r){return r instanceof Jt?this._bindEventEmitter(e,r):typeof r=="function"?this._bindFunction(e,r):r}_bindFunction(e,r){let n=this,s=o(function(...i){return n.with(e,()=>r.apply(this,i))},"contextWrapper");return Object.defineProperty(s,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),s}_bindEventEmitter(e,r){return this._getPatchMap(r)!==void 0||(this._createPatchMap(r),er.forEach(s=>{r[s]!==void 0&&(r[s]=this._patchAddListener(r,r[s],e))}),typeof r.removeListener=="function"&&(r.removeListener=this._patchRemoveListener(r,r.removeListener)),typeof r.off=="function"&&(r.off=this._patchRemoveListener(r,r.off)),typeof r.removeAllListeners=="function"&&(r.removeAllListeners=this._patchRemoveAllListeners(r,r.removeAllListeners))),r}_patchRemoveListener(e,r){let n=this;return function(s,i){let a=n._getPatchMap(e)?.[s];if(a===void 0)return r.call(this,s,i);let c=a.get(i);return r.call(this,s,c||i)}}_patchRemoveAllListeners(e,r){let n=this;return function(s){let i=n._getPatchMap(e);return i!==void 0&&(arguments.length===0?n._createPatchMap(e):i[s]!==void 0&&delete i[s]),r.apply(this,arguments)}}_patchAddListener(e,r,n){let s=this;return function(i,a){if(s._wrapped)return r.call(this,i,a);let c=s._getPatchMap(e);c===void 0&&(c=s._createPatchMap(e));let p=c[i];p===void 0&&(p=new WeakMap,c[i]=p);let l=s.bind(n,a);p.set(a,l),s._wrapped=!0;try{return r.call(this,i,l)}finally{s._wrapped=!1}}}_createPatchMap(e){let r=Object.create(null);return e[this._kOtListeners]=r,r}_getPatchMap(e){return e[this._kOtListeners]}_kOtListeners=Symbol("OtListeners");_wrapped=!1},z=class extends pe{static{o(this,"AsyncLocalStorageContextManager")}_asyncLocalStorage;constructor(){super(),this._asyncLocalStorage=new Yt}active(){return this._asyncLocalStorage.getStore()??Qt}with(e,r,n,...s){let i=n==null?r:r.bind(n);return this._asyncLocalStorage.run(e,i,...s)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};import{trace as Go}from"@opentelemetry/api";import{context as de,SpanKind as pr,TraceFlags as ot,trace as V}from"@opentelemetry/api";import{sanitizeAttributes as ur}from"@opentelemetry/core";import{RandomIdGenerator as lr,SamplingDecision as dr}from"@opentelemetry/sdk-trace-base";import{SpanKind as tr,SpanStatusCode as rr}from"@opentelemetry/api";import{hrTimeDuration as nr,isAttributeValue as or,isTimeInput as sr,sanitizeAttributes as et}from"@opentelemetry/core";import{ATTR_EXCEPTION_MESSAGE as tt,ATTR_EXCEPTION_STACKTRACE as ir,ATTR_EXCEPTION_TYPE as rt}from"@opentelemetry/semantic-conventions";function ar(t){let e={};return typeof t=="string"?e[tt]=t:(t.code?e[rt]=t.code.toString():t.name&&(e[rt]=t.name),t.message&&(e[tt]=t.message),t.stack&&(e[ir]=t.stack)),e}o(ar,"transformExceptionAttributes");function ue(t){return[Math.trunc(t/1e3),t%1e3*1e6]}o(ue,"millisToHr");function le(t){let e=Date.now();if(t){if(t instanceof Date)return ue(t.getTime());if(typeof t=="number")return ue(t);if(Array.isArray(t))return t}else return ue(e);let r=t;throw new Error(`unreachable value: ${JSON.stringify(r)}`)}o(le,"getHrTime");function cr(t){return typeof t=="string"&&t.length>0}o(cr,"isAttributeKey");var j=class{static{o(this,"SpanImpl")}name;_spanContext;onEnd;parentSpanId;parentSpanContext;kind;attributes;status={code:rr.UNSET};endTime=[0,0];_duration=[0,0];startTime;events=[];links;resource;instrumentationScope=nt;_ended=!1;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;constructor(e){this.name=e.name,this._spanContext=e.spanContext,this.parentSpanId=e.parentSpanId,this.parentSpanContext=e.parentSpanContext,this.kind=e.spanKind||tr.INTERNAL,this.attributes=et(e.attributes),this.startTime=le(e.startTime),this.links=e.links||[],this.resource=e.resource,this.onEnd=e.onEnd}addLink(e){return this.links.push(e),this}addLinks(e){return this.links.push(...e),this}spanContext(){return this._spanContext}setAttribute(e,r){return cr(e)&&or(r)&&(this.attributes[e]=r),this}setAttributes(e){for(let[r,n]of Object.entries(e))this.setAttribute(r,n);return this}addEvent(e,r,n){sr(r)&&(n=r,r=void 0);let s=et(r),i=le(n);return this.events.push({name:e,attributes:s,time:i}),this}setStatus(e){return this.status=e,this}updateName(e){return this.name=e,this}end(e){this._ended||(this._ended=!0,this.endTime=le(e),this._duration=nr(this.startTime,this.endTime),this.onEnd(this))}isRecording(){return!this._ended}recordException(e,r){let n=ar(e);this.addEvent("exception",n,r)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}};var st=new lr;function fr(t,e){return(t>>e-1&1)*e}o(fr,"getFlagAt");var P=class{static{o(this,"WorkerTracer")}spanProcessors;resource;constructor(e,r){this.spanProcessors=e,this.resource=r}async forceFlush(e){let r=this.spanProcessors.map(async n=>{await n.forceFlush(e)});await Promise.allSettled(r)}addToResource(e){this.resource.merge(e)}startSpan(e,r={},n=de.active()){r.root&&(n=V.deleteSpan(n));let s=b();if(!s)throw new Error("Config is undefined. This is a bug in the instrumentation logic");let i=V.getSpan(n)?.spanContext(),{traceId:a,randomTraceFlag:c}=mr(i),p=r.kind||pr.INTERNAL,l=ur(r.attributes),f=s.sampling.headSampler.shouldSample(n,a,e,p,l,[]),{decision:T,traceState:S,attributes:m}=f,O=Object.assign({},l,m),d=st.generateSpanId(),g=i?.spanId,v=(T===dr.RECORD_AND_SAMPLED?ot.SAMPLED:ot.NONE)+c,I={traceId:a,spanId:d,traceFlags:v,traceState:S},F=new j({attributes:O,name:e,onEnd:o(L=>{this.spanProcessors.forEach(A=>{A.onEnd(L)})},"onEnd"),resource:this.resource,spanContext:I,parentSpanContext:i,parentSpanId:g,spanKind:p,startTime:r.startTime});return this.spanProcessors.forEach(L=>{L.onStart(F,n)}),F}startActiveSpan(e,...r){let n=r.length>1?r[0]:void 0,s=r.length>2?r[1]:de.active(),i=r[r.length-1],a=this.startSpan(e,n,s),c=V.setSpan(s,a);return de.with(c,i,void 0,a)}};function mr(t){if(t&&V.isSpanContextValid(t)){let{traceId:e,traceFlags:r}=t;return{traceId:e,randomTraceFlag:fr(r,2)}}else return{traceId:st.generateTraceId(),randomTraceFlag:2}}o(mr,"getTraceInfo");var fe=class{static{o(this,"PromiseTracker")}_trackedPromises=[];get trackedPromiseCount(){return this._trackedPromises.length}track(e){this._trackedPromises.push(e)}async wait(e){if(this._trackedPromises.length!==0){if(e===void 0){await it(this._trackedPromises);return}await Promise.race([it(this._trackedPromises),scheduler.wait(e)])}}};function gr(t,e,r){return N(t,{apply(s,i,a){return r.track(a[0]),Reflect.apply(s,e,a)}})}o(gr,"createWaitUntil");function at(t){let e=new fe;return{event:new Proxy(t,{get(n,s){if(s==="waitUntil"){let i=Reflect.get(n,s);return gr(i,t,e)}else return oe(n,s)}}),tracker:e}}o(at,"proxyExecutionContext");async function it(t){let e;do e=await Promise.allSettled(t);while(e.length!==t.length);return e}o(it,"allSettledMutable");import{logs as Lr}from"@opentelemetry/api-logs";import{diag as J}from"@opentelemetry/api";import{createNoopLogger as Pr}from"@opentelemetry/api-logs";import{defaultResource as Er}from"@opentelemetry/resources";import{BindOnceFuture as _r}from"@opentelemetry/core";import{SeverityNumber as Tr}from"@opentelemetry/api-logs";import{context as lt,trace as Sr,TraceFlags as dt,isSpanContextValid as xr}from"@opentelemetry/api";import*as y from"@opentelemetry/api";import{timeInputToHrTime as pt}from"@opentelemetry/core";import{ATTR_EXCEPTION_MESSAGE as B,ATTR_EXCEPTION_STACKTRACE as ut,ATTR_EXCEPTION_TYPE as q}from"@opentelemetry/semantic-conventions";import{diag as me}from"@opentelemetry/api";function hr(t){return ge(t,new WeakSet)}o(hr,"isLogAttributeValue");function ge(t,e){if(t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t instanceof Uint8Array)return!0;if(typeof t=="object"){if(e.has(t))return!1;if(e.add(t),Array.isArray(t)){for(let n of t)if(!ge(n,e))return!1;return!0}let r=t;if(r.constructor!==Object&&r.constructor!==void 0)return!1;for(let n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&!ge(r[n],e))return!1;return!0}return!1}o(ge,"isLogAttributeValueInternal");var u;(function(t){t[t.DROP_INVALID=0]="DROP_INVALID",t[t.DROP_LIMIT_REACHED=1]="DROP_LIMIT_REACHED",t[t.ADD_NEW=2]="ADD_NEW",t[t.ADD_OVERWRITE_EXISTING=3]="ADD_OVERWRITE_EXISTING"})(u||(u={}));function Te(t,e,r,n,s){if(n.length===0)return me.warn(`Invalid attribute key: ${n}`),u.DROP_INVALID;if(!hr(s))return me.warn(`Invalid attribute value set for key: ${n}`),u.DROP_INVALID;let i=!Object.prototype.hasOwnProperty.call(t,n);return i&&r>=e.attributeCountLimit?u.DROP_LIMIT_REACHED:(t[n]=he(s,e.attributeValueLengthLimit),i?u.ADD_NEW:u.ADD_OVERWRITE_EXISTING)}o(Te,"addAttribute");function he(t,e){if(e<=0)return me.warn(`Attribute value limit must be positive, got ${e}`),t;if(t==null)return t;if(typeof t=="string")return t.length<=e?t:t.substring(0,e);if(t instanceof Uint8Array)return t;if(Array.isArray(t))return t.map(r=>he(r,e));if(typeof t=="object"){let r={};for(let[n,s]of Object.entries(t))r[n]=he(s,e);return r}return t}o(he,"truncateToSize");function ct(t,e){if(e==null)return{};let r={},n=0,s=0;for(let[i,a]of Object.entries(e)){let c=Te(r,t,n,i,a);c===u.ADD_NEW?n+=1:(c===u.DROP_INVALID||c===u.DROP_LIMIT_REACHED)&&(s+=1)}return{attributes:n>0?r:void 0,droppedAttributesCount:s}}o(ct,"normalizeScopeAttributes");var G=class{static{o(this,"LogRecordImpl")}hrTime;hrTimeObserved;spanContext;resource;instrumentationScope;attributes={};_severityText;_severityNumber;_body;_eventName;_attributesCount=0;_droppedAttributesCount=0;_isReadonly=!1;_logRecordLimits;set severityText(e){this._isLogRecordReadonly()||(this._severityText=e)}get severityText(){return this._severityText}set severityNumber(e){this._isLogRecordReadonly()||(this._severityNumber=e)}get severityNumber(){return this._severityNumber}set body(e){this._isLogRecordReadonly()||(this._body=e)}get body(){return this._body}get eventName(){return this._eventName}set eventName(e){this._isLogRecordReadonly()||(this._eventName=e)}get droppedAttributesCount(){return this._droppedAttributesCount}constructor(e,r,n){let{timestamp:s,observedTimestamp:i,eventName:a,severityNumber:c,severityText:p,body:l,attributes:h={},exception:f,context:T}=n,S=Date.now();if(this.hrTime=pt(s??S),this.hrTimeObserved=pt(i??S),T){let m=y.trace.getSpanContext(T);m&&y.isSpanContextValid(m)&&(this.spanContext=m)}this.severityNumber=c,this.severityText=p,this.body=l,this.resource=e.resource,this.instrumentationScope=r,this._logRecordLimits=e.logRecordLimits,this._eventName=a,this.setAttributes(h),f!=null&&this._setException(f)}setAttribute(e,r){if(this._isLogRecordReadonly())return this;let n=Te(this.attributes,this._logRecordLimits,this._attributesCount,e,r);return n===u.DROP_LIMIT_REACHED?(this._droppedAttributesCount++,this._droppedAttributesCount===1&&y.diag.warn("Dropping extra attributes.")):n===u.ADD_NEW&&this._attributesCount++,this}setAttributes(e){for(let[r,n]of Object.entries(e))this.setAttribute(r,n);return this}setBody(e){return this.body=e,this}setEventName(e){return this.eventName=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}_makeReadonly(){this._isReadonly=!0}_setException(e){let r=!1;if(typeof e=="string"||typeof e=="number")Object.hasOwn(this.attributes,B)||this.setAttribute(B,String(e)),r=!0;else if(e&&typeof e=="object"){let n=e;n.code?(Object.hasOwn(this.attributes,q)||this.setAttribute(q,n.code.toString()),r=!0):n.name&&(Object.hasOwn(this.attributes,q)||this.setAttribute(q,n.name),r=!0),n.message&&(Object.hasOwn(this.attributes,B)||this.setAttribute(B,n.message),r=!0),n.stack&&(Object.hasOwn(this.attributes,ut)||this.setAttribute(ut,n.stack),r=!0)}r||y.diag.warn(`Failed to record an exception ${e}`)}_isLogRecordReadonly(){return this._isReadonly&&y.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}};var K=class{static{o(this,"Logger")}_instrumentationScope;_sharedState;_loggerConfig;constructor(e,r){this._instrumentationScope=e,this._sharedState=r,this._loggerConfig=this._sharedState.getLoggerConfig(this._instrumentationScope)}emit(e){let r=e.context||lt.active();if(!this.enabled(e))return;let n=new G(this._sharedState,this._instrumentationScope,{context:r,...e});this._sharedState.loggerMetrics.emitLog(),this._sharedState.activeProcessor.onEmit(n,r),n._makeReadonly()}enabled(e){if(this._sharedState.hasShutdown)return!1;let r=this._loggerConfig;if(r.disabled)return!1;let n=e?.severityNumber;if(typeof n=="number"&&n!==Tr.UNSPECIFIED&&n<r.minimumSeverity)return!1;let s=e?.context||lt.active();if(r.traceBased){let a=Sr.getSpanContext(s);if(a&&xr(a)&&!((a.traceFlags&dt.SAMPLED)===dt.SAMPLED))return!1}let i={context:s,instrumentationScope:this._instrumentationScope,severityNumber:e?.severityNumber,eventName:e?.eventName};for(let a of this._sharedState.processors)if(!a.enabled||a.enabled(i))return!0;return!1}};import{createNoopMeter as Cr}from"@opentelemetry/api";import{SeverityNumber as br}from"@opentelemetry/api-logs";var W=class{static{o(this,"NoopLogRecordProcessor")}forceFlush(){return Promise.resolve()}onEmit(e,r){}shutdown(){return Promise.resolve()}enabled(e){return!1}};import{callWithTimeout as Rr}from"@opentelemetry/core";var $=class{static{o(this,"MultiLogRecordProcessor")}processors;forceFlushTimeoutMillis;constructor(e,r){this.processors=e,this.forceFlushTimeoutMillis=r}async forceFlush(){let e=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map(r=>Rr(r.forceFlush(),e)))}onEmit(e,r){this.processors.forEach(n=>n.onEmit(e,r))}async shutdown(){await Promise.all(this.processors.map(e=>e.shutdown()))}enabled(e){for(let r of this.processors)if(!r.enabled||r.enabled(e))return!0;return!1}};function Se(t){if(t===void 0)return["u",null];if(t===null)return["n",null];let e=typeof t;return e==="string"?["s",t]:e==="boolean"?["b",t]:e==="number"?Number.isNaN(t)?["nan",null]:t===1/0?["inf",null]:t===-1/0?["-inf",null]:Object.is(t,-0)?["n0",null]:["d",t]:t instanceof Uint8Array?["bytes",Array.from(t)]:Array.isArray(t)?["arr",t.map(Se)]:["map",Object.entries(t).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>[r,Se(n)])]}o(Se,"normalizeAnyValue");function Z(t){return JSON.stringify([t.name,t.version||"",t.schemaUrl||"",Se(t.attributes),t.droppedAttributesCount??0])}o(Z,"getInstrumentationScopeKey");var ft="otel.sdk.log.created";var X=class{static{o(this,"LoggerMetrics")}createdLogs;constructor(e){this.createdLogs=e.createCounter(ft,{unit:"{log_record}",description:"The number of logs submitted to enabled SDK Loggers."})}emitLog(){this.createdLogs.add(1)}};var mt="0.220.0";var yr={disabled:!1,minimumSeverity:br.UNSPECIFIED,traceBased:!1},xe=o(()=>({...yr}),"DEFAULT_LOGGER_CONFIGURATOR"),Y=class{static{o(this,"LoggerProviderSharedState")}loggers=new Map;activeProcessor;registeredLogRecordProcessors=[];resource;forceFlushTimeoutMillis;logRecordLimits;processors;loggerMetrics;hasShutdown=!1;_loggerConfigurator;_loggerConfigs=new Map;constructor(e,r,n,s,i,a){this.resource=e,this.forceFlushTimeoutMillis=r,this.logRecordLimits=n,this.processors=s,s.length>0?(this.registeredLogRecordProcessors=s,this.activeProcessor=new $(this.registeredLogRecordProcessors,this.forceFlushTimeoutMillis)):this.activeProcessor=new W,this._loggerConfigurator=i??xe;let c=a?a.getMeter("@opentelemetry/sdk-logs",mt):Cr();this.loggerMetrics=new X(c)}getLoggerConfig(e){let r=Z(e),n=this._loggerConfigs.get(r);return n||(n=this._loggerConfigurator(e),this._loggerConfigs.set(r,n),n)}};var vr="unknown",w=class{static{o(this,"LoggerProvider")}_shutdownOnce;_sharedState;constructor(e={}){let r={resource:e.resource??Er(),forceFlushTimeoutMillis:e.forceFlushTimeoutMillis??3e4,logRecordLimits:{attributeCountLimit:e.logRecordLimits?.attributeCountLimit??128,attributeValueLengthLimit:e.logRecordLimits?.attributeValueLengthLimit??1/0},loggerConfigurator:e.loggerConfigurator??xe,processors:e.processors??[],meterProvider:e.meterProvider};this._sharedState=new Y(r.resource,r.forceFlushTimeoutMillis,r.logRecordLimits,r.processors,r.loggerConfigurator,r.meterProvider),this._shutdownOnce=new _r(this._shutdown,this)}getLogger(e,r,n){if(this._shutdownOnce.isCalled)return J.warn("A shutdown LoggerProvider cannot provide a Logger"),Pr();e||J.warn("Logger requested without instrumentation scope name.");let i={name:e||vr,version:r,schemaUrl:n?.schemaUrl,...ct(this._sharedState.logRecordLimits,n?.attributes)},a=Z(i);return this._sharedState.loggers.has(a)||this._sharedState.loggers.set(a,new K(i,this._sharedState)),this._sharedState.loggers.get(a)}forceFlush(){return this._shutdownOnce.isCalled?(J.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(J.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.hasShutdown=!0,this._sharedState.activeProcessor.shutdown()}};var Q=class{static{o(this,"ZuploOtelLogger")}baseLogger;constructor(e){this.baseLogger=e}emit(e){this.baseLogger.emit(e)}enabled(e){return this.baseLogger.enabled(e)}};var ee=class extends w{static{o(this,"ZuploLoggerProvider")}getLogger(e,r,n){let s=super.getLogger(e,r,n);return new Q(s)}register(){Lr.setGlobalLoggerProvider(this)}};import{trace as Ar}from"@opentelemetry/api";var te=class{static{o(this,"ZuploTracerProvider")}spanProcessors;resource;tracers={};constructor(e,r){this.spanProcessors=e,this.resource=r}getTracer(e,r,n){let s=`${e}@${r||""}:${n?.schemaUrl||""}`;return this.tracers[s]||(this.tracers[s]=new P(this.spanProcessors,this.resource)),this.tracers[s]}register(){Ar.setGlobalTracerProvider(this)}};var zr=o((t,e)=>{let r={[Nr]:"zuplo",[kr]:"zuplo-api",[Fr]:t.accountName,"cloud.project.id":t.projectName,"cloud.resource_id":t.deploymentName,"cloud.instance_id":t.instanceId,"deployment.environment.name":t.environmentStage,"zuplo.account_name":t.accountName,"zuplo.project_name":t.projectName,"zuplo.deployment_name":t.deploymentName,[Ur]:"@zuplo/otel",[re.ZuploBuildId]:t.buildId,[re.ZuploBuildVersion]:t.zuploVersion,[re.ZuploBuildCompatibilityDate]:t.compatibilityDate,[re.ZuploEnvironmentType]:t.environmentType},n=Re({[Dr]:e.service?.name??t.projectName??t.deploymentName??"zuplo",[Mr]:e.service?.namespace,[Hr]:e.service?.version}),s=Re(r).merge(n);return e.resourceAttributes?s.merge(Re(e.resourceAttributes)):s},"createResource"),gt=!1;function ht(t,e){if(!gt){e.instrumentation.instrumentGlobalFetch&&Qe(),Or.setGlobalPropagator(e.propagator);let r=zr(t,e);new te(e.spanProcessors,r).register(),e.logProcessors.length>0&&new ee({resource:r,processors:e.logProcessors}).register(),wr.setGlobalContextManager(new z),gt=!0}}o(ht,"init");function Rt(t,e){if(typeof e=="function")return r=>{let n=ce(e(r));return ht(t,n),n};{let r;return()=>(r??=ce(e),ht(t,r),r)}}o(Rt,"createInitializer");var jr=5e3;async function Vr(t,e){let r=xt.getTracer("export");r instanceof P?(await scheduler.wait(1),await e?.wait(jr),await r.forceFlush(t)):console.error("The global tracer is not of type WorkerTracer and can not export spans")}o(Vr,"exportSpans");var Tt=!0;function Br(t){return(e,r)=>{let[n,s]=r,{event:i,tracker:a}=at(s),c=t.instrumentTrigger?t.instrumentTrigger(n):n,p=xt.getTracer("handler"),{name:l,options:h,context:f}=t.getInitialSpanInfo(n),T=h.attributes||{};T["faas.coldstart"]=Tt,h.attributes=T,Tt=!1;let S=Ue(),m=ze(f||St.active(),S);return p.startActiveSpan(l,h,m,async d=>{try{let g=await e(c,i);if(t.getAttributesFromResult){let R=t.getAttributesFromResult(g);d.setAttributes(R)}return t.executionSuccess&&t.executionSuccess(d,n,g),g}catch(g){throw d.recordException(g),d.setStatus({code:Ir.ERROR}),t.executionFailed&&t.executionFailed(d,n,g),g}finally{d.end(),s.waitUntil(Vr(H(d.spanContext().traceId,S),a))}})}}o(Br,"createHandlerFlowFn");function Ct(t,e,r){return(n,s)=>{let i=e(n),a=Ke(i),c=Br(r);return St.with(a,c,n,t,[n,s])}}o(Ct,"createHandlerProxy");var nt={name:"@zuplo/otel"};import{ConfigurationError as qr}from"@zuplo/runtime";var Gr="/otel/v1/traces",bt;function yt(t){bt=t}o(yt,"setManagedTraceEndpoint");function Kr(){return new qr("The Zuplo OpenTelemetry exporter (ZuploSpanExporter) is not available because the Zuplo-managed trace ingest is not configured for this deployment. This exporter only works in deployed Zuplo environments. For local development, configure your own `exporter` (or guard the ZuploSpanExporter behind an environment check) instead.")}o(Kr,"missingIngestError");var E=class{static{o(this,"ZuploSpanExporter")}delegate;resolveDelegate(){if(this.delegate)return this.delegate;let e=bt;if(!e||!e.token)throw Kr();return this.delegate=new C({url:new URL(Gr,e.url).toString(),headers:{authorization:`Bearer ${e.token}`}}),this.delegate}export(e,r){this.resolveDelegate().export(e,r)}shutdown(){return this.delegate?.shutdown()??Promise.resolve()}};function Pt(t){return Array.isArray(t)?t.length>0:!!t}o(Pt,"hasProcessors");function Zr(t){let e=t;return!!e.exporter||Pt(e.spanProcessors)||Pt(e.logProcessors)||!!(e.logUrl&&e.traceUrl)}o(Zr,"hasDestination");function Xr(t){let e=t??{};return Zr(e)?e:{...e,spanProcessors:[new x(new E)]}}o(Xr,"withZuploDefaults");function Yr(t){let e=t;return e.exporter instanceof E?!0:e.spanProcessors?(Array.isArray(e.spanProcessors)?e.spanProcessors:[e.spanProcessors]).some(n=>n instanceof x&&n.exporter instanceof E):!1}o(Yr,"usesZuploExporter");var Ce=class extends Wr{static{o(this,"OpenTelemetryPlugin")}config;constructor(e){super(),$r("opentelemetry"),this.config=e}instrument(e){yt({url:e.__internalOnlyRemoteLogUrl,token:e.__internalOnlyRemoteLogToken});let r=Xr(this.config);if(Yr(r)&&!e.__internalOnlyRemoteLogToken)return{requestHandlerProxy:o(i=>i,"requestHandlerProxy")};let n=Rt(e,r);return{requestHandlerProxy:o(i=>Ct(i,n,Je),"requestHandlerProxy")}}};export{C as a,x as b,E as c,Ce as d};
|
|
26
|
-
//# sourceMappingURL=chunk-6AFSG5YF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@zuplo/otel/buffer.ts","@zuplo/otel/exporter.ts","@zuplo/otel/attributes-utils.ts","@zuplo/otel/wrap.ts","@zuplo/otel/plugin.ts","@zuplo/otel/instrumentation/fetch.ts","@zuplo/otel/config.ts","@zuplo/otel/logprocessor.ts","@zuplo/otel/sampling.ts","@zuplo/otel/spanprocessor.ts","@zuplo/otel/invocation.ts","@zuplo/otel/types.ts","@zuplo/otel/sdk.ts","@zuplo/otel/context.ts","@zuplo/otel/instrumentation/common.ts","@zuplo/otel/tracer.ts","@zuplo/otel/span.ts","@zuplo/otel/logprovider.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/LoggerProvider.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/Logger.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/LogRecordImpl.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/utils/validation.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/internal/LoggerProviderSharedState.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/export/NoopLogRecordProcessor.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/MultiLogRecordProcessor.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/internal/utils.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/semconv.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/LoggerMetrics.ts","../../../../../node_modules/@opentelemetry/sdk-logs/src/version.ts","@zuplo/otel/logger.ts","@zuplo/otel/traceprovider.ts","@zuplo/otel/zuplo-exporter.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;iFAAA,OAAS,UAAAA,OAAc,cAGvB,OAAO,OAAO,WAAY,CAAE,OAAAA,EAAO,CAAC,ECHpC,OAAuB,oBAAAC,OAAwB,sBAC/C,OACE,sBAAAC,GACA,uBAAAC,OACK,kCAGP,OAAS,2BAAAC,GAAyB,wBAAAC,OAA4B,iBCP9D,SAASC,GAAcC,EAAkD,CACvE,OAAO,OAAOA,GAAU,UAAYA,IAAU,MAAQ,CAAC,MAAM,QAAQA,CAAK,CAC5E,CAFSC,EAAAF,GAAA,iBAIT,SAASG,GAAcF,EAAyB,CAC9C,GAAIA,GAAU,KACZ,MAAO,GAGT,GAAI,MAAM,QAAQA,CAAK,EAAG,CACxB,QAASG,EAAI,EAAGA,EAAIH,EAAM,OAAQG,GAAK,EACrCH,EAAMG,CAAC,EAAID,GAAcF,EAAMG,CAAC,CAAC,EAEnC,OAAOH,CACT,CAEA,OAAID,GAAcC,CAAK,GACrBI,EAAwBJ,CAAK,EACtBA,CAIX,CAlBSC,EAAAC,GAAA,iBAuBF,SAASE,EAAwBC,EAAqC,CAC3E,OAAO,KAAKA,CAAU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EAAE,oBAAoBI,EACjB,GAELJ,EAAE,gBACe,MAAM,QAAQA,EAAE,cAAc,EAC7CA,EAAE,eACF,CAACA,EAAE,cAAc,GACH,KACfM,GACCA,aAAqBH,GACrBG,EAAU,oBAAoBF,CAClC,EAEK,EACT,CAhBSP,EAAAQ,GAAA,qBA0FF,IAAME,GAAN,cAAkCC,EAAgB,CA3JzD,MA2JyD,CAAAX,EAAA,4BAC/C,OAER,YAAYE,EAAsB,CAChC,MAAM,EACNU,GAAa,eAAe,EAC5B,KAAK,OAASV,CAChB,CAES,WAAWW,EAElB,CAIAC,GAAwB,CACtB,IAAKD,EAAQ,2BACb,MAAOA,EAAQ,4BACjB,CAAC,EAED,IAAMX,EAASE,GAAkB,KAAK,MAAM,EAS5C,GAAII,GAAkBN,CAAM,GAAK,CAACW,EAAQ,6BAExC,MAAO,CAAE,oBAAqBb,EAACe,GAAYA,EAAb,sBAAqB,EAGrD,IAAMC,EAAcC,GAAkBJ,EAASX,CAAM,EAKrD,MAAO,CAAE,oBAJwCF,EAACe,GACzCG,GAAmBH,EAASC,EAAaG,EAAoB,EADrB,sBAIpB,CAC/B,CACF","names":["Buffer","ExportResultCode","JsonLogsSerializer","JsonTraceSerializer","BackgroundDispatchError","BackgroundDispatcher","isPlainObject","value","__name","sanitizeValue","i","sanitizeEmptyAttributes","attributes","key","unwrapSymbol","isWrapped","item","__name","isProxyable","wrap","handler","autoPassthrough","proxyHandler","target","prop","receiver","passthroughGet","thisArg","argArray","unwrap","unwrappedTarget","value","args","defaultHeaders","debugHeaderAllowlist","sanitizeOtlpUrl","url","parsed","__name","sanitizeOtlpRequestHeaders","headers","sanitized","name","value","normalizedName","requestDebugLog","options","response","sendOtlpRequest","unwrap","cause","BackgroundDispatchError","OTLPSpanExporter","config","spans","resultCallback","span","ExportResultCode","sanitizeEmptyAttributes","exportMessage","JsonTraceSerializer","BackgroundDispatcher","OTLPLogExporter","exportConfig","batchConfig","logs","log","JsonLogsSerializer","TelemetryPlugin","trackFeature","apiContext","propagation","SpanKind","SpanStatusCode","trace","context","W3CTraceContextPropagator","DefaultLogProcessor","__name","exporter","logRecord","_result","SpanStatusCode","TraceFlags","ParentBasedSampler","TraceIdRatioBasedSampler","SemanticAttributes","internalTailSampler","sampler","traceInfo","localRootSpan","SemanticAttributes","__name","multiTailSampler","samplers","result","isHeadSampled","TraceFlags","isRootErrorSpan","SpanStatusCode","createSampler","conf","ratioSampler","TraceIdRatioBasedSampler","ParentBasedSampler","ExportResultCode","createContextKey","INVOCATION_ID_KEY","createContextKey","KEY_SEPARATOR","invocationCounter","nextInvocationId","__name","withInvocationId","context","invocationId","getInvocationId","value","traceStateKey","traceId","getSampler","conf","getActiveConfig","__name","TraceState","exporter","span","readableSpan","sampler","unfinishedSpans","exportPromise","spans","config","processedSpans","resolve","reject","result","ExportResultCode","MAX_BUFFERED_TRACES","EVICTION_LOG_INTERVAL","BatchTraceSpanProcessor","key","traceState","evictCount","evicted","traceId","parentContext","traceStateKey","getInvocationId","err","entries","snapshotKey","isSpanProcessorConfig","config","__name","isProcessorConfig","hasSpanProcessors","hasLogProcessors","configSymbol","setConfig","config","ctx","context","__name","getActiveConfig","isSampler","sampler","isTraceConfigExporter","isSpanExporterInstance","exporter","isTraceAndLogConfigExporter","parseConfig","supplied","spanProcessors","logProcessors","OTLPSpanExporter","BatchTraceSpanProcessor","DefaultLogProcessor","OTLPLogExporter","isProcessorConfig","isSpanProcessorConfig","headSampleConf","headSampler","createSampler","spans","internalTailSampler","multiTailSampler","isHeadSampled","isRootErrorSpan","W3CTraceContextPropagator","gatherRequestAttributes","request","parsedUrl","attrs","headers","u","__name","gatherResponseAttributes","response","getParentContextFromHeaders","propagation","apiContext","key","getParentContextFromRequest","workerConfig","getActiveConfig","updateSpanNameOnRoute","span","readable","method","fetchInstrumentation","spanContext","attributes","SpanKind","instrumentClientFetch","fetchFn","configFn","wrap","target","thisArg","argArray","zuplo","fetchArgs","activeConfig","config","tracer","trace","options","url","spanName","h","k","v","error","SpanStatusCode","instrumentGlobalFetch","apiContext","context","propagation","SpanStatusCode","trace","resourceFromAttributes","ATTR_CLOUD_ACCOUNT_ID","ATTR_CLOUD_PLATFORM","ATTR_CLOUD_PROVIDER","ATTR_SERVICE_NAME","ATTR_SERVICE_NAMESPACE","ATTR_SERVICE_VERSION","ATTR_TELEMETRY_SDK_NAME","SemanticAttributes","AsyncLocalStorage","EventEmitter","ROOT_CONTEXT","ADD_LISTENER_METHODS","AbstractAsyncHooksContextManager","__name","context","target","EventEmitter","manager","contextWrapper","args","ee","methodName","original","contextManager","event","listener","events","patchedListener","map","listeners","AsyncLocalStorageContextManager","AsyncLocalStorage","ROOT_CONTEXT","fn","thisArg","cb","trace","apiContext","SpanKind","TraceFlags","trace","sanitizeAttributes","RandomIdGenerator","SamplingDecision","SpanKind","SpanStatusCode","hrTimeDuration","isAttributeValue","isTimeInput","sanitizeAttributes","ATTR_EXCEPTION_MESSAGE","ATTR_EXCEPTION_STACKTRACE","ATTR_EXCEPTION_TYPE","transformExceptionAttributes","exception","attributes","ATTR_EXCEPTION_MESSAGE","ATTR_EXCEPTION_TYPE","ATTR_EXCEPTION_STACKTRACE","__name","millisToHr","millis","getHrTime","input","now","v","isAttributeKey","key","SpanImpl","SpanStatusCode","ZUPLO_INSTRUMENTATION_SCOPE","init","SpanKind","sanitizeAttributes","link","links","value","isAttributeValue","name","attributesOrStartTime","startTime","isTimeInput","time","status","endTime","hrTimeDuration","idGenerator","RandomIdGenerator","getFlagAt","flagSequence","position","__name","WorkerTracer","spanProcessors","resource","key","promises","spanProcessor","extra","name","options","context","apiContext","trace","config","getActiveConfig","parentSpanContext","traceId","randomTraceFlag","getTraceInfo","spanKind","SpanKind","sanitisedAttrs","sanitizeAttributes","samplingDecision","decision","traceState","attrs","attributes","spanId","parentSpanId","traceFlags","SamplingDecision","TraceFlags","spanContext","span","SpanImpl","sp","args","parentContext","fn","contextWithSpanSet","PromiseTracker","__name","promise","maxWaitMs","allSettledMutable","createWaitUntil","fn","context","tracker","wrap","target","_thisArg","argArray","proxyExecutionContext","prop","passthroughGet","allSettledMutable","promises","values","__name","logs","diag","createNoopLogger","defaultResource","BindOnceFuture","SeverityNumber","context","trace","TraceFlags","isSpanContextValid","api","timeInputToHrTime","ATTR_EXCEPTION_MESSAGE","ATTR_EXCEPTION_STACKTRACE","ATTR_EXCEPTION_TYPE","diag","isLogAttributeValue","val","isLogAttributeValueInternal","__name","visited","item","obj","key","AddAttributeDecision","addAttribute","attributes","limits","currentAttributesCount","value","diag","isNewKey","truncateToSize","limit","truncatedObj","k","v","normalizeScopeAttributes","normalizedAttributes","droppedAttributesCount","decision","LogRecordImpl","__name","severityText","severityNumber","body","eventName","_sharedState","instrumentationScope","logRecord","timestamp","observedTimestamp","attributes","exception","context","now","timeInputToHrTime","spanContext","key","value","decision","addAttribute","AddAttributeDecision","k","v","hasMinimumAttributes","ATTR_EXCEPTION_MESSAGE","exceptionObj","ATTR_EXCEPTION_TYPE","ATTR_EXCEPTION_STACKTRACE","Logger","__name","instrumentationScope","sharedState","logRecord","currentContext","context","logRecordInstance","LogRecordImpl","options","loggerConfig","severityNumber","SeverityNumber","spanContext","trace","isSpanContextValid","TraceFlags","enabledOpts","processor","createNoopMeter","SeverityNumber","NoopLogRecordProcessor","__name","_logRecord","_context","_options","callWithTimeout","MultiLogRecordProcessor","__name","processors","forceFlushTimeoutMillis","timeout","processor","callWithTimeout","logRecord","context","options","normalizeAnyValue","value","valueType","a","b","k","v","__name","getInstrumentationScopeKey","scope","METRIC_OTEL_SDK_LOG_CREATED","LoggerMetrics","__name","meter","METRIC_OTEL_SDK_LOG_CREATED","VERSION","DEFAULT_LOGGER_CONFIG","SeverityNumber","DEFAULT_LOGGER_CONFIGURATOR","__name","LoggerProviderSharedState","resource","forceFlushTimeoutMillis","logRecordLimits","processors","loggerConfigurator","meterProvider","MultiLogRecordProcessor","NoopLogRecordProcessor","meter","VERSION","createNoopMeter","LoggerMetrics","instrumentationScope","key","getInstrumentationScopeKey","config","DEFAULT_LOGGER_NAME","LoggerProvider","__name","config","mergedConfig","defaultResource","DEFAULT_LOGGER_CONFIGURATOR","LoggerProviderSharedState","BindOnceFuture","name","version","options","diag","createNoopLogger","instrumentationScope","normalizeScopeAttributes","key","getInstrumentationScopeKey","Logger","ZuploOtelLogger","__name","baseLogger","logRecord","options","ZuploLoggerProvider","LoggerProvider","__name","name","_version","_options","baseLogger","ZuploOtelLogger","logs","trace","ZuploTracerProvider","__name","spanProcessors","resource","name","version","options","key","WorkerTracer","trace","createResource","__name","options","config","runtimeResourceAttrs","ATTR_CLOUD_PROVIDER","ATTR_CLOUD_PLATFORM","ATTR_CLOUD_ACCOUNT_ID","ATTR_TELEMETRY_SDK_NAME","SemanticAttributes","serviceResource","resourceFromAttributes","ATTR_SERVICE_NAME","ATTR_SERVICE_NAMESPACE","ATTR_SERVICE_VERSION","resource","initialised","init","instrumentGlobalFetch","propagation","otelResource","ZuploTracerProvider","ZuploLoggerProvider","context","AsyncLocalStorageContextManager","createInitializer","trigger","conf","parseConfig","resolved","MAX_BACKGROUND_WORK_WAIT_MS","exportSpans","key","tracker","tracer","trace","WorkerTracer","coldStart","createHandlerFlowFn","instrumentation","handlerFn","args","proxiedCtx","proxyExecutionContext","instrumentedTrigger","name","spanContext","attrs","invocationId","nextInvocationId","parentContext","withInvocationId","apiContext","span","result","attributes","error","SpanStatusCode","traceStateKey","createHandlerProxy","initializer","ctx","setConfig","flowFn","ZUPLO_INSTRUMENTATION_SCOPE","ConfigurationError","OTEL_TRACES_PATH","managedEndpoint","setManagedTraceEndpoint","endpoint","__name","missingIngestError","ConfigurationError","__name","ZuploSpanExporter","endpoint","managedEndpoint","OTLPSpanExporter","OTEL_TRACES_PATH","spans","resultCallback","hasProcessors","value","__name","hasDestination","config","c","withZuploDefaults","base","BatchTraceSpanProcessor","ZuploSpanExporter","usesZuploExporter","processor","OpenTelemetryPlugin","TelemetryPlugin","trackFeature","options","setManagedTraceEndpoint","wrapped","initializer","createInitializer","createHandlerProxy","fetchInstrumentation"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Zuplo, Inc. All rights reserved.
|
|
4
|
-
*
|
|
5
|
-
* This software and associated documentation files (the "Software") is intended to be used
|
|
6
|
-
* only by Zuplo customers solely to develop and test applications that will be deployed
|
|
7
|
-
* to Zuplo hosted services. You and others in your organization may use these files on your
|
|
8
|
-
* Development Devices solely for the above stated purpose.
|
|
9
|
-
*
|
|
10
|
-
* Outside of uses stated above, no license is granted for any other purpose including
|
|
11
|
-
* without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
12
|
-
* sublicense, host, and/or sell copies of the Software.
|
|
13
|
-
*
|
|
14
|
-
* The software may include third party components with separate legal notices or governed by
|
|
15
|
-
* other agreements, as described in licenses either embedded in or accompanying the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
18
|
-
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
19
|
-
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
20
|
-
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
22
|
-
* DEALINGS IN THE SOFTWARE.
|
|
23
|
-
*--------------------------------------------------------------------------------------------*/
|
|
24
|
-
|
|
25
|
-
import{a as s}from"./chunk-A3QGJZO7.js";import{a}from"./chunk-UKQQD2JN.js";import{Z as i}from"./chunk-4POCC75H.js";import{a as r}from"./chunk-TYV53J3B.js";var u=["ZUPLO_USER_LOGGER_DATA_DOG_API_KEY","ZUPLO_USER_LOGGER_DATA_DOG_URL","ZUPLO_LOG_LEVEL","ZUPLO_HANDLER_WRITE_LOG_LEVEL"];function c(e){return e.startsWith("__ZUPLO")||e.startsWith("ZUPLO_")?!u.includes(e)&&!e.startsWith("ZUPLO_PUBLIC_"):e.startsWith("ZUDOKU_")?!e.startsWith("ZUDOKU_PUBLIC_"):!1}r(c,"isRestrictedEnvVariableName");function L(e){return!!e.startsWith("ZUPLO_")}r(L,"isZuploReadableEnvVariableName");var f=new Proxy({},{get(e,t){let n=String(t);switch(n){case"ZUPLO_ENVIRONMENT_TYPE":return i.instance.loggingEnvironmentType;case"ZUPLO_ENVIRONMENT_STAGE":return i.instance.loggingEnvironmentStage;case"ZUPLO_ENVIRONMENT_NAME":return i.instance.runtime.__ZUPLO_DEPLOYMENT_NAME;case"ZUPLO_ACCOUNT_NAME":return i.instance.accountName;case"ZUPLO_PROJECT_NAME":return i.instance.projectName;case"ZUPLO_BUILD_ID":return i.instance.build.BUILD_ID;case"ZUPLO_COMPATIBILITY_DATE":return i.instance.build.COMPATIBILITY_DATE}if(!(c(n)&&!L(n)))return i.instance.runtime[n]}});var _=new a(Symbol("ai-gateway-app-configuration")),p={set(e,t){let n=t!==null&&typeof t=="object"&&!Object.isFrozen(t)?s(t):t;_.set(e,{configuration:n})},has(e){return _.get(e)!==void 0},get(e){return _.get(e)?.configuration},getId(e){let t=p.get(e);if(t===null||typeof t!="object")return;let n=Reflect.get(t,"id");return typeof n=="string"&&n!==""?n:void 0}};function A(e,t,n){return`_${o(`${e}_${t}_${n}`)}`}r(A,"getRawOperationDataIdentifierName");function P(e,t,n,g){return`_${o(e.toLowerCase())}_${t.toLowerCase()}_${n.toLowerCase()}_${g.toLowerCase()}`}r(P,"getIdForParameterSchema");function R(e,t,n){return`_${o(e.toLowerCase())}_${t.toLowerCase()}_rb_${o(n.toLowerCase())}`}r(R,"getIdForRequestBodySchema");function Z(e,t){return`_${o(e)}_${o(t)}`}r(Z,"getIdForRefSchema");function o(e){let t=e.replace(/\[/g,"_LBRACKET_").replace(/\]/g,"_RBRACKET_").replace(/\{/g,"_LCURLY_").replace(/\}/g,"_RCURLY_").replace(/\//g,"_SLASH_").replace(/-/g,"_DASH_").replace(/\./g,"_DOT_").replace(/\+/g,"_PLUS_").replace(/:/g,"_COLON_").replace(/@/g,"_AT_").replace(/\$/g,"_DOLLAR_").replace(/[^a-zA-Z0-9_]/g,"_");return/^[a-zA-Z_]/.test(t)||(t=`_${t}`),t}r(o,"sanitizedIdentifierName");export{c as a,L as b,f as c,p as d,A as e,P as f,R as g,Z as h,o as i};
|
|
26
|
-
//# sourceMappingURL=chunk-B3D32RUX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@zuplo/runtime/environment.ts","@zuplo/runtime/ai-gateway/app-configuration-context.ts","@zuplo/runtime/utils/open-api-utils.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;2JAEA,IAAMA,EAAmC,CACvC,qCACA,iCACA,kBACA,+BACF,EASO,SAASC,EAA4BC,EAAc,CAExD,OAAIA,EAAK,WAAW,SAAS,GAAKA,EAAK,WAAW,QAAQ,EAItD,CAACF,EAAiC,SAASE,CAAI,GAC/C,CAACA,EAAK,WAAW,eAAe,EAIhCA,EAAK,WAAW,SAAS,EACpB,CAACA,EAAK,WAAW,gBAAgB,EAEnC,EACT,CAfgBC,EAAAF,EAAA,+BAoBT,SAASG,EAA+BF,EAAc,CAC3D,MAAI,EAAAA,EAAK,WAAW,QAAQ,CAI9B,CALgBC,EAAAC,EAAA,kCAWhB,IAAMC,EAAc,IAAI,MACtB,CAAC,EACD,CACE,IAAIC,EAAQC,EAAM,CAChB,IAAMC,EAAU,OAAOD,CAAI,EAG3B,OAAQC,EAAS,CACf,IAAK,yBACH,OAAOC,EAAY,SAAS,uBAC9B,IAAK,0BACH,OAAOA,EAAY,SAAS,wBAC9B,IAAK,yBACH,OAAOA,EAAY,SAAS,QAAQ,wBACtC,IAAK,qBAC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AAA,2BAiBT,SAASG,EACdP,EACAC,EACAO,EACQ,CACR,MAAO,IAAIN,EAAwBF,EAAK,YAAY,CAAC,CAAC,IAAIC,EAAU,YAAY,CAAC,OAAOC,EAAwBM,EAAY,YAAY,CAAC,CAAC,EAC5I,CANgBL,EAAAI,EAAA,6BAeT,SAASE,EAAkBV,EAAqBW,EAAqB,CAC1E,MAAO,IAAIR,EAAwBH,CAAW,CAAC,IAAIG,EAAwBQ,CAAG,CAAC,EACjF,CAFgBP,EAAAM,EAAA,qBAUT,SAASP,EAAwBI,EAAsB,CAE5D,IAAIK,EAAcL,EAEf,QAAQ,MAAO,YAAY,EAC3B,QAAQ,MAAO,YAAY,EAC3B,QAAQ,MAAO,UAAU,EACzB,QAAQ,MAAO,UAAU,EACzB,QAAQ,MAAO,SAAS,EACxB,QAAQ,KAAM,QAAQ,EAEtB,QAAQ,MAAO,OAAO,EACtB,QAAQ,MAAO,QAAQ,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,MAAM,EACpB,QAAQ,MAAO,UAAU,EAEzB,QAAQ,iBAAkB,GAAG,EAGhC,MAAK,aAAa,KAAKK,CAAW,IAChCA,EAAc,IAAIA,CAAW,IAGxBA,CACT,CAzBgBR,EAAAD,EAAA","names":["ALLOWED_WRITABLE_ZUPLO_VARIABLES","isRestrictedEnvVariableName","name","__name","isZuploReadableEnvVariableName","environment","target","prop","envName","Environment","appConfiguration","ContextData","AIGatewayConfiguration","context","configuration","storedConfiguration","deepFreeze","id","getRawOperationDataIdentifierName","oasFileName","path","operation","sanitizedIdentifierName","__name","getIdForParameterSchema","type","name","getIdForRequestBodySchema","contentType","getIdForRefSchema","ref","encodedName"]}
|