react-native-update-cli 2.9.0 → 2.9.1

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/lib/package.d.ts CHANGED
@@ -5,6 +5,7 @@ type PackageCommandOptions = Record<string, unknown> & {
5
5
  splits?: string;
6
6
  output?: string;
7
7
  };
8
+ export declare function normalizeUploadBuildTime(value: unknown): string;
8
9
  export declare function listPackage(appId: string): Promise<import("./types").Package[]>;
9
10
  export declare function choosePackage(appId: string): Promise<import("./types").Package>;
10
11
  export declare const packageCommands: {
package/lib/package.js CHANGED
@@ -15,6 +15,9 @@ _export(exports, {
15
15
  listPackage: function() {
16
16
  return listPackage;
17
17
  },
18
+ normalizeUploadBuildTime: function() {
19
+ return normalizeUploadBuildTime;
20
+ },
18
21
  packageCommands: function() {
19
22
  return packageCommands;
20
23
  }
@@ -35,6 +38,9 @@ function _interop_require_default(obj) {
35
38
  default: obj
36
39
  };
37
40
  }
41
+ function normalizeUploadBuildTime(value) {
42
+ return String(value);
43
+ }
38
44
  function ensureFileByExt(filePath, extension, usageKey) {
39
45
  if (!filePath || !filePath.endsWith(extension)) {
40
46
  throw new Error((0, _i18n.t)(usageKey));
@@ -87,10 +93,11 @@ async function uploadNativePackage(filePath, options, config) {
87
93
  }
88
94
  const { hash } = await (0, _api.uploadFile)(filePath);
89
95
  const normalizedBuildTime = config.normalizeBuildTime ? config.normalizeBuildTime(buildTime) : buildTime;
96
+ const uploadBuildTime = normalizeUploadBuildTime(normalizedBuildTime);
90
97
  const { id } = await (0, _api.post)(`/app/${appId}/package/create`, {
91
98
  name: versionName,
92
99
  hash,
93
- buildTime: normalizedBuildTime,
100
+ buildTime: uploadBuildTime,
94
101
  deps: _depversions.depVersions,
95
102
  commit: await (0, _git.getCommitInfo)()
96
103
  });
@@ -98,7 +105,7 @@ async function uploadNativePackage(filePath, options, config) {
98
105
  console.log((0, _i18n.t)(config.successKey, {
99
106
  id,
100
107
  version: versionName,
101
- buildTime: normalizedBuildTime
108
+ buildTime: uploadBuildTime
102
109
  }));
103
110
  }
104
111
  async function listPackage(appId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update-cli",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "description": "command line tool for react-native-update (remote updates for react native)",
5
5
  "main": "lib/exports.js",
6
6
  "types": "lib/exports.d.ts",
package/src/package.ts CHANGED
@@ -50,6 +50,10 @@ type NativeUploadConfig = {
50
50
  ) => string | number | undefined;
51
51
  };
52
52
 
53
+ export function normalizeUploadBuildTime(value: unknown): string {
54
+ return String(value);
55
+ }
56
+
53
57
  function ensureFileByExt(
54
58
  filePath: string | undefined,
55
59
  extension: NativeUploadConfig['extension'] | '.aab',
@@ -116,11 +120,12 @@ async function uploadNativePackage(
116
120
  const normalizedBuildTime = config.normalizeBuildTime
117
121
  ? config.normalizeBuildTime(buildTime)
118
122
  : buildTime;
123
+ const uploadBuildTime = normalizeUploadBuildTime(normalizedBuildTime);
119
124
 
120
125
  const { id } = await post(`/app/${appId}/package/create`, {
121
126
  name: versionName,
122
127
  hash,
123
- buildTime: normalizedBuildTime,
128
+ buildTime: uploadBuildTime,
124
129
  deps: depVersions,
125
130
  commit: await getCommitInfo(),
126
131
  });
@@ -129,7 +134,7 @@ async function uploadNativePackage(
129
134
  t(config.successKey, {
130
135
  id,
131
136
  version: versionName,
132
- buildTime: normalizedBuildTime,
137
+ buildTime: uploadBuildTime,
133
138
  }),
134
139
  );
135
140
  }