@akashic/headless-driver 2.3.0 → 2.3.1

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.
@@ -1,4 +1,4 @@
1
- export declare type ContentLocation = ContentParameters | GameJsonParameters;
1
+ export type ContentLocation = ContentParameters | GameJsonParameters;
2
2
  export interface ContentParameters {
3
3
  /**
4
4
  * content.json の URL。
@@ -1,6 +1,6 @@
1
1
  import type { ContentLocation } from "./Content";
2
- export declare type PlayStatus = "preparing" | "running" | "suspending" | "broken";
3
- export declare type Play = ContentLocation & BasePlay;
2
+ export type PlayStatus = "preparing" | "running" | "suspending" | "broken";
3
+ export type Play = ContentLocation & BasePlay;
4
4
  export interface BasePlay {
5
5
  playId: string;
6
6
  status: PlayStatus;
@@ -3,7 +3,7 @@ import type { AMFlowClient } from "./amflow/AMFlowClient";
3
3
  import type { DumpedPlaylog } from "./amflow/types";
4
4
  import type { ContentLocation } from "./Content";
5
5
  import type { Play, PlayStatus } from "./Play";
6
- export declare type PlayManagerParameters = ContentLocation;
6
+ export type PlayManagerParameters = ContentLocation;
7
7
  export interface PlayFilter {
8
8
  status: PlayStatus;
9
9
  }
@@ -3,7 +3,7 @@ import type { Event, StorageData, StorageKey, StorageReadKey, StorageValue, Tick
3
3
  import { Trigger } from "@akashic/trigger";
4
4
  import type { AMFlowStore } from "./AMFlowStore";
5
5
  import type { DumpedPlaylog } from "./types";
6
- export declare type AMFlowState = "connecting" | "open" | "closing" | "closed";
6
+ export type AMFlowState = "connecting" | "open" | "closing" | "closed";
7
7
  /**
8
8
  * Runnerと1対1で対応するAMFlow実装。
9
9
  */
@@ -3,7 +3,7 @@ export declare abstract class AMFlowError extends Error {
3
3
  message: any;
4
4
  constructor(message?: any);
5
5
  }
6
- export declare type AMFlowErrorName = "invalid_status" | "permission_error" | "not_implemented" | "timeout" | "bad_request" | "runtime_error" | "token_revoked";
6
+ export type AMFlowErrorName = "invalid_status" | "permission_error" | "not_implemented" | "timeout" | "bad_request" | "runtime_error" | "token_revoked";
7
7
  /**
8
8
  * 不正な状態
9
9
  */
@@ -12,11 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Runner = void 0;
13
13
  const trigger_1 = require("@akashic/trigger");
14
14
  class Runner {
15
- constructor(params) {
16
- this.errorTrigger = new trigger_1.Trigger();
17
- this.sendToExternalTrigger = new trigger_1.Trigger();
18
- this.params = params;
19
- }
20
15
  get runnerId() {
21
16
  return this.params.runnerId;
22
17
  }
@@ -66,6 +61,11 @@ class Runner {
66
61
  get externalValue() {
67
62
  return this.params.externalValue;
68
63
  }
64
+ constructor(params) {
65
+ this.errorTrigger = new trigger_1.Trigger();
66
+ this.sendToExternalTrigger = new trigger_1.Trigger();
67
+ this.params = params;
68
+ }
69
69
  /**
70
70
  * 引数に指定した関数が真を返すまでゲームの状態を進める。
71
71
  * @param condition 進めるまでの条件となる関数。
@@ -1,6 +1,6 @@
1
- export declare type RunnerExecutionMode = "active" | "passive";
2
- export declare type RunnerRenderingMode = "none" | "canvas";
3
- export declare type RunnerAdvanceConditionFunc = () => boolean;
1
+ export type RunnerExecutionMode = "active" | "passive";
2
+ export type RunnerRenderingMode = "none" | "canvas";
3
+ export type RunnerAdvanceConditionFunc = () => boolean;
4
4
  export interface RunnerPointEvent {
5
5
  type: "down" | "move" | "up";
6
6
  identifier: number;
@@ -3,7 +3,7 @@ import type { RunnerStartParameters } from "../Runner";
3
3
  import { Runner } from "../Runner";
4
4
  import type { RunnerPointEvent } from "../types";
5
5
  import { PlatformV1 } from "./platform/PlatformV1";
6
- export declare type RunnerV1Game = g.Game;
6
+ export type RunnerV1Game = g.Game;
7
7
  export declare class RunnerV1 extends Runner {
8
8
  readonly engineVersion: string;
9
9
  readonly g: typeof g;
@@ -3,7 +3,7 @@ import type { RunnerStartParameters } from "../Runner";
3
3
  import { Runner } from "../Runner";
4
4
  import type { RunnerPointEvent } from "../types";
5
5
  import { PlatformV2 } from "./platform/PlatformV2";
6
- export declare type RunnerV2Game = g.Game;
6
+ export type RunnerV2Game = g.Game;
7
7
  export declare class RunnerV2 extends Runner {
8
8
  readonly engineVersion: string;
9
9
  readonly g: typeof g;
@@ -6,7 +6,7 @@ import { akashicEngine as g, gameDriver as gdr } from "./engineFiles";
6
6
  import type { NodeCanvasSurface } from "./platform/graphics/canvas/NodeCanvasSurface";
7
7
  import type { NullSurface } from "./platform/graphics/null/NullSurface";
8
8
  import { PlatformV3 } from "./platform/PlatformV3";
9
- export declare type RunnerV3Game = g.Game;
9
+ export type RunnerV3Game = g.Game;
10
10
  export declare class RunnerV3 extends Runner {
11
11
  readonly engineVersion: string;
12
12
  readonly g: typeof g;
@@ -1,5 +1,5 @@
1
1
  import type { akashicEngine as g } from "../../../engineFiles";
2
- export declare type CompositeOperation = "source-atop" | "lighter" | "copy" | "source-in" | "source-out" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "xor" | "source-over";
2
+ export type CompositeOperation = "source-atop" | "lighter" | "copy" | "source-in" | "source-out" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "xor" | "source-over";
3
3
  export declare class CompositeOperationConverter {
4
4
  static toEngine(operation: CompositeOperation): g.CompositeOperationString;
5
5
  static toContext2D(operation: g.CompositeOperationString): CompositeOperation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akashic/headless-driver",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "A library to execute contents using Akashic Engine headlessly",
5
5
  "main": "lib/index.js",
6
6
  "author": "DWANGO Co., Ltd.",
@@ -33,7 +33,7 @@
33
33
  "js-sha256": "^0.9.0",
34
34
  "lodash.clonedeep": "^4.5.0",
35
35
  "node-fetch": "^2.6.7",
36
- "vm2": "^3.9.11"
36
+ "vm2": "3.9.11"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@akashic/eslint-config": "^1.1.1",