sitevision-cli 0.0.0 → 0.1.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.
Files changed (3) hide show
  1. package/dist/cli.js +5 -0
  2. package/package.json +4 -2
  3. package/readme.md +13 -70
package/dist/cli.js CHANGED
@@ -3,9 +3,14 @@ import React from 'react';
3
3
  import { render } from 'ink';
4
4
  import { Text, Box } from 'ink';
5
5
  import meow from 'meow';
6
+ import { readFileSync } from 'node:fs';
7
+ import updateNotifier from 'update-notifier';
6
8
  import App from './app.js';
7
9
  import { getCommand } from './commands/index.js';
8
10
  import { requireProject } from './utils/project-detection.js';
11
+ // Check for updates
12
+ const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
13
+ updateNotifier({ pkg }).notify();
9
14
  const cli = meow(`
10
15
  Usage
11
16
  $ svc Start interactive menu
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sitevision-cli",
3
- "version": "0.0.0",
3
+ "version": "0.1.1",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "svc": "dist/cli.js"
@@ -21,12 +21,14 @@
21
21
  "ink": "^6.6.0",
22
22
  "ink-spinner": "^5.0.0",
23
23
  "meow": "^11.0.0",
24
- "react": "^19.2.3"
24
+ "react": "^19.2.3",
25
+ "update-notifier": "^7.0.0"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@sindresorhus/tsconfig": "^3.0.1",
28
29
  "@types/node": "^25.0.3",
29
30
  "@types/react": "^19.2.7",
31
+ "@types/update-notifier": "^6.0.8",
30
32
  "@vdemedes/prettier-config": "^2.0.1",
31
33
  "ava": "^5.2.0",
32
34
  "chalk": "^5.2.0",
package/readme.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # Sitevision CLI
2
2
 
3
- A modern TUI (Terminal User Interface) for Sitevision app development. Built with [Ink](https://github.com/vadimdemedes/ink) for a beautiful command-line experience.
3
+ This CLI was largely built on the back of the [sitevision-scripts](https://github.com/sitevision/sitevision-scripts) project.
4
+ However, these scripts have some limitations:
5
+ - Clunky for use with environments requiring signed packages
6
+ - Clunkly management of credentials and unsecure handling of credentials
7
+ - No type safety
4
8
 
5
9
  ## Features
6
10
 
7
11
  - **Interactive Menu** - Full-screen TUI with arrow key navigation
8
- - **Standalone CLI** - No dependency on sitevision-scripts, handles everything natively
9
12
  - **Project Detection** - Automatically detects Sitevision projects
10
- - **Webpack Integration** - Built-in webpack bundling for development and production
11
- - **App Signing** - Sign apps via developer.sitevision.se for production deployment
12
- - **Live Feedback** - Real-time status updates and progress indicators
13
13
  - **Two Modes** - Interactive menu OR direct command execution
14
14
  - **Automatic Setup** - Guided setup for dev properties and signing credentials
15
15
  - **Secure Credentials** - Passwords can be entered per-session (not stored on disk)
@@ -17,7 +17,7 @@ A modern TUI (Terminal User Interface) for Sitevision app development. Built wit
17
17
  ## Install
18
18
 
19
19
  ```bash
20
- npm install --global @sitevision/cli
20
+ npm install --global sitevision-cli
21
21
  ```
22
22
 
23
23
  ## Usage
@@ -35,17 +35,18 @@ svc
35
35
  On first run (or if setup is incomplete), the CLI will:
36
36
  1. Check if `node_modules` exists and offer to run `npm install` if missing
37
37
  2. Check if dev properties are configured and offer to set them up if missing
38
- 3. Display project information
39
- 4. Show the main menu
38
+ 3. Check if you have setup signing credentials and offer to do so if missing
39
+ 4. Display project information
40
+ 5. Show the main menu
40
41
 
41
42
  Use arrow keys to navigate and Enter to select:
42
43
  - **Dev** - Start development server with watch mode
43
44
  - **Dev (Signed)** - Development with automatic signing before each deploy
44
- - **Build** - Build for production
45
- - **Sign** - Sign the app for production deployment
46
- - **Deploy** - Deploy to dev server
45
+ - **Build** - Build a dist bundle
46
+ - **Sign** - Sign built dist bundle
47
+ - **Deploy** - Deploy to configured development environment
47
48
  - **Deploy (Force)** - Force deploy (overwrite existing)
48
- - **Deploy Production** - Deploy signed app to production
49
+ - **Deploy Production** - Deploy signed app to configured production environment
49
50
  - **Info** - Show project info
50
51
  - **Exit**
51
52
 
@@ -133,64 +134,6 @@ Signing credentials are used to sign apps via developer.sitevision.se:
133
134
 
134
135
  The signing password is never stored on disk - it's prompted for each session.
135
136
 
136
- ## Architecture
137
-
138
- This CLI is a standalone tool that handles all Sitevision development tasks natively:
139
-
140
- - **Webpack Bundling** - Uses webpack directly for building bundled apps
141
- - **REST API Integration** - Communicates directly with Sitevision REST APIs
142
- - **App Signing** - Signs apps via developer.sitevision.se API
143
- - **TUI Components** - Rich terminal UI built with Ink
144
-
145
- ### Directory Structure
146
-
147
- ```
148
- source/
149
- ├── cli.tsx # CLI entry point and argument parsing
150
- ├── app.tsx # Main app component and state management
151
- ├── commands/ # Command implementations
152
- │ ├── types.ts # Command type definitions
153
- │ ├── index.ts # Command exports
154
- │ ├── dev.tsx # Development server with watch mode
155
- │ ├── build.tsx # Production build
156
- │ ├── deploy.tsx # Deployment to dev/production
157
- │ ├── sign.tsx # App signing
158
- │ ├── setup-signing.tsx # Signing credentials setup
159
- │ └── info.tsx # Project info display
160
- ├── components/ # Reusable UI components
161
- │ ├── MainMenu.tsx # Interactive main menu
162
- │ ├── SetupFlow.tsx # Initial setup wizard
163
- │ ├── DevPropertiesForm.tsx # Dev properties configuration
164
- │ ├── SigningPropertiesForm.tsx # Signing setup form
165
- │ ├── PasswordInput.tsx # Secure password input
166
- │ ├── TextInput.tsx # Text input component
167
- │ ├── InfoScreen.tsx # Project info display
168
- │ ├── StatusIndicator.tsx # Status/progress indicator
169
- │ └── ProcessOutput.tsx # Process output display
170
- ├── types/ # TypeScript type definitions
171
- │ └── index.ts # Shared types
172
- └── utils/ # Utility modules
173
- ├── project-detection.ts # Project validation and paths
174
- ├── sitevision-api.ts # Sitevision REST API client
175
- ├── webpack-runner.ts # Webpack integration
176
- ├── zip.ts # Zip file utilities
177
- ├── process-runner.ts # Process spawning
178
- └── password-prompt.ts # Password prompting
179
- ```
180
-
181
- ## Development
182
-
183
- ```bash
184
- # Install dependencies
185
- npm install
186
-
187
- # Build
188
- npm run build
189
-
190
- # Watch mode
191
- npm run dev
192
- ```
193
-
194
137
  ## License
195
138
 
196
139
  MIT