@hot-updater/plugin-core 0.25.4 → 0.25.5

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 CHANGED
@@ -8,6 +8,7 @@ const require_semverSatisfies = require('./semverSatisfies.cjs');
8
8
  const require_filterCompatibleAppVersions = require('./filterCompatibleAppVersions.cjs');
9
9
  const require_generateMinBundleId = require('./generateMinBundleId.cjs');
10
10
  const require_parseStorageUri = require('./parseStorageUri.cjs');
11
+ const require_index = require('./types/index.cjs');
11
12
 
12
13
  exports.calculatePagination = require_calculatePagination.calculatePagination;
13
14
  exports.createBlobDatabasePlugin = require_createBlobDatabasePlugin.createBlobDatabasePlugin;
@@ -20,4 +21,5 @@ exports.generateMinBundleId = require_generateMinBundleId.generateMinBundleId;
20
21
  exports.getCompressionMimeType = require_compressionFormat.getCompressionMimeType;
21
22
  exports.getContentType = require_compressionFormat.getContentType;
22
23
  exports.parseStorageUri = require_parseStorageUri.parseStorageUri;
23
- exports.semverSatisfies = require_semverSatisfies.semverSatisfies;
24
+ exports.semverSatisfies = require_semverSatisfies.semverSatisfies;
25
+ exports.supportedIosPlatforms = require_index.supportedIosPlatforms;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.cjs";
2
- import { BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, ConfigInput, DatabasePlugin, DatabasePluginHooks, NativeBuildArgs, PaginationInfo, Platform, PlatformConfig, SigningConfig, StoragePlugin, StoragePluginHooks } from "./types/index.cjs";
2
+ import { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, ConfigInput, DatabasePlugin, DatabasePluginHooks, IosBuildDestination, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, PaginationInfo, Platform, PlatformConfig, SigningConfig, StoragePlugin, StoragePluginHooks, supportedIosPlatforms } from "./types/index.cjs";
3
3
  import { PaginatedResult, PaginationOptions, calculatePagination } from "./calculatePagination.cjs";
4
4
  import { CompressionFormat, CompressionFormatInfo, detectCompressionFormat, getCompressionMimeType, getContentType } from "./compressionFormat.cjs";
5
5
  import { BlobOperations, createBlobDatabasePlugin } from "./createBlobDatabasePlugin.cjs";
@@ -10,4 +10,4 @@ import { filterCompatibleAppVersions } from "./filterCompatibleAppVersions.cjs";
10
10
  import { generateMinBundleId } from "./generateMinBundleId.cjs";
11
11
  import { ParsedStorageUri, parseStorageUri } from "./parseStorageUri.cjs";
12
12
  import { semverSatisfies } from "./semverSatisfies.cjs";
13
- export { AbstractDatabasePlugin, BasePluginArgs, BlobOperations, BuildPlugin, BuildPluginConfig, BuiltIns, Bundle, CompressionFormat, CompressionFormatInfo, ConfigInput, CreateDatabasePluginOptions, CreateStoragePluginOptions, DatabasePlugin, DatabasePluginHooks, HasMultipleCallSignatures, NativeBuildArgs, PaginatedResult, PaginationInfo, PaginationOptions, ParsedStorageUri, Platform, PlatformConfig, Primitive, RequiredDeep, SigningConfig, StoragePlugin, StoragePluginHooks, calculatePagination, createBlobDatabasePlugin, createDatabasePlugin, createStorageKeyBuilder, createStoragePlugin, detectCompressionFormat, filterCompatibleAppVersions, generateMinBundleId, getCompressionMimeType, getContentType, parseStorageUri, semverSatisfies };
13
+ export { AbstractDatabasePlugin, ApplePlatform, BasePluginArgs, BlobOperations, BuildPlugin, BuildPluginConfig, BuiltIns, Bundle, CompressionFormat, CompressionFormatInfo, ConfigInput, CreateDatabasePluginOptions, CreateStoragePluginOptions, DatabasePlugin, DatabasePluginHooks, HasMultipleCallSignatures, IosBuildDestination, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, PaginatedResult, PaginationInfo, PaginationOptions, ParsedStorageUri, Platform, PlatformConfig, Primitive, RequiredDeep, SigningConfig, StoragePlugin, StoragePluginHooks, calculatePagination, createBlobDatabasePlugin, createDatabasePlugin, createStorageKeyBuilder, createStoragePlugin, detectCompressionFormat, filterCompatibleAppVersions, generateMinBundleId, getCompressionMimeType, getContentType, parseStorageUri, semverSatisfies, supportedIosPlatforms };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.js";
2
- import { BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, ConfigInput, DatabasePlugin, DatabasePluginHooks, NativeBuildArgs, PaginationInfo, Platform, PlatformConfig, SigningConfig, StoragePlugin, StoragePluginHooks } from "./types/index.js";
2
+ import { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, ConfigInput, DatabasePlugin, DatabasePluginHooks, IosBuildDestination, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, PaginationInfo, Platform, PlatformConfig, SigningConfig, StoragePlugin, StoragePluginHooks, supportedIosPlatforms } from "./types/index.js";
3
3
  import { PaginatedResult, PaginationOptions, calculatePagination } from "./calculatePagination.js";
