@metacells/mcellui-cli 0.1.0 → 0.1.2
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.js +5 -9
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -350,13 +350,14 @@ var initCommand = new Command().name("init").description("Initialize nativeui in
|
|
|
350
350
|
}
|
|
351
351
|
spinner.start("Creating configuration...");
|
|
352
352
|
const configContent = `/**
|
|
353
|
-
*
|
|
353
|
+
* mcellui Configuration
|
|
354
354
|
*
|
|
355
355
|
* This file defines your app's design system.
|
|
356
356
|
* All components will automatically use these values.
|
|
357
357
|
*/
|
|
358
358
|
|
|
359
|
-
|
|
359
|
+
// Helper function for type-safe config
|
|
360
|
+
const defineConfig = <T>(config: T): T => config;
|
|
360
361
|
|
|
361
362
|
export default defineConfig({
|
|
362
363
|
// ============================================
|
|
@@ -483,7 +484,8 @@ import path3 from "path";
|
|
|
483
484
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
484
485
|
var __filename3 = fileURLToPath2(import.meta.url);
|
|
485
486
|
var __dirname2 = path3.dirname(__filename3);
|
|
486
|
-
var
|
|
487
|
+
var DEFAULT_REGISTRY_URL = "https://raw.githubusercontent.com/metacells/mcellui/main/packages/registry";
|
|
488
|
+
var REGISTRY_URL = process.env.MCELLUI_REGISTRY_URL || process.env.NATIVEUI_REGISTRY_URL || DEFAULT_REGISTRY_URL;
|
|
487
489
|
function getLocalRegistryPath() {
|
|
488
490
|
return path3.resolve(__dirname2, "..", "..", "registry");
|
|
489
491
|
}
|
|
@@ -509,9 +511,6 @@ async function getLocalRegistry() {
|
|
|
509
511
|
}
|
|
510
512
|
}
|
|
511
513
|
async function getRemoteRegistry() {
|
|
512
|
-
if (!REGISTRY_URL) {
|
|
513
|
-
throw new Error("NATIVEUI_REGISTRY_URL not configured");
|
|
514
|
-
}
|
|
515
514
|
try {
|
|
516
515
|
const response = await fetch(`${REGISTRY_URL}/registry.json`);
|
|
517
516
|
const registry = await response.json();
|
|
@@ -551,9 +550,6 @@ async function fetchLocalComponent(item) {
|
|
|
551
550
|
};
|
|
552
551
|
}
|
|
553
552
|
async function fetchRemoteComponent(item) {
|
|
554
|
-
if (!REGISTRY_URL) {
|
|
555
|
-
throw new Error("NATIVEUI_REGISTRY_URL not configured");
|
|
556
|
-
}
|
|
557
553
|
const files = await Promise.all(
|
|
558
554
|
item.files.map(async (filePath) => {
|
|
559
555
|
const response = await fetch(`${REGISTRY_URL}/${filePath}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metacells/mcellui-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CLI for mcellui - add beautiful, accessible UI components to your Expo/React Native project",
|
|
5
5
|
"author": "metacells",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"lint": "eslint src/"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@mcellui/core": "*",
|
|
45
44
|
"commander": "^12.0.0",
|
|
46
45
|
"chalk": "^5.3.0",
|
|
47
46
|
"ora": "^8.0.0",
|