@nitrostack/cli 1.0.4 → 1.0.6

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 (29) hide show
  1. package/dist/commands/generate.js +11 -11
  2. package/dist/commands/init.js +12 -12
  3. package/package.json +2 -2
  4. package/templates/typescript-oauth/package.json +1 -1
  5. package/templates/typescript-oauth/src/app.module.ts +1 -1
  6. package/templates/typescript-oauth/src/guards/oauth.guard.ts +1 -1
  7. package/templates/typescript-oauth/src/health/system.health.ts +1 -1
  8. package/templates/typescript-oauth/src/index.ts +1 -1
  9. package/templates/typescript-oauth/src/modules/flights/booking.tools.ts +1 -1
  10. package/templates/typescript-oauth/src/modules/flights/flights.module.ts +1 -1
  11. package/templates/typescript-oauth/src/modules/flights/flights.prompts.ts +1 -1
  12. package/templates/typescript-oauth/src/modules/flights/flights.resources.ts +1 -1
  13. package/templates/typescript-oauth/src/modules/flights/flights.tools.ts +1 -1
  14. package/templates/typescript-oauth/src/services/duffel.service.ts +1 -1
  15. package/templates/typescript-pizzaz/package.json +1 -1
  16. package/templates/typescript-pizzaz/src/app.module.ts +1 -1
  17. package/templates/typescript-pizzaz/src/index.ts +1 -1
  18. package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.module.ts +1 -1
  19. package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.service.ts +1 -1
  20. package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.tools.ts +1 -1
  21. package/templates/typescript-starter/package.json +1 -1
  22. package/templates/typescript-starter/src/app.module.ts +1 -1
  23. package/templates/typescript-starter/src/health/system.health.ts +1 -1
  24. package/templates/typescript-starter/src/index.ts +1 -1
  25. package/templates/typescript-starter/src/modules/calculator/calculator.module.ts +1 -1
  26. package/templates/typescript-starter/src/modules/calculator/calculator.prompts.ts +1 -1
  27. package/templates/typescript-starter/src/modules/calculator/calculator.resources.ts +1 -1
  28. package/templates/typescript-starter/src/modules/calculator/calculator.tools.ts +1 -1
  29. package/templates/typescript-oauth/.env.example +0 -27
