@wwawing/loader 4.0.0 → 4.0.2

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/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 1996-2025 NAO
4
- Copyright (c) 2015-2025 WWA Wing Team
3
+ Copyright (c) 1996-2026 NAO
4
+ Copyright (c) 2015-2026 WWA Wing Team
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.NodeLocalMapDataClient = void 0;
7
- const fs_1 = __importDefault(require("fs"));
7
+ const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const BaseMapDataClient_1 = require("./BaseMapDataClient");
9
9
  class NodeLocalMapDataClient extends BaseMapDataClient_1.BaseMapDataClient {
10
10
  constructor(fileName) {
@@ -13,7 +13,7 @@ class NodeLocalMapDataClient extends BaseMapDataClient_1.BaseMapDataClient {
13
13
  }
14
14
  async request() {
15
15
  return new Promise((resolve, reject) => {
16
- fs_1.default.readFile(this.fileName, (error, data) => {
16
+ node_fs_1.default.readFile(this.fileName, (error, data) => {
17
17
  if (error) {
18
18
  reject(error);
19
19
  }
@@ -117,7 +117,7 @@ class TextLoader {
117
117
  wwaData.gameSpeedIndex = infra_1.WWAConsts.DEFAULT_SPEED_INDEX;
118
118
  wwaData.permitChangeGameSpeed = true;
119
119
  wwaData.userVar = Array.from({ length: infra_1.WWAConsts.USER_VAR_NUM }).map(() => 0);
120
- wwaData.userNamedVar = [];
120
+ wwaData.userNamedVar = new Map();
121
121
  wwaData.playTime = 0;
122
122
  wwaData.isVisibleStatusEnergy = true;
123
123
  wwaData.isVisibleStatusStrength = true;
@@ -125,6 +125,7 @@ class TextLoader {
125
125
  wwaData.isVisibleStatusGold = true;
126
126
  wwaData.gameOverPolicy = "default";
127
127
  wwaData.bgmDelayDurationMs = 0;
128
+ wwaData.pictureRegistry = [];
128
129
  return wwaData;
129
130
  }
130
131
  getMessageFromData() {
@@ -171,5 +171,6 @@ function createDefaultWWAData() {
171
171
  gameOverPolicy: "default",
172
172
  bgmDelayDurationMs: undefined,
173
173
  customSystemMessages: {},
174
+ pictureRegistry: [],
174
175
  };
175
176
  }
@@ -1,4 +1,4 @@
1
- import fs from "fs";
1
+ import fs from "node:fs";
2
2
  import { BaseMapDataClient } from "./BaseMapDataClient";
3
3
  export class NodeLocalMapDataClient extends BaseMapDataClient {
4
4
  constructor(fileName) {
@@ -114,7 +114,7 @@ export class TextLoader {
114
114
  wwaData.gameSpeedIndex = WWAConsts.DEFAULT_SPEED_INDEX;
115
115
  wwaData.permitChangeGameSpeed = true;
116
116
  wwaData.userVar = Array.from({ length: WWAConsts.USER_VAR_NUM }).map(() => 0);
117
- wwaData.userNamedVar = [];
117
+ wwaData.userNamedVar = new Map();
118
118
  wwaData.playTime = 0;
119
119
  wwaData.isVisibleStatusEnergy = true;
120
120
  wwaData.isVisibleStatusStrength = true;
@@ -122,6 +122,7 @@ export class TextLoader {
122
122
  wwaData.isVisibleStatusGold = true;
123
123
  wwaData.gameOverPolicy = "default";
124
124
  wwaData.bgmDelayDurationMs = 0;
125
+ wwaData.pictureRegistry = [];
125
126
  return wwaData;
126
127
  }
127
128
  getMessageFromData() {
@@ -164,5 +164,6 @@ export function createDefaultWWAData() {
164
164
  gameOverPolicy: "default",
165
165
  bgmDelayDurationMs: undefined,
166
166
  customSystemMessages: {},
167
+ pictureRegistry: [],
167
168
  };
168
169
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwawing/loader",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "a World Wide Adventure mapdata loader for client-side web applications",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./module/index.js",
@@ -18,10 +18,10 @@
18
18
  "build:lib": "npm run clean:lib && tsc -p .",
19
19
  "build:module": "npm run clean:module && tsc -p ./tsconfig.module.json",
20
20
  "start": "run-s start:browser",
21
- "start:browser": "run-s debug:build:browser debug:start:browser",
21
+ "start:browser": "vite",
22
22
  "start:node": "run-s debug:build:node debug:start:node",
23
23
  "debug:build": "run-p debug:build:*",
24
- "debug:build:browser": "run-s clean:debug:browser && cross-env TS_NODE_PROJECT=\"tsconfig-for-webpack-config.json\" webpack && shx cp ./src/___debug-resources___/wwamap.dat ./debug/browser",
24
+ "debug:build:browser": "run-s clean:debug:browser && vite build && shx cp ./src/___debug-resources___/wwamap.dat ./debug/browser",
25
25
  "debug:build:node": "run-s clean:debug:node && tsc -p tsconfig-debug-for-node.json && shx cp ./src/___debug-resources___/wwamap.dat ./debug/node/___debug-resources___/",
26
26
  "debug:start:browser": "http-server ./debug/browser -o",
27
27
  "debug:start:node": "node ./debug/node/___debug-resources___/demo-node.js",
@@ -31,7 +31,8 @@
31
31
  "clean:debug": "shx rm -rf debug",
32
32
  "clean:debug:browser": "shx rm -rf debug/browser",
33
33
  "clean:debug:node": "shx rm -rf debug/node",
34
- "test": "echo \"no test specified\""
34
+ "test": "echo \"no test specified\"",
35
+ "type-check": "tsc -p . --watch --noEmit"
35
36
  },
36
37
  "repository": {
37
38
  "type": "git",
@@ -45,29 +46,24 @@
45
46
  },
46
47
  "homepage": "https://github.com/WWAWing/WWALoader#readme",
47
48
  "dependencies": {
48
- "@wwawing/event-emitter": "^4.0.0"
49
+ "@wwawing/event-emitter": "^4.0.2"
49
50
  },
50
51
  "devDependencies": {
51
- "@wwawing/common-interface": "^4.0.0",
52
- "cross-env": "^7.0.3",
53
- "html-loader": "^5.1.0",
54
- "html-webpack-plugin": "^5.5.0",
52
+ "@wwawing/common-interface": "^4.0.2",
55
53
  "http-server": "^14.1.1",
56
54
  "npm-run-all2": "^8.0.1",
57
- "shelljs": "^0.9.2",
55
+ "shelljs": "^0.10.0",
58
56
  "shx": "^0.4.0",
59
- "ts-loader": "^9.5.2",
60
57
  "ts-node": "^10.9.2",
61
58
  "typescript": "^5.8.3",
62
- "webpack": "^5.83.1",
63
- "webpack-cli": "^5.1.1"
59
+ "vite": "^6.3.7"
64
60
  },
65
61
  "publishConfig": {
66
62
  "access": "public"
67
63
  },
68
64
  "engines": {
69
- "node": ">=22",
65
+ "node": ">=24",
70
66
  "npm": ">=11"
71
67
  },
72
- "gitHead": "dd1d570673a896c26cc299f68033abcc3e867e21"
68
+ "gitHead": "86e576667cba53fbd81af94aea4a5efb58c2e0c6"
73
69
  }