@silgi/module-builder 0.1.1 → 0.2.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.
package/dist/chunks/build.mjs
CHANGED
@@ -15,7 +15,7 @@ import { pkgDir } from 'silgi/runtime/meta';
|
|
15
15
|
import { parse } from 'tsconfck';
|
16
16
|
import { convertCompilerOptionsFromJson } from 'typescript';
|
17
17
|
import { scanExports } from 'unimport';
|
18
|
-
import { v as version, n as name } from '../shared/silgi-module-builder.
|
18
|
+
import { v as version, n as name } from '../shared/silgi-module-builder.9BS10jZA.mjs';
|
19
19
|
|
20
20
|
const srcDir = fileURLToPath(new URL("src", import.meta.url));
|
21
21
|
const subpaths = [
|
@@ -247,7 +247,7 @@ const build = defineCommand({
|
|
247
247
|
};
|
248
248
|
const metaFile = resolve(ctx.options.outDir, "module.json");
|
249
249
|
await promises.writeFile(metaFile, JSON.stringify(moduleMeta, null, 2), "utf8");
|
250
|
-
await writeTypes(ctx.options, ctx.options.stub
|
250
|
+
await writeTypes(ctx.options, ctx.options.stub);
|
251
251
|
},
|
252
252
|
"build:prepare": async function(_ctx) {
|
253
253
|
for (const subpath of subpaths) {
|
@@ -275,7 +275,7 @@ const build = defineCommand({
|
|
275
275
|
});
|
276
276
|
}
|
277
277
|
});
|
278
|
-
async function writeTypes(options, isStub,
|
278
|
+
async function writeTypes(options, isStub, _moduleMeta) {
|
279
279
|
const dtsFile = resolve(options.outDir, "moduleTypes.d.ts");
|
280
280
|
if (existsSync(dtsFile)) {
|
281
281
|
return;
|
@@ -301,11 +301,11 @@ async function writeTypes(options, isStub, moduleMeta) {
|
|
301
301
|
}
|
302
302
|
if (hasTypeExport("ModuleOptions")) {
|
303
303
|
moduleImports.push("ModuleOptions");
|
304
|
-
schemaShims.push(` interface SilgiModuleOptions
|
304
|
+
schemaShims.push(` interface SilgiModuleOptions extends ModuleOptions {}`);
|
305
305
|
}
|
306
306
|
if (hasTypeExport("ModuleRuntimeOptions")) {
|
307
307
|
moduleImports.push("ModuleRuntimeOptions");
|
308
|
-
schemaShims.push(` interface SilgiRuntimeOptions
|
308
|
+
schemaShims.push(` interface SilgiRuntimeOptions extends ModuleRuntimeOptions {}`);
|
309
309
|
}
|
310
310
|
if (hasTypeExport("ModuleRuntimeShareds")) {
|
311
311
|
moduleImports.push("ModuleRuntimeShareds");
|
@@ -329,7 +329,7 @@ async function writeTypes(options, isStub, moduleMeta) {
|
|
329
329
|
}
|
330
330
|
if (hasTypeExport("ModuleRuntimeActions")) {
|
331
331
|
moduleImports.push("ModuleRuntimeActions");
|
332
|
-
schemaShims.push(` interface SilgiRuntimeActions
|
332
|
+
schemaShims.push(` interface SilgiRuntimeActions extends ModuleRuntimeActions {}`);
|
333
333
|
}
|
334
334
|
if (hasTypeExport("ModuleRuntimeMethods")) {
|
335
335
|
moduleImports.push("ModuleRuntimeMethods");
|
@@ -337,11 +337,11 @@ async function writeTypes(options, isStub, moduleMeta) {
|
|
337
337
|
}
|
338
338
|
if (hasTypeExport("ModuleRuntimeRouteRules")) {
|
339
339
|
moduleImports.push("ModuleRuntimeRouteRules");
|
340
|
-
schemaShims.push(` interface SilgiRuntimeRouteRules
|
340
|
+
schemaShims.push(` interface SilgiRuntimeRouteRules extends ModuleRuntimeRouteRules {}`);
|
341
341
|
}
|
342
342
|
if (hasTypeExport("ModuleRuntimeRouteRulesConfig")) {
|
343
343
|
moduleImports.push("ModuleRuntimeRouteRulesConfig");
|
344
|
-
schemaShims.push(` interface SilgiRuntimeRouteRulesConfig
|
344
|
+
schemaShims.push(` interface SilgiRuntimeRouteRulesConfig extends ModuleRuntimeRouteRulesConfig {}`);
|
345
345
|
}
|
346
346
|
const dtsContents = `${`
|
347
347
|
${schemaImports.length ? `import type { ${schemaImports.join(", ")} } from 'silgi/types'` : ""}
|
package/dist/cli.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import { defineCommand, runMain } from 'citty';
|
3
3
|
import { consola } from 'consola';
|
4
|
-
import { v as version, d as description, n as name } from './shared/silgi-module-builder.
|
4
|
+
import { v as version, d as description, n as name } from './shared/silgi-module-builder.9BS10jZA.mjs';
|
5
5
|
|
6
6
|
const _rDefault = (r) => r && typeof r === "object" && "default" in r ? r.default : r;
|
7
7
|
const main = defineCommand({
|
package/dist/index.mjs
CHANGED