@microtronics/studio-cli 0.63.0 → 0.64.0
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/CHANGELOG.md +22 -1
- package/dist/main.js +2230 -51
- package/dist/studio-cli.d.ts +91 -31
- package/out/api.js +1558 -34
- package/out/studio-cli.d.ts +91 -31
- package/package.json +3 -2
package/dist/studio-cli.d.ts
CHANGED
|
@@ -395,12 +395,16 @@ declare interface components {
|
|
|
395
395
|
pathItems: never;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
+
declare const createPawnCC: PawnModuleFactory;
|
|
399
|
+
|
|
400
|
+
declare const createPawnDbg: PawnModuleFactory;
|
|
401
|
+
|
|
398
402
|
export declare namespace DDE {
|
|
399
403
|
import DDEJson = DDE_Core.DDEJson;
|
|
400
404
|
/**
|
|
401
405
|
* The json schema to validate the dde structure
|
|
402
406
|
*/
|
|
403
|
-
const DDE_SCHEMA: {
|
|
407
|
+
export const DDE_SCHEMA: {
|
|
404
408
|
$schema: string;
|
|
405
409
|
title: string;
|
|
406
410
|
description: string;
|
|
@@ -1403,7 +1407,7 @@ export declare namespace DDE {
|
|
|
1403
1407
|
* @param ddeHistory
|
|
1404
1408
|
* @constructor
|
|
1405
1409
|
*/
|
|
1406
|
-
const PreCompiler: (manifest: Manifest.Manifest, libraries: DDE_Core.LibraryFile[], ddeHistory: HistoryJson | null) => YamlPreCompiler.PreCompiler;
|
|
1410
|
+
export const PreCompiler: (manifest: Manifest.Manifest, libraries: DDE_Core.LibraryFile[], ddeHistory: HistoryJson | null) => YamlPreCompiler.PreCompiler;
|
|
1407
1411
|
/**
|
|
1408
1412
|
* File Generators
|
|
1409
1413
|
*/
|
|
@@ -1669,15 +1673,15 @@ export declare namespace DDE_Core {
|
|
|
1669
1673
|
export type ContainerDefinitions = {
|
|
1670
1674
|
[key in ContainerName]: ContainerDefinition;
|
|
1671
1675
|
};
|
|
1672
|
-
const CONTAINER_DEFS: ContainerDefinitions;
|
|
1673
|
-
const HISTDATA_CONTAINER: ContainerName[];
|
|
1674
|
-
const CONFIG_CONTAINER: ContainerName[];
|
|
1675
|
-
const SERVER_CONTAINER: ContainerName[];
|
|
1676
|
-
const regexRelation: RegExp;
|
|
1676
|
+
export const CONTAINER_DEFS: ContainerDefinitions;
|
|
1677
|
+
export const HISTDATA_CONTAINER: ContainerName[];
|
|
1678
|
+
export const CONFIG_CONTAINER: ContainerName[];
|
|
1679
|
+
export const SERVER_CONTAINER: ContainerName[];
|
|
1680
|
+
export const regexRelation: RegExp;
|
|
1677
1681
|
/**
|
|
1678
1682
|
* Defines what fields allow relations and the allowed target field type.
|
|
1679
1683
|
*/
|
|
1680
|
-
const allowedRelationTypes: {
|
|
1684
|
+
export const allowedRelationTypes: {
|
|
1681
1685
|
title: string[];
|
|
1682
1686
|
unit: string[];
|
|
1683
1687
|
chartMinimum: string[];
|
|
@@ -1705,11 +1709,11 @@ export declare namespace DDE_Core {
|
|
|
1705
1709
|
export function parseXMLValueWithRelation(attribute: AllowedRelationTypse, field: DDEJsonField, ddeMap: DDEJson): any;
|
|
1706
1710
|
export function parseXMLBitmask(field: DDEJsonField): string | undefined;
|
|
1707
1711
|
export function parseXMLDefaultValue(field: DDEJsonField): string | number | undefined;
|
|
1708
|
-
const TDEF_NUMBER: {
|
|
1712
|
+
export const TDEF_NUMBER: {
|
|
1709
1713
|
xmlOut(xml: XMLField, jsonField: DDEJsonField, ddeMap: DDEJson): void;
|
|
1710
1714
|
};
|
|
1711
|
-
const TYPE_DEFS: any;
|
|
1712
|
-
const fieldTypeDefinitions: {
|
|
1715
|
+
export const TYPE_DEFS: any;
|
|
1716
|
+
export const fieldTypeDefinitions: {
|
|
1713
1717
|
uint8: any;
|
|
1714
1718
|
uint16: any;
|
|
1715
1719
|
uint32: any;
|
|
@@ -1749,11 +1753,11 @@ export declare namespace DDE_Core {
|
|
|
1749
1753
|
* @param container
|
|
1750
1754
|
*/
|
|
1751
1755
|
export function hasContainerAppFields(container: DDEJsonContainer): boolean;
|
|
1752
|
-
|
|
1756
|
+
export {};
|
|
1753
1757
|
}
|
|
1754
1758
|
|
|
1755
1759
|
export declare namespace DefaultFiles {
|
|
1756
|
-
const fileNames: {
|
|
1760
|
+
export const fileNames: {
|
|
1757
1761
|
projectSettings: string;
|
|
1758
1762
|
mainAmx: string;
|
|
1759
1763
|
mainAmxReport: string;
|
|
@@ -1773,7 +1777,7 @@ export declare namespace DefaultFiles {
|
|
|
1773
1777
|
reportTemplate: string;
|
|
1774
1778
|
dloCfg: string;
|
|
1775
1779
|
};
|
|
1776
|
-
const filePaths: {
|
|
1780
|
+
export const filePaths: {
|
|
1777
1781
|
studio: {
|
|
1778
1782
|
initFile: string;
|
|
1779
1783
|
auto: {
|
|
@@ -1835,11 +1839,11 @@ export declare namespace DefaultFiles {
|
|
|
1835
1839
|
/**
|
|
1836
1840
|
* Changelog.md
|
|
1837
1841
|
*/
|
|
1838
|
-
const readme: (name: string) => string;
|
|
1842
|
+
export const readme: (name: string) => string;
|
|
1839
1843
|
/**
|
|
1840
1844
|
* Changelog.md
|
|
1841
1845
|
*/
|
|
1842
|
-
const changelog = "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).";
|
|
1846
|
+
export const changelog = "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).";
|
|
1843
1847
|
}
|
|
1844
1848
|
|
|
1845
1849
|
export declare namespace Dependencies {
|
|
@@ -2057,7 +2061,7 @@ export declare namespace DFILES {
|
|
|
2057
2061
|
}
|
|
2058
2062
|
|
|
2059
2063
|
export declare namespace Diagnostics {
|
|
2060
|
-
const CODE: {
|
|
2064
|
+
export const CODE: {
|
|
2061
2065
|
ddeFieldLength: string;
|
|
2062
2066
|
};
|
|
2063
2067
|
export type Level = 'error' | 'warning' | 'hint' | 'info';
|
|
@@ -2076,17 +2080,31 @@ export declare namespace Diagnostics {
|
|
|
2076
2080
|
}
|
|
2077
2081
|
|
|
2078
2082
|
export declare namespace DLO {
|
|
2079
|
-
|
|
2083
|
+
/**
|
|
2084
|
+
* Factory for the Pawn/DLO WASM compiler module (bundled from pawncc-wasm).
|
|
2085
|
+
* Consumers (e.g. the browser language server) can instantiate their own
|
|
2086
|
+
* compiler instance with a custom Emscripten FS setup.
|
|
2087
|
+
*/
|
|
2088
|
+
export const createPawnCC: PawnccWasm.PawnModuleFactory;
|
|
2089
|
+
/**
|
|
2090
|
+
* Factory for the Pawn debugger WASM module (bundled from pawncc-wasm).
|
|
2091
|
+
*/
|
|
2092
|
+
export const createPawnDbg: PawnccWasm.PawnModuleFactory;
|
|
2093
|
+
export type PawnModule = PawnccWasm.PawnModule;
|
|
2094
|
+
export type PawnModuleOptions = PawnccWasm.PawnModuleOptions;
|
|
2095
|
+
export type PawnModuleFactory = PawnccWasm.PawnModuleFactory;
|
|
2096
|
+
export type EmscriptenFS = PawnccWasm.EmscriptenFS;
|
|
2097
|
+
export const FileSequencer: typeof DloFileSequencer;
|
|
2080
2098
|
export type FileSequencer = DloFileSequencer;
|
|
2081
|
-
const PreCompiler: typeof DloPreCompiler;
|
|
2099
|
+
export const PreCompiler: typeof DloPreCompiler;
|
|
2082
2100
|
export type PreCompiler = DloPreCompiler;
|
|
2083
2101
|
/**
|
|
2084
2102
|
* The DLO Compiler
|
|
2085
2103
|
*/
|
|
2086
|
-
const Compiler: typeof DloCompiler;
|
|
2104
|
+
export const Compiler: typeof DloCompiler;
|
|
2087
2105
|
export type Compiler = DloCompiler;
|
|
2088
|
-
const uriToMemFs: typeof uriToMemFsPath;
|
|
2089
|
-
const parseCompilerWarningsAndErrors: typeof parseWarningsAndErrors;
|
|
2106
|
+
export const uriToMemFs: typeof uriToMemFsPath;
|
|
2107
|
+
export const parseCompilerWarningsAndErrors: typeof parseWarningsAndErrors;
|
|
2090
2108
|
/**
|
|
2091
2109
|
* Generate the dlo.cfg file and write it to the .studio/auto/dlo directory
|
|
2092
2110
|
* @param cwd
|
|
@@ -2119,7 +2137,7 @@ declare class DloCompiler {
|
|
|
2119
2137
|
* Get a symbol compiler instance with direct disk access via CUSTOM_WASM_FS.
|
|
2120
2138
|
*/
|
|
2121
2139
|
getSymbolCompiler(): Promise<{
|
|
2122
|
-
compiler:
|
|
2140
|
+
compiler: PawnModule;
|
|
2123
2141
|
print: {
|
|
2124
2142
|
stdout: string[];
|
|
2125
2143
|
stderr: string[];
|
|
@@ -2147,6 +2165,23 @@ declare class DloPreCompiler {
|
|
|
2147
2165
|
};
|
|
2148
2166
|
}
|
|
2149
2167
|
|
|
2168
|
+
/**
|
|
2169
|
+
* Thin wrapper around the private `pawncc-wasm` package (bundled into the CLI
|
|
2170
|
+
* at build time, like device-master).
|
|
2171
|
+
*
|
|
2172
|
+
* The types are re-declared here instead of being imported from `pawncc-wasm`
|
|
2173
|
+
* so the api-extractor rollup (out/studio-cli.d.ts) stays self-contained —
|
|
2174
|
+
* npm consumers of @microtronics/studio-cli do not have the private package
|
|
2175
|
+
* installed.
|
|
2176
|
+
*/
|
|
2177
|
+
declare interface EmscriptenFS {
|
|
2178
|
+
filesystems: Record<string, unknown>;
|
|
2179
|
+
mkdir(path: string): void;
|
|
2180
|
+
mount(fs: unknown, opts: unknown, mountPoint: string): void;
|
|
2181
|
+
chdir(path: string): void;
|
|
2182
|
+
[member: string]: any;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2150
2185
|
export declare namespace ENV {
|
|
2151
2186
|
/**
|
|
2152
2187
|
*
|
|
@@ -2372,7 +2407,7 @@ export declare namespace Helper {
|
|
|
2372
2407
|
* Check if the given value is numeric
|
|
2373
2408
|
* @param v
|
|
2374
2409
|
*/
|
|
2375
|
-
const isNumeric: (v: any) => boolean;
|
|
2410
|
+
export const isNumeric: (v: any) => boolean;
|
|
2376
2411
|
/**
|
|
2377
2412
|
* Convert an uint8Array to a base64 string
|
|
2378
2413
|
* @param bytes
|
|
@@ -2433,7 +2468,7 @@ export declare namespace Library {
|
|
|
2433
2468
|
*/
|
|
2434
2469
|
export function getFilesForArchive(cwd: URI, fs: LocalFS): Promise<{
|
|
2435
2470
|
name: string;
|
|
2436
|
-
data: Uint8Array
|
|
2471
|
+
data: Uint8Array<ArrayBufferLike>;
|
|
2437
2472
|
modifyTime: Date;
|
|
2438
2473
|
}[]>;
|
|
2439
2474
|
/**
|
|
@@ -2505,7 +2540,7 @@ export declare namespace Log {
|
|
|
2505
2540
|
warning = 3,
|
|
2506
2541
|
error = 4
|
|
2507
2542
|
}
|
|
2508
|
-
const LOG_PREFIX: {
|
|
2543
|
+
export const LOG_PREFIX: {
|
|
2509
2544
|
1: string;
|
|
2510
2545
|
0: string;
|
|
2511
2546
|
2: string;
|
|
@@ -2533,7 +2568,7 @@ export declare namespace Manifest {
|
|
|
2533
2568
|
/**
|
|
2534
2569
|
* The source filename where the information is stored in
|
|
2535
2570
|
*/
|
|
2536
|
-
const fileName = "studio.json";
|
|
2571
|
+
export const fileName = "studio.json";
|
|
2537
2572
|
export enum DeviceProfiles {
|
|
2538
2573
|
m22x = "m22x",
|
|
2539
2574
|
m23x = "m23x",
|
|
@@ -2901,14 +2936,14 @@ export declare namespace Package {
|
|
|
2901
2936
|
* @param fs
|
|
2902
2937
|
* @param projectName
|
|
2903
2938
|
*/
|
|
2904
|
-
export function getReadmeFile(cwd: URI, fs: LocalFS, projectName: string): Promise<Uint8Array
|
|
2939
|
+
export function getReadmeFile(cwd: URI, fs: LocalFS, projectName: string): Promise<Uint8Array<ArrayBufferLike>>;
|
|
2905
2940
|
/**
|
|
2906
2941
|
* Read the projects CHANGELOG.md file
|
|
2907
2942
|
* validates if the file content is the initial content
|
|
2908
2943
|
* @param cwd
|
|
2909
2944
|
* @param fs
|
|
2910
2945
|
*/
|
|
2911
|
-
export function getChangelogFile(cwd: URI, fs: LocalFS): Promise<Uint8Array
|
|
2946
|
+
export function getChangelogFile(cwd: URI, fs: LocalFS): Promise<Uint8Array<ArrayBufferLike>>;
|
|
2912
2947
|
/**
|
|
2913
2948
|
* Validate manifest settings that are required for the APM
|
|
2914
2949
|
* @param cwd
|
|
@@ -5131,6 +5166,31 @@ declare interface paths {
|
|
|
5131
5166
|
};
|
|
5132
5167
|
}
|
|
5133
5168
|
|
|
5169
|
+
declare namespace PawnccWasm {
|
|
5170
|
+
export {
|
|
5171
|
+
EmscriptenFS,
|
|
5172
|
+
PawnModule,
|
|
5173
|
+
PawnModuleOptions,
|
|
5174
|
+
PawnModuleFactory,
|
|
5175
|
+
createPawnCC,
|
|
5176
|
+
createPawnDbg
|
|
5177
|
+
}
|
|
5178
|
+
}
|
|
5179
|
+
|
|
5180
|
+
declare interface PawnModule {
|
|
5181
|
+
FS: EmscriptenFS;
|
|
5182
|
+
callMain(args: string[]): number | Promise<number>;
|
|
5183
|
+
PROXYFS: unknown;
|
|
5184
|
+
}
|
|
5185
|
+
|
|
5186
|
+
declare type PawnModuleFactory = (options?: PawnModuleOptions) => Promise<PawnModule>;
|
|
5187
|
+
|
|
5188
|
+
declare interface PawnModuleOptions {
|
|
5189
|
+
noExitRuntime?: boolean;
|
|
5190
|
+
print?: (data: string) => void;
|
|
5191
|
+
printErr?: (data: string) => void;
|
|
5192
|
+
}
|
|
5193
|
+
|
|
5134
5194
|
/**
|
|
5135
5195
|
* Publishes a package to the registry with the specified settings and configurations.
|
|
5136
5196
|
*
|
|
@@ -5151,7 +5211,7 @@ export declare namespace Registry {
|
|
|
5151
5211
|
/**
|
|
5152
5212
|
* Get the actual api url based on the STUDIO_ENV
|
|
5153
5213
|
*/
|
|
5154
|
-
const getAPIUrl: (env: Globals.ENV) => {
|
|
5214
|
+
export const getAPIUrl: (env: Globals.ENV) => {
|
|
5155
5215
|
baseUrl: string;
|
|
5156
5216
|
};
|
|
5157
5217
|
export type LibraryProfile = components['schemas']['LibraryDetailInformation'];
|
|
@@ -5247,7 +5307,7 @@ declare namespace YamlPreCompiler {
|
|
|
5247
5307
|
private get previousVersion();
|
|
5248
5308
|
private getContainerOfPreviousVersion;
|
|
5249
5309
|
parseMainDDE(filePath: URI, yaml: string): {
|
|
5250
|
-
ddeJSON: DDEJson | null;
|
|
5310
|
+
ddeJSON: DDE_Core.DDEJson | null;
|
|
5251
5311
|
diagnostics: Diagnostics.File[];
|
|
5252
5312
|
};
|
|
5253
5313
|
/**
|