@shipdit/cli 0.3.0 → 0.3.1

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.mjs +246 -177
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -77,7 +77,7 @@ function resolveRuntimeConfig(flags, options) {
77
77
  }
78
78
 
79
79
  //#endregion
80
- //#region ../../node_modules/.pnpm/hono@4.13.0/node_modules/hono/dist/utils/cookie.js
80
+ //#region ../../node_modules/.pnpm/hono@4.13.5/node_modules/hono/dist/utils/cookie.js
81
81
  var validCookieNameRegEx = /^[\w!#$%&'*.^`|~+-]+$/;
82
82
  var _serialize = (name, value, opt = {}) => {
83
83
  if (!validCookieNameRegEx.test(name)) throw new Error("Invalid cookie name");
@@ -120,7 +120,7 @@ var serialize = (name, value, opt) => {
120
120
  };
121
121
 
122
122
  //#endregion
123
- //#region ../../node_modules/.pnpm/hono@4.13.0/node_modules/hono/dist/client/utils.js
123
+ //#region ../../node_modules/.pnpm/hono@4.13.5/node_modules/hono/dist/client/utils.js
124
124
  var mergePath = (base, path) => {
125
125
  base = base.replace(/\/+$/, "");
126
126
  base = base + "/";
@@ -130,7 +130,7 @@ var mergePath = (base, path) => {
130
130
  var replaceUrlParam = (urlString, params) => {
131
131
  for (const [k, v] of Object.entries(params)) {
132
132
  const reg = new RegExp("/:" + k + "(?:{[^/]+})?\\??(?=/|$)");
133
- urlString = urlString.replace(reg, v ? `/${v}` : "");
133
+ urlString = urlString.replace(reg, () => v ? `/${v}` : "");
134
134
  }
135
135
  return urlString;
136
136
  };
@@ -138,7 +138,10 @@ var buildSearchParams = (query) => {
138
138
  const searchParams = new URLSearchParams();
139
139
  for (const [k, v] of Object.entries(query)) {
140
140
  if (v === void 0) continue;
141
- if (Array.isArray(v)) for (const v2 of v) searchParams.append(k, v2);
141
+ if (Array.isArray(v)) for (const v2 of v) {
142
+ if (v2 === void 0) continue;
143
+ searchParams.append(k, v2);
144
+ }
142
145
  else searchParams.set(k, v);
143
146
  }
144
147
  return searchParams;
@@ -168,7 +171,7 @@ function deepMerge(target, source) {
168
171
  }
169
172
 
170
173
  //#endregion
171
- //#region ../../node_modules/.pnpm/hono@4.13.0/node_modules/hono/dist/client/client.js
174
+ //#region ../../node_modules/.pnpm/hono@4.13.5/node_modules/hono/dist/client/client.js
172
175
  var createProxy = (callback, path) => {
173
176
  return new Proxy(() => {}, {
174
177
  get(_obj, key) {
@@ -183,6 +186,10 @@ var createProxy = (callback, path) => {
183
186
  }
184
187
  });
185
188
  };
189
+ var appendQueryParams = (url, searchParams) => {
190
+ const queryString = searchParams.toString();
191
+ return queryString ? `${url}?${queryString}` : url;
192
+ };
186
193
  var ClientRequestImpl = class {
187
194
  url;
188
195
  method;
@@ -203,12 +210,15 @@ var ClientRequestImpl = class {
203
210
  const form = new FormData();
204
211
  for (const [k, v] of Object.entries(args.form)) {
205
212
  if (v === void 0) continue;
206
- if (Array.isArray(v)) for (const v2 of v) form.append(k, v2);
213
+ if (Array.isArray(v)) for (const v2 of v) {
214
+ if (v2 === void 0) continue;
215
+ form.append(k, v2);
216
+ }
207
217
  else form.append(k, v);
208
218
  }
209
219
  this.rBody = form;
210
220
  }
211
- if (args.json) {
221
+ if (args.json !== void 0) {
212
222
  this.rBody = JSON.stringify(args.json);
213
223
  this.cType = "application/json";
214
224
  }
@@ -221,15 +231,19 @@ var ClientRequestImpl = class {
221
231
  };
222
232
  if (args?.cookie) {
223
233
  const cookies = [];
224
- for (const [key, value] of Object.entries(args.cookie)) cookies.push(serialize(key, value, { path: "/" }));
225
- headerValues["Cookie"] = cookies.join(",");
234
+ for (const [key, value] of Object.entries(args.cookie)) {
235
+ if (value === void 0) continue;
236
+ cookies.push(serialize(key, value));
237
+ }
238
+ if (cookies.length > 0) headerValues["Cookie"] = cookies.join("; ");
226
239
  }
227
240
  if (this.cType) headerValues["Content-Type"] = this.cType;
228
- const headers = new Headers(headerValues ?? void 0);
241
+ const headers = new Headers();
242
+ for (const [key, value] of Object.entries(headerValues)) if (value !== void 0) headers.set(key, value);
229
243
  let url = this.url;
230
244
  url = removeIndexString(url);
231
245
  url = replaceUrlParam(url, this.pathParams);
232
- if (this.queryParams) url = url + "?" + this.queryParams.toString();
246
+ if (this.queryParams) url = appendQueryParams(url, this.queryParams);
233
247
  methodUpperCase = this.method.toUpperCase();
234
248
  const setBody = !(methodUpperCase === "GET" || methodUpperCase === "HEAD");
235
249
  return (opt?.fetch || fetch)(url, {
@@ -263,19 +277,18 @@ var hc = (baseUrl, options) => createProxy(function proxyCallback(opts) {
263
277
  let result = url;
264
278
  if (opts.args[0]) {
265
279
  if (opts.args[0].param) result = replaceUrlParam(url, opts.args[0].param);
266
- if (opts.args[0].query) result = result + "?" + buildSearchParamsOption(opts.args[0].query).toString();
280
+ if (opts.args[0].query) result = appendQueryParams(result, buildSearchParamsOption(opts.args[0].query));
267
281
  }
268
282
  result = removeIndexString(result);
269
283
  if (method === "url") return new URL(result);
270
284
  return result.slice(baseUrl.replace(/\/+$/, "").length).replace(/^\/?/, "/");
271
285
  }
272
286
  if (method === "ws") {
273
- const webSocketUrl = replaceUrlProtocol(opts.args[0] && opts.args[0].param ? replaceUrlParam(url, opts.args[0].param) : url, "ws");
287
+ const webSocketUrl = replaceUrlProtocol(opts.args[0]?.param ? replaceUrlParam(url, opts.args[0].param) : url, "ws");
274
288
  const targetUrl = new URL(webSocketUrl);
275
289
  const queryParams = opts.args[0]?.query;
276
- if (queryParams) Object.entries(queryParams).forEach(([key, value]) => {
277
- if (Array.isArray(value)) value.forEach((item) => targetUrl.searchParams.append(key, item));
278
- else targetUrl.searchParams.set(key, value);
290
+ if (queryParams) buildSearchParamsOption(queryParams).forEach((value, key) => {
291
+ targetUrl.searchParams.append(key, value);
279
292
  });
280
293
  const establishWebSocket = (...args) => {
281
294
  if (options?.webSocket !== void 0 && typeof options.webSocket === "function") return options.webSocket(...args);
@@ -307,7 +320,12 @@ const t$2 = [
307
320
  `not_found`,
308
321
  `conflict`,
309
322
  `validation_error`,
310
- `internal`
323
+ `payload_too_large`,
324
+ `quota_exceeded`,
325
+ `rate_limited`,
326
+ `internal`,
327
+ `tenant_migrating`,
328
+ `tenant_unavailable`
311
329
  ];
312
330
  function n$2(e) {
313
331
  if (typeof e != `object` || !e || !(`error` in e)) return !1;
@@ -321,22 +339,26 @@ var r$1 = class e extends Error {
321
339
  status;
322
340
  requestId;
323
341
  details;
342
+ retryAfterSeconds;
324
343
  constructor(e) {
325
- super(e.message), this.name = `ShipdApiError`, this.code = e.code, this.status = e.status, this.requestId = e.requestId, this.details = e.details;
344
+ super(e.message), this.name = `ShipdApiError`, this.code = e.code, this.status = e.status, this.requestId = e.requestId, this.details = e.details, this.retryAfterSeconds = e.retryAfterSeconds;
326
345
  }
327
- static fromResponse(r, i) {
346
+ static fromResponse(r, i, a) {
347
+ let o = a == null ? NaN : Number(a), s = Number.isFinite(o) && o >= 0 ? o : void 0;
328
348
  return n$2(i) ? new e({
329
349
  code: t$2.includes(i.error.code) ? i.error.code : `unknown`,
330
350
  message: i.error.message,
331
351
  status: r,
332
352
  requestId: i.error.requestId,
333
- details: i.error.details
353
+ details: i.error.details,
354
+ retryAfterSeconds: s
334
355
  }) : new e({
335
356
  code: `unknown`,
336
357
  message: `Request failed with status ${r}`,
337
358
  status: r,
338
359
  requestId: `unknown`,
339
- details: i
360
+ details: i,
361
+ retryAfterSeconds: s
340
362
  });
341
363
  }
342
364
  };
@@ -352,7 +374,7 @@ async function i$1(e) {
352
374
  requestId: `unknown`
353
375
  });
354
376
  }
355
- if (!e.ok) throw r$1.fromResponse(e.status, t);
377
+ if (!e.ok) throw r$1.fromResponse(e.status, t, e.headers.get(`retry-after`));
356
378
  if (typeof t != `object` || !t || !(`data` in t)) throw new r$1({
357
379
  code: `internal`,
358
380
  message: `Malformed success response`,
@@ -379,10 +401,12 @@ const v$1 = (...t) => hc(...t);
379
401
  const y$1 = (...t) => hc(...t);
380
402
  const b$1 = (...t) => hc(...t);
381
403
  const x$1 = (...t) => hc(...t);
382
- function S$1(e) {
404
+ const S$1 = (...t) => hc(...t);
405
+ const C$1 = (...t) => hc(...t);
406
+ function w$1(e) {
383
407
  return `${e.replace(/\/+$/, ``)}/api/v1/rpc`;
384
408
  }
385
- function C$1(e) {
409
+ function T$1(e) {
386
410
  return {
387
411
  ...e.fetch ? { fetch: e.fetch } : {},
388
412
  init: { credentials: e.client === `dashboard` ? `include` : `same-origin` },
@@ -392,148 +416,171 @@ function C$1(e) {
392
416
  }
393
417
  };
394
418
  }
395
- async function w$1(e, t) {
419
+ async function E$1(e, t) {
396
420
  return i$1(await e({ json: t }));
397
421
  }
398
- function T$1(e) {
399
- let t = S$1(e.baseUrl), n = C$1(e), r = a$1(t, n), i = o$1(t, n), T = s$1(t, n), E = c$1(t, n), D = l$1(t, n), O = u$1(t, n), k = d$2(t, n), A = f$2(t, n), j = g$1(t, n), M = h$1(t, n), N = p$1(t, n), P = m$1(t, n), F = _$1(t, n), I = v$1(t, n), L = y$1(t, n), R = b$1(t, n), z = x$1(t, n);
422
+ async function D$1(e, t) {
423
+ let n = await e({ json: t });
424
+ return {
425
+ items: await i$1(n),
426
+ nextCursor: n.headers.get(`next-cursor`)
427
+ };
428
+ }
429
+ function O$1(e) {
430
+ let t = w$1(e.baseUrl), n = T$1(e), r = a$1(t, n), i = o$1(t, n), O = s$1(t, n), k = c$1(t, n), A = l$1(t, n), j = u$1(t, n), M = d$2(t, n), N = f$2(t, n), P = g$1(t, n), F = h$1(t, n), I = p$1(t, n), L = m$1(t, n), R = _$1(t, n), z = v$1(t, n), B = y$1(t, n), V = C$1(t, n), H = b$1(t, n), U = x$1(t, n), W = S$1(t, n);
400
431
  return {
401
432
  me: {
402
- get: (e = {}) => w$1(r.me.$post, e),
403
- feedback: (e) => w$1(r.me.feedback.$post, e)
433
+ get: (e = {}) => E$1(r.me.$post, e),
434
+ feedback: (e) => E$1(r.me.feedback.$post, e)
404
435
  },
405
436
  project: {
406
- list: (e = {}) => w$1(i.project.list.$post, e),
407
- create: (e) => w$1(i.project.create.$post, e),
408
- update: (e) => w$1(i.project.update.$post, e),
409
- archive: (e) => w$1(i.project.archive.$post, e),
410
- listTeams: (e) => w$1(i.project.listTeams.$post, e),
411
- setTeams: (e) => w$1(i.project.setTeams.$post, e)
437
+ list: (e = {}) => E$1(i.project.list.$post, e),
438
+ create: (e) => E$1(i.project.create.$post, e),
439
+ update: (e) => E$1(i.project.update.$post, e),
440
+ archive: (e) => E$1(i.project.archive.$post, e),
441
+ listTeams: (e) => E$1(i.project.listTeams.$post, e),
442
+ setTeams: (e) => E$1(i.project.setTeams.$post, e)
412
443
  },
413
- team: { listMembers: (e) => w$1(R.team.listMembers.$post, e) },
444
+ team: { listMembers: (e) => E$1(H.team.listMembers.$post, e) },
414
445
  environment: {
415
- list: (e) => w$1(T.environment.list.$post, e),
416
- create: (e) => w$1(T.environment.create.$post, e),
417
- update: (e) => w$1(T.environment.update.$post, e),
418
- archive: (e) => w$1(T.environment.archive.$post, e)
446
+ list: (e) => E$1(O.environment.list.$post, e),
447
+ create: (e) => E$1(O.environment.create.$post, e),
448
+ update: (e) => E$1(O.environment.update.$post, e),
449
+ archive: (e) => E$1(O.environment.archive.$post, e)
419
450
  },
420
451
  flag: {
421
- list: (e) => w$1(E.flag.list.$post, e),
422
- get: (e) => w$1(E.flag.get.$post, e),
423
- create: (e) => w$1(E.flag.create.$post, e),
424
- update: (e) => w$1(E.flag.update.$post, e),
425
- archive: (e) => w$1(E.flag.archive.$post, e),
426
- updateEnvironment: (e) => w$1(E.flag.updateEnvironment.$post, e),
427
- toggleEnvironment: (e) => w$1(E.flag.toggleEnvironment.$post, e),
428
- listEnvironmentStates: (e) => w$1(E.flag.listEnvironmentStates.$post, e),
429
- pull: (e) => w$1(E.flag.pull.$post, e),
430
- diff: (e) => w$1(E.flag.diff.$post, e),
431
- push: (e) => w$1(E.flag.push.$post, e)
452
+ list: (e) => E$1(k.flag.list.$post, e),
453
+ get: (e) => E$1(k.flag.get.$post, e),
454
+ create: (e) => E$1(k.flag.create.$post, e),
455
+ update: (e) => E$1(k.flag.update.$post, e),
456
+ archive: (e) => E$1(k.flag.archive.$post, e),
457
+ updateEnvironment: (e) => E$1(k.flag.updateEnvironment.$post, e),
458
+ toggleEnvironment: (e) => E$1(k.flag.toggleEnvironment.$post, e),
459
+ listEnvironmentStates: (e) => E$1(k.flag.listEnvironmentStates.$post, e),
460
+ pull: (e) => E$1(k.flag.pull.$post, e),
461
+ diff: (e) => E$1(k.flag.diff.$post, e),
462
+ push: (e) => E$1(k.flag.push.$post, e)
432
463
  },
433
464
  apiKey: {
434
- list: (e = {}) => w$1(D.apiKey.list.$post, e),
435
- create: (e) => w$1(D.apiKey.create.$post, e),
436
- revoke: (e) => w$1(D.apiKey.revoke.$post, e)
465
+ list: (e = {}) => E$1(A.apiKey.list.$post, e),
466
+ create: (e) => E$1(A.apiKey.create.$post, e),
467
+ revoke: (e) => E$1(A.apiKey.revoke.$post, e)
437
468
  },
438
469
  sdkKey: {
439
- list: (e = {}) => w$1(A.sdkKey.list.$post, e),
440
- create: (e) => w$1(A.sdkKey.create.$post, e),
441
- revoke: (e) => w$1(A.sdkKey.revoke.$post, e)
470
+ list: (e = {}) => E$1(N.sdkKey.list.$post, e),
471
+ create: (e) => E$1(N.sdkKey.create.$post, e),
472
+ revoke: (e) => E$1(N.sdkKey.revoke.$post, e)
442
473
  },
443
474
  serviceAccount: {
444
- list: (e = {}) => w$1(j.serviceAccount.list.$post, e),
445
- get: (e) => w$1(j.serviceAccount.get.$post, e),
446
- create: (e) => w$1(j.serviceAccount.create.$post, e),
447
- update: (e) => w$1(j.serviceAccount.update.$post, e),
448
- disable: (e) => w$1(j.serviceAccount.disable.$post, e),
449
- enable: (e) => w$1(j.serviceAccount.enable.$post, e),
450
- delete: (e) => w$1(j.serviceAccount.delete.$post, e),
451
- createToken: (e) => w$1(j.serviceAccount.createToken.$post, e),
452
- listTokens: (e) => w$1(j.serviceAccount.listTokens.$post, e),
453
- revokeToken: (e) => w$1(j.serviceAccount.revokeToken.$post, e)
475
+ list: (e = {}) => E$1(P.serviceAccount.list.$post, e),
476
+ get: (e) => E$1(P.serviceAccount.get.$post, e),
477
+ create: (e) => E$1(P.serviceAccount.create.$post, e),
478
+ update: (e) => E$1(P.serviceAccount.update.$post, e),
479
+ disable: (e) => E$1(P.serviceAccount.disable.$post, e),
480
+ enable: (e) => E$1(P.serviceAccount.enable.$post, e),
481
+ delete: (e) => E$1(P.serviceAccount.delete.$post, e),
482
+ createToken: (e) => E$1(P.serviceAccount.createToken.$post, e),
483
+ listTokens: (e) => E$1(P.serviceAccount.listTokens.$post, e),
484
+ revokeToken: (e) => E$1(P.serviceAccount.revokeToken.$post, e),
485
+ rotateToken: (e) => E$1(P.serviceAccount.rotateToken.$post, e)
454
486
  },
455
487
  segment: {
456
- list: (e) => w$1(M.segment.list.$post, e),
457
- get: (e) => w$1(M.segment.get.$post, e),
458
- create: (e) => w$1(M.segment.create.$post, e),
459
- update: (e) => w$1(M.segment.update.$post, e),
460
- archive: (e) => w$1(M.segment.archive.$post, e),
461
- listEnvironmentStates: (e) => w$1(M.segment.listEnvironmentStates.$post, e),
462
- updateEnvironment: (e) => w$1(M.segment.updateEnvironment.$post, e)
488
+ list: (e) => E$1(F.segment.list.$post, e),
489
+ get: (e) => E$1(F.segment.get.$post, e),
490
+ create: (e) => E$1(F.segment.create.$post, e),
491
+ update: (e) => E$1(F.segment.update.$post, e),
492
+ archive: (e) => E$1(F.segment.archive.$post, e),
493
+ listEnvironmentStates: (e) => E$1(F.segment.listEnvironmentStates.$post, e),
494
+ updateEnvironment: (e) => E$1(F.segment.updateEnvironment.$post, e)
463
495
  },
464
496
  evaluatedEntity: {
465
- list: (e) => w$1(N.evaluatedEntity.list.$post, e),
466
- get: (e) => w$1(N.evaluatedEntity.get.$post, e),
467
- delete: (e) => w$1(N.evaluatedEntity.delete.$post, e)
497
+ list: (e) => E$1(I.evaluatedEntity.list.$post, e),
498
+ listPage: (e) => D$1(I.evaluatedEntity.list.$post, e),
499
+ get: (e) => E$1(I.evaluatedEntity.get.$post, e),
500
+ delete: (e) => E$1(I.evaluatedEntity.delete.$post, e)
468
501
  },
469
502
  evaluationFact: {
470
- list: (e) => w$1(P.evaluationFact.list.$post, e),
471
- byRule: (e) => w$1(P.evaluationFact.byRule.$post, e),
472
- orgSummary: (e = {}) => w$1(P.evaluationFact.orgSummary.$post, e),
473
- projectSummary: (e) => w$1(P.evaluationFact.projectSummary.$post, e),
474
- simulate: (e) => w$1(P.evaluationFact.simulate.$post, e)
503
+ list: (e) => E$1(L.evaluationFact.list.$post, e),
504
+ byRule: (e) => E$1(L.evaluationFact.byRule.$post, e),
505
+ orgSummary: (e = {}) => E$1(L.evaluationFact.orgSummary.$post, e),
506
+ projectSummary: (e) => E$1(L.evaluationFact.projectSummary.$post, e),
507
+ simulate: (e) => E$1(L.evaluationFact.simulate.$post, e)
475
508
  },
476
509
  snapshot: {
477
- publish: (e) => w$1(F.snapshot.publish.$post, e),
478
- listOutbox: (e = {}) => w$1(F.snapshot.outbox.list.$post, e),
479
- requeue: (e) => w$1(F.snapshot.outbox.requeue.$post, e),
480
- rebuild: (e) => w$1(F.snapshot.rebuild.$post, e),
481
- listPublications: (e) => w$1(F.snapshot.publications.list.$post, e)
510
+ publish: (e) => E$1(R.snapshot.publish.$post, e),
511
+ listOutbox: (e = {}) => E$1(R.snapshot.outbox.list.$post, e),
512
+ listOutboxPage: (e = {}) => D$1(R.snapshot.outbox.list.$post, e),
513
+ requeue: (e) => E$1(R.snapshot.outbox.requeue.$post, e),
514
+ rebuild: (e) => E$1(R.snapshot.rebuild.$post, e),
515
+ listPublications: (e) => E$1(R.snapshot.publications.list.$post, e),
516
+ listPublicationsPage: (e) => D$1(R.snapshot.publications.list.$post, e)
482
517
  },
483
- device: { authorize: (e) => w$1(I.device.authorize.$post, e) },
518
+ device: { authorize: (e) => E$1(z.device.authorize.$post, e) },
484
519
  billing: {
485
- get: (e = {}) => w$1(L.billing.get.$post, e),
486
- attach: (e) => w$1(L.billing.attach.$post, e),
487
- openPortal: (e) => w$1(L.billing.openPortal.$post, e)
520
+ get: (e = {}) => E$1(B.billing.get.$post, e),
521
+ attach: (e) => E$1(B.billing.attach.$post, e),
522
+ openPortal: (e) => E$1(B.billing.openPortal.$post, e)
488
523
  },
524
+ usage: { get: (e = {}) => E$1(V.usage.get.$post, e) },
489
525
  approval: {
490
- listPolicies: (e = {}) => w$1(O.approval.listPolicies.$post, e),
491
- createPolicy: (e) => w$1(O.approval.createPolicy.$post, e),
492
- updatePolicy: (e) => w$1(O.approval.updatePolicy.$post, e),
493
- deletePolicy: (e) => w$1(O.approval.deletePolicy.$post, e),
494
- listRequests: (e = {}) => w$1(O.approval.listRequests.$post, e),
495
- get: (e) => w$1(O.approval.get.$post, e),
496
- approve: (e) => w$1(O.approval.approve.$post, e),
497
- reject: (e) => w$1(O.approval.reject.$post, e),
498
- cancel: (e) => w$1(O.approval.cancel.$post, e)
526
+ listPolicies: (e = {}) => E$1(j.approval.listPolicies.$post, e),
527
+ createPolicy: (e) => E$1(j.approval.createPolicy.$post, e),
528
+ updatePolicy: (e) => E$1(j.approval.updatePolicy.$post, e),
529
+ deletePolicy: (e) => E$1(j.approval.deletePolicy.$post, e),
530
+ listRequests: (e = {}) => E$1(j.approval.listRequests.$post, e),
531
+ listRequestsPage: (e = {}) => D$1(j.approval.listRequests.$post, e),
532
+ get: (e) => E$1(j.approval.get.$post, e),
533
+ approve: (e) => E$1(j.approval.approve.$post, e),
534
+ reject: (e) => E$1(j.approval.reject.$post, e),
535
+ cancel: (e) => E$1(j.approval.cancel.$post, e)
499
536
  },
500
537
  audit: {
501
- list: (e = {}) => w$1(k.audit.list.$post, e),
502
- get: (e) => w$1(k.audit.get.$post, e),
503
- actions: (e = {}) => w$1(k.audit.actions.$post, e),
504
- export: (e) => w$1(k.audit.export.$post, e),
505
- getSettings: (e = {}) => w$1(k.audit.getSettings.$post, e),
506
- updateSettings: (e) => w$1(k.audit.updateSettings.$post, e),
507
- listDestinations: (e = {}) => w$1(k.audit.listDestinations.$post, e),
508
- createDestination: (e) => w$1(k.audit.createDestination.$post, e),
509
- updateDestination: (e) => w$1(k.audit.updateDestination.$post, e),
510
- deleteDestination: (e) => w$1(k.audit.deleteDestination.$post, e),
511
- testDestination: (e) => w$1(k.audit.testDestination.$post, e)
538
+ list: (e = {}) => E$1(M.audit.list.$post, e),
539
+ get: (e) => E$1(M.audit.get.$post, e),
540
+ actions: (e = {}) => E$1(M.audit.actions.$post, e),
541
+ export: (e) => E$1(M.audit.export.$post, e),
542
+ getSettings: (e = {}) => E$1(M.audit.getSettings.$post, e),
543
+ updateSettings: (e) => E$1(M.audit.updateSettings.$post, e),
544
+ listDestinations: (e = {}) => E$1(M.audit.listDestinations.$post, e),
545
+ createDestination: (e) => E$1(M.audit.createDestination.$post, e),
546
+ updateDestination: (e) => E$1(M.audit.updateDestination.$post, e),
547
+ deleteDestination: (e) => E$1(M.audit.deleteDestination.$post, e),
548
+ testDestination: (e) => E$1(M.audit.testDestination.$post, e)
512
549
  },
513
550
  sso: {
514
- getSettings: (e = {}) => w$1(z.sso.getSettings.$post, e),
515
- listProviders: (e = {}) => w$1(z.sso.listProviders.$post, e),
516
- updateAllowedDomains: (e) => w$1(z.sso.updateAllowedDomains.$post, e),
517
- setEnforcement: (e) => w$1(z.sso.setEnforcement.$post, e)
551
+ getSettings: (e = {}) => E$1(U.sso.getSettings.$post, e),
552
+ listProviders: (e = {}) => E$1(U.sso.listProviders.$post, e),
553
+ updateAllowedDomains: (e) => E$1(U.sso.updateAllowedDomains.$post, e),
554
+ setEnforcement: (e) => E$1(U.sso.setEnforcement.$post, e),
555
+ setRequireTwoFactor: (e) => E$1(U.sso.setRequireTwoFactor.$post, e)
556
+ },
557
+ scim: {
558
+ getConnection: (e = {}) => E$1(W.scim.getConnection.$post, e),
559
+ createConnection: (e = { creationRequestId: crypto.randomUUID() }) => E$1(W.scim.createConnection.$post, e),
560
+ rotateCredential: (e) => E$1(W.scim.rotateCredential.$post, e),
561
+ revokeCredential: (e) => E$1(W.scim.revokeCredential.$post, e),
562
+ decommissionConnection: (e) => E$1(W.scim.decommissionConnection.$post, e)
518
563
  },
519
564
  raw: {
520
565
  me: r,
521
566
  project: i,
522
- environment: T,
523
- flag: E,
524
- apiKey: D,
525
- approval: O,
526
- audit: k,
527
- sdkKey: A,
528
- serviceAccount: j,
529
- segment: M,
530
- evaluatedEntity: N,
531
- evaluationFact: P,
532
- snapshot: F,
533
- device: I,
534
- billing: L,
535
- team: R,
536
- sso: z
567
+ environment: O,
568
+ flag: k,
569
+ apiKey: A,
570
+ approval: j,
571
+ audit: M,
572
+ sdkKey: N,
573
+ serviceAccount: P,
574
+ segment: F,
575
+ evaluatedEntity: I,
576
+ evaluationFact: L,
577
+ snapshot: R,
578
+ device: z,
579
+ billing: B,
580
+ usage: V,
581
+ team: H,
582
+ sso: U,
583
+ scim: W
537
584
  }
538
585
  };
539
586
  }
@@ -677,7 +724,7 @@ var BetterAuthError = class extends Error {
677
724
  };
678
725
 
679
726
  //#endregion
680
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/access/access.mjs
727
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/access/access.mjs
681
728
  function unknownResourceResponse(requestedResource) {
682
729
  return {
683
730
  success: false,
@@ -754,7 +801,7 @@ function createAccessControl(s) {
754
801
  }
755
802
 
756
803
  //#endregion
757
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/two-factor/error-code.mjs
804
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/two-factor/error-code.mjs
758
805
  const TWO_FACTOR_ERROR_CODES = defineErrorCodes({
759
806
  OTP_NOT_ENABLED: "OTP not enabled",
760
807
  OTP_NOT_CONFIGURED: "OTP is not available",
@@ -771,11 +818,11 @@ const TWO_FACTOR_ERROR_CODES = defineErrorCodes({
771
818
  });
772
819
 
773
820
  //#endregion
774
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/package.mjs
821
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/package.mjs
775
822
  var version = "1.7.1";
776
823
 
777
824
  //#endregion
778
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/version.mjs
825
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/version.mjs
779
826
  const PACKAGE_VERSION$3 = version;
780
827
 
781
828
  //#endregion
@@ -811,7 +858,7 @@ function isSafeUrlScheme(value) {
811
858
  }
812
859
 
813
860
  //#endregion
814
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/two-factor/client.mjs
861
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/two-factor/client.mjs
815
862
  const twoFactorClient = (options) => {
816
863
  return {
817
864
  id: "two-factor",
@@ -849,7 +896,7 @@ const twoFactorClient = (options) => {
849
896
  };
850
897
 
851
898
  //#endregion
852
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/admin/access/statement.mjs
899
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/admin/access/statement.mjs
853
900
  const defaultStatements$1 = {
854
901
  user: [
855
902
  "create",
@@ -900,7 +947,7 @@ const defaultRoles$1 = {
900
947
  };
901
948
 
902
949
  //#endregion
903
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/admin/error-codes.mjs
950
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/admin/error-codes.mjs
904
951
  const ADMIN_ERROR_CODES = defineErrorCodes({
905
952
  FAILED_TO_CREATE_USER: "Failed to create user",
906
953
  USER_ALREADY_EXISTS: "User already exists.",
@@ -992,7 +1039,7 @@ const ENV = Object.freeze({
992
1039
  });
993
1040
 
994
1041
  //#endregion
995
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/utils/url.mjs
1042
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/utils/url.mjs
996
1043
  const SLASH_CHAR_CODE = "/".charCodeAt(0);
997
1044
  function trimTrailingSlashes(value) {
998
1045
  let end = value.length;
@@ -1071,7 +1118,7 @@ function getOrigin(url) {
1071
1118
  }
1072
1119
 
1073
1120
  //#endregion
1074
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/admin/has-permission.mjs
1121
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/admin/has-permission.mjs
1075
1122
  const hasPermission = (input) => {
1076
1123
  if (input.userId && input.options?.adminUserIds?.includes(input.userId)) return true;
1077
1124
  if (!input.permissions) return false;
@@ -1600,7 +1647,7 @@ var betterFetch = async (url, options) => {
1600
1647
  };
1601
1648
 
1602
1649
  //#endregion
1603
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/parser.mjs
1650
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/parser.mjs
1604
1651
  const PROTO_POLLUTION_PATTERNS = {
1605
1652
  proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
1606
1653
  constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
@@ -1670,7 +1717,7 @@ function parseJSON(value, options = { strict: true }) {
1670
1717
  }
1671
1718
 
1672
1719
  //#endregion
1673
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/organization/access/statement.mjs
1720
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/organization/access/statement.mjs
1674
1721
  const defaultStatements = {
1675
1722
  organization: ["update", "delete"],
1676
1723
  member: [
@@ -1746,7 +1793,7 @@ const defaultRoles = {
1746
1793
  };
1747
1794
 
1748
1795
  //#endregion
1749
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/organization/permission.mjs
1796
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/organization/permission.mjs
1750
1797
  const hasPermissionFn = (input, acRoles) => {
1751
1798
  if (!input.permissions) return false;
1752
1799
  const roles = input.role.split(",");
@@ -1759,7 +1806,7 @@ const hasPermissionFn = (input, acRoles) => {
1759
1806
  };
1760
1807
 
1761
1808
  //#endregion
1762
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/organization/error-codes.mjs
1809
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/organization/error-codes.mjs
1763
1810
  const ORGANIZATION_ERROR_CODES = defineErrorCodes({
1764
1811
  YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization",
1765
1812
  YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations",
@@ -1840,8 +1887,12 @@ const t$1 = createAccessControl({
1840
1887
  `delete`
1841
1888
  ],
1842
1889
  audit: [`read`],
1843
- approval_policy: [`update`],
1844
- approval_request: [`review`],
1890
+ approval_policy: [`read`, `update`],
1891
+ approval_request: [
1892
+ `read`,
1893
+ `review`,
1894
+ `cancel`
1895
+ ],
1845
1896
  project: [
1846
1897
  `create`,
1847
1898
  `read`,
@@ -1875,6 +1926,7 @@ const t$1 = createAccessControl({
1875
1926
  `revoke`
1876
1927
  ],
1877
1928
  evaluated_entity: [`read`, `delete`],
1929
+ snapshot: [`read`],
1878
1930
  billing: [`read`, `manage`],
1879
1931
  sso: [
1880
1932
  `read`,
@@ -1902,7 +1954,9 @@ const n$1 = {
1902
1954
  environment: [`read`],
1903
1955
  flag: [`read`],
1904
1956
  evaluated_entity: [`read`],
1905
- billing: [`read`]
1957
+ billing: [`read`],
1958
+ approval_policy: [`read`],
1959
+ approval_request: [`read`]
1906
1960
  }),
1907
1961
  editor: t$1.newRole({
1908
1962
  member: [`read`],
@@ -1923,14 +1977,17 @@ const n$1 = {
1923
1977
  `revoke`
1924
1978
  ],
1925
1979
  evaluated_entity: [`read`],
1926
- billing: [`read`]
1980
+ billing: [`read`],
1981
+ approval_policy: [`read`],
1982
+ approval_request: [`read`]
1927
1983
  }),
1928
1984
  admin: t$1.newRole({
1929
1985
  organization: [`update`],
1930
1986
  member: [
1931
1987
  `create`,
1932
1988
  `read`,
1933
- `update`
1989
+ `update`,
1990
+ `delete`
1934
1991
  ],
1935
1992
  invitation: [`create`, `cancel`],
1936
1993
  team: [
@@ -1940,8 +1997,12 @@ const n$1 = {
1940
1997
  `delete`
1941
1998
  ],
1942
1999
  audit: [`read`],
1943
- approval_policy: [`update`],
1944
- approval_request: [`review`],
2000
+ approval_policy: [`read`, `update`],
2001
+ approval_request: [
2002
+ `read`,
2003
+ `review`,
2004
+ `cancel`
2005
+ ],
1945
2006
  project: [
1946
2007
  `create`,
1947
2008
  `read`,
@@ -1975,6 +2036,7 @@ const n$1 = {
1975
2036
  `revoke`
1976
2037
  ],
1977
2038
  evaluated_entity: [`read`, `delete`],
2039
+ snapshot: [`read`],
1978
2040
  billing: [`read`, `manage`],
1979
2041
  sso: [`read`, `manage`],
1980
2042
  service_account: [
@@ -2006,8 +2068,12 @@ const n$1 = {
2006
2068
  `delete`
2007
2069
  ],
2008
2070
  audit: [`read`],
2009
- approval_policy: [`update`],
2010
- approval_request: [`review`],
2071
+ approval_policy: [`read`, `update`],
2072
+ approval_request: [
2073
+ `read`,
2074
+ `review`,
2075
+ `cancel`
2076
+ ],
2011
2077
  project: [
2012
2078
  `create`,
2013
2079
  `read`,
@@ -2041,6 +2107,7 @@ const n$1 = {
2041
2107
  `revoke`
2042
2108
  ],
2043
2109
  evaluated_entity: [`read`, `delete`],
2110
+ snapshot: [`read`],
2044
2111
  billing: [`read`, `manage`],
2045
2112
  sso: [
2046
2113
  `read`,
@@ -2063,7 +2130,7 @@ const n$1 = {
2063
2130
  };
2064
2131
 
2065
2132
  //#endregion
2066
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/broadcast-channel.mjs
2133
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/broadcast-channel.mjs
2067
2134
  const kBroadcastChannel = Symbol.for("better-auth:broadcast-channel");
2068
2135
  const now$1 = () => Math.floor(Date.now() / 1e3);
2069
2136
  var WindowBroadcastChannel = class {
@@ -2287,7 +2354,7 @@ let onMount = ($store, initialize) => {
2287
2354
  };
2288
2355
 
2289
2356
  //#endregion
2290
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/equality.mjs
2357
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/equality.mjs
2291
2358
  function isPlainObject(value) {
2292
2359
  if (typeof value !== "object" || value === null) return false;
2293
2360
  const prototype = Object.getPrototypeOf(value);
@@ -2328,7 +2395,7 @@ function withEquality(store, isEqual) {
2328
2395
  }
2329
2396
 
2330
2397
  //#endregion
2331
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/focus-manager.mjs
2398
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/focus-manager.mjs
2332
2399
  const kFocusManager = Symbol.for("better-auth:focus-manager");
2333
2400
  var WindowFocusManager = class {
2334
2401
  listeners = /* @__PURE__ */ new Set();
@@ -2358,7 +2425,7 @@ function getGlobalFocusManager() {
2358
2425
  }
2359
2426
 
2360
2427
  //#endregion
2361
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/online-manager.mjs
2428
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/online-manager.mjs
2362
2429
  const kOnlineManager = Symbol.for("better-auth:online-manager");
2363
2430
  var WindowOnlineManager = class {
2364
2431
  listeners = /* @__PURE__ */ new Set();
@@ -2391,7 +2458,7 @@ function getGlobalOnlineManager() {
2391
2458
  }
2392
2459
 
2393
2460
  //#endregion
2394
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/query.mjs
2461
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/query.mjs
2395
2462
  const isServer$1 = () => typeof window === "undefined";
2396
2463
  function isAuthQueryStateEqual(a, b) {
2397
2464
  return isJsonEqual(a.data, b.data) && a.error === b.error && a.isPending === b.isPending && a.isRefetching === b.isRefetching && a.refetch === b.refetch;
@@ -2513,7 +2580,7 @@ const useAuthQuery = (initializedAtom, path, $fetch, options) => {
2513
2580
  };
2514
2581
 
2515
2582
  //#endregion
2516
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/session-refresh.mjs
2583
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/session-refresh.mjs
2517
2584
  const now = () => Math.floor(Date.now() / 1e3);
2518
2585
  /**
2519
2586
  * Rate limit: don't refetch on focus if a session request was made within this many seconds
@@ -2641,7 +2708,7 @@ function createSessionRefreshManager(opts) {
2641
2708
  }
2642
2709
 
2643
2710
  //#endregion
2644
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/fetch-plugins.mjs
2711
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/fetch-plugins.mjs
2645
2712
  const redirectPlugin = {
2646
2713
  id: "redirect",
2647
2714
  name: "Redirect",
@@ -2657,7 +2724,7 @@ const redirectPlugin = {
2657
2724
  };
2658
2725
 
2659
2726
  //#endregion
2660
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/session-atom.mjs
2727
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/session-atom.mjs
2661
2728
  const isServer = () => typeof window === "undefined";
2662
2729
  const SESSION_MOUNT_DEDUPE_INTERVAL = STORE_UNMOUNT_DELAY;
2663
2730
  function hydrateSessionAtom(sessionAtom, session) {
@@ -2832,7 +2899,7 @@ function getSessionAtom($fetch, options) {
2832
2899
  }
2833
2900
 
2834
2901
  //#endregion
2835
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/config.mjs
2902
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/config.mjs
2836
2903
  const resolvePublicAuthUrl = (basePath) => {
2837
2904
  if (typeof process === "undefined") return void 0;
2838
2905
  const path = basePath ?? "/api/auth";
@@ -2938,7 +3005,7 @@ const getClientConfig = (options, loadEnv) => {
2938
3005
  };
2939
3006
 
2940
3007
  //#endregion
2941
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/utils/is-atom.mjs
3008
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/utils/is-atom.mjs
2942
3009
  function isAtom(value) {
2943
3010
  return typeof value === "object" && value !== null && "get" in value && typeof value.get === "function" && "lc" in value && typeof value.lc === "number";
2944
3011
  }
@@ -2958,7 +3025,7 @@ function toKebabCase(input) {
2958
3025
  }
2959
3026
 
2960
3027
  //#endregion
2961
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/proxy.mjs
3028
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/proxy.mjs
2962
3029
  function getMethod(path, knownPathMethods, args) {
2963
3030
  const method = knownPathMethods[path];
2964
3031
  const { fetchOptions, query: _query, ...body } = args || {};
@@ -3034,7 +3101,7 @@ function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomLis
3034
3101
  }
3035
3102
 
3036
3103
  //#endregion
3037
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/client/vanilla.mjs
3104
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/client/vanilla.mjs
3038
3105
  function createAuthClient(options) {
3039
3106
  const { pluginPathMethods, pluginsActions, pluginsAtoms, hydrateSession, $fetch, atomListeners, $store } = getClientConfig(options);
3040
3107
  const resolvedHooks = {};
@@ -3049,7 +3116,7 @@ function createAuthClient(options) {
3049
3116
  }
3050
3117
 
3051
3118
  //#endregion
3052
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/additional-fields/client.mjs
3119
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/additional-fields/client.mjs
3053
3120
  const inferAdditionalFields = (schema) => {
3054
3121
  return {
3055
3122
  id: "additional-fields-client",
@@ -3059,7 +3126,7 @@ const inferAdditionalFields = (schema) => {
3059
3126
  };
3060
3127
 
3061
3128
  //#endregion
3062
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/admin/client.mjs
3129
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/admin/client.mjs
3063
3130
  const adminClient = (options) => {
3064
3131
  const roles = {
3065
3132
  admin: adminAc$1,
@@ -3094,7 +3161,7 @@ const adminClient = (options) => {
3094
3161
  };
3095
3162
 
3096
3163
  //#endregion
3097
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/device-authorization/client.mjs
3164
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/device-authorization/client.mjs
3098
3165
  const deviceAuthorizationClient = () => {
3099
3166
  return {
3100
3167
  id: "device-authorization",
@@ -3111,7 +3178,7 @@ const deviceAuthorizationClient = () => {
3111
3178
  };
3112
3179
 
3113
3180
  //#endregion
3114
- //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._0f4663e1f35d01509eefb20039600143/node_modules/better-auth/dist/plugins/organization/client.mjs
3181
+ //#region ../../node_modules/.pnpm/better-auth@1.7.1_@opentelemetry+api@1.9.1_drizzle-kit@1.0.0-rc.4_drizzle-orm@1.0.0-rc._29983ac85a08632d26ca60fb0be17581/node_modules/better-auth/dist/plugins/organization/client.mjs
3115
3182
  /**
3116
3183
  * Using the same `hasPermissionFn` function, but without the need for a `ctx` parameter or the `organizationId` parameter.
3117
3184
  */
@@ -3206,7 +3273,7 @@ const organizationClient = (options) => {
3206
3273
  };
3207
3274
 
3208
3275
  //#endregion
3209
- //#region ../../node_modules/.pnpm/@better-auth+api-key@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fet_2568c45b7ee73e55b396faf3d8bd3e1a/node_modules/@better-auth/api-key/dist/version-D365O1mH.mjs
3276
+ //#region ../../node_modules/.pnpm/@better-auth+api-key@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fet_a4fe5759ddb57f435137bfe015134721/node_modules/@better-auth/api-key/dist/version-D365O1mH.mjs
3210
3277
  const API_KEY_ERROR_CODES = defineErrorCodes({
3211
3278
  INVALID_METADATA_TYPE: "metadata must be an object or undefined",
3212
3279
  REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided",
@@ -3243,7 +3310,7 @@ const API_KEY_ERROR_CODES = defineErrorCodes({
3243
3310
  const PACKAGE_VERSION$2 = "1.7.1";
3244
3311
 
3245
3312
  //#endregion
3246
- //#region ../../node_modules/.pnpm/@better-auth+api-key@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fet_2568c45b7ee73e55b396faf3d8bd3e1a/node_modules/@better-auth/api-key/dist/client.mjs
3313
+ //#region ../../node_modules/.pnpm/@better-auth+api-key@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fet_a4fe5759ddb57f435137bfe015134721/node_modules/@better-auth/api-key/dist/client.mjs
3247
3314
  const apiKeyClient = () => {
3248
3315
  return {
3249
3316
  id: "api-key",
@@ -3259,7 +3326,7 @@ const apiKeyClient = () => {
3259
3326
  };
3260
3327
 
3261
3328
  //#endregion
3262
- //#region ../../node_modules/.pnpm/@better-auth+passkey@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fet_3e5015565ab35cd7b806fd7cb64ff2ec/node_modules/@better-auth/passkey/dist/version-CNE1I0BY.mjs
3329
+ //#region ../../node_modules/.pnpm/@better-auth+passkey@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fet_670374e089e097efe27e0c3a48cf5b4e/node_modules/@better-auth/passkey/dist/version-CNE1I0BY.mjs
3263
3330
  const PASSKEY_ERROR_CODES = defineErrorCodes({
3264
3331
  CHALLENGE_NOT_FOUND: "Challenge not found",
3265
3332
  YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: "You are not allowed to register this passkey",
@@ -3749,7 +3816,7 @@ async function startAuthentication(options) {
3749
3816
  }
3750
3817
 
3751
3818
  //#endregion
3752
- //#region ../../node_modules/.pnpm/@better-auth+passkey@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fet_3e5015565ab35cd7b806fd7cb64ff2ec/node_modules/@better-auth/passkey/dist/client.mjs
3819
+ //#region ../../node_modules/.pnpm/@better-auth+passkey@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fet_670374e089e097efe27e0c3a48cf5b4e/node_modules/@better-auth/passkey/dist/client.mjs
3753
3820
  const getPasskeyActions = ($fetch, { $listPasskeys, $store }) => {
3754
3821
  const signInPasskey = async (opts, options) => {
3755
3822
  const response = await $fetch("/passkey/generate-authenticate-options", {
@@ -3951,11 +4018,11 @@ const passkeyClient = () => {
3951
4018
  };
3952
4019
 
3953
4020
  //#endregion
3954
- //#region ../../node_modules/.pnpm/@better-auth+sso@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fetch+f_ab392d2d19ca264106fdcee67033c1f1/node_modules/@better-auth/sso/dist/version-BbG1DbY-.mjs
4021
+ //#region ../../node_modules/.pnpm/@better-auth+sso@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fetch+f_f113731728b549e501373576d6a425b0/node_modules/@better-auth/sso/dist/version-BbG1DbY-.mjs
3955
4022
  const PACKAGE_VERSION = "1.7.1";
3956
4023
 
3957
4024
  //#endregion
3958
- //#region ../../node_modules/.pnpm/@better-auth+sso@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fetch+f_ab392d2d19ca264106fdcee67033c1f1/node_modules/@better-auth/sso/dist/client.mjs
4025
+ //#region ../../node_modules/.pnpm/@better-auth+sso@1.7.1_@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fetch+f_f113731728b549e501373576d6a425b0/node_modules/@better-auth/sso/dist/client.mjs
3959
4026
  const ssoClient = (options) => {
3960
4027
  return {
3961
4028
  id: "sso-client",
@@ -4092,7 +4159,7 @@ async function createCliApiClient(runtime) {
4092
4159
  sessionToken,
4093
4160
  orgSlug: runtime.org
4094
4161
  });
4095
- const client = T$1({
4162
+ const client = O$1({
4096
4163
  baseUrl: runtime.apiUrl,
4097
4164
  client: "cli",
4098
4165
  getHeaders: () => {
@@ -4548,7 +4615,7 @@ function V(e, t) {
4548
4615
  const H = z.object({
4549
4616
  projectId: z.string().min(1),
4550
4617
  environmentId: z.string().min(1),
4551
- flags: z.array(I)
4618
+ flags: z.array(I).max(500)
4552
4619
  }).superRefine((e, t) => V(e.flags, t));
4553
4620
  const U = z.object({
4554
4621
  key: z.string(),
@@ -4571,7 +4638,7 @@ const W = z.object({
4571
4638
  const G = z.object({
4572
4639
  projectId: z.string().min(1),
4573
4640
  environmentId: z.string().min(1),
4574
- flags: z.array(I),
4641
+ flags: z.array(I).max(500),
4575
4642
  apply: z.boolean().default(!1),
4576
4643
  prune: z.boolean().default(!1),
4577
4644
  force: z.boolean().default(!1),
@@ -5082,6 +5149,7 @@ function registerPushCommand(program) {
5082
5149
  remoteOnly,
5083
5150
  forced: applied.forced === true,
5084
5151
  approvalRequests,
5152
+ outcome: approvalRequests.length > 0 ? "pending_approval" : "applied",
5085
5153
  types
5086
5154
  }, [
5087
5155
  applied.changes.length > 0 ? `Applied ${applied.changes.length} change(s).` : null,
@@ -5089,6 +5157,7 @@ function registerPushCommand(program) {
5089
5157
  applied.forced ? "Forced through version conflicts (audited)." : null,
5090
5158
  `Wrote types for ${types.flagCount} flag(s) to ${types.written}`
5091
5159
  ].filter(Boolean).join("\n"));
5160
+ if (approvalRequests.length > 0) process.exitCode = 5;
5092
5161
  });
5093
5162
  }
5094
5163
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipdit/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "shipd's command-line interface",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "dependencies": {
20
20
  "commander": "^14.0.0",
21
21
  "jiti": "^2.5.1",
22
- "shipdit": "0.2.3",
22
+ "shipdit": "0.2.4",
23
23
  "zod": "^4"
24
24
  },
25
25
  "devDependencies": {