@qlever-llc/trellis 0.6.1 → 0.7.0-rc.2
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/README.md +6 -2
- package/esm/auth/device_activation.d.ts +194 -0
- package/esm/auth/device_activation.d.ts.map +1 -0
- package/esm/auth/{workload_activation.js → device_activation.js} +85 -60
- package/esm/auth/mod.d.ts +2 -2
- package/esm/auth/mod.d.ts.map +1 -1
- package/esm/auth/mod.js +2 -2
- package/esm/auth/protocol.d.ts +175 -72
- package/esm/auth/protocol.d.ts.map +1 -1
- package/esm/auth/protocol.js +126 -78
- package/esm/contracts/mod.d.ts +19 -3
- package/esm/contracts/mod.d.ts.map +1 -1
- package/esm/contracts/mod.js +28 -4
- package/esm/contracts/protocol.d.ts +34 -0
- package/esm/contracts/protocol.d.ts.map +1 -1
- package/esm/contracts/protocol.js +15 -0
- package/esm/server/deno.d.ts +1 -6
- package/esm/server/deno.d.ts.map +1 -1
- package/esm/server/deno.js +1 -16
- package/esm/server/mod.d.ts +3 -2
- package/esm/server/mod.d.ts.map +1 -1
- package/esm/server/mod.js +2 -2
- package/esm/server/node.d.ts +1 -6
- package/esm/server/node.d.ts.map +1 -1
- package/esm/server/node.js +1 -16
- package/esm/server/service.d.ts +32 -10
- package/esm/server/service.d.ts.map +1 -1
- package/esm/server/service.js +188 -41
- package/esm/server/transfer.d.ts +41 -0
- package/esm/server/transfer.d.ts.map +1 -0
- package/esm/server/transfer.js +418 -0
- package/esm/telemetry/init.d.ts +4 -0
- package/esm/telemetry/init.d.ts.map +1 -0
- package/esm/telemetry/init.js +7 -0
- package/esm/telemetry/mod.d.ts +1 -2
- package/esm/telemetry/mod.d.ts.map +1 -1
- package/esm/telemetry/mod.js +1 -2
- package/esm/telemetry/runtime.d.ts.map +1 -1
- package/esm/telemetry/runtime.js +9 -5
- package/esm/telemetry/trellis.d.ts +0 -1
- package/esm/telemetry/trellis.d.ts.map +1 -1
- package/esm/telemetry/trellis.js +0 -6
- package/esm/trellis/_sdk/auth/api.d.ts.map +1 -1
- package/esm/trellis/_sdk/auth/api.js +132 -110
- package/esm/trellis/_sdk/auth/contract.d.ts +1 -1
- package/esm/trellis/_sdk/auth/contract.d.ts.map +1 -1
- package/esm/trellis/_sdk/auth/contract.js +2 -2
- package/esm/trellis/_sdk/auth/schemas.d.ts +4212 -3069
- package/esm/trellis/_sdk/auth/schemas.d.ts.map +1 -1
- package/esm/trellis/_sdk/auth/schemas.js +144 -125
- package/esm/trellis/_sdk/auth/types.d.ts +417 -267
- package/esm/trellis/_sdk/auth/types.d.ts.map +1 -1
- package/esm/trellis/_sdk/auth/types.js +1 -1
- package/esm/trellis/_sdk/core/contract.d.ts +1 -1
- package/esm/trellis/_sdk/core/contract.d.ts.map +1 -1
- package/esm/trellis/_sdk/core/contract.js +2 -2
- package/esm/trellis/_sdk/core/schemas.d.ts +122 -0
- package/esm/trellis/_sdk/core/schemas.d.ts.map +1 -1
- package/esm/trellis/_sdk/core/schemas.js +4 -4
- package/esm/trellis/_sdk/core/types.d.ts +18 -1
- package/esm/trellis/_sdk/core/types.d.ts.map +1 -1
- package/esm/trellis/_sdk/core/types.js +1 -1
- package/esm/trellis/_sdk/state/_dnt.polyfills.d.ts +12 -0
- package/esm/trellis/_sdk/state/_dnt.polyfills.d.ts.map +1 -0
- package/esm/trellis/_sdk/state/_dnt.polyfills.js +15 -0
- package/esm/trellis/_sdk/state/api.d.ts +10 -0
- package/esm/trellis/_sdk/state/api.d.ts.map +1 -0
- package/esm/trellis/_sdk/state/api.js +71 -0
- package/esm/trellis/_sdk/state/contract.d.ts +8 -0
- package/esm/trellis/_sdk/state/contract.d.ts.map +1 -0
- package/esm/trellis/_sdk/state/contract.js +59 -0
- package/esm/trellis/_sdk/state/mod.d.ts +7 -0
- package/esm/trellis/_sdk/state/mod.d.ts.map +1 -0
- package/esm/trellis/_sdk/state/mod.js +5 -0
- package/esm/trellis/_sdk/state/package.json +3 -0
- package/esm/trellis/_sdk/state/schemas.d.ts +1437 -0
- package/esm/trellis/_sdk/state/schemas.d.ts.map +1 -0
- package/esm/trellis/_sdk/state/schemas.js +62 -0
- package/esm/trellis/_sdk/state/types.d.ts +206 -0
- package/esm/trellis/_sdk/state/types.d.ts.map +1 -0
- package/esm/trellis/_sdk/state/types.js +3 -0
- package/esm/trellis/client_connect.d.ts +53 -0
- package/esm/trellis/client_connect.d.ts.map +1 -0
- package/esm/trellis/client_connect.js +300 -0
- package/esm/trellis/contract.d.ts +1 -7
- package/esm/trellis/contract.d.ts.map +1 -1
- package/esm/trellis/contract.js +1 -12
- package/esm/trellis/device.d.ts +41 -0
- package/esm/trellis/device.d.ts.map +1 -0
- package/esm/trellis/device.js +209 -0
- package/esm/trellis/errors/AuthError.d.ts +1 -1
- package/esm/trellis/errors/AuthError.js +9 -9
- package/esm/trellis/errors/StoreError.d.ts +22 -0
- package/esm/trellis/errors/StoreError.d.ts.map +1 -0
- package/esm/trellis/errors/StoreError.js +41 -0
- package/esm/trellis/errors/TransferError.d.ts +22 -0
- package/esm/trellis/errors/TransferError.d.ts.map +1 -0
- package/esm/trellis/errors/TransferError.js +41 -0
- package/esm/trellis/errors/index.d.ts +8 -0
- package/esm/trellis/errors/index.d.ts.map +1 -1
- package/esm/trellis/errors/index.js +8 -0
- package/esm/trellis/index.d.ts +10 -4
- package/esm/trellis/index.d.ts.map +1 -1
- package/esm/trellis/index.js +6 -4
- package/esm/trellis/kv.d.ts +2 -0
- package/esm/trellis/kv.d.ts.map +1 -1
- package/esm/trellis/kv.js +6 -0
- package/esm/trellis/models/trellis/TrellisError.d.ts +15 -1
- package/esm/trellis/models/trellis/TrellisError.d.ts.map +1 -1
- package/esm/trellis/models/trellis/TrellisError.js +4 -0
- package/esm/trellis/runtime_transport.d.ts +12 -0
- package/esm/trellis/runtime_transport.d.ts.map +1 -0
- package/esm/trellis/runtime_transport.js +35 -0
- package/esm/trellis/sdk/state.d.ts +4 -0
- package/esm/trellis/sdk/state.d.ts.map +1 -0
- package/esm/trellis/sdk/state.js +3 -0
- package/esm/trellis/store.d.ts +51 -0
- package/esm/trellis/store.d.ts.map +1 -0
- package/esm/trellis/store.js +310 -0
- package/esm/trellis/tracing.js +1 -1
- package/esm/trellis/transfer.d.ts +118 -0
- package/esm/trellis/transfer.d.ts.map +1 -0
- package/esm/trellis/transfer.js +357 -0
- package/esm/trellis/trellis.d.ts +3 -0
- package/esm/trellis/trellis.d.ts.map +1 -1
- package/esm/trellis/trellis.js +48 -17
- package/package.json +7 -2
- package/script/auth/device_activation.d.ts +194 -0
- package/script/auth/device_activation.d.ts.map +1 -0
- package/script/auth/{workload_activation.js → device_activation.js} +99 -74
- package/script/auth/mod.d.ts +2 -2
- package/script/auth/mod.d.ts.map +1 -1
- package/script/auth/mod.js +84 -76
- package/script/auth/protocol.d.ts +175 -72
- package/script/auth/protocol.d.ts.map +1 -1
- package/script/auth/protocol.js +129 -81
- package/script/contracts/mod.d.ts +19 -3
- package/script/contracts/mod.d.ts.map +1 -1
- package/script/contracts/mod.js +30 -4
- package/script/contracts/protocol.d.ts +34 -0
- package/script/contracts/protocol.d.ts.map +1 -1
- package/script/contracts/protocol.js +16 -1
- package/script/telemetry/init.d.ts +4 -0
- package/script/telemetry/init.d.ts.map +1 -0
- package/script/telemetry/init.js +11 -0
- package/script/telemetry/mod.d.ts +1 -2
- package/script/telemetry/mod.d.ts.map +1 -1
- package/script/telemetry/mod.js +1 -4
- package/script/telemetry/runtime.d.ts.map +1 -1
- package/script/telemetry/runtime.js +9 -28
- package/script/telemetry/trellis.d.ts +0 -1
- package/script/telemetry/trellis.d.ts.map +1 -1
- package/script/telemetry/trellis.js +0 -7
- package/script/trellis/_sdk/auth/api.d.ts.map +1 -1
- package/script/trellis/_sdk/auth/api.js +132 -110
- package/script/trellis/_sdk/auth/contract.d.ts +1 -1
- package/script/trellis/_sdk/auth/contract.d.ts.map +1 -1
- package/script/trellis/_sdk/auth/contract.js +2 -2
- package/script/trellis/_sdk/auth/schemas.d.ts +4212 -3069
- package/script/trellis/_sdk/auth/schemas.d.ts.map +1 -1
- package/script/trellis/_sdk/auth/schemas.js +144 -125
- package/script/trellis/_sdk/auth/types.d.ts +417 -267
- package/script/trellis/_sdk/auth/types.d.ts.map +1 -1
- package/script/trellis/_sdk/auth/types.js +1 -1
- package/script/trellis/_sdk/core/contract.d.ts +1 -1
- package/script/trellis/_sdk/core/contract.d.ts.map +1 -1
- package/script/trellis/_sdk/core/contract.js +2 -2
- package/script/trellis/_sdk/core/schemas.d.ts +122 -0
- package/script/trellis/_sdk/core/schemas.d.ts.map +1 -1
- package/script/trellis/_sdk/core/schemas.js +4 -4
- package/script/trellis/_sdk/core/types.d.ts +18 -1
- package/script/trellis/_sdk/core/types.d.ts.map +1 -1
- package/script/trellis/_sdk/core/types.js +1 -1
- package/script/trellis/_sdk/state/_dnt.polyfills.d.ts +12 -0
- package/script/trellis/_sdk/state/_dnt.polyfills.d.ts.map +1 -0
- package/script/trellis/_sdk/state/_dnt.polyfills.js +16 -0
- package/script/trellis/_sdk/state/api.d.ts +10 -0
- package/script/trellis/_sdk/state/api.d.ts.map +1 -0
- package/script/trellis/_sdk/state/api.js +74 -0
- package/script/trellis/_sdk/state/contract.d.ts +8 -0
- package/script/trellis/_sdk/state/contract.d.ts.map +1 -0
- package/script/trellis/_sdk/state/contract.js +62 -0
- package/script/trellis/_sdk/state/mod.d.ts +7 -0
- package/script/trellis/_sdk/state/mod.d.ts.map +1 -0
- package/script/trellis/_sdk/state/mod.js +30 -0
- package/script/trellis/_sdk/state/package.json +3 -0
- package/script/trellis/_sdk/state/schemas.d.ts +1437 -0
- package/script/trellis/_sdk/state/schemas.d.ts.map +1 -0
- package/script/trellis/_sdk/state/schemas.js +65 -0
- package/script/trellis/_sdk/state/types.d.ts +206 -0
- package/script/trellis/_sdk/state/types.d.ts.map +1 -0
- package/script/trellis/_sdk/state/types.js +6 -0
- package/script/trellis/client_connect.d.ts +53 -0
- package/script/trellis/client_connect.d.ts.map +1 -0
- package/script/trellis/client_connect.js +304 -0
- package/script/trellis/contract.d.ts +1 -7
- package/script/trellis/contract.d.ts.map +1 -1
- package/script/trellis/contract.js +1 -12
- package/script/trellis/device.d.ts +41 -0
- package/script/trellis/device.d.ts.map +1 -0
- package/script/trellis/device.js +213 -0
- package/script/trellis/errors/AuthError.d.ts +1 -1
- package/script/trellis/errors/AuthError.js +9 -9
- package/script/trellis/errors/StoreError.d.ts +22 -0
- package/script/trellis/errors/StoreError.d.ts.map +1 -0
- package/script/trellis/errors/StoreError.js +48 -0
- package/script/trellis/errors/TransferError.d.ts +22 -0
- package/script/trellis/errors/TransferError.d.ts.map +1 -0
- package/script/trellis/errors/TransferError.js +48 -0
- package/script/trellis/errors/index.d.ts +8 -0
- package/script/trellis/errors/index.d.ts.map +1 -1
- package/script/trellis/errors/index.js +13 -1
- package/script/trellis/index.d.ts +10 -4
- package/script/trellis/index.d.ts.map +1 -1
- package/script/trellis/index.js +17 -6
- package/script/trellis/kv.d.ts +2 -0
- package/script/trellis/kv.d.ts.map +1 -1
- package/script/trellis/kv.js +6 -0
- package/script/trellis/models/trellis/TrellisError.d.ts +15 -1
- package/script/trellis/models/trellis/TrellisError.d.ts.map +1 -1
- package/script/trellis/models/trellis/TrellisError.js +4 -0
- package/script/trellis/runtime_transport.d.ts +12 -0
- package/script/trellis/runtime_transport.d.ts.map +1 -0
- package/script/trellis/runtime_transport.js +37 -0
- package/script/trellis/store.d.ts +51 -0
- package/script/trellis/store.d.ts.map +1 -0
- package/script/trellis/store.js +316 -0
- package/script/trellis/tracing.js +1 -1
- package/script/trellis/transfer.d.ts +118 -0
- package/script/trellis/transfer.d.ts.map +1 -0
- package/script/trellis/transfer.js +367 -0
- package/script/trellis/trellis.d.ts +3 -0
- package/script/trellis/trellis.d.ts.map +1 -1
- package/script/trellis/trellis.js +48 -17
- package/esm/auth/workload_activation.d.ts +0 -192
- package/esm/auth/workload_activation.d.ts.map +0 -1
- package/esm/trellis/workload.d.ts +0 -45
- package/esm/trellis/workload.d.ts.map +0 -1
- package/esm/trellis/workload.js +0 -144
- package/script/auth/workload_activation.d.ts +0 -192
- package/script/auth/workload_activation.d.ts.map +0 -1
- package/script/trellis/workload.d.ts +0 -45
- package/script/trellis/workload.d.ts.map +0 -1
- package/script/trellis/workload.js +0 -172
package/script/contracts/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unwrapSchema = exports.schema = exports.isJsonValue = exports.digestJson = exports.canonicalizeJson = exports.CATALOG_FORMAT_V1 = exports.CONTRACT_FORMAT_V1 = exports.StreamResourceBindingSchema = exports.PaginatedSchema = exports.KvResourceBindingSchema = exports.JobsResourceBindingSchema = exports.JobsQueueBindingSchema = exports.IsoDateSchema = exports.InstalledServiceContractSchema = exports.EventHeaderSchema = exports.ContractStreamResourceSchema = exports.ContractSchemaRefSchema = exports.ContractResourcesSchema = exports.ContractResourceBindingsSchema = exports.ContractKvResourceSchema = exports.ContractJobsResourceSchema = exports.ContractJobQueueResourceSchema = void 0;
|
|
3
|
+
exports.unwrapSchema = exports.schema = exports.isJsonValue = exports.digestJson = exports.canonicalizeJson = exports.CATALOG_FORMAT_V1 = exports.CONTRACT_FORMAT_V1 = exports.StreamResourceBindingSchema = exports.PaginatedSchema = exports.StoreResourceBindingSchema = exports.KvResourceBindingSchema = exports.JobsResourceBindingSchema = exports.JobsQueueBindingSchema = exports.IsoDateSchema = exports.InstalledServiceContractSchema = exports.EventHeaderSchema = exports.ContractStreamResourceSchema = exports.ContractStoreResourceSchema = exports.ContractSchemaRefSchema = exports.ContractResourcesSchema = exports.ContractResourceBindingsSchema = exports.ContractKvResourceSchema = exports.ContractJobsResourceSchema = exports.ContractJobQueueResourceSchema = void 0;
|
|
4
4
|
exports.defineContract = defineContract;
|
|
5
5
|
const canonical_ts_1 = require("./canonical.ts");
|
|
6
6
|
Object.defineProperty(exports, "canonicalizeJson", { enumerable: true, get: function () { return canonical_ts_1.canonicalizeJson; } });
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "ContractKvResourceSchema", { enumerable: true, g
|
|
|
17
17
|
Object.defineProperty(exports, "ContractResourceBindingsSchema", { enumerable: true, get: function () { return protocol_ts_1.ContractResourceBindingsSchema; } });
|
|
18
18
|
Object.defineProperty(exports, "ContractResourcesSchema", { enumerable: true, get: function () { return protocol_ts_1.ContractResourcesSchema; } });
|
|
19
19
|
Object.defineProperty(exports, "ContractSchemaRefSchema", { enumerable: true, get: function () { return protocol_ts_1.ContractSchemaRefSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "ContractStoreResourceSchema", { enumerable: true, get: function () { return protocol_ts_1.ContractStoreResourceSchema; } });
|
|
20
21
|
Object.defineProperty(exports, "ContractStreamResourceSchema", { enumerable: true, get: function () { return protocol_ts_1.ContractStreamResourceSchema; } });
|
|
21
22
|
Object.defineProperty(exports, "EventHeaderSchema", { enumerable: true, get: function () { return protocol_ts_1.EventHeaderSchema; } });
|
|
22
23
|
Object.defineProperty(exports, "InstalledServiceContractSchema", { enumerable: true, get: function () { return protocol_ts_1.InstalledServiceContractSchema; } });
|
|
@@ -24,6 +25,7 @@ Object.defineProperty(exports, "IsoDateSchema", { enumerable: true, get: functio
|
|
|
24
25
|
Object.defineProperty(exports, "JobsQueueBindingSchema", { enumerable: true, get: function () { return protocol_ts_1.JobsQueueBindingSchema; } });
|
|
25
26
|
Object.defineProperty(exports, "JobsResourceBindingSchema", { enumerable: true, get: function () { return protocol_ts_1.JobsResourceBindingSchema; } });
|
|
26
27
|
Object.defineProperty(exports, "KvResourceBindingSchema", { enumerable: true, get: function () { return protocol_ts_1.KvResourceBindingSchema; } });
|
|
28
|
+
Object.defineProperty(exports, "StoreResourceBindingSchema", { enumerable: true, get: function () { return protocol_ts_1.StoreResourceBindingSchema; } });
|
|
27
29
|
Object.defineProperty(exports, "PaginatedSchema", { enumerable: true, get: function () { return protocol_ts_1.PaginatedSchema; } });
|
|
28
30
|
Object.defineProperty(exports, "StreamResourceBindingSchema", { enumerable: true, get: function () { return protocol_ts_1.StreamResourceBindingSchema; } });
|
|
29
31
|
exports.CONTRACT_FORMAT_V1 = "trellis.contract.v1";
|
|
@@ -67,7 +69,7 @@ function eventSubject(name, version, params) {
|
|
|
67
69
|
return `events.${version}.${name}${suffix}`;
|
|
68
70
|
}
|
|
69
71
|
function emitResources(resources) {
|
|
70
|
-
if (!resources?.kv && !resources?.streams && !resources?.jobs) {
|
|
72
|
+
if (!resources?.kv && !resources?.store && !resources?.streams && !resources?.jobs) {
|
|
71
73
|
return undefined;
|
|
72
74
|
}
|
|
73
75
|
return {
|
|
@@ -87,6 +89,24 @@ function emitResources(resources) {
|
|
|
87
89
|
])),
|
|
88
90
|
}
|
|
89
91
|
: {}),
|
|
92
|
+
...(resources.store
|
|
93
|
+
? {
|
|
94
|
+
store: Object.fromEntries(Object.entries(resources.store).map(([alias, resource]) => [
|
|
95
|
+
alias,
|
|
96
|
+
{
|
|
97
|
+
purpose: resource.purpose,
|
|
98
|
+
required: resource.required ?? true,
|
|
99
|
+
ttlMs: resource.ttlMs ?? 0,
|
|
100
|
+
...(resource.maxObjectBytes !== undefined
|
|
101
|
+
? { maxObjectBytes: resource.maxObjectBytes }
|
|
102
|
+
: {}),
|
|
103
|
+
...(resource.maxTotalBytes !== undefined
|
|
104
|
+
? { maxTotalBytes: resource.maxTotalBytes }
|
|
105
|
+
: {}),
|
|
106
|
+
},
|
|
107
|
+
])),
|
|
108
|
+
}
|
|
109
|
+
: {}),
|
|
90
110
|
...(resources.streams
|
|
91
111
|
? {
|
|
92
112
|
streams: Object.fromEntries(Object.entries(resources.streams).map(([alias, resource]) => [
|
|
@@ -193,7 +213,8 @@ function emitContract(source) {
|
|
|
193
213
|
? Object.fromEntries(Object.entries(source.operations).map(([name, operation]) => {
|
|
194
214
|
const emitted = {
|
|
195
215
|
version: operation.version,
|
|
196
|
-
subject: operation.subject ??
|
|
216
|
+
subject: operation.subject ??
|
|
217
|
+
operationSubject(name, operation.version),
|
|
197
218
|
input: { ...operation.input },
|
|
198
219
|
};
|
|
199
220
|
if (operation.progress) {
|
|
@@ -441,7 +462,12 @@ function normalizeUses(uses) {
|
|
|
441
462
|
};
|
|
442
463
|
}
|
|
443
464
|
const manifestUses = {};
|
|
444
|
-
const usedApi = {
|
|
465
|
+
const usedApi = {
|
|
466
|
+
rpc: {},
|
|
467
|
+
operations: {},
|
|
468
|
+
events: {},
|
|
469
|
+
subjects: {},
|
|
470
|
+
};
|
|
445
471
|
for (const [alias, useValue] of Object.entries(uses)) {
|
|
446
472
|
const contractModule = getContractModuleFromUse(alias, useValue);
|
|
447
473
|
if (useValue.contract !== contractModule.CONTRACT_ID) {
|
|
@@ -7,6 +7,14 @@ export declare const ContractKvResourceSchema: Type.TObject<{
|
|
|
7
7
|
maxValueBytes: Type.TOptional<Type.TInteger>;
|
|
8
8
|
}>;
|
|
9
9
|
export type ContractKvResource = Static<typeof ContractKvResourceSchema>;
|
|
10
|
+
export declare const ContractStoreResourceSchema: Type.TObject<{
|
|
11
|
+
purpose: Type.TString;
|
|
12
|
+
required: Type.TOptional<Type.TBoolean>;
|
|
13
|
+
ttlMs: Type.TOptional<Type.TInteger>;
|
|
14
|
+
maxObjectBytes: Type.TOptional<Type.TInteger>;
|
|
15
|
+
maxTotalBytes: Type.TOptional<Type.TInteger>;
|
|
16
|
+
}>;
|
|
17
|
+
export type ContractStoreResource = Static<typeof ContractStoreResourceSchema>;
|
|
10
18
|
export declare const ContractStreamResourceSchema: Type.TObject<{
|
|
11
19
|
purpose: Type.TString;
|
|
12
20
|
required: Type.TOptional<Type.TBoolean>;
|
|
@@ -73,6 +81,13 @@ export declare const ContractResourcesSchema: Type.TObject<{
|
|
|
73
81
|
ttlMs: Type.TOptional<Type.TInteger>;
|
|
74
82
|
maxValueBytes: Type.TOptional<Type.TInteger>;
|
|
75
83
|
}>>>;
|
|
84
|
+
store: Type.TOptional<Type.TRecord<"^.*$", Type.TObject<{
|
|
85
|
+
purpose: Type.TString;
|
|
86
|
+
required: Type.TOptional<Type.TBoolean>;
|
|
87
|
+
ttlMs: Type.TOptional<Type.TInteger>;
|
|
88
|
+
maxObjectBytes: Type.TOptional<Type.TInteger>;
|
|
89
|
+
maxTotalBytes: Type.TOptional<Type.TInteger>;
|
|
90
|
+
}>>>;
|
|
76
91
|
streams: Type.TOptional<Type.TRecord<"^.*$", Type.TObject<{
|
|
77
92
|
purpose: Type.TString;
|
|
78
93
|
required: Type.TOptional<Type.TBoolean>;
|
|
@@ -117,6 +132,13 @@ export declare const KvResourceBindingSchema: Type.TObject<{
|
|
|
117
132
|
maxValueBytes: Type.TOptional<Type.TInteger>;
|
|
118
133
|
}>;
|
|
119
134
|
export type KvResourceBinding = Static<typeof KvResourceBindingSchema>;
|
|
135
|
+
export declare const StoreResourceBindingSchema: Type.TObject<{
|
|
136
|
+
name: Type.TString;
|
|
137
|
+
ttlMs: Type.TInteger;
|
|
138
|
+
maxObjectBytes: Type.TOptional<Type.TInteger>;
|
|
139
|
+
maxTotalBytes: Type.TOptional<Type.TInteger>;
|
|
140
|
+
}>;
|
|
141
|
+
export type StoreResourceBinding = Static<typeof StoreResourceBindingSchema>;
|
|
120
142
|
export declare const StreamResourceBindingSchema: Type.TObject<{
|
|
121
143
|
name: Type.TString;
|
|
122
144
|
retention: Type.TOptional<Type.TString>;
|
|
@@ -187,6 +209,12 @@ export declare const ContractResourceBindingsSchema: Type.TObject<{
|
|
|
187
209
|
ttlMs: Type.TInteger;
|
|
188
210
|
maxValueBytes: Type.TOptional<Type.TInteger>;
|
|
189
211
|
}>>>;
|
|
212
|
+
store: Type.TOptional<Type.TRecord<"^.*$", Type.TObject<{
|
|
213
|
+
name: Type.TString;
|
|
214
|
+
ttlMs: Type.TInteger;
|
|
215
|
+
maxObjectBytes: Type.TOptional<Type.TInteger>;
|
|
216
|
+
maxTotalBytes: Type.TOptional<Type.TInteger>;
|
|
217
|
+
}>>>;
|
|
190
218
|
streams: Type.TOptional<Type.TRecord<"^.*$", Type.TObject<{
|
|
191
219
|
name: Type.TString;
|
|
192
220
|
retention: Type.TOptional<Type.TString>;
|
|
@@ -239,6 +267,12 @@ export declare const InstalledServiceContractSchema: Type.TObject<{
|
|
|
239
267
|
ttlMs: Type.TInteger;
|
|
240
268
|
maxValueBytes: Type.TOptional<Type.TInteger>;
|
|
241
269
|
}>>>;
|
|
270
|
+
store: Type.TOptional<Type.TRecord<"^.*$", Type.TObject<{
|
|
271
|
+
name: Type.TString;
|
|
272
|
+
ttlMs: Type.TInteger;
|
|
273
|
+
maxObjectBytes: Type.TOptional<Type.TInteger>;
|
|
274
|
+
maxTotalBytes: Type.TOptional<Type.TInteger>;
|
|
275
|
+
}>>>;
|
|
242
276
|
streams: Type.TOptional<Type.TRecord<"^.*$", Type.TObject<{
|
|
243
277
|
name: Type.TString;
|
|
244
278
|
retention: Type.TOptional<Type.TString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../contracts/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAmB5C,eAAO,MAAM,wBAAwB;;;;;;EAMF,CAAC;AAEpC,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEzE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;EAgBN,CAAC;AAEpC,MAAM,MAAM,sBAAsB,GAAG,MAAM,CACzC,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;EAED,CAAC;AAEpC,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEvE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;EAWR,CAAC;AAEpC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAC3C,OAAO,8BAA8B,CACtC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;EAKJ,CAAC;AAEpC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE7E,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../../contracts/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAmB5C,eAAO,MAAM,wBAAwB;;;;;;EAMF,CAAC;AAEpC,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEzE,eAAO,MAAM,2BAA2B;;;;;;EAML,CAAC;AAEpC,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE/E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;EAgBN,CAAC;AAEpC,MAAM,MAAM,sBAAsB,GAAG,MAAM,CACzC,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;EAED,CAAC;AAEpC,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEvE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;EAWR,CAAC;AAEpC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAC3C,OAAO,8BAA8B,CACtC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;EAKJ,CAAC;AAEpC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE7E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEvE,eAAO,MAAM,uBAAuB;;;;;EAKD,CAAC;AAEpC,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEvE,eAAO,MAAM,0BAA0B;;;;;EAKJ,CAAC;AAEpC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE7E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;EAgBL,CAAC;AAEpC,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE/E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;EAeA,CAAC;AAEpC,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;EAGH,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE3E,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAC3C,OAAO,8BAA8B,CACtC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIR,CAAC;AAEpC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAC3C,OAAO,8BAA8B,CACtC,CAAC;AAEF,eAAO,MAAM,aAAa,iCAIsB,CAAC;AAEjD,eAAO,MAAM,iBAAiB;;;;;EAK5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE3D,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PaginatedSchema = exports.EventHeaderSchema = exports.IsoDateSchema = exports.InstalledServiceContractSchema = exports.ContractResourceBindingsSchema = exports.JobsResourceBindingSchema = exports.JobsQueueBindingSchema = exports.StreamResourceBindingSchema = exports.KvResourceBindingSchema = exports.ContractResourcesSchema = exports.ContractJobsResourceSchema = exports.ContractJobQueueResourceSchema = exports.ContractSchemaRefSchema = exports.ContractStreamResourceSchema = exports.ContractKvResourceSchema = void 0;
|
|
6
|
+
exports.PaginatedSchema = exports.EventHeaderSchema = exports.IsoDateSchema = exports.InstalledServiceContractSchema = exports.ContractResourceBindingsSchema = exports.JobsResourceBindingSchema = exports.JobsQueueBindingSchema = exports.StreamResourceBindingSchema = exports.StoreResourceBindingSchema = exports.KvResourceBindingSchema = exports.ContractResourcesSchema = exports.ContractJobsResourceSchema = exports.ContractJobQueueResourceSchema = exports.ContractSchemaRefSchema = exports.ContractStreamResourceSchema = exports.ContractStoreResourceSchema = exports.ContractKvResourceSchema = void 0;
|
|
7
7
|
const typebox_1 = __importDefault(require("typebox"));
|
|
8
8
|
function parseIsoDate(value) {
|
|
9
9
|
const parsed = new Date(value);
|
|
@@ -25,6 +25,13 @@ exports.ContractKvResourceSchema = typebox_1.default.Object({
|
|
|
25
25
|
ttlMs: typebox_1.default.Optional(typebox_1.default.Integer({ minimum: 0, default: 0 })),
|
|
26
26
|
maxValueBytes: typebox_1.default.Optional(typebox_1.default.Integer({ minimum: 1 })),
|
|
27
27
|
}, { additionalProperties: false });
|
|
28
|
+
exports.ContractStoreResourceSchema = typebox_1.default.Object({
|
|
29
|
+
purpose: typebox_1.default.String({ minLength: 1 }),
|
|
30
|
+
required: typebox_1.default.Optional(typebox_1.default.Boolean({ default: true })),
|
|
31
|
+
ttlMs: typebox_1.default.Optional(typebox_1.default.Integer({ minimum: 0, default: 0 })),
|
|
32
|
+
maxObjectBytes: typebox_1.default.Optional(typebox_1.default.Integer({ minimum: 1 })),
|
|
33
|
+
maxTotalBytes: typebox_1.default.Optional(typebox_1.default.Integer({ minimum: 1 })),
|
|
34
|
+
}, { additionalProperties: false });
|
|
28
35
|
exports.ContractStreamResourceSchema = typebox_1.default.Object({
|
|
29
36
|
purpose: typebox_1.default.String({ minLength: 1 }),
|
|
30
37
|
required: typebox_1.default.Optional(typebox_1.default.Boolean({ default: true })),
|
|
@@ -62,6 +69,7 @@ exports.ContractJobsResourceSchema = typebox_1.default.Object({
|
|
|
62
69
|
}, { additionalProperties: false });
|
|
63
70
|
exports.ContractResourcesSchema = typebox_1.default.Object({
|
|
64
71
|
kv: typebox_1.default.Optional(typebox_1.default.Record(typebox_1.default.String({ minLength: 1 }), exports.ContractKvResourceSchema)),
|
|
72
|
+
store: typebox_1.default.Optional(typebox_1.default.Record(typebox_1.default.String({ minLength: 1 }), exports.ContractStoreResourceSchema)),
|
|
65
73
|
streams: typebox_1.default.Optional(typebox_1.default.Record(typebox_1.default.String({ minLength: 1 }), exports.ContractStreamResourceSchema)),
|
|
66
74
|
jobs: typebox_1.default.Optional(exports.ContractJobsResourceSchema),
|
|
67
75
|
});
|
|
@@ -71,6 +79,12 @@ exports.KvResourceBindingSchema = typebox_1.default.Object({
|
|
|
71
79
|
ttlMs: typebox_1.default.Integer({ minimum: 0 }),
|
|
72
80
|
maxValueBytes: typebox_1.default.Optional(typebox_1.default.Integer({ minimum: 1 })),
|
|
73
81
|
}, { additionalProperties: false });
|
|
82
|
+
exports.StoreResourceBindingSchema = typebox_1.default.Object({
|
|
83
|
+
name: typebox_1.default.String({ minLength: 1 }),
|
|
84
|
+
ttlMs: typebox_1.default.Integer({ minimum: 0 }),
|
|
85
|
+
maxObjectBytes: typebox_1.default.Optional(typebox_1.default.Integer({ minimum: 1 })),
|
|
86
|
+
maxTotalBytes: typebox_1.default.Optional(typebox_1.default.Integer({ minimum: 1 })),
|
|
87
|
+
}, { additionalProperties: false });
|
|
74
88
|
exports.StreamResourceBindingSchema = typebox_1.default.Object({
|
|
75
89
|
name: typebox_1.default.String({ minLength: 1 }),
|
|
76
90
|
retention: typebox_1.default.Optional(typebox_1.default.String({ minLength: 1 })),
|
|
@@ -110,6 +124,7 @@ exports.JobsResourceBindingSchema = typebox_1.default.Object({
|
|
|
110
124
|
}, { additionalProperties: false });
|
|
111
125
|
exports.ContractResourceBindingsSchema = typebox_1.default.Object({
|
|
112
126
|
kv: typebox_1.default.Optional(typebox_1.default.Record(typebox_1.default.String({ minLength: 1 }), exports.KvResourceBindingSchema)),
|
|
127
|
+
store: typebox_1.default.Optional(typebox_1.default.Record(typebox_1.default.String({ minLength: 1 }), exports.StoreResourceBindingSchema)),
|
|
113
128
|
streams: typebox_1.default.Optional(typebox_1.default.Record(typebox_1.default.String({ minLength: 1 }), exports.StreamResourceBindingSchema)),
|
|
114
129
|
jobs: typebox_1.default.Optional(exports.JobsResourceBindingSchema),
|
|
115
130
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../telemetry/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAGrD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initTelemetry = void 0;
|
|
4
|
+
exports.initTracing = initTracing;
|
|
5
|
+
const result_ts_1 = require("./result.ts");
|
|
6
|
+
const runtime_ts_1 = require("./runtime.ts");
|
|
7
|
+
Object.defineProperty(exports, "initTelemetry", { enumerable: true, get: function () { return runtime_ts_1.initTelemetry; } });
|
|
8
|
+
function initTracing(serviceName) {
|
|
9
|
+
(0, result_ts_1.configureErrorTraceId)();
|
|
10
|
+
(0, runtime_ts_1.initTelemetry)(serviceName);
|
|
11
|
+
}
|
|
@@ -6,6 +6,5 @@ export { getEnv } from "./env.ts";
|
|
|
6
6
|
export type { NatsHeadersLike } from "./nats.ts";
|
|
7
7
|
export { createNatsHeaderCarrier } from "./nats.ts";
|
|
8
8
|
export { configureErrorTraceId } from "./result.ts";
|
|
9
|
-
export {
|
|
10
|
-
export { getTrellisTracer, initTracing, startClientSpan, startServerSpan } from "./trellis.ts";
|
|
9
|
+
export { getTrellisTracer, startClientSpan, startServerSpan } from "./trellis.ts";
|
|
11
10
|
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../telemetry/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACzF,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,KAAK,EACL,QAAQ,EACR,aAAa,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../telemetry/mod.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACzF,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,KAAK,EACL,QAAQ,EACR,aAAa,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
package/script/telemetry/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startServerSpan = exports.startClientSpan = exports.
|
|
3
|
+
exports.startServerSpan = exports.startClientSpan = exports.getTrellisTracer = exports.configureErrorTraceId = exports.createNatsHeaderCarrier = exports.getEnv = exports.withSpanAsync = exports.withSpan = exports.trace = exports.SpanStatusCode = exports.SpanKind = exports.getTracer = exports.getActiveSpan = exports.context = exports.injectTraceContext = exports.extractTraceContext = exports.createMapCarrier = void 0;
|
|
4
4
|
var carrier_ts_1 = require("./carrier.ts");
|
|
5
5
|
Object.defineProperty(exports, "createMapCarrier", { enumerable: true, get: function () { return carrier_ts_1.createMapCarrier; } });
|
|
6
6
|
Object.defineProperty(exports, "extractTraceContext", { enumerable: true, get: function () { return carrier_ts_1.extractTraceContext; } });
|
|
@@ -20,10 +20,7 @@ var nats_ts_1 = require("./nats.ts");
|
|
|
20
20
|
Object.defineProperty(exports, "createNatsHeaderCarrier", { enumerable: true, get: function () { return nats_ts_1.createNatsHeaderCarrier; } });
|
|
21
21
|
var result_ts_1 = require("./result.ts");
|
|
22
22
|
Object.defineProperty(exports, "configureErrorTraceId", { enumerable: true, get: function () { return result_ts_1.configureErrorTraceId; } });
|
|
23
|
-
var runtime_ts_1 = require("./runtime.ts");
|
|
24
|
-
Object.defineProperty(exports, "initTelemetry", { enumerable: true, get: function () { return runtime_ts_1.initTelemetry; } });
|
|
25
23
|
var trellis_ts_1 = require("./trellis.ts");
|
|
26
24
|
Object.defineProperty(exports, "getTrellisTracer", { enumerable: true, get: function () { return trellis_ts_1.getTrellisTracer; } });
|
|
27
|
-
Object.defineProperty(exports, "initTracing", { enumerable: true, get: function () { return trellis_ts_1.initTracing; } });
|
|
28
25
|
Object.defineProperty(exports, "startClientSpan", { enumerable: true, get: function () { return trellis_ts_1.startClientSpan; } });
|
|
29
26
|
Object.defineProperty(exports, "startServerSpan", { enumerable: true, get: function () { return trellis_ts_1.startServerSpan; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../telemetry/runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../telemetry/runtime.ts"],"names":[],"mappings":"AAuFA,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAKvD"}
|
|
@@ -1,39 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.initTelemetry = initTelemetry;
|
|
27
4
|
const env_ts_1 = require("./env.ts");
|
|
28
5
|
let initialized = false;
|
|
29
6
|
let provider;
|
|
7
|
+
function runtimeImport(specifier) {
|
|
8
|
+
const load = new Function("specifier", "return import(specifier);");
|
|
9
|
+
return load(specifier);
|
|
10
|
+
}
|
|
30
11
|
async function loadTracingRuntime() {
|
|
31
12
|
const [traceNode, otlp, traceBase, resources, semantic] = await Promise.all([
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
13
|
+
runtimeImport(["@opentelemetry", "sdk-trace-node"].join("/")),
|
|
14
|
+
runtimeImport(["@opentelemetry", "exporter-trace-otlp-http"].join("/")),
|
|
15
|
+
runtimeImport(["@opentelemetry", "sdk-trace-base"].join("/")),
|
|
16
|
+
runtimeImport(["@opentelemetry", "resources"].join("/")),
|
|
17
|
+
runtimeImport(["@opentelemetry", "semantic-conventions"].join("/")),
|
|
37
18
|
]);
|
|
38
19
|
return {
|
|
39
20
|
NodeTracerProvider: traceNode.NodeTracerProvider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trellis.d.ts","sourceRoot":"","sources":["../../../../telemetry/trellis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"trellis.d.ts","sourceRoot":"","sources":["../../../../telemetry/trellis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startServerSpan = exports.startClientSpan = exports.getTrellisTracer = void 0;
|
|
4
|
-
exports.initTracing = initTracing;
|
|
5
|
-
const result_ts_1 = require("./result.ts");
|
|
6
|
-
const runtime_ts_1 = require("./runtime.ts");
|
|
7
4
|
var trace_ts_1 = require("./trace.ts");
|
|
8
5
|
Object.defineProperty(exports, "getTrellisTracer", { enumerable: true, get: function () { return trace_ts_1.getTrellisTracer; } });
|
|
9
6
|
Object.defineProperty(exports, "startClientSpan", { enumerable: true, get: function () { return trace_ts_1.startClientSpan; } });
|
|
10
7
|
Object.defineProperty(exports, "startServerSpan", { enumerable: true, get: function () { return trace_ts_1.startServerSpan; } });
|
|
11
|
-
function initTracing(serviceName) {
|
|
12
|
-
(0, result_ts_1.configureErrorTraceId)();
|
|
13
|
-
(0, runtime_ts_1.initTelemetry)(serviceName);
|
|
14
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,YAiXA,CAAC;AAIvB,eAAO,MAAM,GAAG;;;;CAIN,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,CAAC,KAAK,CAAC;AACxC,MAAM,MAAM,GAAG,GAAG,OAAO,GAAG,CAAC,OAAO,CAAC;AACrC,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,CAAC"}
|