@pezkuwi/x-bundle 14.0.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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @pezkuwi/x-bundle
2
+
3
+ A rollup-only package to allow for bundling of builtin dependencies
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "author": "Jaco Greeff <jacogr@gmail.com>",
3
+ "bugs": "https://github.com/pezkuwichain/pezkuwi-common/issues",
4
+ "description": "A bundler helper",
5
+ "engines": {
6
+ "node": ">=18"
7
+ },
8
+ "homepage": "https://github.com/pezkuwichain/pezkuwi-common/tree/master/packages/x-bundle#readme",
9
+ "license": "Apache-2.0",
10
+ "name": "@pezkuwi/x-bundle",
11
+ "repository": {
12
+ "directory": "packages/x-bundle",
13
+ "type": "git",
14
+ "url": "https://github.com/pezkuwichain/pezkuwi-common.git"
15
+ },
16
+ "sideEffects": false,
17
+ "type": "module",
18
+ "version": "14.0.1",
19
+ "main": "index.js",
20
+ "dependencies": {
21
+ "@pezkuwi/util": "14.0.1",
22
+ "buffer-es6": "^4.9.3",
23
+ "tslib": "^2.8.0"
24
+ }
25
+ }
package/src/buffer.ts ADDED
@@ -0,0 +1,8 @@
1
+ // Copyright 2017-2025 @polkadot/x-bundle authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // @ts-expect-error Only used in rollup bundling, we are not adding a declaration
5
+ import { Buffer } from 'buffer-es6';
6
+
7
+ export default Buffer;
8
+ export { Buffer };
package/src/cjs/bn.js ADDED
@@ -0,0 +1,7 @@
1
+ // Copyright 2017-2025 @polkadot/x-bundle authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // @ts-expect-error In dev mode we don't have export maps...
5
+ const { BN } = require('@polkadot/util');
6
+
7
+ module.exports = BN;
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
package/src/crypto.ts ADDED
@@ -0,0 +1,4 @@
1
+ // Copyright 2017-2025 @polkadot/x-bundle authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ export default {};
package/src/dummy.ts ADDED
@@ -0,0 +1,8 @@
1
+ // Copyright 2017-2025 @polkadot/x-bundle authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // This is a dummy, aka we don't check requires and then have
5
+ // some issues with the fact that we have a util reference
6
+ import { BN } from '@pezkuwi/util';
7
+
8
+ export { BN };
package/src/empty.ts ADDED
@@ -0,0 +1,4 @@
1
+ // Copyright 2017-2025 @polkadot/x-bundle authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ export default {};
package/src/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ // Copyright 2017-2025 @polkadot/x-bundle authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ export { packageInfo } from './packageInfo.js';
5
+
6
+ console.error('@polkadot/x-bundle is not meant to be used directly');
@@ -0,0 +1,28 @@
1
+ // Copyright 2017-2025 @polkadot/x-bundle authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // Adapted from https://github.com/isaacs/inherits/blob/dbade4c47c548aa7259017eca8874d61c8aaad2b/inherits_browser.js
5
+ // The ISC License
6
+ // Copyright (c) Isaac Z. Schlueter
7
+
8
+ interface Class {
9
+ prototype: object;
10
+ super_: Class;
11
+
12
+ [key: string]: unknown;
13
+ }
14
+
15
+ export default function inherits (child: Class, parent: Class): void {
16
+ if (parent) {
17
+ child.super_ = parent;
18
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
19
+ child.prototype = Object.create(parent.prototype, {
20
+ constructor: {
21
+ configurable: true,
22
+ enumerable: false,
23
+ value: child,
24
+ writable: true
25
+ }
26
+ });
27
+ }
28
+ }
@@ -0,0 +1,6 @@
1
+ // Copyright 2017-2025 @polkadot/x-bundle authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // Do not edit, auto-generated by @polkadot/dev
5
+
6
+ export const packageInfo = { name: '@polkadot/x-bundle', path: 'auto', type: 'auto', version: '14.0.1' };
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "baseUrl": "..",
5
+ "outDir": "./build",
6
+ "rootDir": "./src"
7
+ },
8
+ "references": [
9
+ { "path": "../util/tsconfig.build.json" }
10
+ ]
11
+ }