@appsemble/lang-sdk 0.36.7 → 0.36.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/lang-sdk",
3
- "version": "0.36.7",
3
+ "version": "0.36.8",
4
4
  "description": "Language SDK for Appsemble",
5
5
  "keywords": [
6
6
  "app",
@@ -91,6 +91,19 @@ The most basic resource has a \`schema\` property and defines the minimal securi
91
91
  theme: {
92
92
  $ref: '#/components/schemas/Theme',
93
93
  },
94
+ contentSecurityPolicy: {
95
+ type: 'object',
96
+ description: `Additional CSP source expressions for the published app page.
97
+
98
+ If specified, Appsemble applies a stricter default CSP for broad directives such as \`connect-src\`,
99
+ \`img-src\`, \`media-src\`, \`font-src\`, and \`object-src\`. The configured source expressions
100
+ are then appended per directive.
101
+ `,
102
+ additionalProperties: {
103
+ type: 'array',
104
+ items: { type: 'string' },
105
+ },
106
+ },
94
107
  cron: {
95
108
  type: 'object',
96
109
  minProperties: 1,
package/types/core.d.ts CHANGED
@@ -11,6 +11,7 @@ import { type Security } from './security.js';
11
11
  import { type Theme } from './theme.js';
12
12
  import { type PageLayoutDefinition } from './gridLayout.js';
13
13
  export type SettingName = 'email' | 'languages' | 'name' | 'password' | 'phoneNumber' | 'picture';
14
+ export type AppContentSecurityPolicy = Record<string, string[]>;
14
15
  export interface AppDefinition {
15
16
  /**
16
17
  * The name of the app.
@@ -133,6 +134,14 @@ export interface AppDefinition {
133
134
  * The global theme for the app.
134
135
  */
135
136
  theme?: Partial<Theme>;
137
+ /**
138
+ * Extra content security policy source expressions for the published app page.
139
+ *
140
+ * If specified, the published app page uses a stricter default CSP for broad directives such as
141
+ * `connect-src`, `img-src`, `media-src`, `font-src`, and `object-src`. The configured sources
142
+ * are then appended per directive.
143
+ */
144
+ contentSecurityPolicy?: AppContentSecurityPolicy;
136
145
  /**
137
146
  * Helper property that can be used to store YAML anchors.
138
147
  *