agentica 0.12.7 → 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 -324
  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 -302
  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,324 +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 prettier_1 = __importDefault(require("prettier"));
57
- const typia_1 = __importDefault(require("typia"));
58
- const Connector_1 = require("../bases/Connector");
59
- const Package_1 = require("../bases/Package");
60
- const Tsconfig_1 = require("../bases/Tsconfig");
61
- const createProjectDirectory_1 = require("../utils/createProjectDirectory");
62
- const getNpmPackages_1 = require("../utils/getNpmPackages");
63
- var AgenticaStart;
64
- (function (AgenticaStart) {
65
- /**
66
- * Execute `start` command.
67
- */
68
- function execute(_a) {
69
- return __awaiter(this, arguments, void 0, function* ({ projectName, options, }) {
70
- const projectPath = path_1.default.join(process.cwd(), projectName);
71
- // Check if project already exists
72
- if (yield promises_1.default
73
- .access(path_1.default.join(process.cwd(), projectName))
74
- .then(() => true)
75
- .catch(() => false)) {
76
- console.error(`❌ Project ${chalk_1.default.redBright(projectName)} already exists`);
77
- return;
78
- }
79
- // Get connector package names from npm and sort alphabetically
80
- const availableServices = (yield (0, getNpmPackages_1.getNpmPackages)()).sort((a, b) => a.name.localeCompare(b.name));
81
- const questions = getQuestions({ services: availableServices, options });
82
- const config = Object.assign(Object.assign({}, (yield inquirer_1.default.prompt(questions))), (options.project ? { projectType: options.project } : {}));
83
- 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, {
84
- method: "typia.assert",
85
- path: _path + ".projectType",
86
- expected: "(\"nestjs\" | \"nodejs\" | \"react\" | \"standalone\")",
87
- value: input.projectType
88
- }, _errorFactory)) && ((Array.isArray(input.services) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
89
- method: "typia.assert",
90
- path: _path + ".services",
91
- expected: "Array<string>",
92
- value: input.services
93
- }, _errorFactory)) && input.services.every((elem, _index2) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
94
- method: "typia.assert",
95
- path: _path + ".services[" + _index2 + "]",
96
- expected: "string",
97
- value: elem
98
- }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
99
- method: "typia.assert",
100
- path: _path + ".services",
101
- expected: "Array<string>",
102
- value: input.services
103
- }, _errorFactory)) && ("npm" === input.packageManager || "yarn" === input.packageManager || "pnpm" === input.packageManager || __typia_transform__assertGuard._assertGuard(_exceptionable, {
104
- method: "typia.assert",
105
- path: _path + ".packageManager",
106
- expected: "(\"npm\" | \"pnpm\" | \"yarn\")",
107
- value: input.packageManager
108
- }, _errorFactory)) && ("string" === typeof input.openAIKey || __typia_transform__assertGuard._assertGuard(_exceptionable, {
109
- method: "typia.assert",
110
- path: _path + ".openAIKey",
111
- expected: "string",
112
- value: input.openAIKey
113
- }, _errorFactory)); const __is = input => "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => {
114
- if (false === __is(input)) {
115
- _errorFactory = errorFactory;
116
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
117
- method: "typia.assert",
118
- path: _path + "",
119
- expected: "__object",
120
- value: input
121
- }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
122
- method: "typia.assert",
123
- path: _path + "",
124
- expected: "__object",
125
- value: input
126
- }, _errorFactory))(input, "$input", true);
127
- }
128
- return input;
129
- }; })()(config);
130
- const { packageManager, openAIKey, projectType, services } = validAnswers;
131
- yield AgenticaStarter.execute(projectType)({
132
- projectName,
133
- projectPath,
134
- openAIKey,
135
- services,
136
- });
137
- // Run package installation
138
- console.log("📦 Package installation in progress...");
139
- Package_1.Package.installPackage(packageManager)({
140
- projectPath,
141
- services,
142
- });
143
- console.log(`\n🎉 Project ${projectName} created`);
144
- console.log(`\n⚠️ ${chalk_1.default.yellow("Note:")} Please implement constructor values for each controller generated in agent.ts or index.ts`);
145
- });
146
- }
147
- AgenticaStart.execute = execute;
148
- /**
149
- * Get questions for `start` command.
150
- */
151
- const getQuestions = (input) => {
152
- const questions = [
153
- {
154
- type: "list",
155
- name: "packageManager",
156
- message: "Package Manager",
157
- choices: [
158
- "npm",
159
- "pnpm",
160
- {
161
- name: `yarn (berry ${chalk_1.default.blueBright("is not supported")})`,
162
- value: "yarn",
163
- },
164
- ],
165
- },
166
- input.options.project
167
- ? null
168
- : {
169
- type: "list",
170
- name: "projectType",
171
- message: "Project Type",
172
- choices: Object.values(AgenticaStarter.PROJECT).map((project) => ({
173
- name: project.title,
174
- value: project.key,
175
- })),
176
- },
177
- {
178
- type: "checkbox",
179
- name: "services",
180
- message: "Embedded Controllers",
181
- choices: input.services,
182
- },
183
- {
184
- type: "input",
185
- name: "openAIKey",
186
- message: "Please enter your OPENAI_API_KEY:",
187
- },
188
- ];
189
- return questions.filter((question) => question !== null);
190
- };
191
- })(AgenticaStart || (exports.AgenticaStart = AgenticaStart = {}));
192
- /**
193
- * Methods for Agentica start options.
194
- */
195
- var AgenticaStarter;
196
- (function (AgenticaStarter) {
197
- AgenticaStarter.execute = (option) => {
198
- const runner = AgenticaStarter.PROJECT[option].runner;
199
- if (!runner) {
200
- throw new Error(`Not supported project type: ${option}`);
201
- }
202
- return runner;
203
- };
204
- AgenticaStarter.PROJECT = {
205
- standalone: {
206
- title: `Standalone ${chalk_1.default.blueBright("Application")}`,
207
- key: "standalone",
208
- runner: (input) => __awaiter(this, void 0, void 0, function* () {
209
- // Create project directory
210
- (0, createProjectDirectory_1.createProjectDirectory)({ projectPath: input.projectPath });
211
- // Create package.json (without dependencies)
212
- yield Promise.all([
213
- // create package.json
214
- Package_1.Package.create({
215
- projectName: input.projectName,
216
- projectPath: input.projectPath,
217
- }),
218
- // create tsconfig.json
219
- Tsconfig_1.Tsconfig.create({ projectPath: input.projectPath }),
220
- ]);
221
- yield promises_1.default.mkdir(path_1.default.join(input.projectPath, "src"), {
222
- recursive: false,
223
- });
224
- // Create Agentica code
225
- const agenticaCode = Connector_1.Connector.createAll({ services: input.services });
226
- yield writeTypescriptFile({
227
- filePath: path_1.default.join(input.projectPath, "src/agent.ts"),
228
- taskName: "Agentica code",
229
- content: agenticaCode,
230
- });
231
- yield setEnvFiles(input);
232
- }),
233
- },
234
- nodejs: {
235
- title: `NodeJS ${chalk_1.default.blueBright("Agent Server")}`,
236
- key: "nodejs",
237
- runner: (input) => __awaiter(this, void 0, void 0, function* () {
238
- return nonStandalone("nodejs")(input)(() => __awaiter(this, void 0, void 0, function* () {
239
- // Modify index.ts: replace import and controller code
240
- const indexFilePath = path_1.default.join(input.projectPath, "src/index.ts");
241
- const indexFileContent = yield promises_1.default
242
- .readFile(indexFilePath, "utf-8")
243
- .then((content) => {
244
- if (input.services.length !== 0) {
245
- return content
246
- .replace(/import { BbsArticleService }.*;\n/g, "")
247
- .replace(/controllers:\s*\[[\s\S]*?\],\n/, "controllers: [/// INSERT CONTROLLER HERE],\n");
248
- }
249
- return content;
250
- });
251
- return { indexFilePath, indexFileContent };
252
- }));
253
- }),
254
- },
255
- nestjs: {
256
- title: `NestJS ${chalk_1.default.blueBright("Agent Server")}`,
257
- key: "nestjs",
258
- runner: (input) => __awaiter(this, void 0, void 0, function* () {
259
- return nonStandalone("nestjs")(input)(() => __awaiter(this, void 0, void 0, function* () {
260
- const indexFilePath = path_1.default.join(input.projectPath, "src/controllers/chat/ChatController.ts");
261
- const indexFileContent = yield promises_1.default.readFile(indexFilePath, "utf-8");
262
- return { indexFilePath, indexFileContent };
263
- }));
264
- }),
265
- },
266
- react: {
267
- title: `React ${chalk_1.default.blueBright("Client Application")} (Currently not supported)`,
268
- key: "react",
269
- runner: undefined,
270
- },
271
- };
272
- const nonStandalone = (option) => (input) => (getIndexFileInfo) => __awaiter(this, void 0, void 0, function* () {
273
- yield AgenticaStarter.writeTemplate(option, input.projectName);
274
- // Create Agentica code
275
- const importCode = Connector_1.Connector.create("import")({
276
- services: input.services,
277
- });
278
- const connectorCode = Connector_1.Connector.create("connector")({
279
- services: input.services,
280
- });
281
- const { indexFilePath, indexFileContent } = yield getIndexFileInfo();
282
- // Insert importCode and connectorCode
283
- const agenticaCode = indexFileContent
284
- .replace("/// INSERT IMPORT HERE", importCode)
285
- .replace("/// INSERT CONTROLLER HERE", connectorCode);
286
- yield writeTypescriptFile({
287
- filePath: indexFilePath,
288
- taskName: "Agentica code",
289
- content: agenticaCode,
290
- });
291
- yield setEnvFiles(input);
292
- });
293
- const writeTypescriptFile = (props) => __awaiter(this, void 0, void 0, function* () {
294
- const formattedFileContent = yield prettier_1.default.format(props.content, {
295
- parser: "typescript",
296
- });
297
- yield promises_1.default.writeFile(props.filePath, formattedFileContent);
298
- console.log(`✅ ${props.taskName} created`);
299
- });
300
- /**
301
- * Set project .env files
302
- */
303
- const setEnvFiles = (input) => __awaiter(this, void 0, void 0, function* () {
304
- // Create .env file
305
- const envContent = `OPENAI_API_KEY=${input.openAIKey}\n`;
306
- yield promises_1.default.writeFile(path_1.default.join(input.projectPath, ".env"), envContent);
307
- console.log("✅ .env created");
308
- });
309
- /**
310
- * Git Clone from template repository.
311
- */
312
- AgenticaStarter.writeTemplate = (type, directory) => __awaiter(this, void 0, void 0, function* () {
313
- // COPY PROJECTS
314
- yield (0, giget_1.downloadTemplate)(`github:wrtnlabs/agentica.template.${type}`, {
315
- dir: directory,
316
- });
317
- process.chdir(directory);
318
- console.log("✅ Template downloaded");
319
- // REMOVE .GIT DIRECTORY
320
- child_process_1.default.execSync("npx rimraf .git");
321
- child_process_1.default.execSync("npx rimraf .github/dependabot.yml");
322
- });
323
- })(AgenticaStarter || (AgenticaStarter = {}));
324
- //# 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,wDAAgC;AAChC,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,OAAO,CAAC,GAAG,EAAE,EAAE,W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AwB;QACxB,uBAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QAC/B,uBAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC,CAAC;IACnD,CAAC,CAAA,CAAC;AACJ,CAAC,EAvKS,eAAe,KAAf,eAAe,QAuKxB"}
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.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAoC;AAY7B,MAAM,cAAc,GAAG,GAE5B,EAAE;IACF,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,wEAAwE,CACzE,CAAC;QACF,MAAM,YAAY,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAiB,CAAC;QAE7D,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAA8B,YAAY,CAAC,CAAC;QAEtD,OAAO,IAAI,CAAC,OAAO;aAChB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;aAC9B,MAAM,CAAC,CAAC,IAAY,EAAE,EAAE;YACvB,mEAAmE;YACnE,IAAI,IAAI,KAAK,4BAA4B,EAAE,CAAC;gBAC1C,OAAO,KAAK,CAAC;YACf,CAAC;YAED,MAAM,KAAK,GAAG,wCAAwC,CAAC;YACvD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC,CAAC;aACD,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE;YACpB,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;YAC7D,OAAO;gBACL,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE;gBACjD,KAAK,EAAE,WAAW;aACnB,CAAC;QACJ,CAAC,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,6CAA6C,EAAE,KAAK,CAAC,CAAC;QACpE,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC,CAAA,CAAC;AAjCW,QAAA,cAAc,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[];