@nighthawk.hq/macro-sdk 0.1.1 → 0.1.3
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/build/index.js +2 -1
- package/lib/decorators.d.ts +1 -2
- package/lib/index.d.ts +1 -1
- package/lib/targets.d.ts +0 -5
- package/lib/types.d.ts +0 -1
- package/package.json +1 -1
- package/runtime-manifest.json +0 -1
package/build/index.js
CHANGED
|
@@ -26,7 +26,7 @@ function externalSdkPlugin() {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export async function buildMacro({ id, entry, outDir }) {
|
|
29
|
+
export async function buildMacro({ id, entry, outDir, minify = false }) {
|
|
30
30
|
const outfile = join(outDir ?? 'dist', `${id}.js`);
|
|
31
31
|
await build({
|
|
32
32
|
entryPoints: [entry],
|
|
@@ -34,6 +34,7 @@ export async function buildMacro({ id, entry, outDir }) {
|
|
|
34
34
|
format: 'iife',
|
|
35
35
|
target: 'es2022',
|
|
36
36
|
platform: 'neutral',
|
|
37
|
+
minify,
|
|
37
38
|
outfile,
|
|
38
39
|
plugins: [externalSdkPlugin()],
|
|
39
40
|
logLevel: 'info',
|
package/lib/decorators.d.ts
CHANGED
|
@@ -7,13 +7,12 @@ export type ActionOptions = {
|
|
|
7
7
|
suggestedKey?: string;
|
|
8
8
|
};
|
|
9
9
|
type MacroOpts = {
|
|
10
|
-
id: string;
|
|
11
10
|
schemaVersion?: number;
|
|
12
11
|
target?: Target;
|
|
13
12
|
tickTimeoutMs?: number;
|
|
14
13
|
};
|
|
15
14
|
type AnyCtor = abstract new (...args: never[]) => MacroBase;
|
|
16
|
-
export declare function Macro(opts
|
|
15
|
+
export declare function Macro(opts?: MacroOpts): <T extends AnyCtor>(value: T, context: ClassDecoratorContext) => T;
|
|
17
16
|
export declare function OnStart(): (_method: unknown, context: ClassMethodDecoratorContext) => void;
|
|
18
17
|
export declare function OnStop(): (_method: unknown, context: ClassMethodDecoratorContext) => void;
|
|
19
18
|
export declare function OnTick(hz: number): (_method: unknown, context: ClassMethodDecoratorContext) => void;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Macro, OnStart, OnStop, OnTick, Action, Panel, Overlay } from './decorators';
|
|
2
2
|
export type { ActionOptions } from './decorators';
|
|
3
3
|
export { MacroBase } from './macro-base';
|
|
4
|
-
export { robloxTarget
|
|
4
|
+
export { robloxTarget } from './targets';
|
|
5
5
|
export { region, ratio, point, color, number, string, boolean, select, pixelColor, findColor, defaultsOf, } from './settings';
|
|
6
6
|
export type { Setting, SettingMap, RegionSetting, RatioSetting, PointSetting, ColorSetting, NumberSetting, StringSetting, BooleanSetting, SelectSetting, PixelColorSetting, PixelColorValue, FindColorSetting, FindColorValue, } from './settings';
|
|
7
7
|
export { Group, Row, Stat, Chip, Divider, Button, Text, Meter, Image } from './widgets';
|
package/lib/targets.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import type { ProcessTarget } from './types';
|
|
2
|
-
export declare function processTarget(opts: {
|
|
3
|
-
processName: string;
|
|
4
|
-
moduleName?: string;
|
|
5
|
-
expectedVersion?: string;
|
|
6
|
-
}): ProcessTarget;
|
|
7
2
|
export declare function robloxTarget(opts?: {
|
|
8
3
|
expectedVersion?: string;
|
|
9
4
|
}): ProcessTarget;
|
package/lib/types.d.ts
CHANGED
package/package.json
CHANGED