4
4
  import { CompressionFormat, CompressionFormatInfo, detectCompressionFormat, getCompressionMimeType, getContentType } from "./compressionFormat.js";
5
5
  import { BlobOperations, createBlobDatabasePlugin } from "./createBlobDatabasePlugin.js";
@@ -10,4 +10,4 @@ import { filterCompatibleAppVersions } from "./filterCompatibleAppVersions.js";
10
10
  import { generateMinBundleId } from "./generateMinBundleId.js";
11
11
  import { ParsedStorageUri, parseStorageUri } from "./parseStorageUri.js";
12
12
  import { semverSatisfies } from "./semverSatisfies.js";
13
- export { AbstractDatabasePlugin, BasePluginArgs, BlobOperations, BuildPlugin, BuildPluginConfig, BuiltIns, Bundle, CompressionFormat, CompressionFormatInfo, ConfigInput, CreateDatabasePluginOptions, CreateStoragePluginOptions, DatabasePlugin, DatabasePluginHooks, HasMultipleCallSignatures, NativeBuildArgs, PaginatedResult, PaginationInfo, PaginationOptions, ParsedStorageUri, Platform, PlatformConfig, Primitive, RequiredDeep, SigningConfig, StoragePlugin, StoragePluginHooks, calculatePagination, createBlobDatabasePlugin, createDatabasePlugin, createStorageKeyBuilder, createStoragePlugin, detectCompressionFormat, filterCompatibleAppVersions, generateMinBundleId, getCompressionMimeType, getContentType, parseStorageUri, semverSatisfies };
13
+ export { AbstractDatabasePlugin, ApplePlatform, BasePluginArgs, BlobOperations, BuildPlugin, BuildPluginConfig, BuiltIns, Bundle, CompressionFormat, CompressionFormatInfo, ConfigInput, CreateDatabasePluginOptions, CreateStoragePluginOptions, DatabasePlugin, DatabasePluginHooks, HasMultipleCallSignatures, IosBuildDestination, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, PaginatedResult, PaginationInfo, PaginationOptions, ParsedStorageUri, Platform, PlatformConfig, Primitive, RequiredDeep, SigningConfig, StoragePlugin, StoragePluginHooks, calculatePagination, createBlobDatabasePlugin, createDatabasePlugin, createStorageKeyBuilder, createStoragePlugin, detectCompressionFormat, filterCompatibleAppVersions, generateMinBundleId, getCompressionMimeType, getContentType, parseStorageUri, semverSatisfies, supportedIosPlatforms };
package/dist/index.js CHANGED
@@ -8,5 +8,6 @@ import { semverSatisfies } from "./semverSatisfies.js";
8
8
  import { filterCompatibleAppVersions } from "./filterCompatibleAppVersions.js";
9
9
  import { generateMinBundleId } from "./generateMinBundleId.js";
10
10
  import { parseStorageUri } from "./parseStorageUri.js";
11
+ import { supportedIosPlatforms } from "./types/index.js";
11
12
 
12
- export { calculatePagination, createBlobDatabasePlugin, createDatabasePlugin, createStorageKeyBuilder, createStoragePlugin, detectCompressionFormat, filterCompatibleAppVersions, generateMinBundleId, getCompressionMimeType, getContentType, parseStorageUri, semverSatisfies };
13
+ export { calculatePagination, createBlobDatabasePlugin, createDatabasePlugin, createStorageKeyBuilder, createStoragePlugin, detectCompressionFormat, filterCompatibleAppVersions, generateMinBundleId, getCompressionMimeType, getContentType, parseStorageUri, semverSatisfies, supportedIosPlatforms };
@@ -0,0 +1,9 @@
1
+
2
+ //#region src/types/index.ts
3
+ /**
4
+ * Supported Apple platforms for building and deployment
5
+ */
6
+ const supportedIosPlatforms = { ios: "ios" };
7
+
8
+ //#endregion
9
+ exports.supportedIosPlatforms = supportedIosPlatforms;
@@ -57,6 +57,119 @@ interface BuildPlugin {
57
57
  }>;
58
58
  name: string;
59
59
  }
60
+ /**
61
+ * Android native build gradle configuration.
62
+ */
63
+ interface NativeBuildAndroidScheme {
64
+ /**
65
+ * Android application module build variant.
66
+ *
67
+ * @example Debug, Release
68
+ * @default Release
69
+ */
70
+ variant?: string;
71
+ /**
72
+ * Artifact type.
73
+ *
74
+ * If `true`, the generated artifact type is `.aab`.
75
+ * If `flase`, the generated artifact type is `apk`.
76
+ *
77
+ * @default true
78
+ */
79
+ aab?: boolean;
80
+ /**
81
+ * Android application module name.
82
+ *
83
+ * @default app
84
+ */
85
+ appModuleName?: string;
86
+ /**
87
+ * Android application package name.
88
+ */
89
+ packageName: string;
90
+ /**
91
+ * Android application ID.
92
+ *
93
+ * @default same as packageName
94
+ */
95
+ applicationId?: string;
96
+ }
97
+ type IosBuildDestination = {
98
+ id: string;
99
+ } | {
100
+ name: string;
101
+ } | "ios-device" | "ios-simulator";
102
+ /**
103
+ * Supported Apple platforms for building and deployment
104
+ */
105
+ declare const supportedIosPlatforms: {
106
+ readonly ios: "ios";
107
+ };
108
+ /**
109
+ * Type representing a supported Apple platform
110
+ */
111
+ type ApplePlatform = (typeof supportedIosPlatforms)[keyof typeof supportedIosPlatforms];
112
+ /**
113
+ * iOS native build configuration.
114
+ */
115
+ interface NativeBuildIosScheme {
116
+ /**
117
+ * The bundle identifier of the app.
118
+ */
119
+ bundleIdentifier: string;
120
+ /**
121
+ * Apple platform for build & archive
122
+ *
123
+ * @default ios
124
+ */
125
+ platform?: ApplePlatform;
126
+ /**
127
+ * The Xcode scheme to build.
128
+ *
129
+ * @example "app"
130
+ */
131
+ scheme: string;
132
+ /**
133
+ * The build configuration to use (e.g., "Debug", "Release").
134
+ *
135
+ * @default "Release"
136
+ */
137
+ configuration?: "Debug" | "Release" | string;
138
+ /**
139
+ * The destination for the build.
140
+ *
141
+ * @default "['generic/platform=iOS']"
142
+ */
143
+ destination?: IosBuildDestination[];
144
+ /**
145
+ * Path to a plist file that specifies options for exporting the archive.
146
+ *
147
+ * @example "exportOptions.plist"
148
+ */
149
+ exportOptionsPlist?: string;
150
+ /**
151
+ * Path to an .xcconfig file to include additional build settings.
152
+ */
153
+ xcconfig?: string;
154
+ /**
155
+ * Automatically install CocoaPods dependencies before building.
156
+ *
157
+ * @default true
158
+ */
159
+ installPods?: boolean;
160
+ /**
161
+ * Additional parameters passed to xcodebuild.
162
+ *
163
+ * @example ["-quiet", "-allowProvisioningUpdates"]
164
+ */
165
+ extraParams?: string[];
166
+ /**
167
+ * Additional parameters for exportArchive command.
168
+ *
169
+ * @example ["-allowProvisioningUpdates"]
170
+ */
171
+ exportExtraParams?: string[];
172
+ }
60
173
  interface PlatformConfig {
61
174
  /**
62
175
  * Android platform configuration.
@@ -85,32 +198,13 @@ interface PlatformConfig {
85
198
  }
86
199
  interface NativeBuildArgs {
87
200
  /**
88
- * Android specific configuration.
201
+ * Android specific configuration schemes.
89
202
  */
90
- android?: {
91
- /**
92
- * Android application module build variant.
93
- *
94
- * @example Debug, Release
95
- * @default Release
96
- */
97
- variant?: string;
98
- /**
99
- * Artifact type.
100
- *
101
- * If `true`, the generated artifact type is `.aab`.
102
- * If `flase`, the generated artifact type is `apk`.
103
- *
104
- * @default true
105
- */
106
- aab?: boolean;
107
- /**
108
- * Android application module name.
109
- *
110
- * @default app
111
- */
112
- appModuleName?: string;
113
- };
203
+ android?: Record<string, NativeBuildAndroidScheme>;
204
+ /**
205
+ * iOS specific configuration schemes.
206
+ */
207
+ ios?: Record<string, NativeBuildIosScheme>;
114
208
  }
