@microtronics/studio-cli 1.2.1 → 1.3.0-alpha.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.
@@ -2038,7 +2038,7 @@ export declare namespace Dependencies {
2038
2038
  partInstalls: string[];
2039
2039
  };
2040
2040
  /**
2041
- * Normalize the `dist/blo` and `dist/pov/details` `package.json` files of every already-installed library
2041
+ * Normalize the `dist/blo`, `dist/pov/details` and `dist/dlo` `package.json` files of every already-installed library
2042
2042
  * reachable from the consumer's `libraryDependencies`/`libraryDevDependencies` (version stamping and
2043
2043
  * stripping of npm-invalid Studio-library dependency entries), walking each library's own
2044
2044
  * `libraryDependencies`/`libraryDevDependencies` transitively.
@@ -2060,7 +2060,7 @@ export declare namespace Dependencies {
2060
2060
  */
2061
2061
  export function validateMinimumBackendVersion(cwd: URI, fs: LocalFS, logger: Log.Logger): Promise<void>;
2062
2062
  /**
2063
- * Install npm dependencies in pov and blo working paths if they exist and contain a package.json.
2063
+ * Install npm dependencies in pov, blo and dlo working paths if they exist and contain a package.json.
2064
2064
  * This ensures that a single `studio install` command sets up the entire project.
2065
2065
  * If the root package.json declares npm workspaces that cover a part, the install is done once at the
2066
2066
  * project root using `npm install` instead of separately for each covered part; parts not covered by a
@@ -2079,11 +2079,13 @@ export declare namespace Dependencies {
2079
2079
  * @param cwd
2080
2080
  * @param fs
2081
2081
  * @param apmPart currently only dlo and dfiles are supported
2082
+ * @param production - set to true to exclude libraryDevDependencies, e.g. dlo-test - a dev-only
2083
+ * library must never be force-included into the shipped app (see getAll)
2082
2084
  */
2083
- export function getApmPartDependencies(cwd: URI, fs: LocalFS, apmPart: APM.Part.dlo | APM.Part.dfiles): Promise<APMPartLibrary[]>;
2085
+ export function getApmPartDependencies(cwd: URI, fs: LocalFS, apmPart: APM.Part.dlo | APM.Part.dfiles, production?: boolean): Promise<APMPartLibrary[]>;
2084
2086
  /**
2085
- * Link a library's blo/pov exports into the consuming project's part package.json files.
2086
- * After a library is extracted, check if it exports blo or pov parts and add `file:` references.
2087
+ * Link a library's blo/pov/dlo exports into the consuming project's part package.json files.
2088
+ * After a library is extracted, check if it exports blo, pov or dlo parts and add `file:` references.
2087
2089
  * @param cwd
2088
2090
  * @param fs
2089
2091
  * @param logger
@@ -2092,7 +2094,7 @@ export declare namespace Dependencies {
2092
2094
  */
2093
2095
  export function linkLibraryApmParts(cwd: URI, fs: LocalFS, logger: Log.Logger, libraryName: string, development?: boolean): Promise<void>;
2094
2096
  /**
2095
- * Unlink a library's blo/pov exports from the consuming project's part package.json files.
2097
+ * Unlink a library's blo/pov/dlo exports from the consuming project's part package.json files.
2096
2098
  * Removes `file:` references that were added by linkLibraryApmParts.
2097
2099
  * @param cwd
2098
2100
  * @param fs
@@ -2589,12 +2591,27 @@ export declare namespace DLO {
2589
2591
  export type FileSequencer = DloFileSequencer;
2590
2592
  export const PreCompiler: typeof DloPreCompiler;
2591
2593
  export type PreCompiler = DloPreCompiler;
2594
+ /** True for files pawncc compiles directly: the app main file and every *.spec.dlo. */
2595
+ export function isDloRootFile(filePath: string, manifest?: Manifest.Manifest): boolean;
2596
+ /** True for a DLO unit-test spec: `*.spec.dlo`, compiled as its own translation unit. */
2597
+ export function isDloSpecFile(filePath: string): boolean;
2598
+ /**
2599
+ * `DLO_TEST_SPEC=1` (and, if the spec source itself defines `TEST_OWN_MAIN`, `TEST_OWN_MAIN=1`
2600
+ * too) - the pawncc positional defines a `*.spec.dlo` compile needs so dlo-test.inc exposes its
2601
+ * EXPECT_* macros and `main()`. Empty for anything that is not a spec root.
2602
+ */
2603
+ export function getSpecCompileDefines(filePath: string, source?: string): string[];
2592
2604
  /**
2593
2605
  * The DLO Compiler
2594
2606
  */
