Skip to content

Commit

Permalink
fix(exports): update package exports to have index in src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Feb 23, 2024
1 parent 5a9e232 commit 2cce9e3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
10 changes: 5 additions & 5 deletions examples/node/index.cjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { ArIO } = require('../../lib/cjs/node');
const { ArIO } = require('../../lib/cjs');

(async () => {
const arIO = new ArIO({});
const testnetClient = arIO.testnet;
const devnetClient = arIO.devnet;
const testnetContract = arIO.testnet;
const devnetContract = arIO.devnet;

const testnetGateways = await testnetClient.getGateways();
const devnetGateways = await devnetClient.getGateways();
const testnetGateways = await testnetContract.getGateways();
const devnetGateways = await devnetContract.getGateways();

console.dir({ testnetGateways, devnetGateways }, { depth: 2 });
})();
10 changes: 5 additions & 5 deletions examples/node/index.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ArIO } from '../../lib/esm/node/index.js';
import { ArIO } from '../../lib/esm/index.js';

(async () => {
const arIO = new ArIO({});
const testnetClient = arIO.testnet;
const devnetClient = arIO.devnet;
const testnetContract = arIO.testnet;
const devnetContract = arIO.devnet;

const testnetGateways = await testnetClient.getGateways();
const devnetGateways = await devnetClient.getGateways();
const testnetGateways = await testnetContract.getGateways();
const devnetGateways = await devnetContract.getGateways();

console.dir({ testnetGateways, devnetGateways }, { depth: 2 });
})();
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@ar-io/sdk",
"version": "0.0.1",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"types": "./lib/types/index.d.ts",
"type": "module",
"files": [
"lib",
Expand Down
17 changes: 17 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
export * from './common/ar-io.js';

0 comments on commit 2cce9e3

Please sign in to comment.