@secretenvs/cli 1.5.0 → 1.6.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.
Files changed (2) hide show
  1. package/dist/index.js +32 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -91,7 +91,9 @@ var UserDto = z2.object({
91
91
  createdAt: isoDate,
92
92
  twoFactorEnabled: z2.boolean(),
93
93
  // Name the user gave the authenticator app at setup; null while 2FA is off.
94
- twoFactorAppName: z2.string().nullable()
94
+ twoFactorAppName: z2.string().nullable(),
95
+ // Whether the account may use the /admin pages (set directly in the database).
96
+ isSuperAdmin: z2.boolean()
95
97
  }).strict();
96
98
  var TwoFactorSetupDto = z2.object({ secret: z2.string(), otpauthUri: z2.string() }).strict();
97
99
  var TwoFactorSetupInput = z2.object({ password: z2.string().min(1).max(MAX_PASSWORD_LENGTH) }).strict();
@@ -242,6 +244,34 @@ var SdkProjectDto = z2.object({
242
244
  role: ProjectRole,
243
245
  environments: z2.array(SdkEnvironmentDto)
244
246
  }).strict();
247
+ var adminPerson = z2.object({ id, name, email }).strict();
248
+ var AdminProjectDto = ProjectDto.extend({
249
+ owner: adminPerson.nullable(),
250
+ memberCount: z2.number().int().min(0),
251
+ environmentCount: z2.number().int().min(0)
252
+ });
253
+ var AdminUserDto = z2.object({
254
+ id,
255
+ email,
256
+ name,
257
+ createdAt: isoDate,
258
+ // Null while the account is enabled.
259
+ disabledAt: isoDate.nullable(),
260
+ isSuperAdmin: z2.boolean(),
261
+ projectCount: z2.number().int().min(0)
262
+ }).strict();
263
+ var AdminUserDetailDto = AdminUserDto.extend({
264
+ // Every project the user is a member of, with their role there.
265
+ projects: z2.array(z2.object({ id, name, slug, role: ProjectRole }).strict())
266
+ });
267
+ var AdminUpdateUserInput = z2.object({
268
+ name: name.optional(),
269
+ email: email.optional(),
270
+ disabled: z2.boolean().optional()
271
+ }).strict().refine(
272
+ (input2) => input2.name !== void 0 || input2.email !== void 0 || input2.disabled !== void 0,
273
+ { message: "Provide name, email and/or disabled" }
274
+ );
245
275
  var CreateTokenInput = z2.object({
246
276
  name,
247
277
  access: TokenAccess,
@@ -1297,7 +1327,7 @@ async function runCommand(deps, command, flags) {
1297
1327
  }
1298
1328
 
1299
1329
  // src/program.ts
1300
- var VERSION = true ? "1.5.0" : "dev";
1330
+ var VERSION = true ? "1.6.0" : "dev";
1301
1331
  function buildProgram(deps, setExitCode) {
1302
1332
  const program = new Command().name("secretenvs").description("Read and manage SecretEnvs variables from the terminal").version(VERSION).configureOutput({
1303
1333
  writeOut: (text) => deps.stdout.write(text),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secretenvs/cli",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Command-line client for reading and managing SecretEnvs variables.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/ankityadavpurson/secretenvs#readme",
@@ -44,8 +44,8 @@
44
44
  "zod": "^4.1.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@secretenvs/contracts": "1.5.0",
48
- "@secretenvs/sdk": "1.5.0",
47
+ "@secretenvs/contracts": "1.6.0",
48
+ "@secretenvs/sdk": "1.6.0",
49
49
  "@types/cross-spawn": "^6.0.6",
50
50
  "tsup": "^8.5.0",
51
51
  "typescript": "~5.9.3",