@mondaydotcomorg/z2h-shared-utils 0.5.0 → 0.6.1
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/dist/__tests__/index.test.d.ts +2 -0
- package/dist/__tests__/index.test.d.ts.map +1 -0
- package/dist/esm/__tests__/index.test.d.ts +2 -0
- package/dist/esm/__tests__/index.test.d.ts.map +1 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/integrations.d.ts +15 -0
- package/dist/esm/integrations.d.ts.map +1 -0
- package/dist/esm/integrations.mjs +14 -0
- package/dist/esm/observability/events.d.ts +1 -0
- package/dist/esm/observability/events.d.ts.map +1 -1
- package/dist/esm/observability/events.mjs +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/integrations.d.ts +15 -0
- package/dist/integrations.d.ts.map +1 -0
- package/dist/integrations.js +17 -0
- package/dist/observability/events.d.ts +1 -0
- package/dist/observability/events.d.ts.map +1 -1
- package/dist/observability/events.js +1 -0
- package/package.json +6 -1
- package/src/__tests__/index.test.ts +13 -0
- package/src/index.ts +6 -1
- package/src/integrations.ts +15 -0
- package/src/observability/events.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/index.test.ts"],"names":[],"mappings":""}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ALWAYS_ON_CHANNELS, DECLARED_INTEGRATIONS, type AlwaysOnChannel, type DeclaredIntegration, } from './integrations';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,gBAAgB,CAAC"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ALWAYS_ON_CHANNELS, DECLARED_INTEGRATIONS } from './integrations.mjs';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend channels surfaced as `ctx.api.v1.<name>`.
|
|
3
|
+
*
|
|
4
|
+
* Always-on channels need no OAuth and are never declared — the runner builds
|
|
5
|
+
* them for every app regardless of what its handlers touch.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ALWAYS_ON_CHANNELS: readonly ["db", "llm", "snowflake"];
|
|
8
|
+
export type AlwaysOnChannel = (typeof ALWAYS_ON_CHANNELS)[number];
|
|
9
|
+
/**
|
|
10
|
+
* Declared (OAuth-gated) integrations: closed set the CLI detects from handler
|
|
11
|
+
* sources and the broker validates on register/update.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DECLARED_INTEGRATIONS: readonly ["monday"];
|
|
14
|
+
export type DeclaredIntegration = (typeof DECLARED_INTEGRATIONS)[number];
|
|
15
|
+
//# sourceMappingURL=integrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/integrations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,qCAAsC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qBAAsB,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend channels surfaced as `ctx.api.v1.<name>`.
|
|
3
|
+
*
|
|
4
|
+
* Always-on channels need no OAuth and are never declared — the runner builds
|
|
5
|
+
* them for every app regardless of what its handlers touch.
|
|
6
|
+
*/
|
|
7
|
+
const ALWAYS_ON_CHANNELS = ['db', 'llm', 'snowflake'];
|
|
8
|
+
/**
|
|
9
|
+
* Declared (OAuth-gated) integrations: closed set the CLI detects from handler
|
|
10
|
+
* sources and the broker validates on register/update.
|
|
11
|
+
*/
|
|
12
|
+
const DECLARED_INTEGRATIONS = ['monday'];
|
|
13
|
+
|
|
14
|
+
export { ALWAYS_ON_CHANNELS, DECLARED_INTEGRATIONS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/observability/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCtB,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;CAmBnB,CAAC;AAEX,oDAAoD;AACpD,eAAO,MAAM,cAAc;;;;;;;;CAQjB,CAAC;AAEX,sCAAsC;AACtC,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/observability/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCtB,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;CAmBnB,CAAC;AAEX,oDAAoD;AACpD,eAAO,MAAM,cAAc;;;;;;;;CAQjB,CAAC;AAEX,sCAAsC;AACtC,eAAO,MAAM,YAAY;;;CAGf,CAAC"}
|
|
@@ -72,6 +72,7 @@ const Z2hAgentEvents = {
|
|
|
72
72
|
/** BI events tracked in `z2h-cli`. */
|
|
73
73
|
const Z2hCliEvents = {
|
|
74
74
|
error: 'z2h_cli_error',
|
|
75
|
+
handlerParseError: 'z2h_cli_handler_parse_error',
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
export { BackendRunnerEvents, Z2hAgentEvents, Z2hCliEvents, Z2hServiceEvents };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ALWAYS_ON_CHANNELS, DECLARED_INTEGRATIONS, type AlwaysOnChannel, type DeclaredIntegration, } from './integrations';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const integrations = require('./integrations.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
7
|
+
exports.ALWAYS_ON_CHANNELS = integrations.ALWAYS_ON_CHANNELS;
|
|
8
|
+
exports.DECLARED_INTEGRATIONS = integrations.DECLARED_INTEGRATIONS;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend channels surfaced as `ctx.api.v1.<name>`.
|
|
3
|
+
*
|
|
4
|
+
* Always-on channels need no OAuth and are never declared — the runner builds
|
|
5
|
+
* them for every app regardless of what its handlers touch.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ALWAYS_ON_CHANNELS: readonly ["db", "llm", "snowflake"];
|
|
8
|
+
export type AlwaysOnChannel = (typeof ALWAYS_ON_CHANNELS)[number];
|
|
9
|
+
/**
|
|
10
|
+
* Declared (OAuth-gated) integrations: closed set the CLI detects from handler
|
|
11
|
+
* sources and the broker validates on register/update.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DECLARED_INTEGRATIONS: readonly ["monday"];
|
|
14
|
+
export type DeclaredIntegration = (typeof DECLARED_INTEGRATIONS)[number];
|
|
15
|
+
//# sourceMappingURL=integrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../src/integrations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,qCAAsC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qBAAsB,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Backend channels surfaced as `ctx.api.v1.<name>`.
|
|
5
|
+
*
|
|
6
|
+
* Always-on channels need no OAuth and are never declared — the runner builds
|
|
7
|
+
* them for every app regardless of what its handlers touch.
|
|
8
|
+
*/
|
|
9
|
+
const ALWAYS_ON_CHANNELS = ['db', 'llm', 'snowflake'];
|
|
10
|
+
/**
|
|
11
|
+
* Declared (OAuth-gated) integrations: closed set the CLI detects from handler
|
|
12
|
+
* sources and the broker validates on register/update.
|
|
13
|
+
*/
|
|
14
|
+
const DECLARED_INTEGRATIONS = ['monday'];
|
|
15
|
+
|
|
16
|
+
exports.ALWAYS_ON_CHANNELS = ALWAYS_ON_CHANNELS;
|
|
17
|
+
exports.DECLARED_INTEGRATIONS = DECLARED_INTEGRATIONS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/observability/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCtB,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;CAmBnB,CAAC;AAEX,oDAAoD;AACpD,eAAO,MAAM,cAAc;;;;;;;;CAQjB,CAAC;AAEX,sCAAsC;AACtC,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/observability/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCtB,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;CAmBnB,CAAC;AAEX,oDAAoD;AACpD,eAAO,MAAM,cAAc;;;;;;;;CAQjB,CAAC;AAEX,sCAAsC;AACtC,eAAO,MAAM,YAAY;;;CAGf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondaydotcomorg/z2h-shared-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -29,6 +29,11 @@
|
|
|
29
29
|
"require": "./dist/dashboardTemplateHooks.js",
|
|
30
30
|
"types": "./dist/dashboardTemplateHooks.d.ts"
|
|
31
31
|
},
|
|
32
|
+
"./secrets": {
|
|
33
|
+
"import": "./dist/esm/secrets/index.mjs",
|
|
34
|
+
"require": "./dist/secrets/index.js",
|
|
35
|
+
"types": "./dist/secrets/index.d.ts"
|
|
36
|
+
},
|
|
32
37
|
"./package.json": "./package.json"
|
|
33
38
|
},
|
|
34
39
|
"nx": {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
// The root barrel is loaded by consumers (e.g. z2h-cli) that never install
|
|
4
|
+
// the optional peer dep `@mondaydotcomorg/trident-backend-api`. Anything that
|
|
5
|
+
// imports it (secrets/*) must stay off this barrel and live behind its own
|
|
6
|
+
// subpath export instead - see package.json `exports`.
|
|
7
|
+
describe('root barrel', () => {
|
|
8
|
+
it('does not re-export secrets/', async () => {
|
|
9
|
+
const barrel = await import('../index');
|
|
10
|
+
expect(barrel).not.toHaveProperty('encryptSecret');
|
|
11
|
+
expect(barrel).not.toHaveProperty('decryptSecret');
|
|
12
|
+
});
|
|
13
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend channels surfaced as `ctx.api.v1.<name>`.
|
|
3
|
+
*
|
|
4
|
+
* Always-on channels need no OAuth and are never declared — the runner builds
|
|
5
|
+
* them for every app regardless of what its handlers touch.
|
|
6
|
+
*/
|
|
7
|
+
export const ALWAYS_ON_CHANNELS = ['db', 'llm', 'snowflake'] as const;
|
|
8
|
+
export type AlwaysOnChannel = (typeof ALWAYS_ON_CHANNELS)[number];
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Declared (OAuth-gated) integrations: closed set the CLI detects from handler
|
|
12
|
+
* sources and the broker validates on register/update.
|
|
13
|
+
*/
|
|
14
|
+
export const DECLARED_INTEGRATIONS = ['monday'] as const;
|
|
15
|
+
export type DeclaredIntegration = (typeof DECLARED_INTEGRATIONS)[number];
|