@sonicjs-cms/core 2.0.12 → 2.0.13
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/dist/{chunk-K5WUGEXH.cjs → chunk-2CP6535T.cjs} +114 -114
- package/dist/{chunk-K5WUGEXH.cjs.map → chunk-2CP6535T.cjs.map} +1 -1
- package/dist/{chunk-3OKKNBPD.cjs → chunk-HFFNEGZB.cjs} +4 -4
- package/dist/chunk-HFFNEGZB.cjs.map +1 -0
- package/dist/{chunk-AUVW4I3D.js → chunk-I3R77LQC.js} +2 -2
- package/dist/{chunk-AUVW4I3D.js.map → chunk-I3R77LQC.js.map} +1 -1
- package/dist/{chunk-RDJ2QLA2.cjs → chunk-JQIQRMPA.cjs} +2 -2
- package/dist/{chunk-RDJ2QLA2.cjs.map → chunk-JQIQRMPA.cjs.map} +1 -1
- package/dist/{chunk-RKNHW6QU.js → chunk-MOWI4WYE.js} +5 -5
- package/dist/chunk-MOWI4WYE.js.map +1 -0
- package/dist/{chunk-LBSKQKYL.js → chunk-PFNUOW6W.js} +3 -3
- package/dist/{chunk-LBSKQKYL.js.map → chunk-PFNUOW6W.js.map} +1 -1
- package/dist/{chunk-6B4ENDQM.js → chunk-QWIXOMHW.js} +9 -9
- package/dist/{chunk-6B4ENDQM.js.map → chunk-QWIXOMHW.js.map} +1 -1
- package/dist/{chunk-3F4LF7LW.cjs → chunk-U2WYUO32.cjs} +11 -11
- package/dist/{chunk-3F4LF7LW.cjs.map → chunk-U2WYUO32.cjs.map} +1 -1
- package/dist/{chunk-2HRF65VF.cjs → chunk-WFHLBYNA.cjs} +3 -3
- package/dist/{chunk-2HRF65VF.cjs.map → chunk-WFHLBYNA.cjs.map} +1 -1
- package/dist/{chunk-F4IGVB2V.cjs → chunk-WML2ZMHH.cjs} +4 -4
- package/dist/{chunk-F4IGVB2V.cjs.map → chunk-WML2ZMHH.cjs.map} +1 -1
- package/dist/{chunk-DSDHGJ4F.js → chunk-ZALNKBLS.js} +3 -3
- package/dist/{chunk-DSDHGJ4F.js.map → chunk-ZALNKBLS.js.map} +1 -1
- package/dist/{chunk-M2YDOOBC.js → chunk-ZNESOOF2.js} +3 -3
- package/dist/{chunk-M2YDOOBC.js.map → chunk-ZNESOOF2.js.map} +1 -1
- package/dist/index.cjs +118 -118
- package/dist/index.js +10 -10
- package/dist/middleware.cjs +23 -23
- package/dist/middleware.js +2 -2
- package/dist/migrations-GVG73ZJC.js +4 -0
- package/dist/{migrations-DURR3GZX.js.map → migrations-GVG73ZJC.js.map} +1 -1
- package/dist/migrations-S52MEE4J.cjs +13 -0
- package/dist/{migrations-P5BD7WQK.cjs.map → migrations-S52MEE4J.cjs.map} +1 -1
- package/dist/routes.cjs +26 -26
- package/dist/routes.js +6 -6
- package/dist/services.cjs +15 -15
- package/dist/services.js +3 -3
- package/dist/utils.cjs +20 -20
- package/dist/utils.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-3OKKNBPD.cjs.map +0 -1
- package/dist/chunk-RKNHW6QU.js.map +0 -1
- package/dist/migrations-DURR3GZX.js +0 -4
- package/dist/migrations-P5BD7WQK.cjs +0 -13
package/dist/middleware.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWML2ZMHH_cjs = require('./chunk-WML2ZMHH.cjs');
|
|
4
4
|
require('./chunk-22EFGHAX.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-JQIQRMPA.cjs');
|
|
6
6
|
require('./chunk-RCQ2HIQD.cjs');
|
|
7
7
|
require('./chunk-IGJUBJBW.cjs');
|
|
8
8
|
|
|
@@ -10,87 +10,87 @@ require('./chunk-IGJUBJBW.cjs');
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "AuthManager", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkWML2ZMHH_cjs.AuthManager; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "PermissionManager", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkWML2ZMHH_cjs.PermissionManager; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "bootstrapMiddleware", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkWML2ZMHH_cjs.bootstrapMiddleware; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "cacheHeaders", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkWML2ZMHH_cjs.cacheHeaders; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "compressionMiddleware", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkWML2ZMHH_cjs.compressionMiddleware; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "detailedLoggingMiddleware", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkWML2ZMHH_cjs.detailedLoggingMiddleware; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "getActivePlugins", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkWML2ZMHH_cjs.getActivePlugins; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "isPluginActive", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkWML2ZMHH_cjs.isPluginActive; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "logActivity", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkWML2ZMHH_cjs.logActivity; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "loggingMiddleware", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkWML2ZMHH_cjs.loggingMiddleware; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "metricsMiddleware", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkWML2ZMHH_cjs.metricsMiddleware; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "optionalAuth", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkWML2ZMHH_cjs.optionalAuth; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "performanceLoggingMiddleware", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkWML2ZMHH_cjs.performanceLoggingMiddleware; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "requireActivePlugin", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkWML2ZMHH_cjs.requireActivePlugin; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "requireActivePlugins", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkWML2ZMHH_cjs.requireActivePlugins; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "requireAnyPermission", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkWML2ZMHH_cjs.requireAnyPermission; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "requireAuth", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkWML2ZMHH_cjs.requireAuth; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "requirePermission", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkWML2ZMHH_cjs.requirePermission; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "requireRole", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkWML2ZMHH_cjs.requireRole; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "securityHeaders", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkWML2ZMHH_cjs.securityHeaders; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "securityLoggingMiddleware", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkWML2ZMHH_cjs.securityLoggingMiddleware; }
|
|
94
94
|
});
|
|
95
95
|
//# sourceMappingURL=middleware.cjs.map
|
|
96
96
|
//# sourceMappingURL=middleware.cjs.map
|
package/dist/middleware.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AuthManager, PermissionManager, bootstrapMiddleware, cacheHeaders, compressionMiddleware, detailedLoggingMiddleware, getActivePlugins, isPluginActive, logActivity, loggingMiddleware, metricsMiddleware, optionalAuth, performanceLoggingMiddleware, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeaders, securityLoggingMiddleware } from './chunk-
|
|
1
|
+
export { AuthManager, PermissionManager, bootstrapMiddleware, cacheHeaders, compressionMiddleware, detailedLoggingMiddleware, getActivePlugins, isPluginActive, logActivity, loggingMiddleware, metricsMiddleware, optionalAuth, performanceLoggingMiddleware, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeaders, securityLoggingMiddleware } from './chunk-PFNUOW6W.js';
|
|
2
2
|
import './chunk-LWMMMW43.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-I3R77LQC.js';
|
|
4
4
|
import './chunk-FICTAGD4.js';
|
|
5
5
|
import './chunk-V4OQ3NZ2.js';
|
|
6
6
|
//# sourceMappingURL=middleware.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-GVG73ZJC.js"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkJQIQRMPA_cjs = require('./chunk-JQIQRMPA.cjs');
|
|
4
|
+
require('./chunk-IGJUBJBW.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "MigrationService", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkJQIQRMPA_cjs.MigrationService; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=migrations-S52MEE4J.cjs.map
|
|
13
|
+
//# sourceMappingURL=migrations-S52MEE4J.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-S52MEE4J.cjs"}
|
package/dist/routes.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunk2CP6535T_cjs = require('./chunk-2CP6535T.cjs');
|
|
4
|
+
require('./chunk-U2WYUO32.cjs');
|
|
5
|
+
require('./chunk-WML2ZMHH.cjs');
|
|
6
6
|
require('./chunk-22EFGHAX.cjs');
|
|
7
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-JQIQRMPA.cjs');
|
|
8
8
|
require('./chunk-YU6QFFI4.cjs');
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-WFHLBYNA.cjs');
|
|
10
|
+
require('./chunk-HFFNEGZB.cjs');
|
|
11
11
|
require('./chunk-RCQ2HIQD.cjs');
|
|
12
12
|
require('./chunk-IGJUBJBW.cjs');
|
|
13
13
|
|
|
@@ -15,83 +15,83 @@ require('./chunk-IGJUBJBW.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "ROUTES_INFO", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk2CP6535T_cjs.ROUTES_INFO; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "adminApiRoutes", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk2CP6535T_cjs.admin_api_default; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "adminCheckboxRoutes", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk2CP6535T_cjs.adminCheckboxRoutes; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "adminCodeExamplesRoutes", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk2CP6535T_cjs.admin_code_examples_default; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "adminCollectionsRoutes", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk2CP6535T_cjs.adminCollectionsRoutes; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "adminContentRoutes", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunk2CP6535T_cjs.admin_content_default; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "adminDashboardRoutes", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunk2CP6535T_cjs.router; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "adminDesignRoutes", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk2CP6535T_cjs.adminDesignRoutes; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "adminLogsRoutes", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk2CP6535T_cjs.adminLogsRoutes; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "adminMediaRoutes", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunk2CP6535T_cjs.adminMediaRoutes; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "adminPluginRoutes", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunk2CP6535T_cjs.adminPluginRoutes; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "adminSettingsRoutes", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunk2CP6535T_cjs.adminSettingsRoutes; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "adminTestimonialsRoutes", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunk2CP6535T_cjs.admin_testimonials_default; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "adminUsersRoutes", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunk2CP6535T_cjs.userRoutes; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "apiContentCrudRoutes", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunk2CP6535T_cjs.api_content_crud_default; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "apiMediaRoutes", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunk2CP6535T_cjs.api_media_default; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "apiRoutes", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunk2CP6535T_cjs.api_default; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "apiSystemRoutes", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunk2CP6535T_cjs.api_system_default; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "authRoutes", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunk2CP6535T_cjs.auth_default; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "testCleanupRoutes", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunk2CP6535T_cjs.test_cleanup_default; }
|
|
95
95
|
});
|
|
96
96
|
//# sourceMappingURL=routes.cjs.map
|
|
97
97
|
//# sourceMappingURL=routes.cjs.map
|
package/dist/routes.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { ROUTES_INFO, admin_api_default as adminApiRoutes, adminCheckboxRoutes, admin_code_examples_default as adminCodeExamplesRoutes, adminCollectionsRoutes, admin_content_default as adminContentRoutes, router as adminDashboardRoutes, adminDesignRoutes, adminLogsRoutes, adminMediaRoutes, adminPluginRoutes, adminSettingsRoutes, admin_testimonials_default as adminTestimonialsRoutes, userRoutes as adminUsersRoutes, api_content_crud_default as apiContentCrudRoutes, api_media_default as apiMediaRoutes, api_default as apiRoutes, api_system_default as apiSystemRoutes, auth_default as authRoutes, test_cleanup_default as testCleanupRoutes } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { ROUTES_INFO, admin_api_default as adminApiRoutes, adminCheckboxRoutes, admin_code_examples_default as adminCodeExamplesRoutes, adminCollectionsRoutes, admin_content_default as adminContentRoutes, router as adminDashboardRoutes, adminDesignRoutes, adminLogsRoutes, adminMediaRoutes, adminPluginRoutes, adminSettingsRoutes, admin_testimonials_default as adminTestimonialsRoutes, userRoutes as adminUsersRoutes, api_content_crud_default as apiContentCrudRoutes, api_media_default as apiMediaRoutes, api_default as apiRoutes, api_system_default as apiSystemRoutes, auth_default as authRoutes, test_cleanup_default as testCleanupRoutes } from './chunk-QWIXOMHW.js';
|
|
2
|
+
import './chunk-ZNESOOF2.js';
|
|
3
|
+
import './chunk-PFNUOW6W.js';
|
|
4
4
|
import './chunk-LWMMMW43.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-I3R77LQC.js';
|
|
6
6
|
import './chunk-5RKQB2JG.js';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
7
|
+
import './chunk-ZALNKBLS.js';
|
|
8
|
+
import './chunk-MOWI4WYE.js';
|
|
9
9
|
import './chunk-FICTAGD4.js';
|
|
10
10
|
import './chunk-V4OQ3NZ2.js';
|
|
11
11
|
//# sourceMappingURL=routes.js.map
|
package/dist/services.cjs
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkU2WYUO32_cjs = require('./chunk-U2WYUO32.cjs');
|
|
4
4
|
var chunk22EFGHAX_cjs = require('./chunk-22EFGHAX.cjs');
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
5
|
+
var chunkJQIQRMPA_cjs = require('./chunk-JQIQRMPA.cjs');
|
|
6
|
+
require('./chunk-HFFNEGZB.cjs');
|
|
7
7
|
require('./chunk-IGJUBJBW.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "CACHE_CONFIGS", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkU2WYUO32_cjs.CACHE_CONFIGS; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "CacheService", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkU2WYUO32_cjs.CacheService; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "Logger", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkU2WYUO32_cjs.Logger; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "SettingsService", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkU2WYUO32_cjs.SettingsService; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "TelemetryService", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkU2WYUO32_cjs.TelemetryService; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "createInstallationIdentity", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkU2WYUO32_cjs.createInstallationIdentity; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "getCacheService", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkU2WYUO32_cjs.getCacheService; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "getLogger", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkU2WYUO32_cjs.getLogger; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "getTelemetryService", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkU2WYUO32_cjs.getTelemetryService; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "initLogger", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkU2WYUO32_cjs.initLogger; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "initTelemetry", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkU2WYUO32_cjs.initTelemetry; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "PluginBootstrapService", {
|
|
56
56
|
enumerable: true,
|
|
@@ -106,7 +106,7 @@ Object.defineProperty(exports, "validateCollectionConfig", {
|
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "MigrationService", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkJQIQRMPA_cjs.MigrationService; }
|
|
110
110
|
});
|
|
111
111
|
//# sourceMappingURL=services.cjs.map
|
|
112
112
|
//# sourceMappingURL=services.cjs.map
|
package/dist/services.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { CACHE_CONFIGS, CacheService, Logger, SettingsService, TelemetryService, createInstallationIdentity, getCacheService, getLogger, getTelemetryService, initLogger, initTelemetry } from './chunk-
|
|
1
|
+
export { CACHE_CONFIGS, CacheService, Logger, SettingsService, TelemetryService, createInstallationIdentity, getCacheService, getLogger, getTelemetryService, initLogger, initTelemetry } from './chunk-ZNESOOF2.js';
|
|
2
2
|
export { PluginBootstrapService, PluginService, cleanupRemovedCollections, fullCollectionSync, getAvailableCollectionNames, getManagedCollections, isCollectionManaged, loadCollectionConfig, loadCollectionConfigs, registerCollections, syncCollection, syncCollections, validateCollectionConfig } from './chunk-LWMMMW43.js';
|
|
3
|
-
export { MigrationService } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { MigrationService } from './chunk-I3R77LQC.js';
|
|
4
|
+
import './chunk-MOWI4WYE.js';
|
|
5
5
|
import './chunk-V4OQ3NZ2.js';
|
|
6
6
|
//# sourceMappingURL=services.js.map
|
|
7
7
|
//# sourceMappingURL=services.js.map
|
package/dist/utils.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkWFHLBYNA_cjs = require('./chunk-WFHLBYNA.cjs');
|
|
4
|
+
var chunkHFFNEGZB_cjs = require('./chunk-HFFNEGZB.cjs');
|
|
5
5
|
var chunkRCQ2HIQD_cjs = require('./chunk-RCQ2HIQD.cjs');
|
|
6
6
|
require('./chunk-IGJUBJBW.cjs');
|
|
7
7
|
|
|
@@ -9,75 +9,75 @@ require('./chunk-IGJUBJBW.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "QueryFilterBuilder", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkWFHLBYNA_cjs.QueryFilterBuilder; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "SONICJS_VERSION", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkWFHLBYNA_cjs.SONICJS_VERSION; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "TemplateRenderer", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkWFHLBYNA_cjs.TemplateRenderer; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "buildQuery", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkWFHLBYNA_cjs.buildQuery; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "escapeHtml", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkWFHLBYNA_cjs.escapeHtml; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "getCoreVersion", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkWFHLBYNA_cjs.getCoreVersion; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "renderTemplate", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkWFHLBYNA_cjs.renderTemplate; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "sanitizeInput", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkWFHLBYNA_cjs.sanitizeInput; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "sanitizeObject", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkWFHLBYNA_cjs.sanitizeObject; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "templateRenderer", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkWFHLBYNA_cjs.templateRenderer; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "DEFAULT_TELEMETRY_CONFIG", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkHFFNEGZB_cjs.DEFAULT_TELEMETRY_CONFIG; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "generateInstallationId", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkHFFNEGZB_cjs.generateInstallationId; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "generateProjectId", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkHFFNEGZB_cjs.generateProjectId; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "getTelemetryConfig", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkHFFNEGZB_cjs.getTelemetryConfig; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "isTelemetryEnabled", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkHFFNEGZB_cjs.isTelemetryEnabled; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "sanitizeErrorMessage", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkHFFNEGZB_cjs.sanitizeErrorMessage; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "sanitizeRoute", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkHFFNEGZB_cjs.sanitizeRoute; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "shouldSkipEvent", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkHFFNEGZB_cjs.shouldSkipEvent; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "metricsTracker", {
|
|
83
83
|
enumerable: true,
|
package/dist/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { QueryFilterBuilder, SONICJS_VERSION, TemplateRenderer, buildQuery, escapeHtml, getCoreVersion, renderTemplate, sanitizeInput, sanitizeObject, templateRenderer } from './chunk-
|
|
2
|
-
export { DEFAULT_TELEMETRY_CONFIG, generateInstallationId, generateProjectId, getTelemetryConfig, isTelemetryEnabled, sanitizeErrorMessage, sanitizeRoute, shouldSkipEvent } from './chunk-
|
|
1
|
+
export { QueryFilterBuilder, SONICJS_VERSION, TemplateRenderer, buildQuery, escapeHtml, getCoreVersion, renderTemplate, sanitizeInput, sanitizeObject, templateRenderer } from './chunk-ZALNKBLS.js';
|
|
2
|
+
export { DEFAULT_TELEMETRY_CONFIG, generateInstallationId, generateProjectId, getTelemetryConfig, isTelemetryEnabled, sanitizeErrorMessage, sanitizeRoute, shouldSkipEvent } from './chunk-MOWI4WYE.js';
|
|
3
3
|
export { metricsTracker } from './chunk-FICTAGD4.js';
|
|
4
4
|
import './chunk-V4OQ3NZ2.js';
|
|
5
5
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/telemetry-config.ts","../src/utils/telemetry-id.ts"],"names":["randomUUID"],"mappings":";;;;;AAWO,IAAM,wBAAA,GAA4C;AAAA,EACvD,OAAA,EAAS,IAAA;AAAA,EACT,MAAA,EAAQ,OAAA,CAAQ,GAAA,CAAI,eAAA,IAAmB,iDAAA;AAAA,EACvC,IAAA,EAAM,OAAA,CAAQ,GAAA,CAAI,YAAA,IAAgB,0BAAA;AAAA,EAClC,KAAA,EAAO,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa;AAClC;AAKO,SAAS,kBAAA,GAA8B;AAE5C,EAAA,MAAM,YAAA,GAAe,QAAQ,GAAA,CAAI,iBAAA;AACjC,EAAA,IAAI,YAAA,KAAiB,OAAA,IAAW,YAAA,KAAiB,GAAA,IAAO,iBAAiB,UAAA,EAAY;AACnF,IAAA,OAAO,KAAA;AAAA,EACT;AAGA,EAAA,MAAM,UAAA,GAAa,QAAQ,GAAA,CAAI,YAAA;AAC/B,EAAA,IAAI,UAAA,KAAe,GAAA,IAAO,UAAA,KAAe,MAAA,EAAQ;AAC/C,IAAA,OAAO,KAAA;AAAA,EACT;AAGA,EAAA,OAAO,IAAA;AACT;AAKO,SAAS,kBAAA,GAAsC;AACpD,EAAA,OAAO;AAAA,IACL,GAAG,wBAAA;AAAA,IACH,SAAS,kBAAA;AAAmB,GAC9B;AACF;AAMO,SAAS,eAAA,CAAgB,SAAA,EAAmB,UAAA,GAAqB,CAAA,EAAc;AACpF,EAAA,IAAI,UAAA,IAAc,GAAK,OAAO,KAAA;AAC9B,EAA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EACvC,OAAA,CAAQ,gBAAA,EAAkB,WAAW,CAAA,CACrC,QAAQ,oBAAA,EAAsB,gBAAgB,CAAA,CAC9C,OAAA,CAAQ,mDAAmD,aAAa,CAAA;AAE3E,EAAA,OAAO,SAAA;AACT;AAKO,SAAS,cAAc,KAAA,EAAuB;AACnD,EAAA,OAAO,KAAA,CAEJ,OAAA,CAAQ,gEAAA,EAAkE,KAAK,CAAA,CAE/E,OAAA,CAAQ,QAAA,EAAU,MAAM,CAAA,CAExB,OAAA,CAAQ,iDAAA,EAAmD,QAAQ,CAAA;AACxE","file":"chunk-3OKKNBPD.cjs","sourcesContent":["/**\n * Telemetry Configuration Utilities\n *\n * Manages telemetry settings and opt-out mechanisms\n */\n\nimport type { TelemetryConfig } from '../types/telemetry'\n\n/**\n * Default telemetry configuration\n */\nexport const DEFAULT_TELEMETRY_CONFIG: TelemetryConfig = {\n enabled: true,\n apiKey: process.env.POSTHOG_API_KEY || 'phc_VuhFUIJLXzwyGjlgQ67dbNeSh5x4cp9F8i15hZFIDhs',\n host: process.env.POSTHOG_HOST || 'https://us.i.posthog.com',\n debug: process.env.NODE_ENV === 'development'\n}\n\n/**\n * Check if telemetry is enabled via environment variables\n */\nexport function isTelemetryEnabled(): boolean {\n // Check for explicit opt-out\n const telemetryEnv = process.env.SONICJS_TELEMETRY\n if (telemetryEnv === 'false' || telemetryEnv === '0' || telemetryEnv === 'disabled') {\n return false\n }\n\n // Check for DO_NOT_TRACK environment variable (common standard)\n const doNotTrack = process.env.DO_NOT_TRACK\n if (doNotTrack === '1' || doNotTrack === 'true') {\n return false\n }\n\n // Default to enabled (opt-out model)\n return true\n}\n\n/**\n * Get telemetry configuration from environment\n */\nexport function getTelemetryConfig(): TelemetryConfig {\n return {\n ...DEFAULT_TELEMETRY_CONFIG,\n enabled: isTelemetryEnabled()\n }\n}\n\n/**\n * Check if telemetry should be skipped for this event\n * Used to implement sampling or rate limiting if needed\n */\nexport function shouldSkipEvent(eventName: string, sampleRate: number = 1.0): boolean {\n if (sampleRate >= 1.0) return false\n if (sampleRate <= 0) return true\n\n // Use a consistent hash of the event name for deterministic sampling\n let hash = 0\n for (let i = 0; i < eventName.length; i++) {\n hash = ((hash << 5) - hash) + eventName.charCodeAt(i)\n hash = hash & hash\n }\n\n return Math.abs(hash % 100) / 100 > sampleRate\n}\n","/**\n * Telemetry ID Utilities\n *\n * Generates and manages anonymous installation IDs\n */\n\nimport { randomUUID } from 'node:crypto'\n\n/**\n * Generate a new anonymous installation ID\n */\nexport function generateInstallationId(): string {\n return randomUUID()\n}\n\n/**\n * Generate a project-specific ID from project name\n * Uses a simple hash to anonymize while maintaining consistency\n */\nexport function generateProjectId(projectName: string): string {\n // Simple hash function to anonymize project names\n let hash = 0\n for (let i = 0; i < projectName.length; i++) {\n const char = projectName.charCodeAt(i)\n hash = ((hash << 5) - hash) + char\n hash = hash & hash // Convert to 32bit integer\n }\n return `proj_${Math.abs(hash).toString(36)}`\n}\n\n/**\n * Sanitize error messages to remove any potential PII\n */\nexport function sanitizeErrorMessage(error: Error | string): string {\n const message = typeof error === 'string' ? error : error.message\n\n // Extract error type/category only\n const errorType = message.split(':')[0].trim()\n\n // Remove file paths that might contain usernames\n const sanitized = errorType\n .replace(/\\/Users\\/[^/]+/g, '/Users/***')\n .replace(/\\/home\\/[^/]+/g, '/home/***')\n .replace(/C:\\\\Users\\\\[^\\\\]+/g, 'C:\\\\Users\\\\***')\n .replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/g, '***@***.***')\n\n return sanitized\n}\n\n/**\n * Sanitize route to remove any user-specific data\n */\nexport function sanitizeRoute(route: string): string {\n return route\n // Remove UUIDs\n .replace(/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/gi, ':id')\n // Remove numeric IDs\n .replace(/\\/\\d+/g, '/:id')\n // Remove email patterns\n .replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0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;AACnD,EAAA,OAAO,KAAA,CAEJ,OAAA,CAAQ,gEAAA,EAAkE,KAAK,CAAA,CAE/E,OAAA,CAAQ,QAAA,EAAU,MAAM,CAAA,CAExB,OAAA,CAAQ,iDAAA,EAAmD,QAAQ,CAAA;AACxE","file":"chunk-RKNHW6QU.js","sourcesContent":["/**\n * Telemetry Configuration Utilities\n *\n * Manages telemetry settings and opt-out mechanisms\n */\n\nimport type { TelemetryConfig } from '../types/telemetry'\n\n/**\n * Default telemetry configuration\n */\nexport const DEFAULT_TELEMETRY_CONFIG: TelemetryConfig = {\n enabled: true,\n apiKey: process.env.POSTHOG_API_KEY || 'phc_VuhFUIJLXzwyGjlgQ67dbNeSh5x4cp9F8i15hZFIDhs',\n host: process.env.POSTHOG_HOST || 'https://us.i.posthog.com',\n debug: process.env.NODE_ENV === 'development'\n}\n\n/**\n * Check if telemetry is enabled via environment variables\n */\nexport function isTelemetryEnabled(): boolean {\n // Check for explicit opt-out\n const telemetryEnv = process.env.SONICJS_TELEMETRY\n if (telemetryEnv === 'false' || telemetryEnv === '0' || telemetryEnv === 'disabled') {\n return false\n }\n\n // Check for DO_NOT_TRACK environment variable (common standard)\n const doNotTrack = process.env.DO_NOT_TRACK\n if (doNotTrack === '1' || doNotTrack === 'true') {\n return false\n }\n\n // Default to enabled (opt-out model)\n return true\n}\n\n/**\n * Get telemetry configuration from environment\n */\nexport function getTelemetryConfig(): TelemetryConfig {\n return {\n ...DEFAULT_TELEMETRY_CONFIG,\n enabled: isTelemetryEnabled()\n }\n}\n\n/**\n * Check if telemetry should be skipped for this event\n * Used to implement sampling or rate limiting if needed\n */\nexport function shouldSkipEvent(eventName: string, sampleRate: number = 1.0): boolean {\n if (sampleRate >= 1.0) return false\n if (sampleRate <= 0) return true\n\n // Use a consistent hash of the event name for deterministic sampling\n let hash = 0\n for (let i = 0; i < eventName.length; i++) {\n hash = ((hash << 5) - hash) + eventName.charCodeAt(i)\n hash = hash & hash\n }\n\n return Math.abs(hash % 100) / 100 > sampleRate\n}\n","/**\n * Telemetry ID Utilities\n *\n * Generates and manages anonymous installation IDs\n */\n\nimport { randomUUID } from 'node:crypto'\n\n/**\n * Generate a new anonymous installation ID\n */\nexport function generateInstallationId(): string {\n return randomUUID()\n}\n\n/**\n * Generate a project-specific ID from project name\n * Uses a simple hash to anonymize while maintaining consistency\n */\nexport function generateProjectId(projectName: string): string {\n // Simple hash function to anonymize project names\n let hash = 0\n for (let i = 0; i < projectName.length; i++) {\n const char = projectName.charCodeAt(i)\n hash = ((hash << 5) - hash) + char\n hash = hash & hash // Convert to 32bit integer\n }\n return `proj_${Math.abs(hash).toString(36)}`\n}\n\n/**\n * Sanitize error messages to remove any potential PII\n */\nexport function sanitizeErrorMessage(error: Error | string): string {\n const message = typeof error === 'string' ? error : error.message\n\n // Extract error type/category only\n const errorType = message.split(':')[0].trim()\n\n // Remove file paths that might contain usernames\n const sanitized = errorType\n .replace(/\\/Users\\/[^/]+/g, '/Users/***')\n .replace(/\\/home\\/[^/]+/g, '/home/***')\n .replace(/C:\\\\Users\\\\[^\\\\]+/g, 'C:\\\\Users\\\\***')\n .replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/g, '***@***.***')\n\n return sanitized\n}\n\n/**\n * Sanitize route to remove any user-specific data\n */\nexport function sanitizeRoute(route: string): string {\n return route\n // Remove UUIDs\n .replace(/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/gi, ':id')\n // Remove numeric IDs\n .replace(/\\/\\d+/g, '/:id')\n // Remove email patterns\n .replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/g, ':email')\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkRDJ2QLA2_cjs = require('./chunk-RDJ2QLA2.cjs');
|
|
4
|
-
require('./chunk-IGJUBJBW.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, "MigrationService", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () { return chunkRDJ2QLA2_cjs.MigrationService; }
|
|
11
|
-
});
|
|
12
|
-
//# sourceMappingURL=migrations-P5BD7WQK.cjs.map
|
|
13
|
-
//# sourceMappingURL=migrations-P5BD7WQK.cjs.map
|