cdk-factory 0.9.2__py3-none-any.whl → 0.9.4__py3-none-any.whl

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.
cdk_factory/app.py CHANGED
@@ -37,32 +37,15 @@ class CdkAppFactory:
37
37
 
38
38
  # Auto-detect outdir for CodeBuild compatibility
39
39
  if outdir is None and self.args.outdir is None and auto_detect_project_root:
40
- # Check if we're in CodeBuild
41
- in_codebuild = bool(os.getenv('CODEBUILD_SRC_DIR'))
40
+ # For both local dev and CodeBuild: use CDK default (./cdk.out in current directory)
41
+ # This ensures CDK CLI can always find the files where it expects them
42
+ # CodeBuild buildspec handles artifact collection from the correct location
43
+ self.outdir = None
42
44
 
43
- if in_codebuild or is_pipeline:
44
- # For CodeBuild or explicit pipeline flag: calculate relative path to project_root/cdk.out
45
- # This ensures cdk.out is at project root and works in CodeBuild
46
- project_root = self._detect_project_root()
47
- runtime_path = Path(self.runtime_directory).resolve()
48
- project_path = Path(project_root).resolve()
49
- cdk_out_path = project_path / 'cdk.out'
50
-
51
- try:
52
- # Calculate relative path from runtime directory to project_root/cdk.out
53
- relative_path = os.path.relpath(cdk_out_path, runtime_path)
54
- self.outdir = relative_path
55
- if in_codebuild:
56
- print(f"📦 CodeBuild detected: using relative path '{relative_path}'")
57
- else:
58
- print(f"📦 Pipeline mode: using relative path '{relative_path}'")
59
- except ValueError:
60
- # If paths are on different drives (Windows), fallback to absolute
61
- self.outdir = str(cdk_out_path)
62
- else:
63
- # For local dev: use CDK default (./cdk.out in current directory)
64
- # This allows CDK CLI to find it when running 'cdk synth' or 'cdk deploy'
65
- self.outdir = None
45
+ # Log for transparency
46
+ if os.getenv('CODEBUILD_SRC_DIR'):
47
+ print(f"📦 CodeBuild detected: using CDK default (./cdk.out)")
48
+ print(f" └─ BuildSpec will collect artifacts from correct location")
66
49
  else:
67
50
  self.outdir = outdir or self.args.outdir
68
51
 
@@ -361,17 +361,16 @@ class PipelineFactoryStack(cdk.Stack):
361
361
 
362
362
  cdk_out_directory = self.workload.output_directory
363
363
 
364
- # CdkAppFactory already provides the correct path:
365
- # - For pipelines: relative path (e.g., "../../cdk.out" or "cdk.out")
366
- # - For local: absolute path (but this code only runs for pipelines)
367
- # If somehow we get an absolute path, convert it to just the basename
368
- if cdk_out_directory and os.path.isabs(cdk_out_directory):
369
- # Fallback: just use the last component
364
+ # Handle None case (CDK default behavior)
365
+ if cdk_out_directory is None:
366
+ cdk_out_directory = "cdk.out"
367
+ # If absolute path, convert to basename
368
+ elif os.path.isabs(cdk_out_directory):
370
369
  cdk_out_directory = os.path.basename(cdk_out_directory)
371
370
 
372
371
  build_commands.append(f"echo 👉 cdk_directory: {cdk_directory}")
373
- build_commands.append(f"echo 👉 cdk_out_directory (relative): {cdk_out_directory}")
374
- build_commands.append("echo 👉 PWD from synth shell step: ${PWD}")
372
+ build_commands.append(f"echo 👉 cdk_out_directory: {cdk_out_directory}")
373
+ build_commands.append("echo 👉 PWD from synth shell step: ${{PWD}}")
375
374
 
