agentica 0.12.8 → 0.12.9

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 (53) hide show
  1. package/bin/index.js +139 -41
  2. package/package.json +15 -12
  3. package/bin/bases/Connector.d.ts +0 -9
  4. package/bin/bases/Connector.js +0 -67
  5. package/bin/bases/Connector.js.map +0 -1
  6. package/bin/bases/Package.d.ts +0 -11
  7. package/bin/bases/Package.js +0 -74
  8. package/bin/bases/Package.js.map +0 -1
  9. package/bin/bases/Tsconfig.d.ts +0 -5
  10. package/bin/bases/Tsconfig.js +0 -135
  11. package/bin/bases/Tsconfig.js.map +0 -1
  12. package/bin/executable/AgenticaStart.d.ts +0 -7
  13. package/bin/executable/AgenticaStart.js +0 -325
  14. package/bin/executable/AgenticaStart.js.map +0 -1
  15. package/bin/index.d.ts +0 -2
  16. package/bin/index.js.map +0 -1
  17. package/bin/structures/IAgenticaStart.d.ts +0 -31
  18. package/bin/structures/IAgenticaStart.js +0 -3
  19. package/bin/structures/IAgenticaStart.js.map +0 -1
  20. package/bin/structures/IAgenticaStartOption.d.ts +0 -13
  21. package/bin/structures/IAgenticaStartOption.js +0 -3
  22. package/bin/structures/IAgenticaStartOption.js.map +0 -1
  23. package/bin/utils/capitalize.d.ts +0 -1
  24. package/bin/utils/capitalize.js +0 -12
  25. package/bin/utils/capitalize.js.map +0 -1
  26. package/bin/utils/createProjectDirectory.d.ts +0 -3
  27. package/bin/utils/createProjectDirectory.js +0 -16
  28. package/bin/utils/createProjectDirectory.js.map +0 -1
  29. package/bin/utils/getNpmPackages.d.ts +0 -14
  30. package/bin/utils/getNpmPackages.js +0 -147
  31. package/bin/utils/getNpmPackages.js.map +0 -1
  32. package/bin/utils/getQuestions.d.ts +0 -8
  33. package/bin/utils/getQuestions.js +0 -45
  34. package/bin/utils/getQuestions.js.map +0 -1
  35. package/bin/utils/types/PackageManager.d.ts +0 -1
  36. package/bin/utils/types/PackageManager.js +0 -3
  37. package/bin/utils/types/PackageManager.js.map +0 -1
  38. package/bin/utils/types/ProjectOption.d.ts +0 -4
  39. package/bin/utils/types/ProjectOption.js +0 -3
  40. package/bin/utils/types/ProjectOption.js.map +0 -1
  41. package/src/bases/Connector.ts +0 -80
  42. package/src/bases/Package.ts +0 -75
  43. package/src/bases/Tsconfig.ts +0 -122
  44. package/src/executable/AgenticaStart.ts +0 -305
  45. package/src/index.ts +0 -39
  46. package/src/structures/IAgenticaStart.ts +0 -35
  47. package/src/structures/IAgenticaStartOption.ts +0 -13
  48. package/src/utils/capitalize.ts +0 -7
  49. package/src/utils/createProjectDirectory.ts +0 -14
  50. package/src/utils/getNpmPackages.ts +0 -46
  51. package/src/utils/getQuestions.ts +0 -48
  52. package/src/utils/types/PackageManager.ts +0 -1
  53. package/src/utils/types/ProjectOption.ts +0 -4
