create-pwa-sv 1.1.0 → 1.4.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/README.md +220 -174
- package/dist/cli.js +12 -7
- package/dist/cli.js.map +1 -1
- package/dist/deps-manager.d.ts.map +1 -1
- package/dist/deps-manager.js +10 -9
- package/dist/deps-manager.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +30 -13
- package/dist/engine.js.map +1 -1
- package/dist/process-fs-handler.d.ts.map +1 -1
- package/dist/process-fs-handler.js +812 -784
- package/dist/process-fs-handler.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +18 -11
- package/AGENTS-for-pwa.md +0 -211
- package/AGENTS.md +0 -141
- package/bun.lock +0 -325
package/README.md
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
# pwa-sv - Svelte PWA Project Automation Tool
|
|
2
|
-
|
|
3
|
-
A CLI tool that streamlines the creation of typesafe Progressive Web App (PWA) projects using SvelteKit with a simple `bun create pwa-sv` command.
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
## Features
|
|
10
|
-
|
|
11
|
-
- **Quick Setup**: Create a SvelteKit PWA project with a single command
|
|
12
|
-
- **PWA Ready**: Pre-configured with service worker, manifest, and caching strategies
|
|
13
|
-
- **Vite Integration**: Properly configured PWA plugin for Vite
|
|
14
|
-
- **Package Scripts**: Pre-configured development, build, and preview scripts
|
|
15
|
-
- **Functional Programming Ready**: Includes [Effect](https://effect.website/) library and functional programming patterns
|
|
16
|
-
- **Type-Safe Error Handling**: Uses Effect's powerful error handling capabilities for type-safe operations
|
|
17
|
-
- **Optional Features**:
|
|
18
|
-
- Skeleton UI Framework (with `--skeleton` or `-s` flag)
|
|
19
|
-
- Internationalization Support (with `--i18n` or `-i` flag)
|
|
20
|
-
- Dexie IndexedDB Wrapper (with `--dexie` or `-d` flag)
|
|
21
|
-
- Playwright Browser Testing (with `--playwright` or `-p` flag)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
# pwa-sv - Svelte PWA Project Automation Tool
|
|
2
|
+
|
|
3
|
+
A CLI tool that streamlines the creation of typesafe Progressive Web App (PWA) projects using SvelteKit with a simple `bun create pwa-sv` command.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Quick Setup**: Create a SvelteKit PWA project with a single command
|
|
12
|
+
- **PWA Ready**: Pre-configured with service worker, manifest, and caching strategies
|
|
13
|
+
- **Vite Integration**: Properly configured PWA plugin for Vite
|
|
14
|
+
- **Package Scripts**: Pre-configured development, build, and preview scripts
|
|
15
|
+
- **Functional Programming Ready**: Includes [Effect](https://effect.website/) library and functional programming patterns
|
|
16
|
+
- **Type-Safe Error Handling**: Uses Effect's powerful error handling capabilities for type-safe operations
|
|
17
|
+
- **Optional Features**:
|
|
18
|
+
- Skeleton UI Framework (with `--skeleton` or `-s` flag)
|
|
19
|
+
- Internationalization Support (with `--i18n` or `-i` flag)
|
|
20
|
+
- Dexie IndexedDB Wrapper (with `--dexie` or `-d` flag)
|
|
21
|
+
- Playwright Browser Testing (with `--playwright` or `-p` flag)
|
|
22
|
+
- Git Repository Initialization (with `--git` or `-g` flag, enabled by default)
|
|
23
|
+
|
|
24
|
+
> **Note**: `pwa-asset-generator` is automatically included in all projects created by pwa-sv as a devDependency for generating PWA icons and assets.
|
|
25
|
+
|
|
26
|
+
## Installation & Usage
|
|
27
|
+
|
|
27
28
|
### Creating a New Project
|
|
28
29
|
|
|
29
30
|
```bash
|
|
@@ -33,7 +34,7 @@ npm create pwa-sv my-pwa-project
|
|
|
33
34
|
# or
|
|
34
35
|
pnpm create pwa-sv my-pwa-project
|
|
35
36
|
```
|
|
36
|
-
|
|
37
|
+
|
|
37
38
|
### Using Command-Line Flags
|
|
38
39
|
|
|
39
40
|
```bash
|
|
@@ -62,143 +63,188 @@ bun create pwa-sv my-pwa-project --skeleton --i18n --dexie --playwright
|
|
|
62
63
|
|
|
63
64
|
# Use non-interactive mode (accept all defaults)
|
|
64
65
|
bun create pwa-sv my-pwa-project --yes
|
|
66
|
+
|
|
67
|
+
# Skip Git initialization (default: true)
|
|
68
|
+
bun create pwa-sv my-pwa-project --no-git
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Additional Options
|
|
72
|
+
|
|
73
|
+
- **Git Initialization**: By default, Git is initialized with an initial commit. Use the `--no-git` flag to skip Git repository initialization.
|
|
74
|
+
- **Playwright Testing**: By default, Playwright is not installed. Use the `--playwright` (or `-p`) flag to include Playwright browser testing in your project.
|
|
75
|
+
- **Vitest Defaults**: When unit or component testing is selected, the `--defaults` flag is automatically used to bypass interactive prompts and automatically select both unit and component testing.
|
|
76
|
+
|
|
77
|
+
## Available Scripts
|
|
78
|
+
|
|
79
|
+
After project creation, these scripts are available in your `package.json`:
|
|
80
|
+
|
|
81
|
+
- `bun build-pwa-assets`: Generate PWA icons and assets
|
|
82
|
+
- `bun paraglide:compile`: Compile Paraglide translations (if i18n enabled)
|
|
83
|
+
|
|
84
|
+
## How to Use pwa-asset-generator
|
|
85
|
+
|
|
86
|
+
The pwa-asset-generator tool is included in your project to automatically generate PWA icons and assets from a single source image.
|
|
87
|
+
|
|
88
|
+
### Setup
|
|
89
|
+
|
|
90
|
+
1. **Prepare your source icon**: Place a high-quality PNG image at `src/lib/assets/pwa-icon.png` (recommended size: 1024x1024px with transparency support)
|
|
91
|
+
|
|
92
|
+
2. **Generate assets**: Run the following command:
|
|
93
|
+
```bash
|
|
94
|
+
bun build-pwa-assets
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
3. **Generated assets**: The tool will create various icon sizes and formats automatically:
|
|
98
|
+
- Transparent icons (64px, 192px, 512px)
|
|
99
|
+
- Favicons (48px, .ico format)
|
|
100
|
+
- Maskable icons (512px)
|
|
101
|
+
- Web manifest icons and link tags
|
|
102
|
+
|
|
103
|
+
### Configuration
|
|
104
|
+
|
|
105
|
+
The generator is configured via `pwa-assets.config.ts` in your project root. The default configuration:
|
|
106
|
+
|
|
107
|
+
- Generates Android and web assets only (iOS assets are excluded)
|
|
108
|
+
- Uses the 2023 preset for modern PWA standards
|
|
109
|
+
- Automatically updates your manifest and HTML head links
|
|
110
|
+
|
|
111
|
+
### Notes
|
|
112
|
+
|
|
113
|
+
- Run `bun build-pwa-assets` again after updating `src/lib/assets/pwa-icon.png` to regenerate all assets
|
|
114
|
+
- The configuration is pre-configured and typically doesn't require modification
|
|
115
|
+
|
|
116
|
+
## Project Structure
|
|
117
|
+
|
|
118
|
+
The generated project follows SvelteKit conventions with additional PWA-specific configurations:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
my-pwa-project/
|
|
122
|
+
├── package.json # Scripts and dependencies configured
|
|
123
|
+
|
|
124
|
+
├── vite.config.ts # Vite config with PWA plugin
|
|
125
|
+
├── svelte.config.js # SvelteKit configuration
|
|
126
|
+
├── tailwind.config.cjs # Tailwind CSS with Skeleton UI (if enabled)
|
|
127
|
+
├── src/ # SvelteKit application code
|
|
128
|
+
│ ├── lib/ # Reusable components, modules, etc.
|
|
129
|
+
│ ├── routes/ # Page routes
|
|
130
|
+
│ └── app.html # Application shell
|
|
131
|
+
├── static/ # Static assets directory
|
|
132
|
+
└── Configuration files (tsconfig.json, etc.)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Configuration
|
|
136
|
+
|
|
137
|
+
#### PWA Configuration
|
|
138
|
+
|
|
139
|
+
The `vite.config.ts` file includes the PWA plugin with service worker and manifest configuration. The manifest is automatically configured with default values.
|
|
140
|
+
|
|
141
|
+
## Internationalization (i18n)
|
|
142
|
+
|
|
143
|
+
When the `--i18n` flag is used, the project includes:
|
|
144
|
+
|
|
145
|
+
- `@inlang/paraglide-js` for internationalization (compiler-based, tree-shaking friendly)
|
|
146
|
+
- Pre-configured English and Spanish translation files in `messages/`
|
|
147
|
+
- Paraglide hooks and middleware for SvelteKit routing
|
|
148
|
+
- A sample component showing how to use translations
|
|
149
|
+
|
|
150
|
+
## Skeleton UI
|
|
151
|
+
|
|
152
|
+
When the `--skeleton` flag is used, the project includes:
|
|
153
|
+
|
|
154
|
+
- Tailwind CSS configured with Skeleton UI
|
|
155
|
+
- Proper component aliases
|
|
156
|
+
- A sample component showing how to use Skeleton UI components
|
|
157
|
+
|
|
158
|
+
## Functional Programming Features
|
|
159
|
+
|
|
160
|
+
The generated SvelteKit PWA projects now include support for functional programming patterns using the [Effect](https://effect.website/) library. This provides:
|
|
161
|
+
|
|
162
|
+
- **Type-safe error handling** with Effect's powerful error management
|
|
163
|
+
- **Resource management** with automatic cleanup capabilities
|
|
164
|
+
- **Concurrent operations** with Effect's concurrency model
|
|
165
|
+
- **Effectful computations** with proper handling of side effects
|
|
166
|
+
- **Development tools** with integrated Effect Platform for comprehensive utilities
|
|
167
|
+
|
|
168
|
+
For more details on using functional programming in your generated applications, see the [functional programming documentation](./docs/functional-programming.md).
|
|
169
|
+
|
|
170
|
+
## Development
|
|
171
|
+
|
|
172
|
+
This project uses modern development tooling for efficient, high-quality code:
|
|
173
|
+
|
|
174
|
+
### Tooling Stack
|
|
175
|
+
- **Editor**: Zed IDE (high-performance, native editor)
|
|
176
|
+
- **Linting**: Biome (fast linter and formatter)
|
|
177
|
+
- **Code Quality**: www.ultracite.ai (AI-powered linting rules)
|
|
178
|
+
- **AI Assistant**: OpenCode (intelligent development agent)
|
|
179
|
+
- **Package Manager**: bun (fast package manager)
|
|
180
|
+
- **Testing**: Vitest (unit and integration testing)
|
|
181
|
+
|
|
182
|
+
### Available Scripts
|
|
183
|
+
```bash
|
|
184
|
+
bun run build # Build project with TypeScript
|
|
185
|
+
bun run dev # Watch mode for development
|
|
186
|
+
bun run test # Run tests with Vitest
|
|
187
|
+
bun run test:watch # Run tests in watch mode
|
|
65
188
|
```
|
|
66
|
-
|
|
67
|
-
###
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
###
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
│ ├── lib/ # Reusable components, modules, etc.
|
|
126
|
-
│ │ ├── i18n/ # Internationalization config (if enabled)
|
|
127
|
-
│ │ └── locales/ # Translation files (if enabled)
|
|
128
|
-
│ ├── routes/ # Page routes
|
|
129
|
-
│ └── app.html # Application shell
|
|
130
|
-
├── static/ # Static assets directory
|
|
131
|
-
└── Configuration files (tsconfig.json, etc.)
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Configuration
|
|
135
|
-
|
|
136
|
-
#### PWA Configuration
|
|
137
|
-
|
|
138
|
-
The `vite.config.ts` file includes the PWA plugin with service worker and manifest configuration. The manifest is automatically configured with default values.
|
|
139
|
-
|
|
140
|
-
## Internationalization (i18n)
|
|
141
|
-
|
|
142
|
-
When the `--i18n` flag is used, the project includes:
|
|
143
|
-
|
|
144
|
-
- `svelte-i18n` for internationalization
|
|
145
|
-
- Pre-configured English and Spanish locale files
|
|
146
|
-
- A sample component showing how to use translations
|
|
147
|
-
- Scripts for extracting and checking translations
|
|
148
|
-
|
|
149
|
-
## Skeleton UI
|
|
150
|
-
|
|
151
|
-
When the `--skeleton` flag is used, the project includes:
|
|
152
|
-
|
|
153
|
-
- Tailwind CSS configured with Skeleton UI
|
|
154
|
-
- Proper component aliases
|
|
155
|
-
- A sample component showing how to use Skeleton UI components
|
|
156
|
-
|
|
157
|
-
## Functional Programming Features
|
|
158
|
-
|
|
159
|
-
The generated SvelteKit PWA projects now include support for functional programming patterns using the [Effect](https://effect.website/) library. This provides:
|
|
160
|
-
|
|
161
|
-
- **Type-safe error handling** with Effect's powerful error management
|
|
162
|
-
- **Resource management** with automatic cleanup capabilities
|
|
163
|
-
- **Concurrent operations** with Effect's concurrency model
|
|
164
|
-
- **Effectful computations** with proper handling of side effects
|
|
165
|
-
- **Development tools** with integrated Effect Platform for comprehensive utilities
|
|
166
|
-
|
|
167
|
-
For more details on using functional programming in your generated applications, see the [functional programming documentation](./docs/functional-programming.md).
|
|
168
|
-
|
|
169
|
-
## Contributing
|
|
170
|
-
|
|
171
|
-
Contributions are welcome! This project was created using a comprehensive development workflow based on user stories and epics to ensure a well-architected, maintainable codebase.
|
|
172
|
-
|
|
173
|
-
## Publishing
|
|
174
|
-
|
|
175
|
-
To publish this CLI tool to npm as `pwa-sv`, please follow the steps in the [publishing guide](./docs/publishing-guide.md).
|
|
176
|
-
|
|
177
|
-
## Recent Changes
|
|
178
|
-
|
|
179
|
-
### v1.0.5 (2026-01-12)
|
|
180
|
-
|
|
181
|
-
#### Bug Fixes
|
|
182
|
-
- Fixed rollback logging in `engine.ts` - added proper rollback messages for project creation and dependency installation steps
|
|
183
|
-
- Added German (de.json) and French (fr.json) locale files to i18n configuration
|
|
184
|
-
- Fixed test expectations to match actual error message patterns
|
|
185
|
-
- Updated structure validation tests to handle Windows path separators correctly
|
|
186
|
-
|
|
187
|
-
#### Testing
|
|
188
|
-
- Improved test coverage for rollback operations
|
|
189
|
-
- Enhanced mock handling for path-dependent operations
|
|
190
|
-
- Test suite now at ~90% passing rate
|
|
191
|
-
|
|
192
|
-
### GitLab CI/CD Integration
|
|
193
|
-
Added comprehensive GitLab CI/CD configuration for automated testing, building, and publishing:
|
|
194
|
-
|
|
195
|
-
- Automated testing on every push and merge request
|
|
196
|
-
- Build verification and artifact storage
|
|
197
|
-
- Automated publishing to npm registries
|
|
198
|
-
- Documentation deployment
|
|
199
|
-
|
|
200
|
-
See the [publishing guide](./docs/publishing-guide.md) for more information.
|
|
201
|
-
|
|
189
|
+
|
|
190
|
+
### Code Quality
|
|
191
|
+
```bash
|
|
192
|
+
bun run lint # Run Biome linter
|
|
193
|
+
bun run format # Format code with Biome
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
For detailed information about our development tools and workflow, see [Development Tools Documentation](./docs/development-tools.md).
|
|
197
|
+
|
|
198
|
+
## Contributing
|
|
199
|
+
|
|
200
|
+
Contributions are welcome! This project was created using a comprehensive development workflow based on user stories and epics to ensure a well-architected, maintainable codebase.
|
|
201
|
+
|
|
202
|
+
## Publishing
|
|
203
|
+
|
|
204
|
+
To publish this CLI tool to npm as `pwa-sv`, please follow the steps in the [publishing guide](./docs/publishing-guide.md).
|
|
205
|
+
|
|
206
|
+
## Recent Changes
|
|
207
|
+
|
|
208
|
+
### v1.4.0
|
|
209
|
+
|
|
210
|
+
#### Changes
|
|
211
|
+
- Migrated from `svelte-i18n` to `@inlang/paraglide-js` for internationalization
|
|
212
|
+
- Compiler-based tree-shaking (70% smaller bundles)
|
|
213
|
+
- Full type safety with TypeScript
|
|
214
|
+
- Official SvelteKit integration
|
|
215
|
+
- Updated all packages to latest versions (TypeScript 6.0, Biome 2.5, Commander 15, Effect Platform 0.96)
|
|
216
|
+
- Updated TypeScript config to use `moduleResolution: "bundler"` (TS 6.0)
|
|
217
|
+
|
|
218
|
+
### v1.3.0 (2026-01-13)
|
|
219
|
+
|
|
220
|
+
#### New Features
|
|
221
|
+
- Added optional Git initialization during project creation with `--git` or `-g` flag
|
|
222
|
+
- Git repository is automatically initialized with an initial commit when enabled
|
|
223
|
+
- Improved error handling for Git initialization failures
|
|
224
|
+
|
|
225
|
+
### v1.2.0 (2026-01-12)
|
|
226
|
+
|
|
227
|
+
#### Bug Fixes
|
|
228
|
+
- Fixed rollback logging in `engine.ts` - added proper rollback messages for project creation and dependency installation steps
|
|
229
|
+
- Added German (de.json) and French (fr.json) locale files to i18n configuration
|
|
230
|
+
- Fixed test expectations to match actual error message patterns
|
|
231
|
+
- Updated structure validation tests to handle Windows path separators correctly
|
|
232
|
+
|
|
233
|
+
#### Testing
|
|
234
|
+
- Improved test coverage for rollback operations
|
|
235
|
+
- Enhanced mock handling for path-dependent operations
|
|
236
|
+
- Test suite now at ~90% passing rate
|
|
237
|
+
|
|
238
|
+
### GitLab CI/CD Integration
|
|
239
|
+
Added comprehensive GitLab CI/CD configuration for automated testing, building, and publishing:
|
|
240
|
+
|
|
241
|
+
- Automated testing on every push and merge request
|
|
242
|
+
- Build verification and artifact storage
|
|
243
|
+
- Automated publishing to npm registries
|
|
244
|
+
- Documentation deployment
|
|
245
|
+
|
|
246
|
+
See the [publishing guide](./docs/publishing-guide.md) for more information.
|
|
247
|
+
|
|
202
248
|
## Package Information
|
|
203
249
|
|
|
204
250
|
This tool is published as [`create-pwa-sv`](https://www.npmjs.com/package/create-pwa-sv) on npm. Install it using:
|
|
@@ -210,14 +256,14 @@ npm create pwa-sv my-project
|
|
|
210
256
|
# or
|
|
211
257
|
pnpm create pwa-sv my-project
|
|
212
258
|
```
|
|
213
|
-
|
|
214
|
-
## About EduTherapy
|
|
215
|
-
|
|
216
|
-
This tool is developed by **EduTherapy** (a brand of Talim Shifa Studio), specializing in digital transformation for education and healthcare sectors through Progressive Web Apps.
|
|
217
|
-
|
|
218
|
-
- 🌐 Website: https://eduth.pro/
|
|
219
|
-
- 📧 Contact: edutherapystudio@gmail.com
|
|
220
|
-
|
|
221
|
-
## License
|
|
222
|
-
|
|
223
|
-
MIT
|
|
259
|
+
|
|
260
|
+
## About EduTherapy
|
|
261
|
+
|
|
262
|
+
This tool is developed by **EduTherapy** (a brand of Talim Shifa Studio), specializing in digital transformation for education and healthcare sectors through Progressive Web Apps.
|
|
263
|
+
|
|
264
|
+
- 🌐 Website: https://eduth.pro/
|
|
265
|
+
- 📧 Contact: edutherapystudio@gmail.com
|
|
266
|
+
|
|
267
|
+
## License
|
|
268
|
+
|
|
269
|
+
MIT
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
2
3
|
import { Command } from 'commander';
|
|
3
4
|
import { createProject } from './engine.js';
|
|
4
|
-
import { existsSync } from 'fs';
|
|
5
5
|
const program = new Command();
|
|
6
6
|
// Validate project name to ensure it's a valid directory name
|
|
7
7
|
export const validateProjectName = (name) => {
|
|
@@ -30,6 +30,7 @@ program
|
|
|
30
30
|
.option('-s, --skeleton', 'Add Skeleton UI framework')
|
|
31
31
|
.option('-i, --i18n', 'Add internationalization support')
|
|
32
32
|
.option('-p, --playwright', 'Add Playwright for browser testing')
|
|
33
|
+
.option('-g, --git', 'Initialize Git repository (default: true)')
|
|
33
34
|
.action(async (rawProjectName, options) => {
|
|
34
35
|
try {
|
|
35
36
|
// Validate project name
|
|
@@ -40,11 +41,12 @@ program
|
|
|
40
41
|
}
|
|
41
42
|
const config = {
|
|
42
43
|
projectName,
|
|
43
|
-
useDexie: options.dexie
|
|
44
|
-
useSkeleton: options.skeleton
|
|
45
|
-
useI18n: options.i18n
|
|
46
|
-
usePlaywright: options.playwright
|
|
47
|
-
nonInteractive: options.yes
|
|
44
|
+
useDexie: options.dexie,
|
|
45
|
+
useSkeleton: options.skeleton,
|
|
46
|
+
useI18n: options.i18n,
|
|
47
|
+
usePlaywright: options.playwright,
|
|
48
|
+
nonInteractive: options.yes,
|
|
49
|
+
git: options.git === undefined ? true : options.git,
|
|
48
50
|
};
|
|
49
51
|
await createProject(config);
|
|
50
52
|
}
|
|
@@ -55,5 +57,8 @@ program
|
|
|
55
57
|
});
|
|
56
58
|
// Add help option
|
|
57
59
|
program.showHelpAfterError('(add --help for additional information)');
|
|
58
|
-
|
|
60
|
+
// Only parse if this file is being run directly
|
|
61
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
62
|
+
program.parse();
|
|
63
|
+
}
|
|
59
64
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,8DAA8D;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAU,EAAE;IAC1D,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED,iDAAiD;IACjD,MAAM,YAAY,GAAG,eAAe,CAAC;IACrC,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IAED,gDAAgD;IAChD,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CAA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,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,kBAAkB;AAClB,OAAO,CAAC,kBAAkB,CAAC,yCAAyC,CAAC,CAAC;AAEtE,gDAAgD;AAChD,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpD,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps-manager.d.ts","sourceRoot":"","sources":["../src/deps-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deps-manager.d.ts","sourceRoot":"","sources":["../src/deps-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAkB1C;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,GAAI,QAAQ,OAAO,KAAG,MAAM,EA8BpD,CAAC;AAEF;;;;GAIG;AACH,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,MAAM,EAAE,KACb;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAuB5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAU,QAAQ,OAAO,KAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAsC7F,CAAC"}
|
package/dist/deps-manager.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { execa } from 'execa';
|
|
2
1
|
import { Either } from 'effect';
|
|
2
|
+
import { execa } from 'execa';
|
|
3
3
|
// Core dependencies that are always installed (as per technical specifications)
|
|
4
4
|
const CORE_DEPENDENCIES = [
|
|
5
5
|
'@vite-pwa/sveltekit', // PWA plugin for Vite
|
|
6
6
|
'@lucide/svelte', // Icon library
|
|
7
7
|
'effect', // Functional programming library
|
|
8
8
|
'@effect/platform', // Effect platform utilities
|
|
9
|
-
'@fontsource-variable/roboto' // Variable version of roboto font
|
|
9
|
+
'@fontsource-variable/roboto', // Variable version of roboto font
|
|
10
10
|
];
|
|
11
11
|
// Conditional dependencies based on flags
|
|
12
12
|
const CONDITIONAL_DEPENDENCIES = {
|
|
13
13
|
dexie: ['dexie'],
|
|
14
14
|
skeleton: ['@skeletonlabs/skeleton', '@skeletonlabs/skeleton-svelte'],
|
|
15
|
-
i18n: ['
|
|
15
|
+
i18n: ['@inlang/paraglide-js'],
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* Creates the complete list of dependencies based on configuration
|
|
@@ -61,14 +61,15 @@ export { buildDependencyList };
|
|
|
61
61
|
export const categorizeDependencies = (deps) => {
|
|
62
62
|
const devDeps = [];
|
|
63
63
|
const runtimeDeps = [];
|
|
64
|
-
deps.forEach(dep => {
|
|
64
|
+
deps.forEach((dep) => {
|
|
65
65
|
// Dev dependencies according to typical usage and architecture
|
|
66
66
|
if (dep.includes('vite') || // Vite and related tools are dev dependencies
|
|
67
67
|
dep.includes('sveltekit') || // SvelteKit build tools are dev dependencies
|
|
68
68
|
dep.includes('@sveltejs/') || // Svelte.js official packages are dev dependencies
|
|
69
69
|
dep.includes('svelte-') || // Svelte-specific dev tools are dev dependencies
|
|
70
70
|
dep.includes('skeleton') || // UI framework dev dependencies
|
|
71
|
-
dep.includes('i18n') // i18n tools are typically dev dependencies
|
|
71
|
+
dep.includes('i18n') || // i18n tools are typically dev dependencies
|
|
72
|
+
dep.includes('paraglide') // Paraglide JS is a build-time i18n compiler
|
|
72
73
|
) {
|
|
73
74
|
devDeps.push(dep);
|
|
74
75
|
}
|
|
@@ -94,18 +95,18 @@ export const installDependencies = async (config) => {
|
|
|
94
95
|
const { devDeps, runtimeDeps } = categorizeDependencies(dependenciesToInstall);
|
|
95
96
|
// Install runtime dependencies first
|
|
96
97
|
if (runtimeDeps.length > 0) {
|
|
97
|
-
console.log(
|
|
98
|
+
console.log('Installing runtime dependencies:', runtimeDeps);
|
|
98
99
|
await execa('bun', ['add', ...runtimeDeps], {
|
|
99
100
|
cwd: projectDir,
|
|
100
|
-
stdio: 'inherit'
|
|
101
|
+
stdio: 'inherit',
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
104
|
// Install dev dependencies
|
|
104
105
|
if (devDeps.length > 0) {
|
|
105
|
-
console.log(
|
|
106
|
+
console.log('Installing dev dependencies:', devDeps);
|
|
106
107
|
await execa('bun', ['add', '-d', ...devDeps], {
|
|
107
108
|
cwd: projectDir,
|
|
108
|
-
stdio: 'inherit'
|
|
109
|
+
stdio: 'inherit',
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
112
|
console.log('Dependencies installed successfully');
|
package/dist/deps-manager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps-manager.js","sourceRoot":"","sources":["../src/deps-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"deps-manager.js","sourceRoot":"","sources":["../src/deps-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,gFAAgF;AAChF,MAAM,iBAAiB,GAAG;IACxB,qBAAqB,EAAE,sBAAsB;IAC7C,gBAAgB,EAAE,eAAe;IACjC,QAAQ,EAAE,iCAAiC;IAC3C,kBAAkB,EAAE,4BAA4B;IAChD,6BAA6B,EAAE,kCAAkC;CAClE,CAAC;AAEF,0CAA0C;AAC1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,4DAA4D;QAC5D,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;QAE/E,qCAAqC;QACrC,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,WAAW,CAAC,CAAC;YAC7D,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,WAAW,CAAC,EAAE;gBAC1C,GAAG,EAAE,UAAU;gBACf,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;QACL,CAAC;QAED,2BAA2B;QAC3B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAC;YACrD,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,EAAE;gBAC5C,GAAG,EAAE,UAAU;gBACf,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACnD,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,mCAAmC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACpF,CAAC;AACH,CAAC,CAAC"}
|
package/dist/engine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAahC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAuB1C;;GAEG;AACH,UAAU,aAAa;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,GAAI,QAAQ,OAAO,KAAG,aAY5C,CAAC;AAEH;;;;GAIG;AACH,QAAA,MAAM,eAAe,GAAU,OAAO,aAAa,KAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CA0EvF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,QAAQ,OAAO,KACd,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CA6HpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAU,QAAQ,OAAO,KAAG,OAAO,CAAC,IAAI,CAkCjE,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,KAAK,aAAa,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/engine.js
CHANGED
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
import { installDependencies } from './deps-manager.js';
|
|
2
|
-
import { createSvelteProject, createPWAConfig, updatePackageJsonWithPWAScripts, validateProjectStructure, createSkeletonUIConfig, createI18nConfig, createPWAAssetConfig, createAgentsFileAndDocsFolder } from './process-fs-handler.js';
|
|
3
|
-
import { Either } from 'effect';
|
|
4
|
-
// Import chalk for color formatting
|
|
5
1
|
import chalk from 'chalk';
|
|
2
|
+
import { Either } from 'effect';
|
|
3
|
+
import { execa } from 'execa';
|
|
4
|
+
import { installDependencies } from './deps-manager.js';
|
|
5
|
+
import { createAgentsFileAndDocsFolder, createI18nConfig, createPWAAssetConfig, createPWAConfig, createSkeletonUIConfig, createSvelteProject, updatePackageJsonWithPWAScripts, validateProjectStructure, } from './process-fs-handler.js';
|
|
6
6
|
/**
|
|
7
7
|
* Formats step messages with color for better readability
|
|
8
8
|
* @param message The message to format
|
|
9
9
|
* @returns Formatted message with color
|
|
10
10
|
*/
|
|
11
|
-
const formatStepMessage = (message) =>
|
|
12
|
-
return chalk.cyan(message);
|
|
13
|
-
};
|
|
11
|
+
const formatStepMessage = (message) => chalk.cyan(message);
|
|
14
12
|
/**
|
|
15
13
|
* Formats success messages with color
|
|
16
14
|
* @param message The message to format
|
|
17
15
|
* @returns Formatted message with color
|
|
18
16
|
*/
|
|
19
|
-
const formatSuccessMessage = (message) =>
|
|
20
|
-
return chalk.green(message);
|
|
21
|
-
};
|
|
17
|
+
const formatSuccessMessage = (message) => chalk.green(message);
|
|
22
18
|
/**
|
|
23
19
|
* Formats error messages with color
|
|
24
20
|
* @param message The message to format
|
|
25
21
|
* @returns Formatted message with color
|
|
26
22
|
*/
|
|
27
|
-
const formatErrorMessage = (message) =>
|
|
28
|
-
return chalk.red(message);
|
|
29
|
-
};
|
|
23
|
+
const formatErrorMessage = (message) => chalk.red(message);
|
|
30
24
|
/**
|
|
31
25
|
* Creates an initial pipeline state
|
|
32
26
|
* @param config Configuration object
|
|
@@ -244,6 +238,29 @@ export const createProject = async (config) => {
|
|
|
244
238
|
console.error('Project creation failed:', result.left);
|
|
245
239
|
throw result.left;
|
|
246
240
|
}
|
|
241
|
+
// Initialize git repository if requested
|
|
242
|
+
if (config.git) {
|
|
243
|
+
try {
|
|
244
|
+
console.log(`Initializing Git repository for ${config.projectName}...`);
|
|
245
|
+
// Initialize git repository
|
|
246
|
+
await execa('git', ['init'], {
|
|
247
|
+
cwd: config.projectName,
|
|
248
|
+
});
|
|
249
|
+
// Add all files to staging
|
|
250
|
+
await execa('git', ['add', '.'], {
|
|
251
|
+
cwd: config.projectName,
|
|
252
|
+
});
|
|
253
|
+
// Create initial commit
|
|
254
|
+
await execa('git', ['commit', '-m', 'Initial commit from pwa-sv'], {
|
|
255
|
+
cwd: config.projectName,
|
|
256
|
+
});
|
|
257
|
+
console.log(chalk.green('Git repository initialized and initial commit created!'));
|
|
258
|
+
}
|
|
259
|
+
catch (error) {
|
|
260
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
261
|
+
console.error(chalk.yellow(`Git initialization failed: ${errorMessage}`));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
247
264
|
};
|
|
248
265
|
export { createInitialState, performRollback };
|
|
249
266
|
//# sourceMappingURL=engine.js.map
|