@xylabs/buffer 2.11.22 → 2.11.24
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/browser/bufferPolyfill.cjs +3 -5
- package/dist/browser/bufferPolyfill.cjs.map +1 -1
- package/dist/browser/bufferPolyfill.js +3 -4
- package/dist/browser/bufferPolyfill.js.map +1 -1
- package/dist/browser/index.cjs +3 -21
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +2 -18
- package/dist/browser/index.js.map +1 -1
- package/dist/node/bufferPolyfill.js +3 -1
- package/dist/node/bufferPolyfill.js.map +1 -1
- package/dist/node/bufferPolyfill.mjs +2 -1
- package/dist/node/bufferPolyfill.mjs.map +1 -1
- package/dist/node/index.js +12 -4
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +8 -2
- package/dist/node/index.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -16,21 +16,19 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/browser/bufferPolyfill.ts
|
|
21
19
|
var bufferPolyfill_exports = {};
|
|
22
20
|
__export(bufferPolyfill_exports, {
|
|
23
21
|
bufferPolyfill: () => bufferPolyfill
|
|
24
22
|
});
|
|
25
23
|
module.exports = __toCommonJS(bufferPolyfill_exports);
|
|
26
24
|
var import_buffer = require("buffer/");
|
|
27
|
-
|
|
25
|
+
const isBrowser = () => {
|
|
28
26
|
return typeof window !== "undefined" && typeof window?.document !== "undefined";
|
|
29
27
|
};
|
|
30
|
-
|
|
28
|
+
const isWebworker = () => {
|
|
31
29
|
return typeof self === "object" && self.constructor?.name === "DedicatedWorkerGlobalScope";
|
|
32
30
|
};
|
|
33
|
-
|
|
31
|
+
const bufferPolyfill = () => {
|
|
34
32
|
const global = isBrowser() ? window : isWebworker() ? self : void 0;
|
|
35
33
|
if (global && global.Buffer === void 0) {
|
|
36
34
|
global.Buffer = import_buffer.Buffer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/browser/bufferPolyfill.ts"],"sourcesContent":["import { Buffer } from 'buffer/'\n\ntype WithOptionalBuffer = { Buffer?: typeof Buffer }\n\nconst isBrowser = () => {\n return typeof window !== 'undefined' && typeof window?.document !== 'undefined'\n}\n\nconst isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\nexport const bufferPolyfill = () => {\n const global = isBrowser() ? (window as unknown as WithOptionalBuffer) : isWebworker() ? (self as unknown as WithOptionalBuffer) : undefined\n if (global && global.Buffer === undefined) {\n global.Buffer = Buffer\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/browser/bufferPolyfill.ts"],"sourcesContent":["import { Buffer } from 'buffer/'\n\ntype WithOptionalBuffer = { Buffer?: typeof Buffer }\n\nconst isBrowser = () => {\n return typeof window !== 'undefined' && typeof window?.document !== 'undefined'\n}\n\nconst isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\nexport const bufferPolyfill = () => {\n const global = isBrowser() ? (window as unknown as WithOptionalBuffer) : isWebworker() ? (self as unknown as WithOptionalBuffer) : undefined\n if (global && global.Buffer === undefined) {\n global.Buffer = Buffer\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AAIvB,MAAM,YAAY,MAAM;AACtB,SAAO,OAAO,WAAW,eAAe,OAAO,QAAQ,aAAa;AACtE;AAEA,MAAM,cAAc,MAAM;AACxB,SAAO,OAAO,SAAS,YAAY,KAAK,aAAa,SAAS;AAChE;AAEO,MAAM,iBAAiB,MAAM;AAClC,QAAM,SAAS,UAAU,IAAK,SAA2C,YAAY,IAAK,OAAyC;AACnI,MAAI,UAAU,OAAO,WAAW,QAAW;AACzC,WAAO,SAAS;AAAA,EAClB;AACF;","names":[]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
// src/browser/bufferPolyfill.ts
|
|
2
1
|
import { Buffer } from "buffer/";
|
|
3
|
-
|
|
2
|
+
const isBrowser = () => {
|
|
4
3
|
return typeof window !== "undefined" && typeof window?.document !== "undefined";
|
|
5
4
|
};
|
|
6
|
-
|
|
5
|
+
const isWebworker = () => {
|
|
7
6
|
return typeof self === "object" && self.constructor?.name === "DedicatedWorkerGlobalScope";
|
|
8
7
|
};
|
|
9
|
-
|
|
8
|
+
const bufferPolyfill = () => {
|
|
10
9
|
const global = isBrowser() ? window : isWebworker() ? self : void 0;
|
|
11
10
|
if (global && global.Buffer === void 0) {
|
|
12
11
|
global.Buffer = Buffer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/browser/bufferPolyfill.ts"],"sourcesContent":["import { Buffer } from 'buffer/'\n\ntype WithOptionalBuffer = { Buffer?: typeof Buffer }\n\nconst isBrowser = () => {\n return typeof window !== 'undefined' && typeof window?.document !== 'undefined'\n}\n\nconst isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\nexport const bufferPolyfill = () => {\n const global = isBrowser() ? (window as unknown as WithOptionalBuffer) : isWebworker() ? (self as unknown as WithOptionalBuffer) : undefined\n if (global && global.Buffer === undefined) {\n global.Buffer = Buffer\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/browser/bufferPolyfill.ts"],"sourcesContent":["import { Buffer } from 'buffer/'\n\ntype WithOptionalBuffer = { Buffer?: typeof Buffer }\n\nconst isBrowser = () => {\n return typeof window !== 'undefined' && typeof window?.document !== 'undefined'\n}\n\nconst isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope'\n}\n\nexport const bufferPolyfill = () => {\n const global = isBrowser() ? (window as unknown as WithOptionalBuffer) : isWebworker() ? (self as unknown as WithOptionalBuffer) : undefined\n if (global && global.Buffer === undefined) {\n global.Buffer = Buffer\n }\n}\n"],"mappings":"AAAA,SAAS,cAAc;AAIvB,MAAM,YAAY,MAAM;AACtB,SAAO,OAAO,WAAW,eAAe,OAAO,QAAQ,aAAa;AACtE;AAEA,MAAM,cAAc,MAAM;AACxB,SAAO,OAAO,SAAS,YAAY,KAAK,aAAa,SAAS;AAChE;AAEO,MAAM,iBAAiB,MAAM;AAClC,QAAM,SAAS,UAAU,IAAK,SAA2C,YAAY,IAAK,OAAyC;AACnI,MAAI,UAAU,OAAO,WAAW,QAAW;AACzC,WAAO,SAAS;AAAA,EAClB;AACF;","names":[]}
|
package/dist/browser/index.cjs
CHANGED
|
@@ -15,31 +15,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/browser/index.ts
|
|
21
20
|
var browser_exports = {};
|
|
22
21
|
__export(browser_exports, {
|
|
23
|
-
Buffer: () =>
|
|
24
|
-
bufferPolyfill: () => bufferPolyfill
|
|
22
|
+
Buffer: () => import_buffer.Buffer
|
|
25
23
|
});
|
|
26
24
|
module.exports = __toCommonJS(browser_exports);
|
|
27
|
-
|
|
28
|
-
// src/browser/bufferPolyfill.ts
|
|
25
|
+
__reExport(browser_exports, require("./bufferPolyfill"), module.exports);
|
|
29
26
|
var import_buffer = require("buffer/");
|
|
30
|
-
var isBrowser = () => {
|
|
31
|
-
return typeof window !== "undefined" && typeof window?.document !== "undefined";
|
|
32
|
-
};
|
|
33
|
-
var isWebworker = () => {
|
|
34
|
-
return typeof self === "object" && self.constructor?.name === "DedicatedWorkerGlobalScope";
|
|
35
|
-
};
|
|
36
|
-
var bufferPolyfill = () => {
|
|
37
|
-
const global = isBrowser() ? window : isWebworker() ? self : void 0;
|
|
38
|
-
if (global && global.Buffer === void 0) {
|
|
39
|
-
global.Buffer = import_buffer.Buffer;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// src/browser/index.ts
|
|
44
|
-
var import_buffer2 = require("buffer/");
|
|
45
27
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/browser/index.ts"
|
|
1
|
+
{"version":3,"sources":["../../src/browser/index.ts"],"sourcesContent":["export * from './bufferPolyfill'\nexport { Buffer } from 'buffer/'\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAc,6BAAd;AACA,oBAAuB;","names":[]}
|
package/dist/browser/index.js
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./bufferPolyfill";
|
|
2
2
|
import { Buffer } from "buffer/";
|
|
3
|
-
var isBrowser = () => {
|
|
4
|
-
return typeof window !== "undefined" && typeof window?.document !== "undefined";
|
|
5
|
-
};
|
|
6
|
-
var isWebworker = () => {
|
|
7
|
-
return typeof self === "object" && self.constructor?.name === "DedicatedWorkerGlobalScope";
|
|
8
|
-
};
|
|
9
|
-
var bufferPolyfill = () => {
|
|
10
|
-
const global = isBrowser() ? window : isWebworker() ? self : void 0;
|
|
11
|
-
if (global && global.Buffer === void 0) {
|
|
12
|
-
global.Buffer = Buffer;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// src/browser/index.ts
|
|
17
|
-
import { Buffer as Buffer2 } from "buffer/";
|
|
18
3
|
export {
|
|
19
|
-
|
|
20
|
-
bufferPolyfill
|
|
4
|
+
Buffer
|
|
21
5
|
};
|
|
22
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/browser/
|
|
1
|
+
{"version":3,"sources":["../../src/browser/index.ts"],"sourcesContent":["export * from './bufferPolyfill'\nexport { Buffer } from 'buffer/'\n"],"mappings":"AAAA,cAAc;AACd,SAAS,cAAc;","names":[]}
|
|
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/node/bufferPolyfill.ts
|
|
19
21
|
var bufferPolyfill_exports = {};
|
|
20
22
|
__export(bufferPolyfill_exports, {
|
|
21
23
|
bufferPolyfill: () => bufferPolyfill
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(bufferPolyfill_exports);
|
|
24
|
-
|
|
26
|
+
var bufferPolyfill = () => {
|
|
25
27
|
return;
|
|
26
28
|
};
|
|
27
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/node/bufferPolyfill.ts"],"sourcesContent":["export const bufferPolyfill = () => {\n return\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/node/bufferPolyfill.ts"],"sourcesContent":["export const bufferPolyfill = () => {\n return\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,iBAAiB,MAAM;AAClC;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/node/bufferPolyfill.ts"],"sourcesContent":["export const bufferPolyfill = () => {\n return\n}\n"],"mappings":"AAAO,
|
|
1
|
+
{"version":3,"sources":["../../src/node/bufferPolyfill.ts"],"sourcesContent":["export const bufferPolyfill = () => {\n return\n}\n"],"mappings":";AAAO,IAAM,iBAAiB,MAAM;AAClC;AACF;","names":[]}
|
package/dist/node/index.js
CHANGED
|
@@ -15,18 +15,26 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/node/index.ts
|
|
20
21
|
var node_exports = {};
|
|
21
22
|
__export(node_exports, {
|
|
22
|
-
Buffer: () => import_buffer.Buffer
|
|
23
|
+
Buffer: () => import_buffer.Buffer,
|
|
24
|
+
bufferPolyfill: () => bufferPolyfill
|
|
23
25
|
});
|
|
24
26
|
module.exports = __toCommonJS(node_exports);
|
|
25
|
-
|
|
27
|
+
|
|
28
|
+
// src/node/bufferPolyfill.ts
|
|
29
|
+
var bufferPolyfill = () => {
|
|
30
|
+
return;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// src/node/index.ts
|
|
26
34
|
var import_buffer = require("buffer");
|
|
27
35
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28
36
|
0 && (module.exports = {
|
|
29
37
|
Buffer,
|
|
30
|
-
|
|
38
|
+
bufferPolyfill
|
|
31
39
|
});
|
|
32
40
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/node/index.ts"],"sourcesContent":["export * from './bufferPolyfill'\nexport { Buffer } from 'buffer'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/node/index.ts","../../src/node/bufferPolyfill.ts"],"sourcesContent":["export * from './bufferPolyfill'\nexport { Buffer } from 'buffer'\n","export const bufferPolyfill = () => {\n return\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,iBAAiB,MAAM;AAClC;AACF;;;ADDA,oBAAuB;","names":[]}
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
// src/node/bufferPolyfill.ts
|
|
2
|
+
var bufferPolyfill = () => {
|
|
3
|
+
return;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// src/node/index.ts
|
|
2
7
|
import { Buffer } from "buffer";
|
|
3
8
|
export {
|
|
4
|
-
Buffer
|
|
9
|
+
Buffer,
|
|
10
|
+
bufferPolyfill
|
|
5
11
|
};
|
|
6
12
|
//# sourceMappingURL=index.mjs.map
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/node/index.ts"],"sourcesContent":["export * from './bufferPolyfill'\nexport { Buffer } from 'buffer'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/node/bufferPolyfill.ts","../../src/node/index.ts"],"sourcesContent":["export const bufferPolyfill = () => {\n return\n}\n","export * from './bufferPolyfill'\nexport { Buffer } from 'buffer'\n"],"mappings":";AAAO,IAAM,iBAAiB,MAAM;AAClC;AACF;;;ACDA,SAAS,cAAc;","names":[]}
|
package/package.json
CHANGED
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^20.7.0",
|
|
56
|
-
"@xylabs/ts-scripts-yarn3": "^3.0.
|
|
57
|
-
"@xylabs/tsconfig": "^3.0.
|
|
58
|
-
"@xylabs/tsconfig-dom": "^3.0.
|
|
56
|
+
"@xylabs/ts-scripts-yarn3": "^3.0.74",
|
|
57
|
+
"@xylabs/tsconfig": "^3.0.74",
|
|
58
|
+
"@xylabs/tsconfig-dom": "^3.0.74",
|
|
59
59
|
"typescript": "^5.2.2"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
67
67
|
},
|
|
68
68
|
"sideEffects": false,
|
|
69
|
-
"version": "2.11.
|
|
69
|
+
"version": "2.11.24",
|
|
70
70
|
"xy": {
|
|
71
71
|
"compile": {
|
|
72
72
|
"browser": {
|