@noldova/desktop.build 0.0.1 → 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 +1 -1
- package/api/index.d.ts +2 -0
- package/models/modules/module-declaration.js +29 -2
- package/models/modules/module-declaration.js.map +1 -1
- package/models/modules/web-view-keys.js +3 -0
- package/models/modules/web-view-keys.js.map +1 -1
- package/models/packages/package-manifest.js +8 -2
- package/models/packages/package-manifest.js.map +1 -1
- package/models/packages/package-versions.js +8 -1
- package/models/packages/package-versions.js.map +1 -1
- package/models/packaging/company-package.js +25 -8
- package/models/packaging/company-package.js.map +1 -1
- package/models/packaging/locked-package.js +28 -6
- package/models/packaging/locked-package.js.map +1 -1
- package/models/packaging/package-target.js +8 -4
- package/models/packaging/package-target.js.map +1 -1
- package/models/release/release-request.js +42 -2
- package/models/release/release-request.js.map +1 -1
- package/models/release/release-version.js +0 -8
- package/models/release/release-version.js.map +1 -1
- package/package.json +8 -2
- package/resources.js +147 -26
- package/resources.js.map +1 -1
- package/services/build-command-line.js +3 -2
- package/services/build-command-line.js.map +1 -1
- package/services/commands/module-range.js +21 -2
- package/services/commands/module-range.js.map +1 -1
- package/services/commands/package-smoke.js +53 -11
- package/services/commands/package-smoke.js.map +1 -1
- package/services/commands/package.js +23 -3
- package/services/commands/package.js.map +1 -1
- package/services/commands/release-assets.js +1 -1
- package/services/commands/release-assets.js.map +1 -1
- package/services/commands/release-check.js +18 -8
- package/services/commands/release-check.js.map +1 -1
- package/services/commands/release-publish.js +3 -3
- package/services/commands/release-publish.js.map +1 -1
- package/services/desktop/electron-binary.js +6 -2
- package/services/desktop/electron-binary.js.map +1 -1
- package/services/modules/module-artifacts.js +5 -1
- package/services/modules/module-artifacts.js.map +1 -1
- package/services/modules/module-catalog.js +19 -1
- package/services/modules/module-catalog.js.map +1 -1
- package/services/modules/module-web-views.js +18 -12
- package/services/modules/module-web-views.js.map +1 -1
- package/services/packages/addon-builder.js +7 -2
- package/services/packages/addon-builder.js.map +1 -1
- package/services/packages/package-naming.js +3 -0
- package/services/packages/package-naming.js.map +1 -1
- package/services/packaging/package-configuration.js +6 -3
- package/services/packaging/package-configuration.js.map +1 -1
- package/services/packaging/package-installer.js +2 -2
- package/services/packaging/package-installer.js.map +1 -1
- package/services/packaging/package-stage.js +15 -6
- package/services/packaging/package-stage.js.map +1 -1
- package/services/packaging/packaged-architecture.js +34 -11
- package/services/packaging/packaged-architecture.js.map +1 -1
- package/services/processes/process-runner.js +16 -1
- package/services/processes/process-runner.js.map +1 -1
- package/services/processes/started-process.js +3 -0
- package/services/processes/started-process.js.map +1 -1
- package/services/release/release-file-set.js +12 -10
- package/services/release/release-file-set.js.map +1 -1
- package/services/release/release-notes.js +9 -6
- package/services/release/release-notes.js.map +1 -1
- package/services/release/release-publisher.js +29 -21
- package/services/release/release-publisher.js.map +1 -1
|
@@ -11,12 +11,37 @@ import { ReleaseVersion } from "./release-version.js";
|
|
|
11
11
|
import { Resources } from "../../resources.js";
|
|
12
12
|
export class ReleaseRequest {
|
|
13
13
|
repository;
|
|
14
|
+
sourceRepository;
|
|
15
|
+
buildRepository;
|
|
14
16
|
version;
|
|
15
17
|
revision;
|
|
16
|
-
|
|
18
|
+
tag;
|
|
19
|
+
tagPrefix;
|
|
20
|
+
constructor(repository, sourceRepository, buildRepository, version, revision, tagPrefix) {
|
|
17
21
|
this.repository = repository;
|
|
22
|
+
this.sourceRepository = sourceRepository;
|
|
23
|
+
this.buildRepository = buildRepository;
|
|
18
24
|
this.version = version;
|
|
19
25
|
this.revision = revision;
|
|
26
|
+
this.tagPrefix = tagPrefix;
|
|
27
|
+
this.tag = `${tagPrefix}${version.text}`;
|
|
28
|
+
}
|
|
29
|
+
get isSeparate() {
|
|
30
|
+
return this.repository.toLowerCase() !== this.sourceRepository.toLowerCase();
|
|
31
|
+
}
|
|
32
|
+
get isBuiltElsewhere() {
|
|
33
|
+
return this.buildRepository.toLowerCase() !== this.sourceRepository.toLowerCase();
|
|
34
|
+
}
|
|
35
|
+
get isBuiltApart() {
|
|
36
|
+
return this.isBuiltElsewhere && this.buildRepository.toLowerCase() !== this.repository.toLowerCase();
|
|
37
|
+
}
|
|
38
|
+
ownsTag(tag) {
|
|
39
|
+
return tag.startsWith(this.tagPrefix) && Resources.releaseVersionPattern.test(tag.slice(this.tagPrefix.length));
|
|
40
|
+
}
|
|
41
|
+
parseTag(tag, source) {
|
|
42
|
+
if (!tag.startsWith(this.tagPrefix))
|
|
43
|
+
throw new BuildException(Resources.formatReleaseTagInvalid(source, tag, this.tagPrefix));
|
|
44
|
+
return ReleaseVersion.parse(tag.slice(this.tagPrefix.length), source);
|
|
20
45
|
}
|
|
21
46
|
static read(environment) {
|
|
22
47
|
const repository = environment[Resources.releaseRepositoryVariable] ?? String.empty;
|
|
@@ -26,7 +51,22 @@ export class ReleaseRequest {
|
|
|
26
51
|
const revision = environment[Resources.releaseRevisionVariable] ?? String.empty;
|
|
27
52
|
if (!Resources.releaseRevisionPattern.test(revision))
|
|
28
53
|
throw new BuildException(Resources.formatReleaseRevisionInvalid(revision));
|
|
29
|
-
|
|
54
|
+
const sourceRepository = ReleaseRequest.readOptional(environment, Resources.releaseSourceRepositoryVariable) ?? repository;
|
|
55
|
+
if (!Resources.releaseRepositoryPattern.test(sourceRepository))
|
|
56
|
+
throw new BuildException(Resources.formatReleaseRepositoryInvalid(sourceRepository, Resources.releaseSourceRepositoryVariable));
|
|
57
|
+
const buildRepository = ReleaseRequest.readOptional(environment, Resources.releaseBuildRepositoryVariable) ?? sourceRepository;
|
|
58
|
+
if (!Resources.releaseRepositoryPattern.test(buildRepository))
|
|
59
|
+
throw new BuildException(Resources.formatReleaseRepositoryInvalid(buildRepository, Resources.releaseBuildRepositoryVariable));
|
|
60
|
+
const tagPrefix = ReleaseRequest.readOptional(environment, Resources.releaseTagPrefixVariable) ?? Resources.releaseTagPrefix;
|
|
61
|
+
if (!Resources.releaseTagPrefixPattern.test(tagPrefix))
|
|
62
|
+
throw new BuildException(Resources.formatReleaseTagPrefixInvalid(tagPrefix));
|
|
63
|
+
if (tagPrefix === Resources.releaseTagPrefix && repository.toLowerCase() !== sourceRepository.toLowerCase())
|
|
64
|
+
throw new BuildException(Resources.formatReleaseTagPrefixNeeded(repository, sourceRepository));
|
|
65
|
+
return new ReleaseRequest(repository, sourceRepository, buildRepository, version, revision, tagPrefix);
|
|
66
|
+
}
|
|
67
|
+
static readOptional(environment, variable) {
|
|
68
|
+
const value = environment[variable] ?? String.empty;
|
|
69
|
+
return value.length === 0 ? null : value;
|
|
30
70
|
}
|
|
31
71
|
}
|
|
32
72
|
//# sourceMappingURL=release-request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-request.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.build/src/models/release/release-request.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,cAAc;IACT,UAAU,CAAS;IACnB,OAAO,CAAiB;IACxB,QAAQ,CAAS;
|
|
1
|
+
{"version":3,"file":"release-request.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.build/src/models/release/release-request.ts"],"names":[],"mappings":"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"}
|
|
@@ -25,14 +25,6 @@ export class ReleaseVersion {
|
|
|
25
25
|
throw new BuildException(Resources.formatReleaseVersionInvalid(source, text));
|
|
26
26
|
return new ReleaseVersion(text, Number(match[1]), Number(match[2]), Number(match[3]));
|
|
27
27
|
}
|
|
28
|
-
static parseTag(tag, source) {
|
|
29
|
-
if (!tag.startsWith(Resources.releaseTagPrefix))
|
|
30
|
-
throw new BuildException(Resources.formatReleaseTagInvalid(source, tag));
|
|
31
|
-
return ReleaseVersion.parse(tag.slice(Resources.releaseTagPrefix.length), source);
|
|
32
|
-
}
|
|
33
|
-
get tag() {
|
|
34
|
-
return `${Resources.releaseTagPrefix}${this.text}`;
|
|
35
|
-
}
|
|
36
28
|
isNewerThan(other) {
|
|
37
29
|
if (this.major !== other.major)
|
|
38
30
|
return this.major > other.major;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-version.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.build/src/models/release/release-version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,cAAc;IACR,KAAK,CAAS;IACd,KAAK,CAAS;IACd,KAAK,CAAS;IAEf,IAAI,CAAS;IAE7B,YAAoB,IAAY,EAAE,KAAa,EAAE,KAAa,EAAE,KAAa;QAC3E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,IAAY,EAAE,MAAc;QAC9C,MAAM,KAAK,GAAG,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;YACtB,MAAM,IAAI,cAAc,CAAC,SAAS,CAAC,2BAA2B,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAChF,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxF,CAAC;IAEM,
|
|
1
|
+
{"version":3,"file":"release-version.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.build/src/models/release/release-version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,cAAc;IACR,KAAK,CAAS;IACd,KAAK,CAAS;IACd,KAAK,CAAS;IAEf,IAAI,CAAS;IAE7B,YAAoB,IAAY,EAAE,KAAa,EAAE,KAAa,EAAE,KAAa;QAC3E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,IAAY,EAAE,MAAc;QAC9C,MAAM,KAAK,GAAG,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;YACtB,MAAM,IAAI,cAAc,CAAC,SAAS,CAAC,2BAA2B,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAChF,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxF,CAAC;IAEM,WAAW,CAAC,KAAqB;QACtC,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK;YAC5B,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAClC,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK;YAC5B,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAClC,OAAO,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAClC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noldova/desktop.build",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Noldova Desktop's app build: from an app's desktop section and module list to its window, its development app, signed packages for each target and a release.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,13 @@
|
|
|
44
44
|
"@noldova/context.exceptions": ">=0.0.7 <0.1.0",
|
|
45
45
|
"@noldova/context.json": ">=0.0.7 <0.1.0",
|
|
46
46
|
"@noldova/context.text": ">=0.0.7 <0.1.0",
|
|
47
|
+
"@types/node": ">=26.6.6 <27.0.0",
|
|
47
48
|
"electron": "44.9.1"
|
|
48
49
|
},
|
|
49
|
-
"
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"@types/node": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"gitHead": "4d7955e6086c27667752d6692ecfd1771be5a753"
|
|
50
56
|
}
|
package/resources.js
CHANGED
|
@@ -89,6 +89,8 @@ export class Resources {
|
|
|
89
89
|
static addonOutputFolder = "native";
|
|
90
90
|
static addonExtension = ".node";
|
|
91
91
|
static releaseAddonsVariable = "RELEASE_ADDONS";
|
|
92
|
+
static targetArchitectureVariable = "NOLDOVA_DESKTOP_ARCHITECTURE";
|
|
93
|
+
static electronArchitectureVariable = "npm_config_arch";
|
|
92
94
|
static addonWindowsTargets = ["win32-x64", "win32-arm64"];
|
|
93
95
|
static addonPosixTargets = ["linux-x64", "linux-arm64", "darwin-x64", "darwin-arm64"];
|
|
94
96
|
static addonTargets = [...Resources.addonWindowsTargets, ...Resources.addonPosixTargets];
|
|
@@ -424,9 +426,8 @@ export class Resources {
|
|
|
424
426
|
static stageNoticeSeparator = `\n${"-".repeat(Resources.stageNoticeRuleWidth)}\n\n`;
|
|
425
427
|
static stageUnreachableRegistry = "http://127.0.0.1:9/";
|
|
426
428
|
static stageOverridesInvalid = "The root package.json's overrides must be an object, as npm reads them.";
|
|
427
|
-
static
|
|
428
|
-
static
|
|
429
|
-
+ "write the override nested under the dependent it is for, as { \"<dependent>\": { \"<package>\": \"<version>\" } }.";
|
|
429
|
+
static stageOverrideReferencePrefix = "$";
|
|
430
|
+
static stageOverrideSelfKey = ".";
|
|
430
431
|
static stageInstallArguments = [
|
|
431
432
|
"install", "--offline", "--no-save", "--no-package-lock", "--omit=dev", "--legacy-peer-deps", "--ignore-scripts", "--no-audit", "--no-fund", "--loglevel=error",
|
|
432
433
|
`--registry=${Resources.stageUnreachableRegistry}`, "--cache"
|
|
@@ -435,7 +436,6 @@ export class Resources {
|
|
|
435
436
|
static stageIconsRole = "the icons folder that desktop.product.icons names";
|
|
436
437
|
static stageDictionariesRole = "the spelling dictionaries the window checks text with";
|
|
437
438
|
static stageNoGallery = "The packaged window holds no Gallery.\n";
|
|
438
|
-
static machHeaderLength = 8;
|
|
439
439
|
static machCpuTypeOffset = 4;
|
|
440
440
|
static machUniversalCountOffset = 4;
|
|
441
441
|
static machThinMagic = 0xfeedfacf;
|
|
@@ -445,6 +445,21 @@ export class Resources {
|
|
|
445
445
|
static machCpuTypes = { arm64: 0x0100000c, x64: 0x01000007 };
|
|
446
446
|
static machUniversalFile = "a universal Mach-O file";
|
|
447
447
|
static mach32BitFile = "a 32-bit Mach-O file";
|
|
448
|
+
static machKind = "Mach-O";
|
|
449
|
+
static peHeaderOffsetField = 0x3c;
|
|
450
|
+
static peSignatureLength = 6;
|
|
451
|
+
static peMachineOffset = 4;
|
|
452
|
+
static peMachines = { arm64: 0xaa64, x64: 0x8664 };
|
|
453
|
+
static peKind = "PE";
|
|
454
|
+
static elfClassOffset = 4;
|
|
455
|
+
static elf64BitClass = 2;
|
|
456
|
+
static elfDataOffset = 5;
|
|
457
|
+
static elfLittleEndianData = 1;
|
|
458
|
+
static elfMachineOffset = 18;
|
|
459
|
+
static elfMachines = { arm64: 183, x64: 62 };
|
|
460
|
+
static elfKind = "ELF";
|
|
461
|
+
static elf32BitFile = "a 32-bit ELF file";
|
|
462
|
+
static elfBigEndianFile = "a big-endian ELF file";
|
|
448
463
|
static packagedBuildCommandLineName = "../build-command-line";
|
|
449
464
|
static packagedBuildOptions = [Resources.buildCommand, "--packaged", "--output"];
|
|
450
465
|
static packagedWindowFolder = "window";
|
|
@@ -693,6 +708,8 @@ export class Resources {
|
|
|
693
708
|
static defaultField = "default";
|
|
694
709
|
static keysField = "keys";
|
|
695
710
|
static macKeysField = "macKeys";
|
|
711
|
+
static loadingKeysField = "loadingKeys";
|
|
712
|
+
static escapeKey = "Escape";
|
|
696
713
|
static newWindowsField = "newWindows";
|
|
697
714
|
static parametersField = "parameters";
|
|
698
715
|
static valuesField = "values";
|
|
@@ -767,6 +784,8 @@ export class Resources {
|
|
|
767
784
|
static moduleDisplayNameMissing = "must have a display name";
|
|
768
785
|
static moduleDescriptionMissing = "must have a description";
|
|
769
786
|
static moduleContributesNotObject = "must list its contributions as an object";
|
|
787
|
+
static moduleFormerNamesNotObject = "must give its former names as an object from a command's or a document's name to the names it had before";
|
|
788
|
+
static formerNamesField = "formerNames";
|
|
770
789
|
static modulePlaceholderRepeated = "declares more than one placeholder, and a window shows one";
|
|
771
790
|
static modulePlaceholderWithoutWindow = "declares a placeholder without a window part, which registers it";
|
|
772
791
|
static moduleSettingsPagesWithoutWindow = "declares settings pages without a window part, which registers them";
|
|
@@ -905,7 +924,7 @@ export class Resources {
|
|
|
905
924
|
"Network.setRequestInterception", "Network.continueInterceptedRequest"
|
|
906
925
|
];
|
|
907
926
|
static webViewRefusedDomains = ["Target", "Browser", "Fetch", "Security"];
|
|
908
|
-
static webViewFields = [Resources.methodsKind, Resources.eventsKind, Resources.keysField, Resources.newWindowsField];
|
|
927
|
+
static webViewFields = [Resources.methodsKind, Resources.eventsKind, Resources.keysField, Resources.newWindowsField, Resources.loadingKeysField];
|
|
909
928
|
static webViewMethodFields = [Resources.nameField, Resources.parametersField];
|
|
910
929
|
static webViewKeyFields = [Resources.nameField, Resources.keysField, Resources.macKeysField];
|
|
911
930
|
static webViewRuleFields = [
|
|
@@ -913,11 +932,11 @@ export class Resources {
|
|
|
913
932
|
];
|
|
914
933
|
static webViewStandardPlatforms = "Windows and Linux";
|
|
915
934
|
static webViewMacPlatform = "macOS";
|
|
916
|
-
static webViewFileInvalid = `must be an object with optional ${Resources.methodsKind}, ${Resources.eventsKind}, ${Resources.keysField} and ${Resources.
|
|
935
|
+
static webViewFileInvalid = `must be an object with optional ${Resources.methodsKind}, ${Resources.eventsKind}, ${Resources.keysField}, ${Resources.newWindowsField} and ${Resources.loadingKeysField}`;
|
|
917
936
|
static webViewMethodRepeated = "names a method more than once";
|
|
918
937
|
static webViewEventsInvalid = "must list its events once each as a debugging protocol domain, a dot and a name, such as Page.loadEventFired";
|
|
919
938
|
static webViewNewWindowsNotBoolean = `must say ${Resources.newWindowsField} as true or false`;
|
|
920
|
-
static webViewKeysInvalid = `must name each of its keys once, with at most ${Resources.webViewKeysLimit} names`;
|
|
939
|
+
static webViewKeysInvalid = `must name each of its keys and loading keys once, with at most ${Resources.webViewKeysLimit} names in all`;
|
|
921
940
|
static modulePackageFixturesFolder = `${Resources.moduleFixtureFolder}/packages`;
|
|
922
941
|
static modulesSourceFolder = `${Resources.sourceFolder}/modules`;
|
|
923
942
|
static angularCorePackage = "@angular/core";
|
|
@@ -1075,11 +1094,17 @@ export class Resources {
|
|
|
1075
1094
|
static optionalTargetArchitecture = Resources.architectureArm64;
|
|
1076
1095
|
static publishedVersionsVariable = "PUBLISHED_VERSIONS";
|
|
1077
1096
|
static moduleRangeNoOutputFile = `${Resources.githubOutputVariable} names no file for the step's range and version outputs.`;
|
|
1097
|
+
static moduleRangeNoPin = `The root ${Resources.packageManifestFileName} pins no Noldova Desktop package to one exact version, the version a module builds and tests against.`;
|
|
1078
1098
|
static moduleRangeNoPublished = `${Resources.publishedVersionsVariable} holds no list of versions as npm view's JSON gives it.`;
|
|
1079
1099
|
static feedSkipVariable = "SKIP_FEED_CHECK";
|
|
1080
1100
|
static feedVersionVariable = "FEED_VERSION";
|
|
1081
1101
|
static feedUrlVariable = "FEED_URL";
|
|
1082
1102
|
static releaseRepositoryVariable = "RELEASE_REPOSITORY";
|
|
1103
|
+
static releaseSourceRepositoryVariable = "RELEASE_SOURCE_REPOSITORY";
|
|
1104
|
+
static releaseBuildRepositoryVariable = "RELEASE_BUILD_REPOSITORY";
|
|
1105
|
+
static gitHubPrivateField = "private";
|
|
1106
|
+
static sourceRepositoryLabel = "the source repository";
|
|
1107
|
+
static releaseTagPrefixVariable = "RELEASE_TAG_PREFIX";
|
|
1083
1108
|
static feedWaitVariable = "FEED_WAIT_SECONDS";
|
|
1084
1109
|
static feedSkipValue = "true";
|
|
1085
1110
|
static feedSkipValues = [String.empty, "false", Resources.feedSkipValue];
|
|
@@ -1138,6 +1163,8 @@ export class Resources {
|
|
|
1138
1163
|
static commonJsScope = `${JSON.stringify({ type: "commonjs" })}\n`;
|
|
1139
1164
|
static builderSegments = [Resources.nodeModulesFolder, "electron-builder", "cli.js"];
|
|
1140
1165
|
static builderOptions = ["--publish", "never", "--config"];
|
|
1166
|
+
static diskImageDetachFailure = "Unable to detach device cleanly";
|
|
1167
|
+
static builderDetachRetry = "electron-builder could not detach the disk image it was making while macOS still held its volume; building the packages again, once.\n";
|
|
1141
1168
|
static builderVariables = new Set([
|
|
1142
1169
|
"PATH", "PATHEXT", "COMSPEC", "SYSTEMROOT", "SYSTEMDRIVE", "WINDIR", "PROCESSOR_ARCHITECTURE", "NUMBER_OF_PROCESSORS",
|
|
1143
1170
|
"HOME", "USERPROFILE", "HOMEDRIVE", "HOMEPATH", "APPDATA", "LOCALAPPDATA", "USER", "USERNAME", "LOGNAME",
|
|
@@ -1342,6 +1369,7 @@ export class Resources {
|
|
|
1342
1369
|
static manifestVersionField = "version";
|
|
1343
1370
|
static manifestDependenciesField = "dependencies";
|
|
1344
1371
|
static manifestOptionalDependenciesField = "optionalDependencies";
|
|
1372
|
+
static manifestDevDependenciesField = "devDependencies";
|
|
1345
1373
|
static manifestFilesField = "files";
|
|
1346
1374
|
static manifestExportsField = "exports";
|
|
1347
1375
|
static manifestCommitField = "gitHead";
|
|
@@ -1365,6 +1393,8 @@ export class Resources {
|
|
|
1365
1393
|
static scopedPackageNameSegments = 2;
|
|
1366
1394
|
static packageNameSegments = 1;
|
|
1367
1395
|
static packageVersionPlaceholder = "__VERSION__";
|
|
1396
|
+
static packageNextMinorPlaceholder = "__NEXT_MINOR__";
|
|
1397
|
+
static packagePeerRangePlaceholder = Resources.formatVersionRange(Resources.packageVersionPlaceholder, Resources.packageNextMinorPlaceholder);
|
|
1368
1398
|
static protocolVersionPlaceholder = ["__PROTOCOL", "VERSION__"].join("_");
|
|
1369
1399
|
static packageNoCoverageExclusions = "[]";
|
|
1370
1400
|
static angularScope = "@angular/";
|
|
@@ -1538,6 +1568,8 @@ export class Resources {
|
|
|
1538
1568
|
static lockedPackageVersion = /^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.+-]+)?$/;
|
|
1539
1569
|
static lockResolvedField = "resolved";
|
|
1540
1570
|
static lockInBundleField = "inBundle";
|
|
1571
|
+
static lockLinkField = "link";
|
|
1572
|
+
static ownArchiveFolder = /^(?:\.\.\/)*_packages$/u;
|
|
1541
1573
|
static omittedOptionalsField = "omittedOptionals";
|
|
1542
1574
|
static omittedOptionalsShape = `The root package.json's ${Resources.omittedOptionalsSection} must map each package, as <name>@<version>, to `
|
|
1543
1575
|
+ "{ \"dependencies\": [<optional dependency name>, ...], \"reason\": \"<why the app never loads them>\" }.";
|
|
@@ -1665,6 +1697,7 @@ export class Resources {
|
|
|
1665
1697
|
static releaseRevisionPattern = /^[0-9a-f]{40}$/u;
|
|
1666
1698
|
static releaseVersionPattern = /^(0|[1-9]\d{0,8})\.(0|[1-9]\d{0,8})\.(0|[1-9]\d{0,8})$/u;
|
|
1667
1699
|
static releaseTagPrefix = "v";
|
|
1700
|
+
static releaseTagPrefixPattern = /^(?:v|[a-z0-9]+(?:-[a-z0-9]+)*-)$/u;
|
|
1668
1701
|
static gitCommand = "git";
|
|
1669
1702
|
static gitTimeout = 60_000;
|
|
1670
1703
|
static successExitCodes = [0];
|
|
@@ -1784,7 +1817,7 @@ export class Resources {
|
|
|
1784
1817
|
static formatStagePartsMissing(missing) {
|
|
1785
1818
|
return `The stage needs ${missing.join(Resources.listSeparator)}, which is not a package under src/.`;
|
|
1786
1819
|
}
|
|
1787
|
-
static
|
|
1820
|
+
static formatNativeArchitectureUnknown(architecture, known) {
|
|
1788
1821
|
return `The package's architecture ${architecture} is none of ${known.join(Resources.listSeparator)}.`;
|
|
1789
1822
|
}
|
|
1790
1823
|
static formatPackagedModulesNotActive(problems) {
|
|
@@ -1961,6 +1994,9 @@ export class Resources {
|
|
|
1961
1994
|
static formatManifestOwnUnstamped(file, names) {
|
|
1962
1995
|
return `${file} must depend on ${names.join(Resources.listSeparator)} at version "${Resources.packageVersionPlaceholder}".`;
|
|
1963
1996
|
}
|
|
1997
|
+
static formatManifestOwnPeerUnranged(file, names) {
|
|
1998
|
+
return `${file} must take ${names.join(Resources.listSeparator)} as a peer at "${Resources.packagePeerRangePlaceholder}"; the build stamps the version and its next minor.`;
|
|
1999
|
+
}
|
|
1964
2000
|
static formatModuleVersionsUnreadable(problems) {
|
|
1965
2001
|
return `The build cannot version the module packages: ${problems.join(Resources.problemSeparator)}`;
|
|
1966
2002
|
}
|
|
@@ -2178,15 +2214,21 @@ export class Resources {
|
|
|
2178
2214
|
static formatStageLicensedPackage(id, license) {
|
|
2179
2215
|
return `${id} (${license})`;
|
|
2180
2216
|
}
|
|
2181
|
-
static
|
|
2182
|
-
return `The
|
|
2217
|
+
static formatNativeArchitectureMismatch(file, found, kind, architecture) {
|
|
2218
|
+
return `The file ${file} is ${found}, not an ${architecture}-only ${kind} file, so it would not run natively on ${architecture}.`;
|
|
2183
2219
|
}
|
|
2184
|
-
static
|
|
2185
|
-
return `Every Mach-O file in ${
|
|
2220
|
+
static formatNativeArchitectureVerified(folder, count, architecture) {
|
|
2221
|
+
return `Every Mach-O, PE and ELF file in ${folder}, ${count} in all, is ${architecture} alone.`;
|
|
2186
2222
|
}
|
|
2187
2223
|
static formatMachCpuType(type) {
|
|
2188
2224
|
return `a Mach-O file for CPU type 0x${type.toString(16)}`;
|
|
2189
2225
|
}
|
|
2226
|
+
static formatPeMachine(machine) {
|
|
2227
|
+
return `a PE file for machine 0x${machine.toString(16)}`;
|
|
2228
|
+
}
|
|
2229
|
+
static formatElfMachine(machine) {
|
|
2230
|
+
return `an ELF file for machine ${String(machine)}`;
|
|
2231
|
+
}
|
|
2190
2232
|
static formatPackagedBuildFailed(exitCode) {
|
|
2191
2233
|
return `The packaged build failed with exit code ${exitCode}.`;
|
|
2192
2234
|
}
|
|
@@ -2578,11 +2620,11 @@ export class Resources {
|
|
|
2578
2620
|
static formatWebViewKeyRepeated(platform) {
|
|
2579
2621
|
return `gives a key more than once on ${platform}`;
|
|
2580
2622
|
}
|
|
2581
|
-
static formatWebViewKeyInvalid(index) {
|
|
2582
|
-
return `must describe ${
|
|
2623
|
+
static formatWebViewKeyInvalid(field, index) {
|
|
2624
|
+
return `must describe ${field}[${index}] with a name, its keys and optionally its macOS keys`;
|
|
2583
2625
|
}
|
|
2584
|
-
static formatWebViewKeyNameInvalid(index) {
|
|
2585
|
-
return `must name ${
|
|
2626
|
+
static formatWebViewKeyNameInvalid(field, index) {
|
|
2627
|
+
return `must name ${field}[${index}] with a lowercase letter followed by letters and digits`;
|
|
2586
2628
|
}
|
|
2587
2629
|
static formatWebViewChordsInvalid(where) {
|
|
2588
2630
|
return `must give ${where} one to ${Resources.webViewChordsLimit} keys`;
|
|
@@ -2591,7 +2633,7 @@ export class Resources {
|
|
|
2591
2633
|
return `gives ${where} ${text}, which is not a key in Noldova Desktop's format, such as Mod+R or F5`;
|
|
2592
2634
|
}
|
|
2593
2635
|
static formatWebViewKeyRefused(where, text, platform) {
|
|
2594
|
-
return `gives ${where} ${text}, which cannot be declared on ${platform}: it needs Mod, Ctrl or Alt, or a function key, and it must not be a key that editing, the operating system or Noldova Desktop holds`;
|
|
2636
|
+
return `gives ${where} ${text}, which cannot be declared on ${platform}: it needs Mod, Ctrl or Alt, or a function key, or is Escape among the loading keys, and it must not be a key that editing, the operating system or Noldova Desktop holds`;
|
|
2595
2637
|
}
|
|
2596
2638
|
static formatWebViewMethodInvalid(index) {
|
|
2597
2639
|
return `must describe ${Resources.methodsKind}[${index}] with a name and optionally parameters`;
|
|
@@ -2644,6 +2686,21 @@ export class Resources {
|
|
|
2644
2686
|
static formatCatalogPermissionsModuleInvalid(name) {
|
|
2645
2687
|
return `The root ${Resources.packageManifestFileName}'s ${Resources.desktopField}.${Resources.productField}.${Resources.permissionsModuleField} must be the id of a module in ${Resources.modulesListSection}, not ${JSON.stringify(name)}.`;
|
|
2646
2688
|
}
|
|
2689
|
+
static formatModuleFormerNamesUndeclared(name) {
|
|
2690
|
+
return `gives former names for "${name}", which isn't one of its commands or documents`;
|
|
2691
|
+
}
|
|
2692
|
+
static formatModuleFormerNamesInvalid(name) {
|
|
2693
|
+
return `must give "${name}" its former names as a list of different qualified names, such as "notes.add", none of them its own name`;
|
|
2694
|
+
}
|
|
2695
|
+
static formatModuleFormerNamesReserved(name, former) {
|
|
2696
|
+
return `gives "${name}" the former name "${former}", which belongs to the shell or a reserved id: ${Resources.moduleReservedIds.join(", ")}`;
|
|
2697
|
+
}
|
|
2698
|
+
static formatCatalogFormerNamesRepeated(repeated) {
|
|
2699
|
+
return `Former names repeat in the build, and a former name moves to one command or document: ${repeated.map(([name, files]) => Resources.formatNameInFile(name, files.join(", "))).join("; ")}.`;
|
|
2700
|
+
}
|
|
2701
|
+
static formatCatalogFormerNamesCurrent(current) {
|
|
2702
|
+
return `Former names are names a module contributes in the build: ${current.map(([name, files]) => Resources.formatNameInFile(name, files.join(", "))).join("; ")}.`;
|
|
2703
|
+
}
|
|
2647
2704
|
static formatContributionPlace(file, kind) {
|
|
2648
2705
|
return `${file} (${kind})`;
|
|
2649
2706
|
}
|
|
@@ -2683,6 +2740,9 @@ export class Resources {
|
|
|
2683
2740
|
static formatCatalogAngularPeerRange(subject, peer, needed, minimum) {
|
|
2684
2741
|
return `${subject} needs ${peer} ${String(needed)}, a range that doesn't end at the next major after ${minimum}; an Angular peer takes ${Resources.angularPeerRangeForm}, since only a new Angular major may break a module.`;
|
|
2685
2742
|
}
|
|
2743
|
+
static formatCatalogOrganizationPeerRange(subject, peer, needed, minimum) {
|
|
2744
|
+
return `${subject} needs ${peer} ${String(needed)}, a range that doesn't end at the first version refused after ${minimum}, the next minor below 1.0.0 and the next major from it; a peer on another of the organization's packages takes ${Resources.versionRangeForm}.`;
|
|
2745
|
+
}
|
|
2686
2746
|
static formatCatalogCoreRangeUnnamed(subject, peer, needed, file) {
|
|
2687
2747
|
return `${subject} needs ${peer} ${String(needed)}, a range, but ${file} names no ${Resources.noldovaDesktopField}; a module that accepts a range of Noldova Desktop versions names it there, and each of Noldova Desktop's packages it peers on takes that same range.`;
|
|
2688
2748
|
}
|
|
@@ -2690,7 +2750,7 @@ export class Resources {
|
|
|
2690
2750
|
return `${subject} needs ${peer} ${String(needed)}, but ${file} accepts Noldova Desktop ${range}; each of Noldova Desktop's packages it peers on takes that same range.`;
|
|
2691
2751
|
}
|
|
2692
2752
|
static formatCatalogPeerMismatch(subject, peer, needed, holder, version) {
|
|
2693
|
-
return `${subject} needs ${peer} ${String(needed)}, but ${holder} ${version ?? "none"}; a peer names one exact version, such as 1.2.3, or, for
|
|
2753
|
+
return `${subject} needs ${peer} ${String(needed)}, but ${holder} ${version ?? "none"}; a peer names one exact version, such as 1.2.3, or, for the organization's packages, a range of the form ${Resources.versionRangeForm}, and, for Angular's packages in a window part, ${Resources.angularPeerRangeForm}.`;
|
|
2694
2754
|
}
|
|
2695
2755
|
static formatCatalogOutsideRange(id, version, range) {
|
|
2696
2756
|
return `${id} ${version} accepts Noldova Desktop ${range}`;
|
|
@@ -2822,6 +2882,14 @@ export class Resources {
|
|
|
2822
2882
|
static formatModuleRangeNotFollowing(file, range, minimum, following) {
|
|
2823
2883
|
return `${file}'s ${Resources.noldovaDesktopField} is ${range}, but a range from ${minimum} ends below the next version that may break modules: ${following}.`;
|
|
2824
2884
|
}
|
|
2885
|
+
static formatModuleRangePinNotExact(name, version) {
|
|
2886
|
+
return `The root ${Resources.packageManifestFileName} names ${name} at ${version}, not at one exact version; `
|
|
2887
|
+
+ `a module pins each Noldova Desktop package to the exact version its range starts at, as MODULES.md's "Noldova Desktop versions" says.`;
|
|
2888
|
+
}
|
|
2889
|
+
static formatModuleRangeNotPin(file, range, name, pin) {
|
|
2890
|
+
return `${file}'s ${Resources.noldovaDesktopField} is ${range}, but the root ${Resources.packageManifestFileName} pins ${name} at ${pin}; `
|
|
2891
|
+
+ `the range's lowest version is the module's exact development pin, as MODULES.md's "Noldova Desktop versions" says.`;
|
|
2892
|
+
}
|
|
2825
2893
|
static formatModuleRangeNoneInside(file, range) {
|
|
2826
2894
|
return `No published Noldova Desktop version is inside ${file}'s ${Resources.noldovaDesktopField} range ${range}.`;
|
|
2827
2895
|
}
|
|
@@ -2890,7 +2958,11 @@ export class Resources {
|
|
|
2890
2958
|
return `The packaged product file names the update feed ${JSON.stringify(feed ?? null)}, not ${expected}, so its packages cannot be released.`;
|
|
2891
2959
|
}
|
|
2892
2960
|
static formatReleaseCheckUsage(command) {
|
|
2893
|
-
return `Usage: ${Resources.releaseRepositoryVariable}=<owner/name> ${Resources.releaseVersionVariable}=<N.N.N> ${Resources.releaseRevisionVariable}=<commit>
|
|
2961
|
+
return `Usage: ${Resources.releaseRepositoryVariable}=<owner/name> ${Resources.releaseVersionVariable}=<N.N.N> ${Resources.releaseRevisionVariable}=<commit> `
|
|
2962
|
+
+ `${Resources.formatReleaseSourceOptions()} ${command} ${Resources.releaseCheckCommand}\n`;
|
|
2963
|
+
}
|
|
2964
|
+
static formatReleaseSourceOptions() {
|
|
2965
|
+
return `[${Resources.releaseSourceRepositoryVariable}=<owner/name>] [${Resources.releaseBuildRepositoryVariable}=<owner/name>] [${Resources.releaseTagPrefixVariable}=<prefix>]`;
|
|
2894
2966
|
}
|
|
2895
2967
|
static formatRootVersionMismatch(rootVersion, version) {
|
|
2896
2968
|
return `The root manifest's version is ${rootVersion}, not ${version}; raise it on ${Resources.mainBranch} first.`;
|
|
@@ -2925,7 +2997,7 @@ export class Resources {
|
|
|
2925
2997
|
}
|
|
2926
2998
|
static formatReleasePublishUsage(command) {
|
|
2927
2999
|
return `Usage: ${Resources.releaseRepositoryVariable}=<owner/name> ${Resources.releaseVersionVariable}=<N.N.N> ${Resources.releaseRevisionVariable}=<commit> ${Resources.releaseFolderVariable}=<folder> `
|
|
2928
|
-
+ `${Resources.releaseReportsVariable}=<folder> ${Resources.releaseRunVariable}=<url> [${Resources.releaseUpdateFeedVariable}=<loopback URL> | ${Resources.releaseInternalVariable}=<N.N.N-internal.N>] ${command} ${Resources.releasePublishCommand}\n`;
|
|
3000
|
+
+ `${Resources.formatReleaseSourceOptions()} ${Resources.releaseReportsVariable}=<folder> ${Resources.releaseRunVariable}=<url> [${Resources.releaseUpdateFeedVariable}=<loopback URL> | ${Resources.releaseInternalVariable}=<N.N.N-internal.N>] ${command} ${Resources.releasePublishCommand}\n`;
|
|
2929
3001
|
}
|
|
2930
3002
|
static formatTestFeedPublishesNothing(feed) {
|
|
2931
3003
|
return `This run tests updating with the feed ${feed}, so it publishes nothing.\n`;
|
|
@@ -3072,6 +3144,9 @@ export class Resources {
|
|
|
3072
3144
|
static formatSmokeMainEndedBeforeLauncher(ending, tail) {
|
|
3073
3145
|
return `The main process ${ending} before its launcher connected to the runtime:\n${tail}`;
|
|
3074
3146
|
}
|
|
3147
|
+
static formatSmokeLogsUnwatchable(logs) {
|
|
3148
|
+
return `The launcher's logs folder ${logs} can't be watched for its start log.`;
|
|
3149
|
+
}
|
|
3075
3150
|
static formatSmokeLauncherKeptStartLog(logs, tail) {
|
|
3076
3151
|
return `The main process's launcher still kept its start log in ${logs} ${Resources.smokeStartLimit} ms after the runtime answered, so it never connected:\n${tail}`;
|
|
3077
3152
|
}
|
|
@@ -3120,6 +3195,9 @@ export class Resources {
|
|
|
3120
3195
|
static formatAddonBuildFailed(packageName, kind, addon, exitCode, text) {
|
|
3121
3196
|
return `Building ${packageName}'s ${kind} addon ${addon} failed with exit code ${exitCode}:\n${text}`;
|
|
3122
3197
|
}
|
|
3198
|
+
static formatAddonArchitectureRefused(packageName, architecture, machineArchitecture) {
|
|
3199
|
+
return `${packageName}'s addons can't be built for ${architecture} on this ${machineArchitecture} machine, since node-gyp builds for the machine's own processor. Build on a ${architecture} machine, or name a folder of release builds in ${Resources.releaseAddonsVariable}.`;
|
|
3200
|
+
}
|
|
3123
3201
|
static formatReleaseAddonMissing(target, packageName, addon, directory, build) {
|
|
3124
3202
|
return `${Resources.releaseAddonsVariable} lacks the ${target} build of ${packageName}'s addon ${addon}, ${directory}/${build}.`;
|
|
3125
3203
|
}
|
|
@@ -3354,6 +3432,26 @@ export class Resources {
|
|
|
3354
3432
|
static formatLockedPackageUnlocked(name, version, location) {
|
|
3355
3433
|
return `${name}@${version} at ${location} is installed but not locked in package-lock.json, and only a package installed from the app's own archive may ship unlocked.`;
|
|
3356
3434
|
}
|
|
3435
|
+
static formatLockedPackageLinked(location, resolved) {
|
|
3436
|
+
return `${location} in package-lock.json links to the folder ${resolved}; a linked folder cannot ship, so lock the package to its archive in the repository's own ${Resources.archivesFolder} folder.`;
|
|
3437
|
+
}
|
|
3438
|
+
static formatLockedArchiveRefused(name, version, location, resolved) {
|
|
3439
|
+
return `${name}@${version} at ${location} in package-lock.json is locked to ${resolved}; a locked file ships only as a ${Resources.packageArchiveExtension} archive of a Noldova package `
|
|
3440
|
+
+ `directly in the ${Resources.archivesFolder} folder of the app's folder or of a folder above it.`;
|
|
3441
|
+
}
|
|
3442
|
+
static formatLockedArchiveMisnamed(name, version, location, resolved, expected) {
|
|
3443
|
+
return `${name}@${version} at ${location} in package-lock.json is locked to ${resolved}; its archive must be named ${expected}, the name npm pack gives ${name}@${version}.`;
|
|
3444
|
+
}
|
|
3445
|
+
static formatLockedArchiveOutside(id, archive, repository) {
|
|
3446
|
+
return `${id} is locked to ${archive}, which is outside the repository at ${repository}; an app ships only the archives in its own repository's ${Resources.archivesFolder} folders.`;
|
|
3447
|
+
}
|
|
3448
|
+
static formatLockedArchiveThroughLink(id, archive, real) {
|
|
3449
|
+
return `${id} is locked to ${archive}, which a link leads to ${real}; an app ships an archive only from its repository's own ${Resources.archivesFolder} folder, not through a link.`;
|
|
3450
|
+
}
|
|
3451
|
+
static formatLockedArchiveNoIntegrity(name, version, location, resolved) {
|
|
3452
|
+
return `${name}@${version} at ${location} in package-lock.json is locked to ${resolved} with an integrity that holds no SHA-512, so its archive cannot be verified; `
|
|
3453
|
+
+ `write "integrity": "sha512-<the archive's SHA-512 digest in base64>" beside its "resolved", or leave the integrity out to ship the archive as it is.`;
|
|
3454
|
+
}
|
|
3357
3455
|
static formatLockedPackageUnresolved(name, version, location) {
|
|
3358
3456
|
return `${name}@${version} at ${location} in package-lock.json is not resolved to a registry tarball, so it cannot ship.`;
|
|
3359
3457
|
}
|
|
@@ -3369,8 +3467,8 @@ export class Resources {
|
|
|
3369
3467
|
static formatTargetId(platform, architecture) {
|
|
3370
3468
|
return `${platform}-${architecture}`;
|
|
3371
3469
|
}
|
|
3372
|
-
static formatTargetFileName(productName, platform, architecture, extension) {
|
|
3373
|
-
return `${productName}-${platform}-${architecture}.${extension}`;
|
|
3470
|
+
static formatTargetFileName(productName, version, platform, architecture, extension) {
|
|
3471
|
+
return `${productName}-${version}-${platform}-${architecture}.${extension}`;
|
|
3374
3472
|
}
|
|
3375
3473
|
static formatTarEntryType(type) {
|
|
3376
3474
|
return `a tar entry of type ${type}`;
|
|
@@ -3464,6 +3562,9 @@ export class Resources {
|
|
|
3464
3562
|
static formatReleaseRunCheck(runUrl) {
|
|
3465
3563
|
return `Each target's package passed its install check on that target's own runner in the run that built it: ${runUrl}`;
|
|
3466
3564
|
}
|
|
3565
|
+
static formatReleaseSource(repository, revision) {
|
|
3566
|
+
return `Built from ${repository} at ${revision}.`;
|
|
3567
|
+
}
|
|
3467
3568
|
static formatUnsignedTestRelease(name, repository) {
|
|
3468
3569
|
return `Unsigned test release of ${name}, published in ${repository}; an installed ${name} never updates from it.`;
|
|
3469
3570
|
}
|
|
@@ -3555,6 +3656,23 @@ export class Resources {
|
|
|
3555
3656
|
static formatTagAnnotated(tag) {
|
|
3556
3657
|
return `The tag ${tag} is annotated; a release's tag points straight at its commit.`;
|
|
3557
3658
|
}
|
|
3659
|
+
static formatReleaseTagTaken(tag, repository) {
|
|
3660
|
+
return `The tag ${tag} already exists in ${repository}, which isn't the source repository, so it can't be this release's own; this release needs a new version.`;
|
|
3661
|
+
}
|
|
3662
|
+
static formatReleaseTagMissing(tag, repository) {
|
|
3663
|
+
return `The tag ${tag} doesn't exist in ${repository}, though its release is published.`;
|
|
3664
|
+
}
|
|
3665
|
+
static formatReleaseTagPrefixNeeded(repository, sourceRepository) {
|
|
3666
|
+
return `${Resources.releaseTagPrefixVariable} must name the app, such as app-, for a release in ${repository}, which isn't its source repository ${sourceRepository}: `
|
|
3667
|
+
+ `a v tag there can't say which app it belongs to.`;
|
|
3668
|
+
}
|
|
3669
|
+
static formatReleaseSourceNotPublic(sourceRepository, buildRepository) {
|
|
3670
|
+
return `The release runs in ${buildRepository} and reads its source ${sourceRepository} with the run's own token, which reads no other private repository, so ${sourceRepository} must be public; it is private or doesn't exist.`;
|
|
3671
|
+
}
|
|
3672
|
+
static formatSeparateReleaseNeedsFeed(repository, sourceRepository) {
|
|
3673
|
+
return `The release publishes in ${repository}, not in its source repository ${sourceRepository}, so product.json must name its updateFeed: `
|
|
3674
|
+
+ `the latest release of ${repository} may be another app's.`;
|
|
3675
|
+
}
|
|
3558
3676
|
static formatTagMoved(tag, commit, revision) {
|
|
3559
3677
|
return `The tag ${tag} already points at ${commit}, not at ${revision}; a tag is never moved, so this release needs a new version.`;
|
|
3560
3678
|
}
|
|
@@ -3570,8 +3688,11 @@ export class Resources {
|
|
|
3570
3688
|
static formatYamlQuoted(text) {
|
|
3571
3689
|
return `'${text.replaceAll("'", "''")}'`;
|
|
3572
3690
|
}
|
|
3573
|
-
static formatReleaseRepositoryInvalid(repository) {
|
|
3574
|
-
return `${
|
|
3691
|
+
static formatReleaseRepositoryInvalid(repository, variable = Resources.releaseRepositoryVariable) {
|
|
3692
|
+
return `${variable} must name a repository as owner/name, not "${repository}".`;
|
|
3693
|
+
}
|
|
3694
|
+
static formatReleaseTagPrefixInvalid(prefix) {
|
|
3695
|
+
return `${Resources.releaseTagPrefixVariable} must be v, or lowercase words joined by dashes and ending in a dash, such as app-, not "${prefix}".`;
|
|
3575
3696
|
}
|
|
3576
3697
|
static formatReleaseRevisionInvalid(revision) {
|
|
3577
3698
|
return `${Resources.releaseRevisionVariable} must be a full commit SHA of 40 lowercase hexadecimal digits, not "${revision}".`;
|
|
@@ -3579,8 +3700,8 @@ export class Resources {
|
|
|
3579
3700
|
static formatReleaseVersionInvalid(source, text) {
|
|
3580
3701
|
return `${source} must be a plain version such as 0.0.2, not "${text}".`;
|
|
3581
3702
|
}
|
|
3582
|
-
static formatReleaseTagInvalid(source, tag) {
|
|
3583
|
-
return `${source} must be a tag such as
|
|
3703
|
+
static formatReleaseTagInvalid(source, tag, prefix) {
|
|
3704
|
+
return `${source} must be a tag such as ${prefix}0.0.2, not "${tag}".`;
|
|
3584
3705
|
}
|
|
3585
3706
|
static formatTagReferencesContext(tag) {
|
|
3586
3707
|
return `the references of the tag ${tag}`;
|