@malloy-publisher/server 0.0.225 → 0.0.226
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/app/api-doc.yaml +29 -24
- package/dist/app/assets/{EnvironmentPage-DYTeXDll.js → EnvironmentPage-DvOJ7L_b.js} +1 -1
- package/dist/app/assets/{HomePage-pDK2BPJY.js → HomePage-CXguJsXS.js} +1 -1
- package/dist/app/assets/{LightMode-C2bwGPY1.js → LightMode-ZsshUznu.js} +1 -1
- package/dist/app/assets/{MainPage-WtBulMH_.js → MainPage-BIe0VwBa.js} +2 -2
- package/dist/app/assets/{MaterializationsPage-hMgOtflG.js → MaterializationsPage-BuZ6UJVx.js} +1 -1
- package/dist/app/assets/{ModelPage-B2N5kYII.js → ModelPage-DsPf-s8B.js} +1 -1
- package/dist/app/assets/{PackagePage-CEN90nQG.js → PackagePage-CEVNAKZa.js} +1 -1
- package/dist/app/assets/{RouteError-BG2c5Zf0.js → RouteError-Chn7lL96.js} +1 -1
- package/dist/app/assets/{ThemeEditorPage-DNfeUwEZ.js → ThemeEditorPage-DWC_FdNU.js} +1 -1
- package/dist/app/assets/{WorkbookPage-NKI1BhFS.js → WorkbookPage-CGrsFz8p.js} +1 -1
- package/dist/app/assets/{core-C6anj5c0.es-DDLHqpzt.js → core-vVgoO8IR.es-BD_THWs_.js} +1 -1
- package/dist/app/assets/{index-DMQtnaf4.js → index-BioohWQj.js} +1 -1
- package/dist/app/assets/{index-CzNqKMVl.js → index-D6YtyiJ0.js} +1 -1
- package/dist/app/assets/{index-C6gZ6sSY.js → index-DNUZpnaa.js} +4 -4
- package/dist/app/assets/{index-JXgvyZna.js → index-gEWxu09x.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/instrumentation.mjs +71 -15
- package/dist/package_load_worker.mjs +83 -16
- package/dist/server.mjs +128 -57
- package/package.json +1 -1
- package/src/controller/package.controller.spec.ts +17 -17
- package/src/controller/package.controller.ts +7 -6
- package/src/logger.spec.ts +193 -0
- package/src/logger.ts +115 -18
- package/src/mcp/skills/skills_bundle.json +1 -1
- package/src/package_load/package_load_pool.ts +5 -1
- package/src/package_load/package_load_worker.ts +7 -0
- package/src/package_load/protocol.ts +5 -1
- package/src/service/build_plan.spec.ts +42 -60
- package/src/service/build_plan.ts +37 -61
- package/src/service/environment.ts +4 -0
- package/src/service/materialization_test_fixtures.ts +6 -8
- package/src/service/package.ts +83 -44
- package/src/service/package_manifest.spec.ts +22 -1
- package/src/service/package_manifest.ts +29 -0
- package/src/service/persistence_policy.spec.ts +234 -0
- package/src/service/materialization_cron_gate.spec.ts +0 -181
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aI as ci}from"./index-
|
|
1
|
+
import{aI as ci}from"./index-DNUZpnaa.js";import{r as di}from"./index-w_0OQJgZ.js";function pi(u,re){for(var j=0;j<re.length;j++){const N=re[j];if(typeof N!="string"&&!Array.isArray(N)){for(const E in N)if(E!=="default"&&!(E in u)){const S=Object.getOwnPropertyDescriptor(N,E);S&&Object.defineProperty(u,E,S.get?S:{enumerable:!0,get:()=>N[E]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var bt={},ut={},Or;function Vt(){if(Or)return ut;Or=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.isChainOp=u,ut.isStringCondition=re,ut.isStringFilter=j,ut.isBooleanFilter=N,ut.isNumberFilter=E,ut.isTemporalFilter=S,ut.isFilterExpression=w,ut.isFilterable=y;function u(o){return["and","or",","].includes(o)}function re(o){return["starts","ends","contains","="].includes(o.operator)}function j(o){return typeof o=="object"&&o!==null&&"operator"in o&&typeof o.operator=="string"&&["starts","ends","contains","=","~","null","empty","and","or",",","()"].includes(o.operator)}function N(o){return typeof o=="object"&&o!==null&&"operator"in o&&typeof o.operator=="string"&&["null","true","false","=false","=true"].includes(o.operator)}function E(o){return typeof o=="object"&&o!==null&&"operator"in o&&typeof o.operator=="string"&&["range","<=",">=","!=","=",">","<","and","or","()","null"].includes(o.operator)}function S(o){return typeof o=="object"&&o!==null&&"operator"in o&&typeof o.operator=="string"&&["literal","before","after","to","for","in","and","or","in_last","this","last","next","()","null"].includes(o.operator)}function w(o){return typeof o=="object"&&o!==null&&"operator"in o}function y(o){return["string","number","boolean","timestamp","timestamptz","date"].includes(o)}return ut}var Pt={},Er;function hi(){return Er||(Er=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.BooleanFilterExpression=void 0,Pt.BooleanFilterExpression={parse(u){var re;if(u.match(/^\s*$/))return{parsed:null,log:[]};const j={parsed:null,log:[]};let N=u.toLowerCase().trim().replace(/\s\s+/," "),E=!1;if(N.startsWith("not ")&&(E=!0,N=N.slice(4)),N==="true")j.parsed={operator:"true"};else if(N==="=true")j.parsed={operator:"=true"};else if(N==="false")j.parsed={operator:"false"};else if(N==="=false")j.parsed={operator:"=false"};else if(N==="null")j.parsed={operator:"null"};else{const S=u.match(/[^\s]/),w=S&&(re=S.index)!==null&&re!==void 0?re:0;j.log=[{message:`Illegal boolean filter '${N}'. Must be one of true,=true,false,=false,null`,severity:"error",startIndex:w,endIndex:w+u.length-1}]}return E&&j.parsed&&(j.parsed.not=!0),j},unparse(u){return u===null?"":(u.not?"not ":"")+u.operator}}),Pt}var pr={},Ue={},kr;function Ht(){if(kr)return Ue;kr=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.maybeNot=re,Ue.unescape=j,Ue.escape=N,Ue.matchOp=S,Ue.conjoin=y,Ue.joinNumbers=o,Ue.mkRange=d,Ue.mkValues=t,Ue.numNot=D,Ue.temporalNot=x,Ue.joinTemporal=Z,Ue.timeLiteral=ee,Ue.mkUnits=ce;const u=Vt();function re(O){const[A,b]=O;return A&&b&&(0,u.isStringFilter)(b)?{...b,not:!0}:b}function j(O){return O.replace(/\\(.)/g,"$1")}function N(O){const A=O.toLowerCase();return A==="null"||A==="empty"?"\\"+O:O.replace(/([,; |()\\%_-])/g,"\\$1")}function E(O){let A=!1,b=!1,B=0,de=!1;const Fe=O.length;for(let ve=0;ve<Fe;ve+=1){const Ye=O[ve];if(Ye===" "||Ye===" "){B+=1;continue}B=0,Ye==="%"?(de=!0,ve===0&&(A=!0),b=!0):(b=!1,Ye==="\\"?ve+=1:Ye==="_"&&(de=!0))}return{hasLike:de,percentEnd:b&&Fe>1,percentStart:A&&Fe>1,endSpace:B}}function S(O){let A=O.trimStart();const{hasLike:b,percentEnd:B,percentStart:de,endSpace:Fe}=E(A);if(Fe>0&&(A=A.slice(0,-Fe)),b){if(de&&B){const ve=A.slice(1,-1);if(!E(ve).hasLike&&ve.length>0)return{operator:"contains",values:[j(ve)]}}else if(B){const ve=A.slice(0,-1);if(!E(ve).hasLike)return{operator:"starts",values:[j(ve)]}}else if(de){const ve=A.slice(1);if(!E(ve).hasLike)return{operator:"ends",values:[j(ve)]}}return{operator:"~",escaped_values:[A]}}return A.toLowerCase()==="null"?{operator:"null"}:A.toLowerCase()==="empty"?{operator:"empty"}:{operator:"=",values:[j(A)]}}function w(O,A){var b,B;return O.operator===A.operator&&((b=O.not)!==null&&b!==void 0?b:!1)===((B=A.not)!==null&&B!==void 0?B:!1)}function y(O,A,b){if(A=A.toLowerCase(),(0,u.isStringFilter)(O)&&(0,u.isStringFilter)(b)){if(A===","){if(O.operator==="~"&&w(O,b))return{...O,escaped_values:[...O.escaped_values,...b.escaped_values]};if((0,u.isStringCondition)(O)&&w(O,b))return{...O,values:[...O.values,...b.values]}}const B=A===","?",":A==="|"?"or":A===";"?"and":void 0;if(B)return O.operator===B?{...O,members:[...O.members,b]}:{operator:B,members:[O,b]}}return null}function o(O,A,b){if(A=A.toLowerCase(),(0,u.isNumberFilter)(O)&&(0,u.isNumberFilter)(b)){if(A==="or"&&O.operator==="="&&w(O,b)){const B={operator:"=",values:[...O.values,...b.values]};return O.not&&(B.not=!0),B}if(A==="and"||A==="or")return O.operator===A?{...O,members:[...O.members,b]}:{operator:A,members:[O,b]}}return null}function d(O,A,b,B){return{operator:"range",startValue:A,startOperator:O==="("?">":">=",endValue:b,endOperator:B===")"?"<":"<="}}function t(O,A){return{values:[O,...A]}}function D(O,A){return(0,u.isNumberFilter)(O)&&A?O.operator==="="?{operator:"!=",values:O.values}:O.operator==="!="?{operator:"=",values:O.values}:{...O,not:!0}:O}function x(O,A){if((0,u.isTemporalFilter)(O)&&A){if("not"in O){const b={...O};return O.not?delete b.not:b.not=!0,b}return{...O,not:!0}}return O}function Z(O,A,b){return A=A.toLowerCase(),(0,u.isTemporalFilter)(O)&&(0,u.isTemporalFilter)(b)&&(A==="and"||A==="or")?O.operator===A?{...O,members:[...O.members,b]}:{operator:A,members:[O,b]}:null}function ee(O,A){const b={moment:"literal",literal:O};return A&&(b.units=A),b}function ce(O){switch(O.toLowerCase()){case"second":case"seconds":return"second";case"minute":case"minutes":return"minute";case"hour":case"hours":return"hour";case"day":case"days":return"day";case"week":case"weeks":return"week";case"month":case"months":return"month";case"quarter":case"quarters":return"quarter";case"year":case"years":return"year"}}return Ue}var hr,Rr;function mi(){if(Rr)return hr;Rr=1;const{numNot:u,mkRange:re,joinNumbers:j,mkValues:N}=Ht();function E(o,d){function t(){this.constructor=o}t.prototype=d.prototype,o.prototype=new t}function S(o,d,t,D){var x=Error.call(this,o);return Object.setPrototypeOf&&Object.setPrototypeOf(x,S.prototype),x.expected=d,x.found=t,x.location=D,x.name="SyntaxError",x}E(S,Error);function w(o,d,t){return t=t||" ",o.length>d?o:(d-=o.length,t+=t.repeat(d),o+t.slice(0,d))}S.prototype.format=function(o){var d="Error: "+this.message;if(this.location){var t=null,D;for(D=0;D<o.length;D++)if(o[D].source===this.location.source){t=o[D].text.split(/\r\n|\n|\r/g);break}var x=this.location.start,Z=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(x):x,ee=this.location.source+":"+Z.line+":"+Z.column;if(t){var ce=this.location.end,O=w("",Z.line.toString().length," "),A=t[x.line-1],b=x.line===ce.line?ce.column:A.length+1,B=b-x.column||1;d+=`
|
|
2
2
|
--> `+ee+`
|
|
3
3
|
`+O+` |
|
|
4
4
|
`+Z.line+" | "+A+`
|
package/dist/app/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
12
12
|
/>
|
|
13
13
|
<title>Malloy Publisher</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-DNUZpnaa.js"></script>
|
|
15
15
|
<link rel="stylesheet" crossorigin href="/assets/index-5eLCcNmP.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
package/dist/instrumentation.mjs
CHANGED
|
@@ -115106,6 +115106,50 @@ function formatDuration(durationMs) {
|
|
|
115106
115106
|
}
|
|
115107
115107
|
return `${durationMs.toFixed(2)}ms`;
|
|
115108
115108
|
}
|
|
115109
|
+
function redactSensitive(value, seen = new WeakSet) {
|
|
115110
|
+
if (value === null || typeof value !== "object" || value instanceof Date) {
|
|
115111
|
+
return value;
|
|
115112
|
+
}
|
|
115113
|
+
if (seen.has(value)) {
|
|
115114
|
+
return "[Circular]";
|
|
115115
|
+
}
|
|
115116
|
+
seen.add(value);
|
|
115117
|
+
if (Array.isArray(value)) {
|
|
115118
|
+
return value.map((item) => redactSensitive(item, seen));
|
|
115119
|
+
}
|
|
115120
|
+
const result = {};
|
|
115121
|
+
for (const [key, val] of Object.entries(value)) {
|
|
115122
|
+
result[key] = SENSITIVE_KEYS.has(key.toLowerCase()) ? REDACTED : redactSensitive(val, seen);
|
|
115123
|
+
}
|
|
115124
|
+
return result;
|
|
115125
|
+
}
|
|
115126
|
+
function buildAxiosErrorLog(error) {
|
|
115127
|
+
if (error.response) {
|
|
115128
|
+
return {
|
|
115129
|
+
message: "Axios server-side error",
|
|
115130
|
+
meta: {
|
|
115131
|
+
url: error.response.config.url,
|
|
115132
|
+
status: error.response.status,
|
|
115133
|
+
headers: redactSensitive(error.response.headers),
|
|
115134
|
+
data: redactSensitive(error.response.data)
|
|
115135
|
+
}
|
|
115136
|
+
};
|
|
115137
|
+
}
|
|
115138
|
+
if (error.request) {
|
|
115139
|
+
return {
|
|
115140
|
+
message: "Axios client-side error",
|
|
115141
|
+
meta: {
|
|
115142
|
+
method: error.config?.method,
|
|
115143
|
+
url: error.config?.url,
|
|
115144
|
+
code: error.code
|
|
115145
|
+
}
|
|
115146
|
+
};
|
|
115147
|
+
}
|
|
115148
|
+
return {
|
|
115149
|
+
message: "Axios unknown error",
|
|
115150
|
+
meta: { message: error.message }
|
|
115151
|
+
};
|
|
115152
|
+
}
|
|
115109
115153
|
var import_winston, isTelemetryEnabled, VALID_LOG_LEVELS, getLogLevel = () => {
|
|
115110
115154
|
if (process.env.LOG_LEVEL) {
|
|
115111
115155
|
const logLevel = process.env.LOG_LEVEL.toLowerCase();
|
|
@@ -115116,7 +115160,7 @@ var import_winston, isTelemetryEnabled, VALID_LOG_LEVELS, getLogLevel = () => {
|
|
|
115116
115160
|
}
|
|
115117
115161
|
}
|
|
115118
115162
|
return "debug";
|
|
115119
|
-
}, logger, DISABLE_RESPONSE_LOGGING, loggerMiddleware = (req, res, next) => {
|
|
115163
|
+
}, logger, DISABLE_RESPONSE_LOGGING, SENSITIVE_KEY_NAMES, SENSITIVE_KEYS, REDACTED = "[REDACTED]", loggerMiddleware = (req, res, next) => {
|
|
115120
115164
|
const startTime = performance.now();
|
|
115121
115165
|
const resJson = res.json;
|
|
115122
115166
|
res.json = (body) => {
|
|
@@ -115131,12 +115175,12 @@ var import_winston, isTelemetryEnabled, VALID_LOG_LEVELS, getLogLevel = () => {
|
|
|
115131
115175
|
const logMetadata = {
|
|
115132
115176
|
statusCode: res.statusCode,
|
|
115133
115177
|
duration: formatDuration(durationMs),
|
|
115134
|
-
payload: req.body,
|
|
115178
|
+
payload: redactSensitive(req.body),
|
|
115135
115179
|
params: req.params,
|
|
115136
115180
|
query: req.query
|
|
115137
115181
|
};
|
|
115138
115182
|
if (!DISABLE_RESPONSE_LOGGING) {
|
|
115139
|
-
logMetadata.response = res.locals.body;
|
|
115183
|
+
logMetadata.response = redactSensitive(res.locals.body);
|
|
115140
115184
|
}
|
|
115141
115185
|
if (traceId) {
|
|
115142
115186
|
logMetadata.traceId = traceId;
|
|
@@ -115147,18 +115191,8 @@ var import_winston, isTelemetryEnabled, VALID_LOG_LEVELS, getLogLevel = () => {
|
|
|
115147
115191
|
});
|
|
115148
115192
|
next();
|
|
115149
115193
|
}, logAxiosError = (error) => {
|
|
115150
|
-
|
|
115151
|
-
|
|
115152
|
-
url: error.response.config.url,
|
|
115153
|
-
status: error.response.status,
|
|
115154
|
-
headers: error.response.headers,
|
|
115155
|
-
data: error.response.data
|
|
115156
|
-
});
|
|
115157
|
-
} else if (error.request) {
|
|
115158
|
-
logger.error("Axios client-side error", { error: error.request });
|
|
115159
|
-
} else {
|
|
115160
|
-
logger.error("Axios unknown error", { error });
|
|
115161
|
-
}
|
|
115194
|
+
const { message, meta } = buildAxiosErrorLog(error);
|
|
115195
|
+
logger.error(message, meta);
|
|
115162
115196
|
};
|
|
115163
115197
|
var init_logger = __esm(() => {
|
|
115164
115198
|
import_winston = __toESM(require_winston(), 1);
|
|
@@ -115170,6 +115204,28 @@ var init_logger = __esm(() => {
|
|
|
115170
115204
|
transports: [new import_winston.default.transports.Console]
|
|
115171
115205
|
});
|
|
115172
115206
|
DISABLE_RESPONSE_LOGGING = process.env.DISABLE_RESPONSE_LOGGING === "true" || process.env.DISABLE_RESPONSE_LOGGING === "1";
|
|
115207
|
+
SENSITIVE_KEY_NAMES = [
|
|
115208
|
+
"password",
|
|
115209
|
+
"connectionString",
|
|
115210
|
+
"serviceAccountKeyJson",
|
|
115211
|
+
"privateKey",
|
|
115212
|
+
"privateKeyPass",
|
|
115213
|
+
"secret",
|
|
115214
|
+
"secretAccessKey",
|
|
115215
|
+
"sessionToken",
|
|
115216
|
+
"sasUrl",
|
|
115217
|
+
"clientSecret",
|
|
115218
|
+
"oauthClientSecret",
|
|
115219
|
+
"peakaKey",
|
|
115220
|
+
"token",
|
|
115221
|
+
"accessToken",
|
|
115222
|
+
"authorization",
|
|
115223
|
+
"proxy-authorization",
|
|
115224
|
+
"cookie",
|
|
115225
|
+
"set-cookie",
|
|
115226
|
+
"x-api-key"
|
|
115227
|
+
];
|
|
115228
|
+
SENSITIVE_KEYS = new Set(SENSITIVE_KEY_NAMES.map((name) => name.toLowerCase()));
|
|
115173
115229
|
});
|
|
115174
115230
|
|
|
115175
115231
|
// src/instrumentation.ts
|
|
@@ -11323,6 +11323,50 @@ function formatDuration(durationMs) {
|
|
|
11323
11323
|
}
|
|
11324
11324
|
return `${durationMs.toFixed(2)}ms`;
|
|
11325
11325
|
}
|
|
11326
|
+
function redactSensitive(value, seen = new WeakSet) {
|
|
11327
|
+
if (value === null || typeof value !== "object" || value instanceof Date) {
|
|
11328
|
+
return value;
|
|
11329
|
+
}
|
|
11330
|
+
if (seen.has(value)) {
|
|
11331
|
+
return "[Circular]";
|
|
11332
|
+
}
|
|
11333
|
+
seen.add(value);
|
|
11334
|
+
if (Array.isArray(value)) {
|
|
11335
|
+
return value.map((item) => redactSensitive(item, seen));
|
|
11336
|
+
}
|
|
11337
|
+
const result = {};
|
|
11338
|
+
for (const [key, val] of Object.entries(value)) {
|
|
11339
|
+
result[key] = SENSITIVE_KEYS.has(key.toLowerCase()) ? REDACTED : redactSensitive(val, seen);
|
|
11340
|
+
}
|
|
11341
|
+
return result;
|
|
11342
|
+
}
|
|
11343
|
+
function buildAxiosErrorLog(error) {
|
|
11344
|
+
if (error.response) {
|
|
11345
|
+
return {
|
|
11346
|
+
message: "Axios server-side error",
|
|
11347
|
+
meta: {
|
|
11348
|
+
url: error.response.config.url,
|
|
11349
|
+
status: error.response.status,
|
|
11350
|
+
headers: redactSensitive(error.response.headers),
|
|
11351
|
+
data: redactSensitive(error.response.data)
|
|
11352
|
+
}
|
|
11353
|
+
};
|
|
11354
|
+
}
|
|
11355
|
+
if (error.request) {
|
|
11356
|
+
return {
|
|
11357
|
+
message: "Axios client-side error",
|
|
11358
|
+
meta: {
|
|
11359
|
+
method: error.config?.method,
|
|
11360
|
+
url: error.config?.url,
|
|
11361
|
+
code: error.code
|
|
11362
|
+
}
|
|
11363
|
+
};
|
|
11364
|
+
}
|
|
11365
|
+
return {
|
|
11366
|
+
message: "Axios unknown error",
|
|
11367
|
+
meta: { message: error.message }
|
|
11368
|
+
};
|
|
11369
|
+
}
|
|
11326
11370
|
var import_winston, isTelemetryEnabled, VALID_LOG_LEVELS, getLogLevel = () => {
|
|
11327
11371
|
if (process.env.LOG_LEVEL) {
|
|
11328
11372
|
const logLevel = process.env.LOG_LEVEL.toLowerCase();
|
|
@@ -11333,7 +11377,7 @@ var import_winston, isTelemetryEnabled, VALID_LOG_LEVELS, getLogLevel = () => {
|
|
|
11333
11377
|
}
|
|
11334
11378
|
}
|
|
11335
11379
|
return "debug";
|
|
11336
|
-
}, logger, DISABLE_RESPONSE_LOGGING, loggerMiddleware = (req, res, next) => {
|
|
11380
|
+
}, logger, DISABLE_RESPONSE_LOGGING, SENSITIVE_KEY_NAMES, SENSITIVE_KEYS, REDACTED = "[REDACTED]", loggerMiddleware = (req, res, next) => {
|
|
11337
11381
|
const startTime = performance.now();
|
|
11338
11382
|
const resJson = res.json;
|
|
11339
11383
|
res.json = (body) => {
|
|
@@ -11348,12 +11392,12 @@ var import_winston, isTelemetryEnabled, VALID_LOG_LEVELS, getLogLevel = () => {
|
|
|
11348
11392
|
const logMetadata = {
|
|
11349
11393
|
statusCode: res.statusCode,
|
|
11350
11394
|
duration: formatDuration(durationMs),
|
|
11351
|
-
payload: req.body,
|
|
11395
|
+
payload: redactSensitive(req.body),
|
|
11352
11396
|
params: req.params,
|
|
11353
11397
|
query: req.query
|
|
11354
11398
|
};
|
|
11355
11399
|
if (!DISABLE_RESPONSE_LOGGING) {
|
|
11356
|
-
logMetadata.response = res.locals.body;
|
|
11400
|
+
logMetadata.response = redactSensitive(res.locals.body);
|
|
11357
11401
|
}
|
|
11358
11402
|
if (traceId) {
|
|
11359
11403
|
logMetadata.traceId = traceId;
|
|
@@ -11364,18 +11408,8 @@ var import_winston, isTelemetryEnabled, VALID_LOG_LEVELS, getLogLevel = () => {
|
|
|
11364
11408
|
});
|
|
11365
11409
|
next();
|
|
11366
11410
|
}, logAxiosError = (error) => {
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
url: error.response.config.url,
|
|
11370
|
-
status: error.response.status,
|
|
11371
|
-
headers: error.response.headers,
|
|
11372
|
-
data: error.response.data
|
|
11373
|
-
});
|
|
11374
|
-
} else if (error.request) {
|
|
11375
|
-
logger.error("Axios client-side error", { error: error.request });
|
|
11376
|
-
} else {
|
|
11377
|
-
logger.error("Axios unknown error", { error });
|
|
11378
|
-
}
|
|
11411
|
+
const { message, meta } = buildAxiosErrorLog(error);
|
|
11412
|
+
logger.error(message, meta);
|
|
11379
11413
|
};
|
|
11380
11414
|
var init_logger = __esm(() => {
|
|
11381
11415
|
import_winston = __toESM(require_winston(), 1);
|
|
@@ -11387,6 +11421,28 @@ var init_logger = __esm(() => {
|
|
|
11387
11421
|
transports: [new import_winston.default.transports.Console]
|
|
11388
11422
|
});
|
|
11389
11423
|
DISABLE_RESPONSE_LOGGING = process.env.DISABLE_RESPONSE_LOGGING === "true" || process.env.DISABLE_RESPONSE_LOGGING === "1";
|
|
11424
|
+
SENSITIVE_KEY_NAMES = [
|
|
11425
|
+
"password",
|
|
11426
|
+
"connectionString",
|
|
11427
|
+
"serviceAccountKeyJson",
|
|
11428
|
+
"privateKey",
|
|
11429
|
+
"privateKeyPass",
|
|
11430
|
+
"secret",
|
|
11431
|
+
"secretAccessKey",
|
|
11432
|
+
"sessionToken",
|
|
11433
|
+
"sasUrl",
|
|
11434
|
+
"clientSecret",
|
|
11435
|
+
"oauthClientSecret",
|
|
11436
|
+
"peakaKey",
|
|
11437
|
+
"token",
|
|
11438
|
+
"accessToken",
|
|
11439
|
+
"authorization",
|
|
11440
|
+
"proxy-authorization",
|
|
11441
|
+
"cookie",
|
|
11442
|
+
"set-cookie",
|
|
11443
|
+
"x-api-key"
|
|
11444
|
+
];
|
|
11445
|
+
SENSITIVE_KEYS = new Set(SENSITIVE_KEY_NAMES.map((name) => name.toLowerCase()));
|
|
11390
11446
|
});
|
|
11391
11447
|
|
|
11392
11448
|
// src/errors.ts
|
|
@@ -11714,6 +11770,16 @@ function unwrapQuotedExpression(body) {
|
|
|
11714
11770
|
|
|
11715
11771
|
// src/service/package_manifest.ts
|
|
11716
11772
|
var FRESHNESS_FALLBACKS = ["live", "stale_ok", "fail"];
|
|
11773
|
+
var PACKAGE_SCOPES = ["version", "package"];
|
|
11774
|
+
function parsePackageScope(raw) {
|
|
11775
|
+
if (raw === undefined || raw === null) {
|
|
11776
|
+
return "package";
|
|
11777
|
+
}
|
|
11778
|
+
if (PACKAGE_SCOPES.includes(raw)) {
|
|
11779
|
+
return raw;
|
|
11780
|
+
}
|
|
11781
|
+
throw new Error(`Invalid "scope" in the package manifest: ${JSON.stringify(raw)}. ` + `Expected "version" or "package" (default "package").`);
|
|
11782
|
+
}
|
|
11717
11783
|
function parseFreshness(raw) {
|
|
11718
11784
|
if (!raw || typeof raw !== "object") {
|
|
11719
11785
|
return null;
|
|
@@ -12263,7 +12329,8 @@ async function readPackageMetadata(packagePath) {
|
|
|
12263
12329
|
explores: Array.isArray(parsed.explores) ? parsed.explores.map(normalizeModelPath) : undefined,
|
|
12264
12330
|
queryableSources: parsed.queryableSources === "all" ? "all" : "declared",
|
|
12265
12331
|
manifestLocation: typeof parsed.manifestLocation === "string" ? parsed.manifestLocation : null,
|
|
12266
|
-
materialization: parsePackageMaterialization(parsed.materialization)
|
|
12332
|
+
materialization: parsePackageMaterialization(parsed.materialization),
|
|
12333
|
+
scope: parsePackageScope(parsed.scope)
|
|
12267
12334
|
};
|
|
12268
12335
|
}
|
|
12269
12336
|
async function listPackageFiles(packagePath) {
|