@solid-stack/mason 1.0.12 → 1.0.13

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/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAOA,wBAAgB,SAAS,sBA0IxB;AAWD,wBAAsB,MAAM,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzE"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAUA,wBAAgB,SAAS,sBAsRxB;AAWD,wBAAsB,MAAM,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAWA,wBAAsB,YAAY,CAChC,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CAuCf"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAYA,wBAAsB,YAAY,CAChC,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CA0Cf"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../src/commands/feature.ts"],"names":[],"mappings":"AAUA,wBAAsB,iBAAiB,CACrC,cAAc,CAAC,EAAE,MAAM,EACvB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CAmUf"}
1
+ {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../src/commands/feature.ts"],"names":[],"mappings":"AAYA,wBAAsB,iBAAiB,CACrC,cAAc,CAAC,EAAE,MAAM,EACvB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CAqWf"}
@@ -1,10 +1,33 @@
1
+ import * as p from "@clack/prompts";
1
2
  export interface ImportFlags {
2
3
  overwrite?: boolean;
3
4
  dryRun?: boolean;
4
5
  yes?: boolean;
5
6
  registry?: string;
6
7
  skipInstall?: boolean;
8
+ alias?: Record<string, string>;
7
9
  [key: string]: any;
8
10
  }
11
+ export declare const importPrompts: {
12
+ select: <Value>(opts: p.SelectOptions<Value>) => Promise<Value | typeof p.CANCEL_SYMBOL>;
13
+ text: (opts: p.TextOptions) => Promise<string | typeof p.CANCEL_SYMBOL>;
14
+ };
15
+ /**
16
+ * Rewrite import strings across file content based on an alias mapping.
17
+ * E.g. "@/shared/hasher/" -> "@/shared/auth-hasher/"
18
+ */
19
+ export declare function rewriteImports(content: string, aliasMap: Map<string, string>): string;
20
+ /**
21
+ * Determine the destination directory for a module type ('src/shared' or 'src/features')
22
+ */
23
+ export declare function getModuleBaseDir(projectRoot: string, modType: "shared" | "feature"): string;
24
+ /**
25
+ * Resolves the existing directory path for a module in the project, checking both src/<folder>/<name> and <folder>/<name>.
26
+ */
27
+ export declare function getExistingModuleDir(projectRoot: string, modType: "shared" | "feature", modName: string): string | null;
28
+ /**
29
+ * Check whether a module already exists in the project (checking both src/<folder>/<name> and <folder>/<name>)
30
+ */
31
+ export declare function checkModuleExists(projectRoot: string, modType: "shared" | "feature", modName: string): boolean;
9
32
  export declare function handleImport(typeArg?: string, nameArg?: string, flags?: ImportFlags): Promise<void>;
10
33
  //# sourceMappingURL=import.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/commands/import.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,WAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAuLf"}
1
+ {"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/commands/import.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAiBpC,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,eAAO,MAAM,aAAa;IACxB,MAAM;IACN,IAAI;CACL,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAerF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAG3F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,QAAQ,GAAG,SAAS,EAC7B,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,IAAI,CAOf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,QAAQ,GAAG,SAAS,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAET;AAuKD,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,WAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAyNf"}
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/commands/menu.ts"],"names":[],"mappings":"AAWA,wBAAsB,kBAAkB,CAAC,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqEvF"}
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/commands/menu.ts"],"names":[],"mappings":"AAYA,wBAAsB,kBAAkB,CAAC,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA6EvF"}
@@ -0,0 +1,64 @@
1
+ import type { RegistryIndex } from "../utils/registry.js";
2
+ export interface RegistryModuleStatus {
3
+ name: string;
4
+ type: "shared" | "feature";
5
+ isRegistered: boolean;
6
+ existsOnDisk: boolean;
7
+ hasUncommittedGitChanges: boolean;
8
+ uncommittedFilesCount: number;
9
+ hasIntegrityDrift: boolean;
10
+ localIntegrity?: string | undefined;
11
+ registeredIntegrity?: string | undefined;
12
+ }
13
+ /**
14
+ * Loads the master index.json from projectRoot or throws a user-friendly error
15
+ */
16
+ export declare function loadMasterIndex(projectRoot: string): RegistryIndex;
17
+ /**
18
+ * Saves master index.json to projectRoot
19
+ */
20
+ export declare function saveMasterIndex(projectRoot: string, index: RegistryIndex): void;
21
+ /**
22
+ * Discovers all modules present on disk in shared/ and features/
23
+ */
24
+ export declare function discoverDiskModules(projectRoot: string): Array<{
25
+ name: string;
26
+ type: "shared" | "feature";
27
+ dir: string;
28
+ }>;
29
+ /**
30
+ * Checks git status for a specific directory path
31
+ */
32
+ export declare function checkGitStatusForDir(projectRoot: string, dirPath: string): {
33
+ hasChanges: boolean;
34
+ filesCount: number;
35
+ };
36
+ /**
37
+ * Computes full status comparison for all modules (disk vs registry vs git)
38
+ */
39
+ export declare function getRegistryDiff(projectRoot: string): RegistryModuleStatus[];
40
+ /**
41
+ * 1. register: registers module in index.json and stamps/updates registry.json
42
+ */
43
+ export declare function registerModule(typeArg?: string, nameArg?: string, flags?: Record<string, any>): Promise<void>;
44
+ /**
45
+ * 2. commit: commits changes to a module using git in the background
46
+ */
47
+ export declare function commitModule(typeArg?: string, nameArg?: string, flags?: Record<string, any>): Promise<void>;
48
+ /**
49
+ * 3. register-changes: recomputes hash and registers committed changes to index.json & registry.json
50
+ */
51
+ export declare function registerModuleChanges(typeArg?: string, nameArg?: string, flags?: Record<string, any>): Promise<void>;
52
+ /**
53
+ * 4. unregister: removes module from index.json while keeping files on disk
54
+ */
55
+ export declare function unregisterModule(typeArg?: string, nameArg?: string, flags?: Record<string, any>): Promise<void>;
56
+ /**
57
+ * 5. diff: gives a complete summary of unregistered, uncommitted, and drifted modules
58
+ */
59
+ export declare function diffRegistry(flags?: Record<string, any>): void;
60
+ /**
61
+ * Interactive or programmatic router for registry operations
62
+ */
63
+ export declare function handleRegistry(actionArg?: string, typeArg?: string, nameArg?: string, flags?: Record<string, any>): Promise<void>;
64
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/commands/registry.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1E,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAA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AE,GAAG,CAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CA+Ef;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CAkGf;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CAkDf;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,IAAI,CA0DlE;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CAgEf"}
@@ -0,0 +1,2 @@
1
+ export declare function runSharedCommand(sharedNameArg?: string, flags?: Record<string, any>): Promise<void>;
2
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/commands/shared.ts"],"names":[],"mappings":"AAUA,wBAAsB,gBAAgB,CACpC,aAAa,CAAC,EAAE,MAAM,EACtB,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CAqFf"}
@@ -0,0 +1,13 @@
1
+ import type { GeneratedFile } from "../types/index.js";
2
+ export interface SharedOptions {
3
+ name: string;
4
+ description?: string;
5
+ projectRoot?: string;
6
+ targetDir?: string;
7
+ dryRun?: boolean;
8
+ overwrite?: boolean;
9
+ includeStub?: boolean;
10
+ isRegistry?: boolean;
11
+ }
12
+ export declare function generateShared(options: SharedOptions): GeneratedFile[];
13
+ //# sourceMappingURL=sharedGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedGenerator.d.ts","sourceRoot":"","sources":["../../src/core/sharedGenerator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKvD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,EAAE,CAiHtE"}