Fixed import bugs.

This commit is contained in:
Qortal Dev 2023-10-17 15:02:10 -06:00
parent 7fe7c9da14
commit ed9a419b92
6 changed files with 25 additions and 9 deletions

View File

@ -1,2 +0,0 @@
const QortalUtils = require("./src/");
module.exports = QortalUtils;

11
index.ts Normal file
View File

@ -0,0 +1,11 @@
export * from "./src/Core/Interfaces";
export * from "./src/Core/SendCoin";
export * from "./src/Core/Types";
export * from "./src/Core/API/Names";
export * from "./src/Core/API/QortalRequest";
export * from "./src/Core/API/Transactions";
export * from "./src/Numbers/Colors";
export * from "./src/Numbers/NumberConversion";
export * from "./src/Numbers/Numbers";
export * from "./src/Numbers/StringNumbers";
export * from "./src/Strings/printFunctions";

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "qortal-app-utils", "name": "qortal-app-utils",
"version": "1.0.0", "version": "1.1.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "qortal-app-utils", "name": "qortal-app-utils",
"version": "1.0.0", "version": "1.1.0",
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.1", "@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0", "@emotion/styled": "^11.11.0",

View File

@ -1,15 +1,18 @@
{ {
"name": "qortal-app-utils", "name": "qortal-app-utils",
"version": "1.0.0", "version": "1.1.0",
"description": "A series of convenience functions that perform common tasks, especially those that interact with the Qortal blockchain", "description": "A series of convenience functions that perform common tasks, especially those that interact with the Qortal blockchain",
"keywords": ["Qortal", "QortalDataNetwork"], "keywords": [
"Qortal",
"QortalDataNetwork"
],
"author": "Qortal Dev Team", "author": "Qortal Dev Team",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/Qortal/Q-Apps-Utils" "url": "https://github.com/Qortal/Q-Apps-Utils"
}, },
"private": false, "private": false,
"main": "index.js", "main": "index.ts",
"types": "index.d.ts", "types": "index.d.ts",
"type": "module", "type": "module",
"scripts": { "scripts": {

View File

@ -7,7 +7,7 @@
"declaration": true, "declaration": true,
"sourceMap": true, "sourceMap": true,
/* Bundler mode */ /* Bundler mode */
"moduleResolution": "node", "moduleResolution": "Node",
"esModuleInterop": true, "esModuleInterop": true,
"allowImportingTsExtensions": true, "allowImportingTsExtensions": true,
"resolveJsonModule": true, "resolveJsonModule": true,
@ -22,6 +22,10 @@
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true "allowSyntheticDefaultImports": true
}, },
"ts-node": {
"esm": true
},
"experimentalSpecifierResolution": "node",
"include": ["src/**/*"], "include": ["src/**/*"],
"references": [{ "path": "./tsconfig.node.json" }] "references": [{ "path": "./tsconfig.node.json" }]
} }

View File

@ -5,7 +5,7 @@ import { resolve } from "path";
export default defineConfig({ export default defineConfig({
build: { build: {
lib: { lib: {
entry: resolve(__dirname, "index.js"), entry: resolve(__dirname, "index.ts"),
name: "QortalUtils", name: "QortalUtils",
}, },
}, },