@jointhedots/gear 1.1.18 → 1.2.2

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 (113) hide show
  1. package/esm/builder/build-app-bundle.d.ts +28 -0
  2. package/esm/builder/build-app-bundle.js +4 -7
  3. package/esm/builder/build-app-host.d.ts +28 -0
  4. package/esm/builder/build-app-host.js +0 -1
  5. package/esm/builder/build-application.d.ts +47 -0
  6. package/esm/builder/build-application.js +3 -5
  7. package/esm/builder/build-library.d.ts +20 -0
  8. package/esm/builder/build-library.js +1 -2
  9. package/esm/builder/build-target.d.ts +27 -0
  10. package/esm/builder/build-target.js +3 -4
  11. package/esm/builder/helpers/emit-bundle-manifest.d.ts +9 -0
  12. package/esm/builder/helpers/emit-bundle-manifest.js +1 -2
  13. package/esm/builder/helpers/emit-components-dts.d.ts +9 -0
  14. package/esm/builder/helpers/emit-components-dts.js +1 -2
  15. package/esm/builder/helpers/emit-esmodules.d.ts +61 -0
  16. package/esm/builder/helpers/emit-esmodules.js +5 -6
  17. package/esm/builder/helpers/emit-package-manifest.d.ts +9 -0
  18. package/esm/builder/helpers/emit-package-manifest.js +0 -1
  19. package/esm/builder/helpers/emit-static-assets.d.ts +14 -0
  20. package/esm/builder/helpers/emit-static-assets.js +1 -2
  21. package/esm/builder/helpers/emit-typescript-definition.d.ts +35 -0
  22. package/esm/builder/helpers/emit-typescript-definition.js +6 -7
  23. package/esm/builder/helpers/path-helpers.d.ts +9 -0
  24. package/esm/builder/helpers/path-helpers.js +0 -1
  25. package/esm/builder/helpers/task.d.ts +8 -0
  26. package/esm/builder/helpers/task.js +0 -1
  27. package/esm/cli.d.ts +2 -0
  28. package/esm/cli.js +1 -4
  29. package/esm/commands/init.d.ts +2 -0
  30. package/esm/commands/init.js +0 -1
  31. package/esm/commands/install.d.ts +5 -0
  32. package/esm/commands/install.js +4 -5
  33. package/esm/commands/make.d.ts +16 -0
  34. package/esm/commands/make.js +5 -5
  35. package/esm/commands/run.d.ts +8 -0
  36. package/esm/commands/run.js +6 -7
  37. package/esm/commands/serve.d.ts +9 -0
  38. package/esm/commands/serve.js +3 -4
  39. package/esm/core/commands/interface.d.ts +26 -0
  40. package/esm/core/commands/interface.js +21 -0
  41. package/esm/core/components/components.d.ts +73 -0
  42. package/esm/core/components/components.js +2 -0
  43. package/esm/core/components/helpers.d.ts +7 -0
  44. package/esm/core/components/helpers.js +68 -0
  45. package/esm/core/components/manifold.d.ts +77 -0
  46. package/esm/core/components/manifold.js +442 -0
  47. package/esm/core/components/mod.d.ts +4 -0
  48. package/esm/core/components/mod.js +4 -0
  49. package/esm/core/components/provider.d.ts +42 -0
  50. package/esm/core/components/provider.js +127 -0
  51. package/esm/core/logging/mod.d.ts +53 -0
  52. package/esm/core/logging/mod.js +142 -0
  53. package/esm/core/logging/trace.d.ts +51 -0
  54. package/esm/core/logging/trace.js +17 -0
  55. package/esm/core/mod-browser.d.ts +1 -0
  56. package/esm/core/mod-browser.js +1 -0
  57. package/esm/core/mod-node.d.ts +1 -0
  58. package/esm/core/mod-node.js +1 -0
  59. package/esm/core/mod.d.ts +5 -0
  60. package/esm/core/mod.js +5 -0
  61. package/esm/core/schema/helpers.d.ts +36 -0
  62. package/esm/core/schema/helpers.js +163 -0
  63. package/esm/core/schema/mod.d.ts +3 -0
  64. package/esm/core/schema/mod.js +3 -0
  65. package/esm/core/schema/schema.d.ts +376 -0
  66. package/esm/core/schema/schema.js +234 -0
  67. package/esm/core/schema/zod.d.ts +44 -0
  68. package/esm/core/schema/zod.js +127 -0
  69. package/esm/core/services/mod.d.ts +5 -0
  70. package/esm/core/services/mod.js +5 -0
  71. package/esm/core/services/service-accessor.d.ts +17 -0
  72. package/esm/core/services/service-accessor.js +20 -0
  73. package/esm/core/services/service-definitions.d.ts +37 -0
  74. package/esm/core/services/service-definitions.js +44 -0
  75. package/esm/core/services/service-points.d.ts +40 -0
  76. package/esm/core/services/service-points.js +164 -0
  77. package/esm/core/services/service-specification.d.ts +52 -0
  78. package/esm/core/services/service-specification.js +59 -0
  79. package/esm/core/services/settings.d.ts +29 -0
  80. package/esm/core/services/settings.js +123 -0
  81. package/esm/utils/file.d.ts +39 -0
  82. package/esm/utils/file.js +3 -4
  83. package/esm/utils/graph-ordering.d.ts +21 -0
  84. package/esm/utils/graph-ordering.js +0 -1
  85. package/esm/utils/normalized-name.d.ts +17 -0
  86. package/esm/utils/normalized-name.js +0 -1
  87. package/esm/workspace/component.d.ts +70 -0
  88. package/esm/workspace/component.js +0 -1
  89. package/esm/workspace/helpers/config-loader.d.ts +37 -0
  90. package/esm/workspace/helpers/config-loader.js +4 -5
  91. package/esm/workspace/helpers/create-manifests.d.ts +13 -0
  92. package/esm/workspace/helpers/create-manifests.js +1 -2
  93. package/esm/workspace/helpers/discover-workspace.d.ts +4 -0
  94. package/esm/workspace/helpers/discover-workspace.js +130 -134
  95. package/esm/workspace/helpers/lockfile.d.ts +5 -0
  96. package/esm/workspace/helpers/lockfile.js +0 -1
  97. package/esm/workspace/helpers/logger.d.ts +65 -0
  98. package/esm/workspace/helpers/logger.js +0 -1
  99. package/esm/workspace/helpers/package-npm.d.ts +1 -0
  100. package/esm/workspace/helpers/package-npm.js +0 -1
  101. package/esm/workspace/mod.d.ts +1 -0
  102. package/esm/workspace/mod.js +1 -0
  103. package/esm/workspace/packager.d.ts +5 -0
  104. package/esm/workspace/packager.js +1 -2
  105. package/esm/workspace/packagers/packager-standard.d.ts +7 -0
  106. package/esm/workspace/packagers/packager-standard.js +48 -24
  107. package/esm/workspace/storage.d.ts +59 -0
  108. package/esm/workspace/storage.js +19 -15
  109. package/esm/workspace/workspace.d.ts +161 -0
  110. package/esm/workspace/workspace.js +25 -17
  111. package/package.json +25 -18
  112. package/esm/commands/publish.js +0 -36
  113. package/esm/publish/publish_aws_s3.js +0 -67
