@readme/httpsnippet 10.0.5 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-QBICEG2V.js → chunk-532RKFLR.js} +6 -10
- package/dist/chunk-532RKFLR.js.map +1 -0
- package/dist/chunk-KT7MO6Z4.js +1 -1
- package/dist/chunk-KT7MO6Z4.js.map +1 -1
- package/dist/chunk-Y7NI4MMY.js +1 -1
- package/dist/chunk-Y7NI4MMY.js.map +1 -1
- package/dist/helpers/code-builder.cjs +1 -1
- package/dist/helpers/code-builder.cjs.map +1 -1
- package/dist/helpers/code-builder.js +1 -1
- package/dist/helpers/code-builder.js.map +1 -1
- package/dist/helpers/reducer.cjs +1 -1
- package/dist/helpers/reducer.cjs.map +1 -1
- package/dist/helpers/reducer.js +1 -1
- package/dist/helpers/reducer.js.map +1 -1
- package/dist/{index-BTuTGf5t.d.ts → index-Bi-oJSCB.d.ts} +6 -6
- package/dist/{index-C-fCLOHv.d.cts → index-CM3ebXTM.d.cts} +6 -6
- package/dist/index.cjs +5 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/targets/index.cjs +5 -9
- package/dist/targets/index.cjs.map +1 -1
- package/dist/targets/index.d.cts +1 -1
- package/dist/targets/index.d.ts +1 -1
- package/dist/targets/index.js +2 -2
- package/dist/targets/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-QBICEG2V.js.map +0 -1
package/dist/chunk-KT7MO6Z4.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/helpers/reducer.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../src/helpers/reducer.ts"],"names":[],"mappings":";AAEa,IAAA,OAAA,GAAU,CAA4C,WAAA,EAAkC,IAAY,KAAA;AAC/G,EAAM,MAAA,YAAA,GAAe,WAAY,CAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAC1C,EAAA,IAAI,iBAAiB,KAAW,CAAA,EAAA;AAC9B,IAAY,WAAA,CAAA,IAAA,CAAK,IAAI,CAAA,GAAI,IAAK,CAAA,KAAA,CAAA;AAC9B,IAAO,OAAA,WAAA,CAAA;AAAA,GACT;AAGA,EAAI,IAAA,KAAA,CAAM,OAAQ,CAAA,YAAY,CAAG,EAAA;AAC/B,IAAa,YAAA,CAAA,IAAA,CAAK,KAAK,KAAK,CAAA,CAAA;AAC5B,IAAO,OAAA,WAAA,CAAA;AAAA,GACT;AAGA,EAAA,WAAA,CAAY,KAAK,IAAI,CAAA,GAAI,CAAC,YAAA,EAAc,KAAK,KAAK,CAAA,CAAA;AAClD,EAAO,OAAA,WAAA,CAAA;AACT","file":"chunk-KT7MO6Z4.js","sourcesContent":["export type ReducedHelperObject = Record<string, string[] | string>;\n\nexport const reducer = <T extends { name: string; value: string }>(accumulator: ReducedHelperObject, pair: T) => {\n const currentValue = accumulator[pair.name];\n if (currentValue === undefined) {\n accumulator[pair.name] = pair.value;\n return accumulator;\n }\n\n // If we already have it as array just push the value\n if (Array.isArray(currentValue)) {\n currentValue.push(pair.value);\n return accumulator;\n }\n\n // convert to array since now we have more than one value for this key\n accumulator[pair.name] = [currentValue, pair.value];\n return accumulator;\n};\n"]}
|
package/dist/chunk-Y7NI4MMY.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/helpers/code-builder.ts"],"names":[],"mappings":";AAAA,IAAM,
|
|
1
|
+
{"version":3,"sources":["../src/helpers/code-builder.ts"],"names":[],"mappings":";AAAA,IAAM,6BAAgC,GAAA,EAAA,CAAA;AACtC,IAAM,iBAAoB,GAAA,IAAA,CAAA;AAkBnB,IAAM,cAAN,MAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,EAavB,YAAY,EAAE,MAAA,EAAQ,IAAK,EAAA,GAAwB,EAAI,EAAA;AAZvD,IAAA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K,QAAQ,CAAA,CAAA;AACnD,MAAM,MAAA,cAAA,GAAiB,IAAK,CAAA,cAAA,CAAe,MAAO,CAAA,CAAC,aAAa,QAAa,KAAA,QAAA,CAAS,WAAW,CAAA,EAAG,cAAc,CAAA,CAAA;AAClH,MAAO,OAAA,cAAA,CAAA;AAAA,KACT,CAAA;AAMA;AAAA;AAAA;AAAA;AAAA,IAAA,IAAA,CAAA,gBAAA,GAAmB,CAAC,aAAiC,KAAA;AACnD,MAAA,IAAA,CAAK,cAAiB,GAAA,CAAC,GAAG,IAAA,CAAK,gBAAgB,aAAa,CAAA,CAAA;AAAA,KAC9D,CAAA;AAlDE,IAAA,IAAA,CAAK,uBAAuB,MAAU,IAAA,6BAAA,CAAA;AACtC,IAAA,IAAA,CAAK,WAAW,IAAQ,IAAA,iBAAA,CAAA;AAAA,GAC1B;AAiDF","file":"chunk-Y7NI4MMY.js","sourcesContent":["const DEFAULT_INDENTATION_CHARACTER = '';\nconst DEFAULT_LINE_JOIN = '\\n';\n\nexport type PostProcessor = (unreplacedCode: string) => string;\n\nexport interface CodeBuilderOptions {\n /**\n * Desired indentation character for aggregated lines of code\n * @default ''\n */\n indent?: string;\n\n /**\n * Desired character to join each line of code\n * @default \\n\n */\n join?: string;\n}\n\nexport class CodeBuilder {\n postProcessors: PostProcessor[] = [];\n\n code: string[] = [];\n\n indentationCharacter: string = DEFAULT_INDENTATION_CHARACTER;\n\n lineJoin = DEFAULT_LINE_JOIN;\n\n /**\n * Helper object to format and aggragate lines of code.\n * Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.\n */\n constructor({ indent, join }: CodeBuilderOptions = {}) {\n this.indentationCharacter = indent || DEFAULT_INDENTATION_CHARACTER;\n this.lineJoin = join ?? DEFAULT_LINE_JOIN;\n }\n\n /**\n * Add given indentation level to given line of code\n */\n indentLine = (line: string, indentationLevel = 0) => {\n const indent = this.indentationCharacter.repeat(indentationLevel);\n return `${indent}${line}`;\n };\n\n /**\n * Add the line at the beginning of the current lines\n */\n unshift = (line: string, indentationLevel?: number) => {\n const newLine = this.indentLine(line, indentationLevel);\n this.code.unshift(newLine);\n };\n\n /**\n * Add the line at the end of the current lines\n */\n push = (line: string, indentationLevel?: number) => {\n const newLine = this.indentLine(line, indentationLevel);\n this.code.push(newLine);\n };\n\n /**\n * Add an empty line at the end of current lines\n */\n blank = () => {\n this.code.push('');\n };\n\n /**\n * Concatenate all current lines using the given lineJoin, then apply any replacers that may have been added\n */\n join = () => {\n const unreplacedCode = this.code.join(this.lineJoin);\n const replacedOutput = this.postProcessors.reduce((accumulator, replacer) => replacer(accumulator), unreplacedCode);\n return replacedOutput;\n };\n\n /**\n * Often when writing modules you may wish to add a literal tag or bit of metadata that you wish to transform after other processing as a final step.\n * To do so, you can provide a PostProcessor function and it will be run automatically for you when you call `join()` later on.\n */\n addPostProcessor = (postProcessor: PostProcessor) => {\n this.postProcessors = [...this.postProcessors, postProcessor];\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/helpers/code-builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/helpers/code-builder.ts"],"names":[],"mappings":";;;AAAA,IAAM,6BAAgC,GAAA,EAAA,CAAA;AACtC,IAAM,iBAAoB,GAAA,IAAA,CAAA;AAkBnB,IAAM,cAAN,MAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,EAavB,YAAY,EAAE,MAAA,EAAQ,IAAK,EAAA,GAAwB,EAAI,EAAA;AAZvD,IAAA,IAAA,CAAA,cAAA,GAAkC,EAAC,CAAA;AAEnC,IAAA,IAAA,CAAA,IAAA,GAAiB,EAAC,CAAA;AAElB,IAA+B,IAAA,CAAA,oBAAA,GAAA,6BAAA,CAAA;AAE/B,IAAW,IAAA,CAAA,QAAA,GAAA,iBAAA,CAAA;AAcX;AAAA;AAAA;AAAA,IAAa,IAAA,CAAA,UAAA,GAAA,CAAC,IAAc,EAAA,gBAAA,GAAmB,CAAM,KAAA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;AACnD,MAAA,IAAA,CAAK,cAAiB,GAAA,CAAC,GAAG,IAAA,CAAK,gBAAgB,aAAa,CAAA,CAAA;AAAA,KAC9D,CAAA;AAlDE,IAAA,IAAA,CAAK,uBAAuB,MAAU,IAAA,6BAAA,CAAA;AACtC,IAAA,IAAA,CAAK,WAAW,IAAQ,IAAA,iBAAA,CAAA;AAAA,GAC1B;AAiDF","file":"code-builder.cjs","sourcesContent":["const DEFAULT_INDENTATION_CHARACTER = '';\nconst DEFAULT_LINE_JOIN = '\\n';\n\nexport type PostProcessor = (unreplacedCode: string) => string;\n\nexport interface CodeBuilderOptions {\n /**\n * Desired indentation character for aggregated lines of code\n * @default ''\n */\n indent?: string;\n\n /**\n * Desired character to join each line of code\n * @default \\n\n */\n join?: string;\n}\n\nexport class CodeBuilder {\n postProcessors: PostProcessor[] = [];\n\n code: string[] = [];\n\n indentationCharacter: string = DEFAULT_INDENTATION_CHARACTER;\n\n lineJoin = DEFAULT_LINE_JOIN;\n\n /**\n * Helper object to format and aggragate lines of code.\n * Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.\n */\n constructor({ indent, join }: CodeBuilderOptions = {}) {\n this.indentationCharacter = indent || DEFAULT_INDENTATION_CHARACTER;\n this.lineJoin = join ?? DEFAULT_LINE_JOIN;\n }\n\n /**\n * Add given indentation level to given line of code\n */\n indentLine = (line: string, indentationLevel = 0) => {\n const indent = this.indentationCharacter.repeat(indentationLevel);\n return `${indent}${line}`;\n };\n\n /**\n * Add the line at the beginning of the current lines\n */\n unshift = (line: string, indentationLevel?: number) => {\n const newLine = this.indentLine(line, indentationLevel);\n this.code.unshift(newLine);\n };\n\n /**\n * Add the line at the end of the current lines\n */\n push = (line: string, indentationLevel?: number) => {\n const newLine = this.indentLine(line, indentationLevel);\n this.code.push(newLine);\n };\n\n /**\n * Add an empty line at the end of current lines\n */\n blank = () => {\n this.code.push('');\n };\n\n /**\n * Concatenate all current lines using the given lineJoin, then apply any replacers that may have been added\n */\n join = () => {\n const unreplacedCode = this.code.join(this.lineJoin);\n const replacedOutput = this.postProcessors.reduce((accumulator, replacer) => replacer(accumulator), unreplacedCode);\n return replacedOutput;\n };\n\n /**\n * Often when writing modules you may wish to add a literal tag or bit of metadata that you wish to transform after other processing as a final step.\n * To do so, you can provide a PostProcessor function and it will be run automatically for you when you call `join()` later on.\n */\n addPostProcessor = (postProcessor: PostProcessor) => {\n this.postProcessors = [...this.postProcessors, postProcessor];\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"code-builder.js"}
|
package/dist/helpers/reducer.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/helpers/reducer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/helpers/reducer.ts"],"names":[],"mappings":";;;AAEa,IAAA,OAAA,GAAU,CAA4C,WAAA,EAAkC,IAAY,KAAA;AAC/G,EAAM,MAAA,YAAA,GAAe,WAAY,CAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAC1C,EAAA,IAAI,iBAAiB,KAAW,CAAA,EAAA;AAC9B,IAAY,WAAA,CAAA,IAAA,CAAK,IAAI,CAAA,GAAI,IAAK,CAAA,KAAA,CAAA;AAC9B,IAAO,OAAA,WAAA,CAAA;AAAA,GACT;AAGA,EAAI,IAAA,KAAA,CAAM,OAAQ,CAAA,YAAY,CAAG,EAAA;AAC/B,IAAa,YAAA,CAAA,IAAA,CAAK,KAAK,KAAK,CAAA,CAAA;AAC5B,IAAO,OAAA,WAAA,CAAA;AAAA,GACT;AAGA,EAAA,WAAA,CAAY,KAAK,IAAI,CAAA,GAAI,CAAC,YAAA,EAAc,KAAK,KAAK,CAAA,CAAA;AAClD,EAAO,OAAA,WAAA,CAAA;AACT","file":"reducer.cjs","sourcesContent":["export type ReducedHelperObject = Record<string, string[] | string>;\n\nexport const reducer = <T extends { name: string; value: string }>(accumulator: ReducedHelperObject, pair: T) => {\n const currentValue = accumulator[pair.name];\n if (currentValue === undefined) {\n accumulator[pair.name] = pair.value;\n return accumulator;\n }\n\n // If we already have it as array just push the value\n if (Array.isArray(currentValue)) {\n currentValue.push(pair.value);\n return accumulator;\n }\n\n // convert to array since now we have more than one value for this key\n accumulator[pair.name] = [currentValue, pair.value];\n return accumulator;\n};\n"]}
|
package/dist/helpers/reducer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"reducer.js"}
|
|
@@ -58,7 +58,7 @@ declare const targets: {
|
|
|
58
58
|
};
|
|
59
59
|
declare const isTarget: (target: Target) => target is Target;
|
|
60
60
|
declare const addTarget: (target: Target) => void;
|
|
61
|
-
declare const isClient: (client: Client) => client is Client
|
|
61
|
+
declare const isClient: (client: Client) => client is Client;
|
|
62
62
|
declare const addClientPlugin: (plugin: ClientPlugin) => void;
|
|
63
63
|
declare const addTargetClient: (targetId: TargetId, client: Client) => void;
|
|
64
64
|
|
|
@@ -147,12 +147,12 @@ declare class HTTPSnippet {
|
|
|
147
147
|
bodySize: number;
|
|
148
148
|
comment?: string | undefined;
|
|
149
149
|
postData: PostDataCommon & {
|
|
150
|
-
params?: Param[]
|
|
151
|
-
text?: string
|
|
150
|
+
params?: Param[];
|
|
151
|
+
text?: string;
|
|
152
152
|
} & {
|
|
153
|
-
boundary?: string
|
|
154
|
-
jsonObj?: ReducedHelperObject
|
|
155
|
-
paramsObj?: ReducedHelperObject
|
|
153
|
+
boundary?: string;
|
|
154
|
+
jsonObj?: ReducedHelperObject;
|
|
155
|
+
paramsObj?: ReducedHelperObject;
|
|
156
156
|
};
|
|
157
157
|
cookiesObj: ReducedHelperObject;
|
|
158
158
|
headersObj: ReducedHelperObject;
|
|
@@ -58,7 +58,7 @@ declare const targets: {
|
|
|
58
58
|
};
|
|
59
59
|
declare const isTarget: (target: Target) => target is Target;
|
|
60
60
|
declare const addTarget: (target: Target) => void;
|
|
61
|
-
declare const isClient: (client: Client) => client is Client
|
|
61
|
+
declare const isClient: (client: Client) => client is Client;
|
|
62
62
|
declare const addClientPlugin: (plugin: ClientPlugin) => void;
|
|
63
63
|
declare const addTargetClient: (targetId: TargetId, client: Client) => void;
|
|
64
64
|
|
|
@@ -147,12 +147,12 @@ declare class HTTPSnippet {
|
|
|
147
147
|
bodySize: number;
|
|
148
148
|
comment?: string | undefined;
|
|
149
149
|
postData: PostDataCommon & {
|
|
150
|
-
params?: Param[]
|
|
151
|
-
text?: string
|
|
150
|
+
params?: Param[];
|
|
151
|
+
text?: string;
|
|
152
152
|
} & {
|
|
153
|
-
boundary?: string
|
|
154
|
-
jsonObj?: ReducedHelperObject
|
|
155
|
-
paramsObj?: ReducedHelperObject
|
|
153
|
+
boundary?: string;
|
|
154
|
+
jsonObj?: ReducedHelperObject;
|
|
155
|
+
paramsObj?: ReducedHelperObject;
|
|
156
156
|
};
|
|
157
157
|
cookiesObj: ReducedHelperObject;
|
|
158
158
|
headersObj: ReducedHelperObject;
|
package/dist/index.cjs
CHANGED
|
@@ -548,8 +548,7 @@ var restsharp = {
|
|
|
548
548
|
});
|
|
549
549
|
switch (postData.mimeType) {
|
|
550
550
|
case "multipart/form-data":
|
|
551
|
-
if (!postData.params)
|
|
552
|
-
break;
|
|
551
|
+
if (!postData.params) break;
|
|
553
552
|
postData.params.forEach((param) => {
|
|
554
553
|
if (param.fileName) {
|
|
555
554
|
push(`request.AddFile("${param.name}", "${param.fileName}");`);
|
|
@@ -559,22 +558,19 @@ var restsharp = {
|
|
|
559
558
|
});
|
|
560
559
|
break;
|
|
561
560
|
case "application/x-www-form-urlencoded":
|
|
562
|
-
if (!postData.params)
|
|
563
|
-
break;
|
|
561
|
+
if (!postData.params) break;
|
|
564
562
|
postData.params.forEach((param) => {
|
|
565
563
|
push(`request.AddParameter("${param.name}", "${param.value}");`);
|
|
566
564
|
});
|
|
567
565
|
break;
|
|
568
566
|
case "application/json": {
|
|
569
|
-
if (!postData.text)
|
|
570
|
-
break;
|
|
567
|
+
if (!postData.text) break;
|
|
571
568
|
const text = JSON.stringify(postData.text);
|
|
572
569
|
push(`request.AddJsonBody(${text}, false);`);
|
|
573
570
|
break;
|
|
574
571
|
}
|
|
575
572
|
default:
|
|
576
|
-
if (!postData.text)
|
|
577
|
-
break;
|
|
573
|
+
if (!postData.text) break;
|
|
578
574
|
push(`request.AddStringBody("${postData.text}", "${postData.mimeType}");`);
|
|
579
575
|
}
|
|
580
576
|
push(`var response = await client.${title(method)}Async(request);
|
|
@@ -3768,5 +3764,5 @@ exports.addTarget = addTarget;
|
|
|
3768
3764
|
exports.addTargetClient = addTargetClient;
|
|
3769
3765
|
exports.availableTargets = availableTargets;
|
|
3770
3766
|
exports.extname = extname;
|
|
3771
|
-
//# sourceMappingURL=
|
|
3767
|
+
//# sourceMappingURL=index.cjs.map
|
|
3772
3768
|
//# sourceMappingURL=index.cjs.map
|