@agimon-ai/doompi-build 0.0.1-alpha.2 → 0.0.1-alpha.21

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.
Files changed (90) hide show
  1. package/dist/constants/contributions.cjs +1 -1
  2. package/dist/constants/contributions.cjs.map +1 -1
  3. package/dist/constants/contributions.mjs +1 -1
  4. package/dist/constants/contributions.mjs.map +1 -1
  5. package/dist/constants/layout.cjs +1 -1
  6. package/dist/constants/layout.cjs.map +1 -1
  7. package/dist/constants/layout.d.mts.map +1 -1
  8. package/dist/constants/layout.mjs +1 -1
  9. package/dist/constants/layout.mjs.map +1 -1
  10. package/dist/services/generate/index.cjs +1 -1
  11. package/dist/services/generate/index.cjs.map +1 -1
  12. package/dist/services/generate/index.d.mts.map +1 -1
  13. package/dist/services/generate/index.mjs +1 -1
  14. package/dist/services/generate/index.mjs.map +1 -1
  15. package/dist/services/generate/type.d.mts +2 -0
  16. package/dist/services/generate/type.d.mts.map +1 -1
  17. package/dist/services/renderClient/index.cjs +1 -1
  18. package/dist/services/renderClient/index.cjs.map +1 -1
  19. package/dist/services/renderClient/index.mjs +1 -1
  20. package/dist/services/renderClient/index.mjs.map +1 -1
  21. package/dist/services/renderEntry/index.cjs +4 -3
  22. package/dist/services/renderEntry/index.cjs.map +1 -1
  23. package/dist/services/renderEntry/index.d.mts.map +1 -1
  24. package/dist/services/renderEntry/index.mjs +4 -3
  25. package/dist/services/renderEntry/index.mjs.map +1 -1
  26. package/dist/services/renderEntry/type.d.mts +2 -0
  27. package/dist/services/renderEntry/type.d.mts.map +1 -1
  28. package/dist/services/renderMcpWidgets/index.cjs +3 -0
  29. package/dist/services/renderMcpWidgets/index.cjs.map +1 -0
  30. package/dist/services/renderMcpWidgets/index.mjs +3 -0
  31. package/dist/services/renderMcpWidgets/index.mjs.map +1 -0
  32. package/dist/services/resolveTarget/index.cjs +1 -1
  33. package/dist/services/resolveTarget/index.cjs.map +1 -1
  34. package/dist/services/resolveTarget/index.d.mts.map +1 -1
  35. package/dist/services/resolveTarget/index.mjs +1 -1
  36. package/dist/services/resolveTarget/index.mjs.map +1 -1
  37. package/dist/services/resolveTarget/type.d.mts +2 -2
  38. package/dist/services/scan/index.cjs +1 -1
  39. package/dist/services/scan/index.cjs.map +1 -1
  40. package/dist/services/scan/index.mjs +1 -1
  41. package/dist/services/scan/index.mjs.map +1 -1
  42. package/dist/services/syncManifest/index.cjs +1 -1
  43. package/dist/services/syncManifest/index.cjs.map +1 -1
  44. package/dist/services/syncManifest/index.d.mts.map +1 -1
  45. package/dist/services/syncManifest/index.mjs +1 -1
  46. package/dist/services/syncManifest/index.mjs.map +1 -1
  47. package/dist/services/tsdownPreset/index.cjs +1 -1
  48. package/dist/services/tsdownPreset/index.cjs.map +1 -1
  49. package/dist/services/tsdownPreset/index.d.mts +24 -5
  50. package/dist/services/tsdownPreset/index.d.mts.map +1 -1
  51. package/dist/services/tsdownPreset/index.mjs +1 -1
  52. package/dist/services/tsdownPreset/index.mjs.map +1 -1
  53. package/package.json +5 -5
  54. package/dist/browserFile.d.cts +0 -2
  55. package/dist/constants/layout.d.cts +0 -59
  56. package/dist/constants/layout.d.cts.map +0 -1
  57. package/dist/index.d.cts +0 -16
  58. package/dist/services/browserFile/index.d.cts +0 -28
  59. package/dist/services/browserFile/index.d.cts.map +0 -1
  60. package/dist/services/filename/index.d.cts +0 -29
  61. package/dist/services/filename/index.d.cts.map +0 -1
  62. package/dist/services/generate/index.d.cts +0 -15
  63. package/dist/services/generate/index.d.cts.map +0 -1
  64. package/dist/services/generate/type.d.cts +0 -26
  65. package/dist/services/generate/type.d.cts.map +0 -1
  66. package/dist/services/renderEntry/index.d.cts +0 -24
  67. package/dist/services/renderEntry/index.d.cts.map +0 -1
  68. package/dist/services/renderEntry/type.d.cts +0 -14
  69. package/dist/services/renderEntry/type.d.cts.map +0 -1
  70. package/dist/services/resolveTarget/index.d.cts +0 -16
  71. package/dist/services/resolveTarget/index.d.cts.map +0 -1
  72. package/dist/services/resolveTarget/type.d.cts +0 -34
  73. package/dist/services/resolveTarget/type.d.cts.map +0 -1
  74. package/dist/services/scan/index.d.cts +0 -19
  75. package/dist/services/scan/index.d.cts.map +0 -1
  76. package/dist/services/scan/type.d.cts +0 -25
  77. package/dist/services/scan/type.d.cts.map +0 -1
  78. package/dist/services/segments/index.d.cts +0 -26
  79. package/dist/services/segments/index.d.cts.map +0 -1
  80. package/dist/services/syncManifest/index.d.cts +0 -21
  81. package/dist/services/syncManifest/index.d.cts.map +0 -1
  82. package/dist/services/syncManifest/type.d.cts +0 -15
  83. package/dist/services/syncManifest/type.d.cts.map +0 -1
  84. package/dist/services/tsdownPreset/index.d.cts +0 -63
  85. package/dist/services/tsdownPreset/index.d.cts.map +0 -1
  86. package/dist/services/writeGenerated/index.d.cts +0 -23
  87. package/dist/services/writeGenerated/index.d.cts.map +0 -1
  88. package/dist/tsdown.d.cts +0 -2
  89. package/dist/types/extensionGraph.d.cts +0 -75
  90. package/dist/types/extensionGraph.d.cts.map +0 -1
