@mono-labs/cli 0.1.249 → 0.1.253

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.
@@ -37,7 +37,7 @@ export async function runMonoCommand(configObject: any, options: any = {}): Prom
37
37
  const keymap = parseEnvFile(envPath)
38
38
 
39
39
  const prodConfig = configObject.environments?.prod ?? {}
40
- const awsProfile = process.env.CDK_DEPLOY_PROFILE || 'default'
40
+ const awsProfile = process.env.CDK_DEPLOY_PROFILE || process.env.AWS_PROFILE || 'default'
41
41
  const envObjBase: Record<string, any> = options.prod ? { ...prodConfig } : { ...devConfig }
42
42
 
43
43
  Object.keys(envObjBase).forEach((k) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mono-labs/cli",
3
- "version": "0.1.249",
3
+ "version": "0.1.253",
4
4
  "type": "commonjs",
5
5
  "description": "A CLI tool for building and deploying projects",
6
6
  "main": "dist/index.js",
@@ -10,31 +10,6 @@
10
10
  "types": "./dist/index.d.ts",
11
11
  "require": "./dist/index.js",
12
12
  "default": "./dist/index.js"
13
- },
14
- "./expo": {
15
- "types": "./dist/src/expo.d.ts",
16
- "require": "./dist/src/expo.js",
17
- "default": "./dist/src/expo.js"
18
- },
19
- "./tools": {
20
- "types": "./dist/src/tools.d.ts",
21
- "require": "./dist/src/tools.js",
22
- "default": "./dist/src/tools.js"
23
- },
24
- "./cdk": {
25
- "types": "./dist/src/cdk.d.ts",
26
- "require": "./dist/src/cdk.js",
27
- "default": "./dist/src/cdk.js"
28
- },
29
- "./stack": {
30
- "types": "./dist/src/stack.d.ts",
31
- "require": "./dist/src/stack.js",
32
- "default": "./dist/src/stack.js"
33
- },
34
- "./project": {
35
- "types": "./dist/src/project.d.ts",
36
- "require": "./dist/src/project.js",
37
- "default": "./dist/src/project.js"
38
13
  }
39
14
  },
40
15
  "repository": {
@@ -70,8 +45,7 @@
70
45
  "node": ">=20.0.0"
71
46
  },
72
47
  "dependencies": {
73
- "@mono-labs/project": "0.1.249",
74
- "@mono-labs/expo": "0.1.249",
48
+ "@mono-labs/project": "0.1.253",
75
49
  "chalk": "^4.1.2",
76
50
  "commander": "^11.1.0",
77
51
  "cross-spawn": "^7.0.6",
@@ -80,38 +54,9 @@
80
54
  "prettier": "^3.6.2",
81
55
  "tree-kill": "^1.2.2"
82
56
  },
83
- "peerDependencies": {
84
- "aws-cdk-lib": "^2.235.0",
85
- "constructs": "^10.4.5",
86
- "@aws-sdk/client-dynamodb": "^3.848.0",
87
- "@aws-sdk/util-dynamodb": "^3.848.0",
88
- "expo": ">=52"
89
- },
90
- "peerDependenciesMeta": {
91
- "aws-cdk-lib": {
92
- "optional": true
93
- },
94
- "constructs": {
95
- "optional": true
96
- },
97
- "@aws-sdk/client-dynamodb": {
98
- "optional": true
99
- },
100
- "@aws-sdk/util-dynamodb": {
101
- "optional": true
102
- },
103
- "expo": {
104
- "optional": true
105
- }
106
- },
107
57
  "devDependencies": {
108
58
  "@types/node": "^25.1.0",
109
- "typescript": "^5.9.3",
110
- "aws-cdk-lib": "^2.235.0",
111
- "constructs": "^10.4.5",
112
- "@aws-sdk/client-dynamodb": "^3.848.0",
113
- "@aws-sdk/util-dynamodb": "^3.848.0",
114
- "expo": ">=52"
59
+ "typescript": "^5.9.3"
115
60
  },
