@localazy/strapi-plugin 1.3.0 → 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.
- package/dist/_chunks/{FetchIdentity-CtBRO-Cn.js → FetchIdentity-BpFOT163.js} +2 -2
- package/dist/_chunks/{FetchIdentity-BJGoZPpM.mjs → FetchIdentity-Cor4ooZv.mjs} +2 -2
- package/dist/_chunks/{LanguagesSelector-DJxgCwgM.mjs → LanguagesSelector-BbrMKwQY.mjs} +3 -3
- package/dist/_chunks/{LanguagesSelector-CNaKrS-m.js → LanguagesSelector-CC1ecWnc.js} +3 -3
- package/dist/_chunks/{LocalazyApp-B1qCCEPe.js → LocalazyApp-D0JGRQeF.js} +85 -8
- package/dist/_chunks/{LocalazyApp-CJRpsTKr.mjs → LocalazyApp-DpFR8p10.mjs} +86 -9
- package/dist/_chunks/{LocalazyContentTransferSetup-CCxiLHdG.js → LocalazyContentTransferSetup-Cr7D-BUi.js} +5 -5
- package/dist/_chunks/{LocalazyContentTransferSetup-CLAWn95U.mjs → LocalazyContentTransferSetup-Dael1Q4w.mjs} +5 -5
- package/dist/_chunks/{LocalazyGlobalSettings-BJ5qfFfK.js → LocalazyGlobalSettings-D3nG4zl7.js} +6 -6
- package/dist/_chunks/{LocalazyGlobalSettings-Z-4Ykc_J.mjs → LocalazyGlobalSettings-DzBI5M-K.mjs} +6 -6
- package/dist/_chunks/{LocalazyPanel-DE3TtHOQ.js → LocalazyPanel-KQPLxTDz.js} +3 -3
- package/dist/_chunks/{LocalazyPanel-CL_mzzfD.mjs → LocalazyPanel-W6j8N1WC.mjs} +3 -3
- package/dist/_chunks/{LocalazyStatusColumn-BMLcklG-.js → LocalazyStatusColumn-B7Q_U2Lu.js} +2 -2
- package/dist/_chunks/{LocalazyStatusColumn-R5n6q_cx.mjs → LocalazyStatusColumn-CrhsCjgp.mjs} +2 -2
- package/dist/_chunks/{RequireLocalazyAuth-Dzsu6UNS.mjs → RequireLocalazyAuth-BwoGRfJq.mjs} +4 -4
- package/dist/_chunks/{RequireLocalazyAuth-WKKFdQlR.js → RequireLocalazyAuth-D3GeZPDh.js} +4 -4
- package/dist/_chunks/{entry-exclusion-service-CggmAKxq.js → entry-exclusion-service-Bwruvyce.js} +1 -1
- package/dist/_chunks/{entry-exclusion-service-DxqTlZFR.mjs → entry-exclusion-service-D7gaRHPE.mjs} +1 -1
- package/dist/_chunks/{has-model-changed-BR53L6pA.js → has-model-changed-5IV9WI_-.js} +2 -2
- package/dist/_chunks/{has-model-changed-FMGVcFHU.mjs → has-model-changed-Dp2Vkwjw.mjs} +2 -2
- package/dist/_chunks/{i18n-CAsbU4pi.js → i18n-C_5tJvr0.js} +5 -1
- package/dist/_chunks/{i18n-QelOdIB2.mjs → i18n-o24yXf-j.mjs} +5 -1
- package/dist/_chunks/{index-CHjIMO9T.mjs → index-BjL9XpRh.mjs} +4 -3
- package/dist/_chunks/{index-toauQlIK.mjs → index-C9hN3KbD.mjs} +8 -8
- package/dist/_chunks/{index-BK7lmZSN.js → index-CTkxoioB.js} +1 -0
- package/dist/_chunks/{index-BmxGKspv.js → index-jAg6jjCu.js} +8 -8
- package/dist/_chunks/{strapi-api-base-BflplVsH.mjs → strapi-api-base-CAzGcwF6.mjs} +1 -1
- package/dist/_chunks/{strapi-api-base-CT9lknwW.js → strapi-api-base-IG3Pe5Sg.js} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/modules/activity-logs/locale/en.d.ts +4 -0
- package/dist/admin/src/modules/activity-logs/services/debug-bundle-service.d.ts +10 -0
- package/dist/server/index.js +510 -4
- package/dist/server/index.mjs +510 -5
- package/dist/server/src/controllers/debug-bundle-controller.d.ts +7 -0
- package/dist/server/src/controllers/index.d.ts +5 -0
- package/dist/server/src/core/index.d.ts +2 -0
- package/dist/server/src/db/model/activity-logs.d.ts +10 -0
- package/dist/server/src/index.d.ts +7 -0
- package/dist/server/src/routes/debug-bundle-routes.d.ts +9 -0
- package/dist/server/src/services/activity-logs-service.d.ts +3 -1
- package/dist/server/src/services/index.d.ts +2 -0
- package/dist/server/src/utils/build-debug-bundle.d.ts +68 -0
- package/dist/server/src/utils/sanitize-debug-bundle.d.ts +25 -0
- package/package.json +2 -1
|
@@ -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[]>;
|
|
@@ -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.
|
|
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
|
},
|