qcobjects-cli 2.4.37 → 2.4.40

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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.37
1
+ 2.4.40
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjects-cli",
3
- "version": "2.4.37",
3
+ "version": "2.4.40",
4
4
  "description": "qcobjects cli command line tool",
5
5
  "main": "src/index.cjs",
6
6
  "module": "src/index.mjs",
@@ -24,9 +24,9 @@
24
24
  "dependencies": {
25
25
  "commander": "^10.0.1",
26
26
  "mime": "^2.4.7",
27
- "qcobjects": "^2.4.67",
28
- "qcobjects-sdk": "^2.4.30",
29
- "yaml": "^1.10.2"
27
+ "qcobjects": "^2.4.68",
28
+ "yaml": "^2.2.2",
29
+ "qcobjects-sdk": "^2.4.32"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/qcobjects": "github:QCObjects/-types-qcobjects",
@@ -35,7 +35,7 @@
35
35
  "@typescript-eslint/parser": "^5.58.0",
36
36
  "eslint": "^8.38.0",
37
37
  "eslint-config-prettier": "^8.8.0",
38
- "eslint-config-qcobjects": "^0.0.26",
38
+ "eslint-config-qcobjects": "^0.0.27",
39
39
  "eslint-config-qcobjects-typescript": "^2.4.5",
40
40
  "eslint-config-semistandard": "^17.0.0",
41
41
  "eslint-config-standard": "^17.0.0",
@@ -43,13 +43,13 @@
43
43
  "eslint-plugin-n": "^15.7.0",
44
44
  "eslint-plugin-promise": "^6.1.1",
45
45
  "jasmine": "^3.99.0",
46
- "qcobjects": "^2.4.67",
47
- "qcobjects-sdk": "^2.4.30",
46
+ "qcobjects": "^2.4.68",
47
+ "qcobjects-sdk": "^2.4.32",
48
48
  "qcobjects-tsconfig": "^2.4.10"
49
49
  },
50
50
  "peerDependencies": {
51
- "qcobjects": "^2.4.67",
52
- "qcobjects-sdk": "^2.4.30"
51
+ "qcobjects": "^2.4.68",
52
+ "qcobjects-sdk": "^2.4.32"
53
53
  },
54
54
  "repository": {
55
55
  "type": "file",
@@ -47,7 +47,7 @@ Package("com.qcobjects.backend.microservice.static", [
47
47
 
48
48
  const microservice = this;
49
49
  const stream = microservice.stream;
50
- const fileName = `${process.cwd()}/${microservice.fileName}`;
50
+ const fileName = (!microservice.fileName.startsWith("/"))?(`${process.cwd()}/${microservice.fileName}`):(microservice.fileName);
51
51
 
52
52
  const sendFileHTTP2 = function(stream, fileName) {
53
53
  // read and send file content in the stream
@@ -132,6 +132,8 @@ try {
132
132
  const path = require("path");
133
133
  const projectPath = CONFIG.get("projectPath", `${process.cwd()}/`);
134
134
  const loadDefaultRoutes = async () => {
135
+ const sdkPath = path.resolve(findPackageNodePath("qcobjects-sdk"), "qcobjects-sdk");
136
+ const qcobjectsPath = path.resolve(findPackageNodePath("qcobjects"), "qcobjects");
135
137
  let backend = CONFIG.get("backend");
136
138
  if (typeof backend === "undefined") {
137
139
  backend = {};
@@ -144,7 +146,7 @@ try {
144
146
  "description": "Redirection of QCObjects.js",
145
147
  "path": "^/QCObjects.js$",
146
148
  "microservice": "com.qcobjects.backend.microservice.static",
147
- "redirect_to": "./node_modules/qcobjects/QCObjects.js",
149
+ "redirect_to": path.resolve(qcobjectsPath,"src","QCObjects.js"),
148
150
  "responseHeaders": {},
149
151
  "cors": {
150
152
  "allow_origins": "*"
@@ -155,7 +157,7 @@ try {
155
157
  "description": "Redirection of QCObjects SDK",
156
158
  "path": "^/js/packages/QCObjects-SDK.js$",
157
159
  "microservice": "com.qcobjects.backend.microservice.static",
158
- "redirect_to": "./node_modules/qcobjects-sdk/QCObjects-SDK.js",
160
+ "redirect_to": path.resolve(sdkPath, "src/QCObjects-SDK.js"),
159
161
  "responseHeaders": {},
160
162
  "cors": {
161
163
  "allow_origins": "*"
@@ -166,7 +168,7 @@ try {
166
168
  "description": "Redirection of QCObjects SDK",
167
169
  "path": "^/qcobjects-sdk/(.*)$",
168
170
  "microservice": "com.qcobjects.backend.microservice.static",
169
- "redirect_to": "./node_modules/qcobjects-sdk/$1",
171
+ "redirect_to": path.resolve(sdkPath, "src/$1"),
170
172
  "responseHeaders": {},
171
173
  "cors": {
172
174
  "allow_origins": "*"
@@ -176,7 +178,6 @@ try {
176
178
  ]);
177
179
  CONFIG.set("backend", backend);
178
180
 
179
- return;
180
181
  };
181
182
  await loadDefaultRoutes();
182
183
  })().then(() => logger.info("Default routes loaded"));