@makefully/adaptfully 5.1.1 → 5.1.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## 5.1.2 — 2026-11-10
6
+
7
+ ### Fixed
8
+
9
+ - **Deploy preserveArtifacts** — `adaptfully deploy` no longer deletes `artifacts/` and `wrapfully-build.json` before packaging the prior build extract, so the IPA/AAB survives into the deploy chore.
10
+ - **Apple PKCS#12 export** — `apple-signing` (and iOS credential docs) export `.p12` with PBE-SHA1-3DES + SHA1 MAC so macOS `security import` accepts the passphrase.
11
+
5
12
  ## 5.1.1 — 2026-11-05
6
13
 
7
14
  ### Added
@@ -104,8 +104,11 @@ Skip this if step 1 already exported `development.p12` / `distribution.p12`.
104
104
  ```bash
105
105
  # From the folder that has private.key and the downloaded .cer
106
106
  openssl x509 -in Certificates.cer -inform DER -out cert.pem -outform PEM
107
- openssl pkcs12 -export -inkey private.key -in cert.pem -out development.p12
107
+ openssl pkcs12 -export -inkey private.key -in cert.pem -out development.p12 \
108
+ -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -macalg sha1
108
109
  # or distribution.p12 — use the matching kind
110
+ # (AES-256 / SHA-256 PKCS#12 often fails macOS `security import` with a false
111
+ # "wrong password?" MAC error — stick to the classic algorithms above.)
109
112
  ```
110
113
 
111
114
  Move the `.p12` to `assets/meta/deployments/ios/apple/`.
@@ -156,26 +156,28 @@ export async function exportAppleP12(options) {
156
156
  const pemPath = `${options.cerPath}.pem`;
157
157
  await run(['x509', '-in', options.cerPath, '-inform', 'DER', '-out', pemPath, '-outform', 'PEM']);
158
158
 
159
+ // Prefer classic PBEwithSHA1And3-KeyTripleDES + SHA1 MAC. OpenSSL's newer
160
+ // AES-256 / SHA-256 PKCS#12 defaults often fail macOS `security import`
161
+ // with "MAC verification failed (wrong password?)" even when the passphrase
162
+ // is correct.
163
+ const exportArgs = (certIn) => [
164
+ 'pkcs12',
165
+ '-export',
166
+ '-inkey', options.keyPath,
167
+ '-in', certIn,
168
+ '-out', options.p12Path,
169
+ '-passout', `pass:${options.p12Password}`,
170
+ '-keypbe', 'PBE-SHA1-3DES',
171
+ '-certpbe', 'PBE-SHA1-3DES',
172
+ '-macalg', 'sha1',
173
+ ];
174
+
159
175
  try {
160
- await run([
161
- 'pkcs12',
162
- '-export',
163
- '-inkey', options.keyPath,
164
- '-in', pemPath,
165
- '-out', options.p12Path,
166
- '-passout', `pass:${options.p12Password}`,
167
- ]);
176
+ await run(exportArgs(pemPath));
168
177
  } catch (derErr) {
169
178
  // Some downloads are already PEM
170
179
  try {
171
- await run([
172
- 'pkcs12',
173
- '-export',
174
- '-inkey', options.keyPath,
175
- '-in', options.cerPath,
176
- '-out', options.p12Path,
177
- '-passout', `pass:${options.p12Password}`,
178
- ]);
180
+ await run(exportArgs(options.cerPath));
179
181
  } catch {
180
182
  throw derErr;
181
183
  }
@@ -38,15 +38,22 @@ export function resolveExtractRoot(outputRoot, platformKey) {
38
38
  * Remove prior extract artifacts in `extractRoot` only (artifacts/, status,
39
39
  * manifest). Does not wipe sibling platform folders under output/.
40
40
  *
41
+ * Deploy packages from the prior build extract in place — pass
42
+ * `{ preserveArtifacts: true }` so the IPA/AAB and manifest are not deleted
43
+ * before `createDeployArchive` runs.
44
+ *
41
45
  * @param {string} [extractRoot='output']
46
+ * @param {{ preserveArtifacts?: boolean }} [options]
42
47
  */
43
- export function clearStaleBuildExtract(extractRoot = 'output') {
48
+ export function clearStaleBuildExtract(extractRoot = 'output', options = {}) {
44
49
  const root = path.resolve(extractRoot);
45
- const stalePaths = [
46
- path.join(root, 'artifacts'),
47
- path.join(root, MANIFEST_NAME),
48
- path.join(root, STATUS_NAME),
49
- ];
50
+ const stalePaths = options.preserveArtifacts
51
+ ? [path.join(root, STATUS_NAME)]
52
+ : [
53
+ path.join(root, 'artifacts'),
54
+ path.join(root, MANIFEST_NAME),
55
+ path.join(root, STATUS_NAME),
56
+ ];
50
57
 
51
58
  for (const stalePath of stalePaths) {
52
59
  fs.rmSync(stalePath, { recursive: true, force: true });
@@ -257,7 +257,11 @@ export async function send (
257
257
 
258
258
  if (mode === 'extract') {
259
259
  fs.mkdirSync(extractRoot, { recursive: true });
260
- clearStaleBuildExtract(extractRoot);
260
+ // Deploy zips from extractRoot itself; wiping artifacts/manifest here
261
+ // deleted the IPA before createDeployArchive could package it.
262
+ clearStaleBuildExtract(extractRoot, {
263
+ preserveArtifacts: stage === 'deploy',
264
+ });
261
265
  }
262
266
 
263
267
  let archiveStream;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makefully/adaptfully",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "Platform abstraction and Wrapfully deploy client for Makefully games",
5
5
  "type": "module",
6
6
  "main": "./lib/node/index.js",