@sitepong/fastnode 0.3.0 → 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.
- package/README.md +6 -0
- package/dist/actions/index.cjs +81 -0
- package/dist/actions/index.cjs.map +1 -1
- package/dist/actions/index.mjs +82 -1
- package/dist/actions/index.mjs.map +1 -1
- package/dist/{apple-session-jUzBrql5.d.cts → apple-session-D6x7Jo3D.d.cts} +1 -1
- package/dist/{apple-session-jUzBrql5.d.ts → apple-session-D6x7Jo3D.d.ts} +1 -1
- package/dist/cert/index.cjs +92 -51
- package/dist/cert/index.cjs.map +1 -1
- package/dist/cert/index.d.cts +5 -5
- package/dist/cert/index.d.ts +5 -5
- package/dist/cert/index.mjs +92 -51
- package/dist/cert/index.mjs.map +1 -1
- package/dist/{cert-RvXmdMke.d.ts → cert-C-yRB-sO.d.ts} +2 -2
- package/dist/{cert-eOoxGMN1.d.cts → cert-C4hhKH1n.d.cts} +2 -2
- package/dist/cli/index.cjs +151 -47
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +3 -3
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.mjs +152 -48
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/index.cjs +77 -0
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.mjs +72 -1
- package/dist/client/index.mjs.map +1 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/deliver/index.d.cts +4 -4
- package/dist/deliver/index.d.ts +4 -4
- package/dist/{enums-yXNVh3UI.d.cts → enums-BlpayMTx.d.cts} +1 -1
- package/dist/{enums-yXNVh3UI.d.ts → enums-BlpayMTx.d.ts} +1 -1
- package/dist/frameit/index.d.cts +1 -1
- package/dist/frameit/index.d.ts +1 -1
- package/dist/gradle/index.d.cts +1 -1
- package/dist/gradle/index.d.ts +1 -1
- package/dist/gym/index.d.cts +2 -2
- package/dist/gym/index.d.ts +2 -2
- package/dist/{index-DnHQ2uT2.d.cts → index-258t9n7v.d.cts} +2 -2
- package/dist/{index-BvyZ4uiw.d.ts → index-6LKy36sE.d.ts} +4 -4
- package/dist/{index-icIH5e5V.d.cts → index-B74vgav6.d.cts} +4 -4
- package/dist/{index-BoU8qt8r.d.cts → index-B7ERdhh8.d.cts} +1 -1
- package/dist/{index-BoU8qt8r.d.ts → index-B7ERdhh8.d.ts} +1 -1
- package/dist/{index-laE3_wm9.d.cts → index-BIRpj0f2.d.cts} +2 -2
- package/dist/{index-CBf0-NUQ.d.ts → index-BJLHWMwL.d.ts} +3 -3
- package/dist/{index-mEEB7An6.d.ts → index-B_D_01oz.d.ts} +1 -1
- package/dist/{index-D1GHEM3c.d.ts → index-Ba1jHQYg.d.ts} +1 -1
- package/dist/{index-DGkgRnZp.d.cts → index-BawZaGqD.d.cts} +3 -3
- package/dist/{index-8djTPW8O.d.ts → index-BmrOdmNL.d.ts} +2 -2
- package/dist/{index-DjC_gmnL.d.ts → index-C8L03MBu.d.ts} +3 -3
- package/dist/{index-Cp6cjtd-.d.ts → index-CHLDQweM.d.cts} +1 -1
- package/dist/{index-Cp6cjtd-.d.cts → index-CHLDQweM.d.ts} +1 -1
- package/dist/{index-B6-MJpO4.d.cts → index-CRFfLsEG.d.cts} +1 -1
- package/dist/{index-CAEiXVWd.d.ts → index-CV6KnSy1.d.ts} +2 -2
- package/dist/index-CX2hUvvG.d.cts +287 -0
- package/dist/index-CX2hUvvG.d.ts +287 -0
- package/dist/{index-C9mHBJED.d.ts → index-ClhWjR7a.d.ts} +2 -2
- package/dist/{index-BGhV0gS-.d.ts → index-Cq-xo-9x.d.ts} +2 -2
- package/dist/{index-CR3BFPIz.d.ts → index-Cw7ojUY5.d.cts} +1 -1
- package/dist/{index-CR3BFPIz.d.cts → index-Cw7ojUY5.d.ts} +1 -1
- package/dist/{index-C2yG3wXA.d.cts → index-CwD7lG0y.d.cts} +1 -1
- package/dist/{index-C2yG3wXA.d.ts → index-CwD7lG0y.d.ts} +1 -1
- package/dist/{index-DLJso7Vs.d.cts → index-CxrqhkVF.d.cts} +1 -1
- package/dist/{index-BE7bwNff.d.cts → index-D3zyYCYs.d.cts} +2 -2
- package/dist/{index-BaNcf7jt.d.cts → index-DCrSWVMb.d.cts} +3 -3
- package/dist/{index-rTZOdMRE.d.ts → index-DP2f5ZsS.d.ts} +3 -3
- package/dist/{index-DfkIz7i0.d.cts → index-DRjXV9ej.d.cts} +3 -3
- package/dist/{index-Dv-Mek07.d.ts → index-DSXBQeur.d.cts} +1 -1
- package/dist/{index-Dv-Mek07.d.cts → index-DSXBQeur.d.ts} +1 -1
- package/dist/{index-BYonklf3.d.cts → index-Dvi-3DSM.d.cts} +1 -1
- package/dist/{index-BYonklf3.d.ts → index-Dvi-3DSM.d.ts} +1 -1
- package/dist/{index-C01Rkrir.d.ts → index-Dy8EWOnt.d.ts} +2 -2
- package/dist/{index-DrmS802s.d.cts → index-HWWl6HEL.d.cts} +34 -3
- package/dist/{index-DWOLZNlz.d.cts → index-QYgreJV3.d.cts} +2 -2
- package/dist/{index-lsuS2R1T.d.ts → index-SyCMBpNN.d.ts} +34 -3
- package/dist/{index-DFstwgGK.d.cts → index-yro2MWgt.d.cts} +2 -2
- package/dist/index.cjs +1543 -964
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/index.mjs +1544 -965
- package/dist/index.mjs.map +1 -1
- package/dist/lane/index.cjs +81 -0
- package/dist/lane/index.cjs.map +1 -1
- package/dist/lane/index.mjs +82 -1
- package/dist/lane/index.mjs.map +1 -1
- package/dist/match/index.d.cts +6 -6
- package/dist/match/index.d.ts +6 -6
- package/dist/match/index.mjs +1 -1
- package/dist/pem/index.d.cts +4 -4
- package/dist/pem/index.d.ts +4 -4
- package/dist/pilot/index.d.cts +4 -4
- package/dist/pilot/index.d.ts +4 -4
- package/dist/playstore/index.cjs +18208 -1
- package/dist/playstore/index.cjs.map +1 -1
- package/dist/playstore/index.d.cts +1 -1
- package/dist/playstore/index.d.ts +1 -1
- package/dist/playstore/index.mjs +18196 -2
- package/dist/playstore/index.mjs.map +1 -1
- package/dist/precheck/index.d.cts +4 -4
- package/dist/precheck/index.d.ts +4 -4
- package/dist/privacy/index.cjs +32 -22
- package/dist/privacy/index.cjs.map +1 -1
- package/dist/privacy/index.d.cts +2 -2
- package/dist/privacy/index.d.ts +2 -2
- package/dist/privacy/index.mjs +32 -22
- package/dist/privacy/index.mjs.map +1 -1
- package/dist/produce/index.d.cts +4 -4
- package/dist/produce/index.d.ts +4 -4
- package/dist/review/index.cjs +32 -22
- package/dist/review/index.cjs.map +1 -1
- package/dist/review/index.d.cts +2 -2
- package/dist/review/index.d.ts +2 -2
- package/dist/review/index.mjs +32 -22
- package/dist/review/index.mjs.map +1 -1
- package/dist/sigh/index.d.cts +4 -4
- package/dist/sigh/index.d.ts +4 -4
- package/dist/snapshot/index.d.cts +1 -1
- package/dist/snapshot/index.d.ts +1 -1
- package/dist/trainer/index.d.cts +1 -1
- package/dist/trainer/index.d.ts +1 -1
- package/dist/xcode/index.d.cts +1 -1
- package/dist/xcode/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/index-CXJlvmB4.d.cts +0 -63
- package/dist/index-CXJlvmB4.d.ts +0 -63
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AppStoreConnectClient,
|
|
2
|
-
import {
|
|
1
|
+
import { A as AppStoreConnectClient, M as Certificate } from './index-SyCMBpNN.js';
|
|
2
|
+
import { l as CertificateType } from './enums-BlpayMTx.js';
|
|
3
3
|
|
|
4
4
|
interface CertOptions {
|
|
5
5
|
client: AppStoreConnectClient;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AppStoreConnectClient,
|
|
2
|
-
import {
|
|
1
|
+
import { A as AppStoreConnectClient, M as Certificate } from './index-HWWl6HEL.cjs';
|
|
2
|
+
import { l as CertificateType } from './enums-BlpayMTx.cjs';
|
|
3
3
|
|
|
4
4
|
interface CertOptions {
|
|
5
5
|
client: AppStoreConnectClient;
|
package/dist/cli/index.cjs
CHANGED
|
@@ -1780,20 +1780,6 @@ var init_srp = __esm({
|
|
|
1780
1780
|
};
|
|
1781
1781
|
}
|
|
1782
1782
|
});
|
|
1783
|
-
|
|
1784
|
-
// src/client/apple-session.ts
|
|
1785
|
-
var apple_session_exports = {};
|
|
1786
|
-
__export(apple_session_exports, {
|
|
1787
|
-
ProgramLicenseAgreementError: () => ProgramLicenseAgreementError,
|
|
1788
|
-
appleJson: () => appleJson,
|
|
1789
|
-
beginLogin: () => beginLogin,
|
|
1790
|
-
checkPortalResponse: () => checkPortalResponse,
|
|
1791
|
-
fetchServiceKey: () => fetchServiceKey,
|
|
1792
|
-
loginWithAppleId: () => loginWithAppleId,
|
|
1793
|
-
requestSmsCode: () => requestSmsCode,
|
|
1794
|
-
serviceKeyFromLocation: () => serviceKeyFromLocation,
|
|
1795
|
-
submitTwoFactorCode: () => submitTwoFactorCode
|
|
1796
|
-
});
|
|
1797
1783
|
async function appleJson(res, what) {
|
|
1798
1784
|
const text = await res.text();
|
|
1799
1785
|
try {
|
|
@@ -7000,6 +6986,90 @@ var init_app_asset_library_placements = __esm({
|
|
|
7000
6986
|
}
|
|
7001
6987
|
});
|
|
7002
6988
|
|
|
6989
|
+
// src/client/session-store.ts
|
|
6990
|
+
var session_store_exports = {};
|
|
6991
|
+
__export(session_store_exports, {
|
|
6992
|
+
clearAppleSession: () => clearAppleSession,
|
|
6993
|
+
lastAppleId: () => lastAppleId,
|
|
6994
|
+
loadAppleSession: () => loadAppleSession,
|
|
6995
|
+
saveAppleSession: () => saveAppleSession,
|
|
6996
|
+
sessionDir: () => sessionDir,
|
|
6997
|
+
signInWithAppleId: () => signInWithAppleId
|
|
6998
|
+
});
|
|
6999
|
+
function sessionDir() {
|
|
7000
|
+
return process.env.FASTNODE_SESSION_DIR || path.join(os.homedir(), ".fastnode", "sessions");
|
|
7001
|
+
}
|
|
7002
|
+
function fileFor(email) {
|
|
7003
|
+
const key = crypto.createHash("sha256").update(email.trim().toLowerCase()).digest("hex").slice(0, 16);
|
|
7004
|
+
return path.join(sessionDir(), `${key}.json`);
|
|
7005
|
+
}
|
|
7006
|
+
function ensureDir() {
|
|
7007
|
+
const dir = sessionDir();
|
|
7008
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true, mode: 448 });
|
|
7009
|
+
fs.chmodSync(dir, 448);
|
|
7010
|
+
}
|
|
7011
|
+
function saveAppleSession(session) {
|
|
7012
|
+
ensureDir();
|
|
7013
|
+
const stored = { email: session.userEmail, savedAt: (/* @__PURE__ */ new Date()).toISOString(), session };
|
|
7014
|
+
const path$1 = fileFor(session.userEmail);
|
|
7015
|
+
fs.writeFileSync(path$1, JSON.stringify(stored), { mode: 384 });
|
|
7016
|
+
fs.chmodSync(path$1, 384);
|
|
7017
|
+
fs.writeFileSync(path.join(sessionDir(), "last-apple-id"), session.userEmail, { mode: 384 });
|
|
7018
|
+
}
|
|
7019
|
+
function clearAppleSession(email) {
|
|
7020
|
+
const path = fileFor(email);
|
|
7021
|
+
if (fs.existsSync(path)) fs.unlinkSync(path);
|
|
7022
|
+
}
|
|
7023
|
+
function lastAppleId() {
|
|
7024
|
+
try {
|
|
7025
|
+
return fs.readFileSync(path.join(sessionDir(), "last-apple-id"), "utf8").trim() || null;
|
|
7026
|
+
} catch {
|
|
7027
|
+
return null;
|
|
7028
|
+
}
|
|
7029
|
+
}
|
|
7030
|
+
async function loadAppleSession(email, fetchImpl = fetch) {
|
|
7031
|
+
const path = fileFor(email);
|
|
7032
|
+
if (!fs.existsSync(path)) return null;
|
|
7033
|
+
let stored;
|
|
7034
|
+
try {
|
|
7035
|
+
stored = JSON.parse(fs.readFileSync(path, "utf8"));
|
|
7036
|
+
} catch {
|
|
7037
|
+
return null;
|
|
7038
|
+
}
|
|
7039
|
+
const cookie = Object.entries(stored.session.cookies).map(([k, v]) => `${k}=${v}`).join("; ");
|
|
7040
|
+
try {
|
|
7041
|
+
const res = await fetchImpl(OLYMPUS_SESSION2, { headers: { Cookie: cookie, Accept: "application/json" } });
|
|
7042
|
+
if (!res.ok) {
|
|
7043
|
+
clearAppleSession(email);
|
|
7044
|
+
return null;
|
|
7045
|
+
}
|
|
7046
|
+
} catch {
|
|
7047
|
+
return null;
|
|
7048
|
+
}
|
|
7049
|
+
return stored.session;
|
|
7050
|
+
}
|
|
7051
|
+
async function signInWithAppleId(options) {
|
|
7052
|
+
const email = options.email || lastAppleId() || await options.askEmail();
|
|
7053
|
+
if (!options.fresh) {
|
|
7054
|
+
const saved = await loadAppleSession(email);
|
|
7055
|
+
if (saved) {
|
|
7056
|
+
options.onLog?.(`Using saved Apple ID session for ${email}`);
|
|
7057
|
+
return saved;
|
|
7058
|
+
}
|
|
7059
|
+
}
|
|
7060
|
+
const password = await options.askPassword(email);
|
|
7061
|
+
const session = await loginWithAppleId({ email, password, onLog: options.onLog });
|
|
7062
|
+
saveAppleSession(session);
|
|
7063
|
+
return session;
|
|
7064
|
+
}
|
|
7065
|
+
var OLYMPUS_SESSION2;
|
|
7066
|
+
var init_session_store = __esm({
|
|
7067
|
+
"src/client/session-store.ts"() {
|
|
7068
|
+
init_apple_session();
|
|
7069
|
+
OLYMPUS_SESSION2 = "https://appstoreconnect.apple.com/olympus/v1/session";
|
|
7070
|
+
}
|
|
7071
|
+
});
|
|
7072
|
+
|
|
7003
7073
|
// src/client/portal.ts
|
|
7004
7074
|
function pickUniqueKeyName(base, taken) {
|
|
7005
7075
|
if (!taken.has(base)) return base;
|
|
@@ -7767,6 +7837,7 @@ var init_iris = __esm({
|
|
|
7767
7837
|
session;
|
|
7768
7838
|
cookieStr;
|
|
7769
7839
|
buildHeaders() {
|
|
7840
|
+
this.cookieStr = Object.entries(this.session.cookies).map(([k, v]) => `${k}=${v}`).join("; ");
|
|
7770
7841
|
return {
|
|
7771
7842
|
Cookie: this.cookieStr,
|
|
7772
7843
|
Accept: "application/vnd.api+json, application/json, text/plain, */*",
|
|
@@ -8077,8 +8148,14 @@ __export(client_exports, {
|
|
|
8077
8148
|
TokenManager: () => TokenManager,
|
|
8078
8149
|
beginLogin: () => beginLogin,
|
|
8079
8150
|
checkPortalResponse: () => checkPortalResponse,
|
|
8151
|
+
clearAppleSession: () => clearAppleSession,
|
|
8152
|
+
lastAppleId: () => lastAppleId,
|
|
8153
|
+
loadAppleSession: () => loadAppleSession,
|
|
8080
8154
|
loginWithAppleId: () => loginWithAppleId,
|
|
8081
8155
|
requestSmsCode: () => requestSmsCode,
|
|
8156
|
+
saveAppleSession: () => saveAppleSession,
|
|
8157
|
+
sessionDir: () => sessionDir,
|
|
8158
|
+
signInWithAppleId: () => signInWithAppleId,
|
|
8082
8159
|
submitTwoFactorCode: () => submitTwoFactorCode
|
|
8083
8160
|
});
|
|
8084
8161
|
var AppStoreConnectClient;
|
|
@@ -8126,6 +8203,7 @@ var init_client = __esm({
|
|
|
8126
8203
|
init_auth();
|
|
8127
8204
|
init_request();
|
|
8128
8205
|
init_apple_session();
|
|
8206
|
+
init_session_store();
|
|
8129
8207
|
init_portal();
|
|
8130
8208
|
init_iris();
|
|
8131
8209
|
AppStoreConnectClient = class {
|
|
@@ -9376,6 +9454,41 @@ var init_options = __esm({
|
|
|
9376
9454
|
}
|
|
9377
9455
|
});
|
|
9378
9456
|
|
|
9457
|
+
// src/client/providers.ts
|
|
9458
|
+
function cookieHeader(session) {
|
|
9459
|
+
return Object.entries(session.cookies).map(([k, v]) => `${k}=${v}`).join("; ");
|
|
9460
|
+
}
|
|
9461
|
+
function absorbCookies(session, res) {
|
|
9462
|
+
for (const raw of res.headers.getSetCookie?.() ?? []) {
|
|
9463
|
+
const m = raw.match(/^([^=]+)=([^;]*)/);
|
|
9464
|
+
if (m) session.cookies[m[1]] = m[2];
|
|
9465
|
+
}
|
|
9466
|
+
}
|
|
9467
|
+
async function listProviders(session) {
|
|
9468
|
+
const res = await fetch(OLYMPUS_SESSION3, { headers: { Cookie: cookieHeader(session), Accept: "application/json" } });
|
|
9469
|
+
absorbCookies(session, res);
|
|
9470
|
+
const info = await res.json().catch(() => null);
|
|
9471
|
+
const pick = (p) => p?.providerId != null ? { providerId: Number(p.providerId), name: String(p.name ?? p.providerId) } : null;
|
|
9472
|
+
const providers = (info?.availableProviders ?? []).map(pick).filter((p) => !!p);
|
|
9473
|
+
return { current: pick(info?.provider), providers };
|
|
9474
|
+
}
|
|
9475
|
+
async function switchProvider(session, providerId) {
|
|
9476
|
+
const res = await fetch(OLYMPUS_SESSION3, {
|
|
9477
|
+
method: "POST",
|
|
9478
|
+
headers: { Cookie: cookieHeader(session), "Content-Type": "application/json", Accept: "application/json" },
|
|
9479
|
+
body: JSON.stringify({ provider: { providerId } })
|
|
9480
|
+
});
|
|
9481
|
+
absorbCookies(session, res);
|
|
9482
|
+
if (res.ok) session.teamId = String(providerId);
|
|
9483
|
+
return res.ok;
|
|
9484
|
+
}
|
|
9485
|
+
var OLYMPUS_SESSION3;
|
|
9486
|
+
var init_providers = __esm({
|
|
9487
|
+
"src/client/providers.ts"() {
|
|
9488
|
+
OLYMPUS_SESSION3 = "https://appstoreconnect.apple.com/olympus/v1/session";
|
|
9489
|
+
}
|
|
9490
|
+
});
|
|
9491
|
+
|
|
9379
9492
|
// src/privacy/index.ts
|
|
9380
9493
|
var privacy_exports = {};
|
|
9381
9494
|
__export(privacy_exports, {
|
|
@@ -9411,15 +9524,6 @@ async function iris(session, method, path, body) {
|
|
|
9411
9524
|
}
|
|
9412
9525
|
return { status: res.status, body: parsed, text };
|
|
9413
9526
|
}
|
|
9414
|
-
function cookieHeader(session) {
|
|
9415
|
-
return Object.entries(session.cookies).map(([k, v]) => `${k}=${v}`).join("; ");
|
|
9416
|
-
}
|
|
9417
|
-
function absorbCookies(session, res) {
|
|
9418
|
-
for (const raw of res.headers.getSetCookie?.() ?? []) {
|
|
9419
|
-
const m = raw.match(/^([^=]+)=([^;]*)/);
|
|
9420
|
-
if (m) session.cookies[m[1]] = m[2];
|
|
9421
|
-
}
|
|
9422
|
-
}
|
|
9423
9527
|
function fail(what, r) {
|
|
9424
9528
|
const detail = r.body?.errors?.map((e) => e.detail ?? e.title).join("; ") || r.text.slice(0, 300);
|
|
9425
9529
|
throw new Error(`${what} failed (HTTP ${r.status}): ${detail}`);
|
|
@@ -9427,20 +9531,10 @@ function fail(what, r) {
|
|
|
9427
9531
|
async function selectProviderForApp(session, appId, onLog) {
|
|
9428
9532
|
const owns = async () => (await iris(session, "GET", `/apps/${appId}?fields[apps]=name`)).status === 200;
|
|
9429
9533
|
if (await owns()) return;
|
|
9430
|
-
const
|
|
9431
|
-
absorbCookies(session, res);
|
|
9432
|
-
const info = await res.json().catch(() => null);
|
|
9433
|
-
const providers = info?.availableProviders ?? [];
|
|
9534
|
+
const { providers } = await listProviders(session);
|
|
9434
9535
|
for (const p of providers) {
|
|
9435
|
-
|
|
9436
|
-
method: "POST",
|
|
9437
|
-
headers: { Cookie: cookieHeader(session), "Content-Type": "application/json", Accept: "application/json" },
|
|
9438
|
-
body: JSON.stringify({ provider: { providerId: p.providerId } })
|
|
9439
|
-
});
|
|
9440
|
-
absorbCookies(session, sw);
|
|
9441
|
-
if (sw.ok && await owns()) {
|
|
9536
|
+
if (await switchProvider(session, p.providerId) && await owns()) {
|
|
9442
9537
|
onLog?.(`Switched to team "${p.name}"`);
|
|
9443
|
-
session.teamId = String(p.providerId);
|
|
9444
9538
|
return;
|
|
9445
9539
|
}
|
|
9446
9540
|
}
|
|
@@ -9531,11 +9625,11 @@ function validateUsages(usages) {
|
|
|
9531
9625
|
if (linked && unlinked) throw new Error(`${u.category} cannot be both linked and not linked to the user.`);
|
|
9532
9626
|
}
|
|
9533
9627
|
}
|
|
9534
|
-
var IRIS_BASE2,
|
|
9628
|
+
var IRIS_BASE2, DATA_USAGE_CATEGORIES, DATA_USAGE_PURPOSES, DATA_PROTECTIONS;
|
|
9535
9629
|
var init_privacy = __esm({
|
|
9536
9630
|
"src/privacy/index.ts"() {
|
|
9631
|
+
init_providers();
|
|
9537
9632
|
IRIS_BASE2 = "https://appstoreconnect.apple.com/iris/v1";
|
|
9538
|
-
OLYMPUS_SESSION2 = "https://appstoreconnect.apple.com/olympus/v1/session";
|
|
9539
9633
|
DATA_USAGE_CATEGORIES = [
|
|
9540
9634
|
"PAYMENT_INFORMATION",
|
|
9541
9635
|
"CREDIT_AND_FRAUD",
|
|
@@ -9964,14 +10058,18 @@ function createLanesCommand() {
|
|
|
9964
10058
|
});
|
|
9965
10059
|
}
|
|
9966
10060
|
function createPrivacyCommand() {
|
|
9967
|
-
return new commander.Command("privacy").description("Upload App Privacy details (nutrition labels) to App Store Connect").requiredOption("--app-id <id>", "App Store Connect app id (numeric Apple ID)").requiredOption("-j, --json-path <path>", "Fastlane-format app_privacy_details.json").option("-u, --username <email>", "Apple ID", process.env.FASTNODE_USER ?? process.env.FASTLANE_USER).option("--skip-publish", "Save the answers without publishing them", false).action(async (opts) => {
|
|
9968
|
-
const {
|
|
10061
|
+
return new commander.Command("privacy").description("Upload App Privacy details (nutrition labels) to App Store Connect").requiredOption("--app-id <id>", "App Store Connect app id (numeric Apple ID)").requiredOption("-j, --json-path <path>", "Fastlane-format app_privacy_details.json").option("-u, --username <email>", "Apple ID (defaults to the last one signed in)", process.env.FASTNODE_USER ?? process.env.FASTLANE_USER).option("--fresh-login", "Ignore the saved Apple ID session and sign in again", false).option("--skip-publish", "Save the answers without publishing them", false).action(async (opts) => {
|
|
10062
|
+
const { signInWithAppleId: signInWithAppleId2, saveAppleSession: saveAppleSession2 } = await Promise.resolve().then(() => (init_session_store(), session_store_exports));
|
|
9969
10063
|
const { uploadAppPrivacyDetails: uploadAppPrivacyDetails2, validateUsages: validateUsages2 } = await Promise.resolve().then(() => (init_privacy(), privacy_exports));
|
|
9970
10064
|
const usages = JSON.parse(fs.readFileSync(opts.jsonPath, "utf8"));
|
|
9971
10065
|
validateUsages2(usages);
|
|
9972
|
-
const
|
|
9973
|
-
|
|
9974
|
-
|
|
10066
|
+
const session = await signInWithAppleId2({
|
|
10067
|
+
email: opts.username,
|
|
10068
|
+
askEmail: () => ask("Apple ID: "),
|
|
10069
|
+
askPassword: async (email) => process.env.FASTNODE_PASSWORD ?? process.env.FASTLANE_PASSWORD ?? await ask(`Password for ${email}: `, true),
|
|
10070
|
+
fresh: opts.freshLogin,
|
|
10071
|
+
onLog: (m) => console.log(m)
|
|
10072
|
+
});
|
|
9975
10073
|
const result = await uploadAppPrivacyDetails2({
|
|
9976
10074
|
session,
|
|
9977
10075
|
appId: opts.appId,
|
|
@@ -9979,6 +10077,7 @@ function createPrivacyCommand() {
|
|
|
9979
10077
|
skipPublish: opts.skipPublish,
|
|
9980
10078
|
onLog: (m) => console.log(m)
|
|
9981
10079
|
});
|
|
10080
|
+
saveAppleSession2(session);
|
|
9982
10081
|
console.log(`Done: ${result.created} answers${result.published ? ", published" : ""}.`);
|
|
9983
10082
|
});
|
|
9984
10083
|
}
|
|
@@ -10001,12 +10100,16 @@ function ask(question, secret = false) {
|
|
|
10001
10100
|
});
|
|
10002
10101
|
}
|
|
10003
10102
|
function createRejectionsCommand() {
|
|
10004
|
-
return new commander.Command("rejections").description("Show App Review's Resolution Center messages and rejection reasons").requiredOption("--app-id <ids...>", "App Store Connect app id(s) (numeric Apple ID)").option("-u, --username <email>", "Apple ID", process.env.FASTNODE_USER ?? process.env.FASTLANE_USER).option("--all", "Include resolved submissions, not just ones awaiting you", false).option("--json", "Print JSON instead of text", false).action(async (opts) => {
|
|
10005
|
-
const {
|
|
10103
|
+
return new commander.Command("rejections").description("Show App Review's Resolution Center messages and rejection reasons").requiredOption("--app-id <ids...>", "App Store Connect app id(s) (numeric Apple ID)").option("-u, --username <email>", "Apple ID (defaults to the last one signed in)", process.env.FASTNODE_USER ?? process.env.FASTLANE_USER).option("--fresh-login", "Ignore the saved Apple ID session and sign in again", false).option("--all", "Include resolved submissions, not just ones awaiting you", false).option("--json", "Print JSON instead of text", false).action(async (opts) => {
|
|
10104
|
+
const { signInWithAppleId: signInWithAppleId2, saveAppleSession: saveAppleSession2 } = await Promise.resolve().then(() => (init_session_store(), session_store_exports));
|
|
10006
10105
|
const { getReviewFeedback: getReviewFeedback2 } = await Promise.resolve().then(() => (init_review(), review_exports));
|
|
10007
|
-
const
|
|
10008
|
-
|
|
10009
|
-
|
|
10106
|
+
const session = await signInWithAppleId2({
|
|
10107
|
+
email: opts.username,
|
|
10108
|
+
askEmail: () => ask2("Apple ID: "),
|
|
10109
|
+
askPassword: async (email) => process.env.FASTNODE_PASSWORD ?? process.env.FASTLANE_PASSWORD ?? await ask2(`Password for ${email}: `, true),
|
|
10110
|
+
fresh: opts.freshLogin,
|
|
10111
|
+
onLog: (m) => console.error(m)
|
|
10112
|
+
});
|
|
10010
10113
|
const all = {};
|
|
10011
10114
|
for (const appId of opts.appId) {
|
|
10012
10115
|
const feedback = await getReviewFeedback2(session, appId, { onlyOpen: !opts.all, onLog: (m) => console.error(m) });
|
|
@@ -10029,6 +10132,7 @@ Submission ${s.submissionId} \u2014 ${s.state} (submitted ${s.submittedDate ?? "
|
|
|
10029
10132
|
}
|
|
10030
10133
|
}
|
|
10031
10134
|
}
|
|
10135
|
+
saveAppleSession2(session);
|
|
10032
10136
|
if (opts.json) console.log(JSON.stringify(all, null, 2));
|
|
10033
10137
|
});
|
|
10034
10138
|
}
|