@@ -0,0 +1,28 @@
1
+ import { Bundle, Library } from "../workspace/workspace.ts";
2
+ import { StorageFiles, type IStorageZone } from "../workspace/storage.ts";
3
+ import { BuildTarget } from "./build-target.ts";
4
+ export type BuildBundleOptions = {
5
+ bundle: Bundle;
6
+ shelve: StorageFiles;
7
+ version: string;
8
+ devmode: boolean;
9
+ watch: boolean;
10
+ clean: boolean;
11
+ };
12
+ export declare enum PathStatus {
13
+ Unknown,
14
+ Internal = 1,
15
+ External = 2,
16
+ Dependency = 3,
17
+ ExternalBundle = 4
18
+ }
19
+ export declare function create_bundle_target(opts: {
20
+ bundle: Bundle;
21
+ library: Library;
22
+ storage: IStorageZone;
23
+ version: string;
24
+ devmode: boolean;
25
+ watch: boolean;
26
+ clean: boolean;
27
+ }): BuildTarget;
28
+ export declare function build_app_composable_bundle(opts: BuildBundleOptions): Promise<BuildTarget>;
@@ -17,8 +17,7 @@ export var PathStatus;
17
17
  PathStatus[PathStatus["ExternalBundle"] = 4] = "ExternalBundle";
18
18
  })(PathStatus || (PathStatus = {}));
19
19
  export function create_bundle_target(opts) {
20
- const { bundle, library, storage } = opts;
21
- const lib = library;
20
+ const { bundle, library: lib, storage } = opts;
22
21
  const target = new BuildTarget(bundle.id, storage, lib.workspace, opts.devmode == true, opts.watch == true, opts.clean == true);
23
22
  // Prepare esm setup
24
23
  target.esmodules.set_root(lib.path);
@@ -84,7 +83,7 @@ export function create_bundle_target(opts) {
84
83
  paths_qualifier.set(dep, PathStatus.ExternalBundle);
85
84
  }
86
85
  }
