dagger-env 0.6.4 → 0.6.6

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.
Files changed (2) hide show
  1. package/README.md +32 -32
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -30,30 +30,30 @@ import { z } from 'zod/v4'
30
30
  const myDaggerEnv = createDaggerEnv({
31
31
  args: z.object({
32
32
  push: z.string().optional(),
33
- environment: z.enum(['dev', 'staging', 'prod']).optional(),
33
+ environment: z.enum(['dev', 'staging', 'prod']).optional()
34
34
  }),
35
35
  env: z.object({
36
36
  CI: z.string().optional(),
37
- NODE_ENV: z.string().optional(),
37
+ NODE_ENV: z.string().optional()
38
38
  }),
39
39
  secrets: z.object({
40
40
  API_TOKEN: z.string(),
41
41
  DATABASE_URL: z.string(),
42
- REDIS_URL: z.string(),
42
+ REDIS_URL: z.string()
43
43
  }),
44
44
  secretPresets: {
45
45
  api: ['API_TOKEN', 'DATABASE_URL'],
46
- cache: ['REDIS_URL'],
46
+ cache: ['REDIS_URL']
47
47
  },
48
48
  derivedEnvVars: {
49
49
  API_TOKEN: {
50
50
  API_BASE_URL: 'https://api.example.com',
51
- API_VERSION: 'v1',
51
+ API_VERSION: 'v1'
52
52
  },
53
53
  DATABASE_URL: {
54
- DB_POOL_SIZE: '10',
55
- },
56
- },
54
+ DB_POOL_SIZE: '10'
55
+ }
56
+ }
57
57
  })
58
58
  ```
59
59
 
@@ -85,19 +85,19 @@ import { z } from 'zod/v4'
85
85
  // Create your DaggerEnv configuration
86
86
  const myDaggerEnv = createDaggerEnv({
87
87
  args: z.object({
88
- environment: z.enum(['dev', 'staging', 'prod']).optional(),
88
+ environment: z.enum(['dev', 'staging', 'prod']).optional()
89
89
  }),
90
90
  env: z.object({
91
91
  CI: z.string().optional(),
92
- NODE_ENV: z.string().optional(),
92
+ NODE_ENV: z.string().optional()
93
93
  }),
94
94
  secrets: z.object({
95
- API_TOKEN: z.string(),
95
+ API_TOKEN: z.string()
96
96
  }),
97
97
  secretPresets: {
98
- api: ['API_TOKEN'],
98
+ api: ['API_TOKEN']
99
99
  },
100
- derivedEnvVars: {},
100
+ derivedEnvVars: {}
101
101
  })
102
102
 
103
103
  // Create a command runner - simply pass your DaggerEnv instance
@@ -107,17 +107,17 @@ const runDaggerCommand = createDaggerCommandRunner({
107
107
  opSections: [
108
108
  {
109
109
  id: 'your-section-id',
110
- label: 'Shared',
111
- },
110
+ label: 'Shared'
111
+ }
112
112
  ],
113
113
  dockerCommands: ['build', 'deploy', 'test'],
114
- daggerEnv: myDaggerEnv,
114
+ daggerEnv: myDaggerEnv
115
115
  })
116
116
 
117
117
  // Run a Dagger command
118
118
  await runDaggerCommand('test', {
119
119
  args: { environment: 'dev' },
120
- env: { NODE_ENV: 'development' },
120
+ env: { NODE_ENV: 'development' }
121
121
  })
122
122
  ```
123
123
 
