@jay-framework/jay-cli 0.7.0 → 0.9.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -2
  2. package/package.json +8 -7
package/dist/index.js CHANGED
@@ -89,8 +89,14 @@ async function generateFiles(dir, codeGenerationFunction, afterGenerationFunctio
89
89
  function getJayHtmlOrContractFileInputs(source) {
90
90
  return Object.fromEntries(
91
91
  glob$1.sync(`${source}/**/*{${JAY_EXTENSION},${JAY_CONTRACT_EXTENSION}}`).map((file) => {
92
- const moduleName = file.includes(JAY_EXTENSION) ? file.slice(0, file.length - JAY_EXTENSION.length) : file.slice(0, file.length - JAY_CONTRACT_EXTENSION.length);
93
- return [path$1.relative(source, moduleName), file];
92
+ const relativePath = path$1.relative(source, file);
93
+ let moduleName;
94
+ if (file.endsWith(JAY_CONTRACT_EXTENSION)) {
95
+ moduleName = relativePath.slice(0, -JAY_CONTRACT_EXTENSION.length) + ".contract";
96
+ } else {
97
+ moduleName = relativePath.slice(0, -JAY_EXTENSION.length);
98
+ }
99
+ return [moduleName, file];
94
100
  })
95
101
  );
96
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jay-framework/jay-cli",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "bin": "dist/index.js",
@@ -17,24 +17,25 @@
17
17
  "build:cli-link": "cd ../../../node_modules/.bin && ln -sf ../../../packages/cli/dist/index.js jay-cli",
18
18
  "clean": "rimraf dist",
19
19
  "confirm": "npm run clean && npm run build && npm run build:check-types && npm run test",
20
- "test": ":",
21
- "test:watch": ":"
20
+ "test": "vitest run",
21
+ "test:watch": "vitest"
22
22
  },
23
23
  "dependencies": {
24
- "@jay-framework/compiler": "^0.7.0",
25
- "@jay-framework/rollup-plugin": "^0.7.0",
24
+ "@jay-framework/compiler": "^0.9.0",
25
+ "@jay-framework/rollup-plugin": "^0.9.0",
26
26
  "chalk": "^4.1.2",
27
27
  "commander": "^14.0.0",
28
28
  "glob": "^10.4.5",
29
29
  "rollup": "^4.9.5"
30
30
  },
31
31
  "devDependencies": {
32
- "@jay-framework/dev-environment": "^0.7.0",
32
+ "@jay-framework/dev-environment": "^0.9.0",
33
33
  "@types/node": "^20.11.5",
34
34
  "@types/shelljs": "^0.8.15",
35
35
  "rimraf": "^5.0.5",
36
36
  "shelljs": "^0.8.5",
37
37
  "typescript": "^5.3.3",
38
- "vite": "^5.0.11"
38
+ "vite": "^5.0.11",
39
+ "vitest": "^1.2.1"
39
40
  }
40
41
  }