@xylabs/buffer 2.11.2 → 2.11.3

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.
Files changed (46) hide show
  1. package/dist/{Buffer2.js → browser/Buffer.js} +1 -1
  2. package/dist/{Buffer2.mjs → browser/Buffer.mjs} +1 -1
  3. package/dist/{bufferPolyfill2.js → browser/bufferPolyfill.js} +1 -1
  4. package/dist/browser/bufferPolyfill.js.map +1 -0
  5. package/dist/{bufferPolyfill2.mjs → browser/bufferPolyfill.mjs} +1 -1
  6. package/dist/browser/bufferPolyfill.mjs.map +1 -0
  7. package/dist/{index2.js → browser/index.js} +2 -2
  8. package/dist/browser/index.js.map +1 -0
  9. package/dist/browser/index.mjs +3 -0
  10. package/dist/browser/index.mjs.map +1 -0
  11. package/dist/index.js +22 -7
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +17 -2
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/node/Buffer.js.map +1 -0
  16. package/dist/node/Buffer.mjs.map +1 -0
  17. package/dist/node/bufferPolyfill.js.map +1 -0
  18. package/dist/node/bufferPolyfill.mjs.map +1 -0
  19. package/dist/node/index.js +13 -0
  20. package/dist/node/index.js.map +1 -0
  21. package/dist/node/index.mjs +3 -0
  22. package/dist/node/index.mjs.map +1 -0
  23. package/dist/nodeIndex.js +9 -8
  24. package/dist/nodeIndex.js.map +1 -1
  25. package/dist/nodeIndex.mjs +6 -1
  26. package/dist/nodeIndex.mjs.map +1 -1
  27. package/package.json +4 -4
  28. package/dist/Buffer2.js.map +0 -1
  29. package/dist/Buffer2.mjs.map +0 -1
  30. package/dist/bufferPolyfill.js.map +0 -1
  31. package/dist/bufferPolyfill.mjs.map +0 -1
  32. package/dist/bufferPolyfill2.js.map +0 -1
  33. package/dist/bufferPolyfill2.mjs.map +0 -1
  34. package/dist/index2.js.map +0 -1
  35. package/dist/index2.mjs +0 -3
  36. package/dist/index2.mjs.map +0 -1
  37. package/dist/index3.js +0 -18
  38. package/dist/index3.js.map +0 -1
  39. package/dist/index3.mjs +0 -3
  40. package/dist/index3.mjs.map +0 -1
  41. /package/dist/{Buffer.js.map → browser/Buffer.js.map} +0 -0
  42. /package/dist/{Buffer.mjs.map → browser/Buffer.mjs.map} +0 -0
  43. /package/dist/{Buffer.js → node/Buffer.js} +0 -0
  44. /package/dist/{Buffer.mjs → node/Buffer.mjs} +0 -0
  45. /package/dist/{bufferPolyfill.js → node/bufferPolyfill.js} +0 -0
  46. /package/dist/{bufferPolyfill.mjs → node/bufferPolyfill.mjs} +0 -0
@@ -8,4 +8,4 @@ Object.defineProperty(exports, 'BrowserBuffer', {
8
8
  enumerable: true,
9
9
  get: function () { return _.Buffer; }
10
10
  });
11
- //# sourceMappingURL=Buffer2.js.map
11
+ //# sourceMappingURL=Buffer.js.map
@@ -1,2 +1,2 @@
1
1
  export { Buffer as BrowserBuffer } from 'buffer/';
2
- //# sourceMappingURL=Buffer2.mjs.map
2
+ //# sourceMappingURL=Buffer.mjs.map
@@ -16,4 +16,4 @@ const bufferPolyfillBrowser = () => {
16
16
  };
17
17
 
18
18
  exports.bufferPolyfillBrowser = bufferPolyfillBrowser;
