@nocios/crudify-ui 1.2.2 → 1.2.4
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.
|
@@ -39,6 +39,11 @@ var _ConfigurationManager = class _ConfigurationManager {
|
|
|
39
39
|
this.configError = null;
|
|
40
40
|
const envConfig = this.getEnvConfig();
|
|
41
41
|
const cookieConfig = this.getCookieConfig();
|
|
42
|
+
console.log("\u{1F527} ConfigurationManager - Configuration sources:", {
|
|
43
|
+
props: propsConfig,
|
|
44
|
+
env: envConfig,
|
|
45
|
+
cookies: cookieConfig
|
|
46
|
+
});
|
|
42
47
|
const configSource = {
|
|
43
48
|
env: "default",
|
|
44
49
|
publicApiKey: "default",
|
|
@@ -143,6 +148,73 @@ var _ConfigurationManager = class _ConfigurationManager {
|
|
|
143
148
|
getEnvConfig() {
|
|
144
149
|
const config = {};
|
|
145
150
|
try {
|
|
151
|
+
console.log("\u{1F527} ConfigurationManager - Reading environment variables");
|
|
152
|
+
if (typeof import.meta !== "undefined" && import.meta.env) {
|
|
153
|
+
const vitEnv = import.meta.env;
|
|
154
|
+
console.log("\u{1F527} ConfigurationManager - Vite import.meta.env available:", !!vitEnv);
|
|
155
|
+
const env = vitEnv.VITE_TEST_ENV;
|
|
156
|
+
if (env && ["dev", "stg", "prod"].includes(env)) {
|
|
157
|
+
config.env = env;
|
|
158
|
+
}
|
|
159
|
+
const publicApiKey = vitEnv.VITE_TEST_PUBLIC_API_KEY;
|
|
160
|
+
if (publicApiKey) {
|
|
161
|
+
config.publicApiKey = publicApiKey;
|
|
162
|
+
}
|
|
163
|
+
const loginActions = vitEnv.VITE_TEST_LOGIN_ACTIONS;
|
|
164
|
+
if (loginActions) {
|
|
165
|
+
config.loginActions = loginActions.split(",").map((action) => action.trim()).filter(Boolean);
|
|
166
|
+
}
|
|
167
|
+
const appName = vitEnv.VITE_TEST_APP_NAME;
|
|
168
|
+
if (appName) {
|
|
169
|
+
config.appName = appName;
|
|
170
|
+
}
|
|
171
|
+
const logo = vitEnv.VITE_TEST_LOGO;
|
|
172
|
+
if (logo) {
|
|
173
|
+
config.logo = logo;
|
|
174
|
+
}
|
|
175
|
+
const colors = vitEnv.VITE_TEST_COLORS;
|
|
176
|
+
if (colors) {
|
|
177
|
+
try {
|
|
178
|
+
config.colors = JSON.parse(colors);
|
|
179
|
+
} catch (error) {
|
|
180
|
+
console.warn("\u{1F527} ConfigurationManager - Failed to parse colors from env:", error);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
console.log("\u{1F527} ConfigurationManager - Vite env config:", config);
|
|
185
|
+
if (typeof globalThis !== "undefined" && globalThis.process?.env) {
|
|
186
|
+
const processEnv = globalThis.process.env;
|
|
187
|
+
console.log("\u{1F527} ConfigurationManager - process.env available:", !!processEnv);
|
|
188
|
+
const env = processEnv.VITE_TEST_ENV;
|
|
189
|
+
if (env && ["dev", "stg", "prod"].includes(env) && !config.env) {
|
|
190
|
+
config.env = env;
|
|
191
|
+
}
|
|
192
|
+
const publicApiKey = processEnv.VITE_TEST_PUBLIC_API_KEY;
|
|
193
|
+
if (publicApiKey && !config.publicApiKey) {
|
|
194
|
+
config.publicApiKey = publicApiKey;
|
|
195
|
+
}
|
|
196
|
+
const loginActions = processEnv.VITE_TEST_LOGIN_ACTIONS;
|
|
197
|
+
if (loginActions && !config.loginActions) {
|
|
198
|
+
config.loginActions = loginActions.split(",").map((action) => action.trim()).filter(Boolean);
|
|
199
|
+
}
|
|
200
|
+
const appName = processEnv.VITE_TEST_APP_NAME;
|
|
201
|
+
if (appName && !config.appName) {
|
|
202
|
+
config.appName = appName;
|
|
203
|
+
}
|
|
204
|
+
const logo = processEnv.VITE_TEST_LOGO;
|
|
205
|
+
if (logo && !config.logo) {
|
|
206
|
+
config.logo = logo;
|
|
207
|
+
}
|
|
208
|
+
const colors = processEnv.VITE_TEST_COLORS;
|
|
209
|
+
if (colors && !config.colors) {
|
|
210
|
+
try {
|
|
211
|
+
config.colors = JSON.parse(colors);
|
|
212
|
+
} catch (error) {
|
|
213
|
+
console.warn("\u{1F527} ConfigurationManager - Failed to parse colors from process.env:", error);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
console.log("\u{1F527} ConfigurationManager - Final env config:", config);
|
|
146
218
|
} catch (error) {
|
|
147
219
|
console.warn("\u{1F527} ConfigurationManager - Environment variables not available:", error);
|
|
148
220
|
}
|
|
@@ -154,27 +226,34 @@ var _ConfigurationManager = class _ConfigurationManager {
|
|
|
154
226
|
getCookieConfig() {
|
|
155
227
|
const config = {};
|
|
156
228
|
try {
|
|
229
|
+
console.log("\u{1F527} ConfigurationManager - Reading cookies from document.cookie:", document.cookie);
|
|
157
230
|
const env = getCookie("environment");
|
|
231
|
+
console.log("\u{1F527} ConfigurationManager - Cookie environment:", env);
|
|
158
232
|
if (env && ["dev", "stg", "prod"].includes(env)) {
|
|
159
233
|
config.env = env;
|
|
160
234
|
}
|
|
161
235
|
const publicApiKey = getCookie("publicApiKey");
|
|
236
|
+
console.log("\u{1F527} ConfigurationManager - Cookie publicApiKey:", publicApiKey ? `${publicApiKey.substring(0, 8)}...` : null);
|
|
162
237
|
if (publicApiKey) {
|
|
163
238
|
config.publicApiKey = publicApiKey;
|
|
164
239
|
}
|
|
165
240
|
const appName = getCookie("appName");
|
|
241
|
+
console.log("\u{1F527} ConfigurationManager - Cookie appName:", appName);
|
|
166
242
|
if (appName) {
|
|
167
243
|
config.appName = appName;
|
|
168
244
|
}
|
|
169
245
|
const loginActions = getCookie("loginActions");
|
|
246
|
+
console.log("\u{1F527} ConfigurationManager - Cookie loginActions:", loginActions);
|
|
170
247
|
if (loginActions) {
|
|
171
248
|
config.loginActions = loginActions.split(",").map((action) => action.trim()).filter(Boolean);
|
|
172
249
|
}
|
|
173
250
|
const logo = getCookie("logo");
|
|
251
|
+
console.log("\u{1F527} ConfigurationManager - Cookie logo:", logo);
|
|
174
252
|
if (logo) {
|
|
175
253
|
config.logo = logo;
|
|
176
254
|
}
|
|
177
255
|
const colors = getCookie("colors");
|
|
256
|
+
console.log("\u{1F527} ConfigurationManager - Cookie colors:", colors);
|
|
178
257
|
if (colors) {
|
|
179
258
|
try {
|
|
180
259
|
config.colors = JSON.parse(colors);
|
|
@@ -182,6 +261,7 @@ var _ConfigurationManager = class _ConfigurationManager {
|
|
|
182
261
|
console.warn("\u{1F527} ConfigurationManager - Failed to parse colors from cookie:", error);
|
|
183
262
|
}
|
|
184
263
|
}
|
|
264
|
+
console.log("\u{1F527} ConfigurationManager - Final cookie config:", config);
|
|
185
265
|
} catch (error) {
|
|
186
266
|
console.warn("\u{1F527} ConfigurationManager - Error reading cookies:", error);
|
|
187
267
|
}
|
package/dist/index.js
CHANGED
|
@@ -159,11 +159,12 @@ var init_secureStorage = __esm({
|
|
|
159
159
|
});
|
|
160
160
|
|
|
161
161
|
// src/core/ConfigurationManager.ts
|
|
162
|
-
var _ConfigurationManager, ConfigurationManager, configurationManager;
|
|
162
|
+
var import_meta, _ConfigurationManager, ConfigurationManager, configurationManager;
|
|
163
163
|
var init_ConfigurationManager = __esm({
|
|
164
164
|
"src/core/ConfigurationManager.ts"() {
|
|
165
165
|
"use strict";
|
|
166
166
|
init_cookies();
|
|
167
|
+
import_meta = {};
|
|
167
168
|
_ConfigurationManager = class _ConfigurationManager {
|
|
168
169
|
constructor() {
|
|
169
170
|
this.resolvedConfig = null;
|
|
@@ -195,6 +196,11 @@ var init_ConfigurationManager = __esm({
|
|
|
195
196
|
this.configError = null;
|
|
196
197
|
const envConfig = this.getEnvConfig();
|
|
197
198
|
const cookieConfig = this.getCookieConfig();
|
|
199
|
+
console.log("\u{1F527} ConfigurationManager - Configuration sources:", {
|
|
200
|
+
props: propsConfig,
|
|
201
|
+
env: envConfig,
|
|
202
|
+
cookies: cookieConfig
|
|
203
|
+
});
|
|
198
204
|
const configSource = {
|
|
199
205
|
env: "default",
|
|
200
206
|
publicApiKey: "default",
|
|
@@ -299,6 +305,73 @@ var init_ConfigurationManager = __esm({
|
|
|
299
305
|
getEnvConfig() {
|
|
300
306
|
const config = {};
|
|
301
307
|
try {
|
|
308
|
+
console.log("\u{1F527} ConfigurationManager - Reading environment variables");
|
|
309
|
+
if (typeof import_meta !== "undefined" && import_meta.env) {
|
|
310
|
+
const vitEnv = import_meta.env;
|
|
311
|
+
console.log("\u{1F527} ConfigurationManager - Vite import.meta.env available:", !!vitEnv);
|
|
312
|
+
const env = vitEnv.VITE_TEST_ENV;
|
|
313
|
+
if (env && ["dev", "stg", "prod"].includes(env)) {
|
|
314
|
+
config.env = env;
|
|
315
|
+
}
|
|
316
|
+
const publicApiKey = vitEnv.VITE_TEST_PUBLIC_API_KEY;
|
|
317
|
+
if (publicApiKey) {
|
|
318
|
+
config.publicApiKey = publicApiKey;
|
|
319
|
+
}
|
|
320
|
+
const loginActions = vitEnv.VITE_TEST_LOGIN_ACTIONS;
|
|
321
|
+
if (loginActions) {
|
|
322
|
+
config.loginActions = loginActions.split(",").map((action) => action.trim()).filter(Boolean);
|
|
323
|
+
}
|
|
324
|
+
const appName = vitEnv.VITE_TEST_APP_NAME;
|
|
325
|
+
if (appName) {
|
|
326
|
+
config.appName = appName;
|
|
327
|
+
}
|
|
328
|
+
const logo = vitEnv.VITE_TEST_LOGO;
|
|
329
|
+
if (logo) {
|
|
330
|
+
config.logo = logo;
|
|
331
|
+
}
|
|
332
|
+
const colors = vitEnv.VITE_TEST_COLORS;
|
|
333
|
+
if (colors) {
|
|
334
|
+
try {
|
|
335
|
+
config.colors = JSON.parse(colors);
|
|
336
|
+
} catch (error) {
|
|
337
|
+
console.warn("\u{1F527} ConfigurationManager - Failed to parse colors from env:", error);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
console.log("\u{1F527} ConfigurationManager - Vite env config:", config);
|
|
342
|
+
if (typeof globalThis !== "undefined" && globalThis.process?.env) {
|
|
343
|
+
const processEnv = globalThis.process.env;
|
|
344
|
+
console.log("\u{1F527} ConfigurationManager - process.env available:", !!processEnv);
|
|
345
|
+
const env = processEnv.VITE_TEST_ENV;
|
|
346
|
+
if (env && ["dev", "stg", "prod"].includes(env) && !config.env) {
|
|
347
|
+
config.env = env;
|
|
348
|
+
}
|
|
349
|
+
const publicApiKey = processEnv.VITE_TEST_PUBLIC_API_KEY;
|
|
350
|
+
if (publicApiKey && !config.publicApiKey) {
|
|
351
|
+
config.publicApiKey = publicApiKey;
|
|
352
|
+
}
|
|
353
|
+
const loginActions = processEnv.VITE_TEST_LOGIN_ACTIONS;
|
|
354
|
+
if (loginActions && !config.loginActions) {
|
|
355
|
+
config.loginActions = loginActions.split(",").map((action) => action.trim()).filter(Boolean);
|
|
356
|
+
}
|
|
357
|
+
const appName = processEnv.VITE_TEST_APP_NAME;
|
|
358
|
+
if (appName && !config.appName) {
|
|
359
|
+
config.appName = appName;
|
|
360
|
+
}
|
|
361
|
+
const logo = processEnv.VITE_TEST_LOGO;
|
|
362
|
+
if (logo && !config.logo) {
|
|
363
|
+
config.logo = logo;
|
|
364
|
+
}
|
|
365
|
+
const colors = processEnv.VITE_TEST_COLORS;
|
|
366
|
+
if (colors && !config.colors) {
|
|
367
|
+
try {
|
|
368
|
+
config.colors = JSON.parse(colors);
|
|
369
|
+
} catch (error) {
|
|
370
|
+
console.warn("\u{1F527} ConfigurationManager - Failed to parse colors from process.env:", error);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
console.log("\u{1F527} ConfigurationManager - Final env config:", config);
|
|
302
375
|
} catch (error) {
|
|
303
376
|
console.warn("\u{1F527} ConfigurationManager - Environment variables not available:", error);
|
|
304
377
|
}
|
|
@@ -310,27 +383,34 @@ var init_ConfigurationManager = __esm({
|
|
|
310
383
|
getCookieConfig() {
|
|
311
384
|
const config = {};
|
|
312
385
|
try {
|
|
386
|
+
console.log("\u{1F527} ConfigurationManager - Reading cookies from document.cookie:", document.cookie);
|
|
313
387
|
const env = getCookie("environment");
|
|
388
|
+
console.log("\u{1F527} ConfigurationManager - Cookie environment:", env);
|
|
314
389
|
if (env && ["dev", "stg", "prod"].includes(env)) {
|
|
315
390
|
config.env = env;
|
|
316
391
|
}
|
|
317
392
|
const publicApiKey = getCookie("publicApiKey");
|
|
393
|
+
console.log("\u{1F527} ConfigurationManager - Cookie publicApiKey:", publicApiKey ? `${publicApiKey.substring(0, 8)}...` : null);
|
|
318
394
|
if (publicApiKey) {
|
|
319
395
|
config.publicApiKey = publicApiKey;
|
|
320
396
|
}
|
|
321
397
|
const appName = getCookie("appName");
|
|
398
|
+
console.log("\u{1F527} ConfigurationManager - Cookie appName:", appName);
|
|
322
399
|
if (appName) {
|
|
323
400
|
config.appName = appName;
|
|
324
401
|
}
|
|
325
402
|
const loginActions = getCookie("loginActions");
|
|
403
|
+
console.log("\u{1F527} ConfigurationManager - Cookie loginActions:", loginActions);
|
|
326
404
|
if (loginActions) {
|
|
327
405
|
config.loginActions = loginActions.split(",").map((action) => action.trim()).filter(Boolean);
|
|
328
406
|
}
|
|
329
407
|
const logo = getCookie("logo");
|
|
408
|
+
console.log("\u{1F527} ConfigurationManager - Cookie logo:", logo);
|
|
330
409
|
if (logo) {
|
|
331
410
|
config.logo = logo;
|
|
332
411
|
}
|
|
333
412
|
const colors = getCookie("colors");
|
|
413
|
+
console.log("\u{1F527} ConfigurationManager - Cookie colors:", colors);
|
|
334
414
|
if (colors) {
|
|
335
415
|
try {
|
|
336
416
|
config.colors = JSON.parse(colors);
|
|
@@ -338,6 +418,7 @@ var init_ConfigurationManager = __esm({
|
|
|
338
418
|
console.warn("\u{1F527} ConfigurationManager - Failed to parse colors from cookie:", error);
|
|
339
419
|
}
|
|
340
420
|
}
|
|
421
|
+
console.log("\u{1F527} ConfigurationManager - Final cookie config:", config);
|
|
341
422
|
} catch (error) {
|
|
342
423
|
console.warn("\u{1F527} ConfigurationManager - Error reading cookies:", error);
|
|
343
424
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
secureSessionStorage,
|
|
11
11
|
tokenManager,
|
|
12
12
|
useCrudifyDataContext
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TAAQGO5Q.mjs";
|
|
14
14
|
|
|
15
15
|
// src/index.ts
|
|
16
16
|
import { default as default2 } from "@nocios/crudify-browser";
|
|
@@ -2370,7 +2370,7 @@ var useCrudifyInstance = () => {
|
|
|
2370
2370
|
}
|
|
2371
2371
|
try {
|
|
2372
2372
|
console.log("\u{1F504} useCrudifyInstance - waitForReady: Using CrudifyInitializer.waitForInitialization()");
|
|
2373
|
-
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-
|
|
2373
|
+
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-IFC5L3VQ.mjs");
|
|
2374
2374
|
await crudifyInitializer2.waitForInitialization();
|
|
2375
2375
|
console.log("\u2705 useCrudifyInstance - waitForReady: CrudifyInitializer completed");
|
|
2376
2376
|
if (!crudifyInitializer2.isReady()) {
|
|
@@ -2512,7 +2512,7 @@ var useCrudifyInstance = () => {
|
|
|
2512
2512
|
};
|
|
2513
2513
|
var getCrudifyInstanceAsync = async () => {
|
|
2514
2514
|
console.log("\u{1F504} getCrudifyInstanceAsync - Starting");
|
|
2515
|
-
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-
|
|
2515
|
+
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-IFC5L3VQ.mjs");
|
|
2516
2516
|
console.log("\u{1F504} getCrudifyInstanceAsync - Checking if ready");
|
|
2517
2517
|
console.log(" - crudifyInitializer.isReady():", crudifyInitializer2.isReady());
|
|
2518
2518
|
console.log(" - crudifyInitializer.getStatus():", crudifyInitializer2.getStatus());
|
|
@@ -2531,7 +2531,7 @@ var getCrudifyInstanceAsync = async () => {
|
|
|
2531
2531
|
return crudify5;
|
|
2532
2532
|
};
|
|
2533
2533
|
var getCrudifyInstanceSync = async () => {
|
|
2534
|
-
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-
|
|
2534
|
+
const { crudifyInitializer: crudifyInitializer2 } = await import("./CrudifyDataProvider-IFC5L3VQ.mjs");
|
|
2535
2535
|
if (!crudifyInitializer2.isReady()) {
|
|
2536
2536
|
throw new Error("Crudify not ready. Use getCrudifyInstanceAsync() or call this from within a React component using useCrudifyInstance()");
|
|
2537
2537
|
}
|