87
- for (const xbun of lib.workspace.bundles) {
86
+ for (const xbun of lib.shelve) {
88
87
  if (xbun !== bundle) {
89
88
  paths_qualifier.set(xbun.id, xbun);
90
89
  paths_qualifier.set(xbun.alias, xbun);
@@ -169,9 +168,8 @@ export function create_bundle_target(opts) {
169
168
  }
170
169
  });
171
170
  // Register esbuild plugin for dependency deduplication (graph-based + singleton)
172
- const ws = library.workspace;
173
- const rootNodeModules = ws.search_directories[0] || Path.join(ws.path, 'node_modules');
174
- const libGraph = collectLibraryGraph(library);
171
+ const rootNodeModules = lib.search_directories[0] || Path.join(lib.path, 'node_modules');
172
+ const libGraph = collectLibraryGraph(lib);
175
173
  target.esmodules.plugins.push(DependencyDeduplicationPlugin(libGraph, rootNodeModules, target.log));
176
174
  return target;
177
175
  }
@@ -197,4 +195,3 @@ export async function build_app_composable_bundle(opts) {
197
195
  bundle.log.info(`Prebuild bundle: ${opts.bundle.id}`);
198
196
  }
199
197
  }
200
- //# sourceMappingURL=build-app-bundle.js.map
@@ -0,0 +1,28 @@
1
+ import { Bundle, Workspace } from "../workspace/workspace.ts";
2
+ import { BuildTarget } from "./build-target.ts";
3
+ import { type BuildApplicationOptions } from "./build-application.ts";
4
+ import { type BundleID } from "../workspace/component.ts";
5
+ import { BuildTask } from "./helpers/task.ts";
6
+ export declare class ShelveManifestTask extends BuildTask {
7
+ readonly target: BuildTarget;
8
+ readonly bundles: Bundle[];
9
+ constructor(target: BuildTarget, bundles: Bundle[]);
10
+ execute(): Promise<void>;
11
+ }
12
+ export declare function build_app_composable_host(opts: BuildApplicationOptions): Promise<void>;
13
+ export declare class BundleSelector {
14
+ readonly workspace: Workspace;
15
+ readonly selected: Map<string, Bundle>;
16
+ readonly missing: BundleID[];
17
+ constructor(workspace: Workspace);
18
+ /** Add a bundle and recursively collect all its dependencies */
19
+ add(bundle: string | Bundle): this;
20
+ /** Check if the selector has any bundles */
21
+ get isEmpty(): boolean;
22
+ /** Get all selected bundles as an array in topological order (dependencies first) */
23
+ toArray(): Bundle[];
24
+ /** Get all selected bundle IDs */
25
+ getIds(): BundleID[];
26
+ /** Iterate over selected bundles */
27
+ [Symbol.iterator](): Iterator<Bundle>;
28
+ }
@@ -214,4 +214,3 @@ export class BundleSelector {
214
214
  return this.toArray().values();
215
215
  }
216
216
  }
217
- //# sourceMappingURL=build-app-host.js.map
@@ -0,0 +1,47 @@
1
+ import Sharp from "sharp";
2
+ import { type AppEntry, type ChromeAppManifest, type WebviewEntry } from "../workspace/workspace.ts";
3
+ import { StorageFiles } from "../workspace/storage.ts";
4
+ import { BuildTarget } from "./build-target.ts";
5
+ import type { WebAppManifest } from "web-app-manifest";
6
+ import { BuildTask } from "./helpers/task.ts";
7
+ export type BuildApplicationOptions = {
8
+ app: AppEntry;
9
+ storage: StorageFiles;
10
+ version: string;
11
+ devmode?: boolean;
12
+ watch?: boolean;
13
+ clean?: boolean;
14
+ devserver?: string;
15
+ };
16
+ export declare function create_application_monolith_target(opts: {
17
+ app: AppEntry;
18
+ storage: StorageFiles;
19
+ version: string;
20
+ devmode: boolean;
21
+ devserver?: string;
22
+ watch: boolean;
23
+ clean: boolean;
24
+ }): BuildTarget;
25
+ export declare function build_app_monolith(opts: BuildApplicationOptions): Promise<void>;
26
+ export declare function build_application(opts: BuildApplicationOptions): Promise<void>;
27
+ export declare class WebviewTask extends BuildTask {
28
+ readonly name: string;
29
+ readonly title: string;
30
+ readonly desc: WebviewEntry;
31
+ readonly html_injects: string[];
32
+ constructor(target: BuildTarget, name: string, title: string, desc: WebviewEntry, html_injects: string[]);
33
+ execute(): Promise<void>;
34
+ }
35
+ export declare class ChromePackageTask extends BuildTask {
36
+ readonly app: AppEntry;
37
+ readonly version: string;
38
+ constructor(target: BuildTarget, app: AppEntry, version: string);
39
+ execute(): Promise<void>;
40
+ createIcons(base: Sharp.Sharp): Promise<ChromeAppManifest["icons"]>;
41
+ }
42
+ export declare class PWAPackageTask extends BuildTask {
43
+ readonly app: AppEntry;
44
+ constructor(target: BuildTarget, app: AppEntry);
45
+ execute(): Promise<void>;
46
+ createIcons(base: Sharp.Sharp): Promise<WebAppManifest["icons"]>;
47
+ }
@@ -1,6 +1,6 @@
1
1
  import Path from "node:path";