@@ -1,325 +0,0 @@
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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- var __importDefault = (this && this.__importDefault) || function (mod) {
45
- return (mod && mod.__esModule) ? mod : { "default": mod };
46
- };
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.AgenticaStart = void 0;
49
- const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard.js"));
50
- const chalk_1 = __importDefault(require("chalk"));
51
- const child_process_1 = __importDefault(require("child_process"));
52
- const promises_1 = __importDefault(require("fs/promises"));
53
- const giget_1 = require("giget");
54
- const inquirer_1 = __importDefault(require("inquirer"));
55
- const path_1 = __importDefault(require("path"));
56
- const typia_1 = __importDefault(require("typia"));
57
- const Connector_1 = require("../bases/Connector");
58
- const Package_1 = require("../bases/Package");
59
- const Tsconfig_1 = require("../bases/Tsconfig");
60
- const createProjectDirectory_1 = require("../utils/createProjectDirectory");
61
- const getNpmPackages_1 = require("../utils/getNpmPackages");
62
- var AgenticaStart;
63
- (function (AgenticaStart) {
64
- /**
65
- * Execute `start` command.
66
- */
67
- function execute(_a) {
68
- return __awaiter(this, arguments, void 0, function* ({ projectName, options, }) {
69
- const projectPath = path_1.default.join(process.cwd(), projectName);
70
- // Check if project already exists
71
- if (yield promises_1.default
72
- .access(path_1.default.join(process.cwd(), projectName))
73
- .then(() => true)
74
- .catch(() => false)) {
75
- console.error(`❌ Project ${chalk_1.default.redBright(projectName)} already exists`);
76
- return;
77
- }
78
- // Get connector package names from npm and sort alphabetically
79
- const availableServices = (yield (0, getNpmPackages_1.getNpmPackages)()).sort((a, b) => a.name.localeCompare(b.name));
80
- const questions = getQuestions({ services: availableServices, options });
81
- const config = Object.assign(Object.assign({}, (yield inquirer_1.default.prompt(questions))), (options.project ? { projectType: options.project } : {}));
82
- const validAnswers = (() => { const _io0 = input => ("nodejs" === input.projectType || "nestjs" === input.projectType || "react" === input.projectType || "standalone" === input.projectType) && (Array.isArray(input.services) && input.services.every(elem => "string" === typeof elem)) && ("npm" === input.packageManager || "yarn" === input.packageManager || "pnpm" === input.packageManager) && "string" === typeof input.openAIKey; const _ao0 = (input, _path, _exceptionable = true) => ("nodejs" === input.projectType || "nestjs" === input.projectType || "react" === input.projectType || "standalone" === input.projectType || __typia_transform__assertGuard._assertGuard(_exceptionable, {
83
- method: "typia.assert",
84
- path: _path + ".projectType",
85
- expected: "(\"nestjs\" | \"nodejs\" | \"react\" | \"standalone\")",
86
- value: input.projectType
87
- }, _errorFactory)) && ((Array.isArray(input.services) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
88
- method: "typia.assert",
89
- path: _path + ".services",
90
- expected: "Array<string>",
91
- value: input.services
92
- }, _errorFactory)) && input.services.every((elem, _index2) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
93
- method: "typia.assert",
94
- path: _path + ".services[" + _index2 + "]",
95
- expected: "string",
96
- value: elem
97
- }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
98
- method: "typia.assert",
99
- path: _path + ".services",
100
- expected: "Array<string>",
101
- value: input.services
102
- }, _errorFactory)) && ("npm" === input.packageManager || "yarn" === input.packageManager || "pnpm" === input.packageManager || __typia_transform__assertGuard._assertGuard(_exceptionable, {
103
- method: "typia.assert",
104
- path: _path + ".packageManager",
105
- expected: "(\"npm\" | \"pnpm\" | \"yarn\")",
106
- value: input.packageManager
107
- }, _errorFactory)) && ("string" === typeof input.openAIKey || __typia_transform__assertGuard._assertGuard(_exceptionable, {
108
- method: "typia.assert",
109
- path: _path + ".openAIKey",
110
- expected: "string",
111
- value: input.openAIKey
112
- }, _errorFactory)); const __is = input => "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => {
113
- if (false === __is(input)) {
114
- _errorFactory = errorFactory;
115
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
116
- method: "typia.assert",
117
- path: _path + "",
118
- expected: "__object",
119
- value: input
120
- }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
121
- method: "typia.assert",
122
- path: _path + "",
123
- expected: "__object",
124
- value: input
125
- }, _errorFactory))(input, "$input", true);
126
- }
127
- return input;
128
- }; })()(config);
129
- const { packageManager, openAIKey, projectType, services } = validAnswers;
130
- yield AgenticaStarter.execute(projectType)({
131
- projectName,
132
- projectPath,
133
- openAIKey,
134
- services,
135
- });
136
- // Run package installation
137
- console.log("📦 Package installation in progress...");
138
- Package_1.Package.installPackage(packageManager)({
139
- projectPath,
140
- services,
141
- });
142
- console.log(`\n🎉 Project ${projectName} created`);
143
- console.log(`\n⚠️ ${chalk_1.default.yellow("Note:")} Please implement constructor values for each controller generated in agent.ts or index.ts`);
144
- });
145
- }
146
- AgenticaStart.execute = execute;
147
- /**
148
- * Get questions for `start` command.
149
- */
150
- const getQuestions = (input) => {
151
- const questions = [
152
- {
153
- type: "list",
154
- name: "packageManager",
155
- message: "Package Manager",
156
- choices: [
157
- "npm",
158
- "pnpm",
159
- {
160
- name: `yarn (berry ${chalk_1.default.blueBright("is not supported")})`,
161
- value: "yarn",
162
- },
163
- ],
164
- },
165
- input.options.project
166
- ? null
167
- : {
168
- type: "list",
169
- name: "projectType",
170
- message: "Project Type",
171
- choices: Object.values(AgenticaStarter.PROJECT).map((project) => ({
172
- name: project.title,
173
- value: project.key,
174
- })),
175
- },
176
- {
177
- type: "checkbox",
178
- name: "services",
179
- message: "Embedded Controllers",
180
- choices: input.services,
181
- },
182
- {
183
- type: "input",
184
- name: "openAIKey",
185
- message: "Please enter your OPENAI_API_KEY:",
186
- },
187
- ];
188
- return questions.filter((question) => question !== null);
189
- };
190
- })(AgenticaStart || (exports.AgenticaStart = AgenticaStart = {}));
191
- /**
192
- * Methods for Agentica start options.
193
- */
194
- var AgenticaStarter;
195
- (function (AgenticaStarter) {
196
- AgenticaStarter.execute = (option) => {
197
- const runner = AgenticaStarter.PROJECT[option].runner;
198
- if (!runner) {
199
- throw new Error(`Not supported project type: ${option}`);
200
- }
201
- return runner;
202
- };
203
- AgenticaStarter.PROJECT = {
204
- standalone: {
205
- title: `Standalone ${chalk_1.default.blueBright("Application")}`,
206
- key: "standalone",
207
- runner: (input) => __awaiter(this, void 0, void 0, function* () {
208
- // Create project directory
209
- (0, createProjectDirectory_1.createProjectDirectory)({ projectPath: input.projectPath });
210
- // Create package.json (without dependencies)
211
- yield Promise.all([
212
- // create package.json
213
- Package_1.Package.create({
214
- projectName: input.projectName,
215
- projectPath: input.projectPath,
216
- }),
217
- // create tsconfig.json
218
- Tsconfig_1.Tsconfig.create({ projectPath: input.projectPath }),
219
- ]);
220
- yield promises_1.default.mkdir(path_1.default.join(input.projectPath, "src"), {
221
- recursive: false,
222
- });
223
- // Create Agentica code
224
- const agenticaCode = Connector_1.Connector.createAll({ services: input.services });
225
- yield writeTypescriptFile({
226
- filePath: path_1.default.join(input.projectPath, "src/agent.ts"),
227
- taskName: "Agentica code",
228
- content: agenticaCode,
229
- });
230
- yield setEnvFiles(input);
231
- }),
232
- },
233
- nodejs: {
234
- title: `NodeJS ${chalk_1.default.blueBright("Agent Server")}`,
235
- key: "nodejs",
236
- runner: (input) => __awaiter(this, void 0, void 0, function* () {
237
- return nonStandalone("nodejs")(input)(() => __awaiter(this, void 0, void 0, function* () {
238
- // Modify index.ts: replace import and controller code
239
- const indexFilePath = path_1.default.join(input.projectPath, "src/index.ts");
240
- const indexFileContent = yield promises_1.default
241
- .readFile(indexFilePath, "utf-8")
242
- .then((content) => {
243
- if (input.services.length !== 0) {
244
- return content
245
- .replace(/import { BbsArticleService }.*;\n/g, "")
246
- .replace(/controllers:\s*\[[\s\S]*?\],\n/, "controllers: [/// INSERT CONTROLLER HERE],\n");
247
- }
248
- return content;
249
- });
250
- return { indexFilePath, indexFileContent };
251
- }));
252
- }),
253
- },
254
- nestjs: {
255
- title: `NestJS ${chalk_1.default.blueBright("Agent Server")}`,
256
- key: "nestjs",
257
- runner: (input) => __awaiter(this, void 0, void 0, function* () {
258
- return nonStandalone("nestjs")(input)(() => __awaiter(this, void 0, void 0, function* () {
259
- const indexFilePath = path_1.default.join(input.projectPath, "src/controllers/chat/ChatController.ts");
260
- const indexFileContent = yield promises_1.default.readFile(indexFilePath, "utf-8");
261
- return { indexFilePath, indexFileContent };
262
- }));
263
- }),
264
- },
265
- react: {
266
- title: `React ${chalk_1.default.blueBright("Client Application")} (Currently not supported)`,
267
- key: "react",
268
- runner: undefined,
269
- },
270
- };
271
- const nonStandalone = (option) => (input) => (getIndexFileInfo) => __awaiter(this, void 0, void 0, function* () {
272
- yield AgenticaStarter.writeTemplate(option, input.projectName);
273
- // Create Agentica code
274
- const importCode = Connector_1.Connector.create("import")({
275
- services: input.services,
276
- });
277
- const connectorCode = Connector_1.Connector.create("connector")({
278
- services: input.services,
279
- });
280
- const { indexFilePath, indexFileContent } = yield getIndexFileInfo();
281
- // Insert importCode and connectorCode
282
- const agenticaCode = indexFileContent
283
- .replace("/// INSERT IMPORT HERE", importCode)
284
- .replace("/// INSERT CONTROLLER HERE", connectorCode);
285
- yield writeTypescriptFile({
286
- filePath: indexFilePath,
287
- taskName: "Agentica code",
288
- content: agenticaCode,
289
- });
290
- yield setEnvFiles(input);
291
- });
292
- const writeTypescriptFile = (props) => __awaiter(this, void 0, void 0, function* () {
293
- /** prettier is not in the dependencies */
294
- const formattedFileContent = yield Promise.resolve().then(() => __importStar(require("prettier"))).then((prettier) => prettier.format(props.content, {
295
- parser: "typescript",
296
- }))
297
- .catch(() => props.content);
298
- yield promises_1.default.writeFile(props.filePath, formattedFileContent);
299
- console.log(`✅ ${props.taskName} created`);
300
- });
301
- /**
302
- * Set project .env files
303
- */
304
- const setEnvFiles = (input) => __awaiter(this, void 0, void 0, function* () {
305
- // Create .env file
306
- const envContent = `OPENAI_API_KEY=${input.openAIKey}\n`;
307
- yield promises_1.default.writeFile(path_1.default.join(input.projectPath, ".env"), envContent);
308
- console.log("✅ .env created");
309
- });
310
- /**
311
- * Git Clone from template repository.
312
- */
313
- AgenticaStarter.writeTemplate = (type, directory) => __awaiter(this, void 0, void 0, function* () {
314
- // COPY PROJECTS
315
- yield (0, giget_1.downloadTemplate)(`github:wrtnlabs/agentica.template.${type}`, {
316
- dir: directory,
317
- });
318
- process.chdir(directory);
319
- console.log("✅ Template downloaded");
320
- // REMOVE .GIT DIRECTORY
321
- child_process_1.default.execSync("npx rimraf .git");
322
- child_process_1.default.execSync("npx rimraf .github/dependabot.yml");
323
- });
324
- })(AgenticaStarter || (AgenticaStarter = {}));
325
- //# sourceMappingURL=AgenticaStart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgenticaStart.js","sourceRoot":"","sources":["../../src/executable/AgenticaStart.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,kEAA+B;AAC/B,2DAA6B;AAC7B,iCAAyC;AACzC,wDAAwD;AACxD,gDAAwB;AACxB,kDAA0B;AAE1B,kDAA+C;AAC/C,8CAA2C;AAC3C,gDAA6C;AAG7C,4EAAyE;AACzE,4DAAyD;AAIzD,IAAiB,aAAa,CA8G7B;AA9GD,WAAiB,aAAa;IAC5B;;OAEG;IACH,SAAsB,OAAO;6DAAC,EAC5B,WAAW,EACX,OAAO,GACsB;YAC7B,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAAC,OA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AqC,IAAI,EAAE,EAAE;YAClE,GAAG,EAAE,SAAS;SACf,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEzB,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QAErC,wBAAwB;QACxB,uBAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QAC/B,uBAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC,CAAC;IACnD,CAAC,CAAA,CAAC;AACJ,CAAC,EA3KS,eAAe,KAAf,eAAe,QA2KxB"}
package/bin/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/bin/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAA0B;AAC1B,yCAAoC;AAEpC,8DAA2D;AAG3D,SAAe,IAAI;;QACjB,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;QAE9B,OAAO;aACJ,OAAO,CAAC,mBAAmB,CAAC;aAC5B,WAAW,CAAC,qBAAqB,CAAC;aAClC,MAAM,CACL,gDAAgD,EAChD,kBAAkB,CACnB;aACA,MAAM,CAAC,CAAO,SAAiB,EAAE,OAAgC,EAAE,EAAE;YACpE,IAAK,OAAO,CAAC,OAAe,KAAK,IAAI,EAAE,CAAC;gBACtC,OAAO,CAAC,KAAK,CACX,oBAAoB,eAAK,CAAC,SAAS,CAAC,WAAW,CAAC,cAAc,CAC/D,CAAC;gBACF,OAAO;YACT,CAAC;YAED,6BAAa,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;QAC7D,CAAC,CAAA,CAAC,CAAC;QAEL,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,SAAS,UAAU,IAAI,eAAK,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAEhD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC,CAAC,CAAC"}
@@ -1,31 +0,0 @@
1
- import { ProjectOptionValue } from "../utils/types/ProjectOption";
2
- /**
3
- * Types about `npx agentica start` command.
4
- *
5
- * @author Michael
6
- */
7
- export declare namespace IAgenticaStart {
8
- /**
9
- * Options for `npx agentica start` command.
10
- */
11
- type IOptions = Partial<{
12
- project: ProjectOptionValue;
13
- }>;
14
- /**
15
- * Parameters for execute `npx agentica start` command.
16
- */
17
- interface IExecuteInput {
18
- projectName: string;
19
- options: IOptions;
20
- }
21
- /**
22
- * Input for `getQuestions` function.
23
- */
24
- interface IGetQuestionsInput {
25
- services: {
26
- name: string;
27
- value: string;
28
- }[];
29
- options: IOptions;
30
- }
31
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IAgenticaStart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAgenticaStart.js","sourceRoot":"","sources":["../../src/structures/IAgenticaStart.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- /**
2
- * Types about options for `npx agentica start` command.
3
- *
4
- * @author Michael
5
- */
6
- export declare namespace IAgenticaStartOption {
7
- interface IProject {
8
- projectName: string;
9
- projectPath: string;
10
- openAIKey: string;
11
- services: string[];
12
- }
13
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IAgenticaStartOption.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAgenticaStartOption.js","sourceRoot":"","sources":["../../src/structures/IAgenticaStartOption.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export declare const capitalize: (service: string) => string;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.capitalize = void 0;
4
- // Convert first letter to uppercase (ex: aws-s3 -> AwsS3)
5
- const capitalize = (service) => {
6
- return service
7
- .split("-")
8
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
9
- .join("");
10
- };
11
- exports.capitalize = capitalize;
12
- //# sourceMappingURL=capitalize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capitalize.js","sourceRoot":"","sources":["../../src/utils/capitalize.ts"],"names":[],"mappings":";;;AAAA,0DAA0D;AACnD,MAAM,UAAU,GAAG,CAAC,OAAe,EAAU,EAAE;IACpD,OAAO,OAAO;SACX,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC3D,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC,CAAC;AALW,QAAA,UAAU,cAKrB"}
@@ -1,3 +0,0 @@
1
- export declare const createProjectDirectory: (input: {
2
- projectPath: string;
3
- }) => void;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createProjectDirectory = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- const path_1 = __importDefault(require("path"));
9
- const createProjectDirectory = (input) => {
10
- if (fs_1.default.existsSync(input.projectPath)) {
11
- throw new Error(`${path_1.default.basename(input.projectPath)} directory already exists.`);
12
- }
13
- fs_1.default.mkdirSync(input.projectPath);
14
- };
15
- exports.createProjectDirectory = createProjectDirectory;
16
- //# sourceMappingURL=createProjectDirectory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createProjectDirectory.js","sourceRoot":"","sources":["../../src/utils/createProjectDirectory.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAEjB,MAAM,sBAAsB,GAAG,CAAC,KAEtC,EAAQ,EAAE;IACT,IAAI,YAAE,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CACb,GAAG,cAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,CAChE,CAAC;IACJ,CAAC;IAED,YAAE,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAClC,CAAC,CAAC;AAVW,QAAA,sBAAsB,0BAUjC"}
@@ -1,14 +0,0 @@
1
- import { tags } from "typia";
2
- export interface INpmPackages {
3
- objects: {
4
- package: {
5
- name: string;
6
- };
7
- }[];
8
- total: number;
9
- time: string & tags.Format<"date-time">;
10
- }
11
- export declare const getNpmPackages: () => Promise<{
12
- name: string;
13
- value: string;
14
- }[]>;
@@ -1,147 +0,0 @@
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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- var __importDefault = (this && this.__importDefault) || function (mod) {
45
- return (mod && mod.__esModule) ? mod : { "default": mod };
46
- };
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.getNpmPackages = void 0;
49
- const __typia_transform__isFormatDateTime = __importStar(require("typia/lib/internal/_isFormatDateTime.js"));
50
- const __typia_transform__assertGuard = __importStar(require("typia/lib/internal/_assertGuard.js"));
51
- const typia_1 = __importDefault(require("typia"));
52
- const getNpmPackages = () => __awaiter(void 0, void 0, void 0, function* () {
53
- try {
54
- const response = yield fetch("https://registry.npmjs.org/-/v1/search?text=scope:@wrtnlabs&size=10000");
55
- const responseJson = (yield response.json());
56
- const data = (() => { const _io0 = input => Array.isArray(input.objects) && input.objects.every(elem => "object" === typeof elem && null !== elem && _io1(elem)) && "number" === typeof input.total && ("string" === typeof input.time && __typia_transform__isFormatDateTime._isFormatDateTime(input.time)); const _io1 = input => "object" === typeof input["package"] && null !== input["package"] && _io2(input["package"]); const _io2 = input => "string" === typeof input.name; const _ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.objects) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
57
- method: "typia.assert",
58
- path: _path + ".objects",
59
- expected: "Array<__type>",
60
- value: input.objects
61
- }, _errorFactory)) && input.objects.every((elem, _index2) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
62
- method: "typia.assert",
63
- path: _path + ".objects[" + _index2 + "]",
64
- expected: "__type",
65
- value: elem
66
- }, _errorFactory)) && _ao1(elem, _path + ".objects[" + _index2 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
67
- method: "typia.assert",
68
- path: _path + ".objects[" + _index2 + "]",
69
- expected: "__type",
70
- value: elem
71
- }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
72
- method: "typia.assert",
73
- path: _path + ".objects",
74
- expected: "Array<__type>",
75
- value: input.objects
76
- }, _errorFactory)) && ("number" === typeof input.total || __typia_transform__assertGuard._assertGuard(_exceptionable, {
77
- method: "typia.assert",
78
- path: _path + ".total",
79
- expected: "number",
80
- value: input.total
81
- }, _errorFactory)) && ("string" === typeof input.time && (__typia_transform__isFormatDateTime._isFormatDateTime(input.time) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
82
- method: "typia.assert",
83
- path: _path + ".time",
84
- expected: "string & Format<\"date-time\">",
85
- value: input.time
86
- }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
87
- method: "typia.assert",
88
- path: _path + ".time",
89
- expected: "(string & Format<\"date-time\">)",
90
- value: input.time
91
- }, _errorFactory)); const _ao1 = (input, _path, _exceptionable = true) => ("object" === typeof input["package"] && null !== input["package"] || __typia_transform__assertGuard._assertGuard(_exceptionable, {
92
- method: "typia.assert",
93
- path: _path + "[\"package\"]",
94
- expected: "__type.o1",
95
- value: input["package"]
96
- }, _errorFactory)) && _ao2(input["package"], _path + "[\"package\"]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
97
- method: "typia.assert",
98
- path: _path + "[\"package\"]",
99
- expected: "__type.o1",
100
- value: input["package"]
101
- }, _errorFactory); const _ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
102
- method: "typia.assert",
103
- path: _path + ".name",
104
- expected: "string",
105
- value: input.name
106
- }, _errorFactory); const __is = input => "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => {
107
- if (false === __is(input)) {
108
- _errorFactory = errorFactory;
109
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
110
- method: "typia.assert",
111
- path: _path + "",
112
- expected: "INpmPackages",
113
- value: input
114
- }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
115
- method: "typia.assert",
116
- path: _path + "",
117
- expected: "INpmPackages",
118
- value: input
119
- }, _errorFactory))(input, "$input", true);
120
- }
121
- return input;
122
- }; })()(responseJson);
123
- return data.objects
124
- .map((pkg) => pkg.package.name)
125
- .filter((name) => {
126
- // shared is not connector package. This is connector util package.
127
- if (name === "@wrtnlabs/connector-shared") {
128
- return false;
129
- }
130
- const regex = /^@wrtnlabs\/connector-(?:[a-z0-9-]+)+$/;
131
- return regex.test(name);
132
- })
133
- .map((name) => {
134
- const serviceName = name.replace("@wrtnlabs/connector-", "");
135
- return {
136
- name: serviceName.replace("-", " ").toUpperCase(),
137
- value: serviceName,
138
- };
139
- });
140
- }
141
- catch (error) {
142
- console.error("Error occurred while fetching package list:", error);
143
- return [];
144
- }
145
- });
146
- exports.getNpmPackages = getNpmPackages;
147
- //# sourceMappingURL=getNpmPackages.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getNpmPackages.js","sourceRoot":"","sources":["../../src/utils/getNpmPackages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Ac,kBAiCzB"}
@@ -1,8 +0,0 @@
1
- import { QuestionCollection } from "inquirer";
2
- export interface GetQuestionsInput {
3
- services: {
4
- name: string;
5
- value: string;
6
- }[];
7
- }
8
- export declare const getQuestions: (input: GetQuestionsInput) => QuestionCollection[];