@colabo-knalledge/i-core-services 1.0.0 → 1.1.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.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/index.js +24 -7
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js +23 -7
- package/dist/esm/index.js.map +2 -2
- package/dist/types/lib/cf.service.isomorphic.d.ts +3 -3
- package/dist/types/lib/colabo-api-core.service.d.ts +6 -2
- package/dist/types/lib/kContainer-service.d.ts +1 -1
- package/dist/types/lib/kEdge-service-extended.d.ts +1 -1
- package/dist/types/lib/kEdge-service.d.ts +1 -1
- package/dist/types/lib/kNode-service-extended.d.ts +1 -1
- package/dist/types/lib/kNode-service.d.ts +1 -1
- package/package.json +36 -14
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# [@colabo-knalledge/i-core-services-v1.1.0](https://github.com/Cha-OS/colabo/compare/@colabo-knalledge/i-core-services-v1.0.0...@colabo-knalledge/i-core-services-v1.1.0) (2025-02-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **@colabo-knalledge/i-core-services:** :bug: Fixes axios JSONP-protection-cleaner interceptors not firing ([e047016](https://github.com/Cha-OS/colabo/commit/e0470166338c6f207e3d4aabc25589286656c0f0)), closes [#700](https://github.com/Cha-OS/colabo/issues/700)
|
|
7
|
+
* **@colabo-knalledge/i-core-services:** :bug: Fixes bugs with interceptor ([cced994](https://github.com/Cha-OS/colabo/commit/cced994241399255a709970688af72015b90cf01)), closes [#700](https://github.com/Cha-OS/colabo/issues/700)
|
|
8
|
+
* **@colabo:** :bug: Fixed and buoilt level 2 puzzles ([8a947f6](https://github.com/Cha-OS/colabo/commit/8a947f6aabbedadff6b9dcf87442895091926775))
|
|
9
|
+
* **@colabo:** :bug: Fixed building bugs with rollup and/or esbuild ([3a03e6b](https://github.com/Cha-OS/colabo/commit/3a03e6bc4d3a3a9efd2af9f06351fc0fb9cde0c2))
|
|
10
|
+
* **@colabo:** :bug: Fixed semantic-release to read centralized config ([387e586](https://github.com/Cha-OS/colabo/commit/387e586bfb9e20d85749974e4eff59fe79ea792d))
|
|
11
|
+
* **@colabo:** :bug: Fixed tsc watch with missing @colabo-headless/i-core/colabo-utils/f-notifications [#696](https://github.com/Cha-OS/colabo/issues/696) ([e059aaa](https://github.com/Cha-OS/colabo/commit/e059aaa0f7f66f0d68487fcf6323406f48847f0b))
|
|
12
|
+
* **@colabo:** :bug: Fixed tsconfig types folder ([ea15b9c](https://github.com/Cha-OS/colabo/commit/ea15b9c562136b353ac78f730fcb2ab53a220414))
|
|
13
|
+
* **@colabo:** :bug: Fixed tsconfis for missing extends prop ([a32e995](https://github.com/Cha-OS/colabo/commit/a32e99552c6bfc5bc21635b61134dbc7b01f7690))
|
|
14
|
+
* **@colabo:** :bug: Fixed wrong path to typings ([594ae9c](https://github.com/Cha-OS/colabo/commit/594ae9c7b9fc69f8e863e9b7634050875306ddfe))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **@colabo:** :art: Fixed rollup, some moved to mjs, added esbuild for some puzzles ([ac97b56](https://github.com/Cha-OS/colabo/commit/ac97b567ef1133daf8162eb49940d3da9f0105ce))
|
|
20
|
+
* **@colabo:** :sparkles: Added live dependencies into NX nx.implicitDependencies ([ac76050](https://github.com/Cha-OS/colabo/commit/ac76050167e5cfb305b5c7fac8fa7079693b2f44))
|
|
21
|
+
* **@colabo:** :sparkles: Added new scripts to package.json ([5aed9ab](https://github.com/Cha-OS/colabo/commit/5aed9abe85632e73dfa4deff7dbcf8b3a412066c))
|
|
22
|
+
* **@colabo:** :sparkles: Fixed exports in package.json and introduced options for esbuild building ([fd3b665](https://github.com/Cha-OS/colabo/commit/fd3b6658718d7ff469716dff1faf055ed7cf3f16))
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -227,27 +228,43 @@ var errorInterceptor = (error) => {
|
|
|
227
228
|
return Promise.reject(error);
|
|
228
229
|
};
|
|
229
230
|
if (DEBUG_VERBOSE) console.log("[ColaboApiCoreService] declaring ColaboApiCoreService class");
|
|
230
|
-
var ColaboApiCoreService = class
|
|
231
|
+
var ColaboApiCoreService = class {
|
|
231
232
|
// Add a response interceptor to remove JSONP prefix that Colabo.Space is sending
|
|
232
233
|
// https://docs.angularjs.org/api/ng/service/$http#json-vulnerability-protection
|
|
233
234
|
// https://stackoverflow.com/questions/33967189/angular-not-removing-json-prefix
|
|
234
235
|
// [Ejecting an interceptor #2615](https://github.com/axios/axios/issues/2615#issuecomment-567964331)
|
|
235
236
|
static initialize(namespace, specificAxios = import_axios.default) {
|
|
236
237
|
if (DEBUG_VERBOSE) console.log("[ColaboApiCoreService:initialize] Initializing interceptor for the namespace: ", namespace);
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
let axiosImplementation = this.interceptorsForAxios.get(specificAxios);
|
|
239
|
+
if (!axiosImplementation || typeof axiosImplementation.colaboApiInterceptorId === "undefined") {
|
|
240
|
+
const colaboApiInterceptorId = specificAxios.interceptors.response.use(responseInterceptor, errorInterceptor);
|
|
241
|
+
if (!axiosImplementation) {
|
|
242
|
+
axiosImplementation = {
|
|
243
|
+
colaboApiInterceptorId,
|
|
244
|
+
colaboApiInterceptorNamespace: namespace
|
|
245
|
+
};
|
|
246
|
+
this.interceptorsForAxios.set(specificAxios, axiosImplementation);
|
|
247
|
+
} else {
|
|
248
|
+
axiosImplementation.colaboApiInterceptorNamespace = namespace;
|
|
249
|
+
axiosImplementation.colaboApiInterceptorId = colaboApiInterceptorId;
|
|
250
|
+
}
|
|
240
251
|
if (DEBUG_VERBOSE) console.log("[ColaboApiCoreService:initialize] Initialized interceptor for the namespace: ", namespace);
|
|
241
252
|
} else {
|
|
242
|
-
if (DEBUG_VERBOSE) console.log("[ColaboApiCoreService:initialize] Skipping initialization. The colabo interceptor was already initialized for the namespace: ",
|
|
253
|
+
if (DEBUG_VERBOSE) console.log("[ColaboApiCoreService:initialize] Skipping initialization. The colabo interceptor was already initialized for the namespace: ", axiosImplementation.colaboApiInterceptorNamespace);
|
|
243
254
|
}
|
|
244
|
-
return
|
|
255
|
+
return axiosImplementation.colaboApiInterceptorId;
|
|
245
256
|
}
|
|
246
257
|
static destroy(namespace, specificAxios = import_axios.default) {
|
|
247
258
|
if (DEBUG_VERBOSE) console.log("[ColaboApiCoreService:initialize] Destroying interceptor for the namespace: ", namespace);
|
|
248
|
-
|
|
259
|
+
let axiosImplementation = this.interceptorsForAxios.get(specificAxios);
|
|
260
|
+
if (axiosImplementation) {
|
|
261
|
+
specificAxios.interceptors.request.eject(axiosImplementation.colaboApiInterceptorId);
|
|
262
|
+
} else {
|
|
263
|
+
console.log(`[ColaboApiCoreService:initialize] no axiosImplementation found for the provided axios`);
|
|
264
|
+
}
|
|
249
265
|
}
|
|
250
266
|
};
|
|
267
|
+
ColaboApiCoreService.interceptorsForAxios = /* @__PURE__ */ new Map();
|
|
251
268
|
(0, import_i_core3.injectInterceptorService)(ColaboApiCoreService);
|
|
252
269
|
|
|
253
270
|
// lib/kContainer-service.ts
|