2
2
  import Sharp from "sharp";
3
- import MIME from 'mime';
3
+ import MIME from "mime";
4
4
  import { Library, matchComponentSelection } from "../workspace/workspace.js";
5
5
  import { StorageFiles } from "../workspace/storage.js";
6
6
  import { BuildTarget } from "./build-target.js";
@@ -33,8 +33,7 @@ export function create_application_monolith_target(opts) {
33
33
  const { app, version } = opts;
34
34
  const { type, name, webviews, modules, assets, components } = app.descriptor;
35
35
  const lib = app.library;
36
- const ws = lib.workspace;
37
- const target = new BuildTarget(name, opts.storage, ws, opts.devmode == true, opts.watch == true, opts.clean == true);
36
+ const target = new BuildTarget(name, opts.storage, lib.workspace, opts.devmode == true, opts.watch == true, opts.clean == true);
38
37
  const libs = collect_app_libraries(app);
39
38
  target.log.info(`+ 🧭 app-library-graph: ${libs.map(lib => `${lib.name}@${lib.descriptor.version}`).join(", ")}`);
40
39
  // Prepare esm setup
@@ -152,7 +151,7 @@ export function create_application_monolith_target(opts) {
152
151
  }
153
152
  }
154
153
  // Register esbuild plugin for dependency deduplication (graph-based + singleton)
155
- const rootNodeModules = ws.search_directories[0] || Path.join(ws.path, 'node_modules');
154
+ const rootNodeModules = lib.search_directories[0] || Path.join(lib.path, 'node_modules');
156
155
  target.esmodules.plugins.push(DependencyDeduplicationPlugin(libs, rootNodeModules, target.log));
157
156
  return target;
158
157
  }
@@ -313,4 +312,3 @@ function createIcon(base, size, format) {
313
312
  .toFormat(format, { quality: 80 })
314
313
  .toBuffer();
315
314
  }
316
- //# sourceMappingURL=build-application.js.map
@@ -0,0 +1,20 @@
1
+ import { Library } from "../workspace/workspace.ts";
2
+ import { StorageFiles } from "../workspace/storage.ts";
3
+ import { BuildTarget } from "./build-target.ts";
4
+ export type BuildLibraryOptions = {
5
+ library: Library;
6
+ storage: StorageFiles;
7
+ version: string;
8
+ devmode: boolean;
9
+ watch: boolean;
10
+ clean: boolean;
11
+ };
12
+ export declare function create_library_target(opts: {
13
+ library: Library;
14
+ storage: StorageFiles;
15
+ version: string;
16
+ devmode: boolean;
17
+ watch: boolean;
18
+ clean: boolean;
19
+ }): BuildTarget;
20
+ export declare function build_library(opts: BuildLibraryOptions, packageDir?: string): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import Path from "node:path";
2
- import ChildProcess from "child_process";
2
+ import ChildProcess from "node:child_process";
3
3
  import { Library } from "../workspace/workspace.js";
4
4
  import { StorageFiles } from "../workspace/storage.js";
5
5
  import { BuildTarget } from "./build-target.js";
@@ -76,4 +76,3 @@ export async function build_library(opts, packageDir) {
76
76
  ChildProcess.execSync("npm pack --pack-destination " + packageDir, { cwd: target.storage.getBaseDirFS() });
77
77
  }
78
78
  }
