@djust-b2b/djust-front-sdk 1.22.1 → 1.22.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/lib/instrument.d.ts +1 -0
- package/lib/instrument.js +15 -0
- package/lib/{index.d.ts → src/index.d.ts} +1 -0
- package/lib/{index.js → src/index.js} +1 -0
- package/lib/{settings → src/settings}/fetch-instance.js +6 -13
- package/package.json +1 -1
- /package/lib/{helpers → src/helpers}/parameters-validation.d.ts +0 -0
- /package/lib/{helpers → src/helpers}/parameters-validation.js +0 -0
- /package/lib/{helpers → src/helpers}/utils.d.ts +0 -0
- /package/lib/{helpers → src/helpers}/utils.js +0 -0
- /package/lib/{interfaces → src/interfaces}/index.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/index.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/address.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/address.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/attribute.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/attribute.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/auth.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/auth.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/buying-list.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/buying-list.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/cart.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/cart.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/common.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/common.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/custom-field.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/custom-field.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/customer-account.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/customer-account.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/customer-organisation.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/customer-organisation.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/customer-user.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/customer-user.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/incident.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/incident.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/navigation-category.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/navigation-category.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/offer.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/offer.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/order.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/order.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/payment.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/payment.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/price.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/price.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/product.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/product.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/quote.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/quote.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/searchProduct.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/searchProduct.js +0 -0
- /package/lib/{interfaces → src/interfaces}/models/supplier.d.ts +0 -0
- /package/lib/{interfaces → src/interfaces}/models/supplier.js +0 -0
- /package/lib/{services → src/services}/auth/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/auth/definitions.js +0 -0
- /package/lib/{services → src/services}/auth/definitions.requests.d.ts +0 -0
- /package/lib/{services → src/services}/auth/definitions.requests.js +0 -0
- /package/lib/{services → src/services}/auth/index.d.ts +0 -0
- /package/lib/{services → src/services}/auth/index.js +0 -0
- /package/lib/{services → src/services}/buying-list/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/buying-list/definitions.js +0 -0
- /package/lib/{services → src/services}/buying-list/index.d.ts +0 -0
- /package/lib/{services → src/services}/buying-list/index.js +0 -0
- /package/lib/{services → src/services}/cart/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/cart/definitions.js +0 -0
- /package/lib/{services → src/services}/cart/index.d.ts +0 -0
- /package/lib/{services → src/services}/cart/index.js +0 -0
- /package/lib/{services → src/services}/commercial-order/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/commercial-order/definitions.js +0 -0
- /package/lib/{services → src/services}/commercial-order/index.d.ts +0 -0
- /package/lib/{services → src/services}/commercial-order/index.js +0 -0
- /package/lib/{services → src/services}/custom-field/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/custom-field/definitions.js +0 -0
- /package/lib/{services → src/services}/custom-field/index.d.ts +0 -0
- /package/lib/{services → src/services}/custom-field/index.js +0 -0
- /package/lib/{services → src/services}/customer-account/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/customer-account/definitions.js +0 -0
- /package/lib/{services → src/services}/customer-account/index.d.ts +0 -0
- /package/lib/{services → src/services}/customer-account/index.js +0 -0
- /package/lib/{services → src/services}/customer-user/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/customer-user/definitions.js +0 -0
- /package/lib/{services → src/services}/customer-user/index.d.ts +0 -0
- /package/lib/{services → src/services}/customer-user/index.js +0 -0
- /package/lib/{services → src/services}/incident/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/incident/definitions.js +0 -0
- /package/lib/{services → src/services}/incident/index.d.ts +0 -0
- /package/lib/{services → src/services}/incident/index.js +0 -0
- /package/lib/{services → src/services}/logistic-order/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/logistic-order/definitions.js +0 -0
- /package/lib/{services → src/services}/logistic-order/index.d.ts +0 -0
- /package/lib/{services → src/services}/logistic-order/index.js +0 -0
- /package/lib/{services → src/services}/navigation-category/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/navigation-category/definitions.js +0 -0
- /package/lib/{services → src/services}/navigation-category/index.d.ts +0 -0
- /package/lib/{services → src/services}/navigation-category/index.js +0 -0
- /package/lib/{services → src/services}/product/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/product/definitions.js +0 -0
- /package/lib/{services → src/services}/product/index.d.ts +0 -0
- /package/lib/{services → src/services}/product/index.js +0 -0
- /package/lib/{services → src/services}/product-variant/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/product-variant/definitions.js +0 -0
- /package/lib/{services → src/services}/product-variant/index.d.ts +0 -0
- /package/lib/{services → src/services}/product-variant/index.js +0 -0
- /package/lib/{services → src/services}/quote/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/quote/definitions.js +0 -0
- /package/lib/{services → src/services}/quote/index.d.ts +0 -0
- /package/lib/{services → src/services}/quote/index.js +0 -0
- /package/lib/{services → src/services}/supplier/definitions.d.ts +0 -0
- /package/lib/{services → src/services}/supplier/definitions.js +0 -0
- /package/lib/{services → src/services}/supplier/index.d.ts +0 -0
- /package/lib/{services → src/services}/supplier/index.js +0 -0
- /package/lib/{settings → src/settings}/fetch-instance.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const Sentry = require("@sentry/node");
|
|
3
|
+
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
|
|
4
|
+
const SDK_VERSION = require("../package.json").version;
|
|
5
|
+
const dsn = "https://39ef5198e24fa0ec7b743c460bd1ca63@o1191347.ingest.us.sentry.io/4508879498575872"; // Replace with your actual DSN
|
|
6
|
+
const clientName = "djust"; // Replace with your actual client name
|
|
7
|
+
const env = "preprod"; // Replace with your actual environment
|
|
8
|
+
Sentry.init({
|
|
9
|
+
dsn,
|
|
10
|
+
environment: `${clientName}-${env}`,
|
|
11
|
+
release: `${clientName}-${env}-${SDK_VERSION}`, // Replace with your SDK version
|
|
12
|
+
integrations: [nodeProfilingIntegration(), Sentry.nativeNodeFetchIntegration()],
|
|
13
|
+
tracesSampleRate: 1.0, // Adjust for production
|
|
14
|
+
profilesSampleRate: 1.0,
|
|
15
|
+
});
|
|
@@ -37,6 +37,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.DjustSDK = void 0;
|
|
40
|
+
require("../instrument");
|
|
40
41
|
const AuthServices = __importStar(require("./services/auth"));
|
|
41
42
|
const BuyingListServices = __importStar(require("./services/buying-list"));
|
|
42
43
|
const CartServices = __importStar(require("./services/cart"));
|
|
@@ -34,31 +34,24 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.enhancedFetch = exports.updateConfiguration = exports.initialize = void 0;
|
|
37
|
-
const qs = __importStar(require("query-string"));
|
|
38
37
|
const Sentry = __importStar(require("@sentry/node"));
|
|
38
|
+
const qs = __importStar(require("query-string"));
|
|
39
39
|
require("isomorphic-fetch");
|
|
40
|
-
const SDK_VERSION = require("../package.json").version;
|
|
41
40
|
let clientConfig = {
|
|
42
41
|
baseUrl: "",
|
|
43
42
|
clientId: "",
|
|
44
43
|
apiKey: "",
|
|
45
44
|
dsn: "https://39ef5198e24fa0ec7b743c460bd1ca63@o1191347.ingest.us.sentry.io/4508879498575872",
|
|
46
45
|
};
|
|
47
|
-
let
|
|
46
|
+
let isSDKInitialized = false;
|
|
48
47
|
const initialize = (initConfig) => {
|
|
49
48
|
clientConfig = {
|
|
50
49
|
...initConfig,
|
|
51
50
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
environment: `${clientConfig.clientName}-${clientConfig.env}`,
|
|
57
|
-
release: `${clientConfig.clientName}-${clientConfig.env}-${SDK_VERSION}`,
|
|
58
|
-
tracesSampleRate: 1.0,
|
|
59
|
-
});
|
|
60
|
-
isSentryInitialized = true;
|
|
61
|
-
console.log(`[Djust SDK] Sentry activé pour ${clientConfig.clientName}-${clientConfig.env}-${SDK_VERSION}`);
|
|
51
|
+
if (!isSDKInitialized) {
|
|
52
|
+
Sentry.init(clientConfig); // ✅ Pass clientConfig dynamically
|
|
53
|
+
isSDKInitialized = true;
|
|
54
|
+
console.log("[Djust SDK] Initialized with client config:", clientConfig);
|
|
62
55
|
}
|
|
63
56
|
};
|
|
64
57
|
exports.initialize = initialize;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|