19
- //# sourceMappingURL=bufferPolyfill2.js.map
19
+ //# sourceMappingURL=bufferPolyfill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bufferPolyfill.js","sources":["../../src/browser/bufferPolyfill.ts"],"sourcesContent":["import { BrowserBuffer } from './Buffer';\nconst isBrowser = () => {\n return typeof window !== 'undefined' && typeof window?.document !== 'undefined';\n};\nconst isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope';\n};\nexport const bufferPolyfillBrowser = () => {\n const global = isBrowser() ? window : isWebworker() ? self : undefined;\n if (global && global.Buffer === undefined) {\n global.Buffer = BrowserBuffer;\n }\n};\n//# sourceMappingURL=bufferPolyfill.js.map"],"names":["BrowserBuffer"],"mappings":";;;;AACA,MAAM,SAAS,GAAG,MAAM;AACxB,IAAI,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,EAAE,QAAQ,KAAK,WAAW,CAAC;AACpF,CAAC,CAAC;AACF,MAAM,WAAW,GAAG,MAAM;AAC1B,IAAI,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,4BAA4B,CAAC;AAC/F,CAAC,CAAC;AACU,MAAC,qBAAqB,GAAG,MAAM;AAC3C,IAAI,MAAM,MAAM,GAAG,SAAS,EAAE,GAAG,MAAM,GAAG,WAAW,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAC3E,IAAI,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE;AAC/C,QAAQ,MAAM,CAAC,MAAM,GAAGA,QAAa,CAAC;AACtC,KAAK;AACL;;;;"}
@@ -14,4 +14,4 @@ const bufferPolyfillBrowser = () => {
14
14
  };
15
15
 
16
16
  export { bufferPolyfillBrowser };
17
- //# sourceMappingURL=bufferPolyfill2.mjs.map
17
+ //# sourceMappingURL=bufferPolyfill.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bufferPolyfill.mjs","sources":["../../src/browser/bufferPolyfill.ts"],"sourcesContent":["import { BrowserBuffer } from './Buffer';\nconst isBrowser = () => {\n return typeof window !== 'undefined' && typeof window?.document !== 'undefined';\n};\nconst isWebworker = () => {\n return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope';\n};\nexport const bufferPolyfillBrowser = () => {\n const global = isBrowser() ? window : isWebworker() ? self : undefined;\n if (global && global.Buffer === undefined) {\n global.Buffer = BrowserBuffer;\n }\n};\n//# sourceMappingURL=bufferPolyfill.js.map"],"names":["BrowserBuffer"],"mappings":";;AACA,MAAM,SAAS,GAAG,MAAM;AACxB,IAAI,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,EAAE,QAAQ,KAAK,WAAW,CAAC;AACpF,CAAC,CAAC;AACF,MAAM,WAAW,GAAG,MAAM;AAC1B,IAAI,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,4BAA4B,CAAC;AAC/F,CAAC,CAAC;AACU,MAAC,qBAAqB,GAAG,MAAM;AAC3C,IAAI,MAAM,MAAM,GAAG,SAAS,EAAE,GAAG,MAAM,GAAG,WAAW,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAC3E,IAAI,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE;AAC/C,QAAQ,MAAM,CAAC,MAAM,GAAGA,MAAa,CAAC;AACtC,KAAK;AACL;;;;"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _ = require('buffer/');
4
- var bufferPolyfill = require('./bufferPolyfill2.js');
4
+ var bufferPolyfill = require('./bufferPolyfill.js');
5
5
 
6
6
 
7
7
 
@@ -10,4 +10,4 @@ Object.defineProperty(exports, 'BrowserBuffer', {
10
10
  get: function () { return _.Buffer; }
11
11
  });
12
12
  exports.bufferPolyfillBrowser = bufferPolyfill.bufferPolyfillBrowser;
13
- //# sourceMappingURL=index2.js.map
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ export { Buffer as BrowserBuffer } from 'buffer/';
2
+ export { bufferPolyfillBrowser } from './bufferPolyfill.mjs';
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index.js CHANGED
@@ -1,13 +1,28 @@
1
1
  'use strict';
2
2
 
3
- var buffer = require('buffer');
4
- var bufferPolyfill = require('./bufferPolyfill.js');
3
+ var _ = require('buffer/');
5
4
 
