everything-dev 1.51.6 → 1.52.0
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/dist/_virtual/_rolldown/runtime.cjs +0 -2
- package/dist/api-contract.cjs +61 -16
- package/dist/api-contract.cjs.map +1 -1
- package/dist/api-contract.mjs +60 -17
- package/dist/api-contract.mjs.map +1 -1
- package/dist/app.cjs +1 -1
- package/dist/app.cjs.map +1 -1
- package/dist/app.mjs +1 -1
- package/dist/app.mjs.map +1 -1
- package/dist/cli/db-doctor.cjs +1 -1
- package/dist/cli/db-doctor.cjs.map +1 -1
- package/dist/cli/db-doctor.mjs +1 -1
- package/dist/cli/db-repair.cjs +1 -1
- package/dist/cli/db-repair.cjs.map +1 -1
- package/dist/cli/db-repair.mjs +1 -1
- package/dist/cli/init.cjs +76 -52
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts +15 -7
- package/dist/cli/init.d.cts.map +1 -1
- package/dist/cli/init.d.mts +15 -7
- package/dist/cli/init.d.mts.map +1 -1
- package/dist/cli/init.mjs +70 -47
- package/dist/cli/init.mjs.map +1 -1
- package/dist/cli/sync.cjs +34 -5
- package/dist/cli/sync.cjs.map +1 -1
- package/dist/cli/sync.mjs +35 -6
- package/dist/cli/sync.mjs.map +1 -1
- package/dist/cli/upgrade.cjs +151 -93
- package/dist/cli/upgrade.cjs.map +1 -1
- package/dist/cli/upgrade.mjs +138 -80
- package/dist/cli/upgrade.mjs.map +1 -1
- package/dist/cli/utils/helpers.cjs +25 -0
- package/dist/cli/utils/helpers.cjs.map +1 -0
- package/dist/cli/utils/helpers.mjs +23 -0
- package/dist/cli/utils/helpers.mjs.map +1 -0
- package/dist/cli.cjs +84 -72
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +84 -72
- package/dist/cli.mjs.map +1 -1
- package/dist/code-artifacts.cjs +1 -1
- package/dist/code-artifacts.mjs +1 -1
- package/dist/config.cjs +44 -4
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.d.mts.map +1 -1
- package/dist/config.mjs +44 -4
- package/dist/config.mjs.map +1 -1
- package/dist/contract.cjs +9 -4
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +23 -13
- package/dist/contract.d.cts.map +1 -1
- package/dist/contract.d.mts +23 -13
- package/dist/contract.d.mts.map +1 -1
- package/dist/contract.meta.cjs +2 -1
- package/dist/contract.meta.cjs.map +1 -1
- package/dist/contract.meta.d.cts +3 -0
- package/dist/contract.meta.d.mts +3 -0
- package/dist/contract.meta.mjs +2 -1
- package/dist/contract.meta.mjs.map +1 -1
- package/dist/contract.mjs +9 -4
- package/dist/contract.mjs.map +1 -1
- package/dist/dag.cjs +176 -0
- package/dist/dag.cjs.map +1 -0
- package/dist/dag.d.cts +24 -0
- package/dist/dag.d.cts.map +1 -0
- package/dist/dag.d.mts +24 -0
- package/dist/dag.d.mts.map +1 -0
- package/dist/dag.mjs +167 -0
- package/dist/dag.mjs.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/infra/planner.cjs +1 -1
- package/dist/infra/planner.mjs +1 -1
- package/dist/infra/preflight.cjs +1 -1
- package/dist/infra/preflight.cjs.map +1 -1
- package/dist/infra/preflight.mjs +1 -1
- package/dist/infra/preflight.mjs.map +1 -1
- package/dist/near-cli.cjs +1 -1
- package/dist/near-cli.mjs +1 -1
- package/dist/plugin.cjs +27 -18
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +52 -6
- package/dist/plugin.d.mts +52 -6
- package/dist/plugin.mjs +28 -19
- package/dist/plugin.mjs.map +1 -1
- package/dist/types.cjs +41 -6
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +116 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +116 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +40 -7
- package/dist/types.mjs.map +1 -1
- package/package.json +8 -2
- package/dist/_virtual/_rolldown/runtime.mjs +0 -32
package/dist/cli/init.d.cts
CHANGED
|
@@ -42,6 +42,7 @@ declare function copyFilteredFiles(sourceDir: string, destination: string, patte
|
|
|
42
42
|
plugins?: string[];
|
|
43
43
|
ignore?: string[];
|
|
44
44
|
}): Promise<number>;
|
|
45
|
+
declare function getParentOnlyScriptKeys(projectDir: string): string[];
|
|
45
46
|
declare function buildChildRootScripts(sections: {
|
|
46
47
|
ui: boolean;
|
|
47
48
|
api: boolean;
|
|
@@ -68,14 +69,21 @@ declare function personalizeConfig(destination: string, opts: {
|
|
|
68
69
|
testnet?: string;
|
|
69
70
|
staging?: unknown;
|
|
70
71
|
}): Promise<void>;
|
|
71
|
-
declare function runBunInstall(destination: string,
|
|
72
|
-
|
|
72
|
+
declare function runBunInstall(destination: string, opts?: {
|
|
73
|
+
spinner?: {
|
|
74
|
+
message: (msg: string) => void;
|
|
75
|
+
};
|
|
73
76
|
}): Promise<void>;
|
|
74
|
-
declare function runBunInstallForUpgrade(destination: string,
|
|
75
|
-
|
|
77
|
+
declare function runBunInstallForUpgrade(destination: string, opts?: {
|
|
78
|
+
spinner?: {
|
|
79
|
+
message: (msg: string) => void;
|
|
80
|
+
};
|
|
76
81
|
}): Promise<void>;
|
|
77
|
-
declare function runTypesGen(destination: string,
|
|
78
|
-
|
|
82
|
+
declare function runTypesGen(destination: string, opts?: {
|
|
83
|
+
spinner?: {
|
|
84
|
+
message: (msg: string) => void;
|
|
85
|
+
};
|
|
86
|
+
remotePlugins?: string[];
|
|
79
87
|
}): Promise<void>;
|
|
80
88
|
declare function runDockerComposeUp(destination: string): Promise<void>;
|
|
81
89
|
declare function stripOrphanedWorkspacesFromLockfile(lockfilePath: string, allowedWorkspaces: string[]): void;
|
|
@@ -110,5 +118,5 @@ declare function personalizeAgentsMd(destination: string, opts: {
|
|
|
110
118
|
plugins?: string[];
|
|
111
119
|
}): Promise<void>;
|
|
112
120
|
//#endregion
|
|
113
|
-
export { CatalogChainSource, INIT_ROOT_PATTERNS, buildChildAgentsMd, buildChildRootScripts, buildInitPatterns, buildPluginRouteExclusions, copyFilteredFiles, detectGitRemoteUrl, downloadTarball, execCommand, extractSkillsBlock, fetchParentConfig, generateDatabaseMigrations, personalizeAgentsMd, personalizeConfig, removeInitLockfile, resolveCatalogChainSource, resolveRepositoryViaExtendsChain, resolveSourceDir, runBunInstall, runBunInstallForUpgrade, runDockerComposeUp, runTypesGen, scaffoldMinimalProject, sourcePathToDestinationPath, stripOrphanedWorkspacesFromLockfile, writeInitSnapshot };
|
|
121
|
+
export { CatalogChainSource, INIT_ROOT_PATTERNS, buildChildAgentsMd, buildChildRootScripts, buildInitPatterns, buildPluginRouteExclusions, copyFilteredFiles, detectGitRemoteUrl, downloadTarball, execCommand, extractSkillsBlock, fetchParentConfig, generateDatabaseMigrations, getParentOnlyScriptKeys, personalizeAgentsMd, personalizeConfig, removeInitLockfile, resolveCatalogChainSource, resolveRepositoryViaExtendsChain, resolveSourceDir, runBunInstall, runBunInstallForUpgrade, runDockerComposeUp, runTypesGen, scaffoldMinimalProject, sourcePathToDestinationPath, stripOrphanedWorkspacesFromLockfile, writeInitSnapshot };
|
|
114
122
|
//# sourceMappingURL=init.d.cts.map
|
package/dist/cli/init.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.cts","names":[],"sources":["../../src/cli/init.ts"],"mappings":";;;cA+Ba;UAyBH;EACR;EACA,cAAc;EACd,eAAe;;UAGA;EACf,SAAS;EACT;EACA;;
|
|
1
|
+
{"version":3,"file":"init.d.cts","names":[],"sources":["../../src/cli/init.ts"],"mappings":";;;cA+Ba;UAyBH;EACR;EACA,cAAc;EACd,eAAe;;UAGA;EACf,SAAS;EACT;EACA;;iBAaoB,0BAA0B;EAC9C;EACA;EACA;IACE,QAAQ;iBAqFU,iBAAiB;EACrC;EACA;EACA;IACE,QAAQ;iBAmCI,kBACd,WAAW,mBACX,oBACA,eAAe;iBAkBD,2BACd;EAAgB,UAAU;sBAC1B;iBA6Bc,4BAA4B;iBAMtB,kBACpB,wBACA,yBACC,QAAQ;iBAKW,iCACpB,wBACA,wBACA,UAAO,cACN;EAAU;EAAoB,QAAQ;;iBA+BnB,mBAAmB,oBAAoB;iBA0BvC,gBACpB,kBACC;EAAU;EAAa,eAAe;;iBA8EnB,kBACpB,mBACA,qBACA,oBACA;EACE,WAAW;EACX;EACA;IAED;iBA0Ea,wBAAwB;iBAmBxB,sBAAsB;EACpC;EACA;EACA;EACA;IACE;iBAkEkB,kBACpB,qBACA;EACE;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,eAAe;EACf;IAAkB;IAA0B;;EAC5C;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;IAED;iBAyamB,cACpB,qBACA;EACE;IAAY,UAAU;;IAEvB;iBAUmB,wBACpB,qBACA;EACE;IAAY,UAAU;;IAEvB;iBAUmB,YACpB,qBACA;EACE;IAAY,UAAU;;EACtB;IAED;iBAcmB,mBAAmB,sBAAsB;iBAmC/C,oCACd,sBACA;iBAqCc,mBAAmB;iBAKb,uBACpB,qBACA,cAAc,gBACd;EACE;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;IAED;iBAkHmB,kBACpB,qBACA,wBACA,wBACA,mBACA,oBACA;EACE,WAAW;EACX;EACA;IAED;iBA0CmB,2BAA2B,sBAAsB;iBA8BjD,YACpB,iBACA,gBACA,cACA;EAAY;IACX;iBAKa,mBAAmB;iBAiMnB,mBACd,qBACA;EACE,WAAW;EACX;;iBAMkB,oBACpB,qBACA;EACE,WAAW;EACX;IAED"}
|
package/dist/cli/init.d.mts
CHANGED
|
@@ -42,6 +42,7 @@ declare function copyFilteredFiles(sourceDir: string, destination: string, patte
|
|
|
42
42
|
plugins?: string[];
|
|
43
43
|
ignore?: string[];
|
|
44
44
|
}): Promise<number>;
|
|
45
|
+
declare function getParentOnlyScriptKeys(projectDir: string): string[];
|
|
45
46
|
declare function buildChildRootScripts(sections: {
|
|
46
47
|
ui: boolean;
|
|
47
48
|
api: boolean;
|
|
@@ -68,14 +69,21 @@ declare function personalizeConfig(destination: string, opts: {
|
|
|
68
69
|
testnet?: string;
|
|
69
70
|
staging?: unknown;
|
|
70
71
|
}): Promise<void>;
|
|
71
|
-
declare function runBunInstall(destination: string,
|
|
72
|
-
|
|
72
|
+
declare function runBunInstall(destination: string, opts?: {
|
|
73
|
+
spinner?: {
|
|
74
|
+
message: (msg: string) => void;
|
|
75
|
+
};
|
|
73
76
|
}): Promise<void>;
|
|
74
|
-
declare function runBunInstallForUpgrade(destination: string,
|
|
75
|
-
|
|
77
|
+
declare function runBunInstallForUpgrade(destination: string, opts?: {
|
|
78
|
+
spinner?: {
|
|
79
|
+
message: (msg: string) => void;
|
|
80
|
+
};
|
|
76
81
|
}): Promise<void>;
|
|
77
|
-
declare function runTypesGen(destination: string,
|
|
78
|
-
|
|
82
|
+
declare function runTypesGen(destination: string, opts?: {
|
|
83
|
+
spinner?: {
|
|
84
|
+
message: (msg: string) => void;
|
|
85
|
+
};
|
|
86
|
+
remotePlugins?: string[];
|
|
79
87
|
}): Promise<void>;
|
|
80
88
|
declare function runDockerComposeUp(destination: string): Promise<void>;
|
|
81
89
|
declare function stripOrphanedWorkspacesFromLockfile(lockfilePath: string, allowedWorkspaces: string[]): void;
|
|
@@ -110,5 +118,5 @@ declare function personalizeAgentsMd(destination: string, opts: {
|
|
|
110
118
|
plugins?: string[];
|
|
111
119
|
}): Promise<void>;
|
|
112
120
|
//#endregion
|
|
113
|
-
export { CatalogChainSource, INIT_ROOT_PATTERNS, buildChildAgentsMd, buildChildRootScripts, buildInitPatterns, buildPluginRouteExclusions, copyFilteredFiles, detectGitRemoteUrl, downloadTarball, execCommand, extractSkillsBlock, fetchParentConfig, generateDatabaseMigrations, personalizeAgentsMd, personalizeConfig, removeInitLockfile, resolveCatalogChainSource, resolveRepositoryViaExtendsChain, resolveSourceDir, runBunInstall, runBunInstallForUpgrade, runDockerComposeUp, runTypesGen, scaffoldMinimalProject, sourcePathToDestinationPath, stripOrphanedWorkspacesFromLockfile, writeInitSnapshot };
|
|
121
|
+
export { CatalogChainSource, INIT_ROOT_PATTERNS, buildChildAgentsMd, buildChildRootScripts, buildInitPatterns, buildPluginRouteExclusions, copyFilteredFiles, detectGitRemoteUrl, downloadTarball, execCommand, extractSkillsBlock, fetchParentConfig, generateDatabaseMigrations, getParentOnlyScriptKeys, personalizeAgentsMd, personalizeConfig, removeInitLockfile, resolveCatalogChainSource, resolveRepositoryViaExtendsChain, resolveSourceDir, runBunInstall, runBunInstallForUpgrade, runDockerComposeUp, runTypesGen, scaffoldMinimalProject, sourcePathToDestinationPath, stripOrphanedWorkspacesFromLockfile, writeInitSnapshot };
|
|
114
122
|
//# sourceMappingURL=init.d.mts.map
|
package/dist/cli/init.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.mts","names":[],"sources":["../../src/cli/init.ts"],"mappings":";;;cA+Ba;UAyBH;EACR;EACA,cAAc;EACd,eAAe;;UAGA;EACf,SAAS;EACT;EACA;;
|
|
1
|
+
{"version":3,"file":"init.d.mts","names":[],"sources":["../../src/cli/init.ts"],"mappings":";;;cA+Ba;UAyBH;EACR;EACA,cAAc;EACd,eAAe;;UAGA;EACf,SAAS;EACT;EACA;;iBAaoB,0BAA0B;EAC9C;EACA;EACA;IACE,QAAQ;iBAqFU,iBAAiB;EACrC;EACA;EACA;IACE,QAAQ;iBAmCI,kBACd,WAAW,mBACX,oBACA,eAAe;iBAkBD,2BACd;EAAgB,UAAU;sBAC1B;iBA6Bc,4BAA4B;iBAMtB,kBACpB,wBACA,yBACC,QAAQ;iBAKW,iCACpB,wBACA,wBACA,UAAO,cACN;EAAU;EAAoB,QAAQ;;iBA+BnB,mBAAmB,oBAAoB;iBA0BvC,gBACpB,kBACC;EAAU;EAAa,eAAe;;iBA8EnB,kBACpB,mBACA,qBACA,oBACA;EACE,WAAW;EACX;EACA;IAED;iBA0Ea,wBAAwB;iBAmBxB,sBAAsB;EACpC;EACA;EACA;EACA;IACE;iBAkEkB,kBACpB,qBACA;EACE;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,eAAe;EACf;IAAkB;IAA0B;;EAC5C;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;IAED;iBAyamB,cACpB,qBACA;EACE;IAAY,UAAU;;IAEvB;iBAUmB,wBACpB,qBACA;EACE;IAAY,UAAU;;IAEvB;iBAUmB,YACpB,qBACA;EACE;IAAY,UAAU;;EACtB;IAED;iBAcmB,mBAAmB,sBAAsB;iBAmC/C,oCACd,sBACA;iBAqCc,mBAAmB;iBAKb,uBACpB,qBACA,cAAc,gBACd;EACE;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;IAED;iBAkHmB,kBACpB,qBACA,wBACA,wBACA,mBACA,oBACA;EACE,WAAW;EACX;EACA;IAED;iBA0CmB,2BAA2B,sBAAsB;iBA8BjD,YACpB,iBACA,gBACA,cACA;EAAY;IACX;iBAKa,mBAAmB;iBAiMnB,mBACd,qBACA;EACE,WAAW;EACX;;iBAMkB,oBACpB,qBACA;EACE,WAAW;EACX;IAED"}
|
package/dist/cli/init.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { fetchResponse } from "../http-client.mjs";
|
|
2
2
|
import { fetchBosConfigFromFastKv } from "../fastkv.mjs";
|
|
3
|
-
import { resolveExtendsRef } from "../merge.mjs";
|
|
4
3
|
import { loadManifestNormalizationSpec, normalizePackageManifestsInTree } from "../internal/manifest-normalizer.mjs";
|
|
5
4
|
import { saveBosConfig } from "../utils/save-config.mjs";
|
|
6
5
|
import { writeSnapshot } from "./snapshot.mjs";
|
|
6
|
+
import { getExtendsRef, parseBosRef, readJsonFile } from "./utils/helpers.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { createWriteStream, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { dirname, join, relative, resolve } from "node:path";
|
|
@@ -38,18 +38,6 @@ const OVERRIDE_WORKSPACE_MAP = {
|
|
|
38
38
|
host: ["host"],
|
|
39
39
|
plugins: []
|
|
40
40
|
};
|
|
41
|
-
function getExtendsRef(config) {
|
|
42
|
-
if (typeof config.extends === "string") return config.extends;
|
|
43
|
-
if (config.extends && typeof config.extends === "object") return resolveExtendsRef(config.extends, "production");
|
|
44
|
-
}
|
|
45
|
-
function parseBosRef(ref) {
|
|
46
|
-
const match = ref.match(/^bos:\/\/([^/]+)\/(.+)$/);
|
|
47
|
-
if (!match?.[1] || !match[2]) return null;
|
|
48
|
-
return {
|
|
49
|
-
account: match[1],
|
|
50
|
-
gateway: match[2]
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
41
|
function readWorkspaceCatalog(sourceDir) {
|
|
54
42
|
const pkgPath = join(sourceDir, "package.json");
|
|
55
43
|
if (!existsSync(pkgPath)) return {};
|
|
@@ -344,14 +332,31 @@ function buildRootTypecheckScript(sections) {
|
|
|
344
332
|
if (sections.plugins) commands.push("if [ -d plugins ]; then for dir in plugins/*; do if [ -f \"$dir/package.json\" ]; then bun run --cwd \"$dir\" typecheck; fi; done; fi");
|
|
345
333
|
return commands.join(" && ");
|
|
346
334
|
}
|
|
335
|
+
function getParentOnlyScriptKeys(projectDir) {
|
|
336
|
+
const parentPkgPath = join(projectDir, "node_modules", "everything-dev", "package.json");
|
|
337
|
+
if (!existsSync(parentPkgPath)) return [];
|
|
338
|
+
try {
|
|
339
|
+
const parentScripts = JSON.parse(readFileSync(parentPkgPath, "utf-8")).scripts ?? {};
|
|
340
|
+
const allChildKeys = new Set(Object.keys(buildChildRootScripts({
|
|
341
|
+
ui: true,
|
|
342
|
+
api: true,
|
|
343
|
+
host: true,
|
|
344
|
+
plugins: true
|
|
345
|
+
})));
|
|
346
|
+
allChildKeys.add("test:integration");
|
|
347
|
+
return Object.keys(parentScripts).filter((key) => !allChildKeys.has(key));
|
|
348
|
+
} catch {
|
|
349
|
+
return [];
|
|
350
|
+
}
|
|
351
|
+
}
|
|
347
352
|
function buildChildRootScripts(sections) {
|
|
348
353
|
const scripts = {
|
|
349
|
-
dev: "
|
|
350
|
-
"dev:proxy": "
|
|
351
|
-
build: "
|
|
352
|
-
deploy: "
|
|
353
|
-
publish: "
|
|
354
|
-
start: "
|
|
354
|
+
dev: "bos dev",
|
|
355
|
+
"dev:proxy": "bos dev --proxy",
|
|
356
|
+
build: "bos build",
|
|
357
|
+
deploy: "bos build --deploy",
|
|
358
|
+
publish: "bos publish",
|
|
359
|
+
start: "bos start",
|
|
355
360
|
typecheck: buildRootTypecheckScript(sections),
|
|
356
361
|
lint: "biome check .",
|
|
357
362
|
"lint:fix": "biome check --write .",
|
|
@@ -360,31 +365,34 @@ function buildChildRootScripts(sections) {
|
|
|
360
365
|
changeset: "changeset",
|
|
361
366
|
version: "changeset version",
|
|
362
367
|
release: "echo 'Packages versioned - app release handled by workflow'",
|
|
363
|
-
postinstall: "node_modules/.bin/bos types gen || true",
|
|
364
|
-
"types:gen": "node_modules/.bin/bos types gen",
|
|
365
|
-
bos: "
|
|
368
|
+
postinstall: "node node_modules/.bin/bos types gen || true",
|
|
369
|
+
"types:gen": "node node_modules/.bin/bos types gen",
|
|
370
|
+
bos: "bos"
|
|
366
371
|
};
|
|
367
372
|
if (sections.api) {
|
|
368
373
|
scripts["db:push"] = "bun run --cwd api drizzle-kit push";
|
|
369
|
-
scripts["db:studio"] = "
|
|
370
|
-
scripts["db:doctor"] = "
|
|
371
|
-
scripts["db:repair"] = "
|
|
374
|
+
scripts["db:studio"] = "bos db:studio";
|
|
375
|
+
scripts["db:doctor"] = "bos db:doctor";
|
|
376
|
+
scripts["db:repair"] = "bos db:repair";
|
|
372
377
|
scripts["db:generate"] = "bun run --cwd api drizzle-kit generate";
|
|
373
378
|
scripts["db:migrate"] = "bun run --cwd api drizzle-kit migrate";
|
|
374
|
-
scripts["test:api"] = "
|
|
375
|
-
scripts["test:integration"] = "
|
|
379
|
+
scripts["test:api"] = "bun run --cwd api test --if-present";
|
|
380
|
+
scripts["test:integration"] = "bun run --cwd api test tests/integration/ --if-present";
|
|
376
381
|
}
|
|
377
|
-
if (sections.host) scripts["test:e2e"] = "bun run --cwd host test
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
382
|
+
if (sections.host) scripts["test:e2e"] = "bun run --cwd host test --if-present";
|
|
383
|
+
const testTargets = [];
|
|
384
|
+
if (sections.api) testTargets.push("bun run --cwd api test --if-present");
|
|
385
|
+
if (sections.host) testTargets.push("bun run --cwd host test --if-present");
|
|
386
|
+
if (sections.ui) testTargets.push("bun run --cwd ui test --if-present");
|
|
387
|
+
if (sections.plugins) testTargets.push("for d in plugins/*; do [ -f \"$d/package.json\" ] && bun run --cwd \"$d\" test --if-present; done");
|
|
388
|
+
scripts.test = testTargets.length > 0 ? testTargets.join(" && ") : "echo \"No workspace directories configured\"";
|
|
381
389
|
if (sections.api || sections.host) {
|
|
382
390
|
scripts["dev:postgres"] = "docker compose up -d --wait && bun run dev";
|
|
383
391
|
scripts["dev:postgres:down"] = "docker compose down";
|
|
384
392
|
scripts["dev:postgres:reset"] = "docker compose down -v && docker compose up -d --wait";
|
|
385
393
|
}
|
|
386
|
-
if (sections.ui) scripts["dev:ui"] = "
|
|
387
|
-
if (sections.api) scripts["dev:api"] = "
|
|
394
|
+
if (sections.ui) scripts["dev:ui"] = "bos dev --ui local --api remote";
|
|
395
|
+
if (sections.api) scripts["dev:api"] = "bos dev --ui remote --api local";
|
|
388
396
|
return scripts;
|
|
389
397
|
}
|
|
390
398
|
async function personalizeConfig(destination, opts) {
|
|
@@ -470,6 +478,12 @@ async function personalizeConfig(destination, opts) {
|
|
|
470
478
|
}
|
|
471
479
|
await saveBosConfig(destination, config);
|
|
472
480
|
}
|
|
481
|
+
for (const relPath of ["ui/src/lib/api-types.gen.ts", "api/src/lib/plugins-types.gen.ts"]) {
|
|
482
|
+
const absolutePath = join(destination, relPath);
|
|
483
|
+
try {
|
|
484
|
+
rmSync(absolutePath, { force: true });
|
|
485
|
+
} catch {}
|
|
486
|
+
}
|
|
473
487
|
const pkgPath = join(destination, "package.json");
|
|
474
488
|
if (existsSync(pkgPath)) {
|
|
475
489
|
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
@@ -504,6 +518,7 @@ async function personalizeConfig(destination, opts) {
|
|
|
504
518
|
const scripts = pkg.scripts;
|
|
505
519
|
for (const [key, value] of Object.entries(childScripts)) scripts[key] = value;
|
|
506
520
|
for (const obsoleteScript of [
|
|
521
|
+
...getParentOnlyScriptKeys(destination),
|
|
507
522
|
"init",
|
|
508
523
|
"sync-catalog",
|
|
509
524
|
"db:push",
|
|
@@ -612,9 +627,9 @@ export type InferOutput<_TRoute extends string> = any;
|
|
|
612
627
|
if (has("plugins")) for (const plugin of opts.plugins ?? []) {
|
|
613
628
|
const pluginSrcDir = join(destination, "plugins", plugin, "src");
|
|
614
629
|
const pluginIndexPath = join(pluginSrcDir, "index.ts");
|
|
615
|
-
const pluginClientGenPath = join(pluginSrcDir, "plugins-client.gen.ts");
|
|
630
|
+
const pluginClientGenPath = join(pluginSrcDir, "lib", "plugins-client.gen.ts");
|
|
616
631
|
if (!existsSync(pluginIndexPath) || existsSync(pluginClientGenPath)) continue;
|
|
617
|
-
if (!readFileSync(pluginIndexPath, "utf-8").includes("./plugins-client.gen")) continue;
|
|
632
|
+
if (!readFileSync(pluginIndexPath, "utf-8").includes("./lib/plugins-client.gen")) continue;
|
|
618
633
|
writeFileSync(pluginClientGenPath, "export type PluginsClient = Record<string, never>;\n");
|
|
619
634
|
}
|
|
620
635
|
}
|
|
@@ -663,15 +678,22 @@ function toRelativeImportPath(fromPath, toPath) {
|
|
|
663
678
|
const rel = relative(dirname(toPath), fromPath);
|
|
664
679
|
return rel.startsWith(".") ? rel : `./${rel}`;
|
|
665
680
|
}
|
|
666
|
-
async function runBunInstall(destination,
|
|
667
|
-
await runWithProgress("bun", ["install", "--ignore-scripts"], destination, spinner, "Installing dependencies");
|
|
681
|
+
async function runBunInstall(destination, opts) {
|
|
682
|
+
await runWithProgress("bun", ["install", "--ignore-scripts"], destination, opts?.spinner, "Installing dependencies");
|
|
668
683
|
}
|
|
669
|
-
async function runBunInstallForUpgrade(destination,
|
|
670
|
-
await runWithProgress("bun", ["install", "--force"], destination, spinner, "Installing dependencies");
|
|
684
|
+
async function runBunInstallForUpgrade(destination, opts) {
|
|
685
|
+
await runWithProgress("bun", ["install", "--force"], destination, opts?.spinner, "Installing dependencies");
|
|
671
686
|
}
|
|
672
|
-
async function runTypesGen(destination,
|
|
673
|
-
|
|
674
|
-
|
|
687
|
+
async function runTypesGen(destination, opts) {
|
|
688
|
+
const bosModule = join(destination, "node_modules", "everything-dev", "dist", "cli.mjs");
|
|
689
|
+
if (existsSync(bosModule)) {
|
|
690
|
+
const args = [
|
|
691
|
+
bosModule,
|
|
692
|
+
"types",
|
|
693
|
+
"gen"
|
|
694
|
+
];
|
|
695
|
+
if (opts?.remotePlugins && opts.remotePlugins.length > 0) args.push("--remote-plugins", opts.remotePlugins.join(","));
|
|
696
|
+
await runWithProgress(process.execPath, args, destination, opts?.spinner, "Generating types");
|
|
675
697
|
return;
|
|
676
698
|
}
|
|
677
699
|
throw new Error("Unable to locate bos CLI for types generation");
|
|
@@ -688,7 +710,11 @@ async function runWithProgress(command, args, cwd, spinner, label) {
|
|
|
688
710
|
const child = execa(command, args, {
|
|
689
711
|
cwd,
|
|
690
712
|
stdio: "inherit",
|
|
691
|
-
timeout: COMMAND_TIMEOUTS[command] ?? 2 * 6e4
|
|
713
|
+
timeout: COMMAND_TIMEOUTS[command] ?? 2 * 6e4,
|
|
714
|
+
env: {
|
|
715
|
+
...process.env,
|
|
716
|
+
BOS_NO_BANNER: "1"
|
|
717
|
+
}
|
|
692
718
|
});
|
|
693
719
|
if (spinner) {
|
|
694
720
|
const start = Date.now();
|
|
@@ -730,9 +756,6 @@ function removeInitLockfile(lockfilePath) {
|
|
|
730
756
|
if (!existsSync(lockfilePath)) return;
|
|
731
757
|
rmSync(lockfilePath, { force: true });
|
|
732
758
|
}
|
|
733
|
-
function readJsonFile(filePath) {
|
|
734
|
-
return JSON.parse(readFileSync(filePath, "utf-8"));
|
|
735
|
-
}
|
|
736
759
|
async function scaffoldMinimalProject(destination, parentConfig, opts) {
|
|
737
760
|
mkdirSync(destination, { recursive: true });
|
|
738
761
|
const has = (section) => opts.overrides.includes(section);
|
|
@@ -1055,5 +1078,5 @@ docker-compose.yml
|
|
|
1055
1078
|
}
|
|
1056
1079
|
|
|
1057
1080
|
//#endregion
|
|
1058
|
-
export { INIT_ROOT_PATTERNS, buildChildAgentsMd, buildChildRootScripts, buildInitPatterns, buildPluginRouteExclusions, copyFilteredFiles, detectGitRemoteUrl, downloadTarball, execCommand, extractSkillsBlock, fetchParentConfig, generateDatabaseMigrations, personalizeAgentsMd, personalizeConfig, removeInitLockfile, resolveCatalogChainSource, resolveRepositoryViaExtendsChain, resolveSourceDir, runBunInstall, runBunInstallForUpgrade, runDockerComposeUp, runTypesGen, scaffoldMinimalProject, sourcePathToDestinationPath, stripOrphanedWorkspacesFromLockfile, writeInitSnapshot };
|
|
1081
|
+
export { INIT_ROOT_PATTERNS, buildChildAgentsMd, buildChildRootScripts, buildInitPatterns, buildPluginRouteExclusions, copyFilteredFiles, detectGitRemoteUrl, downloadTarball, execCommand, extractSkillsBlock, fetchParentConfig, generateDatabaseMigrations, getParentOnlyScriptKeys, personalizeAgentsMd, personalizeConfig, removeInitLockfile, resolveCatalogChainSource, resolveRepositoryViaExtendsChain, resolveSourceDir, runBunInstall, runBunInstallForUpgrade, runDockerComposeUp, runTypesGen, scaffoldMinimalProject, sourcePathToDestinationPath, stripOrphanedWorkspacesFromLockfile, writeInitSnapshot };
|
|
1059
1082
|
//# sourceMappingURL=init.mjs.map
|