@zuplo/cli 7.11.5 → 7.11.7
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/node_modules/@posthog/core/dist/featureFlagUtils.d.ts +1 -1
- package/node_modules/@posthog/core/dist/featureFlagUtils.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/featureFlagUtils.js +1 -0
- package/node_modules/@posthog/core/dist/featureFlagUtils.mjs +1 -0
- package/node_modules/@posthog/core/package.json +1 -1
- package/node_modules/@posthog/core/src/featureFlagUtils.ts +1 -0
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/core/zeno.js +5 -4
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/out/esm/{chunk-5SHD5VGF.js → chunk-7WJVPTYD.js} +3 -3
- package/node_modules/@zuplo/runtime/out/esm/chunk-7WJVPTYD.js.map +1 -0
- package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
- package/node_modules/@zuplo/runtime/out/esm/mocks/index.js.map +1 -1
- package/node_modules/@zuplo/runtime/out/types/index.d.ts +18 -43
- package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +17 -42
- package/node_modules/@zuplo/runtime/out/types/mcp/messages/index.d.ts +17 -42
- package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +17 -42
- package/node_modules/@zuplo/runtime/out/types/mocks/index.d.ts +17 -42
- package/node_modules/@zuplo/runtime/out/types/sdks/aws/index.d.ts +17 -42
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/package.json +11 -11
- package/node_modules/@zuplo/runtime/out/esm/chunk-5SHD5VGF.js.map +0 -1
- /package/node_modules/@zuplo/runtime/out/esm/{chunk-5SHD5VGF.js.LEGAL.txt → chunk-7WJVPTYD.js.LEGAL.txt} +0 -0
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
* DEALINGS IN THE SOFTWARE.
|
|
23
23
|
*--------------------------------------------------------------------------------------------*/
|
|
24
24
|
|
|
25
|
-
import{E as p,J as c,M as u}from"../chunk-
|
|
25
|
+
import{E as p,J as c,M as u}from"../chunk-7WJVPTYD.js";import"../chunk-NUVXDVLJ.js";import{a as d}from"../chunk-QGAJTUPE.js";import"../chunk-A3QGJZO7.js";import"../chunk-CDEAY3VY.js";import{aa as i}from"../chunk-LVSZ3WTO.js";import{a as o}from"../chunk-TYV53J3B.js";function w(l={request:new Request("https://api.example.com")}){let e=[];function t(s){e.push(Promise.resolve(s))}return o(t,"waitUntil"),{context:new a({event:{waitUntil:t},route:l.route,originalRequest:l.request}),invokeResponse:o(async()=>{await Promise.all(e)},"invokeResponse")}}o(w,"createMockContext");var g={path:"/",methods:["GET"],handler:{module:{},export:"default"},raw:o(()=>({}),"raw")},a=class extends EventTarget{static{o(this,"MockZuploContext")}#e;#t;contextId;requestId;log;route;custom;incomingRequestProperties;parentContext;analyticsContext;constructor({event:e,route:t=g,parentContext:n,originalRequest:r}){super(),this.requestId=crypto.randomUUID(),this.contextId=crypto.randomUUID(),this.log={info:i.console.info,log:i.console.log,debug:i.console.debug,warn:i.console.warn,error:i.console.error,setLogProperties:o(()=>{},"setLogProperties")},this.custom={},this.route=t,this.incomingRequestProperties={ip:"203.0.113.7",asn:1234,asOrganization:"ORGANIZATION",city:"Seattle",region:"Washington",regionCode:"WA",colo:"SEA",continent:"NA",country:"US",postalCode:"98004",metroCode:"SEA",latitude:void 0,longitude:void 0,timezone:void 0,httpProtocol:void 0,clientCert:void 0,clientMtlsVerificationStatus:void 0,clientMtlsVerificationReason:void 0,clientCertFingerprintSha256:void 0,clientCertNotBefore:void 0,clientCertNotAfter:void 0,clientCertIssuerDn:void 0,clientCertSubjectDn:void 0},this.parentContext=n,this.#e=e,this.#t=r,this.analyticsContext=new c(this.requestId)}waitUntil(e){this.#e.waitUntil(e)}invokeInboundPolicy(e,t){throw new Error("Not implemented")}invokeOutboundPolicy(e,t,n){throw new Error("Not implemented")}invokeRoute(e,t){throw new Error("Not implemented")}addResponseSendingHook(e){throw new Error("Not implemented")}addResponseSendingFinalHook(e){throw new Error("Not implemented")}addPreRequestHandler(e,t){let n;try{n=u.getContextExtensions(this)}catch{n=u.initialize(this,new d(this.#t??new Request("https://api.example.com")))}n.preRequestPhase??="active",p(this,n,e,t)}get preRequestHandlers(){let e;try{e=u.getContextExtensions(this)}catch{return[]}return(e.preRequestState?.entries??[]).map(t=>({policyName:t.policyName,name:t.name}))}addEventListener(e,t,n){let r=o(s=>{try{typeof t=="function"?t(s):t.handleEvent(s)}catch(m){throw this.log.error(`Error invoking event ${e}. See following logs for details.`),m}},"wrapped");super.addEventListener(e,r,n)}};export{a as MockZuploContext,w as createMockContext};
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@zuplo/runtime/mocks/context.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;0QAkCO,SAASA,EACdC,EAA6D,CAC3D,QAAS,IAAI,QAAQ,yBAAyB,CAChD,EACA,CACA,IAAMC,EAAwC,CAAC,EAG/C,SAASC,EAAUC,EAA6B,CAC9CF,EAAkB,KAAK,QAAQ,QAAQE,CAAO,CAAC,CACjD,CAFS,OAAAC,EAAAF,EAAA,aAcF,CAAE,QAVO,IAAIG,EAAiB,CACnC,MAAO,CAAE,UAAAH,CAAU,EACnB,MAAOF,EAAQ,MACf,gBAAiBA,EAAQ,OAC3B,CAAC,EAMiB,eAJKI,EAAA,SAAY,CACjC,MAAM,QAAQ,IAAIH,CAAiB,CACrC,EAFuB,iBAIU,CACnC,CAvBgBG,EAAAL,EAAA,qBAyBhB,IAAMO,EAA2C,CAC/C,KAAM,IACN,QAAS,CAAC,KAAK,EACf,QAAS,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AwC,CAClE,MAAM,IAAI,MAAM,iBAAiB,CACnC,CAQA,qBACEC,EACArB,EACM,CAIN,IAAIsB,EACJ,GAAI,CACFA,EAAMC,EAAuB,qBAAqB,IAAI,CACxD,MAAQ,CACND,EAAMC,EAAuB,WAC3B,KACA,IAAIC,EACF,KAAKhB,IAAoB,IAAI,QAAQ,yBAAyB,CAChE,CACF,CACF,CAKAc,EAAI,kBAAoB,SACxBG,EAA0B,KAAMH,EAAKD,EAASrB,CAAO,CACvD,CAgBA,IAAI,oBAAyE,CAC3E,IAAIsB,EACJ,GAAI,CACFA,EAAMC,EAAuB,qBAAqB,IAAI,CACxD,MAAQ,CACN,MAAO,CAAC,CACV,CACA,OAAQD,EAAI,iBAAiB,SAAW,CAAC,GAAG,IAAKI,IAAW,CAC1D,WAAYA,EAAM,WAClB,KAAMA,EAAM,IACd,EAAE,CACJ,CAES,iBACPC,EACAN,EACArB,EACM,CACN,IAAM4B,EAA8CxB,EAACyB,GAAM,CACzD,GAAI,CACF,OAAOR,GAAY,WAAaA,EAAQQ,CAAC,EAAIR,EAAQ,YAAYQ,CAAC,CACpE,OAASC,EAAK,CACZ,WAAK,IAAI,MACP,wBAAwBH,CAAI,mCAC9B,EACMG,CACR,CACF,EAToD,WAUpD,MAAM,iBAAiBH,EAAMC,EAAS5B,CAAO,CAC/C,CACF","names":["createMockContext","options","waitUntilPromises","waitUntil","promise","__name","MockZuploContext","DEFAULT_ROUTE_CONFIG","#event","#originalRequest","event","route","parentContext","originalRequest","internals_default","ZuploGatewayAnalyticsContext","policyName","request","response","input","init","hook","handler","ext","ZuploContextExtensions","ZuploRequest","registerPreRequestHandler","entry","type","wrapped","e","err"]}
|
|
@@ -8637,11 +8637,24 @@ declare type LogFormat = "pretty" | "json" | "gcp" | "cloudflare";
|
|
|
8637
8637
|
*/
|
|
8638
8638
|
export declare interface Logger extends SystemLogger {
|
|
8639
8639
|
/**
|
|
8640
|
-
* Set properties
|
|
8641
|
-
*
|
|
8642
|
-
*
|
|
8640
|
+
* Set properties for this request. They are added to every later log entry
|
|
8641
|
+
* for this request that a log plugin ships (Datadog, Splunk, Loki and the
|
|
8642
|
+
* others), and to the request's row in Zuplo's request log, which the log
|
|
8643
|
+
* viewer in the Zuplo Portal shows in the request's details.
|
|
8643
8644
|
*
|
|
8644
|
-
*
|
|
8645
|
+
* Properties apply only to the current request. Each call merges into the
|
|
8646
|
+
* properties already set, and a later value for the same key overwrites an
|
|
8647
|
+
* earlier one. In log entries, a per-request property takes precedence over
|
|
8648
|
+
* a static field with the same name configured in the logging plugin. A
|
|
8649
|
+
* request made with `context.invokeRoute` has its own properties and its
|
|
8650
|
+
* own row.
|
|
8651
|
+
*
|
|
8652
|
+
* To keep request rows small, a row holds at most 64 properties, a key can
|
|
8653
|
+
* be at most 128 characters, and a value at most 2048 characters. A longer
|
|
8654
|
+
* value is truncated on the row, and a property over the other limits is
|
|
8655
|
+
* left off the row. Log entries are not limited this way.
|
|
8656
|
+
*
|
|
8657
|
+
* @param properties - Key-value pairs for this request. Values must be string, number, or boolean.
|
|
8645
8658
|
*
|
|
8646
8659
|
* @example
|
|
8647
8660
|
* ```ts
|
|
@@ -8658,44 +8671,6 @@ export declare interface Logger extends SystemLogger {
|
|
|
8658
8671
|
setLogProperties?(
|
|
8659
8672
|
properties: Record<string, string | number | boolean>
|
|
8660
8673
|
): void;
|
|
8661
|
-
/**
|
|
8662
|
-
* Attach properties to this request's row in Zuplo's request log, the one
|
|
8663
|
-
* row per request that analytics and the request details view read.
|
|
8664
|
-
*
|
|
8665
|
-
* This differs from `setLogProperties`, which adds fields to every log
|
|
8666
|
-
* entry (each `context.log.info(...)` line) that log plugins ship. Use
|
|
8667
|
-
* `setRequestProperties` to label the request itself, for example with a
|
|
8668
|
-
* tenant ID, a feature flag or an experiment variant.
|
|
8669
|
-
*
|
|
8670
|
-
* Each call merges into the properties already set for this request, and a
|
|
8671
|
-
* later value for the same key overwrites an earlier one. Numbers and
|
|
8672
|
-
* booleans are stored as strings, and `null` or `undefined` values are
|
|
8673
|
-
* skipped. A request made with `context.invokeRoute` has a row of its own,
|
|
8674
|
-
* so properties set while it runs land on that row, not on the caller's.
|
|
8675
|
-
*
|
|
8676
|
-
* To keep rows small, a request holds at most 64 properties, a key can be
|
|
8677
|
-
* at most 128 characters, and a value at most 2048 characters. A longer
|
|
8678
|
-
* value is truncated, and a property over the other limits is dropped. The
|
|
8679
|
-
* method never throws.
|
|
8680
|
-
*
|
|
8681
|
-
* @param properties - Key-value pairs to attach to the request's log row.
|
|
8682
|
-
*
|
|
8683
|
-
* @example
|
|
8684
|
-
* ```ts
|
|
8685
|
-
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
8686
|
-
* context.log.setRequestProperties({
|
|
8687
|
-
* tenantId: request.user?.data.tenantId,
|
|
8688
|
-
* pricingExperiment: "variant-b",
|
|
8689
|
-
* cached: false,
|
|
8690
|
-
* });
|
|
8691
|
-
*
|
|
8692
|
-
* return new Response("ok");
|
|
8693
|
-
* }
|
|
8694
|
-
* ```
|
|
8695
|
-
*/
|
|
8696
|
-
setRequestProperties(
|
|
8697
|
-
properties: Record<string, string | number | boolean | undefined | null>
|
|
8698
|
-
): void;
|
|
8699
8674
|
}
|
|
8700
8675
|
|
|
8701
8676
|
/* Excluded from this release type: LoggingContext */
|
|
@@ -10791,7 +10766,7 @@ declare interface MetricsData {
|
|
|
10791
10766
|
*/
|
|
10792
10767
|
url?: string;
|
|
10793
10768
|
/**
|
|
10794
|
-
* Free-form properties attached with `context.log.
|
|
10769
|
+
* Free-form properties attached with `context.log.setLogProperties`.
|
|
10795
10770
|
* Omitted when none were set.
|
|
10796
10771
|
*/
|
|
10797
10772
|
properties?: Record<string, string>;
|
|
@@ -1037,11 +1037,24 @@ declare type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
|
1037
1037
|
*/
|
|
1038
1038
|
declare interface Logger extends BaseLogger {
|
|
1039
1039
|
/**
|
|
1040
|
-
* Set properties
|
|
1041
|
-
*
|
|
1042
|
-
*
|
|
1040
|
+
* Set properties for this request. They are added to every later log entry
|
|
1041
|
+
* for this request that a log plugin ships (Datadog, Splunk, Loki and the
|
|
1042
|
+
* others), and to the request's row in Zuplo's request log, which the log
|
|
1043
|
+
* viewer in the Zuplo Portal shows in the request's details.
|
|
1043
1044
|
*
|
|
1044
|
-
*
|
|
1045
|
+
* Properties apply only to the current request. Each call merges into the
|
|
1046
|
+
* properties already set, and a later value for the same key overwrites an
|
|
1047
|
+
* earlier one. In log entries, a per-request property takes precedence over
|
|
1048
|
+
* a static field with the same name configured in the logging plugin. A
|
|
1049
|
+
* request made with `context.invokeRoute` has its own properties and its
|
|
1050
|
+
* own row.
|
|
1051
|
+
*
|
|
1052
|
+
* To keep request rows small, a row holds at most 64 properties, a key can
|
|
1053
|
+
* be at most 128 characters, and a value at most 2048 characters. A longer
|
|
1054
|
+
* value is truncated on the row, and a property over the other limits is
|
|
1055
|
+
* left off the row. Log entries are not limited this way.
|
|
1056
|
+
*
|
|
1057
|
+
* @param properties - Key-value pairs for this request. Values must be string, number, or boolean.
|
|
1045
1058
|
*
|
|
1046
1059
|
* @example
|
|
1047
1060
|
* ```ts
|
|
@@ -1058,44 +1071,6 @@ declare interface Logger extends BaseLogger {
|
|
|
1058
1071
|
setLogProperties?(
|
|
1059
1072
|
properties: Record<string, string | number | boolean>
|
|
1060
1073
|
): void;
|
|
1061
|
-
/**
|
|
1062
|
-
* Attach properties to this request's row in Zuplo's request log, the one
|
|
1063
|
-
* row per request that analytics and the request details view read.
|
|
1064
|
-
*
|
|
1065
|
-
* This differs from `setLogProperties`, which adds fields to every log
|
|
1066
|
-
* entry (each `context.log.info(...)` line) that log plugins ship. Use
|
|
1067
|
-
* `setRequestProperties` to label the request itself, for example with a
|
|
1068
|
-
* tenant ID, a feature flag or an experiment variant.
|
|
1069
|
-
*
|
|
1070
|
-
* Each call merges into the properties already set for this request, and a
|
|
1071
|
-
* later value for the same key overwrites an earlier one. Numbers and
|
|
1072
|
-
* booleans are stored as strings, and `null` or `undefined` values are
|
|
1073
|
-
* skipped. A request made with `context.invokeRoute` has a row of its own,
|
|
1074
|
-
* so properties set while it runs land on that row, not on the caller's.
|
|
1075
|
-
*
|
|
1076
|
-
* To keep rows small, a request holds at most 64 properties, a key can be
|
|
1077
|
-
* at most 128 characters, and a value at most 2048 characters. A longer
|
|
1078
|
-
* value is truncated, and a property over the other limits is dropped. The
|
|
1079
|
-
* method never throws.
|
|
1080
|
-
*
|
|
1081
|
-
* @param properties - Key-value pairs to attach to the request's log row.
|
|
1082
|
-
*
|
|
1083
|
-
* @example
|
|
1084
|
-
* ```ts
|
|
1085
|
-
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
1086
|
-
* context.log.setRequestProperties({
|
|
1087
|
-
* tenantId: request.user?.data.tenantId,
|
|
1088
|
-
* pricingExperiment: "variant-b",
|
|
1089
|
-
* cached: false,
|
|
1090
|
-
* });
|
|
1091
|
-
*
|
|
1092
|
-
* return new Response("ok");
|
|
1093
|
-
* }
|
|
1094
|
-
* ```
|
|
1095
|
-
*/
|
|
1096
|
-
setRequestProperties(
|
|
1097
|
-
properties: Record<string, string | number | boolean | undefined | null>
|
|
1098
|
-
): void;
|
|
1099
1074
|
}
|
|
1100
1075
|
|
|
1101
1076
|
declare type Modify<T, R> = Omit<T, keyof R> & R;
|
|
@@ -965,11 +965,24 @@ declare type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
|
965
965
|
*/
|
|
966
966
|
declare interface Logger extends BaseLogger {
|
|
967
967
|
/**
|
|
968
|
-
* Set properties
|
|
969
|
-
*
|
|
970
|
-
*
|
|
968
|
+
* Set properties for this request. They are added to every later log entry
|
|
969
|
+
* for this request that a log plugin ships (Datadog, Splunk, Loki and the
|
|
970
|
+
* others), and to the request's row in Zuplo's request log, which the log
|
|
971
|
+
* viewer in the Zuplo Portal shows in the request's details.
|
|
971
972
|
*
|
|
972
|
-
*
|
|
973
|
+
* Properties apply only to the current request. Each call merges into the
|
|
974
|
+
* properties already set, and a later value for the same key overwrites an
|
|
975
|
+
* earlier one. In log entries, a per-request property takes precedence over
|
|
976
|
+
* a static field with the same name configured in the logging plugin. A
|
|
977
|
+
* request made with `context.invokeRoute` has its own properties and its
|
|
978
|
+
* own row.
|
|
979
|
+
*
|
|
980
|
+
* To keep request rows small, a row holds at most 64 properties, a key can
|
|
981
|
+
* be at most 128 characters, and a value at most 2048 characters. A longer
|
|
982
|
+
* value is truncated on the row, and a property over the other limits is
|
|
983
|
+
* left off the row. Log entries are not limited this way.
|
|
984
|
+
*
|
|
985
|
+
* @param properties - Key-value pairs for this request. Values must be string, number, or boolean.
|
|
973
986
|
*
|
|
974
987
|
* @example
|
|
975
988
|
* ```ts
|
|
@@ -986,44 +999,6 @@ declare interface Logger extends BaseLogger {
|
|
|
986
999
|
setLogProperties?(
|
|
987
1000
|
properties: Record<string, string | number | boolean>
|
|
988
1001
|
): void;
|
|
989
|
-
/**
|
|
990
|
-
* Attach properties to this request's row in Zuplo's request log, the one
|
|
991
|
-
* row per request that analytics and the request details view read.
|
|
992
|
-
*
|
|
993
|
-
* This differs from `setLogProperties`, which adds fields to every log
|
|
994
|
-
* entry (each `context.log.info(...)` line) that log plugins ship. Use
|
|
995
|
-
* `setRequestProperties` to label the request itself, for example with a
|
|
996
|
-
* tenant ID, a feature flag or an experiment variant.
|
|
997
|
-
*
|
|
998
|
-
* Each call merges into the properties already set for this request, and a
|
|
999
|
-
* later value for the same key overwrites an earlier one. Numbers and
|
|
1000
|
-
* booleans are stored as strings, and `null` or `undefined` values are
|
|
1001
|
-
* skipped. A request made with `context.invokeRoute` has a row of its own,
|
|
1002
|
-
* so properties set while it runs land on that row, not on the caller's.
|
|
1003
|
-
*
|
|
1004
|
-
* To keep rows small, a request holds at most 64 properties, a key can be
|
|
1005
|
-
* at most 128 characters, and a value at most 2048 characters. A longer
|
|
1006
|
-
* value is truncated, and a property over the other limits is dropped. The
|
|
1007
|
-
* method never throws.
|
|
1008
|
-
*
|
|
1009
|
-
* @param properties - Key-value pairs to attach to the request's log row.
|
|
1010
|
-
*
|
|
1011
|
-
* @example
|
|
1012
|
-
* ```ts
|
|
1013
|
-
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
1014
|
-
* context.log.setRequestProperties({
|
|
1015
|
-
* tenantId: request.user?.data.tenantId,
|
|
1016
|
-
* pricingExperiment: "variant-b",
|
|
1017
|
-
* cached: false,
|
|
1018
|
-
* });
|
|
1019
|
-
*
|
|
1020
|
-
* return new Response("ok");
|
|
1021
|
-
* }
|
|
1022
|
-
* ```
|
|
1023
|
-
*/
|
|
1024
|
-
setRequestProperties(
|
|
1025
|
-
properties: Record<string, string | number | boolean | undefined | null>
|
|
1026
|
-
): void;
|
|
1027
1002
|
}
|
|
1028
1003
|
|
|
1029
1004
|
/**
|
|
@@ -1093,11 +1093,24 @@ declare type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
|
1093
1093
|
*/
|
|
1094
1094
|
declare interface Logger extends BaseLogger {
|
|
1095
1095
|
/**
|
|
1096
|
-
* Set properties
|
|
1097
|
-
*
|
|
1098
|
-
*
|
|
1096
|
+
* Set properties for this request. They are added to every later log entry
|
|
1097
|
+
* for this request that a log plugin ships (Datadog, Splunk, Loki and the
|
|
1098
|
+
* others), and to the request's row in Zuplo's request log, which the log
|
|
1099
|
+
* viewer in the Zuplo Portal shows in the request's details.
|
|
1099
1100
|
*
|
|
1100
|
-
*
|
|
1101
|
+
* Properties apply only to the current request. Each call merges into the
|
|
1102
|
+
* properties already set, and a later value for the same key overwrites an
|
|
1103
|
+
* earlier one. In log entries, a per-request property takes precedence over
|
|
1104
|
+
* a static field with the same name configured in the logging plugin. A
|
|
1105
|
+
* request made with `context.invokeRoute` has its own properties and its
|
|
1106
|
+
* own row.
|
|
1107
|
+
*
|
|
1108
|
+
* To keep request rows small, a row holds at most 64 properties, a key can
|
|
1109
|
+
* be at most 128 characters, and a value at most 2048 characters. A longer
|
|
1110
|
+
* value is truncated on the row, and a property over the other limits is
|
|
1111
|
+
* left off the row. Log entries are not limited this way.
|
|
1112
|
+
*
|
|
1113
|
+
* @param properties - Key-value pairs for this request. Values must be string, number, or boolean.
|
|
1101
1114
|
*
|
|
1102
1115
|
* @example
|
|
1103
1116
|
* ```ts
|
|
@@ -1114,44 +1127,6 @@ declare interface Logger extends BaseLogger {
|
|
|
1114
1127
|
setLogProperties?(
|
|
1115
1128
|
properties: Record<string, string | number | boolean>
|
|
1116
1129
|
): void;
|
|
1117
|
-
/**
|
|
1118
|
-
* Attach properties to this request's row in Zuplo's request log, the one
|
|
1119
|
-
* row per request that analytics and the request details view read.
|
|
1120
|
-
*
|
|
1121
|
-
* This differs from `setLogProperties`, which adds fields to every log
|
|
1122
|
-
* entry (each `context.log.info(...)` line) that log plugins ship. Use
|
|
1123
|
-
* `setRequestProperties` to label the request itself, for example with a
|
|
1124
|
-
* tenant ID, a feature flag or an experiment variant.
|
|
1125
|
-
*
|
|
1126
|
-
* Each call merges into the properties already set for this request, and a
|
|
1127
|
-
* later value for the same key overwrites an earlier one. Numbers and
|
|
1128
|
-
* booleans are stored as strings, and `null` or `undefined` values are
|
|
1129
|
-
* skipped. A request made with `context.invokeRoute` has a row of its own,
|
|
1130
|
-
* so properties set while it runs land on that row, not on the caller's.
|
|
1131
|
-
*
|
|
1132
|
-
* To keep rows small, a request holds at most 64 properties, a key can be
|
|
1133
|
-
* at most 128 characters, and a value at most 2048 characters. A longer
|
|
1134
|
-
* value is truncated, and a property over the other limits is dropped. The
|
|
1135
|
-
* method never throws.
|
|
1136
|
-
*
|
|
1137
|
-
* @param properties - Key-value pairs to attach to the request's log row.
|
|
1138
|
-
*
|
|
1139
|
-
* @example
|
|
1140
|
-
* ```ts
|
|
1141
|
-
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
1142
|
-
* context.log.setRequestProperties({
|
|
1143
|
-
* tenantId: request.user?.data.tenantId,
|
|
1144
|
-
* pricingExperiment: "variant-b",
|
|
1145
|
-
* cached: false,
|
|
1146
|
-
* });
|
|
1147
|
-
*
|
|
1148
|
-
* return new Response("ok");
|
|
1149
|
-
* }
|
|
1150
|
-
* ```
|
|
1151
|
-
*/
|
|
1152
|
-
setRequestProperties(
|
|
1153
|
-
properties: Record<string, string | number | boolean | undefined | null>
|
|
1154
|
-
): void;
|
|
1155
1130
|
}
|
|
1156
1131
|
|
|
1157
1132
|
/* Excluded from this release type: LookupResult */
|
|
@@ -872,11 +872,24 @@ declare type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
|
872
872
|
*/
|
|
873
873
|
declare interface Logger extends BaseLogger {
|
|
874
874
|
/**
|
|
875
|
-
* Set properties
|
|
876
|
-
*
|
|
877
|
-
*
|
|
875
|
+
* Set properties for this request. They are added to every later log entry
|
|
876
|
+
* for this request that a log plugin ships (Datadog, Splunk, Loki and the
|
|
877
|
+
* others), and to the request's row in Zuplo's request log, which the log
|
|
878
|
+
* viewer in the Zuplo Portal shows in the request's details.
|
|
878
879
|
*
|
|
879
|
-
*
|
|
880
|
+
* Properties apply only to the current request. Each call merges into the
|
|
881
|
+
* properties already set, and a later value for the same key overwrites an
|
|
882
|
+
* earlier one. In log entries, a per-request property takes precedence over
|
|
883
|
+
* a static field with the same name configured in the logging plugin. A
|
|
884
|
+
* request made with `context.invokeRoute` has its own properties and its
|
|
885
|
+
* own row.
|
|
886
|
+
*
|
|
887
|
+
* To keep request rows small, a row holds at most 64 properties, a key can
|
|
888
|
+
* be at most 128 characters, and a value at most 2048 characters. A longer
|
|
889
|
+
* value is truncated on the row, and a property over the other limits is
|
|
890
|
+
* left off the row. Log entries are not limited this way.
|
|
891
|
+
*
|
|
892
|
+
* @param properties - Key-value pairs for this request. Values must be string, number, or boolean.
|
|
880
893
|
*
|
|
881
894
|
* @example
|
|
882
895
|
* ```ts
|
|
@@ -893,44 +906,6 @@ declare interface Logger extends BaseLogger {
|
|
|
893
906
|
setLogProperties?(
|
|
894
907
|
properties: Record<string, string | number | boolean>
|
|
895
908
|
): void;
|
|
896
|
-
/**
|
|
897
|
-
* Attach properties to this request's row in Zuplo's request log, the one
|
|
898
|
-
* row per request that analytics and the request details view read.
|
|
899
|
-
*
|
|
900
|
-
* This differs from `setLogProperties`, which adds fields to every log
|
|
901
|
-
* entry (each `context.log.info(...)` line) that log plugins ship. Use
|
|
902
|
-
* `setRequestProperties` to label the request itself, for example with a
|
|
903
|
-
* tenant ID, a feature flag or an experiment variant.
|
|
904
|
-
*
|
|
905
|
-
* Each call merges into the properties already set for this request, and a
|
|
906
|
-
* later value for the same key overwrites an earlier one. Numbers and
|
|
907
|
-
* booleans are stored as strings, and `null` or `undefined` values are
|
|
908
|
-
* skipped. A request made with `context.invokeRoute` has a row of its own,
|
|
909
|
-
* so properties set while it runs land on that row, not on the caller's.
|
|
910
|
-
*
|
|
911
|
-
* To keep rows small, a request holds at most 64 properties, a key can be
|
|
912
|
-
* at most 128 characters, and a value at most 2048 characters. A longer
|
|
913
|
-
* value is truncated, and a property over the other limits is dropped. The
|
|
914
|
-
* method never throws.
|
|
915
|
-
*
|
|
916
|
-
* @param properties - Key-value pairs to attach to the request's log row.
|
|
917
|
-
*
|
|
918
|
-
* @example
|
|
919
|
-
* ```ts
|
|
920
|
-
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
921
|
-
* context.log.setRequestProperties({
|
|
922
|
-
* tenantId: request.user?.data.tenantId,
|
|
923
|
-
* pricingExperiment: "variant-b",
|
|
924
|
-
* cached: false,
|
|
925
|
-
* });
|
|
926
|
-
*
|
|
927
|
-
* return new Response("ok");
|
|
928
|
-
* }
|
|
929
|
-
* ```
|
|
930
|
-
*/
|
|
931
|
-
setRequestProperties(
|
|
932
|
-
properties: Record<string, string | number | boolean | undefined | null>
|
|
933
|
-
): void;
|
|
934
909
|
}
|
|
935
910
|
|
|
936
911
|
/**
|
|
@@ -1249,11 +1249,24 @@ declare type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
|
1249
1249
|
*/
|
|
1250
1250
|
declare interface Logger extends BaseLogger {
|
|
1251
1251
|
/**
|
|
1252
|
-
* Set properties
|
|
1253
|
-
*
|
|
1254
|
-
*
|
|
1252
|
+
* Set properties for this request. They are added to every later log entry
|
|
1253
|
+
* for this request that a log plugin ships (Datadog, Splunk, Loki and the
|
|
1254
|
+
* others), and to the request's row in Zuplo's request log, which the log
|
|
1255
|
+
* viewer in the Zuplo Portal shows in the request's details.
|
|
1255
1256
|
*
|
|
1256
|
-
*
|
|
1257
|
+
* Properties apply only to the current request. Each call merges into the
|
|
1258
|
+
* properties already set, and a later value for the same key overwrites an
|
|
1259
|
+
* earlier one. In log entries, a per-request property takes precedence over
|
|
1260
|
+
* a static field with the same name configured in the logging plugin. A
|
|
1261
|
+
* request made with `context.invokeRoute` has its own properties and its
|
|
1262
|
+
* own row.
|
|
1263
|
+
*
|
|
1264
|
+
* To keep request rows small, a row holds at most 64 properties, a key can
|
|
1265
|
+
* be at most 128 characters, and a value at most 2048 characters. A longer
|
|
1266
|
+
* value is truncated on the row, and a property over the other limits is
|
|
1267
|
+
* left off the row. Log entries are not limited this way.
|
|
1268
|
+
*
|
|
1269
|
+
* @param properties - Key-value pairs for this request. Values must be string, number, or boolean.
|
|
1257
1270
|
*
|
|
1258
1271
|
* @example
|
|
1259
1272
|
* ```ts
|
|
@@ -1270,44 +1283,6 @@ declare interface Logger extends BaseLogger {
|
|
|
1270
1283
|
setLogProperties?(
|
|
1271
1284
|
properties: Record<string, string | number | boolean>
|
|
1272
1285
|
): void;
|
|
1273
|
-
/**
|
|
1274
|
-
* Attach properties to this request's row in Zuplo's request log, the one
|
|
1275
|
-
* row per request that analytics and the request details view read.
|
|
1276
|
-
*
|
|
1277
|
-
* This differs from `setLogProperties`, which adds fields to every log
|
|
1278
|
-
* entry (each `context.log.info(...)` line) that log plugins ship. Use
|
|
1279
|
-
* `setRequestProperties` to label the request itself, for example with a
|
|
1280
|
-
* tenant ID, a feature flag or an experiment variant.
|
|
1281
|
-
*
|
|
1282
|
-
* Each call merges into the properties already set for this request, and a
|
|
1283
|
-
* later value for the same key overwrites an earlier one. Numbers and
|
|
1284
|
-
* booleans are stored as strings, and `null` or `undefined` values are
|
|
1285
|
-
* skipped. A request made with `context.invokeRoute` has a row of its own,
|
|
1286
|
-
* so properties set while it runs land on that row, not on the caller's.
|
|
1287
|
-
*
|
|
1288
|
-
* To keep rows small, a request holds at most 64 properties, a key can be
|
|
1289
|
-
* at most 128 characters, and a value at most 2048 characters. A longer
|
|
1290
|
-
* value is truncated, and a property over the other limits is dropped. The
|
|
1291
|
-
* method never throws.
|
|
1292
|
-
*
|
|
1293
|
-
* @param properties - Key-value pairs to attach to the request's log row.
|
|
1294
|
-
*
|
|
1295
|
-
* @example
|
|
1296
|
-
* ```ts
|
|
1297
|
-
* export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
1298
|
-
* context.log.setRequestProperties({
|
|
1299
|
-
* tenantId: request.user?.data.tenantId,
|
|
1300
|
-
* pricingExperiment: "variant-b",
|
|
1301
|
-
* cached: false,
|
|
1302
|
-
* });
|
|
1303
|
-
*
|
|
1304
|
-
* return new Response("ok");
|
|
1305
|
-
* }
|
|
1306
|
-
* ```
|
|
1307
|
-
*/
|
|
1308
|
-
setRequestProperties(
|
|
1309
|
-
properties: Record<string, string | number | boolean | undefined | null>
|
|
1310
|
-
): void;
|
|
1311
1286
|
}
|
|
1312
1287
|
|
|
1313
1288
|
declare type Modify<T, R> = Omit<T, keyof R> & R;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "7.11.
|
|
3
|
+
"version": "7.11.7",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@opentelemetry/api": "1.9.0",
|
|
32
32
|
"@opentelemetry/api-logs": "0.220.0",
|
|
33
33
|
"@swc/core": "1.10.18",
|
|
34
|
-
"@zuplo/core": "7.11.
|
|
34
|
+
"@zuplo/core": "7.11.7",
|
|
35
35
|
"@zuplo/editor": "1.0.33162667821",
|
|
36
|
-
"@zuplo/openapi-tools": "7.11.
|
|
37
|
-
"@zuplo/runtime": "7.11.
|
|
36
|
+
"@zuplo/openapi-tools": "7.11.7",
|
|
37
|
+
"@zuplo/runtime": "7.11.7",
|
|
38
38
|
"chalk": "5.4.1",
|
|
39
39
|
"chokidar": "3.5.3",
|
|
40
40
|
"cookie": "1.0.2",
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"workerd": "1.20261002.1",
|
|
66
66
|
"yargs": "17.7.2",
|
|
67
67
|
"zod": "4.4.3",
|
|
68
|
-
"@zuplo/graphql": "7.11.
|
|
69
|
-
"@zuplo/otel": "7.11.
|
|
68
|
+
"@zuplo/graphql": "7.11.7",
|
|
69
|
+
"@zuplo/otel": "7.11.7"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
|
-
"@zuplo/lint-darwin-arm64": "7.11.
|
|
73
|
-
"@zuplo/lint-darwin-x64": "7.11.
|
|
74
|
-
"@zuplo/lint-linux-x64": "7.11.
|
|
75
|
-
"@zuplo/lint-linux-arm64": "7.11.
|
|
76
|
-
"@zuplo/lint-win32-x64": "7.11.
|
|
72
|
+
"@zuplo/lint-darwin-arm64": "7.11.7",
|
|
73
|
+
"@zuplo/lint-darwin-x64": "7.11.7",
|
|
74
|
+
"@zuplo/lint-linux-x64": "7.11.7",
|
|
75
|
+
"@zuplo/lint-linux-arm64": "7.11.7",
|
|
76
|
+
"@zuplo/lint-win32-x64": "7.11.7"
|
|
77
77
|
},
|
|
78
78
|
"bundleDependencies": [
|
|
79
79
|
"@inquirer/prompts",
|