5
+ const isBrowser = () => {
6
+ return typeof window !== 'undefined' && typeof window?.document !== 'undefined';
7
+ };
8
+ const isWebworker = () => {
9
+ return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope';
10
+ };
11
+ const bufferPolyfillBrowser = () => {
12
+ const global = isBrowser() ? window : isWebworker() ? self : undefined;
13
+ if (global && global.Buffer === undefined) {
14
+ global.Buffer = _.Buffer;
15
+ }
16
+ };
6
17
 
7
-
8
- Object.defineProperty(exports, 'NodeBuffer', {
9
- enumerable: true,
10
- get: function () { return buffer.Buffer; }
18
+ Object.defineProperty(exports, 'BrowserBuffer', {
19
+ enumerable: true,
20
+ get: function () { return _.Buffer; }
21
+ });
22
+ Object.defineProperty(exports, 'Buffer', {
23
+ enumerable: true,
24
+ get: function () { return _.Buffer; }
11
25
  });
12
- exports.bufferPolyfillNode = bufferPolyfill.bufferPolyfillNode;
26
+ exports.bufferPolyfill = bufferPolyfillBrowser;
27
+ exports.bufferPolyfillBrowser = bufferPolyfillBrowser;
13
28
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.mjs CHANGED
@@ -1,3 +1,18 @@
1
- export { Buffer as NodeBuffer } from 'buffer';
2
- export { bufferPolyfillNode } from './bufferPolyfill.mjs';
1
+ import { Buffer } from 'buffer/';
2
+ export { Buffer as BrowserBuffer, Buffer } from 'buffer/';
3
+
4
+ const isBrowser = () => {
5
+ return typeof window !== 'undefined' && typeof window?.document !== 'undefined';
6
+ };
7
+ const isWebworker = () => {
8
+ return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope';
9
+ };
10
+ const bufferPolyfillBrowser = () => {
11
+ const global = isBrowser() ? window : isWebworker() ? self : undefined;
12
+ if (global && global.Buffer === undefined) {
13
+ global.Buffer = Buffer;
14
+ }
15
+ };
16
+
17
+ export { bufferPolyfillBrowser as bufferPolyfill, bufferPolyfillBrowser };
3
18
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Buffer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Buffer.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bufferPolyfill.js","sources":["../../src/node/bufferPolyfill.ts"],"sourcesContent":["export const bufferPolyfillNode = () => {\n return;\n};\n//# sourceMappingURL=bufferPolyfill.js.map"],"names":[],"mappings":";;AAAY,MAAC,kBAAkB,GAAG,MAAM;AACxC,IAAI,OAAO;AACX;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bufferPolyfill.mjs","sources":["../../src/node/bufferPolyfill.ts"],"sourcesContent":["export const bufferPolyfillNode = () => {\n return;\n};\n//# sourceMappingURL=bufferPolyfill.js.map"],"names":[],"mappings":"AAAY,MAAC,kBAAkB,GAAG,MAAM;AACxC,IAAI,OAAO;AACX;;;;"}
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var buffer = require('buffer');
4
+ var bufferPolyfill = require('./bufferPolyfill.js');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, 'NodeBuffer', {
9
+ enumerable: true,
10
+ get: function () { return buffer.Buffer; }
11
+ });
12
+ exports.bufferPolyfillNode = bufferPolyfill.bufferPolyfillNode;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ export { Buffer as NodeBuffer } from 'buffer';
2
+ export { bufferPolyfillNode } from './bufferPolyfill.mjs';
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/nodeIndex.js CHANGED
@@ -1,18 +1,19 @@
1
1
  'use strict';
2
2
 
3
3
  var buffer = require('buffer');
4
- var bufferPolyfill = require('./bufferPolyfill.js');
5
-
6
4
 
5
+ const bufferPolyfillNode = () => {
6
+ return;
7
+ };
7
8
 
8
9
  Object.defineProperty(exports, 'Buffer', {
9
- enumerable: true,
10
- get: function () { return buffer.Buffer; }
10
+ enumerable: true,
11
+ get: function () { return buffer.Buffer; }
11
12
  });
12
13
  Object.defineProperty(exports, 'NodeBuffer', {
13
- enumerable: true,
14
- get: function () { return buffer.Buffer; }
14
+ enumerable: true,
15
+ get: function () { return buffer.Buffer; }
15
16
  });
16
- exports.bufferPolyfill = bufferPolyfill.bufferPolyfillNode;
17
- exports.bufferPolyfillNode = bufferPolyfill.bufferPolyfillNode;
17
+ exports.bufferPolyfill = bufferPolyfillNode;
18
+ exports.bufferPolyfillNode = bufferPolyfillNode;
18
19
  //# sourceMappingURL=nodeIndex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodeIndex.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"nodeIndex.js","sources":["../src/node/bufferPolyfill.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAO,MAAA,kBAAwB,GAAA,MAAA;;;;;;;;;;;;;;;"}
@@ -1,3 +1,8 @@
1
1
  export { Buffer, Buffer as NodeBuffer } from 'buffer';
2
- export { bufferPolyfillNode as bufferPolyfill, bufferPolyfillNode } from './bufferPolyfill.mjs';
2
+
3
+ const bufferPolyfillNode = () => {
4
+ return;
5
+ };
6
+
7
+ export { bufferPolyfillNode as bufferPolyfill, bufferPolyfillNode };
3
8
  //# sourceMappingURL=nodeIndex.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodeIndex.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"nodeIndex.mjs","sources":["../src/node/bufferPolyfill.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAO,MAAA,kBAAwB,GAAA,MAAA;;;;;;"}
package/package.json CHANGED
@@ -50,9 +50,9 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^20.6.1",
53
- "@xylabs/ts-scripts-yarn3": "^3.0.0-rc.27",
54
- "@xylabs/tsconfig": "^3.0.0-rc.27",
55
- "@xylabs/tsconfig-dom": "^3.0.0-rc.27",
53
+ "@xylabs/ts-scripts-yarn3": "^3.0.0",
54
+ "@xylabs/tsconfig": "^3.0.0",
55
+ "@xylabs/tsconfig-dom": "^3.0.0",
56
56
  "typescript": "^5.2.2"
57
57
  },
