@localazy/strapi-plugin 1.1.3 → 1.4.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.
Files changed (49) hide show
  1. package/dist/_chunks/{FetchIdentity-Dl2vx6zB.js → FetchIdentity-BpFOT163.js} +2 -2
  2. package/dist/_chunks/{FetchIdentity-C8-hFqEW.mjs → FetchIdentity-Cor4ooZv.mjs} +2 -2
  3. package/dist/_chunks/{LanguagesSelector-vu-Lj7L6.mjs → LanguagesSelector-BbrMKwQY.mjs} +3 -3
  4. package/dist/_chunks/{LanguagesSelector-DsW3aJ7p.js → LanguagesSelector-CC1ecWnc.js} +3 -3
  5. package/dist/_chunks/{LocalazyApp-BIll8u_G.js → LocalazyApp-D0JGRQeF.js} +87 -10
  6. package/dist/_chunks/{LocalazyApp-Dxygk1mM.mjs → LocalazyApp-DpFR8p10.mjs} +88 -11
  7. package/dist/_chunks/{LocalazyContentTransferSetup-BhEjlIgE.js → LocalazyContentTransferSetup-Cr7D-BUi.js} +5 -5
  8. package/dist/_chunks/{LocalazyContentTransferSetup-Cz88htly.mjs → LocalazyContentTransferSetup-Dael1Q4w.mjs} +5 -5
  9. package/dist/_chunks/{LocalazyGlobalSettings-B3Z8f4G8.js → LocalazyGlobalSettings-D3nG4zl7.js} +6 -6
  10. package/dist/_chunks/{LocalazyGlobalSettings-CgOADY93.mjs → LocalazyGlobalSettings-DzBI5M-K.mjs} +6 -6
  11. package/dist/_chunks/{LocalazyPanel-CQ8-K88T.js → LocalazyPanel-KQPLxTDz.js} +3 -3
  12. package/dist/_chunks/{LocalazyPanel-BjrSVZpI.mjs → LocalazyPanel-W6j8N1WC.mjs} +3 -3
  13. package/dist/_chunks/{LocalazyStatusColumn-CA34yhSE.js → LocalazyStatusColumn-B7Q_U2Lu.js} +2 -2
  14. package/dist/_chunks/{LocalazyStatusColumn-D0b2LCpg.mjs → LocalazyStatusColumn-CrhsCjgp.mjs} +2 -2
  15. package/dist/_chunks/{RequireLocalazyAuth-DpimzlRh.mjs → RequireLocalazyAuth-BwoGRfJq.mjs} +4 -4
  16. package/dist/_chunks/{RequireLocalazyAuth-BPsrUlFm.js → RequireLocalazyAuth-D3GeZPDh.js} +4 -4
  17. package/dist/_chunks/{entry-exclusion-service-nJswJPwF.js → entry-exclusion-service-Bwruvyce.js} +1 -1
  18. package/dist/_chunks/{entry-exclusion-service-DNJZg3U2.mjs → entry-exclusion-service-D7gaRHPE.mjs} +1 -1
  19. package/dist/_chunks/{has-model-changed-BnL6D-eR.js → has-model-changed-5IV9WI_-.js} +2 -2
  20. package/dist/_chunks/{has-model-changed-D6fjlIdc.mjs → has-model-changed-Dp2Vkwjw.mjs} +2 -2
  21. package/dist/_chunks/{i18n-CAsbU4pi.js → i18n-C_5tJvr0.js} +5 -1
  22. package/dist/_chunks/{i18n-QelOdIB2.mjs → i18n-o24yXf-j.mjs} +5 -1
  23. package/dist/_chunks/{index-CHjIMO9T.mjs → index-BjL9XpRh.mjs} +4 -3
  24. package/dist/_chunks/{index-CPBTdynk.mjs → index-C9hN3KbD.mjs} +8 -8
  25. package/dist/_chunks/{index-BK7lmZSN.js → index-CTkxoioB.js} +1 -0
  26. package/dist/_chunks/{index-BXPaiO0d.js → index-jAg6jjCu.js} +8 -8
  27. package/dist/_chunks/strapi-api-base-CAzGcwF6.mjs +23 -0
  28. package/dist/_chunks/strapi-api-base-IG3Pe5Sg.js +22 -0
  29. package/dist/admin/index.js +1 -1
  30. package/dist/admin/index.mjs +1 -1
  31. package/dist/admin/src/modules/@common/api/strapi-api-base.d.ts +19 -4
  32. package/dist/admin/src/modules/@common/utils/sort-by-model-name.d.ts +1 -1
  33. package/dist/admin/src/modules/activity-logs/locale/en.d.ts +4 -0
  34. package/dist/admin/src/modules/activity-logs/services/debug-bundle-service.d.ts +10 -0
  35. package/dist/server/index.js +510 -5
  36. package/dist/server/index.mjs +510 -6
  37. package/dist/server/src/controllers/debug-bundle-controller.d.ts +7 -0
  38. package/dist/server/src/controllers/index.d.ts +5 -0
  39. package/dist/server/src/core/index.d.ts +2 -0
  40. package/dist/server/src/db/model/activity-logs.d.ts +10 -0
  41. package/dist/server/src/index.d.ts +7 -0
  42. package/dist/server/src/routes/debug-bundle-routes.d.ts +9 -0
  43. package/dist/server/src/services/activity-logs-service.d.ts +3 -1
  44. package/dist/server/src/services/index.d.ts +2 -0
  45. package/dist/server/src/utils/build-debug-bundle.d.ts +68 -0
  46. package/dist/server/src/utils/sanitize-debug-bundle.d.ts +25 -0
  47. package/package.json +2 -2
  48. package/dist/_chunks/strapi-api-base-DkjMgMHl.js +0 -2425
  49. package/dist/_chunks/strapi-api-base-GgrMbYak.mjs +0 -2426
