@rootnative/cli 0.0.0-alpha.3 → 0.0.0-alpha.4
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.mjs +5 -0
- package/llms.txt +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -266,6 +266,7 @@ function getComponentNames(result) {
|
|
|
266
266
|
// src/lib/transform.ts
|
|
267
267
|
var SINGLE_LINE_IMPORT_REGEX = /((?:import|export)\s+(?:type\s+)?(?:\{[^}]*\}|\*\s+as\s+\w+|[\w,\s]+)\s+from\s+)(['"])([^'"]+)\2/g;
|
|
268
268
|
var MULTI_LINE_IMPORT_REGEX = /((?:import|export)\s+(?:type\s+)?\{[\s\S]*?\}\s+from\s+)(['"])([^'"]+)\2/g;
|
|
269
|
+
var SHARED_ROOT_MODULES = /* @__PURE__ */ new Set(["safe-area"]);
|
|
269
270
|
function transformImports(source, options) {
|
|
270
271
|
const { config, installedComponents } = options;
|
|
271
272
|
const componentsAlias = config.aliases.components;
|
|
@@ -281,6 +282,10 @@ function transformImports(source, options) {
|
|
|
281
282
|
const restOfPath = importPath.replace(/^\.\.\/internal\//, "");
|
|
282
283
|
return `${prefix}${quote}./${restOfPath}${quote}`;
|
|
283
284
|
}
|
|
285
|
+
if (SHARED_ROOT_MODULES.has(importPath.replace(/^\.\.\//, ""))) {
|
|
286
|
+
const restOfPath = importPath.replace(/^\.\.\//, "");
|
|
287
|
+
return `${prefix}${quote}./${restOfPath}${quote}`;
|
|
288
|
+
}
|
|
284
289
|
if (importPath.startsWith("../")) {
|
|
285
290
|
const targetComponent = extractComponentName(importPath);
|
|
286
291
|
if (targetComponent && installedComponents.includes(targetComponent)) {
|
package/llms.txt
CHANGED