@@ -130,7 +130,7 @@ const runDaggerCommand = createDaggerCommandRunner({
130
130
  opItem: 'your-item-id',
131
131
  opSections: [
132
132
  { id: 'shared-section-id', label: 'Shared' },
133
- { id: 'project-section-id', label: 'Project Specific' },
133
+ { id: 'project-section-id', label: 'Project Specific' }
134
134
  ],
135
135
  dockerCommands: ['build', 'deploy', 'test'],
136
136
  beforeCommand: async () => {
@@ -138,7 +138,7 @@ const runDaggerCommand = createDaggerCommandRunner({
138
138
  console.log('Setting up environment...')
139
139
  // await setupDaggerVendorFiles()
140
140
  },
141
- daggerEnv: myDaggerEnv,
141
+ daggerEnv: myDaggerEnv
142
142
  })
143
143
  ```
144
144
 
@@ -236,23 +236,23 @@ Options for individual command execution:
236
236
  ```typescript
237
237
  const apiServiceEnv = createDaggerEnv({
238
238
  args: z.object({
239
- push: z.string().optional(),
239
+ push: z.string().optional()
240
240
  }),
241
241
  env: z.object({
242
- CI: z.string().optional(),
242
+ CI: z.string().optional()
243
243
  }),
244
244
  secrets: z.object({
245
245
  API_TOKEN: z.string(),
246
- DATABASE_URL: z.string(),
246
+ DATABASE_URL: z.string()
247
247
  }),
248
248
  secretPresets: {
249
- api: ['API_TOKEN', 'DATABASE_URL'],
249
+ api: ['API_TOKEN', 'DATABASE_URL']
250
250
  } as const,
251
251
  derivedEnvVars: {
252
252
  API_TOKEN: {
253
- API_BASE_URL: 'https://api.example.com',
254
- },
255
- } as const,
253
+ API_BASE_URL: 'https://api.example.com'
254
+ }
255
+ } as const
256
256
  })
257
257
  ```
258
258
 
@@ -262,26 +262,26 @@ const apiServiceEnv = createDaggerEnv({
262
262
  const multiEnvDaggerEnv = createDaggerEnv({
263
263
  args: z.object({
264
264
  environment: z.enum(['dev', 'staging', 'prod']),
265
- push: z.string().optional(),
265
+ push: z.string().optional()
266
266
  }),
267
267
  env: z.object({
268
- CI: z.string().optional(),
268
+ CI: z.string().optional()
269
269
  }),
270
270
  secrets: z.object({
271
271
  DEV_API_KEY: z.string(),
272
272
  STAGING_API_KEY: z.string(),
273
- PROD_API_KEY: z.string(),
273
+ PROD_API_KEY: z.string()
274
274
  }),
275
275
  secretPresets: {
276
276
  dev: ['DEV_API_KEY'],
277
277
  staging: ['STAGING_API_KEY'],
278
- prod: ['PROD_API_KEY'],
278
+ prod: ['PROD_API_KEY']
279
279
  } as const,
280
280
  derivedEnvVars: {
281
281
  DEV_API_KEY: { API_URL: 'https://dev-api.example.com' },
282
282
  STAGING_API_KEY: { API_URL: 'https://staging-api.example.com' },
283
- PROD_API_KEY: { API_URL: 'https://api.example.com' },
284
- } as const,
283
+ PROD_API_KEY: { API_URL: 'https://api.example.com' }
284
+ } as const
285
285
  })
286
286
  ```
287
287
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dagger-env",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "private": false,
5
5
  "description": "A type-safe, reusable environment configuration abstraction for Dagger modules.",
6
6
  "keywords": [
@@ -50,12 +50,12 @@
50
50
  "zx": "8.8.4"
51
51
  },
52
52
  "devDependencies": {
53
- "@dagger.io/dagger": "0.18.9",
53
+ "@dagger.io/dagger": "0.19.9",
54
54
  "typescript": "5.8.2",
55
55
  "vitest": "3.2.4",
56
56
  "zod": "4.1.12",
57
- "@repo/tools": "0.12.1",
58
- "@repo/typescript-config": "0.3.8"
57
+ "@repo/tools": "0.12.3",
58
+ "@repo/typescript-config": "0.3.10"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "zod": "^3.25.76 || ^4.1.12"