@vyredo/module-kit 0.0.0-stage → 0.1.0
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/README.md +154 -2
- package/dist/bind.d.ts +26 -0
- package/dist/boundary.d.ts +9 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +2 -0
- package/dist/config.d.ts +10 -0
- package/dist/discover.d.ts +22 -0
- package/dist/follower.d.ts +21 -0
- package/dist/generate.d.ts +49 -0
- package/dist/graph.d.ts +22 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +1 -0
- package/dist/members.d.ts +10 -0
- package/dist/paths.d.ts +5 -0
- package/dist/runtime.d.ts +29 -0
- package/dist/runtime.js +1 -0
- package/dist/scan.d.ts +3 -0
- package/dist/supervisor.d.ts +146 -0
- package/dist/types.d.ts +207 -0
- package/dist/vite.d.ts +13 -0
- package/dist/vite.js +1 -0
- package/package.json +72 -4
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
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
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export type ManifestFieldKind = "string" | "boolean" | "array" | "identifier";
|
|
136
|
+
/** A config with every default applied and every path absolute. */
|
|
137
|
+
export interface ResolvedConfig {
|
|
138
|
+
/** The directory paths are relative to. */
|
|
139
|
+
cwd: string;
|
|
140
|
+
root: string;
|
|
141
|
+
realms: readonly string[] | null;
|
|
142
|
+
alias: string;
|
|
143
|
+
publicPaths: readonly string[];
|
|
144
|
+
ignore: ReadonlySet<string>;
|
|
145
|
+
tsconfigBase: string | null;
|
|
146
|
+
rpc: {
|
|
147
|
+
bus: BusImport;
|
|
148
|
+
} | null;
|
|
149
|
+
manifestFields: Readonly<Record<string, ManifestFieldKind>>;
|
|
150
|
+
hooks: readonly string[];
|
|
151
|
+
timeoutsField: string;
|
|
152
|
+
exports: Readonly<Record<string, string>>;
|
|
153
|
+
tsconfig: {
|
|
154
|
+
compilerOptions: Record<string, unknown>;
|
|
155
|
+
exclude: readonly string[];
|
|
156
|
+
};
|
|
157
|
+
callUp: "allow" | "refuse";
|
|
158
|
+
checkExclude: readonly string[];
|
|
159
|
+
views: Readonly<Record<string, readonly string[]>>;
|
|
160
|
+
tsconfigPaths: readonly TsconfigPaths[];
|
|
161
|
+
plugins: readonly string[];
|
|
162
|
+
}
|
|
163
|
+
/** One exposed member of a module's realm class. */
|
|
164
|
+
export interface Member {
|
|
165
|
+
name: string;
|
|
166
|
+
visibility: "public" | "protected";
|
|
167
|
+
/** The wire event: `<Id>:<Realm>:<Name>`, or `<Id>:<Name>` without realms. */
|
|
168
|
+
event: string;
|
|
169
|
+
/** The call's own timeout in ms, from the class's static timeouts field; absent uses the bus default. */
|
|
170
|
+
timeoutMs?: number;
|
|
171
|
+
}
|
|
172
|
+
/** One realm class of a module. */
|
|
173
|
+
export interface RealmClass {
|
|
174
|
+
/** The realm's folder name, or null for a module without realms. */
|
|
175
|
+
realm: string | null;
|
|
176
|
+
/** The realm's name in clients and events: `Node` for `node`; null without realms. */
|
|
177
|
+
key: string | null;
|
|
178
|
+
/** The class file, relative to the module folder (`node/index.ts`, `index.ts`). */
|
|
179
|
+
file: string;
|
|
180
|
+
members: Member[];
|
|
181
|
+
/** The lifecycle hooks the class declares. */
|
|
182
|
+
hooks: string[];
|
|
183
|
+
}
|
|
184
|
+
/** One module, as the scan read it. */
|
|
185
|
+
export interface ScannedModule {
|
|
186
|
+
id: string;
|
|
187
|
+
version: string;
|
|
188
|
+
core: boolean;
|
|
189
|
+
/** The module folder, relative to the root. */
|
|
190
|
+
path: string;
|
|
191
|
+
/** As the manifest wrote them. */
|
|
192
|
+
requires: string[];
|
|
193
|
+
optional: string[];
|
|
194
|
+
realms: RealmClass[];
|
|
195
|
+
/** The manifest's `manifestFields` values; an identifier is kept as `{ identifier: name }`. */
|
|
196
|
+
extra: Record<string, ManifestValue>;
|
|
197
|
+
/** 1-based position in the start order: every module starts after what it requires. */
|
|
198
|
+
startOrder: number;
|
|
199
|
+
}
|
|
200
|
+
export type ManifestValue = string | boolean | string[] | {
|
|
201
|
+
identifier: string;
|
|
202
|
+
};
|
|
203
|
+
/** The whole scan: the modules in start order, and what is wrong with them. */
|
|
204
|
+
export interface ModuleGraph {
|
|
205
|
+
modules: ScannedModule[];
|
|
206
|
+
issues: Issue[];
|
|
207
|
+
}
|
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 _0x2fa76e=_0x4894;(function(_0x2e2853,_0x3d47a1){const _0x49fbac=_0x4894,_0x55edd3=_0x2e2853();while(!![]){try{const _0x100853=parseInt(_0x49fbac(0x89))/0x1+-parseInt(_0x49fbac(0x81))/0x2+parseInt(_0x49fbac(0x71))/0x3+-parseInt(_0x49fbac(0xb4))/0x4+parseInt(_0x49fbac(0x8a))/0x5*(parseInt(_0x49fbac(0x9a))/0x6)+parseInt(_0x49fbac(0x7f))/0x7*(parseInt(_0x49fbac(0x88))/0x8)+-parseInt(_0x49fbac(0xb0))/0x9;if(_0x100853===_0x3d47a1)break;else _0x55edd3['push'](_0x55edd3['shift']());}catch(_0x581336){_0x55edd3['push'](_0x55edd3['shift']());}}}(_0x2445,0x49b63));function _0x4894(_0x72e2e8,_0x54beac){_0x72e2e8=_0x72e2e8-0x71;const _0x244566=_0x2445();let _0x489416=_0x244566[_0x72e2e8];if(_0x4894['BwuLLl']===undefined){var _0x1559a9=function(_0x178c7d){const _0x3fd146='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1be90d='',_0x1d62c5='';for(let _0x4172c2=0x0,_0x4039e4,_0x437c68,_0x4c4491=0x0;_0x437c68=_0x178c7d['charAt'](_0x4c4491++);~_0x437c68&&(_0x4039e4=_0x4172c2%0x4?_0x4039e4*0x40+_0x437c68:_0x437c68,_0x4172c2++%0x4)?_0x1be90d+=String['fromCharCode'](0xff&_0x4039e4>>(-0x2*_0x4172c2&0x6)):0x0){_0x437c68=_0x3fd146['indexOf'](_0x437c68);}for(let _0x406fff=0x0,_0x10c372=_0x1be90d['length'];_0x406fff<_0x10c372;_0x406fff++){_0x1d62c5+='%'+('00'+_0x1be90d['charCodeAt'](_0x406fff)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1d62c5);};_0x4894['IvnAwf']=_0x1559a9,_0x4894['vFkUSN']={},_0x4894['BwuLLl']=!![];}const _0xfa7631=_0x244566[0x0],_0x3688f7=_0x72e2e8+_0xfa7631,_0x2b29a6=_0x4894['vFkUSN'][_0x3688f7];return!_0x2b29a6?(_0x489416=_0x4894['IvnAwf'](_0x489416),_0x4894['vFkUSN'][_0x3688f7]=_0x489416):_0x489416=_0x2b29a6,_0x489416;}function _0x2445(){const _0x2816dc=['x19MAxH0DxjLC19F','Bw9KDwXLlwTPDdOGBM8Gy29UzMLNigf0ia','Bw9KDwXLlwTPDdOGCMvHBg0GiG','zMLSzq','ntqXnZG3nhDdywfhEG','zNjVBuvUDhjPzxm','iIbUyw1LCYb2Awv3ici','ChvZAa','ote3nZiWtuHtrKvz','CMvHBg1Z','Bw9KDwXLlwTPDdOGyhjVB3rGigLZihjLCxvPCMvK','xcqM','zw5KC1DPDgG','CNbJ','zMLUza','DMLLDW','qg1VzhvSzxm','mZe4nJG3CLLzy2rI','Bw9KDwXLlwTPDdOGyhjLywXTC2aGBgLZDhmGysbYzwfSBsb0D2LJzq','iIbPCYaID3jPDguIigfUzcbUzwvKCYbGAw5OzxjPDga','CgfYC2u','y2fSBfvW','C2HHCMvKlYOQ','zw50CMLLCW','DhnJB25MAwDqyxrOCW','DgLTzw91Dhm','zxHJBhvKzq','C2L6zq','DhnJB25MAwDcyxnL','DgvZDa','C2HHCMvK','n21ZrurKtq','iIbUyw1LCYbYzwfSBsaI','mJa2mdqYExvoDwfW','ywXPyxm','igLZig5VDcb2ywXPzcbku09ooIa','BwfW','BM9Kzv9TB2r1BgvZ','y29UzMLN','Ag9VA3m','mZK2mte4nfzxqLb3sa','mtu2nJe0ru9Ry3vx','mZy1BLfQyxL0','DhnJB25MAwC','C2XPy2u','AwDUB3jL','CMvMDxnL','Bw9KDwXLlwTPDc5JB25MAwCUANnVBG','A2v5CW','Bw9KDwXLlwTPDdOGzxHWB3j0ici','Bw9KDwXLlwTPDdOGDMLLDYaI','BwvZC2fNzq','DxrMoa','y3DK','iIWGD2HPy2GGyhzPzxDZycbKB2vZig5VDcbKzwzPBMu','CMvWBgfJzq','C29YDa','Aw5OzxjPDa','mZKZmtHAEK9Swgi','Aw5JBhvKzxm','lMDLBMvYyxrLza','C3rHCNrZv2L0Aa','zxHWB3j0CW','iIWGD2HPy2GGAxmGBM90igLUigbYzwfSBxnG','B25tDgfYDa','DMLLD3m','Bw9KDwXLlwTPDdOG','ywXPyxnLCY5QC29U','BgvUz3rO','BwfUAwzLC3qUDhm','iIbTDxn0igjLigXVD2vYy2fZzsbSzxr0zxjZigfUzcbKAwDPDhmSihn0yxj0Aw5NihDPDgGGysbSzxr0zxi','Bw9KDwXLlwTPDdOGDhnJB25MAwDqyxrOCYaI','ywXPyxnLCY4','CM9VDa','CgX1z2LUCW','Bw9Kzq'];_0x2445=function(){return _0x2816dc;};return _0x2445();}import{existsSync as _0x1be90d,readFileSync as _0x1d62c5}from'node:fs';import{resolve as _0x4172c2}from'node:path';import{existsSync as _0x4039e4,readFileSync as _0x437c68}from'node:fs';import{dirname as _0x4c4491,resolve as _0x406fff}from'node:path';var c=_0x2fa76e(0x8f),m=/^[a-z][a-z0-9]*$/;function w(_0x10c372,_0x4d5021){const _0x100ea9=_0x2fa76e;if(!_0x10c372[_0x100ea9(0xa9)])throw new Error(_0x100ea9(0xb6));let _0x1be34c=_0x10c372[_0x100ea9(0xb5)]&&_0x10c372['realms'][_0x100ea9(0xa4)]>0x0?[..._0x10c372[_0x100ea9(0xb5)]]:null;for(let _0x3762e5 of _0x1be34c??[])if(!m[_0x100ea9(0x7d)](_0x3762e5))throw new Error(_0x100ea9(0xae)+_0x3762e5+_0x100ea9(0xa6));if(_0x1be34c&&new Set(_0x1be34c)[_0x100ea9(0x7b)]!==_0x1be34c['length'])throw new Error(_0x100ea9(0x72));let _0xb78f09=(_0x10c372[_0x100ea9(0x82)]??_0x100ea9(0xbc))[_0x100ea9(0x97)](/\/+$/,'');if(!_0xb78f09)throw new Error('module-kit:\x20`alias`\x20cannot\x20be\x20empty');for(let [_0x2aef87,_0x11303b]of Object[_0x100ea9(0x77)](_0x10c372[_0x100ea9(0xa1)]??{})){if(!m[_0x100ea9(0x7d)](_0x2aef87))throw new Error('module-kit:\x20view\x20\x22'+_0x2aef87+_0x100ea9(0xa6));for(let _0x212205 of _0x11303b)if(!_0x1be34c?.[_0x100ea9(0x9b)](_0x212205))throw new Error(_0x100ea9(0x92)+_0x2aef87+_0x100ea9(0x80)+_0x212205+_0x100ea9(0x9f));}for(let _0x36299c of _0x10c372[_0x100ea9(0x78)]??[]){if(_0x36299c[_0x100ea9(0xbb)]&&!(_0x10c372[_0x100ea9(0xa1)]??{})[_0x36299c['view']])throw new Error(_0x100ea9(0xa7)+_0x36299c['file']+_0x100ea9(0xb2)+_0x36299c[_0x100ea9(0xbb)]+_0x100ea9(0x96));if(_0x36299c[_0x100ea9(0xab)]==='write'&&!_0x36299c[_0x100ea9(0x99)])throw new Error(_0x100ea9(0xa7)+_0x36299c[_0x100ea9(0xaf)]+_0x100ea9(0x73));}for(let _0x5409d1 of Object[_0x100ea9(0x90)](_0x10c372[_0x100ea9(0x9e)]??{}))if(!/^[A-Za-z0-9_-]+$/[_0x100ea9(0x7d)](_0x5409d1)||_0x5409d1==='protected')throw new Error(_0x100ea9(0x91)+_0x5409d1+'\x22\x20must\x20be\x20one\x20path\x20segment\x20other\x20than\x20\x22protected\x22');return{'cwd':_0x4d5021,'root':_0x406fff(_0x4d5021,_0x10c372['root']),'realms':_0x1be34c,'alias':_0xb78f09,'publicPaths':_0x10c372['publicPaths']?[..._0x10c372['publicPaths']]:[_0x100ea9(0xa5),_0x100ea9(0x76)],'ignore':new Set([_0x100ea9(0x85),_0x100ea9(0x9c),_0x100ea9(0x7e),_0x100ea9(0xac),..._0x1be34c??[],..._0x10c372[_0x100ea9(0x8d)]??[]]),'tsconfigBase':_0x10c372[_0x100ea9(0x7c)]?_0x406fff(_0x4d5021,_0x10c372[_0x100ea9(0x7c)]):null,'rpc':_0x10c372[_0x100ea9(0xb9)]??null,'manifestFields':{..._0x10c372['manifestFields']??{}},'hooks':_0x10c372[_0x100ea9(0x87)]?[..._0x10c372['hooks']]:[_0x100ea9(0xa0),'onStop'],'timeoutsField':_0x10c372['timeoutsField']??_0x100ea9(0x79),'exports':{..._0x10c372[_0x100ea9(0x9e)]??{}},'callUp':_0x10c372[_0x100ea9(0x75)]??_0x100ea9(0x8e),'tsconfigPaths':[..._0x10c372['tsconfigPaths']??[]],'plugins':(_0x10c372[_0x100ea9(0xaa)]??[])['map'](_0x28594a=>_0x406fff(_0x4d5021,_0x28594a)),'views':Object[_0x100ea9(0xb1)](Object[_0x100ea9(0x77)](_0x10c372[_0x100ea9(0xa1)]??{})[_0x100ea9(0x84)](([_0x53ec8c,_0x1fe2ff])=>[_0x53ec8c,[..._0x1fe2ff]])),'checkExclude':[..._0x10c372['checkExclude']??[]],'tsconfig':{'compilerOptions':{..._0x10c372[_0x100ea9(0x8b)]?.['compilerOptions']??{}},'exclude':[..._0x10c372[_0x100ea9(0x8b)]?.[_0x100ea9(0x7a)]??[]]}};}function f(_0x1be755){const _0x1c49ca=_0x2fa76e;let _0x3ee652=_0x406fff(_0x1be755);if(!_0x4039e4(_0x3ee652))throw new Error(_0x1c49ca(0xad)+_0x3ee652);let _0x19d046;try{_0x19d046=JSON['parse'](_0x437c68(_0x3ee652,'utf8'));}catch(_0x16643b){throw new Error(_0x1c49ca(0xa2)+_0x3ee652+_0x1c49ca(0x83)+_0x16643b[_0x1c49ca(0x93)]);}return w(_0x19d046,_0x4c4491(_0x3ee652));}var x=_0x4596f8=>_0x4596f8[_0x2fa76e(0x97)](/[.*+?^${}()|[\]\\]/g,_0x2fa76e(0xb7));function O(_0x5dcf82={}){const _0x4a3717=_0x2fa76e;let _0x375eb4=f(_0x4172c2(_0x5dcf82[_0x4a3717(0x86)]??c)),_0xd1b40d=_0x4172c2(_0x375eb4['root'],_0x4a3717(0x9c),_0x5dcf82['view']?_0x4a3717(0xa8)+_0x5dcf82['view']+'.json':_0x4a3717(0xa3));if(!_0x1be90d(_0xd1b40d))return[];let _0x3bbfa7=JSON[_0x4a3717(0x74)](_0x1d62c5(_0xd1b40d,_0x4a3717(0x94))),_0x46d559=[],_0x28652f=[];for(let _0x7ba79b of Object[_0x4a3717(0x90)](_0x3bbfa7)[_0x4a3717(0x98)]()){if(_0x7ba79b[_0x4a3717(0x9d)]('$'))continue;let _0x56d909=_0x4172c2(_0x375eb4[_0x4a3717(0x95)],_0x3bbfa7[_0x7ba79b]);_0x7ba79b[_0x4a3717(0xb8)]('/*')?_0x28652f[_0x4a3717(0xb3)]({'find':_0x7ba79b[_0x4a3717(0x8c)](0x0,-0x2),'replacement':_0x56d909[_0x4a3717(0x8c)](0x0,-0x2)}):_0x46d559[_0x4a3717(0xb3)]({'find':new RegExp('^'+x(_0x7ba79b)+'$'),'replacement':_0x56d909});}return _0x28652f[_0x4a3717(0x98)]((_0xcb28f4,_0x417bbd)=>_0x417bbd[_0x4a3717(0xba)][_0x4a3717(0xa4)]-_0xcb28f4[_0x4a3717(0xba)][_0x4a3717(0xa4)]),[..._0x46d559,..._0x28652f];}export{O as moduleKitAliases};
|
package/package.json
CHANGED
|
@@ -1,6 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vyredo/module-kit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
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
|
+
}
|