116
61
  "files": [
117
62
  "bin/",
package/src/index.ts CHANGED
@@ -1,11 +1,5 @@
1
1
  // Main entry point for @mono-labs/cli package
2
2
 
3
- import {
4
- filterUnwantedEnvVars,
5
- filterUnwantedEnvVarsEASExpo as filterUnwantedEnvVarsEAS,
6
- generateNewEnvList,
7
- } from '@mono-labs/expo'
8
-
9
3
  /* ------------------------------------------------------------------
10
4
  * Internal data layer
11
5
  * ------------------------------------------------------------------ */
@@ -63,11 +57,6 @@ export function replaceTokens(str: unknown, env?: Record<string, string | undefi
63
57
  * Exports
64
58
  * ------------------------------------------------------------------ */
65
59
 
66
- export { generateNewEnvList, filterUnwantedEnvVars, filterUnwantedEnvVarsEAS }
67
-
68
60
  export default {
69
- generateNewEnvList,
70
61
  replaceTokens,
71
- filterUnwantedEnvVars,
72
- filterUnwantedEnvVarsEAS,
73
62
  }
package/src/cdk.ts DELETED
@@ -1,2 +0,0 @@
1
- // Backward-compatible re-export from @mono-labs/expo
2
- export { replaceTokens, setUpConfig } from '@mono-labs/expo'
package/src/expo.ts DELETED
@@ -1,2 +0,0 @@
1
- // Backward-compatible re-export from @mono-labs/expo
2
- export { replaceTokens, setUpConfig, filterUnwantedEnvVarsEAS } from '@mono-labs/expo'
package/src/project.ts DELETED
@@ -1,19 +0,0 @@
1
- // Backward-compatible re-export from @mono-labs/project
2
- export {
3
- findProjectRoot,
4
- getRootDirectory,
5
- getRootJson,
6
- resolveMonoDirectory,
7
- getMonoFiles,
8
- getMonoConfig,
9
- loadAppConfig,
10
- loadProjectConfig,
11
- loadMergedEnv,
12
- } from '@mono-labs/project'
13
-
14
- export type {
15
- MonoWorkspaceConfig,
16
- MonoProjectConfig,
17
- MonoFiles,
18
- MonoConfig,
19
- } from '@mono-labs/project'
package/src/stack.ts DELETED
@@ -1,73 +0,0 @@
1
- import * as cdk from 'aws-cdk-lib'
2
- import { Construct } from 'constructs'
3
- import { loadMergedEnv } from '@mono-labs/project'
4
-
5
- loadMergedEnv()
6
- //cdk deploy --context owner=cody --context region=us-west-1
7
-
8
- const dev = 'dev'
9
- export interface ICustomStack extends cdk.Stack {
10
- ownerName: string
11
- region: string
12
- enableNATGateway: boolean
13
- }
14
-
15
- export interface CustomStackProps extends cdk.StackProps {
16
- ownerName?: string
17
- region?: string
18
- enableNATGateway?: boolean
19
- domainName?: string
20
- }
21
-
22
- export abstract class CustomStack extends cdk.Stack {
23
- public ownerName: string
24
- public region: string
25
- public domainName?: string
26
- protected enableNATGateway: boolean = false
27
-
28
- constructor(scope: Construct, id: string, props: CustomStackProps = {}) {
29
- // Resolve account + region BEFORE super()
30
- const resolvedEnv: cdk.Environment | undefined = {
31
- account: props.env?.account ?? process.env.AWS_ACCOUNT ?? cdk.Aws.ACCOUNT_ID, // final fallback (lazy token)
32
- region: props.env?.region ?? process.env.AWS_REGION ?? 'us-east-2',
33
- }
34
-
35
- super(scope, id, {
36
- ...props,
37
- env: resolvedEnv,
38
- })
39
-
40
- // Now it's safe to read these
41
- this.ownerName = props.ownerName ?? 'dev'
42
- this.domainName = props.domainName
43
- this.region = resolvedEnv.region!
44
- this.enableNATGateway = props.enableNATGateway ?? false
45
- }
46
-
47
- public initializeStackConfig(): void {
48
- // Context overrides (deploy-time flags)
49
- const ctxOwner = this.node.tryGetContext('owner') || dev
50
- const ctxRegion = this.node.tryGetContext('region') || 'us-east-2'
51
- const ctxNat = this.node.tryGetContext('enableNATGateway')
52
-
53
- if (ctxOwner) this.ownerName = ctxOwner
54
- if (ctxRegion) this.region = ctxRegion
55
-
56
- // NAT logic
57
- if (ctxNat !== undefined) {
58
- this.enableNATGateway = ctxNat === 'true'
59
- }
60
-
61
- // Production default
62
- if (this.ownerName === 'prod' || this.ownerName === 'production') {
63
- this.enableNATGateway = ctxNat !== 'false'
64
- }
65
-
66
- console.log('[Stack Config]', {
67
- owner: this.ownerName,
68
- region: this.region,
69
- account: this.account,
70
- natGateway: this.enableNATGateway,
71
- })
72
- }
73
- }
package/src/tools.ts DELETED
@@ -1,2 +0,0 @@
1
- // Backward-compatible re-export from @mono-labs/expo/tools
2
- export { replaceTokens, setUpConfig } from '@mono-labs/expo'