@sitepong/fastnode 0.2.0 → 0.2.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 (71) hide show
  1. package/dist/actions/index.cjs +70 -24
  2. package/dist/actions/index.cjs.map +1 -1
  3. package/dist/actions/index.mjs +70 -24
  4. package/dist/actions/index.mjs.map +1 -1
  5. package/dist/cert/index.cjs +17822 -24
  6. package/dist/cert/index.cjs.map +1 -1
  7. package/dist/cert/index.d.cts +3 -3
  8. package/dist/cert/index.d.ts +3 -3
  9. package/dist/cert/index.mjs +17807 -6
  10. package/dist/cert/index.mjs.map +1 -1
  11. package/dist/{cert-DtYDJBjG.d.ts → cert-Ddl7FpFT.d.ts} +1 -1
  12. package/dist/{cert-6m1R8UeW.d.cts → cert-FehieKeb.d.cts} +1 -1
  13. package/dist/cli/index.cjs +70 -24
  14. package/dist/cli/index.cjs.map +1 -1
  15. package/dist/cli/index.d.cts +1 -1
  16. package/dist/cli/index.d.ts +1 -1
  17. package/dist/cli/index.mjs +70 -24
  18. package/dist/cli/index.mjs.map +1 -1
  19. package/dist/client/index.cjs +64 -6
  20. package/dist/client/index.cjs.map +1 -1
  21. package/dist/client/index.d.cts +1 -1
  22. package/dist/client/index.d.ts +1 -1
  23. package/dist/client/index.mjs +64 -6
  24. package/dist/client/index.mjs.map +1 -1
  25. package/dist/deliver/index.d.cts +2 -2
  26. package/dist/deliver/index.d.ts +2 -2
  27. package/dist/{index-CojSGJ7m.d.ts → index-B8FOfxOw.d.ts} +1 -1
  28. package/dist/{index-CdYdwxpQ.d.cts → index-B9QeTpQK.d.cts} +1 -1
  29. package/dist/{index-AD8QXY1T.d.cts → index-BICa8odo.d.cts} +1 -1
  30. package/dist/{index-CMH_GpN9.d.cts → index-BKUapQP2.d.cts} +30 -0
  31. package/dist/{index-Ce-WMV7c.d.cts → index-BZWmOTWE.d.cts} +1 -1
  32. package/dist/{index-BWK-T2-S.d.cts → index-Bk1Gd-qE.d.cts} +1 -1
  33. package/dist/{index-D2z7RiAM.d.ts → index-CCtYhPN9.d.ts} +30 -0
  34. package/dist/{index-CCs5irG7.d.cts → index-CNHf7I4v.d.cts} +1 -1
  35. package/dist/{index-CQKpbHZt.d.ts → index-CplRWSUc.d.ts} +1 -1
  36. package/dist/{index-BpiEBPVd.d.ts → index-CtPyeMLH.d.ts} +1 -1
  37. package/dist/{index-BW8wQUGC.d.cts → index-D13sn8DO.d.cts} +1 -1
  38. package/dist/{index-Kq3rbG0u.d.ts → index-DFni8oZt.d.ts} +1 -1
  39. package/dist/{index-D82CmjMP.d.ts → index-DI1ZHr-3.d.ts} +1 -1
  40. package/dist/{index-DZaPkUnC.d.ts → index-DZoPGCbE.d.ts} +3 -3
  41. package/dist/{index-KCB2q1-8.d.cts → index-OelCoOth.d.cts} +1 -1
  42. package/dist/{index-CLsvyTkh.d.ts → index-YcKz4aRS.d.ts} +1 -1
  43. package/dist/{index-CQd4bo3G.d.cts → index-oVyLLIEK.d.cts} +3 -3
  44. package/dist/{index-CsFIp7OO.d.ts → index-xykpq6Lz.d.ts} +1 -1
  45. package/dist/index.cjs +18237 -202
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.d.cts +81 -21
  48. package/dist/index.d.ts +81 -21
  49. package/dist/index.mjs +18237 -201
  50. package/dist/index.mjs.map +1 -1
  51. package/dist/lane/index.cjs +70 -24
  52. package/dist/lane/index.cjs.map +1 -1
  53. package/dist/lane/index.mjs +70 -24
  54. package/dist/lane/index.mjs.map +1 -1
  55. package/dist/match/index.d.cts +4 -4
  56. package/dist/match/index.d.ts +4 -4
  57. package/dist/pem/index.d.cts +2 -2
  58. package/dist/pem/index.d.ts +2 -2
  59. package/dist/pilot/index.d.cts +2 -2
  60. package/dist/pilot/index.d.ts +2 -2
  61. package/dist/precheck/index.d.cts +2 -2
  62. package/dist/precheck/index.d.ts +2 -2
  63. package/dist/produce/index.cjs +6 -18
  64. package/dist/produce/index.cjs.map +1 -1
  65. package/dist/produce/index.d.cts +2 -2
  66. package/dist/produce/index.d.ts +2 -2
  67. package/dist/produce/index.mjs +6 -18
  68. package/dist/produce/index.mjs.map +1 -1
  69. package/dist/sigh/index.d.cts +2 -2
  70. package/dist/sigh/index.d.ts +2 -2
  71. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- export { a7 as ApiKeyRole, a as AppStoreConnectClient, d as AppStoreConnectConfig, b as AppStoreConnectError, A as AppleSession, _ as AppleSessionConfig, a2 as BeginLoginResult, $ as ContractMessage, a6 as IrisApiKey, a5 as IrisAuthError, a4 as IrisClient, i as JsonApiError, a9 as JsonApiErrorResponse, h as JsonApiListResponse, a8 as JsonApiRelationship, J as JsonApiResource, g as JsonApiResponse, L as ListParams, a0 as PendingLogin, a3 as PortalClient, Z as ProgramLicenseAgreementError, c as RateLimitError, R as RequestClient, f as RequestOptions, e as TokenConfig, T as TokenManager, a1 as TwoFactorChallenge, V as beginLogin, Y as checkPortalResponse, S as loginWithAppleId, X as requestSmsCode, W as submitTwoFactorCode } from '../index-CMH_GpN9.cjs';
