@xylabs/buffer 2.11.1 → 2.11.2
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/Buffer.js +11 -0
- package/dist/Buffer.js.map +1 -0
- package/dist/Buffer.mjs +2 -0
- package/dist/Buffer.mjs.map +1 -0
- package/dist/Buffer2.js +11 -0
- package/dist/Buffer2.js.map +1 -0
- package/dist/Buffer2.mjs +2 -0
- package/dist/Buffer2.mjs.map +1 -0
- package/dist/browser/Buffer.d.mts +3 -0
- package/dist/browser/Buffer.d.mts.map +1 -0
- package/dist/browser/bufferPolyfill.d.mts +2 -0
- package/dist/browser/bufferPolyfill.d.mts.map +1 -0
- package/dist/browser/index.d.mts +3 -0
- package/dist/browser/index.d.mts.map +1 -0
- package/dist/bufferPolyfill.js +8 -0
- package/dist/bufferPolyfill.js.map +1 -0
- package/dist/bufferPolyfill.mjs +6 -0
- package/dist/bufferPolyfill.mjs.map +1 -0
- package/dist/bufferPolyfill2.js +19 -0
- package/dist/bufferPolyfill2.js.map +1 -0
- package/dist/bufferPolyfill2.mjs +17 -0
- package/dist/bufferPolyfill2.mjs.map +1 -0
- package/dist/index.js +7 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -17
- package/dist/index.mjs.map +1 -1
- package/dist/index2.js +13 -0
- package/dist/index2.js.map +1 -0
- package/dist/index2.mjs +3 -0
- package/dist/index2.mjs.map +1 -0
- package/dist/index3.js +18 -0
- package/dist/index3.js.map +1 -0
- package/dist/index3.mjs +3 -0
- package/dist/index3.mjs.map +1 -0
- package/dist/node/Buffer.d.mts +3 -0
- package/dist/node/Buffer.d.mts.map +1 -0
- package/dist/node/bufferPolyfill.d.mts +2 -0
- package/dist/node/bufferPolyfill.d.mts.map +1 -0
- package/dist/node/index.d.mts +3 -0
- package/dist/node/index.d.mts.map +1 -0
- package/dist/nodeIndex.d.mts +3 -0
- package/dist/nodeIndex.d.mts.map +1 -0
- package/dist/nodeIndex.js +8 -9
- package/dist/nodeIndex.js.map +1 -1
- package/dist/nodeIndex.mjs +1 -6
- package/dist/nodeIndex.mjs.map +1 -1
- package/package.json +6 -25
package/dist/Buffer.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Buffer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/Buffer.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Buffer.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/Buffer2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Buffer2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/Buffer2.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Buffer2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Buffer.d.ts","sourceRoot":"","sources":["../../src/browser/Buffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,SAAS,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../src/browser/bufferPolyfill.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,qBAAqB,YAKjC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bufferPolyfill.js","sources":["../src/node/bufferPolyfill.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAO,MAAA,kBAAwB,GAAA,MAAA;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bufferPolyfill.mjs","sources":["../src/node/bufferPolyfill.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAO,MAAA,kBAAwB,GAAA,MAAA;;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _ = require('buffer/');
|
|
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
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.bufferPolyfillBrowser = bufferPolyfillBrowser;
|
|
19
|
+
//# sourceMappingURL=bufferPolyfill2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bufferPolyfill2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Buffer } from 'buffer/';
|
|
2
|
+
|
|
3
|
+
const isBrowser = () => {
|
|
4
|
+
return typeof window !== 'undefined' && typeof window?.document !== 'undefined';
|
|
5
|
+
};
|
|
6
|
+
const isWebworker = () => {
|
|
7
|
+
return typeof self === 'object' && self.constructor?.name === 'DedicatedWorkerGlobalScope';
|
|
8
|
+
};
|
|
9
|
+
const bufferPolyfillBrowser = () => {
|
|
10
|
+
const global = isBrowser() ? window : isWebworker() ? self : undefined;
|
|
11
|
+
if (global && global.Buffer === undefined) {
|
|
12
|
+
global.Buffer = Buffer;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { bufferPolyfillBrowser };
|
|
17
|
+
//# sourceMappingURL=bufferPolyfill2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bufferPolyfill2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var buffer = require('buffer');
|
|
4
|
+
var bufferPolyfill = require('./bufferPolyfill.js');
|
|
4
5
|
|
|
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
|
-
};
|
|
17
6
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Object.defineProperty(exports, 'Buffer', {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () { return _.Buffer; }
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, 'NodeBuffer', {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return buffer.Buffer; }
|
|
25
11
|
});
|
|
26
|
-
exports.
|
|
27
|
-
exports.bufferPolyfillBrowser = bufferPolyfillBrowser;
|
|
12
|
+
exports.bufferPolyfillNode = bufferPolyfill.bufferPolyfillNode;
|
|
28
13
|
//# 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,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
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 };
|
|
1
|
+
export { Buffer as NodeBuffer } from 'buffer';
|
|
2
|
+
export { bufferPolyfillNode } from './bufferPolyfill.mjs';
|
|
18
3
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index2.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
exports.bufferPolyfillBrowser = bufferPolyfill.bufferPolyfillBrowser;
|
|
13
|
+
//# sourceMappingURL=index2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/dist/index2.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index3.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
package/dist/index3.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Buffer.d.ts","sourceRoot":"","sources":["../../src/node/Buffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bufferPolyfill.d.ts","sourceRoot":"","sources":["../../src/node/bufferPolyfill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,YAE9B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeIndex.d.ts","sourceRoot":"","sources":["../src/nodeIndex.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,kBAAkB,IAAI,cAAc,EAAE,MAAM,QAAQ,CAAA"}
|
package/dist/nodeIndex.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var buffer = require('buffer');
|
|
4
|
+
var bufferPolyfill = require('./bufferPolyfill.js');
|
|
5
|
+
|
|
4
6
|
|
|
5
|
-
const bufferPolyfillNode = () => {
|
|
6
|
-
return;
|
|
7
|
-
};
|
|
8
7
|
|
|
9
8
|
Object.defineProperty(exports, 'Buffer', {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return buffer.Buffer; }
|
|
12
11
|
});
|
|
13
12
|
Object.defineProperty(exports, 'NodeBuffer', {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return buffer.Buffer; }
|
|
16
15
|
});
|
|
17
|
-
exports.bufferPolyfill = bufferPolyfillNode;
|
|
18
|
-
exports.bufferPolyfillNode = bufferPolyfillNode;
|
|
16
|
+
exports.bufferPolyfill = bufferPolyfill.bufferPolyfillNode;
|
|
17
|
+
exports.bufferPolyfillNode = bufferPolyfill.bufferPolyfillNode;
|
|
19
18
|
//# sourceMappingURL=nodeIndex.js.map
|
package/dist/nodeIndex.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeIndex.js","sources":[
|
|
1
|
+
{"version":3,"file":"nodeIndex.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
package/dist/nodeIndex.mjs
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
export { Buffer, Buffer as NodeBuffer } from 'buffer';
|
|
2
|
-
|
|
3
|
-
const bufferPolyfillNode = () => {
|
|
4
|
-
return;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export { bufferPolyfillNode as bufferPolyfill, bufferPolyfillNode };
|
|
2
|
+
export { bufferPolyfillNode as bufferPolyfill, bufferPolyfillNode } from './bufferPolyfill.mjs';
|
|
8
3
|
//# sourceMappingURL=nodeIndex.mjs.map
|
package/dist/nodeIndex.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeIndex.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"nodeIndex.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/package.json
CHANGED
|
@@ -24,35 +24,16 @@
|
|
|
24
24
|
},
|
|
25
25
|
"import": {
|
|
26
26
|
"node": {
|
|
27
|
-
"types": "./dist/nodeIndex.d.
|
|
27
|
+
"types": "./dist/nodeIndex.d.ts",
|
|
28
28
|
"default": "./dist/nodeIndex.mjs"
|
|
29
29
|
},
|
|
30
30
|
"types": "./dist/index.d.mts",
|
|
31
31
|
"default": "./dist/index.mjs"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
"./dist/docs.json": {
|
|
35
|
-
"default": "./dist/docs.json"
|
|
36
|
-
},
|
|
37
|
-
"./cjs": {
|
|
38
|
-
"types": "./dist/index.d.ts",
|
|
39
|
-
"default": "./dist/index.js"
|
|
40
|
-
},
|
|
41
34
|
"./docs": {
|
|
42
35
|
"default": "./dist/docs.json"
|
|
43
36
|
},
|
|
44
|
-
"./esm": {
|
|
45
|
-
"types": "./dist/index.d.mts",
|
|
46
|
-
"default": "./dist/index.mjs"
|
|
47
|
-
},
|
|
48
|
-
"./node/cjs": {
|
|
49
|
-
"types": "./dist/nodeIndex.d.ts",
|
|
50
|
-
"default": "./dist/nodeIndex.js"
|
|
51
|
-
},
|
|
52
|
-
"./node/esm": {
|
|
53
|
-
"types": "./dist/nodeIndex.d.mts",
|
|
54
|
-
"default": "./dist/nodeIndex.mjs"
|
|
55
|
-
},
|
|
56
37
|
"./package.json": "./package.json"
|
|
57
38
|
},
|
|
58
39
|
"main": "dist/index.js",
|
|
@@ -68,10 +49,10 @@
|
|
|
68
49
|
"buffer": "^6.0.3"
|
|
69
50
|
},
|
|
70
51
|
"devDependencies": {
|
|
71
|
-
"@types/node": "^20.6.
|
|
72
|
-
"@xylabs/ts-scripts-yarn3": "^3.0.0-rc.
|
|
73
|
-
"@xylabs/tsconfig": "^3.0.0-rc.
|
|
74
|
-
"@xylabs/tsconfig-dom": "^3.0.0-rc.
|
|
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",
|
|
75
56
|
"typescript": "^5.2.2"
|
|
76
57
|
},
|
|
77
58
|
"publishConfig": {
|
|
@@ -82,5 +63,5 @@
|
|
|
82
63
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
83
64
|
},
|
|
84
65
|
"sideEffects": false,
|
|
85
|
-
"version": "2.11.
|
|
66
|
+
"version": "2.11.2"
|
|
86
67
|
}
|