vbapm 0.6.3-alpha

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.
Files changed (167) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +246 -0
  3. package/lib/_commonjsHelpers-553b27b3.js +2 -0
  4. package/lib/_commonjsHelpers-553b27b3.js.map +1 -0
  5. package/lib/build-project-55e5df48.js +4 -0
  6. package/lib/build-project-55e5df48.js.map +1 -0
  7. package/lib/build-target-283e1e7d.js +10 -0
  8. package/lib/build-target-283e1e7d.js.map +1 -0
  9. package/lib/create-project-905598ca.js +11 -0
  10. package/lib/create-project-905598ca.js.map +1 -0
  11. package/lib/debug.js +2 -0
  12. package/lib/debug.js.map +1 -0
  13. package/lib/export-project-55168787.js +5 -0
  14. package/lib/export-project-55168787.js.map +1 -0
  15. package/lib/export-target-c9ddd2fa.js +5 -0
  16. package/lib/export-target-c9ddd2fa.js.map +1 -0
  17. package/lib/get-target-23b8cc04.js +12 -0
  18. package/lib/get-target-23b8cc04.js.map +1 -0
  19. package/lib/index-35cff1d5.js +38 -0
  20. package/lib/index-35cff1d5.js.map +1 -0
  21. package/lib/index-87f55e79.js +4 -0
  22. package/lib/index-87f55e79.js.map +1 -0
  23. package/lib/index-b49bd5b2.js +2 -0
  24. package/lib/index-b49bd5b2.js.map +1 -0
  25. package/lib/index-c97017db.js +2 -0
  26. package/lib/index-c97017db.js.map +1 -0
  27. package/lib/index-d9ba3ba0.js +6 -0
  28. package/lib/index-d9ba3ba0.js.map +1 -0
  29. package/lib/index-ffbba08f.js +3 -0
  30. package/lib/index-ffbba08f.js.map +1 -0
  31. package/lib/index.js +2 -0
  32. package/lib/index.js.map +1 -0
  33. package/lib/inherits-713f4554.js +2 -0
  34. package/lib/inherits-713f4554.js.map +1 -0
  35. package/lib/init-project-a62cb644.js +16 -0
  36. package/lib/init-project-a62cb644.js.map +1 -0
  37. package/lib/load-from-project-e6530a69.js +6 -0
  38. package/lib/load-from-project-e6530a69.js.map +1 -0
  39. package/lib/minimatch-3a1d1fa9.js +2 -0
  40. package/lib/minimatch-3a1d1fa9.js.map +1 -0
  41. package/lib/once-9eb67b4f.js +2 -0
  42. package/lib/once-9eb67b4f.js.map +1 -0
  43. package/lib/project-d43b4e0c.js +30 -0
  44. package/lib/project-d43b4e0c.js.map +1 -0
  45. package/lib/run-macro-f4aa7c14.js +2 -0
  46. package/lib/run-macro-f4aa7c14.js.map +1 -0
  47. package/lib/sat-solver-01d6409e.js +2 -0
  48. package/lib/sat-solver-01d6409e.js.map +1 -0
  49. package/lib/src/actions/build-project.d.ts +2 -0
  50. package/lib/src/actions/create-project.d.ts +8 -0
  51. package/lib/src/actions/export-project.d.ts +6 -0
  52. package/lib/src/actions/increment-version.d.ts +5 -0
  53. package/lib/src/actions/init-project.d.ts +9 -0
  54. package/lib/src/actions/run-macro.d.ts +8 -0
  55. package/lib/src/actions/test-project.d.ts +5 -0
  56. package/lib/src/addin.d.ts +36 -0
  57. package/lib/src/bin/vba-blocks-build.d.ts +2 -0
  58. package/lib/src/bin/vba-blocks-export.d.ts +2 -0
  59. package/lib/src/bin/vba-blocks-init.d.ts +2 -0
  60. package/lib/src/bin/vba-blocks-new.d.ts +2 -0
  61. package/lib/src/bin/vba-blocks-run.d.ts +2 -0
  62. package/lib/src/bin/vba-blocks-test.d.ts +2 -0
  63. package/lib/src/bin/vba-blocks-version.d.ts +2 -0
  64. package/lib/src/bin/vba-blocks.d.ts +2 -0
  65. package/lib/src/build/apply-changeset.d.ts +3 -0
  66. package/lib/src/build/build-graph.d.ts +18 -0
  67. package/lib/src/build/changeset.d.ts +14 -0
  68. package/lib/src/build/compare-build-graphs.d.ts +3 -0
  69. package/lib/src/build/component.d.ts +25 -0
  70. package/lib/src/build/index.d.ts +7 -0
  71. package/lib/src/build/load-from-export.d.ts +2 -0
  72. package/lib/src/build/load-from-project.d.ts +5 -0
  73. package/lib/src/build/stage-build-graph.d.ts +2 -0
  74. package/lib/src/build/transform-build-graph.d.ts +3 -0
  75. package/lib/src/build/transforms/editor-config.d.ts +3 -0
  76. package/lib/src/cache.d.ts +9 -0
  77. package/lib/src/config.d.ts +29 -0
  78. package/lib/src/debug.d.ts +2 -0
  79. package/lib/src/env.d.ts +21 -0
  80. package/lib/src/errors.d.ts +56 -0
  81. package/lib/src/index.d.ts +16 -0
  82. package/lib/src/installer.d.ts +3 -0
  83. package/lib/src/lockfile/index.d.ts +23 -0
  84. package/lib/src/lockfile/is-lockfile-valid.d.ts +10 -0
  85. package/lib/src/lockfile/lockfile.d.ts +26 -0
  86. package/lib/src/manifest/dependency.d.ts +25 -0
  87. package/lib/src/manifest/index.d.ts +34 -0
  88. package/lib/src/manifest/reference.d.ts +12 -0
  89. package/lib/src/manifest/source.d.ts +8 -0
  90. package/lib/src/manifest/target.d.ts +10 -0
  91. package/lib/src/manifest/version.d.ts +3 -0
  92. package/lib/src/messages.d.ts +22 -0
  93. package/lib/src/professional/sources/git-source.d.ts +7 -0
  94. package/lib/src/professional/workspace.d.ts +10 -0
  95. package/lib/src/project.d.ts +48 -0
  96. package/lib/src/reporter.d.ts +12 -0
  97. package/lib/src/resolve/dependency-graph.d.ts +4 -0
  98. package/lib/src/resolve/index.d.ts +6 -0
  99. package/lib/src/resolve/latest-solver.d.ts +8 -0
  100. package/lib/src/resolve/resolver.d.ts +23 -0
  101. package/lib/src/resolve/sat-solver.d.ts +7 -0
  102. package/lib/src/sources/index.d.ts +16 -0
  103. package/lib/src/sources/path-source.d.ts +7 -0
  104. package/lib/src/sources/registration.d.ts +17 -0
  105. package/lib/src/sources/registry-source.d.ts +32 -0
  106. package/lib/src/sources/source.d.ts +6 -0
  107. package/lib/src/targets/add-target.d.ts +8 -0
  108. package/lib/src/targets/build-target.d.ts +41 -0
  109. package/lib/src/targets/export-target.d.ts +15 -0
  110. package/lib/src/targets/get-target.d.ts +7 -0
  111. package/lib/src/targets/index.d.ts +3 -0
  112. package/lib/src/targets/project-info.d.ts +7 -0
  113. package/lib/src/targets/transform-target.d.ts +3 -0
  114. package/lib/src/targets/transforms/core-xml.d.ts +2 -0
  115. package/lib/src/targets/transforms/workbook-xml.d.ts +2 -0
  116. package/lib/src/utils/async-map.d.ts +4 -0
  117. package/lib/src/utils/download.d.ts +1 -0
  118. package/lib/src/utils/fs.d.ts +23 -0
  119. package/lib/src/utils/get-staging.d.ts +1 -0
  120. package/lib/src/utils/git.d.ts +4 -0
  121. package/lib/src/utils/github.d.ts +9 -0
  122. package/lib/src/utils/has.d.ts +1 -0
  123. package/lib/src/utils/hash.d.ts +8 -0
  124. package/lib/src/utils/interop.d.ts +1 -0
  125. package/lib/src/utils/is.d.ts +5 -0
  126. package/lib/src/utils/noop.d.ts +1 -0
  127. package/lib/src/utils/observable.d.ts +15 -0
  128. package/lib/src/utils/parallel.d.ts +6 -0
  129. package/lib/src/utils/path.d.ts +7 -0
  130. package/lib/src/utils/pipe.d.ts +5 -0
  131. package/lib/src/utils/run.d.ts +17 -0
  132. package/lib/src/utils/stdout-file.d.ts +3 -0
  133. package/lib/src/utils/text.d.ts +4 -0
  134. package/lib/src/utils/toml.d.ts +4 -0
  135. package/lib/src/utils/unique.d.ts +1 -0
  136. package/lib/src/utils/without.d.ts +1 -0
  137. package/lib/src/utils/xml.d.ts +10 -0
  138. package/lib/src/utils/zip.d.ts +17 -0
  139. package/lib/test-project-d4f237d1.js +2 -0
  140. package/lib/test-project-d4f237d1.js.map +1 -0
  141. package/lib/text-ba532b40.js +10 -0
  142. package/lib/text-ba532b40.js.map +1 -0
  143. package/lib/tmp-bc08ebcf.js +10 -0
  144. package/lib/tmp-bc08ebcf.js.map +1 -0
  145. package/lib/toml-patch.es-6bd2145d.js +4 -0
  146. package/lib/toml-patch.es-6bd2145d.js.map +1 -0
  147. package/lib/vba-blocks-build-a717fcdb.js +10 -0
  148. package/lib/vba-blocks-build-a717fcdb.js.map +1 -0
  149. package/lib/vba-blocks-export-7e2c75cc.js +8 -0
  150. package/lib/vba-blocks-export-7e2c75cc.js.map +1 -0
  151. package/lib/vba-blocks-init-54531020.js +17 -0
  152. package/lib/vba-blocks-init-54531020.js.map +1 -0
  153. package/lib/vba-blocks-new-3210d92c.js +18 -0
  154. package/lib/vba-blocks-new-3210d92c.js.map +1 -0
  155. package/lib/vba-blocks-run-ab9d4ad4.js +11 -0
  156. package/lib/vba-blocks-run-ab9d4ad4.js.map +1 -0
  157. package/lib/vba-blocks-test-da5dba90.js +16 -0
  158. package/lib/vba-blocks-test-da5dba90.js.map +1 -0
  159. package/lib/vba-blocks-version-e1b3c35a.js +9 -0
  160. package/lib/vba-blocks-version-e1b3c35a.js.map +1 -0
  161. package/lib/vba-blocks.js +43 -0
  162. package/lib/vba-blocks.js.map +1 -0
  163. package/lib/workbook-xml-69fff4ae.js +3 -0
  164. package/lib/workbook-xml-69fff4ae.js.map +1 -0
  165. package/package.json +116 -0
  166. package/run-scripts/run.applescript +78 -0
  167. package/run-scripts/run.ps1 +211 -0
