json-crud-ui 1.1.4 → 1.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.
Files changed (31) hide show
  1. package/bin/v2/commands/init/steps/locateSource.js +32 -0
  2. package/package.json +1 -1
  3. package/bin/v1/commands/init/steps/locateSource.js +0 -16
  4. /package/bin/{v1 → v2}/commands/init/steps/announce.js +0 -0
  5. /package/bin/{v1 → v2}/commands/init/steps/createProject.js +0 -0
  6. /package/bin/{v1 → v2}/commands/init/steps/locateDestination.js +0 -0
  7. /package/bin/{v1 → v2}/commands/init/steps/resolveFolderName.js +0 -0
  8. /package/bin/{v1 → v2}/commands/init/template/v1/Index/FormLoad/DomContentLoaded/buildHeader.js +0 -0
  9. /package/bin/{v1 → v2}/commands/init/template/v1/Index/FormLoad/DomContentLoaded/buildMenuItem.js +0 -0
  10. /package/bin/{v1 → v2}/commands/init/template/v1/Index/FormLoad/DomContentLoaded/runAfterDomLoad.js +0 -0
  11. /package/bin/{v1 → v2}/commands/init/template/v1/Index/FormLoad/DomContentLoaded/start.js +0 -0
  12. /package/bin/{v1 → v2}/commands/init/template/v1/Index/FormLoad/start.js +0 -0
  13. /package/bin/{v1 → v2}/commands/init/template/v1/Index/start.js +0 -0
  14. /package/bin/{v1 → v2}/commands/init/template/v2/FormLoad/DomContentLoaded/buildHeader.js +0 -0
  15. /package/bin/{v1 → v2}/commands/init/template/v2/FormLoad/DomContentLoaded/buildMenuItem.js +0 -0
  16. /package/bin/{v1 → v2}/commands/init/template/v2/FormLoad/DomContentLoaded/runAfterDomLoad.js +0 -0
  17. /package/bin/{v1 → v2}/commands/init/template/v2/FormLoad/DomContentLoaded/start.js +0 -0
  18. /package/bin/{v1 → v2}/commands/init/template/v2/FormLoad/start.js +0 -0
  19. /package/bin/{v1 → v2}/commands/init/template/v2/start.js +0 -0
  20. /package/bin/{v1 → v2}/commands/init/template/v3/FormLoad/DomContentLoaded/buildHeader.js +0 -0
  21. /package/bin/{v1 → v2}/commands/init/template/v3/FormLoad/DomContentLoaded/buildMenuItem.js +0 -0
  22. /package/bin/{v1 → v2}/commands/init/template/v3/FormLoad/DomContentLoaded/runAfterDomLoad.js +0 -0
  23. /package/bin/{v1 → v2}/commands/init/template/v3/FormLoad/DomContentLoaded/start.js +0 -0
  24. /package/bin/{v1 → v2}/commands/init/template/v3/FormLoad/start.js +0 -0
  25. /package/bin/{v1 → v2}/commands/init/template/v3/headers.json +0 -0
  26. /package/bin/{v1 → v2}/commands/init/template/v3/start.js +0 -0
  27. /package/bin/{v1 → v2}/commands/init.js +0 -0
  28. /package/bin/{v1 → v2}/core/parseInput.js +0 -0
  29. /package/bin/{v1 → v2}/core/resolveCommand.js +0 -0
  30. /package/bin/{v1 → v2}/core/showUsage.js +0 -0
  31. /package/bin/{v1 → v2}/start.js +0 -0
@@ -0,0 +1,32 @@
1
+ import fs from "fs";
2
+
3
+ import path from "path";
4
+ import { fileURLToPath } from "url";
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = path.dirname(__filename);
8
+
9
+ const templatePath = path.join(
10
+ __dirname,
11
+ "..",
12
+ "template"
13
+ );
14
+
15
+ const versions = fs
16
+ .readdirSync(templatePath)
17
+ .filter(item => item.startsWith("v"));
18
+
19
+ const highestVersion =
20
+ versions.sort().at(-1);
21
+
22
+ const sourceVersion =
23
+ highestVersion;
24
+
25
+ export const locateSource = () => {
26
+ return path.join(
27
+ __dirname,
28
+ "..",
29
+ "template",
30
+ sourceVersion
31
+ );
32
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-crud-ui",
3
- "version": "1.1.4",
3
+ "version": "1.2.1",
4
4
  "description": "working on ui for our json crud using modules",
5
5
  "keywords": [
6
6
  "cli",
@@ -1,16 +0,0 @@
1
- import path from "path";
2
- import { fileURLToPath } from "url";
3
-
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = path.dirname(__filename);
6
-
7
- const sourceVersion = "v1";
8
-
9
- export const locateSource = () => {
10
- return path.join(
11
- __dirname,
12
- "..",
13
- "template",
14
- sourceVersion
15
- );
16
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes