node-ts-screeps-api 0.0.4 → 0.0.8

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/.eslintrc.js CHANGED
@@ -81,7 +81,7 @@ module.exports = {
81
81
  "no-throw-literal": "error",
82
82
  "no-trailing-spaces": "off",
83
83
  "no-undef-init": "error",
84
- "no-underscore-dangle": "warn",
84
+ "no-underscore-dangle": "off",
85
85
  "no-var": "error",
86
86
  "object-shorthand": "error",
87
87
  "one-var": ["error", "never"],
package/README.md CHANGED
@@ -0,0 +1,3 @@
1
+ 已知问题:
2
+
3
+ 1. 私服不能使用 socket
@@ -1,4 +1,2 @@
1
- export declare const userData: {
2
- email: string;
3
- password: string;
4
- };
1
+ import { ApiConfig } from "./src/type";
2
+ export declare const apiConfig: ApiConfig<"signinByPassword">;
package/dist/index.js CHANGED
@@ -3628,8 +3628,9 @@ const inflateAsync = require$$1.promisify(require$$8.inflate);
3628
3628
  class RawApi {
3629
3629
  constructor(apiConfig) {
3630
3630
  this.apiConfig = apiConfig;
3631
- const { protocol, hostname, path } = this.apiConfig.hostInfo;
3632
- this.baseUrl = `${protocol}://${hostname}${path}`;
3631
+ const { protocol, hostname, path, port } = this.apiConfig.hostInfo;
3632
+ this.baseUrl =
3633
+ protocol !== "localhost" ? `${protocol}://${hostname}${path}` : `http://${hostname}:${port}${path}`;
3633
3634
  }
3634
3635
  setServer(opts) {
3635
3636
  if (!this.opts) {