79
- //# sourceMappingURL=build-library.js.map
@@ -0,0 +1,27 @@
1
+ import { type ComponentManifest } from "../workspace/component.ts";
2
+ import { Library, Workspace } from "../workspace/workspace.ts";
3
+ import type { Log } from "../workspace/helpers/logger.ts";
4
+ import { ESModulesTask } from "./helpers/emit-esmodules.ts";
5
+ import { type IStorageTransaction, type IStorageZone } from "../workspace/storage.ts";
6
+ import { AssetsTask } from "./helpers/emit-static-assets.ts";
7
+ import type { BuildTask } from "./helpers/task.ts";
8
+ export declare class BuildTarget {
9
+ readonly name: string;
10
+ readonly storage: IStorageZone;
11
+ readonly workspace: Workspace;
12
+ readonly devmode: boolean;
13
+ readonly watch: boolean;
14
+ readonly clean: boolean;
15
+ components: Map<string, ComponentManifest>;
16
+ esmodules: ESModulesTask;
17
+ assets: AssetsTask;
18
+ tasks: BuildTask[];
19
+ transaction: IStorageTransaction;
20
+ readonly log: Log;
21
+ constructor(name: string, storage: IStorageZone, workspace: Workspace, devmode: boolean, watch: boolean, clean: boolean);
22
+ edit(): IStorageTransaction;
23
+ store(): Promise<void>;
24
+ add_component(descriptor: ComponentManifest, baseDir: string, library: Library): void;
25
+ private chrona;
26
+ build(): Promise<void>;
27
+ }
@@ -39,7 +39,7 @@ export class BuildTarget {
39
39
  add_component(descriptor, baseDir, library) {
40
40
  const id = descriptor.$id;
41
41
  if (this.components.has(id)) {
42
- throw new Error(createComponentDuplicateMessage(id, this.workspace));
42
+ throw new Error(createComponentDuplicateMessage(id, library));
43
43
  }
44
44
  const manifest = {
45
45
  ...descriptor,
@@ -94,10 +94,10 @@ export class BuildTarget {
94
94
  }
95
95
  }
96
96
  }
97
- function createComponentDuplicateMessage(id, workspace) {
97
+ function createComponentDuplicateMessage(id, library) {
98
98
  const duplicates = [];
99
99
  const libs = [];
100
- for (const bun of workspace.bundles) {
100
+ for (const bun of library.shelve) {
101
101
  for (const [cpath, cmanifest] of bun.components.entries()) {
102
102
  if (cmanifest.$id === id) {
103
103
  duplicates.push(`\n - ${cpath}`);
@@ -107,4 +107,3 @@ function createComponentDuplicateMessage(id, workspace) {
107
107
  }
108
108
  return `Component '${id}' declared multiple times: ${duplicates.join("")}\n> libraries:${libs.join("")}\n`;
109
109
  }
110
- //# sourceMappingURL=build-target.js.map
@@ -0,0 +1,9 @@
1
+ import type { Bundle } from "../../workspace/workspace.ts";
2
+ import { BuildTarget } from "../build-target.ts";
3
+ import { BuildTask } from "./task.ts";
4
+ export declare class BundleManifestTask extends BuildTask {
5
+ readonly target: BuildTarget;
6
+ readonly bundle: Bundle;
7
+ constructor(target: BuildTarget, bundle: Bundle);
8
+ execute(): Promise<void>;
9
+ }
@@ -1,7 +1,7 @@
1
1
  import { makeComponentPublication } from "../../workspace/component.js";
2
2
  import { BuildTarget } from "../build-target.js";
3
3
  import { BuildTask } from "./task.js";
4
- import MIME from 'mime';
4
+ import MIME from "mime";
5
5
  export class BundleManifestTask extends BuildTask {
6
6
  target;
7
7
  bundle;
@@ -26,4 +26,3 @@ export class BundleManifestTask extends BuildTask {
26
26
  await tx.commitFile(`bundle.manifest.json`, JSON.stringify(manifest, null, 2));
27
27
  }
28
28
  }
29
- //# sourceMappingURL=emit-bundle-manifest.js.map
@@ -0,0 +1,9 @@
1
+ import type { Bundle } from "../../workspace/workspace.ts";
2
+ import { BuildTarget } from "../build-target.ts";
3
+ import { BuildTask } from "./task.ts";
4
+ export declare class ComponentsDtsTask extends BuildTask {
5
+ readonly target: BuildTarget;
6
+ readonly bundle: Bundle;
7
+ constructor(target: BuildTarget, bundle: Bundle);
8
+ execute(): Promise<void>;
9
+ }
@@ -2,7 +2,7 @@ import { join } from "node:path";
2
2
  import { makeComponentPublication } from "../../workspace/component.js";
3
3
  import { BuildTarget } from "../build-target.js";
4
4
  import { BuildTask } from "./task.js";
5
- import MIME from 'mime';
5
+ import MIME from "mime";
6
6
  export class ComponentsDtsTask extends BuildTask {
7
7
  target;
8
8
  bundle;
@@ -63,4 +63,3 @@ const components_dts_generators = {
63
63
  "view.react": generate_view_react,
64
64
  "commands": generate_commands,
65
65
  };
66
- //# sourceMappingURL=emit-components-dts.js.map
@@ -0,0 +1,61 @@
1
+ import * as esbuild from "esbuild";
2
+ import type { Log } from "../../workspace/helpers/logger.ts";
3
+ import { Library } from "../../workspace/workspace.ts";
4
+ import type { ResourceEntry } from "../../workspace/component.ts";
5
+ import type { IStorageTransaction } from "../../workspace/storage.ts";
6
+ import { BuildTask } from "./task.ts";
7
+ export declare function StyleSheetPlugin(task: ESModulesTask): esbuild.Plugin;
8
+ export declare function StoragePlugin(task: ESModulesTask, onReady?: () => void): esbuild.Plugin;
9
+ export interface ESModuleResolverOptions {
10
+ task: ESModulesTask;
11
+ routeds?: Record<string, string>;
12
+ replaceds?: Record<string, string>;
13
+ }
14
+ /**
15
+ * Collects workspace libraries reachable from a root library (BFS).
16
+ * Index 0 = most dominant.
17
+ */
18
+ export declare function collectLibraryGraph(rootLib: Library): Library[];
19
+ /**
20
+ * Generic dependency deduplication plugin.
21
+ *
22
+ * For each npm package seen across multiple workspace libraries, forces resolution
23
+ * from the dominant library (first in BFS order) to guarantee a single version.
24
+ * Packages declaring `"singleton": true` in their package.json are always resolved
25
+ * from the root node_modules.
26
+ */
27
+ export declare function DependencyDeduplicationPlugin(libraries: Library[], rootNodeModules: string, log: Log): esbuild.Plugin;
28
+ /**
29
+ * Parses tsconfig.json compilerOptions (paths + baseUrl) and exposes resolved alias patterns.
30
+ * Looks for tsconfig.json in libraryPath first, then workspacePath as fallback.
31
+ */
32
+ export declare class TSConfig {
33
+ readonly baseUrl: string | null;
34
+ readonly patterns: [string, string][];
35
+ readonly configFile: string | null;
36
+ readonly configData: any;
37
+ constructor(libraryPath: string, workspacePath: string);
38
+ get hasAliases(): boolean;
39
+ /** Resolve an import path against tsconfig path aliases. Returns the resolved file path or null. */
40
+ resolve(importPath: string, resolveFilePath: (importPath: string, baseDir: string) => string | null): string | null;
41
+ }
42
+ export declare function ESModuleResolverPlugin(opts: ESModuleResolverOptions, tsconfigPaths?: TSConfig): esbuild.Plugin;
43
+ export declare class ESModulesTask extends BuildTask {
44
+ entries: {
45
+ [url: string]: string;
46
+ };
47
+ imports: {
48
+ [file: string]: string;
49
+ };
50
+ internals: Map<string, string>;
51
+ plugins: esbuild.Plugin[];
52
+ context: esbuild.BuildContext;
53
+ transaction: IStorageTransaction;
54
+ polyfilled: boolean;
55
+ rootPath: string;
56
+ set_root(path: string): void;
57
+ add_entry(name: string, path: string): void;
58
+ add_entry_typescript(code: string, name?: string): string;
59
+ add_resource_entry(resource: ResourceEntry, baseDir: string, library: Library): ResourceEntry;
60
+ execute(): Promise<void>;
61
+ }
@@ -1,10 +1,10 @@
1
1
  import Fs from "node:fs";
2
- import Path from 'node:path';
2
+ import Path from "node:path";
3
3
  import Url from "node:url";
4
- import MIME from 'mime';
5
- import postcss from 'postcss';
6
- import * as esbuild from 'esbuild';
7
- import { sassPlugin } from 'esbuild-sass-plugin';
4
+ import MIME from "mime";
5
+ import postcss from "postcss";
6
+ import * as esbuild from "esbuild";
7
+ import { sassPlugin } from "esbuild-sass-plugin";
8
8
  import { PackageRootDir, resolve_normalized_suffixed_path } from "../../utils/file.js";
9
9
  import { Library } from "../../workspace/workspace.js";
10
10
  import { computeNameHashID } from "../../utils/normalized-name.js";
@@ -619,4 +619,3 @@ export class ESModulesTask extends BuildTask {
619
619
  }
620
620
  }
621
621
  }
622
- //# sourceMappingURL=emit-esmodules.js.map
@@ -0,0 +1,9 @@
1
+ import { BuildTask } from "./task.ts";
2
+ import type { BuildTarget } from "../build-target.ts";
3
+ import type { Library } from "../../workspace/workspace.ts";
4
+ export declare class PackageManifestTask extends BuildTask {
5
+ readonly library: Library;
6
+ readonly version: string;
7
+ constructor(target: BuildTarget, library: Library, version: string);
8
+ execute(): Promise<void>;
9
+ }
@@ -16,4 +16,3 @@ export class PackageManifestTask extends BuildTask {
16
16
  tx.commitFile("package.json", JSON.stringify(pkg, null, 2));
17
17
  }
18
18
  }
19
- //# sourceMappingURL=emit-package-manifest.js.map
@@ -0,0 +1,14 @@
1
+ import { type AssetsEntry, Library } from "../../workspace/workspace.ts";
2
+ import { BuildTask } from "./task.ts";
3
+ export type AssetMapping = {
4
+ from: string;
5
+ to: string;
6
+ };
7
+ export declare class AssetsTask extends BuildTask {
8
+ assets: AssetMapping[];
9
+ statics: Record<string, string>;
10
+ add_entry(entry: AssetsEntry, baseDir: string, library: Library): void;
11
+ add_static_text(name: string, data: string): void;
12
+ add_static_json(name: string, data: any): void;
13
+ execute(): Promise<any>;
14
+ }
@@ -1,5 +1,5 @@
1
1
  import Path from "node:path";
2
- import MIME from 'mime';
2
+ import MIME from "mime";
3
3
  import { Library } from "../../workspace/workspace.js";
4
4
  import { copyToStorageStream } from "../../workspace/storage.js";
5
5
  import { BuildTask } from "./task.js";
@@ -44,4 +44,3 @@ export class AssetsTask extends BuildTask {
44
44
  }
45
45
  }
46
46
  }
47
- //# sourceMappingURL=emit-static-assets.js.map
@@ -0,0 +1,35 @@
1
+ import Ts from "typescript";
2
+ import { BuildTask } from "./task.ts";
3
+ import { BuildTarget } from "../build-target.ts";
4
+ import { Library } from "../../workspace/workspace.ts";
5
+ import { type ExportEntries } from "../../workspace/helpers/create-manifests.ts";
6
+ declare class TypescriptProject {
7
+ readonly baseDir: string;
8
+ readonly compilerOptions: Ts.CompilerOptions;
9
+ readonly dtsDir: string;
10
+ constructor(baseDir: string, tsconfig: string, outDir?: string);
11
+ /** Run tsgo to emit .d.ts files into dtsDir. Returns stderr output. */
12
+ emitWithTsgo(): Promise<void>;
13
+ /** Recursively collect all .d.ts files emitted by tsgo */
14
+ getEmittedDtsFiles(): string[];
15
+ /** Clean up temp directory */
16
+ cleanup(): void;
17
+ }
18
+ export declare function createTypescriptProject(baseDir: string, tsconfig: string, outDir?: string): TypescriptProject;
19
+ export declare function generateTypescriptDefinition(options: {
20
+ project: TypescriptProject;
21
+ exclude: string[];
22
+ externs?: string[];
23
+ types?: string[];
24
+ exports: ExportEntries;
25
+ includes?: string[];
26
+ prefix: string;
27
+ }): {
28
+ dts: string;
29
+ };
30
+ export declare class TypescriptDefinitionTask extends BuildTask {
31
+ readonly library: Library;
32
+ constructor(target: BuildTarget, library: Library);
33
+ execute(): Promise<void>;
34
+ }
35
+ export {};
@@ -1,9 +1,9 @@
1
- import Fs from 'fs';
2
- import Os from 'os';
3
- import Path from 'path';
4
- import Ts from 'typescript';
5
- import { execFile } from 'child_process';
6
- import { promisify } from 'util';
1
+ import Fs from "node:fs";
2
+ import Os from "node:os";
3
+ import Path from "node:path";
4
+ import Ts from "typescript";
5
+ import { execFile } from "node:child_process";
6
+ import { promisify } from "node:util";
7
7
  import { BuildTask } from "./task.js";
8
8
  import { BuildTarget } from "../build-target.js";
9
9
  import { Library } from "../../workspace/workspace.js";
@@ -288,4 +288,3 @@ export class TypescriptDefinitionTask extends BuildTask {
288
288
  }
289
289
  }
290
290
  }