2595
2607
  export const Compiler: typeof DloCompiler;
2596
2608
  export type Compiler = DloCompiler;
2597
2609
  export const uriToMemFs: typeof uriToMemFsPath;
2610
+ /**
2611
+ * Diagnostics the DLO pre-compiler produced for the files currently cached by the WASM
2612
+ * filesystem hook - i.e. everything the last compile read.
2613
+ */
2614
+ export const getPrecompilerDiagnostics: typeof getPrecompilerDiagnostics;
2598
2615
  export const parseCompilerWarningsAndErrors: typeof parseWarningsAndErrors;
2599
2616
  /**
2600
2617
  * Generate the dlo.cfg file and write it to the .studio/auto/dlo directory
@@ -2620,10 +2637,16 @@ declare class DloCompiler {
2620
2637
  diagnostics: Diagnostics.File[];
2621
2638
  }>;
2622
2639
  /**
2623
- * Run the symbol compiler and return its output lines.
2640
+ * Run the symbol compiler and return its exit code together with its output lines.
2624
2641
  * Handles WASM-specific path patching (`.` prefix for PROXYFS, `-R` flag).
2642
+ *
2643
+ * A non-zero exit code is not treated as "no output": the lines produced up to the failure are
2644
+ * still returned, so callers can publish diagnostics from them. The dump is truncated in that
2645
+ * case though - pawncc emits no `{"type": "error"}` record in `-R` mode, so the truncation is
2646
+ * not otherwise detectable - and callers must therefore not build a symbol table from a run
2647
+ * that did not exit 0.
2625
2648
  */
2626
- getDloSymbols(mainFile: string, compileOptions: string[]): Promise<string[] | null>;
2649
+ getDloSymbols(mainFile: string, compileOptions: string[]): Promise<DloSymbolDump | null>;
2627
2650
  /**
2628
2651
  * Get a symbol compiler instance with direct disk access via CUSTOM_WASM_FS.
2629
2652
  */
@@ -2656,6 +2679,14 @@ declare class DloPreCompiler {
2656
2679
  };
2657
2680
  }
2658
2681
 
2682
+ /** Result of one `pawncc -R` symbol run: its process exit code plus everything it printed. */
2683
+ declare interface DloSymbolDump {
2684
+ /** 0 when pawncc ran to completion; anything else means the dump below is truncated. */
2685
+ exitCode: number;
2686
+ /** stdout followed by stderr, one entry per line. */
2687
+ lines: string[];
2688
+ }
2689
+
2659
2690
  /**
2660
2691
  * Thin wrapper around the private `pawncc-wasm` package (bundled into the CLI
2661
2692
  * at build time, like device-master).
@@ -2773,6 +2804,9 @@ declare enum FileType {
2773
2804
  */
2774
2805
  export declare function generateDevApmId(developmentReference: string): string;
2775
2806
 
2807
+ /** Aggregates diagnostics from live cache entries so stale/removed files never linger. */
2808
+ declare function getPrecompilerDiagnostics(): Diagnostics.File[];
2809
+
2776
2810
  export declare namespace Globals {
2777
2811
  /**
2778
2812
  * Supported ENV for the studio environment