@noldova/tools.pipelines 0.0.2 → 0.0.3
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/README.md +65 -1
- package/api/index.d.ts +413 -2
- package/api/index.js +5 -0
- package/api/index.js.map +1 -1
- package/models/tracked-file.js +18 -0
- package/models/tracked-file.js.map +1 -0
- package/package.json +2 -2
- package/resources.js +112 -2
- package/resources.js.map +1 -1
- package/services/git.js +41 -0
- package/services/git.js.map +1 -1
- package/services/line-endings-step.js +57 -0
- package/services/line-endings-step.js.map +1 -0
- package/services/npm.js +17 -1
- package/services/npm.js.map +1 -1
- package/services/reproducible-step.js +84 -0
- package/services/reproducible-step.js.map +1 -0
- package/services/toolchain-step.js +38 -0
- package/services/toolchain-step.js.map +1 -0
- package/services/unchanged-step.js +26 -0
- package/services/unchanged-step.js.map +1 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @noldova/tools.pipelines
|
|
2
2
|
|
|
3
3
|
The steps of a build and release pipeline that work the same on any host.
|
|
4
|
-
This version holds the version model the steps share, the command-line base a host builds its command line on, and the steps: `source`, `archive`, `publish`, `nightly`, `prune` and `
|
|
4
|
+
This version holds the version model the steps share, the command-line base a host builds its command line on, and the steps: `source`, `archive`, `publish`, `nightly`, `prune`, `tag`, `toolchain`, `line-endings`, `unchanged` and `reproducible`.
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
@@ -196,6 +196,70 @@ result.message; // "Tagged commit 225059f4c1e6a3b2d8f7e9a0b1c2d3e4f5a6b7c8 as v0
|
|
|
196
196
|
- When the tag is already there, such as from a rerun or from another run that made it first, it succeeds if the tag points to the commit, and otherwise fails, naming both commits; it never moves or deletes a tag.
|
|
197
197
|
- A failed answer of the host is the step's result.
|
|
198
198
|
|
|
199
|
+
### The toolchain step
|
|
200
|
+
|
|
201
|
+
`toolchain <node-version> [<npm-version>]` checks that the Node.js running it is `<node-version>` and, when given, that `npm --version` prints `<npm-version>`; an empty npm version checks none.
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
import { Npm, ProcessRunner, ToolchainStep } from "@noldova/tools.pipelines";
|
|
205
|
+
|
|
206
|
+
const step = new ToolchainStep(new Npm(new ProcessRunner(), process.cwd()), process.version);
|
|
207
|
+
const result = await step.runAsync(["24.21.0", "11.19.0"]);
|
|
208
|
+
result.message; // "Node.js v24.21.0 and npm 11.19.0 run this step."
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
- Each version is exact, `major.minor.patch`; anything else, such as `24` or `v24.21.0`, fails before anything is read.
|
|
212
|
+
- It fails with one line for each version that differs, naming the version found, the one expected and the fix.
|
|
213
|
+
|
|
214
|
+
### The line-endings step
|
|
215
|
+
|
|
216
|
+
`line-endings` takes no values and checks the files the checkout tracks, in the working directory and the folders inside it.
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
import { Git, LineEndingsStep, ProcessRunner } from "@noldova/tools.pipelines";
|
|
220
|
+
|
|
221
|
+
const result = await new LineEndingsStep(new Git(new ProcessRunner(), process.cwd())).runAsync([]);
|
|
222
|
+
result.message; // ".gitattributes holds \"* text=auto eol=lf\", and the 12 tracked text files use LF line endings and end with exactly one newline."
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
- `.gitattributes` at the checkout's root holds the line `* text=auto eol=lf`.
|
|
226
|
+
- Every tracked text file's committed content uses LF line endings, and the file in the checkout ends with exactly one newline; a tracked file the checkout doesn't hold is a failure.
|
|
227
|
+
- It reads the files' ends from the checkout, so a pipeline runs it on a checkout as committed, before the build.
|
|
228
|
+
- It skips symbolic links, submodules, files git sees as binary and files `.gitattributes` marks `-text` or `binary`.
|
|
229
|
+
- It fails with one line for each thing that is wrong, naming the file and the fix, and fails when git lists no tracked file.
|
|
230
|
+
|
|
231
|
+
### The unchanged step
|
|
232
|
+
|
|
233
|
+
`unchanged` takes no values and checks that the checkout is as committed, such as after a build and its tests: `git status --porcelain` lists nothing.
|
|
234
|
+
It fails with each path git lists, changed, staged or untracked outside the ignored paths, and says to undo the change or ignore the output in `.gitignore`.
|
|
235
|
+
|
|
236
|
+
```ts
|
|
237
|
+
import { Git, ProcessRunner, UnchangedStep } from "@noldova/tools.pipelines";
|
|
238
|
+
|
|
239
|
+
const result = await new UnchangedStep(new Git(new ProcessRunner(), process.cwd())).runAsync([]);
|
|
240
|
+
result.message; // "The checkout has no changed or untracked file."
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### The reproducible step
|
|
244
|
+
|
|
245
|
+
`reproducible <folder>` runs after the build, in the checkout, and checks that a second build of the same commit packs the same archives, so that rerunning a release publishes nothing new.
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
import { Git, Npm, ProcessRunner, ReproducibleStep } from "@noldova/tools.pipelines";
|
|
249
|
+
|
|
250
|
+
const processRunner = new ProcessRunner();
|
|
251
|
+
const step = new ReproducibleStep(new Git(processRunner, process.cwd()), new Npm(processRunner, process.cwd()));
|
|
252
|
+
const result = await step.runAsync(["_packages"]);
|
|
253
|
+
result.message; // "A second build of commit 225059f…, in another folder, packed the same 2 archives byte for byte: …"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
- It adds a worktree of the checkout's commit in a new temporary folder, runs `npm run build` there, and compares the `.tgz` archives in `<folder>`, a path from the checkout's root, with those in the worktree's.
|
|
257
|
+
- It succeeds listing each archive with its SHA-512, and fails with one line for each archive that differs or is in only one build.
|
|
258
|
+
- It fails when `<folder>` is missing or holds no archive, and when the second build fails, with npm's exit code and error output.
|
|
259
|
+
- It removes the worktree and its folder whether it succeeds or fails.
|
|
260
|
+
- It makes its temporary folder in the root its constructor is given, or in `os.tmpdir()`; give a root the pipeline host empties after each job, so a cancelled run leaves nothing behind.
|
|
261
|
+
- `<folder>` must be inside the checkout: an absolute path, `..` or the checkout itself fails.
|
|
262
|
+
|
|
199
263
|
The declaration file `api/index.d.ts` documents every member with its contract and examples.
|
|
200
264
|
|
|
201
265
|
## License
|
package/api/index.d.ts
CHANGED
|
@@ -351,6 +351,46 @@ export declare class StepResult {
|
|
|
351
351
|
public static failed(message: string): StepResult;
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
+
/**
|
|
355
|
+
* A file a checkout tracks, as {@link Git.listTrackedFilesAsync} lists it.
|
|
356
|
+
*/
|
|
357
|
+
export declare class TrackedFile {
|
|
358
|
+
/**
|
|
359
|
+
* The file's path from the working directory, with `/` between folders.
|
|
360
|
+
*/
|
|
361
|
+
public readonly filePath: string;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The line endings of the file's committed content, as git names them:
|
|
365
|
+
* `"lf"`, `"crlf"`, `"mixed"`, `"none"` for text without a line ending,
|
|
366
|
+
* `"-text"` for content git sees as binary, or `""` for an entry without
|
|
367
|
+
* content of its own, such as a submodule.
|
|
368
|
+
*/
|
|
369
|
+
public readonly lineEndings: string;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Whether the file is text: not a symbolic link, not an entry without
|
|
373
|
+
* content of its own, not binary as git sees its content, and not marked
|
|
374
|
+
* `-text`, or `binary`, in `.gitattributes`.
|
|
375
|
+
*/
|
|
376
|
+
public readonly isText: boolean;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Creates a tracked file.
|
|
380
|
+
*
|
|
381
|
+
* @param filePath The file's path from the working directory.
|
|
382
|
+
* @param lineEndings The line endings of its committed content.
|
|
383
|
+
* @param isText Whether the file is text.
|
|
384
|
+
* @example
|
|
385
|
+
* ```ts
|
|
386
|
+
* import { TrackedFile } from "@noldova/tools.pipelines";
|
|
387
|
+
*
|
|
388
|
+
* new TrackedFile("README.md", "lf", true).isText; // true
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
public constructor(filePath: string, lineEndings: string, isText: boolean);
|
|
392
|
+
}
|
|
393
|
+
|
|
354
394
|
/**
|
|
355
395
|
* A package and the path of its archive, as {@link ArchiveStep} checked it.
|
|
356
396
|
*/
|
|
@@ -424,7 +464,7 @@ export declare interface IStep {
|
|
|
424
464
|
|
|
425
465
|
/**
|
|
426
466
|
* The values the step takes, as a usage line shows them, such as
|
|
427
|
-
* `"<version> <commit>"
|
|
467
|
+
* `"<version> <commit>"`; `""` for a step that takes none.
|
|
428
468
|
*/
|
|
429
469
|
readonly usage: string;
|
|
430
470
|
|
|
@@ -693,6 +733,11 @@ export declare class ProcessRunner {
|
|
|
693
733
|
* `git` program.
|
|
694
734
|
*/
|
|
695
735
|
export declare class Git {
|
|
736
|
+
/**
|
|
737
|
+
* The directory git runs in, as the constructor was given it.
|
|
738
|
+
*/
|
|
739
|
+
public readonly workingDirectory: string;
|
|
740
|
+
|
|
696
741
|
/**
|
|
697
742
|
* Creates a reader of one clone.
|
|
698
743
|
*
|
|
@@ -708,6 +753,41 @@ export declare class Git {
|
|
|
708
753
|
*/
|
|
709
754
|
public constructor(processRunner: ProcessRunner, workingDirectory: string);
|
|
710
755
|
|
|
756
|
+
/**
|
|
757
|
+
* Adds a worktree of the clone at a commit, detached from any branch.
|
|
758
|
+
*
|
|
759
|
+
* @param directory The worktree's directory: a new or empty one.
|
|
760
|
+
* @param commit The commit, which the clone holds.
|
|
761
|
+
* @returns A promise that resolves once the worktree is checked out. It
|
|
762
|
+
* rejects with {@link ProcessException} if git cannot start or fails, such
|
|
763
|
+
* as when the directory holds files.
|
|
764
|
+
* @example
|
|
765
|
+
* ```ts
|
|
766
|
+
* import { Git, ProcessRunner } from "@noldova/tools.pipelines";
|
|
767
|
+
*
|
|
768
|
+
* const git = new Git(new ProcessRunner(), process.cwd());
|
|
769
|
+
* await git.addWorktreeAsync("/tmp/second-build", await git.readHeadAsync());
|
|
770
|
+
* ```
|
|
771
|
+
*/
|
|
772
|
+
public addWorktreeAsync(directory: string, commit: string): Promise<void>;
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Removes a worktree and its directory, with the files a build wrote in
|
|
776
|
+
* it.
|
|
777
|
+
*
|
|
778
|
+
* @param directory The worktree's directory.
|
|
779
|
+
* @returns A promise that resolves once the worktree is removed. It rejects
|
|
780
|
+
* with {@link ProcessException} if git cannot start or fails, such as when
|
|
781
|
+
* the directory is not a worktree of the clone.
|
|
782
|
+
* @example
|
|
783
|
+
* ```ts
|
|
784
|
+
* import { Git, ProcessRunner } from "@noldova/tools.pipelines";
|
|
785
|
+
*
|
|
786
|
+
* await new Git(new ProcessRunner(), process.cwd()).removeWorktreeAsync("/tmp/second-build");
|
|
787
|
+
* ```
|
|
788
|
+
*/
|
|
789
|
+
public removeWorktreeAsync(directory: string): Promise<void>;
|
|
790
|
+
|
|
711
791
|
/**
|
|
712
792
|
* Tells whether a revision names a commit in the clone.
|
|
713
793
|
*
|
|
@@ -786,6 +866,64 @@ export declare class Git {
|
|
|
786
866
|
*/
|
|
787
867
|
public listFilesAsync(commit: string, folderPath: string): Promise<readonly string[]>;
|
|
788
868
|
|
|
869
|
+
/**
|
|
870
|
+
* Lists what `git status --porcelain` lists: the checkout's changed,
|
|
871
|
+
* staged and untracked paths, outside the ignored ones.
|
|
872
|
+
*
|
|
873
|
+
* @returns A promise of each line git writes, such as ` M README.md` or
|
|
874
|
+
* `?? notes.txt`, with paths from the repository's root as git quotes
|
|
875
|
+
* them; none for a checkout as committed. It rejects with
|
|
876
|
+
* {@link ProcessException} if git cannot start or fails otherwise, such as
|
|
877
|
+
* outside a clone.
|
|
878
|
+
* @example
|
|
879
|
+
* ```ts
|
|
880
|
+
* import { Git, ProcessRunner } from "@noldova/tools.pipelines";
|
|
881
|
+
*
|
|
882
|
+
* const git = new Git(new ProcessRunner(), process.cwd());
|
|
883
|
+
* await git.listChangesAsync(); // [] in a checkout as committed
|
|
884
|
+
* ```
|
|
885
|
+
*/
|
|
886
|
+
public listChangesAsync(): Promise<readonly string[]>;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Lists the files the index tracks in the working directory and the
|
|
890
|
+
* folders inside it.
|
|
891
|
+
*
|
|
892
|
+
* @returns A promise of each file, in git's order, with its line endings
|
|
893
|
+
* and whether it is text; none when the index tracks no file there. It
|
|
894
|
+
* rejects with {@link ProcessException} if git cannot start or fails
|
|
895
|
+
* otherwise, such as outside a clone.
|
|
896
|
+
* @example
|
|
897
|
+
* ```ts
|
|
898
|
+
* import { Git, ProcessRunner } from "@noldova/tools.pipelines";
|
|
899
|
+
*
|
|
900
|
+
* const git = new Git(new ProcessRunner(), process.cwd());
|
|
901
|
+
* (await git.listTrackedFilesAsync()).filter(t => t.isText).length; // the number of tracked text files
|
|
902
|
+
* ```
|
|
903
|
+
*/
|
|
904
|
+
public listTrackedFilesAsync(): Promise<readonly TrackedFile[]>;
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Reads the last bytes of a file as the checkout holds it, which can
|
|
908
|
+
* differ from the committed content when the file was changed after the
|
|
909
|
+
* checkout.
|
|
910
|
+
*
|
|
911
|
+
* @param filePath The file's path from the working directory.
|
|
912
|
+
* @param byteCount How many bytes to read from the file's end.
|
|
913
|
+
* @returns A promise of the file's last `byteCount` bytes, or all of them
|
|
914
|
+
* for a shorter file; `null` when the checkout has no file at the path,
|
|
915
|
+
* such as after the file was deleted. It rejects with the file system's
|
|
916
|
+
* error if the file cannot be read otherwise.
|
|
917
|
+
* @example
|
|
918
|
+
* ```ts
|
|
919
|
+
* import { Git, ProcessRunner } from "@noldova/tools.pipelines";
|
|
920
|
+
*
|
|
921
|
+
* const git = new Git(new ProcessRunner(), process.cwd());
|
|
922
|
+
* (await git.readCheckoutFileEndAsync("README.md", 2))?.toString("utf8"); // ".\n"
|
|
923
|
+
* ```
|
|
924
|
+
*/
|
|
925
|
+
public readCheckoutFileEndAsync(filePath: string, byteCount: number): Promise<Buffer | null>;
|
|
926
|
+
|
|
789
927
|
/**
|
|
790
928
|
* Reads a file as a commit holds it.
|
|
791
929
|
*
|
|
@@ -895,6 +1033,9 @@ export declare class Npm {
|
|
|
895
1033
|
* @param processRunner The runner that starts `npm`.
|
|
896
1034
|
* @param workingDirectory The directory `npm` runs in, whose configuration
|
|
897
1035
|
* it reads.
|
|
1036
|
+
* @param platform The platform npm runs on, as `process.platform` names it;
|
|
1037
|
+
* on `win32`, where npm is a command script, it reads npm's version
|
|
1038
|
+
* through `cmd.exe`. Omitted, it is `process.platform`.
|
|
898
1039
|
* @example
|
|
899
1040
|
* ```ts
|
|
900
1041
|
* import { Npm, ProcessRunner } from "@noldova/tools.pipelines";
|
|
@@ -902,7 +1043,7 @@ export declare class Npm {
|
|
|
902
1043
|
* const npm = new Npm(new ProcessRunner(), process.cwd());
|
|
903
1044
|
* ```
|
|
904
1045
|
*/
|
|
905
|
-
public constructor(processRunner: ProcessRunner, workingDirectory: string);
|
|
1046
|
+
public constructor(processRunner: ProcessRunner, workingDirectory: string, platform?: string);
|
|
906
1047
|
|
|
907
1048
|
/**
|
|
908
1049
|
* Reads a field of a package or a version from the registry, asking the
|
|
@@ -972,6 +1113,40 @@ export declare class Npm {
|
|
|
972
1113
|
*/
|
|
973
1114
|
public publishAsync(archivePath: string, tag: string, access: string, registry: string): Promise<ProcessResult>;
|
|
974
1115
|
|
|
1116
|
+
/**
|
|
1117
|
+
* Runs the build script of the package in a directory, with
|
|
1118
|
+
* `npm run build`, or on Windows `cmd.exe /d /s /c "npm.cmd run build"`, a
|
|
1119
|
+
* fixed command.
|
|
1120
|
+
*
|
|
1121
|
+
* @param directory The directory whose `package.json` names the build
|
|
1122
|
+
* script.
|
|
1123
|
+
* @returns A promise of npm's exit code and of what it wrote; a build that
|
|
1124
|
+
* fails still resolves. It rejects with {@link ProcessException} if the
|
|
1125
|
+
* program cannot start.
|
|
1126
|
+
* @example
|
|
1127
|
+
* ```ts
|
|
1128
|
+
* import { Npm, ProcessRunner } from "@noldova/tools.pipelines";
|
|
1129
|
+
*
|
|
1130
|
+
* (await new Npm(new ProcessRunner(), process.cwd()).buildAsync("/tmp/second-build")).isSuccessful; // true when the build passes
|
|
1131
|
+
* ```
|
|
1132
|
+
*/
|
|
1133
|
+
public buildAsync(directory: string): Promise<ProcessResult>;
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Reads the version of the npm that runs, with `npm --version`, or on
|
|
1137
|
+
* Windows `cmd.exe /d /s /c "npm.cmd --version"`, a fixed command.
|
|
1138
|
+
*
|
|
1139
|
+
* @returns A promise of the version, such as `11.19.0`. It rejects with
|
|
1140
|
+
* {@link ProcessException} if npm cannot start or fails.
|
|
1141
|
+
* @example
|
|
1142
|
+
* ```ts
|
|
1143
|
+
* import { Npm, ProcessRunner } from "@noldova/tools.pipelines";
|
|
1144
|
+
*
|
|
1145
|
+
* await new Npm(new ProcessRunner(), process.cwd()).readVersionAsync(); // "11.19.0"
|
|
1146
|
+
* ```
|
|
1147
|
+
*/
|
|
1148
|
+
public readVersionAsync(): Promise<string>;
|
|
1149
|
+
|
|
975
1150
|
/**
|
|
976
1151
|
* Tells whether a text is a registry the steps take: an `https` URL
|
|
977
1152
|
* without credentials, a query or a fragment.
|
|
@@ -1488,3 +1663,239 @@ export declare class TagStep implements IStep {
|
|
|
1488
1663
|
*/
|
|
1489
1664
|
public runAsync(values: readonly string[]): Promise<StepResult>;
|
|
1490
1665
|
}
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* The step that checks the line endings of the files a checkout tracks:
|
|
1669
|
+
* `line-endings`, which takes no values. It succeeds only when
|
|
1670
|
+
* `.gitattributes` at the checkout's root holds the line
|
|
1671
|
+
* `* text=auto eol=lf`, and every tracked text file uses LF line endings and
|
|
1672
|
+
* ends with exactly one newline. It skips the files that are not text, as
|
|
1673
|
+
* {@link TrackedFile.isText} tells.
|
|
1674
|
+
*/
|
|
1675
|
+
export declare class LineEndingsStep implements IStep {
|
|
1676
|
+
/**
|
|
1677
|
+
* The step's name, `"line-endings"`.
|
|
1678
|
+
*/
|
|
1679
|
+
public readonly name: string;
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* The values the step takes: none, `""`.
|
|
1683
|
+
*/
|
|
1684
|
+
public readonly usage: string;
|
|
1685
|
+
|
|
1686
|
+
/**
|
|
1687
|
+
* Creates the step over a checkout.
|
|
1688
|
+
*
|
|
1689
|
+
* @param git The reader of the clone, whose working directory is the
|
|
1690
|
+
* checkout's root, or the folder whose files the step checks.
|
|
1691
|
+
* @example
|
|
1692
|
+
* ```ts
|
|
1693
|
+
* import { Git, LineEndingsStep, ProcessRunner } from "@noldova/tools.pipelines";
|
|
1694
|
+
*
|
|
1695
|
+
* const step = new LineEndingsStep(new Git(new ProcessRunner(), process.cwd()));
|
|
1696
|
+
* step.name; // "line-endings"
|
|
1697
|
+
* ```
|
|
1698
|
+
*/
|
|
1699
|
+
public constructor(git: Git);
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* Checks the line endings.
|
|
1703
|
+
*
|
|
1704
|
+
* @param values None.
|
|
1705
|
+
* @returns A promise of the result: succeeded, such as
|
|
1706
|
+
* `.gitattributes holds "* text=auto eol=lf", and the 12 tracked text
|
|
1707
|
+
* files use LF line endings and end with exactly one newline.`, or failed
|
|
1708
|
+
* when values are given, when git lists no tracked file, or with one line
|
|
1709
|
+
* for each thing that is wrong, naming the file and the fix: a
|
|
1710
|
+
* `.gitattributes` without the line, a file whose committed content has
|
|
1711
|
+
* CRLF or mixed line endings, a file the checkout does not hold, a file
|
|
1712
|
+
* that does not end with a newline, and a file that ends with a blank
|
|
1713
|
+
* line. The line endings come from the committed content, and the files'
|
|
1714
|
+
* ends from the checkout, so a pipeline runs the step on a checkout as
|
|
1715
|
+
* committed, before anything changes it. It rejects with
|
|
1716
|
+
* {@link ProcessException} if git cannot start or fails otherwise, such as
|
|
1717
|
+
* outside a clone.
|
|
1718
|
+
* @example
|
|
1719
|
+
* ```ts
|
|
1720
|
+
* import { Git, LineEndingsStep, ProcessRunner } from "@noldova/tools.pipelines";
|
|
1721
|
+
*
|
|
1722
|
+
* const step = new LineEndingsStep(new Git(new ProcessRunner(), process.cwd()));
|
|
1723
|
+
* const result = await step.runAsync([]);
|
|
1724
|
+
* result.message; // "\"README.md\" does not end with a newline; add one." when it does not
|
|
1725
|
+
* (await step.runAsync(["src"])).message; // "The line-endings step takes no values."
|
|
1726
|
+
* ```
|
|
1727
|
+
*/
|
|
1728
|
+
public runAsync(values: readonly string[]): Promise<StepResult>;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* The step that checks that a checkout is as committed: `unchanged`, which
|
|
1733
|
+
* takes no values. Run after a build and its tests, it finds the tracked
|
|
1734
|
+
* files they changed and the files they wrote outside the ignored paths.
|
|
1735
|
+
*/
|
|
1736
|
+
export declare class UnchangedStep implements IStep {
|
|
1737
|
+
/**
|
|
1738
|
+
* The step's name, `"unchanged"`.
|
|
1739
|
+
*/
|
|
1740
|
+
public readonly name: string;
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* The values the step takes: none, `""`.
|
|
1744
|
+
*/
|
|
1745
|
+
public readonly usage: string;
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* Creates the step over a checkout.
|
|
1749
|
+
*
|
|
1750
|
+
* @param git The reader of the clone.
|
|
1751
|
+
* @example
|
|
1752
|
+
* ```ts
|
|
1753
|
+
* import { Git, ProcessRunner, UnchangedStep } from "@noldova/tools.pipelines";
|
|
1754
|
+
*
|
|
1755
|
+
* const step = new UnchangedStep(new Git(new ProcessRunner(), process.cwd()));
|
|
1756
|
+
* step.name; // "unchanged"
|
|
1757
|
+
* ```
|
|
1758
|
+
*/
|
|
1759
|
+
public constructor(git: Git);
|
|
1760
|
+
|
|
1761
|
+
/**
|
|
1762
|
+
* Checks that the checkout has no changed or untracked file.
|
|
1763
|
+
*
|
|
1764
|
+
* @param values None.
|
|
1765
|
+
* @returns A promise of the result: succeeded,
|
|
1766
|
+
* `The checkout has no changed or untracked file.`, when `git status
|
|
1767
|
+
* --porcelain` lists nothing, or failed when values are given, or with
|
|
1768
|
+
* each path git lists, as it lists them, and how to fix it. It rejects with
|
|
1769
|
+
* {@link ProcessException} if git cannot start or fails otherwise, such as
|
|
1770
|
+
* outside a clone.
|
|
1771
|
+
* @example
|
|
1772
|
+
* ```ts
|
|
1773
|
+
* import { Git, ProcessRunner, UnchangedStep } from "@noldova/tools.pipelines";
|
|
1774
|
+
*
|
|
1775
|
+
* const step = new UnchangedStep(new Git(new ProcessRunner(), process.cwd()));
|
|
1776
|
+
* (await step.runAsync([])).isSuccessful; // true in a checkout as committed
|
|
1777
|
+
* ```
|
|
1778
|
+
*/
|
|
1779
|
+
public runAsync(values: readonly string[]): Promise<StepResult>;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* The step that checks the toolchain a job runs:
|
|
1784
|
+
* `toolchain <node-version> [<npm-version>]`. It succeeds only when the
|
|
1785
|
+
* Node.js that runs it is that version and, when an npm version is given,
|
|
1786
|
+
* `npm --version` prints it.
|
|
1787
|
+
*/
|
|
1788
|
+
export declare class ToolchainStep implements IStep {
|
|
1789
|
+
/**
|
|
1790
|
+
* The step's name, `"toolchain"`.
|
|
1791
|
+
*/
|
|
1792
|
+
public readonly name: string;
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* The values the step takes, `"<node-version> [<npm-version>]"`.
|
|
1796
|
+
*/
|
|
1797
|
+
public readonly usage: string;
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* Creates the step.
|
|
1801
|
+
*
|
|
1802
|
+
* @param npm What reads npm's version.
|
|
1803
|
+
* @param nodeVersion The version of the Node.js that runs the step, as
|
|
1804
|
+
* `process.version` gives it, such as `v24.21.0`.
|
|
1805
|
+
* @example
|
|
1806
|
+
* ```ts
|
|
1807
|
+
* import { Npm, ProcessRunner, ToolchainStep } from "@noldova/tools.pipelines";
|
|
1808
|
+
*
|
|
1809
|
+
* const step = new ToolchainStep(new Npm(new ProcessRunner(), process.cwd()), process.version);
|
|
1810
|
+
* step.name; // "toolchain"
|
|
1811
|
+
* ```
|
|
1812
|
+
*/
|
|
1813
|
+
public constructor(npm: Npm, nodeVersion: string);
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* Checks the toolchain.
|
|
1817
|
+
*
|
|
1818
|
+
* @param values The Node.js version, such as `24.21.0`, and optionally
|
|
1819
|
+
* the npm version, such as `11.19.0`; each exact, `major.minor.patch`.
|
|
1820
|
+
* An empty npm version is the same as none, so a workflow can pass a
|
|
1821
|
+
* setting that names none.
|
|
1822
|
+
* @returns A promise of the result: succeeded, such as
|
|
1823
|
+
* `Node.js v24.21.0 and npm 11.19.0 run this step.`, or failed for no
|
|
1824
|
+
* values or more than two, for a version that is not exact, or with one
|
|
1825
|
+
* line for each version that differs, naming the version found, the one
|
|
1826
|
+
* expected and the fix. It reads npm's version only when one is given, and
|
|
1827
|
+
* rejects with {@link ProcessException} if npm cannot start or fails.
|
|
1828
|
+
* @example
|
|
1829
|
+
* ```ts
|
|
1830
|
+
* import { Npm, ProcessRunner, ToolchainStep } from "@noldova/tools.pipelines";
|
|
1831
|
+
*
|
|
1832
|
+
* const step = new ToolchainStep(new Npm(new ProcessRunner(), process.cwd()), "v24.20.0");
|
|
1833
|
+
* (await step.runAsync(["24.21.0"])).message; // "Node.js v24.20.0 runs this step, not v24.21.0; set up Node.js 24.21.0 before it."
|
|
1834
|
+
* ```
|
|
1835
|
+
*/
|
|
1836
|
+
public runAsync(values: readonly string[]): Promise<StepResult>;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
/**
|
|
1840
|
+
* The step that checks a build is reproducible: `reproducible <folder>`.
|
|
1841
|
+
* Run after the build in a checkout, it builds the checkout's commit again in
|
|
1842
|
+
* a worktree in a new temporary folder, with `npm run build`, and succeeds
|
|
1843
|
+
* only when both builds' `<folder>` hold the same `.tgz` archives, byte for
|
|
1844
|
+
* byte, so that rerunning a release publishes nothing new.
|
|
1845
|
+
*/
|
|
1846
|
+
export declare class ReproducibleStep implements IStep {
|
|
1847
|
+
/**
|
|
1848
|
+
* The step's name, `"reproducible"`.
|
|
1849
|
+
*/
|
|
1850
|
+
public readonly name: string;
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
* The values the step takes, `"<folder>"`.
|
|
1854
|
+
*/
|
|
1855
|
+
public readonly usage: string;
|
|
1856
|
+
|
|
1857
|
+
/**
|
|
1858
|
+
* Creates the step over a checkout.
|
|
1859
|
+
*
|
|
1860
|
+
* @param git The reader of the clone, whose working directory is the
|
|
1861
|
+
* checkout's root.
|
|
1862
|
+
* @param npm What runs the second build.
|
|
1863
|
+
* @param temporaryRoot The folder the step makes its temporary folder in,
|
|
1864
|
+
* such as one the pipeline host empties after each job, so a run that is
|
|
1865
|
+
* cancelled leaves nothing behind. Omitted or empty, it is `os.tmpdir()`.
|
|
1866
|
+
* @example
|
|
1867
|
+
* ```ts
|
|
1868
|
+
* import { Git, Npm, ProcessRunner, ReproducibleStep } from "@noldova/tools.pipelines";
|
|
1869
|
+
*
|
|
1870
|
+
* const processRunner = new ProcessRunner();
|
|
1871
|
+
* const step = new ReproducibleStep(new Git(processRunner, process.cwd()), new Npm(processRunner, process.cwd()));
|
|
1872
|
+
* step.name; // "reproducible"
|
|
1873
|
+
* ```
|
|
1874
|
+
*/
|
|
1875
|
+
public constructor(git: Git, npm: Npm, temporaryRoot?: string);
|
|
1876
|
+
|
|
1877
|
+
/**
|
|
1878
|
+
* Builds the commit again and compares the archives.
|
|
1879
|
+
*
|
|
1880
|
+
* @param values The folder the build packs its archives into, as a path
|
|
1881
|
+
* from the checkout's root, such as `_packages`.
|
|
1882
|
+
* @returns A promise of the result: succeeded, listing each archive with
|
|
1883
|
+
* its SHA-512, or failed for any number of values but one, for a folder
|
|
1884
|
+
* that is absolute, outside the checkout or the checkout itself, a missing
|
|
1885
|
+
* folder or one without archives, a second build that
|
|
1886
|
+
* fails, with npm's exit code and error output, or with one line for each
|
|
1887
|
+
* archive that differs or is in only one build. It removes the worktree and
|
|
1888
|
+
* its folder whether it succeeds or fails, and rejects with
|
|
1889
|
+
* {@link ProcessException} if git or npm cannot start, or git fails, such
|
|
1890
|
+
* as outside a clone.
|
|
1891
|
+
* @example
|
|
1892
|
+
* ```ts
|
|
1893
|
+
* import { Git, Npm, ProcessRunner, ReproducibleStep } from "@noldova/tools.pipelines";
|
|
1894
|
+
*
|
|
1895
|
+
* const processRunner = new ProcessRunner();
|
|
1896
|
+
* const step = new ReproducibleStep(new Git(processRunner, process.cwd()), new Npm(processRunner, process.cwd()));
|
|
1897
|
+
* (await step.runAsync(["_packages"])).isSuccessful; // true when the second build packs the same archives
|
|
1898
|
+
* ```
|
|
1899
|
+
*/
|
|
1900
|
+
public runAsync(values: readonly string[]): Promise<StepResult>;
|
|
1901
|
+
}
|
package/api/index.js
CHANGED
|
@@ -12,16 +12,21 @@ export { ArchiveCheck } from "../models/archive-check.js";
|
|
|
12
12
|
export { PackageArchive } from "../models/package-archive.js";
|
|
13
13
|
export { ProcessResult } from "../models/process-result.js";
|
|
14
14
|
export { StepResult } from "../models/step-result.js";
|
|
15
|
+
export { TrackedFile } from "../models/tracked-file.js";
|
|
15
16
|
export { Version } from "../models/version.js";
|
|
16
17
|
export { ArchiveStep } from "../services/archive-step.js";
|
|
17
18
|
export { CommandLine } from "../services/command-line.js";
|
|
18
19
|
export { Git } from "../services/git.js";
|
|
20
|
+
export { LineEndingsStep } from "../services/line-endings-step.js";
|
|
19
21
|
export { NightlyStep } from "../services/nightly-step.js";
|
|
20
22
|
export { Npm } from "../services/npm.js";
|
|
21
23
|
export { ProcessRunner } from "../services/process-runner.js";
|
|
22
24
|
export { PruneStep } from "../services/prune-step.js";
|
|
23
25
|
export { PublishStep } from "../services/publish-step.js";
|
|
26
|
+
export { ReproducibleStep } from "../services/reproducible-step.js";
|
|
24
27
|
export { SourceStep } from "../services/source-step.js";
|
|
25
28
|
export { TagStep } from "../services/tag-step.js";
|
|
26
29
|
export { Tar } from "../services/tar.js";
|
|
30
|
+
export { ToolchainStep } from "../services/toolchain-step.js";
|
|
31
|
+
export { UnchangedStep } from "../services/unchanged-step.js";
|
|
27
32
|
//# sourceMappingURL=index.js.map
|
package/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAKtE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"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E,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export class TrackedFile {
|
|
9
|
+
filePath;
|
|
10
|
+
lineEndings;
|
|
11
|
+
isText;
|
|
12
|
+
constructor(filePath, lineEndings, isText) {
|
|
13
|
+
this.filePath = filePath;
|
|
14
|
+
this.lineEndings = lineEndings;
|
|
15
|
+
this.isText = isText;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=tracked-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracked-file.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/models/tracked-file.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,WAAW;IACN,QAAQ,CAAS;IACjB,WAAW,CAAS;IACpB,MAAM,CAAU;IAEhC,YAAmB,QAAgB,EAAE,WAAmB,EAAE,MAAe;QACvE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noldova/tools.pipelines",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "api/index.js",
|
|
6
6
|
"types": "api/index.d.ts",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"@noldova/context.exceptions": "0.0.3",
|
|
23
23
|
"@noldova/context.json": "0.0.3"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "a4f2a3c28d9a41aeaf8aa13b88f333587d3670ca"
|
|
26
26
|
}
|
package/resources.js
CHANGED
|
@@ -8,30 +8,52 @@
|
|
|
8
8
|
export class Resources {
|
|
9
9
|
static accessLevels = ["public", "restricted"];
|
|
10
10
|
static archiveLicensePath = "package/LICENSE";
|
|
11
|
+
static archiveFileExtension = ".tgz";
|
|
11
12
|
static archiveManifestPath = "package/package.json";
|
|
12
13
|
static archiveStepName = "archive";
|
|
13
14
|
static archiveStepUsage = "<folder> <version> <commit> <scope>";
|
|
15
|
+
static checkoutUnchanged = "The checkout has no changed or untracked file.";
|
|
14
16
|
static commitPattern = /^[0-9a-f]{40}$/;
|
|
15
17
|
static credentialFilePattern = /(?:^|\/)(?:\.npmrc|\.netrc|\.env(?:\.[^/]+)?|id_rsa|id_dsa|id_ecdsa|id_ed25519|[^/]*\.(?:pem|key|p12|pfx))$/i;
|
|
18
|
+
static crlfLineEndings = "crlf";
|
|
16
19
|
static dependenciesField = "dependencies";
|
|
17
20
|
static failureExitCode = 1;
|
|
21
|
+
static exactVersionPattern = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/;
|
|
22
|
+
static fileEndByteCount = 2;
|
|
23
|
+
static gitAddWorktreeValues = ["worktree", "add", "--quiet", "--detach", "--end-of-options"];
|
|
24
|
+
static gitAttributesFilePath = ".gitattributes";
|
|
25
|
+
static gitAttributesLine = "* text=auto eol=lf";
|
|
26
|
+
static gitCheckoutRevision = "HEAD";
|
|
27
|
+
static gitEntrySeparator = "\t";
|
|
18
28
|
static gitFileSeparator = "\0";
|
|
19
29
|
static gitFileType = "blob";
|
|
20
30
|
static gitHeadField = "gitHead";
|
|
21
31
|
static gitHeadRevision = "HEAD^{commit}";
|
|
22
32
|
static gitIsAncestorValues = ["merge-base", "--is-ancestor", "--end-of-options"];
|
|
33
|
+
static gitLineEndingsPrefix = "i/";
|
|
34
|
+
static gitLineEndingsSeparator = /\s+/;
|
|
35
|
+
static gitListChangesValues = ["status", "--porcelain"];
|
|
23
36
|
static gitListFilesValues = ["ls-tree", "-r", "-z", "--name-only", "--full-tree", "--end-of-options"];
|
|
37
|
+
static gitListTrackedFilesValues = ["ls-files", "-z", "--stage", "--eol"];
|
|
38
|
+
static gitModeSeparator = " ";
|
|
39
|
+
static gitNotTextAttribute = "attr/-text";
|
|
40
|
+
static gitNotTextLineEndings = "-text";
|
|
24
41
|
static gitNotFoundExitCode = 1;
|
|
25
42
|
static gitProgram = "git";
|
|
26
43
|
static gitReadFileValues = ["cat-file", "blob", "--end-of-options"];
|
|
27
44
|
static gitReadHeadValues = ["rev-parse", "--verify", "--end-of-options"];
|
|
28
45
|
static gitReadTypeValues = ["cat-file", "-t", "--end-of-options"];
|
|
46
|
+
static gitRemoveWorktreeValues = ["worktree", "remove", "--force", "--end-of-options"];
|
|
47
|
+
static gitSymbolicLinkMode = "120000";
|
|
29
48
|
static gitVerifyValues = ["rev-parse", "--verify", "--quiet", "--end-of-options"];
|
|
30
49
|
static integrityAlgorithm = "sha512";
|
|
31
50
|
static integrityEncoding = "base64";
|
|
51
|
+
static integrityPrefix = "sha512-";
|
|
32
52
|
static keepVersionsPattern = /^[1-9][0-9]*$/;
|
|
33
53
|
static latestTag = "latest";
|
|
34
54
|
static licenseField = "license";
|
|
55
|
+
static lineEndingsStepName = "line-endings";
|
|
56
|
+
static lineEndingsStepUsage = "";
|
|
35
57
|
static lineBreakPattern = /\r?\n/;
|
|
36
58
|
static lineSeparator = "\n";
|
|
37
59
|
static mainBranch = "origin/main";
|
|
@@ -40,13 +62,17 @@ export class Resources {
|
|
|
40
62
|
static manifestFileName = "package.json";
|
|
41
63
|
static messagePartSeparator = "; ";
|
|
42
64
|
static minorPartName = "minor";
|
|
65
|
+
static mixedLineEndings = "mixed";
|
|
43
66
|
static nameField = "name";
|
|
67
|
+
static newlineByte = 10;
|
|
44
68
|
static nightlyDatePattern = /^([1-9][0-9]{3})([0-9]{2})([0-9]{2})$/;
|
|
45
69
|
static nightlySeparator = "-nightly.";
|
|
46
70
|
static nightlyStepName = "nightly";
|
|
47
71
|
static nightlyStepUsage = "<commit> <registry>";
|
|
48
72
|
static nightlyTag = "nightly";
|
|
73
|
+
static nodeVersionPrefix = "v";
|
|
49
74
|
static npmAccessValues = ["--access"];
|
|
75
|
+
static npmBuildValues = ["run", "build"];
|
|
50
76
|
static npmIntegrityField = "dist.integrity";
|
|
51
77
|
static npmNotFoundCode = "E404";
|
|
52
78
|
static npmPreferOnlineValues = ["--prefer-online"];
|
|
@@ -55,8 +81,10 @@ export class Resources {
|
|
|
55
81
|
static npmRegistryHostName = "registry.npmjs.org";
|
|
56
82
|
static npmRegistryValues = ["--registry"];
|
|
57
83
|
static npmTagValues = ["--tag"];
|
|
84
|
+
static npmVersionValues = ["--version"];
|
|
58
85
|
static npmViewValues = ["view"];
|
|
59
86
|
static packagesFolderPath = "src";
|
|
87
|
+
static parentFolderName = "..";
|
|
60
88
|
static patchPartName = "patch";
|
|
61
89
|
static pathSeparator = "/";
|
|
62
90
|
static privateField = "private";
|
|
@@ -68,6 +96,9 @@ export class Resources {
|
|
|
68
96
|
static publishStepUsage = "<folder> <version> <commit> <scope> <registry> <access>";
|
|
69
97
|
static publishWaitMilliseconds = 600_000;
|
|
70
98
|
static registryProtocol = "https:";
|
|
99
|
+
static reproducibleFolderPrefix = "pipelines-reproducible-";
|
|
100
|
+
static reproducibleStepName = "reproducible";
|
|
101
|
+
static reproducibleStepUsage = "<folder>";
|
|
71
102
|
static scopePattern = /^@[a-z0-9][a-z0-9._~-]*$/;
|
|
72
103
|
static sourceStepName = "source";
|
|
73
104
|
static sourceStepUsage = "<version> <commit>";
|
|
@@ -79,7 +110,12 @@ export class Resources {
|
|
|
79
110
|
static tarListFilesValues = ["-tzf"];
|
|
80
111
|
static tarReadFileValues = ["-xzOf"];
|
|
81
112
|
static testsFolderName = "tests";
|
|
113
|
+
static trackedFilesMissing = "Git lists no tracked file in this folder; run this step in a clone's checkout.";
|
|
114
|
+
static unchangedStepName = "unchanged";
|
|
115
|
+
static unchangedStepUsage = "";
|
|
82
116
|
static textEncoding = "utf8";
|
|
117
|
+
static toolchainStepName = "toolchain";
|
|
118
|
+
static toolchainStepUsage = "<node-version> [<npm-version>]";
|
|
83
119
|
static urlCredentialsPattern = /\b([a-z][a-z0-9+.-]*:\/\/)[^\s/@]+@/gi;
|
|
84
120
|
static urlQueryPattern = /\b([a-z][a-z0-9+.-]*:\/\/[^\s?#]*)[?#]\S*/gi;
|
|
85
121
|
static usageSeparator = " | ";
|
|
@@ -89,6 +125,10 @@ export class Resources {
|
|
|
89
125
|
static versionInvalid = "The text is not a version.";
|
|
90
126
|
static versionPartSeparator = ".";
|
|
91
127
|
static versionPattern = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-nightly\.([0-9]{8}))?$/;
|
|
128
|
+
static windowsNpmBuildValues = ["/d", "/s", "/c", "npm.cmd run build"];
|
|
129
|
+
static windowsNpmVersionValues = ["/d", "/s", "/c", "npm.cmd --version"];
|
|
130
|
+
static windowsPlatform = "win32";
|
|
131
|
+
static windowsShellProgram = "cmd.exe";
|
|
92
132
|
static formatVersionInvalid(text) {
|
|
93
133
|
return `"${text}" is not a version: a version is major.minor.patch, each a whole number without a leading zero, such as 1.4.0, or a nightly version, major.minor.patch-nightly.YYYYMMDD, such as 1.4.1-nightly.20261101.`;
|
|
94
134
|
}
|
|
@@ -102,10 +142,80 @@ export class Resources {
|
|
|
102
142
|
return `Usage: ${programName} ${stepUsages.join(Resources.usageSeparator)}`;
|
|
103
143
|
}
|
|
104
144
|
static formatStepUsage(stepName, usage) {
|
|
105
|
-
return `${stepName}${Resources.valueSeparator}${usage}`;
|
|
145
|
+
return usage.length === 0 ? stepName : `${stepName}${Resources.valueSeparator}${usage}`;
|
|
106
146
|
}
|
|
107
147
|
static formatStepValuesInvalid(stepName, usage) {
|
|
108
|
-
return `The ${stepName} step takes ${usage}.`;
|
|
148
|
+
return usage.length === 0 ? `The ${stepName} step takes no values.` : `The ${stepName} step takes ${usage}.`;
|
|
149
|
+
}
|
|
150
|
+
static formatCheckoutChanged(changes) {
|
|
151
|
+
return [
|
|
152
|
+
"The checkout has changed or untracked files:",
|
|
153
|
+
...changes,
|
|
154
|
+
"What runs before this step must leave every tracked file as committed and write only to ignored paths: undo the change, or ignore the output in .gitignore."
|
|
155
|
+
].join(Resources.lineSeparator);
|
|
156
|
+
}
|
|
157
|
+
static formatGitAttributesLineMissing(filePath, line) {
|
|
158
|
+
return `${filePath} at the checkout's root must hold the line "${line}"; add it.`;
|
|
159
|
+
}
|
|
160
|
+
static formatCrlfLineEndings(filePath) {
|
|
161
|
+
return `${JSON.stringify(filePath)} has CRLF line endings; convert them to LF.`;
|
|
162
|
+
}
|
|
163
|
+
static formatMixedLineEndings(filePath) {
|
|
164
|
+
return `${JSON.stringify(filePath)} mixes CRLF and LF line endings; convert them to LF.`;
|
|
165
|
+
}
|
|
166
|
+
static formatCheckoutFileMissing(filePath) {
|
|
167
|
+
return `${JSON.stringify(filePath)} is tracked but not a file in the checkout; restore it, or remove it from git.`;
|
|
168
|
+
}
|
|
169
|
+
static formatFinalNewlineMissing(filePath) {
|
|
170
|
+
return `${JSON.stringify(filePath)} does not end with a newline; add one.`;
|
|
171
|
+
}
|
|
172
|
+
static formatFinalBlankLine(filePath) {
|
|
173
|
+
return `${JSON.stringify(filePath)} ends with a blank line; remove it, so the file ends with exactly one newline.`;
|
|
174
|
+
}
|
|
175
|
+
static formatLineEndingsChecked(filePath, line, fileCount) {
|
|
176
|
+
return `${filePath} holds "${line}", and the ${fileCount} tracked text files use LF line endings and end with exactly one newline.`;
|
|
177
|
+
}
|
|
178
|
+
static formatExactVersionInvalid(text) {
|
|
179
|
+
return `"${text}" is not an exact version: write major.minor.patch, such as 24.21.0.`;
|
|
180
|
+
}
|
|
181
|
+
static formatNodeVersionDiffers(found, expected) {
|
|
182
|
+
return `Node.js ${found} runs this step, not ${Resources.nodeVersionPrefix}${expected}; set up Node.js ${expected} before it.`;
|
|
183
|
+
}
|
|
184
|
+
static formatNpmVersionDiffers(found, expected) {
|
|
185
|
+
return `npm ${found} runs this step, not ${expected}; install npm ${expected} before it.`;
|
|
186
|
+
}
|
|
187
|
+
static formatFolderOutsideCheckout(folder) {
|
|
188
|
+
return `The folder ${folder} must be a folder inside the checkout, given from its root, such as _packages.`;
|
|
189
|
+
}
|
|
190
|
+
static formatArchivesMissing(folder) {
|
|
191
|
+
return `${folder} holds no ${Resources.archiveFileExtension} archive to compare; build and pack the packages before this step.`;
|
|
192
|
+
}
|
|
193
|
+
static formatSecondBuildFailed(exitCode, errorOutput) {
|
|
194
|
+
return Resources.formatFailureLine(`The second build, npm ${Resources.npmBuildValues.join(Resources.valueSeparator)} in a worktree of the same commit, exited with code ${exitCode}`, errorOutput);
|
|
195
|
+
}
|
|
196
|
+
static formatArchiveDiffers(name, first, second) {
|
|
197
|
+
return `${name} differs between the two builds: ${first} and ${second}.`;
|
|
198
|
+
}
|
|
199
|
+
static formatArchiveOnlyInFirstBuild(name) {
|
|
200
|
+
return `${name} is only in the first build.`;
|
|
201
|
+
}
|
|
202
|
+
static formatArchiveOnlyInSecondBuild(name) {
|
|
203
|
+
return `${name} is only in the second build.`;
|
|
204
|
+
}
|
|
205
|
+
static formatBuildsDiffer(findings) {
|
|
206
|
+
return [...findings, "A second build of the same commit, in another folder, must pack byte-identical archives, so that rerunning a release publishes nothing new: make the build depend on neither its folder nor the time."].join(Resources.lineSeparator);
|
|
207
|
+
}
|
|
208
|
+
static formatBuildsIdentical(commit, archives) {
|
|
209
|
+
return [`A second build of commit ${commit}, in another folder, packed the same ${archives.length} archives byte for byte:`, ...archives].join(Resources.lineSeparator);
|
|
210
|
+
}
|
|
211
|
+
static formatArchiveIntegrity(name, integrity) {
|
|
212
|
+
return `${name} ${integrity}`;
|
|
213
|
+
}
|
|
214
|
+
static formatToolchainChecked(nodeVersion, npmVersion) {
|
|
215
|
+
return npmVersion === null ? `Node.js ${nodeVersion} runs this step; npm is not checked.` : `Node.js ${nodeVersion} and npm ${npmVersion} run this step.`;
|
|
216
|
+
}
|
|
217
|
+
static formatNpmVersionFailed(exitCode, errorOutput) {
|
|
218
|
+
return Resources.formatProcessFailed(`${Resources.npmProgram}${Resources.valueSeparator}${Resources.npmVersionValues.join(Resources.valueSeparator)}`, exitCode, errorOutput);
|
|
109
219
|
}
|
|
110
220
|
static formatCommitInvalid(text) {
|
|
111
221
|
return `"${text}" is not a commit: a commit is given by its full id, 40 lowercase hexadecimal digits.`;
|
package/resources.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../src/noldova.tools.pipelines/src/resources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,SAAS;IACb,MAAM,CAAU,YAAY,GAAsB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC3E,MAAM,CAAU,kBAAkB,GAAW,iBAAiB,CAAC;IAC/D,MAAM,CAAU,mBAAmB,GAAW,sBAAsB,CAAC;IACrE,MAAM,CAAU,eAAe,GAAW,SAAS,CAAC;IACpD,MAAM,CAAU,gBAAgB,GAAW,qCAAqC,CAAC;IACjF,MAAM,CAAU,aAAa,GAAW,gBAAgB,CAAC;IACzD,MAAM,CAAU,qBAAqB,GAAW,8GAA8G,CAAC;IAC/J,MAAM,CAAU,iBAAiB,GAAW,cAAc,CAAC;IAC3D,MAAM,CAAU,eAAe,GAAW,CAAC,CAAC;IAC5C,MAAM,CAAU,gBAAgB,GAAW,IAAI,CAAC;IAChD,MAAM,CAAU,WAAW,GAAW,MAAM,CAAC;IAC7C,MAAM,CAAU,YAAY,GAAW,SAAS,CAAC;IACjD,MAAM,CAAU,eAAe,GAAW,eAAe,CAAC;IAC1D,MAAM,CAAU,mBAAmB,GAAsB,CAAC,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js
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* This source code is licensed under the license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
+
import fs from "node:fs";
|
|
9
|
+
import path from "node:path";
|
|
8
10
|
import { ProcessException } from "../exceptions/process.exception.js";
|
|
11
|
+
import { TrackedFile } from "../models/tracked-file.js";
|
|
9
12
|
import { Resources } from "../resources.js";
|
|
10
13
|
export class Git {
|
|
11
14
|
processRunner;
|
|
@@ -14,6 +17,12 @@ export class Git {
|
|
|
14
17
|
this.processRunner = processRunner;
|
|
15
18
|
this.workingDirectory = workingDirectory;
|
|
16
19
|
}
|
|
20
|
+
async addWorktreeAsync(directory, commit) {
|
|
21
|
+
await this.readAsync([...Resources.gitAddWorktreeValues, directory, commit]);
|
|
22
|
+
}
|
|
23
|
+
async removeWorktreeAsync(directory) {
|
|
24
|
+
await this.readAsync([...Resources.gitRemoveWorktreeValues, directory]);
|
|
25
|
+
}
|
|
17
26
|
async hasCommitAsync(revision) {
|
|
18
27
|
return await this.verifyAsync(Resources.formatGitCommitRevision(revision));
|
|
19
28
|
}
|
|
@@ -28,6 +37,29 @@ export class Git {
|
|
|
28
37
|
const output = await this.readAsync([...Resources.gitListFilesValues, commit, folderPath]);
|
|
29
38
|
return output.split(Resources.gitFileSeparator).filter(t => t.length > 0);
|
|
30
39
|
}
|
|
40
|
+
async listChangesAsync() {
|
|
41
|
+
const output = await this.readAsync(Resources.gitListChangesValues);
|
|
42
|
+
return output.split(Resources.lineSeparator).filter(t => t.length > 0);
|
|
43
|
+
}
|
|
44
|
+
async listTrackedFilesAsync() {
|
|
45
|
+
const output = await this.readAsync(Resources.gitListTrackedFilesValues);
|
|
46
|
+
return output.split(Resources.gitFileSeparator).filter(t => t.length > 0).map(t => Git.readTrackedFile(t));
|
|
47
|
+
}
|
|
48
|
+
async readCheckoutFileEndAsync(filePath, byteCount) {
|
|
49
|
+
const fullPath = path.join(this.workingDirectory, filePath);
|
|
50
|
+
if (fs.statSync(fullPath, { throwIfNoEntry: false })?.isFile() !== true)
|
|
51
|
+
return null;
|
|
52
|
+
const file = await fs.promises.open(fullPath);
|
|
53
|
+
try {
|
|
54
|
+
const { size } = await file.stat();
|
|
55
|
+
const length = Math.min(size, byteCount);
|
|
56
|
+
const { buffer } = await file.read(Buffer.alloc(length), 0, length, size - length);
|
|
57
|
+
return buffer;
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
await file.close();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
31
63
|
async readFileAsync(commit, filePath) {
|
|
32
64
|
return await this.readAsync([...Resources.gitReadFileValues, Resources.formatGitFileRevision(commit, filePath)]);
|
|
33
65
|
}
|
|
@@ -52,6 +84,15 @@ export class Git {
|
|
|
52
84
|
async runAsync(values) {
|
|
53
85
|
return await this.processRunner.runAsync(Resources.gitProgram, values, this.workingDirectory);
|
|
54
86
|
}
|
|
87
|
+
static readTrackedFile(entry) {
|
|
88
|
+
const infoStart = entry.indexOf(Resources.gitEntrySeparator) + 1;
|
|
89
|
+
const pathStart = entry.indexOf(Resources.gitEntrySeparator, infoStart) + 1;
|
|
90
|
+
const [mode] = entry.slice(0, infoStart).split(Resources.gitModeSeparator);
|
|
91
|
+
const [indexInfo = "", ...otherInfo] = entry.slice(infoStart, pathStart).trim().split(Resources.gitLineEndingsSeparator);
|
|
92
|
+
const lineEndings = indexInfo.slice(Resources.gitLineEndingsPrefix.length);
|
|
93
|
+
const isText = mode !== Resources.gitSymbolicLinkMode && lineEndings.length > 0 && lineEndings !== Resources.gitNotTextLineEndings && !otherInfo.includes(Resources.gitNotTextAttribute);
|
|
94
|
+
return new TrackedFile(entry.slice(pathStart), lineEndings, isText);
|
|
95
|
+
}
|
|
55
96
|
static failed(values, result) {
|
|
56
97
|
const command = [Resources.gitProgram, ...values].join(Resources.valueSeparator);
|
|
57
98
|
return new ProcessException(Resources.gitProgram, Resources.formatProcessFailed(command, result.exitCode, result.errorOutput));
|
package/services/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/services/git.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,GAAG;IACG,aAAa,CAAgB;
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/services/git.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,GAAG;IACG,aAAa,CAAgB;IAE9B,gBAAgB,CAAS;IAEzC,YAAmB,aAA4B,EAAE,gBAAwB;QACvE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,SAAiB,EAAE,MAAc;QAC7D,MAAM,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC,oBAAoB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/E,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAAC,SAAiB;QAChD,MAAM,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC,uBAAuB,EAAE,SAAS,CAAC,CAAC,CAAC;IAC1E,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,QAAgB;QAC1C,OAAO,MAAM,IAAI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mB,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IACjI,CAAC;CACF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { StepResult } from "../models/step-result.js";
|
|
9
|
+
import { Resources } from "../resources.js";
|
|
10
|
+
export class LineEndingsStep {
|
|
11
|
+
git;
|
|
12
|
+
name = Resources.lineEndingsStepName;
|
|
13
|
+
usage = Resources.lineEndingsStepUsage;
|
|
14
|
+
constructor(git) {
|
|
15
|
+
this.git = git;
|
|
16
|
+
}
|
|
17
|
+
async runAsync(values) {
|
|
18
|
+
if (values.length !== 0)
|
|
19
|
+
return StepResult.failed(Resources.formatStepValuesInvalid(this.name, this.usage));
|
|
20
|
+
const files = await this.git.listTrackedFilesAsync();
|
|
21
|
+
if (files.length === 0)
|
|
22
|
+
return StepResult.failed(Resources.trackedFilesMissing);
|
|
23
|
+
const findings = [];
|
|
24
|
+
if (!await this.hasGitAttributesLineAsync())
|
|
25
|
+
findings.push(Resources.formatGitAttributesLineMissing(Resources.gitAttributesFilePath, Resources.gitAttributesLine));
|
|
26
|
+
const textFiles = files.filter(t => t.isText);
|
|
27
|
+
for (const file of textFiles) {
|
|
28
|
+
const finding = await this.checkFileAsync(file);
|
|
29
|
+
if (finding !== null)
|
|
30
|
+
findings.push(finding);
|
|
31
|
+
}
|
|
32
|
+
if (findings.length > 0)
|
|
33
|
+
return StepResult.failed(findings.join(Resources.lineSeparator));
|
|
34
|
+
return StepResult.succeeded(Resources.formatLineEndingsChecked(Resources.gitAttributesFilePath, Resources.gitAttributesLine, textFiles.length));
|
|
35
|
+
}
|
|
36
|
+
async hasGitAttributesLineAsync() {
|
|
37
|
+
if (!await this.git.hasFileAsync(Resources.gitCheckoutRevision, Resources.gitAttributesFilePath))
|
|
38
|
+
return false;
|
|
39
|
+
const content = await this.git.readFileAsync(Resources.gitCheckoutRevision, Resources.gitAttributesFilePath);
|
|
40
|
+
return content.split(Resources.lineSeparator).includes(Resources.gitAttributesLine);
|
|
41
|
+
}
|
|
42
|
+
async checkFileAsync(file) {
|
|
43
|
+
if (file.lineEndings === Resources.crlfLineEndings)
|
|
44
|
+
return Resources.formatCrlfLineEndings(file.filePath);
|
|
45
|
+
if (file.lineEndings === Resources.mixedLineEndings)
|
|
46
|
+
return Resources.formatMixedLineEndings(file.filePath);
|
|
47
|
+
const end = await this.git.readCheckoutFileEndAsync(file.filePath, Resources.fileEndByteCount);
|
|
48
|
+
if (end === null)
|
|
49
|
+
return Resources.formatCheckoutFileMissing(file.filePath);
|
|
50
|
+
if (end.at(-1) !== Resources.newlineByte)
|
|
51
|
+
return Resources.formatFinalNewlineMissing(file.filePath);
|
|
52
|
+
if (end.length === Resources.fileEndByteCount && end.at(-2) === Resources.newlineByte)
|
|
53
|
+
return Resources.formatFinalBlankLine(file.filePath);
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=line-endings-step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-endings-step.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/services/line-endings-step.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,eAAe;IACT,GAAG,CAAM;IAEV,IAAI,GAAW,SAAS,CAAC,mBAAmB,CAAC;IAC7C,KAAK,GAAW,SAAS,CAAC,oBAAoB,CAAC;IAE/D,YAAmB,GAAQ;QACzB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAA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oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEvD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
package/services/npm.js
CHANGED
|
@@ -6,14 +6,17 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
import path from "node:path";
|
|
9
|
+
import { ProcessException } from "../exceptions/process.exception.js";
|
|
9
10
|
import { StepResult } from "../models/step-result.js";
|
|
10
11
|
import { Resources } from "../resources.js";
|
|
11
12
|
export class Npm {
|
|
12
13
|
processRunner;
|
|
13
14
|
workingDirectory;
|
|
14
|
-
|
|
15
|
+
platform;
|
|
16
|
+
constructor(processRunner, workingDirectory, platform = process.platform) {
|
|
15
17
|
this.processRunner = processRunner;
|
|
16
18
|
this.workingDirectory = workingDirectory;
|
|
19
|
+
this.platform = platform;
|
|
17
20
|
}
|
|
18
21
|
async viewAsync(specifier, field, registry) {
|
|
19
22
|
return await this.runAsync([...Resources.npmViewValues, specifier, field, ...Resources.npmPreferOnlineValues, ...Resources.npmRegistryValues, registry]);
|
|
@@ -30,6 +33,19 @@ export class Npm {
|
|
|
30
33
|
const values = [...Resources.npmPublishValues, path.resolve(archivePath), ...Resources.npmTagValues, tag, ...Resources.npmAccessValues, access, ...Resources.npmRegistryValues, registry];
|
|
31
34
|
return await this.runAsync(values);
|
|
32
35
|
}
|
|
36
|
+
async buildAsync(directory) {
|
|
37
|
+
return this.platform === Resources.windowsPlatform
|
|
38
|
+
? await this.processRunner.runAsync(Resources.windowsShellProgram, Resources.windowsNpmBuildValues, directory)
|
|
39
|
+
: await this.processRunner.runAsync(Resources.npmProgram, Resources.npmBuildValues, directory);
|
|
40
|
+
}
|
|
41
|
+
async readVersionAsync() {
|
|
42
|
+
const result = this.platform === Resources.windowsPlatform
|
|
43
|
+
? await this.processRunner.runAsync(Resources.windowsShellProgram, Resources.windowsNpmVersionValues, this.workingDirectory)
|
|
44
|
+
: await this.runAsync(Resources.npmVersionValues);
|
|
45
|
+
if (!result.isSuccessful)
|
|
46
|
+
throw new ProcessException(Resources.npmProgram, Resources.formatNpmVersionFailed(result.exitCode, result.errorOutput));
|
|
47
|
+
return result.output.trim();
|
|
48
|
+
}
|
|
33
49
|
static isRegistry(text) {
|
|
34
50
|
if (!URL.canParse(text))
|
|
35
51
|
return false;
|
package/services/npm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/services/npm.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"npm.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/services/npm.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,GAAG;IACG,aAAa,CAAgB;IAC7B,gBAAgB,CAAS;IACzB,QAAQ,CAAS;IAElC,YAAmB,aAA4B,EAAE,gBAAwB,EAAE,QAAQ,GAAW,OAAO,CAAC,QAAQ;QAC5G,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,SAAiB,EAAE,KAAa,EAAE,QAAgB;QACvE,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC,qBAAqB,EAAE,GAAG,SAAS,CAAC,iBAAiB,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C,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAChG,CAAC;CACF"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import crypto from "node:crypto";
|
|
9
|
+
import fs from "node:fs";
|
|
10
|
+
import os from "node:os";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
import { StepResult } from "../models/step-result.js";
|
|
13
|
+
import { Resources } from "../resources.js";
|
|
14
|
+
export class ReproducibleStep {
|
|
15
|
+
git;
|
|
16
|
+
npm;
|
|
17
|
+
temporaryRoot;
|
|
18
|
+
name = Resources.reproducibleStepName;
|
|
19
|
+
usage = Resources.reproducibleStepUsage;
|
|
20
|
+
constructor(git, npm, temporaryRoot) {
|
|
21
|
+
this.git = git;
|
|
22
|
+
this.npm = npm;
|
|
23
|
+
this.temporaryRoot = temporaryRoot === undefined || temporaryRoot.length === 0 ? os.tmpdir() : temporaryRoot;
|
|
24
|
+
}
|
|
25
|
+
async runAsync(values) {
|
|
26
|
+
const [folder, ...rest] = values;
|
|
27
|
+
if (folder === undefined || rest.length !== 0)
|
|
28
|
+
return StepResult.failed(Resources.formatStepValuesInvalid(this.name, this.usage));
|
|
29
|
+
const folderPath = path.join(this.git.workingDirectory, folder);
|
|
30
|
+
const fromCheckout = path.relative(path.resolve(this.git.workingDirectory), path.resolve(folderPath));
|
|
31
|
+
if (path.isAbsolute(folder) || fromCheckout.length === 0 || fromCheckout.split(path.sep)[0] === Resources.parentFolderName)
|
|
32
|
+
return StepResult.failed(Resources.formatFolderOutsideCheckout(folder));
|
|
33
|
+
if (fs.statSync(folderPath, { throwIfNoEntry: false })?.isDirectory() !== true)
|
|
34
|
+
return StepResult.failed(Resources.formatFolderMissing(folder));
|
|
35
|
+
const first = ReproducibleStep.readArchives(folderPath);
|
|
36
|
+
if (first.size === 0)
|
|
37
|
+
return StepResult.failed(Resources.formatArchivesMissing(folder));
|
|
38
|
+
const commit = await this.git.readHeadAsync();
|
|
39
|
+
const directory = fs.mkdtempSync(path.join(this.temporaryRoot, Resources.reproducibleFolderPrefix));
|
|
40
|
+
try {
|
|
41
|
+
await this.git.addWorktreeAsync(directory, commit);
|
|
42
|
+
try {
|
|
43
|
+
const build = await this.npm.buildAsync(directory);
|
|
44
|
+
if (!build.isSuccessful)
|
|
45
|
+
return StepResult.failed(Resources.formatSecondBuildFailed(build.exitCode, build.errorOutput));
|
|
46
|
+
return ReproducibleStep.compare(commit, first, ReproducibleStep.readArchives(path.join(directory, folder)));
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
await this.git.removeWorktreeAsync(directory);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
fs.rmSync(directory, { recursive: true, force: true });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
static compare(commit, first, second) {
|
|
57
|
+
const findings = [];
|
|
58
|
+
for (const [name, integrity] of first) {
|
|
59
|
+
const other = second.get(name);
|
|
60
|
+
if (other === undefined)
|
|
61
|
+
findings.push(Resources.formatArchiveOnlyInFirstBuild(name));
|
|
62
|
+
else if (other !== integrity)
|
|
63
|
+
findings.push(Resources.formatArchiveDiffers(name, integrity, other));
|
|
64
|
+
}
|
|
65
|
+
for (const name of second.keys()) {
|
|
66
|
+
if (!first.has(name))
|
|
67
|
+
findings.push(Resources.formatArchiveOnlyInSecondBuild(name));
|
|
68
|
+
}
|
|
69
|
+
if (findings.length > 0)
|
|
70
|
+
return StepResult.failed(Resources.formatBuildsDiffer(findings));
|
|
71
|
+
return StepResult.succeeded(Resources.formatBuildsIdentical(commit, [...first].map(([name, integrity]) => Resources.formatArchiveIntegrity(name, integrity))));
|
|
72
|
+
}
|
|
73
|
+
static readArchives(folderPath) {
|
|
74
|
+
const archives = new Map();
|
|
75
|
+
if (fs.statSync(folderPath, { throwIfNoEntry: false })?.isDirectory() !== true)
|
|
76
|
+
return archives;
|
|
77
|
+
for (const name of fs.readdirSync(folderPath).filter(t => t.endsWith(Resources.archiveFileExtension)).sort()) {
|
|
78
|
+
const digest = crypto.createHash(Resources.integrityAlgorithm).update(fs.readFileSync(path.join(folderPath, name))).digest(Resources.integrityEncoding);
|
|
79
|
+
archives.set(name, `${Resources.integrityPrefix}${digest}`);
|
|
80
|
+
}
|
|
81
|
+
return archives;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=reproducible-step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reproducible-step.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/services/reproducible-step.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,gBAAgB;IACV,GAAG,CAAM;IACT,GAAG,CAAM;IACT,aAAa,CAAS;IAEvB,IAAI,GAAW,SAAS,CAAC,oBAAoB,CAAC;IAC9C,KAAK,GAAW,SAAS,CAAC,qBAAqB,CAAC;IAEhE,YAAmB,GAAQ,EAAE,GAAQ,EAAE,aAAsB;QAC3D,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,aAAa,GAAG,aAAa,KAAK,SAAS,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CA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AAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YAC7G,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;YACxJ,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,SAAS,CAAC,eAAe,GAAG,MAAM,EAAE,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { StepResult } from "../models/step-result.js";
|
|
9
|
+
import { Resources } from "../resources.js";
|
|
10
|
+
export class ToolchainStep {
|
|
11
|
+
npm;
|
|
12
|
+
nodeVersion;
|
|
13
|
+
name = Resources.toolchainStepName;
|
|
14
|
+
usage = Resources.toolchainStepUsage;
|
|
15
|
+
constructor(npm, nodeVersion) {
|
|
16
|
+
this.npm = npm;
|
|
17
|
+
this.nodeVersion = nodeVersion;
|
|
18
|
+
}
|
|
19
|
+
async runAsync(values) {
|
|
20
|
+
const [nodeVersion, npmVersion = "", ...rest] = values;
|
|
21
|
+
if (nodeVersion === undefined || rest.length !== 0)
|
|
22
|
+
return StepResult.failed(Resources.formatStepValuesInvalid(this.name, this.usage));
|
|
23
|
+
if (!Resources.exactVersionPattern.test(nodeVersion))
|
|
24
|
+
return StepResult.failed(Resources.formatExactVersionInvalid(nodeVersion));
|
|
25
|
+
if (npmVersion.length > 0 && !Resources.exactVersionPattern.test(npmVersion))
|
|
26
|
+
return StepResult.failed(Resources.formatExactVersionInvalid(npmVersion));
|
|
27
|
+
const findings = [];
|
|
28
|
+
if (this.nodeVersion !== `${Resources.nodeVersionPrefix}${nodeVersion}`)
|
|
29
|
+
findings.push(Resources.formatNodeVersionDiffers(this.nodeVersion, nodeVersion));
|
|
30
|
+
const foundNpmVersion = npmVersion.length === 0 ? null : await this.npm.readVersionAsync();
|
|
31
|
+
if (foundNpmVersion !== null && foundNpmVersion !== npmVersion)
|
|
32
|
+
findings.push(Resources.formatNpmVersionDiffers(foundNpmVersion, npmVersion));
|
|
33
|
+
if (findings.length > 0)
|
|
34
|
+
return StepResult.failed(findings.join(Resources.lineSeparator));
|
|
35
|
+
return StepResult.succeeded(Resources.formatToolchainChecked(this.nodeVersion, foundNpmVersion));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=toolchain-step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolchain-step.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/services/toolchain-step.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,aAAa;IACP,GAAG,CAAM;IACT,WAAW,CAAS;IAErB,IAAI,GAAW,SAAS,CAAC,iBAAiB,CAAC;IAC3C,KAAK,GAAW,SAAS,CAAC,kBAAkB,CAAC;IAE7D,YAAmB,GAAQ,EAAE,WAAmB;QAC9C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,MAAyB;QAC7C,MAAM,CAAC,WAAW,E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,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;QAEnE,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,sBAAsB,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC;IACnG,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { StepResult } from "../models/step-result.js";
|
|
9
|
+
import { Resources } from "../resources.js";
|
|
10
|
+
export class UnchangedStep {
|
|
11
|
+
git;
|
|
12
|
+
name = Resources.unchangedStepName;
|
|
13
|
+
usage = Resources.unchangedStepUsage;
|
|
14
|
+
constructor(git) {
|
|
15
|
+
this.git = git;
|
|
16
|
+
}
|
|
17
|
+
async runAsync(values) {
|
|
18
|
+
if (values.length !== 0)
|
|
19
|
+
return StepResult.failed(Resources.formatStepValuesInvalid(this.name, this.usage));
|
|
20
|
+
const changes = await this.git.listChangesAsync();
|
|
21
|
+
if (changes.length > 0)
|
|
22
|
+
return StepResult.failed(Resources.formatCheckoutChanged(changes));
|
|
23
|
+
return StepResult.succeeded(Resources.checkoutUnchanged);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=unchanged-step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unchanged-step.js","sourceRoot":"","sources":["../../../../src/noldova.tools.pipelines/src/services/unchanged-step.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,aAAa;IACP,GAAG,CAAM;IAEV,IAAI,GAAW,SAAS,CAAC,iBAAiB,CAAC;IAC3C,KAAK,GAAW,SAAS,CAAC,kBAAkB,CAAC;IAE7D,YAAmB,GAAQ;QACzB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,MAAyB;QAC7C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YACrB,OAAO,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAErF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;QAClD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YACpB,OAAO,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC;QAErE,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC3D,CAAC;CACF"}
|