@microsoft/m365agentstoolkit-cli 1.1.17 → 1.1.18-alpha.5ad5e2c733.0
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/json-schemas/copilot/plugin/v2.4/schema.json +49 -14
- package/lib/140.js +1 -1
- package/lib/140.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.LICENSE.txt +2 -0
- package/lib/index.js.map +2 -2
- package/package.json +34 -34
- package/resource/package.nls.json +35 -1
- package/resource/yaml-schema/v1.13/yaml.schema.json +29 -12
- package/resource/yaml-schema/yaml.schema.json +29 -12
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/metadata.zip +0 -0
- package/templates/ui/tdpNode.json +1 -1
- package/templates/ui/wizardNode.json +1 -1
- package/templates/v4/create-selector.json +2 -2
- package/templates/v4/floor.json +1 -1
- package/templates/v4/templates-metadata.zip +0 -0
- package/templates/v4/templates.zip +0 -0
|
@@ -341,18 +341,8 @@
|
|
|
341
341
|
}
|
|
342
342
|
},
|
|
343
343
|
"spec": {
|
|
344
|
-
"
|
|
345
|
-
"
|
|
346
|
-
{
|
|
347
|
-
"$ref": "#/$defs/open-api-spec"
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"$ref": "#/$defs/local-plugin-spec"
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
"$ref": "#/$defs/mcp-execution-spec"
|
|
354
|
-
}
|
|
355
|
-
]
|
|
344
|
+
"type": "object",
|
|
345
|
+
"description": "Runtime-specific configuration object. Its exact shape is determined by the sibling `type` member (see the `oneOf` on this runtime object): `OpenApi` uses `open-api-spec`, `LocalPlugin` uses `local-plugin-spec`, and `RemoteMCPServer` uses `mcp-execution-spec`."
|
|
356
346
|
},
|
|
357
347
|
"output_template": {
|
|
358
348
|
"type": "string",
|
|
@@ -362,7 +352,46 @@
|
|
|
362
352
|
"additionalProperties": false,
|
|
363
353
|
"patternProperties": {
|
|
364
354
|
"^x-": {}
|
|
365
|
-
}
|
|
355
|
+
},
|
|
356
|
+
"oneOf": [
|
|
357
|
+
{
|
|
358
|
+
"$comment": "Discriminate `spec` by the sibling `type`. draft-04 has no if/then, so this is expressed as a `oneOf` where each branch pins `type` and the matching `spec` schema. Without this, a bare RemoteMCPServer spec of `{ \"url\": \"...\" }` (dynamic tool discovery) matches BOTH `open-api-spec` and `mcp-execution-spec` and fails a `oneOf` placed directly on `spec`.",
|
|
359
|
+
"properties": {
|
|
360
|
+
"type": {
|
|
361
|
+
"enum": [
|
|
362
|
+
"OpenApi"
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
"spec": {
|
|
366
|
+
"$ref": "#/$defs/open-api-spec"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"properties": {
|
|
372
|
+
"type": {
|
|
373
|
+
"enum": [
|
|
374
|
+
"LocalPlugin"
|
|
375
|
+
]
|
|
376
|
+
},
|
|
377
|
+
"spec": {
|
|
378
|
+
"$ref": "#/$defs/local-plugin-spec"
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"properties": {
|
|
384
|
+
"type": {
|
|
385
|
+
"enum": [
|
|
386
|
+
"RemoteMCPServer"
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
"spec": {
|
|
390
|
+
"$ref": "#/$defs/mcp-execution-spec"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
]
|
|
366
395
|
},
|
|
367
396
|
"auth-object": {
|
|
368
397
|
"type": "object",
|
|
@@ -551,7 +580,13 @@
|
|
|
551
580
|
"mcp-tool-inline": {
|
|
552
581
|
"type": "object",
|
|
553
582
|
"title": "MCP Tool Inline Definitions",
|
|
554
|
-
"description": "Inline tool definitions matching the format returned by the MCP server's tools/list method."
|
|
583
|
+
"description": "Inline tool definitions matching the format returned by the MCP server's tools/list method.",
|
|
584
|
+
"$comment": "Excludes a top-level `file` key so this branch is mutually exclusive with `mcp-tool-file-reference` under `mcp_tool_description`'s `oneOf`. Without it, this open object also matches the file-reference form, so `{ \"file\": \"...\" }` matches both branches and fails the `oneOf`.",
|
|
585
|
+
"not": {
|
|
586
|
+
"required": [
|
|
587
|
+
"file"
|
|
588
|
+
]
|
|
589
|
+
}
|
|
555
590
|
},
|
|
556
591
|
"function-parameters": {
|
|
557
592
|
"type": "object",
|
package/lib/140.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";exports.id=140,exports.ids=[140],exports.modules={77140:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{toFormData:()=>toFormData});var fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(
|
|
1
|
+
"use strict";exports.id=140,exports.ids=[140],exports.modules={77140:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{toFormData:()=>toFormData});var fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(23129),formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(77665);let s=0;const S={START_BOUNDARY:s++,HEADER_FIELD_START:s++,HEADER_FIELD:s++,HEADER_VALUE_START:s++,HEADER_VALUE:s++,HEADER_VALUE_ALMOST_DONE:s++,HEADERS_ALMOST_DONE:s++,PART_DATA_START:s++,PART_DATA:s++,END:s++};let f=1;const F_PART_BOUNDARY=f,F_LAST_BOUNDARY=f*=2,lower=c=>32|c,noop=()=>{};class MultipartParser{constructor(boundary){this.index=0,this.flags=0,this.onHeaderEnd=noop,this.onHeaderField=noop,this.onHeadersEnd=noop,this.onHeaderValue=noop,this.onPartBegin=noop,this.onPartData=noop,this.onPartEnd=noop,this.boundaryChars={},boundary="\r\n--"+boundary;const ui8a=new Uint8Array(boundary.length);for(let i=0;i<boundary.length;i++)ui8a[i]=boundary.charCodeAt(i),this.boundaryChars[ui8a[i]]=!0;this.boundary=ui8a,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=S.START_BOUNDARY}write(data){let i=0;const length_=data.length;let previousIndex=this.index,{lookbehind,boundary,boundaryChars,index,state,flags}=this;const boundaryLength=this.boundary.length,boundaryEnd=boundaryLength-1,bufferLength=data.length;let c,cl;const mark=name=>{this[name+"Mark"]=i},clear=name=>{delete this[name+"Mark"]},callback=(callbackSymbol,start,end,ui8a)=>{void 0!==start&&start===end||this[callbackSymbol](ui8a&&ui8a.subarray(start,end))},dataCallback=(name,clear)=>{const markSymbol=name+"Mark";markSymbol in this&&(clear?(callback(name,this[markSymbol],i,data),delete this[markSymbol]):(callback(name,this[markSymbol],data.length,data),this[markSymbol]=0))};for(i=0;i<length_;i++)switch(c=data[i],state){case S.START_BOUNDARY:if(index===boundary.length-2){if(45===c)flags|=F_LAST_BOUNDARY;else if(13!==c)return;index++;break}if(index-1==boundary.length-2){if(flags&F_LAST_BOUNDARY&&45===c)state=S.END,flags=0;else{if(flags&F_LAST_BOUNDARY||10!==c)return;index=0,callback("onPartBegin"),state=S.HEADER_FIELD_START}break}c!==boundary[index+2]&&(index=-2),c===boundary[index+2]&&index++;break;case S.HEADER_FIELD_START:state=S.HEADER_FIELD,mark("onHeaderField"),index=0;case S.HEADER_FIELD:if(13===c){clear("onHeaderField"),state=S.HEADERS_ALMOST_DONE;break}if(index++,45===c)break;if(58===c){if(1===index)return;dataCallback("onHeaderField",!0),state=S.HEADER_VALUE_START;break}if(cl=lower(c),cl<97||cl>122)return;break;case S.HEADER_VALUE_START:if(32===c)break;mark("onHeaderValue"),state=S.HEADER_VALUE;case S.HEADER_VALUE:13===c&&(dataCallback("onHeaderValue",!0),callback("onHeaderEnd"),state=S.HEADER_VALUE_ALMOST_DONE);break;case S.HEADER_VALUE_ALMOST_DONE:if(10!==c)return;state=S.HEADER_FIELD_START;break;case S.HEADERS_ALMOST_DONE:if(10!==c)return;callback("onHeadersEnd"),state=S.PART_DATA_START;break;case S.PART_DATA_START:state=S.PART_DATA,mark("onPartData");case S.PART_DATA:if(previousIndex=index,0===index){for(i+=boundaryEnd;i<bufferLength&&!(data[i]in boundaryChars);)i+=boundaryLength;i-=boundaryEnd,c=data[i]}if(index<boundary.length)boundary[index]===c?(0===index&&dataCallback("onPartData",!0),index++):index=0;else if(index===boundary.length)index++,13===c?flags|=F_PART_BOUNDARY:45===c?flags|=F_LAST_BOUNDARY:index=0;else if(index-1===boundary.length)if(flags&F_PART_BOUNDARY){if(index=0,10===c){flags&=~F_PART_BOUNDARY,callback("onPartEnd"),callback("onPartBegin"),state=S.HEADER_FIELD_START;break}}else flags&F_LAST_BOUNDARY&&45===c?(callback("onPartEnd"),state=S.END,flags=0):index=0;if(index>0)lookbehind[index-1]=c;else if(previousIndex>0){const _lookbehind=new Uint8Array(lookbehind.buffer,lookbehind.byteOffset,lookbehind.byteLength);callback("onPartData",0,previousIndex,_lookbehind),previousIndex=0,mark("onPartData"),i--}break;case S.END:break;default:throw new Error(`Unexpected state entered: ${state}`)}dataCallback("onHeaderField"),dataCallback("onHeaderValue"),dataCallback("onPartData"),this.index=index,this.state=state,this.flags=flags}end(){if(this.state===S.HEADER_FIELD_START&&0===this.index||this.state===S.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==S.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}async function toFormData(Body,ct){if(!/multipart/i.test(ct))throw new TypeError("Failed to fetch");const m=ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!m)throw new TypeError("no or bad content-type header, no multipart boundary");const parser=new MultipartParser(m[1]||m[2]);let headerField,headerValue,entryValue,entryName,contentType,filename;const entryChunks=[],formData=new formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__.fS,onPartData=ui8a=>{entryValue+=decoder.decode(ui8a,{stream:!0})},appendToFile=ui8a=>{entryChunks.push(ui8a)},appendFileToFormData=()=>{const file=new fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__.ZH(entryChunks,filename,{type:contentType});formData.append(entryName,file)},appendEntryToFormData=()=>{formData.append(entryName,entryValue)},decoder=new TextDecoder("utf-8");decoder.decode(),parser.onPartBegin=function(){parser.onPartData=onPartData,parser.onPartEnd=appendEntryToFormData,headerField="",headerValue="",entryValue="",entryName="",contentType="",filename=null,entryChunks.length=0},parser.onHeaderField=function(ui8a){headerField+=decoder.decode(ui8a,{stream:!0})},parser.onHeaderValue=function(ui8a){headerValue+=decoder.decode(ui8a,{stream:!0})},parser.onHeaderEnd=function(){if(headerValue+=decoder.decode(),headerField=headerField.toLowerCase(),"content-disposition"===headerField){const m=headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);m&&(entryName=m[2]||m[3]||""),filename=function _fileName(headerValue){const m=headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!m)return;const match=m[2]||m[3]||"";let filename=match.slice(match.lastIndexOf("\\")+1);return filename=filename.replace(/%22/g,'"'),filename=filename.replace(/&#(\d{4});/g,(m,code)=>String.fromCharCode(code)),filename}(headerValue),filename&&(parser.onPartData=appendToFile,parser.onPartEnd=appendFileToFormData)}else"content-type"===headerField&&(contentType=headerValue);headerValue="",headerField=""};for await(const chunk of Body)parser.write(chunk);return parser.end(),formData}}};
|
|
2
2
|
//# sourceMappingURL=140.js.map
|
package/lib/140.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"140.js","mappings":"+XAGA,IAAAA,EAAA,EACA,MAAAC,EAAA,CACAC,eAAAF,IACAG,mBAAAH,IACAI,aAAAJ,IACAK,mBAAAL,IACAM,aAAAN,IACAO,yBAAAP,IACAQ,oBAAAR,IACAS,gBAAAT,IACAU,UAAAV,IACAW,IAAAX,KAGA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SA3FA,SAAAmB,UAAAvB,aAEA,MAAAJ,EAAAI,YAAAH,MAAA,8DACA,IAAAD,EACA,OAGA,MAAAC,MAAAD,EAAA,IAAAA,EAAA,OACA,IAAAQ,SAAAP,MAAA2B,MAAA3B,MAAA4B,YAAA,SAKA,OAJArB,SAAAA,SAAAsB,QAAA,YACAtB,SAAAA,SAAAsB,QAAA,cAAwC,CAAA9B,EAAA+B,OACxCC,OAAAC,aAAAF,OAEAvB,QACA,CA6EAmB,CAAAvB,aAEAI,WACAN,OAAA1C,WAAAwD,aACAd,OAAAzC,UAAAyD,qBAEA,KAAI,iBAAAf,cACJI,YAAAH,aAGAA,YAAA,GACAD,YAAA,EACA,EAEA,gBAAA+B,SAAAtC,KACAM,OAAAhC,MAAAgE,OAKA,OAFAhC,OAAAlB,MAEA0B,QACA","sources":["webpack://@microsoft/m365agentstoolkit-cli/javascript/node_modules/.pnpm/node-fetch@3.3.2/node_modules/node-fetch/src/utils/multipart-parser.js"],"sourcesContent":["import {File} from 'fetch-blob/from.js';\nimport {FormData} from 'formdata-polyfill/esm.min.js';\n\nlet s = 0;\nconst S = {\n\tSTART_BOUNDARY: s++,\n\tHEADER_FIELD_START: s++,\n\tHEADER_FIELD: s++,\n\tHEADER_VALUE_START: s++,\n\tHEADER_VALUE: s++,\n\tHEADER_VALUE_ALMOST_DONE: s++,\n\tHEADERS_ALMOST_DONE: s++,\n\tPART_DATA_START: s++,\n\tPART_DATA: s++,\n\tEND: s++\n};\n\nlet f = 1;\nconst F = {\n\tPART_BOUNDARY: f,\n\tLAST_BOUNDARY: f *= 2\n};\n\nconst LF = 10;\nconst CR = 13;\nconst SPACE = 32;\nconst HYPHEN = 45;\nconst COLON = 58;\nconst A = 97;\nconst Z = 122;\n\nconst lower = c => c | 0x20;\n\nconst noop = () => {};\n\nclass MultipartParser {\n\t/**\n\t * @param {string} boundary\n\t */\n\tconstructor(boundary) {\n\t\tthis.index = 0;\n\t\tthis.flags = 0;\n\n\t\tthis.onHeaderEnd = noop;\n\t\tthis.onHeaderField = noop;\n\t\tthis.onHeadersEnd = noop;\n\t\tthis.onHeaderValue = noop;\n\t\tthis.onPartBegin = noop;\n\t\tthis.onPartData = noop;\n\t\tthis.onPartEnd = noop;\n\n\t\tthis.boundaryChars = {};\n\n\t\tboundary = '\\r\\n--' + boundary;\n\t\tconst ui8a = new Uint8Array(boundary.length);\n\t\tfor (let i = 0; i < boundary.length; i++) {\n\t\t\tui8a[i] = boundary.charCodeAt(i);\n\t\t\tthis.boundaryChars[ui8a[i]] = true;\n\t\t}\n\n\t\tthis.boundary = ui8a;\n\t\tthis.lookbehind = new Uint8Array(this.boundary.length + 8);\n\t\tthis.state = S.START_BOUNDARY;\n\t}\n\n\t/**\n\t * @param {Uint8Array} data\n\t */\n\twrite(data) {\n\t\tlet i = 0;\n\t\tconst length_ = data.length;\n\t\tlet previousIndex = this.index;\n\t\tlet {lookbehind, boundary, boundaryChars, index, state, flags} = this;\n\t\tconst boundaryLength = this.boundary.length;\n\t\tconst boundaryEnd = boundaryLength - 1;\n\t\tconst bufferLength = data.length;\n\t\tlet c;\n\t\tlet cl;\n\n\t\tconst mark = name => {\n\t\t\tthis[name + 'Mark'] = i;\n\t\t};\n\n\t\tconst clear = name => {\n\t\t\tdelete this[name + 'Mark'];\n\t\t};\n\n\t\tconst callback = (callbackSymbol, start, end, ui8a) => {\n\t\t\tif (start === undefined || start !== end) {\n\t\t\t\tthis[callbackSymbol](ui8a && ui8a.subarray(start, end));\n\t\t\t}\n\t\t};\n\n\t\tconst dataCallback = (name, clear) => {\n\t\t\tconst markSymbol = name + 'Mark';\n\t\t\tif (!(markSymbol in this)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (clear) {\n\t\t\t\tcallback(name, this[markSymbol], i, data);\n\t\t\t\tdelete this[markSymbol];\n\t\t\t} else {\n\t\t\t\tcallback(name, this[markSymbol], data.length, data);\n\t\t\t\tthis[markSymbol] = 0;\n\t\t\t}\n\t\t};\n\n\t\tfor (i = 0; i < length_; i++) {\n\t\t\tc = data[i];\n\n\t\t\tswitch (state) {\n\t\t\t\tcase S.START_BOUNDARY:\n\t\t\t\t\tif (index === boundary.length - 2) {\n\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else if (c !== CR) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (index - 1 === boundary.length - 2) {\n\t\t\t\t\t\tif (flags & F.LAST_BOUNDARY && c === HYPHEN) {\n\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c !== boundary[index + 2]) {\n\t\t\t\t\t\tindex = -2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === boundary[index + 2]) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_FIELD_START:\n\t\t\t\t\tstate = S.HEADER_FIELD;\n\t\t\t\t\tmark('onHeaderField');\n\t\t\t\t\tindex = 0;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_FIELD:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tclear('onHeaderField');\n\t\t\t\t\t\tstate = S.HEADERS_ALMOST_DONE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tindex++;\n\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === COLON) {\n\t\t\t\t\t\tif (index === 1) {\n\t\t\t\t\t\t\t// empty header field\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdataCallback('onHeaderField', true);\n\t\t\t\t\t\tstate = S.HEADER_VALUE_START;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcl = lower(c);\n\t\t\t\t\tif (cl < A || cl > Z) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_START:\n\t\t\t\t\tif (c === SPACE) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tmark('onHeaderValue');\n\t\t\t\t\tstate = S.HEADER_VALUE;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_VALUE:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tdataCallback('onHeaderValue', true);\n\t\t\t\t\t\tcallback('onHeaderEnd');\n\t\t\t\t\t\tstate = S.HEADER_VALUE_ALMOST_DONE;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADERS_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tcallback('onHeadersEnd');\n\t\t\t\t\tstate = S.PART_DATA_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.PART_DATA_START:\n\t\t\t\t\tstate = S.PART_DATA;\n\t\t\t\t\tmark('onPartData');\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.PART_DATA:\n\t\t\t\t\tpreviousIndex = index;\n\n\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t// boyer-moore derrived algorithm to safely skip non-boundary data\n\t\t\t\t\t\ti += boundaryEnd;\n\t\t\t\t\t\twhile (i < bufferLength && !(data[i] in boundaryChars)) {\n\t\t\t\t\t\t\ti += boundaryLength;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ti -= boundaryEnd;\n\t\t\t\t\t\tc = data[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index < boundary.length) {\n\t\t\t\t\t\tif (boundary[index] === c) {\n\t\t\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t\t\tdataCallback('onPartData', true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === boundary.length) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\t\t// CR = part boundary\n\t\t\t\t\t\t\tflags |= F.PART_BOUNDARY;\n\t\t\t\t\t\t} else if (c === HYPHEN) {\n\t\t\t\t\t\t\t// HYPHEN = end boundary\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index - 1 === boundary.length) {\n\t\t\t\t\t\tif (flags & F.PART_BOUNDARY) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tif (c === LF) {\n\t\t\t\t\t\t\t\t// unset the PART_BOUNDARY flag\n\t\t\t\t\t\t\t\tflags &= ~F.PART_BOUNDARY;\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (flags & F.LAST_BOUNDARY) {\n\t\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index > 0) {\n\t\t\t\t\t\t// when matching a possible boundary, keep a lookbehind reference\n\t\t\t\t\t\t// in case it turns out to be a false lead\n\t\t\t\t\t\tlookbehind[index - 1] = c;\n\t\t\t\t\t} else if (previousIndex > 0) {\n\t\t\t\t\t\t// if our boundary turned out to be rubbish, the captured lookbehind\n\t\t\t\t\t\t// belongs to partData\n\t\t\t\t\t\tconst _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);\n\t\t\t\t\t\tcallback('onPartData', 0, previousIndex, _lookbehind);\n\t\t\t\t\t\tpreviousIndex = 0;\n\t\t\t\t\t\tmark('onPartData');\n\n\t\t\t\t\t\t// reconsider the current character even so it interrupted the sequence\n\t\t\t\t\t\t// it could be the beginning of a new sequence\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.END:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Unexpected state entered: ${state}`);\n\t\t\t}\n\t\t}\n\n\t\tdataCallback('onHeaderField');\n\t\tdataCallback('onHeaderValue');\n\t\tdataCallback('onPartData');\n\n\t\t// Update properties for the next call\n\t\tthis.index = index;\n\t\tthis.state = state;\n\t\tthis.flags = flags;\n\t}\n\n\tend() {\n\t\tif ((this.state === S.HEADER_FIELD_START && this.index === 0) ||\n\t\t\t(this.state === S.PART_DATA && this.index === this.boundary.length)) {\n\t\t\tthis.onPartEnd();\n\t\t} else if (this.state !== S.END) {\n\t\t\tthrow new Error('MultipartParser.end(): stream ended unexpectedly');\n\t\t}\n\t}\n}\n\nfunction _fileName(headerValue) {\n\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\tconst m = headerValue.match(/\\bfilename=(\"(.*?)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))($|;\\s)/i);\n\tif (!m) {\n\t\treturn;\n\t}\n\n\tconst match = m[2] || m[3] || '';\n\tlet filename = match.slice(match.lastIndexOf('\\\\') + 1);\n\tfilename = filename.replace(/%22/g, '\"');\n\tfilename = filename.replace(/&#(\\d{4});/g, (m, code) => {\n\t\treturn String.fromCharCode(code);\n\t});\n\treturn filename;\n}\n\nexport async function toFormData(Body, ct) {\n\tif (!/multipart/i.test(ct)) {\n\t\tthrow new TypeError('Failed to fetch');\n\t}\n\n\tconst m = ct.match(/boundary=(?:\"([^\"]+)\"|([^;]+))/i);\n\n\tif (!m) {\n\t\tthrow new TypeError('no or bad content-type header, no multipart boundary');\n\t}\n\n\tconst parser = new MultipartParser(m[1] || m[2]);\n\n\tlet headerField;\n\tlet headerValue;\n\tlet entryValue;\n\tlet entryName;\n\tlet contentType;\n\tlet filename;\n\tconst entryChunks = [];\n\tconst formData = new FormData();\n\n\tconst onPartData = ui8a => {\n\t\tentryValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tconst appendToFile = ui8a => {\n\t\tentryChunks.push(ui8a);\n\t};\n\n\tconst appendFileToFormData = () => {\n\t\tconst file = new File(entryChunks, filename, {type: contentType});\n\t\tformData.append(entryName, file);\n\t};\n\n\tconst appendEntryToFormData = () => {\n\t\tformData.append(entryName, entryValue);\n\t};\n\n\tconst decoder = new TextDecoder('utf-8');\n\tdecoder.decode();\n\n\tparser.onPartBegin = function () {\n\t\tparser.onPartData = onPartData;\n\t\tparser.onPartEnd = appendEntryToFormData;\n\n\t\theaderField = '';\n\t\theaderValue = '';\n\t\tentryValue = '';\n\t\tentryName = '';\n\t\tcontentType = '';\n\t\tfilename = null;\n\t\tentryChunks.length = 0;\n\t};\n\n\tparser.onHeaderField = function (ui8a) {\n\t\theaderField += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderValue = function (ui8a) {\n\t\theaderValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderEnd = function () {\n\t\theaderValue += decoder.decode();\n\t\theaderField = headerField.toLowerCase();\n\n\t\tif (headerField === 'content-disposition') {\n\t\t\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\t\t\tconst m = headerValue.match(/\\bname=(\"([^\"]*)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))/i);\n\n\t\t\tif (m) {\n\t\t\t\tentryName = m[2] || m[3] || '';\n\t\t\t}\n\n\t\t\tfilename = _fileName(headerValue);\n\n\t\t\tif (filename) {\n\t\t\t\tparser.onPartData = appendToFile;\n\t\t\t\tparser.onPartEnd = appendFileToFormData;\n\t\t\t}\n\t\t} else if (headerField === 'content-type') {\n\t\t\tcontentType = headerValue;\n\t\t}\n\n\t\theaderValue = '';\n\t\theaderField = '';\n\t};\n\n\tfor await (const chunk of Body) {\n\t\tparser.write(chunk);\n\t}\n\n\tparser.end();\n\n\treturn formData;\n}\n"],"names":["s","S","START_BOUNDARY","HEADER_FIELD_START","HEADER_FIELD","HEADER_VALUE_START","HEADER_VALUE","HEADER_VALUE_ALMOST_DONE","HEADERS_ALMOST_DONE","PART_DATA_START","PART_DATA","END","f","F","lower","c","noop","MultipartParser","constructor","boundary","this","index","flags","onHeaderEnd","onHeaderField","onHeadersEnd","onHeaderValue","onPartBegin","onPartData","onPartEnd","boundaryChars","ui8a","Uint8Array","length","i","charCodeAt","lookbehind","state","write","data","length_","previousIndex","boundaryLength","boundaryEnd","bufferLength","cl","mark","name","clear","callback","callbackSymbol","start","end","undefined","subarray","dataCallback","markSymbol","_lookbehind","buffer","byteOffset","byteLength","Error","async","toFormData","Body","ct","test","TypeError","m","match","parser","headerField","headerValue","entryValue","entryName","contentType","filename","entryChunks","formData","formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__","fS","decoder","decode","stream","appendToFile","push","appendFileToFormData","file","fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__","ZH","type","append","appendEntryToFormData","TextDecoder","toLowerCase","_fileName","slice","lastIndexOf","replace","code","String","fromCharCode","chunk"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"140.js","mappings":"gYAGA,IAAAA,EAAA,EACA,MAAAC,EAAA,CACAC,eAAAF,IACAG,mBAAAH,IACAI,aAAAJ,IACAK,mBAAAL,IACAM,aAAAN,IACAO,yBAAAP,IACAQ,oBAAAR,IACAS,gBAAAT,IACAU,UAAAV,IACAW,IAAAX,KAGA,IAAAY,EAAA,EACA,MAAAC,gBACAD,EADAC,gBAEAD,GAAA,EAWAE,MAAAC,GAAA,GAAAA,EAEAC,KAAA,OAEA,MAAAC,gBAIA,WAAAC,CAAAC,UACAC,KAAAC,MAAA,EACAD,KAAAE,MAAA,EAEAF,KAAAG,YAAAP,KACAI,KAAAI,cAAAR,KACAI,KAAAK,aAAAT,KACAI,KAAAM,cAAAV,KACAI,KAAAO,YAAAX,KACAI,KAAAQ,WAAAZ,KACAI,KAAAS,UAAAb,KAEAI,KAAAU,cAAA,GAEAX,SAAA,SAAAA,SACA,MAAAY,KAAA,IAAAC,WAAAb,SAAAc,QACA,QAAAC,EAAA,EAAkBA,EAAAf,SAAAc,OAAqBC,IACvCH,KAAAG,GAAAf,SAAAgB,WAAAD,GACAd,KAAAU,cAAAC,KAAAG,KAAA,EAGAd,KAAAD,SAAAY,KACAX,KAAAgB,WAAA,IAAAJ,WAAAZ,KAAAD,SAAAc,OAAA,GACAb,KAAAiB,MAAApC,EAAAC,cACA,CAKA,KAAAoC,CAAAC,MACA,IAAAL,EAAA,EACA,MAAAM,QAAAD,KAAAN,OACA,IAAAQ,cAAArB,KAAAC,OACAe,WAAOjB,SAAAW,cAA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,WAAAA,WACA0C,OAAAzC,UAAA+D,sBAEArB,YAAA,GACAC,YAAA,GACAC,WAAA,GACAC,UAAA,GACAC,YAAA,GACAC,SAAA,KACAC,YAAA5C,OAAA,CACA,EAEAqC,OAAA9C,cAAA,SAAAO,MACAwC,aAAAU,QAAAC,OAAAnD,KAAA,CAAuCoD,QAAA,GACvC,EAEAb,OAAA5C,cAAA,SAAAK,MACAyC,aAAAS,QAAAC,OAAAnD,KAAA,CAAuCoD,QAAA,GACvC,EAEAb,OAAA/C,YAAA,WAIA,GAHAiD,aAAAS,QAAAC,SACAX,YAAAA,YAAAuB,cAEA,wBAAAvB,YAAA,CAEA,MAAAH,EAAAI,YAAAH,MAAA,qDAEAD,IACAM,UAAAN,EAAA,IAAAA,EAAA,QAGAQ,SA3FA,SAAAmB,UAAAvB,aAEA,MAAAJ,EAAAI,YAAAH,MAAA,8DACA,IAAAD,EACA,OAGA,MAAAC,MAAAD,EAAA,IAAAA,EAAA,OACA,IAAAQ,SAAAP,MAAA2B,MAAA3B,MAAA4B,YAAA,SAKA,OAJArB,SAAAA,SAAAsB,QAAA,YACAtB,SAAAA,SAAAsB,QAAA,cAAwC,CAAA9B,EAAA+B,OACxCC,OAAAC,aAAAF,OAEAvB,QACA,CA6EAmB,CAAAvB,aAEAI,WACAN,OAAA1C,WAAAwD,aACAd,OAAAzC,UAAAyD,qBAEA,KAAI,iBAAAf,cACJI,YAAAH,aAGAA,YAAA,GACAD,YAAA,EACA,EAEA,gBAAA+B,SAAAtC,KACAM,OAAAhC,MAAAgE,OAKA,OAFAhC,OAAAlB,MAEA0B,QACA","sources":["webpack://@microsoft/m365agentstoolkit-cli/javascript/node_modules/.pnpm/node-fetch@3.3.2/node_modules/node-fetch/src/utils/multipart-parser.js"],"sourcesContent":["import {File} from 'fetch-blob/from.js';\nimport {FormData} from 'formdata-polyfill/esm.min.js';\n\nlet s = 0;\nconst S = {\n\tSTART_BOUNDARY: s++,\n\tHEADER_FIELD_START: s++,\n\tHEADER_FIELD: s++,\n\tHEADER_VALUE_START: s++,\n\tHEADER_VALUE: s++,\n\tHEADER_VALUE_ALMOST_DONE: s++,\n\tHEADERS_ALMOST_DONE: s++,\n\tPART_DATA_START: s++,\n\tPART_DATA: s++,\n\tEND: s++\n};\n\nlet f = 1;\nconst F = {\n\tPART_BOUNDARY: f,\n\tLAST_BOUNDARY: f *= 2\n};\n\nconst LF = 10;\nconst CR = 13;\nconst SPACE = 32;\nconst HYPHEN = 45;\nconst COLON = 58;\nconst A = 97;\nconst Z = 122;\n\nconst lower = c => c | 0x20;\n\nconst noop = () => {};\n\nclass MultipartParser {\n\t/**\n\t * @param {string} boundary\n\t */\n\tconstructor(boundary) {\n\t\tthis.index = 0;\n\t\tthis.flags = 0;\n\n\t\tthis.onHeaderEnd = noop;\n\t\tthis.onHeaderField = noop;\n\t\tthis.onHeadersEnd = noop;\n\t\tthis.onHeaderValue = noop;\n\t\tthis.onPartBegin = noop;\n\t\tthis.onPartData = noop;\n\t\tthis.onPartEnd = noop;\n\n\t\tthis.boundaryChars = {};\n\n\t\tboundary = '\\r\\n--' + boundary;\n\t\tconst ui8a = new Uint8Array(boundary.length);\n\t\tfor (let i = 0; i < boundary.length; i++) {\n\t\t\tui8a[i] = boundary.charCodeAt(i);\n\t\t\tthis.boundaryChars[ui8a[i]] = true;\n\t\t}\n\n\t\tthis.boundary = ui8a;\n\t\tthis.lookbehind = new Uint8Array(this.boundary.length + 8);\n\t\tthis.state = S.START_BOUNDARY;\n\t}\n\n\t/**\n\t * @param {Uint8Array} data\n\t */\n\twrite(data) {\n\t\tlet i = 0;\n\t\tconst length_ = data.length;\n\t\tlet previousIndex = this.index;\n\t\tlet {lookbehind, boundary, boundaryChars, index, state, flags} = this;\n\t\tconst boundaryLength = this.boundary.length;\n\t\tconst boundaryEnd = boundaryLength - 1;\n\t\tconst bufferLength = data.length;\n\t\tlet c;\n\t\tlet cl;\n\n\t\tconst mark = name => {\n\t\t\tthis[name + 'Mark'] = i;\n\t\t};\n\n\t\tconst clear = name => {\n\t\t\tdelete this[name + 'Mark'];\n\t\t};\n\n\t\tconst callback = (callbackSymbol, start, end, ui8a) => {\n\t\t\tif (start === undefined || start !== end) {\n\t\t\t\tthis[callbackSymbol](ui8a && ui8a.subarray(start, end));\n\t\t\t}\n\t\t};\n\n\t\tconst dataCallback = (name, clear) => {\n\t\t\tconst markSymbol = name + 'Mark';\n\t\t\tif (!(markSymbol in this)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (clear) {\n\t\t\t\tcallback(name, this[markSymbol], i, data);\n\t\t\t\tdelete this[markSymbol];\n\t\t\t} else {\n\t\t\t\tcallback(name, this[markSymbol], data.length, data);\n\t\t\t\tthis[markSymbol] = 0;\n\t\t\t}\n\t\t};\n\n\t\tfor (i = 0; i < length_; i++) {\n\t\t\tc = data[i];\n\n\t\t\tswitch (state) {\n\t\t\t\tcase S.START_BOUNDARY:\n\t\t\t\t\tif (index === boundary.length - 2) {\n\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else if (c !== CR) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (index - 1 === boundary.length - 2) {\n\t\t\t\t\t\tif (flags & F.LAST_BOUNDARY && c === HYPHEN) {\n\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c !== boundary[index + 2]) {\n\t\t\t\t\t\tindex = -2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === boundary[index + 2]) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_FIELD_START:\n\t\t\t\t\tstate = S.HEADER_FIELD;\n\t\t\t\t\tmark('onHeaderField');\n\t\t\t\t\tindex = 0;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_FIELD:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tclear('onHeaderField');\n\t\t\t\t\t\tstate = S.HEADERS_ALMOST_DONE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tindex++;\n\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (c === COLON) {\n\t\t\t\t\t\tif (index === 1) {\n\t\t\t\t\t\t\t// empty header field\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdataCallback('onHeaderField', true);\n\t\t\t\t\t\tstate = S.HEADER_VALUE_START;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcl = lower(c);\n\t\t\t\t\tif (cl < A || cl > Z) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_START:\n\t\t\t\t\tif (c === SPACE) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tmark('onHeaderValue');\n\t\t\t\t\tstate = S.HEADER_VALUE;\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.HEADER_VALUE:\n\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\tdataCallback('onHeaderValue', true);\n\t\t\t\t\t\tcallback('onHeaderEnd');\n\t\t\t\t\t\tstate = S.HEADER_VALUE_ALMOST_DONE;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADER_VALUE_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.HEADERS_ALMOST_DONE:\n\t\t\t\t\tif (c !== LF) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tcallback('onHeadersEnd');\n\t\t\t\t\tstate = S.PART_DATA_START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.PART_DATA_START:\n\t\t\t\t\tstate = S.PART_DATA;\n\t\t\t\t\tmark('onPartData');\n\t\t\t\t\t// falls through\n\t\t\t\tcase S.PART_DATA:\n\t\t\t\t\tpreviousIndex = index;\n\n\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t// boyer-moore derrived algorithm to safely skip non-boundary data\n\t\t\t\t\t\ti += boundaryEnd;\n\t\t\t\t\t\twhile (i < bufferLength && !(data[i] in boundaryChars)) {\n\t\t\t\t\t\t\ti += boundaryLength;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ti -= boundaryEnd;\n\t\t\t\t\t\tc = data[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index < boundary.length) {\n\t\t\t\t\t\tif (boundary[index] === c) {\n\t\t\t\t\t\t\tif (index === 0) {\n\t\t\t\t\t\t\t\tdataCallback('onPartData', true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === boundary.length) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tif (c === CR) {\n\t\t\t\t\t\t\t// CR = part boundary\n\t\t\t\t\t\t\tflags |= F.PART_BOUNDARY;\n\t\t\t\t\t\t} else if (c === HYPHEN) {\n\t\t\t\t\t\t\t// HYPHEN = end boundary\n\t\t\t\t\t\t\tflags |= F.LAST_BOUNDARY;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index - 1 === boundary.length) {\n\t\t\t\t\t\tif (flags & F.PART_BOUNDARY) {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\tif (c === LF) {\n\t\t\t\t\t\t\t\t// unset the PART_BOUNDARY flag\n\t\t\t\t\t\t\t\tflags &= ~F.PART_BOUNDARY;\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tcallback('onPartBegin');\n\t\t\t\t\t\t\t\tstate = S.HEADER_FIELD_START;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (flags & F.LAST_BOUNDARY) {\n\t\t\t\t\t\t\tif (c === HYPHEN) {\n\t\t\t\t\t\t\t\tcallback('onPartEnd');\n\t\t\t\t\t\t\t\tstate = S.END;\n\t\t\t\t\t\t\t\tflags = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (index > 0) {\n\t\t\t\t\t\t// when matching a possible boundary, keep a lookbehind reference\n\t\t\t\t\t\t// in case it turns out to be a false lead\n\t\t\t\t\t\tlookbehind[index - 1] = c;\n\t\t\t\t\t} else if (previousIndex > 0) {\n\t\t\t\t\t\t// if our boundary turned out to be rubbish, the captured lookbehind\n\t\t\t\t\t\t// belongs to partData\n\t\t\t\t\t\tconst _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);\n\t\t\t\t\t\tcallback('onPartData', 0, previousIndex, _lookbehind);\n\t\t\t\t\t\tpreviousIndex = 0;\n\t\t\t\t\t\tmark('onPartData');\n\n\t\t\t\t\t\t// reconsider the current character even so it interrupted the sequence\n\t\t\t\t\t\t// it could be the beginning of a new sequence\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase S.END:\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Unexpected state entered: ${state}`);\n\t\t\t}\n\t\t}\n\n\t\tdataCallback('onHeaderField');\n\t\tdataCallback('onHeaderValue');\n\t\tdataCallback('onPartData');\n\n\t\t// Update properties for the next call\n\t\tthis.index = index;\n\t\tthis.state = state;\n\t\tthis.flags = flags;\n\t}\n\n\tend() {\n\t\tif ((this.state === S.HEADER_FIELD_START && this.index === 0) ||\n\t\t\t(this.state === S.PART_DATA && this.index === this.boundary.length)) {\n\t\t\tthis.onPartEnd();\n\t\t} else if (this.state !== S.END) {\n\t\t\tthrow new Error('MultipartParser.end(): stream ended unexpectedly');\n\t\t}\n\t}\n}\n\nfunction _fileName(headerValue) {\n\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\tconst m = headerValue.match(/\\bfilename=(\"(.*?)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))($|;\\s)/i);\n\tif (!m) {\n\t\treturn;\n\t}\n\n\tconst match = m[2] || m[3] || '';\n\tlet filename = match.slice(match.lastIndexOf('\\\\') + 1);\n\tfilename = filename.replace(/%22/g, '\"');\n\tfilename = filename.replace(/&#(\\d{4});/g, (m, code) => {\n\t\treturn String.fromCharCode(code);\n\t});\n\treturn filename;\n}\n\nexport async function toFormData(Body, ct) {\n\tif (!/multipart/i.test(ct)) {\n\t\tthrow new TypeError('Failed to fetch');\n\t}\n\n\tconst m = ct.match(/boundary=(?:\"([^\"]+)\"|([^;]+))/i);\n\n\tif (!m) {\n\t\tthrow new TypeError('no or bad content-type header, no multipart boundary');\n\t}\n\n\tconst parser = new MultipartParser(m[1] || m[2]);\n\n\tlet headerField;\n\tlet headerValue;\n\tlet entryValue;\n\tlet entryName;\n\tlet contentType;\n\tlet filename;\n\tconst entryChunks = [];\n\tconst formData = new FormData();\n\n\tconst onPartData = ui8a => {\n\t\tentryValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tconst appendToFile = ui8a => {\n\t\tentryChunks.push(ui8a);\n\t};\n\n\tconst appendFileToFormData = () => {\n\t\tconst file = new File(entryChunks, filename, {type: contentType});\n\t\tformData.append(entryName, file);\n\t};\n\n\tconst appendEntryToFormData = () => {\n\t\tformData.append(entryName, entryValue);\n\t};\n\n\tconst decoder = new TextDecoder('utf-8');\n\tdecoder.decode();\n\n\tparser.onPartBegin = function () {\n\t\tparser.onPartData = onPartData;\n\t\tparser.onPartEnd = appendEntryToFormData;\n\n\t\theaderField = '';\n\t\theaderValue = '';\n\t\tentryValue = '';\n\t\tentryName = '';\n\t\tcontentType = '';\n\t\tfilename = null;\n\t\tentryChunks.length = 0;\n\t};\n\n\tparser.onHeaderField = function (ui8a) {\n\t\theaderField += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderValue = function (ui8a) {\n\t\theaderValue += decoder.decode(ui8a, {stream: true});\n\t};\n\n\tparser.onHeaderEnd = function () {\n\t\theaderValue += decoder.decode();\n\t\theaderField = headerField.toLowerCase();\n\n\t\tif (headerField === 'content-disposition') {\n\t\t\t// matches either a quoted-string or a token (RFC 2616 section 19.5.1)\n\t\t\tconst m = headerValue.match(/\\bname=(\"([^\"]*)\"|([^()<>@,;:\\\\\"/[\\]?={}\\s\\t]+))/i);\n\n\t\t\tif (m) {\n\t\t\t\tentryName = m[2] || m[3] || '';\n\t\t\t}\n\n\t\t\tfilename = _fileName(headerValue);\n\n\t\t\tif (filename) {\n\t\t\t\tparser.onPartData = appendToFile;\n\t\t\t\tparser.onPartEnd = appendFileToFormData;\n\t\t\t}\n\t\t} else if (headerField === 'content-type') {\n\t\t\tcontentType = headerValue;\n\t\t}\n\n\t\theaderValue = '';\n\t\theaderField = '';\n\t};\n\n\tfor await (const chunk of Body) {\n\t\tparser.write(chunk);\n\t}\n\n\tparser.end();\n\n\treturn formData;\n}\n"],"names":["s","S","START_BOUNDARY","HEADER_FIELD_START","HEADER_FIELD","HEADER_VALUE_START","HEADER_VALUE","HEADER_VALUE_ALMOST_DONE","HEADERS_ALMOST_DONE","PART_DATA_START","PART_DATA","END","f","F","lower","c","noop","MultipartParser","constructor","boundary","this","index","flags","onHeaderEnd","onHeaderField","onHeadersEnd","onHeaderValue","onPartBegin","onPartData","onPartEnd","boundaryChars","ui8a","Uint8Array","length","i","charCodeAt","lookbehind","state","write","data","length_","previousIndex","boundaryLength","boundaryEnd","bufferLength","cl","mark","name","clear","callback","callbackSymbol","start","end","undefined","subarray","dataCallback","markSymbol","_lookbehind","buffer","byteOffset","byteLength","Error","async","toFormData","Body","ct","test","TypeError","m","match","parser","headerField","headerValue","entryValue","entryName","contentType","filename","entryChunks","formData","formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__","fS","decoder","decode","stream","appendToFile","push","appendFileToFormData","file","fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__","ZH","type","append","appendEntryToFormData","TextDecoder","toLowerCase","_fileName","slice","lastIndexOf","replace","code","String","fromCharCode","chunk"],"sourceRoot":""}
|