@tutorflow/cli 0.1.0
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/LICENSE +21 -0
- package/README.md +441 -0
- package/dist/client.d.ts +13 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +48 -0
- package/dist/client.js.map +1 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +72 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +65 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/course.d.ts +3 -0
- package/dist/commands/course.d.ts.map +1 -0
- package/dist/commands/course.js +113 -0
- package/dist/commands/course.js.map +1 -0
- package/dist/commands/evaluate.d.ts +3 -0
- package/dist/commands/evaluate.d.ts.map +1 -0
- package/dist/commands/evaluate.js +68 -0
- package/dist/commands/evaluate.js.map +1 -0
- package/dist/commands/slide.d.ts +3 -0
- package/dist/commands/slide.d.ts.map +1 -0
- package/dist/commands/slide.js +116 -0
- package/dist/commands/slide.js.map +1 -0
- package/dist/commands/video.d.ts +3 -0
- package/dist/commands/video.d.ts.map +1 -0
- package/dist/commands/video.js +120 -0
- package/dist/commands/video.js.map +1 -0
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +80 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +34 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +9 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/output.d.ts +3 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +36 -0
- package/dist/utils/output.js.map +1 -0
- package/dist/utils/spinner.d.ts +8 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +26 -0
- package/dist/utils/spinner.js.map +1 -0
- package/package.json +54 -0
package/dist/config.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.readConfig = readConfig;
|
|
37
|
+
exports.writeConfig = writeConfig;
|
|
38
|
+
exports.updateConfig = updateConfig;
|
|
39
|
+
exports.deleteConfig = deleteConfig;
|
|
40
|
+
const fs = __importStar(require("fs/promises"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const os = __importStar(require("os"));
|
|
43
|
+
const CONFIG_PATH = path.join(os.homedir(), '.tutorflow', 'config.json');
|
|
44
|
+
async function ensureConfigDir() {
|
|
45
|
+
const dir = path.dirname(CONFIG_PATH);
|
|
46
|
+
try {
|
|
47
|
+
await fs.mkdir(dir, { recursive: true });
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
// Already exists or permission denied - both OK here
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async function readConfig() {
|
|
54
|
+
try {
|
|
55
|
+
const content = await fs.readFile(CONFIG_PATH, 'utf-8');
|
|
56
|
+
return JSON.parse(content);
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
return {};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async function writeConfig(config) {
|
|
63
|
+
await ensureConfigDir();
|
|
64
|
+
await fs.writeFile(CONFIG_PATH, JSON.stringify(config, null, 2));
|
|
65
|
+
}
|
|
66
|
+
async function updateConfig(updates) {
|
|
67
|
+
const current = await readConfig();
|
|
68
|
+
const updated = { ...current, ...updates };
|
|
69
|
+
await writeConfig(updated);
|
|
70
|
+
return updated;
|
|
71
|
+
}
|
|
72
|
+
async function deleteConfig() {
|
|
73
|
+
try {
|
|
74
|
+
await fs.unlink(CONFIG_PATH);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
// Already deleted
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";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AC;AAEM,KAAK,UAAU,YAAY;IAChC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,kBAAkB;IACpB,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const auth_1 = require("./commands/auth");
|
|
6
|
+
const slide_1 = require("./commands/slide");
|
|
7
|
+
const video_1 = require("./commands/video");
|
|
8
|
+
const course_1 = require("./commands/course");
|
|
9
|
+
const evaluate_1 = require("./commands/evaluate");
|
|
10
|
+
const config_1 = require("./commands/config");
|
|
11
|
+
commander_1.program
|
|
12
|
+
.name('tutorflow')
|
|
13
|
+
.description('TutorFlow CLI - Create AI-powered educational content')
|
|
14
|
+
.version('0.1.0');
|
|
15
|
+
commander_1.program.addCommand((0, auth_1.authCommand)());
|
|
16
|
+
commander_1.program.addCommand((0, slide_1.slideCommand)());
|
|
17
|
+
commander_1.program.addCommand((0, video_1.videoCommand)());
|
|
18
|
+
commander_1.program.addCommand((0, course_1.courseCommand)());
|
|
19
|
+
commander_1.program.addCommand((0, evaluate_1.evaluateCommand)());
|
|
20
|
+
commander_1.program.addCommand((0, config_1.configCommand)());
|
|
21
|
+
commander_1.program.parse(process.argv);
|
|
22
|
+
if (!process.argv.slice(2).length) {
|
|
23
|
+
commander_1.program.outputHelp();
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,0CAA8C;AAC9C,4CAAgD;AAChD,4CAAgD;AAChD,8CAAkD;AAClD,kDAAsD;AACtD,8CAAkD;AAElD,mBAAO;KACJ,IAAI,CAAC,WAAW,CAAC;KACjB,WAAW,CAAC,uDAAuD,CAAC;KACpE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,mBAAO,CAAC,UAAU,CAAC,IAAA,kBAAW,GAAE,CAAC,CAAC;AAClC,mBAAO,CAAC,UAAU,CAAC,IAAA,oBAAY,GAAE,CAAC,CAAC;AACnC,mBAAO,CAAC,UAAU,CAAC,IAAA,oBAAY,GAAE,CAAC,CAAC;AACnC,mBAAO,CAAC,UAAU,CAAC,IAAA,sBAAa,GAAE,CAAC,CAAC;AACpC,mBAAO,CAAC,UAAU,CAAC,IAAA,0BAAe,GAAE,CAAC,CAAC;AACtC,mBAAO,CAAC,UAAU,CAAC,IAAA,sBAAa,GAAE,CAAC,CAAC;AAEpC,mBAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,mBAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response types for the TutorFlow Platform API (`/v1/platform/*`).
|
|
3
|
+
* These mirror the fields the CLI actually reads. The API may return
|
|
4
|
+
* additional fields, which are tolerated via the optional `[key: string]: unknown`
|
|
5
|
+
* index signatures on list items.
|
|
6
|
+
*/
|
|
7
|
+
export interface ResourceBase {
|
|
8
|
+
id: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
status: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
previewUrl?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SlideResource extends ResourceBase {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface VideoResource extends ResourceBase {
|
|
18
|
+
sceneCount?: number;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface CourseResource extends ResourceBase {
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface ListResponse<T> {
|
|
25
|
+
data: T[];
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
export interface EvaluationResponse {
|
|
29
|
+
score: number | string;
|
|
30
|
+
feedback: string;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
export type EvaluationType = 'exact' | 'rubric' | 'open-ended';
|
|
34
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Response types for the TutorFlow Platform API (`/v1/platform/*`).
|
|
4
|
+
* These mirror the fields the CLI actually reads. The API may return
|
|
5
|
+
* additional fields, which are tolerated via the optional `[key: string]: unknown`
|
|
6
|
+
* index signatures on list items.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAC7B,MAAM,CAqCR;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAE5D"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatTable = formatTable;
|
|
4
|
+
exports.formatJson = formatJson;
|
|
5
|
+
function formatTable(data) {
|
|
6
|
+
if (data.length === 0)
|
|
7
|
+
return '';
|
|
8
|
+
const columns = Object.keys(data[0]);
|
|
9
|
+
const colWidths = {};
|
|
10
|
+
columns.forEach((col) => {
|
|
11
|
+
colWidths[col] = Math.max(col.length, ...data.map((row) => String(row[col] || '').length));
|
|
12
|
+
});
|
|
13
|
+
const border = columns
|
|
14
|
+
.map((col) => '─'.repeat(colWidths[col] + 2))
|
|
15
|
+
.join('┼');
|
|
16
|
+
const header = columns
|
|
17
|
+
.map((col) => {
|
|
18
|
+
const padding = colWidths[col] - col.length;
|
|
19
|
+
return ` ${col}${' '.repeat(padding)} `;
|
|
20
|
+
})
|
|
21
|
+
.join('│');
|
|
22
|
+
const rows = data
|
|
23
|
+
.map((row) => columns
|
|
24
|
+
.map((col) => {
|
|
25
|
+
const value = String(row[col] || '');
|
|
26
|
+
const padding = colWidths[col] - value.length;
|
|
27
|
+
return ` ${value}${' '.repeat(padding)} `;
|
|
28
|
+
})
|
|
29
|
+
.join('│'))
|
|
30
|
+
.join('\n');
|
|
31
|
+
return `┌${border}┐\n│${header}│\n├${border}┤\n${rows.split('\n').map((r) => `│${r}│`).join('\n')}\n└${border}┘`;
|
|
32
|
+
}
|
|
33
|
+
function formatJson(data) {
|
|
34
|
+
return JSON.stringify(data, null, 2);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":";;AAAA,kCAuCC;AAED,gCAEC;AA3CD,SAAgB,WAAW,CACzB,IAA8B;IAE9B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,MAAM,SAAS,GAA2B,EAAE,CAAC;IAE7C,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACtB,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CACvB,GAAG,CAAC,MAAM,EACV,GAAG,IAAI,C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G,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,MAAM,GAAG,CAAC;AACnH,CAAC;AAED,SAAgB,UAAU,CAAC,IAAyB;IAClD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { spinner as clackSpinner } from '@clack/prompts';
|
|
2
|
+
export type Spinner = ReturnType<typeof clackSpinner>;
|
|
3
|
+
export declare function createSpinner(): Spinner;
|
|
4
|
+
export declare function startSpinner(message: string): Spinner;
|
|
5
|
+
export declare function stopSpinner(s: Spinner, message: string): void;
|
|
6
|
+
export declare function successSpinner(s: Spinner, message: string): void;
|
|
7
|
+
export declare function errorSpinner(s: Spinner, message: string): void;
|
|
8
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../src/utils/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEtD,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAIrD;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE7D;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhE;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE9D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSpinner = createSpinner;
|
|
4
|
+
exports.startSpinner = startSpinner;
|
|
5
|
+
exports.stopSpinner = stopSpinner;
|
|
6
|
+
exports.successSpinner = successSpinner;
|
|
7
|
+
exports.errorSpinner = errorSpinner;
|
|
8
|
+
const prompts_1 = require("@clack/prompts");
|
|
9
|
+
function createSpinner() {
|
|
10
|
+
return (0, prompts_1.spinner)();
|
|
11
|
+
}
|
|
12
|
+
function startSpinner(message) {
|
|
13
|
+
const s = (0, prompts_1.spinner)();
|
|
14
|
+
s.start(message);
|
|
15
|
+
return s;
|
|
16
|
+
}
|
|
17
|
+
function stopSpinner(s, message) {
|
|
18
|
+
s.stop(message);
|
|
19
|
+
}
|
|
20
|
+
function successSpinner(s, message) {
|
|
21
|
+
s.stop(`✓ ${message}`);
|
|
22
|
+
}
|
|
23
|
+
function errorSpinner(s, message) {
|
|
24
|
+
s.stop(`✗ ${message}`);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../src/utils/spinner.ts"],"names":[],"mappings":";;AAIA,sCAEC;AAED,oCAIC;AAED,kCAEC;AAED,wCAEC;AAED,oCAEC;AAxBD,4CAAyD;AAIzD,SAAgB,aAAa;IAC3B,OAAO,IAAA,iBAAY,GAAE,CAAC;AACxB,CAAC;AAED,SAAgB,YAAY,CAAC,OAAe;IAC1C,MAAM,CAAC,GAAG,IAAA,iBAAY,GAAE,CAAC;IACzB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,OAAO,CAAC,CAAC;AACX,CAAC;AAED,SAAgB,WAAW,CAAC,CAAU,EAAE,OAAe;IACrD,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAClB,CAAC;AAED,SAAgB,cAAc,CAAC,CAAU,EAAE,OAAe;IACxD,CAAC,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;AACzB,CAAC;AAED,SAAgB,YAAY,CAAC,CAAU,EAAE,OAAe;IACtD,CAAC,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;AACzB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tutorflow/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TutorFlow CLI for creating AI-powered educational content (slides, videos, courses) and evaluating student responses.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"tutorflow": "./dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/tutorflow-io/cli.git"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/tutorflow-io/cli#readme",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/tutorflow-io/cli/issues"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc --outDir dist",
|
|
29
|
+
"dev": "tsx src/index.ts",
|
|
30
|
+
"link": "npm link",
|
|
31
|
+
"test": "vitest run",
|
|
32
|
+
"test:watch": "vitest",
|
|
33
|
+
"test:coverage": "vitest run --coverage",
|
|
34
|
+
"typecheck": "tsc --noEmit",
|
|
35
|
+
"prepublishOnly": "rm -rf dist && pnpm build"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@clack/prompts": "^0.7.0",
|
|
39
|
+
"chalk": "^5.3.0",
|
|
40
|
+
"commander": "^11.0.0",
|
|
41
|
+
"open": "^9.0.0",
|
|
42
|
+
"undici": "^5.27.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^20.0.0",
|
|
46
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
47
|
+
"tsx": "^3.0.0",
|
|
48
|
+
"typescript": "^5.0.0",
|
|
49
|
+
"vitest": "^4.1.5"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=18.0.0"
|
|
53
|
+
}
|
|
54
|
+
}
|