@awayfl/awayfl-player 0.2.31 → 0.2.32

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- console.debug("AwayFL-Player - 0.2.31");
1
+ console.debug("AwayFL-Player - 0.2.32");
2
2
  export { AVMPlayer } from "./lib/AVMPlayer";
3
3
  export { AVM1Player } from "./lib/AVM1Player";
4
4
  export { AVM2Player } from "./lib/AVM2Player";
@@ -0,0 +1,19 @@
1
+ import { __extends } from "tslib";
2
+ import { AVMPlayer } from "../index";
3
+ var Main = /** @class */ (function (_super) {
4
+ __extends(Main, _super);
5
+ function Main(gameConfig) {
6
+ return _super.call(this, gameConfig) || this;
7
+ // LoaderInfo.DefaultLocation="/";
8
+ // gameConfig.redirects = [{
9
+ // test: /img/,
10
+ // resolve: (url) => `./assets/${url.replace(/\/\//g,'')}`
11
+ // },{
12
+ // test: /media/,
13
+ // resolve: (url) => `./assets/${url.replace(/\/\//g,'')}`
14
+ // }];
15
+ }
16
+ return Main;
17
+ }(AVMPlayer));
18
+ ;
19
+ window["AVMPlayerClass"] = Main;
package/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- console.debug("AwayFL-Player - 0.2.31");
1
+ console.debug("AwayFL-Player - 0.2.32");
2
2
 
3
3
  export {AVMPlayer} from "./lib/AVMPlayer";
4
4
  export {AVM1Player} from "./lib/AVM1Player";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awayfl/awayfl-player",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "Flash Player emulator for executing SWF files (published for FP versions 6 and up) in javascript",
5
5
  "main": "bundle/awayfl-player.umd.js",
6
6
  "module": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "prebuild:prod": "npm run clean:bin",
31
31
  "build:prod": "webpack --config webpack.config.js --progress --env.prod",
32
32
  "server": "npm run server:dev",
33
- "server:dev": "webpack-dev-server --config webpack.config.js --progress --watch",
33
+ "server:dev": "webpack-dev-server --config webpack.config.js --progress",
34
34
  "server:dev:hmr": "npm run server:dev -- --hot",
35
35
  "server:prod": "http-server bin --cors",
36
36
  "start": "npm run server:dev",
@@ -82,22 +82,19 @@
82
82
  "@awayjs/view": "^0.6.0",
83
83
  "@rollup/plugin-commonjs": "^18.0.0",
84
84
  "@rollup/plugin-node-resolve": "^11.2.1",
85
- "babel-core": "^6.26.3",
86
- "copy-webpack-plugin": "^5.1.1",
87
- "fs": "^0.0.1-security",
88
- "html-webpack-plugin": "^4.2.0",
89
- "path": "^0.12.7",
90
- "rimraf": "^3.0.2",
91
- "rollup": "^2.45.2",
92
- "rollup-plugin-gzip": "^2.5.0",
85
+ "copy-webpack-plugin": "^11.0.0",
86
+ "html-webpack-plugin": "^5.5.0",
87
+ "rimraf": "^4.4.0",
88
+ "rollup": "^2.79.1",
89
+ "rollup-plugin-gzip": "^3.1.0",
93
90
  "rollup-plugin-terser": "^7.0.2",
94
- "terser-webpack-plugin": "^2.3.5",
95
- "ts-loader": "^6.2.2",
91
+ "terser-webpack-plugin": "^5.3.7",
92
+ "ts-loader": "^9.4.2",
96
93
  "tslib": "^1.9.0",
97
- "typescript": "^3.8.3",
98
- "webpack": "^4.42.1",
99
- "webpack-cli": "^3.3.11",
100
- "webpack-dev-server": "^3.10.3",
101
- "webpack-merge": "^4.2.2"
94
+ "typescript": "^4.9.5",
95
+ "webpack": "^5.76.2",
96
+ "webpack-cli": "^5.0.1",
97
+ "webpack-dev-server": "^4.12.0",
98
+ "webpack-merge": "^5.8.0"
102
99
  }
103
100
  }
package/tsconfig.json CHANGED
@@ -4,14 +4,10 @@
4
4
  "target": "es5",
5
5
  "module": "es2015",
6
6
  "moduleResolution": "node",
7
- "noImplicitUseStrict": true,
8
7
  "noEmitHelpers": true,
9
8
  "importHelpers": true,
10
9
  "declaration": true,
11
10
  "declarationMap": true,
12
11
  "outDir": "./dist"
13
12
  },
14
- "files": [
15
- "./index.ts"
16
- ]
17
13
  }
