@bodhiapp/app-bindings 0.0.29 → 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.
- package/index.d.ts +9 -0
- package/index.js +7 -1
- package/package.json +14 -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
|
|
@@ -50,6 +54,11 @@ export const BODHI_KEEP_ALIVE_SECS: string
|
|
|
50
54
|
export const BODHI_PUBLIC_SCHEME: string
|
|
51
55
|
export const BODHI_PUBLIC_HOST: string
|
|
52
56
|
export const BODHI_PUBLIC_PORT: string
|
|
57
|
+
export const BODHI_SESSION_DB_URL: string
|
|
58
|
+
export const BODHI_APP_DB_URL: string
|
|
59
|
+
export const BODHI_DEPLOYMENT: string
|
|
60
|
+
export const BODHI_MULTITENANT_CLIENT_ID: string
|
|
61
|
+
export const BODHI_MULTITENANT_CLIENT_SECRET: string
|
|
53
62
|
export const HF_HOME: string
|
|
54
63
|
export const DEFAULT_HOST: string
|
|
55
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, 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
|
|
@@ -338,6 +339,11 @@ module.exports.BODHI_KEEP_ALIVE_SECS = BODHI_KEEP_ALIVE_SECS
|
|
|
338
339
|
module.exports.BODHI_PUBLIC_SCHEME = BODHI_PUBLIC_SCHEME
|
|
339
340
|
module.exports.BODHI_PUBLIC_HOST = BODHI_PUBLIC_HOST
|
|
340
341
|
module.exports.BODHI_PUBLIC_PORT = BODHI_PUBLIC_PORT
|
|
342
|
+
module.exports.BODHI_SESSION_DB_URL = BODHI_SESSION_DB_URL
|
|
343
|
+
module.exports.BODHI_APP_DB_URL = BODHI_APP_DB_URL
|
|
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
|
|
341
347
|
module.exports.HF_HOME = HF_HOME
|
|
342
348
|
module.exports.DEFAULT_HOST = DEFAULT_HOST
|
|
343
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.
|
|
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",
|
|
@@ -25,7 +25,10 @@
|
|
|
25
25
|
"update-optional-dependencies": "node scripts/update-optional-dependencies.js",
|
|
26
26
|
"verify-packages": "node scripts/verify-npm-packages.js",
|
|
27
27
|
"test:run": "vitest run",
|
|
28
|
-
"test:playwright": "playwright test --config=playwright.config.mjs --reporter=list",
|
|
28
|
+
"test:playwright": "cross-env HEADLESS=true playwright test --config=playwright.config.mjs --reporter=list",
|
|
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
|
+
"test:playwright:all": "cross-env HEADLESS=true playwright test --config=playwright.config.mjs --reporter=list",
|
|
29
32
|
"test:playwright:ci": "playwright test --config=playwright.config.mjs",
|
|
30
33
|
"test:playwright:ui": "playwright test --config=playwright.config.mjs --ui",
|
|
31
34
|
"test:playwright:headed": "playwright test --config=playwright.config.mjs --headed",
|
|
@@ -36,12 +39,18 @@
|
|
|
36
39
|
"lint": "biome lint .",
|
|
37
40
|
"lint:fix": "biome lint --write .",
|
|
38
41
|
"check": "biome check .",
|
|
39
|
-
"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"
|
|
40
48
|
},
|
|
41
49
|
"devDependencies": {
|
|
42
50
|
"@biomejs/biome": "^1.9.4",
|
|
43
51
|
"@napi-rs/cli": "^2.18.4",
|
|
44
52
|
"@playwright/test": "1.57.0",
|
|
53
|
+
"cross-env": "^10.1.0",
|
|
45
54
|
"dotenv": "^16.5.0",
|
|
46
55
|
"express": "^5.1.0",
|
|
47
56
|
"rimraf": "^6.0.1",
|
|
@@ -76,8 +85,7 @@
|
|
|
76
85
|
"index.js"
|
|
77
86
|
],
|
|
78
87
|
"optionalDependencies": {
|
|
79
|
-
"@bodhiapp/app-bindings-darwin-arm64": "0.0.
|
|
80
|
-
"@bodhiapp/app-bindings-linux-x64-gnu": "0.0.
|
|
81
|
-
"@bodhiapp/app-bindings-win32-x64-msvc": "0.0.29"
|
|
88
|
+
"@bodhiapp/app-bindings-darwin-arm64": "0.0.31",
|
|
89
|
+
"@bodhiapp/app-bindings-linux-x64-gnu": "0.0.31"
|
|
82
90
|
}
|
|
83
91
|
}
|