@sitepong/fastnode 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +58 -1
  2. package/dist/actions/index.cjs +891 -72
  3. package/dist/actions/index.cjs.map +1 -1
  4. package/dist/actions/index.mjs +892 -73
  5. package/dist/actions/index.mjs.map +1 -1
  6. package/dist/apple-session-jUzBrql5.d.cts +122 -0
  7. package/dist/apple-session-jUzBrql5.d.ts +122 -0
  8. package/dist/cert/index.cjs +17868 -24
  9. package/dist/cert/index.cjs.map +1 -1
  10. package/dist/cert/index.d.cts +5 -4
  11. package/dist/cert/index.d.ts +5 -4
  12. package/dist/cert/index.mjs +17853 -7
  13. package/dist/cert/index.mjs.map +1 -1
  14. package/dist/{cert-e5GAgAPb.d.ts → cert-RvXmdMke.d.ts} +2 -2
  15. package/dist/{cert-uLLdb5a7.d.cts → cert-eOoxGMN1.d.cts} +2 -2
  16. package/dist/cli/index.cjs +1364 -78
  17. package/dist/cli/index.cjs.map +1 -1
  18. package/dist/cli/index.d.cts +3 -2
  19. package/dist/cli/index.d.ts +3 -2
  20. package/dist/cli/index.mjs +1365 -79
  21. package/dist/cli/index.mjs.map +1 -1
  22. package/dist/client/index.cjs +480 -31
  23. package/dist/client/index.cjs.map +1 -1
  24. package/dist/client/index.d.cts +3 -2
  25. package/dist/client/index.d.ts +3 -2
  26. package/dist/client/index.mjs +480 -31
  27. package/dist/client/index.mjs.map +1 -1
  28. package/dist/deliver/index.cjs +334 -13
  29. package/dist/deliver/index.cjs.map +1 -1
  30. package/dist/deliver/index.d.cts +4 -3
  31. package/dist/deliver/index.d.ts +4 -3
  32. package/dist/deliver/index.mjs +330 -15
  33. package/dist/deliver/index.mjs.map +1 -1
  34. package/dist/{enums-B609j2rb.d.cts → enums-yXNVh3UI.d.cts} +8 -1
  35. package/dist/{enums-B609j2rb.d.ts → enums-yXNVh3UI.d.ts} +8 -1
  36. package/dist/gradle/index.cjs +222 -0
  37. package/dist/gradle/index.cjs.map +1 -0
  38. package/dist/gradle/index.d.cts +1 -0
  39. package/dist/gradle/index.d.ts +1 -0
  40. package/dist/gradle/index.mjs +217 -0
  41. package/dist/gradle/index.mjs.map +1 -0
  42. package/dist/gym/index.d.cts +2 -2
  43. package/dist/gym/index.d.ts +2 -2
  44. package/dist/index-8djTPW8O.d.ts +104 -0
  45. package/dist/{index-DrUpRXRG.d.cts → index-B6-MJpO4.d.cts} +1 -1
  46. package/dist/{index-Clyf4-lu.d.cts → index-BE7bwNff.d.cts} +1 -1
  47. package/dist/index-BGhV0gS-.d.ts +65 -0
  48. package/dist/index-BaNcf7jt.d.cts +201 -0
  49. package/dist/{index-Di4Ic0EE.d.ts → index-BvyZ4uiw.d.ts} +3 -3
  50. package/dist/{index-CEldrbyz.d.ts → index-C01Rkrir.d.ts} +2 -2
  51. package/dist/{index-jeI44Q5G.d.ts → index-C9mHBJED.d.ts} +1 -1
  52. package/dist/{index-BgHagzj1.d.cts → index-CAEiXVWd.d.ts} +9 -1
  53. package/dist/index-CBf0-NUQ.d.ts +201 -0
  54. package/dist/index-CXJlvmB4.d.cts +63 -0
  55. package/dist/index-CXJlvmB4.d.ts +63 -0
  56. package/dist/{index-BNP7Bpu5.d.ts → index-D1GHEM3c.d.ts} +32 -3
  57. package/dist/index-DFstwgGK.d.cts +65 -0
  58. package/dist/{index-DrCOh0Vh.d.cts → index-DGkgRnZp.d.cts} +2 -2
  59. package/dist/{index-CtydPNxA.d.cts → index-DLJso7Vs.d.cts} +32 -3
  60. package/dist/{index-BN0iWhuw.d.cts → index-DWOLZNlz.d.cts} +2 -2
  61. package/dist/{index-BjkOUQcQ.d.cts → index-DfkIz7i0.d.cts} +18 -4
  62. package/dist/{index-EKU_G1G5.d.ts → index-DjC_gmnL.d.ts} +18 -4
  63. package/dist/index-DnHQ2uT2.d.cts +104 -0
  64. package/dist/{index-CdfgEZwh.d.cts → index-DrmS802s.d.cts} +356 -130
  65. package/dist/index-Dv-Mek07.d.cts +84 -0
  66. package/dist/index-Dv-Mek07.d.ts +84 -0
  67. package/dist/{index-DHxi-QPC.d.cts → index-icIH5e5V.d.cts} +3 -3
  68. package/dist/{index-mddpvrRX.d.ts → index-laE3_wm9.d.cts} +9 -1
  69. package/dist/{index-BwwpAlk2.d.ts → index-lsuS2R1T.d.ts} +356 -130
  70. package/dist/{index-DImN9PWc.d.ts → index-mEEB7An6.d.ts} +1 -1
  71. package/dist/{index-C2YLoFVl.d.ts → index-rTZOdMRE.d.ts} +2 -2
  72. package/dist/index.cjs +20496 -217
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.d.cts +278 -22
  75. package/dist/index.d.ts +278 -22
  76. package/dist/index.mjs +20489 -220
  77. package/dist/index.mjs.map +1 -1
  78. package/dist/lane/index.cjs +891 -72
  79. package/dist/lane/index.cjs.map +1 -1
  80. package/dist/lane/index.mjs +892 -73
  81. package/dist/lane/index.mjs.map +1 -1
  82. package/dist/match/index.d.cts +6 -5
  83. package/dist/match/index.d.ts +6 -5
  84. package/dist/pem/index.d.cts +4 -3
  85. package/dist/pem/index.d.ts +4 -3
  86. package/dist/pilot/index.cjs +8 -4
  87. package/dist/pilot/index.cjs.map +1 -1
  88. package/dist/pilot/index.d.cts +4 -3
  89. package/dist/pilot/index.d.ts +4 -3
  90. package/dist/pilot/index.mjs +10 -6
  91. package/dist/pilot/index.mjs.map +1 -1
  92. package/dist/playstore/index.cjs +207 -0
  93. package/dist/playstore/index.cjs.map +1 -0
  94. package/dist/playstore/index.d.cts +1 -0
  95. package/dist/playstore/index.d.ts +1 -0
  96. package/dist/playstore/index.mjs +203 -0
  97. package/dist/playstore/index.mjs.map +1 -0
  98. package/dist/precheck/index.d.cts +4 -3
  99. package/dist/precheck/index.d.ts +4 -3
  100. package/dist/privacy/index.cjs +207 -0
  101. package/dist/privacy/index.cjs.map +1 -0
  102. package/dist/privacy/index.d.cts +2 -0
  103. package/dist/privacy/index.d.ts +2 -0
  104. package/dist/privacy/index.mjs +195 -0
  105. package/dist/privacy/index.mjs.map +1 -0
  106. package/dist/produce/index.cjs +38 -18
  107. package/dist/produce/index.cjs.map +1 -1
  108. package/dist/produce/index.d.cts +4 -3
  109. package/dist/produce/index.d.ts +4 -3
  110. package/dist/produce/index.mjs +38 -19
  111. package/dist/produce/index.mjs.map +1 -1
  112. package/dist/review/index.cjs +141 -0
  113. package/dist/review/index.cjs.map +1 -0
  114. package/dist/review/index.d.cts +2 -0
  115. package/dist/review/index.d.ts +2 -0
  116. package/dist/review/index.mjs +137 -0
  117. package/dist/review/index.mjs.map +1 -0
  118. package/dist/sigh/index.d.cts +4 -3
  119. package/dist/sigh/index.d.ts +4 -3
  120. package/dist/xcode/index.cjs +1 -1
  121. package/dist/xcode/index.cjs.map +1 -1
  122. package/dist/xcode/index.mjs +1 -1
  123. package/dist/xcode/index.mjs.map +1 -1
  124. package/package.json +27 -1
  125. package/dist/index-BbY_H_f6.d.ts +0 -99
  126. package/dist/index-XsMsVc3O.d.cts +0 -99
