@tailor-platform/sdk 2.27.0 → 2.29.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 +109 -0
- package/README.md +0 -8
- package/agent-skills/tailor/SKILL.md +4 -2
- package/dist/application-dalGHdrI.mjs +1 -0
- package/dist/application-rWYDAfNU.mjs +200 -0
- package/dist/application-rWYDAfNU.mjs.map +1 -0
- package/dist/cli/cache/bundle-cache.d.mts +1 -0
- package/dist/cli/commands/executor/get.d.mts +2 -1
- package/dist/cli/commands/executor/jobs.d.mts +2 -1
- package/dist/cli/commands/executor/trigger.d.mts +2 -1
- package/dist/cli/commands/function/get.d.mts +2 -1
- package/dist/cli/commands/function/list.d.mts +2 -1
- package/dist/cli/commands/organization/folder/create.d.mts +2 -1
- package/dist/cli/commands/organization/folder/delete.d.mts +2 -1
- package/dist/cli/commands/organization/folder/get.d.mts +2 -1
- package/dist/cli/commands/organization/folder/list.d.mts +2 -1
- package/dist/cli/commands/organization/folder/update.d.mts +2 -1
- package/dist/cli/commands/organization/get.d.mts +2 -1
- package/dist/cli/commands/organization/tree.d.mts +2 -1
- package/dist/cli/commands/organization/update.d.mts +2 -1
- package/dist/cli/commands/show.d.mts +2 -1
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +2 -1
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +3 -1
- package/dist/cli/commands/workflow/executions.d.mts +2 -1
- package/dist/cli/commands/workflow/get.d.mts +2 -1
- package/dist/cli/commands/workflow/start.d.mts +2 -1
- package/dist/cli/commands/workspace/app/health.d.mts +2 -1
- package/dist/cli/commands/workspace/app/list.d.mts +2 -1
- package/dist/cli/commands/workspace/create.d.mts +5 -2
- package/dist/cli/commands/workspace/delete.d.mts +2 -1
- package/dist/cli/commands/workspace/get.d.mts +2 -1
- package/dist/cli/commands/workspace/restore.d.mts +2 -1
- package/dist/cli/commands/workspace/user/invite.d.mts +2 -1
- package/dist/cli/commands/workspace/user/list.d.mts +2 -1
- package/dist/cli/commands/workspace/user/remove.d.mts +2 -1
- package/dist/cli/commands/workspace/user/update.d.mts +2 -1
- package/dist/cli/lib.d.mts +1 -1
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.d.mts +7 -0
- package/dist/cli/main.mjs +55 -42
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/query/index.d.mts +2 -1
- package/dist/cli/shared/args.d.mts +4 -2
- package/dist/cli/shared/client.d.mts +6 -1
- package/dist/cli/shared/context.d.mts +2 -1
- package/dist/cli/shared/logger.d.mts +5 -2
- package/dist/cli/shared/readonly-guard.d.mts +2 -1
- package/dist/cli/shared/seed-context.d.mts +5 -0
- package/dist/cli/shared/type-generator.d.mts +2 -1
- package/dist/cli/ts-hook.mjs +15 -11
- package/dist/completion/zsh-worker.zsh +275 -19
- package/dist/configure/config/types.d.mts +80 -1
- package/dist/configure/services/aigateway/types.d.mts +2 -1
- package/dist/configure/services/auth/types.d.mts +2 -1
- package/dist/configure/services/executor/executor.d.mts +2 -1
- package/dist/configure/services/executor/operation.d.mts +2 -1
- package/dist/configure/services/executor/trigger/event.d.mts +2 -1
- package/dist/configure/services/executor/trigger/schedule.d.mts +2 -1
- package/dist/configure/services/http-adapter/http-adapter.d.mts +2 -1
- package/dist/configure/services/idp/permission.d.mts +2 -1
- package/dist/configure/services/idp/types.d.mts +2 -1
- package/dist/configure/services/resolver/permission.d.mts +2 -1
- package/dist/configure/services/resolver/resolver.d.mts +2 -1
- package/dist/configure/services/secrets/types.d.mts +2 -1
- package/dist/configure/services/staticwebsite/types.d.mts +2 -1
- package/dist/configure/services/tailordb/permission.d.mts +2 -1
- package/dist/configure/services/tailordb/schema.d.mts +4 -3
- package/dist/configure/services/tailordb/types.d.mts +12 -1
- package/dist/configure/services/workflow/execution-policy.types.d.mts +2 -1
- package/dist/configure/services/workflow/job.d.mts +2 -1
- package/dist/configure/services/workflow/wait-point.d.mts +2 -1
- package/dist/configure/types/field.types.d.mts +2 -1
- package/dist/configure/types/permission-operand.types.d.mts +2 -1
- package/dist/configure/types/type.d.mts +2 -1
- package/dist/{crashreport-DFpRn-LS.mjs → crashreport-BAG8c7hB.mjs} +4 -4
- package/dist/{crashreport-DFpRn-LS.mjs.map → crashreport-BAG8c7hB.mjs.map} +1 -1
- package/dist/crashreport-BcXuocwI.mjs +1 -0
- package/dist/{errors-CpvSChyL.mjs → errors-D3qpNHR6.mjs} +2 -2
- package/dist/{errors-CpvSChyL.mjs.map → errors-D3qpNHR6.mjs.map} +1 -1
- package/dist/kysely-type-BWMfV301.mjs +48 -0
- package/dist/kysely-type-BWMfV301.mjs.map +1 -0
- package/dist/logger-DuaT2zY3.mjs +9 -0
- package/dist/logger-DuaT2zY3.mjs.map +1 -0
- package/dist/package-json-D1BRkjtr.mjs +1 -0
- package/dist/parser/service/tailordb/types.d.mts +3 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +2 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +2 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +2 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +11 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/register-ts-hook-CkfKqhJT.mjs +1014 -0
- package/dist/register-ts-hook-CkfKqhJT.mjs.map +1 -0
- package/dist/runtime/aigateway.mjs +1 -1
- package/dist/runtime/authconnection.mjs +1 -1
- package/dist/runtime/context.d.mts +2 -1
- package/dist/runtime/context.mjs +1 -1
- package/dist/runtime/date.d.mts +2 -1
- package/dist/runtime/field-parse.d.mts +2 -1
- package/dist/runtime/file.d.mts +2 -1
- package/dist/runtime/file.mjs +1 -1
- package/dist/runtime/globals.d.mts +2 -1
- package/dist/runtime/iconv.mjs +1 -1
- package/dist/runtime/idp.mjs +1 -1
- package/dist/runtime/logger.mjs +1 -1
- package/dist/runtime/secretmanager.mjs +1 -1
- package/dist/runtime/types.d.mts +2 -1
- package/dist/runtime/workflow.d.mts +2 -1
- package/dist/runtime/workflow.mjs +1 -1
- package/dist/schema-B6hJQWp6.mjs.map +1 -1
- package/dist/seed/index.d.mts +17 -4
- package/dist/seed/index.mjs +6 -6
- package/dist/seed/index.mjs.map +1 -1
- package/dist/seed-C3P_T_Eh.mjs.map +1 -1
- package/dist/{service-Cc7OY0Oh.mjs → service-CETr0AKY.mjs} +3 -3
- package/dist/service-CETr0AKY.mjs.map +1 -0
- package/dist/service-DREWLYxD.mjs +1 -0
- package/dist/{service-DFmt9UJP.mjs → service-b1g22NN9.mjs} +2 -2
- package/dist/{service-DFmt9UJP.mjs.map → service-b1g22NN9.mjs.map} +1 -1
- package/dist/service_pb-Bbu2QSIr.mjs +2 -0
- package/dist/service_pb-Bbu2QSIr.mjs.map +1 -0
- package/dist/service_pb-urxAIYHT.mjs +1 -0
- package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +53 -1
- package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +33 -0
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +0 -8
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +18 -1
- package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +4 -0
- package/dist/telemetry-DpkFGBmu.mjs +1 -0
- package/dist/{telemetry-Bklv9kQY.mjs → telemetry-Xk7J829P.mjs} +2 -2
- package/dist/{telemetry-Bklv9kQY.mjs.map → telemetry-Xk7J829P.mjs.map} +1 -1
- package/dist/types/tailordb.generated.d.mts +2 -0
- package/dist/vitest/index.mjs +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mock-kysely.d.mts +2 -1
- package/dist/vitest/mocks/aigateway.d.mts +2 -1
- package/dist/vitest/mocks/authconnection.d.mts +2 -1
- package/dist/vitest/mocks/file.d.mts +2 -1
- package/dist/vitest/mocks/iconv.d.mts +2 -1
- package/dist/vitest/mocks/idp.d.mts +2 -1
- package/dist/vitest/mocks/logger.d.mts +2 -1
- package/dist/vitest/mocks/secretmanager.d.mts +2 -1
- package/dist/vitest/mocks/tailordb-pglite.d.mts +2 -1
- package/dist/vitest/mocks/tailordb.d.mts +2 -1
- package/dist/vitest/mocks/workflow.d.mts +3 -1
- package/dist/vitest/pglite-kysely.d.mts +2 -1
- package/dist/vitest/workflow-local.d.mts +2 -1
- package/dist/{workspace_resource_pb-ChWejcj0.mjs → workspace_resource_pb-CaoM2npP.mjs} +2 -2
- package/dist/{workspace_resource_pb-ChWejcj0.mjs.map → workspace_resource_pb-CaoM2npP.mjs.map} +1 -1
- package/docs/cli/application.md +21 -3
- package/docs/cli/data.md +105 -0
- package/docs/cli/secret.md +6 -6
- package/docs/cli/tailordb.md +52 -16
- package/docs/cli/user.md +37 -7
- package/docs/cli/workspace.md +9 -1
- package/docs/cli-reference.md +36 -3
- package/docs/configuration.md +62 -2
- package/docs/github-actions.md +179 -13
- package/docs/multi-environment.md +24 -0
- package/docs/plugin/custom.md +1 -1
- package/docs/services/idp.md +1 -1
- package/docs/services/resolver.md +1 -58
- package/docs/services/tailordb-migration.md +80 -12
- package/docs/services/tailordb.md +17 -4
- package/docs/services/workflow.md +2 -2
- package/docs/testing.md +3 -2
- package/package.json +22 -22
- package/dist/application-DFeuELRo.mjs +0 -200
- package/dist/application-DFeuELRo.mjs.map +0 -1
- package/dist/application-nT_4a5HO.mjs +0 -1
- package/dist/crashreport-CBaRJl5h.mjs +0 -1
- package/dist/kysely-type-RDX59E1j.mjs +0 -48
- package/dist/kysely-type-RDX59E1j.mjs.map +0 -1
- package/dist/logger-Db-YRTwK.mjs +0 -9
- package/dist/logger-Db-YRTwK.mjs.map +0 -1
- package/dist/package-json-CmqhDJ__.mjs +0 -1
- package/dist/register-ts-hook-D6KXrGrB.mjs +0 -1009
- package/dist/register-ts-hook-D6KXrGrB.mjs.map +0 -1
- package/dist/service-Cc7OY0Oh.mjs.map +0 -1
- package/dist/service-sH2MZ4_W.mjs +0 -1
- package/dist/service_pb-Dw2ilc1O.mjs +0 -2
- package/dist/service_pb-Dw2ilc1O.mjs.map +0 -1
- package/dist/service_pb-GDOqfwb6.mjs +0 -1
- package/dist/telemetry-DXHP3VVi.mjs +0 -1
|
@@ -28,7 +28,8 @@ interface CommonArgsOptions {
|
|
|
28
28
|
/**
|
|
29
29
|
* Build the common arguments for all CLI commands. CLI plugins call this so
|
|
30
30
|
* their forwarded global flags parse identically to the host Tailor CLI and
|
|
31
|
-
* feed the same logger state.
|
|
31
|
+
* feed the same logger state. Only the host CLI records a detected AI coding
|
|
32
|
+
* agent, so under an agent `--json` defaults to true there but not in plugins.
|
|
32
33
|
*
|
|
33
34
|
* NOTE: --env-file and --env-file-if-exists collide with Node.js flags due to a bug
|
|
34
35
|
* (https://github.com/nodejs/node/issues/54232). Node.js parses these even after the
|
|
@@ -79,4 +80,5 @@ export declare const confirmationArgs: {
|
|
|
79
80
|
yes: z.ZodDefault<z.ZodBoolean>;
|
|
80
81
|
};
|
|
81
82
|
export type CommonArgsType = z.infer<z.ZodObject<typeof commonArgs>>;
|
|
82
|
-
//#endregion
|
|
83
|
+
//#endregion
|
|
84
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import { CreateStateflowServiceRequestSchema, CreateStateflowServiceResponseSche
|
|
|
7
7
|
import { CreateExecutorExecutorRequestSchema, CreateExecutorExecutorResponseSchema, DeleteExecutorExecutorRequestSchema, DeleteExecutorExecutorResponseSchema, GetExecutorExecutorRequestSchema, GetExecutorExecutorResponseSchema, GetExecutorIncomingWebhookRequestSchema, GetExecutorIncomingWebhookResponseSchema, GetExecutorJobRequestSchema, GetExecutorJobResponseSchema, ListExecutorExecutorsRequestSchema, ListExecutorExecutorsResponseSchema, ListExecutorIncomingWebhooksRequestSchema, ListExecutorIncomingWebhooksResponseSchema, ListExecutorJobAttemptsRequestSchema, ListExecutorJobAttemptsResponseSchema, ListExecutorJobsRequestSchema, ListExecutorJobsResponseSchema, TriggerExecutorRequestSchema, TriggerExecutorResponseSchema, UpdateExecutorExecutorRequestSchema, UpdateExecutorExecutorResponseSchema } from "../../tailor-proto/src/tailor/v1/executor_pb.mjs";
|
|
8
8
|
import { CreateSecretManagerSecretRequestSchema, CreateSecretManagerSecretResponseSchema, CreateSecretManagerVaultRequestSchema, CreateSecretManagerVaultResponseSchema, DeleteSecretManagerSecretRequestSchema, DeleteSecretManagerSecretResponseSchema, DeleteSecretManagerVaultRequestSchema, DeleteSecretManagerVaultResponseSchema, GetSecretManagerSecretRequestSchema, GetSecretManagerSecretResponseSchema, GetSecretManagerVaultRequestSchema, GetSecretManagerVaultResponseSchema, ListSecretManagerSecretsRequestSchema, ListSecretManagerSecretsResponseSchema, ListSecretManagerVaultsRequestSchema, ListSecretManagerVaultsResponseSchema, UpdateSecretManagerSecretRequestSchema, UpdateSecretManagerSecretResponseSchema } from "../../tailor-proto/src/tailor/v1/secret_manager_pb.mjs";
|
|
9
9
|
import { CreateAuthConnectionRequestSchema, CreateAuthConnectionResponseSchema, CreateAuthHookRequestSchema, CreateAuthHookResponseSchema, CreateAuthIDPConfigRequestSchema, CreateAuthIDPConfigResponseSchema, CreateAuthMachineUserRequestSchema, CreateAuthMachineUserResponseSchema, CreateAuthOAuth2ClientRequestSchema, CreateAuthOAuth2ClientResponseSchema, CreateAuthSCIMConfigRequestSchema, CreateAuthSCIMConfigResponseSchema, CreateAuthSCIMResourceRequestSchema, CreateAuthSCIMResourceResponseSchema, CreateAuthServiceRequestSchema, CreateAuthServiceResponseSchema, CreateControlplaneMachineUserRequestSchema, CreateControlplaneMachineUserResponseSchema, CreatePersonalAccessTokenRequestSchema, CreatePersonalAccessTokenResponseSchema, CreateTenantConfigRequestSchema, CreateTenantConfigResponseSchema, CreateUserProfileConfigRequestSchema, CreateUserProfileConfigResponseSchema, DeleteAuthConnectionRequestSchema, DeleteAuthConnectionResponseSchema, DeleteAuthHookRequestSchema, DeleteAuthHookResponseSchema, DeleteAuthIDPConfigRequestSchema, DeleteAuthIDPConfigResponseSchema, DeleteAuthMachineUserRequestSchema, DeleteAuthMachineUserResponseSchema, DeleteAuthOAuth2ClientRequestSchema, DeleteAuthOAuth2ClientResponseSchema, DeleteAuthSCIMConfigRequestSchema, DeleteAuthSCIMConfigResponseSchema, DeleteAuthSCIMResourceRequestSchema, DeleteAuthSCIMResourceResponseSchema, DeleteAuthServiceRequestSchema, DeleteAuthServiceResponseSchema, DeleteControlplaneMachineUserRequestSchema, DeleteControlplaneMachineUserResponseSchema, DeletePersonalAccessTokenRequestSchema, DeletePersonalAccessTokenResponseSchema, DeleteTenantConfigRequestSchema, DeleteTenantConfigResponseSchema, DeleteUserProfileConfigRequestSchema, DeleteUserProfileConfigResponseSchema, ExchangeAuthConnectionAuthorizationCodeRequestSchema, ExchangeAuthConnectionAuthorizationCodeResponseSchema, GetAuthHookRequestSchema, GetAuthHookResponseSchema, GetAuthIDPConfigRequestSchema, GetAuthIDPConfigResponseSchema, GetAuthMachineUserRequestSchema, GetAuthMachineUserResponseSchema, GetAuthOAuth2ClientRequestSchema, GetAuthOAuth2ClientResponseSchema, GetAuthSCIMConfigRequestSchema, GetAuthSCIMConfigResponseSchema, GetAuthSCIMResourceRequestSchema, GetAuthSCIMResourceResponseSchema, GetAuthSCIMResourcesRequestSchema, GetAuthSCIMResourcesResponseSchema, GetAuthServiceRequestSchema, GetAuthServiceResponseSchema, GetControlplaneMachineUserByNameRequestSchema, GetControlplaneMachineUserByNameResponseSchema, GetControlplaneMachineUserRequestSchema, GetControlplaneMachineUserResponseSchema, GetTenantConfigRequestSchema, GetTenantConfigResponseSchema, GetUserProfileConfigRequestSchema, GetUserProfileConfigResponseSchema, ListAuthConnectionsRequestSchema, ListAuthConnectionsResponseSchema, ListAuthIDPConfigsRequestSchema, ListAuthIDPConfigsResponseSchema, ListAuthMachineUsersRequestSchema, ListAuthMachineUsersResponseSchema, ListAuthOAuth2ClientsRequestSchema, ListAuthOAuth2ClientsResponseSchema, ListAuthServicesRequestSchema, ListAuthServicesResponseSchema, ListControlplaneMachineUsersRequestSchema, ListControlplaneMachineUsersResponseSchema, ListPersonalAccessTokensRequestSchema, ListPersonalAccessTokensResponseSchema, RegisterAuthConnectionSessionRequestSchema, RegisterAuthConnectionSessionResponseSchema, RevokeAuthConnectionRequestSchema, RevokeAuthConnectionResponseSchema, UpdateAuthConnectionRequestSchema, UpdateAuthConnectionResponseSchema, UpdateAuthHookRequestSchema, UpdateAuthHookResponseSchema, UpdateAuthIDPConfigRequestSchema, UpdateAuthIDPConfigResponseSchema, UpdateAuthMachineUserRequestSchema, UpdateAuthMachineUserResponseSchema, UpdateAuthOAuth2ClientRequestSchema, UpdateAuthOAuth2ClientResponseSchema, UpdateAuthSCIMConfigRequestSchema, UpdateAuthSCIMConfigResponseSchema, UpdateAuthSCIMResourceRequestSchema, UpdateAuthSCIMResourceResponseSchema, UpdateAuthServiceRequestSchema, UpdateAuthServiceResponseSchema, UpdateControlplaneMachineUserRequestSchema, UpdateControlplaneMachineUserResponseSchema, UpdateTenantConfigRequestSchema, UpdateTenantConfigResponseSchema, UpdateUserProfileConfigRequestSchema, UpdateUserProfileConfigResponseSchema } from "../../tailor-proto/src/tailor/v1/auth_pb.mjs";
|
|
10
|
-
import { ListControlplaneActivityLogsRequestSchema, ListControlplaneActivityLogsResponseSchema, ListDataplaneEventsRequestSchema, ListDataplaneEventsResponseSchema } from "../../tailor-proto/src/tailor/v1/events_pb.mjs";
|
|
10
|
+
import { ListControlplaneActivityLogsRequestSchema, ListControlplaneActivityLogsResponseSchema, ListDataplaneEventsRequestSchema, ListDataplaneEventsResponseSchema, ListOrganizationActivityLogsRequestSchema, ListOrganizationActivityLogsResponseSchema } from "../../tailor-proto/src/tailor/v1/events_pb.mjs";
|
|
11
11
|
import { CancelJobFunctionExecutionRequestSchema, CancelJobFunctionExecutionResponseSchema, ExecScriptRequestSchema, ExecScriptResponseSchema, GetFunctionExecutionRequestSchema, GetFunctionExecutionResponseSchema, ListFunctionExecutionsRequestSchema, ListFunctionExecutionsResponseSchema, StartJobFunctionRequestSchema, StartJobFunctionResponseSchema, TestExecScriptRequestSchema, TestExecScriptResponseSchema } from "../../tailor-proto/src/tailor/v1/function_pb.mjs";
|
|
12
12
|
import { CreateFunctionRegistryRequestSchema, CreateFunctionRegistryResponseSchema, DeleteFunctionRegistryRequestSchema, DeleteFunctionRegistryResponseSchema, DownloadFunctionRegistryScriptRequestSchema, DownloadFunctionRegistryScriptResponseSchema, GetFunctionRegistryRequestSchema, GetFunctionRegistryResponseSchema, ListFunctionRegistriesRequestSchema, ListFunctionRegistriesResponseSchema, UpdateFunctionRegistryRequestSchema, UpdateFunctionRegistryResponseSchema } from "../../tailor-proto/src/tailor/v1/function_registry_pb.mjs";
|
|
13
13
|
import { ListMeterAITokenUsagesRequestSchema, ListMeterAITokenUsagesResponseSchema, ListMeterEventCountsRequestSchema, ListMeterEventCountsResponseSchema, ListMeterExecutionCountsRequestSchema, ListMeterExecutionCountsResponseSchema, ListMeterRequestCountsRequestSchema, ListMeterRequestCountsResponseSchema } from "../../tailor-proto/src/tailor/v1/meter_pb.mjs";
|
|
@@ -908,6 +908,11 @@ export declare function initOperatorClient(accessToken: string, config?: Platfor
|
|
|
908
908
|
input: typeof ListControlplaneActivityLogsRequestSchema;
|
|
909
909
|
output: typeof ListControlplaneActivityLogsResponseSchema;
|
|
910
910
|
};
|
|
911
|
+
listOrganizationActivityLogs: {
|
|
912
|
+
methodKind: "unary";
|
|
913
|
+
input: typeof ListOrganizationActivityLogsRequestSchema;
|
|
914
|
+
output: typeof ListOrganizationActivityLogsResponseSchema;
|
|
915
|
+
};
|
|
911
916
|
execScript: {
|
|
912
917
|
methodKind: "unary";
|
|
913
918
|
input: typeof ExecScriptRequestSchema;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { StyleFn } from "../../shared/src/color.mjs";
|
|
2
2
|
//#region src/cli/shared/logger.d.ts
|
|
3
|
-
/**
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* What selected JSON output: an explicit `--json`, the environment, both, or
|
|
5
|
+
* the AI coding agent running the CLI.
|
|
6
|
+
*/
|
|
7
|
+
export type JsonModeSource = "flag" | "env" | "both" | "agent";
|
|
5
8
|
/**
|
|
6
9
|
* Semantic style functions for inline text styling
|
|
7
10
|
*/
|
|
@@ -26,6 +26,11 @@ export interface SeedContext {
|
|
|
26
26
|
distPath: string;
|
|
27
27
|
/** Default machine user name from seedPlugin options, if configured. */
|
|
28
28
|
machineUserName?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Named combinations of dataset directory names from seedPlugin options.
|
|
31
|
+
* Always set by {@link loadSeedContext}; optional so a context built elsewhere stays valid.
|
|
32
|
+
*/
|
|
33
|
+
datasets?: Record<string, readonly string[]>;
|
|
29
34
|
/** Seed ordering information per TailorDB namespace. */
|
|
30
35
|
namespaces: SeedNamespaceConfig[];
|
|
31
36
|
/** IdP `_User` seeding context, or null when not applicable. */
|
package/dist/cli/ts-hook.mjs
CHANGED
|
@@ -174,10 +174,10 @@ const IMPORT_NONCE_PARAM = "tailorImportNonce";
|
|
|
174
174
|
// nonce'd entry module gets a fresh evaluation of its whole project subgraph.
|
|
175
175
|
// Bare specifiers are left alone: node_modules packages (and workspace-linked
|
|
176
176
|
// ones resolving outside node_modules) must stay singletons.
|
|
177
|
-
function propagateImportNonce(resolved,
|
|
177
|
+
function propagateImportNonce(resolved, parentURL) {
|
|
178
178
|
if (!resolved?.url?.startsWith("file:")) return resolved;
|
|
179
|
-
if (!
|
|
180
|
-
const nonce = new URL(
|
|
179
|
+
if (!parentURL?.startsWith("file:")) return resolved;
|
|
180
|
+
const nonce = new URL(parentURL).searchParams.get(IMPORT_NONCE_PARAM);
|
|
181
181
|
if (!nonce) return resolved;
|
|
182
182
|
const url = new URL(resolved.url);
|
|
183
183
|
if (url.searchParams.has(IMPORT_NONCE_PARAM) || url.pathname.includes("/node_modules/")) {
|
|
@@ -199,11 +199,13 @@ function isProjectLocalSpecifier(specifier) {
|
|
|
199
199
|
// --- module hooks ---
|
|
200
200
|
|
|
201
201
|
export async function resolve(specifier, context, nextResolve) {
|
|
202
|
+
const { parentURL } = context;
|
|
202
203
|
const resolved = await resolveTs(specifier, context, nextResolve);
|
|
203
|
-
return isProjectLocalSpecifier(specifier) ? propagateImportNonce(resolved,
|
|
204
|
+
return isProjectLocalSpecifier(specifier) ? propagateImportNonce(resolved, parentURL) : resolved;
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
async function resolveTs(specifier, context, nextResolve) {
|
|
208
|
+
const { parentURL } = context;
|
|
207
209
|
try {
|
|
208
210
|
return await nextResolve(specifier, context);
|
|
209
211
|
} catch (err) {
|
|
@@ -225,8 +227,8 @@ async function resolveTs(specifier, context, nextResolve) {
|
|
|
225
227
|
|
|
226
228
|
if (!specifier.startsWith(".") && !specifier.startsWith("/")) {
|
|
227
229
|
// Non-relative: try tsconfig path aliases
|
|
228
|
-
if (
|
|
229
|
-
const parentParsed = new URL(
|
|
230
|
+
if (parentURL?.startsWith("file://")) {
|
|
231
|
+
const parentParsed = new URL(parentURL);
|
|
230
232
|
const parentNonce = parentParsed.searchParams.get(IMPORT_NONCE_PARAM) ?? "";
|
|
231
233
|
parentParsed.search = "";
|
|
232
234
|
parentParsed.hash = "";
|
|
@@ -236,7 +238,7 @@ async function resolveTs(specifier, context, nextResolve) {
|
|
|
236
238
|
if (candidates) {
|
|
237
239
|
for (const candidate of candidates) {
|
|
238
240
|
const result = await tryResolveWithExtensions(candidate, context, nextResolve);
|
|
239
|
-
if (result) return propagateImportNonce(result,
|
|
241
|
+
if (result) return propagateImportNonce(result, parentURL);
|
|
240
242
|
}
|
|
241
243
|
}
|
|
242
244
|
}
|
|
@@ -291,11 +293,13 @@ export async function load(url, context, nextLoad) {
|
|
|
291
293
|
// on require() of scheme-only builtins (node:sqlite, node:test, node:sea) once both
|
|
292
294
|
// resolve and load are registered — nodejs/node#58607, fixed by nodejs/node#58612.
|
|
293
295
|
export function resolveSync(specifier, context, nextResolve) {
|
|
296
|
+
const { parentURL } = context;
|
|
294
297
|
const resolved = resolveTsSync(specifier, context, nextResolve);
|
|
295
|
-
return isProjectLocalSpecifier(specifier) ? propagateImportNonce(resolved,
|
|
298
|
+
return isProjectLocalSpecifier(specifier) ? propagateImportNonce(resolved, parentURL) : resolved;
|
|
296
299
|
}
|
|
297
300
|
|
|
298
301
|
function resolveTsSync(specifier, context, nextResolve) {
|
|
302
|
+
const { parentURL } = context;
|
|
299
303
|
try {
|
|
300
304
|
return nextResolve(specifier, context);
|
|
301
305
|
} catch (err) {
|
|
@@ -317,8 +321,8 @@ function resolveTsSync(specifier, context, nextResolve) {
|
|
|
317
321
|
|
|
318
322
|
if (!specifier.startsWith(".") && !specifier.startsWith("/")) {
|
|
319
323
|
// Non-relative: try tsconfig path aliases
|
|
320
|
-
if (
|
|
321
|
-
const parentParsed = new URL(
|
|
324
|
+
if (parentURL?.startsWith("file://")) {
|
|
325
|
+
const parentParsed = new URL(parentURL);
|
|
322
326
|
const parentNonce = parentParsed.searchParams.get(IMPORT_NONCE_PARAM) ?? "";
|
|
323
327
|
parentParsed.search = "";
|
|
324
328
|
parentParsed.hash = "";
|
|
@@ -328,7 +332,7 @@ function resolveTsSync(specifier, context, nextResolve) {
|
|
|
328
332
|
if (candidates) {
|
|
329
333
|
for (const candidate of candidates) {
|
|
330
334
|
const result = tryResolveWithExtensionsSync(candidate, context, nextResolve);
|
|
331
|
-
if (result) return propagateImportNonce(result,
|
|
335
|
+
if (result) return propagateImportNonce(result, parentURL);
|
|
332
336
|
}
|
|
333
337
|
}
|
|
334
338
|
}
|