@bosonprotocol/agentic-commerce 1.0.0-alpha.79 → 1.0.0-alpha.81

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bosonprotocol/agentic-commerce",
3
- "version": "1.0.0-alpha.79",
3
+ "version": "1.0.0-alpha.81",
4
4
  "description": "Agentic commerce tools for Boson and Fermion protocols",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -126,7 +126,8 @@
126
126
  },
127
127
  "files": [
128
128
  "dist/**/*",
129
- "README.md"
129
+ "README.md",
130
+ "scripts/setupDotEnv.ts"
130
131
  ],
131
132
  "volta": {
132
133
  "node": "23.11.1"
@@ -0,0 +1,17 @@
1
+ import fs from "fs";
2
+ import path from "path";
3
+
4
+ const envPath = path.resolve(process.cwd(), ".env");
5
+ const envExamplePath = path.resolve(process.cwd(), ".env.example");
6
+ const envFileExists = fs.existsSync(envPath);
7
+ const envExampleFileExists = fs.existsSync(envExamplePath);
8
+ if (!envFileExists && envExampleFileExists) {
9
+ fs.copyFileSync(envExamplePath, envPath);
10
+ console.log("✅ Created .env file from .env.example");
11
+ } else if (envFileExists) {
12
+ console.log("✅ .env file already exists");
13
+ } else if (!envExampleFileExists) {
14
+ console.warn(
15
+ "⚠️ .env.example file not found. Please create a .env file manually.",
16
+ );
17
+ }