@sitepong/fastnode 0.3.1 → 0.3.2

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 (126) hide show
  1. package/dist/actions/index.cjs +1 -0
  2. package/dist/actions/index.cjs.map +1 -1
  3. package/dist/actions/index.mjs +1 -0
  4. package/dist/actions/index.mjs.map +1 -1
  5. package/dist/{apple-session-jUzBrql5.d.cts → apple-session-D6x7Jo3D.d.cts} +1 -1
  6. package/dist/{apple-session-jUzBrql5.d.ts → apple-session-D6x7Jo3D.d.ts} +1 -1
  7. package/dist/cert/index.cjs +92 -51
  8. package/dist/cert/index.cjs.map +1 -1
  9. package/dist/cert/index.d.cts +5 -5
  10. package/dist/cert/index.d.ts +5 -5
  11. package/dist/cert/index.mjs +92 -51
  12. package/dist/cert/index.mjs.map +1 -1
  13. package/dist/{cert-ClacRx9y.d.ts → cert-C-yRB-sO.d.ts} +2 -2
  14. package/dist/{cert-DffLKURp.d.cts → cert-C4hhKH1n.d.cts} +2 -2
  15. package/dist/cli/index.cjs +40 -23
  16. package/dist/cli/index.cjs.map +1 -1
  17. package/dist/cli/index.d.cts +3 -3
  18. package/dist/cli/index.d.ts +3 -3
  19. package/dist/cli/index.mjs +40 -23
  20. package/dist/cli/index.mjs.map +1 -1
  21. package/dist/client/index.cjs +1 -0
  22. package/dist/client/index.cjs.map +1 -1
  23. package/dist/client/index.d.cts +3 -3
  24. package/dist/client/index.d.ts +3 -3
  25. package/dist/client/index.mjs +1 -0
  26. package/dist/client/index.mjs.map +1 -1
  27. package/dist/core/index.d.cts +1 -1
  28. package/dist/core/index.d.ts +1 -1
  29. package/dist/deliver/index.d.cts +4 -4
  30. package/dist/deliver/index.d.ts +4 -4
  31. package/dist/{enums-yXNVh3UI.d.cts → enums-BlpayMTx.d.cts} +1 -1
  32. package/dist/{enums-yXNVh3UI.d.ts → enums-BlpayMTx.d.ts} +1 -1
  33. package/dist/frameit/index.d.cts +1 -1
  34. package/dist/frameit/index.d.ts +1 -1
  35. package/dist/gradle/index.d.cts +1 -1
  36. package/dist/gradle/index.d.ts +1 -1
  37. package/dist/gym/index.d.cts +2 -2
  38. package/dist/gym/index.d.ts +2 -2
  39. package/dist/{index-DnHQ2uT2.d.cts → index-258t9n7v.d.cts} +2 -2
  40. package/dist/{index-Ol0RtbQA.d.ts → index-6LKy36sE.d.ts} +4 -4
  41. package/dist/{index-O3EMrd5s.d.cts → index-B74vgav6.d.cts} +4 -4
  42. package/dist/{index-BoU8qt8r.d.cts → index-B7ERdhh8.d.cts} +1 -1
  43. package/dist/{index-BoU8qt8r.d.ts → index-B7ERdhh8.d.ts} +1 -1
  44. package/dist/{index-CmcFPn_G.d.cts → index-BIRpj0f2.d.cts} +2 -2
  45. package/dist/{index-s2PigtDM.d.ts → index-BJLHWMwL.d.ts} +3 -3
  46. package/dist/{index-mEEB7An6.d.ts → index-B_D_01oz.d.ts} +1 -1
  47. package/dist/{index-C18cijCd.d.ts → index-Ba1jHQYg.d.ts} +1 -1
  48. package/dist/{index-925_Ov7X.d.cts → index-BawZaGqD.d.cts} +3 -3
  49. package/dist/{index-8djTPW8O.d.ts → index-BmrOdmNL.d.ts} +2 -2
  50. package/dist/{index-C-EEYXSE.d.ts → index-C8L03MBu.d.ts} +3 -3
  51. package/dist/{index-Cp6cjtd-.d.cts → index-CHLDQweM.d.cts} +1 -1
  52. package/dist/{index-Cp6cjtd-.d.ts → index-CHLDQweM.d.ts} +1 -1
  53. package/dist/{index-B6-MJpO4.d.cts → index-CRFfLsEG.d.cts} +1 -1
  54. package/dist/{index-N6eV5yym.d.ts → index-CV6KnSy1.d.ts} +2 -2
  55. package/dist/index-CX2hUvvG.d.cts +287 -0
  56. package/dist/index-CX2hUvvG.d.ts +287 -0
  57. package/dist/{index-Dkf5sH1E.d.ts → index-ClhWjR7a.d.ts} +2 -2
  58. package/dist/{index-BGhV0gS-.d.ts → index-Cq-xo-9x.d.ts} +2 -2
  59. package/dist/{index-CR3BFPIz.d.cts → index-Cw7ojUY5.d.cts} +1 -1
  60. package/dist/{index-CR3BFPIz.d.ts → index-Cw7ojUY5.d.ts} +1 -1
  61. package/dist/{index-C2yG3wXA.d.cts → index-CwD7lG0y.d.cts} +1 -1
  62. package/dist/{index-C2yG3wXA.d.ts → index-CwD7lG0y.d.ts} +1 -1
  63. package/dist/{index-_24DRp3a.d.cts → index-CxrqhkVF.d.cts} +1 -1
  64. package/dist/{index-on573dnO.d.cts → index-D3zyYCYs.d.cts} +2 -2
  65. package/dist/{index-BhGaVlK1.d.cts → index-DCrSWVMb.d.cts} +3 -3
  66. package/dist/{index-CBM5XZKC.d.ts → index-DP2f5ZsS.d.ts} +3 -3
  67. package/dist/{index-BbVQzSV1.d.cts → index-DRjXV9ej.d.cts} +3 -3
  68. package/dist/{index-Dv-Mek07.d.ts → index-DSXBQeur.d.cts} +1 -1
  69. package/dist/{index-Dv-Mek07.d.cts → index-DSXBQeur.d.ts} +1 -1
  70. package/dist/{index-BYonklf3.d.cts → index-Dvi-3DSM.d.cts} +1 -1
  71. package/dist/{index-BYonklf3.d.ts → index-Dvi-3DSM.d.ts} +1 -1
  72. package/dist/{index-D9YQQ3FM.d.ts → index-Dy8EWOnt.d.ts} +2 -2
  73. package/dist/{index-CpGV1f0L.d.cts → index-HWWl6HEL.d.cts} +3 -3
  74. package/dist/{index-isT08RuY.d.cts → index-QYgreJV3.d.cts} +2 -2
  75. package/dist/{index-CemR3UI9.d.ts → index-SyCMBpNN.d.ts} +3 -3
  76. package/dist/{index-DFstwgGK.d.cts → index-yro2MWgt.d.cts} +2 -2
  77. package/dist/index.cjs +1440 -948
  78. package/dist/index.cjs.map +1 -1
  79. package/dist/index.d.cts +23 -23
  80. package/dist/index.d.ts +23 -23
  81. package/dist/index.mjs +1441 -949
  82. package/dist/index.mjs.map +1 -1
  83. package/dist/lane/index.cjs +1 -0
  84. package/dist/lane/index.cjs.map +1 -1
  85. package/dist/lane/index.mjs +1 -0
  86. package/dist/lane/index.mjs.map +1 -1
  87. package/dist/match/index.d.cts +6 -6
  88. package/dist/match/index.d.ts +6 -6
  89. package/dist/match/index.mjs +1 -1
  90. package/dist/pem/index.d.cts +4 -4
  91. package/dist/pem/index.d.ts +4 -4
  92. package/dist/pilot/index.d.cts +4 -4
  93. package/dist/pilot/index.d.ts +4 -4
  94. package/dist/playstore/index.cjs +18208 -1
  95. package/dist/playstore/index.cjs.map +1 -1
  96. package/dist/playstore/index.d.cts +1 -1
  97. package/dist/playstore/index.d.ts +1 -1
  98. package/dist/playstore/index.mjs +18196 -2
  99. package/dist/playstore/index.mjs.map +1 -1
  100. package/dist/precheck/index.d.cts +4 -4
  101. package/dist/precheck/index.d.ts +4 -4
  102. package/dist/privacy/index.cjs +32 -22
  103. package/dist/privacy/index.cjs.map +1 -1
  104. package/dist/privacy/index.d.cts +2 -2
  105. package/dist/privacy/index.d.ts +2 -2
  106. package/dist/privacy/index.mjs +32 -22
  107. package/dist/privacy/index.mjs.map +1 -1
  108. package/dist/produce/index.d.cts +4 -4
  109. package/dist/produce/index.d.ts +4 -4
  110. package/dist/review/index.cjs +32 -22
  111. package/dist/review/index.cjs.map +1 -1
  112. package/dist/review/index.d.cts +2 -2
  113. package/dist/review/index.d.ts +2 -2
  114. package/dist/review/index.mjs +32 -22
  115. package/dist/review/index.mjs.map +1 -1
  116. package/dist/sigh/index.d.cts +4 -4
  117. package/dist/sigh/index.d.ts +4 -4
  118. package/dist/snapshot/index.d.cts +1 -1
  119. package/dist/snapshot/index.d.ts +1 -1
  120. package/dist/trainer/index.d.cts +1 -1
  121. package/dist/trainer/index.d.ts +1 -1
  122. package/dist/xcode/index.d.cts +1 -1
  123. package/dist/xcode/index.d.ts +1 -1
  124. package/package.json +2 -2
  125. package/dist/index-CXJlvmB4.d.cts +0 -63
  126. package/dist/index-CXJlvmB4.d.ts +0 -63
