@hot-updater/apple-helper 1.2.0-rc.47 → 1.2.0-rc.49
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/dist/index.cjs +23 -17
- package/dist/index.mjs +24 -18
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1752,13 +1752,18 @@ const formatCommand = (words, width = 74) => {
|
|
|
1752
1752
|
//#endregion
|
|
1753
1753
|
//#region src/utils/cocoapods.ts
|
|
1754
1754
|
/**
|
|
1755
|
-
* A failed command's error
|
|
1756
|
-
* output,
|
|
1755
|
+
* A failed command's error, as `native-build` prints a refusal: why, from its
|
|
1756
|
+
* output without stack frames, then `rerun`, the command to run in the
|
|
1757
|
+
* project, on one line, as the one next step.
|
|
1757
1758
|
*/
|
|
1758
|
-
const commandFailure = (command, error) => {
|
|
1759
|
-
const {
|
|
1760
|
-
|
|
1761
|
-
|
|
1759
|
+
const commandFailure = (command, error, rerun) => {
|
|
1760
|
+
const { message } = (0, _hot_updater_cli_tools.commandFailedError)(command, error, rerun);
|
|
1761
|
+
return new _hot_updater_cli_tools.BuildFailedError(message, {
|
|
1762
|
+
logPath: null,
|
|
1763
|
+
summary: [],
|
|
1764
|
+
hint: message,
|
|
1765
|
+
cause: error
|
|
1766
|
+
});
|
|
1762
1767
|
};
|
|
1763
1768
|
/**
|
|
1764
1769
|
* A line of the progress meter curl prints on stderr for each pod it
|
|
@@ -1862,7 +1867,7 @@ const installPodsIfNeeded = async (sourceDir) => {
|
|
|
1862
1867
|
});
|
|
1863
1868
|
} catch (error) {
|
|
1864
1869
|
bundleSpinner.error("bundle install failed");
|
|
1865
|
-
throw commandFailure("bundle install", error);
|
|
1870
|
+
throw commandFailure("bundle install", error, sourceDir === (0, _hot_updater_cli_tools.getCwd)() ? "bundle install" : `${(0, _hot_updater_cli_tools.shellCommandLine)((0, _hot_updater_cli_tools.getCwd)(), ["cd", sourceDir])} && bundle install`);
|
|
1866
1871
|
}
|
|
1867
1872
|
bundleSpinner.stop("Ruby gems installed");
|
|
1868
1873
|
}
|
|
@@ -1899,24 +1904,25 @@ const runReactNativeCodegen = async ({ projectRoot, reactNativePath, sourceDir }
|
|
|
1899
1904
|
recursive: true,
|
|
1900
1905
|
force: true
|
|
1901
1906
|
});
|
|
1907
|
+
const args = [
|
|
1908
|
+
path.default.join(reactNativePath, "scripts", "generate-codegen-artifacts.js"),
|
|
1909
|
+
"-p",
|
|
1910
|
+
projectRoot,
|
|
1911
|
+
"-o",
|
|
1912
|
+
sourceDir,
|
|
1913
|
+
"-t",
|
|
1914
|
+
"ios"
|
|
1915
|
+
];
|
|
1902
1916
|
const spinner = _hot_updater_cli_tools.p.spinner();
|
|
1903
1917
|
spinner.start("Running React Native codegen");
|
|
1904
1918
|
try {
|
|
1905
|
-
await (0, execa.execa)("node",
|
|
1906
|
-
path.default.join(reactNativePath, "scripts", "generate-codegen-artifacts.js"),
|
|
1907
|
-
"-p",
|
|
1908
|
-
projectRoot,
|
|
1909
|
-
"-o",
|
|
1910
|
-
sourceDir,
|
|
1911
|
-
"-t",
|
|
1912
|
-
"ios"
|
|
1913
|
-
], {
|
|
1919
|
+
await (0, execa.execa)("node", args, {
|
|
1914
1920
|
cwd: projectRoot,
|
|
1915
1921
|
all: true
|
|
1916
1922
|
});
|
|
1917
1923
|
} catch (error) {
|
|
1918
1924
|
spinner.error("React Native codegen failed");
|
|
1919
|
-
throw commandFailure("React Native codegen", error);
|
|
1925
|
+
throw commandFailure("React Native codegen", error, (0, _hot_updater_cli_tools.shellCommandLine)(projectRoot, ["node", ...args]));
|
|
1920
1926
|
}
|
|
1921
1927
|
spinner.stop("React Native codegen done");
|
|
1922
1928
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
3
|
-
import { BuildFailedError, BuildLogger, colors, createCredentialResolver, createMinBundleId, getCwd, getReactNativeMetadatas, isCI, p, parseSecretReference, registerSecretValue } from "@hot-updater/cli-tools";
|
|
3
|
+
import { BuildFailedError, BuildLogger, colors, commandFailedError, createCredentialResolver, createMinBundleId, getCwd, getReactNativeMetadatas, isCI, p, parseSecretReference, registerSecretValue, shellCommandLine } from "@hot-updater/cli-tools";
|
|
4
4
|
import { SANDBOX_INFO_PLIST_KEY, SANDBOX_URL_SCHEME_INFO_PLIST_KEY, SANDBOX_URL_TYPE_NAME, blobSource, isRecordedUrlSchemeSyntax, isSandboxUrlScheme, normalizeIosUdid, readIpaInstallInfo, readProvisioningProfile, recordedSandboxUrlScheme, sandboxUrlSchemeOf } from "@hot-updater/protocol/native-artifact";
|
|
5
5
|
import crypto$1 from "crypto";
|
|
6
6
|
import fs from "fs";
|
|
@@ -1724,13 +1724,18 @@ const formatCommand = (words, width = 74) => {
|
|
|
1724
1724
|
//#endregion
|
|
1725
1725
|
//#region src/utils/cocoapods.ts
|
|
1726
1726
|
/**
|
|
1727
|
-
* A failed command's error
|
|
1728
|
-
* output,
|
|
1727
|
+
* A failed command's error, as `native-build` prints a refusal: why, from its
|
|
1728
|
+
* output without stack frames, then `rerun`, the command to run in the
|
|
1729
|
+
* project, on one line, as the one next step.
|
|
1729
1730
|
*/
|
|
1730
|
-
const commandFailure = (command, error) => {
|
|
1731
|
-
const {
|
|
1732
|
-
|
|
1733
|
-
|
|
1731
|
+
const commandFailure = (command, error, rerun) => {
|
|
1732
|
+
const { message } = commandFailedError(command, error, rerun);
|
|
1733
|
+
return new BuildFailedError(message, {
|
|
1734
|
+
logPath: null,
|
|
1735
|
+
summary: [],
|
|
1736
|
+
hint: message,
|
|
1737
|
+
cause: error
|
|
1738
|
+
});
|
|
1734
1739
|
};
|
|
1735
1740
|
/**
|
|
1736
1741
|
* A line of the progress meter curl prints on stderr for each pod it
|
|
@@ -1834,7 +1839,7 @@ const installPodsIfNeeded = async (sourceDir) => {
|
|
|
1834
1839
|
});
|
|
1835
1840
|
} catch (error) {
|
|
1836
1841
|
bundleSpinner.error("bundle install failed");
|
|
1837
|
-
throw commandFailure("bundle install", error);
|
|
1842
|
+
throw commandFailure("bundle install", error, sourceDir === getCwd() ? "bundle install" : `${shellCommandLine(getCwd(), ["cd", sourceDir])} && bundle install`);
|
|
1838
1843
|
}
|
|
1839
1844
|
bundleSpinner.stop("Ruby gems installed");
|
|
1840
1845
|
}
|
|
@@ -1871,24 +1876,25 @@ const runReactNativeCodegen = async ({ projectRoot, reactNativePath, sourceDir }
|
|
|
1871
1876
|
recursive: true,
|
|
1872
1877
|
force: true
|
|
1873
1878
|
});
|
|
1879
|
+
const args = [
|
|
1880
|
+
path.join(reactNativePath, "scripts", "generate-codegen-artifacts.js"),
|
|
1881
|
+
"-p",
|
|
1882
|
+
projectRoot,
|
|
1883
|
+
"-o",
|
|
1884
|
+
sourceDir,
|
|
1885
|
+
"-t",
|
|
1886
|
+
"ios"
|
|
1887
|
+
];
|
|
1874
1888
|
const spinner = p.spinner();
|
|
1875
1889
|
spinner.start("Running React Native codegen");
|
|
1876
1890
|
try {
|
|
1877
|
-
await execa("node",
|
|
1878
|
-
path.join(reactNativePath, "scripts", "generate-codegen-artifacts.js"),
|
|
1879
|
-
"-p",
|
|
1880
|
-
projectRoot,
|
|
1881
|
-
"-o",
|
|
1882
|
-
sourceDir,
|
|
1883
|
-
"-t",
|
|
1884
|
-
"ios"
|
|
1885
|
-
], {
|
|
1891
|
+
await execa("node", args, {
|
|
1886
1892
|
cwd: projectRoot,
|
|
1887
1893
|
all: true
|
|
1888
1894
|
});
|
|
1889
1895
|
} catch (error) {
|
|
1890
1896
|
spinner.error("React Native codegen failed");
|
|
1891
|
-
throw commandFailure("React Native codegen", error);
|
|
1897
|
+
throw commandFailure("React Native codegen", error, shellCommandLine(projectRoot, ["node", ...args]));
|
|
1892
1898
|
}
|
|
1893
1899
|
spinner.stop("React Native codegen done");
|
|
1894
1900
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/apple-helper",
|
|
3
|
-
"version": "1.2.0-rc.
|
|
3
|
+
"version": "1.2.0-rc.49",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"execa": "9.5.2",
|
|
31
31
|
"fast-xml-parser": "5.8.0",
|
|
32
|
-
"@hot-updater/cli-tools": "1.2.0-rc.
|
|
33
|
-
"@hot-updater/plugin-core": "1.2.0-rc.
|
|
34
|
-
"@hot-updater/protocol": "1.2.0-rc.
|
|
32
|
+
"@hot-updater/cli-tools": "1.2.0-rc.49",
|
|
33
|
+
"@hot-updater/plugin-core": "1.2.0-rc.49",
|
|
34
|
+
"@hot-updater/protocol": "1.2.0-rc.49"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^20"
|