lua-cli 3.0.2-alpha.3 → 3.0.2-alpha.4
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.
|
@@ -25,15 +25,12 @@ export default class ProductApi extends HttpClient {
|
|
|
25
25
|
* @throws Error if the request fails or products cannot be retrieved
|
|
26
26
|
*/
|
|
27
27
|
async get(page = 1, limit = 10) {
|
|
28
|
-
console.log("get products", page, limit, this.agentId, this.apiKey);
|
|
29
28
|
const response = await this.httpGet(`/developer/agents/${this.agentId}/products?page=${page}&limit=${limit}`, {
|
|
30
29
|
Authorization: `Bearer ${this.apiKey}`,
|
|
31
30
|
});
|
|
32
|
-
console.log("get products response", response);
|
|
33
31
|
if (response.success) {
|
|
34
32
|
return new ProductPaginationInstance(this, response);
|
|
35
33
|
}
|
|
36
|
-
console.error(response);
|
|
37
34
|
throw new Error(response.error?.message || "Failed to get products");
|
|
38
35
|
}
|
|
39
36
|
/**
|
package/dist/api-exports.d.ts
CHANGED
|
@@ -131,11 +131,11 @@ export declare const Products: {
|
|
|
131
131
|
/**
|
|
132
132
|
* Retrieves products with pagination.
|
|
133
133
|
*
|
|
134
|
-
* @param limit - Items per page
|
|
135
134
|
* @param page - Page number
|
|
135
|
+
* @param limit - Items per page
|
|
136
136
|
* @returns Promise resolving to product list
|
|
137
137
|
*/
|
|
138
|
-
get(
|
|
138
|
+
get(page?: number, limit?: number): Promise<ProductPaginationInstance>;
|
|
139
139
|
/**
|
|
140
140
|
* Creates a new product.
|
|
141
141
|
*
|
package/dist/api-exports.js
CHANGED
|
@@ -157,13 +157,13 @@ export const Products = {
|
|
|
157
157
|
/**
|
|
158
158
|
* Retrieves products with pagination.
|
|
159
159
|
*
|
|
160
|
-
* @param limit - Items per page
|
|
161
160
|
* @param page - Page number
|
|
161
|
+
* @param limit - Items per page
|
|
162
162
|
* @returns Promise resolving to product list
|
|
163
163
|
*/
|
|
164
|
-
async get(
|
|
164
|
+
async get(page, limit) {
|
|
165
165
|
const instance = await getProductsInstance();
|
|
166
|
-
return instance.get(
|
|
166
|
+
return instance.get(page, limit);
|
|
167
167
|
},
|
|
168
168
|
/**
|
|
169
169
|
* Creates a new product.
|
package/dist/index.js
CHANGED
|
@@ -10,16 +10,24 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { Command } from "commander";
|
|
12
12
|
import { setupAuthCommands, setupSkillCommands } from "./cli/command-definitions.js";
|
|
13
|
+
import { readFileSync } from "fs";
|
|
14
|
+
import { fileURLToPath } from "url";
|
|
15
|
+
import { dirname, join } from "path";
|
|
16
|
+
// Get version from package.json
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
+
const __dirname = dirname(__filename);
|
|
19
|
+
const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf8'));
|
|
20
|
+
const CLI_VERSION = packageJson.version;
|
|
13
21
|
// Create the main CLI program
|
|
14
22
|
const program = new Command();
|
|
15
23
|
// Configure program metadata
|
|
16
24
|
program
|
|
17
25
|
.name("lua")
|
|
18
26
|
.description("Lua AI - Build and deploy AI agents with superpowers")
|
|
19
|
-
.version(
|
|
27
|
+
.version(CLI_VERSION)
|
|
20
28
|
.addHelpText('before', `
|
|
21
29
|
------------------------------------------------------------------
|
|
22
|
-
Lua AI CLI
|
|
30
|
+
Lua AI CLI v${CLI_VERSION} - Build and deploy AI agents with superpowers
|
|
23
31
|
------------------------------------------------------------------
|
|
24
32
|
`)
|
|
25
33
|
.addHelpText('after', `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lua-cli",
|
|
3
|
-
"version": "3.0.2-alpha.
|
|
3
|
+
"version": "3.0.2-alpha.4",
|
|
4
4
|
"description": "Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs. Features LuaAgent unified configuration, streaming chat, and batch deployment.",
|
|
5
5
|
"readmeFilename": "README.md",
|
|
6
6
|
"main": "dist/api-exports.js",
|