291
- //# sourceMappingURL=emit-typescript-definition.js.map
@@ -0,0 +1,9 @@
1
+ export type PathNode<State> = Map<string, PathNode<State> | State>;
2
+ export declare class PathQualifier<State> {
3
+ root: PathNode<State>;
4
+ set(path: string, state: State): boolean;
5
+ check(path: string): State | undefined;
6
+ match(path: string, update: (state: State, segments: string[], index: number) => State): State;
7
+ traverse(callback: (segments: string[], state: State) => void, _node?: PathNode<State>, _segments?: any[]): void;
8
+ }
9
+ export declare function createPathPrefixMatcher(prefixes: string[]): RegExp;
@@ -92,4 +92,3 @@ export function createPathPrefixMatcher(prefixes) {
92
92
  const pattern = '^/(' + sanitized.join('|') + ')(/|$)';
93
93
  return new RegExp(pattern);
94
94
  }
95
- //# sourceMappingURL=path-helpers.js.map
@@ -0,0 +1,8 @@
1
+ import type { BuildTarget } from "../build-target.ts";
2
+ export declare abstract class BuildTask {
3
+ readonly target: BuildTarget;
4
+ constructor(target: BuildTarget);
5
+ get log(): import("../../workspace/helpers/logger.ts").Log;
6
+ init(): Promise<void>;
7
+ abstract execute(): Promise<void>;
8
+ }
@@ -6,4 +6,3 @@ export class BuildTask {
6
6
  get log() { return this.target.log; }
7
7
  async init() { }
8
8
  }
