@qpqjs/cli 0.0.0-stage → 0.2.1
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 +92 -2
- package/docker/cdk-deployer/Dockerfile +13 -0
- package/docker/dev-server/Dockerfile +47 -0
- package/lib/commonjs/bin/qpq.d.ts +2 -0
- package/lib/commonjs/bin/qpq.js +6 -0
- package/lib/commonjs/bin/qpq.js.map +1 -0
- package/lib/commonjs/bin/qpqCdkApp.d.ts +1 -0
- package/lib/commonjs/bin/qpqCdkApp.js +8 -0
- package/lib/commonjs/bin/qpqCdkApp.js.map +1 -0
- package/lib/commonjs/cli/commandMenu.d.ts +2 -0
- package/lib/commonjs/cli/commandMenu.js +81 -0
- package/lib/commonjs/cli/commandMenu.js.map +1 -0
- package/lib/commonjs/cli/commandRegistry.d.ts +10 -0
- package/lib/commonjs/cli/commandRegistry.js +177 -0
- package/lib/commonjs/cli/commandRegistry.js.map +1 -0
- package/lib/commonjs/cli/index.d.ts +1 -0
- package/lib/commonjs/cli/index.js +18 -0
- package/lib/commonjs/cli/index.js.map +1 -0
- package/lib/commonjs/cli/runCli.d.ts +1 -0
- package/lib/commonjs/cli/runCli.js +86 -0
- package/lib/commonjs/cli/runCli.js.map +1 -0
- package/lib/commonjs/commands/checkCircular.d.ts +1 -0
- package/lib/commonjs/commands/checkCircular.js +70 -0
- package/lib/commonjs/commands/checkCircular.js.map +1 -0
- package/lib/commonjs/commands/clearResources.d.ts +1 -0
- package/lib/commonjs/commands/clearResources.js +36 -0
- package/lib/commonjs/commands/clearResources.js.map +1 -0
- package/lib/commonjs/commands/go.d.ts +1 -0
- package/lib/commonjs/commands/go.js +30 -0
- package/lib/commonjs/commands/go.js.map +1 -0
- package/lib/commonjs/commands/goDev.d.ts +1 -0
- package/lib/commonjs/commands/goDev.js +46 -0
- package/lib/commonjs/commands/goDev.js.map +1 -0
- package/lib/commonjs/commands/goDevApi.d.ts +1 -0
- package/lib/commonjs/commands/goDevApi.js +158 -0
- package/lib/commonjs/commands/goDevApi.js.map +1 -0
- package/lib/commonjs/commands/goDevWeb.d.ts +4 -0
- package/lib/commonjs/commands/goDevWeb.js +144 -0
- package/lib/commonjs/commands/goDevWeb.js.map +1 -0
- package/lib/commonjs/commands/goDocker.d.ts +1 -0
- package/lib/commonjs/commands/goDocker.js +43 -0
- package/lib/commonjs/commands/goDocker.js.map +1 -0
- package/lib/commonjs/commands/hooks.d.ts +1 -0
- package/lib/commonjs/commands/hooks.js +39 -0
- package/lib/commonjs/commands/hooks.js.map +1 -0
- package/lib/commonjs/commands/migrate.d.ts +1 -0
- package/lib/commonjs/commands/migrate.js +70 -0
- package/lib/commonjs/commands/migrate.js.map +1 -0
- package/lib/commonjs/commands/prep.d.ts +1 -0
- package/lib/commonjs/commands/prep.js +28 -0
- package/lib/commonjs/commands/prep.js.map +1 -0
- package/lib/commonjs/commands/publish.d.ts +4 -0
- package/lib/commonjs/commands/publish.js +54 -0
- package/lib/commonjs/commands/publish.js.map +1 -0
- package/lib/commonjs/commands/scriptBuild.d.ts +1 -0
- package/lib/commonjs/commands/scriptBuild.js +46 -0
- package/lib/commonjs/commands/scriptBuild.js.map +1 -0
- package/lib/commonjs/commands/scriptBuilderLayer.d.ts +1 -0
- package/lib/commonjs/commands/scriptBuilderLayer.js +48 -0
- package/lib/commonjs/commands/scriptBuilderLayer.js.map +1 -0
- package/lib/commonjs/commands/scriptNew.d.ts +1 -0
- package/lib/commonjs/commands/scriptNew.js +35 -0
- package/lib/commonjs/commands/scriptNew.js.map +1 -0
- package/lib/commonjs/commands/setup.d.ts +1 -0
- package/lib/commonjs/commands/setup.js +102 -0
- package/lib/commonjs/commands/setup.js.map +1 -0
- package/lib/commonjs/commands/synth.d.ts +1 -0
- package/lib/commonjs/commands/synth.js +89 -0
- package/lib/commonjs/commands/synth.js.map +1 -0
- package/lib/commonjs/commands/teardown.d.ts +1 -0
- package/lib/commonjs/commands/teardown.js +33 -0
- package/lib/commonjs/commands/teardown.js.map +1 -0
- package/lib/commonjs/index.d.ts +1 -0
- package/lib/commonjs/index.js +18 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lib/args.d.ts +3 -0
- package/lib/commonjs/lib/args.js +31 -0
- package/lib/commonjs/lib/args.js.map +1 -0
- package/lib/commonjs/lib/circularImports.d.ts +3 -0
- package/lib/commonjs/lib/circularImports.js +79 -0
- package/lib/commonjs/lib/circularImports.js.map +1 -0
- package/lib/commonjs/lib/clearResourcesPlan.d.ts +15 -0
- package/lib/commonjs/lib/clearResourcesPlan.js +79 -0
- package/lib/commonjs/lib/clearResourcesPlan.js.map +1 -0
- package/lib/commonjs/lib/deployPrompts.d.ts +26 -0
- package/lib/commonjs/lib/deployPrompts.js +118 -0
- package/lib/commonjs/lib/deployPrompts.js.map +1 -0
- package/lib/commonjs/lib/devServerEntry.d.ts +22 -0
- package/lib/commonjs/lib/devServerEntry.js +135 -0
- package/lib/commonjs/lib/devServerEntry.js.map +1 -0
- package/lib/commonjs/lib/devServerPorts.d.ts +13 -0
- package/lib/commonjs/lib/devServerPorts.js +36 -0
- package/lib/commonjs/lib/devServerPorts.js.map +1 -0
- package/lib/commonjs/lib/discovery.d.ts +10 -0
- package/lib/commonjs/lib/discovery.js +56 -0
- package/lib/commonjs/lib/discovery.js.map +1 -0
- package/lib/commonjs/lib/getDefaultHookJobs.d.ts +2 -0
- package/lib/commonjs/lib/getDefaultHookJobs.js +11 -0
- package/lib/commonjs/lib/getDefaultHookJobs.js.map +1 -0
- package/lib/commonjs/lib/getDeployTargetLabel.d.ts +2 -0
- package/lib/commonjs/lib/getDeployTargetLabel.js +12 -0
- package/lib/commonjs/lib/getDeployTargetLabel.js.map +1 -0
- package/lib/commonjs/lib/goDockerMode.d.ts +6 -0
- package/lib/commonjs/lib/goDockerMode.js +23 -0
- package/lib/commonjs/lib/goDockerMode.js.map +1 -0
- package/lib/commonjs/lib/hooks.d.ts +9 -0
- package/lib/commonjs/lib/hooks.js +178 -0
- package/lib/commonjs/lib/hooks.js.map +1 -0
- package/lib/commonjs/lib/keepOtherDevServersFlag.d.ts +1 -0
- package/lib/commonjs/lib/keepOtherDevServersFlag.js +11 -0
- package/lib/commonjs/lib/keepOtherDevServersFlag.js.map +1 -0
- package/lib/commonjs/lib/killChildWithEscalation.d.ts +10 -0
- package/lib/commonjs/lib/killChildWithEscalation.js +33 -0
- package/lib/commonjs/lib/killChildWithEscalation.js.map +1 -0
- package/lib/commonjs/lib/killStaleListeners.d.ts +17 -0
- package/lib/commonjs/lib/killStaleListeners.js +220 -0
- package/lib/commonjs/lib/killStaleListeners.js.map +1 -0
- package/lib/commonjs/lib/packageRoot.d.ts +1 -0
- package/lib/commonjs/lib/packageRoot.js +21 -0
- package/lib/commonjs/lib/packageRoot.js.map +1 -0
- package/lib/commonjs/lib/prompts.d.ts +15 -0
- package/lib/commonjs/lib/prompts.js +78 -0
- package/lib/commonjs/lib/prompts.js.map +1 -0
- package/lib/commonjs/lib/qpqConfigs.d.ts +4 -0
- package/lib/commonjs/lib/qpqConfigs.js +27 -0
- package/lib/commonjs/lib/qpqConfigs.js.map +1 -0
- package/lib/commonjs/lib/resolveAppSelection.d.ts +6 -0
- package/lib/commonjs/lib/resolveAppSelection.js +58 -0
- package/lib/commonjs/lib/resolveAppSelection.js.map +1 -0
- package/lib/commonjs/lib/resolveDeployment.d.ts +14 -0
- package/lib/commonjs/lib/resolveDeployment.js +58 -0
- package/lib/commonjs/lib/resolveDeployment.js.map +1 -0
- package/lib/commonjs/lib/runCommand.d.ts +14 -0
- package/lib/commonjs/lib/runCommand.js +103 -0
- package/lib/commonjs/lib/runCommand.js.map +1 -0
- package/lib/commonjs/lib/runTasks.d.ts +15 -0
- package/lib/commonjs/lib/runTasks.js +123 -0
- package/lib/commonjs/lib/runTasks.js.map +1 -0
- package/lib/commonjs/lib/setupStep.d.ts +16 -0
- package/lib/commonjs/lib/setupStep.js +3 -0
- package/lib/commonjs/lib/setupStep.js.map +1 -0
- package/lib/commonjs/lib/timing.d.ts +2 -0
- package/lib/commonjs/lib/timing.js +11 -0
- package/lib/commonjs/lib/timing.js.map +1 -0
- package/lib/commonjs/lib/typeWatcher.d.ts +2 -0
- package/lib/commonjs/lib/typeWatcher.js +59 -0
- package/lib/commonjs/lib/typeWatcher.js.map +1 -0
- package/lib/commonjs/lib/userScriptBuilderLayer.d.ts +23 -0
- package/lib/commonjs/lib/userScriptBuilderLayer.js +74 -0
- package/lib/commonjs/lib/userScriptBuilderLayer.js.map +1 -0
- package/lib/commonjs/lib/userScriptTemplate.d.ts +6 -0
- package/lib/commonjs/lib/userScriptTemplate.js +47 -0
- package/lib/commonjs/lib/userScriptTemplate.js.map +1 -0
- package/lib/commonjs/lib/views.d.ts +2 -0
- package/lib/commonjs/lib/views.js +31 -0
- package/lib/commonjs/lib/views.js.map +1 -0
- package/lib/commonjs/lib/webAddressingEnv.d.ts +7 -0
- package/lib/commonjs/lib/webAddressingEnv.js +16 -0
- package/lib/commonjs/lib/webAddressingEnv.js.map +1 -0
- package/lib/commonjs/platforms/aws/awsCredentials.d.ts +1 -0
- package/lib/commonjs/platforms/aws/awsCredentials.js +28 -0
- package/lib/commonjs/platforms/aws/awsCredentials.js.map +1 -0
- package/lib/commonjs/platforms/aws/cdkApp.d.ts +3 -0
- package/lib/commonjs/platforms/aws/cdkApp.js +31 -0
- package/lib/commonjs/platforms/aws/cdkApp.js.map +1 -0
- package/lib/commonjs/platforms/aws/clearResources.d.ts +2 -0
- package/lib/commonjs/platforms/aws/clearResources.js +167 -0
- package/lib/commonjs/platforms/aws/clearResources.js.map +1 -0
- package/lib/commonjs/platforms/aws/go.d.ts +2 -0
- package/lib/commonjs/platforms/aws/go.js +131 -0
- package/lib/commonjs/platforms/aws/go.js.map +1 -0
- package/lib/commonjs/platforms/aws/goDocker.d.ts +3 -0
- package/lib/commonjs/platforms/aws/goDocker.js +457 -0
- package/lib/commonjs/platforms/aws/goDocker.js.map +1 -0
- package/lib/commonjs/platforms/aws/goDockerManifest.d.ts +44 -0
- package/lib/commonjs/platforms/aws/goDockerManifest.js +38 -0
- package/lib/commonjs/platforms/aws/goDockerManifest.js.map +1 -0
- package/lib/commonjs/platforms/aws/index.d.ts +2 -0
- package/lib/commonjs/platforms/aws/index.js +23 -0
- package/lib/commonjs/platforms/aws/index.js.map +1 -0
- package/lib/commonjs/platforms/aws/prepareDeployment.d.ts +3 -0
- package/lib/commonjs/platforms/aws/prepareDeployment.js +10 -0
- package/lib/commonjs/platforms/aws/prepareDeployment.js.map +1 -0
- package/lib/commonjs/platforms/aws/publish.d.ts +4 -0
- package/lib/commonjs/platforms/aws/publish.js +66 -0
- package/lib/commonjs/platforms/aws/publish.js.map +1 -0
- package/lib/commonjs/platforms/aws/remote.d.ts +11 -0
- package/lib/commonjs/platforms/aws/remote.js +105 -0
- package/lib/commonjs/platforms/aws/remote.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/awsSetupContext.d.ts +12 -0
- package/lib/commonjs/platforms/aws/setup/awsSetupContext.js +20 -0
- package/lib/commonjs/platforms/aws/setup/awsSetupContext.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/awsSetupSteps.d.ts +8 -0
- package/lib/commonjs/platforms/aws/setup/awsSetupSteps.js +44 -0
- package/lib/commonjs/platforms/aws/setup/awsSetupSteps.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/buildBucketNamesStep.d.ts +4 -0
- package/lib/commonjs/platforms/aws/setup/buildBucketNamesStep.js +77 -0
- package/lib/commonjs/platforms/aws/setup/buildBucketNamesStep.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/buildCdkBootstrapSteps.d.ts +5 -0
- package/lib/commonjs/platforms/aws/setup/buildCdkBootstrapSteps.js +38 -0
- package/lib/commonjs/platforms/aws/setup/buildCdkBootstrapSteps.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/buildGithubDeployRoleStep.d.ts +4 -0
- package/lib/commonjs/platforms/aws/setup/buildGithubDeployRoleStep.js +55 -0
- package/lib/commonjs/platforms/aws/setup/buildGithubDeployRoleStep.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/buildGithubOidcProviderStep.d.ts +4 -0
- package/lib/commonjs/platforms/aws/setup/buildGithubOidcProviderStep.js +54 -0
- package/lib/commonjs/platforms/aws/setup/buildGithubOidcProviderStep.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/buildHostedZonesStep.d.ts +4 -0
- package/lib/commonjs/platforms/aws/setup/buildHostedZonesStep.js +63 -0
- package/lib/commonjs/platforms/aws/setup/buildHostedZonesStep.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/buildIamCapabilityStep.d.ts +4 -0
- package/lib/commonjs/platforms/aws/setup/buildIamCapabilityStep.js +48 -0
- package/lib/commonjs/platforms/aws/setup/buildIamCapabilityStep.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/buildIdentityStep.d.ts +4 -0
- package/lib/commonjs/platforms/aws/setup/buildIdentityStep.js +39 -0
- package/lib/commonjs/platforms/aws/setup/buildIdentityStep.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/buildStackSteps.d.ts +5 -0
- package/lib/commonjs/platforms/aws/setup/buildStackSteps.js +32 -0
- package/lib/commonjs/platforms/aws/setup/buildStackSteps.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/describeStackStatus.d.ts +4 -0
- package/lib/commonjs/platforms/aws/setup/describeStackStatus.js +32 -0
- package/lib/commonjs/platforms/aws/setup/describeStackStatus.js.map +1 -0
- package/lib/commonjs/platforms/aws/setup/index.d.ts +1 -0
- package/lib/commonjs/platforms/aws/setup/index.js +18 -0
- package/lib/commonjs/platforms/aws/setup/index.js.map +1 -0
- package/lib/commonjs/platforms/aws/stacks.d.ts +7 -0
- package/lib/commonjs/platforms/aws/stacks.js +94 -0
- package/lib/commonjs/platforms/aws/stacks.js.map +1 -0
- package/lib/commonjs/platforms/aws/teardown.d.ts +2 -0
- package/lib/commonjs/platforms/aws/teardown.js +59 -0
- package/lib/commonjs/platforms/aws/teardown.js.map +1 -0
- package/lib/commonjs/platforms/aws/viewsSync.d.ts +3 -0
- package/lib/commonjs/platforms/aws/viewsSync.js +77 -0
- package/lib/commonjs/platforms/aws/viewsSync.js.map +1 -0
- package/lib/commonjs/platforms/docker/QpqDockerPlatformSettings.d.ts +10 -0
- package/lib/commonjs/platforms/docker/QpqDockerPlatformSettings.js +3 -0
- package/lib/commonjs/platforms/docker/QpqDockerPlatformSettings.js.map +1 -0
- package/lib/commonjs/platforms/docker/getContainerPorts.d.ts +4 -0
- package/lib/commonjs/platforms/docker/getContainerPorts.js +12 -0
- package/lib/commonjs/platforms/docker/getContainerPorts.js.map +1 -0
- package/lib/commonjs/platforms/docker/getDefaultPortMappings.d.ts +3 -0
- package/lib/commonjs/platforms/docker/getDefaultPortMappings.js +10 -0
- package/lib/commonjs/platforms/docker/getDefaultPortMappings.js.map +1 -0
- package/lib/commonjs/platforms/docker/getDockerPlatformSettings.d.ts +14 -0
- package/lib/commonjs/platforms/docker/getDockerPlatformSettings.js +39 -0
- package/lib/commonjs/platforms/docker/getDockerPlatformSettings.js.map +1 -0
- package/lib/commonjs/platforms/docker/getImageName.d.ts +6 -0
- package/lib/commonjs/platforms/docker/getImageName.js +10 -0
- package/lib/commonjs/platforms/docker/getImageName.js.map +1 -0
- package/lib/commonjs/platforms/docker/go.d.ts +2 -0
- package/lib/commonjs/platforms/docker/go.js +261 -0
- package/lib/commonjs/platforms/docker/go.js.map +1 -0
- package/lib/commonjs/platforms/docker/index.d.ts +2 -0
- package/lib/commonjs/platforms/docker/index.js +43 -0
- package/lib/commonjs/platforms/docker/index.js.map +1 -0
- package/lib/commonjs/platforms/docker/parseMounts.d.ts +7 -0
- package/lib/commonjs/platforms/docker/parseMounts.js +27 -0
- package/lib/commonjs/platforms/docker/parseMounts.js.map +1 -0
- package/lib/commonjs/platforms/docker/parsePortMappings.d.ts +8 -0
- package/lib/commonjs/platforms/docker/parsePortMappings.js +26 -0
- package/lib/commonjs/platforms/docker/parsePortMappings.js.map +1 -0
- package/lib/commonjs/platforms/docker/resolvePortMappings.d.ts +8 -0
- package/lib/commonjs/platforms/docker/resolvePortMappings.js +23 -0
- package/lib/commonjs/platforms/docker/resolvePortMappings.js.map +1 -0
- package/lib/commonjs/platforms/docker/writeComposeFile.d.ts +20 -0
- package/lib/commonjs/platforms/docker/writeComposeFile.js +44 -0
- package/lib/commonjs/platforms/docker/writeComposeFile.js.map +1 -0
- package/lib/commonjs/platforms/index.d.ts +3 -0
- package/lib/commonjs/platforms/index.js +35 -0
- package/lib/commonjs/platforms/index.js.map +1 -0
- package/lib/commonjs/platforms/types.d.ts +21 -0
- package/lib/commonjs/platforms/types.js +9 -0
- package/lib/commonjs/platforms/types.js.map +1 -0
- package/lib/esm/bin/qpq.d.ts +2 -0
- package/lib/esm/bin/qpq.js +4 -0
- package/lib/esm/bin/qpq.js.map +1 -0
- package/lib/esm/bin/qpqCdkApp.d.ts +1 -0
- package/lib/esm/bin/qpqCdkApp.js +6 -0
- package/lib/esm/bin/qpqCdkApp.js.map +1 -0
- package/lib/esm/cli/commandMenu.d.ts +2 -0
- package/lib/esm/cli/commandMenu.js +67 -0
- package/lib/esm/cli/commandMenu.js.map +1 -0
- package/lib/esm/cli/commandRegistry.d.ts +10 -0
- package/lib/esm/cli/commandRegistry.js +161 -0
- package/lib/esm/cli/commandRegistry.js.map +1 -0
- package/lib/esm/cli/index.d.ts +1 -0
- package/lib/esm/cli/index.js +2 -0
- package/lib/esm/cli/index.js.map +1 -0
- package/lib/esm/cli/runCli.d.ts +1 -0
- package/lib/esm/cli/runCli.js +73 -0
- package/lib/esm/cli/runCli.js.map +1 -0
- package/lib/esm/commands/checkCircular.d.ts +1 -0
- package/lib/esm/commands/checkCircular.js +55 -0
- package/lib/esm/commands/checkCircular.js.map +1 -0
- package/lib/esm/commands/clearResources.d.ts +1 -0
- package/lib/esm/commands/clearResources.js +23 -0
- package/lib/esm/commands/clearResources.js.map +1 -0
- package/lib/esm/commands/go.d.ts +1 -0
- package/lib/esm/commands/go.js +16 -0
- package/lib/esm/commands/go.js.map +1 -0
- package/lib/esm/commands/goDev.d.ts +1 -0
- package/lib/esm/commands/goDev.js +33 -0
- package/lib/esm/commands/goDev.js.map +1 -0
- package/lib/esm/commands/goDevApi.d.ts +1 -0
- package/lib/esm/commands/goDevApi.js +142 -0
- package/lib/esm/commands/goDevApi.js.map +1 -0
- package/lib/esm/commands/goDevWeb.d.ts +4 -0
- package/lib/esm/commands/goDevWeb.js +129 -0
- package/lib/esm/commands/goDevWeb.js.map +1 -0
- package/lib/esm/commands/goDocker.d.ts +1 -0
- package/lib/esm/commands/goDocker.js +29 -0
- package/lib/esm/commands/goDocker.js.map +1 -0
- package/lib/esm/commands/hooks.d.ts +1 -0
- package/lib/esm/commands/hooks.js +26 -0
- package/lib/esm/commands/hooks.js.map +1 -0
- package/lib/esm/commands/migrate.d.ts +1 -0
- package/lib/esm/commands/migrate.js +57 -0
- package/lib/esm/commands/migrate.js.map +1 -0
- package/lib/esm/commands/prep.d.ts +1 -0
- package/lib/esm/commands/prep.js +15 -0
- package/lib/esm/commands/prep.js.map +1 -0
- package/lib/esm/commands/publish.d.ts +4 -0
- package/lib/esm/commands/publish.js +38 -0
- package/lib/esm/commands/publish.js.map +1 -0
- package/lib/esm/commands/scriptBuild.d.ts +1 -0
- package/lib/esm/commands/scriptBuild.js +29 -0
- package/lib/esm/commands/scriptBuild.js.map +1 -0
- package/lib/esm/commands/scriptBuilderLayer.d.ts +1 -0
- package/lib/esm/commands/scriptBuilderLayer.js +34 -0
- package/lib/esm/commands/scriptBuilderLayer.js.map +1 -0
- package/lib/esm/commands/scriptNew.d.ts +1 -0
- package/lib/esm/commands/scriptNew.js +19 -0
- package/lib/esm/commands/scriptNew.js.map +1 -0
- package/lib/esm/commands/setup.d.ts +1 -0
- package/lib/esm/commands/setup.js +88 -0
- package/lib/esm/commands/setup.js.map +1 -0
- package/lib/esm/commands/synth.d.ts +1 -0
- package/lib/esm/commands/synth.js +73 -0
- package/lib/esm/commands/synth.js.map +1 -0
- package/lib/esm/commands/teardown.d.ts +1 -0
- package/lib/esm/commands/teardown.js +20 -0
- package/lib/esm/commands/teardown.js.map +1 -0
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/lib/args.d.ts +3 -0
- package/lib/esm/lib/args.js +25 -0
- package/lib/esm/lib/args.js.map +1 -0
- package/lib/esm/lib/circularImports.d.ts +3 -0
- package/lib/esm/lib/circularImports.js +61 -0
- package/lib/esm/lib/circularImports.js.map +1 -0
- package/lib/esm/lib/clearResourcesPlan.d.ts +15 -0
- package/lib/esm/lib/clearResourcesPlan.js +65 -0
- package/lib/esm/lib/clearResourcesPlan.js.map +1 -0
- package/lib/esm/lib/deployPrompts.d.ts +26 -0
- package/lib/esm/lib/deployPrompts.js +103 -0
- package/lib/esm/lib/deployPrompts.js.map +1 -0
- package/lib/esm/lib/devServerEntry.d.ts +22 -0
- package/lib/esm/lib/devServerEntry.js +127 -0
- package/lib/esm/lib/devServerEntry.js.map +1 -0
- package/lib/esm/lib/devServerPorts.d.ts +13 -0
- package/lib/esm/lib/devServerPorts.js +27 -0
- package/lib/esm/lib/devServerPorts.js.map +1 -0
- package/lib/esm/lib/discovery.d.ts +10 -0
- package/lib/esm/lib/discovery.js +40 -0
- package/lib/esm/lib/discovery.js.map +1 -0
- package/lib/esm/lib/getDefaultHookJobs.d.ts +2 -0
- package/lib/esm/lib/getDefaultHookJobs.js +4 -0
- package/lib/esm/lib/getDefaultHookJobs.js.map +1 -0
- package/lib/esm/lib/getDeployTargetLabel.d.ts +2 -0
- package/lib/esm/lib/getDeployTargetLabel.js +8 -0
- package/lib/esm/lib/getDeployTargetLabel.js.map +1 -0
- package/lib/esm/lib/goDockerMode.d.ts +6 -0
- package/lib/esm/lib/goDockerMode.js +19 -0
- package/lib/esm/lib/goDockerMode.js.map +1 -0
- package/lib/esm/lib/hooks.d.ts +9 -0
- package/lib/esm/lib/hooks.js +154 -0
- package/lib/esm/lib/hooks.js.map +1 -0
- package/lib/esm/lib/keepOtherDevServersFlag.d.ts +1 -0
- package/lib/esm/lib/keepOtherDevServersFlag.js +8 -0
- package/lib/esm/lib/keepOtherDevServersFlag.js.map +1 -0
- package/lib/esm/lib/killChildWithEscalation.d.ts +10 -0
- package/lib/esm/lib/killChildWithEscalation.js +29 -0
- package/lib/esm/lib/killChildWithEscalation.js.map +1 -0
- package/lib/esm/lib/killStaleListeners.d.ts +17 -0
- package/lib/esm/lib/killStaleListeners.js +210 -0
- package/lib/esm/lib/killStaleListeners.js.map +1 -0
- package/lib/esm/lib/packageRoot.d.ts +1 -0
- package/lib/esm/lib/packageRoot.js +14 -0
- package/lib/esm/lib/packageRoot.js.map +1 -0
- package/lib/esm/lib/prompts.d.ts +15 -0
- package/lib/esm/lib/prompts.js +28 -0
- package/lib/esm/lib/prompts.js.map +1 -0
- package/lib/esm/lib/qpqConfigs.d.ts +4 -0
- package/lib/esm/lib/qpqConfigs.js +21 -0
- package/lib/esm/lib/qpqConfigs.js.map +1 -0
- package/lib/esm/lib/resolveAppSelection.d.ts +6 -0
- package/lib/esm/lib/resolveAppSelection.js +45 -0
- package/lib/esm/lib/resolveAppSelection.js.map +1 -0
- package/lib/esm/lib/resolveDeployment.d.ts +14 -0
- package/lib/esm/lib/resolveDeployment.js +45 -0
- package/lib/esm/lib/resolveDeployment.js.map +1 -0
- package/lib/esm/lib/runCommand.d.ts +14 -0
- package/lib/esm/lib/runCommand.js +92 -0
- package/lib/esm/lib/runCommand.js.map +1 -0
- package/lib/esm/lib/runTasks.d.ts +15 -0
- package/lib/esm/lib/runTasks.js +108 -0
- package/lib/esm/lib/runTasks.js.map +1 -0
- package/lib/esm/lib/setupStep.d.ts +16 -0
- package/lib/esm/lib/setupStep.js +2 -0
- package/lib/esm/lib/setupStep.js.map +1 -0
- package/lib/esm/lib/timing.d.ts +2 -0
- package/lib/esm/lib/timing.js +6 -0
- package/lib/esm/lib/timing.js.map +1 -0
- package/lib/esm/lib/typeWatcher.d.ts +2 -0
- package/lib/esm/lib/typeWatcher.js +51 -0
- package/lib/esm/lib/typeWatcher.js.map +1 -0
- package/lib/esm/lib/userScriptBuilderLayer.d.ts +23 -0
- package/lib/esm/lib/userScriptBuilderLayer.js +65 -0
- package/lib/esm/lib/userScriptBuilderLayer.js.map +1 -0
- package/lib/esm/lib/userScriptTemplate.d.ts +6 -0
- package/lib/esm/lib/userScriptTemplate.js +39 -0
- package/lib/esm/lib/userScriptTemplate.js.map +1 -0
- package/lib/esm/lib/views.d.ts +2 -0
- package/lib/esm/lib/views.js +14 -0
- package/lib/esm/lib/views.js.map +1 -0
- package/lib/esm/lib/webAddressingEnv.d.ts +7 -0
- package/lib/esm/lib/webAddressingEnv.js +11 -0
- package/lib/esm/lib/webAddressingEnv.js.map +1 -0
- package/lib/esm/platforms/aws/awsCredentials.d.ts +1 -0
- package/lib/esm/platforms/aws/awsCredentials.js +15 -0
- package/lib/esm/platforms/aws/awsCredentials.js.map +1 -0
- package/lib/esm/platforms/aws/cdkApp.d.ts +3 -0
- package/lib/esm/platforms/aws/cdkApp.js +22 -0
- package/lib/esm/platforms/aws/cdkApp.js.map +1 -0
- package/lib/esm/platforms/aws/clearResources.d.ts +2 -0
- package/lib/esm/platforms/aws/clearResources.js +151 -0
- package/lib/esm/platforms/aws/clearResources.js.map +1 -0
- package/lib/esm/platforms/aws/go.d.ts +2 -0
- package/lib/esm/platforms/aws/go.js +115 -0
- package/lib/esm/platforms/aws/go.js.map +1 -0
- package/lib/esm/platforms/aws/goDocker.d.ts +3 -0
- package/lib/esm/platforms/aws/goDocker.js +441 -0
- package/lib/esm/platforms/aws/goDocker.js.map +1 -0
- package/lib/esm/platforms/aws/goDockerManifest.d.ts +44 -0
- package/lib/esm/platforms/aws/goDockerManifest.js +26 -0
- package/lib/esm/platforms/aws/goDockerManifest.js.map +1 -0
- package/lib/esm/platforms/aws/index.d.ts +2 -0
- package/lib/esm/platforms/aws/index.js +20 -0
- package/lib/esm/platforms/aws/index.js.map +1 -0
- package/lib/esm/platforms/aws/prepareDeployment.d.ts +3 -0
- package/lib/esm/platforms/aws/prepareDeployment.js +6 -0
- package/lib/esm/platforms/aws/prepareDeployment.js.map +1 -0
- package/lib/esm/platforms/aws/publish.d.ts +4 -0
- package/lib/esm/platforms/aws/publish.js +50 -0
- package/lib/esm/platforms/aws/publish.js.map +1 -0
- package/lib/esm/platforms/aws/remote.d.ts +11 -0
- package/lib/esm/platforms/aws/remote.js +89 -0
- package/lib/esm/platforms/aws/remote.js.map +1 -0
- package/lib/esm/platforms/aws/setup/awsSetupContext.d.ts +12 -0
- package/lib/esm/platforms/aws/setup/awsSetupContext.js +16 -0
- package/lib/esm/platforms/aws/setup/awsSetupContext.js.map +1 -0
- package/lib/esm/platforms/aws/setup/awsSetupSteps.d.ts +8 -0
- package/lib/esm/platforms/aws/setup/awsSetupSteps.js +31 -0
- package/lib/esm/platforms/aws/setup/awsSetupSteps.js.map +1 -0
- package/lib/esm/platforms/aws/setup/buildBucketNamesStep.d.ts +4 -0
- package/lib/esm/platforms/aws/setup/buildBucketNamesStep.js +62 -0
- package/lib/esm/platforms/aws/setup/buildBucketNamesStep.js.map +1 -0
- package/lib/esm/platforms/aws/setup/buildCdkBootstrapSteps.d.ts +5 -0
- package/lib/esm/platforms/aws/setup/buildCdkBootstrapSteps.js +24 -0
- package/lib/esm/platforms/aws/setup/buildCdkBootstrapSteps.js.map +1 -0
- package/lib/esm/platforms/aws/setup/buildGithubDeployRoleStep.d.ts +4 -0
- package/lib/esm/platforms/aws/setup/buildGithubDeployRoleStep.js +40 -0
- package/lib/esm/platforms/aws/setup/buildGithubDeployRoleStep.js.map +1 -0
- package/lib/esm/platforms/aws/setup/buildGithubOidcProviderStep.d.ts +4 -0
- package/lib/esm/platforms/aws/setup/buildGithubOidcProviderStep.js +40 -0
- package/lib/esm/platforms/aws/setup/buildGithubOidcProviderStep.js.map +1 -0
- package/lib/esm/platforms/aws/setup/buildHostedZonesStep.d.ts +4 -0
- package/lib/esm/platforms/aws/setup/buildHostedZonesStep.js +49 -0
- package/lib/esm/platforms/aws/setup/buildHostedZonesStep.js.map +1 -0
- package/lib/esm/platforms/aws/setup/buildIamCapabilityStep.d.ts +4 -0
- package/lib/esm/platforms/aws/setup/buildIamCapabilityStep.js +34 -0
- package/lib/esm/platforms/aws/setup/buildIamCapabilityStep.js.map +1 -0
- package/lib/esm/platforms/aws/setup/buildIdentityStep.d.ts +4 -0
- package/lib/esm/platforms/aws/setup/buildIdentityStep.js +26 -0
- package/lib/esm/platforms/aws/setup/buildIdentityStep.js.map +1 -0
- package/lib/esm/platforms/aws/setup/buildStackSteps.d.ts +5 -0
- package/lib/esm/platforms/aws/setup/buildStackSteps.js +17 -0
- package/lib/esm/platforms/aws/setup/buildStackSteps.js.map +1 -0
- package/lib/esm/platforms/aws/setup/describeStackStatus.d.ts +4 -0
- package/lib/esm/platforms/aws/setup/describeStackStatus.js +17 -0
- package/lib/esm/platforms/aws/setup/describeStackStatus.js.map +1 -0
- package/lib/esm/platforms/aws/setup/index.d.ts +1 -0
- package/lib/esm/platforms/aws/setup/index.js +2 -0
- package/lib/esm/platforms/aws/setup/index.js.map +1 -0
- package/lib/esm/platforms/aws/stacks.d.ts +7 -0
- package/lib/esm/platforms/aws/stacks.js +72 -0
- package/lib/esm/platforms/aws/stacks.js.map +1 -0
- package/lib/esm/platforms/aws/teardown.d.ts +2 -0
- package/lib/esm/platforms/aws/teardown.js +46 -0
- package/lib/esm/platforms/aws/teardown.js.map +1 -0
- package/lib/esm/platforms/aws/viewsSync.d.ts +3 -0
- package/lib/esm/platforms/aws/viewsSync.js +60 -0
- package/lib/esm/platforms/aws/viewsSync.js.map +1 -0
- package/lib/esm/platforms/docker/QpqDockerPlatformSettings.d.ts +10 -0
- package/lib/esm/platforms/docker/QpqDockerPlatformSettings.js +2 -0
- package/lib/esm/platforms/docker/QpqDockerPlatformSettings.js.map +1 -0
- package/lib/esm/platforms/docker/getContainerPorts.d.ts +4 -0
- package/lib/esm/platforms/docker/getContainerPorts.js +8 -0
- package/lib/esm/platforms/docker/getContainerPorts.js.map +1 -0
- package/lib/esm/platforms/docker/getDefaultPortMappings.d.ts +3 -0
- package/lib/esm/platforms/docker/getDefaultPortMappings.js +6 -0
- package/lib/esm/platforms/docker/getDefaultPortMappings.js.map +1 -0
- package/lib/esm/platforms/docker/getDockerPlatformSettings.d.ts +14 -0
- package/lib/esm/platforms/docker/getDockerPlatformSettings.js +34 -0
- package/lib/esm/platforms/docker/getDockerPlatformSettings.js.map +1 -0
- package/lib/esm/platforms/docker/getImageName.d.ts +6 -0
- package/lib/esm/platforms/docker/getImageName.js +6 -0
- package/lib/esm/platforms/docker/getImageName.js.map +1 -0
- package/lib/esm/platforms/docker/go.d.ts +2 -0
- package/lib/esm/platforms/docker/go.js +242 -0
- package/lib/esm/platforms/docker/go.js.map +1 -0
- package/lib/esm/platforms/docker/index.d.ts +2 -0
- package/lib/esm/platforms/docker/index.js +31 -0
- package/lib/esm/platforms/docker/index.js.map +1 -0
- package/lib/esm/platforms/docker/parseMounts.d.ts +7 -0
- package/lib/esm/platforms/docker/parseMounts.js +23 -0
- package/lib/esm/platforms/docker/parseMounts.js.map +1 -0
- package/lib/esm/platforms/docker/parsePortMappings.d.ts +8 -0
- package/lib/esm/platforms/docker/parsePortMappings.js +21 -0
- package/lib/esm/platforms/docker/parsePortMappings.js.map +1 -0
- package/lib/esm/platforms/docker/resolvePortMappings.d.ts +8 -0
- package/lib/esm/platforms/docker/resolvePortMappings.js +18 -0
- package/lib/esm/platforms/docker/resolvePortMappings.js.map +1 -0
- package/lib/esm/platforms/docker/writeComposeFile.d.ts +20 -0
- package/lib/esm/platforms/docker/writeComposeFile.js +37 -0
- package/lib/esm/platforms/docker/writeComposeFile.js.map +1 -0
- package/lib/esm/platforms/index.d.ts +3 -0
- package/lib/esm/platforms/index.js +17 -0
- package/lib/esm/platforms/index.js.map +1 -0
- package/lib/esm/platforms/types.d.ts +21 -0
- package/lib/esm/platforms/types.js +6 -0
- package/lib/esm/platforms/types.js.map +1 -0
- package/package.json +71 -3
- package/templates/user-script/README.md +28 -0
- package/templates/user-script/gitignore +2 -0
- package/templates/user-script/package.json +16 -0
- package/templates/user-script/src/main.ts +15 -0
- package/templates/user-script/tsconfig.json +12 -0
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
// `qpq go:docker` — asks the same questions as `qpq go`, then builds locally
|
|
2
|
+
// and deploys in parallel via docker. The two halves can run on different
|
|
3
|
+
// machines, which is what lets a CI deploy run one job per service and phase:
|
|
4
|
+
//
|
|
5
|
+
// qpq go:docker <svc> <stack> build, then deploy
|
|
6
|
+
// qpq go:docker <svc> <stack> --build-only build and save; no docker needed
|
|
7
|
+
// qpq go:docker <svc> <stack> --from-build deploy the saved build; the
|
|
8
|
+
// workspace need not be built
|
|
9
|
+
//
|
|
10
|
+
// The build half: QPQ config synth, rspack api bundles, rspack view bundles,
|
|
11
|
+
// rspack federated-remote bundles, and one self-contained CDK cloud assembly
|
|
12
|
+
// per service (`cdk synth --output`, which stages the api bundle as assets).
|
|
13
|
+
// It ends by writing a manifest per service with everything the deploy half
|
|
14
|
+
// needs that only the live config can answer (stack names, views destinations,
|
|
15
|
+
// the federated store), so the deploy half never loads a service config. The
|
|
16
|
+
// saved build for a service is:
|
|
17
|
+
// dist/qpq/go-docker/<app>/<svc>/assembly the cloud assembly
|
|
18
|
+
// dist/qpq/go-docker/<app>/<svc>/deploy.json the manifest
|
|
19
|
+
// dist/apps/<app>/services/<svc>/views the views bundle
|
|
20
|
+
// dist/apps/<app>/services/<svc>/service-remote-published the federated remote
|
|
21
|
+
//
|
|
22
|
+
// The deploy half, from the manifests:
|
|
23
|
+
// wave 1 (inf): one docker container per service deploys its inf stack, all
|
|
24
|
+
// concurrently. Containers run only the CDK CLI against the mounted
|
|
25
|
+
// assembly — the workspace (and its npm-linked quidproquo packages) never
|
|
26
|
+
// needs to exist inside the image.
|
|
27
|
+
// wave 2 (api + web): once every inf stack is done, api and web stacks for
|
|
28
|
+
// all services deploy concurrently (they depend only on inf, not on each
|
|
29
|
+
// other).
|
|
30
|
+
// views: the built bundles are synced to S3, one aws-cli container per
|
|
31
|
+
// service, all concurrently.
|
|
32
|
+
// publish: the built federated remotes (backends that opt in with
|
|
33
|
+
// defineFederatedModuleStore(...)) are synced to S3 and their manifests
|
|
34
|
+
// flipped, one aws-cli container per service, all concurrently. Follows
|
|
35
|
+
// every api deploy, so a lambda never runs a previous release's stories.
|
|
36
|
+
//
|
|
37
|
+
// domain/bootstrap menu options deploy host-side exactly like `qpq go` —
|
|
38
|
+
// a single stack gains nothing from docker.
|
|
39
|
+
//
|
|
40
|
+
// Requires the same env as `go` (the build half included: `cdk synth` still
|
|
41
|
+
// looks up hosted zones and VPCs) plus a running docker daemon for the deploy
|
|
42
|
+
// half. Knobs: GO_DOCKER_BUILD_CONCURRENCY (default: the machine's core count —
|
|
43
|
+
// local builds are CPU-bound) and GO_DOCKER_DEPLOY_CONCURRENCY (default
|
|
44
|
+
// unlimited — deploys just wait on CloudFormation).
|
|
45
|
+
import { QpqDeployEnvVar } from '@qpqjs/core';
|
|
46
|
+
import { qpqDeployAwsUtils } from '@qpqjs/deploy-aws';
|
|
47
|
+
import { getServiceRspackConfig, runRspack } from '@qpqjs/deploy-rspack';
|
|
48
|
+
import fs from 'fs';
|
|
49
|
+
import os from 'os';
|
|
50
|
+
import path from 'path';
|
|
51
|
+
import { synthCommand } from '../../commands/synth';
|
|
52
|
+
import { getRoot, getServiceDirectory, getServiceNamesWithViews } from '../../lib/discovery';
|
|
53
|
+
import { getDefaultHookJobs } from '../../lib/getDefaultHookJobs';
|
|
54
|
+
import { runAppHook, runHookForAppPackages } from '../../lib/hooks';
|
|
55
|
+
import { getServiceNamesWithFederation, loadServiceQpqConfig } from '../../lib/qpqConfigs';
|
|
56
|
+
import { nextPrefixColor, runCommand, runCommandBestEffort, runCommandPrefixed } from '../../lib/runCommand';
|
|
57
|
+
import { assertNoFailures, runTasks } from '../../lib/runTasks';
|
|
58
|
+
import { logTimeEnd, logTimeStart } from '../../lib/timing';
|
|
59
|
+
import { bundleViews, getViewsDistDir } from '../../lib/views';
|
|
60
|
+
import { isAwsCredentialsValid } from './awsCredentials';
|
|
61
|
+
import { getCdkAppCommand, getCdkCliVersion, getDockerDir } from './cdkApp';
|
|
62
|
+
import { fromManifestPath, getGoDockerAssemblyDir, getGoDockerBuildDir, readGoDockerBuildManifest, toManifestPath, writeGoDockerBuildManifest, } from './goDockerManifest';
|
|
63
|
+
import { buildRemote, resolvePublishTarget } from './remote';
|
|
64
|
+
import { deployAccountStack, deployBootstrapStack, deployDomainStack } from './stacks';
|
|
65
|
+
import { getViewsS3Destinations, NO_CACHE_FILES } from './viewsSync';
|
|
66
|
+
const IMAGE_TAG = 'qpq-cdk-deployer';
|
|
67
|
+
const AWS_CLI_IMAGE = 'amazon/aws-cli';
|
|
68
|
+
const BUILD_CONCURRENCY = Number(process.env.GO_DOCKER_BUILD_CONCURRENCY) || os.availableParallelism();
|
|
69
|
+
const DEPLOY_CONCURRENCY = Number(process.env.GO_DOCKER_DEPLOY_CONCURRENCY) || Infinity;
|
|
70
|
+
// Credentials/region reach the containers via `docker run -e NAME` (value
|
|
71
|
+
// inherited from this process's env, never on the docker command line).
|
|
72
|
+
const AWS_ENV_PASSTHROUGH = [
|
|
73
|
+
'AWS_ACCESS_KEY_ID',
|
|
74
|
+
'AWS_SECRET_ACCESS_KEY',
|
|
75
|
+
'AWS_SESSION_TOKEN',
|
|
76
|
+
'AWS_REGION',
|
|
77
|
+
'AWS_DEFAULT_REGION',
|
|
78
|
+
'AWS_DEFAULT_ACCOUNT',
|
|
79
|
+
];
|
|
80
|
+
const getStackNeeds = (stacks) => ({
|
|
81
|
+
inf: stacks === 'all' || stacks === 'inf',
|
|
82
|
+
api: stacks === 'all' || stacks === 'api',
|
|
83
|
+
web: stacks === 'all' || stacks === 'web',
|
|
84
|
+
views: stacks === 'all' || stacks === 'views',
|
|
85
|
+
});
|
|
86
|
+
// A container left behind by an interrupted run would block reusing its name.
|
|
87
|
+
// Clear it first, best-effort: a missing container (exit 1) must not fail the
|
|
88
|
+
// deploy. Was a `docker rm -f … >/dev/null 2>&1 ;` prefix on the run command,
|
|
89
|
+
// but that only worked under `shell: true`; as a separate call it's shell-free.
|
|
90
|
+
const removeContainer = (containerName) => runCommandBestEffort('docker', ['rm', '-f', containerName]);
|
|
91
|
+
const assertDockerRunning = async () => {
|
|
92
|
+
try {
|
|
93
|
+
await runCommand('docker', ['info', '--format', 'docker daemon ok — server {{.ServerVersion}}']);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
throw new Error('Docker daemon is not running (start Docker Desktop and retry).');
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
// Pin the image's CDK CLI to the CLI's own aws-cdk version so it can always
|
|
100
|
+
// read the assembly schema the host synthesized.
|
|
101
|
+
const buildDeployerImage = async (cdkVersion) => {
|
|
102
|
+
console.log(`Building deployer image [${IMAGE_TAG}] (aws-cdk ${cdkVersion})`);
|
|
103
|
+
await runCommand('docker', ['build', '-t', IMAGE_TAG, '--build-arg', `CDK_VERSION=${cdkVersion}`, getDockerDir()]);
|
|
104
|
+
};
|
|
105
|
+
// Deploy one stack from a pre-synthesized assembly in a throwaway container
|
|
106
|
+
// named <service>-<stackType> (e.g. mini-web) so `docker ps` reads cleanly.
|
|
107
|
+
// The assembly mounts read-only and is copied container-local first — the CDK
|
|
108
|
+
// CLI writes lock files next to the assembly it reads, and the copy keeps
|
|
109
|
+
// parallel api/web deploys of the same service fully isolated.
|
|
110
|
+
const dockerDeployStack = async (color, serviceName, stackType, stackName, assemblyDir) => {
|
|
111
|
+
const containerName = `${serviceName}-${stackType}`;
|
|
112
|
+
await removeContainer(containerName);
|
|
113
|
+
await runCommandPrefixed(`${stackType}:${serviceName}`, 'docker', [
|
|
114
|
+
'run',
|
|
115
|
+
'--rm',
|
|
116
|
+
'--name',
|
|
117
|
+
containerName,
|
|
118
|
+
'-v',
|
|
119
|
+
`${assemblyDir}:/assembly:ro`,
|
|
120
|
+
...AWS_ENV_PASSTHROUGH.flatMap((name) => ['-e', name]),
|
|
121
|
+
IMAGE_TAG,
|
|
122
|
+
'bash',
|
|
123
|
+
'-c',
|
|
124
|
+
`cp -r /assembly /work/assembly && cdk deploy ${stackName} --app /work/assembly --require-approval never --progress events`,
|
|
125
|
+
], { color });
|
|
126
|
+
};
|
|
127
|
+
// Sync one service's pre-built views to S3 in a throwaway aws-cli container
|
|
128
|
+
// named <service>-views. The official image's entrypoint is `aws`. Multiple
|
|
129
|
+
// destinations (shell → website root + views prefix) run sequentially within
|
|
130
|
+
// the service, reusing the container name. Mirrors the host-side syncViewsToS3
|
|
131
|
+
// cache policy: hashed assets immutable, the fixed-name entry points re-uploaded
|
|
132
|
+
// with no-cache every deploy (see NO_CACHE_FILES).
|
|
133
|
+
const dockerSyncViews = async (color, serviceName, views) => {
|
|
134
|
+
const containerName = `${serviceName}-views`;
|
|
135
|
+
const distDir = fromManifestPath(views.dir);
|
|
136
|
+
const runAwsCli = async (awsArgs) => {
|
|
137
|
+
await removeContainer(containerName);
|
|
138
|
+
await runCommandPrefixed(`views:${serviceName}`, 'docker', [
|
|
139
|
+
'run',
|
|
140
|
+
'--rm',
|
|
141
|
+
'--name',
|
|
142
|
+
containerName,
|
|
143
|
+
'-v',
|
|
144
|
+
`${distDir}:/views:ro`,
|
|
145
|
+
...AWS_ENV_PASSTHROUGH.flatMap((name) => ['-e', name]),
|
|
146
|
+
AWS_CLI_IMAGE,
|
|
147
|
+
...awsArgs,
|
|
148
|
+
], { color });
|
|
149
|
+
};
|
|
150
|
+
for (const destination of views.destinations) {
|
|
151
|
+
await runAwsCli([
|
|
152
|
+
's3',
|
|
153
|
+
'sync',
|
|
154
|
+
'/views',
|
|
155
|
+
destination,
|
|
156
|
+
'--cache-control',
|
|
157
|
+
'public,max-age=31536000,immutable',
|
|
158
|
+
...NO_CACHE_FILES.flatMap((file) => ['--exclude', file]),
|
|
159
|
+
]);
|
|
160
|
+
for (const file of NO_CACHE_FILES) {
|
|
161
|
+
if (!fs.existsSync(path.join(distDir, file))) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
await runAwsCli(['s3', 'cp', `/views/${file}`, `${destination}/${file}`, '--cache-control', 'no-cache']);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
// Publish one service's already-built federated remote to S3 in a throwaway
|
|
169
|
+
// aws-cli container named <service>-publish. The version dir (everything the
|
|
170
|
+
// manifest references) syncs first, then the manifest.json is copied last —
|
|
171
|
+
// same ordering guarantee as the host-side publish, so a reading lambda never
|
|
172
|
+
// sees a manifest whose files aren't all present yet.
|
|
173
|
+
const dockerPublishRemote = async (color, serviceName, remote) => {
|
|
174
|
+
const { manifestHash, bucketName, servicePrefix } = remote;
|
|
175
|
+
const publishPath = fromManifestPath(remote.dir);
|
|
176
|
+
const containerName = `${serviceName}-publish`;
|
|
177
|
+
// /publish is the service-remote-published dir; the hashed version subdir and
|
|
178
|
+
// manifest.json both live directly under it.
|
|
179
|
+
const s3Operations = [
|
|
180
|
+
['s3', 'sync', `/publish/${manifestHash}`, `s3://${bucketName}/${servicePrefix}/${manifestHash}`],
|
|
181
|
+
['s3', 'cp', '/publish/manifest.json', `s3://${bucketName}/${servicePrefix}/manifest.json`],
|
|
182
|
+
];
|
|
183
|
+
for (const s3Operation of s3Operations) {
|
|
184
|
+
await removeContainer(containerName);
|
|
185
|
+
await runCommandPrefixed(`publish:${serviceName}`, 'docker', [
|
|
186
|
+
'run',
|
|
187
|
+
'--rm',
|
|
188
|
+
'--name',
|
|
189
|
+
containerName,
|
|
190
|
+
'-v',
|
|
191
|
+
`${publishPath}:/publish:ro`,
|
|
192
|
+
...AWS_ENV_PASSTHROUGH.flatMap((name) => ['-e', name]),
|
|
193
|
+
AWS_CLI_IMAGE,
|
|
194
|
+
...s3Operation,
|
|
195
|
+
], { color });
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
const resolveRemoteEntry = (appName, service) => {
|
|
199
|
+
const { publishPath, manifestHash, bucketName, servicePrefix } = resolvePublishTarget(appName, service);
|
|
200
|
+
return { dir: toManifestPath(publishPath), manifestHash, bucketName, servicePrefix };
|
|
201
|
+
};
|
|
202
|
+
// Everything the deploy half needs that only the live config can answer,
|
|
203
|
+
// resolved here while the workspace is built and the config loads.
|
|
204
|
+
const resolveBuildManifest = (appName, deploymentName, service, stacks, hasViews, hasRemote, cdkVersion) => {
|
|
205
|
+
const qpqConfig = loadServiceQpqConfig(appName, service);
|
|
206
|
+
return {
|
|
207
|
+
cdkVersion,
|
|
208
|
+
deploymentName,
|
|
209
|
+
builtFor: stacks,
|
|
210
|
+
stacks: stacks === 'views'
|
|
211
|
+
? null
|
|
212
|
+
: {
|
|
213
|
+
inf: qpqDeployAwsUtils.getInfStackName(qpqConfig),
|
|
214
|
+
api: qpqDeployAwsUtils.getApiStackName(qpqConfig),
|
|
215
|
+
web: qpqDeployAwsUtils.getWebStackName(qpqConfig),
|
|
216
|
+
},
|
|
217
|
+
views: hasViews ? { dir: toManifestPath(getViewsDistDir(appName, service)), destinations: getViewsS3Destinations(appName, service) } : null,
|
|
218
|
+
remote: hasRemote ? resolveRemoteEntry(appName, service) : null,
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
// The directories a CI job uploads to carry one service's saved build to the
|
|
222
|
+
// deploy job, root-relative.
|
|
223
|
+
const getSavedBuildDirs = (appName, service, manifest) => [
|
|
224
|
+
toManifestPath(getGoDockerBuildDir(appName, service)),
|
|
225
|
+
...(manifest.views ? [manifest.views.dir] : []),
|
|
226
|
+
...(manifest.remote ? [manifest.remote.dir] : []),
|
|
227
|
+
];
|
|
228
|
+
const buildGoDockerOutput = async (appName, deploymentName, plan) => {
|
|
229
|
+
const { services, stacks } = plan;
|
|
230
|
+
const need = getStackNeeds(stacks);
|
|
231
|
+
const needCdkSynth = stacks !== 'views';
|
|
232
|
+
const viewServices = need.views ? services.filter((service) => getServiceNamesWithViews(appName).includes(service)) : [];
|
|
233
|
+
console.log('\n=== Build ===\n');
|
|
234
|
+
// A stale assembly or manifest from an earlier build must not outlive a
|
|
235
|
+
// change of stack selection, so every selected service starts empty.
|
|
236
|
+
for (const service of services) {
|
|
237
|
+
fs.rmSync(getGoDockerBuildDir(appName, service), { recursive: true, force: true });
|
|
238
|
+
}
|
|
239
|
+
await runAppHook(appName, 'predeploy');
|
|
240
|
+
// Workspace packages resolve through their built dist/ (package.json main),
|
|
241
|
+
// so bundles would ship stale code unless every lib is tsc'd first. Other
|
|
242
|
+
// apps' packages are skipped: nothing this app deploys can import them
|
|
243
|
+
// unless it declares them, and declared ones are built.
|
|
244
|
+
console.log('Building workspace packages');
|
|
245
|
+
assertNoFailures('Workspace build', await runHookForAppPackages('build', appName, getDefaultHookJobs()));
|
|
246
|
+
// Synth the selected services' QPQ configs (and shell's, which the views
|
|
247
|
+
// destinations resolve from) so a config that fails to load fails here,
|
|
248
|
+
// before any bundling. In-process: it's just config loads + JSON writes.
|
|
249
|
+
const qpqSynthServices = [...new Set([...services, ...(need.views ? ['shell'] : [])])];
|
|
250
|
+
for (const service of qpqSynthServices) {
|
|
251
|
+
await synthCommand([service, '--app', appName]);
|
|
252
|
+
}
|
|
253
|
+
// Federated remotes are the backend story code, so they are rebuilt (and
|
|
254
|
+
// later republished) whenever the api stack is. Skips services without
|
|
255
|
+
// defineFederatedModuleStore(...). Detected here (after the workspace build)
|
|
256
|
+
// because it loads each service's config.
|
|
257
|
+
const federatedServices = need.api ? getServiceNamesWithFederation(appName, services) : [];
|
|
258
|
+
if (needCdkSynth) {
|
|
259
|
+
assertNoFailures('API bundling', await runTasks(services.map((service) => ({
|
|
260
|
+
label: `bundle-api:${service}`,
|
|
261
|
+
run: async () => {
|
|
262
|
+
console.log(`Bundling api: [${service}]`);
|
|
263
|
+
const qpqConfig = loadServiceQpqConfig(appName, service);
|
|
264
|
+
await runRspack(getServiceRspackConfig(qpqConfig, path.join(getServiceDirectory(appName, service), 'service')));
|
|
265
|
+
},
|
|
266
|
+
})), BUILD_CONCURRENCY));
|
|
267
|
+
}
|
|
268
|
+
assertNoFailures('Views bundling', await runTasks(viewServices.map((service) => ({
|
|
269
|
+
label: `bundle-views:${service}`,
|
|
270
|
+
run: async () => {
|
|
271
|
+
console.log(`Bundling views: [${service}]`);
|
|
272
|
+
await bundleViews(appName, service);
|
|
273
|
+
},
|
|
274
|
+
})), BUILD_CONCURRENCY));
|
|
275
|
+
// Build the federated remotes now (rspack needs the workspace), so the
|
|
276
|
+
// publish wave only has to sync the already-built output — mirroring how
|
|
277
|
+
// views are bundled here and synced later.
|
|
278
|
+
assertNoFailures('Remote bundling', await runTasks(federatedServices.map((service) => ({
|
|
279
|
+
label: `bundle-remote:${service}`,
|
|
280
|
+
run: async () => {
|
|
281
|
+
console.log(`Bundling federated remote: [${service}]`);
|
|
282
|
+
await buildRemote(appName, service);
|
|
283
|
+
},
|
|
284
|
+
})), BUILD_CONCURRENCY));
|
|
285
|
+
if (needCdkSynth) {
|
|
286
|
+
// One self-contained cloud assembly per service (all its stacks + staged
|
|
287
|
+
// assets) — separate --output dirs so synths can run in parallel and
|
|
288
|
+
// containers never share mutable state.
|
|
289
|
+
assertNoFailures('CDK synth', await runTasks(services.map((service) => ({
|
|
290
|
+
label: `cdk-synth:${service}`,
|
|
291
|
+
run: () => runCommandPrefixed(`cdk-synth:${service}`, 'npx', ['cdk', 'synth', '--quiet', '--app', getCdkAppCommand(), '--output', getGoDockerAssemblyDir(appName, service)], {
|
|
292
|
+
cwd: getRoot(),
|
|
293
|
+
env: { DEPLOY_SERVICE_NAME: service, DEPLOY_APP_NAME: appName },
|
|
294
|
+
color: nextPrefixColor(),
|
|
295
|
+
}),
|
|
296
|
+
})), BUILD_CONCURRENCY));
|
|
297
|
+
}
|
|
298
|
+
// Manifests are written last, so one only ever exists beside a complete build.
|
|
299
|
+
const cdkVersion = getCdkCliVersion();
|
|
300
|
+
for (const service of services) {
|
|
301
|
+
const manifest = resolveBuildManifest(appName, deploymentName, service, stacks, viewServices.includes(service), federatedServices.includes(service), cdkVersion);
|
|
302
|
+
writeGoDockerBuildManifest(appName, service, manifest);
|
|
303
|
+
console.log(`Saved build for [${service}]:`);
|
|
304
|
+
for (const dir of getSavedBuildDirs(appName, service, manifest)) {
|
|
305
|
+
console.log(` ${dir}`);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
// A deploy phase runs from a saved build only when that build was made for it:
|
|
310
|
+
// `all` covers every phase, any other selection only its own. A build made for
|
|
311
|
+
// `inf` has an assembly the api stack could deploy from, but no remote to
|
|
312
|
+
// publish after it, which is exactly the stale-stories deploy the publish
|
|
313
|
+
// ordering exists to prevent.
|
|
314
|
+
const readCheckedManifest = (appName, deploymentName, service, stacks, cdkVersion) => {
|
|
315
|
+
const manifest = readGoDockerBuildManifest(appName, service);
|
|
316
|
+
const rebuild = `rebuild it with \`qpq go:docker ${service} ${stacks} --build-only --app ${appName} --deployment ${deploymentName}\``;
|
|
317
|
+
if (manifest.cdkVersion !== cdkVersion) {
|
|
318
|
+
throw new Error(`saved build for [${service}] was synthesized with aws-cdk ${manifest.cdkVersion}, this qpq has ${cdkVersion}; ${rebuild}`);
|
|
319
|
+
}
|
|
320
|
+
if (manifest.deploymentName !== deploymentName) {
|
|
321
|
+
throw new Error(`saved build for [${service}] is for deployment '${manifest.deploymentName}', not '${deploymentName}'; ${rebuild}`);
|
|
322
|
+
}
|
|
323
|
+
if (manifest.builtFor !== 'all' && manifest.builtFor !== stacks) {
|
|
324
|
+
throw new Error(`saved build for [${service}] was built for '${manifest.builtFor}' stacks and cannot deploy '${stacks}'; ${rebuild}`);
|
|
325
|
+
}
|
|
326
|
+
return manifest;
|
|
327
|
+
};
|
|
328
|
+
const getStackName = (manifest, service, stackType) => {
|
|
329
|
+
if (!manifest.stacks) {
|
|
330
|
+
throw new Error(`saved build for [${service}] has no cloud assembly (it was built for views only)`);
|
|
331
|
+
}
|
|
332
|
+
return manifest.stacks[stackType];
|
|
333
|
+
};
|
|
334
|
+
const deployGoDockerOutput = async (appName, deploymentName, plan) => {
|
|
335
|
+
const { services, stacks } = plan;
|
|
336
|
+
const need = getStackNeeds(stacks);
|
|
337
|
+
const needCdkDeploys = stacks !== 'views';
|
|
338
|
+
// Every manifest is read and checked up front, so one missing or mismatched
|
|
339
|
+
// build fails the run before any container starts.
|
|
340
|
+
const cdkVersion = getCdkCliVersion();
|
|
341
|
+
const manifests = new Map(services.map((service) => [service, readCheckedManifest(appName, deploymentName, service, stacks, cdkVersion)]));
|
|
342
|
+
const manifestFor = (service) => manifests.get(service);
|
|
343
|
+
const viewServices = need.views ? services.filter((service) => manifestFor(service).views !== null) : [];
|
|
344
|
+
const federatedServices = need.api ? services.filter((service) => manifestFor(service).remote !== null) : [];
|
|
345
|
+
// Federated publish needs the api stack (need.api ⇒ needCdkDeploys), so any
|
|
346
|
+
// docker preflight it requires is already covered by these two checks.
|
|
347
|
+
if (needCdkDeploys || viewServices.length > 0) {
|
|
348
|
+
await assertDockerRunning();
|
|
349
|
+
}
|
|
350
|
+
if (needCdkDeploys) {
|
|
351
|
+
await buildDeployerImage(cdkVersion);
|
|
352
|
+
}
|
|
353
|
+
// The aws-cli image backs both the views sync and the federated publish
|
|
354
|
+
// waves. Pull once now so those waves don't race N containers into pulling
|
|
355
|
+
// the same image.
|
|
356
|
+
if (viewServices.length > 0 || federatedServices.length > 0) {
|
|
357
|
+
await runCommand('docker', ['pull', AWS_CLI_IMAGE]);
|
|
358
|
+
}
|
|
359
|
+
// ---- Wave 1: inf stacks, one container per service, all concurrent ----
|
|
360
|
+
if (need.inf) {
|
|
361
|
+
console.log('\n=== Deploy inf stacks (docker) ===\n');
|
|
362
|
+
logTimeStart('infWave');
|
|
363
|
+
assertNoFailures('Inf deploy', await runTasks(services.map((service) => ({
|
|
364
|
+
label: `inf:${service}`,
|
|
365
|
+
run: () => dockerDeployStack(nextPrefixColor(), service, 'inf', getStackName(manifestFor(service), service, 'inf'), getGoDockerAssemblyDir(appName, service)),
|
|
366
|
+
})), DEPLOY_CONCURRENCY));
|
|
367
|
+
logTimeEnd('infWave');
|
|
368
|
+
}
|
|
369
|
+
// ---- Wave 2: api + web stacks, all concurrent ----
|
|
370
|
+
if (need.api || need.web) {
|
|
371
|
+
console.log('\n=== Deploy api + web stacks (docker) ===\n');
|
|
372
|
+
logTimeStart('apiWebWave');
|
|
373
|
+
assertNoFailures('Api/Web deploy', await runTasks(['api', 'web']
|
|
374
|
+
.filter((stackType) => (stackType === 'api' ? need.api : need.web))
|
|
375
|
+
.flatMap((stackType) => services.map((service) => ({
|
|
376
|
+
label: `${stackType}:${service}`,
|
|
377
|
+
run: () => dockerDeployStack(nextPrefixColor(), service, stackType, getStackName(manifestFor(service), service, stackType), getGoDockerAssemblyDir(appName, service)),
|
|
378
|
+
}))), DEPLOY_CONCURRENCY));
|
|
379
|
+
logTimeEnd('apiWebWave');
|
|
380
|
+
}
|
|
381
|
+
// ---- Views: sync the pre-built bundles to S3, all concurrent ----
|
|
382
|
+
if (viewServices.length > 0) {
|
|
383
|
+
console.log('\n=== Sync views to S3 (docker) ===\n');
|
|
384
|
+
logTimeStart('viewsWave');
|
|
385
|
+
assertNoFailures('Views sync', await runTasks(viewServices.map((service) => ({
|
|
386
|
+
label: `views:${service}`,
|
|
387
|
+
run: () => dockerSyncViews(nextPrefixColor(), service, manifestFor(service).views),
|
|
388
|
+
})), DEPLOY_CONCURRENCY));
|
|
389
|
+
logTimeEnd('viewsWave');
|
|
390
|
+
}
|
|
391
|
+
// ---- Publish: the pre-built federated remotes to S3, all concurrent ----
|
|
392
|
+
if (federatedServices.length > 0) {
|
|
393
|
+
console.log('\n=== Publish federated remotes to S3 (docker) ===\n');
|
|
394
|
+
logTimeStart('publishWave');
|
|
395
|
+
assertNoFailures('Federated publish', await runTasks(federatedServices.map((service) => ({
|
|
396
|
+
label: `publish:${service}`,
|
|
397
|
+
run: () => dockerPublishRemote(nextPrefixColor(), service, manifestFor(service).remote),
|
|
398
|
+
})), DEPLOY_CONCURRENCY));
|
|
399
|
+
logTimeEnd('publishWave');
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
export const awsGoDocker = async (appName, plan, mode) => {
|
|
403
|
+
if (plan.kind === 'cancelled') {
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
if ((await isAwsCredentialsValid()) === false) {
|
|
407
|
+
console.log('Credentials are expired or invalid.');
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
logTimeStart('totalTime');
|
|
411
|
+
if (plan.kind === 'account') {
|
|
412
|
+
await deployAccountStack(plan.appName);
|
|
413
|
+
logTimeEnd('totalTime');
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
if (plan.kind === 'bootstrap') {
|
|
417
|
+
if (plan.includeDomain) {
|
|
418
|
+
await deployDomainStack(plan.appName);
|
|
419
|
+
}
|
|
420
|
+
await deployBootstrapStack(plan.appName);
|
|
421
|
+
logTimeEnd('totalTime');
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
// resolveDeployment primed the selection before this driver ran. The manifest
|
|
425
|
+
// records it so a build for one deployment can never deploy to another.
|
|
426
|
+
const deploymentName = process.env[QpqDeployEnvVar.deployName];
|
|
427
|
+
if (!deploymentName) {
|
|
428
|
+
throw new Error(`no deployment selected (${QpqDeployEnvVar.deployName} is unset)`);
|
|
429
|
+
}
|
|
430
|
+
console.log(`\n\nRunning dockerized deploy (${mode})\n\n`);
|
|
431
|
+
console.log('Executing for services');
|
|
432
|
+
console.log(plan.services.join(', '));
|
|
433
|
+
if (mode !== 'from-build') {
|
|
434
|
+
await buildGoDockerOutput(appName, deploymentName, plan);
|
|
435
|
+
}
|
|
436
|
+
if (mode !== 'build-only') {
|
|
437
|
+
await deployGoDockerOutput(appName, deploymentName, plan);
|
|
438
|
+
}
|
|
439
|
+
logTimeEnd('totalTime');
|
|
440
|
+
};
|
|
441
|
+
//# sourceMappingURL=goDocker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goDocker.js","sourceRoot":"","sources":["../../../../src/platforms/aws/goDocker.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,0EAA0E;AAC1E,8EAA8E;AAC9E,EAAE;AACF,kEAAkE;AAClE,gFAAgF;AAChF,2EAA2E;AAC3E,2EAA2E;AAC3E,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,gCAAgC;AAChC,gFAAgF;AAChF,0EAA0E;AAC1E,8EAA8E;AAC9E,kFAAkF;AAClF,EAAE;AACF,uCAAuC;AACvC,8EAA8E;AAC9E,wEAAwE;AACxE,8EAA8E;AAC9E,uCAAuC;AACvC,6EAA6E;AAC7E,6EAA6E;AAC7E,cAAc;AACd,yEAAyE;AACzE,iCAAiC;AACjC,oEAAoE;AACpE,4EAA4E;AAC5E,4EAA4E;AAC5E,6EAA6E;AAC7E,EAAE;AACF,yEAAyE;AACzE,4CAA4C;AAC5C,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,gFAAgF;AAChF,wEAAwE;AACxE,oDAAoD;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC7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AAC,IAAI,KAAK,WAAW,EAAE,CAAC;QAC9B,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,MAAM,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QACD,MAAM,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxB,OAAO;IACT,CAAC;IAED,8EAA8E;IAC9E,wEAAwE;IACxE,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAC/D,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,2BAA2B,eAAe,CAAC,UAAU,YAAY,CAAC,CAAC;IACrF,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,OAAO,CAAC,CAAC;IAC3D,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAEtC,IAAI,IAAI,KAAK,YAAY,EAAE,CAAC;QAC1B,MAAM,mBAAmB,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IACD,IAAI,IAAI,KAAK,YAAY,EAAE,CAAC;QAC1B,MAAM,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC5D,CAAC;IAED,UAAU,CAAC,WAAW,CAAC,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["// `qpq go:docker` — asks the same questions as `qpq go`, then builds locally\n// and deploys in parallel via docker. The two halves can run on different\n// machines, which is what lets a CI deploy run one job per service and phase:\n//\n// qpq go:docker <svc> <stack> build, then deploy\n// qpq go:docker <svc> <stack> --build-only build and save; no docker needed\n// qpq go:docker <svc> <stack> --from-build deploy the saved build; the\n// workspace need not be built\n//\n// The build half: QPQ config synth, rspack api bundles, rspack view bundles,\n// rspack federated-remote bundles, and one self-contained CDK cloud assembly\n// per service (`cdk synth --output`, which stages the api bundle as assets).\n// It ends by writing a manifest per service with everything the deploy half\n// needs that only the live config can answer (stack names, views destinations,\n// the federated store), so the deploy half never loads a service config. The\n// saved build for a service is:\n// dist/qpq/go-docker/<app>/<svc>/assembly the cloud assembly\n// dist/qpq/go-docker/<app>/<svc>/deploy.json the manifest\n// dist/apps/<app>/services/<svc>/views the views bundle\n// dist/apps/<app>/services/<svc>/service-remote-published the federated remote\n//\n// The deploy half, from the manifests:\n// wave 1 (inf): one docker container per service deploys its inf stack, all\n// concurrently. Containers run only the CDK CLI against the mounted\n// assembly — the workspace (and its npm-linked quidproquo packages) never\n// needs to exist inside the image.\n// wave 2 (api + web): once every inf stack is done, api and web stacks for\n// all services deploy concurrently (they depend only on inf, not on each\n// other).\n// views: the built bundles are synced to S3, one aws-cli container per\n// service, all concurrently.\n// publish: the built federated remotes (backends that opt in with\n// defineFederatedModuleStore(...)) are synced to S3 and their manifests\n// flipped, one aws-cli container per service, all concurrently. Follows\n// every api deploy, so a lambda never runs a previous release's stories.\n//\n// domain/bootstrap menu options deploy host-side exactly like `qpq go` —\n// a single stack gains nothing from docker.\n//\n// Requires the same env as `go` (the build half included: `cdk synth` still\n// looks up hosted zones and VPCs) plus a running docker daemon for the deploy\n// half. Knobs: GO_DOCKER_BUILD_CONCURRENCY (default: the machine's core count —\n// local builds are CPU-bound) and GO_DOCKER_DEPLOY_CONCURRENCY (default\n// unlimited — deploys just wait on CloudFormation).\nimport { QpqDeployEnvVar } from '@qpqjs/core';\nimport { qpqDeployAwsUtils } from '@qpqjs/deploy-aws';\nimport { getServiceRspackConfig, runRspack } from '@qpqjs/deploy-rspack';\n\nimport fs from 'fs';\nimport os from 'os';\nimport path from 'path';\n\nimport { synthCommand } from '../../commands/synth';\nimport { DeployPlan, StackType } from '../../lib/deployPrompts';\nimport { getRoot, getServiceDirectory, getServiceNamesWithViews } from '../../lib/discovery';\nimport { getDefaultHookJobs } from '../../lib/getDefaultHookJobs';\nimport { GoDockerMode } from '../../lib/goDockerMode';\nimport { runAppHook, runHookForAppPackages } from '../../lib/hooks';\nimport { getServiceNamesWithFederation, loadServiceQpqConfig } from '../../lib/qpqConfigs';\nimport { nextPrefixColor, runCommand, runCommandBestEffort, runCommandPrefixed } from '../../lib/runCommand';\nimport { assertNoFailures, runTasks } from '../../lib/runTasks';\nimport { logTimeEnd, logTimeStart } from '../../lib/timing';\nimport { bundleViews, getViewsDistDir } from '../../lib/views';\nimport { isAwsCredentialsValid } from './awsCredentials';\nimport { getCdkAppCommand, getCdkCliVersion, getDockerDir } from './cdkApp';\nimport {\n fromManifestPath,\n getGoDockerAssemblyDir,\n getGoDockerBuildDir,\n GoDockerBuildManifest,\n GoDockerRemoteEntry,\n GoDockerViewsEntry,\n readGoDockerBuildManifest,\n toManifestPath,\n writeGoDockerBuildManifest,\n} from './goDockerManifest';\nimport { buildRemote, resolvePublishTarget } from './remote';\nimport { deployAccountStack, deployBootstrapStack, deployDomainStack } from './stacks';\nimport { getViewsS3Destinations, NO_CACHE_FILES } from './viewsSync';\n\nconst IMAGE_TAG = 'qpq-cdk-deployer';\nconst AWS_CLI_IMAGE = 'amazon/aws-cli';\n\nconst BUILD_CONCURRENCY = Number(process.env.GO_DOCKER_BUILD_CONCURRENCY) || os.availableParallelism();\nconst DEPLOY_CONCURRENCY = Number(process.env.GO_DOCKER_DEPLOY_CONCURRENCY) || Infinity;\n\n// Credentials/region reach the containers via `docker run -e NAME` (value\n// inherited from this process's env, never on the docker command line).\nconst AWS_ENV_PASSTHROUGH = [\n 'AWS_ACCESS_KEY_ID',\n 'AWS_SECRET_ACCESS_KEY',\n 'AWS_SESSION_TOKEN',\n 'AWS_REGION',\n 'AWS_DEFAULT_REGION',\n 'AWS_DEFAULT_ACCOUNT',\n];\n\ntype ServicesPlan = Extract<DeployPlan, { kind: 'services' }>;\n\ntype StackNeeds = { inf: boolean; api: boolean; web: boolean; views: boolean };\n\nconst getStackNeeds = (stacks: StackType): StackNeeds => ({\n inf: stacks === 'all' || stacks === 'inf',\n api: stacks === 'all' || stacks === 'api',\n web: stacks === 'all' || stacks === 'web',\n views: stacks === 'all' || stacks === 'views',\n});\n\n// A container left behind by an interrupted run would block reusing its name.\n// Clear it first, best-effort: a missing container (exit 1) must not fail the\n// deploy. Was a `docker rm -f … >/dev/null 2>&1 ;` prefix on the run command,\n// but that only worked under `shell: true`; as a separate call it's shell-free.\nconst removeContainer = (containerName: string): Promise<void> => runCommandBestEffort('docker', ['rm', '-f', containerName]);\n\nconst assertDockerRunning = async (): Promise<void> => {\n try {\n await runCommand('docker', ['info', '--format', 'docker daemon ok — server {{.ServerVersion}}']);\n } catch {\n throw new Error('Docker daemon is not running (start Docker Desktop and retry).');\n }\n};\n\n// Pin the image's CDK CLI to the CLI's own aws-cdk version so it can always\n// read the assembly schema the host synthesized.\nconst buildDeployerImage = async (cdkVersion: string): Promise<void> => {\n console.log(`Building deployer image [${IMAGE_TAG}] (aws-cdk ${cdkVersion})`);\n await runCommand('docker', ['build', '-t', IMAGE_TAG, '--build-arg', `CDK_VERSION=${cdkVersion}`, getDockerDir()]);\n};\n\n// Deploy one stack from a pre-synthesized assembly in a throwaway container\n// named <service>-<stackType> (e.g. mini-web) so `docker ps` reads cleanly.\n// The assembly mounts read-only and is copied container-local first — the CDK\n// CLI writes lock files next to the assembly it reads, and the copy keeps\n// parallel api/web deploys of the same service fully isolated.\nconst dockerDeployStack = async (\n color: number,\n serviceName: string,\n stackType: 'inf' | 'api' | 'web',\n stackName: string,\n assemblyDir: string,\n): Promise<void> => {\n const containerName = `${serviceName}-${stackType}`;\n await removeContainer(containerName);\n await runCommandPrefixed(\n `${stackType}:${serviceName}`,\n 'docker',\n [\n 'run',\n '--rm',\n '--name',\n containerName,\n '-v',\n `${assemblyDir}:/assembly:ro`,\n ...AWS_ENV_PASSTHROUGH.flatMap((name) => ['-e', name]),\n IMAGE_TAG,\n 'bash',\n '-c',\n `cp -r /assembly /work/assembly && cdk deploy ${stackName} --app /work/assembly --require-approval never --progress events`,\n ],\n { color },\n );\n};\n\n// Sync one service's pre-built views to S3 in a throwaway aws-cli container\n// named <service>-views. The official image's entrypoint is `aws`. Multiple\n// destinations (shell → website root + views prefix) run sequentially within\n// the service, reusing the container name. Mirrors the host-side syncViewsToS3\n// cache policy: hashed assets immutable, the fixed-name entry points re-uploaded\n// with no-cache every deploy (see NO_CACHE_FILES).\nconst dockerSyncViews = async (color: number, serviceName: string, views: GoDockerViewsEntry): Promise<void> => {\n const containerName = `${serviceName}-views`;\n const distDir = fromManifestPath(views.dir);\n\n const runAwsCli = async (awsArgs: string[]): Promise<void> => {\n await removeContainer(containerName);\n await runCommandPrefixed(\n `views:${serviceName}`,\n 'docker',\n [\n 'run',\n '--rm',\n '--name',\n containerName,\n '-v',\n `${distDir}:/views:ro`,\n ...AWS_ENV_PASSTHROUGH.flatMap((name) => ['-e', name]),\n AWS_CLI_IMAGE,\n ...awsArgs,\n ],\n { color },\n );\n };\n\n for (const destination of views.destinations) {\n await runAwsCli([\n 's3',\n 'sync',\n '/views',\n destination,\n '--cache-control',\n 'public,max-age=31536000,immutable',\n ...NO_CACHE_FILES.flatMap((file) => ['--exclude', file]),\n ]);\n\n for (const file of NO_CACHE_FILES) {\n if (!fs.existsSync(path.join(distDir, file))) {\n continue;\n }\n\n await runAwsCli(['s3', 'cp', `/views/${file}`, `${destination}/${file}`, '--cache-control', 'no-cache']);\n }\n }\n};\n\n// Publish one service's already-built federated remote to S3 in a throwaway\n// aws-cli container named <service>-publish. The version dir (everything the\n// manifest references) syncs first, then the manifest.json is copied last —\n// same ordering guarantee as the host-side publish, so a reading lambda never\n// sees a manifest whose files aren't all present yet.\nconst dockerPublishRemote = async (color: number, serviceName: string, remote: GoDockerRemoteEntry): Promise<void> => {\n const { manifestHash, bucketName, servicePrefix } = remote;\n const publishPath = fromManifestPath(remote.dir);\n const containerName = `${serviceName}-publish`;\n\n // /publish is the service-remote-published dir; the hashed version subdir and\n // manifest.json both live directly under it.\n const s3Operations: string[][] = [\n ['s3', 'sync', `/publish/${manifestHash}`, `s3://${bucketName}/${servicePrefix}/${manifestHash}`],\n ['s3', 'cp', '/publish/manifest.json', `s3://${bucketName}/${servicePrefix}/manifest.json`],\n ];\n\n for (const s3Operation of s3Operations) {\n await removeContainer(containerName);\n await runCommandPrefixed(\n `publish:${serviceName}`,\n 'docker',\n [\n 'run',\n '--rm',\n '--name',\n containerName,\n '-v',\n `${publishPath}:/publish:ro`,\n ...AWS_ENV_PASSTHROUGH.flatMap((name) => ['-e', name]),\n AWS_CLI_IMAGE,\n ...s3Operation,\n ],\n { color },\n );\n }\n};\n\nconst resolveRemoteEntry = (appName: string, service: string): GoDockerRemoteEntry => {\n const { publishPath, manifestHash, bucketName, servicePrefix } = resolvePublishTarget(appName, service);\n return { dir: toManifestPath(publishPath), manifestHash, bucketName, servicePrefix };\n};\n\n// Everything the deploy half needs that only the live config can answer,\n// resolved here while the workspace is built and the config loads.\nconst resolveBuildManifest = (\n appName: string,\n deploymentName: string,\n service: string,\n stacks: StackType,\n hasViews: boolean,\n hasRemote: boolean,\n cdkVersion: string,\n): GoDockerBuildManifest => {\n const qpqConfig = loadServiceQpqConfig(appName, service);\n\n return {\n cdkVersion,\n deploymentName,\n builtFor: stacks,\n stacks:\n stacks === 'views'\n ? null\n : {\n inf: qpqDeployAwsUtils.getInfStackName(qpqConfig),\n api: qpqDeployAwsUtils.getApiStackName(qpqConfig),\n web: qpqDeployAwsUtils.getWebStackName(qpqConfig),\n },\n views: hasViews ? { dir: toManifestPath(getViewsDistDir(appName, service)), destinations: getViewsS3Destinations(appName, service) } : null,\n remote: hasRemote ? resolveRemoteEntry(appName, service) : null,\n };\n};\n\n// The directories a CI job uploads to carry one service's saved build to the\n// deploy job, root-relative.\nconst getSavedBuildDirs = (appName: string, service: string, manifest: GoDockerBuildManifest): string[] => [\n toManifestPath(getGoDockerBuildDir(appName, service)),\n ...(manifest.views ? [manifest.views.dir] : []),\n ...(manifest.remote ? [manifest.remote.dir] : []),\n];\n\nconst buildGoDockerOutput = async (appName: string, deploymentName: string, plan: ServicesPlan): Promise<void> => {\n const { services, stacks } = plan;\n const need = getStackNeeds(stacks);\n const needCdkSynth = stacks !== 'views';\n\n const viewServices = need.views ? services.filter((service) => getServiceNamesWithViews(appName).includes(service)) : [];\n\n console.log('\\n=== Build ===\\n');\n\n // A stale assembly or manifest from an earlier build must not outlive a\n // change of stack selection, so every selected service starts empty.\n for (const service of services) {\n fs.rmSync(getGoDockerBuildDir(appName, service), { recursive: true, force: true });\n }\n\n await runAppHook(appName, 'predeploy');\n\n // Workspace packages resolve through their built dist/ (package.json main),\n // so bundles would ship stale code unless every lib is tsc'd first. Other\n // apps' packages are skipped: nothing this app deploys can import them\n // unless it declares them, and declared ones are built.\n console.log('Building workspace packages');\n assertNoFailures('Workspace build', await runHookForAppPackages('build', appName, getDefaultHookJobs()));\n\n // Synth the selected services' QPQ configs (and shell's, which the views\n // destinations resolve from) so a config that fails to load fails here,\n // before any bundling. In-process: it's just config loads + JSON writes.\n const qpqSynthServices = [...new Set([...services, ...(need.views ? ['shell'] : [])])];\n for (const service of qpqSynthServices) {\n await synthCommand([service, '--app', appName]);\n }\n\n // Federated remotes are the backend story code, so they are rebuilt (and\n // later republished) whenever the api stack is. Skips services without\n // defineFederatedModuleStore(...). Detected here (after the workspace build)\n // because it loads each service's config.\n const federatedServices = need.api ? getServiceNamesWithFederation(appName, services) : [];\n\n if (needCdkSynth) {\n assertNoFailures(\n 'API bundling',\n await runTasks(\n services.map((service) => ({\n label: `bundle-api:${service}`,\n run: async () => {\n console.log(`Bundling api: [${service}]`);\n const qpqConfig = loadServiceQpqConfig(appName, service);\n await runRspack(getServiceRspackConfig(qpqConfig, path.join(getServiceDirectory(appName, service), 'service')));\n },\n })),\n BUILD_CONCURRENCY,\n ),\n );\n }\n\n assertNoFailures(\n 'Views bundling',\n await runTasks(\n viewServices.map((service) => ({\n label: `bundle-views:${service}`,\n run: async () => {\n console.log(`Bundling views: [${service}]`);\n await bundleViews(appName, service);\n },\n })),\n BUILD_CONCURRENCY,\n ),\n );\n\n // Build the federated remotes now (rspack needs the workspace), so the\n // publish wave only has to sync the already-built output — mirroring how\n // views are bundled here and synced later.\n assertNoFailures(\n 'Remote bundling',\n await runTasks(\n federatedServices.map((service) => ({\n label: `bundle-remote:${service}`,\n run: async () => {\n console.log(`Bundling federated remote: [${service}]`);\n await buildRemote(appName, service);\n },\n })),\n BUILD_CONCURRENCY,\n ),\n );\n\n if (needCdkSynth) {\n // One self-contained cloud assembly per service (all its stacks + staged\n // assets) — separate --output dirs so synths can run in parallel and\n // containers never share mutable state.\n assertNoFailures(\n 'CDK synth',\n await runTasks(\n services.map((service) => ({\n label: `cdk-synth:${service}`,\n run: () =>\n runCommandPrefixed(\n `cdk-synth:${service}`,\n 'npx',\n ['cdk', 'synth', '--quiet', '--app', getCdkAppCommand(), '--output', getGoDockerAssemblyDir(appName, service)],\n {\n cwd: getRoot(),\n env: { DEPLOY_SERVICE_NAME: service, DEPLOY_APP_NAME: appName },\n color: nextPrefixColor(),\n },\n ),\n })),\n BUILD_CONCURRENCY,\n ),\n );\n }\n\n // Manifests are written last, so one only ever exists beside a complete build.\n const cdkVersion = getCdkCliVersion();\n for (const service of services) {\n const manifest = resolveBuildManifest(\n appName,\n deploymentName,\n service,\n stacks,\n viewServices.includes(service),\n federatedServices.includes(service),\n cdkVersion,\n );\n writeGoDockerBuildManifest(appName, service, manifest);\n\n console.log(`Saved build for [${service}]:`);\n for (const dir of getSavedBuildDirs(appName, service, manifest)) {\n console.log(` ${dir}`);\n }\n }\n};\n\n// A deploy phase runs from a saved build only when that build was made for it:\n// `all` covers every phase, any other selection only its own. A build made for\n// `inf` has an assembly the api stack could deploy from, but no remote to\n// publish after it, which is exactly the stale-stories deploy the publish\n// ordering exists to prevent.\nconst readCheckedManifest = (\n appName: string,\n deploymentName: string,\n service: string,\n stacks: StackType,\n cdkVersion: string,\n): GoDockerBuildManifest => {\n const manifest = readGoDockerBuildManifest(appName, service);\n const rebuild = `rebuild it with \\`qpq go:docker ${service} ${stacks} --build-only --app ${appName} --deployment ${deploymentName}\\``;\n\n if (manifest.cdkVersion !== cdkVersion) {\n throw new Error(`saved build for [${service}] was synthesized with aws-cdk ${manifest.cdkVersion}, this qpq has ${cdkVersion}; ${rebuild}`);\n }\n if (manifest.deploymentName !== deploymentName) {\n throw new Error(`saved build for [${service}] is for deployment '${manifest.deploymentName}', not '${deploymentName}'; ${rebuild}`);\n }\n if (manifest.builtFor !== 'all' && manifest.builtFor !== stacks) {\n throw new Error(`saved build for [${service}] was built for '${manifest.builtFor}' stacks and cannot deploy '${stacks}'; ${rebuild}`);\n }\n\n return manifest;\n};\n\nconst getStackName = (manifest: GoDockerBuildManifest, service: string, stackType: 'inf' | 'api' | 'web'): string => {\n if (!manifest.stacks) {\n throw new Error(`saved build for [${service}] has no cloud assembly (it was built for views only)`);\n }\n return manifest.stacks[stackType];\n};\n\nconst deployGoDockerOutput = async (appName: string, deploymentName: string, plan: ServicesPlan): Promise<void> => {\n const { services, stacks } = plan;\n const need = getStackNeeds(stacks);\n const needCdkDeploys = stacks !== 'views';\n\n // Every manifest is read and checked up front, so one missing or mismatched\n // build fails the run before any container starts.\n const cdkVersion = getCdkCliVersion();\n const manifests = new Map(services.map((service) => [service, readCheckedManifest(appName, deploymentName, service, stacks, cdkVersion)]));\n const manifestFor = (service: string): GoDockerBuildManifest => manifests.get(service)!;\n\n const viewServices = need.views ? services.filter((service) => manifestFor(service).views !== null) : [];\n const federatedServices = need.api ? services.filter((service) => manifestFor(service).remote !== null) : [];\n\n // Federated publish needs the api stack (need.api ⇒ needCdkDeploys), so any\n // docker preflight it requires is already covered by these two checks.\n if (needCdkDeploys || viewServices.length > 0) {\n await assertDockerRunning();\n }\n if (needCdkDeploys) {\n await buildDeployerImage(cdkVersion);\n }\n\n // The aws-cli image backs both the views sync and the federated publish\n // waves. Pull once now so those waves don't race N containers into pulling\n // the same image.\n if (viewServices.length > 0 || federatedServices.length > 0) {\n await runCommand('docker', ['pull', AWS_CLI_IMAGE]);\n }\n\n // ---- Wave 1: inf stacks, one container per service, all concurrent ----\n if (need.inf) {\n console.log('\\n=== Deploy inf stacks (docker) ===\\n');\n logTimeStart('infWave');\n assertNoFailures(\n 'Inf deploy',\n await runTasks(\n services.map((service) => ({\n label: `inf:${service}`,\n run: () =>\n dockerDeployStack(\n nextPrefixColor(),\n service,\n 'inf',\n getStackName(manifestFor(service), service, 'inf'),\n getGoDockerAssemblyDir(appName, service),\n ),\n })),\n DEPLOY_CONCURRENCY,\n ),\n );\n logTimeEnd('infWave');\n }\n\n // ---- Wave 2: api + web stacks, all concurrent ----\n if (need.api || need.web) {\n console.log('\\n=== Deploy api + web stacks (docker) ===\\n');\n logTimeStart('apiWebWave');\n assertNoFailures(\n 'Api/Web deploy',\n await runTasks(\n (['api', 'web'] as const)\n .filter((stackType) => (stackType === 'api' ? need.api : need.web))\n .flatMap((stackType) =>\n services.map((service) => ({\n label: `${stackType}:${service}`,\n run: () =>\n dockerDeployStack(\n nextPrefixColor(),\n service,\n stackType,\n getStackName(manifestFor(service), service, stackType),\n getGoDockerAssemblyDir(appName, service),\n ),\n })),\n ),\n DEPLOY_CONCURRENCY,\n ),\n );\n logTimeEnd('apiWebWave');\n }\n\n // ---- Views: sync the pre-built bundles to S3, all concurrent ----\n if (viewServices.length > 0) {\n console.log('\\n=== Sync views to S3 (docker) ===\\n');\n logTimeStart('viewsWave');\n assertNoFailures(\n 'Views sync',\n await runTasks(\n viewServices.map((service) => ({\n label: `views:${service}`,\n run: () => dockerSyncViews(nextPrefixColor(), service, manifestFor(service).views!),\n })),\n DEPLOY_CONCURRENCY,\n ),\n );\n logTimeEnd('viewsWave');\n }\n\n // ---- Publish: the pre-built federated remotes to S3, all concurrent ----\n if (federatedServices.length > 0) {\n console.log('\\n=== Publish federated remotes to S3 (docker) ===\\n');\n logTimeStart('publishWave');\n assertNoFailures(\n 'Federated publish',\n await runTasks(\n federatedServices.map((service) => ({\n label: `publish:${service}`,\n run: () => dockerPublishRemote(nextPrefixColor(), service, manifestFor(service).remote!),\n })),\n DEPLOY_CONCURRENCY,\n ),\n );\n logTimeEnd('publishWave');\n }\n};\n\nexport const awsGoDocker = async (appName: string, plan: DeployPlan, mode: GoDockerMode): Promise<void> => {\n if (plan.kind === 'cancelled') {\n return;\n }\n\n if ((await isAwsCredentialsValid()) === false) {\n console.log('Credentials are expired or invalid.');\n return;\n }\n\n logTimeStart('totalTime');\n\n if (plan.kind === 'account') {\n await deployAccountStack(plan.appName);\n logTimeEnd('totalTime');\n return;\n }\n\n if (plan.kind === 'bootstrap') {\n if (plan.includeDomain) {\n await deployDomainStack(plan.appName);\n }\n await deployBootstrapStack(plan.appName);\n logTimeEnd('totalTime');\n return;\n }\n\n // resolveDeployment primed the selection before this driver ran. The manifest\n // records it so a build for one deployment can never deploy to another.\n const deploymentName = process.env[QpqDeployEnvVar.deployName];\n if (!deploymentName) {\n throw new Error(`no deployment selected (${QpqDeployEnvVar.deployName} is unset)`);\n }\n\n console.log(`\\n\\nRunning dockerized deploy (${mode})\\n\\n`);\n console.log('Executing for services');\n console.log(plan.services.join(', '));\n\n if (mode !== 'from-build') {\n await buildGoDockerOutput(appName, deploymentName, plan);\n }\n if (mode !== 'build-only') {\n await deployGoDockerOutput(appName, deploymentName, plan);\n }\n\n logTimeEnd('totalTime');\n};\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Nullable } from '@qpqjs/core';
|
|
2
|
+
import { StackType } from '../../lib/deployPrompts';
|
|
3
|
+
/** The CloudFormation stack names of one service's assembly. */
|
|
4
|
+
export type GoDockerStackNames = {
|
|
5
|
+
inf: string;
|
|
6
|
+
api: string;
|
|
7
|
+
web: string;
|
|
8
|
+
};
|
|
9
|
+
/** A built views bundle and the S3 locations it syncs to. */
|
|
10
|
+
export type GoDockerViewsEntry = {
|
|
11
|
+
dir: string;
|
|
12
|
+
destinations: string[];
|
|
13
|
+
};
|
|
14
|
+
/** A built federated remote (its publish dir and the store it goes into). */
|
|
15
|
+
export type GoDockerRemoteEntry = {
|
|
16
|
+
dir: string;
|
|
17
|
+
manifestHash: string;
|
|
18
|
+
bucketName: string;
|
|
19
|
+
servicePrefix: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Everything the deploy half needs for one service that only the live config can
|
|
23
|
+
* answer, resolved by the build half. Paths are relative to the consumer root with
|
|
24
|
+
* forward slashes, so a build saved on one machine deploys from another checkout.
|
|
25
|
+
*/
|
|
26
|
+
export type GoDockerBuildManifest = {
|
|
27
|
+
cdkVersion: string;
|
|
28
|
+
deploymentName: string;
|
|
29
|
+
builtFor: StackType;
|
|
30
|
+
stacks: Nullable<GoDockerStackNames>;
|
|
31
|
+
views: Nullable<GoDockerViewsEntry>;
|
|
32
|
+
remote: Nullable<GoDockerRemoteEntry>;
|
|
33
|
+
};
|
|
34
|
+
/** The per-service directory the build half owns: the cloud assembly and the manifest. */
|
|
35
|
+
export declare const getGoDockerBuildDir: (appName: string, serviceName: string) => string;
|
|
36
|
+
/** Where `cdk synth --output` writes the service's self-contained cloud assembly. */
|
|
37
|
+
export declare const getGoDockerAssemblyDir: (appName: string, serviceName: string) => string;
|
|
38
|
+
/** A path under the consumer root, as the manifest stores it. */
|
|
39
|
+
export declare const toManifestPath: (absolutePath: string) => string;
|
|
40
|
+
/** The absolute path a manifest entry points at on this machine. */
|
|
41
|
+
export declare const fromManifestPath: (manifestPath: string) => string;
|
|
42
|
+
export declare const writeGoDockerBuildManifest: (appName: string, serviceName: string, manifest: GoDockerBuildManifest) => void;
|
|
43
|
+
/** Throws, naming the directory and the command that fills it, when the service has no saved build. */
|
|
44
|
+
export declare const readGoDockerBuildManifest: (appName: string, serviceName: string) => GoDockerBuildManifest;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { getRoot } from '../../lib/discovery';
|
|
4
|
+
const MANIFEST_FILE = 'deploy.json';
|
|
5
|
+
/** The per-service directory the build half owns: the cloud assembly and the manifest. */
|
|
6
|
+
export const getGoDockerBuildDir = (appName, serviceName) => path.join(getRoot(), 'dist', 'qpq', 'go-docker', appName, serviceName);
|
|
7
|
+
/** Where `cdk synth --output` writes the service's self-contained cloud assembly. */
|
|
8
|
+
export const getGoDockerAssemblyDir = (appName, serviceName) => path.join(getGoDockerBuildDir(appName, serviceName), 'assembly');
|
|
9
|
+
/** A path under the consumer root, as the manifest stores it. */
|
|
10
|
+
export const toManifestPath = (absolutePath) => path.relative(getRoot(), absolutePath).split(path.sep).join('/');
|
|
11
|
+
/** The absolute path a manifest entry points at on this machine. */
|
|
12
|
+
export const fromManifestPath = (manifestPath) => path.resolve(getRoot(), manifestPath);
|
|
13
|
+
export const writeGoDockerBuildManifest = (appName, serviceName, manifest) => {
|
|
14
|
+
const buildDir = getGoDockerBuildDir(appName, serviceName);
|
|
15
|
+
fs.mkdirSync(buildDir, { recursive: true });
|
|
16
|
+
fs.writeFileSync(path.join(buildDir, MANIFEST_FILE), JSON.stringify(manifest, null, 2));
|
|
17
|
+
};
|
|
18
|
+
/** Throws, naming the directory and the command that fills it, when the service has no saved build. */
|
|
19
|
+
export const readGoDockerBuildManifest = (appName, serviceName) => {
|
|
20
|
+
const manifestPath = path.join(getGoDockerBuildDir(appName, serviceName), MANIFEST_FILE);
|
|
21
|
+
if (!fs.existsSync(manifestPath)) {
|
|
22
|
+
throw new Error(`no saved build for [${serviceName}] (missing ${manifestPath}) - run \`qpq go:docker ${serviceName} <stack> --build-only --app ${appName}\` first`);
|
|
23
|
+
}
|
|
24
|
+
return JSON.parse(fs.readFileSync(manifestPath, 'utf-8'));
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=goDockerManifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goDockerManifest.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AAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1F,CAAC,CAAC;AAEF,uGAAuG;AACvG,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAAe,EAAE,WAAmB,EAAyB,EAAE;IACvG,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,aAAa,CAAC,CAAC;IAEzF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb,uBAAuB,WAAW,cAAc,YAAY,2BAA2B,WAAW,+BAA+B,OAAO,UAAU,CACnJ,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAA0B,CAAC;AACrF,CAAC,CAAC","sourcesContent":["// The saved build `qpq go:docker --build-only` leaves behind and `--from-build`\n// deploys from. Per service it is the CDK cloud assembly plus a manifest under\n// dist/qpq/go-docker/<app>/<service>, with the views bundle and the federated\n// remote left where their bundlers write them and pointed at from the manifest.\nimport { Nullable } from '@qpqjs/core';\n\nimport fs from 'fs';\nimport path from 'path';\n\nimport { StackType } from '../../lib/deployPrompts';\nimport { getRoot } from '../../lib/discovery';\n\n/** The CloudFormation stack names of one service's assembly. */\nexport type GoDockerStackNames = { inf: string; api: string; web: string };\n\n/** A built views bundle and the S3 locations it syncs to. */\nexport type GoDockerViewsEntry = { dir: string; destinations: string[] };\n\n/** A built federated remote (its publish dir and the store it goes into). */\nexport type GoDockerRemoteEntry = { dir: string; manifestHash: string; bucketName: string; servicePrefix: string };\n\n/**\n * Everything the deploy half needs for one service that only the live config can\n * answer, resolved by the build half. Paths are relative to the consumer root with\n * forward slashes, so a build saved on one machine deploys from another checkout.\n */\nexport type GoDockerBuildManifest = {\n // The aws-cdk that synthesized the assembly; the deploy half refuses any other.\n cdkVersion: string;\n deploymentName: string;\n // The stack selection the build ran with: `all` can deploy any phase, anything else only its own.\n builtFor: StackType;\n // Null for a views-only build, which synthesizes nothing.\n stacks: Nullable<GoDockerStackNames>;\n // Null when the service has no views or they were not built.\n views: Nullable<GoDockerViewsEntry>;\n // Null when the service has no defineFederatedModuleStore(...) or the api was not built.\n remote: Nullable<GoDockerRemoteEntry>;\n};\n\nconst MANIFEST_FILE = 'deploy.json';\n\n/** The per-service directory the build half owns: the cloud assembly and the manifest. */\nexport const getGoDockerBuildDir = (appName: string, serviceName: string): string =>\n path.join(getRoot(), 'dist', 'qpq', 'go-docker', appName, serviceName);\n\n/** Where `cdk synth --output` writes the service's self-contained cloud assembly. */\nexport const getGoDockerAssemblyDir = (appName: string, serviceName: string): string =>\n path.join(getGoDockerBuildDir(appName, serviceName), 'assembly');\n\n/** A path under the consumer root, as the manifest stores it. */\nexport const toManifestPath = (absolutePath: string): string => path.relative(getRoot(), absolutePath).split(path.sep).join('/');\n\n/** The absolute path a manifest entry points at on this machine. */\nexport const fromManifestPath = (manifestPath: string): string => path.resolve(getRoot(), manifestPath);\n\nexport const writeGoDockerBuildManifest = (appName: string, serviceName: string, manifest: GoDockerBuildManifest): void => {\n const buildDir = getGoDockerBuildDir(appName, serviceName);\n fs.mkdirSync(buildDir, { recursive: true });\n fs.writeFileSync(path.join(buildDir, MANIFEST_FILE), JSON.stringify(manifest, null, 2));\n};\n\n/** Throws, naming the directory and the command that fills it, when the service has no saved build. */\nexport const readGoDockerBuildManifest = (appName: string, serviceName: string): GoDockerBuildManifest => {\n const manifestPath = path.join(getGoDockerBuildDir(appName, serviceName), MANIFEST_FILE);\n\n if (!fs.existsSync(manifestPath)) {\n throw new Error(\n `no saved build for [${serviceName}] (missing ${manifestPath}) - run \\`qpq go:docker ${serviceName} <stack> --build-only --app ${appName}\\` first`,\n );\n }\n\n return JSON.parse(fs.readFileSync(manifestPath, 'utf-8')) as GoDockerBuildManifest;\n};\n"]}
|