@akashic/headless-driver 2.9.0 → 2.9.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.
@@ -17,7 +17,7 @@ export declare class NodeCanvasResourceFactory implements g.ResourceFactory {
17
17
  createAudioAsset(id: string, assetPath: string, duration: number, system: g.AudioSystem, loop: boolean, hint: g.AudioAssetHint, offset?: number): g.AudioAsset;
18
18
  createAudioPlayer(system: g.AudioSystem): g.AudioPlayer;
19
19
  createTextAsset(id: string, assetPath: string): g.TextAsset;
20
- createScriptAsset(id: string, assetPath: string): g.ScriptAsset;
20
+ createScriptAsset(id: string, assetPath: string, exports?: string[]): g.ScriptAsset;
21
21
  createBinaryAsset(id: string, assetPath: string): g.BinaryAsset;
22
22
  createSurface(width: number, height: number): g.Surface;
23
23
  createGlyphFactory(fontFamily: string | string[], fontSize: number, baselineHeight?: number, fontColor?: string, strokeWidth?: number, strokeColor?: string, strokeOnly?: boolean, fontWeight?: g.FontWeightString): g.GlyphFactory;
@@ -39,10 +39,11 @@ class NodeCanvasResourceFactory {
39
39
  loadFileHandler: this.loadFileHandler
40
40
  });
41
41
  }
42
- createScriptAsset(id, assetPath) {
42
+ createScriptAsset(id, assetPath, exports) {
43
43
  return new NodeScriptAsset_1.NodeScriptAsset({
44
44
  id,
45
45
  path: assetPath,
46
+ exports,
46
47
  errorHandler: this.errorHandler,
47
48
  loadFileHandler: this.loadFileHandler
48
49
  });
@@ -16,7 +16,7 @@ export declare class NullResourceFactory implements g.ResourceFactory {
16
16
  createAudioAsset(id: string, assetPath: string, duration: number, system: g.AudioSystem, loop: boolean, hint: g.AudioAssetHint, offset?: number): g.AudioAsset;
17
17
  createAudioPlayer(system: g.AudioSystem): g.AudioPlayer;
18
18
  createTextAsset(id: string, assetPath: string): g.TextAsset;
19
- createScriptAsset(id: string, assetPath: string): g.ScriptAsset;
19
+ createScriptAsset(id: string, assetPath: string, exports?: string[]): g.ScriptAsset;
20
20
  createBinaryAsset(id: string, assetPath: string): g.BinaryAsset;
21
21
  createSurface(width: number, height: number): g.Surface;
22
22
  createGlyphFactory(fontFamily: string | string[], fontSize: number, baselineHeight?: number, fontColor?: string, strokeWidth?: number, strokeColor?: string, strokeOnly?: boolean, fontWeight?: g.FontWeightString): g.GlyphFactory;
@@ -37,10 +37,11 @@ class NullResourceFactory {
37
37
  loadFileHandler: this.loadFileHandler
38
38
  });
39
39
  }
40
- createScriptAsset(id, assetPath) {
40
+ createScriptAsset(id, assetPath, exports) {
41
41
  return new NodeScriptAsset_1.NodeScriptAsset({
42
42
  id,
43
43
  path: assetPath,
44
+ exports,
44
45
  errorHandler: this.errorHandler,
45
46
  loadFileHandler: this.loadFileHandler
46
47
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akashic/headless-driver",
3
- "version": "2.9.0",
3
+ "version": "2.9.2",
4
4
  "description": "A library to execute contents using Akashic Engine headlessly",
5
5
  "main": "lib/index.js",
6
6
  "author": "DWANGO Co., Ltd.",
@@ -29,7 +29,7 @@
29
29
  "@akashic/trigger": "^2.0.0",
30
30
  "engine-files-v1": "npm:@akashic/engine-files@1.2.2",
31
31
  "engine-files-v2": "npm:@akashic/engine-files@2.2.3",
32
- "engine-files-v3": "npm:@akashic/engine-files@3.7.3",
32
+ "engine-files-v3": "npm:@akashic/engine-files@3.7.4",
33
33
  "js-sha256": "^0.9.0",
34
34
  "lodash.clonedeep": "^4.5.0",
35
35
  "node-fetch": "^2.6.7",
@@ -56,7 +56,7 @@
56
56
  "npm-run-all": "^4.1.5",
57
57
  "pixelmatch": "^5.3.0",
58
58
  "pngjs": "^7.0.0",
59
- "prettier": "^2.7.1",
59
+ "prettier": "^3.0.0",
60
60
  "remark-cli": "^11.0.0",
61
61
  "rimraf": "^5.0.0",
62
62
  "serve-handler": "^6.1.3",