customerio-expo-plugin 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/package.json +1 -1
- package/plugin/lib/commonjs/android/withCIOAndroid.js +0 -2
- package/plugin/lib/commonjs/android/withCIOAndroid.js.map +1 -1
- package/plugin/lib/commonjs/helpers/constants/android.js +1 -3
- package/plugin/lib/commonjs/helpers/constants/android.js.map +1 -1
- package/plugin/lib/module/android/withCIOAndroid.js +0 -2
- package/plugin/lib/module/android/withCIOAndroid.js.map +1 -1
- package/plugin/lib/module/helpers/constants/android.js +0 -2
- package/plugin/lib/module/helpers/constants/android.js.map +1 -1
- package/plugin/lib/typescript/helpers/constants/android.d.ts +0 -2
- package/plugin/src/android/withCIOAndroid.ts +0 -2
- package/plugin/src/helpers/constants/android.ts +0 -4
- package/plugin/lib/commonjs/android/withGistMavenRepository.js +0 -22
- package/plugin/lib/commonjs/android/withGistMavenRepository.js.map +0 -1
- package/plugin/lib/module/android/withGistMavenRepository.js +0 -15
- package/plugin/lib/module/android/withGistMavenRepository.js.map +0 -1
- package/plugin/lib/typescript/android/withGistMavenRepository.d.ts +0 -3
- package/plugin/src/android/withGistMavenRepository.ts +0 -28
package/package.json
CHANGED
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.withCIOAndroid = withCIOAndroid;
|
|
7
7
|
var _withAndroidManifestUpdates = require("./withAndroidManifestUpdates");
|
|
8
8
|
var _withAppGoogleServices = require("./withAppGoogleServices");
|
|
9
|
-
var _withGistMavenRepository = require("./withGistMavenRepository");
|
|
10
9
|
var _withGoogleServicesJSON = require("./withGoogleServicesJSON");
|
|
11
10
|
var _withMainApplicationModifications = require("./withMainApplicationModifications");
|
|
12
11
|
var _withNotificationChannelMetadata = require("./withNotificationChannelMetadata");
|
|
@@ -16,7 +15,6 @@ function withCIOAndroid(config, sdkConfig, props) {
|
|
|
16
15
|
// Only run notification setup if props are provided
|
|
17
16
|
if (props) {
|
|
18
17
|
var _props$pushNotificati;
|
|
19
|
-
config = (0, _withGistMavenRepository.withGistMavenRepository)(config, props);
|
|
20
18
|
config = (0, _withProjectGoogleServices.withProjectGoogleServices)(config, props);
|
|
21
19
|
config = (0, _withAppGoogleServices.withAppGoogleServices)(config, props);
|
|
22
20
|
config = (0, _withGoogleServicesJSON.withGoogleServicesJSON)(config, props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_withAndroidManifestUpdates","require","_withAppGoogleServices","
|
|
1
|
+
{"version":3,"names":["_withAndroidManifestUpdates","require","_withAppGoogleServices","_withGoogleServicesJSON","_withMainApplicationModifications","_withNotificationChannelMetadata","_withProjectGoogleServices","_withProjectStrings","withCIOAndroid","config","sdkConfig","props","_props$pushNotificati","withProjectGoogleServices","withAppGoogleServices","withGoogleServicesJSON","setHighPriorityPushHandler","undefined","withAndroidManifestUpdates","pushNotification","channel","withNotificationChannelMetadata","withMainApplicationModifications","withProjectStrings"],"sources":["withCIOAndroid.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { CustomerIOPluginOptionsAndroid, NativeSDKConfig } from '../types/cio-types';\nimport { withAndroidManifestUpdates } from './withAndroidManifestUpdates';\nimport { withAppGoogleServices } from './withAppGoogleServices';\nimport { withGoogleServicesJSON } from './withGoogleServicesJSON';\nimport { withMainApplicationModifications } from './withMainApplicationModifications';\nimport { withNotificationChannelMetadata } from './withNotificationChannelMetadata';\nimport { withProjectGoogleServices } from './withProjectGoogleServices';\nimport { withProjectStrings } from './withProjectStrings';\n\nexport function withCIOAndroid(\n config: ExpoConfig,\n sdkConfig?: NativeSDKConfig,\n props?: CustomerIOPluginOptionsAndroid,\n): ExpoConfig {\n // Only run notification setup if props are provided\n if (props) {\n config = withProjectGoogleServices(config, props);\n config = withAppGoogleServices(config, props);\n config = withGoogleServicesJSON(config, props);\n if (props.setHighPriorityPushHandler !== undefined) {\n config = withAndroidManifestUpdates(config, props);\n }\n if (props.pushNotification?.channel) {\n config = withNotificationChannelMetadata(config, props);\n }\n }\n\n // Add auto initialization if sdkConfig is provided\n if (sdkConfig) {\n config = withMainApplicationModifications(config, sdkConfig);\n }\n\n // Update project strings for user agent metadata\n config = withProjectStrings(config);\n\n return config;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,2BAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,gCAAA,GAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AAEO,SAASO,cAAcA,CAC5BC,MAAkB,EAClBC,SAA2B,EAC3BC,KAAsC,EAC1B;EACZ;EACA,IAAIA,KAAK,EAAE;IAAA,IAAAC,qBAAA;IACTH,MAAM,GAAG,IAAAI,oDAAyB,EAACJ,MAAM,EAAEE,KAAK,CAAC;IACjDF,MAAM,GAAG,IAAAK,4CAAqB,EAACL,MAAM,EAAEE,KAAK,CAAC;IAC7CF,MAAM,GAAG,IAAAM,8CAAsB,EAACN,MAAM,EAAEE,KAAK,CAAC;IAC9C,IAAIA,KAAK,CAACK,0BAA0B,KAAKC,SAAS,EAAE;MAClDR,MAAM,GAAG,IAAAS,sDAA0B,EAACT,MAAM,EAAEE,KAAK,CAAC;IACpD;IACA,KAAAC,qBAAA,GAAID,KAAK,CAACQ,gBAAgB,cAAAP,qBAAA,eAAtBA,qBAAA,CAAwBQ,OAAO,EAAE;MACnCX,MAAM,GAAG,IAAAY,gEAA+B,EAACZ,MAAM,EAAEE,KAAK,CAAC;IACzD;EACF;;EAEA;EACA,IAAID,SAAS,EAAE;IACbD,MAAM,GAAG,IAAAa,kEAAgC,EAACb,MAAM,EAAEC,SAAS,CAAC;EAC9D;;EAEA;EACAD,MAAM,GAAG,IAAAc,sCAAkB,EAACd,MAAM,CAAC;EAEnC,OAAOA,MAAM;AACf","ignoreList":[]}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.CIO_PROJECT_GOOGLE_SNIPPET = exports.
|
|
6
|
+
exports.CIO_PROJECT_GOOGLE_SNIPPET = exports.CIO_PROJECT_BUILDSCRIPTS_REGEX = exports.CIO_PROJECT_ALLPROJECTS_REGEX = exports.CIO_NATIVE_SDK_INITIALIZE_SNIPPET = exports.CIO_NATIVE_SDK_INITIALIZE_CALL = exports.CIO_MAINAPPLICATION_ONCREATE_REGEX = exports.CIO_APP_GOOGLE_SNIPPET = exports.CIO_APP_APPLY_REGEX = void 0;
|
|
7
7
|
const CIO_PROJECT_BUILDSCRIPTS_REGEX = exports.CIO_PROJECT_BUILDSCRIPTS_REGEX = /(buildscript\s*\{(.|\n)*dependencies\s*\{)/;
|
|
8
8
|
const CIO_APP_APPLY_REGEX = exports.CIO_APP_APPLY_REGEX = /(apply plugin: "com.android.application")/;
|
|
9
|
-
const CIO_GIST_MAVEN_REGEX = exports.CIO_GIST_MAVEN_REGEX = /maven { url "https:\/\/maven.gist.build" }/;
|
|
10
9
|
const CIO_PROJECT_ALLPROJECTS_REGEX = exports.CIO_PROJECT_ALLPROJECTS_REGEX = /(allprojects\s*\{(.|\n){1,500}repositories\s*\{)/;
|
|
11
|
-
const CIO_PROJECT_GIST_MAVEN_SNIPPET = exports.CIO_PROJECT_GIST_MAVEN_SNIPPET = ' maven { url "https://maven.gist.build" }';
|
|
12
10
|
const CIO_APP_GOOGLE_SNIPPET = exports.CIO_APP_GOOGLE_SNIPPET = 'apply plugin: "com.google.gms.google-services" // Google Services plugin';
|
|
13
11
|
const CIO_PROJECT_GOOGLE_SNIPPET = exports.CIO_PROJECT_GOOGLE_SNIPPET = ' classpath "com.google.gms:google-services:4.3.13" // Google Services plugin';
|
|
14
12
|
const CIO_MAINAPPLICATION_ONCREATE_REGEX = exports.CIO_MAINAPPLICATION_ONCREATE_REGEX = /override\s+fun\s+onCreate\s*\(\s*\)\s*\{[\s\S]*?\}/;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CIO_PROJECT_BUILDSCRIPTS_REGEX","exports","CIO_APP_APPLY_REGEX","
|
|
1
|
+
{"version":3,"names":["CIO_PROJECT_BUILDSCRIPTS_REGEX","exports","CIO_APP_APPLY_REGEX","CIO_PROJECT_ALLPROJECTS_REGEX","CIO_APP_GOOGLE_SNIPPET","CIO_PROJECT_GOOGLE_SNIPPET","CIO_MAINAPPLICATION_ONCREATE_REGEX","CIO_NATIVE_SDK_INITIALIZE_CALL","CIO_NATIVE_SDK_INITIALIZE_SNIPPET"],"sources":["android.ts"],"sourcesContent":["export const CIO_PROJECT_BUILDSCRIPTS_REGEX =\n /(buildscript\\s*\\{(.|\\n)*dependencies\\s*\\{)/;\nexport const CIO_APP_APPLY_REGEX = /(apply plugin: \"com.android.application\")/;\nexport const CIO_PROJECT_ALLPROJECTS_REGEX =\n /(allprojects\\s*\\{(.|\\n){1,500}repositories\\s*\\{)/;\n\nexport const CIO_APP_GOOGLE_SNIPPET =\n 'apply plugin: \"com.google.gms.google-services\" // Google Services plugin';\nexport const CIO_PROJECT_GOOGLE_SNIPPET =\n ' classpath \"com.google.gms:google-services:4.3.13\" // Google Services plugin';\n\nexport const CIO_MAINAPPLICATION_ONCREATE_REGEX = /override\\s+fun\\s+onCreate\\s*\\(\\s*\\)\\s*\\{[\\s\\S]*?\\}/;\n// Actual method call, also used to detect if Customer.io auto initialization is already present\nexport const CIO_NATIVE_SDK_INITIALIZE_CALL = 'CustomerIOSDKInitializer.initialize(this)';\n// Complete code snippet to inject into MainActivity.onCreate()\nexport const CIO_NATIVE_SDK_INITIALIZE_SNIPPET = `// Auto Initialize Native Customer.io SDK\n ${CIO_NATIVE_SDK_INITIALIZE_CALL}`;\n"],"mappings":";;;;;;AAAO,MAAMA,8BAA8B,GAAAC,OAAA,CAAAD,8BAAA,GACzC,4CAA4C;AACvC,MAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,2CAA2C;AACvE,MAAMC,6BAA6B,GAAAF,OAAA,CAAAE,6BAAA,GACxC,kDAAkD;AAE7C,MAAMC,sBAAsB,GAAAH,OAAA,CAAAG,sBAAA,GACjC,2EAA2E;AACtE,MAAMC,0BAA0B,GAAAJ,OAAA,CAAAI,0BAAA,GACrC,sFAAsF;AAEjF,MAAMC,kCAAkC,GAAAL,OAAA,CAAAK,kCAAA,GAAG,oDAAoD;AACtG;AACO,MAAMC,8BAA8B,GAAAN,OAAA,CAAAM,8BAAA,GAAG,2CAA2C;AACzF;AACO,MAAMC,iCAAiC,GAAAP,OAAA,CAAAO,iCAAA,GAAG;AACjD,MAAMD,8BAA8B,EAAE","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { withAndroidManifestUpdates } from './withAndroidManifestUpdates';
|
|
2
2
|
import { withAppGoogleServices } from './withAppGoogleServices';
|
|
3
|
-
import { withGistMavenRepository } from './withGistMavenRepository';
|
|
4
3
|
import { withGoogleServicesJSON } from './withGoogleServicesJSON';
|
|
5
4
|
import { withMainApplicationModifications } from './withMainApplicationModifications';
|
|
6
5
|
import { withNotificationChannelMetadata } from './withNotificationChannelMetadata';
|
|
@@ -10,7 +9,6 @@ export function withCIOAndroid(config, sdkConfig, props) {
|
|
|
10
9
|
// Only run notification setup if props are provided
|
|
11
10
|
if (props) {
|
|
12
11
|
var _props$pushNotificati;
|
|
13
|
-
config = withGistMavenRepository(config, props);
|
|
14
12
|
config = withProjectGoogleServices(config, props);
|
|
15
13
|
config = withAppGoogleServices(config, props);
|
|
16
14
|
config = withGoogleServicesJSON(config, props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["withAndroidManifestUpdates","withAppGoogleServices","
|
|
1
|
+
{"version":3,"names":["withAndroidManifestUpdates","withAppGoogleServices","withGoogleServicesJSON","withMainApplicationModifications","withNotificationChannelMetadata","withProjectGoogleServices","withProjectStrings","withCIOAndroid","config","sdkConfig","props","_props$pushNotificati","setHighPriorityPushHandler","undefined","pushNotification","channel"],"sources":["withCIOAndroid.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config-types';\n\nimport type { CustomerIOPluginOptionsAndroid, NativeSDKConfig } from '../types/cio-types';\nimport { withAndroidManifestUpdates } from './withAndroidManifestUpdates';\nimport { withAppGoogleServices } from './withAppGoogleServices';\nimport { withGoogleServicesJSON } from './withGoogleServicesJSON';\nimport { withMainApplicationModifications } from './withMainApplicationModifications';\nimport { withNotificationChannelMetadata } from './withNotificationChannelMetadata';\nimport { withProjectGoogleServices } from './withProjectGoogleServices';\nimport { withProjectStrings } from './withProjectStrings';\n\nexport function withCIOAndroid(\n config: ExpoConfig,\n sdkConfig?: NativeSDKConfig,\n props?: CustomerIOPluginOptionsAndroid,\n): ExpoConfig {\n // Only run notification setup if props are provided\n if (props) {\n config = withProjectGoogleServices(config, props);\n config = withAppGoogleServices(config, props);\n config = withGoogleServicesJSON(config, props);\n if (props.setHighPriorityPushHandler !== undefined) {\n config = withAndroidManifestUpdates(config, props);\n }\n if (props.pushNotification?.channel) {\n config = withNotificationChannelMetadata(config, props);\n }\n }\n\n // Add auto initialization if sdkConfig is provided\n if (sdkConfig) {\n config = withMainApplicationModifications(config, sdkConfig);\n }\n\n // Update project strings for user agent metadata\n config = withProjectStrings(config);\n\n return config;\n}\n"],"mappings":"AAGA,SAASA,0BAA0B,QAAQ,8BAA8B;AACzE,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,+BAA+B,QAAQ,mCAAmC;AACnF,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,OAAO,SAASC,cAAcA,CAC5BC,MAAkB,EAClBC,SAA2B,EAC3BC,KAAsC,EAC1B;EACZ;EACA,IAAIA,KAAK,EAAE;IAAA,IAAAC,qBAAA;IACTH,MAAM,GAAGH,yBAAyB,CAACG,MAAM,EAAEE,KAAK,CAAC;IACjDF,MAAM,GAAGP,qBAAqB,CAACO,MAAM,EAAEE,KAAK,CAAC;IAC7CF,MAAM,GAAGN,sBAAsB,CAACM,MAAM,EAAEE,KAAK,CAAC;IAC9C,IAAIA,KAAK,CAACE,0BAA0B,KAAKC,SAAS,EAAE;MAClDL,MAAM,GAAGR,0BAA0B,CAACQ,MAAM,EAAEE,KAAK,CAAC;IACpD;IACA,KAAAC,qBAAA,GAAID,KAAK,CAACI,gBAAgB,cAAAH,qBAAA,eAAtBA,qBAAA,CAAwBI,OAAO,EAAE;MACnCP,MAAM,GAAGJ,+BAA+B,CAACI,MAAM,EAAEE,KAAK,CAAC;IACzD;EACF;;EAEA;EACA,IAAID,SAAS,EAAE;IACbD,MAAM,GAAGL,gCAAgC,CAACK,MAAM,EAAEC,SAAS,CAAC;EAC9D;;EAEA;EACAD,MAAM,GAAGF,kBAAkB,CAACE,MAAM,CAAC;EAEnC,OAAOA,MAAM;AACf","ignoreList":[]}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export const CIO_PROJECT_BUILDSCRIPTS_REGEX = /(buildscript\s*\{(.|\n)*dependencies\s*\{)/;
|
|
2
2
|
export const CIO_APP_APPLY_REGEX = /(apply plugin: "com.android.application")/;
|
|
3
|
-
export const CIO_GIST_MAVEN_REGEX = /maven { url "https:\/\/maven.gist.build" }/;
|
|
4
3
|
export const CIO_PROJECT_ALLPROJECTS_REGEX = /(allprojects\s*\{(.|\n){1,500}repositories\s*\{)/;
|
|
5
|
-
export const CIO_PROJECT_GIST_MAVEN_SNIPPET = ' maven { url "https://maven.gist.build" }';
|
|
6
4
|
export const CIO_APP_GOOGLE_SNIPPET = 'apply plugin: "com.google.gms.google-services" // Google Services plugin';
|
|
7
5
|
export const CIO_PROJECT_GOOGLE_SNIPPET = ' classpath "com.google.gms:google-services:4.3.13" // Google Services plugin';
|
|
8
6
|
export const CIO_MAINAPPLICATION_ONCREATE_REGEX = /override\s+fun\s+onCreate\s*\(\s*\)\s*\{[\s\S]*?\}/;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CIO_PROJECT_BUILDSCRIPTS_REGEX","CIO_APP_APPLY_REGEX","
|
|
1
|
+
{"version":3,"names":["CIO_PROJECT_BUILDSCRIPTS_REGEX","CIO_APP_APPLY_REGEX","CIO_PROJECT_ALLPROJECTS_REGEX","CIO_APP_GOOGLE_SNIPPET","CIO_PROJECT_GOOGLE_SNIPPET","CIO_MAINAPPLICATION_ONCREATE_REGEX","CIO_NATIVE_SDK_INITIALIZE_CALL","CIO_NATIVE_SDK_INITIALIZE_SNIPPET"],"sources":["android.ts"],"sourcesContent":["export const CIO_PROJECT_BUILDSCRIPTS_REGEX =\n /(buildscript\\s*\\{(.|\\n)*dependencies\\s*\\{)/;\nexport const CIO_APP_APPLY_REGEX = /(apply plugin: \"com.android.application\")/;\nexport const CIO_PROJECT_ALLPROJECTS_REGEX =\n /(allprojects\\s*\\{(.|\\n){1,500}repositories\\s*\\{)/;\n\nexport const CIO_APP_GOOGLE_SNIPPET =\n 'apply plugin: \"com.google.gms.google-services\" // Google Services plugin';\nexport const CIO_PROJECT_GOOGLE_SNIPPET =\n ' classpath \"com.google.gms:google-services:4.3.13\" // Google Services plugin';\n\nexport const CIO_MAINAPPLICATION_ONCREATE_REGEX = /override\\s+fun\\s+onCreate\\s*\\(\\s*\\)\\s*\\{[\\s\\S]*?\\}/;\n// Actual method call, also used to detect if Customer.io auto initialization is already present\nexport const CIO_NATIVE_SDK_INITIALIZE_CALL = 'CustomerIOSDKInitializer.initialize(this)';\n// Complete code snippet to inject into MainActivity.onCreate()\nexport const CIO_NATIVE_SDK_INITIALIZE_SNIPPET = `// Auto Initialize Native Customer.io SDK\n ${CIO_NATIVE_SDK_INITIALIZE_CALL}`;\n"],"mappings":"AAAA,OAAO,MAAMA,8BAA8B,GACzC,4CAA4C;AAC9C,OAAO,MAAMC,mBAAmB,GAAG,2CAA2C;AAC9E,OAAO,MAAMC,6BAA6B,GACxC,kDAAkD;AAEpD,OAAO,MAAMC,sBAAsB,GACjC,2EAA2E;AAC7E,OAAO,MAAMC,0BAA0B,GACrC,sFAAsF;AAExF,OAAO,MAAMC,kCAAkC,GAAG,oDAAoD;AACtG;AACA,OAAO,MAAMC,8BAA8B,GAAG,2CAA2C;AACzF;AACA,OAAO,MAAMC,iCAAiC,GAAG;AACjD,MAAMD,8BAA8B,EAAE","ignoreList":[]}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export declare const CIO_PROJECT_BUILDSCRIPTS_REGEX: RegExp;
|
|
2
2
|
export declare const CIO_APP_APPLY_REGEX: RegExp;
|
|
3
|
-
export declare const CIO_GIST_MAVEN_REGEX: RegExp;
|
|
4
3
|
export declare const CIO_PROJECT_ALLPROJECTS_REGEX: RegExp;
|
|
5
|
-
export declare const CIO_PROJECT_GIST_MAVEN_SNIPPET = " maven { url \"https://maven.gist.build\" }";
|
|
6
4
|
export declare const CIO_APP_GOOGLE_SNIPPET = "apply plugin: \"com.google.gms.google-services\" // Google Services plugin";
|
|
7
5
|
export declare const CIO_PROJECT_GOOGLE_SNIPPET = " classpath \"com.google.gms:google-services:4.3.13\" // Google Services plugin";
|
|
8
6
|
export declare const CIO_MAINAPPLICATION_ONCREATE_REGEX: RegExp;
|
|
@@ -3,7 +3,6 @@ import type { ExpoConfig } from '@expo/config-types';
|
|
|
3
3
|
import type { CustomerIOPluginOptionsAndroid, NativeSDKConfig } from '../types/cio-types';
|
|
4
4
|
import { withAndroidManifestUpdates } from './withAndroidManifestUpdates';
|
|
5
5
|
import { withAppGoogleServices } from './withAppGoogleServices';
|
|
6
|
-
import { withGistMavenRepository } from './withGistMavenRepository';
|
|
7
6
|
import { withGoogleServicesJSON } from './withGoogleServicesJSON';
|
|
8
7
|
import { withMainApplicationModifications } from './withMainApplicationModifications';
|
|
9
8
|
import { withNotificationChannelMetadata } from './withNotificationChannelMetadata';
|
|
@@ -17,7 +16,6 @@ export function withCIOAndroid(
|
|
|
17
16
|
): ExpoConfig {
|
|
18
17
|
// Only run notification setup if props are provided
|
|
19
18
|
if (props) {
|
|
20
|
-
config = withGistMavenRepository(config, props);
|
|
21
19
|
config = withProjectGoogleServices(config, props);
|
|
22
20
|
config = withAppGoogleServices(config, props);
|
|
23
21
|
config = withGoogleServicesJSON(config, props);
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
export const CIO_PROJECT_BUILDSCRIPTS_REGEX =
|
|
2
2
|
/(buildscript\s*\{(.|\n)*dependencies\s*\{)/;
|
|
3
3
|
export const CIO_APP_APPLY_REGEX = /(apply plugin: "com.android.application")/;
|
|
4
|
-
export const CIO_GIST_MAVEN_REGEX =
|
|
5
|
-
/maven { url "https:\/\/maven.gist.build" }/;
|
|
6
4
|
export const CIO_PROJECT_ALLPROJECTS_REGEX =
|
|
7
5
|
/(allprojects\s*\{(.|\n){1,500}repositories\s*\{)/;
|
|
8
6
|
|
|
9
|
-
export const CIO_PROJECT_GIST_MAVEN_SNIPPET =
|
|
10
|
-
' maven { url "https://maven.gist.build" }';
|
|
11
7
|
export const CIO_APP_GOOGLE_SNIPPET =
|
|
12
8
|
'apply plugin: "com.google.gms.google-services" // Google Services plugin';
|
|
13
9
|
export const CIO_PROJECT_GOOGLE_SNIPPET =
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.withGistMavenRepository = void 0;
|
|
7
|
-
var _configPlugins = require("@expo/config-plugins");
|
|
8
|
-
var _android = require("../helpers/constants/android");
|
|
9
|
-
var _logger = require("../utils/logger");
|
|
10
|
-
const withGistMavenRepository = configOuter => {
|
|
11
|
-
return (0, _configPlugins.withProjectBuildGradle)(configOuter, props => {
|
|
12
|
-
const targetMatch = props.modResults.contents.match(_android.CIO_GIST_MAVEN_REGEX);
|
|
13
|
-
if (!targetMatch) {
|
|
14
|
-
props.modResults.contents = props.modResults.contents.replace(_android.CIO_PROJECT_ALLPROJECTS_REGEX, `$1\n${_android.CIO_PROJECT_GIST_MAVEN_SNIPPET}`);
|
|
15
|
-
} else {
|
|
16
|
-
_logger.logger.info('build.gradle snippet already exists. Skipping...');
|
|
17
|
-
}
|
|
18
|
-
return props;
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
exports.withGistMavenRepository = withGistMavenRepository;
|
|
22
|
-
//# sourceMappingURL=withGistMavenRepository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_configPlugins","require","_android","_logger","withGistMavenRepository","configOuter","withProjectBuildGradle","props","targetMatch","modResults","contents","match","CIO_GIST_MAVEN_REGEX","replace","CIO_PROJECT_ALLPROJECTS_REGEX","CIO_PROJECT_GIST_MAVEN_SNIPPET","logger","info","exports"],"sources":["withGistMavenRepository.ts"],"sourcesContent":["import type { ConfigPlugin } from '@expo/config-plugins';\nimport { withProjectBuildGradle } from '@expo/config-plugins';\n\nimport {\n CIO_GIST_MAVEN_REGEX,\n CIO_PROJECT_ALLPROJECTS_REGEX,\n CIO_PROJECT_GIST_MAVEN_SNIPPET,\n} from '../helpers/constants/android';\nimport { logger } from '../utils/logger';\nimport type { CustomerIOPluginOptionsAndroid } from './../types/cio-types';\n\nexport const withGistMavenRepository: ConfigPlugin<\n CustomerIOPluginOptionsAndroid\n> = (configOuter) => {\n return withProjectBuildGradle(configOuter, (props) => {\n const targetMatch = props.modResults.contents.match(CIO_GIST_MAVEN_REGEX);\n if (!targetMatch) {\n props.modResults.contents = props.modResults.contents.replace(\n CIO_PROJECT_ALLPROJECTS_REGEX,\n `$1\\n${CIO_PROJECT_GIST_MAVEN_SNIPPET}`\n );\n } else {\n logger.info('build.gradle snippet already exists. Skipping...');\n }\n\n return props;\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,OAAA,GAAAF,OAAA;AAGO,MAAMG,uBAEZ,GAAIC,WAAW,IAAK;EACnB,OAAO,IAAAC,qCAAsB,EAACD,WAAW,EAAGE,KAAK,IAAK;IACpD,MAAMC,WAAW,GAAGD,KAAK,CAACE,UAAU,CAACC,QAAQ,CAACC,KAAK,CAACC,6BAAoB,CAAC;IACzE,IAAI,CAACJ,WAAW,EAAE;MAChBD,KAAK,CAACE,UAAU,CAACC,QAAQ,GAAGH,KAAK,CAACE,UAAU,CAACC,QAAQ,CAACG,OAAO,CAC3DC,sCAA6B,EAC7B,OAAOC,uCAA8B,EACvC,CAAC;IACH,CAAC,MAAM;MACLC,cAAM,CAACC,IAAI,CAAC,kDAAkD,CAAC;IACjE;IAEA,OAAOV,KAAK;EACd,CAAC,CAAC;AACJ,CAAC;AAACW,OAAA,CAAAd,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { withProjectBuildGradle } from '@expo/config-plugins';
|
|
2
|
-
import { CIO_GIST_MAVEN_REGEX, CIO_PROJECT_ALLPROJECTS_REGEX, CIO_PROJECT_GIST_MAVEN_SNIPPET } from '../helpers/constants/android';
|
|
3
|
-
import { logger } from '../utils/logger';
|
|
4
|
-
export const withGistMavenRepository = configOuter => {
|
|
5
|
-
return withProjectBuildGradle(configOuter, props => {
|
|
6
|
-
const targetMatch = props.modResults.contents.match(CIO_GIST_MAVEN_REGEX);
|
|
7
|
-
if (!targetMatch) {
|
|
8
|
-
props.modResults.contents = props.modResults.contents.replace(CIO_PROJECT_ALLPROJECTS_REGEX, `$1\n${CIO_PROJECT_GIST_MAVEN_SNIPPET}`);
|
|
9
|
-
} else {
|
|
10
|
-
logger.info('build.gradle snippet already exists. Skipping...');
|
|
11
|
-
}
|
|
12
|
-
return props;
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=withGistMavenRepository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["withProjectBuildGradle","CIO_GIST_MAVEN_REGEX","CIO_PROJECT_ALLPROJECTS_REGEX","CIO_PROJECT_GIST_MAVEN_SNIPPET","logger","withGistMavenRepository","configOuter","props","targetMatch","modResults","contents","match","replace","info"],"sources":["withGistMavenRepository.ts"],"sourcesContent":["import type { ConfigPlugin } from '@expo/config-plugins';\nimport { withProjectBuildGradle } from '@expo/config-plugins';\n\nimport {\n CIO_GIST_MAVEN_REGEX,\n CIO_PROJECT_ALLPROJECTS_REGEX,\n CIO_PROJECT_GIST_MAVEN_SNIPPET,\n} from '../helpers/constants/android';\nimport { logger } from '../utils/logger';\nimport type { CustomerIOPluginOptionsAndroid } from './../types/cio-types';\n\nexport const withGistMavenRepository: ConfigPlugin<\n CustomerIOPluginOptionsAndroid\n> = (configOuter) => {\n return withProjectBuildGradle(configOuter, (props) => {\n const targetMatch = props.modResults.contents.match(CIO_GIST_MAVEN_REGEX);\n if (!targetMatch) {\n props.modResults.contents = props.modResults.contents.replace(\n CIO_PROJECT_ALLPROJECTS_REGEX,\n `$1\\n${CIO_PROJECT_GIST_MAVEN_SNIPPET}`\n );\n } else {\n logger.info('build.gradle snippet already exists. Skipping...');\n }\n\n return props;\n });\n};\n"],"mappings":"AACA,SAASA,sBAAsB,QAAQ,sBAAsB;AAE7D,SACEC,oBAAoB,EACpBC,6BAA6B,EAC7BC,8BAA8B,QACzB,8BAA8B;AACrC,SAASC,MAAM,QAAQ,iBAAiB;AAGxC,OAAO,MAAMC,uBAEZ,GAAIC,WAAW,IAAK;EACnB,OAAON,sBAAsB,CAACM,WAAW,EAAGC,KAAK,IAAK;IACpD,MAAMC,WAAW,GAAGD,KAAK,CAACE,UAAU,CAACC,QAAQ,CAACC,KAAK,CAACV,oBAAoB,CAAC;IACzE,IAAI,CAACO,WAAW,EAAE;MAChBD,KAAK,CAACE,UAAU,CAACC,QAAQ,GAAGH,KAAK,CAACE,UAAU,CAACC,QAAQ,CAACE,OAAO,CAC3DV,6BAA6B,EAC7B,OAAOC,8BAA8B,EACvC,CAAC;IACH,CAAC,MAAM;MACLC,MAAM,CAACS,IAAI,CAAC,kDAAkD,CAAC;IACjE;IAEA,OAAON,KAAK;EACd,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
-
import { withProjectBuildGradle } from '@expo/config-plugins';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
CIO_GIST_MAVEN_REGEX,
|
|
6
|
-
CIO_PROJECT_ALLPROJECTS_REGEX,
|
|
7
|
-
CIO_PROJECT_GIST_MAVEN_SNIPPET,
|
|
8
|
-
} from '../helpers/constants/android';
|
|
9
|
-
import { logger } from '../utils/logger';
|
|
10
|
-
import type { CustomerIOPluginOptionsAndroid } from './../types/cio-types';
|
|
11
|
-
|
|
12
|
-
export const withGistMavenRepository: ConfigPlugin<
|
|
13
|
-
CustomerIOPluginOptionsAndroid
|
|
14
|
-
> = (configOuter) => {
|
|
15
|
-
return withProjectBuildGradle(configOuter, (props) => {
|
|
16
|
-
const targetMatch = props.modResults.contents.match(CIO_GIST_MAVEN_REGEX);
|
|
17
|
-
if (!targetMatch) {
|
|
18
|
-
props.modResults.contents = props.modResults.contents.replace(
|
|
19
|
-
CIO_PROJECT_ALLPROJECTS_REGEX,
|
|
20
|
-
`$1\n${CIO_PROJECT_GIST_MAVEN_SNIPPET}`
|
|
21
|
-
);
|
|
22
|
-
} else {
|
|
23
|
-
logger.info('build.gradle snippet already exists. Skipping...');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return props;
|
|
27
|
-
});
|
|
28
|
-
};
|