1
+ export { a7 as ApiKeyRole, a as AppStoreConnectClient, d as AppStoreConnectConfig, b as AppStoreConnectError, A as AppleSession, _ as AppleSessionConfig, a2 as BeginLoginResult, $ as ContractMessage, a6 as IrisApiKey, a5 as IrisAuthError, a4 as IrisClient, i as JsonApiError, a9 as JsonApiErrorResponse, h as JsonApiListResponse, a8 as JsonApiRelationship, J as JsonApiResource, g as JsonApiResponse, L as ListParams, a0 as PendingLogin, a3 as PortalClient, Z as ProgramLicenseAgreementError, c as RateLimitError, R as RequestClient, f as RequestOptions, e as TokenConfig, T as TokenManager, a1 as TwoFactorChallenge, V as beginLogin, Y as checkPortalResponse, S as loginWithAppleId, X as requestSmsCode, W as submitTwoFactorCode } from '../index-BKUapQP2.cjs';
2
2
  import '../enums-B609j2rb.cjs';
@@ -1,2 +1,2 @@
1
- export { a7 as ApiKeyRole, a as AppStoreConnectClient, d as AppStoreConnectConfig, b as AppStoreConnectError, A as AppleSession, _ as AppleSessionConfig, a2 as BeginLoginResult, $ as ContractMessage, a6 as IrisApiKey, a5 as IrisAuthError, a4 as IrisClient, i as JsonApiError, a9 as JsonApiErrorResponse, h as JsonApiListResponse, a8 as JsonApiRelationship, J as JsonApiResource, g as JsonApiResponse, L as ListParams, a0 as PendingLogin, a3 as PortalClient, Z as ProgramLicenseAgreementError, c as RateLimitError, R as RequestClient, f as RequestOptions, e as TokenConfig, T as TokenManager, a1 as TwoFactorChallenge, V as beginLogin, Y as checkPortalResponse, S as loginWithAppleId, X as requestSmsCode, W as submitTwoFactorCode } from '../index-D2z7RiAM.js';
1
+ export { a7 as ApiKeyRole, a as AppStoreConnectClient, d as AppStoreConnectConfig, b as AppStoreConnectError, A as AppleSession, _ as AppleSessionConfig, a2 as BeginLoginResult, $ as ContractMessage, a6 as IrisApiKey, a5 as IrisAuthError, a4 as IrisClient, i as JsonApiError, a9 as JsonApiErrorResponse, h as JsonApiListResponse, a8 as JsonApiRelationship, J as JsonApiResource, g as JsonApiResponse, L as ListParams, a0 as PendingLogin, a3 as PortalClient, Z as ProgramLicenseAgreementError, c as RateLimitError, R as RequestClient, f as RequestOptions, e as TokenConfig, T as TokenManager, a1 as TwoFactorChallenge, V as beginLogin, Y as checkPortalResponse, S as loginWithAppleId, X as requestSmsCode, W as submitTwoFactorCode } from '../index-CCtYhPN9.js';
2
2
  import '../enums-B609j2rb.js';
@@ -980,6 +980,43 @@ var AppsResource = class {
980
980
  });
981
981
  return results[0] ?? null;
982
982
  }
