vibebusiness 1.2.43 → 1.2.49
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/.next/standalone/.env +5 -0
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +20 -20
- package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/epics/[id]/ideas/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/epics/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/epics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/goals/[id]/kpis/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/goals/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/hypotheses/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/hypotheses/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/comments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/implement/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[id]/transition/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/implementations/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/kpis/refresh/route.js +1 -1
- package/.next/standalone/.next/server/app/api/kpis/refresh/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js +1 -1
- package/.next/standalone/.next/server/app/api/social/[id]/publish/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/social/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/social/route.js +1 -1
- package/.next/standalone/.next/server/app/api/social/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/goals/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/goals/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/page.js +1 -1
- package/.next/standalone/.next/server/app/hypotheses/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/hypotheses/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/ideas/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page.js +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/page.js +1 -1
- package/.next/standalone/.next/server/app/roadmap/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/roadmap/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/sessions/page.js +1 -1
- package/.next/standalone/.next/server/app/sessions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/social/page.js +1 -1
- package/.next/standalone/.next/server/app/social/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/social.html +1 -1
- package/.next/standalone/.next/server/app/social.rsc +3 -3
- package/.next/standalone/.next/server/app-paths-manifest.json +15 -15
- package/.next/standalone/.next/server/chunks/3644.js +1 -1
- package/.next/standalone/.next/server/chunks/{7809.js → 3794.js} +103 -2
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/data/business-context.json +7 -4
- package/.next/standalone/data/copy/landing-landing-page-2026-02-20.md +1 -1
- package/.next/standalone/data/heartbeat-sessions.json +211 -10
- package/.next/standalone/data/hypotheses.json +2 -2
- package/.next/standalone/data/ideas.json +1113 -449
- package/.next/standalone/data/implementations.json +205 -2
- package/.next/standalone/data/positioning.json +1 -1
- package/.next/standalone/data/reports/visuals/promo-launch.png +0 -0
- package/.next/standalone/data/reports/visuals/promo-ship-fast.png +0 -0
- package/.next/standalone/data/reports/visuals/promo-while-you-slept-v2.png +0 -0
- package/.next/standalone/data/reports/visuals/promo-while-you-slept-v3.png +0 -0
- package/.next/standalone/data/reports/visuals/promo-while-you-slept.png +0 -0
- package/.next/standalone/package.json +6 -3
- package/.next/standalone/scripts/analyze.ts +3 -2
- package/.next/standalone/scripts/implement.ts +5 -5
- package/.next/standalone/scripts/skills/social-media.ts +310 -9
- package/.next/static/chunks/{444-125b7b0fa8cbdb81.js → 444-1826396aef4dab2f.js} +1 -1
- package/.next/static/chunks/app/hypotheses/[id]/{page-65032da79ae146c5.js → page-8999ee91b824d378.js} +1 -1
- package/.next/static/chunks/app/hypotheses/page-6206bce440c44569.js +1 -0
- package/.next/static/chunks/app/ideas/[id]/{page-dc9746061e58eea5.js → page-89e3625db9017166.js} +1 -1
- package/.next/static/chunks/app/{page-fb66ff080390f20a.js → page-8ba52ac74c75461b.js} +1 -1
- package/.next/static/chunks/app/roadmap/[id]/{page-c8c4baf233e0d480.js → page-f437e783039534c4.js} +1 -1
- package/.next/static/chunks/app/roadmap/{page-b15554a207ed2813.js → page-6177b8774b4af79f.js} +1 -1
- package/.next/static/chunks/app/social/{page-6c61fb0c2546313e.js → page-69e480936711ccf2.js} +1 -1
- package/README.md +1 -1
- package/dist/bin/vibebusiness.js +22 -0
- package/dist/scripts/analyze.js +461 -3
- package/dist/scripts/chat.js +10 -2
- package/dist/scripts/generate-idea.js +1 -0
- package/dist/scripts/heartbeat.js +2839 -659
- package/dist/scripts/implement.js +5 -4
- package/dist/scripts/init.js +5 -0
- package/dist/scripts/scan.js +2 -1
- package/package.json +6 -3
- package/templates/commands/setup-posthog.md +116 -0
- package/.next/static/chunks/app/hypotheses/page-8314da4be7c533bd.js +0 -1
- /package/.next/static/{gmC7HigMoMgL5distupdb → zIIaTqrawBK1MmHg37JOr}/_buildManifest.js +0 -0
- /package/.next/static/{gmC7HigMoMgL5distupdb → zIIaTqrawBK1MmHg37JOr}/_ssgManifest.js +0 -0
package/dist/scripts/analyze.js
CHANGED
|
@@ -6,6 +6,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
};
|
|
9
12
|
var __copyProps = (to, from, except, desc) => {
|
|
10
13
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
14
|
for (let key of __getOwnPropNames(from))
|
|
@@ -23,6 +26,460 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
26
|
mod
|
|
24
27
|
));
|
|
25
28
|
|
|
29
|
+
// node_modules/dotenv/package.json
|
|
30
|
+
var require_package = __commonJS({
|
|
31
|
+
"node_modules/dotenv/package.json"(exports2, module2) {
|
|
32
|
+
module2.exports = {
|
|
33
|
+
name: "dotenv",
|
|
34
|
+
version: "17.3.1",
|
|
35
|
+
description: "Loads environment variables from .env file",
|
|
36
|
+
main: "lib/main.js",
|
|
37
|
+
types: "lib/main.d.ts",
|
|
38
|
+
exports: {
|
|
39
|
+
".": {
|
|
40
|
+
types: "./lib/main.d.ts",
|
|
41
|
+
require: "./lib/main.js",
|
|
42
|
+
default: "./lib/main.js"
|
|
43
|
+
},
|
|
44
|
+
"./config": "./config.js",
|
|
45
|
+
"./config.js": "./config.js",
|
|
46
|
+
"./lib/env-options": "./lib/env-options.js",
|
|
47
|
+
"./lib/env-options.js": "./lib/env-options.js",
|
|
48
|
+
"./lib/cli-options": "./lib/cli-options.js",
|
|
49
|
+
"./lib/cli-options.js": "./lib/cli-options.js",
|
|
50
|
+
"./package.json": "./package.json"
|
|
51
|
+
},
|
|
52
|
+
scripts: {
|
|
53
|
+
"dts-check": "tsc --project tests/types/tsconfig.json",
|
|
54
|
+
lint: "standard",
|
|
55
|
+
pretest: "npm run lint && npm run dts-check",
|
|
56
|
+
test: "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
57
|
+
"test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
|
58
|
+
prerelease: "npm test",
|
|
59
|
+
release: "standard-version"
|
|
60
|
+
},
|
|
61
|
+
repository: {
|
|
62
|
+
type: "git",
|
|
63
|
+
url: "git://github.com/motdotla/dotenv.git"
|
|
64
|
+
},
|
|
65
|
+
homepage: "https://github.com/motdotla/dotenv#readme",
|
|
66
|
+
funding: "https://dotenvx.com",
|
|
67
|
+
keywords: [
|
|
68
|
+
"dotenv",
|
|
69
|
+
"env",
|
|
70
|
+
".env",
|
|
71
|
+
"environment",
|
|
72
|
+
"variables",
|
|
73
|
+
"config",
|
|
74
|
+
"settings"
|
|
75
|
+
],
|
|
76
|
+
readmeFilename: "README.md",
|
|
77
|
+
license: "BSD-2-Clause",
|
|
78
|
+
devDependencies: {
|
|
79
|
+
"@types/node": "^18.11.3",
|
|
80
|
+
decache: "^4.6.2",
|
|
81
|
+
sinon: "^14.0.1",
|
|
82
|
+
standard: "^17.0.0",
|
|
83
|
+
"standard-version": "^9.5.0",
|
|
84
|
+
tap: "^19.2.0",
|
|
85
|
+
typescript: "^4.8.4"
|
|
86
|
+
},
|
|
87
|
+
engines: {
|
|
88
|
+
node: ">=12"
|
|
89
|
+
},
|
|
90
|
+
browser: {
|
|
91
|
+
fs: false
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// node_modules/dotenv/lib/main.js
|
|
98
|
+
var require_main = __commonJS({
|
|
99
|
+
"node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
100
|
+
"use strict";
|
|
101
|
+
var fs4 = require("fs");
|
|
102
|
+
var path3 = require("path");
|
|
103
|
+
var os = require("os");
|
|
104
|
+
var crypto3 = require("crypto");
|
|
105
|
+
var packageJson = require_package();
|
|
106
|
+
var version = packageJson.version;
|
|
107
|
+
var TIPS = [
|
|
108
|
+
"\u{1F510} encrypt with Dotenvx: https://dotenvx.com",
|
|
109
|
+
"\u{1F510} prevent committing .env to code: https://dotenvx.com/precommit",
|
|
110
|
+
"\u{1F510} prevent building .env in docker: https://dotenvx.com/prebuild",
|
|
111
|
+
"\u{1F916} agentic secret storage: https://dotenvx.com/as2",
|
|
112
|
+
"\u26A1\uFE0F secrets for agents: https://dotenvx.com/as2",
|
|
113
|
+
"\u{1F6E1}\uFE0F auth for agents: https://vestauth.com",
|
|
114
|
+
"\u{1F6E0}\uFE0F run anywhere with `dotenvx run -- yourcommand`",
|
|
115
|
+
"\u2699\uFE0F specify custom .env file path with { path: '/custom/path/.env' }",
|
|
116
|
+
"\u2699\uFE0F enable debug logging with { debug: true }",
|
|
117
|
+
"\u2699\uFE0F override existing env vars with { override: true }",
|
|
118
|
+
"\u2699\uFE0F suppress all logs with { quiet: true }",
|
|
119
|
+
"\u2699\uFE0F write to custom object with { processEnv: myObject }",
|
|
120
|
+
"\u2699\uFE0F load multiple .env files with { path: ['.env.local', '.env'] }"
|
|
121
|
+
];
|
|
122
|
+
function _getRandomTip() {
|
|
123
|
+
return TIPS[Math.floor(Math.random() * TIPS.length)];
|
|
124
|
+
}
|
|
125
|
+
function parseBoolean(value) {
|
|
126
|
+
if (typeof value === "string") {
|
|
127
|
+
return !["false", "0", "no", "off", ""].includes(value.toLowerCase());
|
|
128
|
+
}
|
|
129
|
+
return Boolean(value);
|
|
130
|
+
}
|
|
131
|
+
function supportsAnsi() {
|
|
132
|
+
return process.stdout.isTTY;
|
|
133
|
+
}
|
|
134
|
+
function dim(text) {
|
|
135
|
+
return supportsAnsi() ? `\x1B[2m${text}\x1B[0m` : text;
|
|
136
|
+
}
|
|
137
|
+
var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
138
|
+
function parse(src) {
|
|
139
|
+
const obj = {};
|
|
140
|
+
let lines = src.toString();
|
|
141
|
+
lines = lines.replace(/\r\n?/mg, "\n");
|
|
142
|
+
let match;
|
|
143
|
+
while ((match = LINE.exec(lines)) != null) {
|
|
144
|
+
const key = match[1];
|
|
145
|
+
let value = match[2] || "";
|
|
146
|
+
value = value.trim();
|
|
147
|
+
const maybeQuote = value[0];
|
|
148
|
+
value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2");
|
|
149
|
+
if (maybeQuote === '"') {
|
|
150
|
+
value = value.replace(/\\n/g, "\n");
|
|
151
|
+
value = value.replace(/\\r/g, "\r");
|
|
152
|
+
}
|
|
153
|
+
obj[key] = value;
|
|
154
|
+
}
|
|
155
|
+
return obj;
|
|
156
|
+
}
|
|
157
|
+
function _parseVault(options) {
|
|
158
|
+
options = options || {};
|
|
159
|
+
const vaultPath = _vaultPath(options);
|
|
160
|
+
options.path = vaultPath;
|
|
161
|
+
const result = DotenvModule.configDotenv(options);
|
|
162
|
+
if (!result.parsed) {
|
|
163
|
+
const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
|
|
164
|
+
err.code = "MISSING_DATA";
|
|
165
|
+
throw err;
|
|
166
|
+
}
|
|
167
|
+
const keys = _dotenvKey(options).split(",");
|
|
168
|
+
const length = keys.length;
|
|
169
|
+
let decrypted;
|
|
170
|
+
for (let i = 0; i < length; i++) {
|
|
171
|
+
try {
|
|
172
|
+
const key = keys[i].trim();
|
|
173
|
+
const attrs = _instructions(result, key);
|
|
174
|
+
decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
|
|
175
|
+
break;
|
|
176
|
+
} catch (error) {
|
|
177
|
+
if (i + 1 >= length) {
|
|
178
|
+
throw error;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return DotenvModule.parse(decrypted);
|
|
183
|
+
}
|
|
184
|
+
function _warn(message) {
|
|
185
|
+
console.error(`[dotenv@${version}][WARN] ${message}`);
|
|
186
|
+
}
|
|
187
|
+
function _debug(message) {
|
|
188
|
+
console.log(`[dotenv@${version}][DEBUG] ${message}`);
|
|
189
|
+
}
|
|
190
|
+
function _log(message) {
|
|
191
|
+
console.log(`[dotenv@${version}] ${message}`);
|
|
192
|
+
}
|
|
193
|
+
function _dotenvKey(options) {
|
|
194
|
+
if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
|
|
195
|
+
return options.DOTENV_KEY;
|
|
196
|
+
}
|
|
197
|
+
if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {
|
|
198
|
+
return process.env.DOTENV_KEY;
|
|
199
|
+
}
|
|
200
|
+
return "";
|
|
201
|
+
}
|
|
202
|
+
function _instructions(result, dotenvKey) {
|
|
203
|
+
let uri;
|
|
204
|
+
try {
|
|
205
|
+
uri = new URL(dotenvKey);
|
|
206
|
+
} catch (error) {
|
|
207
|
+
if (error.code === "ERR_INVALID_URL") {
|
|
208
|
+
const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
|
|
209
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
210
|
+
throw err;
|
|
211
|
+
}
|
|
212
|
+
throw error;
|
|
213
|
+
}
|
|
214
|
+
const key = uri.password;
|
|
215
|
+
if (!key) {
|
|
216
|
+
const err = new Error("INVALID_DOTENV_KEY: Missing key part");
|
|
217
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
218
|
+
throw err;
|
|
219
|
+
}
|
|
220
|
+
const environment = uri.searchParams.get("environment");
|
|
221
|
+
if (!environment) {
|
|
222
|
+
const err = new Error("INVALID_DOTENV_KEY: Missing environment part");
|
|
223
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
224
|
+
throw err;
|
|
225
|
+
}
|
|
226
|
+
const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
|
|
227
|
+
const ciphertext = result.parsed[environmentKey];
|
|
228
|
+
if (!ciphertext) {
|
|
229
|
+
const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
|
|
230
|
+
err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
|
|
231
|
+
throw err;
|
|
232
|
+
}
|
|
233
|
+
return { ciphertext, key };
|
|
234
|
+
}
|
|
235
|
+
function _vaultPath(options) {
|
|
236
|
+
let possibleVaultPath = null;
|
|
237
|
+
if (options && options.path && options.path.length > 0) {
|
|
238
|
+
if (Array.isArray(options.path)) {
|
|
239
|
+
for (const filepath of options.path) {
|
|
240
|
+
if (fs4.existsSync(filepath)) {
|
|
241
|
+
possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
} else {
|
|
245
|
+
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
possibleVaultPath = path3.resolve(process.cwd(), ".env.vault");
|
|
249
|
+
}
|
|
250
|
+
if (fs4.existsSync(possibleVaultPath)) {
|
|
251
|
+
return possibleVaultPath;
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
function _resolveHome(envPath) {
|
|
256
|
+
return envPath[0] === "~" ? path3.join(os.homedir(), envPath.slice(1)) : envPath;
|
|
257
|
+
}
|
|
258
|
+
function _configVault(options) {
|
|
259
|
+
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
260
|
+
const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options && options.quiet);
|
|
261
|
+
if (debug || !quiet) {
|
|
262
|
+
_log("Loading env from encrypted .env.vault");
|
|
263
|
+
}
|
|
264
|
+
const parsed = DotenvModule._parseVault(options);
|
|
265
|
+
let processEnv = process.env;
|
|
266
|
+
if (options && options.processEnv != null) {
|
|
267
|
+
processEnv = options.processEnv;
|
|
268
|
+
}
|
|
269
|
+
DotenvModule.populate(processEnv, parsed, options);
|
|
270
|
+
return { parsed };
|
|
271
|
+
}
|
|
272
|
+
function configDotenv(options) {
|
|
273
|
+
const dotenvPath = path3.resolve(process.cwd(), ".env");
|
|
274
|
+
let encoding = "utf8";
|
|
275
|
+
let processEnv = process.env;
|
|
276
|
+
if (options && options.processEnv != null) {
|
|
277
|
+
processEnv = options.processEnv;
|
|
278
|
+
}
|
|
279
|
+
let debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
280
|
+
let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options && options.quiet);
|
|
281
|
+
if (options && options.encoding) {
|
|
282
|
+
encoding = options.encoding;
|
|
283
|
+
} else {
|
|
284
|
+
if (debug) {
|
|
285
|
+
_debug("No encoding is specified. UTF-8 is used by default");
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
let optionPaths = [dotenvPath];
|
|
289
|
+
if (options && options.path) {
|
|
290
|
+
if (!Array.isArray(options.path)) {
|
|
291
|
+
optionPaths = [_resolveHome(options.path)];
|
|
292
|
+
} else {
|
|
293
|
+
optionPaths = [];
|
|
294
|
+
for (const filepath of options.path) {
|
|
295
|
+
optionPaths.push(_resolveHome(filepath));
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
let lastError;
|
|
300
|
+
const parsedAll = {};
|
|
301
|
+
for (const path4 of optionPaths) {
|
|
302
|
+
try {
|
|
303
|
+
const parsed = DotenvModule.parse(fs4.readFileSync(path4, { encoding }));
|
|
304
|
+
DotenvModule.populate(parsedAll, parsed, options);
|
|
305
|
+
} catch (e) {
|
|
306
|
+
if (debug) {
|
|
307
|
+
_debug(`Failed to load ${path4} ${e.message}`);
|
|
308
|
+
}
|
|
309
|
+
lastError = e;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
const populated = DotenvModule.populate(processEnv, parsedAll, options);
|
|
313
|
+
debug = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug);
|
|
314
|
+
quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet);
|
|
315
|
+
if (debug || !quiet) {
|
|
316
|
+
const keysCount = Object.keys(populated).length;
|
|
317
|
+
const shortPaths = [];
|
|
318
|
+
for (const filePath of optionPaths) {
|
|
319
|
+
try {
|
|
320
|
+
const relative = path3.relative(process.cwd(), filePath);
|
|
321
|
+
shortPaths.push(relative);
|
|
322
|
+
} catch (e) {
|
|
323
|
+
if (debug) {
|
|
324
|
+
_debug(`Failed to load ${filePath} ${e.message}`);
|
|
325
|
+
}
|
|
326
|
+
lastError = e;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`-- tip: ${_getRandomTip()}`)}`);
|
|
330
|
+
}
|
|
331
|
+
if (lastError) {
|
|
332
|
+
return { parsed: parsedAll, error: lastError };
|
|
333
|
+
} else {
|
|
334
|
+
return { parsed: parsedAll };
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
function config(options) {
|
|
338
|
+
if (_dotenvKey(options).length === 0) {
|
|
339
|
+
return DotenvModule.configDotenv(options);
|
|
340
|
+
}
|
|
341
|
+
const vaultPath = _vaultPath(options);
|
|
342
|
+
if (!vaultPath) {
|
|
343
|
+
_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
|
|
344
|
+
return DotenvModule.configDotenv(options);
|
|
345
|
+
}
|
|
346
|
+
return DotenvModule._configVault(options);
|
|
347
|
+
}
|
|
348
|
+
function decrypt(encrypted, keyStr) {
|
|
349
|
+
const key = Buffer.from(keyStr.slice(-64), "hex");
|
|
350
|
+
let ciphertext = Buffer.from(encrypted, "base64");
|
|
351
|
+
const nonce = ciphertext.subarray(0, 12);
|
|
352
|
+
const authTag = ciphertext.subarray(-16);
|
|
353
|
+
ciphertext = ciphertext.subarray(12, -16);
|
|
354
|
+
try {
|
|
355
|
+
const aesgcm = crypto3.createDecipheriv("aes-256-gcm", key, nonce);
|
|
356
|
+
aesgcm.setAuthTag(authTag);
|
|
357
|
+
return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
|
|
358
|
+
} catch (error) {
|
|
359
|
+
const isRange = error instanceof RangeError;
|
|
360
|
+
const invalidKeyLength = error.message === "Invalid key length";
|
|
361
|
+
const decryptionFailed = error.message === "Unsupported state or unable to authenticate data";
|
|
362
|
+
if (isRange || invalidKeyLength) {
|
|
363
|
+
const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
|
|
364
|
+
err.code = "INVALID_DOTENV_KEY";
|
|
365
|
+
throw err;
|
|
366
|
+
} else if (decryptionFailed) {
|
|
367
|
+
const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
|
|
368
|
+
err.code = "DECRYPTION_FAILED";
|
|
369
|
+
throw err;
|
|
370
|
+
} else {
|
|
371
|
+
throw error;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
function populate(processEnv, parsed, options = {}) {
|
|
376
|
+
const debug = Boolean(options && options.debug);
|
|
377
|
+
const override = Boolean(options && options.override);
|
|
378
|
+
const populated = {};
|
|
379
|
+
if (typeof parsed !== "object") {
|
|
380
|
+
const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
381
|
+
err.code = "OBJECT_REQUIRED";
|
|
382
|
+
throw err;
|
|
383
|
+
}
|
|
384
|
+
for (const key of Object.keys(parsed)) {
|
|
385
|
+
if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
|
|
386
|
+
if (override === true) {
|
|
387
|
+
processEnv[key] = parsed[key];
|
|
388
|
+
populated[key] = parsed[key];
|
|
389
|
+
}
|
|
390
|
+
if (debug) {
|
|
391
|
+
if (override === true) {
|
|
392
|
+
_debug(`"${key}" is already defined and WAS overwritten`);
|
|
393
|
+
} else {
|
|
394
|
+
_debug(`"${key}" is already defined and was NOT overwritten`);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
} else {
|
|
398
|
+
processEnv[key] = parsed[key];
|
|
399
|
+
populated[key] = parsed[key];
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return populated;
|
|
403
|
+
}
|
|
404
|
+
var DotenvModule = {
|
|
405
|
+
configDotenv,
|
|
406
|
+
_configVault,
|
|
407
|
+
_parseVault,
|
|
408
|
+
config,
|
|
409
|
+
decrypt,
|
|
410
|
+
parse,
|
|
411
|
+
populate
|
|
412
|
+
};
|
|
413
|
+
module2.exports.configDotenv = DotenvModule.configDotenv;
|
|
414
|
+
module2.exports._configVault = DotenvModule._configVault;
|
|
415
|
+
module2.exports._parseVault = DotenvModule._parseVault;
|
|
416
|
+
module2.exports.config = DotenvModule.config;
|
|
417
|
+
module2.exports.decrypt = DotenvModule.decrypt;
|
|
418
|
+
module2.exports.parse = DotenvModule.parse;
|
|
419
|
+
module2.exports.populate = DotenvModule.populate;
|
|
420
|
+
module2.exports = DotenvModule;
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
// node_modules/dotenv/lib/env-options.js
|
|
425
|
+
var require_env_options = __commonJS({
|
|
426
|
+
"node_modules/dotenv/lib/env-options.js"(exports2, module2) {
|
|
427
|
+
"use strict";
|
|
428
|
+
var options = {};
|
|
429
|
+
if (process.env.DOTENV_CONFIG_ENCODING != null) {
|
|
430
|
+
options.encoding = process.env.DOTENV_CONFIG_ENCODING;
|
|
431
|
+
}
|
|
432
|
+
if (process.env.DOTENV_CONFIG_PATH != null) {
|
|
433
|
+
options.path = process.env.DOTENV_CONFIG_PATH;
|
|
434
|
+
}
|
|
435
|
+
if (process.env.DOTENV_CONFIG_QUIET != null) {
|
|
436
|
+
options.quiet = process.env.DOTENV_CONFIG_QUIET;
|
|
437
|
+
}
|
|
438
|
+
if (process.env.DOTENV_CONFIG_DEBUG != null) {
|
|
439
|
+
options.debug = process.env.DOTENV_CONFIG_DEBUG;
|
|
440
|
+
}
|
|
441
|
+
if (process.env.DOTENV_CONFIG_OVERRIDE != null) {
|
|
442
|
+
options.override = process.env.DOTENV_CONFIG_OVERRIDE;
|
|
443
|
+
}
|
|
444
|
+
if (process.env.DOTENV_CONFIG_DOTENV_KEY != null) {
|
|
445
|
+
options.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY;
|
|
446
|
+
}
|
|
447
|
+
module2.exports = options;
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
// node_modules/dotenv/lib/cli-options.js
|
|
452
|
+
var require_cli_options = __commonJS({
|
|
453
|
+
"node_modules/dotenv/lib/cli-options.js"(exports2, module2) {
|
|
454
|
+
"use strict";
|
|
455
|
+
var re = /^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/;
|
|
456
|
+
module2.exports = function optionMatcher(args) {
|
|
457
|
+
const options = args.reduce(function(acc, cur) {
|
|
458
|
+
const matches = cur.match(re);
|
|
459
|
+
if (matches) {
|
|
460
|
+
acc[matches[1]] = matches[2];
|
|
461
|
+
}
|
|
462
|
+
return acc;
|
|
463
|
+
}, {});
|
|
464
|
+
if (!("quiet" in options)) {
|
|
465
|
+
options.quiet = "true";
|
|
466
|
+
}
|
|
467
|
+
return options;
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
// node_modules/dotenv/config.js
|
|
473
|
+
(function() {
|
|
474
|
+
require_main().config(
|
|
475
|
+
Object.assign(
|
|
476
|
+
{},
|
|
477
|
+
require_env_options(),
|
|
478
|
+
require_cli_options()(process.argv)
|
|
479
|
+
)
|
|
480
|
+
);
|
|
481
|
+
})();
|
|
482
|
+
|
|
26
483
|
// scripts/analyze.ts
|
|
27
484
|
var import_child_process = require("child_process");
|
|
28
485
|
var fs3 = __toESM(require("fs"));
|
|
@@ -98,7 +555,7 @@ Each idea must be a valid JSON object with these fields:
|
|
|
98
555
|
`;
|
|
99
556
|
function buildBaseContext(businessConfig) {
|
|
100
557
|
if (!businessConfig) {
|
|
101
|
-
return `You are an AI
|
|
558
|
+
return `You are an AI Product Manager.
|
|
102
559
|
|
|
103
560
|
Your role is to analyze the codebase and generate actionable improvement ideas.`;
|
|
104
561
|
}
|
|
@@ -115,7 +572,7 @@ Your role is to analyze the codebase and generate actionable improvement ideas.`
|
|
|
115
572
|
The product consists of:
|
|
116
573
|
${components}`;
|
|
117
574
|
}
|
|
118
|
-
return `You are an AI
|
|
575
|
+
return `You are an AI Product Manager for ${product.name}, ${product.summary}.${architectureSection}
|
|
119
576
|
|
|
120
577
|
Your role is to analyze the codebase and generate actionable improvement ideas.`;
|
|
121
578
|
}
|
|
@@ -609,6 +1066,7 @@ var COMPETITORS_FILE = path.join(DATA_DIR, "competitors.json");
|
|
|
609
1066
|
var POSITIONING_FILE = path.join(DATA_DIR, "positioning.json");
|
|
610
1067
|
var PAGES_FILE = path.join(DATA_DIR, "pages.json");
|
|
611
1068
|
var PAYMENTS_FILE = path.join(DATA_DIR, "payments.json");
|
|
1069
|
+
var POSTHOG_FILE = path.join(DATA_DIR, "posthog.json");
|
|
612
1070
|
var SOCIAL_FILE = path.join(DATA_DIR, "social.json");
|
|
613
1071
|
var TEMPLATES_DIR = path.join(__dirname, "..", "..", "templates");
|
|
614
1072
|
var COMMAND_TEMPLATES_DIR = path.join(TEMPLATES_DIR, "commands");
|
|
@@ -1066,7 +1524,7 @@ Return ONLY this JSON structure (no markdown code blocks):
|
|
|
1066
1524
|
async function main() {
|
|
1067
1525
|
const { type, topic, context } = parseArgs();
|
|
1068
1526
|
console.log(`
|
|
1069
|
-
=== AI
|
|
1527
|
+
=== AI Product Manager - ${type.toUpperCase()} Analysis ===
|
|
1070
1528
|
`);
|
|
1071
1529
|
if (type === "research" && topic) {
|
|
1072
1530
|
console.log(`Research topic: ${topic}`);
|
package/dist/scripts/chat.js
CHANGED
|
@@ -76,6 +76,7 @@ var COMPETITORS_FILE = path.join(DATA_DIR, "competitors.json");
|
|
|
76
76
|
var POSITIONING_FILE = path.join(DATA_DIR, "positioning.json");
|
|
77
77
|
var PAGES_FILE = path.join(DATA_DIR, "pages.json");
|
|
78
78
|
var PAYMENTS_FILE = path.join(DATA_DIR, "payments.json");
|
|
79
|
+
var POSTHOG_FILE = path.join(DATA_DIR, "posthog.json");
|
|
79
80
|
var SOCIAL_FILE = path.join(DATA_DIR, "social.json");
|
|
80
81
|
var TEMPLATES_DIR = path.join(__dirname, "..", "..", "templates");
|
|
81
82
|
var COMMAND_TEMPLATES_DIR = path.join(TEMPLATES_DIR, "commands");
|
|
@@ -177,7 +178,7 @@ var SKILL_REGISTRY = [
|
|
|
177
178
|
when_to_use: "Need a new landing page, redesigning an existing one",
|
|
178
179
|
category: "content"
|
|
179
180
|
},
|
|
180
|
-
// Payments
|
|
181
|
+
// Payments & Integrations
|
|
181
182
|
{
|
|
182
183
|
command: "/setup-payments",
|
|
183
184
|
name: "Payment Setup",
|
|
@@ -185,6 +186,13 @@ var SKILL_REGISTRY = [
|
|
|
185
186
|
when_to_use: "Ready to accept payments, setting up Stripe, adding pricing tiers",
|
|
186
187
|
category: "payments"
|
|
187
188
|
},
|
|
189
|
+
{
|
|
190
|
+
command: "/setup-posthog",
|
|
191
|
+
name: "PostHog Analytics",
|
|
192
|
+
description: "Instrument PostHog product analytics \u2014 provider, pageviews, custom events",
|
|
193
|
+
when_to_use: "Setting up product analytics, tracking user behavior, measuring feature adoption",
|
|
194
|
+
category: "analytics"
|
|
195
|
+
},
|
|
188
196
|
// Data Management
|
|
189
197
|
{
|
|
190
198
|
command: "/manage",
|
|
@@ -279,7 +287,7 @@ function buildSystemPrompt(minimal) {
|
|
|
279
287
|
const sections = [];
|
|
280
288
|
sections.push(`## VibeBusiness Context
|
|
281
289
|
|
|
282
|
-
You are working inside the VibeBusiness project \u2014 an autonomous AI
|
|
290
|
+
You are working inside the VibeBusiness project \u2014 an autonomous AI product manager CLI.
|
|
283
291
|
Project root: ${PROJECT_DIR}
|
|
284
292
|
Data directory: ${DATA_DIR}
|
|
285
293
|
|
|
@@ -124,6 +124,7 @@ var COMPETITORS_FILE = path.join(DATA_DIR, "competitors.json");
|
|
|
124
124
|
var POSITIONING_FILE = path.join(DATA_DIR, "positioning.json");
|
|
125
125
|
var PAGES_FILE = path.join(DATA_DIR, "pages.json");
|
|
126
126
|
var PAYMENTS_FILE = path.join(DATA_DIR, "payments.json");
|
|
127
|
+
var POSTHOG_FILE = path.join(DATA_DIR, "posthog.json");
|
|
127
128
|
var SOCIAL_FILE = path.join(DATA_DIR, "social.json");
|
|
128
129
|
var TEMPLATES_DIR = path.join(__dirname, "..", "..", "templates");
|
|
129
130
|
var COMMAND_TEMPLATES_DIR = path.join(TEMPLATES_DIR, "commands");
|