@jointhedots/gear 1.2.0 → 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.
- package/esm/builder/build-app-bundle.d.ts +28 -0
- package/esm/builder/build-app-bundle.js +0 -1
- package/esm/builder/build-app-host.d.ts +28 -0
- package/esm/builder/build-app-host.js +0 -1
- package/esm/builder/build-application.d.ts +47 -0
- package/esm/builder/build-application.js +1 -2
- package/esm/builder/build-library.d.ts +20 -0
- package/esm/builder/build-library.js +1 -2
- package/esm/builder/build-target.d.ts +27 -0
- package/esm/builder/build-target.js +0 -1
- package/esm/builder/helpers/emit-bundle-manifest.d.ts +9 -0
- package/esm/builder/helpers/emit-bundle-manifest.js +1 -2
- package/esm/builder/helpers/emit-components-dts.d.ts +9 -0
- package/esm/builder/helpers/emit-components-dts.js +1 -2
- package/esm/builder/helpers/emit-esmodules.d.ts +61 -0
- package/esm/builder/helpers/emit-esmodules.js +5 -6
- package/esm/builder/helpers/emit-package-manifest.d.ts +9 -0
- package/esm/builder/helpers/emit-package-manifest.js +0 -1
- package/esm/builder/helpers/emit-static-assets.d.ts +14 -0
- package/esm/builder/helpers/emit-static-assets.js +1 -2
- package/esm/builder/helpers/emit-typescript-definition.d.ts +35 -0
- package/esm/builder/helpers/emit-typescript-definition.js +6 -7
- package/esm/builder/helpers/path-helpers.d.ts +9 -0
- package/esm/builder/helpers/path-helpers.js +0 -1
- package/esm/builder/helpers/task.d.ts +8 -0
- package/esm/builder/helpers/task.js +0 -1
- package/esm/cli.d.ts +2 -0
- package/esm/cli.js +1 -4
- package/esm/commands/init.d.ts +2 -0
- package/esm/commands/init.js +0 -1
- package/esm/commands/install.d.ts +5 -0
- package/esm/commands/install.js +2 -3
- package/esm/commands/make.d.ts +16 -0
- package/esm/commands/make.js +2 -3
- package/esm/commands/run.d.ts +8 -0
- package/esm/commands/run.js +6 -7
- package/esm/commands/serve.d.ts +9 -0
- package/esm/commands/serve.js +3 -4
- package/esm/core/commands/interface.d.ts +26 -0
- package/esm/core/commands/interface.js +21 -0
- package/esm/core/components/components.d.ts +73 -0
- package/esm/core/components/components.js +2 -0
- package/esm/core/components/helpers.d.ts +7 -0
- package/esm/core/components/helpers.js +68 -0
- package/esm/core/components/manifold.d.ts +77 -0
- package/esm/core/components/manifold.js +442 -0
- package/esm/core/components/mod.d.ts +4 -0
- package/esm/core/components/mod.js +4 -0
- package/esm/core/components/provider.d.ts +42 -0
- package/esm/core/components/provider.js +127 -0
- package/esm/core/logging/mod.d.ts +53 -0
- package/esm/core/logging/mod.js +142 -0
- package/esm/core/logging/trace.d.ts +51 -0
- package/esm/core/logging/trace.js +17 -0
- package/esm/core/mod-browser.d.ts +1 -0
- package/esm/core/mod-browser.js +1 -0
- package/esm/core/mod-node.d.ts +1 -0
- package/esm/core/mod-node.js +1 -0
- package/esm/core/mod.d.ts +5 -0
- package/esm/core/mod.js +5 -0
- package/esm/core/schema/helpers.d.ts +36 -0
- package/esm/core/schema/helpers.js +163 -0
- package/esm/core/schema/mod.d.ts +3 -0
- package/esm/core/schema/mod.js +3 -0
- package/esm/core/schema/schema.d.ts +376 -0
- package/esm/core/schema/schema.js +234 -0
- package/esm/core/schema/zod.d.ts +44 -0
- package/esm/core/schema/zod.js +127 -0
- package/esm/core/services/mod.d.ts +5 -0
- package/esm/core/services/mod.js +5 -0
- package/esm/core/services/service-accessor.d.ts +17 -0
- package/esm/core/services/service-accessor.js +20 -0
- package/esm/core/services/service-definitions.d.ts +37 -0
- package/esm/core/services/service-definitions.js +44 -0
- package/esm/core/services/service-points.d.ts +40 -0
- package/esm/core/services/service-points.js +164 -0
- package/esm/core/services/service-specification.d.ts +52 -0
- package/esm/core/services/service-specification.js +59 -0
- package/esm/core/services/settings.d.ts +29 -0
- package/esm/core/services/settings.js +123 -0
- package/esm/utils/file.d.ts +39 -0
- package/esm/utils/file.js +3 -4
- package/esm/utils/graph-ordering.d.ts +21 -0
- package/esm/utils/graph-ordering.js +0 -1
- package/esm/utils/normalized-name.d.ts +17 -0
- package/esm/utils/normalized-name.js +0 -1
- package/esm/workspace/component.d.ts +70 -0
- package/esm/workspace/component.js +0 -1
- package/esm/workspace/helpers/config-loader.d.ts +37 -0
- package/esm/workspace/helpers/config-loader.js +4 -5
- package/esm/workspace/helpers/create-manifests.d.ts +13 -0
- package/esm/workspace/helpers/create-manifests.js +0 -1
- package/esm/workspace/helpers/discover-workspace.d.ts +4 -0
- package/esm/workspace/helpers/discover-workspace.js +0 -1
- package/esm/workspace/helpers/lockfile.d.ts +5 -0
- package/esm/workspace/helpers/lockfile.js +0 -1
- package/esm/workspace/helpers/logger.d.ts +65 -0
- package/esm/workspace/helpers/logger.js +0 -1
- package/esm/workspace/helpers/package-npm.d.ts +1 -0
- package/esm/workspace/helpers/package-npm.js +0 -1
- package/esm/workspace/mod.d.ts +1 -0
- package/esm/workspace/mod.js +1 -0
- package/esm/workspace/packager.d.ts +5 -0
- package/esm/workspace/packager.js +1 -2
- package/esm/workspace/packagers/packager-standard.d.ts +7 -0
- package/esm/workspace/packagers/packager-standard.js +0 -1
- package/esm/workspace/storage.d.ts +59 -0
- package/esm/workspace/storage.js +4 -5
- package/esm/workspace/workspace.d.ts +161 -0
- package/esm/workspace/workspace.js +2 -3
- package/package.json +25 -18
- package/esm/commands/publish.js +0 -36
- 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>;
|
|
@@ -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
|
+
}
|
|
@@ -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
|
|
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";
|
|
@@ -312,4 +312,3 @@ function createIcon(base, size, format) {
|
|
|
312
312
|
.toFormat(format, { quality: 80 })
|
|
313
313
|
.toBuffer();
|
|
314
314
|
}
|
|
315
|
-
//# 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
|
+
}
|
|
@@ -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
|
|
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
|
|
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
|
|
2
|
+
import Path from "node:path";
|
|
3
3
|
import Url from "node:url";
|
|
4
|
-
import MIME from
|
|
5
|
-
import postcss from
|
|
6
|
-
import * as esbuild from
|
|
7
|
-
import { sassPlugin } from
|
|
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
|
+
}
|
|
@@ -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
|
|
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
|
|
2
|
-
import Os from
|
|
3
|
-
import Path from
|
|
4
|
-
import Ts from
|
|
5
|
-
import { execFile } from
|
|
6
|
-
import { promisify } from
|
|
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;
|
|
@@ -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
|
+
}
|
package/esm/cli.d.ts
ADDED
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
|
|
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
|
package/esm/commands/init.js
CHANGED
package/esm/commands/install.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Path from
|
|
2
|
-
import Fs from
|
|
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";
|
|
@@ -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 {};
|
package/esm/commands/make.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Path from
|
|
1
|
+
import Path from "node:path";
|
|
2
2
|
import {} from "yargs";
|
|
3
3
|
import { StorageFiles } from "../workspace/storage.js";
|
|
4
4
|
import { Bundle, Library, open_workspace } from "../workspace/workspace.js";
|
|
5
5
|
import { build_application } from "../builder/build-application.js";
|
|
6
6
|
import { build_app_composable_bundle } from "../builder/build-app-bundle.js";
|
|
7
7
|
import { build_library } from "../builder/build-library.js";
|
|
8
|
-
import { makeNormalizedName, NameStyle } from
|
|
8
|
+
import { makeNormalizedName, NameStyle } from "../utils/normalized-name.js";
|
|
9
9
|
import { resolvePackageVersion } from "../workspace/helpers/package-npm.js";
|
|
10
10
|
export function command_make() {
|
|
11
11
|
return {
|
|
@@ -155,4 +155,3 @@ export function command_make() {
|
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
//# sourceMappingURL=make.js.map
|
package/esm/commands/run.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Process from
|
|
3
|
-
import Path from
|
|
4
|
-
import ChildProcess from
|
|
5
|
-
import { createRequire } from "module";
|
|
1
|
+
import Fs from "node:fs";
|
|
2
|
+
import Process from "node:process";
|
|
3
|
+
import Path from "node:path";
|
|
4
|
+
import ChildProcess from "node:child_process";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
6
6
|
import {} from "yargs";
|
|
7
7
|
const restart_always_on_change = true;
|
|
8
8
|
const require = createRequire(import.meta.url);
|
|
@@ -101,10 +101,9 @@ export function command_run() {
|
|
|
101
101
|
Process.stdin.setRawMode(true);
|
|
102
102
|
Process.stdin.resume();
|
|
103
103
|
Process.stdin.on('data', onKeyPress);
|
|
104
|
-
const watcher =
|
|
104
|
+
const watcher = Fs.watch(argv.dir, { recursive: true });
|
|
105
105
|
watcher.on('change', () => restart());
|
|
106
106
|
start();
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
//# sourceMappingURL=run.js.map
|
package/esm/commands/serve.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Path from
|
|
1
|
+
import Path from "node:path";
|
|
2
2
|
import {} from "yargs";
|
|
3
3
|
import { StorageFiles } from "../workspace/storage.js";
|
|
4
4
|
import { open_workspace, Workspace } from "../workspace/workspace.js";
|
|
5
5
|
import { build_application } from "../builder/build-application.js";
|
|
6
|
-
import { makeNormalizedName, NameStyle } from
|
|
7
|
-
import Express from
|
|
6
|
+
import { makeNormalizedName, NameStyle } from "../utils/normalized-name.js";
|
|
7
|
+
import Express from "express";
|
|
8
8
|
import { resolvePackageVersion } from "../workspace/helpers/package-npm.js";
|
|
9
9
|
export function command_serve() {
|
|
10
10
|
return {
|
|
@@ -90,4 +90,3 @@ async function serve(ws, port, storage) {
|
|
|
90
90
|
process.on('SIGQUIT', () => resolve(null));
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
//# sourceMappingURL=serve.js.map
|