@malloy-publisher/server 0.0.232 → 0.0.234
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/README.docker.md +1 -0
- package/dist/app/api-doc.yaml +269 -10
- package/dist/app/assets/{EnvironmentPage-DXEaZIPx.js → EnvironmentPage-DTZQ4Gxc.js} +1 -1
- package/dist/app/assets/{HomePage-kofsqpZt.js → HomePage-C5mlDPXK.js} +1 -1
- package/dist/app/assets/{LightMode-CNhIlIlJ.js → LightMode-DGNmhG0u.js} +1 -1
- package/dist/app/assets/{MainPage-Bgqo8jCy.js → MainPage-CVL_wmP4.js} +1 -1
- package/dist/app/assets/{MaterializationsPage-CgBlgGz2.js → MaterializationsPage-DmzMBCpy.js} +1 -1
- package/dist/app/assets/{ModelPage-B0TjoDtf.js → ModelPage-Dbvf4QbB.js} +1 -1
- package/dist/app/assets/{PackagePage-BL8vnFj1.js → PackagePage-DxdHc2Qs.js} +1 -1
- package/dist/app/assets/{RouteError-BzPby0X2.js → RouteError-OJdT4tCd.js} +1 -1
- package/dist/app/assets/{ThemeEditorPage-CTEP_9r3.js → ThemeEditorPage-Bk7s0KXY.js} +1 -1
- package/dist/app/assets/{WorkbookPage-BwM3BmKw.js → WorkbookPage-j_vCWdN3.js} +1 -1
- package/dist/app/assets/{core-CK68iv6w.es-CpRxXBt7.js → core-Rj_4rRnA.es-DoIfLxDJ.js} +1 -1
- package/dist/app/assets/{index-B33zGctF.js → index-B_jKMR35.js} +4 -4
- package/dist/app/assets/{index-CmkW1MiE.js → index-D-rDyK11.js} +1 -1
- package/dist/app/assets/{index-tXJXwdyj.js → index-DWIe_hK0.js} +1 -1
- package/dist/app/assets/{index-BkiWKaAF.js → index-hw-xn0X7.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/package_load_worker.mjs +53 -3
- package/dist/server.mjs +20277 -925
- package/package.json +1 -1
- package/src/config.ts +35 -1
- package/src/controller/connection.controller.spec.ts +46 -0
- package/src/controller/connection.controller.ts +105 -2
- package/src/controller/materialization.controller.spec.ts +25 -0
- package/src/controller/materialization.controller.ts +60 -0
- package/src/controller/model.controller.ts +24 -0
- package/src/controller/query.controller.ts +83 -10
- package/src/json_utils.spec.ts +51 -0
- package/src/json_utils.ts +33 -0
- package/src/mcp/handler_utils.ts +10 -2
- package/src/mcp/query_envelope.spec.ts +229 -0
- package/src/mcp/query_envelope.ts +240 -0
- package/src/mcp/server.protocol.spec.ts +128 -16
- package/src/mcp/skills/build_skills_bundle.ts +94 -4
- package/src/mcp/skills/skills_bundle.json +1 -1
- package/src/mcp/skills/skills_bundle.spec.ts +113 -4
- package/src/mcp/tool_response.spec.ts +108 -0
- package/src/mcp/tool_response.ts +138 -0
- package/src/mcp/tools/compile_tool.spec.ts +112 -4
- package/src/mcp/tools/compile_tool.ts +61 -30
- package/src/mcp/tools/docs_search_tool.ts +6 -16
- package/src/mcp/tools/execute_query_tool.spec.ts +154 -3
- package/src/mcp/tools/execute_query_tool.ts +131 -155
- package/src/mcp/tools/get_context_tool.spec.ts +63 -3
- package/src/mcp/tools/get_context_tool.ts +43 -46
- package/src/mcp/tools/reload_package_tool.ts +3 -29
- package/src/mcp_config.spec.ts +919 -0
- package/src/mcp_config.ts +425 -0
- package/src/oom_guards.integration.spec.ts +11 -3
- package/src/package_load/package_load_pool.ts +2 -0
- package/src/package_load/package_load_worker.ts +17 -5
- package/src/package_load/protocol.ts +6 -0
- package/src/query_metadata_metrics.ts +49 -0
- package/src/server.ts +99 -3
- package/src/service/build_plan.spec.ts +125 -0
- package/src/service/build_plan.ts +108 -7
- package/src/service/compile_fragment_techniques.spec.ts +156 -0
- package/src/service/connection.spec.ts +371 -1
- package/src/service/connection.ts +77 -14
- package/src/service/connection_config.spec.ts +60 -0
- package/src/service/connection_config.ts +75 -0
- package/src/service/duckdb_instance_isolation.spec.ts +137 -0
- package/src/service/environment.ts +57 -3
- package/src/service/materialization_config_validation.spec.ts +99 -0
- package/src/service/materialization_config_validation.ts +120 -0
- package/src/service/materialization_schedule_surface.spec.ts +124 -0
- package/src/service/materialization_service.spec.ts +119 -0
- package/src/service/materialization_service.ts +186 -3
- package/src/service/materialization_test_fixtures.ts +86 -21
- package/src/service/model.spec.ts +45 -1
- package/src/service/model.ts +171 -23
- package/src/service/model_limits.spec.ts +28 -0
- package/src/service/model_limits.ts +21 -0
- package/src/service/package.ts +24 -1
- package/src/service/package_manifest.spec.ts +137 -4
- package/src/service/package_manifest.ts +140 -5
- package/src/service/persist_annotation_validation.spec.ts +12 -0
- package/src/service/persist_annotation_validation.ts +9 -4
- package/src/service/query_metadata.spec.ts +408 -0
- package/src/service/query_metadata.ts +492 -0
- package/src/service/query_metadata_identity.spec.ts +149 -0
- package/tests/integration/mcp/mcp_execute_query_tool.integration.spec.ts +37 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as XF,r as L,j as N,ac as Ht,R as ZF,aH as e9,aI as ns}from"./index-B33zGctF.js";import{r as Jd,a as dA,d as xt}from"./index-CmkW1MiE.js";import{r as Wa}from"./index-w_0OQJgZ.js";import{d as AU}from"./index-tXJXwdyj.js";import{MalloyRenderer as t9,isCoreVizPluginInstance as TU}from"./index-BabP-V-S.js";var Eo={},K3={},fr={},J3={},gR;function Ge(){return gR||(gR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TD=e.ValueType=void 0,e.safeRecordGet=r,e.mkSafeRecord=i,e.exprHasKids=o,e.exprHasE=s,e.exprIsLeaf=a,e.isAsymmetricExpr=l,e.mkTemporal=d,e.isRawCast=c,e.isFilterExprType=x,e.isTimeLiteral=f,e.isParameterType=p,e.paramHasValue=h,e.activeName=g,e.expressionIsScalar=m,e.expressionIsAggregate=E,e.expressionIsUngroupedAggregate=v,e.expressionInvolvesAggregate=_,e.expressionIsCalculation=S,e.expressionIsAnalytic=T,e.isExpressionTypeLEQ=D,e.maxExpressionType=C,e.maxOfExpressionTypes=w,e.hasExpression=R,e.isTemporalType=O,e.isBasicAtomicType=I,e.isAtomicFieldType=k,e.canOrderBy=$,e.fieldIsIntrinsic=Y,e.mkFieldDef=ne,e.mkArrayDef=re,e.mkArrayTypeDef=oe,e.isRepeatedRecordFunctionParam=U,e.isRepeatedRecord=ee,e.isRecordOrRepeatedRecord=J,e.isBasicArray=te,e.isMatrixOperation=q,e.isJoinable=H,e.isJoined=Q,e.isJoinedSource=M,e.isDateUnit=j,e.isTimestampUnit=P,e.isExtractUnit=V,e.refIsStructDef=ae,e.segmentHasErrors=ce,e.structHasErrors=le,e.isReduceSegment=se,e.isPartialSegment=xe,e.isProjectSegment=pe,e.isQuerySegment=ye,e.isSamplingRows=Ce,e.isSamplingPercent=me,e.isSamplingEnable=_e,e.isRawSegment=we,e.isIndexSegment=Ke,e.bareFieldUsage=rt,e.fieldUsageFrom=ge,e.givenUsageFrom=Ee,e.mkRefSummary=Pe,e.mapFieldUsage=ke,e.setFieldUsage=Me,e.isSegmentSQL=Xe,e.isSegmentSource=at,e.isSourceRegistryReference=Qe,e.sourceBase=Et,e.isSourceDef=mt,e.isPersistableSourceDef=Te,e.isBaseTable=ze,e.isLiteral=st,e.mergeEvalSpaces=de,e.isBasicAtomic=he,e.isUserTypeDef=ve,e.isCompoundArrayData=be,e.isTurtle=Be,e.isAtomic=Ie,e.isValueString=We,e.isValueNumber=nt,e.isValueBoolean=gt,e.isValueTimestamp=yt,e.isValueDate=ut,e.mergeUniqueKeyRequirement=et;const t=Object.prototype.hasOwnProperty;function r(ie,Ae){return t.call(ie,Ae)?ie[Ae]:void 0}function i(){return Object.create(null)}function o(ie){return"kids"in ie}function s(ie){return"e"in ie}function a(ie){return!(o(ie)||s(ie))}function l(ie){return ie.node==="aggregate"&&["sum","avg","count","distinct"].includes(ie.function)}function u(ie){return ie.node!=="arrayLiteral"&&ie.node!=="recordLiteral"}function d(ie,Ae){if(!("typeDef"in ie)){const Oe=typeof Ae=="string"?{type:Ae}:Ae;if(u(ie))return{...ie,typeDef:{...Oe}}}return ie}function c(ie){return"dstSQLType"in ie}function x(ie){return["string","number","boolean","date","timestamp","timestamptz"].includes(ie)}function f(ie){return ie.node==="dateLiteral"||ie.node==="timestampLiteral"||ie.node==="timestamptzLiteral"}function p(ie){return["string","number","boolean","date","timestamp","timestamptz","filter expression","error"].includes(ie)}function h(ie){return ie.value!==null}function g(ie){var Ae;return(Ae=ie.as)!==null&&Ae!==void 0?Ae:ie.name}function m(ie){return ie===void 0||ie==="scalar"}function E(ie){return ie==="aggregate"||ie==="ungrouped_aggregate"}function v(ie){return ie==="ungrouped_aggregate"}function _(ie){return ie==="aggregate"||ie==="ungrouped_aggregate"||ie==="aggregate_analytic"}function S(ie){return ie==="aggregate"||ie==="scalar_analytic"||ie==="aggregate_analytic"||ie==="ungrouped_aggregate"}function T(ie){return ie==="aggregate_analytic"||ie==="scalar_analytic"}function b(ie){return{scalar:0,aggregate:1,ungrouped_aggregate:2,scalar_analytic:2,aggregate_analytic:3}[ie]}function D(ie,Ae){return ie===Ae||b(ie)<b(Ae)}function C(ie,Ae){let Oe="scalar";return(ie==="aggregate"||Ae==="aggregate")&&(Oe="aggregate"),(ie==="ungrouped_aggregate"||Ae==="ungrouped_aggregate")&&(Oe="ungrouped_aggregate"),(ie==="scalar_analytic"||Ae==="scalar_analytic")&&(Oe="scalar_analytic"),(ie==="aggregate_analytic"||Ae==="aggregate_analytic")&&(Oe="aggregate_analytic"),(ie==="scalar_analytic"&&Ae==="aggregate"||ie==="aggregate"&&Ae==="scalar_analytic")&&(Oe="aggregate_analytic"),Oe}function w(ie){return ie.reduce(C,"scalar")}function R(ie){return"e"in ie&&ie.e!==void 0}function O(ie){return ie==="date"||ie==="timestamp"||ie==="timestamptz"}function I(ie){return["string","number","date","timestamp","timestamptz","boolean","json","sql native","error"].includes(ie)}function k(ie){return I(ie)||ie==="record"||ie==="array"}function $(ie){return["string","number","date","boolean","date","timestamp","timestamptz"].includes(ie)}function Y(ie){return k(ie.type)&&!R(ie)}function ne(ie,Ae){if(te(ie))return re(ie.elementTypeDef,Ae);if(ee(ie)){const{type:je,fields:it,elementTypeDef:dt}=ie;return{type:je,fields:it,elementTypeDef:dt,join:"many",name:Ae}}if(ie.type==="record"){const{type:je,fields:it}=ie;return{type:je,fields:it,join:"one",name:Ae}}const Oe={name:Ae,type:ie.type};switch(ie.type){case"sql native":return{...Oe,rawType:ie.rawType};case"number":{const je=ie.numberType;return je?{...Oe,numberType:je}:Oe}case"date":{const je=ie.timeframe;return je?{name:Ae,type:"date",timeframe:je}:Oe}case"timestamp":{const je={name:Ae,type:"timestamp"};return ie.timeframe&&(je.timeframe=ie.timeframe),je}case"timestamptz":{const je={name:Ae,type:"timestamptz"};return ie.timeframe&&(je.timeframe=ie.timeframe),je}}return Oe}function re(ie,Ae){if(ie.type==="record")return{type:"array",join:"many",name:Ae,elementTypeDef:{type:"record_element"},fields:ie.fields};const Oe=ne(ie,"value");return{type:"array",join:"many",name:Ae,elementTypeDef:ie,fields:[Oe,{...Oe,name:"each",e:{node:"field",path:["value"]}}]}}function oe(ie){return ie.type==="record"?{type:"array",elementTypeDef:{type:"record_element"},fields:ie.fields}:{type:"array",elementTypeDef:ie}}function U(ie){return ie.type==="array"&&ie.elementTypeDef.type==="record_element"}function ee(ie){return ie.type==="array"&&ie.elementTypeDef.type==="record_element"}function J(ie){return ie.type==="record"||ie.type==="array"&&"elementTypeDef"in ie&&ie.elementTypeDef.type==="record_element"}function te(ie){return ie.type==="array"&&ie.elementTypeDef.type!=="record_element"}function q(ie){return["left","right","full","inner"].includes(ie)}function H(ie){return["composite","table","sql_select","query_source","virtual","array","record"].includes(ie.type)}function Q(ie){return"join"in ie}function M(ie){return mt(ie)&&Q(ie)}function j(ie){return["day","week","month","quarter","year"].includes(ie)}function P(ie){return j(ie)||["hour","minute","second"].includes(ie)}function V(ie){return P(ie)||ie==="day_of_week"||ie==="day_of_year"}var Z;(function(ie){ie.Date="date",ie.Timestamp="timestamp",ie.Number="number",ie.String="string"})(Z||(e.ValueType=Z={}));function ae(ie){return typeof ie!="string"}function ce(ie){return!!((ie.type==="reduce"||ie.type==="project"||ie.type==="partial")&&(ie.extendSource&&ie.extendSource.some(Ae=>Ae.type==="error")||ie.queryFields.some(Ae=>Ae.type==="error")))}function le(ie){return ie.fields.some(Ae=>Ae.type==="error")}function se(ie){return ie.type==="reduce"}function xe(ie){return ie.type==="partial"}function pe(ie){return ie.type==="project"}function ye(ie){return pe(ie)||se(ie)}function Ce(ie){return ie.rows!==void 0}function me(ie){return ie.percent!==void 0}function _e(ie){return ie.enable!==void 0}function we(ie){return ie.type==="raw"}function Ke(ie){return ie.type==="index"}function rt(ie){return ie.uniqueKeyRequirement===void 0&&ie.analyticFunctionUse===void 0}function ge(ie){var Ae;return(Ae=ie?.fieldUsage)!==null&&Ae!==void 0?Ae:[]}function Ee(ie){var Ae;return(Ae=ie?.givenUsage)!==null&&Ae!==void 0?Ae:[]}function Pe({fieldUsage:ie,givenUsage:Ae}){if(!(ie===void 0&&Ae===void 0))return{fieldUsage:ie??[],...Ae&&{givenUsage:Ae}}}function ke(ie,Ae){return ie&&{...ie,fieldUsage:ie.fieldUsage.map(Ae)}}function Me(ie,Ae){ie.refSummary?ie.refSummary.fieldUsage=Ae:ie.refSummary={fieldUsage:Ae}}function Xe(ie){return"sql"in ie}function at(ie){return"type"in ie&&(ie.type==="sql_select"||ie.type==="query_source")}function Qe(ie){return ie.type==="source_registry_reference"}function Et(ie){return{...ie}}function mt(ie){return ie.type==="table"||ie.type==="sql_select"||ie.type==="query_source"||ie.type==="query_result"||ie.type==="finalize"||ie.type==="nest_source"||ie.type==="virtual"||ie.type==="composite"}function Te(ie){return ie.type==="sql_select"||ie.type==="query_source"}function ze(ie){return M(ie)?!1:!!mt(ie)}function st(ie){return ie==="literal"}function de(...ie){return ie.length<=1&&ie.every(Ae=>Ae==="literal")?"literal":ie.every(Ae=>Ae==="constant"||Ae==="literal")?"constant":ie.every(Ae=>Ae==="output"||Ae==="constant"||Ae==="literal")?"output":"input"}function he(ie){return ie.type==="string"||O(ie.type)||ie.type==="number"||ie.type==="boolean"||ie.type==="json"||ie.type==="sql native"||ie.type==="error"}function ve(ie){return ie.type==="userType"}function be(ie){return Array.isArray(ie)&&(ie.length===0||typeof ie[0]=="object"&&ie[0]!==null&&!Array.isArray(ie[0]))}function Be(ie){return ie.type==="turtle"}function Ie(ie){return k(ie.type)}function We(ie,Ae){return Ae.type==="string"}function nt(ie,Ae){return Ae.type==="number"}function gt(ie,Ae){return Ae.type==="boolean"}function yt(ie,Ae){return Ae.type==="timestamp"}function ut(ie,Ae){return Ae.type==="date"}e.TD={isAtomic(ie){return ie!==void 0&&k(ie.type)},isBasicAtomic(ie){return ie!==void 0&&he({type:ie.type})},isString:ie=>ie?.type==="string",isNumber:ie=>ie?.type==="number",isBoolean:ie=>ie?.type==="boolean",isJSON:ie=>ie?.type==="json",isSQL:ie=>ie?.type==="sql native",isDate:ie=>ie?.type==="date",isTimestamp:ie=>ie?.type==="timestamp",isTimestamptz:ie=>ie?.type==="timestamptz",isAnyTimestamp(ie){return ie?.type==="timestamp"||ie?.type==="timestamptz"},isTemporal(ie){var Ae;const Oe=(Ae=ie?.type)!==null&&Ae!==void 0?Ae:"";return O(Oe)},isError:ie=>ie?.type==="error",atomicDef(ie){if(!e.TD.isAtomic(ie))return{type:"error"};switch(ie.type){case"array":return ee(ie)?{type:"array",elementTypeDef:ie.elementTypeDef,fields:ie.fields}:{type:"array",elementTypeDef:ie.elementTypeDef};case"record":return{type:"record",fields:ie.fields};case"number":return ie.numberType?{type:"number",numberType:ie.numberType}:{type:"number"};case"sql native":return ie.rawType?{type:"sql native",rawType:ie.rawType}:{type:"sql native"};case"timestamp":case"timestamptz":return ie.timeframe?{type:ie.type,timeframe:ie.timeframe}:{type:ie.type};default:return{type:ie.type}}},eq(ie,Ae){if(ie===void 0||Ae===void 0)return!1;function Oe(je,it){const dt={},lt=je.fields||[],ft=it.fields||[];if(lt.length!==ft.length)return!1;for(const It of lt)if(It.name)dt[It.name]=It;else return!1;for(const It of ft)if(!e.TD.eq(dt[It.name],It))return!1;return!0}return ie.type==="array"&&Ae.type==="array"?ie.elementTypeDef.type!==Ae.elementTypeDef.type?!1:ie.elementTypeDef.type!=="record_element"&&Ae.elementTypeDef.type!=="record_element"?e.TD.eq(ie.elementTypeDef,Ae.elementTypeDef):e.TD.isAtomic(ie)&&e.TD.isAtomic(Ae)&&Oe(ie,Ae):ie.type==="record"&&Ae.type==="record"?e.TD.isAtomic(ie)&&e.TD.isAtomic(Ae)&&Oe(ie,Ae):ie.type==="sql native"&&Ae.type==="sql native"?ie.rawType!==void 0&&ie.rawType===Ae.rawType:ie.type===Ae.type}};function et(ie,Ae){return ie?Ae?{isCount:ie.isCount||Ae.isCount}:ie:Ae}})(J3)),J3}var yR;function cs(){if(yR)return fr;yR=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.arg=t,fr.spread=r,fr.sql=i,fr.constant=o,fr.output=s,fr.literal=a,fr.variadicParam=l,fr.param=u,fr.makeParam=d,fr.maxScalar=c,fr.maxAggregate=x,fr.anyExprType=f,fr.maxUngroupedAggregate=p,fr.maxAnalytic=h,fr.minScalar=g,fr.minAggregate=m,fr.minAnalytic=E,fr.overload=v,fr.expandBlueprintMap=te,fr.expandOverrideMapFromBase=Q,fr.def=j;const e=Ge();function t(P){return{node:"function_parameter",name:P}}function r(P,V=void 0,Z=void 0){return{node:"spread",e:P,prefix:V,suffix:Z}}function i(P,...V){const Z={node:"genericSQLExpr",kids:{args:[]},src:[]},ae=[...V];let ce="";for(const le of P){ce+=le;const se=ae.shift();se!==void 0&&(typeof se=="string"?ce+=se:(Z.src.push(ce),Z.kids.args.push(se),ce=""))}return ce.length>0&&Z.src.push(ce),Z}function o(P){return{...P,evalSpace:"constant"}}function s(P){return{...P,evalSpace:"output"}}function a(P){return{...P,evalSpace:"literal"}}function l(P,...V){return{name:P,isVariadic:!0,allowedTypes:V}}function u(P,...V){return{name:P,isVariadic:!1,allowedTypes:V}}function d(P,...V){return{param:u(P,...V),arg:t(P)}}function c(P){return{...P,expressionType:"scalar",evalSpace:"input"}}function x(P){return{...P,expressionType:"aggregate",evalSpace:"input"}}function f(P){return{...P,expressionType:void 0,evalSpace:"input"}}function p(P){return{...P,expressionType:"ungrouped_aggregate",evalSpace:"input"}}function h(P){return{...P,expressionType:"aggregate_analytic",evalSpace:"input"}}function g(P){return{...P,expressionType:"scalar",evalSpace:"input"}}function m(P){return{...P,expressionType:"aggregate",evalSpace:"input"}}function E(P){return{...P,expressionType:"scalar_analytic",evalSpace:"input"}}function v(P,V,Z,ae){return{returnType:P,params:V,e:Z,needsWindowOrderBy:ae?.needsWindowOrderBy,between:ae?.between,isSymmetric:ae?.isSymmetric,supportsOrderBy:ae?.supportsOrderBy,defaultOrderByArgIndex:ae?.defaultOrderByArgIndex,supportsLimit:ae?.supportsLimit}}function _(P,V=!0,Z=!0){if(!V&&P==="any")throw new Error("Return type cannot include any");if(typeof P=="string")return{type:P};if("array"in P){const ae=V?_(P.array,!0):_(P.array,!1);return ae.type==="record"?{type:"array",elementTypeDef:{type:"record_element"},fields:ae.fields}:{type:"array",elementTypeDef:ae}}else if("record"in P){const ae=[];for(const[ce,le]of Object.entries(P.record)){const se=V?_(le,!0):_(le,!1);e.TD.isAtomic(se)&&ae.push((0,e.mkFieldDef)(se,ce))}return{type:"record",fields:ae}}else if("generic"in P){if(!Z)throw new Error("Cannot use generic");return{type:"generic",generic:P.generic}}else if("sql_native"in P)return{type:"sql native",rawType:P.sql_native};throw new Error("Cannot figure out type")}function S(P){if(P==="any")throw new Error("Cannot return any type");if(typeof P=="string")return g({type:P});if("array"in P)return f(_(P,!1));if("record"in P)return f(_(P,!1));if("generic"in P)return g(_(P,!1));if("literal"in P)return a(g(_(P.literal,!1)));if("constant"in P)return o(g(_(P.constant,!1)));if("dimension"in P)return g(_(P.dimension,!1));if("measure"in P)return m(_(P.measure,!1));if("sql_native"in P)return f({type:"sql native",rawType:P.sql_native});if("calculation"in P)return E(_(P.calculation,!1));throw new Error("Invalid function blueprint")}function T(P){return typeof P=="string"||"array"in P||"record"in P||"generic"in P||"literal"in P||"constant"in P||"dimension"in P||"measure"in P||"calculation"in P||"sql_native"in P}function b(P){return T(P)?[P]:Array.isArray(P)?P:T(P.variadic)?[P.variadic]:P.variadic}function D(P){if(typeof P=="string")return f({type:P});if("generic"in P)return f(_(P));if("literal"in P)return a(c(_(P.literal)));if("constant"in P)return o(c(_(P.constant)));if("dimension"in P)return c(_(P.dimension));if("measure"in P)return x(_(P.measure));if("array"in P)return f(_(P,!1));if("record"in P)return f(_(P,!1));if("sql_native"in P)return f({type:"sql native",rawType:P.sql_native});if("calculation"in P)return h(_(P.calculation));throw new Error("Invalid function blueprint")}function C(P){return P.map(V=>D(V))}function w(P){return typeof P!="string"&&"variadic"in P}function R(P,V){return{name:P,allowedTypes:C(b(V)),isVariadic:w(V)}}function O(P){return Object.entries(P).map(Z=>R(Z[0],Z[1]))}function I(P){const V=[],Z=[];let ae=P;for(;ae.length>0;){const le=ae.indexOf("${");if(le===-1){V.push(ae);break}const se=ae.slice(0,le);ae=ae.slice(le);const xe=ae.indexOf("}");if(xe===-1){V.push(se+ae);break}const pe=ae.slice(2,xe);ae=ae.slice(xe+1);const ye=pe.startsWith("..."),Ce=pe.endsWith(":"),me=ye?pe.slice(3):Ce?pe.slice(0,-1):pe,_e={node:"function_parameter",name:me};V.push(se),ye?Z.push({node:"spread",e:_e,prefix:"",suffix:""}):Ce&&me==="order_by"?Z.push({node:"aggregate_order_by"}):Ce&&me==="limit"?Z.push({node:"aggregate_limit"}):Z.push(_e)}return{node:"genericSQLExpr",kids:{args:Z},src:V}}function k(P,V){return w(V)?{node:"spread",e:{node:"function_parameter",name:P},prefix:"",suffix:""}:{node:"function_parameter",name:P}}function $(P,V){const Z=Object.entries(V.takes),ae=Z.length>0?Z.length-1:0;return{node:"genericSQLExpr",kids:{args:Z.map(ce=>k(ce[0],ce[1]))},src:[`${P}(`,...Array(ae).fill(","),")"]}}function Y(P){return"sql"in P.impl?I(P.impl.sql):"expr"in P.impl?P.impl.expr:$(P.impl.function,P)}function ne(P){return{e:Y(P),between:P.impl.between,needsWindowOrderBy:P.impl.needsWindowOrderBy,defaultOrderByArgIndex:P.impl.defaultOrderByArgIndex}}function re(P){if(P!==void 0)return Object.entries(P).map(([V,Z])=>({name:V,acceptibleTypes:Z.map(ae=>_(ae,!0,!1))}))}function oe(P){return{returnType:S(P.returns),params:O(P.takes),isSymmetric:P.isSymmetric,supportsOrderBy:P.supportsOrderBy,supportsLimit:P.supportsLimit,genericTypes:re(P.generic),...ne(P)}}function U(P){return"takes"in P&&"returns"in P&&"impl"in P}function ee(P){return"function"in P||"sql"in P||"expr"in P}function J(P){return U(P)?[oe(P)]:Object.values(P).flatMap(V=>oe(V))}function te(P){const V={};for(const Z in P)V[Z]=J(P[Z]);return V}function q(P,V){return[oe({...P,impl:V})]}function H(P,V,Z){if(ee(Z)){if(!U(V))throw new Error(`Malformed function override: ${P}. Attempt to override multiple overloads with a single overload (missing: ${Object.keys(V)})`);return q(V,Z)}else{if(U(V))throw new Error(`Malformed function override: ${P}. Attempt to override a single overload with multiple overloads (extraneous: ${Object.keys(Z)})`);return Object.entries(Z).flatMap(([ae,ce])=>{const le=V[ae];if(le===void 0)throw new Error(`Malformed function override: ${P}. No overload named ${ae}`);return q(le,ce)})}}function Q(P,V){const Z={};for(const ae in V){if(!(ae in P))throw new Error(`Malformed function override: ${ae}. No such function in Malloy standard`);Z[ae]=H(ae,P[ae],V[ae])}return Z}function*M(P){if(typeof P!="string"){if("generic"in P)yield P;else if("record"in P)for(const V of Object.values(P.record))yield*M(V);else for(const V of["array","literal","measure","dimension","measure","constant","cacluation"])if(V in P){yield*M(P[V]);return}}}function j(P,V,Z,ae={}){let ce=!1;const le={};for(const xe of Object.values(V))for(const pe of M(xe))le[pe.generic]=["any"],ce=!0;ce&&ae.generic===void 0&&(ae.generic=le);const se={takes:V,returns:Z,impl:{function:P.toUpperCase()},...ae};return{[P]:se}}return fr}var X3={},Rx={},ER;function fA(){if(ER)return Rx;ER=1,Object.defineProperty(Rx,"__esModule",{value:!0}),Rx.decodeDottedTablePath=e,Rx.validateDottedTablePath=t;function e(o,s){const{quoteChar:a,escapeStyle:l,bareIdentRegex:u,dialectName:d}=s;if(o.length===0)return{ok:!1,error:`${d} table path is empty`};const c=[];let x=0;for(;;){let f,p;if(o[x]===a){const h=r(o,x,a,l);if(h===null)return{ok:!1,error:`Invalid ${d} table path: ${JSON.stringify(o)} — unterminated quoted segment`};f=h.decoded,p=!0,x=h.end}else{const h=o.slice(x).match(u);if(!h||h.index!==0||h[0].length===0)return{ok:!1,error:`Invalid ${d} table path: ${JSON.stringify(o)} — invalid segment at position ${x}`};f=h[0],p=!1,x+=h[0].length}if(f.includes(";")||f.includes("--"))return{ok:!1,error:`Invalid ${d} table path: segment ${JSON.stringify(f)} contains forbidden character; even when quoted, table-path segments may not contain \`;\` or \`--\`.`};if(c.push({value:f,quoted:p}),x===o.length)return{ok:!0,segments:c};if(o[x]!==".")return{ok:!1,error:`Invalid ${d} table path: ${JSON.stringify(o)} — expected '.' at position ${x}`};if(x++,x===o.length)return{ok:!1,error:`Invalid ${d} table path: ${JSON.stringify(o)} — trailing dot`}}}function t(o,s){const a=e(o,s);return a.ok?{ok:!0,canonical:o}:a}function r(o,s,a,l){let u=s+1,d="";for(;u<o.length;){if(l==="backslash"&&o[u]==="\\"){if(u+1>=o.length)return null;d+=i(o[u+1]),u+=2;continue}if(o[u]===a){if(l==="doubled"&&o[u+1]===a){d+=a,u+=2;continue}return{decoded:d,end:u+1}}d+=o[u],u++}return null}function i(o){switch(o){case"n":return`
|
|
1
|
+
import{aG as XF,r as L,j as N,ac as Ht,R as ZF,aH as e9,aI as ns}from"./index-B_jKMR35.js";import{r as Jd,a as dA,d as xt}from"./index-D-rDyK11.js";import{r as Wa}from"./index-w_0OQJgZ.js";import{d as AU}from"./index-DWIe_hK0.js";import{MalloyRenderer as t9,isCoreVizPluginInstance as TU}from"./index-BabP-V-S.js";var Eo={},K3={},fr={},J3={},gR;function Ge(){return gR||(gR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TD=e.ValueType=void 0,e.safeRecordGet=r,e.mkSafeRecord=i,e.exprHasKids=o,e.exprHasE=s,e.exprIsLeaf=a,e.isAsymmetricExpr=l,e.mkTemporal=d,e.isRawCast=c,e.isFilterExprType=x,e.isTimeLiteral=f,e.isParameterType=p,e.paramHasValue=h,e.activeName=g,e.expressionIsScalar=m,e.expressionIsAggregate=E,e.expressionIsUngroupedAggregate=v,e.expressionInvolvesAggregate=_,e.expressionIsCalculation=S,e.expressionIsAnalytic=T,e.isExpressionTypeLEQ=D,e.maxExpressionType=C,e.maxOfExpressionTypes=w,e.hasExpression=R,e.isTemporalType=O,e.isBasicAtomicType=I,e.isAtomicFieldType=k,e.canOrderBy=$,e.fieldIsIntrinsic=Y,e.mkFieldDef=ne,e.mkArrayDef=re,e.mkArrayTypeDef=oe,e.isRepeatedRecordFunctionParam=U,e.isRepeatedRecord=ee,e.isRecordOrRepeatedRecord=J,e.isBasicArray=te,e.isMatrixOperation=q,e.isJoinable=H,e.isJoined=Q,e.isJoinedSource=M,e.isDateUnit=j,e.isTimestampUnit=P,e.isExtractUnit=V,e.refIsStructDef=ae,e.segmentHasErrors=ce,e.structHasErrors=le,e.isReduceSegment=se,e.isPartialSegment=xe,e.isProjectSegment=pe,e.isQuerySegment=ye,e.isSamplingRows=Ce,e.isSamplingPercent=me,e.isSamplingEnable=_e,e.isRawSegment=we,e.isIndexSegment=Ke,e.bareFieldUsage=rt,e.fieldUsageFrom=ge,e.givenUsageFrom=Ee,e.mkRefSummary=Pe,e.mapFieldUsage=ke,e.setFieldUsage=Me,e.isSegmentSQL=Xe,e.isSegmentSource=at,e.isSourceRegistryReference=Qe,e.sourceBase=Et,e.isSourceDef=mt,e.isPersistableSourceDef=Te,e.isBaseTable=ze,e.isLiteral=st,e.mergeEvalSpaces=de,e.isBasicAtomic=he,e.isUserTypeDef=ve,e.isCompoundArrayData=be,e.isTurtle=Be,e.isAtomic=Ie,e.isValueString=We,e.isValueNumber=nt,e.isValueBoolean=gt,e.isValueTimestamp=yt,e.isValueDate=ut,e.mergeUniqueKeyRequirement=et;const t=Object.prototype.hasOwnProperty;function r(ie,Ae){return t.call(ie,Ae)?ie[Ae]:void 0}function i(){return Object.create(null)}function o(ie){return"kids"in ie}function s(ie){return"e"in ie}function a(ie){return!(o(ie)||s(ie))}function l(ie){return ie.node==="aggregate"&&["sum","avg","count","distinct"].includes(ie.function)}function u(ie){return ie.node!=="arrayLiteral"&&ie.node!=="recordLiteral"}function d(ie,Ae){if(!("typeDef"in ie)){const Oe=typeof Ae=="string"?{type:Ae}:Ae;if(u(ie))return{...ie,typeDef:{...Oe}}}return ie}function c(ie){return"dstSQLType"in ie}function x(ie){return["string","number","boolean","date","timestamp","timestamptz"].includes(ie)}function f(ie){return ie.node==="dateLiteral"||ie.node==="timestampLiteral"||ie.node==="timestamptzLiteral"}function p(ie){return["string","number","boolean","date","timestamp","timestamptz","filter expression","error"].includes(ie)}function h(ie){return ie.value!==null}function g(ie){var Ae;return(Ae=ie.as)!==null&&Ae!==void 0?Ae:ie.name}function m(ie){return ie===void 0||ie==="scalar"}function E(ie){return ie==="aggregate"||ie==="ungrouped_aggregate"}function v(ie){return ie==="ungrouped_aggregate"}function _(ie){return ie==="aggregate"||ie==="ungrouped_aggregate"||ie==="aggregate_analytic"}function S(ie){return ie==="aggregate"||ie==="scalar_analytic"||ie==="aggregate_analytic"||ie==="ungrouped_aggregate"}function T(ie){return ie==="aggregate_analytic"||ie==="scalar_analytic"}function b(ie){return{scalar:0,aggregate:1,ungrouped_aggregate:2,scalar_analytic:2,aggregate_analytic:3}[ie]}function D(ie,Ae){return ie===Ae||b(ie)<b(Ae)}function C(ie,Ae){let Oe="scalar";return(ie==="aggregate"||Ae==="aggregate")&&(Oe="aggregate"),(ie==="ungrouped_aggregate"||Ae==="ungrouped_aggregate")&&(Oe="ungrouped_aggregate"),(ie==="scalar_analytic"||Ae==="scalar_analytic")&&(Oe="scalar_analytic"),(ie==="aggregate_analytic"||Ae==="aggregate_analytic")&&(Oe="aggregate_analytic"),(ie==="scalar_analytic"&&Ae==="aggregate"||ie==="aggregate"&&Ae==="scalar_analytic")&&(Oe="aggregate_analytic"),Oe}function w(ie){return ie.reduce(C,"scalar")}function R(ie){return"e"in ie&&ie.e!==void 0}function O(ie){return ie==="date"||ie==="timestamp"||ie==="timestamptz"}function I(ie){return["string","number","date","timestamp","timestamptz","boolean","json","sql native","error"].includes(ie)}function k(ie){return I(ie)||ie==="record"||ie==="array"}function $(ie){return["string","number","date","boolean","date","timestamp","timestamptz"].includes(ie)}function Y(ie){return k(ie.type)&&!R(ie)}function ne(ie,Ae){if(te(ie))return re(ie.elementTypeDef,Ae);if(ee(ie)){const{type:je,fields:it,elementTypeDef:dt}=ie;return{type:je,fields:it,elementTypeDef:dt,join:"many",name:Ae}}if(ie.type==="record"){const{type:je,fields:it}=ie;return{type:je,fields:it,join:"one",name:Ae}}const Oe={name:Ae,type:ie.type};switch(ie.type){case"sql native":return{...Oe,rawType:ie.rawType};case"number":{const je=ie.numberType;return je?{...Oe,numberType:je}:Oe}case"date":{const je=ie.timeframe;return je?{name:Ae,type:"date",timeframe:je}:Oe}case"timestamp":{const je={name:Ae,type:"timestamp"};return ie.timeframe&&(je.timeframe=ie.timeframe),je}case"timestamptz":{const je={name:Ae,type:"timestamptz"};return ie.timeframe&&(je.timeframe=ie.timeframe),je}}return Oe}function re(ie,Ae){if(ie.type==="record")return{type:"array",join:"many",name:Ae,elementTypeDef:{type:"record_element"},fields:ie.fields};const Oe=ne(ie,"value");return{type:"array",join:"many",name:Ae,elementTypeDef:ie,fields:[Oe,{...Oe,name:"each",e:{node:"field",path:["value"]}}]}}function oe(ie){return ie.type==="record"?{type:"array",elementTypeDef:{type:"record_element"},fields:ie.fields}:{type:"array",elementTypeDef:ie}}function U(ie){return ie.type==="array"&&ie.elementTypeDef.type==="record_element"}function ee(ie){return ie.type==="array"&&ie.elementTypeDef.type==="record_element"}function J(ie){return ie.type==="record"||ie.type==="array"&&"elementTypeDef"in ie&&ie.elementTypeDef.type==="record_element"}function te(ie){return ie.type==="array"&&ie.elementTypeDef.type!=="record_element"}function q(ie){return["left","right","full","inner"].includes(ie)}function H(ie){return["composite","table","sql_select","query_source","virtual","array","record"].includes(ie.type)}function Q(ie){return"join"in ie}function M(ie){return mt(ie)&&Q(ie)}function j(ie){return["day","week","month","quarter","year"].includes(ie)}function P(ie){return j(ie)||["hour","minute","second"].includes(ie)}function V(ie){return P(ie)||ie==="day_of_week"||ie==="day_of_year"}var Z;(function(ie){ie.Date="date",ie.Timestamp="timestamp",ie.Number="number",ie.String="string"})(Z||(e.ValueType=Z={}));function ae(ie){return typeof ie!="string"}function ce(ie){return!!((ie.type==="reduce"||ie.type==="project"||ie.type==="partial")&&(ie.extendSource&&ie.extendSource.some(Ae=>Ae.type==="error")||ie.queryFields.some(Ae=>Ae.type==="error")))}function le(ie){return ie.fields.some(Ae=>Ae.type==="error")}function se(ie){return ie.type==="reduce"}function xe(ie){return ie.type==="partial"}function pe(ie){return ie.type==="project"}function ye(ie){return pe(ie)||se(ie)}function Ce(ie){return ie.rows!==void 0}function me(ie){return ie.percent!==void 0}function _e(ie){return ie.enable!==void 0}function we(ie){return ie.type==="raw"}function Ke(ie){return ie.type==="index"}function rt(ie){return ie.uniqueKeyRequirement===void 0&&ie.analyticFunctionUse===void 0}function ge(ie){var Ae;return(Ae=ie?.fieldUsage)!==null&&Ae!==void 0?Ae:[]}function Ee(ie){var Ae;return(Ae=ie?.givenUsage)!==null&&Ae!==void 0?Ae:[]}function Pe({fieldUsage:ie,givenUsage:Ae}){if(!(ie===void 0&&Ae===void 0))return{fieldUsage:ie??[],...Ae&&{givenUsage:Ae}}}function ke(ie,Ae){return ie&&{...ie,fieldUsage:ie.fieldUsage.map(Ae)}}function Me(ie,Ae){ie.refSummary?ie.refSummary.fieldUsage=Ae:ie.refSummary={fieldUsage:Ae}}function Xe(ie){return"sql"in ie}function at(ie){return"type"in ie&&(ie.type==="sql_select"||ie.type==="query_source")}function Qe(ie){return ie.type==="source_registry_reference"}function Et(ie){return{...ie}}function mt(ie){return ie.type==="table"||ie.type==="sql_select"||ie.type==="query_source"||ie.type==="query_result"||ie.type==="finalize"||ie.type==="nest_source"||ie.type==="virtual"||ie.type==="composite"}function Te(ie){return ie.type==="sql_select"||ie.type==="query_source"}function ze(ie){return M(ie)?!1:!!mt(ie)}function st(ie){return ie==="literal"}function de(...ie){return ie.length<=1&&ie.every(Ae=>Ae==="literal")?"literal":ie.every(Ae=>Ae==="constant"||Ae==="literal")?"constant":ie.every(Ae=>Ae==="output"||Ae==="constant"||Ae==="literal")?"output":"input"}function he(ie){return ie.type==="string"||O(ie.type)||ie.type==="number"||ie.type==="boolean"||ie.type==="json"||ie.type==="sql native"||ie.type==="error"}function ve(ie){return ie.type==="userType"}function be(ie){return Array.isArray(ie)&&(ie.length===0||typeof ie[0]=="object"&&ie[0]!==null&&!Array.isArray(ie[0]))}function Be(ie){return ie.type==="turtle"}function Ie(ie){return k(ie.type)}function We(ie,Ae){return Ae.type==="string"}function nt(ie,Ae){return Ae.type==="number"}function gt(ie,Ae){return Ae.type==="boolean"}function yt(ie,Ae){return Ae.type==="timestamp"}function ut(ie,Ae){return Ae.type==="date"}e.TD={isAtomic(ie){return ie!==void 0&&k(ie.type)},isBasicAtomic(ie){return ie!==void 0&&he({type:ie.type})},isString:ie=>ie?.type==="string",isNumber:ie=>ie?.type==="number",isBoolean:ie=>ie?.type==="boolean",isJSON:ie=>ie?.type==="json",isSQL:ie=>ie?.type==="sql native",isDate:ie=>ie?.type==="date",isTimestamp:ie=>ie?.type==="timestamp",isTimestamptz:ie=>ie?.type==="timestamptz",isAnyTimestamp(ie){return ie?.type==="timestamp"||ie?.type==="timestamptz"},isTemporal(ie){var Ae;const Oe=(Ae=ie?.type)!==null&&Ae!==void 0?Ae:"";return O(Oe)},isError:ie=>ie?.type==="error",atomicDef(ie){if(!e.TD.isAtomic(ie))return{type:"error"};switch(ie.type){case"array":return ee(ie)?{type:"array",elementTypeDef:ie.elementTypeDef,fields:ie.fields}:{type:"array",elementTypeDef:ie.elementTypeDef};case"record":return{type:"record",fields:ie.fields};case"number":return ie.numberType?{type:"number",numberType:ie.numberType}:{type:"number"};case"sql native":return ie.rawType?{type:"sql native",rawType:ie.rawType}:{type:"sql native"};case"timestamp":case"timestamptz":return ie.timeframe?{type:ie.type,timeframe:ie.timeframe}:{type:ie.type};default:return{type:ie.type}}},eq(ie,Ae){if(ie===void 0||Ae===void 0)return!1;function Oe(je,it){const dt={},lt=je.fields||[],ft=it.fields||[];if(lt.length!==ft.length)return!1;for(const It of lt)if(It.name)dt[It.name]=It;else return!1;for(const It of ft)if(!e.TD.eq(dt[It.name],It))return!1;return!0}return ie.type==="array"&&Ae.type==="array"?ie.elementTypeDef.type!==Ae.elementTypeDef.type?!1:ie.elementTypeDef.type!=="record_element"&&Ae.elementTypeDef.type!=="record_element"?e.TD.eq(ie.elementTypeDef,Ae.elementTypeDef):e.TD.isAtomic(ie)&&e.TD.isAtomic(Ae)&&Oe(ie,Ae):ie.type==="record"&&Ae.type==="record"?e.TD.isAtomic(ie)&&e.TD.isAtomic(Ae)&&Oe(ie,Ae):ie.type==="sql native"&&Ae.type==="sql native"?ie.rawType!==void 0&&ie.rawType===Ae.rawType:ie.type===Ae.type}};function et(ie,Ae){return ie?Ae?{isCount:ie.isCount||Ae.isCount}:ie:Ae}})(J3)),J3}var yR;function cs(){if(yR)return fr;yR=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.arg=t,fr.spread=r,fr.sql=i,fr.constant=o,fr.output=s,fr.literal=a,fr.variadicParam=l,fr.param=u,fr.makeParam=d,fr.maxScalar=c,fr.maxAggregate=x,fr.anyExprType=f,fr.maxUngroupedAggregate=p,fr.maxAnalytic=h,fr.minScalar=g,fr.minAggregate=m,fr.minAnalytic=E,fr.overload=v,fr.expandBlueprintMap=te,fr.expandOverrideMapFromBase=Q,fr.def=j;const e=Ge();function t(P){return{node:"function_parameter",name:P}}function r(P,V=void 0,Z=void 0){return{node:"spread",e:P,prefix:V,suffix:Z}}function i(P,...V){const Z={node:"genericSQLExpr",kids:{args:[]},src:[]},ae=[...V];let ce="";for(const le of P){ce+=le;const se=ae.shift();se!==void 0&&(typeof se=="string"?ce+=se:(Z.src.push(ce),Z.kids.args.push(se),ce=""))}return ce.length>0&&Z.src.push(ce),Z}function o(P){return{...P,evalSpace:"constant"}}function s(P){return{...P,evalSpace:"output"}}function a(P){return{...P,evalSpace:"literal"}}function l(P,...V){return{name:P,isVariadic:!0,allowedTypes:V}}function u(P,...V){return{name:P,isVariadic:!1,allowedTypes:V}}function d(P,...V){return{param:u(P,...V),arg:t(P)}}function c(P){return{...P,expressionType:"scalar",evalSpace:"input"}}function x(P){return{...P,expressionType:"aggregate",evalSpace:"input"}}function f(P){return{...P,expressionType:void 0,evalSpace:"input"}}function p(P){return{...P,expressionType:"ungrouped_aggregate",evalSpace:"input"}}function h(P){return{...P,expressionType:"aggregate_analytic",evalSpace:"input"}}function g(P){return{...P,expressionType:"scalar",evalSpace:"input"}}function m(P){return{...P,expressionType:"aggregate",evalSpace:"input"}}function E(P){return{...P,expressionType:"scalar_analytic",evalSpace:"input"}}function v(P,V,Z,ae){return{returnType:P,params:V,e:Z,needsWindowOrderBy:ae?.needsWindowOrderBy,between:ae?.between,isSymmetric:ae?.isSymmetric,supportsOrderBy:ae?.supportsOrderBy,defaultOrderByArgIndex:ae?.defaultOrderByArgIndex,supportsLimit:ae?.supportsLimit}}function _(P,V=!0,Z=!0){if(!V&&P==="any")throw new Error("Return type cannot include any");if(typeof P=="string")return{type:P};if("array"in P){const ae=V?_(P.array,!0):_(P.array,!1);return ae.type==="record"?{type:"array",elementTypeDef:{type:"record_element"},fields:ae.fields}:{type:"array",elementTypeDef:ae}}else if("record"in P){const ae=[];for(const[ce,le]of Object.entries(P.record)){const se=V?_(le,!0):_(le,!1);e.TD.isAtomic(se)&&ae.push((0,e.mkFieldDef)(se,ce))}return{type:"record",fields:ae}}else if("generic"in P){if(!Z)throw new Error("Cannot use generic");return{type:"generic",generic:P.generic}}else if("sql_native"in P)return{type:"sql native",rawType:P.sql_native};throw new Error("Cannot figure out type")}function S(P){if(P==="any")throw new Error("Cannot return any type");if(typeof P=="string")return g({type:P});if("array"in P)return f(_(P,!1));if("record"in P)return f(_(P,!1));if("generic"in P)return g(_(P,!1));if("literal"in P)return a(g(_(P.literal,!1)));if("constant"in P)return o(g(_(P.constant,!1)));if("dimension"in P)return g(_(P.dimension,!1));if("measure"in P)return m(_(P.measure,!1));if("sql_native"in P)return f({type:"sql native",rawType:P.sql_native});if("calculation"in P)return E(_(P.calculation,!1));throw new Error("Invalid function blueprint")}function T(P){return typeof P=="string"||"array"in P||"record"in P||"generic"in P||"literal"in P||"constant"in P||"dimension"in P||"measure"in P||"calculation"in P||"sql_native"in P}function b(P){return T(P)?[P]:Array.isArray(P)?P:T(P.variadic)?[P.variadic]:P.variadic}function D(P){if(typeof P=="string")return f({type:P});if("generic"in P)return f(_(P));if("literal"in P)return a(c(_(P.literal)));if("constant"in P)return o(c(_(P.constant)));if("dimension"in P)return c(_(P.dimension));if("measure"in P)return x(_(P.measure));if("array"in P)return f(_(P,!1));if("record"in P)return f(_(P,!1));if("sql_native"in P)return f({type:"sql native",rawType:P.sql_native});if("calculation"in P)return h(_(P.calculation));throw new Error("Invalid function blueprint")}function C(P){return P.map(V=>D(V))}function w(P){return typeof P!="string"&&"variadic"in P}function R(P,V){return{name:P,allowedTypes:C(b(V)),isVariadic:w(V)}}function O(P){return Object.entries(P).map(Z=>R(Z[0],Z[1]))}function I(P){const V=[],Z=[];let ae=P;for(;ae.length>0;){const le=ae.indexOf("${");if(le===-1){V.push(ae);break}const se=ae.slice(0,le);ae=ae.slice(le);const xe=ae.indexOf("}");if(xe===-1){V.push(se+ae);break}const pe=ae.slice(2,xe);ae=ae.slice(xe+1);const ye=pe.startsWith("..."),Ce=pe.endsWith(":"),me=ye?pe.slice(3):Ce?pe.slice(0,-1):pe,_e={node:"function_parameter",name:me};V.push(se),ye?Z.push({node:"spread",e:_e,prefix:"",suffix:""}):Ce&&me==="order_by"?Z.push({node:"aggregate_order_by"}):Ce&&me==="limit"?Z.push({node:"aggregate_limit"}):Z.push(_e)}return{node:"genericSQLExpr",kids:{args:Z},src:V}}function k(P,V){return w(V)?{node:"spread",e:{node:"function_parameter",name:P},prefix:"",suffix:""}:{node:"function_parameter",name:P}}function $(P,V){const Z=Object.entries(V.takes),ae=Z.length>0?Z.length-1:0;return{node:"genericSQLExpr",kids:{args:Z.map(ce=>k(ce[0],ce[1]))},src:[`${P}(`,...Array(ae).fill(","),")"]}}function Y(P){return"sql"in P.impl?I(P.impl.sql):"expr"in P.impl?P.impl.expr:$(P.impl.function,P)}function ne(P){return{e:Y(P),between:P.impl.between,needsWindowOrderBy:P.impl.needsWindowOrderBy,defaultOrderByArgIndex:P.impl.defaultOrderByArgIndex}}function re(P){if(P!==void 0)return Object.entries(P).map(([V,Z])=>({name:V,acceptibleTypes:Z.map(ae=>_(ae,!0,!1))}))}function oe(P){return{returnType:S(P.returns),params:O(P.takes),isSymmetric:P.isSymmetric,supportsOrderBy:P.supportsOrderBy,supportsLimit:P.supportsLimit,genericTypes:re(P.generic),...ne(P)}}function U(P){return"takes"in P&&"returns"in P&&"impl"in P}function ee(P){return"function"in P||"sql"in P||"expr"in P}function J(P){return U(P)?[oe(P)]:Object.values(P).flatMap(V=>oe(V))}function te(P){const V={};for(const Z in P)V[Z]=J(P[Z]);return V}function q(P,V){return[oe({...P,impl:V})]}function H(P,V,Z){if(ee(Z)){if(!U(V))throw new Error(`Malformed function override: ${P}. Attempt to override multiple overloads with a single overload (missing: ${Object.keys(V)})`);return q(V,Z)}else{if(U(V))throw new Error(`Malformed function override: ${P}. Attempt to override a single overload with multiple overloads (extraneous: ${Object.keys(Z)})`);return Object.entries(Z).flatMap(([ae,ce])=>{const le=V[ae];if(le===void 0)throw new Error(`Malformed function override: ${P}. No overload named ${ae}`);return q(le,ce)})}}function Q(P,V){const Z={};for(const ae in V){if(!(ae in P))throw new Error(`Malformed function override: ${ae}. No such function in Malloy standard`);Z[ae]=H(ae,P[ae],V[ae])}return Z}function*M(P){if(typeof P!="string"){if("generic"in P)yield P;else if("record"in P)for(const V of Object.values(P.record))yield*M(V);else for(const V of["array","literal","measure","dimension","measure","constant","cacluation"])if(V in P){yield*M(P[V]);return}}}function j(P,V,Z,ae={}){let ce=!1;const le={};for(const xe of Object.values(V))for(const pe of M(xe))le[pe.generic]=["any"],ce=!0;ce&&ae.generic===void 0&&(ae.generic=le);const se={takes:V,returns:Z,impl:{function:P.toUpperCase()},...ae};return{[P]:se}}return fr}var X3={},Rx={},ER;function fA(){if(ER)return Rx;ER=1,Object.defineProperty(Rx,"__esModule",{value:!0}),Rx.decodeDottedTablePath=e,Rx.validateDottedTablePath=t;function e(o,s){const{quoteChar:a,escapeStyle:l,bareIdentRegex:u,dialectName:d}=s;if(o.length===0)return{ok:!1,error:`${d} table path is empty`};const c=[];let x=0;for(;;){let f,p;if(o[x]===a){const h=r(o,x,a,l);if(h===null)return{ok:!1,error:`Invalid ${d} table path: ${JSON.stringify(o)} — unterminated quoted segment`};f=h.decoded,p=!0,x=h.end}else{const h=o.slice(x).match(u);if(!h||h.index!==0||h[0].length===0)return{ok:!1,error:`Invalid ${d} table path: ${JSON.stringify(o)} — invalid segment at position ${x}`};f=h[0],p=!1,x+=h[0].length}if(f.includes(";")||f.includes("--"))return{ok:!1,error:`Invalid ${d} table path: segment ${JSON.stringify(f)} contains forbidden character; even when quoted, table-path segments may not contain \`;\` or \`--\`.`};if(c.push({value:f,quoted:p}),x===o.length)return{ok:!0,segments:c};if(o[x]!==".")return{ok:!1,error:`Invalid ${d} table path: ${JSON.stringify(o)} — expected '.' at position ${x}`};if(x++,x===o.length)return{ok:!1,error:`Invalid ${d} table path: ${JSON.stringify(o)} — trailing dot`}}}function t(o,s){const a=e(o,s);return a.ok?{ok:!0,canonical:o}:a}function r(o,s,a,l){let u=s+1,d="";for(;u<o.length;){if(l==="backslash"&&o[u]==="\\"){if(u+1>=o.length)return null;d+=i(o[u+1]),u+=2;continue}if(o[u]===a){if(l==="doubled"&&o[u+1]===a){d+=a,u+=2;continue}return{decoded:d,end:u+1}}d+=o[u],u++}return null}function i(o){switch(o){case"n":return`
|
|
2
2
|
`;case"t":return" ";case"r":return"\r";default:return o}}return Rx}var vR;function Vs(){return vR||(vR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Dialect=e.dayIndex=e.EscapeStyle=e.MAX_DECIMAL38=e.MIN_DECIMAL38=e.MAX_INT128=e.MIN_INT128=e.MAX_INT64=e.MIN_INT64=e.MAX_INT32=e.MIN_INT32=void 0,e.inDays=o,e.qtz=s,e.turtleGroupSetCondition=a;const t=Ge(),r=fA();e.MIN_INT32=-2147483648,e.MAX_INT32=2147483647,e.MIN_INT64=BigInt("-9223372036854775808"),e.MAX_INT64=BigInt("9223372036854775807"),e.MIN_INT128=BigInt("-170141183460469231731687303715884105728"),e.MAX_INT128=BigInt("170141183460469231731687303715884105727"),e.MIN_DECIMAL38=BigInt("-99999999999999999999999999999999999999"),e.MAX_DECIMAL38=BigInt("99999999999999999999999999999999999999"),e.EscapeStyle={Doubled:"doubled",Backslash:"backslash",Unset:"unset"};const i=["microsecond","millisecond","second","minute","hour","day","week","month","quarter","year"];e.dayIndex=i.indexOf("day");function o(u){return i.indexOf(u)>=e.dayIndex}function s(u){const d=u.queryTimezone;if(!(d===void 0||d===u.systemTimezone))return d}function a(u,d){return u===void 0?d:d?`group_set=${u} AND ${d}`:`group_set=${u}`}class l{constructor(){this.cantPartitionWindowFunctionsOnExpressions=!1,this.supportsPipelinesInViews=!0,this.supportsNestedProjectionLimit=!1,this.supportsArraysInData=!0,this.hasTimestamptz=!1,this.readsNestedData=!0,this.orderByClause="ordinal",this.nullMatchesFunctionSignature=!0,this.supportsSelectReplace=!0,this.supportsBigIntPrecision=!0,this.supportsComplexFilteredSources=!0,this.supportsTempTables=!0,this.maxIdentifierLength=128,this.hasModOperator=!0,this.supportsLeftJoinUnnest=!0,this.requiresExplicitUnnestOrdering=!1,this.hasLateralColumnAliasInSelect=!1,this.supportsCountApprox=!1,this.supportsHyperLogLog=!1,this.supportsFullJoin=!0,this.nestedArrays=!0,this.compoundObjectInSchema=!0,this.booleanType="supported",this.likeEscape=!0,this.integerTypeMappings=[{min:BigInt(e.MIN_INT32),max:BigInt(e.MAX_INT32),numberType:"integer"},{min:e.MIN_INT64,max:e.MAX_INT64,numberType:"bigint"}],this.tablePathBareIdentRegex=/^[A-Za-z_][A-Za-z0-9_]*/,this.identifierQuoteChar="",this.stringLiteralStyle=e.EscapeStyle.Unset,this.identifierEscapeStyle=e.EscapeStyle.Unset}sqlLateralJoinBag(d){throw this.cantPartitionWindowFunctionsOnExpressions?new Error(`Dialect '${this.name}' sets cantPartitionWindowFunctionsOnExpressions but does not implement sqlLateralJoinBag`):new Error("Internal error: sqlLateralJoinBag called but cantPartitionWindowFunctionsOnExpressions is false")}literalNumberType(d){if(!/^-?\d+$/.test(d))return{type:"number",numberType:"float"};const x=BigInt(d);for(const f of this.integerTypeMappings)if(x>=f.min&&x<=f.max)return{type:"number",numberType:f.numberType};return{type:"number",numberType:"bigint"}}static makeTimeLiteralNode(d,c,x,f,p){var h;const g=(h=d?.hasTimestamptz)!==null&&h!==void 0?h:!1;return p==="date"?{node:"dateLiteral",literal:c,typeDef:{type:"date",timeframe:f!==void 0&&(0,t.isDateUnit)(f)?f:void 0}}:x&&g?{node:"timestamptzLiteral",literal:c,typeDef:{type:"timestamptz",timeframe:f},timezone:x}:x?{node:"timestampLiteral",literal:c,typeDef:{type:"timestamp",timeframe:f},timezone:x}:{node:"timestampLiteral",literal:c,typeDef:{type:"timestamp",timeframe:f}}}sqlValidateTableName(d){if(this.identifierEscapeStyle!==e.EscapeStyle.Doubled&&this.identifierEscapeStyle!==e.EscapeStyle.Backslash)throw new Error(`${this.name}: sqlValidateTableName requires identifierEscapeStyle to be set to Doubled or Backslash (or override sqlValidateTableName).`);return(0,r.validateDottedTablePath)(d,{quoteChar:this.identifierQuoteChar,escapeStyle:this.identifierEscapeStyle,bareIdentRegex:this.tablePathBareIdentRegex,dialectName:this.name})}sqlTurtleOrderByClause(d){const c=d.map(x=>` ${x.field} ${x.dir.toUpperCase()}`);return" "+this.sqlOrderBy(c,"turtle")}sqlFinalStage(d,c){throw new Error("Dialect has no final Stage but called Anyway")}sqlDateToString(d){return this.castToString(`DATE(${d})`)}escapeBackslashStyle(d,c){let x="";for(const f of d)switch(f){case"\\":x+="\\\\";break;case`
|
|
3
3
|
`:x+="\\n";break;case"\r":x+="\\r";break;case" ":x+="\\t";break;case c:x+="\\"+c;break;default:x+=f}return x}sqlQuoteIdentifier(d){const c=this.identifierQuoteChar;if(!c)throw new Error(`${this.name}: identifierQuoteChar is not set. Set it on the dialect (e.g. '"' or "\`"), or override sqlQuoteIdentifier.`);if(this.identifierEscapeStyle===e.EscapeStyle.Doubled)return c+d.split(c).join(c+c)+c;if(this.identifierEscapeStyle===e.EscapeStyle.Backslash)return c+this.escapeBackslashStyle(d,c)+c;throw new Error(`${this.name}: identifierEscapeStyle is not set. Set it to EscapeStyle.Doubled or EscapeStyle.Backslash on the dialect, or override sqlQuoteIdentifier.`)}sqlLiteralNumber(d){return d}ignoreInProject(d){return!1}needsCivilTimeComputation(d,c,x,f){const p=["day","week","month","quarter","year"],h=c!==void 0&&p.includes(c),g=x!==void 0&&p.includes(x),m=s(f);return{needed:t.TD.isAnyTimestamp(d)&&(h||g)&&m!==void 0,tz:m}}sqlTruncAndOffset(d,c,x,f){if(t.TD.isAnyTimestamp(d.typeDef)){const{needed:h,tz:g}=this.needsCivilTimeComputation(d.typeDef,x,f?.unit,c);if(h&&g){const m=this.sqlConvertToCivilTime(d.sql,g,d.typeDef);let E=m.sql;const v=m.typeDef;return x&&(E=this.sqlTruncate(E,x,v,!0,g)),f&&(E=this.sqlOffsetTime(E,f.op,f.magnitude,f.unit,v,!0,g)),this.sqlConvertFromCivilTime(E,g,d.typeDef)}}let p=d.sql;return x&&(p=this.sqlTruncate(p,x,d.typeDef,!1,s(c))),f&&(p=this.sqlOffsetTime(p,f.op,f.magnitude,f.unit,d.typeDef,!1,s(c))),p}sqlLiteralString(d){if(this.stringLiteralStyle==="doubled")return"'"+d.split("'").join("''")+"'";if(this.stringLiteralStyle==="backslash")return"'"+this.escapeBackslashStyle(d,"'")+"'";throw new Error(`${this.name}: stringLiteralStyle is not set. Set it to EscapeStyle.Doubled or EscapeStyle.Backslash on the dialect, or override sqlLiteralString.`)}sqlLiteralRegexp(d){return this.sqlLiteralString(d)}exprToSQL(d,c){switch(c.node){case"now":return this.sqlNowExpr();case"timeDiff":return this.sqlMeasureTimeExpr(c);case"delta":{const x=c.kids.base;return x.node==="trunc"?this.sqlTruncAndOffset(x.e,d,x.units,{op:c.op,magnitude:c.kids.delta.sql,unit:c.units}):this.sqlTruncAndOffset(x,d,void 0,{op:c.op,magnitude:c.kids.delta.sql,unit:c.units})}case"trunc":return this.sqlTruncAndOffset(c.e,d,c.units);case"extract":return this.sqlTimeExtractExpr(d,c);case"cast":return this.sqlCast(d,c);case"regexpMatch":return this.sqlRegexpMatch(c);case"/":return this.divisionIsInteger?`${c.kids.left.sql}*1.0/${c.kids.right.sql}`:void 0;case"%":return this.hasModOperator?void 0:`MOD(${c.kids.left.sql},${c.kids.right.sql})`;case"dateLiteral":return this.sqlDateLiteral(d,c.literal);case"timestampLiteral":return this.sqlTimestampLiteral(d,c.literal,c.timezone);case"timestamptzLiteral":return this.sqlTimestamptzLiteral(d,c.literal,c.timezone);case"stringLiteral":return this.sqlLiteralString(c.literal);case"numberLiteral":return this.sqlLiteralNumber(c.literal);case"regexpLiteral":return this.sqlLiteralRegexp(c.literal);case"recordLiteral":return this.sqlLiteralRecord(c);case"arrayLiteral":return this.sqlLiteralArray(c)}}sqlSumDistinct(d,c,x){return"sqlSumDistinct called but not implemented"}sqlAggDistinct(d,c,x){return"sqlAggDistinct called but not implemented"}sqlSampleTable(d,c){if(c!==void 0)throw new Error(`Sampling is not supported on dialect ${this.name}.`);return d}sqlOrderBy(d,c){return`ORDER BY ${d.join(",")}`}sqlTzStr(d){return`"${d.queryTimezone}"`}sqlMakeUnnestKey(d,c){return this.concat(d,"'x'",c)}sqlStringAggDistinct(d,c,x){const f="__STRING_AGG_KS__",p="__STRING_AGG_KE__";return`REGEXP_REPLACE(
|
|
4
4
|
STRING_AGG(DISTINCT ${`concat('${f}', ${d}, '${p}', ${c})`}${x.length>0?","+x:""}),
|
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-B_jKMR35.js"></script>
|
|
15
15
|
<link rel="stylesheet" crossorigin href="/assets/index-5eLCcNmP.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
@@ -11891,6 +11891,24 @@ function parsePackageScope(raw) {
|
|
|
11891
11891
|
}
|
|
11892
11892
|
throw new Error(`Invalid "scope" in the package manifest: ${JSON.stringify(raw)}. ` + `Expected "version" or "package" (default "package").`);
|
|
11893
11893
|
}
|
|
11894
|
+
function resolvePackageScope(rootRaw, materializationRaw) {
|
|
11895
|
+
const envelopeRaw = materializationRaw && typeof materializationRaw === "object" ? materializationRaw.scope : undefined;
|
|
11896
|
+
const rootDeclared = rootRaw !== undefined && rootRaw !== null;
|
|
11897
|
+
const envelopeDeclared = envelopeRaw !== undefined && envelopeRaw !== null;
|
|
11898
|
+
const rootScope = parsePackageScope(rootRaw);
|
|
11899
|
+
const envelopeScope = parsePackageScope(envelopeRaw);
|
|
11900
|
+
if (rootDeclared && envelopeDeclared) {
|
|
11901
|
+
if (rootScope !== envelopeScope) {
|
|
11902
|
+
throw new Error(`Conflicting "scope" in publisher.json: root "${rootScope}" vs ` + `"materialization.scope" "${envelopeScope}". The package cannot ` + `load until they agree. Edit "materialization": { "scope": ... } ` + `to the value you want and delete the root-level "scope" (the ` + `server rewrites both homes on its next manifest write).`);
|
|
11903
|
+
}
|
|
11904
|
+
return { scope: envelopeScope, warnings: [] };
|
|
11905
|
+
}
|
|
11906
|
+
if (rootDeclared) {
|
|
11907
|
+
return { scope: rootScope, warnings: [SCOPE_ROOT_DEPRECATION] };
|
|
11908
|
+
}
|
|
11909
|
+
return { scope: envelopeScope, warnings: [] };
|
|
11910
|
+
}
|
|
11911
|
+
var SCOPE_ROOT_DEPRECATION = `"scope" at the manifest root is deprecated: declare it as ` + `"materialization": { "scope": ... } alongside the other build knobs. The ` + `root form still works and will be removed in a future release; until then ` + `the server keeps both homes in sync when it writes the manifest, so an ` + `older publisher still reads the right value.`;
|
|
11894
11912
|
function parseFreshness(raw) {
|
|
11895
11913
|
if (!raw || typeof raw !== "object") {
|
|
11896
11914
|
return null;
|
|
@@ -11905,16 +11923,42 @@ function parseFreshness(raw) {
|
|
|
11905
11923
|
}
|
|
11906
11924
|
return freshness;
|
|
11907
11925
|
}
|
|
11926
|
+
function parseQueryMetadata(raw) {
|
|
11927
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
11928
|
+
return { metadata: null, warnings: [] };
|
|
11929
|
+
}
|
|
11930
|
+
const out = {};
|
|
11931
|
+
const warnings = [];
|
|
11932
|
+
for (const [name, value] of Object.entries(raw)) {
|
|
11933
|
+
if (typeof value === "string") {
|
|
11934
|
+
out[name] = value;
|
|
11935
|
+
} else {
|
|
11936
|
+
warnings.push(`materialization.queryMetadata: property '${name}' must be a ` + `string (got ${value === null ? "null" : typeof value}); it is ` + `not attached to any statement`);
|
|
11937
|
+
}
|
|
11938
|
+
}
|
|
11939
|
+
return {
|
|
11940
|
+
metadata: Object.keys(out).length > 0 ? out : null,
|
|
11941
|
+
warnings
|
|
11942
|
+
};
|
|
11943
|
+
}
|
|
11908
11944
|
function parsePackageMaterialization(raw) {
|
|
11909
11945
|
if (!raw || typeof raw !== "object") {
|
|
11910
11946
|
return null;
|
|
11911
11947
|
}
|
|
11912
|
-
const { schedule, freshness } = raw;
|
|
11948
|
+
const { schedule, freshness, queryMetadata } = raw;
|
|
11913
11949
|
return {
|
|
11914
11950
|
schedule: typeof schedule === "string" ? schedule : null,
|
|
11915
|
-
freshness: parseFreshness(freshness)
|
|
11951
|
+
freshness: parseFreshness(freshness),
|
|
11952
|
+
queryMetadata: parseQueryMetadata(queryMetadata).metadata
|
|
11916
11953
|
};
|
|
11917
11954
|
}
|
|
11955
|
+
function packageMaterializationWarnings(raw) {
|
|
11956
|
+
if (!raw || typeof raw !== "object") {
|
|
11957
|
+
return [];
|
|
11958
|
+
}
|
|
11959
|
+
const { queryMetadata } = raw;
|
|
11960
|
+
return parseQueryMetadata(queryMetadata).warnings;
|
|
11961
|
+
}
|
|
11918
11962
|
|
|
11919
11963
|
// src/service/source_extraction.ts
|
|
11920
11964
|
import {
|
|
@@ -12487,6 +12531,11 @@ async function readPackageMetadata(packagePath) {
|
|
|
12487
12531
|
const manifestPath = path2.join(packagePath, PACKAGE_MANIFEST_NAME);
|
|
12488
12532
|
const contents = await fs2.promises.readFile(manifestPath, "utf8");
|
|
12489
12533
|
const parsed = JSON.parse(contents);
|
|
12534
|
+
const scope = resolvePackageScope(parsed.scope, parsed.materialization);
|
|
12535
|
+
const manifestWarnings = [
|
|
12536
|
+
...scope.warnings,
|
|
12537
|
+
...packageMaterializationWarnings(parsed.materialization)
|
|
12538
|
+
];
|
|
12490
12539
|
return {
|
|
12491
12540
|
name: parsed.name,
|
|
12492
12541
|
description: parsed.description,
|
|
@@ -12494,7 +12543,8 @@ async function readPackageMetadata(packagePath) {
|
|
|
12494
12543
|
queryableSources: parsed.queryableSources === "all" ? "all" : "declared",
|
|
12495
12544
|
manifestLocation: typeof parsed.manifestLocation === "string" ? parsed.manifestLocation : null,
|
|
12496
12545
|
materialization: parsePackageMaterialization(parsed.materialization),
|
|
12497
|
-
scope:
|
|
12546
|
+
scope: scope.scope,
|
|
12547
|
+
manifestWarnings: manifestWarnings.length > 0 ? manifestWarnings : undefined
|
|
12498
12548
|
};
|
|
12499
12549
|
}
|
|
12500
12550
|
async function listPackageFiles(packagePath) {
|