create-routify 1.5.7 → 1.6.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Create Routify
2
2
 
3
- Welcome to the new Routiy CLI! This CLI currently supports both version 2 & 3 (beta) of Routify.
3
+ Welcome to the new Routiy CLI! This CLI currently supports both version 2 & 3 of Routify.
4
4
 
5
5
  # Get Started
6
6
 
@@ -30,4 +30,5 @@ npm init routify [directory-name]
30
30
  ```
31
31
 
32
32
  ### Contributors
33
- See [CONTRIBUTORS.md](CONTRIBUTORS.md)
33
+
34
+ See [CONTRIBUTORS.md](CONTRIBUTORS.md)
package/config.js CHANGED
@@ -28,7 +28,7 @@ export default {
28
28
  defaultTemplate: 'basic-starter',
29
29
  templatesRepos: [
30
30
  {
31
- url: 'roxiness/routify#next',
31
+ url: 'roxiness/routify#main',
32
32
  // url: 'local:../routify',
33
33
  path: 'examples',
34
34
  templateType: 'directory',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-routify",
3
- "version": "v1.5.7",
3
+ "version": "v1.6.1",
4
4
  "description": "A powerful cli for super-powering your routify development experience",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -44,4 +44,4 @@
44
44
  "devDependencies": {
45
45
  "@types/update-notifier": "^6.0.1"
46
46
  }
47
- }
47
+ }
package/src/index.js CHANGED
@@ -33,7 +33,7 @@ const prompts = {
33
33
  {
34
34
  label: `Routify 3`,
35
35
  value: 3,
36
- hint: 'This is a beta version',
36
+ // hint: 'This is a beta version',
37
37
  },
38
38
  ],
39
39
  initialValue: 3,
@@ -116,6 +116,18 @@ const check = {
116
116
  };
117
117
 
118
118
  const getAvailableFeatures = (template) => {
119
+ console.log(
120
+ 'DEBUG: Available Templates:',
121
+ template ? template.name : 'undefined template',
122
+ );
123
+ if (!template || !template.manifest) {
124
+ console.error(
125
+ 'ERROR: Template or manifest is undefined. This likely means the selected starter template was not found.',
126
+ );
127
+ return [];
128
+ }
129
+ console.log('DEBUG: Using template manifest:', template.manifest);
130
+
119
131
  const features = template.manifest.features || [];
120
132
  if (template.manifest.test)
121
133
  features.push({
@@ -184,7 +196,7 @@ async function runPrompts(options, configs) {
184
196
  }
185
197
 
186
198
  options.template = options.templates.find(
187
- (t) => t.name === options.starterTemplate,
199
+ (t) => t.manifest.name === options.starterTemplate,
188
200
  );
189
201
 
190
202
  if (!options.template)
@@ -327,7 +339,9 @@ const removeExcludedFiles = async (options) => {
327
339
  export const run = async (options) => {
328
340
  const s = p.spinner();
329
341
  emitter.on('download', (url) => s.start(`Downloading ${url}`));
330
- emitter.on('downloaded', (url) => s.stop(`Downloaded ${url}`));
342
+ emitter.on('downloaded', ({ url, path }) =>
343
+ s.stop(`Downloaded ${url} -> ${path}`),
344
+ );
331
345
  const configs = (await import('../config.js')).default;
332
346
 
333
347
  const tools = { prompts: p };
@@ -31,7 +31,7 @@ const ensureRepo = async (url, force, onDownload) => {
31
31
  else resolve(null);
32
32
  }),
33
33
  );
34
- emitter.emit('downloaded', url);
34
+ emitter.emit('downloaded', { url, path: repoPath });
35
35
  }
36
36
 
37
37
  // return path to repo