@@ -0,0 +1,122 @@
1
+ interface AppleSessionConfig {
2
+ email: string;
3
+ password: string;
4
+ onLog?: (msg: string) => void;
5
+ onPrompt?: (msg: string) => Promise<string>;
6
+ }
7
+ interface ContractMessage {
8
+ id: string;
9
+ group: string;
10
+ subject: string;
11
+ message: string;
12
+ }
13
+ interface AppleSession {
14
+ cookies: Record<string, string>;
15
+ sessionId: string;
16
+ scnt: string;
17
+ serviceKey: string;
18
+ userEmail: string;
19
+ teamId?: string;
20
+ pendingAgreements: ContractMessage[];
21
+ }
22
+ /**
23
+ * State held between beginLogin() and submitTwoFactorCode() — captures
24
+ * everything needed to resume an in-progress 2FA flow across HTTP requests.
25
+ * Stored server-side keyed by an opaque session id; never sent to the
26
+ * browser (the browser only sees the opaque id).
27
+ */
28
+ interface PendingLogin {
29
+ cookies: Record<string, string>;
30
+ sessionId: string;
31
+ scnt: string;
32
+ serviceKey: string;
33
+ userEmail: string;
34
+ }
35
+ /**
36
+ * Description of the 2FA challenge presented to the user.
37
+ *
38
+ * Modern 2FA accounts (the default for everyone) have `kind: "device"` —
39
+ * Apple pushes the 6-digit code to all the user's trusted Apple devices
40
+ * (iPhone, Mac, etc.) and the user types it into our wizard. The legacy
41
+ * `trustedDevices` field is empty in this case; that field only ever
42
+ * populates for old "two-step verification" accounts which are
43
+ * essentially extinct.
44
+ *
45
+ * `kind: "phone_only"` is reserved for accounts that have no real Apple
46
+ * devices (Apple's `noTrustedDevices === true` flag) — those accounts
47
+ * must use SMS to a trusted phone number.
48
+ *
49
+ * Either way, the user can opt to receive the code via SMS instead by
50
+ * picking from `trustedPhoneNumbers` and calling requestSmsCode().
51
+ */
52
+ interface TwoFactorChallenge {
53
+ kind: "device" | "phone_only";
54
+ codeLength: number;
55
+ trustedPhoneNumbers: {
56
+ id: number;
57
+ numberWithDialCode: string;
58
+ pushMode?: string;
59
+ }[];
60
+ }
61
+ type BeginLoginResult = {
62
+ kind: "logged_in";
63
+ session: AppleSession;
64
+ } | {
65
+ kind: "needs_2fa";
66
+ pending: PendingLogin;
67
+ challenge: TwoFactorChallenge;
68
+ };
69
+ /** Thrown when an Apple Developer Program agreement needs to be accepted */
70
+ declare class ProgramLicenseAgreementError extends Error {
71
+ agreements: ContractMessage[];
72
+ constructor(message: string, agreements: ContractMessage[]);
73
+ }
74
+ /**
75
+ * Check a portal API response for agreement/license errors.
76
+ * Throws ProgramLicenseAgreementError if detected.
77
+ * Call this after any portal API call. Mirrors Spaceship::Client#handle_itc_response.
78
+ */
79
+ declare function checkPortalResponse(body: any, session?: AppleSession): void;
80
+ /**
81
+ * Step 1 of HTTP-resumable login: do the SIRP exchange and detect whether
82
+ * 2FA is required. Returns either a fully-established session (no 2FA) or
83
+ * a pending state + a description of the 2FA challenge.
84
+ */
85
+ declare function beginLogin(config: {
86
+ email: string;
87
+ password: string;
88
+ onLog?: (msg: string) => void;
89
+ }): Promise<BeginLoginResult>;
90
+ /**
91
+ * Ask Apple to send an SMS / voice code to the chosen trusted phone.
92
+ * Used by the wizard's "Send code via text instead" affordance.
93
+ */
94
+ declare function requestSmsCode(input: {
95
+ pending: PendingLogin;
96
+ phoneId: number;
97
+ mode?: "sms" | "voice";
98
+ }): Promise<void>;
99
+ /**
100
+ * Step 2 of HTTP-resumable login: submit the 2FA code the user typed.
101
+ * Returns a fully-established AppleSession on success.
102
+ *
103
+ * source = "device" → 4-digit code from a trusted Apple device
104
+ * source = "phone" → 6-digit code from SMS / push to trusted phone
105
+ */
106
+ declare function submitTwoFactorCode(rawInput: {
107
+ pending: PendingLogin;
108
+ code: string;
109
+ source: "device" | "phone";
110
+ phoneId?: number;
111
+ mode?: "sms" | "voice";
112
+ onLog?: (msg: string) => void;
113
+ }): Promise<AppleSession>;
114
+ /**
115
+ * Backward-compatible CLI-style login. Internally uses beginLogin +
116
+ * submitTwoFactorCode but routes 2FA through the synchronous onPrompt
117
+ * callback so existing scripts (test-login.ts, test-full-workflow.ts)
118
+ * keep working.
119
+ */
120
+ declare function loginWithAppleId(config: AppleSessionConfig): Promise<AppleSession>;
121
+
122
+ export { type AppleSession as A, type BeginLoginResult as B, type ContractMessage as C, ProgramLicenseAgreementError as P, type TwoFactorChallenge as T, type AppleSessionConfig as a, beginLogin as b, checkPortalResponse as c, type PendingLogin as d, loginWithAppleId as l, requestSmsCode as r, submitTwoFactorCode as s };
@@ -0,0 +1,122 @@
1
+ interface AppleSessionConfig {
2
+ email: string;
3
+ password: string;
4
+ onLog?: (msg: string) => void;
5
+ onPrompt?: (msg: string) => Promise<string>;
6
+ }
7
+ interface ContractMessage {
8
+ id: string;
9
+ group: string;
10
+ subject: string;
11
+ message: string;
12
+ }
13
+ interface AppleSession {
14
+ cookies: Record<string, string>;
15
+ sessionId: string;
16
+ scnt: string;
17
+ serviceKey: string;
18
+ userEmail: string;
19
+ teamId?: string;
20
+ pendingAgreements: ContractMessage[];
21
+ }
22
+ /**
23
+ * State held between beginLogin() and submitTwoFactorCode() — captures
24
+ * everything needed to resume an in-progress 2FA flow across HTTP requests.
25
+ * Stored server-side keyed by an opaque session id; never sent to the
26
+ * browser (the browser only sees the opaque id).
27
+ */
28
+ interface PendingLogin {
29
+ cookies: Record<string, string>;
30
+ sessionId: string;
31
+ scnt: string;
32
+ serviceKey: string;
33
+ userEmail: string;
34
+ }
35
+ /**
36
+ * Description of the 2FA challenge presented to the user.
37
+ *
38
+ * Modern 2FA accounts (the default for everyone) have `kind: "device"` —
39
+ * Apple pushes the 6-digit code to all the user's trusted Apple devices
40
+ * (iPhone, Mac, etc.) and the user types it into our wizard. The legacy
41
+ * `trustedDevices` field is empty in this case; that field only ever
42
+ * populates for old "two-step verification" accounts which are
43
+ * essentially extinct.
44
+ *
45
+ * `kind: "phone_only"` is reserved for accounts that have no real Apple
46
+ * devices (Apple's `noTrustedDevices === true` flag) — those accounts
47
+ * must use SMS to a trusted phone number.
48
+ *
49
+ * Either way, the user can opt to receive the code via SMS instead by
50
+ * picking from `trustedPhoneNumbers` and calling requestSmsCode().
51
+ */
52
+ interface TwoFactorChallenge {
53
+ kind: "device" | "phone_only";
54
+ codeLength: number;
55
+ trustedPhoneNumbers: {
56
+ id: number;
57
+ numberWithDialCode: string;
58
+ pushMode?: string;
59
+ }[];
60
+ }
61
+ type BeginLoginResult = {
62
+ kind: "logged_in";
63
+ session: AppleSession;
64
+ } | {
65
+ kind: "needs_2fa";
66
+ pending: PendingLogin;
67
+ challenge: TwoFactorChallenge;
68
+ };
69
+ /** Thrown when an Apple Developer Program agreement needs to be accepted */
70
+ declare class ProgramLicenseAgreementError extends Error {
71
+ agreements: ContractMessage[];
72
+ constructor(message: string, agreements: ContractMessage[]);
73
+ }
74
+ /**
75
+ * Check a portal API response for agreement/license errors.
76
+ * Throws ProgramLicenseAgreementError if detected.
77
+ * Call this after any portal API call. Mirrors Spaceship::Client#handle_itc_response.
78
+ */
79
+ declare function checkPortalResponse(body: any, session?: AppleSession): void;
80
+ /**
81
+ * Step 1 of HTTP-resumable login: do the SIRP exchange and detect whether
82
+ * 2FA is required. Returns either a fully-established session (no 2FA) or
83
+ * a pending state + a description of the 2FA challenge.
84
+ */
85
+ declare function beginLogin(config: {
86
+ email: string;
87
+ password: string;
88
+ onLog?: (msg: string) => void;
89
+ }): Promise<BeginLoginResult>;
90
+ /**
91
+ * Ask Apple to send an SMS / voice code to the chosen trusted phone.
92
+ * Used by the wizard's "Send code via text instead" affordance.
93
+ */
94
+ declare function requestSmsCode(input: {
95
+ pending: PendingLogin;
96
+ phoneId: number;
97
+ mode?: "sms" | "voice";
98
+ }): Promise<void>;
99
+ /**
100
+ * Step 2 of HTTP-resumable login: submit the 2FA code the user typed.
101
+ * Returns a fully-established AppleSession on success.
102
+ *
103
+ * source = "device" → 4-digit code from a trusted Apple device
104
+ * source = "phone" → 6-digit code from SMS / push to trusted phone
105
+ */
106
+ declare function submitTwoFactorCode(rawInput: {
107
+ pending: PendingLogin;
108
+ code: string;
109
+ source: "device" | "phone";
110
+ phoneId?: number;
111
+ mode?: "sms" | "voice";
112
+ onLog?: (msg: string) => void;
113
+ }): Promise<AppleSession>;
114
+ /**
115
+ * Backward-compatible CLI-style login. Internally uses beginLogin +
116
+ * submitTwoFactorCode but routes 2FA through the synchronous onPrompt
117
+ * callback so existing scripts (test-login.ts, test-full-workflow.ts)
118
+ * keep working.
119
+ */
120
+ declare function loginWithAppleId(config: AppleSessionConfig): Promise<AppleSession>;
121
+
122
+ export { type AppleSession as A, type BeginLoginResult as B, type ContractMessage as C, ProgramLicenseAgreementError as P, type TwoFactorChallenge as T, type AppleSessionConfig as a, beginLogin as b, checkPortalResponse as c, type PendingLogin as d, loginWithAppleId as l, requestSmsCode as r, submitTwoFactorCode as s };