@keshavsoft/kschema-cli 1.12.1 → 1.12.3

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/CHANGELOG.md CHANGED
@@ -44,4 +44,8 @@ The format is based on Keep a Changelog.
44
44
 
45
45
  ## [1.12.1] - 2026-05-01
46
46
 
47
- - started exporting also, along with cli
47
+ - started exporting also, along with cli
48
+
49
+ ## [1.12.2] - 2026-05-01
50
+
51
+ - export init and express perfect
@@ -0,0 +1,9 @@
1
+ import fs from "fs";
2
+
3
+ import { locateSource } from "../express/steps/locateSource.js";
4
+
5
+ export default (inDestination) => {
6
+ const source = locateSource();
7
+
8
+ fs.cpSync(source, inDestination, { recursive: true });
9
+ };
@@ -0,0 +1,9 @@
1
+ import fs from "fs";
2
+
3
+ import { locateSource } from "../init/steps/locateSource.js";
4
+
5
+ export default (inDestination) => {
6
+ const source = locateSource();
7
+
8
+ fs.cpSync(source, inDestination, { recursive: true });
9
+ };
package/index.js CHANGED
@@ -1 +1,2 @@
1
- export { default as init } from "./bin/v12/commands/init.js";
1
+ export { default as init } from "./bin/v12/commands/exportCommands/init.js";
2
+ export { default as express } from "./bin/v12/commands/exportCommands/express.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keshavsoft/kschema-cli",
3
- "version": "1.12.1",
3
+ "version": "1.12.3",
4
4
  "description": "CLI to scaffold projects using templates",
5
5
  "keywords": [
6
6
  "cli",
package/read.js DELETED
@@ -1,29 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
-
4
- import { exampleSchema } from "@keshavsoft/kschema";
5
- import { baseTemplate } from "./template/baseTemplate.js";
6
-
7
- // console.log("aaaaaaaaa : ", exampleSchema);
8
-
9
- const runQuery = () => {
10
- const OUTPUT_DIR = path.resolve(process.cwd(), "samples");
11
-
12
- if (!fs.existsSync(OUTPUT_DIR)) {
13
- fs.mkdirSync(OUTPUT_DIR, { recursive: true });
14
- };
15
-
16
- Object.entries(exampleSchema).forEach(([intent, methods]) => {
17
- Object.entries(methods).forEach(([key, meta]) => {
18
-
19
- const finalCode = baseTemplate({ body: meta.body });
20
-
21
- fs.writeFileSync(path.join(OUTPUT_DIR, `${intent}_${key}.js`), finalCode);
22
-
23
- });
24
-
25
- });
26
-
27
- };
28
-
29
- runQuery();