@tailor-platform/sdk 1.40.0 → 1.43.0
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/CHANGELOG.md +58 -0
- package/README.md +23 -0
- package/dist/{actor-B2oEmlTc.d.mts → actor-DzCuoMlP.d.mts} +2 -2
- package/dist/{application-C_LFXkKJ.mjs → application-DQpD_kHR.mjs} +88 -9
- package/dist/application-DQpD_kHR.mjs.map +1 -0
- package/dist/application-DUcmoFdc.mjs +4 -0
- package/dist/brand-Ll48SMXe.mjs.map +1 -1
- package/dist/cli/index.mjs +34 -29
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +49 -7
- package/dist/cli/lib.mjs +4 -4
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/{client-DjGFRjH4.mjs → client-CcV6Jjds.mjs} +8 -5
- package/dist/{client-DjGFRjH4.mjs.map → client-CcV6Jjds.mjs.map} +1 -1
- package/dist/{client-Dtf48x0o.mjs → client-Cn9SqhZT.mjs} +1 -1
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +83 -3
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-CEIXtw4D.mjs → crash-report-CSYupJ0T.mjs} +1 -1
- package/dist/{crash-report-CSWITsTz.mjs → crash-report-CUbm1ErM.mjs} +2 -2
- package/dist/{crash-report-CSWITsTz.mjs.map → crash-report-CUbm1ErM.mjs.map} +1 -1
- package/dist/{index-Chvw1Eod.d.mts → index-0Dk-fDWi.d.mts} +2 -2
- package/dist/{index-CiNNNpuH.d.mts → index-BEEL1-6Z.d.mts} +2 -2
- package/dist/{index-D_ezppY7.d.mts → index-Br4XCvX1.d.mts} +103 -86
- package/dist/{index-BtXZdz-F.d.mts → index-DdsUV-aA.d.mts} +2 -2
- package/dist/{index-reFAYSX7.d.mts → index-ZZYEd_0R.d.mts} +2 -2
- package/dist/{job-p6zf8Qpg.mjs → job-BOvKyNdT.mjs} +15 -9
- package/dist/job-BOvKyNdT.mjs.map +1 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/index.d.mts +2 -2
- package/dist/{runtime-im7Sq4jO.mjs → runtime-Bn68JXnL.mjs} +199 -79
- package/dist/runtime-Bn68JXnL.mjs.map +1 -0
- package/dist/{tailor-db-field-CoFKRCYW.d.mts → tailor-db-field-D_z185oq.d.mts} +36 -6
- package/dist/utils/test/index.d.mts +36 -3
- package/dist/utils/test/index.mjs +78 -9
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/{workflow.generated-Btz6srLR.d.mts → workflow.generated-CDCnZNkH.d.mts} +2 -2
- package/docs/cli/function.md +83 -1
- package/docs/cli-reference.md +3 -1
- package/docs/services/executor.md +4 -0
- package/docs/services/idp.md +93 -56
- package/docs/services/resolver.md +4 -2
- package/docs/services/workflow.md +117 -3
- package/docs/testing.md +95 -7
- package/package.json +23 -23
- package/dist/application-CEeKm4R-.mjs +0 -4
- package/dist/application-C_LFXkKJ.mjs.map +0 -1
- package/dist/job-p6zf8Qpg.mjs.map +0 -1
- package/dist/runtime-im7Sq4jO.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 1.43.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1062](https://github.com/tailor-platform/sdk/pull/1062) [`7c39665`](https://github.com/tailor-platform/sdk/commit/7c39665bc3364d3bc644c5277f3f9f51926fc2b2) Thanks [@dqn](https://github.com/dqn)! - Auto-enable `publishUserEvents` on IdP services when the project defines executors with `idpUser` triggers (`idpUserCreatedTrigger`, `idpUserUpdatedTrigger`, `idpUserDeletedTrigger`, or `idpUserTrigger`). Previously, omitting `publishUserEvents` defaulted to `false`, silently preventing those executors from firing. The SDK now auto-configures `publishUserEvents: true` for every IdP in the project when any executor uses an `idpUser` trigger, and warns if an IdP explicitly sets `publishUserEvents: false` while such executors are present. Set `publishUserEvents: false` explicitly to opt out.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#1060](https://github.com/tailor-platform/sdk/pull/1060) [`4ffec9f`](https://github.com/tailor-platform/sdk/commit/4ffec9f86766dc1199ccef31223697c786c3f388) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update oxc
|
|
12
|
+
|
|
13
|
+
## 1.42.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#1046](https://github.com/tailor-platform/sdk/pull/1046) [`9f99c0d`](https://github.com/tailor-platform/sdk/commit/9f99c0d284a5f227acafbb41db6db0bf7293c496) Thanks [@remiposo](https://github.com/remiposo)! - Expose `invoker` on resolver/executor/workflow body contexts. The SDK now calls `tailor.context.getInvoker()` inside bundled wrappers and passes the result to user code as `context.invoker` / `args.invoker`. This reflects `authInvoker` delegation (machine user when specified) and is `null` for anonymous callers.
|
|
18
|
+
|
|
19
|
+
## 1.41.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- [#514](https://github.com/tailor-platform/sdk/pull/514) [`3047d45`](https://github.com/tailor-platform/sdk/commit/3047d45fd8daa38616ecaad20d5c04cf75d23931) Thanks [@r253hmdryou](https://github.com/r253hmdryou)! - Add `function get` and `function list` CLI commands for querying function registries in a workspace
|
|
24
|
+
|
|
25
|
+
- [#987](https://github.com/tailor-platform/sdk/pull/987) [`35b2090`](https://github.com/tailor-platform/sdk/commit/35b2090b0009d26ebcbb69c76540791b2f39924e) Thanks [@toiroakr](https://github.com/toiroakr)! - Add wait/resolve support for human-in-the-loop workflows via `defineWaitPoint()` and `defineWaitPoints()` with typed `.wait()` and `.resolve()` methods.
|
|
26
|
+
|
|
27
|
+
Tighten `createWorkflowJob` I/O types: both `Input` and `Output` must now be JsonValue-compatible (plain objects/arrays; no class instances or functions). `Output` previously accepted `Jsonifiable` with a `Jsonify<Output>` return transform on `.trigger()`, but the platform runtime rejects non-plain objects, so the old types did not match actual runtime behavior.
|
|
28
|
+
|
|
29
|
+
Reject top-level `null` in `createWorkflowJob` `Input` and in wait-point `Payload`: the platform normalizes top-level `null`/`undefined` args to `{}`, so declaring a top-level nullable type would cause the body/callback to receive `{}` at runtime, mismatching the declared type. Nested `null` inside objects or arrays is preserved by JSON serialization and remains allowed.
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [#1050](https://github.com/tailor-platform/sdk/pull/1050) [`9232660`](https://github.com/tailor-platform/sdk/commit/92326608640e473138712ac00adc29369980c604) Thanks [@toiroakr](https://github.com/toiroakr)! - Address Dependabot noise for the valibot ReDoS advisory (GHSA-vqpr-j7v3-hqw9): bump `@toiroakr/lines-db` to 0.9.2 and document the remaining transitive `@liam-hq/cli → valibot@1.1.0` report in the SDK README, including an override snippet for consumers who want to silence it.
|
|
34
|
+
|
|
35
|
+
- [#1030](https://github.com/tailor-platform/sdk/pull/1030) [`fc4cc7c`](https://github.com/tailor-platform/sdk/commit/fc4cc7cc4430c545c50eb8bb4b406023c91d8290) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency politty to v0.4.14
|
|
36
|
+
|
|
37
|
+
- [#1041](https://github.com/tailor-platform/sdk/pull/1041) [`0858d64`](https://github.com/tailor-platform/sdk/commit/0858d64b3a03a3a9d994ebe5cd18a803b9780cac) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update pnpm/action-setup action to v6.0.3
|
|
38
|
+
|
|
39
|
+
- [#1044](https://github.com/tailor-platform/sdk/pull/1044) [`04c1fea`](https://github.com/tailor-platform/sdk/commit/04c1fea62a0eb70c24609cdf9bccf0a012d71875) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency std-env to v4.1.0
|
|
40
|
+
|
|
41
|
+
- [#1045](https://github.com/tailor-platform/sdk/pull/1045) [`09fce15`](https://github.com/tailor-platform/sdk/commit/09fce1500cc24bcf6089248030168817598f47bd) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency type-fest to v5.6.0
|
|
42
|
+
|
|
43
|
+
- [#1051](https://github.com/tailor-platform/sdk/pull/1051) [`f7e1d34`](https://github.com/tailor-platform/sdk/commit/f7e1d340ecac5ea37c3c5ab33bd3d4a536274817) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update @inquirer
|
|
44
|
+
|
|
45
|
+
- [#1052](https://github.com/tailor-platform/sdk/pull/1052) [`7e75310`](https://github.com/tailor-platform/sdk/commit/7e7531040b3ceac90e25f633d71f502ac1ac3239) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @toiroakr/read-multiline to v0.3.2
|
|
46
|
+
|
|
47
|
+
## 1.40.1
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- [#1026](https://github.com/tailor-platform/sdk/pull/1026) [`7f89969`](https://github.com/tailor-platform/sdk/commit/7f899699ad0386dd0b89b5660d7f49efe07f8647) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix `apply` plan for IdP services when `permission` is omitted. The platform returns an empty `IdPPermission` (all action arrays empty) for services without configured permission policies, while the SDK sent `undefined`. The diff logic now normalizes an all-empty permission message to `undefined` so repeated applies are idempotent instead of always reporting the service as updated.
|
|
52
|
+
|
|
53
|
+
- [#1025](https://github.com/tailor-platform/sdk/pull/1025) [`af5262a`](https://github.com/tailor-platform/sdk/commit/af5262a14a31aa721c5b41b26425d938abb6485e) Thanks [@k1LoW](https://github.com/k1LoW)! - Update IdP documentation to promote `permission`-based access control as the primary pattern over legacy `authorization`
|
|
54
|
+
|
|
55
|
+
- [#1029](https://github.com/tailor-platform/sdk/pull/1029) [`825bf86`](https://github.com/tailor-platform/sdk/commit/825bf86d5df0ab98665989bf7ff59d5db0597a94) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @toiroakr/read-multiline to v0.3.1
|
|
56
|
+
|
|
57
|
+
- [#1031](https://github.com/tailor-platform/sdk/pull/1031) [`2e5f589`](https://github.com/tailor-platform/sdk/commit/2e5f589e50937e091f244cd1632ee7252a560394) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update rolldown
|
|
58
|
+
|
|
59
|
+
- [#1038](https://github.com/tailor-platform/sdk/pull/1038) [`d29b58a`](https://github.com/tailor-platform/sdk/commit/d29b58a27082fb52559548365c6ff75ee1e79122) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update @opentelemetry
|
|
60
|
+
|
|
3
61
|
## 1.40.0
|
|
4
62
|
|
|
5
63
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -96,3 +96,26 @@ See [Create Tailor Platform SDK](https://github.com/tailor-platform/sdk/tree/mai
|
|
|
96
96
|
|
|
97
97
|
- Node.js 22 or later (or Bun)
|
|
98
98
|
- A Tailor Platform account ([request access](https://www.tailor.tech/demo))
|
|
99
|
+
|
|
100
|
+
## Dependabot Noise
|
|
101
|
+
|
|
102
|
+
Installing `@tailor-platform/sdk` pulls in a few transitive advisories that are **not exploitable in practice**. They are listed here so you can triage reports from `npm audit` / `pnpm audit` / Dependabot without diffing our lockfile.
|
|
103
|
+
|
|
104
|
+
### valibot ReDoS ([GHSA-vqpr-j7v3-hqw9](https://github.com/advisories/GHSA-vqpr-j7v3-hqw9))
|
|
105
|
+
|
|
106
|
+
- **Why it shows up**: `@liam-hq/cli@0.7.24` pins `valibot@1.1.0`, which falls in the vulnerable range (`< 1.2.0`).
|
|
107
|
+
- **Why it's safe here**: `@liam-hq/cli` is invoked only by `tailor-sdk tailordb erd export` as a child process, against developer-controlled schema files. The vulnerable code path (`v.emoji()` on attacker-controlled strings) is never reached.
|
|
108
|
+
- **If you want to silence it**: add an override to your project so `valibot` resolves to `>=1.2.0`. `@toiroakr/lines-db` declares `valibot` as an optional peer with range `>=1.0.0`, so forcing `1.2.0+` is safe.
|
|
109
|
+
|
|
110
|
+
```jsonc
|
|
111
|
+
// pnpm (package.json)
|
|
112
|
+
"pnpm": { "overrides": { "valibot": ">=1.2.0" } }
|
|
113
|
+
|
|
114
|
+
// npm (package.json)
|
|
115
|
+
"overrides": { "valibot": ">=1.2.0" }
|
|
116
|
+
|
|
117
|
+
// yarn (package.json)
|
|
118
|
+
"resolutions": { "valibot": ">=1.2.0" }
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
This fix has to live in your project's `package.json` — overrides in a published package do not propagate to consumers.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { Bt as InferredAttributeMap, zt as InferredAttributeList } from "./tailor-db-field-
|
|
2
|
+
import { Bt as InferredAttributeMap, zt as InferredAttributeList } from "./tailor-db-field-D_z185oq.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/types/env.d.ts
|
|
5
5
|
interface Env {}
|
|
@@ -27,4 +27,4 @@ type TailorActor = {
|
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
29
|
export { Env as n, TailorEnv as r, TailorActor as t };
|
|
30
|
-
//# sourceMappingURL=actor-
|
|
30
|
+
//# sourceMappingURL=actor-DzCuoMlP.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { u as initOAuth2Client } from "./client-
|
|
2
|
+
import { u as initOAuth2Client } from "./client-CcV6Jjds.mjs";
|
|
3
3
|
import { n as isSdkBranded } from "./brand-Ll48SMXe.mjs";
|
|
4
4
|
import { a as parseBoolean, n as logger, r as styles } from "./logger-DTNAMYGy.mjs";
|
|
5
5
|
import { t as readPackageJson } from "./package-json-CWp8s9dE.mjs";
|
|
@@ -1798,8 +1798,9 @@ function detectExtendedTriggerCalls(program, sourceText, workflowNames, jobNames
|
|
|
1798
1798
|
const callee = callExpr.callee;
|
|
1799
1799
|
if (callee.type === "MemberExpression") {
|
|
1800
1800
|
const memberExpr = callee;
|
|
1801
|
-
|
|
1802
|
-
|
|
1801
|
+
const identifierName = !memberExpr.computed && memberExpr.object.type === "Identifier" ? memberExpr.object.name : null;
|
|
1802
|
+
const propertyName = !memberExpr.computed ? memberExpr.property.name : null;
|
|
1803
|
+
if (identifierName && propertyName === "trigger") {
|
|
1803
1804
|
const isWorkflow = workflowNames.has(identifierName);
|
|
1804
1805
|
const isJob = jobNames.has(identifierName);
|
|
1805
1806
|
if (!isWorkflow && !isJob) return;
|
|
@@ -1853,7 +1854,7 @@ function detectExtendedTriggerCalls(program, sourceText, workflowNames, jobNames
|
|
|
1853
1854
|
}
|
|
1854
1855
|
/**
|
|
1855
1856
|
* Transform trigger calls for resolver/executor/workflow functions
|
|
1856
|
-
* Handles
|
|
1857
|
+
* Handles job.trigger() and workflow.trigger() calls
|
|
1857
1858
|
* @param source - The source code to transform
|
|
1858
1859
|
* @param workflowNameMap - Map from variable name to workflow name
|
|
1859
1860
|
* @param jobNameMap - Map from variable name to job name
|
|
@@ -3592,6 +3593,79 @@ function createAuthService(config, tailorDBServices, externalTailorDBNamespaces)
|
|
|
3592
3593
|
};
|
|
3593
3594
|
}
|
|
3594
3595
|
|
|
3596
|
+
//#endregion
|
|
3597
|
+
//#region src/cli/shared/runtime-exprs.ts
|
|
3598
|
+
/**
|
|
3599
|
+
* JS expressions that shape the inputs passed to user-authored code.
|
|
3600
|
+
*
|
|
3601
|
+
* Two delivery paths:
|
|
3602
|
+
* - Apply config: shipped with apply and evaluated by the platform before
|
|
3603
|
+
* invoking user code.
|
|
3604
|
+
* - Bundle inline: interpolated into the generated `.entry.js` wrapper and
|
|
3605
|
+
* evaluated inside the bundled script at function entry.
|
|
3606
|
+
*
|
|
3607
|
+
* The user field mapping (server → SDK) shared across services is defined in
|
|
3608
|
+
* `@/parser/service/tailordb` as `tailorUserMap`.
|
|
3609
|
+
*/
|
|
3610
|
+
/**
|
|
3611
|
+
* `invoker` value expression, inlined into bundler entry wrappers.
|
|
3612
|
+
*
|
|
3613
|
+
* Calls `tailor.context.getInvoker()` at function entry and maps the server
|
|
3614
|
+
* shape to TailorInvoker. Anonymous callers (`null`) pass through as `null`.
|
|
3615
|
+
*/
|
|
3616
|
+
const INVOKER_EXPR = `(($raw) => $raw ? ({
|
|
3617
|
+
id: $raw.id,
|
|
3618
|
+
type: $raw.type,
|
|
3619
|
+
workspaceId: $raw.workspaceId,
|
|
3620
|
+
attributes: $raw.attributeMap,
|
|
3621
|
+
attributeList: $raw.attributes,
|
|
3622
|
+
}) : null)(tailor.context.getInvoker())`;
|
|
3623
|
+
/**
|
|
3624
|
+
* Actor field transformation expression.
|
|
3625
|
+
*
|
|
3626
|
+
* Transforms the server's actor object to match the SDK's TailorActor type:
|
|
3627
|
+
* server `attributeMap` → SDK `attributes`
|
|
3628
|
+
* server `attributes` → SDK `attributeList`
|
|
3629
|
+
* other fields → passed through
|
|
3630
|
+
* null/undefined actor → null
|
|
3631
|
+
*/
|
|
3632
|
+
const ACTOR_TRANSFORM_EXPR = "actor: args.actor ? (({ attributeMap, attributes: attrList, ...rest }) => ({ ...rest, attributes: attributeMap, attributeList: attrList }))(args.actor) : null";
|
|
3633
|
+
/**
|
|
3634
|
+
* Build the JavaScript expression that transforms server-format executor event
|
|
3635
|
+
* args into SDK-format args at runtime.
|
|
3636
|
+
*
|
|
3637
|
+
* The Tailor Platform server delivers event args with server-side field names.
|
|
3638
|
+
* The SDK exposes different field names to user code. This function produces a
|
|
3639
|
+
* JavaScript expression string that performs the mapping when evaluated
|
|
3640
|
+
* server-side.
|
|
3641
|
+
* @param triggerKind - The trigger kind discriminant from the parsed executor
|
|
3642
|
+
* @param env - Application env record to embed in the expression
|
|
3643
|
+
* @returns A JavaScript expression string, e.g. `({ ...args, ... })`
|
|
3644
|
+
*/
|
|
3645
|
+
function buildExecutorArgsExpr(triggerKind, env) {
|
|
3646
|
+
const envExpr = `env: ${JSON.stringify(env)}`;
|
|
3647
|
+
switch (triggerKind) {
|
|
3648
|
+
case "schedule": return `({ ...args, appNamespace: args.namespaceName, ${ACTOR_TRANSFORM_EXPR}, ${envExpr} })`;
|
|
3649
|
+
case "resolverExecuted": return `({ ...args, appNamespace: args.namespaceName, ${ACTOR_TRANSFORM_EXPR}, success: !!args.succeeded, result: args.succeeded?.result.resolver, error: args.failed?.error, ${envExpr} })`;
|
|
3650
|
+
case "incomingWebhook": return `({ ...args, appNamespace: args.namespaceName, rawBody: args.raw_body, ${envExpr} })`;
|
|
3651
|
+
default: return `({ ...args, event: args.eventType?.split(".").pop(), rawEvent: args.eventType, appNamespace: args.namespaceName, ${ACTOR_TRANSFORM_EXPR}, ${envExpr} })`;
|
|
3652
|
+
}
|
|
3653
|
+
}
|
|
3654
|
+
/**
|
|
3655
|
+
* Build the operationHook expression for resolver pipelines.
|
|
3656
|
+
*
|
|
3657
|
+
* Transforms server context to SDK resolver context:
|
|
3658
|
+
* context.args → input
|
|
3659
|
+
* context.pipeline → spread into result
|
|
3660
|
+
* user (global var) → TailorUser (via tailorUserMap: workspace_id→workspaceId, attribute_map→attributes, attributes→attributeList)
|
|
3661
|
+
* env → injected as JSON
|
|
3662
|
+
* @param env - Application env record to embed in the expression
|
|
3663
|
+
* @returns A JavaScript expression string for the operationHook
|
|
3664
|
+
*/
|
|
3665
|
+
function buildResolverOperationHookExpr(env) {
|
|
3666
|
+
return `({ ...context.pipeline, input: context.args, user: ${tailorUserMap}, env: ${JSON.stringify(env)} });`;
|
|
3667
|
+
}
|
|
3668
|
+
|
|
3595
3669
|
//#endregion
|
|
3596
3670
|
//#region src/parser/service/executor/schema.ts
|
|
3597
3671
|
const TailorDBTriggerSchema = z.object({
|
|
@@ -3782,7 +3856,10 @@ async function bundleSingleExecutor(executor, outputDir, tsconfig, triggerContex
|
|
|
3782
3856
|
const entryContent = ml`
|
|
3783
3857
|
import _internalExecutor from "${path.resolve(executor.sourceFile)}";
|
|
3784
3858
|
|
|
3785
|
-
const __executor_function =
|
|
3859
|
+
const __executor_function = async (args) => {
|
|
3860
|
+
const invoker = ${INVOKER_EXPR};
|
|
3861
|
+
return _internalExecutor.operation.body({ ...args, invoker });
|
|
3862
|
+
};
|
|
3786
3863
|
|
|
3787
3864
|
export { __executor_function as main };
|
|
3788
3865
|
`;
|
|
@@ -3978,6 +4055,7 @@ async function bundleSingleResolver(resolver, outputDir, tsconfig, triggerContex
|
|
|
3978
4055
|
import { t } from "@tailor-platform/sdk";
|
|
3979
4056
|
|
|
3980
4057
|
const $tailor_resolver_body = async (context) => {
|
|
4058
|
+
const invoker = ${INVOKER_EXPR};
|
|
3981
4059
|
if (_internalResolver.input) {
|
|
3982
4060
|
const result = t.object(_internalResolver.input).parse({
|
|
3983
4061
|
value: context.input,
|
|
@@ -3993,7 +4071,7 @@ async function bundleSingleResolver(resolver, outputDir, tsconfig, triggerContex
|
|
|
3993
4071
|
}
|
|
3994
4072
|
}
|
|
3995
4073
|
|
|
3996
|
-
return _internalResolver.body(context);
|
|
4074
|
+
return _internalResolver.body({ ...context, invoker });
|
|
3997
4075
|
};
|
|
3998
4076
|
|
|
3999
4077
|
export { $tailor_resolver_body as main };
|
|
@@ -4370,7 +4448,8 @@ async function bundleSingleJob(job, allJobs, outputDir, tsconfig, env, triggerCo
|
|
|
4370
4448
|
|
|
4371
4449
|
export async function main(input) {
|
|
4372
4450
|
const env = ${JSON.stringify(env)};
|
|
4373
|
-
|
|
4451
|
+
const invoker = ${INVOKER_EXPR};
|
|
4452
|
+
return await ${job.exportName}.body(input, { env, invoker });
|
|
4374
4453
|
}
|
|
4375
4454
|
`;
|
|
4376
4455
|
fs$1.writeFileSync(entryPath, entryContent);
|
|
@@ -5087,5 +5166,5 @@ async function loadApplication(params) {
|
|
|
5087
5166
|
}
|
|
5088
5167
|
|
|
5089
5168
|
//#endregion
|
|
5090
|
-
export {
|
|
5091
|
-
//# sourceMappingURL=application-
|
|
5169
|
+
export { loadWorkspaceId as C, writePlatformConfig as D, saveUserTokens as E, loadAccessToken as S, resolveTokens as T, getDistDir as _, WorkflowJobSchema as a, deleteUserTokens as b, ExecutorSchema as c, buildResolverOperationHookExpr as d, OAuth2ClientSchema as f, createBundleCache as g, loadFilesWithIgnores as h, resolveInlineSourcemap as i, INVOKER_EXPR as l, stringifyFunction as m, generatePluginFilesIfNeeded as n, ResolverSchema as o, TailorDBTypeSchema as p, loadApplication as r, createExecutorService as s, defineApplication as t, buildExecutorArgsExpr as u, hashFile as v, readPlatformConfig as w, fetchLatestToken as x, loadConfig as y };
|
|
5170
|
+
//# sourceMappingURL=application-DQpD_kHR.mjs.map
|