spyne-cli 0.7.1 → 0.7.2

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
@@ -61,8 +61,8 @@ npx spyne-cli create-app my-app --template shell
61
61
 
62
62
  | Template | Contents |
63
63
  | --- | --- |
64
- | `starter` (default) | `app.js` and a hello-world view |
65
- | `shell` | pages, navigation, and UI components |
64
+ | `shell` (default) | pages, navigation, and UI components |
65
+ | `starter` | `app.js` and a hello-world view |
66
66
 
67
67
  Options: `-t, --template`, `--no-install` to skip dependency installation,
68
68
  `--no-git` to skip git initialisation.
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "spyne-cli": "index.js"
5
5
  },
6
6
  "type": "module",
7
- "version": "0.7.1",
7
+ "version": "0.7.2",
8
8
  "overrides": {
9
9
  "mocha": {
10
10
  "diff": "^8.0.3",
@@ -10,18 +10,18 @@ import {fetchGeneratedApp} from './generate-app.js';
10
10
  // Template keys mirror the distinguishing suffix of their repo names:
11
11
  // spynejs/application-starter and spynejs/application-shell.
12
12
  export const TEMPLATES = {
13
- starter: {
14
- value: 'starter',
15
- label: 'Application Starter',
16
- description: 'minimal: app.js + a hello-world view',
17
- repo: 'https://github.com/spynejs/application-starter.git',
18
- },
19
13
  shell: {
20
14
  value: 'shell',
21
15
  label: 'Application Shell',
22
16
  description: 'pages, navigation, and UI components built in',
23
17
  repo: 'https://github.com/spynejs/application-shell.git',
24
18
  },
19
+ starter: {
20
+ value: 'starter',
21
+ label: 'Application Starter',
22
+ description: 'minimal: app.js + a hello-world view',
23
+ repo: 'https://github.com/spynejs/application-starter.git',
24
+ },
25
25
  };
26
26
 
27
27
  // Accepted silently; only the canonical values are documented.
@@ -31,7 +31,7 @@ const TEMPLATE_ALIASES = {
31
31
  'application-starter': 'starter',
32
32
  };
33
33
 
34
- export const DEFAULT_TEMPLATE = 'starter';
34
+ export const DEFAULT_TEMPLATE = 'shell';
35
35
 
36
36
  export const resolveTemplate = (name) => {
37
37
  if (!name) return DEFAULT_TEMPLATE;
@@ -250,7 +250,7 @@ export async function createApp(args = {}) {
250
250
  `cd ${appName}`,
251
251
  ...(dependenciesInstalled ? [] : ['npm install']),
252
252
  'npm start',
253
- ...(generated ? ['see GETTING-STARTED.md for the CMS claim + AI editing'] : []),
253
+ ...(generated ? ['see GETTING-STARTED.md for the CMS + AI editing'] : []),
254
254
  ],
255
255
  };
256
256
  }
@@ -88,7 +88,13 @@ export async function fetchGeneratedApp({sitePrompt, targetDir, onProgress}) {
88
88
  try {
89
89
  res = await fetch(generatorUrl(), {
90
90
  method: 'POST',
91
- headers: {'Content-Type': 'application/json'},
91
+ headers: {
92
+ 'Content-Type': 'application/json',
93
+ // Private testing bypass for the anonymous quota (optional).
94
+ ...(process.env.SPYNE_CLI_GENERATOR_KEY
95
+ ? {'x-generation-key': process.env.SPYNE_CLI_GENERATOR_KEY}
96
+ : {}),
97
+ },
92
98
  body: JSON.stringify({prompt: sitePrompt}),
93
99
  signal: AbortSignal.timeout(120000),
94
100
  });
package/src/registry.js CHANGED
@@ -137,7 +137,7 @@ export const commands = [
137
137
 
138
138
  // `new` shipped in 0.6.x and stays working; create-app is canonical.
139
139
  export const aliases = {
140
- new: {command: 'create-app', deprecated: true, since: '0.7.1'},
140
+ new: {command: 'create-app', deprecated: true, since: '0.7.2'},
141
141
  };
142
142
 
143
143
  /**