@@ -4,6 +4,15 @@ export type ActivityLogEntry = {
4
4
  timestamp: number;
5
5
  data?: any;
6
6
  };
7
+ export type AttemptedEntryStatus = 'success' | 'failed';
8
+ export type AttemptedEntry = {
9
+ uid: string;
10
+ documentId: string;
11
+ locale: string;
12
+ status: AttemptedEntryStatus;
13
+ errorMessage?: string;
14
+ attemptedAt: number;
15
+ };
7
16
  export type ActivityLogSession = {
8
17
  id: string;
9
18
  eventType: 'upload' | 'download' | 'webhook';
@@ -13,6 +22,7 @@ export type ActivityLogSession = {
13
22
  initiatedBy: string;
14
23
  summary: string;
15
24
  entries: ActivityLogEntry[];
25
+ attemptedEntries?: AttemptedEntry[];
16
26
  };
17
27
  export type ActivityLogs = {
18
28
  sessions: ActivityLogSession[];
@@ -85,6 +85,11 @@ declare const _default: {
85
85
  exportSessions(ctx: any): Promise<void>;
86
86
  clearSessions(ctx: any): Promise<void>;
87
87
  };
88
+ DebugBundleController: ({ strapi }: {
89
+ strapi: import("@strapi/types/dist/core").Strapi;
90
+ }) => {
91
+ getBundle(ctx: any): Promise<any>;
92
+ };
88
93
  };
89
94
  routes: {
90
95
  'content-api': {
@@ -232,6 +237,8 @@ declare const _default: {
232
237
  saveActivityLogs(logs: import("./db/model/activity-logs").ActivityLogs): Promise<void>;
233
238
  startSession(eventType: "upload" | "download" | "webhook", initiatedBy: string): Promise<string>;
234
239
  addEntry(sessionId: string, message: string, data?: any): Promise<void>;
240
+ recordAttemptedEntry(sessionId: string, entry: Omit<import("./db/model/activity-logs").AttemptedEntry, "attemptedAt">): Promise<void>;
241
+ recordAttemptedEntries(sessionId: string, entries: Omit<import("./db/model/activity-logs").AttemptedEntry, "attemptedAt">[]): Promise<void>;
235
242
  finishSession(sessionId: string, status: "completed" | "failed", summary: string): Promise<void>;
236
243
  getSessions(eventType?: "upload" | "download" | "webhook"): Promise<import("./db/model/activity-logs").ActivityLogSession[]>;
237
244
  getAllSessionsWithEntries(): Promise<import("./db/model/activity-logs").ActivityLogSession[]>;
@@ -0,0 +1,9 @@
1
+ declare const DebugBundleRoutes: {
2
+ method: string;
3
+ path: string;
4
+ handler: string;
5
+ config: {
6
+ policies: any[];
7
+ };
8
+ }[];
9
+ export default DebugBundleRoutes;
@@ -1,5 +1,5 @@
1
1
  import { Core } from '@strapi/strapi';
2
- import { ActivityLogs, ActivityLogSession } from '../db/model/activity-logs';
2
+ import { ActivityLogs, ActivityLogSession, AttemptedEntry } from '../db/model/activity-logs';
3
3
  declare const ActivityLogsService: ({ strapi }: {
4
4
  strapi: Core.Strapi;
5
5
  }) => {
@@ -7,6 +7,8 @@ declare const ActivityLogsService: ({ strapi }: {
7
7
  saveActivityLogs(logs: ActivityLogs): Promise<void>;
8
8
  startSession(eventType: ActivityLogSession['eventType'], initiatedBy: string): Promise<string>;
9
9
  addEntry(sessionId: string, message: string, data?: any): Promise<void>;
10
+ recordAttemptedEntry(sessionId: string, entry: Omit<AttemptedEntry, 'attemptedAt'>): Promise<void>;
11
+ recordAttemptedEntries(sessionId: string, entries: Array<Omit<AttemptedEntry, 'attemptedAt'>>): Promise<void>;
10
12
  finishSession(sessionId: string, status: 'completed' | 'failed', summary: string): Promise<void>;
11
13
  getSessions(eventType?: ActivityLogSession['eventType']): Promise<ActivityLogSession[]>;
12
14
  getAllSessionsWithEntries(): Promise<ActivityLogSession[]>;
@@ -109,6 +109,8 @@ declare const _default: {
109
109
  saveActivityLogs(logs: import("../db/model/activity-logs").ActivityLogs): Promise<void>;
110
110
  startSession(eventType: "upload" | "download" | "webhook", initiatedBy: string): Promise<string>;
111
111
  addEntry(sessionId: string, message: string, data?: any): Promise<void>;
112
+ recordAttemptedEntry(sessionId: string, entry: Omit<import("../db/model/activity-logs").AttemptedEntry, "attemptedAt">): Promise<void>;
113
+ recordAttemptedEntries(sessionId: string, entries: Omit<import("../db/model/activity-logs").AttemptedEntry, "attemptedAt">[]): Promise<void>;
112
114
  finishSession(sessionId: string, status: "completed" | "failed", summary: string): Promise<void>;
113
115
  getSessions(eventType?: "upload" | "download" | "webhook"): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
114
116
  getAllSessionsWithEntries(): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
@@ -0,0 +1,68 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import type { Core } from '@strapi/strapi';
4
+ import type { AttemptedEntry } from '../db/model/activity-logs';
5
+ export declare class SessionNotFoundError extends Error {
6
+ constructor(sessionId: string);
7
+ }
8
+ export declare const DEBUG_BUNDLE_SCHEMA_VERSION = 1;
9
+ export declare const CAPS: {
10
+ perEntryBytes: number;
11
+ totalEntries: number;
12
+ errorLogBytes: number;
13
+ consoleErrorsLines: number;
14
+ browserPayloadBytes: number;
15
+ };
16
+ export type TruncationMarker = {
17
+ kind: 'entries-skipped';
18
+ tuples: Array<{
19
+ uid: string;
20
+ documentId: string;
21
+ locale: string;
22
+ }>;
23
+ } | {
24
+ kind: 'entry-too-large';
25
+ uid: string;
26
+ documentId: string;
27
+ locale: string;
28
+ originalSizeBytes: number;
29
+ } | {
30
+ kind: 'error-log-truncated';
31
+ originalSizeBytes: number;
32
+ } | {
33
+ kind: 'browser-payload-truncated';
34
+ originalSizeBytes: number;
35
+ } | {
36
+ kind: 'console-errors-truncated';
37
+ originalCount: number;
38
+ } | {
39
+ kind: 'attempted-entries-missing-legacy-session';
40
+ };
41
+ type SelectedAttemptedEntry = {
42
+ uid: string;
43
+ documentId: string;
44
+ locale: string;
45
+ status: AttemptedEntry['status'];
46
+ attemptedAt: number;
47
+ };
48
+ export declare const selectAttemptedEntries: (attempted: AttemptedEntry[]) => SelectedAttemptedEntry[];
49
+ export type BrowserPayload = {
50
+ userAgent?: string;
51
+ language?: string;
52
+ viewport?: {
53
+ width: number;
54
+ height: number;
55
+ };
56
+ consoleErrors?: string[];
57
+ };
58
+ export type BuildDebugBundleParams = {
59
+ strapi: Core.Strapi;
60
+ sessionId: string;
61
+ browserPayloadEncoded?: string | null;
62
+ };
63
+ export type BuildDebugBundleResult = {
64
+ zipBuffer: Buffer;
65
+ filename: string;
66
+ };
67
+ export declare const buildDebugBundle: ({ strapi, sessionId, browserPayloadEncoded, }: BuildDebugBundleParams) => Promise<BuildDebugBundleResult>;
68
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { Identity } from '../db/model/localazy-user';
2
+ export type RedactedIdentity = {
3
+ userId: string;
4
+ name: string;
5
+ scope: string;
6
+ hasAccessToken: boolean;
7
+ };
8
+ export type EnvSnapshotEntry = {
9
+ present: boolean;
10
+ value: string | null;
11
+ };
12
+ export type SerializedContentTypeSchema = {
13
+ kind?: unknown;
14
+ collectionName?: unknown;
15
+ info?: unknown;
16
+ options?: unknown;
17
+ pluginOptions?: unknown;
18
+ attributes?: unknown;
19
+ };
20
+ export declare const DEBUG_BUNDLE_ENV_ALLOWLIST: readonly ["STRAPI_ADMIN_LOCALAZY_ENV", "STRAPI_ADMIN_BACKEND_URL", "NODE_ENV", "STRAPI_TELEMETRY_DISABLED"];
21
+ export declare const redactIdentity: (identity: Identity | null | undefined) => RedactedIdentity | null;
22
+ export declare const scrubUrlSecrets: (input: unknown) => unknown;
23
+ export declare const pickEnvAllowlist: (env: NodeJS.ProcessEnv) => Record<string, EnvSnapshotEntry>;
24
+ export declare const serializeContentTypeSchema: (contentType: unknown) => SerializedContentTypeSchema | null;
25
+ export declare const stripDocumentInternals: <T>(doc: T) => T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localazy/strapi-plugin",
3
- "version": "1.1.3",
3
+ "version": "1.4.0",
4
4
  "description": "The official Strapi Plugin by Localazy.",
5
5
  "keywords": [
6
6
  "strapi",
@@ -76,6 +76,7 @@
76
76
  ]
77
77
  },
78
78
  "dependencies": {
79
+ "jszip": "^3.10.1",
79
80
  "shelljs": "^0.8.5",
80
81
  "ws": "^8.18.0"
81
82
  },
@@ -94,7 +95,6 @@
94
95
  "@types/react-dom": "^19.0.2",
95
96
  "@typescript-eslint/eslint-plugin": "^8.21.0",
96
97
  "@typescript-eslint/parser": "^8.21.0",
97
- "axios": "^1.7.9",
98
98
  "chalk": "^5.4.1",
99
99
  "conventional-changelog": "^5.1.0",
100
100
  "conventional-changelog-cli": "^4.1.0",