@ossy/app 3.26.0 → 3.27.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.
@@ -73,7 +73,8 @@ import {
73
73
  * @typedef {object} IntegrationManifestEntry
74
74
  * @property {string} id Unique integration slug (e.g. `'email'`).
75
75
  * @property {string} entry URL the platform serves the integration bundle from.
76
- * @property {string[]} credentials Env var names required by the integration.
76
+ * @property {string[]} credentials Env var names required by a platform integration.
77
+ * @property {string[]} [secrets] Secret key names for a workspace integration.
77
78
  *
78
79
  * @typedef {object} StartupManifestEntry
79
80
  * @property {string} id Unique startup slug (e.g. `'create-bot-user'`).
@@ -257,15 +258,18 @@ export function manifestPlugin ({ entriesByStub, srcDir, staticOutDir, configVal
257
258
  // produce routable entries; they accumulate into a separate array.
258
259
  if (entryInfo.kind === 'integration') {
259
260
  const integrationId = mod && mod.id
260
- const credentials = mod && mod.credentials
261
+ const credentials = Array.isArray(mod?.credentials) ? mod.credentials : null
262
+ const secrets = Array.isArray(mod?.secrets)
263
+ ? mod.secrets.filter((key) => typeof key === 'string' && key.trim())
264
+ : []
261
265
  if (typeof integrationId !== 'string' || integrationId.trim() === '') {
262
266
  this.error(
263
267
  `[@ossy/app][build] integration entry ${entryInfo.sourcePath} must export a non-empty string "id"`,
264
268
  )
265
269
  }
266
- if (!Array.isArray(credentials)) {
270
+ if (!credentials && secrets.length === 0) {
267
271
  this.error(
268
- `[@ossy/app][build] integration entry ${entryInfo.sourcePath} must export a "credentials" array`,
272
+ `[@ossy/app][build] integration entry ${entryInfo.sourcePath} must export a "credentials" array or a "secrets" array`,
269
273
  )
270
274
  }
271
275
  if (typeof mod.connect !== 'function') {
@@ -277,7 +281,13 @@ export function manifestPlugin ({ entriesByStub, srcDir, staticOutDir, configVal
277
281
  this.error(`[@ossy/app][build] Duplicate integration id "${integrationId}"`)
278
282
  }
279
283
  seenIntegrationIds.add(integrationId)
280
- integrations.push(withSourcePath({ id: integrationId, entry: url, credentials, package: entryPackage(entryInfo, appPackageName) }, entryInfo, projectRoot))
284
+ integrations.push(withSourcePath({
285
+ id: integrationId,
286
+ entry: url,
287
+ credentials: credentials ?? [],
288
+ ...(secrets.length ? { secrets } : {}),
289
+ package: entryPackage(entryInfo, appPackageName),
290
+ }, entryInfo, projectRoot))
281
291
  continue
282
292
  }
283
293
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/app",
3
- "version": "3.26.0",
3
+ "version": "3.27.0",
4
4
  "description": "",
5
5
  "source": "./src/index.js",
6
6
  "main": "./src/index.js",
@@ -50,21 +50,21 @@
50
50
  "@babel/preset-react": "^7.26.3",
51
51
  "@babel/register": "^7.25.9",
52
52
  "@ossy/authentication": "^3.26.0",
53
- "@ossy/design-system": "^3.26.0",
53
+ "@ossy/design-system": "^3.27.0",
54
54
  "@ossy/locale": "^3.4.0",
55
- "@ossy/manifest": "^3.24.0",
56
- "@ossy/package-catalog": "^3.26.0",
55
+ "@ossy/manifest": "^3.27.0",
56
+ "@ossy/package-catalog": "^3.27.0",
57
57
  "@ossy/pages": "^3.26.0",
58
- "@ossy/platform": "^3.26.0",
59
- "@ossy/resources": "^3.26.0",
58
+ "@ossy/platform": "^3.27.0",
59
+ "@ossy/resources": "^3.27.0",
60
60
  "@ossy/router": "^3.25.0",
61
- "@ossy/router-react": "^3.18.0",
62
- "@ossy/schema": "^3.24.0",
61
+ "@ossy/router-react": "^3.27.0",
62
+ "@ossy/schema": "^3.27.0",
63
63
  "@ossy/sdk": "^3.26.0",
64
64
  "@ossy/sdk-react": "^3.26.0",
65
65
  "@ossy/themes": "^3.26.0",
66
- "@ossy/users": "^3.24.1",
67
- "@ossy/workspaces": "^3.26.0",
66
+ "@ossy/users": "^3.27.0",
67
+ "@ossy/workspaces": "^3.27.0",
68
68
  "@rollup/plugin-alias": "^6.0.0",
69
69
  "@rollup/plugin-babel": "^7.1.0",
70
70
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -98,5 +98,5 @@
98
98
  "README.md",
99
99
  "tsconfig.json"
100
100
  ],
101
- "gitHead": "0df308a330150a890b9dd4d6ffc2e9f28bd31966"
101
+ "gitHead": "f72042c42723468c010d0d9744ad69257143d0b9"
102
102
  }
package/src/shell/App.jsx CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React, { useEffect } from 'react'
2
2
  import { SDK } from '@ossy/sdk'
3
3
  import { WorkspaceProvider } from '@ossy/sdk-react'
4
4
  import { Theme, ComponentSlotsProvider, LocaleProvider, DEFAULT_FORM_FIELD_SLOTS } from '@ossy/design-system'
@@ -13,6 +13,13 @@ import { Router } from '@ossy/router-react'
13
13
  import { AppContext } from './AppContext.js'
14
14
  import { UserSetupGuard } from './UserSetupGuard.jsx'
15
15
 
16
+ function MarkHydrated () {
17
+ useEffect(() => {
18
+ document.documentElement.dataset.hydrated = 'true'
19
+ }, [])
20
+ return null
21
+ }
22
+
16
23
  export const App = ({ children, language, messages, fallbackMessages, sdk: sdkOverride, ..._appSettings }) => {
17
24
  const appSettings = { ...defaultAppSettings(), ..._appSettings }
18
25
 
@@ -34,6 +41,7 @@ export const App = ({ children, language, messages, fallbackMessages, sdk: sdkOv
34
41
  supportedLanguages={appSettings.supportedLanguages}
35
42
  >
36
43
  <AppContext.Provider value={contextSettings}>
44
+ <MarkHydrated />
37
45
  <ComponentSlotsProvider slots={{ ...DEFAULT_FORM_FIELD_SLOTS, ...DEFAULT_SCHEMA_VIEW_SLOTS, ...DEFAULT_SCHEMA_FORM_SLOTS, ...(components || {}) }}>
38
46
  <Theme theme={appSettings.theme} themes={appSettings.themes}>
39
47
  <WorkspaceProvider