@tailor-platform/sdk 1.78.0 → 1.79.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 +12 -0
- package/dist/application-BB6BlUfk.mjs +3 -0
- package/dist/{application-CUxVA7Fs.mjs → application-fjqb-Gh8.mjs} +50 -3
- package/dist/application-fjqb-Gh8.mjs.map +1 -0
- package/dist/cli/index.mjs +13 -35
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.mjs +2 -2
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/index.mjs +7 -6
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/tailordb/schema.d.mts +1 -7
- package/dist/configure/services/workflow/execution-policy.d.mts +2 -2
- package/dist/configure/types/type.d.mts +1 -9
- package/dist/{globals-CvizbGLY.mjs → globals-B-n_3uYu.mjs} +11 -5
- package/dist/globals-B-n_3uYu.mjs.map +1 -0
- package/dist/{registry-CYBRvfaU.mjs → registry-CXi7rJq7.mjs} +3 -2
- package/dist/registry-CXi7rJq7.mjs.map +1 -0
- package/dist/runtime/field-parse.d.mts +11 -0
- package/dist/runtime/globals.d.mts +4 -1
- package/dist/runtime/index.mjs +1 -1
- package/dist/runtime/workflow.d.mts +79 -15
- package/dist/runtime/workflow.mjs +2 -2
- package/dist/{runtime-BD2vYJFT.mjs → runtime-CjMeYuPA.mjs} +4 -4
- package/dist/{runtime-BD2vYJFT.mjs.map → runtime-CjMeYuPA.mjs.map} +1 -1
- package/dist/{schema-U6DxoZ8D.mjs → schema-CYrle8JZ.mjs} +42 -24
- package/dist/schema-CYrle8JZ.mjs.map +1 -0
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/index.mjs +36 -10
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/workflow.d.mts +29 -15
- package/dist/vitest/setup.mjs +1 -1
- package/dist/workflow-CkIDJpdg.mjs +69 -0
- package/dist/workflow-CkIDJpdg.mjs.map +1 -0
- package/docs/runtime.md +2 -2
- package/docs/services/tailordb.md +2 -0
- package/docs/services/workflow.md +2 -2
- package/docs/testing.md +2 -2
- package/package.json +1 -1
- package/dist/application-CUxVA7Fs.mjs.map +0 -1
- package/dist/application-Dp_-ioiP.mjs +0 -3
- package/dist/configure/types/field-runtime.d.mts +0 -17
- package/dist/globals-CvizbGLY.mjs.map +0 -1
- package/dist/registry-CYBRvfaU.mjs.map +0 -1
- package/dist/schema-U6DxoZ8D.mjs.map +0 -1
- package/dist/workflow-DSwnYPPP.mjs +0 -45
- package/dist/workflow-DSwnYPPP.mjs.map +0 -1
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as assertDefined } from "../assert-DBxo8jPo.mjs";
|
|
2
|
-
import { $ as listFolders, A as generate$1, An as generateUserTypes, B as remove, Bt as deploy, C as waitWorkflowExecution, Cn as formatDiffSummary, D as listWorkflows, En as getNamespacesWithMigrations, Et as getExecutorWaitFailureMessage, Ft as getWorkflowExecution, Gt as createWorkspace, I as show, It as listWorkflowExecutions, Mn as apiCall, Nt as getWorkflow, O as truncate, Ot as listExecutorJobs, Pn as loadConfig, Qt as MIGRATION_LABEL_KEY, St as triggerExecutor, T as resumeWorkflow, Tn as hasChanges, Tt as getExecutorJob, U as updateOrganization, Un as loadWorkspaceId, Ut as listWorkspaces, W as organizationTree, Xt as waitForExecution, Y as getOrganization, Yt as executeScript, Z as updateFolder, Zt as bundleMigrationScript, _ as deleteWorkspace, _n as getNextMigrationNumber, a as updateUser, an as DIFF_FILE_NAME, at as createFolder, b as getAppHealth, bn as reconstructSnapshotFromMigrations, cn as SCHEMA_FILE_NAME, d as inviteUser, dn as compareSnapshots, fn as createSnapshotFromLocalTypes, gn as getMigrationFiles, gt as listFunctionRegistries, h as getWorkspace, hn as getMigrationFilePath, in as DB_TYPES_FILE_NAME, jt as startWorkflow, kt as watchExecutorJob, l as listUsers, lt as getOAuth2Client, mn as getMigrationDirPath, mt as generate, n as query, on as INITIAL_SCHEMA_NUMBER, p as restoreWorkspace, pn as getLatestMigrationNumber, pt as listMachineUsers, q as listOrganizations, rt as deleteFolder, s as removeUser, sn as MIGRATE_FILE_NAME, st as listOAuth2Clients, t as isNativeTypeScriptRuntime, tt as getFolder, un as compareLocalTypesWithSnapshot, ut as getMachineUserToken, v as listApps, vt as getFunctionRegistry, wn as formatMigrationDiff, wt as listExecutors, yt as listWebhookExecutors, zn as loadAccessToken, zt as getExecutor } from "../runtime-
|
|
3
|
-
import { B as initOperatorClient, _ as platformBundleDefinePlugin, w as getDistDir } from "../application-
|
|
2
|
+
import { $ as listFolders, A as generate$1, An as generateUserTypes, B as remove, Bt as deploy, C as waitWorkflowExecution, Cn as formatDiffSummary, D as listWorkflows, En as getNamespacesWithMigrations, Et as getExecutorWaitFailureMessage, Ft as getWorkflowExecution, Gt as createWorkspace, I as show, It as listWorkflowExecutions, Mn as apiCall, Nt as getWorkflow, O as truncate, Ot as listExecutorJobs, Pn as loadConfig, Qt as MIGRATION_LABEL_KEY, St as triggerExecutor, T as resumeWorkflow, Tn as hasChanges, Tt as getExecutorJob, U as updateOrganization, Un as loadWorkspaceId, Ut as listWorkspaces, W as organizationTree, Xt as waitForExecution, Y as getOrganization, Yt as executeScript, Z as updateFolder, Zt as bundleMigrationScript, _ as deleteWorkspace, _n as getNextMigrationNumber, a as updateUser, an as DIFF_FILE_NAME, at as createFolder, b as getAppHealth, bn as reconstructSnapshotFromMigrations, cn as SCHEMA_FILE_NAME, d as inviteUser, dn as compareSnapshots, fn as createSnapshotFromLocalTypes, gn as getMigrationFiles, gt as listFunctionRegistries, h as getWorkspace, hn as getMigrationFilePath, in as DB_TYPES_FILE_NAME, jt as startWorkflow, kt as watchExecutorJob, l as listUsers, lt as getOAuth2Client, mn as getMigrationDirPath, mt as generate, n as query, on as INITIAL_SCHEMA_NUMBER, p as restoreWorkspace, pn as getLatestMigrationNumber, pt as listMachineUsers, q as listOrganizations, rt as deleteFolder, s as removeUser, sn as MIGRATE_FILE_NAME, st as listOAuth2Clients, t as isNativeTypeScriptRuntime, tt as getFolder, un as compareLocalTypesWithSnapshot, ut as getMachineUserToken, v as listApps, vt as getFunctionRegistry, wn as formatMigrationDiff, wt as listExecutors, yt as listWebhookExecutors, zn as loadAccessToken, zt as getExecutor } from "../runtime-CjMeYuPA.mjs";
|
|
3
|
+
import { B as initOperatorClient, _ as platformBundleDefinePlugin, w as getDistDir } from "../application-fjqb-Gh8.mjs";
|
|
4
4
|
import { n as enumConstantsPlugin } from "../enum-constants-j9QBF0cB.mjs";
|
|
5
5
|
import { t as multiline } from "../multiline-sfHpTZZK.mjs";
|
|
6
6
|
import { n as fileUtilsPlugin } from "../file-utils-DcyIPFQh.mjs";
|
package/dist/configure/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as parseInternal, n as mapAllowedValues, t as db } from "../schema-CYrle8JZ.mjs";
|
|
2
2
|
import { t as brandValue } from "../brand-Eo4pLXPJ.mjs";
|
|
3
|
-
import { n as dispatchTriggerJob, o as registerJob, r as dispatchTriggerWorkflow, s as registerWorkflow } from "../registry-
|
|
3
|
+
import { n as dispatchTriggerJob, o as registerJob, r as dispatchTriggerWorkflow, s as registerWorkflow } from "../registry-CXi7rJq7.mjs";
|
|
4
4
|
import { t as WORKFLOW_TEST_ENV_KEY } from "../test-env-key-DuZycyWM.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/configure/types/type.ts
|
|
@@ -61,7 +61,6 @@ function createTailorField(type, options, fields, values, metadata) {
|
|
|
61
61
|
pathArray: []
|
|
62
62
|
});
|
|
63
63
|
},
|
|
64
|
-
_parseInternal: parseInternal$1,
|
|
65
64
|
clone() {
|
|
66
65
|
let clonedFields = fields;
|
|
67
66
|
if (fields) {
|
|
@@ -642,10 +641,10 @@ function defineWorkflowExecutionPolicy(name, def) {
|
|
|
642
641
|
* }));
|
|
643
642
|
*
|
|
644
643
|
* // In a workflow job function:
|
|
645
|
-
* await tailor.workflow.
|
|
644
|
+
* await tailor.workflow.startJobFunction("worker", args, {
|
|
646
645
|
* executionPolicyKey: executionPolicies.premium.key,
|
|
647
646
|
* });
|
|
648
|
-
* await tailor.workflow.
|
|
647
|
+
* await tailor.workflow.startJobFunction("worker", args, {
|
|
649
648
|
* executionPolicyKey: executionPolicies["tenant-api"].keyFor(input.tenantId),
|
|
650
649
|
* });
|
|
651
650
|
*/
|
|
@@ -837,7 +836,9 @@ function createWorkflow(config) {
|
|
|
837
836
|
...config,
|
|
838
837
|
trigger: process.env.TAILOR_PLATFORM_BUNDLE ? async () => {
|
|
839
838
|
throw new Error("workflow.trigger() is rewritten at build time and unavailable in the bundle");
|
|
840
|
-
} : async (args, options)
|
|
839
|
+
} : async function trigger(args, options) {
|
|
840
|
+
return arguments.length >= 2 ? await dispatchTriggerWorkflow(config.name, args, options) : await dispatchTriggerWorkflow(config.name, args);
|
|
841
|
+
}
|
|
841
842
|
}, "workflow");
|
|
842
843
|
}
|
|
843
844
|
|