115
209
  interface StoragePlugin {
116
210
  /**
@@ -252,5 +346,11 @@ type ConfigInput = {
252
346
  storage: () => Promise<StoragePlugin> | StoragePlugin;
253
347
  database: () => Promise<DatabasePlugin> | DatabasePlugin;
254
348
  };
349
+ interface NativeBuildOptions {
350
+ outputPath?: string;
351
+ interactive: boolean;
352
+ message?: string;
353
+ scheme?: string;
354
+ }
255
355
  //#endregion
256
- export { BasePluginArgs, BuildPlugin, BuildPluginConfig, type Bundle$1 as Bundle, ConfigInput, DatabasePlugin, DatabasePluginHooks, NativeBuildArgs, PaginationInfo, type Platform$1 as Platform, PlatformConfig, SigningConfig, StoragePlugin, StoragePluginHooks };
356
+ export { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, type Bundle$1 as Bundle, ConfigInput, DatabasePlugin, DatabasePluginHooks, IosBuildDestination, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, PaginationInfo, type Platform$1 as Platform, PlatformConfig, SigningConfig, StoragePlugin, StoragePluginHooks, supportedIosPlatforms };
@@ -57,6 +57,119 @@ interface BuildPlugin {
57
57
  }>;
58
58
  name: string;
59
59
  }
60
+ /**
61
+ * Android native build gradle configuration.
62
+ */
63
+ interface NativeBuildAndroidScheme {
64
+ /**
65
+ * Android application module build variant.
66
+ *
67
+ * @example Debug, Release
68
+ * @default Release
69
+ */
70
+ variant?: string;
71
+ /**
72
+ * Artifact type.
73
+ *
74
+ * If `true`, the generated artifact type is `.aab`.
75
+ * If `flase`, the generated artifact type is `apk`.
76
+ *
77
+ * @default true
78
+ */
79
+ aab?: boolean;
80
+ /**
81
+ * Android application module name.
82
+ *
83
+ * @default app
84
+ */
85
+ appModuleName?: string;
86
+ /**
87
+ * Android application package name.
88
+ */
89
+ packageName: string;
90
+ /**
91
+ * Android application ID.
92
+ *
93
+ * @default same as packageName
94
+ */
95
+ applicationId?: string;
96
+ }
97
+ type IosBuildDestination = {
98
+ id: string;
99
+ } | {
100
+ name: string;
101
+ } | "ios-device" | "ios-simulator";
102
+ /**
103
+ * Supported Apple platforms for building and deployment
104
+ */
105
+ declare const supportedIosPlatforms: {
106
+ readonly ios: "ios";
107
+ };
108
+ /**
109
+ * Type representing a supported Apple platform
110
+ */
111
+ type ApplePlatform = (typeof supportedIosPlatforms)[keyof typeof supportedIosPlatforms];
112
+ /**
113
+ * iOS native build configuration.
114
+ */
115
+ interface NativeBuildIosScheme {
116
+ /**
117
+ * The bundle identifier of the app.
118
+ */
119
+ bundleIdentifier: string;
120
+ /**
121
+ * Apple platform for build & archive
122
+ *
123
+ * @default ios
124
+ */
125
+ platform?: ApplePlatform;
126
+ /**
127
+ * The Xcode scheme to build.
128
+ *
129
+ * @example "app"
130
+ */
131
+ scheme: string;
132
+ /**
133
+ * The build configuration to use (e.g., "Debug", "Release").
134
+ *
135
+ * @default "Release"
136
+ */
137
+ configuration?: "Debug" | "Release" | string;
138
+ /**
139
+ * The destination for the build.
140
+ *
141
+ * @default "['generic/platform=iOS']"
142
+ */
143
+ destination?: IosBuildDestination[];
144
+ /**
145
+ * Path to a plist file that specifies options for exporting the archive.
146
+ *
147
+ * @example "exportOptions.plist"
148
+ */
149
+ exportOptionsPlist?: string;
150
+ /**
151
+ * Path to an .xcconfig file to include additional build settings.
152
+ */
153
+ xcconfig?: string;
154
+ /**
155
+ * Automatically install CocoaPods dependencies before building.
156
+ *
157
+ * @default true
158
+ */
159
+ installPods?: boolean;
160
+ /**
161
+ * Additional parameters passed to xcodebuild.
162
+ *
163
+ * @example ["-quiet", "-allowProvisioningUpdates"]
164
+ */
165
+ extraParams?: string[];
166
+ /**
167
+ * Additional parameters for exportArchive command.
168
+ *
169
+ * @example ["-allowProvisioningUpdates"]
170
+ */
171
+ exportExtraParams?: string[];
172
+ }
60
173
  interface PlatformConfig {
61
174
  /**
62
175
  * Android platform configuration.
@@ -85,32 +198,13 @@ interface PlatformConfig {
85
198
  }
86
199
  interface NativeBuildArgs {
87
200
  /**
88
- * Android specific configuration.
201
+ * Android specific configuration schemes.
89
202
  */
90
- android?: {
91
- /**
92
- * Android application module build variant.
93
- *
94
- * @example Debug, Release
95
- * @default Release
96
- */
97
- variant?: string;
98
- /**
99
- * Artifact type.
100
- *
101
- * If `true`, the generated artifact type is `.aab`.
102
- * If `flase`, the generated artifact type is `apk`.
103
- *
104
- * @default true
105
- */
106
- aab?: boolean;
107
- /**
108
- * Android application module name.
109
- *
110
- * @default app
111
- */
112
- appModuleName?: string;
113
- };
203
+ android?: Record<string, NativeBuildAndroidScheme>;
204
+ /**
205
+ * iOS specific configuration schemes.
206
+ */
207
+ ios?: Record<string, NativeBuildIosScheme>;
114
208
  }
115
209
  interface StoragePlugin {
116
210
  /**
@@ -252,5 +346,11 @@ type ConfigInput = {
252
346
  storage: () => Promise<StoragePlugin> | StoragePlugin;
253
347
  database: () => Promise<DatabasePlugin> | DatabasePlugin;
254
348
  };
349
+ interface NativeBuildOptions {
350
+ outputPath?: string;
351
+ interactive: boolean;
352
+ message?: string;
353
+ scheme?: string;
354
+ }
255
355
  //#endregion
256
- export { BasePluginArgs, BuildPlugin, BuildPluginConfig, type Bundle$1 as Bundle, ConfigInput, DatabasePlugin, DatabasePluginHooks, NativeBuildArgs, PaginationInfo, type Platform$1 as Platform, PlatformConfig, SigningConfig, StoragePlugin, StoragePluginHooks };
356
+ export { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, type Bundle$1 as Bundle, ConfigInput, DatabasePlugin, DatabasePluginHooks, IosBuildDestination, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, PaginationInfo, type Platform$1 as Platform, PlatformConfig, SigningConfig, StoragePlugin, StoragePluginHooks, supportedIosPlatforms };
@@ -0,0 +1,8 @@
1
+ //#region src/types/index.ts
2
+ /**
3
+ * Supported Apple platforms for building and deployment
4
+ */
5
+ const supportedIosPlatforms = { ios: "ios" };
6
+
7
+ //#endregion
8
+ export { supportedIosPlatforms };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/plugin-core",
3
- "version": "0.25.4",
3
+ "version": "0.25.5",
4
4
  "type": "module",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "sideEffects": false,
@@ -42,12 +42,12 @@
42
42
  "es-toolkit": "^1.32.0",
43
43
  "mime": "^4.0.4",
44
44
  "semver": "^7.7.2",
45
- "@hot-updater/core": "0.25.4"
45
+ "@hot-updater/core": "0.25.5"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/semver": "^7.5.8",
49
49
  "typescript": "5.8.2",
50
- "@hot-updater/test-utils": "0.25.4"
50
+ "@hot-updater/test-utils": "0.25.5"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "tsdown",