@akanjs/cli 2.4.0-rc.5 → 2.4.0-rc.7
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/incrementalBuilder.proc.js +23 -2
- package/index.js +23 -2
- package/package.json +2 -2
|
@@ -1048,7 +1048,7 @@ CMD [${command.map((c) => `"${c}"`).join(",")}]`;
|
|
|
1048
1048
|
return this.#getMissingDependencySpecs(this.getDatabaseModeRuntimePackages(databaseMode));
|
|
1049
1049
|
}
|
|
1050
1050
|
getMobileRuntimePackages() {
|
|
1051
|
-
return [...MOBILE_RUNTIME_PACKAGES];
|
|
1051
|
+
return [...new Set([...MOBILE_RUNTIME_PACKAGES, ...MOBILE_APP_CAPACITOR_PLUGINS])];
|
|
1052
1052
|
}
|
|
1053
1053
|
getMissingMobileDependencySpecs() {
|
|
1054
1054
|
return this.#getMissingDependencySpecs(this.getMobileRuntimePackages());
|
|
@@ -14198,7 +14198,7 @@ function parseSimctlDevices(output) {
|
|
|
14198
14198
|
try {
|
|
14199
14199
|
const json = JSON.parse(output);
|
|
14200
14200
|
const devices = json.devices ?? {};
|
|
14201
|
-
return Object.values(devices).
|
|
14201
|
+
return Object.values(devices).flat().filter(isRecord2).flatMap((device) => {
|
|
14202
14202
|
const id = firstString(device.udid, device.UDID, device.identifier);
|
|
14203
14203
|
const name = firstString(device.name, device.displayName);
|
|
14204
14204
|
const isAvailable = device.isAvailable !== false && device.availabilityError === undefined;
|
|
@@ -14376,6 +14376,16 @@ function getAdbDeviceStateIssues(output) {
|
|
|
14376
14376
|
return [];
|
|
14377
14377
|
});
|
|
14378
14378
|
}
|
|
14379
|
+
var ANDROID_MIN_SDK_VERSION = 26;
|
|
14380
|
+
function raiseGradleMinSdkVersion(content, floor = ANDROID_MIN_SDK_VERSION) {
|
|
14381
|
+
const match = content.match(/minSdkVersion\s*=\s*(\d+)/);
|
|
14382
|
+
if (!match?.[1])
|
|
14383
|
+
return null;
|
|
14384
|
+
const current = Number.parseInt(match[1], 10);
|
|
14385
|
+
if (Number.isNaN(current) || current >= floor)
|
|
14386
|
+
return null;
|
|
14387
|
+
return content.replace(/(minSdkVersion\s*=\s*)\d+/, `$1${floor}`);
|
|
14388
|
+
}
|
|
14379
14389
|
var mergeAllowNavigation = (configured, localIp) => {
|
|
14380
14390
|
const values = Array.isArray(configured) ? configured.filter((value) => typeof value === "string") : [];
|
|
14381
14391
|
if (localIp)
|
|
@@ -14692,6 +14702,7 @@ ${error.message}`;
|
|
|
14692
14702
|
await this.#prepareTargetAssets();
|
|
14693
14703
|
await this.#prepareExternalFiles("android");
|
|
14694
14704
|
await this.#applyAndroidMetadata();
|
|
14705
|
+
await this.#applyAndroidMinSdkVersion();
|
|
14695
14706
|
await this.#applyPermissions({ operation, env });
|
|
14696
14707
|
await this.#applyDeepLinks("android", { operation, env });
|
|
14697
14708
|
await this.project.commit();
|
|
@@ -14907,6 +14918,16 @@ ${error.message}`;
|
|
|
14907
14918
|
await this.project.android.setVersionCode(this.target.buildNum);
|
|
14908
14919
|
await this.project.android.setAppName(this.target.appName);
|
|
14909
14920
|
}
|
|
14921
|
+
async#applyAndroidMinSdkVersion() {
|
|
14922
|
+
const variablesGradlePath = path42.join(this.app.cwdPath, this.androidRootPath, "variables.gradle");
|
|
14923
|
+
if (!await Bun.file(variablesGradlePath).exists())
|
|
14924
|
+
return;
|
|
14925
|
+
const updated = raiseGradleMinSdkVersion(await Bun.file(variablesGradlePath).text());
|
|
14926
|
+
if (!updated)
|
|
14927
|
+
return;
|
|
14928
|
+
await writeFile3(variablesGradlePath, updated);
|
|
14929
|
+
this.app.verbose(`Raised Android minSdkVersion to ${ANDROID_MIN_SDK_VERSION} in variables.gradle`);
|
|
14930
|
+
}
|
|
14910
14931
|
async#applyPermissions({ operation, env }) {
|
|
14911
14932
|
const plugins = await this.app.collectPlugins();
|
|
14912
14933
|
const nativePlugins = new Map;
|
package/index.js
CHANGED
|
@@ -1046,7 +1046,7 @@ CMD [${command.map((c) => `"${c}"`).join(",")}]`;
|
|
|
1046
1046
|
return this.#getMissingDependencySpecs(this.getDatabaseModeRuntimePackages(databaseMode));
|
|
1047
1047
|
}
|
|
1048
1048
|
getMobileRuntimePackages() {
|
|
1049
|
-
return [...MOBILE_RUNTIME_PACKAGES];
|
|
1049
|
+
return [...new Set([...MOBILE_RUNTIME_PACKAGES, ...MOBILE_APP_CAPACITOR_PLUGINS])];
|
|
1050
1050
|
}
|
|
1051
1051
|
getMissingMobileDependencySpecs() {
|
|
1052
1052
|
return this.#getMissingDependencySpecs(this.getMobileRuntimePackages());
|
|
@@ -14196,7 +14196,7 @@ function parseSimctlDevices(output) {
|
|
|
14196
14196
|
try {
|
|
14197
14197
|
const json = JSON.parse(output);
|
|
14198
14198
|
const devices = json.devices ?? {};
|
|
14199
|
-
return Object.values(devices).
|
|
14199
|
+
return Object.values(devices).flat().filter(isRecord2).flatMap((device) => {
|
|
14200
14200
|
const id = firstString(device.udid, device.UDID, device.identifier);
|
|
14201
14201
|
const name = firstString(device.name, device.displayName);
|
|
14202
14202
|
const isAvailable = device.isAvailable !== false && device.availabilityError === undefined;
|
|
@@ -14374,6 +14374,16 @@ function getAdbDeviceStateIssues(output) {
|
|
|
14374
14374
|
return [];
|
|
14375
14375
|
});
|
|
14376
14376
|
}
|
|
14377
|
+
var ANDROID_MIN_SDK_VERSION = 26;
|
|
14378
|
+
function raiseGradleMinSdkVersion(content, floor = ANDROID_MIN_SDK_VERSION) {
|
|
14379
|
+
const match = content.match(/minSdkVersion\s*=\s*(\d+)/);
|
|
14380
|
+
if (!match?.[1])
|
|
14381
|
+
return null;
|
|
14382
|
+
const current = Number.parseInt(match[1], 10);
|
|
14383
|
+
if (Number.isNaN(current) || current >= floor)
|
|
14384
|
+
return null;
|
|
14385
|
+
return content.replace(/(minSdkVersion\s*=\s*)\d+/, `$1${floor}`);
|
|
14386
|
+
}
|
|
14377
14387
|
var mergeAllowNavigation = (configured, localIp) => {
|
|
14378
14388
|
const values = Array.isArray(configured) ? configured.filter((value) => typeof value === "string") : [];
|
|
14379
14389
|
if (localIp)
|
|
@@ -14690,6 +14700,7 @@ ${error.message}`;
|
|
|
14690
14700
|
await this.#prepareTargetAssets();
|
|
14691
14701
|
await this.#prepareExternalFiles("android");
|
|
14692
14702
|
await this.#applyAndroidMetadata();
|
|
14703
|
+
await this.#applyAndroidMinSdkVersion();
|
|
14693
14704
|
await this.#applyPermissions({ operation, env });
|
|
14694
14705
|
await this.#applyDeepLinks("android", { operation, env });
|
|
14695
14706
|
await this.project.commit();
|
|
@@ -14905,6 +14916,16 @@ ${error.message}`;
|
|
|
14905
14916
|
await this.project.android.setVersionCode(this.target.buildNum);
|
|
14906
14917
|
await this.project.android.setAppName(this.target.appName);
|
|
14907
14918
|
}
|
|
14919
|
+
async#applyAndroidMinSdkVersion() {
|
|
14920
|
+
const variablesGradlePath = path42.join(this.app.cwdPath, this.androidRootPath, "variables.gradle");
|
|
14921
|
+
if (!await Bun.file(variablesGradlePath).exists())
|
|
14922
|
+
return;
|
|
14923
|
+
const updated = raiseGradleMinSdkVersion(await Bun.file(variablesGradlePath).text());
|
|
14924
|
+
if (!updated)
|
|
14925
|
+
return;
|
|
14926
|
+
await writeFile3(variablesGradlePath, updated);
|
|
14927
|
+
this.app.verbose(`Raised Android minSdkVersion to ${ANDROID_MIN_SDK_VERSION} in variables.gradle`);
|
|
14928
|
+
}
|
|
14908
14929
|
async#applyPermissions({ operation, env }) {
|
|
14909
14930
|
const plugins = await this.app.collectPlugins();
|
|
14910
14931
|
const nativePlugins = new Map;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "2.4.0-rc.
|
|
3
|
+
"version": "2.4.0-rc.7",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@langchain/openai": "^1.4.6",
|
|
35
35
|
"@tailwindcss/node": "^4.3.0",
|
|
36
36
|
"@trapezedev/project": "^7.1.4",
|
|
37
|
-
"akanjs": "2.4.0-rc.
|
|
37
|
+
"akanjs": "2.4.0-rc.7",
|
|
38
38
|
"chalk": "^5.6.2",
|
|
39
39
|
"commander": "^14.0.3",
|
|
40
40
|
"daisyui": "5.5.23",
|