@@ -1,26 +0,0 @@
1
- import { RouteParam } from "../../types/extensionGraph.cjs";
2
- //#region src/services/segments/index.d.ts
3
- /**
4
- * What one folder name means, using Next.js spelling throughout.
5
- *
6
- * A group is organisational and invisible to the path. A private folder is
7
- * colocation and is never scanned. A dynamic segment is a route parameter.
8
- * Everything else is a plain segment whose meaning depends on where it sits.
9
- */
10
- export type Segment = {
11
- readonly kind: 'group';
12
- readonly name: string;
13
- } | {
14
- readonly kind: 'private';
15
- readonly name: string;
16
- } | {
17
- readonly kind: 'dynamic';
18
- readonly param: RouteParam;
19
- } | {
20
- readonly kind: 'plain';
21
- readonly name: string;
22
- };
23
- /** Classifies one folder name. Never throws: an unusable name is simply plain. */
24
- export declare function classifySegment(segment: string): Segment;
25
- //#endregion
26
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/segments/index.ts"],"mappings":";;;;;;;;;YAiBY;WACG;WAAwB;;WACxB;WAA0B;;WAC1B;WAA0B,OAAO;;WACjC;WAAwB;;;wBASvB,gBAAgB,kBAAkB"}
@@ -1,21 +0,0 @@
1
- import { BuildTarget } from "../resolveTarget/type.cjs";
2
- import { ManifestSync } from "./type.cjs";
3
- //#region src/services/syncManifest/index.d.ts
4
- /**
5
- * Everything the manifest can say about a package that its tree already says.
6
- *
7
- * The three host blocks are pure restatements of the folder tree: which hosts
8
- * the package contributes to, at which scopes, and which frame types the
9
- * browser claims. Leaving them hand-written is what made a package declare the
10
- * same thing in six places, so the build writes them.
11
- *
12
- * Returns the manifest rather than writing it, so a caller can diff it and a
13
- * test can read it without a filesystem.
14
- */
15
- export declare function syncManifest(input: ManifestSync): Record<string, unknown>;
16
- /** Writes the synced manifest when it differs, so a second build is a no-op. */
17
- export declare function writeManifest(input: ManifestSync & {
18
- readonly targets: readonly BuildTarget[];
19
- }): boolean;
20
- //#endregion
21
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/syncManifest/index.ts"],"mappings":";;;;;;;;;;;;;;wBA+FgB,aAAa,OAAO,eAAe;;wBAqDnC,cAAc,OAAO;WAA0B,kBAAkB"}
@@ -1,15 +0,0 @@
1
- import { ExtensionGraph } from "../../types/extensionGraph.cjs";
2
- import { BuildTarget } from "../resolveTarget/type.cjs";
3
- //#region src/services/syncManifest/type.d.ts
4
- /** Everything deriving a manifest needs, so nothing has to rescan. */
5
- export interface ManifestSync {
6
- readonly packageDir: string;
7
- /** The manifest as read, which the sync returns a copy of. */
8
- readonly manifest: Record<string, unknown>;
9
- readonly graph: ExtensionGraph;
10
- /** Hosts this package contributes to, as the generator resolved them. */
11
- readonly targets: readonly BuildTarget[];
12
- readonly pluginId: string;
13
- }
14
- //#endregion
15
- //# sourceMappingURL=type.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.cts","names":[],"sources":["../../../src/services/syncManifest/type.ts"],"mappings":";;;;iBAIiB;WACN;;WAEA,UAAU;WACV,OAAO;;WAEP,kBAAkB;WAClB"}
@@ -1,63 +0,0 @@
1
- import { GenerateOptions } from "../generate/type.cjs";
2
- //#region src/services/tsdownPreset/index.d.ts
3
- interface EmittedFile {
4
- readonly type: 'asset' | 'chunk';
5
- readonly id?: string;
6
- readonly name: string;
7
- readonly source?: Buffer;
8
- }
9
- interface QueryAssetPlugin {
10
- readonly name: string;
11
- resolveId(source: string, importer: string | undefined): string | undefined;
12
- load(this: {
13
- emitFile(file: EmittedFile): string;
14
- }, id: string): string | undefined;
15
- }
16
- /** The shape a tsdown config needs from this preset, without importing tsdown's types. */
17
- interface BrowserPresetConfig {
18
- entry: Record<string, string>;
19
- clean: boolean;
20
- dts: false;
21
- exports: boolean;
22
- format: 'esm'[];
23
- platform: 'browser';
24
- fixedExtension: boolean;
25
- external: (id: string) => boolean;
26
- plugins: QueryAssetPlugin[];
27
- sourcemap: boolean;
28
- unbundle: boolean;
29
- }
30
- interface PresetConfig {
31
- entry: Record<string, string>;
32
- clean: boolean;
33
- dts: {
34
- incremental: boolean;
35
- parallel: boolean;
36
- eager: boolean;
37
- };
38
- exports: boolean;
39
- format: ('esm' | 'cjs')[];
40
- platform: 'node';
41
- sourcemap: boolean;
42
- unbundle: boolean;
43
- hooks: {
44
- 'build:done': () => void;
45
- };
46
- }
47
- /**
48
- * One tsdown config for a folder-routed extension.
49
- *
50
- * Entries come from the tree rather than a hand-written list, and the manifest
51
- * blocks that restate the tree are written after the build rather than kept in
52
- * step by hand. Browser contributions are emitted through a second bundled
53
- * config because their routed source is not published.
54
- */
55
- export interface ExtensionPresetOptions extends GenerateOptions {
56
- /** Extra tsdown entries beyond the derived ones. */
57
- readonly entry?: Record<string, string>;
58
- /** Public export modules, package-relative. Defaults to `src/exports`. */
59
- readonly exportsDir?: string;
60
- }
61
- export declare function doompiExtension(options?: ExtensionPresetOptions): PresetConfig | (PresetConfig | BrowserPresetConfig)[];
62
- //#endregion
63
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/tsdownPreset/index.ts"],"mappings":";;UASU;WACC;WACA;WACA;WACA,SAAS;;UAGV;WACC;EACT,UAAU,gBAAgB;EAC1B,KAAK;IAAQ,SAAS,MAAM;KAAwB;;;UAI5C;EACR,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,SAAS;EACT;EACA;;UAGQ;EACR,OAAO;EACP;EACA;IAAO;IAAsB;IAAmB;;EAChD;EACA;EACA;EACA;EACA;EACA;IAAS;;;;;;;;;;;iBA0BM,+BAA+B;;WAErC,QAAQ;;WAER;;wBAqEK,gBACd,UAAS,yBACR,gBAAgB,eAAe"}
@@ -1,23 +0,0 @@
1
- //#region src/services/writeGenerated/index.d.ts
2
- /** What a sync pass did, or would have done. */
3
- export interface WriteResult {
4
- /** Package-relative paths whose contents changed. */
5
- readonly changed: readonly string[];
6
- }
7
- export declare class StaleGeneratedError extends Error {
8
- readonly stale: readonly string[];
9
- constructor(stale: readonly string[]);
10
- }
11
- /**
12
- * Write-if-changed locally, throw on stale under an explicit `check`.
13
- *
14
- * Generated entries are ignored build inputs, so normal and CI builds create
15
- * them. Explicit check mode remains available to callers that need to compare
16
- * an existing generated tree without changing it.
17
- *
18
- * Writing only on a real change matters for watch mode: an unconditional
19
- * write would retrigger the watcher that called it.
20
- */
21
- export declare function writeGenerated(packageDir: string, files: ReadonlyMap<string, string>, check?: boolean, managed?: readonly string[]): WriteResult;
22
- //#endregion
23
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/services/writeGenerated/index.ts"],"mappings":";;iBAIiB;;WAEN;;qBAGE,4BAA4B;WAClB;EAArB,YAAqB;;;;;;;;;;;;wBAgBP,eACd,oBACA,OAAO,6BACP,iBACA,8BACC"}
package/dist/tsdown.d.cts DELETED
@@ -1,2 +0,0 @@
1
- import { ExtensionPresetOptions, doompiExtension } from "./services/tsdownPreset/index.cjs";
2
- export { type ExtensionPresetOptions, doompiExtension };
@@ -1,75 +0,0 @@
1
- //#region src/types/extensionGraph.d.ts
2
- /** The scopes a contribution can mount at, in nesting order. */
3
- export type ExtensionScope = 'global' | 'workspace' | 'session';
4
- /** Which half of the package a contribution belongs to. */
5
- export type ExtensionSide = 'backend' | 'frontend';
6
- /**
7
- * What a scanned file is, beyond which surface it feeds.
8
- *
9
- * `root` is the scope's constructor, as Next.js spells a layout: it runs
10
- * before anything below it, builds whatever that subtree shares, and every
11
- * routed file under it receives the result as part of its mount context. It is
12
- * also where a scope's teardown goes, because it is the only file that can see
13
- * the whole lifetime.
14
- */
15
- export type EntryRole = 'contribution' | 'escape-hatch' | 'root';
16
- /** One gate folder and the id it names. */
17
- export interface ExtensionGate {
18
- readonly kind: string;
19
- readonly id: string;
20
- }
21
- /** One dynamic route segment, as Next.js spells it. */
22
- export interface RouteParam {
23
- readonly name: string;
24
- readonly catchAll: boolean;
25
- }
26
- /** One route segment below a routed surface: a literal, or a parameter. */
27
- export type RouteSegment = {
28
- readonly literal: string;
29
- } | {
30
- readonly param: RouteParam;
31
- };
32
- /**
33
- * One scanned file and everything its path declares about it.
34
- *
35
- * The scan produces these and nothing else. Turning them into host
36
- * contributions is the generator's job, so this stays a description of the
37
- * tree rather than of any one host.
38
- */
39
- export interface ExtensionEntry {
40
- /** Package-relative POSIX path. */
41
- readonly file: string;
42
- readonly scope: ExtensionScope;
43
- readonly side: ExtensionSide;
44
- /** Gates wrapping this contribution, outermost first. */
45
- readonly gates: readonly ExtensionGate[];
46
- /** Surface folder, such as `tool`. Absent for the escape hatch. */
47
- readonly surface: string | undefined;
48
- /** Route path below a routed surface. Empty for every other surface. */
49
- readonly route: readonly RouteSegment[];
50
- /** Contribution identity, from the filename. */
51
- readonly name: string;
52
- /** Relationship target, such as the slot a fill names. */
53
- readonly target: string | undefined;
54
- /** Platform this file serves. Undefined only for a file the scan has already reported. */
55
- readonly platform: string | undefined;
56
- /** Helper-declared cardinality. Omitted means exactly one contribution. */
57
- readonly cardinality?: 'optional' | 'many' | 'collection';
58
- /** Whether this declares a contribution, a scope root, or the escape hatch. */
59
- readonly role: EntryRole;
60
- }
61
- /** Something the scan skipped, and why. Never fatal. */
62
- export interface ExtensionNotice {
63
- /** Package-relative POSIX path of the file or folder skipped. */
64
- readonly path: string;
65
- readonly message: string;
66
- }
67
- /** Everything one package's routing root declares. */
68
- export interface ExtensionGraph {
69
- /** Package-relative POSIX path of the routing root that was scanned. */
70
- readonly root: string;
71
- readonly entries: readonly ExtensionEntry[];
72
- readonly notices: readonly ExtensionNotice[];
73
- }
74
- //#endregion
75
- //# sourceMappingURL=extensionGraph.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extensionGraph.d.cts","names":[],"sources":["../../src/types/extensionGraph.ts"],"mappings":";;YACY;;YAGA;;;;;;;;;;YAWA;;iBAGK;WACN;WACA;;;iBAIM;WACN;WACA;;;YAIC;WAA0B;;WAA+B,OAAO;;;;;;;;;iBAS3D;;WAEN;WACA,OAAO;WACP,MAAM;;WAEN,gBAAgB;;WAEhB;;WAEA,gBAAgB;;WAEhB;;WAEA;;WAEA;;WAEA;;WAEA,MAAM;;;iBAIA;;WAEN;WACA;;;iBAIM;;WAEN;WACA,kBAAkB;WAClB,kBAAkB"}