@versori/run 0.1.0-alpha.13 → 0.1.0-alpha.9
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/esm/_dnt.shims.d.ts +5 -1
- package/esm/_dnt.shims.d.ts.map +1 -1
- package/esm/_dnt.shims.js +5 -1
- package/esm/deps/jsr.io/@nats-io/transport-deno/3.0.2/src/deno_transport.d.ts +2 -1
- package/esm/deps/jsr.io/@nats-io/transport-deno/3.0.2/src/deno_transport.d.ts.map +1 -1
- package/esm/deps/jsr.io/@nats-io/transport-deno/3.0.2/src/deno_transport.js +7 -6
- package/{script/deps/jsr.io/@std/fmt/1.0.5 → esm/deps/jsr.io/@std/fmt/1.0.6}/colors.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/fs/1.0.11 → esm/deps/jsr.io/@std/fs/1.0.16}/exists.d.ts +0 -1
- package/esm/deps/jsr.io/@std/fs/1.0.16/exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fs/{1.0.11 → 1.0.16}/exists.js +12 -10
- package/esm/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/file_handler.d.ts +3 -2
- package/esm/deps/jsr.io/@std/log/0.224.14/file_handler.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/file_handler.js +2 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +9 -7
- package/esm/src/context/Context.d.ts +4 -14
- package/esm/src/context/Context.d.ts.map +1 -1
- package/esm/src/context/Context.js +10 -16
- package/esm/src/context/ContextProvider.d.ts +4 -3
- package/esm/src/context/ContextProvider.d.ts.map +1 -1
- package/esm/src/context/ContextProvider.js +5 -5
- package/esm/src/dsl/http/versori/configloader.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/configloader.js +3 -2
- package/esm/src/dsl/http/versori/internalauth.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/internalauth.js +6 -5
- package/esm/src/dsl/http/versori/platformapi.d.ts +1 -2
- package/esm/src/dsl/http/versori/platformapi.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/platformapi.js +5 -15
- package/esm/src/dsl/http/versori/roundtripper.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/roundtripper.js +40 -36
- package/esm/src/dsl/triggers/WebhookTrigger.d.ts +3 -45
- package/esm/src/dsl/triggers/WebhookTrigger.d.ts.map +1 -1
- package/esm/src/dsl/triggers/WebhookTrigger.js +6 -10
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts +1 -6
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.js +7 -71
- package/esm/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/webhook.js +32 -106
- package/esm/src/kv/nats/NatsKeyValueProvider.d.ts.map +1 -1
- package/esm/src/kv/nats/NatsKeyValueProvider.js +8 -7
- package/package.json +6 -3
- package/script/_dnt.shims.d.ts +5 -1
- package/script/_dnt.shims.d.ts.map +1 -1
- package/script/_dnt.shims.js +7 -2
- package/script/deps/jsr.io/@nats-io/transport-deno/3.0.2/src/deno_transport.d.ts +2 -1
- package/script/deps/jsr.io/@nats-io/transport-deno/3.0.2/src/deno_transport.d.ts.map +1 -1
- package/script/deps/jsr.io/@nats-io/transport-deno/3.0.2/src/deno_transport.js +33 -9
- package/{esm/deps/jsr.io/@std/fmt/1.0.5 → script/deps/jsr.io/@std/fmt/1.0.6}/colors.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/fs/1.0.11 → script/deps/jsr.io/@std/fs/1.0.16}/exists.d.ts +0 -1
- package/script/deps/jsr.io/@std/fs/1.0.16/exists.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fs/{1.0.11 → 1.0.16}/exists.js +35 -10
- package/script/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
- package/script/deps/jsr.io/@std/log/0.224.14/file_handler.d.ts +3 -2
- package/script/deps/jsr.io/@std/log/0.224.14/file_handler.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/log/0.224.14/file_handler.js +25 -1
- package/script/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.js +32 -7
- package/script/src/context/Context.d.ts +4 -14
- package/script/src/context/Context.d.ts.map +1 -1
- package/script/src/context/Context.js +10 -16
- package/script/src/context/ContextProvider.d.ts +4 -3
- package/script/src/context/ContextProvider.d.ts.map +1 -1
- package/script/src/context/ContextProvider.js +5 -5
- package/script/src/dsl/http/versori/configloader.d.ts.map +1 -1
- package/script/src/dsl/http/versori/configloader.js +26 -2
- package/script/src/dsl/http/versori/internalauth.d.ts.map +1 -1
- package/script/src/dsl/http/versori/internalauth.js +29 -5
- package/script/src/dsl/http/versori/platformapi.d.ts +1 -2
- package/script/src/dsl/http/versori/platformapi.d.ts.map +1 -1
- package/script/src/dsl/http/versori/platformapi.js +28 -15
- package/script/src/dsl/http/versori/roundtripper.d.ts.map +1 -1
- package/script/src/dsl/http/versori/roundtripper.js +63 -36
- package/script/src/dsl/triggers/WebhookTrigger.d.ts +3 -45
- package/script/src/dsl/triggers/WebhookTrigger.d.ts.map +1 -1
- package/script/src/dsl/triggers/WebhookTrigger.js +6 -10
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts +1 -6
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/memory/MemoryInterpreter.js +30 -71
- package/script/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/webhook.js +32 -109
- package/script/src/kv/nats/NatsKeyValueProvider.d.ts.map +1 -1
- package/script/src/kv/nats/NatsKeyValueProvider.js +31 -7
- package/esm/deps/jsr.io/@std/fs/1.0.11/exists.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/fs/1.0.11/exists.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/fmt/{1.0.5 → 1.0.6}/colors.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/fmt/{1.0.5 → 1.0.6}/colors.js +0 -0
- /package/script/deps/jsr.io/@std/fmt/{1.0.5 → 1.0.6}/colors.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fmt/{1.0.5 → 1.0.6}/colors.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NatsKeyValueProvider.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/nats/NatsKeyValueProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NatsKeyValueProvider.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/nats/NatsKeyValueProvider.ts"],"names":[],"mappings":"AAGA,OAAO,EAA+B,UAAU,EAAE,MAAM,+DAA+D,CAAC;AACxH,OAAO,EACH,cAAc,EAEd,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACZ,MAAM,gBAAgB,CAAC;AA4CxB,MAAM,MAAM,2BAA2B,GAAG;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,GAAG,CAAC,EAAE,UAAU,CAAC;KACpB,CAAC;CACL,CAAC;AAuBF,qBAAa,oBAAqB,YAAW,gBAAgB,EAAE,eAAe;IAEtE,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,IAAI;IALzB,OAAO;WAQM,WAAW,CACpB,IAAI,GAAE,OAAO,CAAC,2BAA2B,CAAM,GAChD,OAAO,CAAC,oBAAoB,CAAC;IA0BhC,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAI/C,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC;IAI1C,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,QAAQ;IAqB1B,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBrD,OAAO,CAAC,aAAa;CAYxB"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import * as dntShim from "../../../_dnt.shims.js";
|
|
1
2
|
import { JetStreamApiCodes, JetStreamApiError } from '../../../deps/jsr.io/@nats-io/jetstream/3.0.2/src/mod.js';
|
|
2
3
|
import { Kvm } from '../../../deps/jsr.io/@nats-io/kv/3.0.2/src/mod.js';
|
|
3
4
|
import { connect, credsAuthenticator } from '../../../deps/jsr.io/@nats-io/transport-deno/3.0.2/src/mod.js';
|
|
4
5
|
import { isKVOptionsExecution, } from '../KeyValue.js';
|
|
5
6
|
import { NatsKeyValue } from './NatsKeyValue.js';
|
|
6
7
|
function getOptionsFromEnv() {
|
|
7
|
-
const natsTlsCaFile = Deno.env.get('RUN_NATS_TLS_CA_FILE');
|
|
8
|
+
const natsTlsCaFile = dntShim.Deno.env.get('RUN_NATS_TLS_CA_FILE');
|
|
8
9
|
return {
|
|
9
|
-
organizationId: Deno.env.get('RUN_ORGANISATION_ID'),
|
|
10
|
-
projectId: Deno.env.get('RUN_SERVICE_ID'),
|
|
11
|
-
environment: Deno.env.get('RUN_ENVIRONMENT'),
|
|
10
|
+
organizationId: dntShim.Deno.env.get('RUN_ORGANISATION_ID'),
|
|
11
|
+
projectId: dntShim.Deno.env.get('RUN_SERVICE_ID'),
|
|
12
|
+
environment: dntShim.Deno.env.get('RUN_ENVIRONMENT'),
|
|
12
13
|
nats: {
|
|
13
|
-
url: Deno.env.get('RUN_NATS_URL') || 'nats://localhost:4222',
|
|
14
|
-
credsFile: Deno.env.get('RUN_NATS_CREDS_FILE'),
|
|
14
|
+
url: dntShim.Deno.env.get('RUN_NATS_URL') || 'nats://localhost:4222',
|
|
15
|
+
credsFile: dntShim.Deno.env.get('RUN_NATS_CREDS_FILE'),
|
|
15
16
|
...(natsTlsCaFile && {
|
|
16
17
|
tls: {
|
|
17
18
|
caFile: natsTlsCaFile,
|
|
@@ -84,7 +85,7 @@ export class NatsKeyValueProvider {
|
|
|
84
85
|
static async newInstance(opts = {}) {
|
|
85
86
|
const parsedOpts = mergeOptions(getOptionsFromEnv(), opts);
|
|
86
87
|
const credsFile = parsedOpts.nats.credsFile
|
|
87
|
-
? await Deno.readFile(parsedOpts.nats.credsFile)
|
|
88
|
+
? await dntShim.Deno.readFile(parsedOpts.nats.credsFile)
|
|
88
89
|
: undefined;
|
|
89
90
|
const conn = await connect({
|
|
90
91
|
servers: [parsedOpts.nats.url],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versori/run",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "v0.1.0-alpha.9",
|
|
4
4
|
"description": "Versori Run",
|
|
5
5
|
"homepage": "https://github.com/versori/versori-run#readme",
|
|
6
6
|
"repository": {
|
|
@@ -28,9 +28,12 @@
|
|
|
28
28
|
"@connectrpc/connect-node": "^2.0.1",
|
|
29
29
|
"cron": "3.5.0",
|
|
30
30
|
"express": "^4.18.3",
|
|
31
|
-
"lru-cache": "^11.0.2",
|
|
32
31
|
"rxjs": "^7.8.1",
|
|
33
|
-
"tweetnacl": "1.0.3"
|
|
32
|
+
"tweetnacl": "1.0.3",
|
|
33
|
+
"@deno/shim-deno": "~0.18.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^20.9.0"
|
|
34
37
|
},
|
|
35
38
|
"_generatedBy": "dnt@dev"
|
|
36
39
|
}
|
package/script/_dnt.shims.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { Deno } from "@deno/shim-deno";
|
|
2
|
+
export { Deno } from "@deno/shim-deno";
|
|
3
|
+
export declare const dntGlobalThis: Omit<typeof globalThis, "Deno"> & {
|
|
4
|
+
Deno: typeof Deno;
|
|
5
|
+
};
|
|
2
6
|
//# sourceMappingURL=_dnt.shims.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAKvC,eAAO,MAAM,aAAa;;CAA2C,CAAC"}
|
package/script/_dnt.shims.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dntGlobalThis = void 0;
|
|
4
|
-
const
|
|
3
|
+
exports.dntGlobalThis = exports.Deno = void 0;
|
|
4
|
+
const shim_deno_1 = require("@deno/shim-deno");
|
|
5
|
+
var shim_deno_2 = require("@deno/shim-deno");
|
|
6
|
+
Object.defineProperty(exports, "Deno", { enumerable: true, get: function () { return shim_deno_2.Deno; } });
|
|
7
|
+
const dntGlobals = {
|
|
8
|
+
Deno: shim_deno_1.Deno,
|
|
9
|
+
};
|
|
5
10
|
exports.dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
6
11
|
function createMergeProxy(baseObj, extObj) {
|
|
7
12
|
return new Proxy(baseObj, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as dntShim from "../../../../../../_dnt.shims.js";
|
|
1
2
|
import type { ConnectionOptions, ServerInfo, Transport } from "../../../nats-core/3.0.2/src/internal_mod.js";
|
|
2
3
|
export declare class DenoTransport implements Transport {
|
|
3
4
|
version: string;
|
|
@@ -19,7 +20,7 @@ export declare class DenoTransport implements Transport {
|
|
|
19
20
|
}, options: ConnectionOptions): Promise<void>;
|
|
20
21
|
get isClosed(): boolean;
|
|
21
22
|
peekInfo(): Promise<ServerInfo>;
|
|
22
|
-
loadTlsOptions(hostname: string): Promise<Deno.StartTlsOptions>;
|
|
23
|
+
loadTlsOptions(hostname: string): Promise<dntShim.Deno.StartTlsOptions>;
|
|
23
24
|
startTLS(hostname: string): Promise<void>;
|
|
24
25
|
[Symbol.asyncIterator](): AsyncIterableIterator<Uint8Array>;
|
|
25
26
|
maybeWriteFrame(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deno_transport.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@nats-io/transport-deno/3.0.2/src/deno_transport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deno_transport.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@nats-io/transport-deno/3.0.2/src/deno_transport.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,OAAO,MAAM,iCAAiC,CAAC;AAe3D,OAAO,KAAK,EACV,iBAAiB,EAEjB,UAAU,EAEV,SAAS,EACV,MAAM,8CAA8C,CAAC;AAUtD,qBAAa,aAAc,YAAW,SAAS;IAC7C,OAAO,EAAE,MAAM,CAAW;IAC1B,IAAI,EAAE,MAAM,CAAQ;IACpB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,kBAAkB,CAAsC;IAChE,OAAO,CAAC,IAAI,CAA+C;IAC3D,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,YAAY,CAAuB;;IAQrC,OAAO,CACX,EAAE,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EACvD,OAAO,EAAE,iBAAiB;IA4C5B,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAEK,QAAQ,IAAI,OAAO,CAAC,UAAU,CAAC;IAgC/B,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC;IAoBvE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAcxC,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,UAAU,CAAC;IA2BlE,eAAe,IAAI,IAAI;IAuBvB,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAU7B,WAAW,IAAI,OAAO;IAItB,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjC,UAAU;IAKJ,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,UAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAyC1D,MAAM,IAAI,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC;IAI/B,OAAO;CAGR;AAED,wBAAsB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAelE"}
|
|
@@ -1,4 +1,30 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.DenoTransport = void 0;
|
|
27
|
+
exports.denoResolveHost = denoResolveHost;
|
|
2
28
|
/*
|
|
3
29
|
* Copyright 2020-2024 The NATS Authors
|
|
4
30
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -13,9 +39,7 @@
|
|
|
13
39
|
* See the License for the specific language governing permissions and
|
|
14
40
|
* limitations under the License.
|
|
15
41
|
*/
|
|
16
|
-
|
|
17
|
-
exports.DenoTransport = void 0;
|
|
18
|
-
exports.denoResolveHost = denoResolveHost;
|
|
42
|
+
const dntShim = __importStar(require("../../../../../../_dnt.shims.js"));
|
|
19
43
|
const internal_mod_js_1 = require("../../../nats-core/3.0.2/src/internal_mod.js");
|
|
20
44
|
const mod_js_1 = require("../../../../@std/io/0.225.2/mod.js");
|
|
21
45
|
const version_js_1 = require("./version.js");
|
|
@@ -106,12 +130,12 @@ class DenoTransport {
|
|
|
106
130
|
hostname: hp.hostname,
|
|
107
131
|
port: hp.port,
|
|
108
132
|
};
|
|
109
|
-
this.conn = await Deno.connectTls(ctls);
|
|
133
|
+
this.conn = await dntShim.Deno.connectTls(ctls);
|
|
110
134
|
this.encrypted = true;
|
|
111
135
|
// do nothing yet.
|
|
112
136
|
}
|
|
113
137
|
else {
|
|
114
|
-
this.conn = await Deno.connect(hp);
|
|
138
|
+
this.conn = await dntShim.Deno.connect(hp);
|
|
115
139
|
}
|
|
116
140
|
if (this.done) {
|
|
117
141
|
this.conn.close();
|
|
@@ -183,14 +207,14 @@ class DenoTransport {
|
|
|
183
207
|
(0, internal_mod_js_1.checkUnsupportedOption)("tls.keyFile", tls.keyFile);
|
|
184
208
|
const sto = { hostname };
|
|
185
209
|
if (tls.caFile) {
|
|
186
|
-
const ca = await Deno.readTextFile(tls.caFile);
|
|
210
|
+
const ca = await dntShim.Deno.readTextFile(tls.caFile);
|
|
187
211
|
sto.caCerts = [ca];
|
|
188
212
|
}
|
|
189
213
|
return sto;
|
|
190
214
|
}
|
|
191
215
|
async startTLS(hostname) {
|
|
192
216
|
const sto = await (this.loadTlsOptions(hostname));
|
|
193
|
-
this.conn = await Deno.startTls(
|
|
217
|
+
this.conn = await dntShim.Deno.startTls(
|
|
194
218
|
//@ts-ignore: just the conn
|
|
195
219
|
this.conn, sto);
|
|
196
220
|
// this is necessary because the startTls process doesn't
|
|
@@ -316,8 +340,8 @@ class DenoTransport {
|
|
|
316
340
|
}
|
|
317
341
|
exports.DenoTransport = DenoTransport;
|
|
318
342
|
async function denoResolveHost(s) {
|
|
319
|
-
const a = Deno.resolveDns(s, "A");
|
|
320
|
-
const aaaa = Deno.resolveDns(s, "AAAA");
|
|
343
|
+
const a = dntShim.Deno.resolveDns(s, "A");
|
|
344
|
+
const aaaa = dntShim.Deno.resolveDns(s, "AAAA");
|
|
321
345
|
const ips = [];
|
|
322
346
|
const w = await Promise.allSettled([a, aaaa]);
|
|
323
347
|
if (w[0].status === "fulfilled") {
|
package/{esm/deps/jsr.io/@std/fmt/1.0.5 → script/deps/jsr.io/@std/fmt/1.0.6}/colors.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fmt/1.0.
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fmt/1.0.6/colors.ts"],"names":[],"mappings":"AAoEA,qEAAqE;AACrE,MAAM,WAAW,GAAG;IAClB,0BAA0B;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,4BAA4B;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,CAAC,EAAE,MAAM,CAAC;CACX;AAID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,QAM7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AA0BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,C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;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AACH,wBAAsB,MAAM,CAC1B,IAAI,EAAE,MAAM,GAAG,GAAG,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,OAAO,CAAC,CAsClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,GAAG,GAAG,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAqCT"}
|
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
3
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
27
|
exports.exists = exists;
|
|
5
28
|
exports.existsSync = existsSync;
|
|
29
|
+
/** Options for {@linkcode exists} and {@linkcode existsSync.} */
|
|
30
|
+
const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
6
31
|
/**
|
|
7
32
|
* Asynchronously test whether or not the given path exists by checking with
|
|
8
33
|
* the file system.
|
|
@@ -102,7 +127,7 @@ exports.existsSync = existsSync;
|
|
|
102
127
|
*/
|
|
103
128
|
async function exists(path, options) {
|
|
104
129
|
try {
|
|
105
|
-
const stat = await Deno.stat(path);
|
|
130
|
+
const stat = await dntShim.Deno.stat(path);
|
|
106
131
|
if (options &&
|
|
107
132
|
(options.isReadable || options.isDirectory || options.isFile)) {
|
|
108
133
|
if (options.isDirectory && options.isFile) {
|
|
@@ -119,11 +144,11 @@ async function exists(path, options) {
|
|
|
119
144
|
return true;
|
|
120
145
|
}
|
|
121
146
|
catch (error) {
|
|
122
|
-
if (error instanceof Deno.errors.NotFound) {
|
|
147
|
+
if (error instanceof dntShim.Deno.errors.NotFound) {
|
|
123
148
|
return false;
|
|
124
149
|
}
|
|
125
|
-
if (error instanceof Deno.errors.PermissionDenied) {
|
|
126
|
-
if ((await Deno.permissions.query({ name: "read", path })).state ===
|
|
150
|
+
if (error instanceof dntShim.Deno.errors.PermissionDenied) {
|
|
151
|
+
if ((await dntShim.Deno.permissions.query({ name: "read", path })).state ===
|
|
127
152
|
"granted") {
|
|
128
153
|
// --allow-read not missing
|
|
129
154
|
return !options?.isReadable; // PermissionDenied was raised by file system, so the item exists, but can't be read
|
|
@@ -230,7 +255,7 @@ async function exists(path, options) {
|
|
|
230
255
|
*/
|
|
231
256
|
function existsSync(path, options) {
|
|
232
257
|
try {
|
|
233
|
-
const stat = Deno.statSync(path);
|
|
258
|
+
const stat = dntShim.Deno.statSync(path);
|
|
234
259
|
if (options &&
|
|
235
260
|
(options.isReadable || options.isDirectory || options.isFile)) {
|
|
236
261
|
if (options.isDirectory && options.isFile) {
|
|
@@ -247,11 +272,11 @@ function existsSync(path, options) {
|
|
|
247
272
|
return true;
|
|
248
273
|
}
|
|
249
274
|
catch (error) {
|
|
250
|
-
if (error instanceof Deno.errors.NotFound) {
|
|
275
|
+
if (error instanceof dntShim.Deno.errors.NotFound) {
|
|
251
276
|
return false;
|
|
252
277
|
}
|
|
253
|
-
if (error instanceof Deno.errors.PermissionDenied) {
|
|
254
|
-
if (Deno.permissions.querySync({ name: "read", path }).state === "granted") {
|
|
278
|
+
if (error instanceof dntShim.Deno.errors.PermissionDenied) {
|
|
279
|
+
if (dntShim.Deno.permissions.querySync({ name: "read", path }).state === "granted") {
|
|
255
280
|
// --allow-read not missing
|
|
256
281
|
return !options?.isReadable; // PermissionDenied was raised by file system, so the item exists, but can't be read
|
|
257
282
|
}
|
|
@@ -263,10 +288,10 @@ function fileIsReadable(stat) {
|
|
|
263
288
|
if (stat.mode === null) {
|
|
264
289
|
return true; // Exclusive on Non-POSIX systems
|
|
265
290
|
}
|
|
266
|
-
else if (Deno.uid() === stat.uid) {
|
|
291
|
+
else if (dntShim.Deno.uid() === stat.uid) {
|
|
267
292
|
return (stat.mode & 0o400) === 0o400; // User is owner and can read?
|
|
268
293
|
}
|
|
269
|
-
else if (Deno.gid() === stat.gid) {
|
|
294
|
+
else if (dntShim.Deno.gid() === stat.gid) {
|
|
270
295
|
return (stat.mode & 0o040) === 0o040; // User group is owner and can read?
|
|
271
296
|
}
|
|
272
297
|
return (stat.mode & 0o004) === 0o004; // Others can read?
|
|
@@ -16,7 +16,7 @@ exports.ConsoleHandler = void 0;
|
|
|
16
16
|
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
17
17
|
// This module is browser compatible.
|
|
18
18
|
const levels_js_1 = require("./levels.js");
|
|
19
|
-
const colors_js_1 = require("../../fmt/1.0.
|
|
19
|
+
const colors_js_1 = require("../../fmt/1.0.6/colors.js");
|
|
20
20
|
const base_handler_js_1 = require("./base_handler.js");
|
|
21
21
|
function applyColors(msg, level) {
|
|
22
22
|
switch (level) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as dntShim from "../../../../../_dnt.shims.js";
|
|
1
2
|
import { type LevelName } from "./levels.js";
|
|
2
3
|
import type { LogRecord } from "./logger.js";
|
|
3
4
|
import { BaseHandler, type BaseHandlerOptions } from "./base_handler.js";
|
|
@@ -55,7 +56,7 @@ export declare class FileHandler extends BaseHandler {
|
|
|
55
56
|
*
|
|
56
57
|
* @private
|
|
57
58
|
*/
|
|
58
|
-
[fileSymbol]: Deno.FsFile | undefined;
|
|
59
|
+
[fileSymbol]: dntShim.Deno.FsFile | undefined;
|
|
59
60
|
/** Buffer used to write to file.
|
|
60
61
|
*
|
|
61
62
|
* @private
|
|
@@ -84,7 +85,7 @@ export declare class FileHandler extends BaseHandler {
|
|
|
84
85
|
*
|
|
85
86
|
* @private
|
|
86
87
|
*/
|
|
87
|
-
[openOptionsSymbol]: Deno.OpenOptions;
|
|
88
|
+
[openOptionsSymbol]: dntShim.Deno.OpenOptions;
|
|
88
89
|
/**
|
|
89
90
|
* Text encoder.
|
|
90
91
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file_handler.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/log/0.224.14/file_handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EACL,SAAS,EACT,aAAa,EACb,cAAc,EACd,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,sFAAsF;AACtF,MAAM,MAAM,OAAO,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEtC,2CAA2C;AAC3C,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,WAAY,SAAQ,WAAW;;IAC1C;;;OAGG;IACH,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"file_handler.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/log/0.224.14/file_handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EACL,SAAS,EACT,aAAa,EACb,cAAc,EACd,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,sFAAsF;AACtF,MAAM,MAAM,OAAO,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEtC,2CAA2C;AAC3C,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,WAAY,SAAQ,WAAW;;IAC1C;;;OAGG;IACH,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC9C;;;OAGG;IACH,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC;IACxB;;;;OAIG;IACH,CAAC,aAAa,CAAC,SAAK;IACpB;;;;OAIG;IACH,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;IAC9C;;;;OAIG;IACH,CAAC,aAAa,CAAC,EAAE,WAAW,CAAqB;IAKjD;;;;;OAKG;gBACS,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB;IAe7D;;;;;;;;;;;OAWG;IACM,KAAK;IAUd;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACM,MAAM,CAAC,SAAS,EAAE,SAAS;IASpC;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM;IAaf;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK;IAgBL;;;;;;;;;;;;;;OAcG;IACM,OAAO;CAMjB"}
|
|
@@ -1,4 +1,27 @@
|
|
|
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
|
+
};
|
|
2
25
|
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
26
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
27
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -8,6 +31,7 @@ var _FileHandler_instances, _FileHandler_unloadCallback, _FileHandler_resetBuffe
|
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.FileHandler = void 0;
|
|
10
33
|
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
34
|
+
const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
11
35
|
const levels_js_1 = require("./levels.js");
|
|
12
36
|
const base_handler_js_1 = require("./base_handler.js");
|
|
13
37
|
const write_all_js_1 = require("../../io/0.225.2/write_all.js");
|
|
@@ -144,7 +168,7 @@ class FileHandler extends base_handler_js_1.BaseHandler {
|
|
|
144
168
|
* ```
|
|
145
169
|
*/
|
|
146
170
|
setup() {
|
|
147
|
-
this[_file_handler_symbols_js_1.fileSymbol] = Deno.openSync(this[_file_handler_symbols_js_1.filenameSymbol], this[_file_handler_symbols_js_1.openOptionsSymbol]);
|
|
171
|
+
this[_file_handler_symbols_js_1.fileSymbol] = dntShim.Deno.openSync(this[_file_handler_symbols_js_1.filenameSymbol], this[_file_handler_symbols_js_1.openOptionsSymbol]);
|
|
148
172
|
__classPrivateFieldGet(this, _FileHandler_instances, "m", _FileHandler_resetBuffer).call(this);
|
|
149
173
|
addEventListener("unload", __classPrivateFieldGet(this, _FileHandler_unloadCallback, "f"));
|
|
150
174
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rotating_file_handler.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rotating_file_handler.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/log/0.224.14/rotating_file_handler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AASzE,UAAU,0BAA2B,SAAQ,kBAAkB;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;;gBAKtC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,0BAA0B;IAM5D,KAAK;IAyCL,GAAG,CAAC,GAAG,EAAE,MAAM;IAaxB,cAAc;CAkBf"}
|
|
@@ -1,4 +1,27 @@
|
|
|
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
|
+
};
|
|
2
25
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
26
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
27
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -13,7 +36,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
36
|
var _RotatingFileHandler_maxBytes, _RotatingFileHandler_maxBackupCount, _RotatingFileHandler_currentFileSize;
|
|
14
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
38
|
exports.RotatingFileHandler = void 0;
|
|
16
|
-
|
|
39
|
+
// Copyright 2018-2025 the Deno authors. MIT license.
|
|
40
|
+
const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
|
|
41
|
+
const exists_js_1 = require("../../fs/1.0.16/exists.js");
|
|
17
42
|
const file_handler_js_1 = require("./file_handler.js");
|
|
18
43
|
const _file_handler_symbols_js_1 = require("./_file_handler_symbols.js");
|
|
19
44
|
/**
|
|
@@ -78,10 +103,10 @@ class RotatingFileHandler extends file_handler_js_1.FileHandler {
|
|
|
78
103
|
// log file, but old backups
|
|
79
104
|
for (let i = 1; i <= __classPrivateFieldGet(this, _RotatingFileHandler_maxBackupCount, "f"); i++) {
|
|
80
105
|
try {
|
|
81
|
-
Deno.removeSync(this[_file_handler_symbols_js_1.filenameSymbol] + "." + i);
|
|
106
|
+
dntShim.Deno.removeSync(this[_file_handler_symbols_js_1.filenameSymbol] + "." + i);
|
|
82
107
|
}
|
|
83
108
|
catch (error) {
|
|
84
|
-
if (!(error instanceof Deno.errors.NotFound)) {
|
|
109
|
+
if (!(error instanceof dntShim.Deno.errors.NotFound)) {
|
|
85
110
|
throw error;
|
|
86
111
|
}
|
|
87
112
|
}
|
|
@@ -92,13 +117,13 @@ class RotatingFileHandler extends file_handler_js_1.FileHandler {
|
|
|
92
117
|
for (let i = 1; i <= __classPrivateFieldGet(this, _RotatingFileHandler_maxBackupCount, "f"); i++) {
|
|
93
118
|
if ((0, exists_js_1.existsSync)(this[_file_handler_symbols_js_1.filenameSymbol] + "." + i)) {
|
|
94
119
|
this.destroy();
|
|
95
|
-
throw new Deno.errors.AlreadyExists("Backup log file " + this[_file_handler_symbols_js_1.filenameSymbol] + "." + i +
|
|
120
|
+
throw new dntShim.Deno.errors.AlreadyExists("Backup log file " + this[_file_handler_symbols_js_1.filenameSymbol] + "." + i +
|
|
96
121
|
" already exists");
|
|
97
122
|
}
|
|
98
123
|
}
|
|
99
124
|
}
|
|
100
125
|
else {
|
|
101
|
-
__classPrivateFieldSet(this, _RotatingFileHandler_currentFileSize, (Deno.statSync(this[_file_handler_symbols_js_1.filenameSymbol])).size, "f");
|
|
126
|
+
__classPrivateFieldSet(this, _RotatingFileHandler_currentFileSize, (dntShim.Deno.statSync(this[_file_handler_symbols_js_1.filenameSymbol])).size, "f");
|
|
102
127
|
}
|
|
103
128
|
}
|
|
104
129
|
log(msg) {
|
|
@@ -117,10 +142,10 @@ class RotatingFileHandler extends file_handler_js_1.FileHandler {
|
|
|
117
142
|
const source = this[_file_handler_symbols_js_1.filenameSymbol] + (i === 0 ? "" : "." + i);
|
|
118
143
|
const dest = this[_file_handler_symbols_js_1.filenameSymbol] + "." + (i + 1);
|
|
119
144
|
if ((0, exists_js_1.existsSync)(source)) {
|
|
120
|
-
Deno.renameSync(source, dest);
|
|
145
|
+
dntShim.Deno.renameSync(source, dest);
|
|
121
146
|
}
|
|
122
147
|
}
|
|
123
|
-
this[_file_handler_symbols_js_1.fileSymbol] = Deno.openSync(this[_file_handler_symbols_js_1.filenameSymbol], this[_file_handler_symbols_js_1.openOptionsSymbol]);
|
|
148
|
+
this[_file_handler_symbols_js_1.fileSymbol] = dntShim.Deno.openSync(this[_file_handler_symbols_js_1.filenameSymbol], this[_file_handler_symbols_js_1.openOptionsSymbol]);
|
|
124
149
|
}
|
|
125
150
|
}
|
|
126
151
|
exports.RotatingFileHandler = RotatingFileHandler;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { Activation } from '../dsl/http/types.js';
|
|
2
2
|
import { KeyValue, KeyValueProvider, KeyValueScope } from '../kv/KeyValue.js';
|
|
3
3
|
import { Logger } from '../observability/logging/Logger.js';
|
|
4
|
-
export type OnSuccessFn = (ctx: Context<any>) => void;
|
|
5
|
-
export type OnErrorFn = (ctx: Context<any>) => void;
|
|
6
|
-
export type ContextOptions = {
|
|
7
|
-
activation?: Activation;
|
|
8
|
-
onSuccess?: OnSuccessFn;
|
|
9
|
-
onError?: OnErrorFn;
|
|
10
|
-
};
|
|
11
4
|
export interface Context<D> {
|
|
12
5
|
log: Logger;
|
|
13
6
|
executionId: string;
|
|
@@ -22,26 +15,23 @@ export interface Context<D> {
|
|
|
22
15
|
}
|
|
23
16
|
export interface InternalContext<D, Index = void> extends Context<D> {
|
|
24
17
|
withData<D2>(data: D2): InternalContext<D2, Index>;
|
|
25
|
-
withActivation(activation: Activation): InternalContext<D, Index>;
|
|
18
|
+
withActivation(activation: Activation | undefined): InternalContext<D, Index>;
|
|
26
19
|
setIndex(idx: number): InternalContext<D, number>;
|
|
27
20
|
idx: Index;
|
|
28
|
-
readonly activation: Activation | undefined;
|
|
29
21
|
readonly kvp: KeyValueProvider;
|
|
30
|
-
readonly options: ContextOptions;
|
|
31
22
|
destroy(scope: KeyValueScope): Promise<void>;
|
|
32
23
|
}
|
|
33
24
|
export declare class ContextImpl<D, Index = void> implements InternalContext<D, Index> {
|
|
34
25
|
log: Logger;
|
|
35
26
|
executionId: string;
|
|
36
27
|
startTime: Date;
|
|
28
|
+
activation?: Activation | undefined;
|
|
37
29
|
data: D;
|
|
38
30
|
idx: Index;
|
|
39
31
|
readonly kvp: KeyValueProvider;
|
|
40
|
-
|
|
41
|
-
constructor(log: Logger, kvp: KeyValueProvider, executionId: string, startTime: Date, data: D, options: ContextOptions);
|
|
42
|
-
get activation(): Activation | undefined;
|
|
32
|
+
constructor(log: Logger, kvp: KeyValueProvider, executionId: string, startTime: Date, data: D, activation?: Activation | undefined);
|
|
43
33
|
setIndex(idx: number): InternalContext<D, number>;
|
|
44
|
-
withActivation(activation: Activation): InternalContext<D, Index>;
|
|
34
|
+
withActivation(activation: Activation | undefined): InternalContext<D, Index>;
|
|
45
35
|
withData<D2>(data: D2): InternalContext<D2, Index>;
|
|
46
36
|
openKv(scope?: KeyValueScope): KeyValue;
|
|
47
37
|
destroy(scope: KeyValueScope): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/src/context/Context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC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