@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
@@ -3066,25 +3066,13 @@ async function createApp(options) {
3066
3066
  });
3067
3067
  }
3068
3068
  }
3069
- const sku = options.sku ?? `${options.bundleIdentifier}.${Date.now()}`;
3070
- const primaryLocale = options.primaryLocale ?? "en-US";
3071
- const response = await options.client.http.post("/v1/apps", {
3072
- data: {
3073
- type: "apps",
3074
- attributes: {
3075
- bundleId: options.bundleIdentifier,
3076
- name: options.appName,
3077
- sku,
3078
- primaryLocale
3079
- },
3080
- relationships: {
3081
- bundleId: {
3082
- data: { type: "bundleIds", id: bundleId.id }
3083
- }
3084
- }
3085
- }
3069
+ return options.client.apps.create({
3070
+ bundleIdentifier: options.bundleIdentifier,
3071
+ bundleIdId: bundleId.id,
3072
+ appName: options.appName,
3073
+ sku: options.sku ?? `${options.bundleIdentifier}.${Date.now()}`,
3074
+ primaryLocale: options.primaryLocale
3086
3075
  });
3087
- return response.data;
3088
3076
  }
3089
3077
  var SERVICE_NAME_TO_CAPABILITY;
3090
3078
  var init_produce = __esm({
@@ -4878,6 +4866,43 @@ var init_apps = __esm({
4878
4866
  });
4879
4867
  return results[0] ?? null;
4880
4868
  }
4869
+ /**
4870
+ * Create an App Store Connect **app record** (the thing that shows up
4871
+ * under "My Apps" and that TestFlight / App Store uploads require).
4872
+ *
4873
+ * This is distinct from registering an App ID in the Developer Portal —
4874
+ * you need BOTH. The Developer Portal App ID unlocks provisioning
4875
+ * profiles and entitlements; the App Store Connect app record unlocks
4876
+ * uploads. `upload_to_testflight` fails with "Couldn't find app
4877
+ * 'com.foo.bar' on the account…" when this record is missing.
4878
+ *
4879
+ * `bundleIdId` is the REST API primary key of the bundle id resource
4880
+ * (not the identifier string) — fetch it via `bundleIds.find(identifier)`
4881
+ * or from the response of `bundleIds.create()`.
4882
+ *
4883
+ * `sku` is an arbitrary unique string Apple uses to identify the app in
4884
+ * their internal records. If you don't have a meaningful one, pass the
4885
+ * bundle identifier itself or append a timestamp for uniqueness.
4886
+ */
4887
+ async create(params) {
4888
+ const response = await this.http.post("/v1/apps", {
4889
+ data: {
4890
+ type: "apps",
4891
+ attributes: {
4892
+ bundleId: params.bundleIdentifier,
4893
+ name: params.appName,
4894
+ sku: params.sku,
4895
+ primaryLocale: params.primaryLocale ?? "en-US"
4896
+ },
4897
+ relationships: {
4898
+ bundleId: {
4899
+ data: { type: "bundleIds", id: params.bundleIdId }
4900
+ }
4901
+ }
4902
+ }
4903
+ });
4904
+ return response.data;
4905
+ }
4881
4906
  };
4882
4907
  }
4883
4908
  });
@@ -6311,6 +6336,12 @@ var init_xcode_metrics = __esm({
6311
6336
  });
6312
6337
 
6313
6338
  // src/client/portal.ts
6339
+ function pickUniqueKeyName(base, taken) {
6340
+ if (!taken.has(base)) return base;
6341
+ let n = 1;
6342
+ while (taken.has(`${base} - ${n}`)) n++;
6343
+ return `${base} - ${n}`;
6344
+ }
6314
6345
  var PORTAL_BASE, PortalClient;
6315
6346
  var init_portal = __esm({
6316
6347
  "src/client/portal.ts"() {
@@ -6429,12 +6460,17 @@ var init_portal = __esm({
6429
6460
  * + period and collapse whitespace.
6430
6461
  */
6431
6462
  async createApiKey(rawName, serviceConfigurations = {}) {
6432
- const name = rawName.replace(/[^A-Za-z0-9 _\-.]/g, " ").replace(/\s+/g, " ").trim().slice(0, 50);
6433
- if (!name) throw new Error("createApiKey: name is empty after sanitization");
6463
+ const baseName = rawName.replace(/[^A-Za-z0-9 _\-.]/g, " ").replace(/\s+/g, " ").trim().slice(0, 45);
6464
+ if (!baseName) throw new Error("createApiKey: name is empty after sanitization");
6465
+ let existingNames = /* @__PURE__ */ new Set();
6434
6466
  try {
6435
- await this.listApiKeys();
6467
+ const list = await this.listApiKeys();
6468
+ existingNames = new Set(
6469
+ (list.keys ?? []).map((k) => String(k.keyName ?? "").trim())
6470
+ );
6436
6471
  } catch {
6437
6472
  }
6473
+ const name = pickUniqueKeyName(baseName, existingNames);
6438
6474
  const body = {
6439
6475
  teamId: this.teamId,
6440
6476
  name,
@@ -6489,14 +6525,24 @@ var init_portal = __esm({
6489
6525
  * The exact body comes from @expo/apple-utils v2.1.21 — both fields
6490
6526
  * are produced by separate functions (`d` for the map, `h` for the
6491
6527
  * array) and merged into the create payload.
6528
+ *
6529
+ * Apple also rejects duplicate key names ("Another key with same
6530
+ * name exists") — we dedupe by listing existing keys first and
6531
+ * appending " (N)" until we find a free slot, mirroring the
6532
+ * provisioning profile dedup.
6492
6533
  */
6493
6534
  async createApnsAuthKey(rawName) {
6494
- const name = rawName.replace(/[^A-Za-z0-9 _\-.]/g, " ").replace(/\s+/g, " ").trim().slice(0, 50);
6495
- if (!name) throw new Error("createApnsAuthKey: name is empty after sanitization");
6535
+ const baseName = rawName.replace(/[^A-Za-z0-9 _\-.]/g, " ").replace(/\s+/g, " ").trim().slice(0, 45);
6536
+ if (!baseName) throw new Error("createApnsAuthKey: name is empty after sanitization");
6537
+ let existingNames = /* @__PURE__ */ new Set();
6496
6538
  try {
6497
- await this.listApiKeys();
6539
+ const list = await this.listApiKeys();
6540
+ existingNames = new Set(
6541
+ (list.keys ?? []).map((k) => String(k.keyName ?? "").trim())
6542
+ );
6498
6543
  } catch {
6499
6544
  }
6545
+ const name = pickUniqueKeyName(baseName, existingNames);
6500
6546
  const body = {
6501
6547
  teamId: this.teamId,
6502
6548
  name,