Skip to content

Commit 281d947

Browse files
fixing line endings in a batch request. fixes #183
1 parent 32e10b9 commit 281d947

19 files changed

+511
-506
lines changed

dist/browser/esm/dynamics-web-api.js

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/browser/esm/dynamics-web-api.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cjs/dynamics-web-api.js

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cjs/dynamics-web-api.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dynamics-web-api.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! dynamics-web-api v2.2.0 (c) 2025 Aleksandr Rogov. License: MIT */
1+
/*! dynamics-web-api v2.2.1 (c) 2025 Aleksandr Rogov. License: MIT */
22
/**
33
* Microsoft Dataverse Web API helper library for Node.js and Browser.
44
* It is compatible with: Dataverse, Dynamics 365 (online), Dynamics 365 (on-premise), Dynamics CRM 2016, Dynamics CRM Online.

dist/dynamics-web-api.js

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dynamics-web-api.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dynamics-web-api.min.js

Lines changed: 11 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/dynamics-web-api.min.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/dynamics-web-api.mjs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! dynamics-web-api v2.2.0 (c) 2025 Aleksandr Rogov. License: MIT */
1+
/*! dynamics-web-api v2.2.1 (c) 2025 Aleksandr Rogov. License: MIT */
22
var __defProp = Object.defineProperty;
33
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
44
var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1313,21 +1313,21 @@ var convertToBatch = (requests, config, batchRequest) => {
13131313
if ((batchRequest == null ? void 0 : batchRequest.inChangeSet) === false) internalRequest.inChangeSet = false;
13141314
const inChangeSet = internalRequest.method === "GET" ? false : !!internalRequest.inChangeSet;
13151315
if (!inChangeSet && currentChangeSet) {
1316-
batchBody.push(`
1316+
batchBody.push(`\r
13171317
--${currentChangeSet}--`);
13181318
currentChangeSet = null;
13191319
contentId = 1e5;
13201320
}
13211321
if (!currentChangeSet) {
1322-
batchBody.push(`
1322+
batchBody.push(`\r
13231323
--${batchBoundary}`);
13241324
if (inChangeSet) {
13251325
currentChangeSet = `changeset_${Utility.generateUUID()}`;
13261326
batchBody.push("Content-Type: multipart/mixed;boundary=" + currentChangeSet);
13271327
}
13281328
}
13291329
if (inChangeSet) {
1330-
batchBody.push(`
1330+
batchBody.push(`\r
13311331
--${currentChangeSet}`);
13321332
}
13331333
batchBody.push("Content-Type: application/http");
@@ -1337,10 +1337,10 @@ var convertToBatch = (requests, config, batchRequest) => {
13371337
batchBody.push(`Content-ID: ${contentIdValue}`);
13381338
}
13391339
if (!((_a2 = internalRequest.path) == null ? void 0 : _a2.startsWith("$"))) {
1340-
batchBody.push(`
1340+
batchBody.push(`\r
13411341
${internalRequest.method} ${config.dataApi.url}${internalRequest.path} HTTP/1.1`);
13421342
} else {
1343-
batchBody.push(`
1343+
batchBody.push(`\r
13441344
${internalRequest.method} ${internalRequest.path} HTTP/1.1`);
13451345
}
13461346
if (internalRequest.method === "GET") {
@@ -1352,19 +1352,20 @@ ${internalRequest.method} ${internalRequest.path} HTTP/1.1`);
13521352
addHeaders(internalRequest.headers, batchBody);
13531353
}
13541354
if (internalRequest.data) {
1355-
batchBody.push(`
1355+
batchBody.push(`\r
13561356
${processData(internalRequest.data, config)}`);
13571357
}
13581358
});
13591359
if (currentChangeSet) {
1360-
batchBody.push(`
1360+
batchBody.push(`\r
13611361
--${currentChangeSet}--`);
13621362
}
1363-
batchBody.push(`
1364-
--${batchBoundary}--`);
1363+
batchBody.push(`\r
1364+
--${batchBoundary}--\r
1365+
`);
13651366
const headers = setStandardHeaders(batchRequest == null ? void 0 : batchRequest.userHeaders);
13661367
headers["Content-Type"] = `multipart/mixed;boundary=${batchBoundary}`;
1367-
return { headers, body: batchBody.join("\n") };
1368+
return { headers, body: batchBody.join("\r\n") };
13681369
};
13691370
var findCollectionName = (entityName) => {
13701371
if (Utility.isNull(entityNames)) return null;

0 commit comments

Comments
 (0)