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Q,a,UCAzBF,EAAOC,QAAUC,QAAQ,O,UCAzBF,EAAOC,QAAUC,QAAQ,O,UCAzBF,EAAOC,QAAUC,QAAQ,O,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBrN,IAAjBsN,EACH,OAAOA,EAAaL,QAGrB,IAAID,EAASG,EAAyBE,GAAY,CAGjDJ,QAAS,CAAC,GAOX,OAHAM,EAAoBF,GAAUG,KAAKR,EAAOC,QAASD,EAAQA,EAAOC,QAASG,GAGpEJ,EAAOC,OACf,C,uFClBA,eACA,SACA,QAEA,MAAMQ,EAAN,cACI,KAAA3S,KAAO,mBACP,KAAAoG,QAAU,EAAAA,OAId,CAHIwM,mBAAmBhP,GACf,OAAO,IAAI,EAAAiP,gBAAgBjP,EAC/B,EAGJ,oBACI,IAAAkP,qBAAoB,IAAIH,EAC5B,C","sources":["webpack://@azure/functions/./src/Context.ts","webpack://@azure/functions/./src/FunctionInfo.ts","webpack://@azure/functions/./src/InvocationModel.ts","webpack://@azure/functions/./src/constants.ts","webpack://@azure/functions/./src/converters/BindingConverters.ts","webpack://@azure/functions/./src/converters/RpcConverters.ts","webpack://@azure/functions/./src/converters/RpcHttpConverters.ts","webpack://@azure/functions/./src/errors.ts","webpack://@azure/functions/./src/http/Request.ts","webpack://@azure/functions/./src/http/Response.ts","webpack://@azure/functions/./src/http/extractHttpUserFromHeaders.ts","webpack://@azure/functions/./src/parsers/parseForm.ts","webpack://@azure/functions/./src/parsers/parseHeader.ts","webpack://@azure/functions/./src/parsers/parseMultipartForm.ts","webpack://@azure/functions/external commonjs2 \"@azure/functions-core\"","webpack://@azure/functions/external commonjs2 \"events\"","webpack://@azure/functions/external commonjs2 \"iconv-lite\"","webpack://@azure/functions/external commonjs2 \"long\"","webpack://@azure/functions/external commonjs2 \"util\"","webpack://@azure/functions/external commonjs2 \"uuid\"","webpack://@azure/functions/webpack/bootstrap","webpack://@azure/functions/./src/index.ts"],"sourcesContent":["// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport {\r\n BindingDefinition,\r\n Context,\r\n ContextBindingData,\r\n ContextBindings,\r\n ExecutionContext,\r\n Logger,\r\n TraceContext,\r\n} from '@azure/functions';\r\nimport { RpcInvocationRequest, RpcLogLevel, RpcParameterBinding } from '@azure/functions-core';\r\nimport { v4 as uuid } from 'uuid';\r\nimport {\r\n convertKeysToCamelCase,\r\n getBindingDefinitions,\r\n getNormalizedBindingData,\r\n} from './converters/BindingConverters';\r\nimport { fromRpcTraceContext, fromTypedData } from './converters/RpcConverters';\r\nimport { FunctionInfo } from './FunctionInfo';\r\nimport { Request } from './http/Request';\r\nimport { Response } from './http/Response';\r\nimport EventEmitter = require('events');\r\n\r\nexport function CreateContextAndInputs(\r\n info: FunctionInfo,\r\n request: RpcInvocationRequest,\r\n userLogCallback: UserLogCallback,\r\n doneEmitter: EventEmitter\r\n) {\r\n const context = new InvocationContext(info, request, userLogCallback, doneEmitter);\r\n\r\n const bindings: ContextBindings = {};\r\n const inputs: any[] = [];\r\n let httpInput: Request | undefined;\r\n for (const binding of <RpcParameterBinding[]>request.inputData) {\r\n if (binding.data && binding.name) {\r\n let input;\r\n if (binding.data && binding.data.http) {\r\n input = httpInput = new Request(binding.data.http);\r\n } else {\r\n // TODO: Don't hard code fix for camelCase https://github.com/Azure/azure-functions-nodejs-worker/issues/188\r\n if (info.getTimerTriggerName() === binding.name) {\r\n // v2 worker converts timer trigger object to camelCase\r\n input = convertKeysToCamelCase(binding)['data'];\r\n } else {\r\n input = fromTypedData(binding.data);\r\n }\r\n }\r\n bindings[binding.name] = input;\r\n inputs.push(input);\r\n }\r\n }\r\n\r\n context.bindings = bindings;\r\n if (httpInput) {\r\n context.req = httpInput;\r\n context.res = new Response(context.done);\r\n // This is added for backwards compatability with what the host used to send to the worker\r\n context.bindingData.sys = {\r\n methodName: info.name,\r\n utcNow: new Date().toISOString(),\r\n randGuid: uuid(),\r\n };\r\n // Populate from HTTP request for backwards compatibility if missing\r\n if (!context.bindingData.query) {\r\n context.bindingData.query = Object.assign({}, httpInput.query);\r\n }\r\n if (!context.bindingData.headers) {\r\n context.bindingData.headers = Object.assign({}, httpInput.headers);\r\n }\r\n }\r\n return {\r\n context: <Context>context,\r\n inputs: inputs,\r\n };\r\n}\r\n\r\nclass InvocationContext implements Context {\r\n invocationId: string;\r\n executionContext: ExecutionContext;\r\n bindings: ContextBindings;\r\n bindingData: ContextBindingData;\r\n traceContext: TraceContext;\r\n bindingDefinitions: BindingDefinition[];\r\n log: Logger;\r\n req?: Request;\r\n res?: Response;\r\n done: DoneCallback;\r\n\r\n constructor(\r\n info: FunctionInfo,\r\n request: RpcInvocationRequest,\r\n userLogCallback: UserLogCallback,\r\n doneEmitter: EventEmitter\r\n ) {\r\n this.invocationId = <string>request.invocationId;\r\n this.traceContext = fromRpcTraceContext(request.traceContext);\r\n const executionContext = <ExecutionContext>{\r\n invocationId: this.invocationId,\r\n functionName: info.name,\r\n functionDirectory: info.directory,\r\n retryContext: request.retryContext,\r\n };\r\n this.executionContext = executionContext;\r\n this.bindings = {};\r\n\r\n // Log message that is tied to function invocation\r\n this.log = Object.assign((...args: any[]) => userLogCallback('information', ...args), {\r\n error: (...args: any[]) => userLogCallback('error', ...args),\r\n warn: (...args: any[]) => userLogCallback('warning', ...args),\r\n info: (...args: any[]) => userLogCallback('information', ...args),\r\n verbose: (...args: any[]) => userLogCallback('trace', ...args),\r\n });\r\n\r\n this.bindingData = getNormalizedBindingData(request);\r\n this.bindingDefinitions = getBindingDefinitions(info);\r\n\r\n this.done = (err?: unknown, result?: any) => {\r\n doneEmitter.emit('done', err, result);\r\n };\r\n }\r\n}\r\n\r\nexport interface InvocationResult {\r\n return: any;\r\n bindings: ContextBindings;\r\n}\r\n\r\nexport type DoneCallback = (err?: unknown, result?: any) => void;\r\n\r\nexport type UserLogCallback = (level: RpcLogLevel, ...args: any[]) => void;\r\n\r\nexport interface Dict<T> {\r\n [key: string]: T;\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { RpcBindingInfo, RpcFunctionMetadata, RpcTypedData } from '@azure/functions-core';\r\nimport { toTypedData } from './converters/RpcConverters';\r\nimport { toRpcHttp } from './converters/RpcHttpConverters';\r\n\r\nconst returnBindingKey = '$return';\r\n\r\nexport class FunctionInfo {\r\n name: string;\r\n directory: string;\r\n bindings: {\r\n [key: string]: RpcBindingInfo;\r\n };\r\n outputBindings: {\r\n [key: string]: RpcBindingInfo & { converter: (any) => RpcTypedData };\r\n };\r\n httpOutputName: string;\r\n hasHttpTrigger: boolean;\r\n\r\n constructor(metadata: RpcFunctionMetadata) {\r\n this.name = <string>metadata.name;\r\n this.directory = <string>metadata.directory;\r\n this.bindings = {};\r\n this.outputBindings = {};\r\n this.httpOutputName = '';\r\n this.hasHttpTrigger = false;\r\n\r\n if (metadata.bindings) {\r\n const bindings = (this.bindings = metadata.bindings);\r\n\r\n // determine output bindings & assign rpc converter (http has quirks)\r\n Object.keys(bindings)\r\n .filter((name) => bindings[name].direction !== 'in')\r\n .forEach((name) => {\r\n const type = bindings[name].type;\r\n if (type && type.toLowerCase() === 'http') {\r\n this.httpOutputName = name;\r\n this.outputBindings[name] = Object.assign(bindings[name], { converter: toRpcHttp });\r\n } else {\r\n this.outputBindings[name] = Object.assign(bindings[name], { converter: toTypedData });\r\n }\r\n });\r\n\r\n this.hasHttpTrigger =\r\n Object.keys(bindings).filter((name) => {\r\n const type = bindings[name].type;\r\n return type && type.toLowerCase() === 'httptrigger';\r\n }).length > 0;\r\n }\r\n }\r\n\r\n /**\r\n * Return output binding details on the special key \"$return\" output binding\r\n */\r\n getReturnBinding() {\r\n return this.outputBindings[returnBindingKey];\r\n }\r\n\r\n getTimerTriggerName(): string | undefined {\r\n for (const name in this.bindings) {\r\n const type = this.bindings[name].type;\r\n if (type && type.toLowerCase() === 'timertrigger') {\r\n return name;\r\n }\r\n }\r\n return;\r\n }\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { AzureFunction, Context } from '@azure/functions';\r\nimport * as coreTypes from '@azure/functions-core';\r\nimport {\r\n CoreInvocationContext,\r\n InvocationArguments,\r\n RpcInvocationResponse,\r\n RpcLogCategory,\r\n RpcLogLevel,\r\n RpcParameterBinding,\r\n} from '@azure/functions-core';\r\nimport { format } from 'util';\r\nimport { CreateContextAndInputs } from './Context';\r\nimport { toTypedData } from './converters/RpcConverters';\r\nimport { isError } from './errors';\r\nimport { FunctionInfo } from './FunctionInfo';\r\nimport EventEmitter = require('events');\r\n\r\nconst asyncDoneLearnMoreLink = 'https://go.microsoft.com/fwlink/?linkid=2097909';\r\n\r\nexport class InvocationModel implements coreTypes.InvocationModel {\r\n #doneEmitter: EventEmitter = new EventEmitter();\r\n #isDone = false;\r\n #resultIsPromise = false;\r\n #coreCtx: CoreInvocationContext;\r\n #funcInfo: FunctionInfo;\r\n\r\n constructor(coreCtx: CoreInvocationContext) {\r\n this.#coreCtx = coreCtx;\r\n this.#funcInfo = new FunctionInfo(coreCtx.metadata);\r\n }\r\n\r\n async getArguments(): Promise<InvocationArguments> {\r\n const { context, inputs } = CreateContextAndInputs(\r\n this.#funcInfo,\r\n this.#coreCtx.request,\r\n (level: RpcLogLevel, ...args: any[]) => this.#userLog(level, ...args),\r\n this.#doneEmitter\r\n );\r\n return { context, inputs };\r\n }\r\n\r\n async invokeFunction(context: Context, inputs: unknown[], functionCallback: AzureFunction): Promise<unknown> {\r\n const legacyDoneTask = new Promise((resolve, reject) => {\r\n this.#doneEmitter.on('done', (err?: unknown, result?: unknown) => {\r\n this.#onDone(context.suppressAsyncDoneError);\r\n if (isError(err)) {\r\n reject(err);\r\n } else {\r\n resolve(result);\r\n }\r\n });\r\n });\r\n\r\n try {\r\n let rawResult = functionCallback(context, ...inputs);\r\n this.#resultIsPromise = !!rawResult && typeof rawResult.then === 'function';\r\n let resultTask: Promise<any>;\r\n if (this.#resultIsPromise) {\r\n rawResult = Promise.resolve(rawResult).then((r) => {\r\n this.#onDone(context.suppressAsyncDoneError);\r\n return r;\r\n });\r\n resultTask = Promise.race([rawResult, legacyDoneTask]);\r\n } else {\r\n resultTask = legacyDoneTask;\r\n }\r\n\r\n return await resultTask;\r\n } finally {\r\n this.#isDone = true;\r\n }\r\n }\r\n\r\n async getResponse(context: Context, result: unknown): Promise<RpcInvocationResponse> {\r\n const response: RpcInvocationResponse = { invocationId: this.#coreCtx.invocationId };\r\n response.outputData = [];\r\n const info = this.#funcInfo;\r\n\r\n // Allow HTTP response from context.res if HTTP response is not defined from the context.bindings object\r\n if (info.httpOutputName && context.res && context.bindings[info.httpOutputName] === undefined) {\r\n context.bindings[info.httpOutputName] = context.res;\r\n }\r\n\r\n // As legacy behavior, falsy values get serialized to `null` in AzFunctions.\r\n // This breaks Durable Functions expectations, where customers expect any\r\n // JSON-serializable values to be preserved by the framework,\r\n // so we check if we're serializing for durable and, if so, ensure falsy\r\n // values get serialized.\r\n const isDurableBinding = info?.bindings?.name?.type == 'activityTrigger';\r\n\r\n const returnBinding = info.getReturnBinding();\r\n // Set results from return / context.done\r\n if (result || (isDurableBinding && result != null)) {\r\n // $return binding is found: return result data to $return binding\r\n if (returnBinding) {\r\n response.returnValue = returnBinding.converter(result);\r\n // $return binding is not found: read result as object of outputs\r\n } else if (typeof result === 'object') {\r\n response.outputData = Object.keys(info.outputBindings)\r\n .filter((key) => result[key] !== undefined)\r\n .map(\r\n (key) =>\r\n <RpcParameterBinding>{\r\n name: key,\r\n data: info.outputBindings[key].converter(result[key]),\r\n }\r\n );\r\n }\r\n // returned value does not match any output bindings (named or $return)\r\n // if not http, pass along value\r\n if (!response.returnValue && response.outputData.length == 0 && !info.hasHttpTrigger) {\r\n response.returnValue = toTypedData(result);\r\n }\r\n }\r\n // Set results from context.bindings\r\n if (context.bindings) {\r\n response.outputData = response.outputData.concat(\r\n Object.keys(info.outputBindings)\r\n // Data from return prioritized over data from context.bindings\r\n .filter((key) => {\r\n const definedInBindings: boolean = context.bindings[key] !== undefined;\r\n const hasReturnValue = !!result;\r\n const hasReturnBinding = !!returnBinding;\r\n const definedInReturn: boolean =\r\n hasReturnValue &&\r\n !hasReturnBinding &&\r\n typeof result === 'object' &&\r\n result[key] !== undefined;\r\n return definedInBindings && !definedInReturn;\r\n })\r\n .map(\r\n (key) =>\r\n <RpcParameterBinding>{\r\n name: key,\r\n data: info.outputBindings[key].converter(context.bindings[key]),\r\n }\r\n )\r\n );\r\n }\r\n return response;\r\n }\r\n\r\n #log(level: RpcLogLevel, logCategory: RpcLogCategory, ...args: any[]): void {\r\n this.#coreCtx.log(level, logCategory, format.apply(null, <[any, any[]]>args));\r\n }\r\n\r\n #systemLog(level: RpcLogLevel, ...args: any[]) {\r\n this.#log(level, 'system', ...args);\r\n }\r\n\r\n #userLog(level: RpcLogLevel, ...args: any[]): void {\r\n if (this.#isDone && this.#coreCtx.state !== 'postInvocationHooks') {\r\n let badAsyncMsg =\r\n \"Warning: Unexpected call to 'log' on the context object after function execution has completed. Please check for asynchronous calls that are not awaited or calls to 'done' made before function execution completes. \";\r\n badAsyncMsg += `Function name: ${this.#funcInfo.name}. Invocation Id: ${this.#coreCtx.invocationId}. `;\r\n badAsyncMsg += `Learn more: ${asyncDoneLearnMoreLink}`;\r\n this.#systemLog('warning', badAsyncMsg);\r\n }\r\n this.#log(level, 'user', ...args);\r\n }\r\n\r\n #onDone(suppressAsyncDoneError = false): void {\r\n if (this.#isDone) {\r\n if (this.#resultIsPromise && suppressAsyncDoneError) {\r\n return;\r\n }\r\n\r\n const message = this.#resultIsPromise\r\n ? `Error: Choose either to return a promise or call 'done'. Do not use both in your script. Learn more: ${asyncDoneLearnMoreLink}`\r\n : \"Error: 'done' has already been called. Please check your script for extraneous calls to 'done'.\";\r\n this.#systemLog('error', message);\r\n }\r\n this.#isDone = true;\r\n }\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nexport const version = '3.5.0';\r\n\r\nexport enum HeaderName {\r\n contentType = 'content-type',\r\n contentDisposition = 'content-disposition',\r\n}\r\n\r\nexport enum MediaType {\r\n multipartForm = 'multipart/form-data',\r\n multipartPrefix = 'multipart/',\r\n urlEncodedForm = 'application/x-www-form-urlencoded',\r\n octetStream = 'application/octet-stream',\r\n json = 'application/json',\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { BindingDefinition, ContextBindingData } from '@azure/functions';\r\nimport { RpcInvocationRequest } from '@azure/functions-core';\r\nimport { FunctionInfo } from '../FunctionInfo';\r\nimport { fromTypedData } from './RpcConverters';\r\n\r\nexport function getBindingDefinitions(info: FunctionInfo): BindingDefinition[] {\r\n const bindings = info.bindings;\r\n if (!bindings) {\r\n return [];\r\n }\r\n\r\n return Object.keys(bindings).map((name) => {\r\n return {\r\n name: name,\r\n type: bindings[name].type || '',\r\n direction: bindings[name].direction || undefined,\r\n };\r\n });\r\n}\r\n\r\nexport function getNormalizedBindingData(request: RpcInvocationRequest): ContextBindingData {\r\n const bindingData: ContextBindingData = {\r\n invocationId: <string>request.invocationId,\r\n };\r\n\r\n // node binding data is camel cased due to language convention\r\n if (request.triggerMetadata) {\r\n Object.assign(bindingData, convertKeysToCamelCase(request.triggerMetadata));\r\n }\r\n return bindingData;\r\n}\r\n\r\n// Recursively convert keys of objects to camel case\r\nexport function convertKeysToCamelCase(obj: any) {\r\n const output = {};\r\n for (const key in obj) {\r\n const camelCasedKey = key.charAt(0).toLocaleLowerCase() + key.slice(1);\r\n try {\r\n // Only \"undefined\" will be replaced with original object property. For example:\r\n //{ string : \"0\" } -> 0\r\n //{ string : \"false\" } -> false\r\n //\"test\" -> \"test\" (undefined returned from fromTypedData)\r\n const valueFromDataType = fromTypedData(obj[key]);\r\n const value = valueFromDataType === undefined ? obj[key] : valueFromDataType;\r\n // If the value is a JSON object (and not array and not http, which is already cased), convert keys to camel case\r\n if (!Array.isArray(value) && typeof value === 'object' && value && value.http == undefined) {\r\n output[camelCasedKey] = convertKeysToCamelCase(value);\r\n } else {\r\n output[camelCasedKey] = value;\r\n }\r\n } catch {\r\n // Just use the original value if we failed to recursively convert for any reason\r\n output[camelCasedKey] = obj[key];\r\n }\r\n }\r\n return output;\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { TraceContext } from '@azure/functions';\r\nimport {\r\n RpcNullableBool,\r\n RpcNullableDouble,\r\n RpcNullableString,\r\n RpcNullableTimestamp,\r\n RpcTraceContext,\r\n RpcTypedData,\r\n} from '@azure/functions-core';\r\nimport { isLong } from 'long';\r\nimport { AzFuncSystemError } from '../errors';\r\n\r\n/**\r\n * Converts 'ITypedData' input from the RPC layer to JavaScript types.\r\n * TypedData can be string, json, or bytes\r\n * @param typedData ITypedData object containing one of a string, json, or bytes property\r\n * @param convertStringToJson Optionally parse the string input type as JSON\r\n */\r\nexport function fromTypedData(typedData?: RpcTypedData | null, convertStringToJson = true) {\r\n typedData = typedData || {};\r\n let str = typedData.string || typedData.json;\r\n if (str !== undefined) {\r\n if (convertStringToJson) {\r\n try {\r\n if (str != null) {\r\n str = JSON.parse(str);\r\n }\r\n } catch (err) {}\r\n }\r\n return str;\r\n } else if (typedData.bytes) {\r\n return Buffer.from(<Buffer>typedData.bytes);\r\n } else if (typedData.collectionBytes && typedData.collectionBytes.bytes) {\r\n const byteCollection = typedData.collectionBytes.bytes;\r\n return byteCollection.map((element) => Buffer.from(<Buffer>element));\r\n } else if (typedData.collectionString && typedData.collectionString.string) {\r\n return typedData.collectionString.string;\r\n } else if (typedData.collectionDouble && typedData.collectionDouble.double) {\r\n return typedData.collectionDouble.double;\r\n } else if (typedData.collectionSint64 && typedData.collectionSint64.sint64) {\r\n const longCollection = typedData.collectionSint64.sint64;\r\n return longCollection.map((element) => (isLong(element) ? element.toString() : element));\r\n }\r\n}\r\n\r\n/**\r\n * Converts 'IRpcTraceContext' input from RPC layer to dictionary of key value pairs.\r\n * @param traceContext IRpcTraceContext object containing the activityId, tracestate and attributes.\r\n */\r\nexport function fromRpcTraceContext(traceContext: RpcTraceContext | null | undefined): TraceContext {\r\n if (traceContext) {\r\n return <TraceContext>{\r\n traceparent: traceContext.traceParent,\r\n tracestate: traceContext.traceState,\r\n attributes: traceContext.attributes,\r\n };\r\n }\r\n\r\n return <TraceContext>{};\r\n}\r\n\r\n/**\r\n * Converts JavaScript type data to 'ITypedData' to be sent through the RPC layer\r\n * TypedData can be string, json, or bytes\r\n * @param inputObject A JavaScript object that is a string, Buffer, ArrayBufferView, number, or object.\r\n */\r\nexport function toTypedData(inputObject): RpcTypedData {\r\n if (typeof inputObject === 'string') {\r\n return { string: inputObject };\r\n } else if (Buffer.isBuffer(inputObject)) {\r\n return { bytes: inputObject };\r\n } else if (ArrayBuffer.isView(inputObject)) {\r\n const bytes = new Uint8Array(inputObject.buffer, inputObject.byteOffset, inputObject.byteLength);\r\n return { bytes: bytes };\r\n } else if (typeof inputObject === 'number') {\r\n if (Number.isInteger(inputObject)) {\r\n return { int: inputObject };\r\n } else {\r\n return { double: inputObject };\r\n }\r\n } else {\r\n return { json: JSON.stringify(inputObject) };\r\n }\r\n}\r\n\r\n/**\r\n * Converts boolean input to an 'INullableBool' to be sent through the RPC layer.\r\n * Input that is not a boolean but is also not null or undefined logs a function app level warning.\r\n * @param nullable Input to be converted to an INullableBool if it is a valid boolean\r\n * @param propertyName The name of the property that the caller will assign the output to. Used for debugging.\r\n */\r\nexport function toNullableBool(nullable: boolean | undefined, propertyName: string): undefined | RpcNullableBool {\r\n if (typeof nullable === 'boolean') {\r\n return <RpcNullableBool>{\r\n value: nullable,\r\n };\r\n }\r\n\r\n if (nullable != null) {\r\n throw new AzFuncSystemError(\r\n `A 'boolean' type was expected instead of a '${typeof nullable}' type. Cannot parse value of '${propertyName}'.`\r\n );\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\n/**\r\n * Converts number or string that parses to a number to an 'INullableDouble' to be sent through the RPC layer.\r\n * Input that is not a valid number but is also not null or undefined logs a function app level warning.\r\n * @param nullable Input to be converted to an INullableDouble if it is a valid number\r\n * @param propertyName The name of the property that the caller will assign the output to. Used for debugging.\r\n */\r\nexport function toNullableDouble(\r\n nullable: number | string | undefined,\r\n propertyName: string\r\n): undefined | RpcNullableDouble {\r\n if (typeof nullable === 'number') {\r\n return <RpcNullableDouble>{\r\n value: nullable,\r\n };\r\n } else if (typeof nullable === 'string') {\r\n if (!isNaN(<any>nullable)) {\r\n const parsedNumber = parseFloat(nullable);\r\n return <RpcNullableDouble>{\r\n value: parsedNumber,\r\n };\r\n }\r\n }\r\n\r\n if (nullable != null) {\r\n throw new AzFuncSystemError(\r\n `A 'number' type was expected instead of a '${typeof nullable}' type. Cannot parse value of '${propertyName}'.`\r\n );\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\n/**\r\n * Converts string input to an 'INullableString' to be sent through the RPC layer.\r\n * Input that is not a string but is also not null or undefined logs a function app level warning.\r\n * @param nullable Input to be converted to an INullableString if it is a valid string\r\n * @param propertyName The name of the property that the caller will assign the output to. Used for debugging.\r\n */\r\nexport function toRpcString(nullable: string | undefined, propertyName: string): string {\r\n if (typeof nullable === 'string') {\r\n return nullable;\r\n }\r\n\r\n if (nullable != null) {\r\n throw new AzFuncSystemError(\r\n `A 'string' type was expected instead of a '${typeof nullable}' type. Cannot parse value of '${propertyName}'.`\r\n );\r\n }\r\n\r\n return '';\r\n}\r\n\r\n/**\r\n * Converts string input to an 'INullableString' to be sent through the RPC layer.\r\n * Input that is not a string but is also not null or undefined logs a function app level warning.\r\n * @param nullable Input to be converted to an INullableString if it is a valid string\r\n * @param propertyName The name of the property that the caller will assign the output to. Used for debugging.\r\n */\r\nexport function toNullableString(nullable: string | undefined, propertyName: string): undefined | RpcNullableString {\r\n if (typeof nullable === 'string') {\r\n return <RpcNullableString>{\r\n value: nullable,\r\n };\r\n }\r\n\r\n if (nullable != null) {\r\n throw new AzFuncSystemError(\r\n `A 'string' type was expected instead of a '${typeof nullable}' type. Cannot parse value of '${propertyName}'.`\r\n );\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\n/**\r\n * Converts Date or number input to an 'INullableTimestamp' to be sent through the RPC layer.\r\n * Input that is not a Date or number but is also not null or undefined logs a function app level warning.\r\n * @param nullable Input to be converted to an INullableTimestamp if it is valid input\r\n * @param propertyName The name of the property that the caller will assign the output to. Used for debugging.\r\n */\r\nexport function toNullableTimestamp(\r\n dateTime: Date | number | undefined,\r\n propertyName: string\r\n): RpcNullableTimestamp | undefined {\r\n if (dateTime != null) {\r\n try {\r\n const timeInMilliseconds = typeof dateTime === 'number' ? dateTime : dateTime.getTime();\r\n\r\n if (timeInMilliseconds && timeInMilliseconds >= 0) {\r\n return {\r\n value: {\r\n seconds: Math.round(timeInMilliseconds / 1000),\r\n },\r\n };\r\n }\r\n } catch {\r\n throw new AzFuncSystemError(\r\n `A 'number' or 'Date' input was expected instead of a '${typeof dateTime}'. Cannot parse value of '${propertyName}'.`\r\n );\r\n }\r\n }\r\n return undefined;\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { Cookie, HttpResponse } from '@azure/functions';\r\nimport {\r\n RpcHttpCookie,\r\n RpcHttpCookieSameSite,\r\n RpcHttpData,\r\n RpcNullableString,\r\n RpcTypedData,\r\n} from '@azure/functions-core';\r\nimport { Dict } from '../Context';\r\nimport { AzFuncSystemError } from '../errors';\r\nimport {\r\n fromTypedData,\r\n toNullableBool,\r\n toNullableDouble,\r\n toNullableString,\r\n toNullableTimestamp,\r\n toRpcString,\r\n toTypedData,\r\n} from './RpcConverters';\r\n\r\n/**\r\n * Converts the provided body from the RPC layer to the appropriate javascript object.\r\n * Body of type 'byte' is a special case and it's converted to it's utf-8 string representation.\r\n * This is to avoid breaking changes in v2.\r\n * @param body The body from the RPC layer.\r\n */\r\nexport function fromRpcHttpBody(body: RpcTypedData | null | undefined) {\r\n if (body && body.bytes) {\r\n return (<Buffer>body.bytes).toString();\r\n } else {\r\n return fromTypedData(body, false);\r\n }\r\n}\r\n\r\nexport function fromNullableMapping(\r\n nullableMapping: { [k: string]: RpcNullableString } | null | undefined,\r\n originalMapping?: { [k: string]: string } | null\r\n): Dict<string> {\r\n let converted = {};\r\n if (nullableMapping && Object.keys(nullableMapping).length > 0) {\r\n for (const key in nullableMapping) {\r\n converted[key] = nullableMapping[key].value || '';\r\n }\r\n } else if (originalMapping && Object.keys(originalMapping).length > 0) {\r\n converted = <Dict<string>>originalMapping;\r\n }\r\n return converted;\r\n}\r\n\r\n/**\r\n * Converts the HTTP 'Response' object to an 'ITypedData' 'http' type to be sent through the RPC layer.\r\n * 'http' types are a special case from other 'ITypedData' types, which come from primitive types.\r\n * @param inputMessage An HTTP response object\r\n */\r\nexport function toRpcHttp(data: unknown): RpcTypedData {\r\n // Check if we will fail to find any of these\r\n if (typeof data !== 'object' || Array.isArray(data)) {\r\n throw new AzFuncSystemError(\r\n \"The HTTP response must be an 'object' type that can include properties such as 'body', 'status', and 'headers'. Learn more: https://go.microsoft.com/fwlink/?linkid=2112563\"\r\n );\r\n }\r\n\r\n const inputMessage: HttpResponse = data || {};\r\n let status = inputMessage.statusCode;\r\n if (typeof inputMessage.status !== 'function') {\r\n status ||= inputMessage.status;\r\n }\r\n const httpMessage: RpcHttpData = {\r\n ...inputMessage,\r\n statusCode: status?.toString() || null,\r\n headers: toRpcHttpHeaders(inputMessage.headers),\r\n cookies: toRpcHttpCookieList(inputMessage.cookies || []),\r\n body: toTypedData(inputMessage.body),\r\n };\r\n\r\n return { http: httpMessage };\r\n}\r\n\r\n/**\r\n * Convert HTTP headers to a string/string mapping.\r\n * @param inputHeaders\r\n */\r\nfunction toRpcHttpHeaders(inputHeaders: RpcTypedData | undefined) {\r\n const rpcHttpHeaders: { [key: string]: string } = {};\r\n if (inputHeaders) {\r\n for (const key in inputHeaders) {\r\n if (inputHeaders[key] != null) {\r\n rpcHttpHeaders[key] = inputHeaders[key].toString();\r\n }\r\n }\r\n }\r\n return rpcHttpHeaders;\r\n}\r\n\r\n/**\r\n * Convert HTTP 'Cookie' array to an array of 'RpcHttpCookie' objects to be sent through the RPC layer\r\n * @param inputCookies array of 'Cookie' objects representing options for the 'Set-Cookie' response header\r\n */\r\nexport function toRpcHttpCookieList(inputCookies: Cookie[]): RpcHttpCookie[] {\r\n const rpcCookies: RpcHttpCookie[] = [];\r\n inputCookies.forEach((cookie) => {\r\n rpcCookies.push(toRpcHttpCookie(cookie));\r\n });\r\n\r\n return rpcCookies;\r\n}\r\n\r\n/**\r\n * From RFC specifications for 'Set-Cookie' response header: https://www.rfc-editor.org/rfc/rfc6265.txt\r\n * @param inputCookie\r\n */\r\nfunction toRpcHttpCookie(inputCookie: Cookie): RpcHttpCookie {\r\n // Resolve RpcHttpCookie.SameSite enum, a one-off\r\n let rpcSameSite: RpcHttpCookieSameSite = 'none';\r\n if (inputCookie && inputCookie.sameSite) {\r\n const sameSite = inputCookie.sameSite.toLocaleLowerCase();\r\n if (sameSite === 'lax') {\r\n rpcSameSite = 'lax';\r\n } else if (sameSite === 'strict') {\r\n rpcSameSite = 'strict';\r\n } else if (sameSite === 'none') {\r\n rpcSameSite = 'explicitNone';\r\n }\r\n }\r\n\r\n const rpcCookie: RpcHttpCookie = {\r\n name: inputCookie && toRpcString(inputCookie.name, 'cookie.name'),\r\n value: inputCookie && toRpcString(inputCookie.value, 'cookie.value'),\r\n domain: toNullableString(inputCookie && inputCookie.domain, 'cookie.domain'),\r\n path: toNullableString(inputCookie && inputCookie.path, 'cookie.path'),\r\n expires: toNullableTimestamp(inputCookie && inputCookie.expires, 'cookie.expires'),\r\n secure: toNullableBool(inputCookie && inputCookie.secure, 'cookie.secure'),\r\n httpOnly: toNullableBool(inputCookie && inputCookie.httpOnly, 'cookie.httpOnly'),\r\n sameSite: rpcSameSite,\r\n maxAge: toNullableDouble(inputCookie && inputCookie.maxAge, 'cookie.maxAge'),\r\n };\r\n\r\n return rpcCookie;\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nexport interface AzFuncError {\r\n /**\r\n * System errors can be tracked in our telemetry\r\n * User errors cannot be tracked in our telemetry because they could have user information (users can still track it themselves in their app insights resource)\r\n */\r\n isAzureFunctionsSystemError: boolean;\r\n}\r\n\r\nexport class AzFuncSystemError extends Error {\r\n isAzureFunctionsSystemError = true;\r\n}\r\n\r\nexport class AzFuncTypeError extends TypeError implements AzFuncError {\r\n isAzureFunctionsSystemError = true;\r\n}\r\n\r\nexport class AzFuncRangeError extends RangeError implements AzFuncError {\r\n isAzureFunctionsSystemError = true;\r\n}\r\n\r\nexport class ReadOnlyError extends AzFuncTypeError {\r\n constructor(propertyName: string) {\r\n super(`Cannot assign to read only property '${propertyName}'`);\r\n }\r\n}\r\n\r\nexport function ensureErrorType(err: unknown): Error & Partial<AzFuncError> {\r\n if (err instanceof Error) {\r\n return err;\r\n } else {\r\n let message: string;\r\n if (err === undefined || err === null) {\r\n message = 'Unknown error';\r\n } else if (typeof err === 'string') {\r\n message = err;\r\n } else if (typeof err === 'object') {\r\n message = JSON.stringify(err);\r\n } else {\r\n message = String(err);\r\n }\r\n return new Error(message);\r\n }\r\n}\r\n\r\n/**\r\n * This is mostly for callbacks where `null` or `undefined` indicates there is no error\r\n * By contrast, anything thrown/caught is assumed to be an error regardless of what it is\r\n */\r\nexport function isError(err: unknown): boolean {\r\n return err !== null && err !== undefined;\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport {\r\n Form,\r\n HttpMethod,\r\n HttpRequest,\r\n HttpRequestHeaders,\r\n HttpRequestParams,\r\n HttpRequestQuery,\r\n HttpRequestUser,\r\n} from '@azure/functions';\r\nimport { RpcHttpData, RpcTypedData } from '@azure/functions-core';\r\nimport { decode } from 'iconv-lite';\r\nimport { HeaderName, MediaType } from '../constants';\r\nimport { fromTypedData } from '../converters/RpcConverters';\r\nimport { fromNullableMapping, fromRpcHttpBody } from '../converters/RpcHttpConverters';\r\nimport { AzFuncSystemError } from '../errors';\r\nimport { parseForm } from '../parsers/parseForm';\r\nimport { extractHttpUserFromHeaders } from './extractHttpUserFromHeaders';\r\n\r\nexport class Request implements HttpRequest {\r\n method: HttpMethod | null;\r\n url: string;\r\n originalUrl: string;\r\n headers: HttpRequestHeaders;\r\n query: HttpRequestQuery;\r\n params: HttpRequestParams;\r\n body?: any;\r\n rawBody?: any;\r\n bufferBody?: Buffer;\r\n\r\n #cachedUser?: HttpRequestUser | null;\r\n\r\n constructor(rpcHttp: RpcHttpData) {\r\n this.method = <HttpMethod>rpcHttp.method;\r\n this.url = <string>rpcHttp.url;\r\n this.originalUrl = <string>rpcHttp.url;\r\n this.headers = fromNullableMapping(rpcHttp.nullableHeaders, rpcHttp.headers);\r\n this.query = fromNullableMapping(rpcHttp.nullableQuery, rpcHttp.query);\r\n this.params = fromNullableMapping(rpcHttp.nullableParams, rpcHttp.params);\r\n\r\n if (rpcHttp.body?.bytes) {\r\n this.bufferBody = Buffer.from(rpcHttp.body.bytes);\r\n // We turned on the worker capability to always receive bytes instead of a string (RawHttpBodyBytes) so that we could introduce the `bufferBody` property\r\n // However, we need to replicate the old host behavior for the `body` and `rawBody` properties so that we don't break anyone\r\n // https://github.com/Azure/azure-functions-nodejs-worker/issues/294\r\n // NOTE: The tests for this are in the e2e test folder of the worker. This is so we can test the full .net host behavior of encoding/parsing/etc.\r\n // https://github.com/Azure/azure-functions-nodejs-worker/blob/b109082f9b85b42af1de00db4192483460214d81/test/end-to-end/Azure.Functions.NodejsWorker.E2E/Azure.Functions.NodejsWorker.E2E/HttpEndToEndTests.cs\r\n\r\n const contentType = this.get(HeaderName.contentType)?.toLowerCase();\r\n let legacyBody: RpcTypedData | undefined | null;\r\n if (contentType === MediaType.octetStream || contentType?.startsWith(MediaType.multipartPrefix)) {\r\n // If the content type was octet or multipart, the host would leave the body as bytes\r\n // https://github.com/Azure/azure-functions-host/blob/9ac904e34b744d95a6f746921556235d4b2b3f0f/src/WebJobs.Script.Grpc/MessageExtensions/GrpcMessageConversionExtensions.cs#L233\r\n legacyBody = rpcHttp.body;\r\n } else {\r\n // Otherwise the host would decode the buffer to a string\r\n legacyBody = {\r\n string: decodeBuffer(this.bufferBody),\r\n };\r\n }\r\n\r\n this.body = fromTypedData(legacyBody);\r\n this.rawBody = fromRpcHttpBody(legacyBody);\r\n }\r\n }\r\n\r\n get user(): HttpRequestUser | null {\r\n if (this.#cachedUser === undefined) {\r\n this.#cachedUser = extractHttpUserFromHeaders(this.headers);\r\n }\r\n\r\n return this.#cachedUser;\r\n }\r\n\r\n get(field: string): string | undefined {\r\n return this.headers && this.headers[field.toLowerCase()];\r\n }\r\n\r\n parseFormBody(): Form {\r\n const contentType = this.get(HeaderName.contentType);\r\n if (!contentType) {\r\n throw new AzFuncSystemError(`\"${HeaderName.contentType}\" header must be defined.`);\r\n } else {\r\n return parseForm(this.body, contentType);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * The host used utf8 by default, but supported `detectEncodingFromByteOrderMarks` so we have to replicate that\r\n * Host code: https://github.com/Azure/azure-webjobs-sdk-extensions/blob/03cb2ce82db74ed5a2f3299e8a84a6c35835c269/src/WebJobs.Extensions.Http/Extensions/HttpRequestExtensions.cs#L27\r\n * .NET code: https://github.com/dotnet/runtime/blob/e55c908229e36f99a52745d4ee85316a0e8bb6a2/src/libraries/System.Private.CoreLib/src/System/IO/StreamReader.cs#L469\r\n * .NET description of encoding preambles: https://docs.microsoft.com/en-us/dotnet/api/system.text.encoding.getpreamble?view=net-6.0#remarks\r\n **/\r\nfunction decodeBuffer(buffer: Buffer): string | undefined {\r\n let encoding = 'utf8';\r\n if (buffer[0] === 0xfe && buffer[1] === 0xff) {\r\n encoding = 'utf16be'; // The same as `Encoding.BigEndianUnicode` in .NET\r\n buffer = compressBuffer(buffer, 2);\r\n } else if (buffer[0] === 0xff && buffer[1] === 0xfe) {\r\n if (buffer[2] !== 0 || buffer[3] !== 0) {\r\n encoding = 'utf16le'; // The same as `Encoding.Unicode` in .NET\r\n buffer = compressBuffer(buffer, 2);\r\n } else {\r\n encoding = 'utf32le';\r\n buffer = compressBuffer(buffer, 4);\r\n }\r\n } else if (buffer[0] === 0xef && buffer[1] === 0xbb && buffer[2] === 0xbf) {\r\n encoding = 'utf8';\r\n buffer = compressBuffer(buffer, 3);\r\n } else if (buffer[0] === 0 && buffer[1] === 0 && buffer[2] === 0xfe && buffer[3] === 0xff) {\r\n encoding = 'utf32be';\r\n buffer = compressBuffer(buffer, 4);\r\n }\r\n\r\n // NOTE: Node.js doesn't support all the above encodings by default, so we have to use \"iconv-lite\" to help\r\n // Here are the iconv-lite supported encodings: https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings\r\n return decode(buffer, encoding);\r\n}\r\n\r\nfunction compressBuffer(buffer: Buffer, n: number): Buffer {\r\n return buffer.subarray(n);\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { Cookie, HttpResponseFull } from '@azure/functions';\r\nimport { HeaderName, MediaType } from '../constants';\r\n\r\nexport class Response implements HttpResponseFull {\r\n statusCode?: string | number;\r\n headers: { [key: string]: any } = {};\r\n cookies: Cookie[] = [];\r\n body?: any;\r\n enableContentNegotiation?: boolean;\r\n [key: string]: any;\r\n\r\n // NOTE: This is considered private and people should not be referencing it, but for the sake of backwards compatibility we will avoid using `#`\r\n _done: Function;\r\n\r\n constructor(done: Function) {\r\n this._done = done;\r\n }\r\n\r\n end(body?: any) {\r\n if (body !== undefined) {\r\n this.body = body;\r\n }\r\n this.setContentType();\r\n this._done();\r\n return this;\r\n }\r\n\r\n setHeader(field: string, val: any): HttpResponseFull {\r\n this.headers[field.toLowerCase()] = val;\r\n return this;\r\n }\r\n\r\n getHeader(field: string): any {\r\n return this.headers[field.toLowerCase()];\r\n }\r\n\r\n removeHeader(field: string) {\r\n delete this.headers[field.toLowerCase()];\r\n return this;\r\n }\r\n\r\n status(statusCode: string | number): HttpResponseFull {\r\n this.statusCode = statusCode;\r\n return this;\r\n }\r\n\r\n sendStatus(statusCode: string | number) {\r\n this.status(statusCode);\r\n // eslint-disable-next-line deprecation/deprecation\r\n return this.end();\r\n }\r\n\r\n type(type) {\r\n return this.set(HeaderName.contentType, type);\r\n }\r\n\r\n json(body) {\r\n this.type(MediaType.json);\r\n // eslint-disable-next-line deprecation/deprecation\r\n this.send(body);\r\n return;\r\n }\r\n\r\n send = this.end;\r\n header = this.setHeader;\r\n set = this.setHeader;\r\n get = this.getHeader;\r\n\r\n // NOTE: This is considered private and people should not be referencing it, but for the sake of backwards compatibility we will avoid using `#`\r\n setContentType() {\r\n if (this.body !== undefined) {\r\n if (this.get(HeaderName.contentType)) {\r\n // use user defined content type, if exists\r\n return;\r\n }\r\n\r\n if (Buffer.isBuffer(this.body)) {\r\n this.type(MediaType.octetStream);\r\n }\r\n }\r\n }\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { HttpRequestHeaders, HttpRequestUser } from '@azure/functions';\r\n\r\nexport function extractHttpUserFromHeaders(headers: HttpRequestHeaders): HttpRequestUser | null {\r\n let user: HttpRequestUser | null = null;\r\n\r\n if (headers['x-ms-client-principal']) {\r\n const claimsPrincipalData = JSON.parse(\r\n Buffer.from(headers['x-ms-client-principal'], 'base64').toString('utf-8')\r\n );\r\n\r\n if (claimsPrincipalData['identityProvider']) {\r\n user = {\r\n type: 'StaticWebApps',\r\n id: claimsPrincipalData['userId'],\r\n username: claimsPrincipalData['userDetails'],\r\n identityProvider: claimsPrincipalData['identityProvider'],\r\n claimsPrincipalData,\r\n };\r\n } else {\r\n user = {\r\n type: 'AppService',\r\n id: headers['x-ms-client-principal-id'],\r\n username: headers['x-ms-client-principal-name'],\r\n identityProvider: headers['x-ms-client-principal-idp'],\r\n claimsPrincipalData,\r\n };\r\n }\r\n }\r\n\r\n return user;\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport * as types from '@azure/functions';\r\nimport { MediaType } from '../constants';\r\nimport { AzFuncSystemError } from '../errors';\r\nimport { parseContentType } from './parseHeader';\r\nimport { parseMultipartForm } from './parseMultipartForm';\r\n\r\n/**\r\n * See ./test/parseForm.test.ts for examples\r\n */\r\nexport function parseForm(data: Buffer | string, contentType: string): Form {\r\n const [mediaType, parameters] = parseContentType(contentType);\r\n switch (mediaType.toLowerCase()) {\r\n case MediaType.multipartForm: {\r\n const boundary = parameters.get('boundary');\r\n const parts = parseMultipartForm(typeof data === 'string' ? Buffer.from(data) : data, boundary);\r\n return new Form(parts);\r\n }\r\n case MediaType.urlEncodedForm: {\r\n const parsed = new URLSearchParams(data.toString());\r\n const parts: [string, types.FormPart][] = [];\r\n for (const [key, value] of parsed) {\r\n parts.push([key, { value: Buffer.from(value) }]);\r\n }\r\n return new Form(parts);\r\n }\r\n default:\r\n throw new AzFuncSystemError(\r\n `Media type \"${mediaType}\" does not match types supported for form parsing: \"${MediaType.multipartForm}\", \"${MediaType.urlEncodedForm}\".`\r\n );\r\n }\r\n}\r\n\r\nexport class Form implements types.Form {\r\n #parts: [string, types.FormPart][];\r\n constructor(parts: [string, types.FormPart][]) {\r\n this.#parts = parts;\r\n }\r\n\r\n get(name: string): types.FormPart | null {\r\n for (const [key, value] of this.#parts) {\r\n if (key === name) {\r\n return value;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n getAll(name: string): types.FormPart[] {\r\n const result: types.FormPart[] = [];\r\n for (const [key, value] of this.#parts) {\r\n if (key === name) {\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n has(name: string): boolean {\r\n for (const [key] of this.#parts) {\r\n if (key === name) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n [Symbol.iterator](): Iterator<[string, types.FormPart]> {\r\n return this.#parts[Symbol.iterator]();\r\n }\r\n\r\n get length(): number {\r\n return this.#parts.length;\r\n }\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { HeaderName } from '../constants';\r\nimport { AzFuncSystemError } from '../errors';\r\n\r\nconst space = ' ';\r\n// See \"LEXICAL TOKENS\" section for definition of ctl chars and quoted string: https://www.w3.org/Protocols/rfc822/3_Lexical.html\r\nconst ctlChars = '\\\\u0000-\\\\u001F\\\\u007F';\r\nconst quotedString = '(?:[^\"\\\\\\\\]|\\\\\\\\.)*';\r\n// General description of content type header, including defintion of tspecials and token https://www.w3.org/Protocols/rfc1341/4_Content-Type.html\r\nconst tspecials = '\\\\(\\\\)<>@,;:\\\\\\\\\"\\\\/\\\\[\\\\]\\\\?\\\\.=';\r\nconst token = `[^${space}${ctlChars}${tspecials}]+`;\r\n\r\nconst start = '^\\\\s*'; // allows leading whitespace\r\nconst end = '\\\\s*(.*)$'; // gets the rest of the string except leading whitespace\r\nconst semicolonEnd = `\\\\s*;?${end}`; // allows optional semicolon and otherwise gets the rest of the string\r\n\r\n/**\r\n * @param data a full header, e.g. \"Content-Type: text/html; charset=UTF-8\"\r\n * @param headerName the header name, e.g. \"Content-Type\"\r\n * @returns the header value, e.g. \"text/html; charset=UTF-8\" or null if not found\r\n */\r\nexport function getHeaderValue(data: string, headerName: string): string | null {\r\n const match = new RegExp(`${start}${headerName}\\\\s*:${end}`, 'i').exec(data);\r\n if (match) {\r\n return match[1].trim();\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * @param data a content type, e.g. \"text/html; charset=UTF-8\"\r\n * @returns an array containing the media type (e.g. text/html) and an object with the parameters\r\n */\r\nexport function parseContentType(data: string): [string, HeaderParams] {\r\n const match = new RegExp(`${start}(${token}\\\\/${token})${semicolonEnd}`, 'i').exec(data);\r\n if (!match) {\r\n throw new AzFuncSystemError(`${HeaderName.contentType} must begin with format \"type/subtype\".`);\r\n } else {\r\n return [match[1], parseHeaderParams(match[2])];\r\n }\r\n}\r\n\r\n/**\r\n * @param data a content disposition, e.g. \"form-data; name=myfile; filename=test.txt\"\r\n * @returns an array containing the disposition (e.g. form-data) and an object with the parameters\r\n */\r\nexport function parseContentDisposition(data: string): [string, HeaderParams] {\r\n const match = new RegExp(`${start}(${token})${semicolonEnd}`, 'i').exec(data);\r\n if (!match) {\r\n throw new AzFuncSystemError(`${HeaderName.contentDisposition} must begin with disposition type.`);\r\n } else {\r\n return [match[1], parseHeaderParams(match[2])];\r\n }\r\n}\r\n\r\nfunction parseHeaderParams(data: string): HeaderParams {\r\n const result = new HeaderParams();\r\n while (data) {\r\n // try to find an unquoted name=value pair first\r\n const regexp = new RegExp(`${start}(${token})=(${token})${semicolonEnd}`, 'i');\r\n let match = regexp.exec(data);\r\n // if that didn't work, try to find a quoted name=\"value\" pair instead\r\n if (!match) {\r\n const quotedPartsRegexp = new RegExp(`${start}(${token})=\"(${quotedString})\"${semicolonEnd}`, 'i');\r\n match = quotedPartsRegexp.exec(data);\r\n }\r\n\r\n if (match) {\r\n result.add(match[1], match[2].replace(/\\\\\"/g, '\"')); // un-escape any quotes\r\n data = match[3];\r\n } else {\r\n break;\r\n }\r\n }\r\n return result;\r\n}\r\n\r\nexport class HeaderParams {\r\n #params: { [name: string]: string } = {};\r\n get(name: string): string {\r\n const result = this.#params[name.toLowerCase()];\r\n if (result === undefined) {\r\n throw new AzFuncSystemError(`Failed to find parameter with name \"${name}\".`);\r\n } else {\r\n return result;\r\n }\r\n }\r\n\r\n has(name: string): boolean {\r\n return this.#params[name.toLowerCase()] !== undefined;\r\n }\r\n\r\n add(name: string, value: string): void {\r\n this.#params[name.toLowerCase()] = value;\r\n }\r\n}\r\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport { FormPart } from '@azure/functions';\r\nimport { HeaderName } from '../constants';\r\nimport { AzFuncSystemError } from '../errors';\r\nimport { getHeaderValue, parseContentDisposition } from './parseHeader';\r\n\r\nconst carriageReturn = Buffer.from('\\r')[0];\r\nconst newline = Buffer.from('\\n')[0];\r\n\r\n// multipart/form-data specification https://datatracker.ietf.org/doc/html/rfc7578\r\nexport function parseMultipartForm(chunk: Buffer, boundary: string): [string, FormPart][] {\r\n const result: [string, FormPart][] = [];\r\n let currentName: string | undefined;\r\n let currentPart: FormPart | undefined;\r\n let inHeaders = false;\r\n\r\n const boundaryBuffer = Buffer.from(`--${boundary}`);\r\n const endBoundaryBuffer = Buffer.from(`--${boundary}--`);\r\n\r\n let lineStart = 0;\r\n let lineEnd = 0;\r\n let partValueStart = 0;\r\n let partValueEnd = 0;\r\n\r\n for (let index = 0; index < chunk.length; index++) {\r\n let line: Buffer;\r\n if (chunk[index] === newline) {\r\n lineEnd = chunk[index - 1] === carriageReturn ? index - 1 : index;\r\n line = chunk.slice(lineStart, lineEnd);\r\n lineStart = index + 1;\r\n } else {\r\n continue;\r\n }\r\n\r\n const isBoundary = line.equals(boundaryBuffer);\r\n const isBoundaryEnd = line.equals(endBoundaryBuffer);\r\n if (isBoundary || isBoundaryEnd) {\r\n if (currentPart) {\r\n currentPart.value = chunk.slice(partValueStart, partValueEnd);\r\n }\r\n\r\n if (isBoundaryEnd) {\r\n break;\r\n }\r\n\r\n currentPart = {\r\n value: Buffer.from(''),\r\n };\r\n inHeaders = true;\r\n } else if (inHeaders) {\r\n if (!currentPart) {\r\n throw new AzFuncSystemError(`Expected form data to start with boundary \"${boundary}\".`);\r\n }\r\n\r\n const lineAsString = line.toString();\r\n if (!lineAsString) {\r\n // A blank line means we're done with the headers for this part\r\n inHeaders = false;\r\n if (!currentName) {\r\n throw new AzFuncSystemError(\r\n `Expected part to have header \"${HeaderName.contentDisposition}\" with parameter \"name\".`\r\n );\r\n } else {\r\n partValueStart = lineStart;\r\n partValueEnd = lineStart;\r\n result.push([currentName, currentPart]);\r\n }\r\n } else {\r\n const contentDisposition = getHeaderValue(lineAsString, HeaderName.contentDisposition);\r\n if (contentDisposition) {\r\n const [, dispositionParts] = parseContentDisposition(contentDisposition);\r\n currentName = dispositionParts.get('name');\r\n\r\n // filename is optional, even for files\r\n if (dispositionParts.has('fileName')) {\r\n currentPart.fileName = dispositionParts.get('fileName');\r\n }\r\n } else {\r\n const contentType = getHeaderValue(lineAsString, HeaderName.contentType);\r\n if (contentType) {\r\n currentPart.contentType = contentType;\r\n }\r\n }\r\n }\r\n } else {\r\n partValueEnd = lineEnd;\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n","module.exports = require(\"@azure/functions-core\");","module.exports = require(\"events\");","module.exports = require(\"iconv-lite\");","module.exports = require(\"long\");","module.exports = require(\"util\");","module.exports = require(\"uuid\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// Copyright (c) .NET Foundation. All rights reserved.\r\n// Licensed under the MIT License.\r\n\r\nimport * as coreTypes from '@azure/functions-core';\r\nimport { CoreInvocationContext, setProgrammingModel } from '@azure/functions-core';\r\nimport { version } from './constants';\r\nimport { InvocationModel } from './InvocationModel';\r\n\r\nclass ProgrammingModel implements coreTypes.ProgrammingModel {\r\n name = '@azure/functions';\r\n version = version;\r\n getInvocationModel(coreCtx: CoreInvocationContext): InvocationModel {\r\n return new InvocationModel(coreCtx);\r\n }\r\n}\r\n\r\nexport function setup() {\r\n setProgrammingModel(new ProgrammingModel());\r\n}\r\n"],"names":["info","request","userLogCallback","doneEmitter","context","InvocationContext","bindings","inputs","httpInput","binding","inputData","data","name","input","http","Request","getTimerTriggerName","convertKeysToCamelCase","fromTypedData","push","req","res","Response","done","bindingData","sys","methodName","utcNow","Date","toISOString","randGuid","query","Object","assign","headers","constructor","this","invocationId","traceContext","fromRpcTraceContext","executionContext","functionName","functionDirectory","directory","retryContext","log","args","error","warn","verbose","getNormalizedBindingData","bindingDefinitions","getBindingDefinitions","err","result","emit","metadata","outputBindings","httpOutputName","hasHttpTrigger","keys","filter","direction","forEach","type","toLowerCase","converter","toRpcHttp","toTypedData","length","getReturnBinding","asyncDoneLearnMoreLink","coreCtx","EventEmitter","FunctionInfo","getArguments","CreateContextAndInputs","level","invokeFunction","functionCallback","legacyDoneTask","Promise","resolve","reject","on","suppressAsyncDoneError","isError","resultTask","rawResult","then","r","race","getResponse","response","undefined","isDurableBinding","returnBinding","returnValue","outputData","key","map","concat","definedInBindings","definedInReturn","logCategory","format","apply","state","badAsyncMsg","message","MediaType","HeaderName","version","obj","output","camelCasedKey","charAt","toLocaleLowerCase","slice","valueFromDataType","value","Array","isArray","triggerMetadata","typedData","convertStringToJson","str","string","json","JSON","parse","bytes","Buffer","from","collectionBytes","element","collectionString","collectionDouble","double","collectionSint64","sint64","isLong","toString","traceparent","traceParent","tracestate","traceState","attributes","inputObject","isBuffer","ArrayBuffer","isView","Uint8Array","buffer","byteOffset","byteLength","Number","isInteger","int","stringify","nullable","propertyName","AzFuncSystemError","isNaN","parseFloat","dateTime","timeInMilliseconds","getTime","seconds","Math","round","toRpcHttpHeaders","inputHeaders","rpcHttpHeaders","toRpcHttpCookieList","inputCookies","rpcCookies","cookie","inputCookie","rpcSameSite","sameSite","toRpcString","domain","toNullableString","path","expires","toNullableTimestamp","secure","toNullableBool","httpOnly","maxAge","toNullableDouble","toRpcHttpCookie","body","nullableMapping","originalMapping","converted","inputMessage","status","statusCode","cookies","Error","isAzureFunctionsSystemError","AzFuncTypeError","TypeError","AzFuncRangeError","RangeError","super","String","decodeBuffer","encoding","compressBuffer","decode","n","subarray","rpcHttp","method","url","originalUrl","fromNullableMapping","nullableHeaders","nullableQuery","params","nullableParams","bufferBody","contentType","get","legacyBody","octetStream","startsWith","multipartPrefix","rawBody","fromRpcHttpBody","user","extractHttpUserFromHeaders","field","parseFormBody","parseForm","send","end","header","setHeader","set","getHeader","_done","setContentType","val","removeHeader","sendStatus","claimsPrincipalData","id","username","identityProvider","mediaType","parameters","parseContentType","multipartForm","boundary","parts","parseMultipartForm","Form","urlEncodedForm","parsed","URLSearchParams","getAll","has","Symbol","iterator","token","semicolonEnd","parseHeaderParams","HeaderParams","match","RegExp","exec","add","replace","headerName","trim","contentDisposition","carriageReturn","newline","chunk","currentName","currentPart","inHeaders","boundaryBuffer","endBoundaryBuffer","lineStart","lineEnd","partValueStart","partValueEnd","index","line","isBoundary","equals","isBoundaryEnd","lineAsString","getHeaderValue","dispositionParts","parseContentDisposition","fileName","module","exports","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","call","ProgrammingModel","getInvocationModel","InvocationModel","setProgrammingModel"],"sourceRoot":""}
\No newline at end of file