@forinda/kickjs-cli 6.0.1 → 6.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/dist/{agent-docs-hbOXsAAh.mjs → agent-docs-DB5y-kvS.mjs} +3 -3
- package/dist/{agent-docs-hbOXsAAh.mjs.map → agent-docs-DB5y-kvS.mjs.map} +1 -1
- package/dist/build-9YFC7Rd4.mjs +13 -0
- package/dist/build-9YFC7Rd4.mjs.map +1 -0
- package/dist/{builtins-Dyk9a-mv.mjs → builtins-mr3TIDa8.mjs} +2 -2
- package/dist/cli.mjs +143 -151
- package/dist/{config-DSpcRefL.mjs → config-Dc4XuP2E.mjs} +3 -3
- package/dist/config-Dc4XuP2E.mjs.map +1 -0
- package/dist/{doctor-559QZlHi.mjs → doctor-shX-k8ju.mjs} +41 -41
- package/dist/doctor-shX-k8ju.mjs.map +1 -0
- package/dist/index.d.mts +279 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{plugin-DK01q7wy.mjs → plugin-DVOWYRqG.mjs} +3 -3
- package/dist/{plugin-DK01q7wy.mjs.map → plugin-DVOWYRqG.mjs.map} +1 -1
- package/dist/{project-docs-CrfNQIZA.mjs → project-docs-Cq_MswOY.mjs} +2 -2
- package/dist/{project-docs-CrfNQIZA.mjs.map → project-docs-Cq_MswOY.mjs.map} +1 -1
- package/dist/{project-root-BdTe6EpE.mjs → project-root-C3u57Vec.mjs} +3 -3
- package/dist/{project-root-BdTe6EpE.mjs.map → project-root-C3u57Vec.mjs.map} +1 -1
- package/dist/{rolldown-runtime-CoN4EDcd.mjs → rolldown-runtime-BMxBusPc.mjs} +1 -1
- package/dist/{run-plugins-BAYoDnFI.mjs → run-plugins-COniKxrL.mjs} +73 -82
- package/dist/run-plugins-COniKxrL.mjs.map +1 -0
- package/dist/typegen-DPATg8Ix.mjs +114 -0
- package/dist/typegen-DPATg8Ix.mjs.map +1 -0
- package/dist/{types-BKKzf_bU.mjs → types-B2r_OeIa.mjs} +1 -1
- package/package.json +6 -6
- package/dist/config-DSpcRefL.mjs.map +0 -1
- package/dist/doctor-559QZlHi.mjs.map +0 -1
- package/dist/run-plugins-BAYoDnFI.mjs.map +0 -1
- package/dist/typegen-CwtvFZ0t.mjs +0 -114
- package/dist/typegen-CwtvFZ0t.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -494,6 +494,20 @@ interface KickConfig {
|
|
|
494
494
|
* ```
|
|
495
495
|
*/
|
|
496
496
|
typegen?: TypegenConfig;
|
|
497
|
+
/**
|
|
498
|
+
* Dev-server (`kick dev`) settings.
|
|
499
|
+
*/
|
|
500
|
+
dev?: {
|
|
501
|
+
/**
|
|
502
|
+
* Run the project's TypeScript checker (`tsgo --noEmit`, falling
|
|
503
|
+
* back to `tsc --noEmit`) after each debounced change and surface
|
|
504
|
+
* diagnostics in the dev console + a `kickjs:typecheck` HMR event.
|
|
505
|
+
* Equivalent to the `kick dev --typecheck` flag.
|
|
506
|
+
*
|
|
507
|
+
* @default false
|
|
508
|
+
*/
|
|
509
|
+
typecheck?: boolean;
|
|
510
|
+
};
|
|
497
511
|
/**
|
|
498
512
|
* Database settings — schema path, migrations dir, dialect,
|
|
499
513
|
* connection string, optional adapter factory. Consumed by
|
|
@@ -1000,6 +1014,13 @@ interface ScanOptions {
|
|
|
1000
1014
|
*/
|
|
1001
1015
|
cacheDir?: string;
|
|
1002
1016
|
}
|
|
1017
|
+
/** A precise set of filesystem changes, as reported by a watcher. */
|
|
1018
|
+
interface ScanDelta {
|
|
1019
|
+
/** Files added or modified since the last scan (absolute or cwd-relative). */
|
|
1020
|
+
changed: string[];
|
|
1021
|
+
/** Files deleted since the last scan. */
|
|
1022
|
+
removed: string[];
|
|
1023
|
+
}
|
|
1003
1024
|
//#endregion
|
|
1004
1025
|
//#region src/typegen/plugin.d.ts
|
|
1005
1026
|
interface TypegenLogger {
|
|
@@ -1090,6 +1111,263 @@ interface TypegenPluginResult {
|
|
|
1090
1111
|
*/
|
|
1091
1112
|
declare function defineTypegen(spec: TypegenPlugin): TypegenPlugin;
|
|
1092
1113
|
//#endregion
|
|
1114
|
+
//#region src/typegen/token-conventions.d.ts
|
|
1115
|
+
interface TokenConventionWarning {
|
|
1116
|
+
token: string;
|
|
1117
|
+
variable: string | null;
|
|
1118
|
+
filePath: string;
|
|
1119
|
+
reason: string;
|
|
1120
|
+
suggestion?: string;
|
|
1121
|
+
}
|
|
1122
|
+
//#endregion
|
|
1123
|
+
//#region src/typegen/index.d.ts
|
|
1124
|
+
/**
|
|
1125
|
+
* Result of a typegen run — useful for logging and tests. Computed from
|
|
1126
|
+
* the scan result + asset discovery; the per-file emission itself is now
|
|
1127
|
+
* owned entirely by the typegen plugins (see `builtin/`).
|
|
1128
|
+
*/
|
|
1129
|
+
interface GenerateResult {
|
|
1130
|
+
/** Number of registry-decorated classes (KickJsRegistry entries) */
|
|
1131
|
+
registryEntries: number;
|
|
1132
|
+
/** Number of unique service tokens (classes + createToken + @Inject literals) */
|
|
1133
|
+
serviceTokens: number;
|
|
1134
|
+
/** Number of module tokens */
|
|
1135
|
+
moduleTokens: number;
|
|
1136
|
+
/** Number of route entries */
|
|
1137
|
+
routeEntries: number;
|
|
1138
|
+
/** Number of unique plugin/adapter names */
|
|
1139
|
+
pluginEntries: number;
|
|
1140
|
+
/** Number of unique `defineAugmentation` calls */
|
|
1141
|
+
augmentationEntries: number;
|
|
1142
|
+
/** Number of typed asset entries */
|
|
1143
|
+
assetEntries: number;
|
|
1144
|
+
/** Whether a typed env augmentation will be emitted */
|
|
1145
|
+
envWritten: boolean;
|
|
1146
|
+
/** Files written this pass (barrel + plugin outputs), for the sweep */
|
|
1147
|
+
written: string[];
|
|
1148
|
+
/** Number of collisions (only > 0 with allowDuplicates) */
|
|
1149
|
+
resolvedCollisions: number;
|
|
1150
|
+
}
|
|
1151
|
+
/** Options for `runTypegen` */
|
|
1152
|
+
interface RunTypegenOptions {
|
|
1153
|
+
/** Project root (defaults to `process.cwd()`) */
|
|
1154
|
+
cwd?: string;
|
|
1155
|
+
/** Source directory to scan (defaults to `src`) */
|
|
1156
|
+
srcDir?: string;
|
|
1157
|
+
/** Output directory (defaults to `.kickjs/types`) */
|
|
1158
|
+
outDir?: string;
|
|
1159
|
+
/** Suppress console output */
|
|
1160
|
+
silent?: boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* When `true`, duplicate class names are auto-namespaced by file path
|
|
1163
|
+
* instead of throwing. `kick dev` enables this so the dev server is
|
|
1164
|
+
* never blocked by an in-progress rename. CLI default is `false` so
|
|
1165
|
+
* `kick typegen` (and CI) catches collisions early. */
|
|
1166
|
+
allowDuplicates?: boolean;
|
|
1167
|
+
/**
|
|
1168
|
+
* Schema validator used to derive `body`/`query`/`params` types from
|
|
1169
|
+
* route metadata. Currently only `'zod'` is supported; `false` (the
|
|
1170
|
+
* default) leaves these fields as `unknown`. Loaded from
|
|
1171
|
+
* `kick.config.ts` `typegen.schemaValidator` when invoked via the CLI.
|
|
1172
|
+
*/
|
|
1173
|
+
schemaValidator?: 'zod' | 'kickjs-schema' | false;
|
|
1174
|
+
/**
|
|
1175
|
+
* Path to the env schema file (relative to `cwd`). The file must
|
|
1176
|
+
* default-export a `defineEnv(...)` schema for the typed `KickEnv`
|
|
1177
|
+
* augmentation to be emitted. Defaults to `'src/env.ts'`. Set to
|
|
1178
|
+
* `false` to disable env typing entirely.
|
|
1179
|
+
*/
|
|
1180
|
+
envFile?: string | false;
|
|
1181
|
+
/**
|
|
1182
|
+
* Asset map from `kick.config.ts`. When set, `runTypegen` walks
|
|
1183
|
+
* each entry's `src` directory + emits `.kickjs/types/assets.d.ts`
|
|
1184
|
+
* augmenting `KickAssets` for autocomplete on `assets.x.y()` and
|
|
1185
|
+
* `@Asset('x/y')`. Omit to skip the asset typegen pass entirely.
|
|
1186
|
+
*/
|
|
1187
|
+
assetMap?: Record<string, AssetMapEntry>;
|
|
1188
|
+
/**
|
|
1189
|
+
* Whether `runTypegen` should also run the TypegenPlugin pipeline
|
|
1190
|
+
* (`runAllPluginTypegens`) after the legacy generator pass. Defaults
|
|
1191
|
+
* to `true` so single-shot callers (kick g, commands/typegen, tests)
|
|
1192
|
+
* keep getting a fully-refreshed `.kickjs/types/` from one entry
|
|
1193
|
+
* point. `watchTypegen` flips this to `false` because it manages
|
|
1194
|
+
* the plugin pass itself + would otherwise double-run it on every
|
|
1195
|
+
* filesystem trigger.
|
|
1196
|
+
*/
|
|
1197
|
+
runPlugins?: boolean;
|
|
1198
|
+
/**
|
|
1199
|
+
* Exact watcher delta (Vite chokidar events). When present, the scan
|
|
1200
|
+
* runs incrementally — re-extracting only the changed files and
|
|
1201
|
+
* skipping the directory walk — and the same delta is forwarded to
|
|
1202
|
+
* the plugin pass. `kick dev` supplies this on every file change.
|
|
1203
|
+
*/
|
|
1204
|
+
changedFiles?: ScanDelta;
|
|
1205
|
+
}
|
|
1206
|
+
/**
|
|
1207
|
+
* Run a single typegen pass: scan source files, generate `.d.ts` files.
|
|
1208
|
+
*
|
|
1209
|
+
* Returns the discovered scan result alongside the generation result so
|
|
1210
|
+
* callers (`kick dev`, devtools) can log them or feed them to other tools.
|
|
1211
|
+
*
|
|
1212
|
+
* Throws `TokenCollisionError` if duplicate class names are found and
|
|
1213
|
+
* `allowDuplicates` is false.
|
|
1214
|
+
*/
|
|
1215
|
+
declare function runTypegen(opts?: RunTypegenOptions): Promise<{
|
|
1216
|
+
scan: ScanResult;
|
|
1217
|
+
result: GenerateResult; /** Token convention warnings — empty when every literal matches §22.2. */
|
|
1218
|
+
tokenWarnings: TokenConventionWarning[];
|
|
1219
|
+
}>;
|
|
1220
|
+
/**
|
|
1221
|
+
* Post-plugin-pass finalisation: write the `.kickjs/.gitignore` guard
|
|
1222
|
+
* and sweep stale legacy files. Shared by `runTypegen` (single-shot
|
|
1223
|
+
* mode) and the split-mode callers (`kick typegen` / `kick dev` /
|
|
1224
|
+
* watch) so the artifact-writing + sweep stay identical across both.
|
|
1225
|
+
*
|
|
1226
|
+
* No barrel `index.d.ts` is emitted: the scaffolded tsconfig pulls
|
|
1227
|
+
* `.kickjs/types/**` in via `include` globs, so every `declare module`
|
|
1228
|
+
* / `declare global` augmentation in the per-plugin files applies by
|
|
1229
|
+
* inclusion. The old barrel + its `ServiceToken`/`ModuleToken`
|
|
1230
|
+
* re-exports were redundant; they're swept as legacy orphans.
|
|
1231
|
+
*
|
|
1232
|
+
* Returns the list of files considered "written" this pass (the plugin
|
|
1233
|
+
* outputs) for the caller's bookkeeping.
|
|
1234
|
+
*/
|
|
1235
|
+
declare function writeTypegenArtifacts(outDir: string, pluginResults: readonly TypegenPluginResult[], silent: boolean): Promise<string[]>;
|
|
1236
|
+
//#endregion
|
|
1237
|
+
//#region src/typegen/run-plugins.d.ts
|
|
1238
|
+
interface RunAllPluginTypegensOptions {
|
|
1239
|
+
cwd: string;
|
|
1240
|
+
/** Pre-loaded kick.config.ts (saves a re-read). */
|
|
1241
|
+
config: KickConfig | null;
|
|
1242
|
+
/** Suppress per-plugin status logging. Errors still swallowed when true. */
|
|
1243
|
+
silent?: boolean;
|
|
1244
|
+
/** CI gate — fail (do not write) on the first plugin whose output drifted. */
|
|
1245
|
+
check?: boolean;
|
|
1246
|
+
/**
|
|
1247
|
+
* Exact watcher delta. Forwarded to the scanner so the plugin pass
|
|
1248
|
+
* scans incrementally (changed files only) instead of re-walking the
|
|
1249
|
+
* whole tree. Used by `kick dev`'s file-change handler.
|
|
1250
|
+
*/
|
|
1251
|
+
changedFiles?: ScanDelta;
|
|
1252
|
+
}
|
|
1253
|
+
declare function runAllPluginTypegens(opts: RunAllPluginTypegensOptions): Promise<TypegenPluginResult[]>;
|
|
1254
|
+
//#endregion
|
|
1255
|
+
//#region src/asset-manager/build.d.ts
|
|
1256
|
+
/** Wire-format version for `dist/.kickjs-assets.json`. Bump on shape change. */
|
|
1257
|
+
declare const ASSET_MANIFEST_VERSION: 1;
|
|
1258
|
+
/** On-disk manifest format (`dist/.kickjs-assets.json`). */
|
|
1259
|
+
interface AssetManifest {
|
|
1260
|
+
version: typeof ASSET_MANIFEST_VERSION;
|
|
1261
|
+
/**
|
|
1262
|
+
* Logical key → manifest-relative path. Logical key is
|
|
1263
|
+
* `<namespace>/<key>` where `<key>` is the file path under `src`
|
|
1264
|
+
* with the extension stripped + path separators normalised.
|
|
1265
|
+
*
|
|
1266
|
+
* Path values are relative to the manifest file's directory so the
|
|
1267
|
+
* runtime can resolve them with a single `path.resolve(manifestDir,
|
|
1268
|
+
* entry)` regardless of where dist/ lives.
|
|
1269
|
+
*/
|
|
1270
|
+
entries: Record<string, string>;
|
|
1271
|
+
}
|
|
1272
|
+
interface BuildAssetsOptions {
|
|
1273
|
+
/** Project root — resolved for every relative path in the entry. */
|
|
1274
|
+
cwd: string;
|
|
1275
|
+
/**
|
|
1276
|
+
* Output dir for the manifest + per-namespace asset copies. When
|
|
1277
|
+
* omitted, falls back to `config.build?.outDir` (resolved against
|
|
1278
|
+
* `cwd`), then to `dist/` under cwd. Adopters with a custom Vite
|
|
1279
|
+
* `build.outDir` should set `kick.config.ts.build.outDir` to match.
|
|
1280
|
+
*/
|
|
1281
|
+
distDir?: string;
|
|
1282
|
+
/** Suppress per-entry log lines. Default: false. */
|
|
1283
|
+
silent?: boolean;
|
|
1284
|
+
}
|
|
1285
|
+
/** One entry in the per-build summary returned by `buildAssets`. */
|
|
1286
|
+
interface BuildAssetsEntryResult {
|
|
1287
|
+
namespace: string;
|
|
1288
|
+
src: string;
|
|
1289
|
+
dest: string;
|
|
1290
|
+
/**
|
|
1291
|
+
* Number of files actually written this run. On an incremental
|
|
1292
|
+
* rebuild where nothing changed this is 0 even though the manifest
|
|
1293
|
+
* still lists every matched file.
|
|
1294
|
+
*/
|
|
1295
|
+
filesCopied: number;
|
|
1296
|
+
}
|
|
1297
|
+
/** Aggregated outcome of `buildAssets`. */
|
|
1298
|
+
interface BuildAssetsResult {
|
|
1299
|
+
manifestPath: string;
|
|
1300
|
+
entries: BuildAssetsEntryResult[];
|
|
1301
|
+
/** `entries` merged into a single record — useful for tests + tooling. */
|
|
1302
|
+
manifest: AssetManifest;
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* Run the full asset build for a loaded config:
|
|
1306
|
+
*
|
|
1307
|
+
* 1. For each `assetMap` entry, glob → copy → manifest stub.
|
|
1308
|
+
* 2. Write `dist/.kickjs-assets.json`.
|
|
1309
|
+
*
|
|
1310
|
+
* Returns a summary including the manifest contents. No-op (and no
|
|
1311
|
+
* manifest written) when `assetMap` is empty / missing — the build
|
|
1312
|
+
* pipeline shouldn't litter `dist/` with empty manifests for
|
|
1313
|
+
* adopters who don't use the feature.
|
|
1314
|
+
*/
|
|
1315
|
+
declare function buildAssets(config: KickConfig | null, opts: BuildAssetsOptions): Promise<BuildAssetsResult | null>;
|
|
1316
|
+
//#endregion
|
|
1317
|
+
//#region src/typegen/dev-watcher.d.ts
|
|
1318
|
+
/**
|
|
1319
|
+
* `globalThis` key claiming typegen ownership for the current process.
|
|
1320
|
+
* Set by `kick dev` (which boots Vite in-process) so the vite plugin's
|
|
1321
|
+
* own watcher never double-runs the pipeline.
|
|
1322
|
+
*/
|
|
1323
|
+
declare const TYPEGEN_OWNER_KEY = "__kickjs_typegen_owner";
|
|
1324
|
+
type TypegenWatchEvent = 'add' | 'change' | 'unlink' | 'unlinkDir';
|
|
1325
|
+
/** Injectable pipeline — production uses the real functions. */
|
|
1326
|
+
interface TypegenDevPipeline {
|
|
1327
|
+
runTypegen: typeof runTypegen;
|
|
1328
|
+
runAllPluginTypegens: typeof runAllPluginTypegens;
|
|
1329
|
+
writeTypegenArtifacts: typeof writeTypegenArtifacts;
|
|
1330
|
+
buildAssets: typeof buildAssets;
|
|
1331
|
+
}
|
|
1332
|
+
interface TypegenDevWatcherOptions {
|
|
1333
|
+
cwd: string;
|
|
1334
|
+
/** Pre-loaded kick.config.ts (null when the project has none). */
|
|
1335
|
+
config: KickConfig | null;
|
|
1336
|
+
/**
|
|
1337
|
+
* Warning sink — wired by the caller to `console.warn` plus whatever
|
|
1338
|
+
* HMR broadcast it has (e.g. the `kickjs:typegen-error` custom event).
|
|
1339
|
+
*/
|
|
1340
|
+
emitWarning: (message: string) => void;
|
|
1341
|
+
/**
|
|
1342
|
+
* Invoked after each pass's plugin chain settles (success or failure).
|
|
1343
|
+
* `kick dev` uses it to schedule the `--typecheck` worker against
|
|
1344
|
+
* fresh `.kickjs/types`.
|
|
1345
|
+
*/
|
|
1346
|
+
onPassComplete?: () => void;
|
|
1347
|
+
/** Debounce window in ms. @default 100 */
|
|
1348
|
+
debounceMs?: number;
|
|
1349
|
+
/** Test seam — defaults to the real typegen pipeline. */
|
|
1350
|
+
pipeline?: TypegenDevPipeline;
|
|
1351
|
+
}
|
|
1352
|
+
interface TypegenDevWatcher {
|
|
1353
|
+
/** Feed a chokidar-style watcher event into the debounce window. */
|
|
1354
|
+
handleWatchEvent(event: TypegenWatchEvent, file: string): void;
|
|
1355
|
+
/**
|
|
1356
|
+
* Run one full (non-incremental) pass immediately — startup catch-up
|
|
1357
|
+
* for callers that didn't run typegen before the server booted.
|
|
1358
|
+
*/
|
|
1359
|
+
runOnce(): void;
|
|
1360
|
+
/**
|
|
1361
|
+
* Absolute `assetMap.<ns>.src` roots. Vite's default watcher ignores
|
|
1362
|
+
* extensions it doesn't compile, so callers should `watcher.add(...)`
|
|
1363
|
+
* these to receive template-file events at all.
|
|
1364
|
+
*/
|
|
1365
|
+
assetSrcRoots: readonly string[];
|
|
1366
|
+
/** Cancel any pending debounced pass. */
|
|
1367
|
+
dispose(): void;
|
|
1368
|
+
}
|
|
1369
|
+
declare function createTypegenDevWatcher(opts: TypegenDevWatcherOptions): TypegenDevWatcher;
|
|
1370
|
+
//#endregion
|
|
1093
1371
|
//#region src/generator-extension/discover.d.ts
|
|
1094
1372
|
/**
|
|
1095
1373
|
* One row in the discovered registry. `source` is the npm package name
|
|
@@ -1156,5 +1434,5 @@ declare function toKebabCase(name: string): string;
|
|
|
1156
1434
|
*/
|
|
1157
1435
|
declare function pluralize(name: string): string;
|
|
1158
1436
|
//#endregion
|
|
1159
|
-
export { type DiscoveredGenerator, type DiscoveryResult, type DoctorCheck, type DoctorContext, type DoctorExtension, type DoctorResult, type GeneratorArg, type GeneratorContext, type GeneratorFile, type GeneratorFlag, type GeneratorSpec, type KickCliPlugin, type KickCliPluginContext, type KickCommandDefinition, type KickConfig, type KickDbConfigBlock, KickPluginConflictError, type TypegenContext, type TypegenPlugin, type TypegenPluginResult, buildGeneratorContext, defineCliPlugin, defineConfig, defineDoctorCheck, defineDoctorExtension, defineGenerator, defineTypegen, findProjectRoot, generateAdapter, generateController, generateDto, generateGuard, generateMiddleware, generateModule, generateService, initProject, loadKickConfig, pluralize, toCamelCase, toKebabCase, toPascalCase };
|
|
1437
|
+
export { type DiscoveredGenerator, type DiscoveryResult, type DoctorCheck, type DoctorContext, type DoctorExtension, type DoctorResult, type GeneratorArg, type GeneratorContext, type GeneratorFile, type GeneratorFlag, type GeneratorSpec, type KickCliPlugin, type KickCliPluginContext, type KickCommandDefinition, type KickConfig, type KickDbConfigBlock, KickPluginConflictError, TYPEGEN_OWNER_KEY, type TypegenContext, type TypegenDevWatcher, type TypegenDevWatcherOptions, type TypegenPlugin, type TypegenPluginResult, type TypegenWatchEvent, buildGeneratorContext, createTypegenDevWatcher, defineCliPlugin, defineConfig, defineDoctorCheck, defineDoctorExtension, defineGenerator, defineTypegen, findProjectRoot, generateAdapter, generateController, generateDto, generateGuard, generateMiddleware, generateModule, generateService, initProject, loadKickConfig, pluralize, toCamelCase, toKebabCase, toPascalCase };
|
|
1160
1438
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/commands/doctor.ts","../src/plugin/types.ts","../src/config.ts","../src/generators/templates/types.ts","../src/generators/module.ts","../src/generators/adapter.ts","../src/generators/middleware.ts","../src/generators/guard.ts","../src/generators/service.ts","../src/generators/controller.ts","../src/generators/dto.ts","../src/generators/project.ts","../src/utils/project-root.ts","../src/typegen/scanner.ts","../src/typegen/plugin.ts","../src/generator-extension/discover.ts","../src/generator-extension/context.ts","../src/utils/naming.ts"],"mappings":";;;;;;AA0BA;;;;;;;;AAGU;AAGV;;;;UANiB,aAAA;EACf,GAAA;EACA,GAAA;EACA,QAAA;AAAA;AAAA,UAGe,YAAA;EAUL;EARV,IAAA;EACA,MAAA;EAQK;EANL,OAAA;EAOkB;EALlB,GAAA;AAAA;AAAA,KAGU,WAAA,IACV,GAAA,EAAK,aAAA,KACF,YAAA,GAAe,YAAA,YAAwB,OAAA,CAAQ,YAAA,GAAe,YAAA;;;;;;UAOlD,eAAA;EAP2B;EAS1C,MAAA,GAAS,WAAW;AAAA;;AATyD;AAO/E;;;;AAEsB;AAqCtB;;;;;;;;AAA4E;AA0B5E;;;;;;;;AAAkE;;;;ACnFlE;;;;AAAiE;AAGjE;iBDsDgB,qBAAA,CAAsB,GAAA,EAAK,eAAA,GAAkB,eAAe;;;ACtDzB;;;;AC7BnD;;;;;;;;;AAeS;AAIT;;;;AAA0B;AAG1B;iBFuFgB,iBAAA,CAAkB,KAAA,EAAO,WAAA,GAAc,WAAW;;;;KCnFtD,oBAAA,GAAuB,sBAAmB,CAAC,UAAA;;KAG3C,aAAA,GAAgB,eAAY,CAAC,UAAA;;;;UC7BxB,qBAAA;;EAEf,IAAA;EFiB4B;EEf5B,WAAA;EFe4B;;;;;AAGpB;AAGV;;EEZE,KAAA;EFY2B;EEV3B,OAAA;AAAA;;KAIU,cAAA;;KAGA,cAAA;;;;;;;;;;KAaA,iBAAA;AFWU;AAAA,UEgBL,cAAA;EACf,IAAI;AAAA;;KAIM,cAAA,GAAiB,iBAAA,GAAkB,cAAc;;;;AFgBe;AA0B5E;;;;;;KE9BY,eAAA;;AF8BsD;;;;UEvBjD,aAAA;ED5De;;;AAAiC;AAGjE;;ECgEE,GAAA;EDhE0B;AAAuB;;;;AC7BnD;EAoGE,IAAA;;;;;;EAMA,IAAA;EA3FO;AAAA;AAIT;;;;AAA0B;AAG1B;;;;AAA0B;AAa1B;;;;AAA2B;AA2B3B;;;;EAkEE,IAAA;AAAA;;;;AA7D2D;AAY7D;;;;AAA2B;AAO3B;;;;;;;;;AA0CM;AAyBN;;;UAAiB,iBAAA;EAKf;;;;EAAA,UAAA;EAqB0B;;AAAO;AAInC;EApBE,aAAA;;EAEA,OAAA;EAuBA;;;;;;EAhBA,gBAAA;EA8DO;AAIT;;;;;EA3DE,OAAA,mBAA0B,OAAO;AAAA;;UAIlB,aAAA;EAyFf;;;AAoBK;EAxGL,MAAA;EA4GyB;;;;EAvGzB,MAAA;EA8KW;;;;;;;;;;;;EAjKX,eAAA,GAAkB,eAAe;EA8GvB;;;;;;;;;EApGV,OAAA;EAiMA;;;;;;;;;;;;;;;;;EA/KA,OAAA;AAAA
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/commands/doctor.ts","../src/plugin/types.ts","../src/config.ts","../src/generators/templates/types.ts","../src/generators/module.ts","../src/generators/adapter.ts","../src/generators/middleware.ts","../src/generators/guard.ts","../src/generators/service.ts","../src/generators/controller.ts","../src/generators/dto.ts","../src/generators/project.ts","../src/utils/project-root.ts","../src/typegen/scanner.ts","../src/typegen/plugin.ts","../src/typegen/token-conventions.ts","../src/typegen/index.ts","../src/typegen/run-plugins.ts","../src/asset-manager/build.ts","../src/typegen/dev-watcher.ts","../src/generator-extension/discover.ts","../src/generator-extension/context.ts","../src/utils/naming.ts"],"mappings":";;;;;;AA0BA;;;;;;;;AAGU;AAGV;;;;UANiB,aAAA;EACf,GAAA;EACA,GAAA;EACA,QAAA;AAAA;AAAA,UAGe,YAAA;EAUL;EARV,IAAA;EACA,MAAA;EAQK;EANL,OAAA;EAOkB;EALlB,GAAA;AAAA;AAAA,KAGU,WAAA,IACV,GAAA,EAAK,aAAA,KACF,YAAA,GAA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,KAAA,GAAQ,MAAA;EACR,UAAA;EACA,GAAA;ErBUe;;;;;;EqBHf,WAAA;EACA,SAAA;AAAA,IACE,gBAAgB;;;;iBC5BJ,YAAA,CAAa,IAAY;;iBAOzB,WAAA,CAAY,IAAY;AtBgBxC;AAAA,iBsBVgB,WAAA,CAAY,IAAY;;;;;;iBAYxB,SAAA,CAAU,IAAY"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @forinda/kickjs-cli v6.0
|
|
2
|
+
* @forinda/kickjs-cli v6.1.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import{A as e,M as t,
|
|
11
|
+
import{A as e,M as t,N as n,P as r,_ as i,b as a,c as o,d as s,f as c,h as l,l as u,m as d,n as f,o as p,p as m,s as h,t as g,u as _}from"./doctor-shX-k8ju.mjs";import{i as v,r as y}from"./config-Dc4XuP2E.mjs";import{t as b}from"./project-root-C3u57Vec.mjs";import{n as x,t as S}from"./types-B2r_OeIa.mjs";function C(e){return e}export{S as KickPluginConflictError,o as TYPEGEN_OWNER_KEY,p as buildGeneratorContext,u as createTypegenDevWatcher,x as defineCliPlugin,y as defineConfig,g as defineDoctorCheck,f as defineDoctorExtension,h as defineGenerator,C as defineTypegen,b as findProjectRoot,i as generateAdapter,c as generateController,s as generateDto,d as generateGuard,l as generateMiddleware,a as generateModule,m as generateService,_ as initProject,v as loadKickConfig,e as pluralize,t as toCamelCase,n as toKebabCase,r as toPascalCase};
|
|
12
12
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/typegen/plugin.ts"],"sourcesContent":["// TypegenPlugin contract — M2.B-T7.\n//\n// Each plugin owns a single `.kickjs/types/<id>.d.ts` file. The runner\n// invokes `generate(ctx)` per plugin, prepends a banner, writes only on\n// content change, and surfaces drift in --check mode (CI gate).\n//\n// Built-in plugins (kick/routes, kick/env, kick/assets, kick/db) live under\n// `./builtin`. Adopters register additional plugins via kick.config.ts.\n\nimport type { KickConfig } from '../config'\nimport type { ScanOptions, ScanResult } from './scanner'\n\nexport interface TypegenLogger {\n info(msg: string): void\n warn(msg: string): void\n error(msg: string): void\n}\n\nexport interface TypegenContext {\n cwd: string\n config: KickConfig\n /** Dynamic-import a TS module (Node loader). Used by plugins that need to\n * read the adopter's schema / route map / asset registry at generate time. */\n importTs<T = unknown>(absPath: string): Promise<T>\n /** Write under `cwd`. Caller passes a relPath (e.g. `.kickjs/types/foo.d.ts`). */\n writeFile(relPath: string, contents: string): Promise<void>\n /**\n * Run `scanProject` once per typegen pass, memoizing the result so\n * multiple plugins (`kick/routes`, `kick/env`, future adopter plugins)\n * share a single fs walk + AST extraction.\n *\n * The runner uses an order-independent cache key derived from the\n * resolved options (`root`, `cwd`, `extensions`, `exclude`, `envFile`)\n * — semantically equal options hit the cache regardless of how the\n * caller built the literal. (We deliberately don't `JSON.stringify`\n * the options for caching since that would be sensitive to property\n * insertion order.) Plugins that don't need scanner data can ignore\n * this method entirely.\n *\n * Implementation lives in the runner so test harnesses can inject\n * a stub scanner; plugins only see the function.\n */\n getScanResult(opts: ScanOptions): Promise<ScanResult>\n log: TypegenLogger\n}\n\nexport interface TypegenPlugin {\n /** Stable id — used as filename: `.kickjs/types/${id}<outExtension>` (slashes → `__`). */\n id: string\n /** Glob patterns the Vite watcher subscribes to; change → re-run this plugin. */\n inputs: string[]\n /**\n * Output filename extension. Default `.d.ts` — the right choice for\n * pure module-augmentation plugins (kick/db, kick/assets) since\n * declaration files don't need the runtime-import dance.\n *\n * `kick/routes` overrides to `.ts` because it emits hoisted\n * `import type {...} from '...'` lines at the top of the file. Inline\n * `import('...').X` references inside `.d.ts` silently degrade to\n * `unknown` under `moduleResolution: 'bundler'`; emitting `.ts`\n * sidesteps that quirk and gets full type resolution.\n *\n * Adopter-supplied plugins should leave this unset unless they hit\n * the same hoisted-import constraint.\n */\n outExtension?: string\n /**\n * Return the augmentation source (without banner — runner prepends).\n * Return null to skip emission (e.g. no schema file present).\n */\n generate(ctx: TypegenContext): Promise<string | null>\n}\n\nexport interface TypegenPluginResult {\n id: string\n status: 'written' | 'unchanged' | 'skipped' | 'error'\n outFile?: string\n}\n\n/**\n * Identity factory for {@link TypegenPlugin}. Returns the spec verbatim.\n * Exists for type inference and forward-compatibility — future\n * fields can be added with defaults without breaking adopters.\n *\n * Mirrors {@link defineGenerator} ergonomics. Use at the call site so\n * the plugin's `generate(ctx)` body gets a fully-typed `ctx` without\n * an explicit annotation:\n *\n * @example\n * ```ts\n * import { defineTypegen } from '@forinda/kickjs-cli'\n *\n * export const drizzleTypegen = defineTypegen({\n * id: 'drizzle',\n * inputs: ['src/db/schema.ts'],\n * async generate(ctx) {\n * const schema = await ctx.importTs(`${ctx.cwd}/src/db/schema.ts`)\n * return `// declare module …`\n * },\n * })\n * ```\n */\nexport function defineTypegen(spec: TypegenPlugin): TypegenPlugin {\n return spec\n}\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/typegen/plugin.ts"],"sourcesContent":["// TypegenPlugin contract — M2.B-T7.\n//\n// Each plugin owns a single `.kickjs/types/<id>.d.ts` file. The runner\n// invokes `generate(ctx)` per plugin, prepends a banner, writes only on\n// content change, and surfaces drift in --check mode (CI gate).\n//\n// Built-in plugins (kick/routes, kick/env, kick/assets, kick/db) live under\n// `./builtin`. Adopters register additional plugins via kick.config.ts.\n\nimport type { KickConfig } from '../config'\nimport type { ScanOptions, ScanResult } from './scanner'\n\nexport interface TypegenLogger {\n info(msg: string): void\n warn(msg: string): void\n error(msg: string): void\n}\n\nexport interface TypegenContext {\n cwd: string\n config: KickConfig\n /** Dynamic-import a TS module (Node loader). Used by plugins that need to\n * read the adopter's schema / route map / asset registry at generate time. */\n importTs<T = unknown>(absPath: string): Promise<T>\n /** Write under `cwd`. Caller passes a relPath (e.g. `.kickjs/types/foo.d.ts`). */\n writeFile(relPath: string, contents: string): Promise<void>\n /**\n * Run `scanProject` once per typegen pass, memoizing the result so\n * multiple plugins (`kick/routes`, `kick/env`, future adopter plugins)\n * share a single fs walk + AST extraction.\n *\n * The runner uses an order-independent cache key derived from the\n * resolved options (`root`, `cwd`, `extensions`, `exclude`, `envFile`)\n * — semantically equal options hit the cache regardless of how the\n * caller built the literal. (We deliberately don't `JSON.stringify`\n * the options for caching since that would be sensitive to property\n * insertion order.) Plugins that don't need scanner data can ignore\n * this method entirely.\n *\n * Implementation lives in the runner so test harnesses can inject\n * a stub scanner; plugins only see the function.\n */\n getScanResult(opts: ScanOptions): Promise<ScanResult>\n log: TypegenLogger\n}\n\nexport interface TypegenPlugin {\n /** Stable id — used as filename: `.kickjs/types/${id}<outExtension>` (slashes → `__`). */\n id: string\n /** Glob patterns the Vite watcher subscribes to; change → re-run this plugin. */\n inputs: string[]\n /**\n * Output filename extension. Default `.d.ts` — the right choice for\n * pure module-augmentation plugins (kick/db, kick/assets) since\n * declaration files don't need the runtime-import dance.\n *\n * `kick/routes` overrides to `.ts` because it emits hoisted\n * `import type {...} from '...'` lines at the top of the file. Inline\n * `import('...').X` references inside `.d.ts` silently degrade to\n * `unknown` under `moduleResolution: 'bundler'`; emitting `.ts`\n * sidesteps that quirk and gets full type resolution.\n *\n * Adopter-supplied plugins should leave this unset unless they hit\n * the same hoisted-import constraint.\n */\n outExtension?: string\n /**\n * Return the augmentation source (without banner — runner prepends).\n * Return null to skip emission (e.g. no schema file present).\n */\n generate(ctx: TypegenContext): Promise<string | null>\n}\n\nexport interface TypegenPluginResult {\n id: string\n status: 'written' | 'unchanged' | 'skipped' | 'error'\n outFile?: string\n}\n\n/**\n * Identity factory for {@link TypegenPlugin}. Returns the spec verbatim.\n * Exists for type inference and forward-compatibility — future\n * fields can be added with defaults without breaking adopters.\n *\n * Mirrors {@link defineGenerator} ergonomics. Use at the call site so\n * the plugin's `generate(ctx)` body gets a fully-typed `ctx` without\n * an explicit annotation:\n *\n * @example\n * ```ts\n * import { defineTypegen } from '@forinda/kickjs-cli'\n *\n * export const drizzleTypegen = defineTypegen({\n * id: 'drizzle',\n * inputs: ['src/db/schema.ts'],\n * async generate(ctx) {\n * const schema = await ctx.importTs(`${ctx.cwd}/src/db/schema.ts`)\n * return `// declare module …`\n * },\n * })\n * ```\n */\nexport function defineTypegen(spec: TypegenPlugin): TypegenPlugin {\n return spec\n}\n"],"mappings":";;;;;;;;;;kTAsGA,SAAgB,EAAc,EAAoC,CAChE,OAAO,CACT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @forinda/kickjs-cli v6.0
|
|
2
|
+
* @forinda/kickjs-cli v6.1.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import{t as e}from"./rolldown-runtime-
|
|
12
|
-
//# sourceMappingURL=plugin-
|
|
11
|
+
import{t as e}from"./rolldown-runtime-BMxBusPc.mjs";import{t}from"./types-B2r_OeIa.mjs";function n(e,n=[]){let r=new Map;for(let n of e){let e=(r.get(n.name)??0)+1;if(r.set(n.name,e),e===2)throw new t(`plugin`,n.name,[n.name,n.name])}let i=new Map,a=[];for(let n of e)for(let e of n.commands??[]){let r=i.get(e.name);if(r)throw new t(`command`,e.name,[r,n.name]);i.set(e.name,n.name),a.push(e)}let o=new Set(n.map(e=>e.name)),s=[...a.filter(e=>!o.has(e.name)),...n],c=new Map,l=[];for(let n of e)for(let e of n.typegens??[]){let r=c.get(e.id);if(r)throw new t(`typegen`,e.id,[r,n.name]);c.set(e.id,n.name),l.push(e)}let u=new Map,d=[];for(let n of e)for(let e of n.generators??[]){let r=u.get(e.name);if(r)throw new t(`generator`,e.name,[r,n.name]);u.set(e.name,n.name),d.push({source:n.name,spec:e})}return{commands:s,typegens:l,generators:d,register:async(t,n)=>{let r;if(n)r={generators:d,...n};else{let{findProjectRoot:e}=await import(`./project-root-C3u57Vec.mjs`).then(e=>e.n),t=process.cwd();r={cwd:t,projectRoot:e(t),config:null,log:()=>{},generators:d}}for(let n of e)n.register&&await n.register(t,r)}}}var r=e({mergeCliPlugins:()=>n});export{n,r as t};
|
|
12
|
+
//# sourceMappingURL=plugin-DVOWYRqG.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-
|
|
1
|
+
{"version":3,"file":"plugin-DVOWYRqG.mjs","names":[],"sources":["../src/plugin/merge.ts","../src/plugin/index.ts"],"sourcesContent":["// Plugin → unified registry merge.\n//\n// Resolution rules (per the v1 spec + dogfood pivot):\n// - duplicate plugin `name` across the input array → conflict error.\n// Catches the double-install case (built-in shipped twice, or\n// adopter requiring the same plugin twice).\n// - plugin commands appear first in the merged list, then adopter\n// commands; adopter `commands` of the same name override the\n// plugin entry (filter pass).\n// - duplicate command name across two plugins → conflict error\n// listing both plugin names. Adopter overriding a plugin is\n// allowed and not an error.\n// - duplicate typegen id across two plugins → same error. Typegens\n// have no adopter override path; only plugins contribute them.\n// - register() functions are collected in input order; the caller\n// invokes each one against the same Command program. They have no\n// id-level conflict surface — owners are responsible for picking\n// non-colliding command names inside their own register().\n// - plugin order = array order. No implicit precedence rules.\n\nimport type { Command } from 'commander'\n\nimport type { KickCommandDefinition } from '../config'\nimport type { TypegenPlugin } from '../typegen/plugin'\nimport type { GeneratorSpec } from '../generator-extension/define'\nimport type { DiscoveredGenerator } from '../generator-extension/discover'\nimport { KickPluginConflictError, type KickCliPlugin, type KickCliPluginContext } from './types'\n\nexport interface MergedPlugins {\n commands: KickCommandDefinition[]\n typegens: TypegenPlugin[]\n /** DiscoveredGenerator shape so this list slots into the existing\n * dispatch path next to package.json-discovered entries. `source`\n * carries the plugin name for error attribution. */\n generators: DiscoveredGenerator[]\n /**\n * Apply every plugin's register() in input order. ctx is optional so\n * tests + lightweight callers can invoke `register(program)` without\n * constructing a full context; it falls back to cwd=process.cwd(),\n * config=null, log=no-op.\n */\n register: (program: Command, ctx?: KickCliPluginContext) => Promise<void>\n}\n\nexport function mergeCliPlugins(\n plugins: readonly KickCliPlugin[],\n adopterCommands: readonly KickCommandDefinition[] = [],\n): MergedPlugins {\n // Plugin-name dedup — catches double-install.\n const seenPluginNames = new Map<string, number>()\n for (const p of plugins) {\n const count = (seenPluginNames.get(p.name) ?? 0) + 1\n seenPluginNames.set(p.name, count)\n if (count === 2) {\n throw new KickPluginConflictError('plugin', p.name, [p.name, p.name])\n }\n }\n\n const commandOwners = new Map<string, string>()\n const pluginCommands: KickCommandDefinition[] = []\n for (const p of plugins) {\n for (const cmd of p.commands ?? []) {\n const prior = commandOwners.get(cmd.name)\n if (prior) {\n throw new KickPluginConflictError('command', cmd.name, [prior, p.name])\n }\n commandOwners.set(cmd.name, p.name)\n pluginCommands.push(cmd)\n }\n }\n\n const adopterNames = new Set(adopterCommands.map((c) => c.name))\n const filteredPlugin = pluginCommands.filter((c) => !adopterNames.has(c.name))\n const commands = [...filteredPlugin, ...adopterCommands]\n\n const typegenOwners = new Map<string, string>()\n const typegens: TypegenPlugin[] = []\n for (const p of plugins) {\n for (const tg of p.typegens ?? []) {\n const prior = typegenOwners.get(tg.id)\n if (prior) {\n throw new KickPluginConflictError('typegen', tg.id, [prior, p.name])\n }\n typegenOwners.set(tg.id, p.name)\n typegens.push(tg)\n }\n }\n\n const generatorOwners = new Map<string, string>()\n const generators: DiscoveredGenerator[] = []\n for (const p of plugins) {\n for (const spec of p.generators ?? []) {\n const prior = generatorOwners.get(spec.name)\n if (prior) {\n throw new KickPluginConflictError('generator', spec.name, [prior, p.name])\n }\n generatorOwners.set(spec.name, p.name)\n generators.push({ source: p.name, spec: spec satisfies GeneratorSpec })\n }\n }\n\n /**\n * Apply every plugin's `register()` callback in input order against the\n * given Commander program. Each callback receives a {@link KickCliPluginContext}:\n * caller-supplied ctx wins (test fixtures can inject a different\n * workspace boundary); otherwise a default ctx is built with\n * `findProjectRoot(process.cwd())` as the project root, `cwd` matching\n * `process.cwd()`, null config, no-op log, and the merged generator set\n * threaded through so the `kick/generate` built-in can surface each as\n * a Commander subcommand. The dynamic import of `findProjectRoot` keeps\n * the caller-supplied fast path zero-cost.\n */\n const register = async (program: Command, ctx?: KickCliPluginContext): Promise<void> => {\n let resolved: KickCliPluginContext\n if (ctx) {\n resolved = { generators, ...ctx }\n } else {\n const { findProjectRoot } = await import('../utils/project-root')\n const cwd = process.cwd()\n resolved = {\n cwd,\n projectRoot: findProjectRoot(cwd),\n config: null,\n log: () => {},\n generators,\n }\n }\n for (const p of plugins) {\n if (p.register) await p.register(program, resolved)\n }\n }\n\n return { commands, typegens, generators, register }\n}\n","// Barrel intentionally omits `./builtins` — that module top-level-imports\n// every register*Command, which pulls heavy modules (project scaffolders,\n// fs reads at import time) into the graph. Importers that need the\n// builtin list go through `./plugin/builtins` directly; tests + adopter\n// plugins consuming only the contract types import from here.\n\nexport type { KickCliPlugin } from './types'\nexport { defineCliPlugin, KickPluginConflictError } from './types'\nexport { mergeCliPlugins, type MergedPlugins } from './merge'\n"],"mappings":";;;;;;;;;;wFA4CA,SAAgB,EACd,EACA,EAAoD,CAAC,EACtC,CAEf,IAAM,EAAkB,IAAI,IAC5B,IAAK,IAAM,KAAK,EAAS,CACvB,IAAM,GAAS,EAAgB,IAAI,EAAE,IAAI,GAAK,GAAK,EAEnD,GADA,EAAgB,IAAI,EAAE,KAAM,CAAK,EAC7B,IAAU,EACZ,MAAM,IAAI,EAAwB,SAAU,EAAE,KAAM,CAAC,EAAE,KAAM,EAAE,IAAI,CAAC,CAExE,CAEA,IAAM,EAAgB,IAAI,IACpB,EAA0C,CAAC,EACjD,IAAK,IAAM,KAAK,EACd,IAAK,IAAM,KAAO,EAAE,UAA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AA,EAAA,CAAA,EAC3D,EAAM,QAAQ,IAAI,EACxB,EAAW,CACT,MACA,YAAa,EAAgB,CAAG,EAChC,OAAQ,KACR,QAAW,CAAC,EACZ,YACF,CACF,CACA,IAAK,IAAM,KAAK,EACV,EAAE,UAAU,MAAM,EAAE,SAAS,EAAS,CAAQ,CAEtD,CAEkD,CACpD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @forinda/kickjs-cli v6.0
|
|
2
|
+
* @forinda/kickjs-cli v6.1.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Felix Orinda
|
|
5
5
|
*
|
|
@@ -825,4 +825,4 @@ Codex / Cursor / Gemini / Claude Code without copy-pasting.
|
|
|
825
825
|
CLI template. Hand-edited content is overwritten — keep customisation
|
|
826
826
|
in \`.agents/COPILOT.local.md\`.
|
|
827
827
|
`}export{C as _,I as a,m as b,w as c,T as d,O as f,u as g,S as h,L as i,M as l,D as m,P as n,N as o,j as p,R as r,A as s,F as t,k as u,b as v,f as y};
|
|
828
|
-
//# sourceMappingURL=project-docs-
|
|
828
|
+
//# sourceMappingURL=project-docs-Cq_MswOY.mjs.map
|