@vira-ui/cli 0.4.1-alpha → 1.0.0

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/go/readme.js CHANGED
@@ -11,4 +11,21 @@ exports.readme = `# Vira Engine Monorepo (scaffold)
11
11
  - plugins/ — интеграции
12
12
  - migrations/ — SQL/Go миграции
13
13
  - deploy/ — docker-compose/devops артефакты
14
- `;
14
+
15
+ Next steps:
16
+ cd my-vira-app/frontend
17
+ npm install
18
+ npm run dev
19
+
20
+ UI package:
21
+ cd ../ui
22
+ npm install
23
+ npm run dev
24
+
25
+ Backend stub:
26
+ cd ../backend
27
+ go mod tidy
28
+ go run ./cmd/api
29
+
30
+ Dev stack (DB/Redis/Kafka):
31
+ cd ../deploy && docker compose -f docker-compose.dev.yml up`;
@@ -3,11 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.registryGo = void 0;
4
4
  exports.registryGo = `package events
5
5
 
6
- import (
7
- "context"
8
- "github.com/gorilla/websocket"
9
- )
10
-
11
6
  // Registry holds all registered event handlers.
12
7
  var Registry = make(map[string]EventHandler)
13
8
 
package/dist/index.js CHANGED
@@ -65,8 +65,6 @@ const dbGo_1 = require("./go/dbGo");
65
65
  const configGo_1 = require("./go/configGo");
66
66
  const mainGo_1 = require("./go/mainGo");
67
67
  const goMod_1 = require("./go/goMod");
68
- const useViraState_1 = require("./go/useViraState");
69
- const useViraStream_1 = require("./go/useViraStream");
70
68
  const channelHelpers_1 = require("./go/channelHelpers");
71
69
  const eventsAPI_1 = require("./go/eventsAPI");
72
70
  const eventHandlerTemplate_1 = require("./go/eventHandlerTemplate");
@@ -301,13 +299,11 @@ async function createFullstackProject(projectPath) {
301
299
  const frontendPath = path.join(projectPath, "frontend");
302
300
  const backendPath = path.join(projectPath, "backend");
303
301
  const uiPath = path.join(projectPath, "ui");
304
- const cliPath = path.join(projectPath, "cli");
305
302
  const pluginsPath = path.join(projectPath, "plugins");
306
303
  const migrationsPath = path.join(projectPath, "migrations");
307
304
  const deployPath = path.join(projectPath, "deploy");
308
305
  await fs.ensureDir(projectPath);
309
306
  await fs.ensureDir(uiPath);
310
- await fs.ensureDir(cliPath);
311
307
  await fs.ensureDir(pluginsPath);
312
308
  await fs.ensureDir(migrationsPath);
313
309
  await fs.ensureDir(deployPath);
@@ -363,12 +359,12 @@ async function createFrontendProject(projectPath) {
363
359
  preview: "vite preview",
364
360
  },
365
361
  dependencies: {
366
- "@vira-ui/core": "^0.3.0-alpha",
367
- "@vira-ui/ui": "^0.3.0-alpha",
362
+ "@vira-ui/core": "^1.0.0",
363
+ "@vira-ui/ui": "^1.0.0",
368
364
  "lucide-react": "^0.400.0",
369
365
  },
370
366
  devDependencies: {
371
- "@vira-ui/babel-plugin": "^0.3.0-alpha",
367
+ "@vira-ui/babel-plugin": "^1.0.0",
372
368
  "@vitejs/plugin-react": "^4.2.0",
373
369
  "@types/node": "^20.10.0",
374
370
  "@types/react": "^18.2.0",
@@ -388,8 +384,8 @@ async function createFrontendProject(projectPath) {
388
384
  await fs.writeFile(path.join(projectPath, "src", "index.css"), indexCss_1.indexCss);
389
385
  await fs.writeFile(path.join(projectPath, "src", "main.tsx"), mainTsx_1.mainTsx);
390
386
  await fs.writeFile(path.join(projectPath, "src", "App.tsx"), appTsx_1.appTsx);
391
- await fs.writeFile(path.join(projectPath, "src", "hooks", "useViraStream.ts"), useViraStream_1.useViraStream);
392
- await fs.writeFile(path.join(projectPath, "src", "hooks", "useViraState.ts"), useViraState_1.useViraState);
387
+ // VRP hooks are now provided by @vira-ui/core
388
+ // No need to generate useViraState/useViraStream files
393
389
  }
394
390
  /**
395
391
  * Бекенд-заготовка (Go) для последующего расширения (Kafka/Redis/PG)
@@ -4,7 +4,7 @@ exports.appTsx = void 0;
4
4
  // src/App.tsx
5
5
  exports.appTsx = `import { useState } from 'react';
6
6
  import { Container, Heading, Text, Button, Stack, Code } from '@vira-ui/ui';
7
- import { useViraState } from './hooks/useViraState';
7
+ import { useViraState } from '@vira-ui/core';
8
8
  import './index.css';
9
9
 
10
10
  export function App() {
@@ -5,27 +5,7 @@ exports.kanbanService = void 0;
5
5
  exports.kanbanService = `// Kanban service using Vira Core DI container + VRP
6
6
  // This demonstrates the Vira standard: services for business logic, hooks for React state
7
7
 
8
- import { createService } from '@vira-ui/core';
9
- import { useViraState } from '../hooks/useViraState';
10
- import type { KanbanBoard, KanbanCard, KanbanChannel } from '../models/kanban';
11
-
12
- // Create kanban service (singleton via DI container)
13
- // Service holds business logic, not React state
14
- createService('kanban', () => ({
15
- // Helper: get cards for a column (pure function)
16
- getColumnCards(board: KanbanBoard | null, columnId: string): KanbanCard[] {
17
- if (!board) return [];
18
- const column = board.columns.find(col => col.id === columnId);
19
- if (!column) return [];
20
- return column.cardIds
21
- .map(id => board.cards[id])
22
- .filter((card): card is KanbanCard => card !== undefined)
23
- .sort((a, b) => a.order - b.order);
24
- },
25
- }));
26
-
27
- import { createService, useService } from '@vira-ui/core';
28
- import { useViraState } from '../hooks/useViraState';
8
+ import { createService, useService, useViraState } from '@vira-ui/core';
29
9
  import type { KanbanBoard, KanbanCard, KanbanChannel } from '../models/kanban';
30
10
 
31
11
  // Create kanban service (singleton via DI container)
@@ -16,10 +16,6 @@ exports.tsconfig = {
16
16
  esModuleInterop: true,
17
17
  skipLibCheck: true,
18
18
  forceConsistentCasingInFileNames: true,
19
- paths: {
20
- "@vira-ui/ui": ["./node_modules/@vira-ui/ui/src"],
21
- "@vira-ui/core": ["./node_modules/@vira-ui/core/src"],
22
- },
23
19
  },
24
20
  include: ["src"],
25
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vira-ui/cli",
3
- "version": "0.4.1-alpha",
3
+ "version": "1.0.0",
4
4
  "description": "CLI tool for ViraJS project generation",
5
5
  "author": "Vira Team",
6
6
  "license": "MIT",