@crowbartools/firebot-types 5.67.0-alpha18 → 5.67.0-alpha19

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.
@@ -6,7 +6,7 @@ declare class ProfileManager {
6
6
  constructor();
7
7
  private restartApp;
8
8
  logInProfile(profileId: string, restart?: boolean): void;
9
- createNewProfile(profileId?: string, restart?: boolean): void;
9
+ createNewProfile(profileId: string, restart?: boolean): void;
10
10
  getLoggedInProfile(restartIfNotLoggedIn?: boolean): string;
11
11
  renameProfile(newProfileId: string): void;
12
12
  deleteProfile(): void;
@@ -8,6 +8,7 @@ declare class SettingsManager extends EventEmitter {
8
8
  private getSettingsFile;
9
9
  private getGlobalSettingsFile;
10
10
  private handleCorruptSettingsFile;
11
+ private handleCorruptGlobalSettingsFile;
11
12
  private migrateUserSettingsToGlobal;
12
13
  private userSettingExists;
13
14
  private globalSettingExists;
@@ -25,6 +25,8 @@ export interface ScriptApiContext {
25
25
  readonly scriptDataDir: string;
26
26
  /** Winston child logger pre-tagged with `{ script: scriptId }`. */
27
27
  readonly logger: typeof logger;
28
+ /** True when script is being inspected (e.g. during early detail / manifest retrieval). */
29
+ readonly isInspecting: boolean;
28
30
  /** Register a teardown callback fired when the plugin is unloaded. */
29
31
  onDispose(fn: DisposeFn): void;
30
32
  }
@@ -36,10 +38,12 @@ export type ScriptApiContextSource = {
36
38
  kind: "plugin";
37
39
  config: InstalledPluginConfig;
38
40
  manifest: Manifest;
41
+ isInspecting: boolean;
39
42
  } | {
40
43
  kind: "effect-script";
41
44
  fileName: string;
42
45
  manifest: Manifest;
46
+ isInspecting: boolean;
43
47
  };
44
48
  export declare function createScriptApiContext(source: ScriptApiContextSource): ScriptApiContextHandle;
45
49
  export { normalizeName };
@@ -35,6 +35,7 @@ declare class ScriptManager {
35
35
  reloadPluginConfig(pluginConfig: InstalledPluginConfig, isNewInstall?: boolean): Promise<void>;
36
36
  setPluginEnabled(pluginId: string, enabled: boolean): Promise<void>;
37
37
  getInstalledPlugins(): Promise<InstalledPlugin[]>;
38
+ private doGetScriptDetailsByFileName;
38
39
  /**
39
40
  * Loads a script file (without persisting a config) and returns its details for
40
41
  * the install / edit UI.
@@ -1,11 +1,2 @@
1
- import type { ReplaceVariable } from "../../types/variables";
2
- export type VariableConfig = {
3
- handle: string;
4
- description: string;
5
- events: string[];
6
- eventMetaKey: string;
7
- usage?: string;
8
- defaultValue?: unknown;
9
- type: ReplaceVariable["definition"]["possibleDataOutput"][number] | ReplaceVariable["definition"]["possibleDataOutput"];
10
- };
1
+ import type { ReplaceVariable, VariableConfig } from "../../types/variables";
11
2
  export declare function createEventDataVariable({ events, eventMetaKey, type, defaultValue, ...definition }: VariableConfig): ReplaceVariable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowbartools/firebot-types",
3
- "version": "5.67.0-alpha18",
3
+ "version": "5.67.0-alpha19",
4
4
  "description": "Type definitions and script API for Firebot plugins and custom scripts.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -6,8 +6,7 @@ import type { FirebotAccount } from "./accounts";
6
6
  import type { FirebotSettingsTypes } from "./settings";
7
7
  import type { InstalledPlugin } from "./plugins";
8
8
  import type { PluginWebhook } from "./webhooks";
9
- import { ReplaceVariable } from "./variables";
10
- import type { VariableConfig } from "../backend/variables/variable-factory";
9
+ import type { ReplaceVariable, VariableConfig } from "./variables";
11
10
  import type { FilterConfig, PresetFilterConfig, TextFilterConfig } from "../backend/events/filters/filter-factory";
12
11
  export type ScriptLogMethod = (message: string, ...meta: unknown[]) => void;
13
12
  export interface ScriptLoggerApi {
@@ -53,3 +53,12 @@ export type PluginAdditionalVariableEvents = {
53
53
  handle: string;
54
54
  events: Array<EventSourceAndId>;
55
55
  };
56
+ export type VariableConfig = {
57
+ handle: string;
58
+ description: string;
59
+ events: string[];
60
+ eventMetaKey: string;
61
+ usage?: string;
62
+ defaultValue?: unknown;
63
+ type: ReplaceVariable["definition"]["possibleDataOutput"][number] | ReplaceVariable["definition"]["possibleDataOutput"];
64
+ };