@rtsdk/topia 0.0.3 → 0.0.5
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/package.json +6 -3
- package/.eslintrc.cjs +0 -20
- package/jest.config.cjs +0 -23
- package/rollup.config.js +0 -25
- package/src/index.test.ts +0 -8
- package/src/index.ts +0 -15
- package/tsconfig.json +0 -16
package/package.json
CHANGED
|
@@ -22,8 +22,11 @@
|
|
|
22
22
|
"ts-jest": "^29.0.3",
|
|
23
23
|
"typescript": "^4.9.3"
|
|
24
24
|
},
|
|
25
|
-
"
|
|
26
|
-
|
|
25
|
+
"files": [
|
|
26
|
+
"dist/*"
|
|
27
|
+
],
|
|
28
|
+
"gitHead": "69d40bacabdddb61f753a133ea5204e8c92d0170",
|
|
29
|
+
"homepage": "https://github.com/metaversecloud-com/mc-sdk-js/tree/main/clients/client-topia",
|
|
27
30
|
"license": "ISC",
|
|
28
31
|
"keywords": [],
|
|
29
32
|
"name": "@rtsdk/topia",
|
|
@@ -44,5 +47,5 @@
|
|
|
44
47
|
"publish": "npm publish"
|
|
45
48
|
},
|
|
46
49
|
"type": "module",
|
|
47
|
-
"version": "0.0.
|
|
50
|
+
"version": "0.0.5"
|
|
48
51
|
}
|
package/.eslintrc.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"es2021": true
|
|
5
|
-
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"eslint:recommended",
|
|
8
|
-
"plugin:@typescript-eslint/recommended"
|
|
9
|
-
],
|
|
10
|
-
"parser": "@typescript-eslint/parser",
|
|
11
|
-
"parserOptions": {
|
|
12
|
-
"ecmaVersion": 12,
|
|
13
|
-
"sourceType": "module"
|
|
14
|
-
},
|
|
15
|
-
"plugins": [
|
|
16
|
-
"@typescript-eslint"
|
|
17
|
-
],
|
|
18
|
-
"rules": {
|
|
19
|
-
}
|
|
20
|
-
};
|
package/jest.config.cjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
clearMocks: true,
|
|
3
|
-
collectCoverageFrom: ["./src/**"],
|
|
4
|
-
coverageThreshold: {
|
|
5
|
-
global: {
|
|
6
|
-
statements: 1,
|
|
7
|
-
branches: 1,
|
|
8
|
-
functions: 1,
|
|
9
|
-
lines: 1,
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
moduleFileExtensions: ["ts", "js"],
|
|
13
|
-
moduleNameMapper: {
|
|
14
|
-
"~/(.*)": "<rootDir>/src/$1",
|
|
15
|
-
},
|
|
16
|
-
testEnvironment: "node",
|
|
17
|
-
testPathIgnorePatterns: ["./node_modules/", "./build/"],
|
|
18
|
-
testRegex: "(/tests/.*|(\\.|/)(test|spec))\\.(js?|ts?)$",
|
|
19
|
-
transform: {
|
|
20
|
-
"^.+.(ts|js)$": "ts-jest",
|
|
21
|
-
},
|
|
22
|
-
transformIgnorePatterns: ["<rootDir>/node_modules/(?!@foo)"],
|
|
23
|
-
};
|
package/rollup.config.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
2
|
-
import json from "@rollup/plugin-json";
|
|
3
|
-
import resolve, { nodeResolve } from "@rollup/plugin-node-resolve";
|
|
4
|
-
import typescript from "rollup-plugin-typescript2";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
input: ["src/index.ts"],
|
|
8
|
-
output: [
|
|
9
|
-
{
|
|
10
|
-
dir: "dist",
|
|
11
|
-
entryFileNames: "[name].js",
|
|
12
|
-
format: "cjs",
|
|
13
|
-
exports: "named",
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
plugins: [
|
|
17
|
-
commonjs({
|
|
18
|
-
exclude: "node_modules",
|
|
19
|
-
}),
|
|
20
|
-
nodeResolve({ preferBuiltins: true, extensions: [".svg", ".js", ".ts"] }),
|
|
21
|
-
json(),
|
|
22
|
-
resolve(),
|
|
23
|
-
typescript(),
|
|
24
|
-
],
|
|
25
|
-
};
|
package/src/index.test.ts
DELETED
package/src/index.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
|
-
|
|
3
|
-
export function getWorldDetails(urlSlug: string): Promise<object> {
|
|
4
|
-
return new Promise((resolve, reject) => {
|
|
5
|
-
axios
|
|
6
|
-
.get(`https://api.topia.io/api/world/${urlSlug}/world-details`, {
|
|
7
|
-
headers: { Authorization: process.env.API_KEY },
|
|
8
|
-
})
|
|
9
|
-
.then((response: any) => {
|
|
10
|
-
resolve(response.data);
|
|
11
|
-
})
|
|
12
|
-
.catch(reject);
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
export default { getWorldDetails };
|
package/tsconfig.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"allowJs": true,
|
|
4
|
-
"baseUrl": ".",
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"forceConsistentCasingInFileNames": true,
|
|
7
|
-
"module": "esnext",
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"outDir": "./dist",
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"strict": true,
|
|
12
|
-
"target": "es2016"
|
|
13
|
-
},
|
|
14
|
-
"include": ["src/**/*"],
|
|
15
|
-
"exclude": ["node_modules", "dist"]
|
|
16
|
-
}
|