@cbnventures/nova 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/nova.mjs +5 -2
- package/build/package.json +3 -2
- package/build/scaffold-versions.json +21 -14
- package/build/src/api/app-store-connect.d.ts +28 -0
- package/build/src/api/app-store-connect.d.ts.map +1 -0
- package/build/src/api/app-store-connect.js +494 -0
- package/build/src/api/app-store-connect.js.map +1 -0
- package/build/src/api/google-play-console.d.ts +15 -0
- package/build/src/api/google-play-console.d.ts.map +1 -0
- package/build/src/api/google-play-console.js +136 -0
- package/build/src/api/google-play-console.js.map +1 -0
- package/build/src/cli/generate/github/workflows-blueprint-validate.d.ts +4 -2
- package/build/src/cli/generate/github/workflows-blueprint-validate.d.ts.map +1 -1
- package/build/src/cli/generate/github/workflows-blueprint-validate.js +199 -3
- package/build/src/cli/generate/github/workflows-blueprint-validate.js.map +1 -1
- package/build/src/cli/generate/github/workflows-blueprint.d.ts +6 -0
- package/build/src/cli/generate/github/workflows-blueprint.d.ts.map +1 -1
- package/build/src/cli/generate/github/workflows-blueprint.js +458 -59
- package/build/src/cli/generate/github/workflows-blueprint.js.map +1 -1
- package/build/src/cli/index.js +154 -0
- package/build/src/cli/index.js.map +1 -1
- package/build/src/cli/integration/app-store-connect.d.ts +22 -0
- package/build/src/cli/integration/app-store-connect.d.ts.map +1 -0
- package/build/src/cli/integration/app-store-connect.js +502 -0
- package/build/src/cli/integration/app-store-connect.js.map +1 -0
- package/build/src/cli/integration/discord-developer-portal.d.ts +6 -0
- package/build/src/cli/integration/discord-developer-portal.d.ts.map +1 -0
- package/build/src/cli/integration/discord-developer-portal.js +42 -0
- package/build/src/cli/integration/discord-developer-portal.js.map +1 -0
- package/build/src/cli/integration/google-play-console.d.ts +16 -0
- package/build/src/cli/integration/google-play-console.d.ts.map +1 -0
- package/build/src/cli/integration/google-play-console.js +199 -0
- package/build/src/cli/integration/google-play-console.js.map +1 -0
- package/build/src/cli/integration/index.d.ts +8 -0
- package/build/src/cli/integration/index.d.ts.map +1 -0
- package/build/src/cli/integration/index.js +139 -0
- package/build/src/cli/integration/index.js.map +1 -0
- package/build/src/cli/recipe/package-json/normalize-tooling.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/normalize-tooling.js +47 -3
- package/build/src/cli/recipe/package-json/normalize-tooling.js.map +1 -1
- package/build/src/cli/recipe/package-json/sync-identity.d.ts.map +1 -1
- package/build/src/cli/recipe/package-json/sync-identity.js +51 -18
- package/build/src/cli/recipe/package-json/sync-identity.js.map +1 -1
- package/build/src/cli/scaffold/app/android.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/android.js +2 -0
- package/build/src/cli/scaffold/app/android.js.map +1 -1
- package/build/src/cli/scaffold/app/apple.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/apple.js +2 -0
- package/build/src/cli/scaffold/app/apple.js.map +1 -1
- package/build/src/cli/scaffold/app/astro.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/astro.js +10 -0
- package/build/src/cli/scaffold/app/astro.js.map +1 -1
- package/build/src/cli/scaffold/app/discord-bot.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/discord-bot.js +11 -1
- package/build/src/cli/scaffold/app/discord-bot.js.map +1 -1
- package/build/src/cli/scaffold/app/expressjs.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/expressjs.js +11 -1
- package/build/src/cli/scaffold/app/expressjs.js.map +1 -1
- package/build/src/cli/scaffold/app/nextjs.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/nextjs.js +4 -1
- package/build/src/cli/scaffold/app/nextjs.js.map +1 -1
- package/build/src/cli/scaffold/app/vite.d.ts.map +1 -1
- package/build/src/cli/scaffold/app/vite.js +10 -1
- package/build/src/cli/scaffold/app/vite.js.map +1 -1
- package/build/src/cli/scaffold/docs/docusaurus.d.ts.map +1 -1
- package/build/src/cli/scaffold/docs/docusaurus.js +8 -2
- package/build/src/cli/scaffold/docs/docusaurus.js.map +1 -1
- package/build/src/cli/scaffold/package/github-action.d.ts.map +1 -1
- package/build/src/cli/scaffold/package/github-action.js +4 -0
- package/build/src/cli/scaffold/package/github-action.js.map +1 -1
- package/build/src/cli/scaffold/package/homebridge.d.ts.map +1 -1
- package/build/src/cli/scaffold/package/homebridge.js +1 -0
- package/build/src/cli/scaffold/package/homebridge.js.map +1 -1
- package/build/src/cli/scaffold/package/pfsense.d.ts.map +1 -1
- package/build/src/cli/scaffold/package/pfsense.js +1 -0
- package/build/src/cli/scaffold/package/pfsense.js.map +1 -1
- package/build/src/cli/scaffold/starter/base.d.ts.map +1 -1
- package/build/src/cli/scaffold/starter/base.js +2 -1
- package/build/src/cli/scaffold/starter/base.js.map +1 -1
- package/build/src/cli/scaffold/tool/serverless.d.ts.map +1 -1
- package/build/src/cli/scaffold/tool/serverless.js +5 -0
- package/build/src/cli/scaffold/tool/serverless.js.map +1 -1
- package/build/src/cli/utility/changelog.d.ts +2 -0
- package/build/src/cli/utility/changelog.d.ts.map +1 -1
- package/build/src/cli/utility/changelog.js +225 -129
- package/build/src/cli/utility/changelog.js.map +1 -1
- package/build/src/cli/utility/configure.d.ts.map +1 -1
- package/build/src/cli/utility/configure.js +251 -42
- package/build/src/cli/utility/configure.js.map +1 -1
- package/build/src/lib/docker-packaging.d.ts +22 -1
- package/build/src/lib/docker-packaging.d.ts.map +1 -1
- package/build/src/lib/docker-packaging.js +1044 -76
- package/build/src/lib/docker-packaging.js.map +1 -1
- package/build/src/lib/file-discovery.js +1 -1
- package/build/src/lib/file-discovery.js.map +1 -1
- package/build/src/lib/ignore-files.d.ts.map +1 -1
- package/build/src/lib/ignore-files.js +4 -1
- package/build/src/lib/ignore-files.js.map +1 -1
- package/build/src/lib/integration.d.ts +14 -0
- package/build/src/lib/integration.d.ts.map +1 -0
- package/build/src/lib/integration.js +323 -0
- package/build/src/lib/integration.js.map +1 -0
- package/build/src/lib/nova-config.d.ts.map +1 -1
- package/build/src/lib/nova-config.js +22 -3
- package/build/src/lib/nova-config.js.map +1 -1
- package/build/src/lib/package-scripts.d.ts.map +1 -1
- package/build/src/lib/package-scripts.js +2 -1
- package/build/src/lib/package-scripts.js.map +1 -1
- package/build/src/lib/regex.d.ts +8 -0
- package/build/src/lib/regex.d.ts.map +1 -1
- package/build/src/lib/regex.js +10 -2
- package/build/src/lib/regex.js.map +1 -1
- package/build/src/lib/release-history.d.ts +2 -1
- package/build/src/lib/release-history.d.ts.map +1 -1
- package/build/src/lib/release-history.js +18 -0
- package/build/src/lib/release-history.js.map +1 -1
- package/build/src/lib/run-workspaces.d.ts +2 -0
- package/build/src/lib/run-workspaces.d.ts.map +1 -1
- package/build/src/lib/run-workspaces.js +121 -1
- package/build/src/lib/run-workspaces.js.map +1 -1
- package/build/src/lib/scaffold-allow-scripts.d.ts +4 -0
- package/build/src/lib/scaffold-allow-scripts.d.ts.map +1 -0
- package/build/src/lib/scaffold-allow-scripts.js +76 -0
- package/build/src/lib/scaffold-allow-scripts.js.map +1 -0
- package/build/src/lib/scaffold.d.ts +3 -2
- package/build/src/lib/scaffold.d.ts.map +1 -1
- package/build/src/lib/scaffold.js +177 -33
- package/build/src/lib/scaffold.js.map +1 -1
- package/build/src/lib/transpile.d.ts.map +1 -1
- package/build/src/lib/transpile.js +6 -5
- package/build/src/lib/transpile.js.map +1 -1
- package/build/src/lib/type-check.d.ts +3 -1
- package/build/src/lib/type-check.d.ts.map +1 -1
- package/build/src/lib/type-check.js +22 -6
- package/build/src/lib/type-check.js.map +1 -1
- package/build/src/lib/utility.d.ts.map +1 -1
- package/build/src/lib/utility.js +0 -7
- package/build/src/lib/utility.js.map +1 -1
- package/build/src/lib/version-contract.d.ts +7 -0
- package/build/src/lib/version-contract.d.ts.map +1 -0
- package/build/src/lib/version-contract.js +80 -0
- package/build/src/lib/version-contract.js.map +1 -0
- package/build/src/lib/version-strategy-migration.d.ts +6 -0
- package/build/src/lib/version-strategy-migration.d.ts.map +1 -0
- package/build/src/lib/version-strategy-migration.js +208 -0
- package/build/src/lib/version-strategy-migration.js.map +1 -0
- package/build/src/lib/workflow-templates.d.ts.map +1 -1
- package/build/src/lib/workflow-templates.js +22 -1
- package/build/src/lib/workflow-templates.js.map +1 -1
- package/build/src/presets/eslint/dx-ignore.d.ts.map +1 -1
- package/build/src/presets/eslint/dx-ignore.js +7 -0
- package/build/src/presets/eslint/dx-ignore.js.map +1 -1
- package/build/src/types/api/app-store-connect.d.ts +427 -0
- package/build/src/types/api/google-play-console.d.ts +146 -0
- package/build/src/types/cli/generate/github/workflows-blueprint-validate.d.ts +61 -0
- package/build/src/types/cli/generate/github/workflows-blueprint.d.ts +90 -12
- package/build/src/types/cli/index.d.ts +8 -0
- package/build/src/types/cli/integration/app-store-connect.d.ts +353 -0
- package/build/src/types/cli/integration/discord-developer-portal.d.ts +36 -0
- package/build/src/types/cli/integration/google-play-console.d.ts +145 -0
- package/build/src/types/cli/integration/index.d.ts +31 -0
- package/build/src/types/cli/recipe/package-json/normalize-tooling.d.ts +16 -0
- package/build/src/types/cli/recipe/package-json/sync-identity.d.ts +9 -0
- package/build/src/types/cli/utility/changelog.d.ts +149 -0
- package/build/src/types/cli/utility/configure.d.ts +122 -3
- package/build/src/types/lib/docker-packaging.d.ts +447 -47
- package/build/src/types/lib/integration.d.ts +264 -0
- package/build/src/types/lib/nova-config.d.ts +9 -0
- package/build/src/types/lib/package-scripts.d.ts +2 -0
- package/build/src/types/lib/release-history.d.ts +15 -0
- package/build/src/types/lib/run-workspaces.d.ts +117 -0
- package/build/src/types/lib/scaffold-allow-scripts.d.ts +54 -0
- package/build/src/types/lib/scaffold.d.ts +108 -2
- package/build/src/types/lib/transpile.d.ts +2 -0
- package/build/src/types/lib/type-check.d.ts +28 -0
- package/build/src/types/lib/utility.d.ts +0 -13
- package/build/src/types/lib/version-contract.d.ts +84 -0
- package/build/src/types/lib/version-strategy-migration.d.ts +207 -0
- package/build/src/types/shared.d.ts +456 -1
- package/build/src/types/tests/cli/generate/github/workflows-blueprint-validate.test.d.ts +49 -0
- package/build/src/types/tests/cli/generate/github/workflows-version-contract.test.d.ts +65 -0
- package/build/src/types/tests/cli/generate/must-haves/agent-conventions.test.d.ts +4 -0
- package/build/src/types/tests/cli/integration.test.d.ts +97 -0
- package/build/src/types/tests/cli/recipe/package-json/normalize-tooling.test.d.ts +21 -0
- package/build/src/types/tests/cli/recipe/package-json/sync-identity-version-contract.test.d.ts +57 -0
- package/build/src/types/tests/cli/scaffold/app/android.test.d.ts +8 -0
- package/build/src/types/tests/cli/scaffold/app/apple.test.d.ts +6 -0
- package/build/src/types/tests/cli/scaffold/app/expressjs.test.d.ts +4 -0
- package/build/src/types/tests/cli/utility/changelog-android.test.d.ts +48 -0
- package/build/src/types/tests/cli/utility/changelog-apple.test.d.ts +72 -0
- package/build/src/types/tests/cli/utility/changelog.test.d.ts +16 -12
- package/build/src/types/tests/cli/utility/configure.test.d.ts +88 -0
- package/build/src/types/tests/cli/utility/run-scripts.test.d.ts +2 -0
- package/build/src/types/tests/cli/utility/run-workspaces.test.d.ts +48 -0
- package/build/src/types/tests/lib/docker-packaging.test.d.ts +169 -27
- package/build/src/types/tests/lib/ignore-files.test.d.ts +2 -0
- package/build/src/types/tests/lib/integration.test.d.ts +60 -0
- package/build/src/types/tests/lib/nova-config.test.d.ts +17 -0
- package/build/src/types/tests/lib/scaffold-allow-scripts.test.d.ts +14 -0
- package/build/src/types/tests/lib/scaffold-version-contract.test.d.ts +59 -0
- package/build/src/types/tests/lib/scaffold.test.d.ts +14 -0
- package/build/src/types/tests/lib/type-check.test.d.ts +26 -0
- package/build/src/types/tests/lib/utility.test.d.ts +21 -0
- package/build/src/types/tests/lib/version-contract.test.d.ts +66 -0
- package/build/src/types/tests/lib/version-strategy-migration.test.d.ts +85 -0
- package/build/src/types/tests/lib/workflow-templates.test.d.ts +4 -0
- package/build/src/types/tests/presets/eslint/dx-ignore.test.d.ts +14 -0
- package/build/src/types/tests/scaffold-output-contract.test.d.ts +10 -0
- package/build/templates/generators/must-haves/agent-conventions/PROJECT_RULES.md +107 -196
- package/build/templates/generators/must-haves/agent-conventions/VISION.md +91 -22
- package/build/templates/generators/must-haves/agent-conventions/conventions/docker.md +4 -4
- package/build/templates/generators/must-haves/agent-conventions/conventions/documentation.md +4 -2
- package/build/templates/scaffold/app/android/package.json +2 -2
- package/build/templates/scaffold/app/android/scripts/run-gradle.mjs +21 -4
- package/build/templates/scaffold/app/apple/package.json +2 -2
- package/build/templates/scaffold/app/apple/project.yml +1 -1
- package/build/templates/scaffold/app/astro/package.json +2 -2
- package/build/templates/scaffold/app/discord-bot/package.json +2 -2
- package/build/templates/scaffold/app/express/package.json +2 -2
- package/build/templates/scaffold/app/nextjs/package.json +2 -2
- package/build/templates/scaffold/app/vite/package.json +2 -2
- package/build/templates/scaffold/docs/docusaurus/docusaurus.config.ts +2 -1
- package/build/templates/scaffold/docs/docusaurus/eslint.config.mts +61 -3
- package/build/templates/scaffold/docs/docusaurus/package.json +6 -4
- package/build/templates/scaffold/docs/docusaurus/src/pages/index.tsx +2 -2
- package/build/templates/scaffold/docs/docusaurus/src/tests/dotenv.test.ts +27 -0
- package/build/templates/scaffold/docs/docusaurus/src/tests/frontmatter.test.ts +1 -1
- package/build/templates/scaffold/docs/docusaurus/src/tests/link.test.ts +1 -1
- package/build/templates/scaffold/docs/docusaurus/src/tests/markdown-table.test.ts +1 -1
- package/build/templates/scaffold/docs/docusaurus/src/tests/terminology.test.ts +1 -1
- package/build/templates/scaffold/docs/docusaurus/src/tests/type-declarations.test.ts +1 -1
- package/build/templates/scaffold/docs/docusaurus/src/types/pages/index.d.ts +2 -2
- package/build/templates/scaffold/docs/docusaurus/tsconfig.app.json +33 -0
- package/build/templates/scaffold/docs/docusaurus/tsconfig.config.json +21 -0
- package/build/templates/scaffold/docs/docusaurus/tsconfig.json +11 -17
- package/build/templates/scaffold/docs/docusaurus/tsconfig.tests.json +28 -0
- package/build/templates/scaffold/docs/docusaurus/vitest.config.mts +1 -14
- package/build/templates/scaffold/docs/docusaurus/vitest.setup.ts +3 -3
- package/build/templates/scaffold/package/github-action/package.json +2 -2
- package/build/templates/scaffold/package/homebridge/bin/repl.mjs +5 -2
- package/build/templates/scaffold/package/homebridge/bin/test-api.mjs +5 -2
- package/build/templates/scaffold/package/homebridge/package.json +2 -2
- package/build/templates/scaffold/package/pfsense/package.json +2 -2
- package/build/templates/scaffold/starter/base/assets/README.md +7 -0
- package/build/templates/scaffold-options/app/android-native/app/build.gradle.kts +1 -1
- package/build/templates/scaffold-options/app/android-native/gradlew.bat +84 -84
- package/build/templates/scaffold-options/app/apple-store-connect-root/assets/app-store-connect/[__WORKSPACE_NAME__]/creative-assets/README.md +10 -0
- package/build/templates/scaffold-options/app/apple-store-connect-root/assets/app-store-connect/[__WORKSPACE_NAME__]/metadata/ios/en-US.json +8 -0
- package/build/templates/scaffold-options/app/apple-store-connect-root/assets/app-store-connect/[__WORKSPACE_NAME__]/metadata/macos/en-US.json +8 -0
- package/build/templates/scaffold-options/app/apple-store-connect-root/assets/app-store-connect/[__WORKSPACE_NAME__]/screenshots/README.md +13 -0
- package/build/templates/scaffold-options/app/google-play-console-root/assets/google-play-console/[__WORKSPACE_NAME__]/graphic-assets/README.md +12 -0
- package/build/templates/scaffold-options/app/google-play-console-root/assets/google-play-console/[__WORKSPACE_NAME__]/metadata/android/en-US.json +6 -0
- package/build/templates/scaffold-options/app/google-play-console-root/assets/google-play-console/[__WORKSPACE_NAME__]/screenshots/README.md +13 -0
- package/build/templates/scaffold-options/docker-image/common/Dockerfile +81 -0
- package/build/templates/scaffold-options/docker-image/common/compose.yml +21 -0
- package/build/templates/scaffold-options/docker-image/common/dockerignore +38 -0
- package/build/templates/scaffold-options/package/node-cli-core/bin/cli.mjs +5 -2
- package/build/templates/scaffold-options/tool/serverless/cloudflare-workers/package.json +2 -2
- package/build/templates/scaffold-options/tool/serverless/vercel-functions/package.json +2 -2
- package/package.json +3 -2
- package/build/templates/scaffold-options/docker-image/astro-node/Dockerfile +0 -27
- package/build/templates/scaffold-options/docker-image/astro-node/compose.yml +0 -12
- package/build/templates/scaffold-options/docker-image/background-service/compose.yml +0 -10
- package/build/templates/scaffold-options/docker-image/container-native/Dockerfile +0 -10
- package/build/templates/scaffold-options/docker-image/container-native/compose.yml +0 -8
- package/build/templates/scaffold-options/docker-image/http-service/compose.yml +0 -11
- package/build/templates/scaffold-options/docker-image/nextjs-standalone/Dockerfile +0 -26
- package/build/templates/scaffold-options/docker-image/nextjs-standalone/compose.yml +0 -12
- package/build/templates/scaffold-options/docker-image/node/Dockerfile +0 -23
- package/build/templates/scaffold-options/docker-image/static-site/Dockerfile +0 -18
- package/build/templates/scaffold-options/docker-image/static-site/compose.yml +0 -8
|
@@ -13,6 +13,7 @@ import { Runner as LibNovaConfig } from '../../lib/nova-config.js';
|
|
|
13
13
|
import { LIB_REGEX_LINEBREAK_CRLF_OR_LF, LIB_REGEX_PATTERN_EMAIL_SIMPLE, LIB_REGEX_PATTERN_ENV_VAR_KEY, LIB_REGEX_PATTERN_GITHUB_LABEL_COLOR, LIB_REGEX_PATTERN_SLUG_SCOPED, LIB_REGEX_PATTERN_SLUG_SIMPLE, LIB_REGEX_PATTERN_YML_EXTENSION, } from '../../lib/regex.js';
|
|
14
14
|
import { Runner as LibReleaseHistory } from '../../lib/release-history.js';
|
|
15
15
|
import { discoverPathsWithFile, isPlainObject, pathExists, resolveTemplatePath, } from '../../lib/utility.js';
|
|
16
|
+
import { Runner as LibVersionStrategyMigration } from '../../lib/version-strategy-migration.js';
|
|
16
17
|
import { libWorkflowTemplatesMetadata } from '../../lib/workflow-templates.js';
|
|
17
18
|
import { Logger } from '../../toolkit/index.js';
|
|
18
19
|
export class Runner {
|
|
@@ -40,6 +41,7 @@ export class Runner {
|
|
|
40
41
|
}
|
|
41
42
|
const novaConfig = new LibNovaConfig();
|
|
42
43
|
const workingFile = await novaConfig.load();
|
|
44
|
+
const currentStrategy = (workingFile['settings'] === undefined) ? 'semver' : workingFile['settings']['versionStrategy'] ?? 'semver';
|
|
43
45
|
try {
|
|
44
46
|
await LibReleaseHistory.validateStrategy(workingFile, currentDirectory);
|
|
45
47
|
}
|
|
@@ -63,6 +65,19 @@ export class Runner {
|
|
|
63
65
|
}).debug('Prompt flow exited without saving.');
|
|
64
66
|
return;
|
|
65
67
|
}
|
|
68
|
+
const nextStrategy = (workingFile['settings'] === undefined) ? 'semver' : workingFile['settings']['versionStrategy'] ?? 'semver';
|
|
69
|
+
let migrationPlan = undefined;
|
|
70
|
+
try {
|
|
71
|
+
migrationPlan = await LibVersionStrategyMigration.prepare(currentDirectory, workingFile, currentStrategy, nextStrategy);
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
Logger.customize({
|
|
75
|
+
name: 'Runner.run',
|
|
76
|
+
purpose: 'versionStrategyMigration',
|
|
77
|
+
}).error((error instanceof Error) ? error.message : 'Unable to prepare the version strategy migration.');
|
|
78
|
+
process.exitCode = 1;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
66
81
|
novaConfig.set(workingFile);
|
|
67
82
|
if (isDryRun === true) {
|
|
68
83
|
Logger.customize({
|
|
@@ -72,6 +87,13 @@ export class Runner {
|
|
|
72
87
|
return;
|
|
73
88
|
}
|
|
74
89
|
await novaConfig.save(isReplaceFile);
|
|
90
|
+
await LibVersionStrategyMigration.apply(migrationPlan);
|
|
91
|
+
if (migrationPlan['writes'].length > 0) {
|
|
92
|
+
Logger.customize({
|
|
93
|
+
name: 'Runner.run',
|
|
94
|
+
purpose: 'versionStrategyMigration',
|
|
95
|
+
}).info(`Migrated ${migrationPlan['writes'].length} file(s) from ${migrationPlan['currentStrategy']} to ${migrationPlan['nextStrategy']}.`);
|
|
96
|
+
}
|
|
75
97
|
return;
|
|
76
98
|
}
|
|
77
99
|
static getOptionalBooleanInitial(value) {
|
|
@@ -106,7 +128,7 @@ export class Runner {
|
|
|
106
128
|
}
|
|
107
129
|
const trimmed = value.trim();
|
|
108
130
|
if (isSupportedIgnoreFileConfigPath(trimmed) === false) {
|
|
109
|
-
return 'Use a project-relative
|
|
131
|
+
return 'Use a project-relative .gitignore or .assetsignore path, or the root path ./.dockerignore.';
|
|
110
132
|
}
|
|
111
133
|
return true;
|
|
112
134
|
}
|
|
@@ -2479,6 +2501,10 @@ export class Runner {
|
|
|
2479
2501
|
const github = config['github'] ?? {};
|
|
2480
2502
|
const existingRulesets = github['rulesets'] ?? {};
|
|
2481
2503
|
const existing = existingRulesets['defaultBranch'] ?? {};
|
|
2504
|
+
let requiredStatusChecksModeInitial = 0;
|
|
2505
|
+
if (existing['requiredStatusChecks'] !== undefined) {
|
|
2506
|
+
requiredStatusChecksModeInitial = (existing['requiredStatusChecks'].length === 0) ? 1 : 2;
|
|
2507
|
+
}
|
|
2482
2508
|
const output = await Runner.promptWithCancel([
|
|
2483
2509
|
{
|
|
2484
2510
|
type: 'select',
|
|
@@ -2619,10 +2645,24 @@ export class Runner {
|
|
|
2619
2645
|
initial: Runner.getOptionalBooleanInitial(existing['requireConversationResolution']),
|
|
2620
2646
|
},
|
|
2621
2647
|
{
|
|
2622
|
-
type: '
|
|
2623
|
-
name: '
|
|
2624
|
-
message: 'Required status checks
|
|
2625
|
-
|
|
2648
|
+
type: 'select',
|
|
2649
|
+
name: 'requiredStatusChecksMode',
|
|
2650
|
+
message: 'Required status checks',
|
|
2651
|
+
choices: [
|
|
2652
|
+
{
|
|
2653
|
+
title: 'Unset',
|
|
2654
|
+
value: 'unset',
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
title: 'No required status checks',
|
|
2658
|
+
value: 'none',
|
|
2659
|
+
},
|
|
2660
|
+
{
|
|
2661
|
+
title: 'Require specific status checks',
|
|
2662
|
+
value: 'list',
|
|
2663
|
+
},
|
|
2664
|
+
],
|
|
2665
|
+
initial: requiredStatusChecksModeInitial,
|
|
2626
2666
|
},
|
|
2627
2667
|
{
|
|
2628
2668
|
type: 'select',
|
|
@@ -2651,6 +2691,8 @@ export class Runner {
|
|
|
2651
2691
|
const outputResult = output['result'];
|
|
2652
2692
|
const allowedMergeMethods = [];
|
|
2653
2693
|
const defaultBranch = {};
|
|
2694
|
+
const requiredStatusChecksMode = (outputResult.requiredStatusChecksMode === 'none'
|
|
2695
|
+
|| outputResult.requiredStatusChecksMode === 'list') ? outputResult.requiredStatusChecksMode : 'unset';
|
|
2654
2696
|
if (outputResult.enforcement === 'active'
|
|
2655
2697
|
|| outputResult.enforcement === 'disabled'
|
|
2656
2698
|
|| outputResult.enforcement === 'evaluate') {
|
|
@@ -2687,9 +2729,25 @@ export class Runner {
|
|
|
2687
2729
|
const requiredApprovals = Number.parseInt(requiredApprovalsRaw, 10);
|
|
2688
2730
|
defaultBranch.requiredApprovals = requiredApprovals;
|
|
2689
2731
|
}
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2732
|
+
if (requiredStatusChecksMode === 'none') {
|
|
2733
|
+
defaultBranch.requiredStatusChecks = [];
|
|
2734
|
+
}
|
|
2735
|
+
else if (requiredStatusChecksMode === 'list') {
|
|
2736
|
+
const requiredStatusChecksOutput = await Runner.promptWithCancel({
|
|
2737
|
+
type: 'text',
|
|
2738
|
+
name: 'requiredStatusChecks',
|
|
2739
|
+
message: 'Required status checks (comma-separated)',
|
|
2740
|
+
initial: (existing['requiredStatusChecks'] === undefined) ? '' : existing['requiredStatusChecks'].join(', '),
|
|
2741
|
+
validate: Runner['isNonEmptyLiteralInput'],
|
|
2742
|
+
});
|
|
2743
|
+
if (requiredStatusChecksOutput['cancelled'] === true) {
|
|
2744
|
+
return 'back';
|
|
2745
|
+
}
|
|
2746
|
+
const requiredStatusChecksOutputResult = requiredStatusChecksOutput['result'];
|
|
2747
|
+
const requiredStatusChecks = requiredStatusChecksOutputResult.requiredStatusChecks.split(',').map((statusCheck) => statusCheck.trim()).filter((statusCheck) => statusCheck !== '');
|
|
2748
|
+
if (requiredStatusChecks.length > 0) {
|
|
2749
|
+
defaultBranch.requiredStatusChecks = requiredStatusChecks;
|
|
2750
|
+
}
|
|
2693
2751
|
}
|
|
2694
2752
|
if (Object.keys(defaultBranch).length > 0) {
|
|
2695
2753
|
const rulesets = { defaultBranch };
|
|
@@ -3319,6 +3377,9 @@ export class Runner {
|
|
|
3319
3377
|
return clonedTrigger;
|
|
3320
3378
|
});
|
|
3321
3379
|
}
|
|
3380
|
+
if (configWorkflow['containerPlatforms'] !== undefined) {
|
|
3381
|
+
clonedWorkflow.containerPlatforms = [...configWorkflow['containerPlatforms']];
|
|
3382
|
+
}
|
|
3322
3383
|
if (configWorkflow['build'] !== undefined) {
|
|
3323
3384
|
clonedWorkflow.build = [...configWorkflow['build']];
|
|
3324
3385
|
}
|
|
@@ -3368,6 +3429,12 @@ export class Runner {
|
|
|
3368
3429
|
return clonedTrigger;
|
|
3369
3430
|
});
|
|
3370
3431
|
}
|
|
3432
|
+
if (workflow['containerPlatforms'] !== undefined && workflow['containerPlatforms'].length > 0) {
|
|
3433
|
+
normalizedWorkflow.containerPlatforms = [...workflow['containerPlatforms']];
|
|
3434
|
+
}
|
|
3435
|
+
else {
|
|
3436
|
+
Reflect.deleteProperty(normalizedWorkflow, 'containerPlatforms');
|
|
3437
|
+
}
|
|
3371
3438
|
if (workflow['build'] !== undefined && workflow['build'].length > 0) {
|
|
3372
3439
|
normalizedWorkflow.build = [...workflow['build']];
|
|
3373
3440
|
}
|
|
@@ -3554,6 +3621,12 @@ export class Runner {
|
|
|
3554
3621
|
const existingTemplate = (workflow !== undefined && typeof workflow['template'] === 'string') ? workflow['template'] : '';
|
|
3555
3622
|
const existingSuffix = (workflow !== undefined && typeof workflow['name'] === 'string') ? workflow['name'] : '';
|
|
3556
3623
|
const existingTimeoutMinutes = (workflow !== undefined && typeof workflow['timeoutMinutes'] === 'number') ? workflow['timeoutMinutes'] : undefined;
|
|
3624
|
+
const existingContainerPlatforms = (workflow !== undefined
|
|
3625
|
+
&& Array.isArray(workflow['containerPlatforms']) === true
|
|
3626
|
+
&& workflow['containerPlatforms'].length > 0) ? [...workflow['containerPlatforms']] : [
|
|
3627
|
+
'linux/amd64',
|
|
3628
|
+
'linux/arm64',
|
|
3629
|
+
];
|
|
3557
3630
|
const existingTriggers = (workflow !== undefined && Array.isArray(workflow['triggers']) === true) ? workflow['triggers'] : [];
|
|
3558
3631
|
const existingTriggerNames = existingTriggers.map((trigger) => (typeof trigger === 'string') ? trigger : trigger['name']);
|
|
3559
3632
|
const existingTargets = (workflow !== undefined && Array.isArray(workflow['deploy']) === true) ? workflow['deploy'] : [];
|
|
@@ -3782,6 +3855,7 @@ export class Runner {
|
|
|
3782
3855
|
}
|
|
3783
3856
|
const matchedMetadata = libWorkflowTemplatesMetadata.find((entry) => entry['name'] === selectedTemplate);
|
|
3784
3857
|
const workspaceKeys = Object.keys(config['workspaces'] ?? {});
|
|
3858
|
+
const buildWorkspaceKeys = workspaceKeys.filter((workspaceKey) => workspaceKey !== './');
|
|
3785
3859
|
const selectedTargets = existingTargets.map((target) => ({
|
|
3786
3860
|
...target,
|
|
3787
3861
|
...((target['after'] !== undefined) ? { after: [...target['after']] } : {}),
|
|
@@ -3792,6 +3866,12 @@ export class Runner {
|
|
|
3792
3866
|
|| selectedTargets.length > 0) {
|
|
3793
3867
|
const availableTargetTypes = (matchedMetadata !== undefined) ? Object.keys(matchedMetadata['targets'] ?? {}) : [];
|
|
3794
3868
|
const existingTargetTypes = selectedTargets.map((target) => target['to']);
|
|
3869
|
+
const hasContainerTargetInAnotherWorkflow = workflows.some((candidate) => {
|
|
3870
|
+
if (candidate === workflow || Array.isArray(candidate['deploy']) === false) {
|
|
3871
|
+
return false;
|
|
3872
|
+
}
|
|
3873
|
+
return candidate['deploy'].some((target) => target['to'] === 'docker-hub' || target['to'] === 'ghcr');
|
|
3874
|
+
});
|
|
3795
3875
|
for (const existingTargetType of existingTargetTypes) {
|
|
3796
3876
|
if (availableTargetTypes.includes(existingTargetType) === false) {
|
|
3797
3877
|
availableTargetTypes.push(existingTargetType);
|
|
@@ -3806,13 +3886,16 @@ export class Runner {
|
|
|
3806
3886
|
}
|
|
3807
3887
|
const currentTargetType = currentTarget['to'];
|
|
3808
3888
|
const currentTargetWorkingDir = currentTarget['path'];
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3889
|
+
const currentTargetIsContainer = currentTargetType === 'docker-hub' || currentTargetType === 'ghcr';
|
|
3890
|
+
if (hasContainerTargetInAnotherWorkflow === false || currentTargetIsContainer === false) {
|
|
3891
|
+
targetMenuChoices.push({
|
|
3892
|
+
title: `${chalk.yellow.bold('[EDIT]')} ${currentTargetType} → ${currentTargetWorkingDir}`,
|
|
3893
|
+
value: {
|
|
3894
|
+
kind: 'edit',
|
|
3895
|
+
index: i,
|
|
3896
|
+
},
|
|
3897
|
+
});
|
|
3898
|
+
}
|
|
3816
3899
|
targetMenuChoices.push({
|
|
3817
3900
|
title: `${chalk.red.bold('[REMOVE]')} ${currentTargetType} → ${currentTargetWorkingDir}`,
|
|
3818
3901
|
value: {
|
|
@@ -3847,6 +3930,22 @@ export class Runner {
|
|
|
3847
3930
|
const targetMenuOutputResultValue = targetMenuOutput['result'];
|
|
3848
3931
|
const targetMenuAction = targetMenuOutputResultValue.targetAction;
|
|
3849
3932
|
if (targetMenuAction['kind'] === 'done') {
|
|
3933
|
+
const hasContainerTargetCollision = hasContainerTargetInAnotherWorkflow === true && selectedTargets.some((target) => target['to'] === 'docker-hub' || target['to'] === 'ghcr');
|
|
3934
|
+
const hasDuplicateContainerTarget = selectedTargets.some((target, targetIndex) => {
|
|
3935
|
+
if (target['to'] !== 'docker-hub' && target['to'] !== 'ghcr') {
|
|
3936
|
+
return false;
|
|
3937
|
+
}
|
|
3938
|
+
return selectedTargets.findIndex((candidate) => candidate['to'] === target['to']) !== targetIndex;
|
|
3939
|
+
});
|
|
3940
|
+
if (hasContainerTargetCollision === true || hasDuplicateContainerTarget === true) {
|
|
3941
|
+
Logger.customize({
|
|
3942
|
+
name: 'Runner.promptWorkflowsForm',
|
|
3943
|
+
purpose: 'validation',
|
|
3944
|
+
padTop: 1,
|
|
3945
|
+
padBottom: 1,
|
|
3946
|
+
}).error((hasContainerTargetCollision === true) ? 'Another workflow already owns the repository container image. Remove this workflow\'s Docker Hub and GHCR targets before continuing.' : 'Each container registry can appear only once. Remove or change the duplicate Docker Hub or GHCR target before continuing.');
|
|
3947
|
+
continue;
|
|
3948
|
+
}
|
|
3850
3949
|
break;
|
|
3851
3950
|
}
|
|
3852
3951
|
if (targetMenuAction['kind'] === 'remove') {
|
|
@@ -3859,8 +3958,18 @@ export class Runner {
|
|
|
3859
3958
|
if (targetMenuAction['kind'] === 'add' || targetMenuAction['kind'] === 'edit') {
|
|
3860
3959
|
const targetEditIndex = (targetMenuAction['kind'] === 'edit') ? targetMenuAction['index'] : -1;
|
|
3861
3960
|
const targetToEdit = (targetEditIndex >= 0) ? selectedTargets[targetEditIndex] : undefined;
|
|
3862
|
-
const
|
|
3863
|
-
|
|
3961
|
+
const selectableTargetTypes = availableTargetTypes.filter((availableTargetType) => {
|
|
3962
|
+
const availableTargetIsContainer = availableTargetType === 'docker-hub' || availableTargetType === 'ghcr';
|
|
3963
|
+
if (availableTargetIsContainer === false) {
|
|
3964
|
+
return true;
|
|
3965
|
+
}
|
|
3966
|
+
if (hasContainerTargetInAnotherWorkflow === true) {
|
|
3967
|
+
return false;
|
|
3968
|
+
}
|
|
3969
|
+
return selectedTargets.some((candidate, candidateIndex) => candidateIndex !== targetEditIndex && candidate['to'] === availableTargetType) === false;
|
|
3970
|
+
});
|
|
3971
|
+
const targetTypeInitial = (targetToEdit !== undefined) ? selectableTargetTypes.indexOf(targetToEdit['to']) : 0;
|
|
3972
|
+
const targetTypeChoices = selectableTargetTypes.map((availableTargetType) => ({
|
|
3864
3973
|
title: availableTargetType,
|
|
3865
3974
|
value: availableTargetType,
|
|
3866
3975
|
}));
|
|
@@ -3876,29 +3985,33 @@ export class Runner {
|
|
|
3876
3985
|
}
|
|
3877
3986
|
const targetTypeOutputResultValue = targetTypeOutput['result'];
|
|
3878
3987
|
const selectedTargetType = targetTypeOutputResultValue.targetType;
|
|
3879
|
-
const
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3988
|
+
const isContainerTarget = selectedTargetType === 'docker-hub' || selectedTargetType === 'ghcr';
|
|
3989
|
+
let selectedTargetWorkingDir = './';
|
|
3990
|
+
if (isContainerTarget === false) {
|
|
3991
|
+
const targetWorkingDirInitial = (targetToEdit !== undefined) ? workspaceKeys.indexOf(targetToEdit['path']) : 0;
|
|
3992
|
+
const targetWorkingDirChoices = workspaceKeys.map((workspaceKey) => ({
|
|
3993
|
+
title: workspaceKey,
|
|
3994
|
+
value: workspaceKey,
|
|
3995
|
+
}));
|
|
3996
|
+
if (targetToEdit !== undefined && targetWorkingDirChoices.some((choice) => choice['value'] === targetToEdit['path']) === false) {
|
|
3997
|
+
targetWorkingDirChoices.unshift({
|
|
3998
|
+
title: targetToEdit['path'],
|
|
3999
|
+
value: targetToEdit['path'],
|
|
4000
|
+
});
|
|
4001
|
+
}
|
|
4002
|
+
const targetWorkingDirOutput = await Runner.promptWithCancel({
|
|
4003
|
+
type: 'select',
|
|
4004
|
+
name: 'targetWorkingDir',
|
|
4005
|
+
message: 'Select a working directory.',
|
|
4006
|
+
choices: targetWorkingDirChoices,
|
|
4007
|
+
initial: (targetWorkingDirInitial >= 0) ? targetWorkingDirInitial : 0,
|
|
3888
4008
|
});
|
|
4009
|
+
if (targetWorkingDirOutput['cancelled'] === true) {
|
|
4010
|
+
continue;
|
|
4011
|
+
}
|
|
4012
|
+
const targetWorkingDirOutputResultValue = targetWorkingDirOutput['result'];
|
|
4013
|
+
selectedTargetWorkingDir = targetWorkingDirOutputResultValue.targetWorkingDir;
|
|
3889
4014
|
}
|
|
3890
|
-
const targetWorkingDirOutput = await Runner.promptWithCancel({
|
|
3891
|
-
type: 'select',
|
|
3892
|
-
name: 'targetWorkingDir',
|
|
3893
|
-
message: 'Select a working directory.',
|
|
3894
|
-
choices: targetWorkingDirChoices,
|
|
3895
|
-
initial: (targetWorkingDirInitial >= 0) ? targetWorkingDirInitial : 0,
|
|
3896
|
-
});
|
|
3897
|
-
if (targetWorkingDirOutput['cancelled'] === true) {
|
|
3898
|
-
continue;
|
|
3899
|
-
}
|
|
3900
|
-
const targetWorkingDirOutputResultValue = targetWorkingDirOutput['result'];
|
|
3901
|
-
const selectedTargetWorkingDir = targetWorkingDirOutputResultValue.targetWorkingDir;
|
|
3902
4015
|
const targetIsDuplicate = selectedTargets.some((selectedTarget, selectedTargetIndex) => {
|
|
3903
4016
|
if (selectedTargetIndex === targetEditIndex) {
|
|
3904
4017
|
return false;
|
|
@@ -3951,6 +4064,35 @@ export class Runner {
|
|
|
3951
4064
|
continue;
|
|
3952
4065
|
}
|
|
3953
4066
|
const targetSettings = Runner.parseStringRecordInput(targetSettingsOutput['result'].targetSettings);
|
|
4067
|
+
const selectedTargetMetadata = (matchedMetadata === undefined || matchedMetadata['targets'] === undefined) ? undefined : matchedMetadata['targets'][selectedTargetType];
|
|
4068
|
+
const targetRequiredLiterals = (selectedTargetMetadata === undefined || selectedTargetMetadata['requiredLiterals'] === undefined) ? {} : selectedTargetMetadata['requiredLiterals'];
|
|
4069
|
+
const targetRequiredLiteralEntries = Object.entries(targetRequiredLiterals);
|
|
4070
|
+
let targetRequiredLiteralPromptCancelled = false;
|
|
4071
|
+
for (const targetRequiredLiteralEntry of targetRequiredLiteralEntries) {
|
|
4072
|
+
const targetRequiredLiteralKey = targetRequiredLiteralEntry[0];
|
|
4073
|
+
const targetRequiredLiteralMetadata = targetRequiredLiteralEntry[1];
|
|
4074
|
+
const targetRequiredLiteralInitial = (typeof targetSettings[targetRequiredLiteralKey] === 'string') ? targetSettings[targetRequiredLiteralKey] : '';
|
|
4075
|
+
let targetRequiredLiteralPromptMessage = `Target literal: ${targetRequiredLiteralKey} (${targetRequiredLiteralMetadata['description']})`;
|
|
4076
|
+
if (targetRequiredLiteralMetadata['example'] !== undefined) {
|
|
4077
|
+
targetRequiredLiteralPromptMessage = `Target literal: ${targetRequiredLiteralKey} (${targetRequiredLiteralMetadata['description']}, e.g. ${targetRequiredLiteralMetadata['example']})`;
|
|
4078
|
+
}
|
|
4079
|
+
const targetRequiredLiteralOutput = await Runner.promptWithCancel({
|
|
4080
|
+
type: 'text',
|
|
4081
|
+
name: 'targetRequiredLiteral',
|
|
4082
|
+
message: targetRequiredLiteralPromptMessage,
|
|
4083
|
+
initial: targetRequiredLiteralInitial,
|
|
4084
|
+
validate: Runner['isNonEmptyLiteralInput'],
|
|
4085
|
+
});
|
|
4086
|
+
if (targetRequiredLiteralOutput['cancelled'] === true) {
|
|
4087
|
+
targetRequiredLiteralPromptCancelled = true;
|
|
4088
|
+
break;
|
|
4089
|
+
}
|
|
4090
|
+
const targetRequiredLiteralValue = targetRequiredLiteralOutput['result'].targetRequiredLiteral.trim().replaceAll('\\n', '\n');
|
|
4091
|
+
Reflect.set(targetSettings, targetRequiredLiteralKey, targetRequiredLiteralValue);
|
|
4092
|
+
}
|
|
4093
|
+
if (targetRequiredLiteralPromptCancelled === true) {
|
|
4094
|
+
continue;
|
|
4095
|
+
}
|
|
3954
4096
|
const newTarget = {
|
|
3955
4097
|
to: selectedTargetType,
|
|
3956
4098
|
path: selectedTargetWorkingDir,
|
|
@@ -3971,12 +4113,59 @@ export class Runner {
|
|
|
3971
4113
|
}
|
|
3972
4114
|
}
|
|
3973
4115
|
}
|
|
4116
|
+
const hasContainerTarget = selectedTargets.some((target) => target['to'] === 'docker-hub' || target['to'] === 'ghcr');
|
|
4117
|
+
let selectedContainerPlatforms = [];
|
|
4118
|
+
if (hasContainerTarget === true) {
|
|
4119
|
+
const containerPlatformChoices = [
|
|
4120
|
+
{
|
|
4121
|
+
title: 'Linux AMD64',
|
|
4122
|
+
value: 'linux/amd64',
|
|
4123
|
+
selected: existingContainerPlatforms.includes('linux/amd64'),
|
|
4124
|
+
},
|
|
4125
|
+
{
|
|
4126
|
+
title: 'Linux ARM64',
|
|
4127
|
+
value: 'linux/arm64',
|
|
4128
|
+
selected: existingContainerPlatforms.includes('linux/arm64'),
|
|
4129
|
+
},
|
|
4130
|
+
];
|
|
4131
|
+
const containerPlatformsOutput = await Runner.promptWithCancel({
|
|
4132
|
+
type: 'multiselect',
|
|
4133
|
+
name: 'containerPlatforms',
|
|
4134
|
+
message: 'Select platforms for the repository container image.',
|
|
4135
|
+
choices: containerPlatformChoices,
|
|
4136
|
+
});
|
|
4137
|
+
if (containerPlatformsOutput['cancelled'] === true) {
|
|
4138
|
+
return {
|
|
4139
|
+
action: 'back',
|
|
4140
|
+
};
|
|
4141
|
+
}
|
|
4142
|
+
const containerPlatformsOutputResultValue = containerPlatformsOutput['result'];
|
|
4143
|
+
selectedContainerPlatforms = (Array.isArray(containerPlatformsOutputResultValue.containerPlatforms) === true) ? containerPlatformsOutputResultValue.containerPlatforms : [];
|
|
4144
|
+
if (selectedContainerPlatforms.length === 0) {
|
|
4145
|
+
Logger.customize({
|
|
4146
|
+
name: 'Runner.promptWorkflowsForm',
|
|
4147
|
+
purpose: 'validation',
|
|
4148
|
+
padTop: 1,
|
|
4149
|
+
padBottom: 1,
|
|
4150
|
+
}).error('Select at least one container platform.');
|
|
4151
|
+
return {
|
|
4152
|
+
action: 'back',
|
|
4153
|
+
};
|
|
4154
|
+
}
|
|
4155
|
+
}
|
|
3974
4156
|
let selectedScopes = [...existingScopes];
|
|
3975
4157
|
if (matchedMetadata !== undefined && matchedMetadata['supportsScopes'] === true) {
|
|
3976
|
-
const lockedPaths = new Set(
|
|
3977
|
-
const scopeCandidates = [...
|
|
4158
|
+
const lockedPaths = new Set();
|
|
4159
|
+
const scopeCandidates = [...buildWorkspaceKeys];
|
|
4160
|
+
for (const selectedTarget of selectedTargets) {
|
|
4161
|
+
if (selectedTarget['path'] !== './'
|
|
4162
|
+
&& selectedTarget['to'] !== 'docker-hub'
|
|
4163
|
+
&& selectedTarget['to'] !== 'ghcr') {
|
|
4164
|
+
lockedPaths.add(selectedTarget['path']);
|
|
4165
|
+
}
|
|
4166
|
+
}
|
|
3978
4167
|
for (const existingScope of existingScopes) {
|
|
3979
|
-
if (scopeCandidates.includes(existingScope) === false) {
|
|
4168
|
+
if (existingScope !== './' && scopeCandidates.includes(existingScope) === false) {
|
|
3980
4169
|
scopeCandidates.push(existingScope);
|
|
3981
4170
|
}
|
|
3982
4171
|
}
|
|
@@ -4123,6 +4312,9 @@ export class Runner {
|
|
|
4123
4312
|
if (selectedTimeoutMinutes !== undefined) {
|
|
4124
4313
|
Reflect.set(resolvedWorkflow, 'timeoutMinutes', selectedTimeoutMinutes);
|
|
4125
4314
|
}
|
|
4315
|
+
if (selectedContainerPlatforms.length > 0) {
|
|
4316
|
+
Reflect.set(resolvedWorkflow, 'containerPlatforms', selectedContainerPlatforms);
|
|
4317
|
+
}
|
|
4126
4318
|
if (selectedScopes.length > 0) {
|
|
4127
4319
|
Reflect.set(resolvedWorkflow, 'build', selectedScopes);
|
|
4128
4320
|
}
|
|
@@ -4376,7 +4568,7 @@ export class Runner {
|
|
|
4376
4568
|
}
|
|
4377
4569
|
choices.push({
|
|
4378
4570
|
title: 'Add an ignore file',
|
|
4379
|
-
description: 'Add a project-relative .gitignore
|
|
4571
|
+
description: 'Add a project-relative .gitignore or .assetsignore path, or the root .dockerignore.',
|
|
4380
4572
|
value: 'add',
|
|
4381
4573
|
});
|
|
4382
4574
|
choices.push({
|
|
@@ -5248,6 +5440,17 @@ export class Runner {
|
|
|
5248
5440
|
}
|
|
5249
5441
|
const cacheScriptsOutputResult = cacheScriptsOutput['result'];
|
|
5250
5442
|
const cacheScripts = [...new Set(cacheScriptsOutputResult.cacheScripts.split(',').map((script) => script.trim()).filter((script) => script.length > 0))].sort();
|
|
5443
|
+
const rootIncludedInitial = runWorkspacesSettings === undefined || runWorkspacesSettings['root'] !== 'skip';
|
|
5444
|
+
const rootIncludedOutput = await Runner.promptWithCancel({
|
|
5445
|
+
type: 'confirm',
|
|
5446
|
+
name: 'rootIncluded',
|
|
5447
|
+
message: 'Run the root project\'s own steps as part of the workspace tree?',
|
|
5448
|
+
initial: rootIncludedInitial,
|
|
5449
|
+
});
|
|
5450
|
+
if (rootIncludedOutput['cancelled'] === true) {
|
|
5451
|
+
return 'back';
|
|
5452
|
+
}
|
|
5453
|
+
const rootIncludedOutputResult = rootIncludedOutput['result'];
|
|
5251
5454
|
const runWorkspaces = {
|
|
5252
5455
|
...settings['runWorkspaces'],
|
|
5253
5456
|
cache: {
|
|
@@ -5263,6 +5466,12 @@ export class Runner {
|
|
|
5263
5466
|
else {
|
|
5264
5467
|
Reflect.deleteProperty(runWorkspaces, 'concurrency');
|
|
5265
5468
|
}
|
|
5469
|
+
if (rootIncludedOutputResult.rootIncluded === true) {
|
|
5470
|
+
Reflect.deleteProperty(runWorkspaces, 'root');
|
|
5471
|
+
}
|
|
5472
|
+
else {
|
|
5473
|
+
runWorkspaces.root = 'skip';
|
|
5474
|
+
}
|
|
5266
5475
|
const updatedSettings = {
|
|
5267
5476
|
...settings,
|
|
5268
5477
|
lockStepVersioning: lockStepVersioningOutputResult.lockStepVersioning,
|