376
375
  shell = pipelines.ShellStep(
377
376
  "CDK Synth",
cdk_factory/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.9.2"
1
+ __version__ = "0.9.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdk_factory
3
- Version: 0.9.2
3
+ Version: 0.9.4
4
4
  Summary: CDK Factory. A QuickStarter and best practices setup for CDK projects
5
5
  Author-email: Eric Wilson <eric.wilson@geekcafe.com>
6
6
  License: MIT License
@@ -1,8 +1,8 @@
1
1
  cdk_factory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- cdk_factory/app.py,sha256=HIkJKmyPMsUdH3M1TpUx_8JmhP8CMN67iqrnCCfuqs8,9920
2
+ cdk_factory/app.py,sha256=TR9U84oc20x2oPH3tcSgr8ukxddqMQjVHILTgvBNsA4,8980
3
3
  cdk_factory/cdk.json,sha256=SKZKhJ2PBpFH78j-F8S3VDYW-lf76--Q2I3ON-ZIQfw,3106
4
4
  cdk_factory/cli.py,sha256=FGbCTS5dYCNsfp-etshzvFlGDCjC28r6rtzYbe7KoHI,6407
5
- cdk_factory/version.py,sha256=gqT-BGoeEItda9fICQDvLbxEjWRIBhFJxPxxKvmHLUo,22
5
+ cdk_factory/version.py,sha256=e56AvHfJCtG2ZwwINqsxINVbehWdKxMYgIDbjd7P-II,22
6
6
  cdk_factory/builds/README.md,sha256=9BBWd7bXpyKdMU_g2UljhQwrC9i5O_Tvkb6oPvndoZk,90
7
7
  cdk_factory/commands/command_loader.py,sha256=QbLquuP_AdxtlxlDy-2IWCQ6D-7qa58aphnDPtp_uTs,3744
8
8
  cdk_factory/configurations/base_config.py,sha256=JKjhNsy0RCUZy1s8n5D_aXXI-upR9izaLtCTfKYiV9k,9624
@@ -64,7 +64,7 @@ cdk_factory/interfaces/istack.py,sha256=bhTBs-o9FgKwvJMSuwxjUV6D3nUlvZHVzfm27jP9
64
64
  cdk_factory/interfaces/live_ssm_resolver.py,sha256=3FIr9a02SXqZmbFs3RT0WxczWEQR_CF7QSt7kWbDrVE,8163
65
65
  cdk_factory/interfaces/ssm_parameter_mixin.py,sha256=uA2j8HmAOpuEA9ynRj51s0WjUHMVLsbLQN-QS9NKyHA,12089
66
66
  cdk_factory/lambdas/health_handler.py,sha256=dd40ykKMxWCFEIyp2ZdQvAGNjw_ylI9CSm1N24Hp2ME,196
67
- cdk_factory/pipeline/pipeline_factory.py,sha256=NSyuADuVPsmNeo7-uoRZJrnn_KVdHzwXjLKLUcsJwRA,16480
67
+ cdk_factory/pipeline/pipeline_factory.py,sha256=HRzObL5NB9LiQsD6LZkSxnv6a8EltLY2aBp79GPpKqM,16285
68
68
  cdk_factory/pipeline/stage.py,sha256=Be7ExMB9A-linRM18IQDOzQ-cP_I2_ThRNzlT4FIrUg,437
69
69
  cdk_factory/pipeline/security/policies.py,sha256=H3-S6nipz3UtF9Pc5eJYr4-aREUTCaJWMjOUyd6Rdv4,4406
70
70
  cdk_factory/pipeline/security/roles.py,sha256=ZB_O5H_BXgotvVspS2kVad9EMcY-a_-vU7Nm1_Z5MB8,4985
@@ -119,8 +119,8 @@ cdk_factory/utilities/lambda_function_utilities.py,sha256=S1GvBsY_q2cyUiaud3HORJ
119
119
  cdk_factory/utilities/os_execute.py,sha256=5Op0LY_8Y-pUm04y1k8MTpNrmQvcLmQHPQITEP7EuSU,1019
120
120
  cdk_factory/utils/api_gateway_utilities.py,sha256=If7Xu5s_UxmuV-kL3JkXxPLBdSVUKoLtohm0IUFoiV8,4378
121
121
  cdk_factory/workload/workload_factory.py,sha256=yBUDGIuB8-5p_mGcVFxsD2ZoZIziak3yh3LL3JvS0M4,5903
122
- cdk_factory-0.9.2.dist-info/METADATA,sha256=SsZ15WsQ__50VFlAf2sUKyonHuqna80F-DZzNJwPLgo,2450
123
- cdk_factory-0.9.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
124
- cdk_factory-0.9.2.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
125
- cdk_factory-0.9.2.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
126
- cdk_factory-0.9.2.dist-info/RECORD,,
122
+ cdk_factory-0.9.4.dist-info/METADATA,sha256=AVEGNFotNKORtmVC3Nx3u6mil9--fS4FYbU5HhbEIf0,2450
123
+ cdk_factory-0.9.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
124
+ cdk_factory-0.9.4.dist-info/entry_points.txt,sha256=S1DPe0ORcdiwEALMN_WIo3UQrW_g4YdQCLEsc_b0Swg,53
125
+ cdk_factory-0.9.4.dist-info/licenses/LICENSE,sha256=NOtdOeLwg2il_XBJdXUPFPX8JlV4dqTdDGAd2-khxT8,1066
126
+ cdk_factory-0.9.4.dist-info/RECORD,,