@econ-v1/app-sdk 7.0.77 → 7.0.79
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/README.md +35 -0
- package/dist/burger/index.js +2 -0
- package/dist/burger-build/aliases.d.ts +28 -0
- package/dist/burger-build/build.d.ts +19 -0
- package/dist/burger-build/bun-version.d.ts +8 -0
- package/dist/burger-build/cli.js +844 -0
- package/dist/burger-build/gate.d.ts +28 -0
- package/dist/burger-build/index.d.ts +9 -0
- package/dist/burger-build/index.js +785 -0
- package/dist/burger-build/plugin.d.ts +25 -0
- package/dist/burger-build/test-prepare.d.ts +68 -0
- package/dist/burger-types/aliases.d.ts +20 -0
- package/dist/burger-types/globals.d.ts +66 -0
- package/dist/burger-types/index.d.ts +3 -0
- package/dist/burger-types/modules.d.ts +436 -0
- package/dist/index.d.ts +11 -18
- package/dist/index.js +11 -11
- package/dist/otel-burger.d.ts +5 -0
- package/dist/platform/bun.d.ts +34 -0
- package/dist/platform/burger.d.ts +47 -0
- package/dist/platform/conformance.d.ts +25 -0
- package/dist/platform/types.d.ts +47 -0
- package/package.json +41 -3
- package/dist/__tests__/lease-drain-socket.integration.test.d.ts +0 -1
- package/dist/__tests__/lease-drain.fixture.d.ts +0 -1
- package/dist/__tests__/otel.test.d.ts +0 -1
- package/dist/__tests__/worker-context.test.d.ts +0 -1
- package/dist/__tests__/worker-exit.fixture.d.ts +0 -1
- package/dist/__tests__/worker-exit.integration.test.d.ts +0 -1
- package/dist/index.test.d.ts +0 -1
- package/dist/managed-v1.test.d.ts +0 -1
- package/dist/memory.test.d.ts +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ImportViolation } from "./plugin.ts";
|
|
2
|
+
/** The subset of Bun's `BuildMetafile` the gate reads. */
|
|
3
|
+
export interface MetafileInputs {
|
|
4
|
+
inputs: Record<string, {
|
|
5
|
+
imports: Array<{
|
|
6
|
+
path: string;
|
|
7
|
+
kind: string;
|
|
8
|
+
original?: string;
|
|
9
|
+
external?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export interface Problem {
|
|
14
|
+
message: string;
|
|
15
|
+
/** Entry point first, offending module last; absolute paths. */
|
|
16
|
+
chain: string[];
|
|
17
|
+
}
|
|
18
|
+
/** Metafile keys are relative to the process cwd; namespaced keys (`ns:path`) are left as-is. */
|
|
19
|
+
export declare function metafileKeyToPath(key: string, cwd: string): string;
|
|
20
|
+
/** child → first importer, over resolved (non-external) imports. */
|
|
21
|
+
export declare function importerGraph(metafile: MetafileInputs, cwd: string): Map<string, string>;
|
|
22
|
+
export declare function importerChain(file: string, parents: ReadonlyMap<string, string>): string[];
|
|
23
|
+
/** Source with comments and types removed, so prose mentioning `Bun.x` is not flagged. */
|
|
24
|
+
export declare function codeOf(file: string, source: string): string | undefined;
|
|
25
|
+
/** Problems visible in one module's own code (not its imports). */
|
|
26
|
+
export declare function scanModule(file: string, code: string, importedSpecifiers: readonly string[]): string[];
|
|
27
|
+
export declare function collectProblems(metafile: MetafileInputs, violations: readonly ImportViolation[], cwd: string): Problem[];
|
|
28
|
+
export declare function formatProblems(problems: readonly Problem[], cwd: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatic API of burger-build, published as `@econ-v1/app-sdk/burger-build`.
|
|
3
|
+
* The `burger-build` command (`./cli.ts`) is the usual entry point; this module
|
|
4
|
+
* is for build scripts that run the same steps from Bun.
|
|
5
|
+
*/
|
|
6
|
+
export { buildApp, type BuildOptions, type BuildOutcome } from "./build.ts";
|
|
7
|
+
export { MIN_BUN_VERSION } from "./bun-version.ts";
|
|
8
|
+
export type { Problem } from "./gate.ts";
|
|
9
|
+
export { prepareTests, type ImportMap, type TestPlan, type TestPlanEntry, type TestPrepareOptions, type TestPrepareOutcome, } from "./test-prepare.ts";
|