fjall 2.1.1 → 2.2.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/.bundled +3 -3
- package/bin/.metafile.json +28 -13
- package/bin/assets/generators/account/generator.js +133 -2
- package/bin/assets/generators/application/generator.js +382 -3
- package/bin/assets/generators/cdn/generator.js +436 -3
- package/bin/assets/generators/compute/generator.js +439 -1
- package/bin/assets/generators/compute/service/generator.js +338 -1
- package/bin/assets/generators/database/generator.js +439 -1
- package/bin/assets/generators/database/proxy/generator.js +338 -1
- package/bin/assets/generators/domain/generator.js +133 -2
- package/bin/assets/generators/network/generator.js +338 -1
- package/bin/assets/generators/organisation/generator.js +133 -2
- package/bin/assets/generators/shared/files/package.json +2 -2
- package/bin/assets/generators/storage/s3/generator.js +439 -1
- package/bin/assets/generators/tunnel/generator.js +338 -1
- package/bin/fjall.bundle.js +304 -304
- package/package.json +3 -3
- package/bin/assets/generators/account/generator.d.ts +0 -8
- package/bin/assets/generators/account/index.d.ts +0 -1
- package/bin/assets/generators/account/index.js +0 -1
- package/bin/assets/generators/application/generator.d.ts +0 -4
- package/bin/assets/generators/application/index.d.ts +0 -1
- package/bin/assets/generators/application/index.js +0 -1
- package/bin/assets/generators/cdn/generator.d.ts +0 -4
- package/bin/assets/generators/cdn/index.d.ts +0 -1
- package/bin/assets/generators/cdn/index.js +0 -1
- package/bin/assets/generators/compute/computeIntegrationHelpers.d.ts +0 -134
- package/bin/assets/generators/compute/computeIntegrationHelpers.js +0 -1
- package/bin/assets/generators/compute/generator.d.ts +0 -4
- package/bin/assets/generators/compute/index.d.ts +0 -1
- package/bin/assets/generators/compute/index.js +0 -1
- package/bin/assets/generators/compute/service/generator.d.ts +0 -4
- package/bin/assets/generators/compute/service/index.d.ts +0 -1
- package/bin/assets/generators/compute/service/index.js +0 -1
- package/bin/assets/generators/database/databaseIntegrationTestUtils.d.ts +0 -134
- package/bin/assets/generators/database/databaseIntegrationTestUtils.js +0 -1
- package/bin/assets/generators/database/generator.d.ts +0 -4
- package/bin/assets/generators/database/index.d.ts +0 -1
- package/bin/assets/generators/database/index.js +0 -1
- package/bin/assets/generators/database/proxy/generator.d.ts +0 -4
- package/bin/assets/generators/database/proxy/index.d.ts +0 -1
- package/bin/assets/generators/database/proxy/index.js +0 -1
- package/bin/assets/generators/domain/generator.d.ts +0 -10
- package/bin/assets/generators/domain/index.d.ts +0 -1
- package/bin/assets/generators/domain/index.js +0 -1
- package/bin/assets/generators/messaging/index.d.ts +0 -1
- package/bin/assets/generators/messaging/index.js +0 -0
- package/bin/assets/generators/network/generator.d.ts +0 -4
- package/bin/assets/generators/network/index.d.ts +0 -1
- package/bin/assets/generators/network/index.js +0 -1
- package/bin/assets/generators/organisation/generator.d.ts +0 -4
- package/bin/assets/generators/organisation/index.d.ts +0 -1
- package/bin/assets/generators/organisation/index.js +0 -1
- package/bin/assets/generators/storage/index.d.ts +0 -1
- package/bin/assets/generators/storage/index.js +0 -1
- package/bin/assets/generators/storage/s3/generator.d.ts +0 -4
- package/bin/assets/generators/tunnel/generator.d.ts +0 -4
- package/bin/assets/generators/tunnel/index.d.ts +0 -1
- package/bin/assets/generators/tunnel/index.js +0 -1
- package/bin/assets/generators/utils/ast/astCodeModification.d.ts +0 -23
- package/bin/assets/generators/utils/ast/astCodeModification.js +0 -1
- package/bin/assets/generators/utils/ast/astDomainRewriter.d.ts +0 -65
- package/bin/assets/generators/utils/ast/astDomainRewriter.js +0 -1
- package/bin/assets/generators/utils/ast/astSurgicalModification.d.ts +0 -2
- package/bin/assets/generators/utils/ast/astSurgicalModification.js +0 -1
- package/bin/assets/generators/utils/ast/index.d.ts +0 -3
- package/bin/assets/generators/utils/ast/index.js +0 -1
- package/bin/assets/generators/utils/copySharedFiles.d.ts +0 -10
- package/bin/assets/generators/utils/copySharedFiles.js +0 -1
- package/bin/assets/generators/utils/index.d.ts +0 -8
- package/bin/assets/generators/utils/index.js +0 -1
- package/bin/assets/generators/utils/integrationTestUtils.d.ts +0 -138
- package/bin/assets/generators/utils/integrationTestUtils.js +0 -4
- package/bin/assets/generators/utils/mockTree.d.ts +0 -30
- package/bin/assets/generators/utils/mockTree.js +0 -1
- package/bin/assets/generators/utils/planning/generatorHelpers.d.ts +0 -35
- package/bin/assets/generators/utils/planning/generatorHelpers.js +0 -2
- package/bin/assets/generators/utils/planning/index.d.ts +0 -1
- package/bin/assets/generators/utils/planning/index.js +0 -1
- package/bin/assets/generators/utils/prompts.d.ts +0 -4
- package/bin/assets/generators/utils/prompts.js +0 -6
- package/bin/assets/generators/utils/renderEjs.d.ts +0 -24
- package/bin/assets/generators/utils/renderEjs.js +0 -1
- package/bin/assets/generators/utils/resources/connectionHelpers.d.ts +0 -19
- package/bin/assets/generators/utils/resources/connectionHelpers.js +0 -1
- package/bin/assets/generators/utils/resources/index.d.ts +0 -4
- package/bin/assets/generators/utils/resources/index.js +0 -1
- package/bin/assets/generators/utils/resources/promptValidation.d.ts +0 -42
- package/bin/assets/generators/utils/resources/promptValidation.js +0 -1
- package/bin/assets/generators/utils/resources/resourceDetection.d.ts +0 -12
- package/bin/assets/generators/utils/resources/resourceDetection.js +0 -1
- package/bin/assets/generators/utils/resources/resourceNaming.d.ts +0 -6
- package/bin/assets/generators/utils/resources/resourceNaming.js +0 -1
- package/bin/assets/generators/utils/tree.d.ts +0 -25
- package/bin/assets/generators/utils/tree.js +0 -1
- package/bin/assets/src/util/__tests__/fjallApiClientTestHelpers.d.ts +0 -9
- package/bin/assets/src/util/__tests__/fjallApiClientTestHelpers.js +0 -1
- package/bin/assets/src/util/__tests__/outputTestHelpers.d.ts +0 -9
- package/bin/assets/src/util/__tests__/outputTestHelpers.js +0 -1
- package/bin/assets/src/util/agent/__tests__/toonTestHelpers.d.ts +0 -91
- package/bin/assets/src/util/agent/__tests__/toonTestHelpers.js +0 -1
- package/bin/assets/src/util/agent/actionRequired.d.ts +0 -60
- package/bin/assets/src/util/agent/actionRequired.js +0 -1
- package/bin/assets/src/util/agent/agentCallbacks.d.ts +0 -21
- package/bin/assets/src/util/agent/agentCallbacks.js +0 -1
- package/bin/assets/src/util/agent/agentInit.d.ts +0 -17
- package/bin/assets/src/util/agent/agentInit.js +0 -288
- package/bin/assets/src/util/agent/agentOutput.d.ts +0 -61
- package/bin/assets/src/util/agent/agentOutput.js +0 -8
- package/bin/assets/src/util/agent/budget.d.ts +0 -19
- package/bin/assets/src/util/agent/budget.js +0 -4
- package/bin/assets/src/util/agent/detectAgent.d.ts +0 -51
- package/bin/assets/src/util/agent/detectAgent.js +0 -1
- package/bin/assets/src/util/agent/errorCodeMap.d.ts +0 -16
- package/bin/assets/src/util/agent/errorCodeMap.js +0 -1
- package/bin/assets/src/util/agent/errorCodes.d.ts +0 -48
- package/bin/assets/src/util/agent/errorCodes.js +0 -1
- package/bin/assets/src/util/agent/fieldSelection.d.ts +0 -22
- package/bin/assets/src/util/agent/fieldSelection.js +0 -1
- package/bin/assets/src/util/agent/getSurface.d.ts +0 -27
- package/bin/assets/src/util/agent/getSurface.js +0 -1
- package/bin/assets/src/util/agent/index.d.ts +0 -27
- package/bin/assets/src/util/agent/index.js +0 -1
- package/bin/assets/src/util/agent/mcpProtocolEmit.d.ts +0 -31
- package/bin/assets/src/util/agent/mcpProtocolEmit.js +0 -2
- package/bin/assets/src/util/agent/schemas/appsSchemas.d.ts +0 -18
- package/bin/assets/src/util/agent/schemas/appsSchemas.js +0 -1
- package/bin/assets/src/util/agent/schemas/assetSchemas.d.ts +0 -13
- package/bin/assets/src/util/agent/schemas/assetSchemas.js +0 -1
- package/bin/assets/src/util/agent/schemas/awsSchemas.d.ts +0 -5
- package/bin/assets/src/util/agent/schemas/awsSchemas.js +0 -1
- package/bin/assets/src/util/agent/schemas/deploySchemas.d.ts +0 -8
- package/bin/assets/src/util/agent/schemas/deploySchemas.js +0 -1
- package/bin/assets/src/util/agent/schemas/index.d.ts +0 -10
- package/bin/assets/src/util/agent/schemas/index.js +0 -1
- package/bin/assets/src/util/agent/schemas/infraSchemas.d.ts +0 -45
- package/bin/assets/src/util/agent/schemas/infraSchemas.js +0 -1
- package/bin/assets/src/util/agent/schemas/secretsSchemas.d.ts +0 -13
- package/bin/assets/src/util/agent/schemas/secretsSchemas.js +0 -1
- package/bin/assets/src/util/agent/schemas/types.d.ts +0 -98
- package/bin/assets/src/util/agent/schemas/types.js +0 -0
- package/bin/assets/src/util/agent/schemas/userSchemas.d.ts +0 -21
- package/bin/assets/src/util/agent/schemas/userSchemas.js +0 -1
- package/bin/assets/src/util/agent/sessionHooks.d.ts +0 -47
- package/bin/assets/src/util/agent/sessionHooks.js +0 -6
- package/bin/assets/src/util/agent/streaming.d.ts +0 -51
- package/bin/assets/src/util/agent/streaming.js +0 -1
- package/bin/assets/src/util/agent/suggestionEntries/coreEntries.d.ts +0 -2
- package/bin/assets/src/util/agent/suggestionEntries/coreEntries.js +0 -1
- package/bin/assets/src/util/agent/suggestionEntries/identityEntries.d.ts +0 -2
- package/bin/assets/src/util/agent/suggestionEntries/identityEntries.js +0 -1
- package/bin/assets/src/util/agent/suggestionEntries/index.d.ts +0 -3
- package/bin/assets/src/util/agent/suggestionEntries/index.js +0 -1
- package/bin/assets/src/util/agent/suggestionEntries/infraEntries.d.ts +0 -2
- package/bin/assets/src/util/agent/suggestionEntries/infraEntries.js +0 -1
- package/bin/assets/src/util/agent/suggestionEntries/observabilityEntries.d.ts +0 -2
- package/bin/assets/src/util/agent/suggestionEntries/observabilityEntries.js +0 -1
- package/bin/assets/src/util/agent/suggestionEntries/secretsEntries.d.ts +0 -2
- package/bin/assets/src/util/agent/suggestionEntries/secretsEntries.js +0 -1
- package/bin/assets/src/util/agent/suggestionEntries/types.d.ts +0 -17
- package/bin/assets/src/util/agent/suggestionEntries/types.js +0 -1
- package/bin/assets/src/util/agent/suggestions.d.ts +0 -30
- package/bin/assets/src/util/agent/suggestions.js +0 -1
- package/bin/assets/src/util/agent/tokenScopes.d.ts +0 -24
- package/bin/assets/src/util/agent/tokenScopes.js +0 -1
- package/bin/assets/src/util/agent/toonFormatter.d.ts +0 -55
- package/bin/assets/src/util/agent/toonFormatter.js +0 -14
- package/bin/assets/src/util/api/Credentials.d.ts +0 -13
- package/bin/assets/src/util/api/Credentials.js +0 -1
- package/bin/assets/src/util/api/FjallApiClient.d.ts +0 -33
- package/bin/assets/src/util/api/FjallApiClient.js +0 -1
- package/bin/assets/src/util/api/FjallApiClient.types.d.ts +0 -375
- package/bin/assets/src/util/api/FjallApiClient.types.js +0 -1
- package/bin/assets/src/util/api/FjallApiClientBase.d.ts +0 -13
- package/bin/assets/src/util/api/FjallApiClientBase.js +0 -1
- package/bin/assets/src/util/api/FjallApiClientDeviceCode.d.ts +0 -13
- package/bin/assets/src/util/api/FjallApiClientDeviceCode.js +0 -1
- package/bin/assets/src/util/api/FjallApiClientErrors.d.ts +0 -5
- package/bin/assets/src/util/api/FjallApiClientErrors.js +0 -1
- package/bin/assets/src/util/api/FjallApiClientResources.d.ts +0 -45
- package/bin/assets/src/util/api/FjallApiClientResources.js +0 -1
- package/bin/assets/src/util/api/index.d.ts +0 -7
- package/bin/assets/src/util/api/index.js +0 -1
- package/bin/assets/src/util/api/resolveApiKey.d.ts +0 -1
- package/bin/assets/src/util/api/resolveApiKey.js +0 -1
- package/bin/assets/src/util/api/scaffoldNotification.d.ts +0 -2
- package/bin/assets/src/util/api/scaffoldNotification.js +0 -1
- package/bin/assets/src/util/awsCleanup.d.ts +0 -9
- package/bin/assets/src/util/awsCleanup.js +0 -1
- package/bin/assets/src/util/awsTags.d.ts +0 -19
- package/bin/assets/src/util/awsTags.js +0 -1
- package/bin/assets/src/util/buildxEventAdapter.d.ts +0 -20
- package/bin/assets/src/util/buildxEventAdapter.js +0 -1
- package/bin/assets/src/util/caseConversion.d.ts +0 -1
- package/bin/assets/src/util/caseConversion.js +0 -1
- package/bin/assets/src/util/codemod/emitCliTelemetry.d.ts +0 -32
- package/bin/assets/src/util/codemod/emitCliTelemetry.js +0 -1
- package/bin/assets/src/util/codemod/exitCodes.d.ts +0 -11
- package/bin/assets/src/util/codemod/exitCodes.js +0 -1
- package/bin/assets/src/util/codemod/index.d.ts +0 -3
- package/bin/assets/src/util/codemod/index.js +0 -1
- package/bin/assets/src/util/codemod/renderCodemod.d.ts +0 -5
- package/bin/assets/src/util/codemod/renderCodemod.js +0 -1
- package/bin/assets/src/util/codemod/stepLabels.d.ts +0 -11
- package/bin/assets/src/util/codemod/stepLabels.js +0 -1
- package/bin/assets/src/util/colourUtils.d.ts +0 -21
- package/bin/assets/src/util/colourUtils.js +0 -1
- package/bin/assets/src/util/commandErrorHandler.d.ts +0 -16
- package/bin/assets/src/util/commandErrorHandler.js +0 -1
- package/bin/assets/src/util/commandResult.d.ts +0 -63
- package/bin/assets/src/util/commandResult.js +0 -1
- package/bin/assets/src/util/concurrency.d.ts +0 -35
- package/bin/assets/src/util/concurrency.js +0 -1
- package/bin/assets/src/util/deploymentEvents.d.ts +0 -155
- package/bin/assets/src/util/deploymentEvents.js +0 -1
- package/bin/assets/src/util/diagnostics/cdkTmpdirCleanup.d.ts +0 -19
- package/bin/assets/src/util/diagnostics/cdkTmpdirCleanup.js +0 -1
- package/bin/assets/src/util/errorDisplay.d.ts +0 -4
- package/bin/assets/src/util/errorDisplay.js +0 -2
- package/bin/assets/src/util/errorUtils.d.ts +0 -1
- package/bin/assets/src/util/errorUtils.js +0 -1
- package/bin/assets/src/util/executionMode.d.ts +0 -18
- package/bin/assets/src/util/executionMode.js +0 -1
- package/bin/assets/src/util/formatDeltaValue.d.ts +0 -1
- package/bin/assets/src/util/formatDeltaValue.js +0 -1
- package/bin/assets/src/util/formatDuration.d.ts +0 -1
- package/bin/assets/src/util/formatDuration.js +0 -1
- package/bin/assets/src/util/formatRelativeTime.d.ts +0 -1
- package/bin/assets/src/util/formatRelativeTime.js +0 -1
- package/bin/assets/src/util/fuzzyMatch.d.ts +0 -38
- package/bin/assets/src/util/fuzzyMatch.js +0 -1
- package/bin/assets/src/util/gitDetection.d.ts +0 -8
- package/bin/assets/src/util/gitDetection.js +0 -1
- package/bin/assets/src/util/index.d.ts +0 -50
- package/bin/assets/src/util/index.js +0 -1
- package/bin/assets/src/util/log.d.ts +0 -29
- package/bin/assets/src/util/log.js +0 -4
- package/bin/assets/src/util/logger/CorrelatedLogger.d.ts +0 -15
- package/bin/assets/src/util/logger/CorrelatedLogger.js +0 -1
- package/bin/assets/src/util/logger/DeploymentLogger.d.ts +0 -33
- package/bin/assets/src/util/logger/DeploymentLogger.js +0 -2
- package/bin/assets/src/util/logger/FileRotator.d.ts +0 -17
- package/bin/assets/src/util/logger/FileRotator.js +0 -1
- package/bin/assets/src/util/logger/LogFileWriter.d.ts +0 -54
- package/bin/assets/src/util/logger/LogFileWriter.js +0 -4
- package/bin/assets/src/util/logger/Logger.d.ts +0 -43
- package/bin/assets/src/util/logger/Logger.js +0 -1
- package/bin/assets/src/util/logger/index.d.ts +0 -15
- package/bin/assets/src/util/logger/index.js +0 -2
- package/bin/assets/src/util/logger/logDir.d.ts +0 -5
- package/bin/assets/src/util/logger/logDir.js +0 -1
- package/bin/assets/src/util/logger/types.d.ts +0 -48
- package/bin/assets/src/util/logger/types.js +0 -1
- package/bin/assets/src/util/nonInteractive/index.d.ts +0 -3
- package/bin/assets/src/util/nonInteractive/index.js +0 -1
- package/bin/assets/src/util/nonInteractive/nonInteractiveCallbacks.d.ts +0 -18
- package/bin/assets/src/util/nonInteractive/nonInteractiveCallbacks.js +0 -1
- package/bin/assets/src/util/nonInteractive/nonInteractiveCascadeOutput.d.ts +0 -51
- package/bin/assets/src/util/nonInteractive/nonInteractiveCascadeOutput.js +0 -1
- package/bin/assets/src/util/nonInteractive/nonInteractiveLabels.d.ts +0 -23
- package/bin/assets/src/util/nonInteractive/nonInteractiveLabels.js +0 -1
- package/bin/assets/src/util/nonInteractive/nonInteractiveOutput.d.ts +0 -128
- package/bin/assets/src/util/nonInteractive/nonInteractiveOutput.js +0 -4
- package/bin/assets/src/util/nonInteractive/nonInteractiveSummaryOutput.d.ts +0 -29
- package/bin/assets/src/util/nonInteractive/nonInteractiveSummaryOutput.js +0 -3
- package/bin/assets/src/util/organisationStructure.d.ts +0 -9
- package/bin/assets/src/util/organisationStructure.js +0 -1
- package/bin/assets/src/util/parseTakeOption.d.ts +0 -1
- package/bin/assets/src/util/parseTakeOption.js +0 -1
- package/bin/assets/src/util/passwordValidation.d.ts +0 -22
- package/bin/assets/src/util/passwordValidation.js +0 -1
- package/bin/assets/src/util/pathHelpers.d.ts +0 -19
- package/bin/assets/src/util/pathHelpers.js +0 -1
- package/bin/assets/src/util/patternDetection.d.ts +0 -7
- package/bin/assets/src/util/patternDetection.js +0 -1
- package/bin/assets/src/util/promptYesNo.d.ts +0 -5
- package/bin/assets/src/util/promptYesNo.js +0 -1
- package/bin/assets/src/util/readStdin.d.ts +0 -9
- package/bin/assets/src/util/readStdin.js +0 -1
- package/bin/assets/src/util/secretsUtils.d.ts +0 -155
- package/bin/assets/src/util/secretsUtils.js +0 -3
- package/bin/assets/src/util/signalCleanup.d.ts +0 -13
- package/bin/assets/src/util/signalCleanup.js +0 -4
- package/bin/assets/src/util/stripAnsi.d.ts +0 -2
- package/bin/assets/src/util/stripAnsi.js +0 -1
- package/bin/assets/src/util/synchronizedOutput.d.ts +0 -26
- package/bin/assets/src/util/synchronizedOutput.js +0 -1
- package/bin/assets/src/util/targetDetection.d.ts +0 -27
- package/bin/assets/src/util/targetDetection.js +0 -1
- package/bin/assets/src/util/targetHelpers.d.ts +0 -20
- package/bin/assets/src/util/targetHelpers.js +0 -1
- package/bin/assets/src/util/terminalCapabilities.d.ts +0 -21
- package/bin/assets/src/util/terminalCapabilities.js +0 -1
- package/bin/assets/src/util/terminalEscapes.d.ts +0 -29
- package/bin/assets/src/util/terminalEscapes.js +0 -1
- package/bin/assets/src/util/terminalFocus.d.ts +0 -33
- package/bin/assets/src/util/terminalFocus.js +0 -1
- package/bin/assets/src/util/theme.d.ts +0 -80
- package/bin/assets/src/util/theme.js +0 -1
- package/bin/assets/src/util/truncateMiddle.d.ts +0 -9
- package/bin/assets/src/util/truncateMiddle.js +0 -1
- package/bin/assets/src/util/typeGuards.d.ts +0 -5
- package/bin/assets/src/util/typeGuards.js +0 -1
- package/bin/assets/src/util/uiRouter.d.ts +0 -13
- package/bin/assets/src/util/uiRouter.js +0 -1
- package/bin/assets/src/util/urlHelpers.d.ts +0 -4
- package/bin/assets/src/util/urlHelpers.js +0 -1
- package/bin/assets/src/util/versionDisplay.d.ts +0 -5
- package/bin/assets/src/util/versionDisplay.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fjall",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Fjall CLI",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"typescript": "^6.0.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@fjall/cli": "^2.
|
|
46
|
+
"@fjall/cli": "^2.2.0",
|
|
47
47
|
"esbuild": "^0.28.0",
|
|
48
48
|
"vitest": "^4.1.5"
|
|
49
49
|
},
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=22.0.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "cd83079d6ed53b131e4c97b5966dc0d8715c8735"
|
|
66
66
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type Tree } from "@nx/devkit";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
export declare const AccountGeneratorSchema: z.ZodObject<{
|
|
4
|
-
primaryRegion: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
5
|
-
}, z.core.$strict>;
|
|
6
|
-
export type AccountGeneratorOptions = z.infer<typeof AccountGeneratorSchema>;
|
|
7
|
-
export declare function accountGenerator(tree: Tree, options: AccountGeneratorOptions): Promise<void>;
|
|
8
|
-
export default accountGenerator;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { accountGenerator, AccountGeneratorSchema, type AccountGeneratorOptions } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{accountGenerator as r,AccountGeneratorSchema as c}from"./generator.js";export{c as AccountGeneratorSchema,r as accountGenerator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { applicationGenerator } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{applicationGenerator as a}from"./generator.js";export{a as applicationGenerator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { cdnGenerator } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cdnGenerator as o}from"./generator.js";export{o as cdnGenerator};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared helpers for compute integration tests.
|
|
3
|
-
*
|
|
4
|
-
* Extracted to allow splitting compute tests across multiple files
|
|
5
|
-
* for parallel execution without duplicating helper functions.
|
|
6
|
-
*/
|
|
7
|
-
import { type TierName, type EC2InstanceType, type EnvironmentValue } from "@fjall/generator";
|
|
8
|
-
import { FileSystemTree } from "../utils/tree.js";
|
|
9
|
-
import { type CfnTemplate, type ResourceEntry } from "../utils/integrationTestUtils.js";
|
|
10
|
-
export { CLI_ROOT } from "../utils/integrationTestUtils.js";
|
|
11
|
-
export declare function createTree(): FileSystemTree;
|
|
12
|
-
/**
|
|
13
|
-
* Create a test app with the application generator
|
|
14
|
-
*/
|
|
15
|
-
export declare function createTestApp(tree: FileSystemTree, appName: string, tier: TierName | "custom"): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Add ECS compute to an existing app
|
|
18
|
-
*/
|
|
19
|
-
export declare function addEcsCompute(tree: FileSystemTree, appName: string, options: {
|
|
20
|
-
computeName: string;
|
|
21
|
-
capacityProvider?: "FARGATE" | "FARGATE_SPOT" | "EC2";
|
|
22
|
-
containerPort?: number;
|
|
23
|
-
containers?: Array<{
|
|
24
|
-
name: string;
|
|
25
|
-
image?: string;
|
|
26
|
-
port?: number;
|
|
27
|
-
environment?: Record<string, EnvironmentValue>;
|
|
28
|
-
essential?: boolean;
|
|
29
|
-
}>;
|
|
30
|
-
desiredCount?: number;
|
|
31
|
-
cpu?: number;
|
|
32
|
-
memoryLimitMiB?: number;
|
|
33
|
-
ec2Config?: {
|
|
34
|
-
instanceType?: string;
|
|
35
|
-
amiHardwareType?: "ARM" | "STANDARD";
|
|
36
|
-
minCapacity?: number;
|
|
37
|
-
maxCapacity?: number;
|
|
38
|
-
memoryLimitMiB?: number;
|
|
39
|
-
};
|
|
40
|
-
}): Promise<void>;
|
|
41
|
-
/**
|
|
42
|
-
* Add Lambda compute to an existing app
|
|
43
|
-
*/
|
|
44
|
-
export declare function addLambdaCompute(tree: FileSystemTree, appName: string, options: {
|
|
45
|
-
computeName: string;
|
|
46
|
-
timeout?: number;
|
|
47
|
-
memory?: number;
|
|
48
|
-
handler?: string;
|
|
49
|
-
runtime?: string;
|
|
50
|
-
}): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Add ECS compute with multiple services to an existing app
|
|
53
|
-
*/
|
|
54
|
-
export declare function addMultiServiceEcsCompute(tree: FileSystemTree, appName: string, options: {
|
|
55
|
-
computeName: string;
|
|
56
|
-
capacityProvider?: "FARGATE" | "FARGATE_SPOT" | "EC2";
|
|
57
|
-
cluster?: {
|
|
58
|
-
domain?: string;
|
|
59
|
-
loadBalancer?: false | "public" | "internal";
|
|
60
|
-
directAccess?: boolean;
|
|
61
|
-
};
|
|
62
|
-
ec2Config?: {
|
|
63
|
-
instanceType?: string;
|
|
64
|
-
amiHardwareType?: "ARM" | "STANDARD";
|
|
65
|
-
minCapacity?: number;
|
|
66
|
-
maxCapacity?: number;
|
|
67
|
-
memoryLimitMiB?: number;
|
|
68
|
-
};
|
|
69
|
-
services: Array<{
|
|
70
|
-
name: string;
|
|
71
|
-
containers?: Array<{
|
|
72
|
-
name?: string;
|
|
73
|
-
port?: number;
|
|
74
|
-
image?: string;
|
|
75
|
-
ssmSecrets?: string[];
|
|
76
|
-
}>;
|
|
77
|
-
routing?: {
|
|
78
|
-
path?: string;
|
|
79
|
-
host?: string;
|
|
80
|
-
priority?: number;
|
|
81
|
-
} | Array<{
|
|
82
|
-
path?: string;
|
|
83
|
-
host?: string;
|
|
84
|
-
priority?: number;
|
|
85
|
-
}>;
|
|
86
|
-
cpu?: number;
|
|
87
|
-
memoryLimitMiB?: number;
|
|
88
|
-
desiredCount?: number;
|
|
89
|
-
ssmSecretsPath?: string;
|
|
90
|
-
capacityProvider?: "FARGATE" | "FARGATE_SPOT" | "EC2";
|
|
91
|
-
ec2Config?: {
|
|
92
|
-
instanceType?: string;
|
|
93
|
-
amiHardwareType?: "ARM" | "STANDARD";
|
|
94
|
-
minCapacity?: number;
|
|
95
|
-
maxCapacity?: number;
|
|
96
|
-
memoryLimitMiB?: number;
|
|
97
|
-
};
|
|
98
|
-
}>;
|
|
99
|
-
}): Promise<void>;
|
|
100
|
-
/**
|
|
101
|
-
* Add EC2 compute to an existing app
|
|
102
|
-
*/
|
|
103
|
-
export declare function addEc2Compute(tree: FileSystemTree, appName: string, options: {
|
|
104
|
-
computeName: string;
|
|
105
|
-
instanceType?: EC2InstanceType;
|
|
106
|
-
enableSSH?: boolean;
|
|
107
|
-
}): Promise<void>;
|
|
108
|
-
/**
|
|
109
|
-
* Expected configuration derived from tier preset
|
|
110
|
-
*/
|
|
111
|
-
export interface ExpectedEcsConfig {
|
|
112
|
-
capacityProvider: "FARGATE" | "FARGATE_SPOT" | "EC2";
|
|
113
|
-
cpu: string;
|
|
114
|
-
memory: string;
|
|
115
|
-
desiredCount: number;
|
|
116
|
-
isEc2Based: boolean;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Derive expected ECS configuration from tier preset
|
|
120
|
-
*/
|
|
121
|
-
export declare function getExpectedComputeConfigFromPreset(tier: TierName): ExpectedEcsConfig;
|
|
122
|
-
/**
|
|
123
|
-
* ECS tiers - all tiers support ECS
|
|
124
|
-
*/
|
|
125
|
-
export declare const ECS_TIER_SUPPORT: TierName[];
|
|
126
|
-
export declare function findEcsCluster(template: CfnTemplate): ResourceEntry | undefined;
|
|
127
|
-
export declare function findEcsService(template: CfnTemplate): ResourceEntry | undefined;
|
|
128
|
-
export declare function findEcsTaskDefinition(template: CfnTemplate): ResourceEntry | undefined;
|
|
129
|
-
export declare function findLoadBalancer(template: CfnTemplate): ResourceEntry | undefined;
|
|
130
|
-
export declare function findLambdaFunction(template: CfnTemplate): ResourceEntry | undefined;
|
|
131
|
-
export declare function findAutoScalingGroup(template: CfnTemplate): ResourceEntry | undefined;
|
|
132
|
-
export declare function findSecurityGroups(template: CfnTemplate): ResourceEntry[];
|
|
133
|
-
export declare function findTargetGroups(template: CfnTemplate): ResourceEntry[];
|
|
134
|
-
export declare function findListenerRules(template: CfnTemplate): ResourceEntry[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{applicationGenerator as u}from"../application/generator.js";import{computeGenerator as o}from"./generator.js";import{getEcsPreset as m}from"@fjall/generator";import{FileSystemTree as d}from"../utils/tree.js";import{CLI_ROOT as p,findResourcesByType as n}from"../utils/integrationTestUtils.js";import{CLI_ROOT as h}from"../utils/integrationTestUtils.js";function g(){return new d(p)}async function S(t,r,e){await u(t,{name:r,type:e,includeDatabase:!1,network:{maxAzs:2,natGateways:{count:1},flowLogs:!1}})}async function v(t,r,e){const a=e.capacityProvider??"FARGATE";let c;e.containers?c=[{name:"TestService",capacityProvider:a,ec2Config:e.ec2Config,containers:e.containers,cpu:e.cpu,memoryLimitMiB:e.memoryLimitMiB,desiredCount:e.desiredCount}]:e.containerPort?c=[{name:"TestService",capacityProvider:a,ec2Config:e.ec2Config,containers:[{port:e.containerPort}],cpu:e.cpu,memoryLimitMiB:e.memoryLimitMiB,desiredCount:e.desiredCount}]:c=[{name:"TestService",capacityProvider:a,ec2Config:e.ec2Config}],await o(t,{appName:r,computeName:e.computeName,type:"ecs",nameProvidedByFlag:!0,connectionConfig:{connectToDatabase:[]},services:c})}async function E(t,r,e){await o(t,{appName:r,computeName:e.computeName,type:"lambda",nameProvidedByFlag:!0,connectionConfig:{connectToDatabase:[]},timeout:e.timeout,memory:e.memory,handler:e.handler,runtime:e.runtime})}async function T(t,r,e){const a=e.capacityProvider??"FARGATE",c=e.services.map(i=>({...i,capacityProvider:i.capacityProvider??a,ec2Config:i.ec2Config??(i.capacityProvider==="EC2"||!i.capacityProvider&&a==="EC2"?e.ec2Config:void 0)}));await o(t,{appName:r,computeName:e.computeName,type:"ecs",nameProvidedByFlag:!0,connectionConfig:{connectToDatabase:[]},cluster:e.cluster,services:c})}async function P(t,r,e){await o(t,{appName:r,computeName:e.computeName,type:"ec2",nameProvidedByFlag:!0,connectionConfig:{connectToDatabase:[]},instanceType:e.instanceType,enableSSH:e.enableSSH})}function x(t){const e=m(t).services[0];return{capacityProvider:e.capacityProvider,cpu:String(e.cpu??256),memory:String(e.memoryLimitMiB??512),desiredCount:e.desiredCount??1,isEc2Based:e.capacityProvider==="EC2"}}const A=["tinkerer","lightweight","standard","resilient","enterprise"];function L(t){return n(t,"AWS::ECS::Cluster")[0]}function B(t){return n(t,"AWS::ECS::Service")[0]}function b(t){return n(t,"AWS::ECS::TaskDefinition")[0]}function G(t){return n(t,"AWS::ElasticLoadBalancingV2::LoadBalancer")[0]}function w(t){return n(t,"AWS::Lambda::Function")[0]}function F(t){return n(t,"AWS::AutoScaling::AutoScalingGroup")[0]}function W(t){return n(t,"AWS::EC2::SecurityGroup")}function R(t){return n(t,"AWS::ElasticLoadBalancingV2::TargetGroup")}function N(t){return n(t,"AWS::ElasticLoadBalancingV2::ListenerRule")}export{h as CLI_ROOT,A as ECS_TIER_SUPPORT,P as addEc2Compute,v as addEcsCompute,E as addLambdaCompute,T as addMultiServiceEcsCompute,S as createTestApp,g as createTree,F as findAutoScalingGroup,L as findEcsCluster,B as findEcsService,b as findEcsTaskDefinition,w as findLambdaFunction,N as findListenerRules,G as findLoadBalancer,W as findSecurityGroups,R as findTargetGroups,x as getExpectedComputeConfigFromPreset};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { computeGenerator } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{computeGenerator as r}from"./generator.js";export{r as computeGenerator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { serviceGenerator, serviceGenerator as default } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{serviceGenerator as a,serviceGenerator as o}from"./generator.js";export{o as default,a as serviceGenerator};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Database Integration Test Utilities
|
|
3
|
-
*
|
|
4
|
-
* Shared utilities for database integration tests.
|
|
5
|
-
* Extracted to enable parallel test execution across split test files.
|
|
6
|
-
*
|
|
7
|
-
* @see aiDocs/architecture/TESTING_STRATEGY.md
|
|
8
|
-
*/
|
|
9
|
-
import { type TierName } from "@fjall/generator";
|
|
10
|
-
import type { FileSystemTree } from "../utils/tree.js";
|
|
11
|
-
import { type CfnTemplate, type ResourceEntry } from "../utils/integrationTestUtils.js";
|
|
12
|
-
export { CLI_ROOT, findSecurityGroupByDescription } from "../utils/integrationTestUtils.js";
|
|
13
|
-
export type { TierName } from "@fjall/generator";
|
|
14
|
-
/**
|
|
15
|
-
* Assert that a security group has a self-referencing ingress rule,
|
|
16
|
-
* optionally checking the port matches.
|
|
17
|
-
*/
|
|
18
|
-
export declare function expectSecurityGroupSelfReferencing(template: CfnTemplate, description: string, options?: {
|
|
19
|
-
port?: number;
|
|
20
|
-
checkToPort?: boolean;
|
|
21
|
-
}): void;
|
|
22
|
-
/**
|
|
23
|
-
* Create a test app with the application generator
|
|
24
|
-
*/
|
|
25
|
-
export declare function createTestApp(tree: FileSystemTree, appName: string, tier: TierName | "custom"): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Database options for addDatabase helper
|
|
28
|
-
*/
|
|
29
|
-
export interface AddDatabaseOptions {
|
|
30
|
-
databaseName: string;
|
|
31
|
-
databaseType: "Instance" | "Aurora" | "GlobalAurora";
|
|
32
|
-
resourceName: string;
|
|
33
|
-
tier?: TierName;
|
|
34
|
-
instanceType?: string;
|
|
35
|
-
multiAz?: boolean;
|
|
36
|
-
readReplica?: {
|
|
37
|
-
instanceType?: string;
|
|
38
|
-
} | false;
|
|
39
|
-
publiclyAccessible?: boolean;
|
|
40
|
-
readers?: {
|
|
41
|
-
count: number;
|
|
42
|
-
} | false;
|
|
43
|
-
backupRetention?: number;
|
|
44
|
-
primaryRegion?: string;
|
|
45
|
-
secondaryRegions?: string[];
|
|
46
|
-
enableGlobalWriteForwarding?: boolean;
|
|
47
|
-
port?: number;
|
|
48
|
-
proxy?: {
|
|
49
|
-
requireTLS?: boolean;
|
|
50
|
-
maxConnections?: number;
|
|
51
|
-
} | false;
|
|
52
|
-
credentials?: {
|
|
53
|
-
username?: string;
|
|
54
|
-
secretRotation?: {
|
|
55
|
-
automaticallyAfterDays?: number;
|
|
56
|
-
} | false;
|
|
57
|
-
};
|
|
58
|
-
databaseInsights?: {
|
|
59
|
-
mode?: "standard" | "advanced";
|
|
60
|
-
encryptionKey?: {
|
|
61
|
-
useCMK: true;
|
|
62
|
-
} | {
|
|
63
|
-
awsManaged: true;
|
|
64
|
-
};
|
|
65
|
-
} | false;
|
|
66
|
-
encryption?: {
|
|
67
|
-
storageKey?: {
|
|
68
|
-
useCMK: true;
|
|
69
|
-
} | {
|
|
70
|
-
awsManaged: true;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Add a database to an existing app
|
|
76
|
-
*/
|
|
77
|
-
export declare function addDatabase(tree: FileSystemTree, appName: string, options: AddDatabaseOptions): Promise<void>;
|
|
78
|
-
/**
|
|
79
|
-
* Find the primary RDS Instance (not a read replica)
|
|
80
|
-
*/
|
|
81
|
-
export declare function findPrimaryDbInstance(template: CfnTemplate): ResourceEntry | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Find read replica RDS Instances
|
|
84
|
-
*/
|
|
85
|
-
export declare function findReadReplicas(template: CfnTemplate): ResourceEntry[];
|
|
86
|
-
/**
|
|
87
|
-
* Find Aurora DB Cluster
|
|
88
|
-
*/
|
|
89
|
-
export declare function findAuroraCluster(template: CfnTemplate): ResourceEntry | undefined;
|
|
90
|
-
/**
|
|
91
|
-
* Find Aurora DB Instances (writer + readers)
|
|
92
|
-
*/
|
|
93
|
-
export declare function findAuroraInstances(template: CfnTemplate): ResourceEntry[];
|
|
94
|
-
/**
|
|
95
|
-
* Find RDS Proxy resources
|
|
96
|
-
*/
|
|
97
|
-
export declare function findRdsProxy(template: CfnTemplate): ResourceEntry | undefined;
|
|
98
|
-
/**
|
|
99
|
-
* Find KMS Keys (for encryption validation)
|
|
100
|
-
*/
|
|
101
|
-
export declare function findKmsKeys(template: CfnTemplate): ResourceEntry[];
|
|
102
|
-
/**
|
|
103
|
-
* Find Security Groups
|
|
104
|
-
*/
|
|
105
|
-
export declare function findSecurityGroups(template: CfnTemplate): ResourceEntry[];
|
|
106
|
-
/**
|
|
107
|
-
* Extract security group logical ID from a CloudFormation reference
|
|
108
|
-
* Handles both { Ref: logicalId } and { "Fn::GetAtt": [logicalId, "GroupId"] }
|
|
109
|
-
*/
|
|
110
|
-
export declare function extractSecurityGroupRef(ref: unknown): string | undefined;
|
|
111
|
-
/**
|
|
112
|
-
* Find Security Group Ingress rules
|
|
113
|
-
* Returns rules that reference the given security group (self-referencing)
|
|
114
|
-
*/
|
|
115
|
-
export declare function findSelfReferencingIngressRules(template: CfnTemplate, securityGroupLogicalId: string): ResourceEntry[];
|
|
116
|
-
/**
|
|
117
|
-
* Expected database configuration interface
|
|
118
|
-
*/
|
|
119
|
-
export interface ExpectedDatabaseConfig {
|
|
120
|
-
port: number;
|
|
121
|
-
deletionProtection: boolean;
|
|
122
|
-
hasProxy: boolean;
|
|
123
|
-
proxyRequireTLS: boolean;
|
|
124
|
-
hasReadReplica: boolean;
|
|
125
|
-
multiAz: boolean;
|
|
126
|
-
storageEncrypted: boolean;
|
|
127
|
-
databaseInsightsEnabled: boolean;
|
|
128
|
-
backupRetentionPeriod: number;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Derive expected configuration from tier preset
|
|
132
|
-
* This ensures tests validate against the same source of truth as production code
|
|
133
|
-
*/
|
|
134
|
-
export declare function getExpectedConfigFromPreset(tier: TierName, databaseType: "Instance" | "Aurora" | "GlobalAurora"): ExpectedDatabaseConfig;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{applicationGenerator as R}from"../application/generator.js";import{databaseGenerator as x}from"./generator.js";import{DEFAULT_DATABASE_PORT as S,getDatabasePreset as u}from"@fjall/generator";import{expect as a}from"vitest";import{findResourcesByType as s,findSecurityGroupByDescription as A}from"../utils/integrationTestUtils.js";import{CLI_ROOT as K,findSecurityGroupByDescription as L}from"../utils/integrationTestUtils.js";function T(t,r,e){const n=b(t),i=A(n,r);a(i).toBeDefined();const o=m(t,i.logicalId);a(o.length).toBeGreaterThan(0),e?.port!==void 0&&(a(Number(o[0].properties.FromPort)).toBe(e.port),e.checkToPort&&a(Number(o[0].properties.ToPort)).toBe(e.port))}async function P(t,r,e){await R(t,{name:r,type:e,includeDatabase:!1,network:{maxAzs:2,natGateways:{count:1},flowLogs:!1}})}async function h(t,r,e){const n=e.tier?u(e.tier,e.databaseType):void 0,{tier:i,databaseName:o,databaseType:c,resourceName:f,...d}=e,l=n?{port:n.port,proxy:n.proxy,databaseInsights:n.databaseInsights,encryption:n.encryption,backupRetention:n.backupRetention,...c==="Instance"&&{instanceType:n.instanceType,multiAz:n.multiAz,readReplica:n.readReplica,publiclyAccessible:n.publiclyAccessible},...(c==="Aurora"||c==="GlobalAurora")&&{readers:n.readers}}:{},y={appName:r,databaseName:o,databaseType:c,resourceName:f,nameProvidedByFlag:!0,connectionConfig:{connectToCompute:[]},...l,...d};await x(t,y)}function C(t){return s(t,"AWS::RDS::DBInstance").find(e=>!e.properties.SourceDBInstanceIdentifier)}function E(t){return s(t,"AWS::RDS::DBInstance").filter(e=>e.properties.SourceDBInstanceIdentifier)}function W(t){return s(t,"AWS::RDS::DBCluster")[0]}function w(t){return s(t,"AWS::RDS::DBInstance").filter(e=>e.properties.DBClusterIdentifier)}function k(t){return s(t,"AWS::RDS::DBProxy")[0]}function F(t){return s(t,"AWS::KMS::Key")}function b(t){return s(t,"AWS::EC2::SecurityGroup")}function p(t){if(!t||typeof t!="object")return;const r=t;if(typeof r.Ref=="string")return r.Ref;const e=r["Fn::GetAtt"];if(Array.isArray(e)&&typeof e[0]=="string")return e[0]}function m(t,r){return s(t,"AWS::EC2::SecurityGroupIngress").filter(n=>{const i=p(n.properties.SourceSecurityGroupId),o=p(n.properties.GroupId);return i===r&&o===r})}function O(t,r){const e=u(t,r);if(!e)throw new Error(`No preset found for ${t}/${r}`);const n=e.port??S,i=e.proxy!==!1&&e.proxy!==void 0,o=i&&typeof e.proxy=="object"?e.proxy.requireTLS??!0:!0;return{port:n,deletionProtection:!0,hasProxy:i,proxyRequireTLS:o,hasReadReplica:r==="Instance"&&e.readReplica!==!1&&e.readReplica!==void 0,multiAz:e.multiAz!==!1,storageEncrypted:!0,databaseInsightsEnabled:e.databaseInsights!==!1,backupRetentionPeriod:e.backupRetention??14}}export{K as CLI_ROOT,h as addDatabase,P as createTestApp,T as expectSecurityGroupSelfReferencing,p as extractSecurityGroupRef,W as findAuroraCluster,w as findAuroraInstances,F as findKmsKeys,C as findPrimaryDbInstance,k as findRdsProxy,E as findReadReplicas,L as findSecurityGroupByDescription,b as findSecurityGroups,m as findSelfReferencingIngressRules,O as getExpectedConfigFromPreset};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { databaseGenerator } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{databaseGenerator as r}from"./generator.js";export{r as databaseGenerator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { proxyGenerator, proxyGenerator as default } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{proxyGenerator as o,proxyGenerator as a}from"./generator.js";export{a as default,o as proxyGenerator};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Tree } from "@nx/devkit";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
export declare const DomainGeneratorSchema: z.ZodObject<{
|
|
4
|
-
domainName: z.ZodString;
|
|
5
|
-
hostedZoneId: z.ZodOptional<z.ZodString>;
|
|
6
|
-
infrastructureTs: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, z.core.$strict>;
|
|
8
|
-
export type DomainGeneratorOptions = z.infer<typeof DomainGeneratorSchema>;
|
|
9
|
-
export declare function domainGenerator(tree: Tree, options: DomainGeneratorOptions): Promise<void>;
|
|
10
|
-
export default domainGenerator;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { domainGenerator, DomainGeneratorSchema, type DomainGeneratorOptions } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{domainGenerator as r,DomainGeneratorSchema as a}from"./generator.js";export{a as DomainGeneratorSchema,r as domainGenerator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { networkGenerator } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{networkGenerator as o}from"./generator.js";export{o as networkGenerator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { organisationGenerator } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{organisationGenerator as a}from"./generator.js";export{a as organisationGenerator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { s3Generator } from "./s3/generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s3Generator as o}from"./s3/generator.js";export{o as s3Generator};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { tunnelGenerator } from "./generator.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{tunnelGenerator as n}from"./generator.js";export{n as tunnelGenerator};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as ts from "typescript";
|
|
2
|
-
/**
|
|
3
|
-
* Replace a single top-level statement with zero or more new statements
|
|
4
|
-
* in-place. Returns the updated source file. If `oldStatement` is not a
|
|
5
|
-
* top-level statement of `sourceFile`, the source file is returned unchanged.
|
|
6
|
-
*/
|
|
7
|
-
export declare function replaceStatement(sourceFile: ts.SourceFile, oldStatement: ts.Statement, newStatements: readonly ts.Statement[]): ts.SourceFile;
|
|
8
|
-
export interface ReplacementImportSpec {
|
|
9
|
-
readonly module: string;
|
|
10
|
-
readonly namespaceAlias?: string;
|
|
11
|
-
readonly namedImports?: readonly string[];
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Remove the listed named imports from any `import { ... } from fromModule`
|
|
15
|
-
* statement. If the statement becomes empty (zero named imports, no default,
|
|
16
|
-
* no namespace alias), it is removed entirely.
|
|
17
|
-
*
|
|
18
|
-
* The `replacementImports` are appended at the top of the file (after any
|
|
19
|
-
* preserved `@fjall/*` or third-party imports), but only inserted if not
|
|
20
|
-
* already present — namespace aliases and named imports are reused if they
|
|
21
|
-
* already exist in an import statement for the same module.
|
|
22
|
-
*/
|
|
23
|
-
export declare function rewriteNamedImport(sourceFile: ts.SourceFile, fromModule: string, namesToRemove: readonly string[], replacementImports: readonly ReplacementImportSpec[]): ts.SourceFile;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as u from"typescript";function D(e,n,i){const t=u.factory,r=e.statements.indexOf(n);if(r<0)return e;const a=[...e.statements];return a.splice(r,1,...i),t.updateSourceFile(e,a,e.isDeclarationFile,e.referencedFiles,e.typeReferenceDirectives,e.hasNoDefaultLib,e.libReferenceDirectives)}function S(e,n,i,t){const r=u.factory,a=new Set(i);let d=[];for(const m of e.statements){if(!u.isImportDeclaration(m)){d.push(m);continue}if(o(m)!==n){d.push(m);continue}const f=c(r,m,a);f!==void 0&&d.push(f)}return d=I(r,d,t),r.updateSourceFile(e,d,e.isDeclarationFile,e.referencedFiles,e.typeReferenceDirectives,e.hasNoDefaultLib,e.libReferenceDirectives)}function o(e){if(u.isStringLiteral(e.moduleSpecifier))return e.moduleSpecifier.text}function c(e,n,i){const t=n.importClause;if(t===void 0)return n;const r=t.namedBindings;let a=r;if(r!==void 0&&u.isNamedImports(r)){const s=r.elements.filter(f=>{const p=f.propertyName?.text??f.name.text;return!i.has(p)});s.length===0?a=void 0:s.length!==r.elements.length&&(a=e.createNamedImports(s))}if(!(!(t.name!==void 0)&&!(a!==void 0)))return e.updateImportDeclaration(n,n.modifiers,e.updateImportClause(t,t.isTypeOnly,t.name,a),n.moduleSpecifier,n.attributes)}function I(e,n,i){const t=h(n),r=[];for(const d of i){const m=t.get(d.module);if(m===void 0){r.push(l(e,d));continue}const s=g(e,m,d);if(s!==void 0){const f=n.indexOf(m);f>=0&&n.splice(f,1,s)}else N(m,d)||r.push(l(e,d))}let a=0;for(let d=0;d<n.length;d++){const m=n[d];if(m===void 0||!u.isImportDeclaration(m))break;a=d+1}return r.length>0&&n.splice(a,0,...r),n}function h(e){const n=new Map;for(const i of e){if(!u.isImportDeclaration(i))continue;const t=o(i);t!==void 0&&!n.has(t)&&n.set(t,i)}return n}function l(e,n){let i;if(n.namespaceAlias!==void 0)i=e.createImportClause(!1,void 0,e.createNamespaceImport(e.createIdentifier(n.namespaceAlias)));else if(n.namedImports!==void 0&&n.namedImports.length>0)i=e.createImportClause(!1,void 0,e.createNamedImports(n.namedImports.map(t=>e.createImportSpecifier(!1,void 0,e.createIdentifier(t)))));else return e.createImportDeclaration(void 0,void 0,e.createStringLiteral(n.module),void 0);return e.createImportDeclaration(void 0,i,e.createStringLiteral(n.module),void 0)}function g(e,n,i){const t=n.importClause;if(t===void 0||i.namespaceAlias!==void 0||i.namedImports===void 0||i.namedImports.length===0)return;const r=t.namedBindings;if(r===void 0||!u.isNamedImports(r))return;const a=new Set(r.elements.map(s=>s.name.text)),d=i.namedImports.filter(s=>!a.has(s));if(d.length===0)return;const m=[...r.elements,...d.map(s=>e.createImportSpecifier(!1,void 0,e.createIdentifier(s)))];return e.updateImportDeclaration(n,n.modifiers,e.updateImportClause(t,t.isTypeOnly,t.name,e.createNamedImports(m)),n.moduleSpecifier,n.attributes)}function N(e,n){const i=e.importClause;if(i===void 0)return!1;if(n.namespaceAlias!==void 0){const t=i.namedBindings;return t!==void 0&&u.isNamespaceImport(t)&&t.name.text===n.namespaceAlias}if(n.namedImports!==void 0&&n.namedImports.length>0){const t=i.namedBindings;if(t===void 0||!u.isNamedImports(t))return!1;const r=new Set(t.elements.map(a=>a.name.text));return n.namedImports.every(a=>r.has(a))}return!1}export{D as replaceStatement,S as rewriteNamedImport};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import * as ts from "typescript";
|
|
2
|
-
/**
|
|
3
|
-
* Rewrite `<domainVar>.<prop>` property accesses in the source file after the
|
|
4
|
-
* `new Domain(...)` declaration has been replaced by the eject template.
|
|
5
|
-
*
|
|
6
|
-
* The `Domain` pattern exposes a closed set of public readonly fields
|
|
7
|
-
* (`hostedZone`, `certificates`, `nameServers`, `manualRecords`, `exportNames`,
|
|
8
|
-
* `registrar`, `zoneName`, inherited `node`). Each maps to a vanilla CDK
|
|
9
|
-
* equivalent created by the template. The rewriter preserves any user-attached
|
|
10
|
-
* custom L2 constructs (Layer 2 of the portability model) by mechanical
|
|
11
|
-
* substitution.
|
|
12
|
-
*
|
|
13
|
-
* Accesses that cannot be resolved (e.g. `<domainVar>.hostedZone` in
|
|
14
|
-
* external-records mode, or accesses to fields outside the closed set) are
|
|
15
|
-
* left untouched and reported as warnings — the user must fix them by hand.
|
|
16
|
-
*/
|
|
17
|
-
export interface DomainRewriteContext {
|
|
18
|
-
/** The variable name bound to `new Domain(...)`. */
|
|
19
|
-
readonly domainVar: string;
|
|
20
|
-
/** Which registrar template was emitted. */
|
|
21
|
-
readonly registrar: "route53" | "external-delegated" | "external-records";
|
|
22
|
-
/** True when the emitted template produced a `hostedZone` identifier. */
|
|
23
|
-
readonly hasHostedZone: boolean;
|
|
24
|
-
/** True when the emitted template produced any `cert{i}` identifiers. */
|
|
25
|
-
readonly hasCertificates: boolean;
|
|
26
|
-
/** True when the emitted template produced an apex delegation role. */
|
|
27
|
-
readonly hasDelegationRole: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Cert keys in declaration order. `<domainVar>.certificates.get("<key>")`
|
|
30
|
-
* rewrites to the matching `cert{i}` identifier; unknown keys are warned on.
|
|
31
|
-
* Keys are the literal `cert.domainName` strings.
|
|
32
|
-
*/
|
|
33
|
-
readonly certKeys: readonly string[];
|
|
34
|
-
/** Effective zone name (delegated: `sub.example.com`; else: `zoneName`). */
|
|
35
|
-
readonly effectiveZoneName: string;
|
|
36
|
-
/** The top-level `registrar` string — literal to inline. */
|
|
37
|
-
readonly registrarValue: string;
|
|
38
|
-
/** Export-name shape (mirrors `getDomainExportNames`). */
|
|
39
|
-
readonly exportNames: {
|
|
40
|
-
readonly hostedZoneId: string;
|
|
41
|
-
readonly certificateArn: string;
|
|
42
|
-
readonly delegationRoleArn: string;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export interface DomainRewriteResult {
|
|
46
|
-
readonly sourceFile: ts.SourceFile;
|
|
47
|
-
/**
|
|
48
|
-
* `true` when any `<domainVar>.certificates` or `<domainVar>.certificates.get(...)`
|
|
49
|
-
* access was encountered. The caller prepends a `const certificates = new
|
|
50
|
-
* Map(...)` binding right after the emitted template when this is set.
|
|
51
|
-
*/
|
|
52
|
-
readonly needsCertificateMap: boolean;
|
|
53
|
-
/** Human-readable warnings for unresolvable or deliberately-skipped accesses. */
|
|
54
|
-
readonly warnings: readonly string[];
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Walk the source file and rewrite every `<domainVar>.<prop>` (and nested
|
|
58
|
-
* call expressions for `certificates.get(...)`) to the vanilla-CDK equivalent.
|
|
59
|
-
*/
|
|
60
|
-
export declare function rewriteDomainPropertyAccess(sourceFile: ts.SourceFile, context: DomainRewriteContext): DomainRewriteResult;
|
|
61
|
-
/**
|
|
62
|
-
* Build `const certificates = new Map<string, acm.Certificate>([["<key0>", cert0], ...]);`
|
|
63
|
-
* for prepending to the emitted template when the rewriter needed it.
|
|
64
|
-
*/
|
|
65
|
-
export declare function buildCertificateMapStatement(certKeys: readonly string[]): ts.VariableStatement;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as s from"typescript";function I(a,e){const c=[];let o=!1;const i=s.factory;function f(r){const t=r.getStart(a,!1);return a.getLineAndCharacterOfPosition(t).line+1}function n(r,t){c.push(`line ${f(r)}: ${t}`)}function u(r){return s.isIdentifier(r)&&r.text===e.domainVar}function h(r){const t=r.expression;if(!s.isPropertyAccessExpression(t)||t.name.text!=="get")return;const d=t.expression;if(!s.isPropertyAccessExpression(d)||d.name.text!=="certificates"||!u(d.expression))return;const m=r.arguments[0];if(m===void 0||!s.isStringLiteral(m)){n(r,`'${e.domainVar}.certificates.get(...)' with non-string-literal key cannot be statically rewritten. Replace with a direct reference to the emitted certificate variable.`);return}if(e.registrar==="external-records"){n(r,`'${e.domainVar}.certificates.get(...)' on an external-records domain: no certificate map is emitted. Reference the emitted 'cert{i}' variable directly.`);return}const p=m.text,g=e.certKeys.indexOf(p);if(g<0){n(r,`'${e.domainVar}.certificates.get("${p}")': no certificate with domainName "${p}" was declared on the domain. Accesses remain unrewritten.`);return}return i.createIdentifier(`cert${g}`)}function y(r){if(!u(r.expression))return;const t=r.name.text;switch(t){case"hostedZone":{if(!e.hasHostedZone){n(r,`'${e.domainVar}.hostedZone' is undefined in '${e.registrar}' mode (no hosted zone is created). Remove the access or switch registrars.`);return}return i.createIdentifier("hostedZone")}case"certificates":{if(e.registrar==="external-records"){n(r,`'${e.domainVar}.certificates' on external-records is not exposed as a Map. Reference 'cert{i}' variables directly.`);return}if(!e.hasCertificates){n(r,`'${e.domainVar}.certificates' referenced but no certificates were declared on the domain. Access remains unrewritten.`);return}return o=!0,i.createIdentifier("certificates")}case"nameServers":{if(!e.hasHostedZone){n(r,`'${e.domainVar}.nameServers' is undefined in '${e.registrar}' mode (no hosted zone is created).`);return}return i.createPropertyAccessExpression(i.createIdentifier("hostedZone"),i.createIdentifier("hostedZoneNameServers"))}case"manualRecords":{if(e.registrar!=="external-records"){n(r,`'${e.domainVar}.manualRecords' is only populated on external-records; on '${e.registrar}' it is always empty. Access remains unrewritten.`);return}n(r,`'${e.domainVar}.manualRecords' has no direct vanilla-CDK equivalent \u2014 the emitted CfnOutputs carry the equivalent data per-entry. Access remains unrewritten.`);return}case"registrar":return i.createStringLiteral(e.registrarValue);case"zoneName":return i.createStringLiteral(e.effectiveZoneName);case"node":return i.createPropertyAccessExpression(i.createIdentifier("domainScope"),i.createIdentifier("node"));case"exportNames":return w(e);default:{n(r,`'${e.domainVar}.${t}' is not a public readonly property of the Domain construct and cannot be ejected. Access remains unrewritten.`);return}}}function A(r){const t=r.expression;if(!s.isPropertyAccessExpression(t)||t.name.text!=="exportNames"||!u(t.expression))return;const d=r.name.text;switch(d){case"hostedZoneId":{if(!e.hasHostedZone){n(r,`'${e.domainVar}.exportNames.hostedZoneId' is not emitted in '${e.registrar}' mode.`);return}return i.createStringLiteral(e.exportNames.hostedZoneId)}case"certificateArn":{if(!e.hasCertificates){n(r,`'${e.domainVar}.exportNames.certificateArn' is not emitted (no certificates declared).`);return}return i.createStringLiteral(e.exportNames.certificateArn)}case"delegationRoleArn":{if(!e.hasDelegationRole){n(r,`'${e.domainVar}.exportNames.delegationRoleArn' is not emitted (no apex delegation role created).`);return}return i.createStringLiteral(e.exportNames.delegationRoleArn)}default:{n(r,`'${e.domainVar}.exportNames.${d}' is not a known export name.`);return}}}function l(r){if(s.isPropertyAccessExpression(r)){const t=A(r);if(t!==void 0)return t}if(s.isCallExpression(r)){const t=h(r);if(t!==void 0)return t}if(s.isPropertyAccessExpression(r)){const t=y(r);if(t!==void 0)return t}return s.visitEachChild(r,l,void 0)}const $=a.statements.map(r=>l(r));return{sourceFile:i.updateSourceFile(a,$,a.isDeclarationFile,a.referencedFiles,a.typeReferenceDirectives,a.hasNoDefaultLib,a.libReferenceDirectives),needsCertificateMap:o,warnings:c}}function w(a){const e=s.factory,c=[];return c.push(e.createPropertyAssignment(e.createIdentifier("hostedZoneId"),e.createStringLiteral(a.exportNames.hostedZoneId))),c.push(e.createPropertyAssignment(e.createIdentifier("certificateArn"),e.createStringLiteral(a.exportNames.certificateArn))),c.push(e.createPropertyAssignment(e.createIdentifier("delegationRoleArn"),e.createStringLiteral(a.exportNames.delegationRoleArn))),e.createObjectLiteralExpression(c,!0)}function R(a){const e=s.factory,c=a.map((f,n)=>e.createArrayLiteralExpression([e.createStringLiteral(f),e.createIdentifier(`cert${n}`)],!1)),o=[e.createTypeReferenceNode("string",void 0),e.createTypeReferenceNode("acm.Certificate",void 0)],i=e.createNewExpression(e.createIdentifier("Map"),o,[e.createArrayLiteralExpression(c,!0)]);return e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createIdentifier("certificates"),void 0,void 0,i)],s.NodeFlags.Const))}export{R as buildCertificateMapStatement,I as rewriteDomainPropertyAccess};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as s from"node:fs";import{getErrorMessage as u}from"@fjall/generator";const a=1e4;function f(r){return r instanceof Error&&"code"in r}function p(r){try{const t=s.readFileSync(r,"utf-8"),n=`${r}.bak`;let e=n;for(let c=1;c<=a;c+=1)try{return s.writeFileSync(e,t,{flag:"wx"}),{content:e,success:!0}}catch(o){if(!f(o)||o.code!=="EEXIST")throw o;e=`${n}.${c}`}return{content:"",success:!1,error:`Failed to create backup of ${r}: exhausted ${String(a)} suffix attempts`}}catch(t){return{content:"",success:!1,error:`Failed to create backup of ${r}: ${u(t)}`}}}export{p as createBackup};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { createBackup } from "./astSurgicalModification.js";
|
|
2
|
-
export { replaceStatement, rewriteNamedImport, type ReplacementImportSpec } from "./astCodeModification.js";
|
|
3
|
-
export { buildCertificateMapStatement, rewriteDomainPropertyAccess, type DomainRewriteContext, type DomainRewriteResult } from "./astDomainRewriter.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createBackup as t}from"./astSurgicalModification.js";import{replaceStatement as o,rewriteNamedImport as m}from"./astCodeModification.js";import{buildCertificateMapStatement as c,rewriteDomainPropertyAccess as i}from"./astDomainRewriter.js";export{c as buildCertificateMapStatement,t as createBackup,o as replaceStatement,i as rewriteDomainPropertyAccess,m as rewriteNamedImport};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Tree } from "@nx/devkit";
|
|
2
|
-
/**
|
|
3
|
-
* Copies shared CDK configuration files to the target directory
|
|
4
|
-
* @param tree - Nx workspace tree
|
|
5
|
-
* @param targetPath - Target directory path. Can be:
|
|
6
|
-
* - App name only (e.g., "myapp") - will be prefixed with "fjall/"
|
|
7
|
-
* - Full path (e.g., "fjall/account") - will be used as-is
|
|
8
|
-
* @param templateVariables - Variables for EJS template rendering
|
|
9
|
-
*/
|
|
10
|
-
export declare function copySharedCdkFiles(tree: Tree, targetPath: string, templateVariables: Record<string, unknown>): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{join as n}from"path";import{renderEjsTemplates as s}from"./renderEjs.js";import{getAppPath as p}from"../../src/util/pathHelpers.js";const t=import.meta.dirname;function f(o,e,i){const r=n(t,"..","shared","files"),m=e.includes("/")?e:p(e);s(o,r,m,i)}export{f as copySharedCdkFiles};
|