@expo/config-plugins 9.0.1 → 9.0.3
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/build/plugins/withPlugins.d.ts +1 -1
- package/build/plugins/withPlugins.js +1 -1
- package/build/plugins/withPlugins.js.map +1 -1
- package/build/plugins/withStaticPlugin.js +13 -1
- package/build/plugins/withStaticPlugin.js.map +1 -1
- package/build/utils/plugin-resolver.js +15 -1
- package/build/utils/plugin-resolver.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,6 +3,6 @@ import { ConfigPlugin, StaticPlugin } from '../Plugin.types';
|
|
|
3
3
|
* Resolves a list of plugins.
|
|
4
4
|
*
|
|
5
5
|
* @param config exported config
|
|
6
|
-
* @param plugins list of config
|
|
6
|
+
* @param plugins list of config plugins to apply to the exported config
|
|
7
7
|
*/
|
|
8
8
|
export declare const withPlugins: ConfigPlugin<(StaticPlugin | ConfigPlugin | string)[]>;
|
|
@@ -23,7 +23,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
23
23
|
* Resolves a list of plugins.
|
|
24
24
|
*
|
|
25
25
|
* @param config exported config
|
|
26
|
-
* @param plugins list of config
|
|
26
|
+
* @param plugins list of config plugins to apply to the exported config
|
|
27
27
|
*/
|
|
28
28
|
const withPlugins = (config, plugins) => {
|
|
29
29
|
(0, _assert().default)(Array.isArray(plugins), 'withPlugins expected a valid array of plugins or plugin module paths');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withPlugins.js","names":["_assert","data","_interopRequireDefault","require","_withStaticPlugin","e","__esModule","default","withPlugins","config","plugins","assert","Array","isArray","reduce","prev","plugin","withStaticPlugin","exports"],"sources":["../../src/plugins/withPlugins.ts"],"sourcesContent":["import assert from 'assert';\n\nimport { withStaticPlugin } from './withStaticPlugin';\nimport { ConfigPlugin, StaticPlugin } from '../Plugin.types';\n\n/**\n * Resolves a list of plugins.\n *\n * @param config exported config\n * @param plugins list of config
|
|
1
|
+
{"version":3,"file":"withPlugins.js","names":["_assert","data","_interopRequireDefault","require","_withStaticPlugin","e","__esModule","default","withPlugins","config","plugins","assert","Array","isArray","reduce","prev","plugin","withStaticPlugin","exports"],"sources":["../../src/plugins/withPlugins.ts"],"sourcesContent":["import assert from 'assert';\n\nimport { withStaticPlugin } from './withStaticPlugin';\nimport { ConfigPlugin, StaticPlugin } from '../Plugin.types';\n\n/**\n * Resolves a list of plugins.\n *\n * @param config exported config\n * @param plugins list of config plugins to apply to the exported config\n */\nexport const withPlugins: ConfigPlugin<(StaticPlugin | ConfigPlugin | string)[]> = (\n config,\n plugins\n) => {\n assert(\n Array.isArray(plugins),\n 'withPlugins expected a valid array of plugins or plugin module paths'\n );\n return plugins.reduce((prev, plugin) => withStaticPlugin(prev, { plugin }), config);\n};\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,kBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,iBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAsD,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGtD;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,WAAmE,GAAGA,CACjFC,MAAM,EACNC,OAAO,KACJ;EACH,IAAAC,iBAAM,EACJC,KAAK,CAACC,OAAO,CAACH,OAAO,CAAC,EACtB,sEACF,CAAC;EACD,OAAOA,OAAO,CAACI,MAAM,CAAC,CAACC,IAAI,EAAEC,MAAM,KAAK,IAAAC,oCAAgB,EAACF,IAAI,EAAE;IAAEC;EAAO,CAAC,CAAC,EAAEP,MAAM,CAAC;AACrF,CAAC;AAACS,OAAA,CAAAV,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -127,7 +127,19 @@ const withStaticPlugin = (config, props) => {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
} else {
|
|
130
|
-
|
|
130
|
+
if (typeof pluginResolve === 'object') {
|
|
131
|
+
throw new (_errors().PluginError)(`Plugin is an unexpected object, with keys: "${Object.keys(pluginResolve).join(', ')}".\n
|
|
132
|
+
If you tried to provide parameters to a config plugin, make sure the plugin configuration is wrapped by square brackets. Ex:\n
|
|
133
|
+
[
|
|
134
|
+
"some-config-plugin",
|
|
135
|
+
{
|
|
136
|
+
"someParam": "someValue"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
\n
|
|
140
|
+
See the package documentation on how to correctly configure the plugin.`, 'INVALID_PLUGIN_TYPE');
|
|
141
|
+
}
|
|
142
|
+
throw new (_errors().PluginError)(`Plugin is an unexpected type: ${typeof pluginResolve}. See the package documentation on how to correctly configure the plugin.`, 'INVALID_PLUGIN_TYPE');
|
|
131
143
|
}
|
|
132
144
|
|
|
133
145
|
// Execute the plugin.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withStaticPlugin.js","names":["_assert","data","_interopRequireDefault","require","_getenv","_errors","_pluginResolver","e","__esModule","default","EXPO_DEBUG","boolish","EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS","EXPO_USE_UNVERSIONED_PLUGINS","isModuleMissingError","name","error","includes","code","message","isUnexpectedTokenError","SyntaxError","PluginError","match","withStaticPlugin","config","props","projectRoot","_internal","assertInternalProjectRoot","pluginResolve","pluginProps","normalizeStaticPlugin","plugin","assert","_resolverError","withPlugin","resolveConfigPluginFunction","_isLegacyPlugin","fallback","console","log","shouldMuteWarning","exports"],"sources":["../../src/plugins/withStaticPlugin.ts"],"sourcesContent":["import assert from 'assert';\nimport { boolish } from 'getenv';\n\nimport { ConfigPlugin, StaticPlugin } from '../Plugin.types';\nimport { PluginError } from '../utils/errors';\nimport {\n assertInternalProjectRoot,\n normalizeStaticPlugin,\n resolveConfigPluginFunction,\n} from '../utils/plugin-resolver';\n\nconst EXPO_DEBUG = boolish('EXPO_DEBUG', false);\n\n// Show all error info related to plugin resolution.\nconst EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS = boolish('EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS', false);\n// Force using the fallback unversioned plugin instead of a local versioned copy,\n// this should only be used for testing the CLI.\nconst EXPO_USE_UNVERSIONED_PLUGINS = boolish('EXPO_USE_UNVERSIONED_PLUGINS', false);\n\nfunction isModuleMissingError(name: string, error: Error): boolean {\n // @ts-ignore\n if (['MODULE_NOT_FOUND', 'PLUGIN_NOT_FOUND'].includes(error.code)) {\n return true;\n }\n return error.message.includes(`Cannot find module '${name}'`);\n}\n\nfunction isUnexpectedTokenError(error: Error): boolean {\n if (\n error instanceof SyntaxError ||\n (error instanceof PluginError && error.code === 'INVALID_PLUGIN_IMPORT')\n ) {\n return (\n // These are the most common errors that'll be thrown when a package isn't transpiled correctly.\n !!error.message.match(/Unexpected token/) ||\n !!error.message.match(/Cannot use import statement/)\n );\n }\n return false;\n}\n\n/**\n * Resolves static module plugin and potentially falls back on a provided plugin if the module cannot be resolved\n *\n * @param config\n * @param fallback Plugin with `_resolverError` explaining why the module couldn't be used\n * @param projectRoot optional project root, fallback to _internal.projectRoot. Used for testing.\n * @param _isLegacyPlugin Used to suppress errors thrown by plugins that are applied automatically\n */\nexport const withStaticPlugin: ConfigPlugin<{\n plugin: StaticPlugin | ConfigPlugin | string;\n fallback?: ConfigPlugin<{ _resolverError: Error } & any>;\n projectRoot?: string;\n _isLegacyPlugin?: boolean;\n}> = (config, props) => {\n let projectRoot = props.projectRoot;\n if (!projectRoot) {\n projectRoot = config._internal?.projectRoot;\n assertInternalProjectRoot(projectRoot);\n }\n\n let [pluginResolve, pluginProps] = normalizeStaticPlugin(props.plugin);\n // Ensure no one uses this property by accident.\n assert(\n !pluginProps?._resolverError,\n `Plugin property '_resolverError' is a reserved property of \\`withStaticPlugin\\``\n );\n\n let withPlugin: ConfigPlugin<unknown>;\n\n if (\n // Function was provided, no need to resolve: [withPlugin, {}]\n typeof pluginResolve === 'function'\n ) {\n withPlugin = pluginResolve;\n } else if (typeof pluginResolve === 'string') {\n try {\n // Resolve and evaluate plugins.\n withPlugin = resolveConfigPluginFunction(projectRoot, pluginResolve);\n\n // Only force if the project has the versioned plugin, otherwise use default behavior.\n // This helps see which plugins are being skipped.\n if (\n EXPO_USE_UNVERSIONED_PLUGINS &&\n !!withPlugin &&\n !!props._isLegacyPlugin &&\n !!props.fallback\n ) {\n console.log(`Force \"${pluginResolve}\" to unversioned plugin`);\n withPlugin = props.fallback;\n }\n } catch (error: any) {\n if (EXPO_DEBUG) {\n if (EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS) {\n // Log the error in debug mode for plugins with fallbacks (like the Expo managed plugins).\n console.log(`Error resolving plugin \"${pluginResolve}\"`);\n console.log(error);\n console.log();\n } else {\n const shouldMuteWarning =\n props._isLegacyPlugin &&\n (isModuleMissingError(pluginResolve, error) || isUnexpectedTokenError(error));\n if (!shouldMuteWarning) {\n if (isModuleMissingError(pluginResolve, error)) {\n // Prevent causing log spew for basic resolution errors.\n console.log(`Could not find plugin \"${pluginResolve}\"`);\n } else {\n // Log the error in debug mode for plugins with fallbacks (like the Expo managed plugins).\n console.log(`Error resolving plugin \"${pluginResolve}\"`);\n console.log(error);\n console.log();\n }\n }\n }\n }\n // TODO: Maybe allow for `PluginError`s to be thrown so external plugins can assert invalid options.\n\n // If the static module failed to resolve, attempt to use a fallback.\n // This enables support for built-in plugins with versioned variations living in other packages.\n if (props.fallback) {\n if (!pluginProps) pluginProps = {};\n // Pass this to the fallback plugin for potential warnings about needing to install a versioned package.\n pluginProps._resolverError = error;\n withPlugin = props.fallback;\n } else {\n // If no fallback, throw the resolution error.\n throw error;\n }\n }\n } else {\n throw new PluginError(\n `Plugin is an unexpected type: ${typeof pluginRes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AA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"withStaticPlugin.js","names":["_assert","data","_interopRequireDefault","require","_getenv","_errors","_pluginResolver","e","__esModule","default","EXPO_DEBUG","boolish","EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS","EXPO_USE_UNVERSIONED_PLUGINS","isModuleMissingError","name","error","includes","code","message","isUnexpectedTokenError","SyntaxError","PluginError","match","withStaticPlugin","config","props","projectRoot","_internal","assertInternalProjectRoot","pluginResolve","pluginProps","normalizeStaticPlugin","plugin","assert","_resolverError","withPlugin","resolveConfigPluginFunction","_isLegacyPlugin","fallback","console","log","shouldMuteWarning","Object","keys","join","exports"],"sources":["../../src/plugins/withStaticPlugin.ts"],"sourcesContent":["import assert from 'assert';\nimport { boolish } from 'getenv';\n\nimport { ConfigPlugin, StaticPlugin } from '../Plugin.types';\nimport { PluginError } from '../utils/errors';\nimport {\n assertInternalProjectRoot,\n normalizeStaticPlugin,\n resolveConfigPluginFunction,\n} from '../utils/plugin-resolver';\n\nconst EXPO_DEBUG = boolish('EXPO_DEBUG', false);\n\n// Show all error info related to plugin resolution.\nconst EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS = boolish('EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS', false);\n// Force using the fallback unversioned plugin instead of a local versioned copy,\n// this should only be used for testing the CLI.\nconst EXPO_USE_UNVERSIONED_PLUGINS = boolish('EXPO_USE_UNVERSIONED_PLUGINS', false);\n\nfunction isModuleMissingError(name: string, error: Error): boolean {\n // @ts-ignore\n if (['MODULE_NOT_FOUND', 'PLUGIN_NOT_FOUND'].includes(error.code)) {\n return true;\n }\n return error.message.includes(`Cannot find module '${name}'`);\n}\n\nfunction isUnexpectedTokenError(error: Error): boolean {\n if (\n error instanceof SyntaxError ||\n (error instanceof PluginError && error.code === 'INVALID_PLUGIN_IMPORT')\n ) {\n return (\n // These are the most common errors that'll be thrown when a package isn't transpiled correctly.\n !!error.message.match(/Unexpected token/) ||\n !!error.message.match(/Cannot use import statement/)\n );\n }\n return false;\n}\n\n/**\n * Resolves static module plugin and potentially falls back on a provided plugin if the module cannot be resolved\n *\n * @param config\n * @param fallback Plugin with `_resolverError` explaining why the module couldn't be used\n * @param projectRoot optional project root, fallback to _internal.projectRoot. Used for testing.\n * @param _isLegacyPlugin Used to suppress errors thrown by plugins that are applied automatically\n */\nexport const withStaticPlugin: ConfigPlugin<{\n plugin: StaticPlugin | ConfigPlugin | string;\n fallback?: ConfigPlugin<{ _resolverError: Error } & any>;\n projectRoot?: string;\n _isLegacyPlugin?: boolean;\n}> = (config, props) => {\n let projectRoot = props.projectRoot;\n if (!projectRoot) {\n projectRoot = config._internal?.projectRoot;\n assertInternalProjectRoot(projectRoot);\n }\n\n let [pluginResolve, pluginProps] = normalizeStaticPlugin(props.plugin);\n // Ensure no one uses this property by accident.\n assert(\n !pluginProps?._resolverError,\n `Plugin property '_resolverError' is a reserved property of \\`withStaticPlugin\\``\n );\n\n let withPlugin: ConfigPlugin<unknown>;\n\n if (\n // Function was provided, no need to resolve: [withPlugin, {}]\n typeof pluginResolve === 'function'\n ) {\n withPlugin = pluginResolve;\n } else if (typeof pluginResolve === 'string') {\n try {\n // Resolve and evaluate plugins.\n withPlugin = resolveConfigPluginFunction(projectRoot, pluginResolve);\n\n // Only force if the project has the versioned plugin, otherwise use default behavior.\n // This helps see which plugins are being skipped.\n if (\n EXPO_USE_UNVERSIONED_PLUGINS &&\n !!withPlugin &&\n !!props._isLegacyPlugin &&\n !!props.fallback\n ) {\n console.log(`Force \"${pluginResolve}\" to unversioned plugin`);\n withPlugin = props.fallback;\n }\n } catch (error: any) {\n if (EXPO_DEBUG) {\n if (EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS) {\n // Log the error in debug mode for plugins with fallbacks (like the Expo managed plugins).\n console.log(`Error resolving plugin \"${pluginResolve}\"`);\n console.log(error);\n console.log();\n } else {\n const shouldMuteWarning =\n props._isLegacyPlugin &&\n (isModuleMissingError(pluginResolve, error) || isUnexpectedTokenError(error));\n if (!shouldMuteWarning) {\n if (isModuleMissingError(pluginResolve, error)) {\n // Prevent causing log spew for basic resolution errors.\n console.log(`Could not find plugin \"${pluginResolve}\"`);\n } else {\n // Log the error in debug mode for plugins with fallbacks (like the Expo managed plugins).\n console.log(`Error resolving plugin \"${pluginResolve}\"`);\n console.log(error);\n console.log();\n }\n }\n }\n }\n // TODO: Maybe allow for `PluginError`s to be thrown so external plugins can assert invalid options.\n\n // If the static module failed to resolve, attempt to use a fallback.\n // This enables support for built-in plugins with versioned variations living in other packages.\n if (props.fallback) {\n if (!pluginProps) pluginProps = {};\n // Pass this to the fallback plugin for potential warnings about needing to install a versioned package.\n pluginProps._resolverError = error;\n withPlugin = props.fallback;\n } else {\n // If no fallback, throw the resolution error.\n throw error;\n }\n }\n } else {\n if (typeof pluginResolve === 'object') {\n throw new PluginError(\n `Plugin is an unexpected object, with keys: \"${Object.keys(pluginResolve).join(', ')}\".\\n\nIf you tried to provide parameters to a config plugin, make sure the plugin configuration is wrapped by square brackets. Ex:\\n\n[\n \"some-config-plugin\",\n {\n \"someParam\": \"someValue\"\n }\n]\n\\n\nSee the package documentation on how to correctly configure the plugin.`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n throw new PluginError(\n `Plugin is an unexpected type: ${typeof pluginResolve}. See the package documentation on how to correctly configure the plugin.`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n\n // Execute the plugin.\n config = withPlugin(config, pluginProps);\n return config;\n};\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,QAAA;EAAA,MAAAJ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AC/E,IAAI,CAAC0B,iBAAiB,EAAE;YACtB,IAAI5B,oBAAoB,CAACgB,aAAa,EAAEd,KAAK,CAAC,EAAE;cAC9C;cACAwB,OAAO,CAACC,GAAG,CAAC,0BAA0BX,aAAa,GAAG,CAAC;YACzD,CAAC,MAAM;cACL;cACAU,OAAO,CAACC,GAAG,CAAC,2BAA2BX,aAAa,GAAG,CAAC;cACxDU,OAAO,CAACC,GAAG,CAACzB,KAAK,CAAC;cAClBwB,OAAO,CAACC,GAAG,CAAC,CAAC;YACf;UACF;QACF;MACF;MACA;;MAEA;MACA;MACA,IAAIf,KAAK,CAACa,QAAQ,EAAE;QAClB,IAAI,CAACR,WAAW,EAAEA,WAAW,GAAG,CAAC,CAAC;QAClC;QACAA,WAAW,CAACI,cAAc,GAAGnB,KAAK;QAClCoB,UAAU,GAAGV,KAAK,CAACa,QAAQ;MAC7B,CAAC,MAAM;QACL;QACA,MAAMvB,KAAK;MACb;IACF;EACF,CAAC,MAAM;IACL,IAAI,OAAOc,aAAa,KAAK,QAAQ,EAAE;MACrC,MAAM,KAAIR,qBAAW,EACnB,+CAA+CqB,MAAM,CAACC,IAAI,CAACd,aAAa,CAAC,CAACe,IAAI,CAAC,IAAI,CAAC;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,EAChE,qBACF,CAAC;IACH;IACA,MAAM,KAAIvB,qBAAW,EACnB,iCAAiC,OAAOQ,aAAa,2EAA2E,EAChI,qBACF,CAAC;EACH;;EAEA;EACAL,MAAM,GAAGW,UAAU,CAACX,MAAM,EAAEM,WAAW,CAAC;EACxC,OAAON,MAAM;AACf,CAAC;AAACqB,OAAA,CAAAtB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -60,7 +60,7 @@ function resolvePluginForModule(projectRoot, pluginReference) {
|
|
|
60
60
|
const pluginScriptFile = _resolveFrom().default.silent(projectRoot, pluginReference);
|
|
61
61
|
if (pluginScriptFile) {
|
|
62
62
|
return {
|
|
63
|
-
isPluginFile:
|
|
63
|
+
isPluginFile: pluginScriptFile.endsWith(path().sep + pluginFileName),
|
|
64
64
|
filePath: pluginScriptFile
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -73,6 +73,20 @@ function resolvePluginForModule(projectRoot, pluginReference) {
|
|
|
73
73
|
filePath: pluginPackageFile
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
+
const packageMainEntry = _resolveFrom().default.silent(projectRoot, pluginReference);
|
|
77
|
+
if (packageMainEntry) {
|
|
78
|
+
const relativePluginPath = packageMainEntry.replace(projectRoot, '').replace(/^\//, '');
|
|
79
|
+
console.warn(`"${pluginReference}" config plugin is being resolved from its package.json main entry (${relativePluginPath}).
|
|
80
|
+
This approach is deprecated and will throw an error in Expo SDK53.
|
|
81
|
+
|
|
82
|
+
To fix this:
|
|
83
|
+
1. Report this issue to the maintainer of "${pluginReference}" - they need to migrate to using \`app.plugin.js\` instead.
|
|
84
|
+
2. For immediate unblocking, reference the config plugin file directly: ${relativePluginPath}`);
|
|
85
|
+
return {
|
|
86
|
+
isPluginFile: false,
|
|
87
|
+
filePath: packageMainEntry
|
|
88
|
+
};
|
|
89
|
+
}
|
|
76
90
|
}
|
|
77
91
|
throw new (_errors().PluginError)(`Failed to resolve plugin for module "${pluginReference}" relative to "${projectRoot}"`, 'PLUGIN_NOT_FOUND');
|
|
78
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-resolver.js","names":["_assert","data","_interopRequireDefault","require","path","_interopRequireWildcard","_resolveFrom","_errors","_modules","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","pluginFileName","exports","resolvePluginForModule","projectRoot","pluginReference","moduleNameIsDirectFileReference","pluginScriptFile","resolveFrom","silent","isPluginFile","filePath","moduleNameIsPackageReference","pluginPackageFile","fileExists","PluginError","pathIsFilePath","name","match","slashCount","split","sep","length","startsWith","normalizeStaticPlugin","plugin","Array","isArray","assert","undefined","assertInternalProjectRoot","resolveConfigPluginFunction","resolveConfigPluginFunctionWithInfo","pluginFile","result","requirePluginFile","error","SyntaxError","learnMoreLink","pluginError","message","stack","resolveConfigPluginExport"],"sources":["../../src/utils/plugin-resolver.ts"],"sourcesContent":["import assert from 'assert';\nimport * as path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { PluginError } from './errors';\nimport { ConfigPlugin, StaticPlugin } from '../Plugin.types';\nimport { fileExists } from './modules';\n// Default plugin entry file name.\nexport const pluginFileName = 'app.plugin.js';\n\n// pluginReference is a node module or a file path, as user entered it in app.config.js\nexport function resolvePluginForModule(\n projectRoot: string,\n pluginReference: string\n): { filePath: string; isPluginFile: boolean } {\n if (moduleNameIsDirectFileReference(pluginReference)) {\n // Only resolve `./file.js`, `package/file.js`, `@org/package/file.js`\n const pluginScriptFile = resolveFrom.silent(projectRoot, pluginReference);\n if (pluginScriptFile) {\n return { isPluginFile: false, filePath: pluginScriptFile };\n }\n } else if (moduleNameIsPackageReference(pluginReference)) {\n // Only resolve `package -> package/app.plugin.js`, `@org/package -> @org/package/app.plugin.js`\n const pluginPackageFile = resolveFrom.silent(\n projectRoot,\n `${pluginReference}/${pluginFileName}`\n );\n if (pluginPackageFile && fileExists(pluginPackageFile)) {\n return { isPluginFile: true, filePath: pluginPackageFile };\n }\n }\n\n throw new PluginError(\n `Failed to resolve plugin for module \"${pluginReference}\" relative to \"${projectRoot}\"`,\n 'PLUGIN_NOT_FOUND'\n );\n}\n\n// TODO: Test windows\nfunction pathIsFilePath(name: string): boolean {\n // Matches lines starting with: . / ~/\n return !!name.match(/^(\\.|~\\/|\\/)/g);\n}\n\nexport function moduleNameIsDirectFileReference(name: string): boolean {\n if (pathIsFilePath(name)) {\n return true;\n }\n\n const slashCount = name.split(path.sep)?.length;\n // Orgs (like @expo/config ) should have more than one slash to be a direct file.\n if (name.startsWith('@')) {\n return slashCount > 2;\n }\n\n // Regular packages should be considered direct reference if they have more than one slash.\n return slashCount > 1;\n}\n\nexport function moduleNameIsPackageReference(name: string): boolean {\n const slashCount = name.split('/')?.length;\n return name.startsWith('@') ? slashCount === 2 : slashCount === 1;\n}\n\nexport function normalizeStaticPlugin(plugin: StaticPlugin | ConfigPlugin | string): StaticPlugin {\n if (Array.isArray(plugin)) {\n assert(\n plugin.length > 0 && plugin.length < 3,\n `Wrong number of arguments provided for static config plugin, expected either 1 or 2, got ${plugin.length}`\n );\n return plugin;\n }\n return [plugin, undefined];\n}\n\nexport function assertInternalProjectRoot(projectRoot?: string): asserts projectRoot {\n assert(\n projectRoot,\n `Unexpected: Config \\`_internal.projectRoot\\` isn't defined by expo-cli, this is a bug.`\n );\n}\n\n// Resolve the module function and assert type\nexport function resolveConfigPluginFunction(projectRoot: string, pluginReference: string) {\n const { plugin } = resolveConfigPluginFunctionWithInfo(projectRoot, pluginReference);\n return plugin;\n}\n\n// Resolve the module function and assert type\nexport function resolveConfigPluginFunctionWithInfo(projectRoot: string, pluginReference: string) {\n const { filePath: pluginFile, isPluginFile } = resolvePluginForModule(\n projectRoot,\n pluginReference\n );\n let result: any;\n try {\n result = requirePluginFile(pluginFile);\n } catch (error) {\n if (error instanceof SyntaxError) {\n const learnMoreLink = `Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin`;\n // If the plugin reference is a node module, and that node module has a syntax error, then it probably doesn't have an official config plugin.\n if (!isPluginFile && !moduleNameIsDirectFileReference(pluginReference)) {\n const pluginError = new PluginError(\n `Package \"${pluginReference}\" does not contain a valid config plugin.\\n${learnMoreLink}\\n\\n${error.message}`,\n 'INVALID_PLUGIN_IMPORT'\n );\n pluginError.stack = error.stack;\n throw pluginError;\n }\n }\n throw error;\n }\n\n const plugin = resolveConfigPluginExport({\n plugin: result,\n pluginFile,\n pluginReference,\n isPluginFile,\n });\n return { plugin, pluginFile, pluginReference, isPluginFile };\n}\n\n/**\n * - Resolve the exported contents of an Expo config (be it default or module.exports)\n * - Assert no promise exports\n * - Return config type\n * - Serialize config\n *\n * @param props.plugin plugin results\n * @param props.pluginFile plugin file path\n * @param props.pluginReference the string used to reference the plugin\n * @param props.isPluginFile is file path from the app.plugin.js module root\n */\nexport function resolveConfigPluginExport({\n plugin,\n pluginFile,\n pluginReference,\n isPluginFile,\n}: {\n plugin: any;\n pluginFile: string;\n pluginReference: string;\n isPluginFile: boolean;\n}): ConfigPlugin<unknown> {\n if (plugin.default != null) {\n plugin = plugin.default;\n }\n if (typeof plugin !== 'function') {\n const learnMoreLink = `Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin`;\n // If the plugin reference is a node module, and that node module does not export a function then it probably doesn't have a config plugin.\n if (!isPluginFile && !moduleNameIsDirectFileReference(pluginReference)) {\n throw new PluginError(\n `Package \"${pluginReference}\" does not contain a valid config plugin. Module must export a function from file: ${pluginFile}\\n${learnMoreLink}`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n throw new PluginError(\n `Plugin \"${pluginReference}\" must export a function from file: ${pluginFile}. ${learnMoreLink}`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n\n return plugin;\n}\n\nfunction requirePluginFile(filePath: string): any {\n try {\n return require(filePath);\n } catch (error) {\n // TODO: Improve error messages\n throw error;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAI,uBAAA,CAAAF,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,I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AuC4B,UAAU,KAAKK,aAAa,EAAE,EAC/F,qBACF,CAAC;EACH;EAEA,OAAOb,MAAM;AACf;AAEA,SAASU,iBAAiBA,CAACxB,QAAgB,EAAO;EAChD,IAAI;IACF,OAAOpC,OAAO,CAACoC,QAAQ,CAAC;EAC1B,CAAC,CAAC,OAAOyB,KAAK,EAAE;IACd;IACA,MAAMA,KAAK;EACb;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"plugin-resolver.js","names":["_assert","data","_interopRequireDefault","require","path","_interopRequireWildcard","_resolveFrom","_errors","_modules","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","pluginFileName","exports","resolvePluginForModule","projectRoot","pluginReference","moduleNameIsDirectFileReference","pluginScriptFile","resolveFrom","silent","isPluginFile","endsWith","sep","filePath","moduleNameIsPackageReference","pluginPackageFile","fileExists","packageMainEntry","relativePluginPath","replace","console","warn","PluginError","pathIsFilePath","name","match","slashCount","split","length","startsWith","normalizeStaticPlugin","plugin","Array","isArray","assert","undefined","assertInternalProjectRoot","resolveConfigPluginFunction","resolveConfigPluginFunctionWithInfo","pluginFile","result","requirePluginFile","error","SyntaxError","learnMoreLink","pluginError","message","stack","resolveConfigPluginExport"],"sources":["../../src/utils/plugin-resolver.ts"],"sourcesContent":["import assert from 'assert';\nimport * as path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { PluginError } from './errors';\nimport { ConfigPlugin, StaticPlugin } from '../Plugin.types';\nimport { fileExists } from './modules';\n// Default plugin entry file name.\nexport const pluginFileName = 'app.plugin.js';\n\n// pluginReference is a node module or a file path, as user entered it in app.config.js\nexport function resolvePluginForModule(\n projectRoot: string,\n pluginReference: string\n): { filePath: string; isPluginFile: boolean } {\n if (moduleNameIsDirectFileReference(pluginReference)) {\n // Only resolve `./file.js`, `package/file.js`, `@org/package/file.js`\n const pluginScriptFile = resolveFrom.silent(projectRoot, pluginReference);\n if (pluginScriptFile) {\n return {\n isPluginFile: pluginScriptFile.endsWith(path.sep + pluginFileName),\n filePath: pluginScriptFile,\n };\n }\n } else if (moduleNameIsPackageReference(pluginReference)) {\n // Only resolve `package -> package/app.plugin.js`, `@org/package -> @org/package/app.plugin.js`\n const pluginPackageFile = resolveFrom.silent(\n projectRoot,\n `${pluginReference}/${pluginFileName}`\n );\n if (pluginPackageFile && fileExists(pluginPackageFile)) {\n return { isPluginFile: true, filePath: pluginPackageFile };\n }\n const packageMainEntry = resolveFrom.silent(projectRoot, pluginReference);\n if (packageMainEntry) {\n const relativePluginPath = packageMainEntry.replace(projectRoot, '').replace(/^\\//, '');\n console.warn(\n `\"${pluginReference}\" config plugin is being resolved from its package.json main entry (${relativePluginPath}).\nThis approach is deprecated and will throw an error in Expo SDK53.\n\nTo fix this:\n1. Report this issue to the maintainer of \"${pluginReference}\" - they need to migrate to using \\`app.plugin.js\\` instead.\n2. For immediate unblocking, reference the config plugin file directly: ${relativePluginPath}`\n );\n return { isPluginFile: false, filePath: packageMainEntry };\n }\n }\n\n throw new PluginError(\n `Failed to resolve plugin for module \"${pluginReference}\" relative to \"${projectRoot}\"`,\n 'PLUGIN_NOT_FOUND'\n );\n}\n\n// TODO: Test windows\nfunction pathIsFilePath(name: string): boolean {\n // Matches lines starting with: . / ~/\n return !!name.match(/^(\\.|~\\/|\\/)/g);\n}\n\nexport function moduleNameIsDirectFileReference(name: string): boolean {\n if (pathIsFilePath(name)) {\n return true;\n }\n\n const slashCount = name.split(path.sep)?.length;\n // Orgs (like @expo/config ) should have more than one slash to be a direct file.\n if (name.startsWith('@')) {\n return slashCount > 2;\n }\n\n // Regular packages should be considered direct reference if they have more than one slash.\n return slashCount > 1;\n}\n\nexport function moduleNameIsPackageReference(name: string): boolean {\n const slashCount = name.split('/')?.length;\n return name.startsWith('@') ? slashCount === 2 : slashCount === 1;\n}\n\nexport function normalizeStaticPlugin(plugin: StaticPlugin | ConfigPlugin | string): StaticPlugin {\n if (Array.isArray(plugin)) {\n assert(\n plugin.length > 0 && plugin.length < 3,\n `Wrong number of arguments provided for static config plugin, expected either 1 or 2, got ${plugin.length}`\n );\n return plugin;\n }\n return [plugin, undefined];\n}\n\nexport function assertInternalProjectRoot(projectRoot?: string): asserts projectRoot {\n assert(\n projectRoot,\n `Unexpected: Config \\`_internal.projectRoot\\` isn't defined by expo-cli, this is a bug.`\n );\n}\n\n// Resolve the module function and assert type\nexport function resolveConfigPluginFunction(projectRoot: string, pluginReference: string) {\n const { plugin } = resolveConfigPluginFunctionWithInfo(projectRoot, pluginReference);\n return plugin;\n}\n\n// Resolve the module function and assert type\nexport function resolveConfigPluginFunctionWithInfo(projectRoot: string, pluginReference: string) {\n const { filePath: pluginFile, isPluginFile } = resolvePluginForModule(\n projectRoot,\n pluginReference\n );\n let result: any;\n try {\n result = requirePluginFile(pluginFile);\n } catch (error) {\n if (error instanceof SyntaxError) {\n const learnMoreLink = `Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin`;\n // If the plugin reference is a node module, and that node module has a syntax error, then it probably doesn't have an official config plugin.\n if (!isPluginFile && !moduleNameIsDirectFileReference(pluginReference)) {\n const pluginError = new PluginError(\n `Package \"${pluginReference}\" does not contain a valid config plugin.\\n${learnMoreLink}\\n\\n${error.message}`,\n 'INVALID_PLUGIN_IMPORT'\n );\n pluginError.stack = error.stack;\n throw pluginError;\n }\n }\n throw error;\n }\n\n const plugin = resolveConfigPluginExport({\n plugin: result,\n pluginFile,\n pluginReference,\n isPluginFile,\n });\n return { plugin, pluginFile, pluginReference, isPluginFile };\n}\n\n/**\n * - Resolve the exported contents of an Expo config (be it default or module.exports)\n * - Assert no promise exports\n * - Return config type\n * - Serialize config\n *\n * @param props.plugin plugin results\n * @param props.pluginFile plugin file path\n * @param props.pluginReference the string used to reference the plugin\n * @param props.isPluginFile is file path from the app.plugin.js module root\n */\nexport function resolveConfigPluginExport({\n plugin,\n pluginFile,\n pluginReference,\n isPluginFile,\n}: {\n plugin: any;\n pluginFile: string;\n pluginReference: string;\n isPluginFile: boolean;\n}): ConfigPlugin<unknown> {\n if (plugin.default != null) {\n plugin = plugin.default;\n }\n if (typeof plugin !== 'function') {\n const learnMoreLink = `Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin`;\n // If the plugin reference is a node module, and that node module does not export a function then it probably doesn't have a config plugin.\n if (!isPluginFile && !moduleNameIsDirectFileReference(pluginReference)) {\n throw new PluginError(\n `Package \"${pluginReference}\" does not contain a valid config plugin. Module must export a function from file: ${pluginFile}\\n${learnMoreLink}`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n throw new PluginError(\n `Plugin \"${pluginReference}\" must export a function from file: ${pluginFile}. ${learnMoreLink}`,\n 'INVALID_PLUGIN_TYPE'\n );\n }\n\n return plugin;\n}\n\nfunction requirePluginFile(filePath: string): any {\n try {\n return require(filePath);\n } catch (error) {\n // TODO: Improve error messages\n throw error;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAI,uBAAA,CAAAF,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,aAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,YAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,QAA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EACA,IAAI,OAAO4C,MAAM,KAAK,UAAU,EAAE;IAChC,MAAMa,aAAa,GAAG,4EAA4E;IAClG;IACA,IAAI,CAAClC,YAAY,IAAI,CAACJ,+BAA+B,CAACD,eAAe,CAAC,EAAE;MACtE,MAAM,KAAIiB,qBAAW,EACnB,YAAYjB,eAAe,sFAAsFkC,UAAU,KAAKK,aAAa,EAAE,EAC/I,qBACF,CAAC;IACH;IACA,MAAM,KAAItB,qBAAW,EACnB,WAAWjB,eAAe,uCAAuCkC,UAAU,KAAKK,aAAa,EAAE,EAC/F,qBACF,CAAC;EACH;EAEA,OAAOb,MAAM;AACf;AAEA,SAASU,iBAAiBA,CAAC5B,QAAgB,EAAO;EAChD,IAAI;IACF,OAAOtC,OAAO,CAACsC,QAAQ,CAAC;EAC1B,CAAC,CAAC,OAAO6B,KAAK,EAAE;IACd;IACA,MAAMA,KAAK;EACb;AACF","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/config-plugins",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.3",
|
|
4
4
|
"description": "A library for Expo config plugins",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "fc8a1408cab82e003dd2424db2994d7dea958067"
|
|
61
61
|
}
|