@seorilabs/expo-release-plugin 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Seorilabs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
- # Temporary Holding Version
1
+ # @seorilabs/expo-release-plugin
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Central Expo Config Plugin and SDK target defaults for Seorilabs React Native (Expo) apps:
4
+
5
+ - `SEORI_RELEASE_DEFAULTS`: central `compileSdkVersion` / `buildToolsVersion` / `targetSdkVersion` / `minSdkVersion` / `iosDeploymentTarget` / test AdMob App IDs
6
+ - `withSeoriAndroidRelease`: injects `key.properties` fail-closed CI release signing and `-PversionCodeOverride` / `-PversionNameOverride` into `android/app/build.gradle`
7
+ - `createSeoriExpoPlugins(options)`: builds the standardized Expo `plugins` array so annual Android `targetSdk` bumps propagate via package updates without editing every app's `app.config.ts`
package/app.plugin.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require("./dist/index.js").withSeoriAndroidRelease;
@@ -0,0 +1,25 @@
1
+ import { type ConfigPlugin } from "@expo/config-plugins";
2
+ export declare const SEORI_RELEASE_DEFAULTS: {
3
+ readonly androidCompileSdk: 37;
4
+ readonly androidBuildTools: "37.0.0";
5
+ readonly androidTargetSdk: 36;
6
+ readonly androidMinSdk: 24;
7
+ readonly iosDeploymentTarget: "16.4";
8
+ readonly testAdMobAndroidAppId: "ca-app-pub-3940256099942544~3347511713";
9
+ readonly testAdMobIosAppId: "ca-app-pub-3940256099942544~1458002511";
10
+ };
11
+ export declare function applySeoriAndroidReleaseGradle(contents: string): string;
12
+ export declare const withSeoriAndroidRelease: ConfigPlugin;
13
+ export interface SeoriExpoPluginsOptions {
14
+ splashBackgroundColor: string;
15
+ splashImage?: string;
16
+ splashImageWidth?: number;
17
+ adMobAndroidAppId?: string;
18
+ adMobIosAppId?: string;
19
+ userTrackingUsageDescription?: string;
20
+ includeSqlite?: boolean;
21
+ }
22
+ export type ExpoPluginEntry = string | [string, Record<string, unknown>];
23
+ export declare function createSeoriExpoPlugins(options: SeoriExpoPluginsOptions): ExpoPluginEntry[];
24
+ export default withSeoriAndroidRelease;
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,sBAAsB,CAAC;AAK7E,eAAO,MAAM,sBAAsB;;;;;;;;CAQzB,CAAC;AAEX,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAkDvE;AAED,eAAO,MAAM,uBAAuB,EAAE,YAKrC,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEzE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,eAAe,EAAE,CAqD1F;AAED,eAAe,uBAAuB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withSeoriAndroidRelease = exports.SEORI_RELEASE_DEFAULTS = void 0;
4
+ exports.applySeoriAndroidReleaseGradle = applySeoriAndroidReleaseGradle;
5
+ exports.createSeoriExpoPlugins = createSeoriExpoPlugins;
6
+ const config_plugins_1 = require("@expo/config-plugins");
7
+ const SEORI_SIGNING_MARKER = "// [seorilabs-release-signing]";
8
+ const SEORI_VERSION_MARKER = "// [seorilabs-version-override]";
9
+ exports.SEORI_RELEASE_DEFAULTS = {
10
+ androidCompileSdk: 37,
11
+ androidBuildTools: "37.0.0",
12
+ androidTargetSdk: 36,
13
+ androidMinSdk: 24,
14
+ iosDeploymentTarget: "16.4",
15
+ testAdMobAndroidAppId: "ca-app-pub-3940256099942544~3347511713",
16
+ testAdMobIosAppId: "ca-app-pub-3940256099942544~1458002511",
17
+ };
18
+ function applySeoriAndroidReleaseGradle(contents) {
19
+ let updated = contents;
20
+ if (!updated.includes(SEORI_SIGNING_MARKER)) {
21
+ const propertiesHeader = `${SEORI_SIGNING_MARKER}
22
+ import java.util.Properties
23
+ def seoriKeystorePropsFile = rootProject.file("key.properties")
24
+ def seoriKeystoreProps = new Properties()
25
+ if (seoriKeystorePropsFile.exists()) {
26
+ seoriKeystorePropsFile.withInputStream { stream -> seoriKeystoreProps.load(stream) }
27
+ }
28
+ `;
29
+ updated = `${propertiesHeader}\n${updated}`;
30
+ }
31
+ if (!updated.includes(SEORI_VERSION_MARKER)) {
32
+ updated = updated.replace(/versionCode\s+\d+/, `${SEORI_VERSION_MARKER}\n versionCode (project.hasProperty("versionCodeOverride") ? project.property("versionCodeOverride").toString().toInteger() : 1)`);
33
+ updated = updated.replace(/versionName\s+"[^"]*"/, `versionName (project.hasProperty("versionNameOverride") ? project.property("versionNameOverride").toString() : "0.1.0")`);
34
+ }
35
+ if (!updated.includes("signingConfigs.release")) {
36
+ updated = updated.replace(/signingConfigs\s*\{/, `signingConfigs {
37
+ release {
38
+ if (seoriKeystorePropsFile.exists()) {
39
+ storeFile file(seoriKeystoreProps.getProperty("storeFile"))
40
+ storePassword seoriKeystoreProps.getProperty("storePassword")
41
+ keyAlias seoriKeystoreProps.getProperty("keyAlias")
42
+ keyPassword seoriKeystoreProps.getProperty("keyPassword")
43
+ }
44
+ }`);
45
+ updated = updated.replace(/(buildTypes\s*\{[\s\S]*?release\s*\{[\s\S]*?)signingConfig\s+signingConfigs\.debug/, `$1if (System.getenv("CI") == "true" && !seoriKeystorePropsFile.exists()) {
46
+ throw new GradleException("key.properties is required for CI release signing.")
47
+ }
48
+ signingConfig (seoriKeystorePropsFile.exists() ? signingConfigs.release : signingConfigs.debug)`);
49
+ }
50
+ return updated;
51
+ }
52
+ const withSeoriAndroidRelease = (config) => {
53
+ return (0, config_plugins_1.withAppBuildGradle)(config, (modConfig) => {
54
+ modConfig.modResults.contents = applySeoriAndroidReleaseGradle(modConfig.modResults.contents);
55
+ return modConfig;
56
+ });
57
+ };
58
+ exports.withSeoriAndroidRelease = withSeoriAndroidRelease;
59
+ function createSeoriExpoPlugins(options) {
60
+ const androidAppId = options.adMobAndroidAppId?.trim() || exports.SEORI_RELEASE_DEFAULTS.testAdMobAndroidAppId;
61
+ const iosAppId = options.adMobIosAppId?.trim() || exports.SEORI_RELEASE_DEFAULTS.testAdMobIosAppId;
62
+ const trackingDescription = options.userTrackingUsageDescription ??
63
+ "This identifier will be used to deliver more relevant ads and keep the app free.";
64
+ const plugins = [
65
+ [
66
+ "expo-build-properties",
67
+ {
68
+ android: {
69
+ compileSdkVersion: exports.SEORI_RELEASE_DEFAULTS.androidCompileSdk,
70
+ buildToolsVersion: exports.SEORI_RELEASE_DEFAULTS.androidBuildTools,
71
+ targetSdkVersion: exports.SEORI_RELEASE_DEFAULTS.androidTargetSdk,
72
+ minSdkVersion: exports.SEORI_RELEASE_DEFAULTS.androidMinSdk,
73
+ },
74
+ ios: {
75
+ deploymentTarget: exports.SEORI_RELEASE_DEFAULTS.iosDeploymentTarget,
76
+ },
77
+ },
78
+ ],
79
+ "expo-localization",
80
+ ];
81
+ if (options.includeSqlite !== false) {
82
+ plugins.push("expo-sqlite");
83
+ }
84
+ plugins.push([
85
+ "expo-splash-screen",
86
+ {
87
+ backgroundColor: options.splashBackgroundColor,
88
+ image: options.splashImage ?? "./assets/splash-icon.png",
89
+ imageWidth: options.splashImageWidth ?? 160,
90
+ resizeMode: "contain",
91
+ },
92
+ ], [
93
+ "react-native-google-mobile-ads",
94
+ {
95
+ androidAppId,
96
+ iosAppId,
97
+ delayAppMeasurementInit: true,
98
+ userTrackingUsageDescription: trackingDescription,
99
+ },
100
+ ], "@seorilabs/expo-release-plugin");
101
+ return plugins;
102
+ }
103
+ exports.default = exports.withSeoriAndroidRelease;
104
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAeA,wEAkDC;AAqBD,wDAqDC;AA3ID,yDAA6E;AAE7E,MAAM,oBAAoB,GAAG,gCAAgC,CAAC;AAC9D,MAAM,oBAAoB,GAAG,iCA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F,EACD,gCAAgC,CACjC,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,kBAAe,+BAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,29 @@
1
1
  {
2
2
  "name": "@seorilabs/expo-release-plugin",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.1",
4
+ "description": "Shared Expo Config Plugin and central Android/iOS SDK release defaults for Seorilabs apps.",
5
+ "license": "MIT",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "app.plugin.js",
11
+ "README.md"
12
+ ],
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/seorilabs/app-foundation.git",
16
+ "directory": "packages/expo-release-plugin"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "peerDependencies": {
22
+ "@expo/config-plugins": ">=50.0.0"
23
+ },
24
+ "scripts": {
25
+ "build": "rm -rf dist && tsc -p tsconfig.build.json",
26
+ "typecheck": "tsc --noEmit",
27
+ "test": "vitest run"
28
+ }
6
29
  }