9
- //# sourceMappingURL=task.js.map
package/esm/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/esm/cli.js CHANGED
@@ -1,13 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import Process from "node:process";
3
3
  import Yargs from "yargs";
4
- import { hideBin } from 'yargs/helpers';
4
+ import { hideBin } from "yargs/helpers";
5
5
  import { command_run } from "./commands/run.js";
6
6
  import { command_init } from "./commands/init.js";
7
7
  import { command_install } from "./commands/install.js";
8
8
  import { command_make } from "./commands/make.js";
9
9
  import { command_serve } from "./commands/serve.js";
10
- import { command_publish } from "./commands/publish.js";
11
10
  function command_fail() {
12
11
  return {
13
12
  command: '*',
@@ -21,10 +20,8 @@ Yargs(hideBin(Process.argv)).scriptName("jointhedots-gear")
21
20
  .command(command_install())
22
21
  .command(command_make())
23
22
  .command(command_serve())
24
- .command(command_publish())
25
23
  .command(command_run())
26
24
  .command(command_fail())
27
25
  .showHelpOnFail(true)
28
26
  .help()
29
27
  .parse();
30
- //# sourceMappingURL=cli.js.map
@@ -0,0 +1,2 @@
1
+ import { type CommandModule } from "yargs";
2
+ export declare function command_init(): CommandModule<any, {}>;
@@ -54,4 +54,3 @@ export function command_init() {
54
54
  }
55
55
  };
56
56
  }