983
+ /**
984
+ * Create an App Store Connect **app record** (the thing that shows up
985
+ * under "My Apps" and that TestFlight / App Store uploads require).
986
+ *
987
+ * This is distinct from registering an App ID in the Developer Portal —
988
+ * you need BOTH. The Developer Portal App ID unlocks provisioning
989
+ * profiles and entitlements; the App Store Connect app record unlocks
990
+ * uploads. `upload_to_testflight` fails with "Couldn't find app
991
+ * 'com.foo.bar' on the account…" when this record is missing.
992
+ *
993
+ * `bundleIdId` is the REST API primary key of the bundle id resource
994
+ * (not the identifier string) — fetch it via `bundleIds.find(identifier)`
995
+ * or from the response of `bundleIds.create()`.
996
+ *
997
+ * `sku` is an arbitrary unique string Apple uses to identify the app in
998
+ * their internal records. If you don't have a meaningful one, pass the
999
+ * bundle identifier itself or append a timestamp for uniqueness.
1000
+ */
1001
+ async create(params) {
1002
+ const response = await this.http.post("/v1/apps", {
1003
+ data: {
1004
+ type: "apps",
1005
+ attributes: {
1006
+ bundleId: params.bundleIdentifier,
1007
+ name: params.appName,
1008
+ sku: params.sku,
1009
+ primaryLocale: params.primaryLocale ?? "en-US"
1010
+ },
1011
+ relationships: {
1012
+ bundleId: {
1013
+ data: { type: "bundleIds", id: params.bundleIdId }
1014
+ }
1015
+ }
1016
+ }
1017
+ });
1018
+ return response.data;
1019
+ }
983
1020
  };
984
1021
 
985
1022
  // src/resources/builds.ts
@@ -2267,6 +2304,12 @@ var XcodeMetricsResource = class {
2267
2304
 
2268
2305
  // src/client/portal.ts
2269
2306
  var PORTAL_BASE = "https://developer.apple.com/services-account/QH65B2";
2307
+ function pickUniqueKeyName(base, taken) {
2308
+ if (!taken.has(base)) return base;
2309
+ let n = 1;
2310
+ while (taken.has(`${base} - ${n}`)) n++;
2311
+ return `${base} - ${n}`;
2312
+ }
2270
2313
  var PortalClient = class _PortalClient {
2271
2314
  session;
2272
2315
  teamId;
@@ -2380,12 +2423,17 @@ var PortalClient = class _PortalClient {
2380
2423
  * + period and collapse whitespace.
2381
2424
  */
2382
2425
  async createApiKey(rawName, serviceConfigurations = {}) {
2383
- const name = rawName.replace(/[^A-Za-z0-9 _\-.]/g, " ").replace(/\s+/g, " ").trim().slice(0, 50);
2384
- if (!name) throw new Error("createApiKey: name is empty after sanitization");
2426
+ const baseName = rawName.replace(/[^A-Za-z0-9 _\-.]/g, " ").replace(/\s+/g, " ").trim().slice(0, 45);
2427
+ if (!baseName) throw new Error("createApiKey: name is empty after sanitization");
2428
+ let existingNames = /* @__PURE__ */ new Set();
2385
2429
  try {
2386
- await this.listApiKeys();
2430
+ const list = await this.listApiKeys();
2431
+ existingNames = new Set(
2432
+ (list.keys ?? []).map((k) => String(k.keyName ?? "").trim())
2433
+ );
2387
2434
  } catch {
2388
2435
  }
2436
+ const name = pickUniqueKeyName(baseName, existingNames);
2389
2437
  const body = {
2390
2438
  teamId: this.teamId,
2391
2439
  name,
@@ -2440,14 +2488,24 @@ var PortalClient = class _PortalClient {
2440
2488
  * The exact body comes from @expo/apple-utils v2.1.21 — both fields
2441
2489
  * are produced by separate functions (`d` for the map, `h` for the
2442
2490
  * array) and merged into the create payload.
2491
+ *
2492
+ * Apple also rejects duplicate key names ("Another key with same
2493
+ * name exists") — we dedupe by listing existing keys first and
2494
+ * appending " (N)" until we find a free slot, mirroring the
2495
+ * provisioning profile dedup.
2443
2496
  */
2444
2497
  async createApnsAuthKey(rawName) {
2445
- const name = rawName.replace(/[^A-Za-z0-9 _\-.]/g, " ").replace(/\s+/g, " ").trim().slice(0, 50);
2446
- if (!name) throw new Error("createApnsAuthKey: name is empty after sanitization");
2498
+ const baseName = rawName.replace(/[^A-Za-z0-9 _\-.]/g, " ").replace(/\s+/g, " ").trim().slice(0, 45);
2499
+ if (!baseName) throw new Error("createApnsAuthKey: name is empty after sanitization");
2500
+ let existingNames = /* @__PURE__ */ new Set();
2447
2501
  try {
2448
- await this.listApiKeys();
2502
+ const list = await this.listApiKeys();
2503
+ existingNames = new Set(
2504
+ (list.keys ?? []).map((k) => String(k.keyName ?? "").trim())
2505
+ );
2449
2506
  } catch {
2450
2507
  }
2508
+ const name = pickUniqueKeyName(baseName, existingNames);
2451
2509
  const body = {
2452
2510
  teamId: this.teamId,
2453
2511
  name,