@reliverse/dler 1.3.2 → 1.3.4
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/bin/init.js
CHANGED
|
@@ -37,13 +37,13 @@ export async function ensureDlerConfig(isDev) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
function getCoreIsCLI(isDev) {
|
|
40
|
-
return isDev ? `{
|
|
40
|
+
return isDev ? `coreIsCLI: {
|
|
41
41
|
enabled: true,
|
|
42
42
|
scripts: { dler: "dler.ts" },
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
},` : `// coreIsCLI: {
|
|
44
|
+
// enabled: false,
|
|
45
|
+
// scripts: { mycli: "mycli.ts" },
|
|
46
|
+
// },`;
|
|
47
47
|
}
|
|
48
48
|
function generateConfig(isDev, pkgDescription) {
|
|
49
49
|
const importDefineConfigStatement = isDev ? `import { defineConfig } from "./mod.js";` : `import { defineConfig } from "@reliverse/dler";`;
|
|
@@ -115,7 +115,7 @@ export default defineConfig({
|
|
|
115
115
|
coreEntryFile: "${DEFAULT_CONFIG.coreEntryFile}",
|
|
116
116
|
coreEntrySrcDir: "${DEFAULT_CONFIG.coreEntrySrcDir}",
|
|
117
117
|
coreBuildOutDir: "${DEFAULT_CONFIG.coreBuildOutDir}",
|
|
118
|
-
|
|
118
|
+
${coreIsCLI}
|
|
119
119
|
|
|
120
120
|
// JSR-only config
|
|
121
121
|
distJsrAllowDirty: ${DEFAULT_CONFIG.distJsrAllowDirty},
|
|
@@ -69,8 +69,8 @@ export async function typesBuild(ctx) {
|
|
|
69
69
|
declaration: entry.declaration ? {
|
|
70
70
|
contents: generateTypes(schema, {
|
|
71
71
|
interfaceName: pascalCase(`${entry.name}-schema`)
|
|
72
|
-
// addDefaults: true, // TODO: Add JSDoc default values (allow to configure via
|
|
73
|
-
// addDescription: true, // TODO: Add JSDoc descriptions (allow to configure via
|
|
72
|
+
// addDefaults: true, // TODO: Add JSDoc default values (allow to configure via .config/dler.ts)
|
|
73
|
+
// addDescription: true, // TODO: Add JSDoc descriptions (allow to configure via .config/dler.ts)
|
|
74
74
|
}),
|
|
75
75
|
fileName: `${entry.name}.d.ts`
|
|
76
76
|
} : void 0,
|
|
@@ -70,11 +70,14 @@ export async function setBumpDisabled(value, commonPubPause) {
|
|
|
70
70
|
if (commonPubPause && value) {
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const dlerCfgTs = path.join(PROJECT_ROOT, "dler.
|
|
74
|
-
const dlerCfgJs = path.join(PROJECT_ROOT, "dler.
|
|
73
|
+
const dlerCfgTs = path.join(PROJECT_ROOT, ".config/dler.ts");
|
|
74
|
+
const dlerCfgJs = path.join(PROJECT_ROOT, ".config/dler.js");
|
|
75
75
|
const dlerCfgPath = await fs.pathExists(dlerCfgTs) ? dlerCfgTs : dlerCfgJs;
|
|
76
76
|
if (!await fs.pathExists(dlerCfgPath)) {
|
|
77
|
-
relinka(
|
|
77
|
+
relinka(
|
|
78
|
+
"log",
|
|
79
|
+
"No .config/dler.ts or .config/dler.js found to update bumpDisable"
|
|
80
|
+
);
|
|
78
81
|
return;
|
|
79
82
|
}
|
|
80
83
|
let content = await readFileSafe(dlerCfgPath, "", "bumpDisable update");
|