@shipdit/cli 0.1.1 → 0.2.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.
- package/dist/index.mjs +290 -174
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -375,10 +375,12 @@ const m$1 = (...t) => hc(...t);
|
|
|
375
375
|
const h$1 = (...t) => hc(...t);
|
|
376
376
|
const g$1 = (...t) => hc(...t);
|
|
377
377
|
const _$1 = (...t) => hc(...t);
|
|
378
|
-
|
|
378
|
+
const v$1 = (...t) => hc(...t);
|
|
379
|
+
const y$1 = (...t) => hc(...t);
|
|
380
|
+
function b$1(e) {
|
|
379
381
|
return `${e.replace(/\/+$/, ``)}/api/v1/rpc`;
|
|
380
382
|
}
|
|
381
|
-
function
|
|
383
|
+
function x$1(e) {
|
|
382
384
|
return {
|
|
383
385
|
...e.fetch ? { fetch: e.fetch } : {},
|
|
384
386
|
init: { credentials: e.client === `dashboard` ? `include` : `same-origin` },
|
|
@@ -388,100 +390,128 @@ function y$1(e) {
|
|
|
388
390
|
}
|
|
389
391
|
};
|
|
390
392
|
}
|
|
391
|
-
async function
|
|
393
|
+
async function S$1(e, t) {
|
|
392
394
|
return i$1(await e({ json: t }));
|
|
393
395
|
}
|
|
394
|
-
function
|
|
395
|
-
let t =
|
|
396
|
+
function C$1(e) {
|
|
397
|
+
let t = b$1(e.baseUrl), n = x$1(e), r = a$1(t, n), i = o$1(t, n), C = s$1(t, n), w = c$1(t, n), T = l$1(t, n), E = u$2(t, n), D = d$2(t, n), O = f$1(t, n), k = h$1(t, n), A = p$1(t, n), j = m$1(t, n), M = g$1(t, n), N = _$1(t, n), P = v$1(t, n), F = y$1(t, n);
|
|
396
398
|
return {
|
|
397
399
|
me: {
|
|
398
|
-
get: (e = {}) =>
|
|
399
|
-
feedback: (e) =>
|
|
400
|
+
get: (e = {}) => S$1(r.me.$post, e),
|
|
401
|
+
feedback: (e) => S$1(r.me.feedback.$post, e)
|
|
400
402
|
},
|
|
401
403
|
project: {
|
|
402
|
-
list: (e = {}) =>
|
|
403
|
-
create: (e) =>
|
|
404
|
-
update: (e) =>
|
|
405
|
-
archive: (e) =>
|
|
404
|
+
list: (e = {}) => S$1(i.project.list.$post, e),
|
|
405
|
+
create: (e) => S$1(i.project.create.$post, e),
|
|
406
|
+
update: (e) => S$1(i.project.update.$post, e),
|
|
407
|
+
archive: (e) => S$1(i.project.archive.$post, e),
|
|
408
|
+
listTeams: (e) => S$1(i.project.listTeams.$post, e),
|
|
409
|
+
setTeams: (e) => S$1(i.project.setTeams.$post, e)
|
|
406
410
|
},
|
|
411
|
+
team: { listMembers: (e) => S$1(F.team.listMembers.$post, e) },
|
|
407
412
|
environment: {
|
|
408
|
-
list: (e) =>
|
|
409
|
-
create: (e) =>
|
|
410
|
-
update: (e) =>
|
|
411
|
-
archive: (e) =>
|
|
413
|
+
list: (e) => S$1(C.environment.list.$post, e),
|
|
414
|
+
create: (e) => S$1(C.environment.create.$post, e),
|
|
415
|
+
update: (e) => S$1(C.environment.update.$post, e),
|
|
416
|
+
archive: (e) => S$1(C.environment.archive.$post, e)
|
|
412
417
|
},
|
|
413
418
|
flag: {
|
|
414
|
-
list: (e) =>
|
|
415
|
-
get: (e) =>
|
|
416
|
-
create: (e) =>
|
|
417
|
-
update: (e) =>
|
|
418
|
-
archive: (e) =>
|
|
419
|
-
updateEnvironment: (e) =>
|
|
420
|
-
toggleEnvironment: (e) =>
|
|
421
|
-
listEnvironmentStates: (e) =>
|
|
422
|
-
pull: (e) =>
|
|
423
|
-
diff: (e) =>
|
|
424
|
-
push: (e) =>
|
|
419
|
+
list: (e) => S$1(w.flag.list.$post, e),
|
|
420
|
+
get: (e) => S$1(w.flag.get.$post, e),
|
|
421
|
+
create: (e) => S$1(w.flag.create.$post, e),
|
|
422
|
+
update: (e) => S$1(w.flag.update.$post, e),
|
|
423
|
+
archive: (e) => S$1(w.flag.archive.$post, e),
|
|
424
|
+
updateEnvironment: (e) => S$1(w.flag.updateEnvironment.$post, e),
|
|
425
|
+
toggleEnvironment: (e) => S$1(w.flag.toggleEnvironment.$post, e),
|
|
426
|
+
listEnvironmentStates: (e) => S$1(w.flag.listEnvironmentStates.$post, e),
|
|
427
|
+
pull: (e) => S$1(w.flag.pull.$post, e),
|
|
428
|
+
diff: (e) => S$1(w.flag.diff.$post, e),
|
|
429
|
+
push: (e) => S$1(w.flag.push.$post, e)
|
|
425
430
|
},
|
|
426
431
|
apiKey: {
|
|
427
|
-
list: (e = {}) =>
|
|
428
|
-
create: (e) =>
|
|
429
|
-
revoke: (e) =>
|
|
432
|
+
list: (e = {}) => S$1(T.apiKey.list.$post, e),
|
|
433
|
+
create: (e) => S$1(T.apiKey.create.$post, e),
|
|
434
|
+
revoke: (e) => S$1(T.apiKey.revoke.$post, e)
|
|
430
435
|
},
|
|
431
436
|
sdkKey: {
|
|
432
|
-
list: (e = {}) =>
|
|
433
|
-
create: (e) =>
|
|
434
|
-
revoke: (e) =>
|
|
437
|
+
list: (e = {}) => S$1(O.sdkKey.list.$post, e),
|
|
438
|
+
create: (e) => S$1(O.sdkKey.create.$post, e),
|
|
439
|
+
revoke: (e) => S$1(O.sdkKey.revoke.$post, e)
|
|
435
440
|
},
|
|
436
441
|
segment: {
|
|
437
|
-
list: (e) =>
|
|
438
|
-
get: (e) =>
|
|
439
|
-
create: (e) =>
|
|
440
|
-
update: (e) =>
|
|
441
|
-
archive: (e) =>
|
|
442
|
-
listEnvironmentStates: (e) =>
|
|
443
|
-
updateEnvironment: (e) =>
|
|
442
|
+
list: (e) => S$1(k.segment.list.$post, e),
|
|
443
|
+
get: (e) => S$1(k.segment.get.$post, e),
|
|
444
|
+
create: (e) => S$1(k.segment.create.$post, e),
|
|
445
|
+
update: (e) => S$1(k.segment.update.$post, e),
|
|
446
|
+
archive: (e) => S$1(k.segment.archive.$post, e),
|
|
447
|
+
listEnvironmentStates: (e) => S$1(k.segment.listEnvironmentStates.$post, e),
|
|
448
|
+
updateEnvironment: (e) => S$1(k.segment.updateEnvironment.$post, e)
|
|
444
449
|
},
|
|
445
450
|
evaluatedEntity: {
|
|
446
|
-
list: (e) =>
|
|
447
|
-
get: (e) =>
|
|
448
|
-
delete: (e) =>
|
|
451
|
+
list: (e) => S$1(A.evaluatedEntity.list.$post, e),
|
|
452
|
+
get: (e) => S$1(A.evaluatedEntity.get.$post, e),
|
|
453
|
+
delete: (e) => S$1(A.evaluatedEntity.delete.$post, e)
|
|
449
454
|
},
|
|
450
455
|
evaluationFact: {
|
|
451
|
-
list: (e) =>
|
|
452
|
-
byRule: (e) =>
|
|
453
|
-
orgSummary: (e = {}) =>
|
|
454
|
-
projectSummary: (e) =>
|
|
455
|
-
simulate: (e) =>
|
|
456
|
+
list: (e) => S$1(j.evaluationFact.list.$post, e),
|
|
457
|
+
byRule: (e) => S$1(j.evaluationFact.byRule.$post, e),
|
|
458
|
+
orgSummary: (e = {}) => S$1(j.evaluationFact.orgSummary.$post, e),
|
|
459
|
+
projectSummary: (e) => S$1(j.evaluationFact.projectSummary.$post, e),
|
|
460
|
+
simulate: (e) => S$1(j.evaluationFact.simulate.$post, e)
|
|
456
461
|
},
|
|
457
|
-
snapshot: { publish: (e) =>
|
|
458
|
-
device: { authorize: (e) =>
|
|
462
|
+
snapshot: { publish: (e) => S$1(M.snapshot.publish.$post, e) },
|
|
463
|
+
device: { authorize: (e) => S$1(N.device.authorize.$post, e) },
|
|
459
464
|
billing: {
|
|
460
|
-
get: (e = {}) =>
|
|
461
|
-
attach: (e) =>
|
|
462
|
-
openPortal: (e) =>
|
|
465
|
+
get: (e = {}) => S$1(P.billing.get.$post, e),
|
|
466
|
+
attach: (e) => S$1(P.billing.attach.$post, e),
|
|
467
|
+
openPortal: (e) => S$1(P.billing.openPortal.$post, e)
|
|
468
|
+
},
|
|
469
|
+
approval: {
|
|
470
|
+
listPolicies: (e = {}) => S$1(E.approval.listPolicies.$post, e),
|
|
471
|
+
createPolicy: (e) => S$1(E.approval.createPolicy.$post, e),
|
|
472
|
+
updatePolicy: (e) => S$1(E.approval.updatePolicy.$post, e),
|
|
473
|
+
deletePolicy: (e) => S$1(E.approval.deletePolicy.$post, e),
|
|
474
|
+
listRequests: (e = {}) => S$1(E.approval.listRequests.$post, e),
|
|
475
|
+
get: (e) => S$1(E.approval.get.$post, e),
|
|
476
|
+
approve: (e) => S$1(E.approval.approve.$post, e),
|
|
477
|
+
reject: (e) => S$1(E.approval.reject.$post, e),
|
|
478
|
+
cancel: (e) => S$1(E.approval.cancel.$post, e)
|
|
479
|
+
},
|
|
480
|
+
audit: {
|
|
481
|
+
list: (e = {}) => S$1(D.audit.list.$post, e),
|
|
482
|
+
get: (e) => S$1(D.audit.get.$post, e),
|
|
483
|
+
actions: (e = {}) => S$1(D.audit.actions.$post, e),
|
|
484
|
+
export: (e) => S$1(D.audit.export.$post, e),
|
|
485
|
+
getSettings: (e = {}) => S$1(D.audit.getSettings.$post, e),
|
|
486
|
+
updateSettings: (e) => S$1(D.audit.updateSettings.$post, e),
|
|
487
|
+
listDestinations: (e = {}) => S$1(D.audit.listDestinations.$post, e),
|
|
488
|
+
createDestination: (e) => S$1(D.audit.createDestination.$post, e),
|
|
489
|
+
updateDestination: (e) => S$1(D.audit.updateDestination.$post, e),
|
|
490
|
+
deleteDestination: (e) => S$1(D.audit.deleteDestination.$post, e),
|
|
491
|
+
testDestination: (e) => S$1(D.audit.testDestination.$post, e)
|
|
463
492
|
},
|
|
464
|
-
audit: { list: (e = {}) => b$1(w.audit.list.$post, e) },
|
|
465
493
|
raw: {
|
|
466
494
|
me: r,
|
|
467
495
|
project: i,
|
|
468
|
-
environment:
|
|
469
|
-
flag:
|
|
470
|
-
apiKey:
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
496
|
+
environment: C,
|
|
497
|
+
flag: w,
|
|
498
|
+
apiKey: T,
|
|
499
|
+
approval: E,
|
|
500
|
+
audit: D,
|
|
501
|
+
sdkKey: O,
|
|
502
|
+
segment: k,
|
|
503
|
+
evaluatedEntity: A,
|
|
504
|
+
evaluationFact: j,
|
|
505
|
+
snapshot: M,
|
|
506
|
+
device: N,
|
|
507
|
+
billing: P,
|
|
508
|
+
team: F
|
|
479
509
|
}
|
|
480
510
|
};
|
|
481
511
|
}
|
|
482
512
|
|
|
483
513
|
//#endregion
|
|
484
|
-
//#region ../../node_modules/.pnpm/@better-auth+core@1.
|
|
514
|
+
//#region ../../node_modules/.pnpm/@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fetch+fetch@1.3.1_@opentelemet_2e71ba5b354a0fbab5c1bdc9f6326b28/node_modules/@better-auth/core/dist/utils/error-codes.mjs
|
|
485
515
|
function defineErrorCodes(codes) {
|
|
486
516
|
return Object.fromEntries(Object.entries(codes).map(([key, value]) => [key, {
|
|
487
517
|
code: key,
|
|
@@ -491,7 +521,7 @@ function defineErrorCodes(codes) {
|
|
|
491
521
|
}
|
|
492
522
|
|
|
493
523
|
//#endregion
|
|
494
|
-
//#region ../../node_modules/.pnpm/better-call@1.
|
|
524
|
+
//#region ../../node_modules/.pnpm/better-call@1.4.0_zod@4.4.3/node_modules/better-call/dist/error.mjs
|
|
495
525
|
function isErrorStackTraceLimitWritable() {
|
|
496
526
|
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
497
527
|
if (desc === void 0) return Object.isExtensible(Error);
|
|
@@ -588,6 +618,10 @@ const statusCodes = {
|
|
|
588
618
|
NETWORK_AUTHENTICATION_REQUIRED: 511
|
|
589
619
|
};
|
|
590
620
|
var InternalAPIError = class extends Error {
|
|
621
|
+
status;
|
|
622
|
+
body;
|
|
623
|
+
headers;
|
|
624
|
+
statusCode;
|
|
591
625
|
constructor(status = "INTERNAL_SERVER_ERROR", body = void 0, headers = {}, statusCode = typeof status === "number" ? status : statusCodes[status]) {
|
|
592
626
|
super(body?.message, body?.cause ? { cause: body.cause } : void 0);
|
|
593
627
|
this.status = status;
|
|
@@ -604,7 +638,7 @@ var InternalAPIError = class extends Error {
|
|
|
604
638
|
const APIError = makeErrorForHideStackFrame(InternalAPIError, Error);
|
|
605
639
|
|
|
606
640
|
//#endregion
|
|
607
|
-
//#region ../../node_modules/.pnpm/@better-auth+core@1.
|
|
641
|
+
//#region ../../node_modules/.pnpm/@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fetch+fetch@1.3.1_@opentelemet_2e71ba5b354a0fbab5c1bdc9f6326b28/node_modules/@better-auth/core/dist/error/index.mjs
|
|
608
642
|
var BetterAuthError = class extends Error {
|
|
609
643
|
constructor(message, options) {
|
|
610
644
|
super(message, options);
|
|
@@ -615,7 +649,7 @@ var BetterAuthError = class extends Error {
|
|
|
615
649
|
};
|
|
616
650
|
|
|
617
651
|
//#endregion
|
|
618
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
652
|
+
//#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
|
|
619
653
|
function unknownResourceResponse(requestedResource) {
|
|
620
654
|
return {
|
|
621
655
|
success: false,
|
|
@@ -692,11 +726,13 @@ function createAccessControl(s) {
|
|
|
692
726
|
}
|
|
693
727
|
|
|
694
728
|
//#endregion
|
|
695
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
729
|
+
//#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
|
|
696
730
|
const TWO_FACTOR_ERROR_CODES = defineErrorCodes({
|
|
697
731
|
OTP_NOT_ENABLED: "OTP not enabled",
|
|
732
|
+
OTP_NOT_CONFIGURED: "OTP is not available",
|
|
698
733
|
OTP_HAS_EXPIRED: "OTP has expired",
|
|
699
734
|
TOTP_NOT_ENABLED: "TOTP not enabled",
|
|
735
|
+
TOTP_NOT_CONFIGURED: "TOTP is not available",
|
|
700
736
|
TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled",
|
|
701
737
|
BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled",
|
|
702
738
|
INVALID_BACKUP_CODE: "Invalid backup code",
|
|
@@ -707,15 +743,15 @@ const TWO_FACTOR_ERROR_CODES = defineErrorCodes({
|
|
|
707
743
|
});
|
|
708
744
|
|
|
709
745
|
//#endregion
|
|
710
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
711
|
-
var version = "1.
|
|
746
|
+
//#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
|
|
747
|
+
var version = "1.7.1";
|
|
712
748
|
|
|
713
749
|
//#endregion
|
|
714
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
750
|
+
//#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
|
|
715
751
|
const PACKAGE_VERSION$2 = version;
|
|
716
752
|
|
|
717
753
|
//#endregion
|
|
718
|
-
//#region ../../node_modules/.pnpm/@better-auth+core@1.
|
|
754
|
+
//#region ../../node_modules/.pnpm/@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fetch+fetch@1.3.1_@opentelemet_2e71ba5b354a0fbab5c1bdc9f6326b28/node_modules/@better-auth/core/dist/utils/url.mjs
|
|
719
755
|
/**
|
|
720
756
|
* Schemes that execute or embed code when navigated to or accepted as a
|
|
721
757
|
* redirect target. These are never safe as an OAuth `redirect_uri` or as a
|
|
@@ -747,7 +783,7 @@ function isSafeUrlScheme(value) {
|
|
|
747
783
|
}
|
|
748
784
|
|
|
749
785
|
//#endregion
|
|
750
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
786
|
+
//#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
|
|
751
787
|
const twoFactorClient = (options) => {
|
|
752
788
|
return {
|
|
753
789
|
id: "two-factor",
|
|
@@ -785,7 +821,7 @@ const twoFactorClient = (options) => {
|
|
|
785
821
|
};
|
|
786
822
|
|
|
787
823
|
//#endregion
|
|
788
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
824
|
+
//#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
|
|
789
825
|
const defaultStatements$1 = {
|
|
790
826
|
user: [
|
|
791
827
|
"create",
|
|
@@ -836,7 +872,7 @@ const defaultRoles$1 = {
|
|
|
836
872
|
};
|
|
837
873
|
|
|
838
874
|
//#endregion
|
|
839
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
875
|
+
//#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
|
|
840
876
|
const ADMIN_ERROR_CODES = defineErrorCodes({
|
|
841
877
|
FAILED_TO_CREATE_USER: "Failed to create user",
|
|
842
878
|
USER_ALREADY_EXISTS: "User already exists.",
|
|
@@ -864,7 +900,7 @@ const ADMIN_ERROR_CODES = defineErrorCodes({
|
|
|
864
900
|
});
|
|
865
901
|
|
|
866
902
|
//#endregion
|
|
867
|
-
//#region ../../node_modules/.pnpm/@better-auth+core@1.
|
|
903
|
+
//#region ../../node_modules/.pnpm/@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fetch+fetch@1.3.1_@opentelemet_2e71ba5b354a0fbab5c1bdc9f6326b28/node_modules/@better-auth/core/dist/env/env-impl.mjs
|
|
868
904
|
const _envShim = Object.create(null);
|
|
869
905
|
const _getEnv = (useShim) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (useShim ? _envShim : globalThis);
|
|
870
906
|
const env = new Proxy(_envShim, {
|
|
@@ -928,7 +964,7 @@ const ENV = Object.freeze({
|
|
|
928
964
|
});
|
|
929
965
|
|
|
930
966
|
//#endregion
|
|
931
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
967
|
+
//#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
|
|
932
968
|
const SLASH_CHAR_CODE = "/".charCodeAt(0);
|
|
933
969
|
function trimTrailingSlashes(value) {
|
|
934
970
|
let end = value.length;
|
|
@@ -1007,7 +1043,7 @@ function getOrigin(url) {
|
|
|
1007
1043
|
}
|
|
1008
1044
|
|
|
1009
1045
|
//#endregion
|
|
1010
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
1046
|
+
//#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
|
|
1011
1047
|
const hasPermission = (input) => {
|
|
1012
1048
|
if (input.userId && input.options?.adminUserIds?.includes(input.userId)) return true;
|
|
1013
1049
|
if (!input.permissions) return false;
|
|
@@ -1536,7 +1572,7 @@ var betterFetch = async (url, options) => {
|
|
|
1536
1572
|
};
|
|
1537
1573
|
|
|
1538
1574
|
//#endregion
|
|
1539
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
1575
|
+
//#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
|
|
1540
1576
|
const PROTO_POLLUTION_PATTERNS = {
|
|
1541
1577
|
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*:/,
|
|
1542
1578
|
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*:/,
|
|
@@ -1606,7 +1642,7 @@ function parseJSON(value, options = { strict: true }) {
|
|
|
1606
1642
|
}
|
|
1607
1643
|
|
|
1608
1644
|
//#endregion
|
|
1609
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
1645
|
+
//#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
|
|
1610
1646
|
const defaultStatements = {
|
|
1611
1647
|
organization: ["update", "delete"],
|
|
1612
1648
|
member: [
|
|
@@ -1682,7 +1718,7 @@ const defaultRoles = {
|
|
|
1682
1718
|
};
|
|
1683
1719
|
|
|
1684
1720
|
//#endregion
|
|
1685
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
1721
|
+
//#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
|
|
1686
1722
|
const hasPermissionFn = (input, acRoles) => {
|
|
1687
1723
|
if (!input.permissions) return false;
|
|
1688
1724
|
const roles = input.role.split(",");
|
|
@@ -1695,7 +1731,7 @@ const hasPermissionFn = (input, acRoles) => {
|
|
|
1695
1731
|
};
|
|
1696
1732
|
|
|
1697
1733
|
//#endregion
|
|
1698
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
1734
|
+
//#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
|
|
1699
1735
|
const ORGANIZATION_ERROR_CODES = defineErrorCodes({
|
|
1700
1736
|
YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization",
|
|
1701
1737
|
YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations",
|
|
@@ -1768,12 +1804,22 @@ const t$1 = createAccessControl({
|
|
|
1768
1804
|
`update`,
|
|
1769
1805
|
`delete`
|
|
1770
1806
|
],
|
|
1807
|
+
invitation: [`create`, `cancel`],
|
|
1808
|
+
team: [
|
|
1809
|
+
`create`,
|
|
1810
|
+
`read`,
|
|
1811
|
+
`update`,
|
|
1812
|
+
`delete`
|
|
1813
|
+
],
|
|
1771
1814
|
audit: [`read`],
|
|
1815
|
+
approval_policy: [`update`],
|
|
1816
|
+
approval_request: [`review`],
|
|
1772
1817
|
project: [
|
|
1773
1818
|
`create`,
|
|
1774
1819
|
`read`,
|
|
1775
1820
|
`update`,
|
|
1776
|
-
`archive
|
|
1821
|
+
`archive`,
|
|
1822
|
+
`assign_teams`
|
|
1777
1823
|
],
|
|
1778
1824
|
environment: [
|
|
1779
1825
|
`create`,
|
|
@@ -1806,6 +1852,7 @@ const t$1 = createAccessControl({
|
|
|
1806
1852
|
const n$1 = {
|
|
1807
1853
|
viewer: t$1.newRole({
|
|
1808
1854
|
member: [`read`],
|
|
1855
|
+
team: [`read`],
|
|
1809
1856
|
project: [`read`],
|
|
1810
1857
|
environment: [`read`],
|
|
1811
1858
|
flag: [`read`],
|
|
@@ -1814,6 +1861,7 @@ const n$1 = {
|
|
|
1814
1861
|
}),
|
|
1815
1862
|
editor: t$1.newRole({
|
|
1816
1863
|
member: [`read`],
|
|
1864
|
+
team: [`read`],
|
|
1817
1865
|
project: [`read`, `update`],
|
|
1818
1866
|
environment: [`read`],
|
|
1819
1867
|
flag: [
|
|
@@ -1823,8 +1871,12 @@ const n$1 = {
|
|
|
1823
1871
|
`archive`
|
|
1824
1872
|
],
|
|
1825
1873
|
flag_state: [`update`],
|
|
1826
|
-
apiKey: [`read`],
|
|
1827
|
-
sdk_key: [
|
|
1874
|
+
apiKey: [`create`, `read`],
|
|
1875
|
+
sdk_key: [
|
|
1876
|
+
`create`,
|
|
1877
|
+
`read`,
|
|
1878
|
+
`revoke`
|
|
1879
|
+
],
|
|
1828
1880
|
evaluated_entity: [`read`],
|
|
1829
1881
|
billing: [`read`]
|
|
1830
1882
|
}),
|
|
@@ -1835,12 +1887,22 @@ const n$1 = {
|
|
|
1835
1887
|
`read`,
|
|
1836
1888
|
`update`
|
|
1837
1889
|
],
|
|
1890
|
+
invitation: [`create`, `cancel`],
|
|
1891
|
+
team: [
|
|
1892
|
+
`create`,
|
|
1893
|
+
`read`,
|
|
1894
|
+
`update`,
|
|
1895
|
+
`delete`
|
|
1896
|
+
],
|
|
1838
1897
|
audit: [`read`],
|
|
1898
|
+
approval_policy: [`update`],
|
|
1899
|
+
approval_request: [`review`],
|
|
1839
1900
|
project: [
|
|
1840
1901
|
`create`,
|
|
1841
1902
|
`read`,
|
|
1842
1903
|
`update`,
|
|
1843
|
-
`archive
|
|
1904
|
+
`archive`,
|
|
1905
|
+
`assign_teams`
|
|
1844
1906
|
],
|
|
1845
1907
|
environment: [
|
|
1846
1908
|
`create`,
|
|
@@ -1878,12 +1940,22 @@ const n$1 = {
|
|
|
1878
1940
|
`update`,
|
|
1879
1941
|
`delete`
|
|
1880
1942
|
],
|
|
1943
|
+
invitation: [`create`, `cancel`],
|
|
1944
|
+
team: [
|
|
1945
|
+
`create`,
|
|
1946
|
+
`read`,
|
|
1947
|
+
`update`,
|
|
1948
|
+
`delete`
|
|
1949
|
+
],
|
|
1881
1950
|
audit: [`read`],
|
|
1951
|
+
approval_policy: [`update`],
|
|
1952
|
+
approval_request: [`review`],
|
|
1882
1953
|
project: [
|
|
1883
1954
|
`create`,
|
|
1884
1955
|
`read`,
|
|
1885
1956
|
`update`,
|
|
1886
|
-
`archive
|
|
1957
|
+
`archive`,
|
|
1958
|
+
`assign_teams`
|
|
1887
1959
|
],
|
|
1888
1960
|
environment: [
|
|
1889
1961
|
`create`,
|
|
@@ -1916,7 +1988,7 @@ const n$1 = {
|
|
|
1916
1988
|
};
|
|
1917
1989
|
|
|
1918
1990
|
//#endregion
|
|
1919
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
1991
|
+
//#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
|
|
1920
1992
|
const kBroadcastChannel = Symbol.for("better-auth:broadcast-channel");
|
|
1921
1993
|
const now$1 = () => Math.floor(Date.now() / 1e3);
|
|
1922
1994
|
var WindowBroadcastChannel = class {
|
|
@@ -1960,23 +2032,30 @@ function getGlobalBroadcastChannel(name = "better-auth.message") {
|
|
|
1960
2032
|
}
|
|
1961
2033
|
|
|
1962
2034
|
//#endregion
|
|
1963
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
2035
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/clean-stores/index.js
|
|
1964
2036
|
const clean = Symbol("clean");
|
|
1965
2037
|
|
|
1966
2038
|
//#endregion
|
|
1967
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
2039
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/atom/index.js
|
|
1968
2040
|
let listenerQueue = [];
|
|
1969
2041
|
let lqIndex = 0;
|
|
1970
2042
|
let batchSeen = null;
|
|
1971
2043
|
const QUEUE_ITEMS_PER_LISTENER = 4;
|
|
1972
2044
|
const nanostoresGlobal = globalThis.nanostoresGlobal ||= { epoch: 0 };
|
|
1973
2045
|
let drainQueue = () => {
|
|
1974
|
-
|
|
2046
|
+
let thrown;
|
|
2047
|
+
for (lqIndex = 0; lqIndex < listenerQueue.length; lqIndex += QUEUE_ITEMS_PER_LISTENER) try {
|
|
2048
|
+
listenerQueue[lqIndex](listenerQueue[lqIndex + 1].value, listenerQueue[lqIndex + 2], listenerQueue[lqIndex + 3]);
|
|
2049
|
+
} catch (e) {
|
|
2050
|
+
thrown = e;
|
|
2051
|
+
}
|
|
1975
2052
|
listenerQueue.length = 0;
|
|
2053
|
+
if (thrown) throw thrown;
|
|
1976
2054
|
};
|
|
1977
2055
|
const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
1978
2056
|
let listeners = [];
|
|
1979
2057
|
let $atom = {
|
|
2058
|
+
eq: Object.is,
|
|
1980
2059
|
get() {
|
|
1981
2060
|
if (!$atom.lc) $atom.listen(() => {})();
|
|
1982
2061
|
return $atom.value;
|
|
@@ -2008,7 +2087,7 @@ const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
2008
2087
|
off() {},
|
|
2009
2088
|
set(newValue) {
|
|
2010
2089
|
let oldValue = $atom.value;
|
|
2011
|
-
if (oldValue
|
|
2090
|
+
if (!$atom.eq(oldValue, newValue)) {
|
|
2012
2091
|
$atom.value = newValue;
|
|
2013
2092
|
$atom.notify(oldValue);
|
|
2014
2093
|
}
|
|
@@ -2029,7 +2108,7 @@ const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
2029
2108
|
};
|
|
2030
2109
|
|
|
2031
2110
|
//#endregion
|
|
2032
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
2111
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/lifecycle/index.js
|
|
2033
2112
|
const SET = 2;
|
|
2034
2113
|
const MOUNT = 5;
|
|
2035
2114
|
const UNMOUNT = 6;
|
|
@@ -2133,7 +2212,7 @@ let onMount = ($store, initialize) => {
|
|
|
2133
2212
|
};
|
|
2134
2213
|
|
|
2135
2214
|
//#endregion
|
|
2136
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2215
|
+
//#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
|
|
2137
2216
|
function isPlainObject(value) {
|
|
2138
2217
|
if (typeof value !== "object" || value === null) return false;
|
|
2139
2218
|
const prototype = Object.getPrototypeOf(value);
|
|
@@ -2174,7 +2253,7 @@ function withEquality(store, isEqual) {
|
|
|
2174
2253
|
}
|
|
2175
2254
|
|
|
2176
2255
|
//#endregion
|
|
2177
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2256
|
+
//#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
|
|
2178
2257
|
const kFocusManager = Symbol.for("better-auth:focus-manager");
|
|
2179
2258
|
var WindowFocusManager = class {
|
|
2180
2259
|
listeners = /* @__PURE__ */ new Set();
|
|
@@ -2204,7 +2283,7 @@ function getGlobalFocusManager() {
|
|
|
2204
2283
|
}
|
|
2205
2284
|
|
|
2206
2285
|
//#endregion
|
|
2207
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2286
|
+
//#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
|
|
2208
2287
|
const kOnlineManager = Symbol.for("better-auth:online-manager");
|
|
2209
2288
|
var WindowOnlineManager = class {
|
|
2210
2289
|
listeners = /* @__PURE__ */ new Set();
|
|
@@ -2237,7 +2316,7 @@ function getGlobalOnlineManager() {
|
|
|
2237
2316
|
}
|
|
2238
2317
|
|
|
2239
2318
|
//#endregion
|
|
2240
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2319
|
+
//#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
|
|
2241
2320
|
const isServer$1 = () => typeof window === "undefined";
|
|
2242
2321
|
function isAuthQueryStateEqual(a, b) {
|
|
2243
2322
|
return isJsonEqual(a.data, b.data) && a.error === b.error && a.isPending === b.isPending && a.isRefetching === b.isRefetching && a.refetch === b.refetch;
|
|
@@ -2250,7 +2329,7 @@ const useAuthQuery = (initializedAtom, path, $fetch, options) => {
|
|
|
2250
2329
|
isRefetching: false,
|
|
2251
2330
|
refetch: (queryParams) => fn(queryParams)
|
|
2252
2331
|
});
|
|
2253
|
-
withEquality(value, isAuthQueryStateEqual);
|
|
2332
|
+
onMount(value, () => withEquality(value, isAuthQueryStateEqual));
|
|
2254
2333
|
const fn = async (queryParams) => {
|
|
2255
2334
|
return new Promise((resolve) => {
|
|
2256
2335
|
const opts = typeof options === "function" ? options({
|
|
@@ -2359,7 +2438,7 @@ const useAuthQuery = (initializedAtom, path, $fetch, options) => {
|
|
|
2359
2438
|
};
|
|
2360
2439
|
|
|
2361
2440
|
//#endregion
|
|
2362
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2441
|
+
//#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
|
|
2363
2442
|
const now = () => Math.floor(Date.now() / 1e3);
|
|
2364
2443
|
/**
|
|
2365
2444
|
* Rate limit: don't refetch on focus if a session request was made within this many seconds
|
|
@@ -2487,7 +2566,7 @@ function createSessionRefreshManager(opts) {
|
|
|
2487
2566
|
}
|
|
2488
2567
|
|
|
2489
2568
|
//#endregion
|
|
2490
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2569
|
+
//#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
|
|
2491
2570
|
const redirectPlugin = {
|
|
2492
2571
|
id: "redirect",
|
|
2493
2572
|
name: "Redirect",
|
|
@@ -2503,8 +2582,20 @@ const redirectPlugin = {
|
|
|
2503
2582
|
};
|
|
2504
2583
|
|
|
2505
2584
|
//#endregion
|
|
2506
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2585
|
+
//#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
|
|
2507
2586
|
const isServer = () => typeof window === "undefined";
|
|
2587
|
+
const SESSION_MOUNT_DEDUPE_INTERVAL = STORE_UNMOUNT_DELAY;
|
|
2588
|
+
function hydrateSessionAtom(sessionAtom, session) {
|
|
2589
|
+
if (typeof window === "undefined") return;
|
|
2590
|
+
const currentSession = sessionAtom.get();
|
|
2591
|
+
if (currentSession.data !== null || session === null) return;
|
|
2592
|
+
sessionAtom.set({
|
|
2593
|
+
...currentSession,
|
|
2594
|
+
data: session,
|
|
2595
|
+
error: null,
|
|
2596
|
+
isPending: false
|
|
2597
|
+
});
|
|
2598
|
+
}
|
|
2508
2599
|
/**
|
|
2509
2600
|
* Normalize $fetch response: `throw: true` returns data directly,
|
|
2510
2601
|
* otherwise `{ data, error }`.
|
|
@@ -2526,7 +2617,13 @@ function isSessionAtomEqual(a, b) {
|
|
|
2526
2617
|
}
|
|
2527
2618
|
function getSessionAtom($fetch, options) {
|
|
2528
2619
|
const $signal = /* @__PURE__ */ atom(false);
|
|
2529
|
-
let
|
|
2620
|
+
let flight;
|
|
2621
|
+
let freshUntil = 0;
|
|
2622
|
+
let sessionRevision = 0;
|
|
2623
|
+
$signal.listen(() => {
|
|
2624
|
+
sessionRevision++;
|
|
2625
|
+
freshUntil = 0;
|
|
2626
|
+
});
|
|
2530
2627
|
const refetch = (queryParams) => fetchSession(queryParams);
|
|
2531
2628
|
const session = /* @__PURE__ */ atom({
|
|
2532
2629
|
data: null,
|
|
@@ -2536,23 +2633,8 @@ function getSessionAtom($fetch, options) {
|
|
|
2536
2633
|
refetch
|
|
2537
2634
|
});
|
|
2538
2635
|
withEquality(session, isSessionAtomEqual);
|
|
2539
|
-
const
|
|
2540
|
-
|
|
2541
|
-
const current = session.get();
|
|
2542
|
-
abortController = void 0;
|
|
2543
|
-
if (!current.isPending && !current.isRefetching) return;
|
|
2544
|
-
session.set({
|
|
2545
|
-
...current,
|
|
2546
|
-
isPending: false,
|
|
2547
|
-
isRefetching: false,
|
|
2548
|
-
refetch
|
|
2549
|
-
});
|
|
2550
|
-
};
|
|
2551
|
-
const fetchSession = async (queryParams) => {
|
|
2552
|
-
abortController?.abort();
|
|
2553
|
-
const controller = new AbortController();
|
|
2554
|
-
abortController = controller;
|
|
2555
|
-
const current = session.get();
|
|
2636
|
+
const executeSessionFetch = async (signal, queryParams) => {
|
|
2637
|
+
const current = session.value;
|
|
2556
2638
|
session.set({
|
|
2557
2639
|
...current,
|
|
2558
2640
|
isPending: current.data === null,
|
|
@@ -2560,35 +2642,29 @@ function getSessionAtom($fetch, options) {
|
|
|
2560
2642
|
error: null,
|
|
2561
2643
|
refetch
|
|
2562
2644
|
});
|
|
2645
|
+
if (signal.aborted) return "aborted";
|
|
2563
2646
|
try {
|
|
2564
2647
|
const res = await $fetch("/get-session", {
|
|
2565
2648
|
method: "GET",
|
|
2566
2649
|
query: queryParams?.query,
|
|
2567
|
-
signal
|
|
2650
|
+
signal
|
|
2568
2651
|
});
|
|
2569
|
-
if (
|
|
2570
|
-
settleAbortedFetch(controller);
|
|
2571
|
-
return;
|
|
2572
|
-
}
|
|
2652
|
+
if (signal.aborted) return "aborted";
|
|
2573
2653
|
let { data, error } = normalizeSessionResponse(res);
|
|
2654
|
+
let outcome = "fresh";
|
|
2574
2655
|
if (data?.needsRefresh) try {
|
|
2575
2656
|
const refreshRes = await $fetch("/get-session", {
|
|
2576
2657
|
method: "POST",
|
|
2577
|
-
signal
|
|
2658
|
+
signal
|
|
2578
2659
|
});
|
|
2579
|
-
if (
|
|
2580
|
-
settleAbortedFetch(controller);
|
|
2581
|
-
return;
|
|
2582
|
-
}
|
|
2660
|
+
if (signal.aborted) return "aborted";
|
|
2583
2661
|
({data, error} = normalizeSessionResponse(refreshRes));
|
|
2584
2662
|
} catch {
|
|
2585
|
-
if (
|
|
2586
|
-
|
|
2587
|
-
return;
|
|
2588
|
-
}
|
|
2663
|
+
if (signal.aborted) return "aborted";
|
|
2664
|
+
outcome = "stale";
|
|
2589
2665
|
}
|
|
2590
2666
|
if (error) {
|
|
2591
|
-
const latest = session.
|
|
2667
|
+
const latest = session.value;
|
|
2592
2668
|
const isUnauthorized = error?.status === 401;
|
|
2593
2669
|
session.set({
|
|
2594
2670
|
data: isUnauthorized ? null : latest.data,
|
|
@@ -2597,10 +2673,10 @@ function getSessionAtom($fetch, options) {
|
|
|
2597
2673
|
isRefetching: false,
|
|
2598
2674
|
refetch
|
|
2599
2675
|
});
|
|
2600
|
-
return;
|
|
2676
|
+
return "failed";
|
|
2601
2677
|
}
|
|
2602
2678
|
const sessionData = normalizeSessionData(data);
|
|
2603
|
-
const current = session.
|
|
2679
|
+
const current = session.value;
|
|
2604
2680
|
const stableData = current.data != null && sessionData != null && isJsonEqual(current.data, sessionData) ? current.data : sessionData;
|
|
2605
2681
|
session.set({
|
|
2606
2682
|
data: stableData,
|
|
@@ -2609,12 +2685,10 @@ function getSessionAtom($fetch, options) {
|
|
|
2609
2685
|
isRefetching: false,
|
|
2610
2686
|
refetch
|
|
2611
2687
|
});
|
|
2688
|
+
return outcome;
|
|
2612
2689
|
} catch (fetchError) {
|
|
2613
|
-
if (
|
|
2614
|
-
|
|
2615
|
-
return;
|
|
2616
|
-
}
|
|
2617
|
-
const latest = session.get();
|
|
2690
|
+
if (signal.aborted) return "aborted";
|
|
2691
|
+
const latest = session.value;
|
|
2618
2692
|
session.set({
|
|
2619
2693
|
data: latest.data,
|
|
2620
2694
|
error: fetchError,
|
|
@@ -2622,17 +2696,49 @@ function getSessionAtom($fetch, options) {
|
|
|
2622
2696
|
isRefetching: false,
|
|
2623
2697
|
refetch
|
|
2624
2698
|
});
|
|
2699
|
+
return "failed";
|
|
2625
2700
|
}
|
|
2626
2701
|
};
|
|
2702
|
+
const getFreshUntil = () => {
|
|
2703
|
+
const expiresAt = session.value.data?.session?.expiresAt;
|
|
2704
|
+
const sessionExpiresAt = expiresAt instanceof Date ? expiresAt.getTime() : Number.POSITIVE_INFINITY;
|
|
2705
|
+
return Math.min(Date.now() + SESSION_MOUNT_DEDUPE_INTERVAL, sessionExpiresAt);
|
|
2706
|
+
};
|
|
2707
|
+
const fetchSession = (queryParams) => {
|
|
2708
|
+
freshUntil = 0;
|
|
2709
|
+
flight?.cancel();
|
|
2710
|
+
const controller = new AbortController();
|
|
2711
|
+
const request = {
|
|
2712
|
+
cancel: () => controller.abort(),
|
|
2713
|
+
promise: Promise.resolve().then(() => {
|
|
2714
|
+
if (controller.signal.aborted) return "aborted";
|
|
2715
|
+
return executeSessionFetch(controller.signal, queryParams);
|
|
2716
|
+
}),
|
|
2717
|
+
revision: sessionRevision
|
|
2718
|
+
};
|
|
2719
|
+
flight = request;
|
|
2720
|
+
const settleFlight = (outcome) => {
|
|
2721
|
+
if (flight !== request) return;
|
|
2722
|
+
flight = void 0;
|
|
2723
|
+
if (outcome === "fresh" && request.revision === sessionRevision) freshUntil = getFreshUntil();
|
|
2724
|
+
};
|
|
2725
|
+
request.promise.then(settleFlight, () => settleFlight("failed"));
|
|
2726
|
+
return request.promise.then(() => void 0);
|
|
2727
|
+
};
|
|
2728
|
+
const fetchSessionOnMount = () => {
|
|
2729
|
+
if (flight?.revision === sessionRevision) return flight.promise.then(() => void 0);
|
|
2730
|
+
if (Date.now() < freshUntil) return Promise.resolve();
|
|
2731
|
+
return fetchSession();
|
|
2732
|
+
};
|
|
2627
2733
|
let broadcastSessionUpdate = () => {};
|
|
2628
2734
|
onMount(session, () => {
|
|
2629
2735
|
let timeoutId;
|
|
2630
2736
|
if (!isServer()) timeoutId = setTimeout(() => {
|
|
2631
|
-
|
|
2737
|
+
fetchSessionOnMount();
|
|
2632
2738
|
}, 0);
|
|
2633
2739
|
const refreshManager = createSessionRefreshManager({
|
|
2634
2740
|
fetchSession,
|
|
2635
|
-
shouldPollSession: () => session.
|
|
2741
|
+
shouldPollSession: () => session.value.data != null,
|
|
2636
2742
|
sessionSignal: $signal,
|
|
2637
2743
|
options
|
|
2638
2744
|
});
|
|
@@ -2640,9 +2746,6 @@ function getSessionAtom($fetch, options) {
|
|
|
2640
2746
|
broadcastSessionUpdate = refreshManager.broadcastSessionUpdate;
|
|
2641
2747
|
return () => {
|
|
2642
2748
|
if (timeoutId) clearTimeout(timeoutId);
|
|
2643
|
-
const controller = abortController;
|
|
2644
|
-
controller?.abort();
|
|
2645
|
-
if (controller) settleAbortedFetch(controller);
|
|
2646
2749
|
refreshManager.cleanup();
|
|
2647
2750
|
};
|
|
2648
2751
|
});
|
|
@@ -2654,7 +2757,7 @@ function getSessionAtom($fetch, options) {
|
|
|
2654
2757
|
}
|
|
2655
2758
|
|
|
2656
2759
|
//#endregion
|
|
2657
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2760
|
+
//#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
|
|
2658
2761
|
const resolvePublicAuthUrl = (basePath) => {
|
|
2659
2762
|
if (typeof process === "undefined") return void 0;
|
|
2660
2763
|
const path = basePath ?? "/api/auth";
|
|
@@ -2702,6 +2805,12 @@ const getClientConfig = (options, loadEnv) => {
|
|
|
2702
2805
|
]
|
|
2703
2806
|
});
|
|
2704
2807
|
const { $sessionSignal, session, broadcastSessionUpdate } = getSessionAtom($fetch, options);
|
|
2808
|
+
let hasHydrated = false;
|
|
2809
|
+
const hydrateSession = (sessionData) => {
|
|
2810
|
+
if (hasHydrated || sessionData === null) return;
|
|
2811
|
+
hasHydrated = true;
|
|
2812
|
+
hydrateSessionAtom(session, sessionData);
|
|
2813
|
+
};
|
|
2705
2814
|
const plugins = options?.plugins || [];
|
|
2706
2815
|
let pluginsActions = {};
|
|
2707
2816
|
const pluginsAtoms = {
|
|
@@ -2747,19 +2856,20 @@ const getClientConfig = (options, loadEnv) => {
|
|
|
2747
2856
|
pluginsAtoms,
|
|
2748
2857
|
pluginPathMethods,
|
|
2749
2858
|
atomListeners,
|
|
2859
|
+
hydrateSession,
|
|
2750
2860
|
$fetch,
|
|
2751
2861
|
$store
|
|
2752
2862
|
};
|
|
2753
2863
|
};
|
|
2754
2864
|
|
|
2755
2865
|
//#endregion
|
|
2756
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2866
|
+
//#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
|
|
2757
2867
|
function isAtom(value) {
|
|
2758
2868
|
return typeof value === "object" && value !== null && "get" in value && typeof value.get === "function" && "lc" in value && typeof value.lc === "number";
|
|
2759
2869
|
}
|
|
2760
2870
|
|
|
2761
2871
|
//#endregion
|
|
2762
|
-
//#region ../../node_modules/.pnpm/@better-auth+core@1.
|
|
2872
|
+
//#region ../../node_modules/.pnpm/@better-auth+core@1.7.1_@better-auth+utils@0.4.2_@better-fetch+fetch@1.3.1_@opentelemet_2e71ba5b354a0fbab5c1bdc9f6326b28/node_modules/@better-auth/core/dist/utils/string.mjs
|
|
2763
2873
|
function capitalizeFirstLetter(str) {
|
|
2764
2874
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
2765
2875
|
}
|
|
@@ -2773,7 +2883,7 @@ function toKebabCase(input) {
|
|
|
2773
2883
|
}
|
|
2774
2884
|
|
|
2775
2885
|
//#endregion
|
|
2776
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2886
|
+
//#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
|
|
2777
2887
|
function getMethod(path, knownPathMethods, args) {
|
|
2778
2888
|
const method = knownPathMethods[path];
|
|
2779
2889
|
const { fetchOptions, query: _query, ...body } = args || {};
|
|
@@ -2849,21 +2959,22 @@ function createDynamicPathProxy(routes, client, knownPathMethods, atoms, atomLis
|
|
|
2849
2959
|
}
|
|
2850
2960
|
|
|
2851
2961
|
//#endregion
|
|
2852
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2962
|
+
//#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
|
|
2853
2963
|
function createAuthClient(options) {
|
|
2854
|
-
const { pluginPathMethods, pluginsActions, pluginsAtoms, $fetch, atomListeners, $store } = getClientConfig(options);
|
|
2964
|
+
const { pluginPathMethods, pluginsActions, pluginsAtoms, hydrateSession, $fetch, atomListeners, $store } = getClientConfig(options);
|
|
2855
2965
|
const resolvedHooks = {};
|
|
2856
2966
|
for (const [key, value] of Object.entries(pluginsAtoms)) resolvedHooks[`use${capitalizeFirstLetter(key)}`] = value;
|
|
2857
2967
|
return createDynamicPathProxy({
|
|
2858
2968
|
...pluginsActions,
|
|
2859
2969
|
...resolvedHooks,
|
|
2970
|
+
hydrateSession,
|
|
2860
2971
|
$fetch,
|
|
2861
2972
|
$store
|
|
2862
2973
|
}, $fetch, pluginPathMethods, pluginsAtoms, atomListeners);
|
|
2863
2974
|
}
|
|
2864
2975
|
|
|
2865
2976
|
//#endregion
|
|
2866
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2977
|
+
//#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
|
|
2867
2978
|
const inferAdditionalFields = (schema) => {
|
|
2868
2979
|
return {
|
|
2869
2980
|
id: "additional-fields-client",
|
|
@@ -2873,7 +2984,7 @@ const inferAdditionalFields = (schema) => {
|
|
|
2873
2984
|
};
|
|
2874
2985
|
|
|
2875
2986
|
//#endregion
|
|
2876
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
2987
|
+
//#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
|
|
2877
2988
|
const adminClient = (options) => {
|
|
2878
2989
|
const roles = {
|
|
2879
2990
|
admin: adminAc$1,
|
|
@@ -2908,7 +3019,7 @@ const adminClient = (options) => {
|
|
|
2908
3019
|
};
|
|
2909
3020
|
|
|
2910
3021
|
//#endregion
|
|
2911
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
3022
|
+
//#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
|
|
2912
3023
|
const deviceAuthorizationClient = () => {
|
|
2913
3024
|
return {
|
|
2914
3025
|
id: "device-authorization",
|
|
@@ -2925,7 +3036,7 @@ const deviceAuthorizationClient = () => {
|
|
|
2925
3036
|
};
|
|
2926
3037
|
|
|
2927
3038
|
//#endregion
|
|
2928
|
-
//#region ../../node_modules/.pnpm/better-auth@1.
|
|
3039
|
+
//#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
|
|
2929
3040
|
/**
|
|
2930
3041
|
* Using the same `hasPermissionFn` function, but without the need for a `ctx` parameter or the `organizationId` parameter.
|
|
2931
3042
|
*/
|
|
@@ -2968,18 +3079,15 @@ const organizationClient = (options) => {
|
|
|
2968
3079
|
}),
|
|
2969
3080
|
getAtoms: ($fetch) => {
|
|
2970
3081
|
const listOrganizations = useAuthQuery($listOrg, "/organization/list", $fetch, { method: "GET" });
|
|
2971
|
-
const activeOrganization = useAuthQuery([$activeOrgSignal], "/organization/get-full-organization", $fetch, () => ({ method: "GET" }));
|
|
2972
|
-
const activeMember = useAuthQuery([$activeOrgSignal, $activeMemberSignal], "/organization/get-active-member", $fetch, { method: "GET" });
|
|
2973
|
-
const activeMemberRole = useAuthQuery([$activeOrgSignal, $activeMemberRoleSignal], "/organization/get-active-member-role", $fetch, { method: "GET" });
|
|
2974
3082
|
return {
|
|
2975
3083
|
$listOrg,
|
|
2976
3084
|
$activeOrgSignal,
|
|
2977
3085
|
$activeMemberSignal,
|
|
2978
3086
|
$activeMemberRoleSignal,
|
|
2979
|
-
activeOrganization,
|
|
3087
|
+
activeOrganization: useAuthQuery([$activeOrgSignal], "/organization/get-full-organization", $fetch, () => ({ method: "GET" })),
|
|
2980
3088
|
listOrganizations,
|
|
2981
|
-
activeMember,
|
|
2982
|
-
activeMemberRole
|
|
3089
|
+
activeMember: useAuthQuery([$activeOrgSignal, $activeMemberSignal], "/organization/get-active-member", $fetch, { method: "GET" }),
|
|
3090
|
+
activeMemberRole: useAuthQuery([$activeOrgSignal, $activeMemberRoleSignal], "/organization/get-active-member-role", $fetch, { method: "GET" })
|
|
2983
3091
|
};
|
|
2984
3092
|
},
|
|
2985
3093
|
pathMethods: {
|
|
@@ -3023,7 +3131,7 @@ const organizationClient = (options) => {
|
|
|
3023
3131
|
};
|
|
3024
3132
|
|
|
3025
3133
|
//#endregion
|
|
3026
|
-
//#region ../../node_modules/.pnpm/@better-auth+api-key@1.
|
|
3134
|
+
//#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
|
|
3027
3135
|
const API_KEY_ERROR_CODES = defineErrorCodes({
|
|
3028
3136
|
INVALID_METADATA_TYPE: "metadata must be an object or undefined",
|
|
3029
3137
|
REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided",
|
|
@@ -3057,10 +3165,10 @@ const API_KEY_ERROR_CODES = defineErrorCodes({
|
|
|
3057
3165
|
NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: "No default api-key configuration found.",
|
|
3058
3166
|
ORGANIZATION_PLUGIN_REQUIRED: "Organization plugin is required for organization-owned API keys. Please install and configure the organization plugin."
|
|
3059
3167
|
});
|
|
3060
|
-
const PACKAGE_VERSION$1 = "1.
|
|
3168
|
+
const PACKAGE_VERSION$1 = "1.7.1";
|
|
3061
3169
|
|
|
3062
3170
|
//#endregion
|
|
3063
|
-
//#region ../../node_modules/.pnpm/@better-auth+api-key@1.
|
|
3171
|
+
//#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
|
|
3064
3172
|
const apiKeyClient = () => {
|
|
3065
3173
|
return {
|
|
3066
3174
|
id: "api-key",
|
|
@@ -3076,7 +3184,7 @@ const apiKeyClient = () => {
|
|
|
3076
3184
|
};
|
|
3077
3185
|
|
|
3078
3186
|
//#endregion
|
|
3079
|
-
//#region ../../node_modules/.pnpm/@better-auth+passkey@1.
|
|
3187
|
+
//#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
|
|
3080
3188
|
const PASSKEY_ERROR_CODES = defineErrorCodes({
|
|
3081
3189
|
CHALLENGE_NOT_FOUND: "Challenge not found",
|
|
3082
3190
|
YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: "You are not allowed to register this passkey",
|
|
@@ -3084,6 +3192,7 @@ const PASSKEY_ERROR_CODES = defineErrorCodes({
|
|
|
3084
3192
|
PASSKEY_NOT_FOUND: "Passkey not found",
|
|
3085
3193
|
AUTHENTICATION_FAILED: "Authentication failed",
|
|
3086
3194
|
UNABLE_TO_CREATE_SESSION: "Unable to create session",
|
|
3195
|
+
USER_NOT_FOUND: "User not found",
|
|
3087
3196
|
FAILED_TO_UPDATE_PASSKEY: "Failed to update passkey",
|
|
3088
3197
|
PREVIOUSLY_REGISTERED: "Previously registered",
|
|
3089
3198
|
REGISTRATION_CANCELLED: "Registration cancelled",
|
|
@@ -3093,7 +3202,7 @@ const PASSKEY_ERROR_CODES = defineErrorCodes({
|
|
|
3093
3202
|
RESOLVE_USER_REQUIRED: "Passkey registration requires either an authenticated session or a resolveUser callback when requireSession is false",
|
|
3094
3203
|
RESOLVED_USER_INVALID: "Resolved user is invalid"
|
|
3095
3204
|
});
|
|
3096
|
-
const PACKAGE_VERSION = "1.
|
|
3205
|
+
const PACKAGE_VERSION = "1.7.1";
|
|
3097
3206
|
|
|
3098
3207
|
//#endregion
|
|
3099
3208
|
//#region ../../node_modules/.pnpm/@simplewebauthn+browser@13.3.0/node_modules/@simplewebauthn/browser/esm/helpers/bufferToBase64URLString.js
|
|
@@ -3565,7 +3674,7 @@ async function startAuthentication(options) {
|
|
|
3565
3674
|
}
|
|
3566
3675
|
|
|
3567
3676
|
//#endregion
|
|
3568
|
-
//#region ../../node_modules/.pnpm/@better-auth+passkey@1.
|
|
3677
|
+
//#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
|
|
3569
3678
|
const getPasskeyActions = ($fetch, { $listPasskeys, $store }) => {
|
|
3570
3679
|
const signInPasskey = async (opts, options) => {
|
|
3571
3680
|
const response = await $fetch("/passkey/generate-authenticate-options", {
|
|
@@ -3658,13 +3767,15 @@ const getPasskeyActions = ($fetch, { $listPasskeys, $store }) => {
|
|
|
3658
3767
|
...fetchOpts,
|
|
3659
3768
|
body: {
|
|
3660
3769
|
response: responseBody,
|
|
3661
|
-
name: opts?.name
|
|
3770
|
+
name: opts?.name,
|
|
3771
|
+
...opts?.createSession && { createSession: true }
|
|
3662
3772
|
},
|
|
3663
3773
|
method: "POST",
|
|
3664
3774
|
throw: false
|
|
3665
3775
|
});
|
|
3666
3776
|
if (!verified.data) return verified;
|
|
3667
3777
|
$listPasskeys.set(Math.random());
|
|
3778
|
+
if (verified.data.session) $store.notify("$sessionSignal");
|
|
3668
3779
|
if (opts?.returnWebAuthnResponse) return {
|
|
3669
3780
|
...verified,
|
|
3670
3781
|
webauthn: {
|
|
@@ -3775,7 +3886,8 @@ function u$1(n) {
|
|
|
3775
3886
|
passkeyClient(),
|
|
3776
3887
|
organizationClient({
|
|
3777
3888
|
ac: t$1,
|
|
3778
|
-
roles: n$1
|
|
3889
|
+
roles: n$1,
|
|
3890
|
+
teams: { enabled: !0 }
|
|
3779
3891
|
}),
|
|
3780
3892
|
inferAdditionalFields()
|
|
3781
3893
|
];
|
|
@@ -3874,7 +3986,7 @@ async function createCliApiClient(runtime) {
|
|
|
3874
3986
|
sessionToken,
|
|
3875
3987
|
orgSlug: runtime.org
|
|
3876
3988
|
});
|
|
3877
|
-
const client =
|
|
3989
|
+
const client = C$1({
|
|
3878
3990
|
baseUrl: runtime.apiUrl,
|
|
3879
3991
|
client: "cli",
|
|
3880
3992
|
getHeaders: () => {
|
|
@@ -4366,7 +4478,8 @@ const K = z.object({
|
|
|
4366
4478
|
changes: z.array(U),
|
|
4367
4479
|
remoteOnly: z.array(L).default([]),
|
|
4368
4480
|
forced: z.boolean().default(!1),
|
|
4369
|
-
adopted: z.boolean().default(!1)
|
|
4481
|
+
adopted: z.boolean().default(!1),
|
|
4482
|
+
approvalRequests: z.array(z.string()).default([])
|
|
4370
4483
|
});
|
|
4371
4484
|
|
|
4372
4485
|
//#endregion
|
|
@@ -4856,13 +4969,16 @@ function registerPushCommand(program) {
|
|
|
4856
4969
|
}).catch(mapApiError);
|
|
4857
4970
|
const appliedPlan = buildSyncPlan(applied.changes);
|
|
4858
4971
|
const types = await runTypegen(runtime);
|
|
4972
|
+
const approvalRequests = applied.approvalRequests ?? [];
|
|
4859
4973
|
printResult(runtime, {
|
|
4860
4974
|
plan: appliedPlan,
|
|
4861
4975
|
remoteOnly,
|
|
4862
4976
|
forced: applied.forced === true,
|
|
4977
|
+
approvalRequests,
|
|
4863
4978
|
types
|
|
4864
4979
|
}, [
|
|
4865
|
-
`Applied ${applied.changes.length} change(s)
|
|
4980
|
+
applied.changes.length > 0 ? `Applied ${applied.changes.length} change(s).` : null,
|
|
4981
|
+
approvalRequests.length > 0 ? `${approvalRequests.length} environment change(s) queued for approval.` : null,
|
|
4866
4982
|
applied.forced ? "Forced through version conflicts (audited)." : null,
|
|
4867
4983
|
`Wrote types for ${types.flagCount} flag(s) to ${types.written}`
|
|
4868
4984
|
].filter(Boolean).join("\n"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipdit/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "shipd's command-line interface",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"commander": "^14.0.0",
|
|
21
21
|
"jiti": "^2.5.1",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"shipdit": "0.2.2",
|
|
23
|
+
"zod": "^4"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@shipd/api-client": "0.0.1",
|
|
27
|
+
"@shipd/auth": "0.0.1",
|
|
28
|
+
"@shipd/contracts": "0.0.1",
|
|
26
29
|
"@types/node": "^24.13.3",
|
|
27
30
|
"tsdown": "0.22.14",
|
|
28
31
|
"typescript": "^7.0.2",
|
|
29
|
-
"vitest": "^4"
|
|
30
|
-
"@shipd/api-client": "0.0.1",
|
|
31
|
-
"@shipd/auth": "0.0.1",
|
|
32
|
-
"@shipd/contracts": "0.0.1"
|
|
32
|
+
"vitest": "^4"
|
|
33
33
|
},
|
|
34
34
|
"engines": {
|
|
35
35
|
"node": ">=20"
|