node-workflow.d.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.dev/license
  7. */
  8. import { Path, schema, virtualFs } from '@angular-devkit/core';
  9. import { workflow } from '../../src';
  10. import { FileSystemEngine } from '../description';
  11. import { OptionTransform } from '../file-system-engine-host-base';
  12. import { NodeModulesEngineHost } from '../node-module-engine-host';
  13. export interface NodeWorkflowOptions {
  14. force?: boolean;
  15. dryRun?: boolean;
  16. packageManager?: string;
  17. packageManagerForce?: boolean;
  18. packageRegistry?: string;
  19. registry?: schema.CoreSchemaRegistry;
  20. resolvePaths?: string[];
  21. schemaValidation?: boolean;
  22. optionTransforms?: OptionTransform<Record<string, unknown> | null, object>[];
  23. engineHostCreator?: (options: NodeWorkflowOptions) => NodeModulesEngineHost;
  24. }
  25. /**
  26. * A workflow specifically for Node tools.
  27. */
  28. export declare class NodeWorkflow extends workflow.BaseWorkflow {
  29. constructor(root: string, options: NodeWorkflowOptions);
  30. constructor(host: virtualFs.Host, options: NodeWorkflowOptions & {
  31. root?: Path;
  32. });
  33. get engine(): FileSystemEngine;
  34. get engineHost(): NodeModulesEngineHost;
  35. }