@minecraft/core-build-tasks 5.1.0 → 5.3.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.
@@ -1,2 +1,2 @@
1
- import { TaskFunction } from 'just-scripts';
2
- export declare function coreLint(files: string[], fix?: boolean): TaskFunction;
1
+ import type { TaskFunction } from 'just-scripts';
2
+ export declare function coreLint(prettierFiles?: string[], fix?: boolean): TaskFunction;
@@ -1,22 +1,45 @@
1
+ import { TaskFunction } from 'just-scripts';
1
2
  /**
2
- * Configuration for publishing the release
3
+ * Gathers all files and compresses them into a zip archive as a release artifact.
4
+ */
5
+ export type FilesArtifact = {
6
+ files: string[];
7
+ sourceFormat: 'files';
8
+ };
9
+ /**
10
+ * Specify a pre-existing archive file as a release artifact.
11
+ */
12
+ export type ArchiveArtifact = {
13
+ path: string;
14
+ sourceFormat: 'archive';
15
+ };
16
+ /**
17
+ * Describes an artifact published with a release.
18
+ */
19
+ export type PublishReleaseArtifact = FilesArtifact | ArchiveArtifact;
20
+ /**
21
+ * Configuration for publishing the release.
3
22
  */
4
23
  export type PublishReleaseTaskConfig = {
5
24
  /**
6
- * A custom message to include in the release
7
- */
8
- message: string;
9
- /**
10
- * Repo Owner/Organization
25
+ * Repo Owner/Organization.
11
26
  */
12
27
  repoOwner: string;
13
28
  /**
14
- * Name of the repository
29
+ * Name of the repository.
15
30
  */
16
31
  repoName: string;
17
32
  /**
18
- * GitHub token used for creating the release. If not specified, will attempt to use REPO_PAT environment variable
33
+ * A custom message to include in the release.
34
+ */
35
+ message: string;
36
+ /**
37
+ * Artifact to include in the release. If not specified, will upload the `dist` folder as a zip archive.
38
+ */
39
+ artifact?: PublishReleaseArtifact;
40
+ /**
41
+ * GitHub token used for creating the release. If not specified, will attempt to use `REPO_PAT` environment variable.
19
42
  */
20
43
  token?: string;
21
44
  };
22
- export declare function publishReleaseTask(config: PublishReleaseTaskConfig): () => Promise<void>;
45
+ export declare function publishReleaseTask(config: PublishReleaseTaskConfig): TaskFunction;
@@ -1,6 +1,6 @@
1
1
  import { TaskFunction } from 'just-scripts';
2
2
  /**
3
- * If command line parameter `option` is present, watch for changes in the specified files and run the specified task.
3
+ * If command line parameter `watch` is present, it watches for changes in the specified files and run the specified task.
4
4
  * Otherwise, just run the task.
5
5
  * @param globs The file globs to watch.
6
6
  * @param taskFunction The task to run when changes are detected.