@vyredo/module-kit 0.0.0-stage → 0.1.1

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.
@@ -0,0 +1,220 @@
1
+ /** What a module's `manifest.ts` default-exports. Read from the AST, never run. */
2
+ export interface Manifest {
3
+ /** The module's name: unique, an identifier (`Session`, `IpCamera`). The client is exported under it. */
4
+ id: string;
5
+ /** Semver, for display and migrations. */
6
+ version?: string;
7
+ /** Modules that must start before this one. A call into one is also allowed. */
8
+ requireModules?: readonly string[];
9
+ /** Modules this one imports or calls when they are present; no start order. */
10
+ optionalModules?: readonly string[];
11
+ /**
12
+ * A core module is available to every module without being listed, and may
13
+ * itself depend only on other core modules.
14
+ */
15
+ core?: boolean;
16
+ }
17
+ /** One problem the scan, the generator or the boundary check found. */
18
+ export interface Issue {
19
+ /** Path relative to the config's directory. */
20
+ file: string;
21
+ line: number;
22
+ message: string;
23
+ }
24
+ /** Where the generated clients reach the bus: `import { <name> } from "<from>"`, called as `<name>()`. */
25
+ export interface BusImport {
26
+ /** A package specifier, or a path relative to the config's directory (`./src/bus`). */
27
+ from: string;
28
+ /** An exported function returning the `EventBus`. */
29
+ name: string;
30
+ /**
31
+ * When `from` is a specifier, the file it resolves to, per view (`"default"`
32
+ * for the full one): `{ default: "./src/renderer/bus.ts", node: "./src/main/bus.ts" }`.
33
+ * The kit adds `from` to every alias table and tsconfig it writes, so one
34
+ * generated client calls the right bus in each program.
35
+ */
36
+ targets?: Record<string, string>;
37
+ }
38
+ /** A tsconfig whose `paths` the kit keeps in step with the alias table. */
39
+ export interface TsconfigPaths {
40
+ /** Relative to the config's directory. */
41
+ file: string;
42
+ /** The client view its program sees; omitted, the full one. */
43
+ view?: string;
44
+ /**
45
+ * `"splice"`: rewrite only the kit's own entries (the alias, the bus) inside
46
+ * this existing tsconfig's `paths`, keeping every other entry and comment.
47
+ * `"write"`: write this file whole, as a generated tsconfig holding `inherit`'s
48
+ * other paths plus the alias table, for a program that extends it after its
49
+ * base (a tsconfig's `paths` replaces its base's).
50
+ */
51
+ mode: "splice" | "write";
52
+ /** `"write"` only: the tsconfig whose other paths are carried over. */
53
+ inherit?: string;
54
+ }
55
+ /** `module-kit.config.json`, or the object passed to the API. */
56
+ export interface ModuleKitConfig {
57
+ /** The folder whose modules the kit manages, relative to the config's directory. */
58
+ root: string;
59
+ /**
60
+ * Realm folders, such as `["node", "browser"]`: each module may have
61
+ * `<realm>/index.ts`, and code in one realm may not import another's. Omitted:
62
+ * one realm, the module's own `index.ts`.
63
+ */
64
+ realms?: readonly string[];
65
+ /** The import prefix every module is reached through. Default `@modules`. */
66
+ alias?: string;
67
+ /**
68
+ * Paths inside a module other modules may import, as globs relative to the
69
+ * module folder. `.generated/**` is always public. Default `["manifest.ts", "shared/**"]`.
70
+ */
71
+ publicPaths?: readonly string[];
72
+ /** Folder names never searched for modules. Added to `node_modules`, `.generated`, the realms and `shared`. */
73
+ ignore?: readonly string[];
74
+ /**
75
+ * The tsconfig each module's generated `tsconfig.json` extends, relative to the
76
+ * config's directory. Omitted: the generated tsconfigs extend nothing.
77
+ */
78
+ tsconfigBase?: string;
79
+ /** Generate `@vyredo/rpc-bus` clients for each module's members. Omitted: types only. */
80
+ rpc?: {
81
+ bus: BusImport;
82
+ };
83
+ /**
84
+ * Manifest fields beyond the kit's own, and the literal each must be. They are
85
+ * kept on each module's `extra`, for plugins. An `identifier` names a value
86
+ * (a schema), kept as its name. Any other field is refused.
87
+ */
88
+ manifestFields?: Record<string, ManifestFieldKind>;
89
+ /** Member names that are lifecycle hooks, never exposed. Default `["onStart", "onStop"]`. */
90
+ hooks?: readonly string[];
91
+ /**
92
+ * A static field on a class holding per-member call timeouts in ms
93
+ * (`static timeouts = { Illustrate: 180_000 }`), passed to the clients.
94
+ * Default `"timeouts"`.
95
+ */
96
+ timeoutsField?: string;
97
+ /**
98
+ * Named entry points every module may offer, as `name -> path inside the
99
+ * module`: `{ "events": ".generated/events.ts" }` makes `<alias>/<Id>/events`
100
+ * resolve to that file in each module that has it. Each is public.
101
+ */
102
+ exports?: Record<string, string>;
103
+ /**
104
+ * Client views: name -> the realms a consumer of that view can see. Each view
105
+ * gets its own clients and API types, typed only from those realms, so a
106
+ * program without one realm's libraries (a node program without DOM types)
107
+ * never loads that realm's classes. Written as `<file>.<view>.ts`, with
108
+ * `aliases.<view>.json` and `tsconfig.paths.<view>.json` beside the full ones.
109
+ */
110
+ views?: Record<string, readonly string[]>;
111
+ /**
112
+ * A call-up edge is an import of a module that depends on this one, directly
113
+ * or through others (Session calling Score, which requires Session). It cannot
114
+ * be declared, since declaring it closes a cycle. `"allow"` lets a value import
115
+ * of one pass without a declaration: the target starts later, and a call before
116
+ * then is answered "not running". Default `"refuse"`.
117
+ */
118
+ callUp?: "allow" | "refuse";
119
+ /** Files the boundary check skips, as globs relative to the root (`["**\/*.test.ts"]`). */
120
+ checkExclude?: readonly string[];
121
+ /** Tsconfigs whose `paths` the kit keeps in step with the alias table. */
122
+ tsconfigPaths?: readonly TsconfigPaths[];
123
+ /**
124
+ * Plugin files, relative to the config's directory, for the CLI: each
125
+ * default-exports a `Plugin`, or a function of the config's directory returning one.
126
+ * A `.ts` file needs `tsx` installed.
127
+ */
128
+ plugins?: readonly string[];
129
+ /** Added to every module's generated tsconfig: `compilerOptions` merged in (not `paths`), `exclude` as given. */
130
+ tsconfig?: {
131
+ compilerOptions?: Record<string, unknown>;
132
+ exclude?: readonly string[];
133
+ /** Extra files every module's program includes (global declarations such as a `Window` augmentation), relative to the config's directory. */
134
+ include?: readonly string[];
135
+ /**
136
+ * What `@modules/*` resolves to in a module's own program. `"declared"` (default):
137
+ * only the modules it declares, and their public paths, so the editor flags an
138
+ * undeclared one as you type. That holds while no dependency imports an alias of
139
+ * its own; once one does (a module calling its own protected client), the editor
140
+ * follows that import into the dependency and needs the dependency's aliases
141
+ * too. `"all"`: the whole table; undeclared imports are then `module-kit check`'s.
142
+ */
143
+ isolation?: "declared" | "all";
144
+ };
145
+ }
146
+ export type ManifestFieldKind = "string" | "boolean" | "array" | "identifier";
147
+ /** A config with every default applied and every path absolute. */
148
+ export interface ResolvedConfig {
149
+ /** The directory paths are relative to. */
150
+ cwd: string;
151
+ root: string;
152
+ realms: readonly string[] | null;
153
+ alias: string;
154
+ publicPaths: readonly string[];
155
+ ignore: ReadonlySet<string>;
156
+ tsconfigBase: string | null;
157
+ rpc: {
158
+ bus: BusImport;
159
+ } | null;
160
+ manifestFields: Readonly<Record<string, ManifestFieldKind>>;
161
+ hooks: readonly string[];
162
+ timeoutsField: string;
163
+ exports: Readonly<Record<string, string>>;
164
+ tsconfig: {
165
+ compilerOptions: Record<string, unknown>;
166
+ exclude: readonly string[];
167
+ include: readonly string[];
168
+ isolation: "declared" | "all";
169
+ };
170
+ callUp: "allow" | "refuse";
171
+ checkExclude: readonly string[];
172
+ views: Readonly<Record<string, readonly string[]>>;
173
+ tsconfigPaths: readonly TsconfigPaths[];
174
+ plugins: readonly string[];
175
+ }
176
+ /** One exposed member of a module's realm class. */
177
+ export interface Member {
178
+ name: string;
179
+ visibility: "public" | "protected";
180
+ /** The wire event: `<Id>:<Realm>:<Name>`, or `<Id>:<Name>` without realms. */
181
+ event: string;
182
+ /** The call's own timeout in ms, from the class's static timeouts field; absent uses the bus default. */
183
+ timeoutMs?: number;
184
+ }
185
+ /** One realm class of a module. */
186
+ export interface RealmClass {
187
+ /** The realm's folder name, or null for a module without realms. */
188
+ realm: string | null;
189
+ /** The realm's name in clients and events: `Node` for `node`; null without realms. */
190
+ key: string | null;
191
+ /** The class file, relative to the module folder (`node/index.ts`, `index.ts`). */
192
+ file: string;
193
+ members: Member[];
194
+ /** The lifecycle hooks the class declares. */
195
+ hooks: string[];
196
+ }
197
+ /** One module, as the scan read it. */
198
+ export interface ScannedModule {
199
+ id: string;
200
+ version: string;
201
+ core: boolean;
202
+ /** The module folder, relative to the root. */
203
+ path: string;
204
+ /** As the manifest wrote them. */
205
+ requires: string[];
206
+ optional: string[];
207
+ realms: RealmClass[];
208
+ /** The manifest's `manifestFields` values; an identifier is kept as `{ identifier: name }`. */
209
+ extra: Record<string, ManifestValue>;
210
+ /** 1-based position in the start order: every module starts after what it requires. */
211
+ startOrder: number;
212
+ }
213
+ export type ManifestValue = string | boolean | string[] | {
214
+ identifier: string;
215
+ };
216
+ /** The whole scan: the modules in start order, and what is wrong with them. */
217
+ export interface ModuleGraph {
218
+ modules: ScannedModule[];
219
+ issues: Issue[];
220
+ }
package/dist/vite.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ export interface AliasEntry {
2
+ find: string | RegExp;
3
+ replacement: string;
4
+ }
5
+ /**
6
+ * The alias list for one program: the full view, or a named one (`view: "node"`
7
+ * for a main process that must never load a browser class). `config` is the
8
+ * config file, default `module-kit.config.json` in the working directory.
9
+ */
10
+ export declare function moduleKitAliases(opts?: {
11
+ config?: string;
12
+ view?: string;
13
+ }): AliasEntry[];
package/dist/vite.js ADDED
@@ -0,0 +1 @@
1
+ const _0x287ed1=_0x20b7;(function(_0x32ae4f,_0x54e2a6){const _0xc306d9=_0x20b7,_0x2aef8f=_0x32ae4f();while(!![]){try{const _0x7f4157=-parseInt(_0xc306d9(0xac))/0x1*(-parseInt(_0xc306d9(0xdc))/0x2)+parseInt(_0xc306d9(0xb9))/0x3+parseInt(_0xc306d9(0xc8))/0x4*(-parseInt(_0xc306d9(0xd6))/0x5)+parseInt(_0xc306d9(0xca))/0x6*(parseInt(_0xc306d9(0xaf))/0x7)+-parseInt(_0xc306d9(0xec))/0x8+parseInt(_0xc306d9(0xbe))/0x9*(-parseInt(_0xc306d9(0xe9))/0xa)+-parseInt(_0xc306d9(0xce))/0xb*(-parseInt(_0xc306d9(0xe0))/0xc);if(_0x7f4157===_0x54e2a6)break;else _0x2aef8f['push'](_0x2aef8f['shift']());}catch(_0x574890){_0x2aef8f['push'](_0x2aef8f['shift']());}}}(_0x144a,0x71420));import{existsSync as _0x308ab8,readFileSync as _0x2bc4c5}from'node:fs';import{resolve as _0x345727}from'node:path';import{existsSync as _0x3b9b24,readFileSync as _0x4e5e6f}from'node:fs';import{dirname as _0x7647e2,resolve as _0x3d93d7}from'node:path';var c='module-kit.config.json',m=/^[a-z][a-z0-9]*$/;function _0x20b7(_0x47e59a,_0x4b89fe){_0x47e59a=_0x47e59a-0x9f;const _0x144a22=_0x144a();let _0x20b708=_0x144a22[_0x47e59a];if(_0x20b7['OGKUpT']===undefined){var _0x475b62=function(_0x518980){const _0x1a0c65='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x308ab8='',_0x2bc4c5='';for(let _0x345727=0x0,_0x3b9b24,_0x4e5e6f,_0x7647e2=0x0;_0x4e5e6f=_0x518980['charAt'](_0x7647e2++);~_0x4e5e6f&&(_0x3b9b24=_0x345727%0x4?_0x3b9b24*0x40+_0x4e5e6f:_0x4e5e6f,_0x345727++%0x4)?_0x308ab8+=String['fromCharCode'](0xff&_0x3b9b24>>(-0x2*_0x345727&0x6)):0x0){_0x4e5e6f=_0x1a0c65['indexOf'](_0x4e5e6f);}for(let _0x3d93d7=0x0,_0x3a249c=_0x308ab8['length'];_0x3d93d7<_0x3a249c;_0x3d93d7++){_0x2bc4c5+='%'+('00'+_0x308ab8['charCodeAt'](_0x3d93d7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2bc4c5);};_0x20b7['AlfSSt']=_0x475b62,_0x20b7['QZaVQx']={},_0x20b7['OGKUpT']=!![];}const _0x238833=_0x144a22[0x0],_0x1bf15a=_0x47e59a+_0x238833,_0x329a79=_0x20b7['QZaVQx'][_0x1bf15a];return!_0x329a79?(_0x20b708=_0x20b7['AlfSSt'](_0x20b708),_0x20b7['QZaVQx'][_0x1bf15a]=_0x20b708):_0x20b708=_0x329a79,_0x20b708;}function w(_0x3a249c,_0x5da4be){const _0x19344b=_0x20b7;if(!_0x3a249c[_0x19344b(0xb4)])throw new Error('module-kit:\x20`root`\x20is\x20required');let _0x4f87a1=_0x3a249c[_0x19344b(0xd5)]&&_0x3a249c[_0x19344b(0xd5)]['length']>0x0?[..._0x3a249c[_0x19344b(0xd5)]]:null;for(let _0x14cd3b of _0x4f87a1??[])if(!m['test'](_0x14cd3b))throw new Error(_0x19344b(0x9f)+_0x14cd3b+'\x22\x20must\x20be\x20lowercase\x20letters\x20and\x20digits,\x20starting\x20with\x20a\x20letter');if(_0x4f87a1&&new Set(_0x4f87a1)[_0x19344b(0xe8)]!==_0x4f87a1['length'])throw new Error(_0x19344b(0xdb));let _0x45143a=(_0x3a249c['alias']??_0x19344b(0xc1))['replace'](/\/+$/,'');if(!_0x45143a)throw new Error(_0x19344b(0xa0));for(let [_0x5c6ebc,_0x5956f6]of Object[_0x19344b(0xaa)](_0x3a249c['views']??{})){if(!m[_0x19344b(0xa4)](_0x5c6ebc))throw new Error(_0x19344b(0xb8)+_0x5c6ebc+_0x19344b(0xe6));for(let _0x1957f2 of _0x5956f6)if(!_0x4f87a1?.[_0x19344b(0xe3)](_0x1957f2))throw new Error('module-kit:\x20view\x20\x22'+_0x5c6ebc+'\x22\x20names\x20realm\x20\x22'+_0x1957f2+'\x22,\x20which\x20is\x20not\x20in\x20`realms`');}for(let _0x2dbb39 of _0x3a249c[_0x19344b(0xb6)]??[]){if(_0x2dbb39['view']&&!(_0x3a249c[_0x19344b(0xd4)]??{})[_0x2dbb39['view']])throw new Error(_0x19344b(0xd9)+_0x2dbb39[_0x19344b(0xcb)]+_0x19344b(0xbc)+_0x2dbb39[_0x19344b(0xa6)]+_0x19344b(0xb1));if(_0x2dbb39[_0x19344b(0xd1)]===_0x19344b(0xb0)&&!_0x2dbb39[_0x19344b(0xb5)])throw new Error(_0x19344b(0xd9)+_0x2dbb39[_0x19344b(0xcb)]+_0x19344b(0xeb));}for(let _0x581151 of Object[_0x19344b(0xcc)](_0x3a249c['exports']??{}))if(!/^[A-Za-z0-9_-]+$/[_0x19344b(0xa4)](_0x581151)||_0x581151===_0x19344b(0xc2))throw new Error(_0x19344b(0xa8)+_0x581151+_0x19344b(0xde));return{'cwd':_0x5da4be,'root':_0x3d93d7(_0x5da4be,_0x3a249c[_0x19344b(0xb4)]),'realms':_0x4f87a1,'alias':_0x45143a,'publicPaths':_0x3a249c['publicPaths']?[..._0x3a249c[_0x19344b(0xc0)]]:[_0x19344b(0xcd),_0x19344b(0xa3)],'ignore':new Set([_0x19344b(0xab),_0x19344b(0xda),'shared',_0x19344b(0xd8),..._0x4f87a1??[],..._0x3a249c['ignore']??[]]),'tsconfigBase':_0x3a249c[_0x19344b(0xa1)]?_0x3d93d7(_0x5da4be,_0x3a249c[_0x19344b(0xa1)]):null,'rpc':_0x3a249c['rpc']??null,'manifestFields':{..._0x3a249c[_0x19344b(0xe5)]??{}},'hooks':_0x3a249c[_0x19344b(0xbf)]?[..._0x3a249c['hooks']]:['onStart','onStop'],'timeoutsField':_0x3a249c['timeoutsField']??'timeouts','exports':{..._0x3a249c['exports']??{}},'callUp':_0x3a249c[_0x19344b(0xdf)]??_0x19344b(0xe2),'tsconfigPaths':[..._0x3a249c[_0x19344b(0xb6)]??[]],'plugins':(_0x3a249c[_0x19344b(0xb3)]??[])[_0x19344b(0xc3)](_0x3f0e37=>_0x3d93d7(_0x5da4be,_0x3f0e37)),'views':Object['fromEntries'](Object[_0x19344b(0xaa)](_0x3a249c[_0x19344b(0xd4)]??{})[_0x19344b(0xc3)](([_0x5998c0,_0x2984f6])=>[_0x5998c0,[..._0x2984f6]])),'checkExclude':[..._0x3a249c[_0x19344b(0xa9)]??[]],'tsconfig':{'compilerOptions':{..._0x3a249c['tsconfig']?.[_0x19344b(0xc6)]??{}},'exclude':[..._0x3a249c['tsconfig']?.[_0x19344b(0xba)]??[]],'include':(_0x3a249c[_0x19344b(0xe7)]?.[_0x19344b(0xb2)]??[])[_0x19344b(0xc3)](_0x3c3209=>_0x3d93d7(_0x5da4be,_0x3c3209)),'isolation':_0x3a249c[_0x19344b(0xe7)]?.[_0x19344b(0xd7)]??_0x19344b(0xd0)}};}function u(_0x24a125){const _0x590374=_0x20b7;let _0x2d1c38=_0x3d93d7(_0x24a125);if(!_0x3b9b24(_0x2d1c38))throw new Error(_0x590374(0xa5)+_0x2d1c38);let _0x7f557e;try{_0x7f557e=JSON[_0x590374(0xa7)](_0x4e5e6f(_0x2d1c38,_0x590374(0xad)));}catch(_0x2aeb5d){throw new Error(_0x590374(0xdd)+_0x2d1c38+_0x590374(0xc7)+_0x2aeb5d[_0x590374(0xe1)]);}return w(_0x7f557e,_0x7647e2(_0x2d1c38));}var x=_0x5ed2c8=>_0x5ed2c8[_0x287ed1(0xd3)](/[.*+?^${}()|[\]\\]/g,_0x287ed1(0xa2));function O(_0x4ce1a5={}){const _0x2aed31=_0x287ed1;let _0x4df483=u(_0x345727(_0x4ce1a5[_0x2aed31(0xbb)]??c)),_0x16fd02=_0x345727(_0x4df483[_0x2aed31(0xb4)],'.generated',_0x4ce1a5[_0x2aed31(0xa6)]?_0x2aed31(0xb7)+_0x4ce1a5['view']+_0x2aed31(0xe4):_0x2aed31(0xbd));if(!_0x308ab8(_0x16fd02))return[];let _0x1e59f9=JSON['parse'](_0x2bc4c5(_0x16fd02,'utf8')),_0x10eefd=[],_0x13e304=[];for(let _0x16fceb of Object[_0x2aed31(0xcc)](_0x1e59f9)[_0x2aed31(0xea)]()){if(_0x16fceb[_0x2aed31(0xc4)]('$'))continue;let _0x14b6e8=_0x345727(_0x4df483['cwd'],_0x1e59f9[_0x16fceb]);_0x16fceb[_0x2aed31(0xc5)]('/*')?_0x13e304[_0x2aed31(0xcf)]({'find':_0x16fceb[_0x2aed31(0xd2)](0x0,-0x2),'replacement':_0x14b6e8[_0x2aed31(0xd2)](0x0,-0x2)}):_0x10eefd[_0x2aed31(0xcf)]({'find':new RegExp('^'+x(_0x16fceb)+'$'),'replacement':_0x14b6e8});}return _0x13e304[_0x2aed31(0xea)]((_0x4ad947,_0x550e25)=>_0x550e25[_0x2aed31(0xae)][_0x2aed31(0xc9)]-_0x4ad947['find']['length']),[..._0x10eefd,..._0x13e304];}function _0x144a(){const _0xc9d27a=['Aw5OzxjPDa','DhnJB25MAwDqyxrOCW','ywXPyxnLCY4','Bw9KDwXLlwTPDdOGDMLLDYaI','nZm4otKWy1fjzNzl','zxHJBhvKzq','y29UzMLN','iIbUyw1LCYb2Awv3ici','ywXPyxnLCY5QC29U','nZq3Cuv0yxjN','Ag9VA3m','ChvIBgLJugf0Ahm','qg1VzhvSzxm','ChjVDgvJDgvK','BwfW','C3rHCNrZv2L0Aa','zw5KC1DPDgG','y29TCgLSzxjpChrPB25Z','igLZig5VDcb2ywXPzcbku09ooIa','mta4nJm5mLLMEfrfqW','BgvUz3rO','mtC1mdHKzeHPCfi','zMLSzq','A2v5CW','BwfUAwzLC3qUDhm','mtmWmZCYvNrgsxn5','ChvZAa','zgvJBgfYzwq','Bw9Kzq','C2XPy2u','CMvWBgfJzq','DMLLD3m','CMvHBg1Z','nujkr2PJqW','AxnVBgf0Aw9U','x19MAxH0DxjLC19F','Bw9KDwXLlwTPDdOGDhnJB25MAwDqyxrOCYaI','lMDLBMvYyxrLza','Bw9KDwXLlwTPDdOGyhjLywXTC2aGBgLZDhmGysbYzwfSBsb0D2LJzq','ntC4mJC4vMznyvrK','Bw9KDwXLlwTPDdOG','iIbTDxn0igjLig9UzsbWyxrOihnLz21LBNqGB3rOzxiGDgHHBIaIChjVDgvJDgvKiG','y2fSBfvW','nJeYqKzys3LS','BwvZC2fNzq','CMvMDxnL','Aw5JBhvKzxm','lMPZB24','BwfUAwzLC3rgAwvSzhm','iIbTDxn0igjLigXVD2vYy2fZzsbSzxr0zxjZigfUzcbKAwDPDhmSihn0yxj0Aw5NihDPDgGGysbSzxr0zxi','DhnJB25MAwC','C2L6zq','mZy2mtbev1jlD20','C29YDa','iIbPCYaID3jPDguIigfUzcbUzwvKCYbGAw5OzxjPDga','nJiYmdi1nK9VufLivq','Bw9KDwXLlwTPDdOGCMvHBg0GiG','Bw9KDwXLlwTPDdOGygfSAwfZycbJyw5UB3qGyMuGzw1WDhK','DhnJB25MAwDcyxnL','xcqM','C2HHCMvKlYOQ','DgvZDa','Bw9KDwXLlwTPDdOGBM8Gy29UzMLNigf0ia','DMLLDW','CgfYC2u','Bw9KDwXLlwTPDdOGzxHWB3j0ici','y2HLy2TfEgnSDwrL','zw50CMLLCW','BM9Kzv9TB2r1BgvZ','mw1JqujiAG','DxrMoa','zMLUza','mtyYnfbbse9ODW','D3jPDgu','iIWGD2HPy2GGyhzPzxDZycbKB2vZig5VDcbKzwzPBMu','Aw5JBhvKzq','CgX1z2LUCW','CM9VDa'];_0x144a=function(){return _0xc9d27a;};return _0x144a();}export{O as moduleKitAliases};
package/package.json CHANGED
@@ -1,6 +1,74 @@
1
1
  {
2
2
  "name": "@vyredo/module-kit",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Turn a folder into isolated modules: manifests, dependency checks, per-module tsconfigs, import boundaries, optional realms, and @vyredo/rpc-bus clients",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "module-kit": "dist/cli.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "./runtime": {
17
+ "types": "./dist/runtime.d.ts",
18
+ "default": "./dist/runtime.js"
19
+ },
20
+ "./vite": {
21
+ "types": "./dist/vite.d.ts",
22
+ "default": "./dist/vite.js"
23
+ }
24
+ },
25
+ "sideEffects": false,
26
+ "files": [
27
+ "dist/*.js",
28
+ "dist/*.d.ts",
29
+ "README.md"
30
+ ],
31
+ "keywords": [
32
+ "modules",
33
+ "modular-monolith",
34
+ "manifest",
35
+ "boundaries",
36
+ "codegen",
37
+ "rpc",
38
+ "typescript"
39
+ ],
40
+ "author": "Vidy Alfredo",
41
+ "license": "MIT",
42
+ "engines": {
43
+ "node": ">=18.0.0"
44
+ },
45
+ "scripts": {
46
+ "build": "node build.mjs && npm run build:types",
47
+ "build:types": "tsc -p tsconfig.build.json",
48
+ "test": "vitest run",
49
+ "test:watch": "vitest",
50
+ "typecheck": "tsc --noEmit",
51
+ "prepublishOnly": "npm run verify",
52
+ "verify": "npm run typecheck && npm run test && npm run build"
53
+ },
54
+ "peerDependencies": {
55
+ "@vyredo/rpc-bus": ">=0.1.3",
56
+ "typescript-6": "npm:typescript@^6.0.3"
57
+ },
58
+ "peerDependenciesMeta": {
59
+ "@vyredo/rpc-bus": {
60
+ "optional": true
61
+ }
62
+ },
63
+ "devDependencies": {
64
+ "@types/node": "^24.19.2",
65
+ "@vyredo/rpc-bus": "file:../rpc-bus",
66
+ "esbuild": "^0.28.2",
67
+ "javascript-obfuscator": "^4.2.2",
68
+ "typescript-6": "npm:typescript@^6.0.3",
69
+ "vitest": "^4.1.12"
70
+ },
71
+ "publishConfig": {
72
+ "access": "public"
73
+ }
74
+ }