@aigne/platform-helpers 0.1.0 → 0.1.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.
- package/CHANGELOG.md +7 -0
- package/lib/cjs/nodejs/index.browser.d.ts +8 -0
- package/lib/cjs/nodejs/index.browser.js +17 -0
- package/lib/cjs/nodejs/index.d.ts +1 -0
- package/lib/cjs/nodejs/index.js +17 -0
- package/lib/cjs/nodejs/index.node.d.ts +8 -0
- package/lib/cjs/nodejs/index.node.js +27 -0
- package/lib/esm/nodejs/index.browser.d.ts +8 -0
- package/lib/esm/nodejs/index.browser.js +14 -0
- package/lib/esm/nodejs/index.d.ts +1 -0
- package/lib/esm/nodejs/index.js +1 -0
- package/lib/esm/nodejs/index.node.d.ts +8 -0
- package/lib/esm/nodejs/index.node.js +21 -0
- package/package.json +9 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.1](https://github.com/AIGNE-io/aigne-framework/compare/platform-helpers-v0.1.0...platform-helpers-v0.1.1) (2025-05-30)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* respect DEBUG env for logger ([#142](https://github.com/AIGNE-io/aigne-framework/issues/142)) ([f84738a](https://github.com/AIGNE-io/aigne-framework/commit/f84738acb382d9fb4f47253fcf91c92c02200053))
|
9
|
+
|
3
10
|
## [0.1.0](https://github.com/AIGNE-io/aigne-framework/compare/platform-helpers-v0.0.1...platform-helpers-v0.1.0) (2025-05-29)
|
4
11
|
|
5
12
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.nodejs = void 0;
|
4
|
+
exports.nodejs = {
|
5
|
+
customInspect: Symbol("inspect"),
|
6
|
+
isStdoutATTY: false,
|
7
|
+
isStderrATTY: false,
|
8
|
+
get env() {
|
9
|
+
return {};
|
10
|
+
},
|
11
|
+
get fs() {
|
12
|
+
throw new Error("This code must run in a Node.js environment.");
|
13
|
+
},
|
14
|
+
get path() {
|
15
|
+
throw new Error("This code must run in a Node.js environment.");
|
16
|
+
},
|
17
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./index.browser.js";
|
@@ -0,0 +1,17 @@
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./index.browser.js"), exports);
|
@@ -0,0 +1,27 @@
|
|
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.nodejs = void 0;
|
7
|
+
const promises_1 = __importDefault(require("node:fs/promises"));
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
9
|
+
const node_util_1 = require("node:util");
|
10
|
+
exports.nodejs = {
|
11
|
+
customInspect: node_util_1.inspect.custom,
|
12
|
+
get isStdoutATTY() {
|
13
|
+
return process.stdout?.isTTY;
|
14
|
+
},
|
15
|
+
get isStderrATTY() {
|
16
|
+
return process.stderr?.isTTY;
|
17
|
+
},
|
18
|
+
get env() {
|
19
|
+
return process.env;
|
20
|
+
},
|
21
|
+
get fs() {
|
22
|
+
return promises_1.default;
|
23
|
+
},
|
24
|
+
get path() {
|
25
|
+
return node_path_1.default;
|
26
|
+
},
|
27
|
+
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export const nodejs = {
|
2
|
+
customInspect: Symbol("inspect"),
|
3
|
+
isStdoutATTY: false,
|
4
|
+
isStderrATTY: false,
|
5
|
+
get env() {
|
6
|
+
return {};
|
7
|
+
},
|
8
|
+
get fs() {
|
9
|
+
throw new Error("This code must run in a Node.js environment.");
|
10
|
+
},
|
11
|
+
get path() {
|
12
|
+
throw new Error("This code must run in a Node.js environment.");
|
13
|
+
},
|
14
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./index.browser.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./index.browser.js";
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import fs from "node:fs/promises";
|
2
|
+
import path from "node:path";
|
3
|
+
import { inspect } from "node:util";
|
4
|
+
export const nodejs = {
|
5
|
+
customInspect: inspect.custom,
|
6
|
+
get isStdoutATTY() {
|
7
|
+
return process.stdout?.isTTY;
|
8
|
+
},
|
9
|
+
get isStderrATTY() {
|
10
|
+
return process.stderr?.isTTY;
|
11
|
+
},
|
12
|
+
get env() {
|
13
|
+
return process.env;
|
14
|
+
},
|
15
|
+
get fs() {
|
16
|
+
return fs;
|
17
|
+
},
|
18
|
+
get path() {
|
19
|
+
return path;
|
20
|
+
},
|
21
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aigne/platform-helpers",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.1",
|
4
4
|
"description": "AIGNE core library for building AI-powered applications",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -28,6 +28,14 @@
|
|
28
28
|
"import": "./lib/esm/mcp/stdio-client-transport.node.js"
|
29
29
|
},
|
30
30
|
"default": "./lib/esm/mcp/stdio-client-transport.js"
|
31
|
+
},
|
32
|
+
"./nodejs/index.js": {
|
33
|
+
"browser": "./lib/esm/nodejs/index.browser.js",
|
34
|
+
"node": {
|
35
|
+
"require": "./lib/cjs/nodejs/index.node.js",
|
36
|
+
"import": "./lib/esm/nodejs/index.node.js"
|
37
|
+
},
|
38
|
+
"default": "./lib/esm/nodejs/index.js"
|
31
39
|
}
|
32
40
|
},
|
33
41
|
"typesVersions": {
|