@getmateo/protocol 0.19.4 → 0.19.6
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/browser-automation/capabilities.d.ts +1 -1
- package/dist/browser-automation/rpc-schemas.d.ts +1 -1
- package/dist/generated/validation/ws-outbound-schema-metadata.d.ts +235 -290
- package/dist/generated/validation/ws-outbound-schema-metadata.js +0 -1
- package/dist/generated/validation/ws-outbound.aot.d.ts +0 -2
- package/dist/generated/validation/ws-outbound.aot.js +3915 -4368
- package/dist/messages.d.ts +6 -261
- package/dist/messages.js +1 -5
- package/dist/plugin-browser.d.ts +1 -48
- package/dist/plugin-browser.js +34 -12
- package/dist/validation/ws-outbound-envelope.d.ts +2 -54
- package/package.json +1 -1
- package/dist/plugin-browser-consent-copy.d.ts +0 -211
- package/dist/plugin-browser-consent-copy.js +0 -118
- package/dist/plugin-browser-grants.d.ts +0 -48
- package/dist/plugin-browser-grants.js +0 -56
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
// Shared by the first-party settings sheet and the native confirmation. The
|
|
2
|
-
// renderer may choose a language, but never supplies native dialog strings.
|
|
3
|
-
export const pluginBrowserConsentCopy = {
|
|
4
|
-
en: {
|
|
5
|
-
title: "Browser permissions",
|
|
6
|
-
reason: "Reason given by the plugin",
|
|
7
|
-
workspace: "Workspace",
|
|
8
|
-
choose: "Choose a workspace",
|
|
9
|
-
read: "Read and navigate",
|
|
10
|
-
upload: "Upload workspace images",
|
|
11
|
-
lifetime: "Access ends when the plugin reloads or Mateo restarts. Upload also requires read access.",
|
|
12
|
-
allow: "Allow",
|
|
13
|
-
revoke: "Revoke",
|
|
14
|
-
cancel: "Cancel",
|
|
15
|
-
},
|
|
16
|
-
ar: {
|
|
17
|
-
title: "أذونات المتصفح",
|
|
18
|
-
reason: "السبب الذي قدمته الإضافة",
|
|
19
|
-
workspace: "مساحة العمل",
|
|
20
|
-
choose: "اختر مساحة عمل",
|
|
21
|
-
read: "القراءة والتنقل",
|
|
22
|
-
upload: "رفع صور مساحة العمل",
|
|
23
|
-
lifetime: "ينتهي الوصول عند إعادة تحميل الإضافة أو إعادة تشغيل Mateo. يتطلب الرفع إذن القراءة أيضًا.",
|
|
24
|
-
allow: "السماح",
|
|
25
|
-
revoke: "إلغاء الإذن",
|
|
26
|
-
cancel: "إلغاء",
|
|
27
|
-
},
|
|
28
|
-
es: {
|
|
29
|
-
title: "Permisos del navegador",
|
|
30
|
-
reason: "Motivo indicado por el plugin",
|
|
31
|
-
workspace: "Espacio de trabajo",
|
|
32
|
-
choose: "Elige un espacio de trabajo",
|
|
33
|
-
read: "Leer y navegar",
|
|
34
|
-
upload: "Subir imágenes del espacio de trabajo",
|
|
35
|
-
lifetime: "El acceso termina al recargar el plugin o reiniciar Mateo. Para subir imágenes también se necesita permiso de lectura.",
|
|
36
|
-
allow: "Permitir",
|
|
37
|
-
revoke: "Revocar",
|
|
38
|
-
cancel: "Cancelar",
|
|
39
|
-
},
|
|
40
|
-
fr: {
|
|
41
|
-
title: "Autorisations du navigateur",
|
|
42
|
-
reason: "Motif indiqué par le plugin",
|
|
43
|
-
workspace: "Espace de travail",
|
|
44
|
-
choose: "Choisir un espace de travail",
|
|
45
|
-
read: "Lire et naviguer",
|
|
46
|
-
upload: "Envoyer des images de l’espace de travail",
|
|
47
|
-
lifetime: "L’accès prend fin au rechargement du plugin ou au redémarrage de Mateo. L’envoi d’images nécessite aussi l’accès en lecture.",
|
|
48
|
-
allow: "Autoriser",
|
|
49
|
-
revoke: "Révoquer",
|
|
50
|
-
cancel: "Annuler",
|
|
51
|
-
},
|
|
52
|
-
ja: {
|
|
53
|
-
title: "ブラウザの権限",
|
|
54
|
-
reason: "プラグインが提示した理由",
|
|
55
|
-
workspace: "ワークスペース",
|
|
56
|
-
choose: "ワークスペースを選択",
|
|
57
|
-
read: "読み取りと移動",
|
|
58
|
-
upload: "ワークスペースの画像をアップロード",
|
|
59
|
-
lifetime: "プラグインの再読み込みまたは Mateo の再起動で権限は失効します。アップロードには読み取り権限も必要です。",
|
|
60
|
-
allow: "許可",
|
|
61
|
-
revoke: "取り消す",
|
|
62
|
-
cancel: "キャンセル",
|
|
63
|
-
},
|
|
64
|
-
ko: {
|
|
65
|
-
title: "브라우저 권한",
|
|
66
|
-
reason: "플러그인이 제시한 이유",
|
|
67
|
-
workspace: "작업 공간",
|
|
68
|
-
choose: "작업 공간 선택",
|
|
69
|
-
read: "읽기 및 탐색",
|
|
70
|
-
upload: "작업 공간 이미지 업로드",
|
|
71
|
-
lifetime: "플러그인을 다시 로드하거나 Mateo를 다시 시작하면 권한이 만료됩니다. 업로드하려면 읽기 권한도 필요합니다.",
|
|
72
|
-
allow: "허용",
|
|
73
|
-
revoke: "권한 취소",
|
|
74
|
-
cancel: "취소",
|
|
75
|
-
},
|
|
76
|
-
"pt-BR": {
|
|
77
|
-
title: "Permissões do navegador",
|
|
78
|
-
reason: "Motivo informado pelo plugin",
|
|
79
|
-
workspace: "Espaço de trabalho",
|
|
80
|
-
choose: "Escolha um espaço de trabalho",
|
|
81
|
-
read: "Ler e navegar",
|
|
82
|
-
upload: "Enviar imagens do espaço de trabalho",
|
|
83
|
-
lifetime: "O acesso termina ao recarregar o plugin ou reiniciar o Mateo. O envio também exige permissão de leitura.",
|
|
84
|
-
allow: "Permitir",
|
|
85
|
-
revoke: "Revogar",
|
|
86
|
-
cancel: "Cancelar",
|
|
87
|
-
},
|
|
88
|
-
ru: {
|
|
89
|
-
title: "Разрешения браузера",
|
|
90
|
-
reason: "Причина, указанная плагином",
|
|
91
|
-
workspace: "Рабочая область",
|
|
92
|
-
choose: "Выберите рабочую область",
|
|
93
|
-
read: "Чтение и навигация",
|
|
94
|
-
upload: "Загрузка изображений из рабочей области",
|
|
95
|
-
lifetime: "Доступ прекращается при перезагрузке плагина или перезапуске Mateo. Для загрузки также требуется разрешение на чтение.",
|
|
96
|
-
allow: "Разрешить",
|
|
97
|
-
revoke: "Отозвать",
|
|
98
|
-
cancel: "Отмена",
|
|
99
|
-
},
|
|
100
|
-
"zh-CN": {
|
|
101
|
-
title: "浏览器权限",
|
|
102
|
-
reason: "插件提供的理由",
|
|
103
|
-
workspace: "工作区",
|
|
104
|
-
choose: "选择工作区",
|
|
105
|
-
read: "读取和导航",
|
|
106
|
-
upload: "上传工作区图片",
|
|
107
|
-
lifetime: "重新加载插件或重启 Mateo 后,授权会失效。上传图片还需要读取权限。",
|
|
108
|
-
allow: "允许",
|
|
109
|
-
revoke: "撤销",
|
|
110
|
-
cancel: "取消",
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
export function browserConsentCopy(language) {
|
|
114
|
-
return Object.hasOwn(pluginBrowserConsentCopy, language)
|
|
115
|
-
? pluginBrowserConsentCopy[language]
|
|
116
|
-
: pluginBrowserConsentCopy.en;
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=plugin-browser-consent-copy.js.map
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare function isPluginBrowserDomain(domain: string): boolean;
|
|
3
|
-
export declare const PluginBrowserIdentitySchema: z.ZodObject<{
|
|
4
|
-
pluginId: z.ZodString;
|
|
5
|
-
installationId: z.ZodUUID;
|
|
6
|
-
domains: z.ZodArray<z.ZodString>;
|
|
7
|
-
}, z.core.$strip>;
|
|
8
|
-
export type PluginBrowserIdentity = z.infer<typeof PluginBrowserIdentitySchema>;
|
|
9
|
-
export declare const PluginBrowserGrantScopeSchema: z.ZodObject<{
|
|
10
|
-
pluginId: z.ZodString;
|
|
11
|
-
installationId: z.ZodUUID;
|
|
12
|
-
workspaceId: z.ZodString;
|
|
13
|
-
domain: z.ZodString;
|
|
14
|
-
capability: z.ZodEnum<{
|
|
15
|
-
read: "read";
|
|
16
|
-
upload: "upload";
|
|
17
|
-
}>;
|
|
18
|
-
}, z.core.$strip>;
|
|
19
|
-
export type PluginBrowserGrantScope = z.infer<typeof PluginBrowserGrantScopeSchema>;
|
|
20
|
-
export declare const PluginBrowserGrantSchema: z.ZodObject<{
|
|
21
|
-
pluginId: z.ZodString;
|
|
22
|
-
installationId: z.ZodUUID;
|
|
23
|
-
workspaceId: z.ZodString;
|
|
24
|
-
domain: z.ZodString;
|
|
25
|
-
capability: z.ZodEnum<{
|
|
26
|
-
read: "read";
|
|
27
|
-
upload: "upload";
|
|
28
|
-
}>;
|
|
29
|
-
epoch: z.ZodUUID;
|
|
30
|
-
}, z.core.$strip>;
|
|
31
|
-
export type PluginBrowserGrant = z.infer<typeof PluginBrowserGrantSchema>;
|
|
32
|
-
export declare const MAX_PLUGIN_BROWSER_GRANTS = 256;
|
|
33
|
-
export declare const PluginBrowserGrantSnapshotSchema: z.ZodObject<{
|
|
34
|
-
revision: z.ZodNumber;
|
|
35
|
-
grants: z.ZodArray<z.ZodObject<{
|
|
36
|
-
pluginId: z.ZodString;
|
|
37
|
-
installationId: z.ZodUUID;
|
|
38
|
-
workspaceId: z.ZodString;
|
|
39
|
-
domain: z.ZodString;
|
|
40
|
-
capability: z.ZodEnum<{
|
|
41
|
-
read: "read";
|
|
42
|
-
upload: "upload";
|
|
43
|
-
}>;
|
|
44
|
-
epoch: z.ZodUUID;
|
|
45
|
-
}, z.core.$strip>>;
|
|
46
|
-
}, z.core.$strip>;
|
|
47
|
-
export type PluginBrowserGrantSnapshot = z.infer<typeof PluginBrowserGrantSnapshotSchema>;
|
|
48
|
-
//# sourceMappingURL=plugin-browser-grants.d.ts.map
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { PluginIdSchema } from "./plugin-config.js";
|
|
3
|
-
const nonPublicSuffixes = [
|
|
4
|
-
"localhost",
|
|
5
|
-
"local",
|
|
6
|
-
"internal",
|
|
7
|
-
"intranet",
|
|
8
|
-
"lan",
|
|
9
|
-
"corp",
|
|
10
|
-
"home",
|
|
11
|
-
"localdomain",
|
|
12
|
-
"arpa",
|
|
13
|
-
"onion",
|
|
14
|
-
"invalid",
|
|
15
|
-
"alt",
|
|
16
|
-
"localtest.me",
|
|
17
|
-
"lvh.me",
|
|
18
|
-
"localhost.direct",
|
|
19
|
-
"localhost.run",
|
|
20
|
-
"vcap.me",
|
|
21
|
-
"lacolhost.com",
|
|
22
|
-
"nip.io",
|
|
23
|
-
"sslip.io",
|
|
24
|
-
"xip.io",
|
|
25
|
-
"traefik.me",
|
|
26
|
-
];
|
|
27
|
-
// Declarations are DNS names, not URLs. Never normalize userinfo, explicit default
|
|
28
|
-
// ports, IPv4 aliases, Unicode or wildcard patterns into something approvable.
|
|
29
|
-
export function isPluginBrowserDomain(domain) {
|
|
30
|
-
if (domain.length > 253 || /[^a-z0-9.-]/.test(domain))
|
|
31
|
-
return false;
|
|
32
|
-
const labels = domain.split(".");
|
|
33
|
-
return (labels.length > 1 &&
|
|
34
|
-
/^[a-z]{2,63}$/.test(labels.at(-1)) &&
|
|
35
|
-
labels.every((label) => /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/.test(label)) &&
|
|
36
|
-
!nonPublicSuffixes.some((suffix) => domain === suffix || domain.endsWith(`.${suffix}`)));
|
|
37
|
-
}
|
|
38
|
-
export const PluginBrowserIdentitySchema = z.object({
|
|
39
|
-
pluginId: PluginIdSchema,
|
|
40
|
-
installationId: z.uuid(),
|
|
41
|
-
domains: z.array(z.string().min(1).max(253)).max(32),
|
|
42
|
-
});
|
|
43
|
-
export const PluginBrowserGrantScopeSchema = z.object({
|
|
44
|
-
pluginId: PluginIdSchema.max(128),
|
|
45
|
-
installationId: z.uuid(),
|
|
46
|
-
workspaceId: z.string().min(1).max(512),
|
|
47
|
-
domain: z.string().min(1).max(253),
|
|
48
|
-
capability: z.enum(["read", "upload"]),
|
|
49
|
-
});
|
|
50
|
-
export const PluginBrowserGrantSchema = PluginBrowserGrantScopeSchema.extend({ epoch: z.uuid() });
|
|
51
|
-
export const MAX_PLUGIN_BROWSER_GRANTS = 256;
|
|
52
|
-
export const PluginBrowserGrantSnapshotSchema = z.object({
|
|
53
|
-
revision: z.number().int().nonnegative(),
|
|
54
|
-
grants: z.array(PluginBrowserGrantSchema).max(MAX_PLUGIN_BROWSER_GRANTS),
|
|
55
|
-
});
|
|
56
|
-
//# sourceMappingURL=plugin-browser-grants.js.map
|