@@ -1,7 +1,7 @@
1
1
  import { Command } from 'commander';
2
- import { A as AppStoreConnectClient } from '../index-CpGV1f0L.cjs';
3
- import '../enums-yXNVh3UI.cjs';
4
- import '../apple-session-jUzBrql5.cjs';
2
+ import { A as AppStoreConnectClient } from '../index-HWWl6HEL.cjs';
3
+ import '../enums-BlpayMTx.cjs';
4
+ import '../apple-session-D6x7Jo3D.cjs';
5
5
 
6
6
  declare function resolveClientFromEnv(): Promise<AppStoreConnectClient>;
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { Command } from 'commander';
2
- import { A as AppStoreConnectClient } from '../index-CemR3UI9.js';
3
- import '../enums-yXNVh3UI.js';
4
- import '../apple-session-jUzBrql5.js';
2
+ import { A as AppStoreConnectClient } from '../index-SyCMBpNN.js';
3
+ import '../enums-BlpayMTx.js';
4
+ import '../apple-session-D6x7Jo3D.js';
5
5
 
6
6
  declare function resolveClientFromEnv(): Promise<AppStoreConnectClient>;
7
7
 
@@ -7812,6 +7812,7 @@ var init_iris = __esm({
7812
7812
  session;
7813
7813
  cookieStr;
7814
7814
  buildHeaders() {
7815
+ this.cookieStr = Object.entries(this.session.cookies).map(([k, v]) => `${k}=${v}`).join("; ");
7815
7816
  return {
7816
7817
  Cookie: this.cookieStr,
7817
7818
  Accept: "application/vnd.api+json, application/json, text/plain, */*",
@@ -9428,6 +9429,41 @@ var init_options = __esm({
9428
9429
  }
9429
9430
  });
9430
9431
 
9432
+ // src/client/providers.ts
9433
+ function cookieHeader(session) {
9434
+ return Object.entries(session.cookies).map(([k, v]) => `${k}=${v}`).join("; ");
9435
+ }
9436
+ function absorbCookies(session, res) {
9437
+ for (const raw of res.headers.getSetCookie?.() ?? []) {
9438
+ const m = raw.match(/^([^=]+)=([^;]*)/);
9439
+ if (m) session.cookies[m[1]] = m[2];
9440
+ }
9441
+ }
9442
+ async function listProviders(session) {
9443
+ const res = await fetch(OLYMPUS_SESSION3, { headers: { Cookie: cookieHeader(session), Accept: "application/json" } });
9444
+ absorbCookies(session, res);
9445
+ const info = await res.json().catch(() => null);
9446
+ const pick = (p) => p?.providerId != null ? { providerId: Number(p.providerId), name: String(p.name ?? p.providerId) } : null;
9447
+ const providers = (info?.availableProviders ?? []).map(pick).filter((p) => !!p);
9448
+ return { current: pick(info?.provider), providers };
9449
+ }
9450
+ async function switchProvider(session, providerId) {
9451
+ const res = await fetch(OLYMPUS_SESSION3, {
9452
+ method: "POST",
9453
+ headers: { Cookie: cookieHeader(session), "Content-Type": "application/json", Accept: "application/json" },
9454
+ body: JSON.stringify({ provider: { providerId } })
9455
+ });
9456
+ absorbCookies(session, res);
9457
+ if (res.ok) session.teamId = String(providerId);
9458
+ return res.ok;
9459
+ }
9460
+ var OLYMPUS_SESSION3;
9461
+ var init_providers = __esm({
9462
+ "src/client/providers.ts"() {
9463
+ OLYMPUS_SESSION3 = "https://appstoreconnect.apple.com/olympus/v1/session";
9464
+ }
9465
+ });
9466
+
9431
9467
  // src/privacy/index.ts
9432
9468
  var privacy_exports = {};
9433
9469
  __export(privacy_exports, {
@@ -9463,15 +9499,6 @@ async function iris(session, method, path, body) {
9463
9499
  }
9464
9500
  return { status: res.status, body: parsed, text };
9465
9501
  }
9466
- function cookieHeader(session) {
9467
- return Object.entries(session.cookies).map(([k, v]) => `${k}=${v}`).join("; ");
9468
- }
9469
- function absorbCookies(session, res) {
9470
- for (const raw of res.headers.getSetCookie?.() ?? []) {
9471
- const m = raw.match(/^([^=]+)=([^;]*)/);
9472
- if (m) session.cookies[m[1]] = m[2];
9473
- }
9474
- }
9475
9502
  function fail(what, r) {
9476
9503
  const detail = r.body?.errors?.map((e) => e.detail ?? e.title).join("; ") || r.text.slice(0, 300);
9477
9504
  throw new Error(`${what} failed (HTTP ${r.status}): ${detail}`);
@@ -9479,20 +9506,10 @@ function fail(what, r) {
9479
9506
  async function selectProviderForApp(session, appId, onLog) {
9480
9507
  const owns = async () => (await iris(session, "GET", `/apps/${appId}?fields[apps]=name`)).status === 200;
9481
9508
  if (await owns()) return;
9482
- const res = await fetch(OLYMPUS_SESSION3, { headers: { Cookie: cookieHeader(session), Accept: "application/json" } });
9483
- absorbCookies(session, res);
9484
- const info = await res.json().catch(() => null);
9485
- const providers = info?.availableProviders ?? [];
9509
+ const { providers } = await listProviders(session);
9486
9510
  for (const p of providers) {
9487
- const sw = await fetch(OLYMPUS_SESSION3, {
9488
- method: "POST",
9489
- headers: { Cookie: cookieHeader(session), "Content-Type": "application/json", Accept: "application/json" },
9490
- body: JSON.stringify({ provider: { providerId: p.providerId } })
9491
- });
9492
- absorbCookies(session, sw);
9493
- if (sw.ok && await owns()) {
9511
+ if (await switchProvider(session, p.providerId) && await owns()) {
9494
9512
  onLog?.(`Switched to team "${p.name}"`);
9495
- session.teamId = String(p.providerId);
9496
9513
  return;
9497
9514
  }
9498
9515
  }
@@ -9583,11 +9600,11 @@ function validateUsages(usages) {
9583
9600
  if (linked && unlinked) throw new Error(`${u.category} cannot be both linked and not linked to the user.`);
9584
9601
  }
9585
9602
  }
9586
- var IRIS_BASE2, OLYMPUS_SESSION3, DATA_USAGE_CATEGORIES, DATA_USAGE_PURPOSES, DATA_PROTECTIONS;
9603
+ var IRIS_BASE2, DATA_USAGE_CATEGORIES, DATA_USAGE_PURPOSES, DATA_PROTECTIONS;
9587
9604
  var init_privacy = __esm({
9588
9605
  "src/privacy/index.ts"() {
9606
+ init_providers();
9589
9607
  IRIS_BASE2 = "https://appstoreconnect.apple.com/iris/v1";
9590
- OLYMPUS_SESSION3 = "https://appstoreconnect.apple.com/olympus/v1/session";
9591
9608
  DATA_USAGE_CATEGORIES = [
9592
9609
  "PAYMENT_INFORMATION",
9593
9610
  "CREDIT_AND_FRAUD",