@makefully/adaptfully 3.16.1 → 4.0.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.
- package/CHANGELOG.md +12 -0
- package/README.md +11 -21
- package/lib/node/index.js +0 -1
- package/lib/node/packagers/base.js +3 -3
- package/lib/node/packagers/index.js +0 -3
- package/lib/node/registrations.js +5 -2
- package/package.json +2 -2
- package/lib/node/packagers/cordova.js +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## 4.0.0 — 2026-09-03
|
|
6
|
+
|
|
7
|
+
### Removed
|
|
8
|
+
|
|
9
|
+
- **Cordova / PhoneGap** — Dropped `CordovaPackager`, `packager: "cordova"`, and the `cordova` package keyword. Android/iOS prebuild and Wrapfully family resolution are Capacitor-only.
|
|
10
|
+
- **`CordovaPackager` export** — No longer exported from `@makefully/adaptfully`.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **`resolveFamily(..., 'cordova')`** — Throws an explicit error directing clients to Capacitor.
|
|
15
|
+
- **Major version** — Breaking for projects still configured with Cordova.
|
|
16
|
+
|
|
5
17
|
## 3.16.1 — 2026-09-03
|
|
6
18
|
|
|
7
19
|
### Fixed
|
package/README.md
CHANGED
|
@@ -159,16 +159,15 @@ Standard plugin keys load bundled Adaptfully runtime scripts and emit an inline
|
|
|
159
159
|
|
|
160
160
|
Wrapfully builders (`steam`, `win`, `mac`, `android`, etc.) map to platform keys via defaults (`win` → `steam`) or an explicit `builders` array on the platform config.
|
|
161
161
|
|
|
162
|
-
Each platform entry may set a **`packager`** (`web`, `electron`,
|
|
162
|
+
Each platform entry may set a **`packager`** (`web`, `electron`, or `capacitor`). Defaults to **`web`** — copy deploy and inject HTML only. Packagers are implemented as classes (`WebPackager`, `ElectronPackager`, `CapacitorPackager`) that handle prebuild output for their target platforms.
|
|
163
163
|
|
|
164
164
|
| Packager | Prebuild adds |
|
|
165
165
|
|----------|---------------|
|
|
166
166
|
| `web` | `game-config.js` for **`uwp`** platform prebuilds |
|
|
167
167
|
| `electron` | `main.js` (Electron shell); `preload.js` when **`steam-auth`** is registered |
|
|
168
|
-
| `cordova` | `cordova.js` stub, `game-config.js`, CSP/viewport HTML extras |
|
|
169
168
|
| `capacitor` | `game-config.js`, Capacitor CSP/viewport; `social-login-config.js` when **`social-auth`** is registered |
|
|
170
169
|
|
|
171
|
-
Android/iOS Wrapfully builds
|
|
170
|
+
Android/iOS Wrapfully builds use the **`capacitor`** builder family. Cordova/PhoneGap is no longer supported.
|
|
172
171
|
|
|
173
172
|
**`steam-auth` requires `packager: "electron"`** and `platforms.<name>.steamId` (Steamworks app ID for the client preload). Steam **upload** app IDs live separately in each Steam deployment’s `manifest.json` — see Wrapfully docs.
|
|
174
173
|
|
|
@@ -461,10 +460,6 @@ Standard npm fields (`name`, `version`, `description`) are used directly. Add a
|
|
|
461
460
|
}
|
|
462
461
|
}
|
|
463
462
|
},
|
|
464
|
-
"properties": [
|
|
465
|
-
{ "tag": "plugin", "name": "cordova-plugin-inappbrowser" },
|
|
466
|
-
{ "tag": "allow-navigation", "href": "*" }
|
|
467
|
-
]
|
|
468
463
|
}
|
|
469
464
|
}
|
|
470
465
|
```
|
|
@@ -472,13 +467,13 @@ Standard npm fields (`name`, `version`, `description`) are used directly. Add a
|
|
|
472
467
|
| Field | Used by | Description |
|
|
473
468
|
|-------|---------|-------------|
|
|
474
469
|
| `title` | All | Display name shown in stores and app shells |
|
|
475
|
-
| `packageName` |
|
|
476
|
-
| `publisherDisplayName` |
|
|
470
|
+
| `packageName` | Capacitor, Electron, UWP, Play upload | Reverse-DNS identifier (`com.company.game`) |
|
|
471
|
+
| `publisherDisplayName` | Electron, web | Short publisher name |
|
|
477
472
|
| `publisherFullName` | Electron | Legal entity name for copyright |
|
|
478
|
-
| `publisherWebsite` |
|
|
479
|
-
| `publisherEmailAddress` |
|
|
473
|
+
| `publisherWebsite` | Web | Company URL |
|
|
474
|
+
| `publisherEmailAddress` | Optional | Contact email |
|
|
480
475
|
| `scope` | Web/PWA | Base URL scope for the web app |
|
|
481
|
-
| `themeColor` |
|
|
476
|
+
| `themeColor` | Capacitor, Electron, UWP, web | Loading screen / theme color |
|
|
482
477
|
| `twitterId` | Web | Twitter handle for meta tags |
|
|
483
478
|
| `deployFolder` | Client | Neutral deploy directory staged before prebuild (default: `deploy`) |
|
|
484
479
|
| `htmlInjections` | Prebuild | Deploy-relative HTML paths to inject (default: `["index.html"]`) |
|
|
@@ -486,11 +481,10 @@ Standard npm fields (`name`, `version`, `description`) are used directly. Add a
|
|
|
486
481
|
| `platforms` | Prebuild | Per-platform registration maps (see [Adaptfully runtime](#adaptfully-runtime)) |
|
|
487
482
|
| `platforms.<name>.builder` | Build/deploy | Override Wrapfully builder for a platform (default: `web` → `webapp`, others match platform key) |
|
|
488
483
|
| `platforms.<name>.builders` | wrapfully-deploy | Map additional Wrapfully builder names to a platform |
|
|
489
|
-
| `platforms.<name>.packager` | Prebuild | `web` (default), `electron`,
|
|
484
|
+
| `platforms.<name>.packager` | Prebuild | `web` (default), `electron`, or `capacitor` — selects the packager class that adds platform-specific files during prebuild |
|
|
490
485
|
| `platforms.<name>.steamId` | Electron + steam-auth | Steamworks app ID baked into `preload.js` (client). Upload app IDs belong in the Steam deployment `manifest.json` |
|
|
491
486
|
| `platforms.<name>.socialLogin` | Capacitor + social-auth | Capgo provider config (`providers`, `google.webClientId`, `apple.clientId`, optional `defaultProvider`) |
|
|
492
487
|
| `platforms.<name>.<configField>` | Build/deploy | Overrides the matching top-level `config.*` default for that platform only (e.g. `platforms.android.packageName`, `platforms.ios.title`). Does not apply to control fields: `packager`, `registrations`, `builder`, `builders`, `deployments`, `steamId`, `socialLogin`, `steamworks` |
|
|
493
|
-
| `properties` | Cordova | Cordova config.xml entries (plugins, allow-navigation, etc.) |
|
|
494
488
|
|
|
495
489
|
Top-level `config.*` values are **defaults**. Any non-control field on `config.platforms.<name>` overrides the default when that platform is built or deployed. Example:
|
|
496
490
|
|
|
@@ -608,7 +602,7 @@ The file looks like:
|
|
|
608
602
|
|
|
609
603
|
#### Apple (`ios`, `ios-dev`, `ios-sim`, `mac`)
|
|
610
604
|
|
|
611
|
-
**Capacitor iOS** signing is file-based under the deployment folder
|
|
605
|
+
**Capacitor iOS** signing is file-based under the deployment folder:
|
|
612
606
|
|
|
613
607
|
```
|
|
614
608
|
assets/meta/deployments/<deployment>/
|
|
@@ -617,11 +611,10 @@ assets/meta/deployments/<deployment>/
|
|
|
617
611
|
apple/app-store.mobileprovision # release
|
|
618
612
|
apple/development.p12 # ios-dev device
|
|
619
613
|
apple/development.mobileprovision # ios-dev device
|
|
614
|
+
build.json # optional: { "apple": { "p12Password": "..." } }
|
|
620
615
|
```
|
|
621
616
|
|
|
622
|
-
`adaptfully build` (zip-only) still packages this deployment folder for Capacitor
|
|
623
|
-
|
|
624
|
-
Optional `build.json` may still be present for tooling compatibility; Capacitor does not require its `ios.*` code-sign fields.
|
|
617
|
+
`adaptfully build` (zip-only) still packages this deployment folder for Capacitor so device debug builds can sign. Optional `build.json` may set `apple.p12Password` for the `.p12` passphrase (Wrapfully uses an ephemeral keychain per build). Team ID and profile UUID are read from the `.mobileprovision`. Enable **Sign in with Apple** on the App ID when using Capgo Apple auth.
|
|
625
618
|
|
|
626
619
|
To deploy to the App Store, include `assets/meta/deployments/<deployment>/apple.json`. The easiest path is:
|
|
627
620
|
|
|
@@ -642,9 +635,6 @@ The file looks like:
|
|
|
642
635
|
```
|
|
643
636
|
|
|
644
637
|
iOS IPA upload uses `username` + `password` via `xcrun altool --upload-app`. `category` / `identity` matter more for macOS Electron signing/notarization.
|
|
645
|
-
#### Cordova
|
|
646
|
-
|
|
647
|
-
Set `packager: "cordova"` on an `android` or `ios` platform to use Cordova instead of Capacitor. Requires the Android and Apple package requirements above.
|
|
648
638
|
|
|
649
639
|
#### Steam (`steam`, `steam-dev`)
|
|
650
640
|
|
package/lib/node/index.js
CHANGED
|
@@ -23,7 +23,6 @@ export { prebuildPlatform, prebuildOutputDir, resolveHtmlInjections } from './pr
|
|
|
23
23
|
export { getPackageRoot, getRuntimeDir, resolveRuntimeScript } from './paths.js';
|
|
24
24
|
export {
|
|
25
25
|
CapacitorPackager,
|
|
26
|
-
CordovaPackager,
|
|
27
26
|
ElectronPackager,
|
|
28
27
|
Packager,
|
|
29
28
|
VALID_PACKAGERS,
|
|
@@ -4,10 +4,10 @@ import { STANDARD_PLUGINS } from '../registrations.js';
|
|
|
4
4
|
import { resolvePlatformConfig } from '../platform-config.js';
|
|
5
5
|
|
|
6
6
|
/** @typedef {import('../registrations.js').RegistrationMap} RegistrationMap */
|
|
7
|
-
/** @typedef {'web' | 'electron' | '
|
|
7
|
+
/** @typedef {'web' | 'electron' | 'capacitor'} PackagerName */
|
|
8
8
|
|
|
9
9
|
/** @type {PackagerName[]} */
|
|
10
|
-
export const VALID_PACKAGERS = ['web', 'electron', '
|
|
10
|
+
export const VALID_PACKAGERS = ['web', 'electron', 'capacitor'];
|
|
11
11
|
|
|
12
12
|
const PACKAGER_MARKER = '<!-- adaptfully-packager -->';
|
|
13
13
|
const PACKAGER_END_MARKER = '<!-- /adaptfully-packager -->';
|
|
@@ -16,7 +16,7 @@ const HEAD_PACKAGER_END_MARKER = '<!-- /adaptfully-packager-head -->';
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @typedef {Object} PackagerOptions
|
|
19
|
-
* @property {string[]} [platforms] Platform keys this packager targets
|
|
19
|
+
* @property {string[]} [platforms] Platform keys this packager targets
|
|
20
20
|
* @property {string} [platformKey] Active platform for a single prebuild run
|
|
21
21
|
* @property {(message: string) => void} [log]
|
|
22
22
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CapacitorPackager } from './capacitor.js';
|
|
2
|
-
import { CordovaPackager } from './cordova.js';
|
|
3
2
|
import { ElectronPackager } from './electron.js';
|
|
4
3
|
import { Packager, VALID_PACKAGERS } from './base.js';
|
|
5
4
|
import { WebPackager } from './web.js';
|
|
@@ -10,7 +9,6 @@ export {
|
|
|
10
9
|
resolvePlatformSocialLogin,
|
|
11
10
|
validateSocialLoginConfig,
|
|
12
11
|
} from './capacitor.js';
|
|
13
|
-
export { CordovaPackager } from './cordova.js';
|
|
14
12
|
export {
|
|
15
13
|
ElectronPackager,
|
|
16
14
|
buildElectronMain,
|
|
@@ -26,7 +24,6 @@ export { WebPackager } from './web.js';
|
|
|
26
24
|
const PACKAGER_REGISTRY = {
|
|
27
25
|
web: WebPackager,
|
|
28
26
|
electron: ElectronPackager,
|
|
29
|
-
cordova: CordovaPackager,
|
|
30
27
|
capacitor: CapacitorPackager,
|
|
31
28
|
};
|
|
32
29
|
|
|
@@ -345,7 +345,7 @@ export function resolvePublishDir(deploymentKey, metaDir = 'assets/meta') {
|
|
|
345
345
|
return path.join(metaDir, 'deployments', deploymentKey);
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
const BUILD_SIGNING_PACKAGERS = new Set(['capacitor'
|
|
348
|
+
const BUILD_SIGNING_PACKAGERS = new Set(['capacitor']);
|
|
349
349
|
|
|
350
350
|
/**
|
|
351
351
|
* Credential folders to ship with `adaptfully build` (zip artifact) when the
|
|
@@ -412,7 +412,10 @@ export function resolveFamily(targets, packager) {
|
|
|
412
412
|
return 'electron';
|
|
413
413
|
}
|
|
414
414
|
if (packager === 'cordova') {
|
|
415
|
-
|
|
415
|
+
throw new Error(
|
|
416
|
+
'Cordova/PhoneGap is no longer supported. Remove packager: "cordova" '
|
|
417
|
+
+ '(or set packager: "capacitor") and use Capacitor for android/ios builds.',
|
|
418
|
+
);
|
|
416
419
|
}
|
|
417
420
|
if (packager === 'capacitor') {
|
|
418
421
|
return 'capacitor';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makefully/adaptfully",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Platform abstraction and Wrapfully deploy client for Makefully games",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/node/index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"platform",
|
|
41
41
|
"deploy",
|
|
42
42
|
"build",
|
|
43
|
-
"
|
|
43
|
+
"capacitor",
|
|
44
44
|
"electron"
|
|
45
45
|
],
|
|
46
46
|
"contributors": [
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { Packager } from './base.js';
|
|
4
|
-
|
|
5
|
-
const CORDOVA_CSP = '<meta http-equiv="Content-Security-Policy" content="default-src * \'self\' data: gap: \'unsafe-inline\' \'unsafe-eval\'; style-src * \'self\' \'unsafe-inline\' \'unsafe-eval\' gap:; script-src * \'self\' \'unsafe-inline\' \'unsafe-eval\' gap:; frame-src *;" />';
|
|
6
|
-
|
|
7
|
-
const CORDOVA_VIEWPORT = '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />';
|
|
8
|
-
|
|
9
|
-
const CORDOVA_STUB = `/**
|
|
10
|
-
* Stub for non-Cordova environments. Cordova replaces this at runtime on device builds.
|
|
11
|
-
*/
|
|
12
|
-
window.cordova = null;
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
export class CordovaPackager extends Packager {
|
|
16
|
-
/** @type {'cordova'} */
|
|
17
|
-
static id = 'cordova';
|
|
18
|
-
|
|
19
|
-
/** @type {string[]} */
|
|
20
|
-
static defaultPlatforms = ['ios', 'android'];
|
|
21
|
-
|
|
22
|
-
needsGameConfig() {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** @param {string} dest */
|
|
27
|
-
applyTemplates(dest) {
|
|
28
|
-
fs.writeFileSync(path.join(dest, 'cordova.js'), CORDOVA_STUB);
|
|
29
|
-
this.log('adaptfully: write cordova.js');
|
|
30
|
-
|
|
31
|
-
super.applyTemplates(dest);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
buildHtmlInjection() {
|
|
35
|
-
const headExtras = [CORDOVA_CSP, CORDOVA_VIEWPORT];
|
|
36
|
-
const bodyScripts = ['<script src="cordova.js"></script>'];
|
|
37
|
-
|
|
38
|
-
if (this.needsGameConfig()) {
|
|
39
|
-
bodyScripts.push('<script src="game-config.js"></script>');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return this.formatHtmlInjection(headExtras, bodyScripts);
|
|
43
|
-
}
|
|
44
|
-
}
|