mnfst-starter 1.5.34 → 1.5.36

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/create-starter.js CHANGED
@@ -4,18 +4,19 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { execSync } = require('child_process');
6
6
 
7
- // Get project name from command line arguments
8
- const projectName = process.argv[2];
7
+ // Get project name from command line arguments (join so "Playcom Platform" works)
8
+ const projectName = process.argv.slice(2).join(' ').trim();
9
9
 
10
10
  if (!projectName) {
11
11
  console.log('Usage: npx mnfst-starter <project-name>');
12
12
  console.log('Example: npx mnfst-starter MyProject');
13
+ console.log('Example: npx mnfst-starter "Playcom Platform"');
13
14
  process.exit(1);
14
15
  }
15
16
 
16
- // Validate project name - allow most characters but prevent problematic ones
17
- if (!/^[a-zA-Z0-9._-]+$/.test(projectName) || projectName.includes('..') || projectName.startsWith('.') || projectName.endsWith('.')) {
18
- console.error('Error: Project name must contain only letters, numbers, dots, underscores, and hyphens. Cannot start/end with dots or contain consecutive dots.');
17
+ // Validate project name - allow letters, numbers, spaces, dots, underscores, hyphens; prevent path tricks
18
+ if (!/^[a-zA-Z0-9._ -]+$/.test(projectName) || projectName.includes('..') || projectName.startsWith('.') || projectName.endsWith('.') || /^\s|\s$/.test(projectName)) {
19
+ console.error('Error: Project name must contain only letters, numbers, spaces, dots, underscores, and hyphens. Cannot start/end with dots or spaces, or contain consecutive dots.');
19
20
  process.exit(1);
20
21
  }
21
22
 
@@ -33,25 +34,23 @@ try {
33
34
  // Create project directory
34
35
  fs.mkdirSync(projectPath, { recursive: true });
35
36
 
36
- // Copy all files from starter template
37
+ // Copy all files from starter template (must match templates/starter; exclude local-only e.g. bs-config.js)
37
38
  const starterDir = path.join(__dirname, 'templates');
38
39
  const filesToCopy = [
39
- 'index.html',
40
40
  'components',
41
- 'data',
42
- 'scripts',
43
- 'styles',
44
41
  'icons',
45
- 'manifest.json',
42
+ '_redirects',
46
43
  '.gitignore',
47
- 'robots.txt',
48
- 'sitemap.xml',
44
+ 'favicon.ico',
45
+ 'index.html',
49
46
  'LICENSE.md',
47
+ 'locales.csv',
48
+ 'manifest.json',
49
+ 'manifest.theme.css',
50
50
  'privacy.md',
51
51
  'README.md',
52
- 'favicon.ico',
53
- '_redirects',
54
- '.htaccess'
52
+ 'robots.txt',
53
+ 'sitemap.xml'
55
54
  ];
56
55
 
57
56
  filesToCopy.forEach(file => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst-starter",
3
- "version": "1.5.34",
3
+ "version": "1.5.36",
4
4
  "description": "Create a Manifest (mnfst) starter application",
5
5
  "main": "index.html",
6
6
  "bin": {
@@ -1,91 +0,0 @@
1
- # Dependencies (if you add them later)
2
- node_modules/
3
- npm-debug.log*
4
- yarn-debug.log*
5
- yarn-error.log*
6
-
7
- # Build outputs (if you add a build process)
8
- dist/
9
- build/
10
- *.tgz
11
-
12
- # Development files
13
- .vscode/
14
- .idea/
15
- *.swp
16
- *.swo
17
- *~
18
- bs-config.js
19
-
20
- # OS generated files
21
- .DS_Store
22
- .DS_Store?
23
- ._*
24
- .Spotlight-V100
25
- .Trashes
26
- ehthumbs.db
27
- Thumbs.db
28
-
29
- # Temporary files
30
- *.tmp
31
- *.temp
32
-
33
- # Logs
34
- logs
35
- *.log
36
- # Runtime data
37
- pids
38
- *.pid
39
- *.seed
40
- *.pid.lock
41
-
42
- # Coverage directory used by tools like istanbul
43
- coverage/
44
-
45
- # nyc test coverage
46
- .nyc_output
47
-
48
- # Dependency directories
49
- jspm_packages/
50
-
51
- # Optional npm cache directory
52
- .npm
53
-
54
- # Optional REPL history
55
- .node_repl_history
56
-
57
- # Output of 'npm pack'
58
- *.tgz
59
-
60
- # Yarn Integrity file
61
- .yarn-integrity
62
-
63
- # dotenv environment variables file
64
- .env
65
- .env.local
66
- .env.development.local
67
- .env.test.local
68
- .env.production.local
69
-
70
- # parcel-bundler cache (https://parceljs.org/)
71
- .cache
72
- .parcel-cache
73
-
74
- # next.js build output
75
- .next
76
-
77
- # nuxt.js build output
78
- .nuxt
79
-
80
- # vuepress build output
81
- .vuepress/dist
82
-
83
- # Serverless directories
84
- .serverless
85
-
86
- # FuseBox cache
87
- .fusebox/
88
-
89
- # DynamoDB Local files
90
- .dynamodb/
91
-