57
- //# sourceMappingURL=init.js.map
@@ -0,0 +1,5 @@
1
+ import { type CommandModule } from "yargs";
2
+ export declare function command_install(): CommandModule<any, {
3
+ ws?: string;
4
+ dist?: string;
5
+ }>;
@@ -1,5 +1,5 @@
1
- import Path from 'node:path';
2
- import Fs from 'node:fs';
1
+ import Path from "node:path";
2
+ import Fs from "node:fs";
3
3
  import {} from "yargs";
4
4
  import { open_workspace } from "../workspace/workspace.js";
5
5
  import { makeComponentPublication } from "../workspace/component.js";
@@ -28,8 +28,8 @@ export function command_install() {
28
28
  });
29
29
  // Select all workspace bundles
30
30
  const selector = new BundleSelector(ws);
31
- for (const bundle of ws.bundles) {
32
- selector.add(bundle);
31
+ for (const lib of ws.libraries) {
32
+ selector.add(lib.bundle);
33
33
  }
34
34
  if (selector.missing.length > 0) {
35
35
  ws.log.warn(`Missing bundle dependencies: ${selector.missing.join(", ")}`);
@@ -64,4 +64,3 @@ export function command_install() {
64
64
  }
65
65
  };
66
66
  }
67
- //# sourceMappingURL=install.js.map
@@ -0,0 +1,16 @@
1
+ import { type CommandModule } from "yargs";
2
+ type MakeOptions = {
3
+ watch?: boolean;
4
+ pack?: boolean;
5
+ versioned?: string;
6
+ devmode?: boolean;
7
+ clean?: boolean;
8
+ dist?: string;
9
+ };
10
+ export declare function command_make(): CommandModule<any, MakeOptions & {
11
+ apps?: string;
12
+ libs?: string;
13
+ bundles?: string;
14
+ ws?: string;
15
+ }>;
16
+ export {};