@@ -6,7 +6,7 @@ import { createHeader, createSuccessBox, createErrorBox, log, spacer, nextSteps
6
6
  * Generator templates
7
7
  */
8
8
  const TEMPLATES = {
9
- middleware: (name) => `import { Middleware, MiddlewareInterface, ExecutionContext } from 'nitrostack';
9
+ middleware: (name) => `import { Middleware, MiddlewareInterface, ExecutionContext } from '@nitrostack/core';
10
10
 
11
11
  /**
12
12
  * ${name}
@@ -28,7 +28,7 @@ export class ${name} implements MiddlewareInterface {
28
28
  }
29
29
  }
30
30
  `,
31
- interceptor: (name) => `import { Interceptor, InterceptorInterface, ExecutionContext } from 'nitrostack';
31
+ interceptor: (name) => `import { Interceptor, InterceptorInterface, ExecutionContext } from '@nitrostack/core';
32
32
 
33
33
  /**
34
34
  * ${name}
@@ -49,7 +49,7 @@ export class ${name} implements InterceptorInterface {
49
49
  }
50
50
  }
51
51
  `,
52
- pipe: (name) => `import { Pipe, PipeInterface, ArgumentMetadata } from 'nitrostack';
52
+ pipe: (name) => `import { Pipe, PipeInterface, ArgumentMetadata } from '@nitrostack/core';
53
53
 
54
54
  /**
55
55
  * ${name}
@@ -69,7 +69,7 @@ export class ${name} implements PipeInterface {
69
69
  }
70
70
  }
71
71
  `,
72
- filter: (name) => `import { ExceptionFilter, ExceptionFilterInterface, ExecutionContext } from 'nitrostack';
72
+ filter: (name) => `import { ExceptionFilter, ExceptionFilterInterface, ExecutionContext } from '@nitrostack/core';
73
73
 
74
74
  /**
75
75
  * ${name}
@@ -93,7 +93,7 @@ export class ${name} implements ExceptionFilterInterface {
93
93
  }
94
94
  }
95
95
  `,
96
- service: (name) => `import { Injectable } from 'nitrostack';
96
+ service: (name) => `import { Injectable } from '@nitrostack/core';
97
97
 
98
98
  /**
99
99
  * ${name}
@@ -129,7 +129,7 @@ export class ${name} {
129
129
  }
130
130
  }
131
131
  `,
132
- guard: (name) => `import { Guard, ExecutionContext } from 'nitrostack';
132
+ guard: (name) => `import { Guard, ExecutionContext } from '@nitrostack/core';
133
133
 
134
134
  /**
135
135
  * ${name}
@@ -156,7 +156,7 @@ export class ${name} implements Guard {
156
156
  }
157
157
  }
158
158
  `,
159
- health: (name) => `import { HealthCheck, HealthCheckInterface, HealthCheckResult } from 'nitrostack';
159
+ health: (name) => `import { HealthCheck, HealthCheckInterface, HealthCheckResult } from '@nitrostack/core';
160
160
 
161
161
  /**
162
162
  * ${name}
@@ -187,7 +187,7 @@ export class ${name} implements HealthCheckInterface {
187
187
  }
188
188
  }
189
189
  `,
190
- module: (name) => `import { Module } from 'nitrostack';
190
+ module: (name) => `import { Module } from '@nitrostack/core';
191
191
  import { ${name}Tools } from './${name.toLowerCase()}.tools.js';
192
192
  import { ${name}Resources } from './${name.toLowerCase()}.resources.js';
193
193
  import { ${name}Prompts } from './${name.toLowerCase()}.prompts.js';
@@ -199,7 +199,7 @@ import { ${name}Prompts } from './${name.toLowerCase()}.prompts.js';
199
199
  })
200
200
  export class ${name}Module {}
201
201
  `,
202
- tools: (name) => `import { ToolDecorator as Tool, z, ExecutionContext, Injectable } from 'nitrostack';
202
+ tools: (name) => `import { ToolDecorator as Tool, z, ExecutionContext, Injectable } from '@nitrostack/core';
203
203
 
204
204
  /**
205
205
  * ${name} Tools
@@ -221,7 +221,7 @@ export class ${name}Tools {
221
221
  }
222
222
  }
223
223
  `,
224
- resources: (name) => `import { ResourceDecorator as Resource, ExecutionContext } from 'nitrostack';
224
+ resources: (name) => `import { ResourceDecorator as Resource, ExecutionContext } from '@nitrostack/core';
225
225
 
226
226
  /**
227
227
  * ${name} Resources
@@ -244,7 +244,7 @@ export class ${name}Resources {
244
244
  }
245
245
  }
246
246
  `,
247
- prompts: (name) => `import { PromptDecorator as Prompt, ExecutionContext } from 'nitrostack';
247
+ prompts: (name) => `import { PromptDecorator as Prompt, ExecutionContext } from '@nitrostack/core';
248
248
 
249
249
  /**
250
250
  * ${name} Prompts
@@ -14,13 +14,13 @@ const __dirname = dirname(__filename);
14
14
  */
15
15
  function isNitrostackFromNpm() {
16
16
  try {
17
- const result = execSync('npm list -g nitrostack --json', {
17
+ const result = execSync('npm list -g @nitrostack/cli --json', {
18
18
  encoding: 'utf-8',
19
19
  stdio: 'pipe'
20
20
  });
21
21
  const parsed = JSON.parse(result);
22
- if (parsed.dependencies && parsed.dependencies.nitrostack) {
23
- const nitrostackInfo = parsed.dependencies.nitrostack;
22
+ if (parsed.dependencies && parsed.dependencies['@nitrostack/cli']) {
23
+ const nitrostackInfo = parsed.dependencies['@nitrostack/cli'];
24
24
  return nitrostackInfo.version && !nitrostackInfo.resolved?.includes('file:');
25
25
  }
26
26
  }
@@ -154,19 +154,19 @@ export async function initCommand(projectName, options) {
154
154
  const fromNpm = isNitrostackFromNpm();
155
155
  const isLocalDev = isLocalDevelopment();
156
156
  if (isLocalDev && !fromNpm) {
157
- // Local development - link nitrostack
158
- spinner = new NitroSpinner('Linking local nitrostack...').start();
157
+ // Local development - link @nitrostack/core
158
+ spinner = new NitroSpinner('Linking local @nitrostack/core...').start();
159
159
  try {
160
- execSync('npm link nitrostack', { cwd: targetDir, stdio: 'pipe' });
161
- spinner.succeed('Local nitrostack linked');
160
+ execSync('npm link @nitrostack/core', { cwd: targetDir, stdio: 'pipe' });
161
+ spinner.succeed('Local @nitrostack/core linked');
162
162
  }
163
163
  catch {
164
- spinner.warn('Failed to link nitrostack');
164
+ spinner.warn('Failed to link @nitrostack/core');
165
165
  }
166
166
  spinner = new NitroSpinner('Installing widget dependencies...').start();
167
167
  try {
168
168
  const widgetsDir = path.join(targetDir, 'src', 'widgets');
169
- execSync('npm link nitrostack', { cwd: widgetsDir, stdio: 'pipe' });
169
+ execSync('npm link @nitrostack/core', { cwd: widgetsDir, stdio: 'pipe' });
170
170
  execSync('npm install', { cwd: widgetsDir, stdio: 'pipe' });
171
171
  spinner.succeed('Widget dependencies installed');
172
172
  }
@@ -180,7 +180,7 @@ export async function initCommand(projectName, options) {
180
180
  try {
181
181
  const widgetsDir = path.join(targetDir, 'src', 'widgets');
182
182
  execSync('npm install', { cwd: widgetsDir, stdio: 'pipe' });
183
- execSync('npm install nitrostack@latest', { cwd: widgetsDir, stdio: 'pipe' });
183
+ execSync('npm install @nitrostack/core@latest', { cwd: widgetsDir, stdio: 'pipe' });
184
184
  spinner.succeed('Widget dependencies installed');
185
185
  }
186
186
  catch {
@@ -238,7 +238,7 @@ async function createProjectFromScratch(targetDir, projectName, answers) {
238
238
  start: 'node dist/index.js',
239
239
  },
240
240
  dependencies: {
241
- nitrostack: '^1.0.0',
241
+ '@nitrostack/core': '^1.0.0',
242
242
  dotenv: '^16.3.1',
243
243
  },
244
244
  devDependencies: {
@@ -264,7 +264,7 @@ async function createProjectFromScratch(targetDir, projectName, answers) {
264
264
  };
265
265
  fs.writeJSONSync(path.join(targetDir, 'tsconfig.json'), tsconfig, { spaces: 2 });
266
266
  fs.mkdirSync(path.join(targetDir, 'src'), { recursive: true });
267
- const indexTs = `import { createServer, createTool, z } from 'nitrostack';
267
+ const indexTs = `import { createServer, createTool, z } from '@nitrostack/core';
268
268
 
269
269
  const server = createServer({
270
270
  name: '${projectName}',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitrostack/cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "CLI for NitroStack - Create and manage MCP server projects",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -65,6 +65,6 @@
65
65
  "bugs": {
66
66
  "url": "https://github.com/abhishekpanditofficial/nitrostack/issues"
67
67
  },
68
- "homepage": "https://nitrostack.vercel.app"
68
+ "homepage": "https://nitrostack.ai"
69
69
  }
70
70
 
@@ -14,7 +14,7 @@
14
14
  "widget": "npm --prefix src/widgets"
15
15
  },
16
16
  "dependencies": {
17
- "nitrostack": "^1",
17
+ "@nitrostack/core": "^1",
18
18
  "zod": "^3.22.4",
19
19
  "dotenv": "^16.3.1",
20
20
  "@duffel/api": "^4.21.0",
@@ -1,4 +1,4 @@
1
- import { McpApp, Module, ConfigModule, OAuthModule } from 'nitrostack';
1
+ import { McpApp, Module, ConfigModule, OAuthModule } from '@nitrostack/core';
2
2
  import { FlightsModule } from './modules/flights/flights.module.js';
3
3
  import { SystemHealthCheck } from './health/system.health.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Guard, ExecutionContext, OAuthModule, OAuthTokenPayload } from 'nitrostack';
1
+ import { Guard, ExecutionContext, OAuthModule, OAuthTokenPayload } from '@nitrostack/core';
2
2
 
3
3
  /**
4
4
  * OAuth Guard
@@ -1,4 +1,4 @@
1
- import { HealthCheck, HealthCheckInterface, HealthCheckResult } from 'nitrostack';
1
+ import { HealthCheck, HealthCheckInterface, HealthCheckResult } from '@nitrostack/core';
2
2
 
3
3
  /**
4
4
  * System Health Check
@@ -18,7 +18,7 @@
18
18
  */
19
19
 
20
20
  import 'dotenv/config';
21
- import { McpApplicationFactory } from 'nitrostack';
21
+ import { McpApplicationFactory } from '@nitrostack/core';
22
22
  import { AppModule } from './app.module.js';
23
23
 
24
24
  /**
@@ -1,4 +1,4 @@
1
- import { ToolDecorator as Tool, Widget, ExecutionContext, z, UseGuards, Injectable } from 'nitrostack';
1
+ import { ToolDecorator as Tool, Widget, ExecutionContext, z, UseGuards, Injectable } from '@nitrostack/core';
2
2
  import { OAuthGuard } from '../../guards/oauth.guard.js';
3
3
  import { DuffelService } from '../../services/duffel.service.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Module } from 'nitrostack';
1
+ import { Module } from '@nitrostack/core';
2
2
  import { FlightTools } from './flights.tools.js';
3
3
  import { BookingTools } from './booking.tools.js';
4
4
  import { FlightPrompts } from './flights.prompts.js';
@@ -1,4 +1,4 @@
1
- import { PromptDecorator as Prompt, ExecutionContext, Injectable } from 'nitrostack';
1
+ import { PromptDecorator as Prompt, ExecutionContext, Injectable } from '@nitrostack/core';
2
2
  import { DuffelService } from '../../services/duffel.service.js';
3
3
 
4
4
  // Note: Using explicit deps for ESM compatibility
@@ -1,4 +1,4 @@
1
- import { ResourceDecorator as Resource, ExecutionContext, z, Injectable } from 'nitrostack';
1
+ import { ResourceDecorator as Resource, ExecutionContext, z, Injectable } from '@nitrostack/core';
2
2
  import { DuffelService } from '../../services/duffel.service.js';
3
3
 
4
4
  // Note: Using explicit deps for ESM compatibility
@@ -1,4 +1,4 @@
1
- import { ToolDecorator as Tool, Widget, ExecutionContext, z, UseGuards, Injectable } from 'nitrostack';
1
+ import { ToolDecorator as Tool, Widget, ExecutionContext, z, UseGuards, Injectable } from '@nitrostack/core';
2
2
  import { OAuthGuard } from '../../guards/oauth.guard.js';
3
3
  import { DuffelService } from '../../services/duffel.service.js';
4
4
  import { format } from 'date-fns';
@@ -1,5 +1,5 @@
1
1
  import { Duffel } from '@duffel/api';
2
- import { Injectable } from 'nitrostack';
2
+ import { Injectable } from '@nitrostack/core';
3
3
 
4
4
  /**
5
5
  * Duffel API Service
@@ -23,7 +23,7 @@
23
23
  "author": "",
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "nitrostack": "^1",
26
+ "@nitrostack/core": "^1",
27
27
  "zod": "^3.22.4",
28
28
  "dotenv": "^16.3.1"
29
29
  },
@@ -1,4 +1,4 @@
1
- import { McpApp, Module, ConfigModule } from 'nitrostack';
1
+ import { McpApp, Module, ConfigModule } from '@nitrostack/core';
2
2
  import { PizzazModule } from './modules/pizzaz/pizzaz.module.js';
3
3
 
4
4
  /**
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import 'dotenv/config';
14
- import { McpApplicationFactory } from 'nitrostack';
14
+ import { McpApplicationFactory } from '@nitrostack/core';
15
15
  import { AppModule } from './app.module.js';
16
16
 
17
17
  /**
@@ -1,4 +1,4 @@
1
- import { Module } from 'nitrostack';
1
+ import { Module } from '@nitrostack/core';
2
2
  import { PizzazService } from './pizzaz.service.js';
3
3
  import { PizzazTools } from './pizzaz.tools.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Injectable } from 'nitrostack';
1
+ import { Injectable } from '@nitrostack/core';
2
2
  import { PIZZA_SHOPS, type PizzaShop } from './pizzaz.data.js';
3
3
 
4
4
  @Injectable()
@@ -1,4 +1,4 @@
1
- import { ToolDecorator as Tool, Widget, ExecutionContext, Injectable, z } from 'nitrostack';
1
+ import { ToolDecorator as Tool, Widget, ExecutionContext, Injectable, z } from '@nitrostack/core';
2
2
  import { PizzazService } from './pizzaz.service.js';
3
3
 
4
4
  const ShowMapSchema = z.object({
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "dotenv": "^16.3.1",
18
- "nitrostack": "^1",
18
+ "@nitrostack/core": "^1",
19
19
  "zod": "^3.22.4"
20
20
  },
21
21
  "devDependencies": {
@@ -1,4 +1,4 @@
1
- import { McpApp, Module, ConfigModule } from 'nitrostack';
1
+ import { McpApp, Module, ConfigModule } from '@nitrostack/core';
2
2
  import { CalculatorModule } from './modules/calculator/calculator.module.js';
3
3
  import { SystemHealthCheck } from './health/system.health.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { HealthCheck, HealthCheckInterface, HealthCheckResult } from 'nitrostack';
1
+ import { HealthCheck, HealthCheckInterface, HealthCheckResult } from '@nitrostack/core';
2
2
 
3
3
  /**
4
4
  * System Health Check
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  import 'dotenv/config';
13
- import { McpApplicationFactory } from 'nitrostack';
13
+ import { McpApplicationFactory } from '@nitrostack/core';
14
14
  import { AppModule } from './app.module.js';
15
15
 
16
16
  /**
@@ -1,4 +1,4 @@
1
- import { Module } from 'nitrostack';
1
+ import { Module } from '@nitrostack/core';
2
2
  import { CalculatorTools } from './calculator.tools.js';
3
3
  import { CalculatorResources } from './calculator.resources.js';
4
4
  import { CalculatorPrompts } from './calculator.prompts.js';
@@ -1,4 +1,4 @@
1
- import { PromptDecorator as Prompt, ExecutionContext } from 'nitrostack';
1
+ import { PromptDecorator as Prompt, ExecutionContext } from '@nitrostack/core';
2
2
 
3
3
  export class CalculatorPrompts {
4
4
  @Prompt({
@@ -1,4 +1,4 @@
1
- import { ResourceDecorator as Resource, Widget, ExecutionContext } from 'nitrostack';
1
+ import { ResourceDecorator as Resource, Widget, ExecutionContext } from '@nitrostack/core';
2
2
 
3
3
  export class CalculatorResources {
4
4
  @Resource({
@@ -1,4 +1,4 @@
1
- import { ToolDecorator as Tool, Widget, ExecutionContext, z } from 'nitrostack';
1
+ import { ToolDecorator as Tool, Widget, ExecutionContext, z } from '@nitrostack/core';
2
2
  import * as fs from 'fs';
3
3
  import * as path from 'path';
4
4
 
@@ -1,27 +0,0 @@
1
-
2
- # OAuth 2.1 MCP Server Configuration
3
- # =============================================================================
4
- # TRANSPORT MODE (AUTO-CONFIGURED)
5
- # =============================================================================
6
- # When OAuth is configured, the server automatically runs in DUAL mode:
7
- # - STDIO: For MCP protocol communication with Studio/Claude
8
- # - HTTP: For OAuth metadata endpoints (/.well-known/oauth-protected-resource)
9
- # Both transports run simultaneously on different channels.
10
- # =============================================================================
11
- # REQUIRED: Server Configuration
12
- # =============================================================================
13
- # =============================================================================
14
- # Auth0 Configuration
15
- # =============================================================================
16
- # After creating your API and Application in Auth0, fill in these values:
17
- # Your Auth0 API Identifier (from APIs → MCP Server → Identifier)
18
- # This MUST match exactly what you set when creating the API
19
- RESOURCE_URI=https://mcplocal
20
- # Your Auth0 tenant domain (authorization server)
21
- AUTH_SERVER_URL=https://dev-5dt0utuk31h13tjm.us.auth0.com
22
- # Expected token audience (should match RESOURCE_URI)
23
- TOKEN_AUDIENCE=https://mcplocal
24
- # Expected token issuer (your Auth0 tenant domain with trailing slash)
25
- TOKEN_ISSUER=https://dev-5dt0utuk31h13tjm.us.auth0.com/
26
-
27
- DUFFEL_API_KEY=duffel_test_-w0wGDHB0M3DU9k-sBeUbxLqwcibUQqfEbjWDTKNnlf