@bodhiapp/app-bindings 0.0.30 → 0.0.31

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.
Files changed (3) hide show
  1. package/index.d.ts +6 -0
  2. package/index.js +4 -1
  3. package/package.json +11 -6
package/index.d.ts CHANGED
@@ -17,6 +17,8 @@ export interface NapiAppOptions {
17
17
  clientSecret?: string
18
18
  /** App status as string (optional) */
19
19
  appStatus?: string
20
+ /** User ID of the tenant creator (optional) */
21
+ createdBy?: string
20
22
  }
21
23
  /** Create a new NapiAppOptions with empty configuration */
22
24
  export declare function createNapiAppOptions(): NapiAppOptions
@@ -28,6 +30,8 @@ export declare function setAppSetting(config: NapiAppOptions, key: string, value
28
30
  export declare function setSystemSetting(config: NapiAppOptions, key: string, value: string): NapiAppOptions
29
31
  /** Set OAuth client credentials */
30
32
  export declare function setClientCredentials(config: NapiAppOptions, clientId: string, clientSecret: string): NapiAppOptions
33
+ /** Set the user ID of the tenant creator */
34
+ export declare function setCreatedBy(config: NapiAppOptions, userId: string): NapiAppOptions
31
35
  /** Set app status */
32
36
  export declare function setAppStatus(config: NapiAppOptions, status: string): NapiAppOptions
33
37
  export const BODHI_HOME: string
@@ -53,6 +57,8 @@ export const BODHI_PUBLIC_PORT: string
53
57
  export const BODHI_SESSION_DB_URL: string
54
58
  export const BODHI_APP_DB_URL: string
55
59
  export const BODHI_DEPLOYMENT: string
60
+ export const BODHI_MULTITENANT_CLIENT_ID: string
61
+ export const BODHI_MULTITENANT_CLIENT_SECRET: string
56
62
  export const HF_HOME: string
57
63
  export const DEFAULT_HOST: string
58
64
  export const DEFAULT_PORT: number
package/index.js CHANGED
@@ -310,13 +310,14 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- const { createNapiAppOptions, setEnvVar, setAppSetting, setSystemSetting, setClientCredentials, setAppStatus, BODHI_HOME, BODHI_HOST, BODHI_PORT, BODHI_SCHEME, BODHI_LOG_LEVEL, BODHI_LOG_STDOUT, BODHI_LOGS, BODHI_ENV_TYPE, BODHI_APP_TYPE, BODHI_VERSION, BODHI_COMMIT_SHA, BODHI_AUTH_URL, BODHI_AUTH_REALM, BODHI_ENCRYPTION_KEY, BODHI_EXEC_LOOKUP_PATH, BODHI_EXEC_VARIANT, BODHI_KEEP_ALIVE_SECS, BODHI_PUBLIC_SCHEME, BODHI_PUBLIC_HOST, BODHI_PUBLIC_PORT, BODHI_SESSION_DB_URL, BODHI_APP_DB_URL, BODHI_DEPLOYMENT, HF_HOME, DEFAULT_HOST, DEFAULT_PORT, BodhiServer } = nativeBinding
313
+ const { createNapiAppOptions, setEnvVar, setAppSetting, setSystemSetting, setClientCredentials, setCreatedBy, setAppStatus, BODHI_HOME, BODHI_HOST, BODHI_PORT, BODHI_SCHEME, BODHI_LOG_LEVEL, BODHI_LOG_STDOUT, BODHI_LOGS, BODHI_ENV_TYPE, BODHI_APP_TYPE, BODHI_VERSION, BODHI_COMMIT_SHA, BODHI_AUTH_URL, BODHI_AUTH_REALM, BODHI_ENCRYPTION_KEY, BODHI_EXEC_LOOKUP_PATH, BODHI_EXEC_VARIANT, BODHI_KEEP_ALIVE_SECS, BODHI_PUBLIC_SCHEME, BODHI_PUBLIC_HOST, BODHI_PUBLIC_PORT, BODHI_SESSION_DB_URL, BODHI_APP_DB_URL, BODHI_DEPLOYMENT, BODHI_MULTITENANT_CLIENT_ID, BODHI_MULTITENANT_CLIENT_SECRET, HF_HOME, DEFAULT_HOST, DEFAULT_PORT, BodhiServer } = nativeBinding
314
314
 
315
315
  module.exports.createNapiAppOptions = createNapiAppOptions
316
316
  module.exports.setEnvVar = setEnvVar
317
317
  module.exports.setAppSetting = setAppSetting
318
318
  module.exports.setSystemSetting = setSystemSetting
319
319
  module.exports.setClientCredentials = setClientCredentials
320
+ module.exports.setCreatedBy = setCreatedBy
320
321
  module.exports.setAppStatus = setAppStatus
321
322
  module.exports.BODHI_HOME = BODHI_HOME
322
323
  module.exports.BODHI_HOST = BODHI_HOST
@@ -341,6 +342,8 @@ module.exports.BODHI_PUBLIC_PORT = BODHI_PUBLIC_PORT
341
342
  module.exports.BODHI_SESSION_DB_URL = BODHI_SESSION_DB_URL
342
343
  module.exports.BODHI_APP_DB_URL = BODHI_APP_DB_URL
343
344
  module.exports.BODHI_DEPLOYMENT = BODHI_DEPLOYMENT
345
+ module.exports.BODHI_MULTITENANT_CLIENT_ID = BODHI_MULTITENANT_CLIENT_ID
346
+ module.exports.BODHI_MULTITENANT_CLIENT_SECRET = BODHI_MULTITENANT_CLIENT_SECRET
344
347
  module.exports.HF_HOME = HF_HOME
345
348
  module.exports.DEFAULT_HOST = DEFAULT_HOST
346
349
  module.exports.DEFAULT_PORT = DEFAULT_PORT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodhiapp/app-bindings",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "description": "NAPI-RS bindings for BodhiApp server with integrated tests",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -26,8 +26,8 @@
26
26
  "verify-packages": "node scripts/verify-npm-packages.js",
27
27
  "test:run": "vitest run",
28
28
  "test:playwright": "cross-env HEADLESS=true playwright test --config=playwright.config.mjs --reporter=list",
29
- "test:playwright:sqlite": "cross-env HEADLESS=true playwright test --config=playwright.config.mjs --reporter=list --project sqlite",
30
- "test:playwright:postgres": "cross-env HEADLESS=true playwright test --config=playwright.config.mjs --reporter=list --project postgres",
29
+ "test:playwright:standalone": "cross-env HEADLESS=true playwright test --config=playwright.config.mjs --reporter=list --project standalone",
30
+ "test:playwright:multi_tenant": "cross-env HEADLESS=true playwright test --config=playwright.config.mjs --reporter=list --project multi_tenant",
31
31
  "test:playwright:all": "cross-env HEADLESS=true playwright test --config=playwright.config.mjs --reporter=list",
32
32
  "test:playwright:ci": "playwright test --config=playwright.config.mjs",
33
33
  "test:playwright:ui": "playwright test --config=playwright.config.mjs --ui",
@@ -39,7 +39,12 @@
39
39
  "lint": "biome lint .",
40
40
  "lint:fix": "biome lint --write .",
41
41
  "check": "biome check .",
42
- "check:fix": "biome check --write ."
42
+ "check:fix": "biome check --write .",
43
+ "e2e:server:standalone": "node tests-js/scripts/start-shared-server.mjs --port 51135 --db-type sqlite",
44
+ "e2e:server:multi_tenant": "node tests-js/scripts/start-shared-server.mjs --port 41135 --db-type postgres --deployment multi_tenant",
45
+ "e2e:server:test-app-oauth": "cd test-oauth-app && npm run build && npx serve dist -s -l 55173",
46
+ "e2e:server:test-app-mcp": "cd test-mcp-oauth-server && npm run build && npm start",
47
+ "e2e:server:test-app-mcp-dcr": "cd test-mcp-oauth-server && npm run build && node dist/index.js --dcr"
43
48
  },
44
49
  "devDependencies": {
45
50
  "@biomejs/biome": "^1.9.4",
@@ -80,7 +85,7 @@
80
85
  "index.js"
81
86
  ],
82
87
  "optionalDependencies": {
83
- "@bodhiapp/app-bindings-darwin-arm64": "0.0.30",
84
- "@bodhiapp/app-bindings-linux-x64-gnu": "0.0.30"
88
+ "@bodhiapp/app-bindings-darwin-arm64": "0.0.31",
89
+ "@bodhiapp/app-bindings-linux-x64-gnu": "0.0.31"
85
90
  }
86
91
  }