58
58
  "publishConfig": {
@@ -63,5 +63,5 @@
63
63
  "url": "https://github.com/xylabs/sdk-js.git"
64
64
  },
65
65
  "sideEffects": false,
66
- "version": "2.11.2"
66
+ "version": "2.11.3"
67
67
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"Buffer2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Buffer2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"bufferPolyfill.js","sources":["../src/node/bufferPolyfill.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAO,MAAA,kBAAwB,GAAA,MAAA;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"bufferPolyfill.mjs","sources":["../src/node/bufferPolyfill.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAO,MAAA,kBAAwB,GAAA,MAAA;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"bufferPolyfill2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"bufferPolyfill2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
package/dist/index2.mjs DELETED
@@ -1,3 +0,0 @@
1
- export { Buffer as BrowserBuffer } from 'buffer/';
2
- export { bufferPolyfillBrowser } from './bufferPolyfill2.mjs';
3
- //# sourceMappingURL=index2.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index3.js DELETED
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- var _ = require('buffer/');
4
- var bufferPolyfill = require('./bufferPolyfill2.js');
5
-
6
-
7
-
8
- Object.defineProperty(exports, 'BrowserBuffer', {
9
- enumerable: true,
10
- get: function () { return _.Buffer; }
11
- });
12
- Object.defineProperty(exports, 'Buffer', {
13
- enumerable: true,
14
- get: function () { return _.Buffer; }
15
- });
16
- exports.bufferPolyfill = bufferPolyfill.bufferPolyfillBrowser;
17
- exports.bufferPolyfillBrowser = bufferPolyfill.bufferPolyfillBrowser;
18
- //# sourceMappingURL=index3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
package/dist/index3.mjs DELETED
@@ -1,3 +0,0 @@
1
- export { Buffer as BrowserBuffer, Buffer } from 'buffer/';
2
- export { bufferPolyfillBrowser as bufferPolyfill, bufferPolyfillBrowser } from './bufferPolyfill2.mjs';
3
- //# sourceMappingURL=index3.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
File without changes
File without changes
File without changes
File without changes