@fragments-sdk/cli 0.3.0 → 0.3.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/dist/bin.js +1 -1
- package/dist/{viewer-7ICROM7Q.js → viewer-UYSS7DVA.js} +4 -15
- package/dist/viewer-UYSS7DVA.js.map +1 -0
- package/package.json +1 -1
- package/src/viewer/__tests__/viewer-integration.test.ts +166 -0
- package/src/viewer/server.ts +2 -2
- package/src/viewer/tailwind.config.js +1 -1
- package/dist/viewer-7ICROM7Q.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -1768,7 +1768,7 @@ ${BRAND.name} Dev Server
|
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
|
-
const { createDevServer } = await import("./viewer-
|
|
1771
|
+
const { createDevServer } = await import("./viewer-UYSS7DVA.js");
|
|
1772
1772
|
console.log(pc7.dim("\nStarting dev server..."));
|
|
1773
1773
|
const parsedPort = typeof port === "string" ? parseInt(port, 10) : port;
|
|
1774
1774
|
try {
|
|
@@ -1747,14 +1747,14 @@ async function createDevServer(options = {}) {
|
|
|
1747
1747
|
alias: {
|
|
1748
1748
|
// Allow importing from viewer package
|
|
1749
1749
|
"@fragments/viewer": viewerRoot,
|
|
1750
|
+
// Resolve @fragments/core to the consolidated core source
|
|
1751
|
+
"@fragments/core": resolve2(cliPackageRoot, "src/core/index.ts"),
|
|
1750
1752
|
// Ensure ALL react imports resolve to project's node_modules
|
|
1751
1753
|
// This is critical for viewer files loaded from outside project root
|
|
1752
1754
|
"react": safeRealpath(join(nodeModulesPath, "react")),
|
|
1753
1755
|
"react-dom": safeRealpath(join(nodeModulesPath, "react-dom")),
|
|
1754
1756
|
"react/jsx-runtime": safeRealpath(join(nodeModulesPath, "react/jsx-runtime")),
|
|
1755
|
-
"react/jsx-dev-runtime": safeRealpath(join(nodeModulesPath, "react/jsx-dev-runtime"))
|
|
1756
|
-
// Resolve @fragments packages - try project's node_modules first, fall back to monorepo
|
|
1757
|
-
"@fragments/core": resolveFragmentsPackage("core", nodeModulesPath)
|
|
1757
|
+
"react/jsx-dev-runtime": safeRealpath(join(nodeModulesPath, "react/jsx-dev-runtime"))
|
|
1758
1758
|
}
|
|
1759
1759
|
}
|
|
1760
1760
|
};
|
|
@@ -1773,17 +1773,6 @@ function safeRealpath(p) {
|
|
|
1773
1773
|
return p;
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
|
-
function resolveFragmentsPackage(packageName, nodeModulesPath) {
|
|
1777
|
-
const projectPath = join(nodeModulesPath, `@fragments/${packageName}/dist/index.js`);
|
|
1778
|
-
if (existsSync(projectPath)) {
|
|
1779
|
-
return safeRealpath(projectPath);
|
|
1780
|
-
}
|
|
1781
|
-
const monorepoPath = resolve2(packagesRoot, packageName, "dist/index.js");
|
|
1782
|
-
if (existsSync(monorepoPath)) {
|
|
1783
|
-
return safeRealpath(monorepoPath);
|
|
1784
|
-
}
|
|
1785
|
-
return projectPath;
|
|
1786
|
-
}
|
|
1787
1776
|
function findNodeModules(startDir) {
|
|
1788
1777
|
let current = startDir;
|
|
1789
1778
|
while (current !== dirname2(current)) {
|
|
@@ -11100,4 +11089,4 @@ export {
|
|
|
11100
11089
|
segmentsPlugin,
|
|
11101
11090
|
useTheme
|
|
11102
11091
|
};
|
|
11103
|
-
//# sourceMappingURL=viewer-
|
|
11092
|
+
//# sourceMappingURL=viewer-UYSS7DVA.js.map
|