@@ -0,0 +1,12 @@
1
+ import { Message } from "./messages";
2
+ export interface Reporter {
3
+ silent?: boolean;
4
+ log: (id: Message, message: string) => void;
5
+ progress: (name: string) => Progress;
6
+ }
7
+ export interface Progress {
8
+ start: (count?: number) => void;
9
+ tick: () => void;
10
+ done: () => void;
11
+ }
12
+ export declare const reporter: Reporter;
@@ -0,0 +1,4 @@
1
+ import { Dependency } from "../manifest/dependency";
2
+ import { Registration } from "../sources/registration";
3
+ export type DependencyGraph = Registration[];
4
+ export declare function getRegistration(graph: DependencyGraph, dependency: Dependency): Registration | undefined;
@@ -0,0 +1,6 @@
1
+ import { Config } from "../config";
2
+ import { Workspace } from "../professional/workspace";
3
+ import { DependencyGraph, getRegistration } from "./dependency-graph";
4
+ import { Resolver } from "./resolver";
5
+ export { getRegistration, Resolver };
6
+ export default function resolve(config: Config, workspace: Workspace, preferred?: DependencyGraph): Promise<DependencyGraph>;
@@ -0,0 +1,8 @@
1
+ import { Dependency } from "../manifest/dependency";
2
+ import { Workspace } from "../professional/workspace";
3
+ import { Registration } from "../sources/registration";
4
+ import { DependencyGraph } from "./dependency-graph";
5
+ import { Resolver, Resolution } from "./resolver";
6
+ export declare function solveLatest(workspace: Workspace, resolver: Resolver): Promise<DependencyGraph>;
7
+ export declare function resolveDependencies(dependencies: Dependency[], resolver: Resolver): Promise<void>;
8
+ export declare function getMatching(resolution: Resolution): Registration | undefined;
@@ -0,0 +1,23 @@
1
+ import { Config } from "../config";
2
+ import { Dependency } from "../manifest/dependency";
3
+ import { Registration } from "../sources/registration";
4
+ import { DependencyGraph } from "./dependency-graph";
5
+ export interface Resolution {
6
+ name: string;
7
+ range: string[];
8
+ preferred?: Registration;
9
+ registered: Registration[];
10
+ }
11
+ export type ResolutionGraph = Map<string, Resolution>;
12
+ export type ResolutionGraphEntry = [string, Resolution];
13
+ export declare class Resolver implements Iterable<ResolutionGraphEntry> {
14
+ config: Config;
15
+ graph: ResolutionGraph;
16
+ loading: Map<string, Promise<Registration[]>>;
17
+ preferred: Map<string, Registration>;
18
+ constructor(config: Config);
19
+ get(dependency: Dependency): Promise<Resolution>;
20
+ getRegistration(id: string): Registration | undefined;
21
+ prefer(preferred: DependencyGraph): void;
22
+ [Symbol.iterator](): IterableIterator<[string, Resolution]>;
23
+ }
@@ -0,0 +1,7 @@
1
+ import { Dependency } from "../manifest/dependency";
2
+ import { Workspace } from "../professional/workspace";
3
+ import { DependencyGraph } from "./dependency-graph";
4
+ import { Resolver, ResolutionGraph } from "./resolver";
5
+ export declare function solveSat(workspace: Workspace, resolver: Resolver): Promise<DependencyGraph>;
6
+ export declare function resolveDependencies(dependencies: Dependency[], resolver: Resolver): Promise<void>;
7
+ export declare function optimizeResolved(graph: ResolutionGraph, dependencies: Dependency[]): Promise<string[]>;
@@ -0,0 +1,16 @@
1
+ import { Dependency } from "../manifest/dependency";
2
+ import { GitSource } from "../professional/sources/git-source";
3
+ import { PathSource } from "./path-source";
4
+ import { Registration } from "./registration";
5
+ import { RegistrySource } from "./registry-source";
6
+ import { Source } from "./source";
7
+ export { RegistrySource, PathSource, GitSource };
8
+ export interface Sources {
9
+ registry: {
10
+ [name: string]: Source;
11
+ };
12
+ git: Source;
13
+ path: Source;
14
+ }
15
+ export declare function resolve(sources: Sources, dependency: Dependency): Promise<Registration[]>;
16
+ export declare function fetch(sources: Sources, registration: Registration): Promise<string>;
@@ -0,0 +1,7 @@
1
+ import { Dependency } from "../manifest/dependency";
2
+ import { Registration } from "./registration";
3
+ import { Source } from "./source";
4
+ export declare class PathSource implements Source {
5
+ resolve(dependency: Dependency): Promise<Registration[]>;
6
+ fetch(registration: Registration): Promise<string>;
7
+ }
@@ -0,0 +1,17 @@
1
+ import { Snapshot } from "../manifest";
2
+ import { Dependency } from "../manifest/dependency";
3
+ export interface Registration extends Snapshot {
4
+ id: string;
5
+ source: string;
6
+ }
7
+ export declare function fromSnapshot(snapshot: Snapshot, source: string): Registration;
8
+ export declare function getRegistrationId(name: Snapshot): string;
9
+ export declare function getRegistrationId(name: string, version: string): string;
10
+ export declare function getRegistrationSource(type: string, value: string, details?: string): string;
11
+ export declare function getSourceParts(source: string): {
12
+ type: string;
13
+ value: string;
14
+ details: string | undefined;
15
+ };
16
+ export declare function toDependency(registration: Registration): Dependency;
17
+ export declare function isRegistration(value: Registration | Dependency): value is Registration;
@@ -0,0 +1,32 @@
1
+ import { Dependency } from "../manifest/dependency";
2
+ import { Registration } from "./registration";
3
+ import { Source } from "./source";
4
+ export interface RegistryOptions {
5
+ name: string;
6
+ index: string;
7
+ packages: string;
8
+ }
9
+ export declare class RegistrySource implements Source {
10
+ name: string;
11
+ local: {
12
+ index: string;
13
+ packages: string;
14
+ };
15
+ remote: {
16
+ index: string;
17
+ packages: string;
18
+ };
19
+ private sources;
20
+ private pulling?;
21
+ private upToDate;
22
+ constructor({ name, index, packages }: RegistryOptions);
23
+ resolve(dependency: Dependency): Promise<Registration[]>;
24
+ fetch(registration: Registration): Promise<string>;
25
+ pull(): Promise<void>;
26
+ }
27
+ export declare function pullIndex(local: string, remote: string): Promise<void>;
28
+ export declare function parseRegistration(registry: string, value: any): Registration;
29
+ export declare function sanitizePackageName(name: string): string;
30
+ export declare function getRemotePackage(packages: string, registration: Registration): string;
31
+ export declare function getLocalPackage(packages: string, registration: Registration): string;
32
+ export declare function getSource(sources: string, registration: Registration): string;
@@ -0,0 +1,6 @@
1
+ import { Dependency } from "../manifest/dependency";
2
+ import { Registration } from "./registration";
3
+ export interface Source {
4
+ resolve: (dependency: Dependency) => Registration[] | Promise<Registration[]>;
5
+ fetch: (registration: Registration) => string | Promise<string>;
6
+ }
@@ -0,0 +1,8 @@
1
+ import { TargetType } from "../manifest/target";
2
+ import { ProjectInfo } from "./project-info";
3
+ export interface AddOptions {
4
+ from?: string;
5
+ name?: string;
6
+ path?: string;
7
+ }
8
+ export declare function addTarget(type: TargetType, info: ProjectInfo, options?: AddOptions): Promise<void>;
@@ -0,0 +1,41 @@
1
+ import { Target } from "../manifest/target";
2
+ import { Project } from "../project";
3
+ import { ProjectInfo } from "./project-info";
4
+ export interface BuildOptions {
5
+ release?: boolean;
6
+ target?: string;
7
+ addin?: string;
8
+ }
9
+ /**
10
+ * Build target:
11
+ *
12
+ * 1. Create fresh target in staging
13
+ * 2. Import project
14
+ * 3. Backup previously built target
15
+ * 4. Move built target to build
16
+ */
17
+ export declare function buildTarget(target: Target, info: ProjectInfo, options?: BuildOptions): Promise<void>;
18
+ /**
19
+ * Create target binary
20
+ */
21
+ export declare function createTarget(project: Project, target: Target): Promise<string>;
22
+ /**
23
+ * Import project into target
24
+ *
25
+ * 1. Create "import" staging directory
26
+ * 2. Load build graph for project
27
+ * 3. Stage build graph
28
+ * 4. Import staged build graph
29
+ */
30
+ export declare function importTarget(target: Target, info: ProjectInfo, file: string, options?: BuildOptions): Promise<void>;
31
+ /**
32
+ * Backup previously built target (if available)
33
+ *
34
+ * - Removes previous backup (if found)
35
+ * - Attempts move, if that fails, it is assumed that the file is open
36
+ */
37
+ export declare function backupTarget(project: Project, target: Target): Promise<void>;
38
+ /**
39
+ * Restore previously built target (if available)
40
+ */
41
+ export declare function restoreTarget(project: Project, target: Target): Promise<void>;
@@ -0,0 +1,15 @@
1
+ import { Target } from "../manifest/target";
2
+ import { Project } from "../project";
3
+ import { ProjectInfo } from "./project-info";
4
+ export interface ExportOptions {
5
+ }
6
+ /**
7
+ * Export target (with staging directory)
8
+ *
9
+ * 1. Export source from target to staging (done previously)
10
+ * 2. Extract target to staging
11
+ * 3. Export build graph to src
12
+ * 4. Move extracted to target to src
13
+ */
14
+ export declare function exportTarget(target: Target, info: ProjectInfo, staging: string): Promise<void>;
15
+ export declare function extractTarget(project: Project, target: Target, staging: string): Promise<string>;
@@ -0,0 +1,7 @@
1
+ import { Target } from "../manifest/target";
2
+ import { Project } from "../project";
3
+ export interface TargetInfo {
4
+ target: Target;
5
+ blankTarget: boolean;
6
+ }
7
+ export declare function getTarget(project: Project, targetType: string | undefined): TargetInfo;
@@ -0,0 +1,3 @@
1
+ export { buildTarget } from "./build-target";
2
+ export { exportTarget } from "./export-target";
3
+ export { getTarget } from "./get-target";
@@ -0,0 +1,7 @@
1
+ import { Manifest } from "../manifest";
2
+ import { Project } from "../project";
3
+ export interface ProjectInfo {
4
+ project: Project;
5
+ dependencies: Manifest[];
6
+ blankTarget?: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { UnzipFile } from "../utils/zip";
2
+ export declare const filterTarget: (value: UnzipFile, index: number, values: UnzipFile[]) => boolean;
3
+ export declare const mapTarget: (value: UnzipFile, index: number, values: UnzipFile[]) => UnzipFile;
@@ -0,0 +1,2 @@
1
+ import { UnzipFile } from "../../utils/zip";
2
+ export default function transformCoreXml(file: UnzipFile): UnzipFile;
@@ -0,0 +1,2 @@
1
+ import { UnzipFile } from "../../utils/zip";
2
+ export default function transformWorkbookXml(file: UnzipFile): UnzipFile;
@@ -0,0 +1,4 @@
1
+ type AsyncFn<TValue> = (input: TValue) => Promise<TValue>;
2
+ type Fn<TValue> = (input: TValue) => TValue;
3
+ export declare function asyncMap<TValue>(...fns: Array<Fn<TValue> | AsyncFn<TValue>>): AsyncFn<TValue>;
4
+ export {};
@@ -0,0 +1 @@
1
+ export declare function download(url: string, dest: string): Promise<void>;
@@ -0,0 +1,23 @@
1
+ /// <reference types="node" />
2
+ import { readFile as _readFile, symlink as _symlink, writeFile as _writeFile } from "fs";
3
+ import { copy } from "fs-extra/lib/copy";
4
+ import { emptyDir } from "fs-extra/lib/empty";
5
+ import { readJson } from "fs-extra/lib/json/jsonfile";
6
+ import { ensureDir, ensureDirSync } from "fs-extra/lib/mkdirs";
7
+ import { move } from "fs-extra/lib/move";
8
+ import { pathExists } from "fs-extra/lib/path-exists";
9
+ import { remove } from "fs-extra/lib/remove";
10
+ declare const readFile: typeof _readFile.__promisify__;
11
+ declare const symlink: typeof _symlink.__promisify__;
12
+ declare const writeFile: typeof _writeFile.__promisify__;
13
+ declare function checksum(file: string, algorithm?: string): Promise<string>;
14
+ export interface TmpOptions {
15
+ dir?: string;
16
+ prefix?: string;
17
+ template?: string;
18
+ }
19
+ declare function tmpFile(options?: TmpOptions): Promise<string>;
20
+ declare function tmpFolder(options?: TmpOptions): Promise<string>;
21
+ declare function reset(): void;
22
+ export { readFileSync, watch } from "fs";
23
+ export { checksum, copy, emptyDir, ensureDir, ensureDirSync, move, pathExists, readFile, readJson, remove, reset, symlink, tmpFile, tmpFolder, writeFile };
@@ -0,0 +1 @@
1
+ export declare function getStaging(cache: string): string;
@@ -0,0 +1,4 @@
1
+ export declare function clone(remote: string, name: string, cwd: string): Promise<void>;
2
+ export declare function pull(local: string): Promise<void>;
3
+ export declare function init(dir: string): Promise<void>;
4
+ export declare function isGitRepository(dir: string): Promise<boolean>;
@@ -0,0 +1,9 @@
1
+ interface Release {
2
+ tag_name: string;
3
+ [key: string]: string;
4
+ }
5
+ export declare function getLatestRelease(options: {
6
+ owner: string;
7
+ repo: string;
8
+ }): Promise<Release>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare function has(value: object | undefined | null, key: string): boolean;
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ export type Encoding = "utf8" | "ascii";
3
+ export type Digest = "hex" | "base64";
4
+ export interface HashOptions {
5
+ algorithm?: string;
6
+ digest?: Digest;
7
+ }
8
+ export declare function hash(data: Buffer, options?: HashOptions): string;
@@ -0,0 +1 @@
1
+ export declare function getDefault(exports: any): any;
@@ -0,0 +1,5 @@
1
+ export declare function isString(value: any): value is string;
2
+ export declare function isDate(value: any): value is Date;
3
+ export declare function isNumber(value: any): value is number;
4
+ export declare function isBoolean(value: any): value is boolean;
5
+ export declare function isObject(value: any): value is object;
@@ -0,0 +1 @@
1
+ export default function noop(): void;
@@ -0,0 +1,15 @@
1
+ export declare class Observable<TValue> {
2
+ private subscriber;
3
+ constructor(subscriber: Subscriber<TValue>);
4
+ subscribe(observer: ObserverFunction<TValue> | Partial<Observer<TValue>>): Subscription;
5
+ }
6
+ export interface Observer<TValue> {
7
+ next(value: TValue): void;
8
+ error(error: Error): void;
9
+ complete(): void;
10
+ }
11
+ export type ObserverFunction<TValue> = (value: TValue) => void;
12
+ export interface Subscription {
13
+ unsubscribe(): void;
14
+ }
15
+ export type Subscriber<TValue> = (observer: Observer<TValue>) => (() => void) | void;
@@ -0,0 +1,6 @@
1
+ import { Progress } from "../reporter";
2
+ export interface ParallelOptions {
3
+ concurrency?: number;
4
+ progress?: Progress;
5
+ }
6
+ export declare function parallel<T, U>(values: T[], fn: (value: T) => U | Promise<U>, options?: ParallelOptions): Promise<U[]>;
@@ -0,0 +1,7 @@
1
+ export { basename, dirname, extname } from "path";
2
+ export declare function join(...parts: string[]): string;
3
+ export declare function normalize(value: string): string;
4
+ export declare function relative(from: string, to: string): string;
5
+ export declare function resolve(...parts: string[]): string;
6
+ export declare function sanitize(name: string): string;
7
+ export declare function trailing(value: string): string;
@@ -0,0 +1,5 @@
1
+ type MapFn<TValue> = (value: TValue, index: number, values: TValue[]) => TValue;
2
+ type FilterFn<TValue> = (value: TValue, index: number, values: TValue[]) => boolean;
3
+ export declare function pipeMap<TValue>(...fns: MapFn<TValue>[]): (value: TValue, index: number, values: TValue[]) => TValue;
4
+ export declare function pipeFilter<TValue>(...fns: FilterFn<TValue>[]): (value: TValue, index: number, values: TValue[]) => boolean;
5
+ export {};
@@ -0,0 +1,17 @@
1
+ export interface RunResult {
2
+ success: boolean;
3
+ messages: string[];
4
+ warnings: string[];
5
+ errors: string[];
6
+ stdout?: string;
7
+ stderr?: string;
8
+ }
9
+ export declare class RunError extends Error {
10
+ result: RunResult;
11
+ constructor(result: RunResult);
12
+ }
13
+ export declare function isRunError(error: unknown): error is RunError;
14
+ export declare function run(application: string, file: string, macro: string, args: string[]): Promise<RunResult>;
15
+ export declare function escape(value: string): string;
16
+ export declare function unescape(value: string): string;
17
+ export declare function toResult(stdout: string, stderr: string, err?: Error): RunResult;
@@ -0,0 +1,3 @@
1
+ import { Observable } from "./observable";
2
+ export declare function createStdoutFile(): Promise<string>;
3
+ export declare function watchFile(file: string): Observable<string>;
@@ -0,0 +1,4 @@
1
+ export declare const BY_LINE: RegExp;
2
+ export declare function truncate(value: string, len: number): string;
3
+ export declare function joinCommas(values: any[]): string;
4
+ export declare function capitalize(value: string): string;
@@ -0,0 +1,4 @@
1
+ export declare function parse(value: string): Promise<any>;
2
+ export declare function convert(value: any): Promise<string>;
3
+ export declare function patch(existing: string, updated: any): Promise<string>;
4
+ export declare function toLockfile(value: any, level?: number): string;
@@ -0,0 +1 @@
1
+ export declare function unique<T>(values: Iterable<T>): T[];
@@ -0,0 +1 @@
1
+ export default function without<TValue>(array: TValue[], ...values: TValue[]): TValue[];
@@ -0,0 +1,10 @@
1
+ /// <reference types="node" />
2
+ import { Element } from "xml-js";
3
+ export type Xml = any;
4
+ export declare function parseXml(xml: string | Buffer): Element;
5
+ export interface ConvertOptions {
6
+ compact?: boolean;
7
+ }
8
+ export declare function convertXml(value: Xml, options?: ConvertOptions): string;
9
+ export declare function findElement(elements: Element[] | undefined, callback: (element: Element, index: number, elements: Element[]) => boolean): Element | undefined;
10
+ export declare function findElementByName(elements: Element[] | undefined, name: string): Element | undefined;
@@ -0,0 +1,17 @@
1
+ /// <reference types="node" />
2
+ export declare function zip(dir: string, file: string): Promise<void>;
3
+ export interface UnzipOptions {
4
+ filter?: (file: UnzipFile, index: number, files: UnzipFile[]) => boolean;
5
+ map?: (file: UnzipFile, index: number, files: UnzipFile[]) => UnzipFile;
6
+ plugins?: UnzipPlugin[];
7
+ strip?: number;
8
+ }
9
+ export type UnzipPlugin = (buffer: Buffer) => Promise<UnzipFile[]>;
10
+ export interface UnzipFile {
11
+ data: Buffer;
12
+ mode: number;
13
+ mtime: string;
14
+ path: string;
15
+ type: string;
16
+ }
17
+ export declare function unzip(file: string, dest: string, options?: UnzipOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ "use strict";var t=require("./text-ba532b40.js"),r=require("./run-macro-f4aa7c14.js");exports.testProject=async function(s){const{target:a,args:e}=s,c=t.env.isWindows?"CON":"/dev/stdout";await r.runMacro({target:a,macro:"Tests.Run",args:[c,...e]})};
2
+ //# sourceMappingURL=test-project-d4f237d1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-project-d4f237d1.js","sources":["../src/actions/test-project.ts"],"sourcesContent":["import { env } from \"../env\";\nimport { runMacro } from \"./run-macro\";\n\nexport interface TestOptions {\n\ttarget?: string;\n\targs: string[];\n}\n\nexport async function testProject(options: TestOptions) {\n\tconst { target, args } = options;\n\tconst macro = \"Tests.Run\";\n\tconst stdout = env.isWindows ? \"CON\" : \"/dev/stdout\";\n\n\tawait runMacro({ target, macro, args: [stdout, ...args] });\n}\n"],"names":["async","options","target","args","stdout","env","isWindows","runMacro","macro"],"mappings":"0GAQOA,eAA2BC,GACjC,MAAMC,OAAEA,EAAMC,KAAEA,GAASF,EAEnBG,EAASC,EAAGA,IAACC,UAAY,MAAQ,oBAEjCC,EAAQA,SAAC,CAAEL,SAAQM,MAHX,YAGkBL,KAAM,CAACC,KAAWD,IACnD"}