@output.ai/cli 0.8.0 → 0.8.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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "framework": "0.1.0"
3
+ }
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'node:url';
6
6
  import { FolderAlreadyExistsError, UserCancelledError, DirectoryCreationError } from '#types/errors.js';
7
7
  import { createDirectory } from '#utils/file_system.js';
8
8
  import { executeCommand, executeCommandWithMessages } from '#utils/process.js';
9
- import { getSDKVersions } from '#utils/sdk_versions.js';
9
+ import { getFrameworkVersion } from '#utils/framework_version.js';
10
10
  import { getErrorMessage, getErrorCode } from '#utils/error_utils.js';
11
11
  import { isDockerInstalled } from '#services/docker.js';
12
12
  import { isClaudeCliAvailable } from '#utils/claude.js';
@@ -93,16 +93,13 @@ async function scaffoldProjectFiles(projectPath, projectName, description) {
93
93
  const __filename = fileURLToPath(import.meta.url);
94
94
  const __dirname = path.dirname(__filename);
95
95
  const templatesDir = path.join(__dirname, '..', 'templates', 'project');
96
- // Get SDK versions for dynamic template injection
97
- const sdkVersions = await getSDKVersions();
96
+ // Get framework version for dynamic template injection
97
+ const frameworkVersion = await getFrameworkVersion();
98
98
  const templateVars = {
99
99
  projectName: kebabCase(projectName),
100
100
  ProjectName: pascalCase(projectName),
101
101
  description: description || `An Output.ai workflow for ${projectName}`,
102
- coreVersion: sdkVersions.core,
103
- llmVersion: sdkVersions.llm,
104
- httpVersion: sdkVersions.http,
105
- cliVersion: sdkVersions.cli
102
+ frameworkVersion: frameworkVersion.framework
106
103
  };
107
104
  const templateFiles = await getTemplateFiles(templatesDir);
108
105
  await Promise.all(templateFiles.map(templateFile => processTemplateFile(templateFile, projectPath, templateVars)));
@@ -11,12 +11,9 @@
11
11
  "dev": "output dev"
12
12
  },
13
13
  "dependencies": {
14
- "@output.ai/core": "^{{coreVersion}}",
15
- "@output.ai/llm": "^{{llmVersion}}",
16
- "@output.ai/http": "^{{httpVersion}}"
14
+ "@output.ai/output": "^{{frameworkVersion}}"
17
15
  },
18
16
  "devDependencies": {
19
- "@output.ai/cli": "latest",
20
17
  "@types/node": "^22.0.0",
21
18
  "copyfiles": "^1.0.0",
22
19
  "typescript": "^5.7.0"
@@ -0,0 +1,4 @@
1
+ export interface FrameworkVersion {
2
+ framework: string;
3
+ }
4
+ export declare function getFrameworkVersion(): Promise<FrameworkVersion>;
@@ -0,0 +1,4 @@
1
+ import frameworkVersion from '../generated/framework_version.json' with { type: 'json' };
2
+ export async function getFrameworkVersion() {
3
+ return frameworkVersion;
4
+ }
@@ -0,0 +1,13 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { getFrameworkVersion } from './framework_version.js';
3
+ describe('getFrameworkVersion', () => {
4
+ it('should return the framework version', async () => {
5
+ const version = await getFrameworkVersion();
6
+ expect(version).toHaveProperty('framework');
7
+ });
8
+ it('should return version in semver format', async () => {
9
+ const version = await getFrameworkVersion();
10
+ const semverPattern = /^\d+\.\d+\.\d+$/;
11
+ expect(version.framework).toMatch(semverPattern);
12
+ });
13
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@output.ai/cli",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "CLI for Output.ai workflow generation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +0,0 @@
1
- {
2
- "core": "0.4.0",
3
- "llm": "0.2.12",
4
- "http": "0.2.0",
5
- "cli": "0.8.0"
6
- }
@@ -1,7 +0,0 @@
1
- export interface SDKVersions {
2
- core: string;
3
- llm: string;
4
- http: string;
5
- cli: string;
6
- }
7
- export declare function getSDKVersions(): Promise<SDKVersions>;
@@ -1,4 +0,0 @@
1
- import sdkVersions from '../generated/sdk_versions.json' with { type: 'json' };
2
- export async function getSDKVersions() {
3
- return sdkVersions;
4
- }
@@ -1,19 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { getSDKVersions } from './sdk_versions.js';
3
- describe('getSDKVersions', () => {
4
- it('should return all SDK package versions', async () => {
5
- const versions = await getSDKVersions();
6
- expect(versions).toHaveProperty('core');
7
- expect(versions).toHaveProperty('llm');
8
- expect(versions).toHaveProperty('http');
9
- expect(versions).toHaveProperty('cli');
10
- });
11
- it('should return versions in semver format', async () => {
12
- const versions = await getSDKVersions();
13
- const semverPattern = /^\d+\.\d+\.\d+$/;
14
- expect(versions.core).toMatch(semverPattern);
15
- expect(versions.llm).toMatch(semverPattern);
16
- expect(versions.http).toMatch(semverPattern);
17
- expect(versions.cli).toMatch(semverPattern);
18
- });
19
- });