@whatfix_mobile/ionic-sdk 1.1.1 → 1.2.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 +22 -0
- package/Package.swift +1 -1
- package/README.md +55 -32
- package/package.json +42 -8
- package/plugin.xml +4 -12
- package/docs/npm-release.md +0 -149
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
- **Breaking:** CocoaPods integration is removed. iOS hosts must use Swift Package
|
|
6
|
+
Manager. Native iOS SDK 1.2.0 is published as a Swift package only, so the
|
|
7
|
+
plugin no longer declares a pod.
|
|
8
|
+
- Cordova: iOS platform `cordova-ios` 8.2.0 or newer is required by the
|
|
9
|
+
plugin's engine requirement. On an older iOS platform Cordova skips the
|
|
10
|
+
plugin for iOS and reports the failed version requirement. Cordova iOS 7
|
|
11
|
+
hosts must upgrade the platform before installing this version.
|
|
12
|
+
- Capacitor: the iOS project must use SPM
|
|
13
|
+
(`npx cap add ios --packagemanager SPM` for a new platform). An existing
|
|
14
|
+
CocoaPods iOS project must be migrated to SPM first; otherwise the build
|
|
15
|
+
fails with `No such module 'WhatfixMobileSDK'`.
|
|
16
|
+
- Xcode 16 or newer and an iOS 15.0 deployment target are required, as before
|
|
17
|
+
for SPM hosts. Android hosts are not affected.
|
|
18
|
+
- Pins the production native dependencies to Android SDK 1.2.0 and iOS SDK 1.2.0.
|
|
19
|
+
- With native SDK 1.2.0, an overlay fault no longer shuts the whole SDK down by
|
|
20
|
+
default: only the overlay is switched off, and it restarts the next time the
|
|
21
|
+
app returns to the foreground. An explicit `safety.kill_switch: true` in the
|
|
22
|
+
remote configuration keeps the SDK-wide shutdown.
|
|
23
|
+
- No change to the JavaScript API.
|
|
24
|
+
|
|
3
25
|
## 1.1.1
|
|
4
26
|
|
|
5
27
|
- Pins the production native dependencies to Android SDK 1.1.1 and iOS SDK 1.1.1.
|
package/Package.swift
CHANGED
|
@@ -12,7 +12,7 @@ let package = Package(
|
|
|
12
12
|
dependencies: [
|
|
13
13
|
// Cordova 8 substitutes its local runtime; Capacitor substitutes its compatibility package.
|
|
14
14
|
.package(url: "https://github.com/apache/cordova-ios.git", from: "8.0.0"),
|
|
15
|
-
.package(url: "https://github.com/whatfix/WhatfixMobileSDK.git", exact: "1.
|
|
15
|
+
.package(url: "https://github.com/whatfix/WhatfixMobileSDK.git", exact: "1.2.0")
|
|
16
16
|
],
|
|
17
17
|
targets: [
|
|
18
18
|
.target(
|
package/README.md
CHANGED
|
@@ -9,16 +9,17 @@ or telemetry transport.
|
|
|
9
9
|
|
|
10
10
|
| Platform | Production dependency |
|
|
11
11
|
| --- | --- |
|
|
12
|
-
| Android | `com.whatfix.android:whatfix-mobile-sdk:1.
|
|
13
|
-
| iOS | `WhatfixMobileSDK` `1.
|
|
12
|
+
| Android | `com.whatfix.android:whatfix-mobile-sdk:1.2.0` from Maven Central |
|
|
13
|
+
| iOS | `WhatfixMobileSDK` `1.2.0` through Swift Package Manager |
|
|
14
14
|
|
|
15
15
|
The Android dependency resolves from Maven Central. A missing Maven artifact is
|
|
16
16
|
a build prerequisite failure, not a reason to silently bundle another AAR.
|
|
17
17
|
The plugin consumes the published native SDKs rather than copying their implementation.
|
|
18
18
|
|
|
19
|
-
Host matrix: Cordova Android 13, Cordova iOS
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
Host matrix: Cordova Android 13, Cordova iOS 8.2 or newer, and Capacitor 7 on
|
|
20
|
+
Android/iOS. On iOS the plugin integrates through Swift Package Manager (SPM) only;
|
|
21
|
+
CocoaPods integration is not supported. iOS requires deployment target 15.0 or
|
|
22
|
+
newer, and the native SDK's SPM manifest requires Swift 6 tooling (Xcode 16 or newer).
|
|
22
23
|
Browser-only execution is not supported. Installation requires the native Android
|
|
23
24
|
or iOS build toolchain; adding the JavaScript package alone does not enable a browser runtime.
|
|
24
25
|
|
|
@@ -29,16 +30,21 @@ need a repository checkout or a locally built tarball.
|
|
|
29
30
|
|
|
30
31
|
### Capacitor
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
The iOS project must use Swift Package Manager. If the app does not yet have an
|
|
34
|
+
iOS platform, add it with `npx cap add ios --packagemanager SPM`; Capacitor 7
|
|
35
|
+
creates a CocoaPods project unless SPM is requested. An existing CocoaPods iOS
|
|
36
|
+
project must be migrated to SPM first: follow
|
|
37
|
+
[Capacitor's dependency-manager setup](https://capacitorjs.com/docs/ios/spm).
|
|
38
|
+
A CocoaPods project cannot resolve the native SDK and fails to compile with
|
|
39
|
+
`No such module 'WhatfixMobileSDK'`.
|
|
40
|
+
|
|
41
|
+
Prepare the native project **before installing the plugin and syncing**: set the
|
|
42
|
+
app deployment target to at least iOS 15.0. Capacitor 7 defaults to iOS 14.0,
|
|
43
|
+
which is too low for this native SDK. Capacitor copies the app's deployment
|
|
44
|
+
target into its generated Swift package when it syncs, so the order matters. If
|
|
45
|
+
the project was synced first, the build fails with
|
|
46
|
+
`requires minimum platform version 15.0 for the iOS platform, but this target supports 14.0`:
|
|
47
|
+
raise the deployment target in Xcode, then run `npx cap sync ios` again.
|
|
42
48
|
|
|
43
49
|
```sh
|
|
44
50
|
npm install @whatfix_mobile/ionic-sdk
|
|
@@ -61,20 +67,24 @@ cordova plugin add @whatfix_mobile/ionic-sdk
|
|
|
61
67
|
cordova prepare
|
|
62
68
|
```
|
|
63
69
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
The iOS platform requires **cordova-ios 8.2.0 or newer**; the plugin declares
|
|
71
|
+
this as its engine requirement. On an older iOS platform Cordova reports the failed
|
|
72
|
+
version requirement and skips the plugin for iOS, so `window.WhatfixMobile` is
|
|
73
|
+
unavailable there until the platform is upgraded. Earlier releases either have no Swift package support for plugins or,
|
|
74
|
+
in 8.0.0, hardcode an iOS 13 target in the generated package and do not apply the
|
|
75
|
+
app's deployment-target preference there. Cordova resolves the native SDK through
|
|
76
|
+
the plugin's `Package.swift`; the plugin has no CocoaPods declaration. Upgrade an
|
|
77
|
+
older iOS platform with `cordova platform rm ios` followed by
|
|
78
|
+
`cordova platform add ios@8.2.0` (or newer) before adding the plugin.
|
|
79
|
+
Do not manually add a second Whatfix SDK dependency to the host project. SPM is
|
|
80
|
+
the build-time dependency manager, not an iOS device-version check or a runtime
|
|
81
|
+
fallback when a download fails.
|
|
72
82
|
See [Cordova SPM support](https://cordova.apache.org/docs/en/latest/guide/platforms/ios/plugin.html#supporting-swift-package-manager-spm)
|
|
73
83
|
and [Capacitor's dependency-manager setup](https://capacitorjs.com/docs/ios/spm).
|
|
74
84
|
|
|
75
85
|
The commands above select the current npm release. For reproducible builds, an
|
|
76
|
-
exact package version is optional: use `npm install @whatfix_mobile/ionic-sdk@1.
|
|
77
|
-
or `cordova plugin add @whatfix_mobile/ionic-sdk@1.
|
|
86
|
+
exact package version is optional: use `npm install @whatfix_mobile/ionic-sdk@1.2.0`
|
|
87
|
+
or `cordova plugin add @whatfix_mobile/ionic-sdk@1.2.0` instead. Commit the host
|
|
78
88
|
application's lockfile and keep its platform and dependency-manager configuration.
|
|
79
89
|
|
|
80
90
|
Keep the native SDK's merged Android startup provider enabled. It registers
|
|
@@ -263,8 +273,10 @@ JavaScript cannot contain native process crashes or Objective-C exceptions.
|
|
|
263
273
|
| Works in a native app but not `ionic serve` or a desktop browser | Browser-only execution is unsupported. Use an Android/iOS simulator or device build with the plugin installed; `UNAVAILABLE` is expected without a native bridge. |
|
|
264
274
|
| `INVALID_ARGUMENT` | Replace the enterprise placeholder with the issued UUID, use `US` or `EU`, and check the method table and required date format. Numbers must be finite numbers; dates must be valid dates or integer milliseconds. |
|
|
265
275
|
| Native start resolves but Creator/overlays do not appear | Resolution means dispatch only. Confirm the enterprise, region, native configuration, and whether Creator was requested. A prior `disable()` requires app relaunch; repeated start is not a restart API. |
|
|
266
|
-
| iOS dependency requires a higher deployment target | Set the app
|
|
267
|
-
|
|
|
276
|
+
| iOS dependency requires a higher deployment target | Set the app deployment target to iOS 15.0 or newer. Use Xcode 16 or newer, and Cordova iOS 8.2 or newer for Cordova hosts. |
|
|
277
|
+
| iOS build fails with `No such module 'WhatfixMobileSDK'`, or Cordova skips the plugin for iOS with a failed `cordova-ios` version requirement | The iOS project is not using Swift Package Manager. Upgrade Cordova iOS to 8.2 or newer, or migrate the Capacitor iOS project from CocoaPods to SPM. CocoaPods integration is not supported from 1.2.0. |
|
|
278
|
+
| iOS build fails with `requires minimum platform version 15.0 for the iOS platform` | The Capacitor iOS project was synced while its deployment target was below 15.0. Set the app deployment target to 15.0 or newer, then run `npx cap sync ios` again. |
|
|
279
|
+
| Gradle or SPM cannot find/download the native artifact | Check the exact native pin above, repository access, connectivity and the first dependency-resolution error. Android uses Maven Central; SPM downloads the published native package/binary from GitHub. Do not silently substitute another AAR/framework or bypass TLS checks. |
|
|
268
280
|
| iOS QR scanning does not request/open the camera | Supply `NSCameraUsageDescription`, enable the intended Creator flow, and check system camera permission. Do not add arbitrary network exceptions to address a camera-permission problem. |
|
|
269
281
|
|
|
270
282
|
## Observer And Safety
|
|
@@ -283,17 +295,28 @@ WebView debugging is process-wide, not restricted to the SDK overlay.
|
|
|
283
295
|
|
|
284
296
|
## Release Notes
|
|
285
297
|
|
|
298
|
+
### 1.2.0
|
|
299
|
+
|
|
300
|
+
- **Breaking:** CocoaPods integration is removed. iOS hosts must use Swift Package
|
|
301
|
+
Manager: Cordova iOS 8.2 or newer, or a Capacitor iOS project created with or
|
|
302
|
+
migrated to SPM. Android hosts are not affected.
|
|
303
|
+
- Uses production Android and iOS native SDK dependencies pinned to 1.2.0.
|
|
304
|
+
- With native SDK 1.2.0, an overlay fault switches off only the overlay by default
|
|
305
|
+
and it restarts when the app next returns to the foreground. An explicit
|
|
306
|
+
`safety.kill_switch: true` in the remote configuration keeps the SDK-wide shutdown.
|
|
307
|
+
- No change to the JavaScript API.
|
|
308
|
+
|
|
286
309
|
### 1.1.1
|
|
287
310
|
|
|
288
311
|
- Uses production Android and iOS native SDK dependencies pinned to 1.1.1.
|
|
289
312
|
- Provides the shared typed Cordova/Capacitor bridge for initialization, identity,
|
|
290
313
|
properties, flush, logout, and terminal disable.
|
|
291
|
-
-
|
|
292
|
-
|
|
314
|
+
- Supported iOS integration through CocoaPods or SPM. JavaScript promises
|
|
315
|
+
acknowledge dispatch, not native readiness or delivery.
|
|
293
316
|
|
|
294
317
|
The package includes `CHANGELOG.md`. Its
|
|
295
|
-
[full changelog](https://unpkg.com/@whatfix_mobile/ionic-sdk@1.
|
|
296
|
-
available from the public package CDN after version 1.
|
|
318
|
+
[full changelog](https://unpkg.com/@whatfix_mobile/ionic-sdk@1.2.0/CHANGELOG.md) is also
|
|
319
|
+
available from the public package CDN after version 1.2.0 is published. These
|
|
297
320
|
inline notes do not require repository access or a separate npm changelog tab.
|
|
298
321
|
|
|
299
322
|
## License
|
|
@@ -301,4 +324,4 @@ inline notes do not require repository access or a separate npm changelog tab.
|
|
|
301
324
|
The Whatfix Mobile SDK License Agreement is included unchanged as `LICENSE.pdf`
|
|
302
325
|
in this package. Read the full agreement before downloading, installing or using
|
|
303
326
|
the SDK. After publication, the PDF is also available from the
|
|
304
|
-
[public package CDN](https://unpkg.com/@whatfix_mobile/ionic-sdk@1.
|
|
327
|
+
[public package CDN](https://unpkg.com/@whatfix_mobile/ionic-sdk@1.2.0/LICENSE.pdf).
|
package/package.json
CHANGED
|
@@ -1,21 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatfix_mobile/ionic-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Whatfix native SDK bridge for Ionic apps using Cordova or Capacitor",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
"files": [
|
|
8
|
+
"index.js",
|
|
9
|
+
"index.d.ts",
|
|
10
|
+
"www/",
|
|
11
|
+
"src/android/",
|
|
12
|
+
"src/ios/",
|
|
13
|
+
"plugin.xml",
|
|
14
|
+
"Package.swift",
|
|
15
|
+
"README.md",
|
|
16
|
+
"CHANGELOG.md",
|
|
17
|
+
"LICENSE.pdf"
|
|
18
|
+
],
|
|
19
|
+
"cordova": {
|
|
20
|
+
"id": "com.whatfix.ionic",
|
|
21
|
+
"platforms": [
|
|
22
|
+
"android",
|
|
23
|
+
"ios"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/whatfix/ionic-sdk.git"
|
|
29
|
+
},
|
|
10
30
|
"license": "SEE LICENSE IN LICENSE.pdf",
|
|
11
|
-
"keywords": [
|
|
12
|
-
|
|
31
|
+
"keywords": [
|
|
32
|
+
"ionic",
|
|
33
|
+
"cordova",
|
|
34
|
+
"capacitor",
|
|
35
|
+
"ecosystem:cordova",
|
|
36
|
+
"cordova-android",
|
|
37
|
+
"cordova-ios",
|
|
38
|
+
"whatfix"
|
|
39
|
+
],
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": "^20.19.0 || ^22.13.0 || >=24.0.0"
|
|
42
|
+
},
|
|
13
43
|
"scripts": {
|
|
44
|
+
"lint": "eslint index.js www/ scripts/ --max-warnings 0",
|
|
14
45
|
"test": "node --test tests/js/*.test.cjs",
|
|
15
46
|
"test:types": "tsc -p tests/types/tsconfig.json",
|
|
16
47
|
"test:package": "node tests/integration/verify-package.mjs",
|
|
17
|
-
"test:release": "node --test tests/integration/npm-release.test.mjs tests/integration/github-release.test.mjs tests/integration/package-validation.test.cjs && python3 -m unittest discover -s tests/integration -p '
|
|
48
|
+
"test:release": "node --test tests/integration/npm-release.test.mjs tests/integration/github-release.test.mjs tests/integration/package-validation.test.cjs && python3 -m unittest discover -s tests/integration -p 'test_*release.py'",
|
|
18
49
|
"check": "npm test && npm run test:types && npm run test:package"
|
|
19
50
|
},
|
|
20
|
-
"devDependencies": {
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"eslint": "10.15.0",
|
|
53
|
+
"typescript": "5.9.3"
|
|
54
|
+
}
|
|
21
55
|
}
|
package/plugin.xml
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
3
|
-
id="com.whatfix.ionic" version="1.
|
|
3
|
+
id="com.whatfix.ionic" version="1.2.0">
|
|
4
4
|
<name>WhatfixMobile</name>
|
|
5
5
|
<description>Whatfix native SDK bridge for Cordova and Capacitor</description>
|
|
6
|
-
<license>
|
|
6
|
+
<license>SEE LICENSE IN LICENSE.pdf</license>
|
|
7
7
|
<engines>
|
|
8
8
|
<engine name="cordova-android" version=">=13.0.0" />
|
|
9
|
-
<engine name="cordova-ios" version=">=
|
|
9
|
+
<engine name="cordova-ios" version=">=8.2.0" />
|
|
10
10
|
</engines>
|
|
11
11
|
<js-module src="www/whatfix-mobile.js" name="WhatfixMobile">
|
|
12
12
|
<clobbers target="WhatfixMobile" />
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</feature>
|
|
19
19
|
</config-file>
|
|
20
20
|
<source-file src="src/android/WhatfixMobilePlugin.java" target-dir="src/com/whatfix/ionic" />
|
|
21
|
-
<framework src="com.whatfix.android:whatfix-mobile-sdk:1.
|
|
21
|
+
<framework src="com.whatfix.android:whatfix-mobile-sdk:1.2.0" />
|
|
22
22
|
</platform>
|
|
23
23
|
<platform name="ios" package="swift">
|
|
24
24
|
<config-file target="config.xml" parent="/*">
|
|
@@ -27,13 +27,5 @@
|
|
|
27
27
|
</feature>
|
|
28
28
|
</config-file>
|
|
29
29
|
<source-file src="src/ios/WhatfixMobilePlugin.swift" />
|
|
30
|
-
<podspec>
|
|
31
|
-
<config>
|
|
32
|
-
<source url="https://cdn.cocoapods.org/" />
|
|
33
|
-
</config>
|
|
34
|
-
<pods use-frameworks="true">
|
|
35
|
-
<pod name="WhatfixMobileSDK" spec="1.1.1" nospm="true" />
|
|
36
|
-
</pods>
|
|
37
|
-
</podspec>
|
|
38
30
|
</platform>
|
|
39
31
|
</plugin>
|
package/docs/npm-release.md
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
# Ionic npm release
|
|
2
|
-
|
|
3
|
-
Tracking: [FIX-139953](https://whatfix.atlassian.net/browse/FIX-139953).
|
|
4
|
-
Package: `@whatfix_mobile/ionic-sdk`. Both Capacitor and Cordova use this package.
|
|
5
|
-
|
|
6
|
-
## Trigger and versions
|
|
7
|
-
|
|
8
|
-
- `.github/workflows/npm-publish.yml` follows the native SDK release convention:
|
|
9
|
-
a closed, **merged**, same-repository PR whose source starts with `FIX-` or `SUCC-` (case-insensitive)
|
|
10
|
-
and whose target equals the `native` entry in the organization `ARGUS_PODS` JSON
|
|
11
|
-
variable. It does not hard-code a pod branch or publish from arbitrary pushes.
|
|
12
|
-
- Open/reopened/updated PRs and manual `workflow_dispatch` runs only validate and
|
|
13
|
-
dry-run. They receive neither npm publishing credentials nor native-repo tokens.
|
|
14
|
-
- Change **only `sdkVersion` in `version.properties`** for the wrapper version.
|
|
15
|
-
The preparation helper stamps `package.json`, both root lockfile version fields,
|
|
16
|
-
and the root `plugin.xml` version in the CI checkout before validation. It does
|
|
17
|
-
not commit generated metadata or change the native SDK versions in source.
|
|
18
|
-
- For an eligible merge, preparation resolves `/releases/latest` once from each
|
|
19
|
-
of `whatfix/wfx-android-sdk` and `whatfix/wfx-ios-sdk`. Both responses must be
|
|
20
|
-
published, non-prerelease releases with valid version tags. A missing release,
|
|
21
|
-
authentication error, or invalid response stops the build; there is no fallback.
|
|
22
|
-
- Before releasing, CI also checks that the selected Android production POM and
|
|
23
|
-
AAR are available from Maven Central, with bounded propagation retries. Missing
|
|
24
|
-
artifacts stop the release before GitHub/npm publication, not customer installs.
|
|
25
|
-
- The tarball's Android Maven dependency and both iOS dependency-manager paths
|
|
26
|
-
are pinned to these independently resolved versions. Android and iOS need not
|
|
27
|
-
match the wrapper or each other, but the iOS CocoaPods and SPM pins must match.
|
|
28
|
-
Local/PR dry-runs retain the checked-in native pins.
|
|
29
|
-
- SPM consumes the public `https://github.com/whatfix/WhatfixMobileSDK.git`
|
|
30
|
-
package with an exact version. The private SDK repository is used only to
|
|
31
|
-
discover release versions, never as a customer dependency.
|
|
32
|
-
- Stable wrapper versions use npm `latest`; prerelease versions use `next`.
|
|
33
|
-
Build metadata (`+...`) is not supported for release versions.
|
|
34
|
-
|
|
35
|
-
Open PR validation uses the event's `github.sha`, not the possibly stale
|
|
36
|
-
`pull_request.merge_commit_sha`. Published releases use the immutable approved
|
|
37
|
-
merge SHA throughout. Release jobs are serialized,
|
|
38
|
-
and running publication is not canceled by another merge. GitHub may replace a
|
|
39
|
-
pending concurrency-group run with a newer pending run; check Actions when
|
|
40
|
-
merging several release-version PRs close together.
|
|
41
|
-
|
|
42
|
-
## Repository setup before the first release
|
|
43
|
-
|
|
44
|
-
1. Grant this repository access to organization variable `ARGUS_PODS`, for example
|
|
45
|
-
`[{"pod_name":"native","branch_name":"feature/pod_native_v2"}]`.
|
|
46
|
-
2. Make **`WFX_BUILD_DEPLOY_APP_ID`** and **`WFX_BUILD_DEPLOY_APP_PRIVATE_KEY`**
|
|
47
|
-
available as repository secrets or organization secrets accessible to
|
|
48
|
-
`ionic-sdk`, using the same GitHub App as MAUI. Its installation must include
|
|
49
|
-
`whatfix/wfx-android-sdk` and `whatfix/wfx-ios-sdk` with Contents read access.
|
|
50
|
-
These secrets must be available to the preparation job, not only the `npm`
|
|
51
|
-
environment. The workflow generates a short-lived installation token scoped
|
|
52
|
-
to those two repositories with Contents read permission; it retains the
|
|
53
|
-
action's default post-job token revocation. Token creation and use are gated
|
|
54
|
-
to eligible merged PRs in `whatfix/ionic-sdk`, never open PRs or manual dry-runs.
|
|
55
|
-
No `NATIVE_SDK_RELEASE_TOKEN` personal token is needed. The automatic
|
|
56
|
-
repository `GITHUB_TOKEN` cannot read these other private repositories.
|
|
57
|
-
3. Create protected GitHub environment **`npm`**. Restrict deployment branches to
|
|
58
|
-
the approved Native pod branch, require a release reviewer, and prevent
|
|
59
|
-
self-approval where available. Keep this aligned when `ARGUS_PODS` changes.
|
|
60
|
-
4. In that environment add **`NPM_TOKEN`**, a granular npm token with permission
|
|
61
|
-
to publish `@whatfix_mobile/ionic-sdk` under the approved `@whatfix_mobile` organization.
|
|
62
|
-
For the first version it must permit creating that package. Configure the
|
|
63
|
-
supported noninteractive/2FA publishing permission per organization policy,
|
|
64
|
-
not an interactive npm login. Set an expiry and rotate the secret before it.
|
|
65
|
-
PR validation and package preparation never receive this write token.
|
|
66
|
-
5. Confirm package-name ownership, public-distribution approval, and license.
|
|
67
|
-
The user requested **public** publication with the supplied Whatfix Mobile SDK
|
|
68
|
-
License Agreement. The unchanged PDF ships as `LICENSE.pdf`, referenced by
|
|
69
|
-
`SEE LICENSE IN LICENSE.pdf` metadata. Before publishing, confirm with the
|
|
70
|
-
license owner that its binary-form SDK definition covers this package's
|
|
71
|
-
JavaScript and native bridge source files; do not rewrite the agreement.
|
|
72
|
-
6. Verify the resolved production versions are actually available in Maven
|
|
73
|
-
Central, CocoaPods and the SPM distribution and pass generated-host validation
|
|
74
|
-
for both iOS managers. A GitHub release alone is not proof consumers can
|
|
75
|
-
resolve its dependencies without private repository credentials.
|
|
76
|
-
7. Permit the release job's repository `GITHUB_TOKEN` to write Contents. Only
|
|
77
|
-
the GitHub Release job requests this permission; no extra PAT is needed.
|
|
78
|
-
|
|
79
|
-
This private GitHub repository does not support npm provenance attestation;
|
|
80
|
-
the workflow does not claim provenance. It retains the source SHA, native release
|
|
81
|
-
metadata, package contents report, runtime test evidence, and tarball SHA-256.
|
|
82
|
-
See [npm publishing in CI](https://docs.npmjs.com/using-private-packages-in-a-ci-cd-workflow/)
|
|
83
|
-
and [provenance requirements](https://docs.npmjs.com/generating-provenance-statements/).
|
|
84
|
-
|
|
85
|
-
## Validation and release
|
|
86
|
-
|
|
87
|
-
1. Bump `sdkVersion` in the PR. Run `python3 scripts/prepare-release.py` locally
|
|
88
|
-
to prepare matching local manifests before packaging (do not unintentionally
|
|
89
|
-
commit these generated version changes).
|
|
90
|
-
2. CI runs release-tool tests, locked dependency installation, `npm run check`,
|
|
91
|
-
package validation, both existing JavaScript bridge checks against the packed
|
|
92
|
-
snapshot, and a clean tarball install with TypeScript consumer checks.
|
|
93
|
-
3. The exact validated tarball is passed through `npm publish --dry-run`. The
|
|
94
|
-
version, checksum, and source commit appear in the Actions summary.
|
|
95
|
-
4. After an eligible merge, the GitHub Release job creates `v<version>` at the
|
|
96
|
-
merge commit. It uploads the validated tarball and evidence to a draft, then
|
|
97
|
-
publishes the completed release. Existing tags must match the merge SHA;
|
|
98
|
-
existing assets are never overwritten and an existing archive must match.
|
|
99
|
-
5. Review the `npm` environment gate. The npm job runs only after GitHub Release
|
|
100
|
-
succeeds. It downloads that release's tarball and report, checks the archive
|
|
101
|
-
against the SHA-256 passed independently from the package job, rechecks
|
|
102
|
-
merge eligibility, checks the registry for the exact version, then publishes
|
|
103
|
-
without lifecycle scripts. It never repacks or rewrites dist-tags.
|
|
104
|
-
6. Verify the npm page and install the exact version in a clean consumer:
|
|
105
|
-
`npm install --ignore-scripts @whatfix_mobile/ionic-sdk@<version>`.
|
|
106
|
-
Confirm native registry availability and generated-host integration before
|
|
107
|
-
calling the release ready for customers. JavaScript tests are not device or
|
|
108
|
-
live Observer delivery tests. SDK runtime and Observer behavior are unchanged.
|
|
109
|
-
|
|
110
|
-
Local dry-run (no secrets, no publication):
|
|
111
|
-
|
|
112
|
-
```sh
|
|
113
|
-
python3 scripts/prepare-release.py
|
|
114
|
-
npm ci --ignore-scripts
|
|
115
|
-
npm run check
|
|
116
|
-
node tests/integration/verify-package.mjs --out /tmp/ionic-npm-candidate
|
|
117
|
-
node tests/integration/verify-consumer.mjs --report /tmp/ionic-npm-candidate/package-report.json
|
|
118
|
-
node scripts/npm-release.mjs --report /tmp/ionic-npm-candidate/package-report.json --version 0.1.0 --tag next
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Use a fresh output directory and the version from `version.properties`.
|
|
122
|
-
Manual Actions dry-run becomes selectable when this workflow reaches the
|
|
123
|
-
repository's default branch; it never publishes.
|
|
124
|
-
|
|
125
|
-
## Failures and retries
|
|
126
|
-
|
|
127
|
-
- A version already present in npm stops publication with an explicit duplicate
|
|
128
|
-
message. No automatic version bump, unpublish, overwrite or dist-tag change
|
|
129
|
-
occurs. Bump `sdkVersion` if there is new content to release.
|
|
130
|
-
- Only a structured npm `E404` for the exact version permits the publish attempt.
|
|
131
|
-
Authentication, throttling, network and unknown errors fail closed.
|
|
132
|
-
- npm publication failure/timeout can mean the upload succeeded but its response
|
|
133
|
-
was lost. Check the exact registry version before rerunning. Never resolve
|
|
134
|
-
ambiguity by unpublishing or changing an unrelated dist-tag.
|
|
135
|
-
- A complete rerun resolves native latest releases again. Compare the new
|
|
136
|
-
`release-inputs.json` and checksum before approving it. Rerunning only the
|
|
137
|
-
failed npm job reuses the original GitHub Release archive, even if Actions
|
|
138
|
-
artifacts have expired. If a rebuild differs from the existing release, it
|
|
139
|
-
fails rather than replacing that release; use a new sdkVersion for new content.
|
|
140
|
-
- An interrupted GitHub upload leaves a draft. Rerun the failed GitHub Release
|
|
141
|
-
job with the original Actions artifact (retained for 30 days) to verify existing
|
|
142
|
-
files and upload missing files. A partial published release fails validation;
|
|
143
|
-
investigate rather than overwriting assets. No npm upload runs before this gate.
|
|
144
|
-
- If native registry publication is delayed, wait for it and rerun validation;
|
|
145
|
-
do not substitute local AAR/XCFramework paths into the npm package.
|
|
146
|
-
|
|
147
|
-
The first actual npm publish and post-publication installation require approved
|
|
148
|
-
credentials and a release run. Local tests/dry-runs do not establish that these
|
|
149
|
-
external permissions are configured or that npm accepted a release.
|