package/webpack.config.js CHANGED
@@ -6,7 +6,7 @@ const HTMLWebPackPlugin = require('html-webpack-plugin');
6
6
  const Terser = require('terser-webpack-plugin')
7
7
  const rimraf = require("rimraf");
8
8
  const tsloader = require.resolve('ts-loader');
9
- const merge = require("webpack-merge");
9
+ const merge = require("webpack-merge").merge;
10
10
  const config = require('./awayfl.config.js')
11
11
 
12
12
  module.exports = (env = {}) => {
@@ -70,7 +70,9 @@ module.exports = (env = {}) => {
70
70
  colors: true // wp4
71
71
  },
72
72
  devServer: {
73
- progress: true, // wp4
73
+ client: {
74
+ progress: true,
75
+ }
74
76
  },
75
77
 
76
78
 
@@ -81,12 +83,14 @@ module.exports = (env = {}) => {
81
83
  devtool: 'source-map',
82
84
  //devtool: 'cheap-module-eval-source-map',//use this option for recompiling libs
83
85
  devServer: {
84
- contentBase: path.join(process.cwd(), "src"),
85
- inline: true,
86
- publicPath: "/",
86
+ //contentBase: path.join(process.cwd(), "src"),
87
+ static: {
88
+ publicPath: "/",
89
+ },
87
90
  open: false,
88
- progress: true,
89
-
91
+ client: {
92
+ progress: true,
93
+ }
90
94
  },
91
95
  optimization: {
92
96
  //minimize: false // wp4
@@ -127,16 +131,20 @@ const processConfig = (config, rootPath, CopyWebPackPlugin, HTMLWebPackPlugin, B
127
131
  // if no split, copy as3 buildins to asset folder
128
132
  // if split, we will copy them for each game-config individually
129
133
  if (config.buildinsPath && config.buildinsPath.length && !config.split) {
130
- plugins.push(new CopyWebPackPlugin([
131
- { from: config.buildinsPath, to: 'assets/builtins' },
132
- ]));
134
+ plugins.push(new CopyWebPackPlugin({
135
+ patterns: [
136
+ { from: config.buildinsPath, to: 'assets/builtins' },
137
+ ],
138
+ }));
133
139
  }
134
140
 
135
141
  // copy loader.js to js-folder
136
142
  // if split, this will be copied to the subfolder together with webpack-bundel
137
- plugins.push(new CopyWebPackPlugin([
138
- { from: config.loaderTemplate, to: 'js' },
139
- ]));
143
+ plugins.push(new CopyWebPackPlugin({
144
+ patterns: [
145
+ { from: config.loaderTemplate, to: 'js' },
146
+ ],
147
+ }));
140
148
 
141
149
  // collect all game-urls to create a index.html:
142
150
  let gameURLS = {};
@@ -153,9 +161,11 @@ const processConfig = (config, rootPath, CopyWebPackPlugin, HTMLWebPackPlugin, B
153
161
  // if split, copy buildins to each output folder:
154
162
 
155
163
  if (config.buildinsPath && config.buildinsPath.length && config.split) {
156
- plugins.push(new CopyWebPackPlugin([
157
- { from: config.buildinsPath, to: outputPath + 'assets/builtins' },
158
- ]));
164
+ plugins.push(new CopyWebPackPlugin({
165
+ patterns: [
166
+ { from: config.buildinsPath, to: outputPath + 'assets/builtins' },
167
+ ],
168
+ }));
159
169
  }
160
170
 
161
171
  // get config for this file merged with default values from global config:
@@ -173,12 +183,16 @@ const processConfig = (config, rootPath, CopyWebPackPlugin, HTMLWebPackPlugin, B
173
183
  if (!fs.existsSync(path.join(rootPath, "src", "assets", configForHTML.splash))) {
174
184
  throw ("invalid splashscreen path for fileconfig " + configForHTML.splash);
175
185
  }
176
- plugins.push(new CopyWebPackPlugin([
177
- { from: swfPath, to: outputPath + "assets" },
178
- ]));
179
- plugins.push(new CopyWebPackPlugin([
180
- { from: path.join(rootPath, "src", "assets", configForHTML.splash), to: outputPath + "assets" },
181
- ]));
186
+ plugins.push(new CopyWebPackPlugin({
187
+ patterns: [
188
+ { from: swfPath, to: outputPath + "assets" },
189
+ ],
190
+ }));
191
+ plugins.push(new CopyWebPackPlugin({
192
+ patterns: [
193
+ { from: path.join(rootPath, "src", "assets", configForHTML.splash), to: outputPath + "assets" },
194
+ ],
195
+ }));
182
196
 
183
197
  // optional copy startscreen:
184
198
 
@@ -186,9 +200,11 @@ const processConfig = (config, rootPath, CopyWebPackPlugin, HTMLWebPackPlugin, B
186
200
  if (!fs.existsSync(path.join(rootPath, "src", "assets", configForHTML.start))) {
187
201
  throw ("invalid startscreen path for fileconfig " + configForHTML.start);
188
202
  }
189
- plugins.push(new CopyWebPackPlugin([
190
- { from: path.join(rootPath, "src", "assets", configForHTML.start), to: outputPath + "assets" },
191
- ]));
203
+ plugins.push(new CopyWebPackPlugin({
204
+ patterns: [
205
+ { from: path.join(rootPath, "src", "assets", configForHTML.start), to: outputPath + "assets" },
206
+ ],
207
+ }));
192
208
  }
193
209
 
194
210
  // create/prepare config props needed for runtime
@@ -208,9 +224,11 @@ const processConfig = (config, rootPath, CopyWebPackPlugin, HTMLWebPackPlugin, B
208
224
  if (!fs.existsSync(res_path)) {
209
225
  throw ("invalid filename path for resource " + res_path);
210
226
  }
211
- plugins.push(new CopyWebPackPlugin([
212
- { from: res_path, to: outputPath + "assets" },
213
- ]));
227
+ plugins.push(new CopyWebPackPlugin({
228
+ patterns: [
229
+ { from: res_path, to: outputPath + "assets" },
230
+ ],
231
+ }));
214
232
  stats = fs.statSync(res_path);
215
233
  res_filesize = stats["size"];
216
234
  copiedResources[res_unique_outputPath] = res_filesize;
@@ -235,9 +253,11 @@ const processConfig = (config, rootPath, CopyWebPackPlugin, HTMLWebPackPlugin, B
235
253
  let folder = fs.lstatSync(res_path).isDirectory();
236
254
  let name = path.basename(res_path);
237
255
 
238
- plugins.push(new CopyWebPackPlugin([
239
- { from: res_path, to: outputPath + "assets" + (folder ? "/" + name : "") },
240
- ]));
256
+ plugins.push(new CopyWebPackPlugin({
257
+ patterns: [
258
+ { from: res_path, to: outputPath + "assets" + (folder ? "/" + name : "") },
259
+ ],
260
+ }));
241
261
 
242
262
  }
243
263
  }
@@ -316,18 +336,20 @@ const processConfig = (config, rootPath, CopyWebPackPlugin, HTMLWebPackPlugin, B
316
336
  }
317
337
  }
318
338
 
319
- plugins.push(new CopyWebPackPlugin([
320
- {
321
- from: htmlSourcePath,
322
- to: htmlOutputPath,
323
- transform: function (content, src) {
324
- return content.toString()
325
- .replace(/INSERT_TITLE/g, configForHTML.title ? configForHTML.title : "UNTITLED")
326
- .replace(/INSERT_SPLASHSCREEN/g, configForHTML.splash)
327
- .replace(/INSERT_CODE/g, jsStringForHTML);
339
+ plugins.push(new CopyWebPackPlugin({
340
+ patterns: [
341
+ {
342
+ from: htmlSourcePath,
343
+ to: htmlOutputPath,
344
+ transform: function (content, src) {
345
+ return content.toString()
346
+ .replace(/INSERT_TITLE/g, configForHTML.title ? configForHTML.title : "UNTITLED")
347
+ .replace(/INSERT_SPLASHSCREEN/g, configForHTML.splash)
348
+ .replace(/INSERT_CODE/g, jsStringForHTML);
349
+ }
328
350
  }
329
- }
330
- ]));
351
+ ],
352
+ }));
331
353
  };
332
354
 
333
355
  var swfPath, stats, filesize;
package/yarn-error.log DELETED
@@ -1,109 +0,0 @@
1
- Arguments:
2
- C:\Program Files\nodejs\node.exe C:\Program Files (x86)\Yarn\bin\yarn.js
3
-
4
- PATH:
5
- C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Yarn\bin\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\TortoiseHg\;C:\Program Files\nodejs\;C:\Program Files\dotnet\;C:\Users\Rob Bateman\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\Rob Bateman\AppData\Local\GitHubDesktop\bin;C:\Users\Rob Bateman\AppData\Local\Yarn\bin;C:\Users\Rob Bateman\AppData\Local\Microsoft\WindowsApps;C:\Users\Rob Bateman\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Rob Bateman\AppData\Roaming\npm;
6
-
7
- Yarn version:
8
- 1.6.0
9
-
10
- Node version:
11
- 10.15.3
12
-
13
- Platform:
14
- win32 x64
15
-
16
- Trace:
17
- Error: https://registry.yarnpkg.com/@awayfl%2favm2: Not found
18
- at Request.params.callback [as _callback] (C:\Program Files (x86)\Yarn\lib\cli.js:65327:18)
19
- at Request.self.callback (C:\Program Files (x86)\Yarn\lib\cli.js:133155:22)
20
- at Request.emit (events.js:189:13)
21
- at Request.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:134138:10)
22
- at Request.emit (events.js:189:13)
23
- at IncomingMessage.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:134058:12)
24
- at Object.onceWrapper (events.js:277:13)
25
- at IncomingMessage.emit (events.js:194:15)
26
- at endReadableNT (_stream_readable.js:1125:12)
27
- at process._tickCallback (internal/process/next_tick.js:63:19)
28
-
29
- npm manifest:
30
- {
31
- "name": "@awayfl/awayfl-player",
32
- "version": "0.1.0",
33
- "description": "VIrtual machine for executing AS1 and AS2 code",
34
- "main": "bundle/awayfl-awayfl-player.umd.js",
35
- "module": "dist/index.js",
36
- "types": "dist/index.d.ts",
37
- "url": "http://www.away3d.com",
38
- "author": "Rob Bateman",
39
- "repository": {
40
- "type": "git",
41
- "url": "git+https://github.com/awayfl/awayfl-player.git"
42
- },
43
- "scripts": {
44
- "rimraf": "rimraf",
45
- "rollup": "rollup -c",
46
- "uglifyjs": "uglifyjs ./bundle/awayfl-awayfl-player.umd.js -o ./bundle/awayfl-awayfl-player.umd.min.js --source-map \"content='./bundle/awayfl-awayfl-player.umd.js.map'\" --mangle",
47
- "tsc": "tsc --lib ES2015.Symbol,DOM,ScriptHost,ES5,ES2015,ES2015.Iterable",
48
- "tsc:build": "npm run tsc || exit 0",
49
- "clean": "npm cache clean && npm run rimraf -- node_modules dist bundle",
50
- "clean:dist": "npm run rimraf -- dist bundle",
51
- "watch": "npm run tsc -- --w",
52
- "prebuild": "npm run clean:dist",
53
- "build": "npm run tsc:build && npm run rollup && npm run uglifyjs",
54
- "copyVersionToIndex": "node ./copyVersionToIndex && git add ./index.ts && git commit -m \"update version number in index.ts\"",
55
- "version": "npm run copyVersionToIndex && npm run build",
56
- "postversion": "git push && git push --tags && npm publish"
57
- },
58
- "keywords": [
59
- "AwayJS",
60
- "WebGL",
61
- "2D",
62
- "3D",
63
- "graphics"
64
- ],
65
- "license": "Apache-2.0",
66
- "bugs": {
67
- "url": "https://github.com/awayjs/awayfl-player/issues"
68
- },
69
- "homepage": "https://github.com/awayjs/awayfl-player#readme",
70
- "peerDependencies": {
71
- "@awayfl/avm2": "^0.1.0",
72
- "@awayfl/playerglobal": "^0.1.0",
73
- "@awayjs/core": "^0.8.0",
74
- "@awayjs/graphics": "^0.4.0",
75
- "@awayjs/materials": "^0.5.0",
76
- "@awayjs/renderer": "^0.10.0",
77
- "@awayjs/scene": "^0.12.0",
78
- "@awayjs/stage": "^0.10.0",
79
- "@awayjs/view": "^0.5.0",
80
- "@awayjs/swf-viewer": "^0.3.0",
81
- "tslib": "^1.9.0"
82
- },
83
- "devDependencies": {
84
- "@awayfl/avm2": "^0.1.0",
85
- "@awayfl/playerglobal": "^0.1.0",
86
- "@awayjs/core": "^0.8.0",
87
- "@awayjs/graphics": "^0.4.0",
88
- "@awayjs/materials": "^0.5.0",
89
- "@awayjs/renderer": "^0.10.0",
90
- "@awayjs/scene": "^0.12.0",
91
- "@awayjs/stage": "^0.10.0",
92
- "@awayjs/view": "^0.5.0",
93
- "@awayjs/swf-viewer": "^0.3.0",
94
- "rimraf": "^2.5.2",
95
- "rollup": "^0.57.1",
96
- "rollup-plugin-commonjs": "^9.1.0",
97
- "rollup-plugin-includepaths": "^0.2.1",
98
- "rollup-plugin-node-resolve": "^3.3.0",
99
- "tslib": "^1.9.0",
100
- "typescript": "^3.7.3",
101
- "uglify-js": "^3.0.15"
102
- }
103
- }
104
-
105
- yarn manifest:
106
- No manifest
107
-
108
- Lockfile:
109
- No lockfile