@monimesl/dot-runtime 0.1.0-alpha.2 → 0.1.0-alpha.4
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/dot.schema.json +21 -0
- package/globals.d.ts +5 -3
- package/package.json +5 -5
package/dot.schema.json
CHANGED
|
@@ -98,6 +98,27 @@
|
|
|
98
98
|
},
|
|
99
99
|
"additionalProperties": false
|
|
100
100
|
},
|
|
101
|
+
"network": {
|
|
102
|
+
"description": "Where the dot may send requests with dash.network. Without it, it may send none.",
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"hosts": {
|
|
106
|
+
"description": "The hosts the dot sends requests to: host names, such as \"api.example.com\", or \"*.example.com\" for any of a domain's subdomains, but not the domain itself.",
|
|
107
|
+
"type": "array",
|
|
108
|
+
"items": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"pattern": "^(?:\\*\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+|[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*)$",
|
|
111
|
+
"maxLength": 253,
|
|
112
|
+
"patternErrorMessage": "Use a lowercase host name, such as \"api.example.com\", or \"*.example.com\" for its subdomains, without a scheme, port or path."
|
|
113
|
+
},
|
|
114
|
+
"minItems": 1,
|
|
115
|
+
"uniqueItems": true,
|
|
116
|
+
"examples": [["api.example.com"]]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"required": ["hosts"],
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
},
|
|
101
122
|
"dash": {
|
|
102
123
|
"description": "What the dot needs from Dash, the app it runs in.",
|
|
103
124
|
"type": "object",
|
package/globals.d.ts
CHANGED
|
@@ -6,15 +6,17 @@ declare global {
|
|
|
6
6
|
const defineDot: typeof dot.defineDot;
|
|
7
7
|
const createEvent: typeof dot.createEvent;
|
|
8
8
|
const dash: typeof dot.dash;
|
|
9
|
-
// The dot's public configuration: the
|
|
10
|
-
// time. Anyone with the dot can read them, so they never hold secrets.
|
|
9
|
+
// The dot's public configuration: the variables in its .env files, fixed at build time. Anyone with the dot can read them, so they never hold secrets.
|
|
11
10
|
const env: [keyof DotPublicEnv] extends [never]
|
|
12
11
|
? Readonly<Record<string, string | undefined>>
|
|
13
12
|
: DotPublicEnv;
|
|
14
13
|
// Filled in by the generated .dot/env.d.ts; until the first build, any name is allowed.
|
|
15
14
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
16
15
|
interface DotPublicEnv {}
|
|
17
|
-
type DotEvent<Detail = unknown
|
|
16
|
+
type DotEvent<Detail = unknown, Data = Readonly<Record<string, unknown>>> = dot.DotEvent<
|
|
17
|
+
Detail,
|
|
18
|
+
Data
|
|
19
|
+
>;
|
|
18
20
|
type PageId = dot.PageId;
|
|
19
21
|
type PageState = dot.PageState;
|
|
20
22
|
type PageLaunchOptions = dot.PageLaunchOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monimesl/dot-runtime",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.4",
|
|
4
4
|
"description": "A composer of the service and webview runtimes and the default React renderer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"main": "./dist/index.js",
|
|
55
55
|
"types": "./dist/index.d.ts",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@monimesl/dot-
|
|
58
|
-
"@monimesl/dot-
|
|
59
|
-
"@monimesl/dot-service": "0.1.0-alpha.
|
|
60
|
-
"@monimesl/dot-
|
|
57
|
+
"@monimesl/dot-dash": "0.1.0-alpha.4",
|
|
58
|
+
"@monimesl/dot-renderer-react": "0.1.0-alpha.4",
|
|
59
|
+
"@monimesl/dot-service": "0.1.0-alpha.4",
|
|
60
|
+
"@monimesl/dot-webview": "0.1.0-alpha.4"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"publint": "^0.3.24",
|