epos-spec 1.5.0 → 1.7.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.
@@ -1,13 +1,12 @@
1
- import { Obj } from 'dropcap/types';
2
-
3
- type Action = true | string;
4
- type Path = string;
5
- type Match = LocusMatch | TopMatch | FrameMatch;
6
- type MatchPattern = UrlMatchPattern | '<all_urls>';
7
- type UrlMatchPattern = string;
8
- type Access = 'installer' | 'engine';
9
- type Manifest = Obj;
10
- type Spec = {
1
+ import { type Obj } from 'dropcap/utils';
2
+ export type Action = true | string;
3
+ export type Path = string;
4
+ export type Match = LocusMatch | TopMatch | FrameMatch;
5
+ export type MatchPattern = UrlMatchPattern | '<all_urls>';
6
+ export type UrlMatchPattern = string;
7
+ export type Access = 'projects' | 'engine';
8
+ export type Manifest = Obj;
9
+ export type Spec = {
11
10
  name: string;
12
11
  icon: string | null;
13
12
  title: string | null;
@@ -21,40 +20,39 @@ type Spec = {
21
20
  permissions: Permissions;
22
21
  manifest: Manifest | null;
23
22
  };
24
- type Popup = {
23
+ export type Popup = {
25
24
  width: number;
26
25
  height: number;
27
26
  };
28
- type Config = {
27
+ export type Config = {
29
28
  access: Access[];
30
29
  preloadAssets: boolean;
31
30
  allowMissingModels: boolean;
32
31
  };
33
- type Target = {
32
+ export type Target = {
34
33
  matches: Match[];
35
34
  resources: Resource[];
36
35
  };
37
- type LocusMatch = {
36
+ export type LocusMatch = {
38
37
  context: 'locus';
39
38
  value: 'popup' | 'sidePanel' | 'background';
40
39
  };
41
- type TopMatch = {
40
+ export type TopMatch = {
42
41
  context: 'top';
43
42
  value: MatchPattern;
44
43
  };
45
- type FrameMatch = {
44
+ export type FrameMatch = {
46
45
  context: 'frame';
47
46
  value: MatchPattern;
48
47
  };
49
- type Resource = {
48
+ export type Resource = {
50
49
  type: 'js' | 'css' | 'lite-js' | 'shadow-css';
51
50
  path: Path;
52
51
  };
53
- type Permissions = {
52
+ export type Permissions = {
54
53
  mandatory: Permission[];
55
54
  optional: Permission[];
56
55
  };
57
- type Permission = 'background' | 'browsingData' | 'contextMenus' | 'cookies' | 'downloads' | 'notifications' | 'storage';
58
- declare function parseSpec(json: string): Spec;
59
-
60
- export { type Access, type Action, type Config, type FrameMatch, type LocusMatch, type Manifest, type Match, type MatchPattern, type Path, type Permission, type Permissions, type Popup, type Resource, type Spec, type Target, type TopMatch, type UrlMatchPattern, parseSpec as default, parseSpec };
56
+ export type Permission = 'background' | 'browsingData' | 'contextMenus' | 'cookies' | 'downloads' | 'notifications' | 'storage';
57
+ export declare function parseSpecJson(json: string): Spec;
58
+ export declare function parseSpecObject(spec: Obj): Spec;
package/dist/epos-spec.js CHANGED
@@ -1,286 +1,373 @@
1
- // src/epos-spec.ts
2
- import { matchPattern } from "browser-extension-url-match";
3
- import { ensureArray, is, safeSync, unique } from "dropcap/utils";
4
- import stripJsonComments from "strip-json-comments";
5
- var schema = {
6
- keys: [
7
- "$schema",
8
- "name",
9
- "version",
10
- "icon",
11
- "title",
12
- "description",
13
- "action",
14
- "popup",
15
- "config",
16
- "assets",
17
- "targets",
18
- "permissions",
19
- "manifest"
20
- ],
21
- name: { min: 2, max: 50, regex: /^[a-z0-9][a-z0-9-]*[a-z0-9]$/ },
22
- title: { min: 2, max: 45 },
23
- description: { max: 132 },
24
- version: { regex: /^(?:\d{1,5}\.){0,3}\d{1,5}$/ },
25
- popup: {
26
- keys: ["width", "height"],
27
- width: { min: 150, max: 800, default: 380 },
28
- height: { min: 150, max: 600 - 8 * 4, default: 600 - 8 * 4 }
29
- },
30
- config: {
31
- keys: ["access", "preloadAssets", "allowMissingModels"],
32
- access: { default: [], variants: ["installer", "engine"] },
33
- preloadAssets: { default: true },
34
- allowMissingModels: { default: false }
35
- },
36
- target: {
37
- keys: ["matches", "load"]
38
- },
39
- permissions: [
40
- "background",
41
- "browsingData",
42
- "contextMenus",
43
- "cookies",
44
- "downloads",
45
- "notifications",
46
- "storage",
47
- "optional:background",
48
- "optional:browsingData",
49
- "optional:contextMenus",
50
- "optional:cookies",
51
- "optional:downloads",
52
- "optional:notifications",
53
- "optional:storage"
54
- ]
1
+ import { matchPattern } from 'browser-extension-url-match';
2
+ import { ensureArray, is, safeSync, unique } from 'dropcap/utils';
3
+ import stripJsonComments from 'strip-json-comments';
4
+ const schema = {
5
+ keys: [
6
+ '$schema',
7
+ 'name',
8
+ 'version',
9
+ 'icon',
10
+ 'title',
11
+ 'description',
12
+ 'action',
13
+ 'popup',
14
+ 'config',
15
+ 'assets',
16
+ 'targets',
17
+ 'permissions',
18
+ 'manifest',
19
+ ],
20
+ name: { min: 2, max: 20, regex: /^[a-z][a-z0-9-]*[a-z0-9]$/ },
21
+ title: { min: 2, max: 45 },
22
+ description: { max: 132 },
23
+ version: { regex: /^(?:\d{1,5}\.){0,3}\d{1,5}$/ },
24
+ popup: {
25
+ keys: ['width', 'height'],
26
+ width: { min: 150, max: 800, default: 380 },
27
+ height: { min: 150, max: 600 - 8 * 4, default: 600 - 8 * 4 },
28
+ },
29
+ config: {
30
+ keys: ['access', 'preloadAssets', 'allowMissingModels'],
31
+ access: { default: [], variants: ['projects', 'engine'] },
32
+ preloadAssets: { default: true },
33
+ allowMissingModels: { default: false },
34
+ },
35
+ target: {
36
+ keys: ['matches', 'load'],
37
+ },
38
+ permissions: [
39
+ 'background',
40
+ 'browsingData',
41
+ 'contextMenus',
42
+ 'cookies',
43
+ 'downloads',
44
+ 'notifications',
45
+ 'storage',
46
+ 'optional:background',
47
+ 'optional:browsingData',
48
+ 'optional:contextMenus',
49
+ 'optional:cookies',
50
+ 'optional:downloads',
51
+ 'optional:notifications',
52
+ 'optional:storage',
53
+ ],
55
54
  };
56
- function parseSpec(json) {
57
- json = stripJsonComments(json);
58
- const [spec, error] = safeSync(() => JSON.parse(json));
59
- if (error) throw new Error(`Failed to parse JSON: ${error.message}`);
60
- if (!is.object(spec)) throw new Error(`Epos spec must be an object`);
61
- const keys = [...schema.keys, ...schema.target.keys];
62
- const badKey = Object.keys(spec).find((key) => !keys.includes(key));
63
- if (badKey) throw new Error(`Unknown spec key: '${badKey}'`);
64
- return {
65
- name: parseName(spec),
66
- icon: parseIcon(spec),
67
- title: parseTitle(spec),
68
- version: parseVersion(spec),
69
- description: parseDescription(spec),
70
- popup: parsePopup(spec),
71
- action: parseAction(spec),
72
- config: parseConfig(spec),
73
- assets: parseAssets(spec),
74
- targets: parseTargets(spec),
75
- permissions: parsePermissions(spec),
76
- manifest: parseManifest(spec)
77
- };
55
+ export function parseSpecJson(json) {
56
+ if (!is.string(json))
57
+ throw new Error(`Failed to parse JSON: input is not a string`);
58
+ json = stripJsonComments(json);
59
+ const [spec, error] = safeSync(() => JSON.parse(json));
60
+ if (error)
61
+ throw new Error(`Failed to parse JSON: ${error.message}`);
62
+ return parseSpecObject(spec);
63
+ }
64
+ export function parseSpecObject(spec) {
65
+ if (!is.object(spec))
66
+ throw new Error(`Epos spec must be an object`);
67
+ const keys = [...schema.keys, ...schema.target.keys];
68
+ const badKey = Object.keys(spec).find(key => !keys.includes(key));
69
+ if (badKey)
70
+ throw new Error(`Unknown spec key: "${badKey}"`);
71
+ return {
72
+ name: parseName(spec),
73
+ icon: parseIcon(spec),
74
+ title: parseTitle(spec),
75
+ version: parseVersion(spec),
76
+ description: parseDescription(spec),
77
+ popup: parsePopup(spec),
78
+ action: parseAction(spec),
79
+ config: parseConfig(spec),
80
+ assets: parseAssets(spec),
81
+ targets: parseTargets(spec),
82
+ permissions: parsePermissions(spec),
83
+ manifest: parseManifest(spec),
84
+ };
78
85
  }
79
86
  function parseName(spec) {
80
- if (!("name" in spec)) throw new Error(`'name' field is required`);
81
- const name = spec.name;
82
- const { min, max, regex } = schema.name;
83
- if (!is.string(name)) throw new Error(`'name' must be a string`);
84
- if (name.length < min) throw new Error(`'name' must be at least ${min} characters`);
85
- if (name.length > max) throw new Error(`'name' must be at most ${max} characters`);
86
- if (!regex.test(name)) throw new Error(`'name' must match ${regex}`);
87
- return name;
87
+ if (!('name' in spec))
88
+ throw new Error(`'name' field is required`);
89
+ const name = spec.name;
90
+ if (!is.string(name))
91
+ throw new Error(`'name' must be a string`);
92
+ const { min, max, regex } = schema.name;
93
+ if (name.length < min)
94
+ throw new Error(`'name' must be at least ${min} characters`);
95
+ if (name.length > max)
96
+ throw new Error(`'name' must be at most ${max} characters`);
97
+ if (name.toLowerCase() !== name)
98
+ throw new Error(`'name' must be lowercase`);
99
+ if (!/[a-z]/.test(name[0]))
100
+ throw new Error(`'name' must start with a letter`);
101
+ if (!regex.test(name))
102
+ throw new Error(`'name' must match regex: ${regex}`);
103
+ return name;
88
104
  }
89
105
  function parseIcon(spec) {
90
- if (!("icon" in spec)) return null;
91
- const icon = spec.icon;
92
- if (!is.string(icon)) throw new Error(`'icon' must be a string`);
93
- return parsePath(icon);
106
+ if (!('icon' in spec))
107
+ return null;
108
+ const icon = spec.icon;
109
+ if (!is.string(icon))
110
+ throw new Error(`'icon' must be a string`);
111
+ return parsePath(icon);
94
112
  }
95
113
  function parseTitle(spec) {
96
- if (!("title" in spec)) return null;
97
- const title = spec.title;
98
- if (!is.string(title)) throw new Error(`'title' must be a string`);
99
- const { min, max } = schema.title;
100
- if (title.length < min) throw new Error(`'title' must be at least ${min} characters`);
101
- if (title.length > max) throw new Error(`'title' must be at most ${max} characters`);
102
- return title;
114
+ if (!('title' in spec))
115
+ return null;
116
+ const title = spec.title;
117
+ if (!is.string(title))
118
+ throw new Error(`'title' must be a string`);
119
+ const { min, max } = schema.title;
120
+ if (title.length < min)
121
+ throw new Error(`'title' must be at least ${min} characters`);
122
+ if (title.length > max)
123
+ throw new Error(`'title' must be at most ${max} characters`);
124
+ return title;
103
125
  }
104
126
  function parseVersion(spec) {
105
- if (!("version" in spec)) return "0.0.0";
106
- const version = spec.version;
107
- if (!is.string(version)) throw new Error(`'version' must be a string`);
108
- if (!schema.version.regex.test(version)) throw new Error(`'version' must be in format X.Y.Z or X.Y or X`);
109
- return version;
127
+ if (!('version' in spec))
128
+ return '0.0.0';
129
+ const version = spec.version;
130
+ if (!is.string(version))
131
+ throw new Error(`'version' must be a string`);
132
+ if (!schema.version.regex.test(version))
133
+ throw new Error(`'version' must be in format V.V.V, or V.V, or V`);
134
+ return version;
110
135
  }
111
136
  function parseDescription(spec) {
112
- if (!("description" in spec)) return null;
113
- const description = spec.description;
114
- if (!is.string(description)) throw new Error(`'description' must be a string`);
115
- const { max } = schema.description;
116
- if (description.length > max) throw new Error(`'description' must be at most ${max} characters`);
117
- return description;
137
+ if (!('description' in spec))
138
+ return null;
139
+ const description = spec.description;
140
+ if (!is.string(description))
141
+ throw new Error(`'description' must be a string`);
142
+ const { max } = schema.description;
143
+ if (description.length > max)
144
+ throw new Error(`'description' must be at most ${max} characters`);
145
+ return description;
118
146
  }
119
147
  function parsePopup(spec) {
120
- const popup = structuredClone(spec.popup ?? {});
121
- if (!is.object(popup)) throw new Error(`'popup' must be an object`);
122
- const { keys, width, height } = schema.popup;
123
- const badKey = Object.keys(popup).find((key) => !keys.includes(key));
124
- if (badKey) throw new Error(`Unknown 'popup' key: '${badKey}'`);
125
- popup.width ??= width.default;
126
- if (!is.integer(popup.width)) throw new Error(`'popup.width' must be an integer`);
127
- if (popup.width < width.min) throw new Error(`'popup.width' must be \u2265 ${width.min}`);
128
- if (popup.width > width.max) throw new Error(`'popup.width' must be \u2264 ${width.max}`);
129
- popup.height ??= height.default;
130
- if (!is.integer(popup.height)) throw new Error(`'popup.height' must be an integer`);
131
- if (popup.height < height.min) throw new Error(`'popup.height' must be \u2265 ${height.min}`);
132
- if (popup.height > height.max) throw new Error(`'popup.height' must be \u2264 ${height.max}`);
133
- return popup;
148
+ const popup = structuredClone(spec.popup ?? {});
149
+ if (!is.object(popup))
150
+ throw new Error(`'popup' must be an object`);
151
+ const { keys, width, height } = schema.popup;
152
+ const badKey = Object.keys(popup).find(key => !keys.includes(key));
153
+ if (badKey)
154
+ throw new Error(`Unknown 'popup' key: "${badKey}"`);
155
+ popup.width ??= width.default;
156
+ if (!is.integer(popup.width))
157
+ throw new Error(`'popup.width' must be an integer`);
158
+ if (popup.width < width.min)
159
+ throw new Error(`'popup.width' must be ${width.min}`);
160
+ if (popup.width > width.max)
161
+ throw new Error(`'popup.width' must be ≤ ${width.max}`);
162
+ popup.height ??= height.default;
163
+ if (!is.integer(popup.height))
164
+ throw new Error(`'popup.height' must be an integer`);
165
+ if (popup.height < height.min)
166
+ throw new Error(`'popup.height' must be ≥ ${height.min}`);
167
+ if (popup.height > height.max)
168
+ throw new Error(`'popup.height' must be ≤ ${height.max}`);
169
+ return popup;
134
170
  }
135
171
  function parseAction(spec) {
136
- const action = spec.action ?? null;
137
- if (action === null) return null;
138
- if (action === true) return true;
139
- if (!is.string(action)) throw new Error(`'action' must be a URL or true`);
140
- if (!isValidUrl(action)) throw new Error(`Invalid 'action' URL: '${JSON.stringify(action)}'`);
141
- return action;
172
+ const action = spec.action ?? null;
173
+ if (action === null)
174
+ return null;
175
+ if (action === true)
176
+ return true;
177
+ if (!is.string(action))
178
+ throw new Error(`'action' must be a URL or true`);
179
+ if (!isValidUrl(action))
180
+ throw new Error(`Invalid 'action' URL: "${JSON.stringify(action)}"`);
181
+ return action;
142
182
  }
143
183
  function parseConfig(spec) {
144
- const config = spec.config ?? {};
145
- if (!is.object(config)) throw new Error(`'config' must be an object`);
146
- const badKey = Object.keys(config).find((key) => !schema.config.keys.includes(key));
147
- if (badKey) throw new Error(`Unknown 'config' key: '${badKey}'`);
148
- const access = config.access ?? schema.config.access.default;
149
- if (!isArrayOfStrings(access)) throw new Error(`'config.access' must be an array of strings`);
150
- const badAccess = access.find((value) => !schema.config.access.variants.includes(value));
151
- if (badAccess) throw new Error(`Unknown 'config.access' value: '${badAccess}'`);
152
- const preloadAssets = config.preloadAssets ?? schema.config.preloadAssets.default;
153
- if (!is.boolean(preloadAssets)) throw new Error(`'config.preloadAssets' must be a boolean`);
154
- const allowMissingModels = config.allowMissingModels ?? schema.config.allowMissingModels.default;
155
- if (!is.boolean(allowMissingModels)) throw new Error(`'config.allowMissingModels' must be a boolean`);
156
- return {
157
- access,
158
- preloadAssets,
159
- allowMissingModels
160
- };
184
+ const config = spec.config ?? {};
185
+ if (!is.object(config))
186
+ throw new Error(`'config' must be an object`);
187
+ const badKey = Object.keys(config).find(key => !schema.config.keys.includes(key));
188
+ if (badKey)
189
+ throw new Error(`Unknown 'config' key: "${badKey}"`);
190
+ const access = config.access ?? schema.config.access.default;
191
+ if (!isArrayOfStrings(access))
192
+ throw new Error(`'config.access' must be an array of strings`);
193
+ const badAccess = access.find(value => !schema.config.access.variants.includes(value));
194
+ if (badAccess)
195
+ throw new Error(`Unknown 'config.access' value: "${badAccess}"`);
196
+ const preloadAssets = config.preloadAssets ?? schema.config.preloadAssets.default;
197
+ if (!is.boolean(preloadAssets))
198
+ throw new Error(`'config.preloadAssets' must be a boolean`);
199
+ const allowMissingModels = config.allowMissingModels ?? schema.config.allowMissingModels.default;
200
+ if (!is.boolean(allowMissingModels))
201
+ throw new Error(`'config.allowMissingModels' must be a boolean`);
202
+ return {
203
+ access: access,
204
+ preloadAssets,
205
+ allowMissingModels,
206
+ };
161
207
  }
162
208
  function parseAssets(spec) {
163
- const assets = structuredClone(spec.assets ?? []);
164
- if (!isArrayOfStrings(assets)) throw new Error(`'assets' must be an array of strings`);
165
- const icon = parseIcon(spec);
166
- if (icon) assets.push(icon);
167
- return unique(assets.map((path) => parsePath(path)));
209
+ const assets = structuredClone(spec.assets ?? []);
210
+ if (!isArrayOfStrings(assets))
211
+ throw new Error(`'assets' must be an array of strings`);
212
+ // Add icon to assets
213
+ const icon = parseIcon(spec);
214
+ if (icon)
215
+ assets.push(icon);
216
+ return unique(assets.map(path => parsePath(path)));
168
217
  }
169
218
  function parseTargets(spec) {
170
- const targets = structuredClone(spec.targets ?? []);
171
- if (!is.array(targets)) throw new Error(`'targets' must be an array`);
172
- if ("matches" in spec || "load" in spec || "mode" in spec) {
173
- targets.unshift({
174
- matches: structuredClone(spec.matches ?? []),
175
- load: structuredClone(spec.load ?? [])
176
- });
177
- }
178
- return targets.map((target) => parseTarget(target));
219
+ const targets = structuredClone(spec.targets ?? []);
220
+ if (!is.array(targets))
221
+ throw new Error(`'targets' must be an array`);
222
+ // Move top-level target to 'targets'
223
+ if ('matches' in spec || 'load' in spec || 'mode' in spec) {
224
+ targets.unshift({
225
+ matches: structuredClone(spec.matches ?? []),
226
+ load: structuredClone(spec.load ?? []),
227
+ });
228
+ }
229
+ return targets.map(target => parseTarget(target));
179
230
  }
180
231
  function parseTarget(target) {
181
- if (!is.object(target)) throw new Error(`Each target must be an object`);
182
- const { keys } = schema.target;
183
- const badKey = Object.keys(target).find((key) => !keys.includes(key));
184
- if (badKey) throw new Error(`Unknown target key: '${badKey}'`);
185
- return {
186
- matches: parseMatches(target),
187
- resources: parseResources(target)
188
- };
232
+ if (!is.object(target))
233
+ throw new Error(`Each target must be an object`);
234
+ const { keys } = schema.target;
235
+ const badKey = Object.keys(target).find(key => !keys.includes(key));
236
+ if (badKey)
237
+ throw new Error(`Unknown target key: "${badKey}"`);
238
+ return {
239
+ matches: parseMatches(target),
240
+ resources: parseResources(target),
241
+ };
189
242
  }
190
243
  function parseMatches(target) {
191
- const matches = ensureArray(target.matches ?? []);
192
- return matches.map((match) => parseMatch(match)).flat();
244
+ const matches = ensureArray(target.matches ?? []);
245
+ return matches.map(match => parseMatch(match)).flat();
193
246
  }
194
247
  function parseMatch(match) {
195
- if (!is.string(match)) throw new Error(`Invalid match pattern: '${JSON.stringify(match)}'`);
196
- if (match === "<popup>") return { context: "locus", value: "popup" };
197
- if (match === "<sidePanel>") return { context: "locus", value: "sidePanel" };
198
- if (match === "<background>") return { context: "locus", value: "background" };
199
- const context = match.startsWith("frame:") ? "frame" : "top";
200
- let pattern = context === "frame" ? match.replace("frame:", "") : match;
201
- if (pattern === "<allUrls>") return { context, value: "<all_urls>" };
202
- if (pattern === "<all_urls>") throw new Error(`Use '<allUrls>' instead of '<all_urls>'`);
203
- if (pattern.startsWith("exact:")) {
204
- return { context, value: parseMatchPattern(pattern.replace("exact:", "")) };
205
- }
206
- const href = pattern.replaceAll("*", "wildcard--");
207
- if (!URL.canParse(href)) throw new Error(`Invalid match pattern: '${match}'`);
208
- const url = new URL(href);
209
- if (url.pathname === "") url.pathname = "/";
210
- pattern = url.href.replaceAll("wildcard--", "*");
211
- return [
212
- { context, value: parseMatchPattern(pattern) },
213
- { context, value: parseMatchPattern(`${pattern}?*`) }
214
- ];
248
+ if (!is.string(match))
249
+ throw new Error(`Invalid match pattern: "${JSON.stringify(match)}"`);
250
+ if (match === '<popup>')
251
+ return { context: 'locus', value: 'popup' };
252
+ if (match === '<sidePanel>')
253
+ return { context: 'locus', value: 'sidePanel' };
254
+ if (match === '<background>')
255
+ return { context: 'locus', value: 'background' };
256
+ const context = match.startsWith('frame:') ? 'frame' : 'top';
257
+ let pattern = context === 'frame' ? match.replace('frame:', '') : match;
258
+ if (pattern === '<allUrls>')
259
+ return { context, value: '<all_urls>' };
260
+ if (pattern === '<all_urls>')
261
+ throw new Error(`Use '<allUrls>' instead of '<all_urls>'`);
262
+ if (pattern.startsWith('exact:')) {
263
+ return { context, value: parseMatchPattern(pattern.replace('exact:', '')) };
264
+ }
265
+ // Ensure pattern url has a path: `*://example.com` -> `*://example.com/`
266
+ const href = pattern.replaceAll('*', 'wildcard--');
267
+ if (!URL.canParse(href))
268
+ throw new Error(`Invalid match pattern: "${match}"`);
269
+ const url = new URL(href);
270
+ if (url.pathname === '')
271
+ url.pathname = '/';
272
+ pattern = url.href.replaceAll('wildcard--', '*');
273
+ return [
274
+ { context, value: parseMatchPattern(pattern) },
275
+ { context, value: parseMatchPattern(`${pattern}?*`) },
276
+ ];
215
277
  }
216
278
  function parseMatchPattern(pattern) {
217
- const matcher = matchPattern(pattern);
218
- if (!matcher.valid) throw new Error(`Invalid match pattern: '${pattern}'`);
219
- return pattern;
279
+ const matcher = matchPattern(pattern);
280
+ if (!matcher.valid)
281
+ throw new Error(`Invalid match pattern: "${pattern}"`);
282
+ return pattern;
220
283
  }
221
284
  function parseResources(target) {
222
- const load = ensureArray(target.load ?? []);
223
- if (!isArrayOfStrings(load)) throw new Error(`'load' must be an array of strings`);
224
- return load.map((loadEntry) => parseResource(loadEntry));
285
+ const load = ensureArray(target.load ?? []);
286
+ if (!isArrayOfStrings(load))
287
+ throw new Error(`'load' must be an array of strings`);
288
+ return load.map(loadEntry => parseResource(loadEntry));
225
289
  }
226
290
  function parseResource(loadEntry) {
227
- const isJs = loadEntry.toLowerCase().endsWith(".js");
228
- const isCss = loadEntry.toLowerCase().endsWith(".css");
229
- if (!isJs && !isCss) throw new Error(`Invalid 'load' file, must be JS or CSS: '${loadEntry}'`);
230
- if (loadEntry.startsWith("lite:")) {
231
- if (!isJs) throw new Error(`'lite:' resources must be JS files: '${loadEntry}'`);
232
- return { path: loadEntry.replace("lite:", ""), type: "lite-js" };
233
- } else if (loadEntry.startsWith("shadow:")) {
234
- if (!isCss) throw new Error(`'shadow:' resources must be CSS files: '${loadEntry}'`);
235
- return { path: loadEntry.replace("shadow:", ""), type: "shadow-css" };
236
- } else {
237
- return { path: loadEntry, type: isJs ? "js" : "css" };
238
- }
291
+ const isJs = loadEntry.toLowerCase().endsWith('.js');
292
+ const isCss = loadEntry.toLowerCase().endsWith('.css');
293
+ if (!isJs && !isCss)
294
+ throw new Error(`Invalid 'load' file, must be JS or CSS: "${loadEntry}"`);
295
+ if (loadEntry.startsWith('lite:')) {
296
+ if (!isJs)
297
+ throw new Error(`'lite:' resources must be JS files: "${loadEntry}"`);
298
+ return { path: parsePath(loadEntry.replace('lite:', '')), type: 'lite-js' };
299
+ }
300
+ else if (loadEntry.startsWith('shadow:')) {
301
+ if (!isCss)
302
+ throw new Error(`'shadow:' resources must be CSS files: "${loadEntry}"`);
303
+ return { path: parsePath(loadEntry.replace('shadow:', '')), type: 'shadow-css' };
304
+ }
305
+ else {
306
+ return { path: parsePath(loadEntry), type: isJs ? 'js' : 'css' };
307
+ }
239
308
  }
240
309
  function parsePermissions(spec) {
241
- const permissions = spec.permissions ?? [];
242
- if (!isArrayOfStrings(permissions)) throw new Error(`'permissions' must be an array of strings`);
243
- const badPermission = permissions.find((value) => !schema.permissions.includes(value));
244
- if (badPermission) throw new Error(`Unknown permission: '${badPermission}'`);
245
- const mandatoryPermissions = /* @__PURE__ */ new Set();
246
- const optionalPermissions = /* @__PURE__ */ new Set();
247
- for (const permission of permissions) {
248
- if (permission.startsWith("optional:")) {
249
- optionalPermissions.add(permission.replace("optional:", ""));
250
- } else {
251
- mandatoryPermissions.add(permission);
310
+ const permissions = spec.permissions ?? [];
311
+ if (!isArrayOfStrings(permissions))
312
+ throw new Error(`'permissions' must be an array of strings`);
313
+ const badPermission = permissions.find(value => !schema.permissions.includes(value));
314
+ if (badPermission)
315
+ throw new Error(`Unknown permission: "${badPermission}"`);
316
+ const mandatoryPermissions = new Set();
317
+ const optionalPermissions = new Set();
318
+ for (const permission of permissions) {
319
+ if (permission.startsWith('optional:')) {
320
+ optionalPermissions.add(permission.replace('optional:', ''));
321
+ }
322
+ else {
323
+ mandatoryPermissions.add(permission);
324
+ }
252
325
  }
253
- }
254
- for (const permission of mandatoryPermissions) {
255
- if (optionalPermissions.has(permission)) {
256
- throw new Error(`Permission cannot be both mandatory and optional: '${permission}'`);
326
+ for (const permission of mandatoryPermissions) {
327
+ if (optionalPermissions.has(permission)) {
328
+ throw new Error(`Permission cannot be both mandatory and optional: "${permission}"`);
329
+ }
257
330
  }
258
- }
259
- return {
260
- mandatory: [...mandatoryPermissions],
261
- optional: [...optionalPermissions]
262
- };
331
+ return {
332
+ mandatory: [...mandatoryPermissions],
333
+ optional: [...optionalPermissions],
334
+ };
263
335
  }
264
336
  function parseManifest(spec) {
265
- if (!("manifest" in spec)) return null;
266
- if (!is.object(spec.manifest)) throw new Error(`'manifest' must be an object`);
267
- return spec.manifest;
337
+ if (!('manifest' in spec))
338
+ return null;
339
+ if (!is.object(spec.manifest))
340
+ throw new Error(`'manifest' must be an object`);
341
+ return spec.manifest;
268
342
  }
343
+ // ---------------------------------------------------------------------------
344
+ // HELPERS
345
+ // ---------------------------------------------------------------------------
269
346
  function isArrayOfStrings(value) {
270
- return is.array(value) && value.every(is.string);
347
+ return is.array(value) && value.every(is.string);
271
348
  }
272
349
  function isValidUrl(value) {
273
- if (!is.string(value)) return false;
274
- return URL.canParse(value);
350
+ if (!is.string(value))
351
+ return false;
352
+ return URL.canParse(value);
275
353
  }
354
+ /**
355
+ * - 'path/to' -> 'path/to'
356
+ * - 'path/to/' -> 'path/to'
357
+ * - '/path/to' -> 'path/to'
358
+ * - 'path//to' -> 'path/to'
359
+ * - 'path/./to' -> 'path/to'
360
+ * - './path/to' -> 'path/to'
361
+ * - 'path/../to' -> 'path/../to'
362
+ * - '../path/to' -> throw
363
+ */
276
364
  function parsePath(path) {
277
- const normalizedPath = path.split("/").filter((path2) => path2 && path2 !== ".").join("/");
278
- if (normalizedPath.startsWith("..")) throw new Error(`External paths are not allowed: '${path}'`);
279
- return normalizedPath;
365
+ const normalizedPath = path
366
+ .split('/')
367
+ .filter(path => path && path !== '.')
368
+ .join('/');
369
+ if (normalizedPath.startsWith('..'))
370
+ throw new Error(`External paths are not allowed: "${path}"`);
371
+ return normalizedPath;
280
372
  }
281
- var epos_spec_default = parseSpec;
282
- export {
283
- epos_spec_default as default,
284
- parseSpec
285
- };
286
373
  //# sourceMappingURL=epos-spec.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/epos-spec.ts"],"sourcesContent":["import { matchPattern } from 'browser-extension-url-match'\nimport type { Obj } from 'dropcap/types'\nimport { ensureArray, is, safeSync, unique } from 'dropcap/utils'\nimport stripJsonComments from 'strip-json-comments'\n\nexport type Action = true | string\nexport type Path = string\nexport type Match = LocusMatch | TopMatch | FrameMatch\nexport type MatchPattern = UrlMatchPattern | '<all_urls>'\nexport type UrlMatchPattern = string // '*://*.example.com/*'\nexport type Access = 'installer' | 'engine'\nexport type Manifest = Obj\n\nexport type Spec = {\n name: string\n icon: string | null\n title: string | null\n version: string\n description: string | null\n popup: Popup\n action: Action | null\n config: Config\n assets: Path[]\n targets: Target[]\n permissions: Permissions\n manifest: Manifest | null\n}\n\nexport type Popup = {\n width: number\n height: number\n}\n\nexport type Config = {\n access: Access[]\n preloadAssets: boolean\n allowMissingModels: boolean\n}\n\nexport type Target = {\n matches: Match[]\n resources: Resource[]\n}\n\nexport type LocusMatch = {\n context: 'locus'\n value: 'popup' | 'sidePanel' | 'background'\n}\n\nexport type TopMatch = {\n context: 'top'\n value: MatchPattern\n}\n\nexport type FrameMatch = {\n context: 'frame'\n value: MatchPattern\n}\n\nexport type Resource = {\n type: 'js' | 'css' | 'lite-js' | 'shadow-css'\n path: Path\n}\n\nexport type Permissions = {\n mandatory: Permission[]\n optional: Permission[]\n}\n\nexport type Permission =\n | 'background'\n | 'browsingData'\n | 'contextMenus'\n | 'cookies'\n | 'downloads'\n | 'notifications'\n | 'storage'\n\nconst schema = {\n keys: [\n '$schema',\n 'name',\n 'version',\n 'icon',\n 'title',\n 'description',\n 'action',\n 'popup',\n 'config',\n 'assets',\n 'targets',\n 'permissions',\n 'manifest',\n ],\n name: { min: 2, max: 50, regex: /^[a-z0-9][a-z0-9-]*[a-z0-9]$/ },\n title: { min: 2, max: 45 },\n description: { max: 132 },\n version: { regex: /^(?:\\d{1,5}\\.){0,3}\\d{1,5}$/ },\n popup: {\n keys: ['width', 'height'],\n width: { min: 150, max: 800, default: 380 },\n height: { min: 150, max: 600 - 8 * 4, default: 600 - 8 * 4 },\n },\n config: {\n keys: ['access', 'preloadAssets', 'allowMissingModels'],\n access: { default: [], variants: ['installer', 'engine'] },\n preloadAssets: { default: true },\n allowMissingModels: { default: false },\n },\n target: {\n keys: ['matches', 'load'],\n },\n permissions: [\n 'background',\n 'browsingData',\n 'contextMenus',\n 'cookies',\n 'downloads',\n 'notifications',\n 'storage',\n 'optional:background',\n 'optional:browsingData',\n 'optional:contextMenus',\n 'optional:cookies',\n 'optional:downloads',\n 'optional:notifications',\n 'optional:storage',\n ],\n}\n\nexport function parseSpec(json: string): Spec {\n json = stripJsonComments(json)\n const [spec, error] = safeSync(() => JSON.parse(json))\n if (error) throw new Error(`Failed to parse JSON: ${error.message}`)\n if (!is.object(spec)) throw new Error(`Epos spec must be an object`)\n\n const keys = [...schema.keys, ...schema.target.keys]\n const badKey = Object.keys(spec).find(key => !keys.includes(key))\n if (badKey) throw new Error(`Unknown spec key: '${badKey}'`)\n\n return {\n name: parseName(spec),\n icon: parseIcon(spec),\n title: parseTitle(spec),\n version: parseVersion(spec),\n description: parseDescription(spec),\n popup: parsePopup(spec),\n action: parseAction(spec),\n config: parseConfig(spec),\n assets: parseAssets(spec),\n targets: parseTargets(spec),\n permissions: parsePermissions(spec),\n manifest: parseManifest(spec),\n }\n}\n\nfunction parseName(spec: Obj) {\n if (!('name' in spec)) throw new Error(`'name' field is required`)\n\n const name = spec.name\n const { min, max, regex } = schema.name\n if (!is.string(name)) throw new Error(`'name' must be a string`)\n if (name.length < min) throw new Error(`'name' must be at least ${min} characters`)\n if (name.length > max) throw new Error(`'name' must be at most ${max} characters`)\n if (!regex.test(name)) throw new Error(`'name' must match ${regex}`)\n\n return name\n}\n\nfunction parseIcon(spec: Obj) {\n if (!('icon' in spec)) return null\n\n const icon = spec.icon\n if (!is.string(icon)) throw new Error(`'icon' must be a string`)\n\n return parsePath(icon)\n}\n\nfunction parseTitle(spec: Obj): string | null {\n if (!('title' in spec)) return null\n\n const title = spec.title\n if (!is.string(title)) throw new Error(`'title' must be a string`)\n\n const { min, max } = schema.title\n if (title.length < min) throw new Error(`'title' must be at least ${min} characters`)\n if (title.length > max) throw new Error(`'title' must be at most ${max} characters`)\n\n return title\n}\n\nfunction parseVersion(spec: Obj): string {\n if (!('version' in spec)) return '0.0.0'\n\n const version = spec.version\n if (!is.string(version)) throw new Error(`'version' must be a string`)\n if (!schema.version.regex.test(version)) throw new Error(`'version' must be in format X.Y.Z or X.Y or X`)\n\n return version\n}\n\nfunction parseDescription(spec: Obj): string | null {\n if (!('description' in spec)) return null\n\n const description = spec.description\n if (!is.string(description)) throw new Error(`'description' must be a string`)\n\n const { max } = schema.description\n if (description.length > max) throw new Error(`'description' must be at most ${max} characters`)\n\n return description\n}\n\nfunction parsePopup(spec: Obj) {\n const popup = structuredClone(spec.popup ?? {})\n if (!is.object(popup)) throw new Error(`'popup' must be an object`)\n\n const { keys, width, height } = schema.popup\n const badKey = Object.keys(popup).find(key => !keys.includes(key))\n if (badKey) throw new Error(`Unknown 'popup' key: '${badKey}'`)\n\n popup.width ??= width.default\n if (!is.integer(popup.width)) throw new Error(`'popup.width' must be an integer`)\n if (popup.width < width.min) throw new Error(`'popup.width' must be ≥ ${width.min}`)\n if (popup.width > width.max) throw new Error(`'popup.width' must be ≤ ${width.max}`)\n\n popup.height ??= height.default\n if (!is.integer(popup.height)) throw new Error(`'popup.height' must be an integer`)\n if (popup.height < height.min) throw new Error(`'popup.height' must be ≥ ${height.min}`)\n if (popup.height > height.max) throw new Error(`'popup.height' must be ≤ ${height.max}`)\n\n return popup as Popup\n}\n\nfunction parseAction(spec: Obj): Action | null {\n const action = spec.action ?? null\n if (action === null) return null\n if (action === true) return true\n\n if (!is.string(action)) throw new Error(`'action' must be a URL or true`)\n if (!isValidUrl(action)) throw new Error(`Invalid 'action' URL: '${JSON.stringify(action)}'`)\n\n return action\n}\n\nfunction parseConfig(spec: Obj): Config {\n const config = spec.config ?? {}\n if (!is.object(config)) throw new Error(`'config' must be an object`)\n\n const badKey = Object.keys(config).find(key => !schema.config.keys.includes(key))\n if (badKey) throw new Error(`Unknown 'config' key: '${badKey}'`)\n\n const access = config.access ?? schema.config.access.default\n if (!isArrayOfStrings(access)) throw new Error(`'config.access' must be an array of strings`)\n const badAccess = access.find(value => !schema.config.access.variants.includes(value))\n if (badAccess) throw new Error(`Unknown 'config.access' value: '${badAccess}'`)\n\n const preloadAssets = config.preloadAssets ?? schema.config.preloadAssets.default\n if (!is.boolean(preloadAssets)) throw new Error(`'config.preloadAssets' must be a boolean`)\n\n const allowMissingModels = config.allowMissingModels ?? schema.config.allowMissingModels.default\n if (!is.boolean(allowMissingModels)) throw new Error(`'config.allowMissingModels' must be a boolean`)\n\n return {\n access: access as Access[],\n preloadAssets,\n allowMissingModels,\n }\n}\n\nfunction parseAssets(spec: Obj) {\n const assets = structuredClone(spec.assets ?? [])\n if (!isArrayOfStrings(assets)) throw new Error(`'assets' must be an array of strings`)\n\n // Add icon to assets\n const icon = parseIcon(spec)\n if (icon) assets.push(icon)\n\n return unique(assets.map(path => parsePath(path)))\n}\n\nfunction parseTargets(spec: Obj) {\n const targets = structuredClone(spec.targets ?? [])\n if (!is.array(targets)) throw new Error(`'targets' must be an array`)\n\n // Move top-level target to 'targets'\n if ('matches' in spec || 'load' in spec || 'mode' in spec) {\n targets.unshift({\n matches: structuredClone(spec.matches ?? []),\n load: structuredClone(spec.load ?? []),\n })\n }\n\n return targets.map(target => parseTarget(target))\n}\n\nfunction parseTarget(target: unknown): Target {\n if (!is.object(target)) throw new Error(`Each target must be an object`)\n\n const { keys } = schema.target\n const badKey = Object.keys(target).find(key => !keys.includes(key))\n if (badKey) throw new Error(`Unknown target key: '${badKey}'`)\n\n return {\n matches: parseMatches(target),\n resources: parseResources(target),\n }\n}\n\nfunction parseMatches(target: Obj): Match[] {\n const matches = ensureArray(target.matches ?? [])\n return matches.map(match => parseMatch(match)).flat()\n}\n\nfunction parseMatch(match: unknown): Match | Match[] {\n if (!is.string(match)) throw new Error(`Invalid match pattern: '${JSON.stringify(match)}'`)\n\n if (match === '<popup>') return { context: 'locus', value: 'popup' }\n if (match === '<sidePanel>') return { context: 'locus', value: 'sidePanel' }\n if (match === '<background>') return { context: 'locus', value: 'background' }\n\n const context = match.startsWith('frame:') ? 'frame' : 'top'\n let pattern = context === 'frame' ? match.replace('frame:', '') : match\n\n if (pattern === '<allUrls>') return { context, value: '<all_urls>' }\n if (pattern === '<all_urls>') throw new Error(`Use '<allUrls>' instead of '<all_urls>'`)\n\n if (pattern.startsWith('exact:')) {\n return { context, value: parseMatchPattern(pattern.replace('exact:', '')) }\n }\n\n // Ensure pattern url has a path: `*://example.com` -> `*://example.com/`\n const href = pattern.replaceAll('*', 'wildcard--')\n if (!URL.canParse(href)) throw new Error(`Invalid match pattern: '${match}'`)\n const url = new URL(href)\n if (url.pathname === '') url.pathname = '/'\n pattern = url.href.replaceAll('wildcard--', '*')\n\n return [\n { context, value: parseMatchPattern(pattern) },\n { context, value: parseMatchPattern(`${pattern}?*`) },\n ]\n}\n\nfunction parseMatchPattern(pattern: string): MatchPattern {\n const matcher = matchPattern(pattern)\n if (!matcher.valid) throw new Error(`Invalid match pattern: '${pattern}'`)\n return pattern\n}\n\nfunction parseResources(target: Obj) {\n const load = ensureArray(target.load ?? [])\n if (!isArrayOfStrings(load)) throw new Error(`'load' must be an array of strings`)\n return load.map(loadEntry => parseResource(loadEntry))\n}\n\nfunction parseResource(loadEntry: string): Resource {\n const isJs = loadEntry.toLowerCase().endsWith('.js')\n const isCss = loadEntry.toLowerCase().endsWith('.css')\n if (!isJs && !isCss) throw new Error(`Invalid 'load' file, must be JS or CSS: '${loadEntry}'`)\n\n if (loadEntry.startsWith('lite:')) {\n if (!isJs) throw new Error(`'lite:' resources must be JS files: '${loadEntry}'`)\n return { path: loadEntry.replace('lite:', ''), type: 'lite-js' }\n } else if (loadEntry.startsWith('shadow:')) {\n if (!isCss) throw new Error(`'shadow:' resources must be CSS files: '${loadEntry}'`)\n return { path: loadEntry.replace('shadow:', ''), type: 'shadow-css' }\n } else {\n return { path: loadEntry, type: isJs ? 'js' : 'css' }\n }\n}\n\nfunction parsePermissions(spec: Obj): Permissions {\n const permissions = spec.permissions ?? []\n if (!isArrayOfStrings(permissions)) throw new Error(`'permissions' must be an array of strings`)\n\n const badPermission = permissions.find(value => !schema.permissions.includes(value))\n if (badPermission) throw new Error(`Unknown permission: '${badPermission}'`)\n\n const mandatoryPermissions = new Set<string>()\n const optionalPermissions = new Set<string>()\n for (const permission of permissions) {\n if (permission.startsWith('optional:')) {\n optionalPermissions.add(permission.replace('optional:', ''))\n } else {\n mandatoryPermissions.add(permission)\n }\n }\n\n for (const permission of mandatoryPermissions) {\n if (optionalPermissions.has(permission)) {\n throw new Error(`Permission cannot be both mandatory and optional: '${permission}'`)\n }\n }\n\n return {\n mandatory: [...mandatoryPermissions] as Permission[],\n optional: [...optionalPermissions] as Permission[],\n }\n}\n\nfunction parseManifest(spec: Obj): Manifest | null {\n if (!('manifest' in spec)) return null\n if (!is.object(spec.manifest)) throw new Error(`'manifest' must be an object`)\n return spec.manifest\n}\n\n// ---------------------------------------------------------------------------\n// HELPERS\n// ---------------------------------------------------------------------------\n\nfunction isArrayOfStrings(value: unknown) {\n return is.array(value) && value.every(is.string)\n}\n\nfunction isValidUrl(value: unknown) {\n if (!is.string(value)) return false\n return URL.canParse(value)\n}\n\n/**\n * - 'path/to' -> 'path/to'\n * - 'path/to/' -> 'path/to'\n * - '/path/to' -> 'path/to'\n * - 'path//to' -> 'path/to'\n * - 'path/./to' -> 'path/to'\n * - './path/to' -> 'path/to'\n * - 'path/../to' -> 'path/../to'\n * - '../path/to' -> throw\n */\nfunction parsePath(path: string) {\n const normalizedPath = path\n .split('/')\n .filter(path => path && path !== '.')\n .join('/')\n\n if (normalizedPath.startsWith('..')) throw new Error(`External paths are not allowed: '${path}'`)\n\n return normalizedPath\n}\n\nexport default parseSpec\n"],"mappings":";AAAA,SAAS,oBAAoB;AAE7B,SAAS,aAAa,IAAI,UAAU,cAAc;AAClD,OAAO,uBAAuB;AA2E9B,IAAM,SAAS;AAAA,EACb,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,MAAM,EAAE,KAAK,GAAG,KAAK,IAAI,OAAO,+BAA+B;AAAA,EAC/D,OAAO,EAA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CACjD;AAED,SAAS,UAAU,CAAC,KAAc,EAAE;IAClC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IACnC,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAAA,CAC3B;AAED;;;;;;;;;GASG;AACH,SAAS,SAAS,CAAC,IAAY,EAAE;IAC/B,MAAM,cAAc,GAAG,IAAI;SACxB,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC;SACpC,IAAI,CAAC,GAAG,CAAC,CAAA;IAEZ,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,GAAG,CAAC,CAAA;IAEjG,OAAO,cAAc,CAAA;AAAA,CACtB"}
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "epos-spec",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "imkost",
7
7
  "description": "",
8
8
  "keywords": [],
9
9
  "scripts": {
10
- "dev": "tsup --config ../../tsup.config.ts --watch",
11
- "build": "tsup --config ../../tsup.config.ts",
12
- "lint": "tsc --noEmit",
10
+ "dev": "rimraf dist && tsgo --watch",
11
+ "build": "rimraf dist && tsgo",
12
+ "lint": "tsgo --noEmit",
13
13
  "release": "sh -c 'npm version ${1:-minor} && npm run build && npm publish' --"
14
14
  },
15
15
  "exports": {
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "browser-extension-url-match": "^1.2.0",
23
- "dropcap": "^1.4.0",
23
+ "dropcap": "^1.9.0",
24
24
  "strip-json-comments": "^5.0.3"
25
25
  }
26
26
  }