@tailor-platform/sdk 1.44.2 → 1.45.1
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 +20 -0
- package/dist/{actor-DzCuoMlP.d.mts → actor-BmxQeMFP.d.mts} +2 -2
- package/dist/{application-7wtQzifE.mjs → application-B4zVVNRS.mjs} +28 -27
- package/dist/application-B4zVVNRS.mjs.map +1 -0
- package/dist/application-BIzicxMA.mjs +4 -0
- package/dist/cli/index.mjs +29 -29
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +6 -6
- package/dist/cli/lib.mjs +8 -8
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/{client-DcuQRqSd.mjs → client-BwXkoiMq.mjs} +3 -3
- package/dist/{client-DcuQRqSd.mjs.map → client-BwXkoiMq.mjs.map} +1 -1
- package/dist/{client-IsYnTV5A.mjs → client-DTaArWQr.mjs} +1 -1
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +16 -4
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-DQen2i_W.mjs → crash-report-BUHzuzDn.mjs} +1 -1
- package/dist/{crash-report-DVZsX1bs.mjs → crash-report-CtYCva4d.mjs} +3 -3
- package/dist/{crash-report-DVZsX1bs.mjs.map → crash-report-CtYCva4d.mjs.map} +1 -1
- package/dist/{errors-_M2TVoWh.mjs → errors-wNQxQQBH.mjs} +1 -1
- package/dist/{errors-_M2TVoWh.mjs.map → errors-wNQxQQBH.mjs.map} +1 -1
- package/dist/{file-utils-775qWKoo.mjs → file-utils-DjNi_3U_.mjs} +9 -9
- package/dist/file-utils-DjNi_3U_.mjs.map +1 -0
- package/dist/{index-DdsUV-aA.d.mts → index-B5_4Tzm2.d.mts} +2 -2
- package/dist/{index-BEEL1-6Z.d.mts → index-BBvPd9Uv.d.mts} +2 -2
- package/dist/{index-BOfTiouP.d.mts → index-DUKJPEwq.d.mts} +41 -8
- package/dist/{index-0Dk-fDWi.d.mts → index-DV-5OIEv.d.mts} +2 -2
- package/dist/{index-ZZYEd_0R.d.mts → index-Dxe6alSZ.d.mts} +2 -2
- package/dist/{interceptor-4UC-KTno.mjs → interceptor-CrcDfLPq.mjs} +1 -1
- package/dist/{interceptor-4UC-KTno.mjs.map → interceptor-CrcDfLPq.mjs.map} +1 -1
- package/dist/{kysely-type-BQsYEZoY.mjs → kysely-type-B8aRz_oC.mjs} +6 -6
- package/dist/kysely-type-B8aRz_oC.mjs.map +1 -0
- package/dist/multiline-e3IpANmS.mjs +39 -0
- package/dist/multiline-e3IpANmS.mjs.map +1 -0
- package/dist/{package-json-CRzw5eUf.mjs → package-json-6Px8bDpG.mjs} +1 -1
- package/dist/{package-json-CRzw5eUf.mjs.map → package-json-6Px8bDpG.mjs.map} +1 -1
- package/dist/package-json-7sRXVndJ.mjs +4 -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/file-utils/index.mjs +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +2 -2
- package/dist/{repl-editor-DjycioU-.mjs → repl-editor-BlT2dFtm.mjs} +1 -1
- package/dist/{repl-editor-DjycioU-.mjs.map → repl-editor-BlT2dFtm.mjs.map} +1 -1
- package/dist/{runtime-CEj_sAfP.mjs → runtime-D5AJYWnF.mjs} +85 -39
- package/dist/runtime-D5AJYWnF.mjs.map +1 -0
- package/dist/{seed-BkVKgsxf.mjs → seed-DrKY5yIF.mjs} +15 -15
- package/dist/seed-DrKY5yIF.mjs.map +1 -0
- package/dist/{service-CCnx_IFw.mjs → service-CCgw66c6.mjs} +2 -2
- package/dist/{service-CCnx_IFw.mjs.map → service-CCgw66c6.mjs.map} +1 -1
- package/dist/{tailor-db-field-D_z185oq.d.mts → tailor-db-field-Hx9OqPWY.d.mts} +5 -2
- package/dist/telemetry-BvI1EgMG.mjs +4 -0
- package/dist/{telemetry-B6Le9XT-.mjs → telemetry-DXitz4RH.mjs} +2 -2
- package/dist/{telemetry-B6Le9XT-.mjs.map → telemetry-DXitz4RH.mjs.map} +1 -1
- package/dist/utils/test/index.d.mts +3 -3
- package/dist/{workflow.generated-B7Mupf5V.d.mts → workflow.generated-DFljpJh7.d.mts} +2 -2
- package/docs/cli/tailordb.md +35 -415
- package/docs/services/executor.md +15 -1
- package/docs/services/idp.md +2 -2
- package/docs/services/tailordb-migration.md +418 -0
- package/docs/services/tailordb.md +6 -0
- package/package.json +4 -5
- package/dist/application-7wtQzifE.mjs.map +0 -1
- package/dist/application-P55ZFKHG.mjs +0 -4
- package/dist/file-utils-775qWKoo.mjs.map +0 -1
- package/dist/kysely-type-BQsYEZoY.mjs.map +0 -1
- package/dist/package-json-DR_mqrCW.mjs +0 -4
- package/dist/runtime-CEj_sAfP.mjs.map +0 -1
- package/dist/seed-BkVKgsxf.mjs.map +0 -1
- package/dist/telemetry-C_WXxIo0.mjs +0 -4
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-
|
|
2
|
+
import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-DV-5OIEv.mjs";
|
|
3
3
|
export { KyselyGeneratorID, kyselyTypePlugin };
|
package/dist/plugin/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@tailor-platform/function-types" />
|
|
2
|
-
import { n as TailorAnyDBType } from "../tailor-db-field-
|
|
3
|
-
import { r as TailorEnv, t as TailorActor } from "../actor-
|
|
2
|
+
import { n as TailorAnyDBType } from "../tailor-db-field-Hx9OqPWY.mjs";
|
|
3
|
+
import { r as TailorEnv, t as TailorActor } from "../actor-BmxQeMFP.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin/with-context.d.ts
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repl-editor-DjycioU-.mjs","names":[],"sources":["../src/cli/query/repl-editor.ts"],"sourcesContent":["import { GraphQLError, Lexer, Source, TokenKind } from \"graphql\";\nimport { getSegments } from \"sql-highlight\";\nimport type { TransformEvent, TransformState } from \"@toiroakr/read-multiline\";\n\n// ANSI colour sequences. Kept inline (rather than going through `node:util`\n// styleText) so that tests running outside a TTY still produce deterministic\n// escape sequences regardless of detected colour support.\nconst RESET = \"\\x1b[0m\";\nconst BLUE = \"\\x1b[34m\";\nconst MAGENTA = \"\\x1b[35m\";\nconst YELLOW = \"\\x1b[33m\";\nconst BRIGHT_GREEN = \"\\x1b[92m\";\nconst CYAN = \"\\x1b[36m\";\nconst BRIGHT_BLUE = \"\\x1b[94m\";\nconst BOLD_CYAN = \"\\x1b[1;36m\";\nconst BOLD_MAGENTA = \"\\x1b[1;35m\";\nconst ITALIC_YELLOW = \"\\x1b[3;33m\";\nconst GREEN = \"\\x1b[32m\";\nconst DIM = \"\\x1b[90m\";\nconst DIM_YELLOW = \"\\x1b[2;33m\";\n\nconst SQL_STYLE_MAP: Record<string, string> = {\n keyword: BLUE,\n function: MAGENTA,\n identifier: YELLOW,\n string: BRIGHT_GREEN,\n number: CYAN,\n bracket: DIM_YELLOW,\n special: DIM,\n};\n\n/**\n * Highlight a single SQL line using the `sql-highlight` tokenizer.\n * @param line - SQL text for a single editor line\n * @returns ANSI-decorated line safe for terminal output\n */\nexport function highlightSqlLine(line: string): string {\n const segments = getSegments(line);\n let result = \"\";\n for (const seg of segments) {\n const style = SQL_STYLE_MAP[seg.name];\n result += style ? style + seg.content + RESET : seg.content;\n }\n return result;\n}\n\nconst GQL_KEYWORDS = new Set([\n \"query\",\n \"mutation\",\n \"subscription\",\n \"fragment\",\n \"on\",\n \"type\",\n \"input\",\n \"enum\",\n \"interface\",\n \"union\",\n \"scalar\",\n \"extend\",\n \"schema\",\n \"directive\",\n \"implements\",\n]);\n\n// Keywords that introduce a definition name (next NAME token is the def).\nconst GQL_DEF_KEYWORDS = new Set([\"query\", \"mutation\", \"subscription\", \"fragment\"]);\n\nconst GQL_BUILTINS = new Set([\"true\", \"false\", \"null\"]);\n\n/**\n * Highlight a single GraphQL line using the official `graphql` Lexer. Tracks\n * paren depth and the previous token to provide semantic-level colouring\n * (field names vs argument names vs types).\n * @param line - GraphQL text for a single editor line\n * @returns ANSI-decorated line, or the input unchanged when the lexer rejects it\n */\nexport function highlightGraphqlLine(line: string): string {\n if (line.trimStart().startsWith(\"#\")) {\n return `${DIM}${line}${RESET}`;\n }\n\n try {\n const source = new Source(line);\n const lexer = new Lexer(source);\n let result = \"\";\n let pos = 0;\n\n let parenDepth = 0;\n let prevKind: string = \"\";\n let prevText = \"\";\n let afterColon = false;\n\n let token = lexer.advance();\n while (token.kind !== TokenKind.EOF) {\n if (token.start > pos) {\n result += line.slice(pos, token.start);\n }\n\n const text = line.slice(token.start, token.end);\n switch (token.kind) {\n case TokenKind.NAME: {\n if (prevKind === TokenKind.DOLLAR) {\n result += `${MAGENTA}${text}${RESET}`;\n } else if (prevKind === TokenKind.AT) {\n result += `${BOLD_MAGENTA}${text}${RESET}`;\n } else if (GQL_BUILTINS.has(text) || GQL_KEYWORDS.has(text)) {\n result += `${BLUE}${text}${RESET}`;\n } else if (GQL_DEF_KEYWORDS.has(prevText)) {\n result += `${BOLD_CYAN}${text}${RESET}`;\n } else if (afterColon) {\n result += `${CYAN}${text}${RESET}`;\n } else if (parenDepth > 0) {\n result += `${ITALIC_YELLOW}${text}${RESET}`;\n } else {\n result += `${BRIGHT_BLUE}${text}${RESET}`;\n }\n afterColon = false;\n break;\n }\n case TokenKind.INT:\n case TokenKind.FLOAT:\n result += `${BLUE}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n result += `${GREEN}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.DOLLAR:\n result += `${MAGENTA}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.AT:\n result += `${BOLD_MAGENTA}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.BRACE_L:\n case TokenKind.BRACE_R:\n result += `${YELLOW}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.PAREN_L:\n parenDepth += 1;\n result += `${DIM_YELLOW}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.PAREN_R:\n parenDepth = Math.max(0, parenDepth - 1);\n result += `${DIM_YELLOW}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.BRACKET_L:\n case TokenKind.BRACKET_R:\n result += `${DIM_YELLOW}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.COLON:\n result += `${DIM}${text}${RESET}`;\n afterColon = true;\n break;\n case TokenKind.BANG:\n case TokenKind.EQUALS:\n case TokenKind.PIPE:\n case TokenKind.AMP:\n case TokenKind.SPREAD:\n result += `${DIM}${text}${RESET}`;\n afterColon = false;\n break;\n default:\n result += text;\n afterColon = false;\n }\n\n prevKind = token.kind;\n prevText = text;\n pos = token.end;\n token = lexer.advance();\n }\n\n if (pos < line.length) {\n result += line.slice(pos);\n }\n return result;\n } catch (error) {\n // The lexer throws GraphQLError on partial or invalid input (e.g. an\n // unterminated string while the user is still typing). Fall back to the\n // raw line so the editor keeps rendering without colour until the input\n // is valid. Any other error is a real bug and should surface.\n if (error instanceof GraphQLError) {\n return line;\n }\n throw error;\n }\n}\n\nconst BRACKET_PAIRS: Record<string, string> = { \"(\": \")\", \"[\": \"]\", \"{\": \"}\" };\nconst CLOSE_BRACKETS = new Set(Object.values(BRACKET_PAIRS));\n\n/**\n * Apply auto-close brackets and auto-indent on newline. Works for both SQL\n * and GraphQL because both languages share the `()`, `[]`, `{}` bracket set.\n * @param state - Editor state after the last edit\n * @param event - Event describing the edit that just occurred\n * @returns A new editor state to apply, or `undefined` to leave the state unchanged\n */\nexport function replTransform(\n state: TransformState,\n event: TransformEvent,\n): TransformState | undefined {\n const { lines, row, col } = state;\n\n if (event.type === \"insert\" && event.char in BRACKET_PAIRS) {\n const close = BRACKET_PAIRS[event.char];\n const line = lines[row];\n const newLine = line.slice(0, col) + close + line.slice(col);\n return { lines: lines.with(row, newLine), row, col };\n }\n\n if (event.type === \"insert\" && CLOSE_BRACKETS.has(event.char)) {\n const line = lines[row];\n if (line[col] === event.char) {\n const newLine = line.slice(0, col) + line.slice(col + 1);\n return { lines: lines.with(row, newLine), row, col };\n }\n }\n\n if (event.type === \"backspace\") {\n const line = lines[row];\n const beforeCursor = line.slice(0, col);\n if (beforeCursor.length >= 1 && /^ +$/.test(beforeCursor)) {\n const newIndent = beforeCursor.slice(0, -1);\n const newLine = newIndent + line.slice(col);\n return { lines: lines.with(row, newLine), row, col: newIndent.length };\n }\n }\n\n if (event.type === \"newline\" && row > 0) {\n const prevLine = lines[row - 1];\n const baseIndent = prevLine.match(/^(\\s*)/)?.[1] ?? \"\";\n const endsWithOpen = /[{([]$/.test(prevLine.trimEnd());\n const startsWithClose = /^[}\\])]/.test(lines[row].trimStart());\n\n if (endsWithOpen && startsWithClose) {\n // Bracket expansion: the cursor sits between a matching open/close\n // pair (e.g. `{|}`). Expand into a three-line block with the cursor\n // on an indented middle line.\n const innerIndent = baseIndent + \" \";\n const newLines = [...lines];\n newLines[row] = innerIndent;\n newLines.splice(row + 1, 0, baseIndent + lines[row].trimStart());\n return { lines: newLines, row, col: innerIndent.length };\n }\n if (endsWithOpen) {\n // A lone open bracket on the previous line: drop an extra indent for\n // the new line and auto-insert the matching closing bracket below.\n const openChar = prevLine.trimEnd().slice(-1);\n const closeChar = BRACKET_PAIRS[openChar] ?? \"}\";\n const indent = baseIndent + \" \";\n const newLines = [...lines];\n newLines[row] = indent + lines[row];\n newLines.splice(row + 1, 0, baseIndent + closeChar);\n return { lines: newLines, row, col: indent.length };\n }\n if (baseIndent && col === 0) {\n return { lines: lines.with(row, baseIndent + lines[row]), row, col: baseIndent.length };\n }\n }\n\n return undefined;\n}\n"],"mappings":";;;;;AAOA,MAAM,QAAQ;AACd,MAAM,OAAO;AACb,MAAM,UAAU;AAChB,MAAM,SAAS;AACf,MAAM,eAAe;AACrB,MAAM,OAAO;AACb,MAAM,cAAc;AACpB,MAAM,YAAY;AAClB,MAAM,eAAe;AACrB,MAAM,gBAAgB;AACtB,MAAM,QAAQ;AACd,MAAM,MAAM;AACZ,MAAM,aAAa;AAEnB,MAAM,gBAAwC;CAC5C,SAAS;CACT,UAAU;CACV,YAAY;CACZ,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,SAAS;CACV;;;;;;AAOD,SAAgB,iBAAiB,MAAsB;CACrD,MAAM,WAAW,YAAY,KAAK;CAClC,IAAI,SAAS;AACb,MAAK,MAAM,OAAO,UAAU;EAC1B,MAAM,QAAQ,cAAc,IAAI;AAChC,YAAU,QAAQ,QAAQ,IAAI,UAAU,QAAQ,IAAI;;AAEtD,QAAO;;AAGT,MAAM,eAAe,IAAI,IAAI;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC;AAGF,MAAM,mBAAmB,IAAI,IAAI;CAAC;CAAS;CAAY;CAAgB;CAAW,CAAC;AAEnF,MAAM,eAAe,IAAI,IAAI;CAAC;CAAQ;CAAS;CAAO,CAAC;;;;;;;;AASvD,SAAgB,qBAAqB,MAAsB;AACzD,KAAI,KAAK,WAAW,CAAC,WAAW,IAAI,CAClC,QAAO,GAAG,MAAM,OAAO;AAGzB,KAAI;EAEF,MAAM,QAAQ,IAAI,MAAM,IADL,OAAO,KACI,CAAC;EAC/B,IAAI,SAAS;EACb,IAAI,MAAM;EAEV,IAAI,aAAa;EACjB,IAAI,WAAmB;EACvB,IAAI,WAAW;EACf,IAAI,aAAa;EAEjB,IAAI,QAAQ,MAAM,SAAS;AAC3B,SAAO,MAAM,SAAS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K,aAAa,EAAE;GACzD,MAAM,YAAY,aAAa,MAAM,GAAG,GAAG;GAC3C,MAAM,UAAU,YAAY,KAAK,MAAM,IAAI;AAC3C,UAAO;IAAE,OAAO,MAAM,KAAK,KAAK,QAAQ;IAAE;IAAK,KAAK,UAAU;IAAQ;;;AAI1E,KAAI,MAAM,SAAS,aAAa,MAAM,GAAG;EACvC,MAAM,WAAW,MAAM,MAAM;EAC7B,MAAM,aAAa,SAAS,MAAM,SAAS,GAAG,MAAM;EACpD,MAAM,eAAe,SAAS,KAAK,SAAS,SAAS,CAAC;EACtD,MAAM,kBAAkB,UAAU,KAAK,MAAM,KAAK,WAAW,CAAC;AAE9D,MAAI,gBAAgB,iBAAiB;GAInC,MAAM,cAAc,aAAa;GACjC,MAAM,WAAW,CAAC,GAAG,MAAM;AAC3B,YAAS,OAAO;AAChB,YAAS,OAAO,MAAM,GAAG,GAAG,aAAa,MAAM,KAAK,WAAW,CAAC;AAChE,UAAO;IAAE,OAAO;IAAU;IAAK,KAAK,YAAY;IAAQ;;AAE1D,MAAI,cAAc;GAIhB,MAAM,YAAY,cADD,SAAS,SAAS,CAAC,MAAM,GACF,KAAK;GAC7C,MAAM,SAAS,aAAa;GAC5B,MAAM,WAAW,CAAC,GAAG,MAAM;AAC3B,YAAS,OAAO,SAAS,MAAM;AAC/B,YAAS,OAAO,MAAM,GAAG,GAAG,aAAa,UAAU;AACnD,UAAO;IAAE,OAAO;IAAU;IAAK,KAAK,OAAO;IAAQ;;AAErD,MAAI,cAAc,QAAQ,EACxB,QAAO;GAAE,OAAO,MAAM,KAAK,KAAK,aAAa,MAAM,KAAK;GAAE;GAAK,KAAK,WAAW;GAAQ"}
|
|
1
|
+
{"version":3,"file":"repl-editor-BlT2dFtm.mjs","names":[],"sources":["../src/cli/query/repl-editor.ts"],"sourcesContent":["import { GraphQLError, Lexer, Source, TokenKind } from \"graphql\";\nimport { getSegments } from \"sql-highlight\";\nimport type { TransformEvent, TransformState } from \"@toiroakr/read-multiline\";\n\n// ANSI colour sequences. Kept inline (rather than going through `node:util`\n// styleText) so that tests running outside a TTY still produce deterministic\n// escape sequences regardless of detected colour support.\nconst RESET = \"\\x1b[0m\";\nconst BLUE = \"\\x1b[34m\";\nconst MAGENTA = \"\\x1b[35m\";\nconst YELLOW = \"\\x1b[33m\";\nconst BRIGHT_GREEN = \"\\x1b[92m\";\nconst CYAN = \"\\x1b[36m\";\nconst BRIGHT_BLUE = \"\\x1b[94m\";\nconst BOLD_CYAN = \"\\x1b[1;36m\";\nconst BOLD_MAGENTA = \"\\x1b[1;35m\";\nconst ITALIC_YELLOW = \"\\x1b[3;33m\";\nconst GREEN = \"\\x1b[32m\";\nconst DIM = \"\\x1b[90m\";\nconst DIM_YELLOW = \"\\x1b[2;33m\";\n\nconst SQL_STYLE_MAP: Record<string, string> = {\n keyword: BLUE,\n function: MAGENTA,\n identifier: YELLOW,\n string: BRIGHT_GREEN,\n number: CYAN,\n bracket: DIM_YELLOW,\n special: DIM,\n};\n\n/**\n * Highlight a single SQL line using the `sql-highlight` tokenizer.\n * @param line - SQL text for a single editor line\n * @returns ANSI-decorated line safe for terminal output\n */\nexport function highlightSqlLine(line: string): string {\n const segments = getSegments(line);\n let result = \"\";\n for (const seg of segments) {\n const style = SQL_STYLE_MAP[seg.name];\n result += style ? style + seg.content + RESET : seg.content;\n }\n return result;\n}\n\nconst GQL_KEYWORDS = new Set([\n \"query\",\n \"mutation\",\n \"subscription\",\n \"fragment\",\n \"on\",\n \"type\",\n \"input\",\n \"enum\",\n \"interface\",\n \"union\",\n \"scalar\",\n \"extend\",\n \"schema\",\n \"directive\",\n \"implements\",\n]);\n\n// Keywords that introduce a definition name (next NAME token is the def).\nconst GQL_DEF_KEYWORDS = new Set([\"query\", \"mutation\", \"subscription\", \"fragment\"]);\n\nconst GQL_BUILTINS = new Set([\"true\", \"false\", \"null\"]);\n\n/**\n * Highlight a single GraphQL line using the official `graphql` Lexer. Tracks\n * paren depth and the previous token to provide semantic-level colouring\n * (field names vs argument names vs types).\n * @param line - GraphQL text for a single editor line\n * @returns ANSI-decorated line, or the input unchanged when the lexer rejects it\n */\nexport function highlightGraphqlLine(line: string): string {\n if (line.trimStart().startsWith(\"#\")) {\n return `${DIM}${line}${RESET}`;\n }\n\n try {\n const source = new Source(line);\n const lexer = new Lexer(source);\n let result = \"\";\n let pos = 0;\n\n let parenDepth = 0;\n let prevKind: string = \"\";\n let prevText = \"\";\n let afterColon = false;\n\n let token = lexer.advance();\n while (token.kind !== TokenKind.EOF) {\n if (token.start > pos) {\n result += line.slice(pos, token.start);\n }\n\n const text = line.slice(token.start, token.end);\n switch (token.kind) {\n case TokenKind.NAME: {\n if (prevKind === TokenKind.DOLLAR) {\n result += `${MAGENTA}${text}${RESET}`;\n } else if (prevKind === TokenKind.AT) {\n result += `${BOLD_MAGENTA}${text}${RESET}`;\n } else if (GQL_BUILTINS.has(text) || GQL_KEYWORDS.has(text)) {\n result += `${BLUE}${text}${RESET}`;\n } else if (GQL_DEF_KEYWORDS.has(prevText)) {\n result += `${BOLD_CYAN}${text}${RESET}`;\n } else if (afterColon) {\n result += `${CYAN}${text}${RESET}`;\n } else if (parenDepth > 0) {\n result += `${ITALIC_YELLOW}${text}${RESET}`;\n } else {\n result += `${BRIGHT_BLUE}${text}${RESET}`;\n }\n afterColon = false;\n break;\n }\n case TokenKind.INT:\n case TokenKind.FLOAT:\n result += `${BLUE}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n result += `${GREEN}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.DOLLAR:\n result += `${MAGENTA}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.AT:\n result += `${BOLD_MAGENTA}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.BRACE_L:\n case TokenKind.BRACE_R:\n result += `${YELLOW}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.PAREN_L:\n parenDepth += 1;\n result += `${DIM_YELLOW}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.PAREN_R:\n parenDepth = Math.max(0, parenDepth - 1);\n result += `${DIM_YELLOW}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.BRACKET_L:\n case TokenKind.BRACKET_R:\n result += `${DIM_YELLOW}${text}${RESET}`;\n afterColon = false;\n break;\n case TokenKind.COLON:\n result += `${DIM}${text}${RESET}`;\n afterColon = true;\n break;\n case TokenKind.BANG:\n case TokenKind.EQUALS:\n case TokenKind.PIPE:\n case TokenKind.AMP:\n case TokenKind.SPREAD:\n result += `${DIM}${text}${RESET}`;\n afterColon = false;\n break;\n default:\n result += text;\n afterColon = false;\n }\n\n prevKind = token.kind;\n prevText = text;\n pos = token.end;\n token = lexer.advance();\n }\n\n if (pos < line.length) {\n result += line.slice(pos);\n }\n return result;\n } catch (error) {\n // The lexer throws GraphQLError on partial or invalid input (e.g. an\n // unterminated string while the user is still typing). Fall back to the\n // raw line so the editor keeps rendering without colour until the input\n // is valid. Any other error is a real bug and should surface.\n if (error instanceof GraphQLError) {\n return line;\n }\n throw error;\n }\n}\n\nconst BRACKET_PAIRS: Record<string, string> = { \"(\": \")\", \"[\": \"]\", \"{\": \"}\" };\nconst CLOSE_BRACKETS = new Set(Object.values(BRACKET_PAIRS));\n\n/**\n * Apply auto-close brackets and auto-indent on newline. Works for both SQL\n * and GraphQL because both languages share the `()`, `[]`, `{}` bracket set.\n * @param state - Editor state after the last edit\n * @param event - Event describing the edit that just occurred\n * @returns A new editor state to apply, or `undefined` to leave the state unchanged\n */\nexport function replTransform(\n state: TransformState,\n event: TransformEvent,\n): TransformState | undefined {\n const { lines, row, col } = state;\n\n if (event.type === \"insert\" && event.char in BRACKET_PAIRS) {\n const close = BRACKET_PAIRS[event.char];\n const line = lines[row];\n const newLine = line.slice(0, col) + close + line.slice(col);\n return { lines: lines.with(row, newLine), row, col };\n }\n\n if (event.type === \"insert\" && CLOSE_BRACKETS.has(event.char)) {\n const line = lines[row];\n if (line[col] === event.char) {\n const newLine = line.slice(0, col) + line.slice(col + 1);\n return { lines: lines.with(row, newLine), row, col };\n }\n }\n\n if (event.type === \"backspace\") {\n const line = lines[row];\n const beforeCursor = line.slice(0, col);\n if (beforeCursor.length >= 1 && /^ +$/.test(beforeCursor)) {\n const newIndent = beforeCursor.slice(0, -1);\n const newLine = newIndent + line.slice(col);\n return { lines: lines.with(row, newLine), row, col: newIndent.length };\n }\n }\n\n if (event.type === \"newline\" && row > 0) {\n const prevLine = lines[row - 1];\n const baseIndent = prevLine.match(/^(\\s*)/)?.[1] ?? \"\";\n const endsWithOpen = /[{([]$/.test(prevLine.trimEnd());\n const startsWithClose = /^[}\\])]/.test(lines[row].trimStart());\n\n if (endsWithOpen && startsWithClose) {\n // Bracket expansion: the cursor sits between a matching open/close\n // pair (e.g. `{|}`). Expand into a three-line block with the cursor\n // on an indented middle line.\n const innerIndent = baseIndent + \" \";\n const newLines = [...lines];\n newLines[row] = innerIndent;\n newLines.splice(row + 1, 0, baseIndent + lines[row].trimStart());\n return { lines: newLines, row, col: innerIndent.length };\n }\n if (endsWithOpen) {\n // A lone open bracket on the previous line: drop an extra indent for\n // the new line and auto-insert the matching closing bracket below.\n const openChar = prevLine.trimEnd().slice(-1);\n const closeChar = BRACKET_PAIRS[openChar] ?? \"}\";\n const indent = baseIndent + \" \";\n const newLines = [...lines];\n newLines[row] = indent + lines[row];\n newLines.splice(row + 1, 0, baseIndent + closeChar);\n return { lines: newLines, row, col: indent.length };\n }\n if (baseIndent && col === 0) {\n return { lines: lines.with(row, baseIndent + lines[row]), row, col: baseIndent.length };\n }\n }\n\n return undefined;\n}\n"],"mappings":";;;;;AAOA,MAAM,QAAQ;AACd,MAAM,OAAO;AACb,MAAM,UAAU;AAChB,MAAM,SAAS;AACf,MAAM,eAAe;AACrB,MAAM,OAAO;AACb,MAAM,cAAc;AACpB,MAAM,YAAY;AAClB,MAAM,eAAe;AACrB,MAAM,gBAAgB;AACtB,MAAM,QAAQ;AACd,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,GAAG,MAAM;EACpD,MAAM,eAAe,SAAS,KAAK,SAAS,SAAS,CAAC;EACtD,MAAM,kBAAkB,UAAU,KAAK,MAAM,KAAK,WAAW,CAAC;AAE9D,MAAI,gBAAgB,iBAAiB;GAInC,MAAM,cAAc,aAAa;GACjC,MAAM,WAAW,CAAC,GAAG,MAAM;AAC3B,YAAS,OAAO;AAChB,YAAS,OAAO,MAAM,GAAG,GAAG,aAAa,MAAM,KAAK,WAAW,CAAC;AAChE,UAAO;IAAE,OAAO;IAAU;IAAK,KAAK,YAAY;IAAQ;;AAE1D,MAAI,cAAc;GAIhB,MAAM,YAAY,cADD,SAAS,SAAS,CAAC,MAAM,GACF,KAAK;GAC7C,MAAM,SAAS,aAAa;GAC5B,MAAM,WAAW,CAAC,GAAG,MAAM;AAC3B,YAAS,OAAO,SAAS,MAAM;AAC/B,YAAS,OAAO,MAAM,GAAG,GAAG,aAAa,UAAU;AACnD,UAAO;IAAE,OAAO;IAAU;IAAK,KAAK,OAAO;IAAQ;;AAErD,MAAI,cAAc,QAAQ,EACxB,QAAO;GAAE,OAAO,MAAM,KAAK,KAAK,aAAa,MAAM,KAAK;GAAE;GAAK,KAAK,WAAW;GAAQ"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as FilterSchema, A as FunctionExecution_Status, B as AuthOAuth2Client_GrantType, C as TailorDBType_Permission_Operator, D as IdPLang, E as PipelineResolver_OperationType, F as AuthConnection_Type, H as AuthSCIMAttribute_Type, I as AuthHookPoint, J as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, K as TenantProviderConfig_TenantProviderType, L as AuthIDPConfig_AuthType, M as ExecutorJobStatus, N as ExecutorTargetType, O as IdPPermissionOperator, P as ExecutorTriggerType, Q as Condition_Operator, R as AuthInvokerSchema, S as TailorDBGQLPermission_Permit, T as TailorDBType_PermitAction, U as AuthSCIMAttribute_Uniqueness, V as AuthSCIMAttribute_Mutability, W as AuthSCIMConfig_AuthorizationType, X as Subgraph_ServiceType, Y as ApplicationSchemaUpdateAttemptStatus, Z as ConditionSchema, _ as WorkspacePlatformUserRole, a as fetchMachineUserToken, b as TailorDBGQLPermission_Action, d as initOperatorClient, et as PageDirection, g as OperatorService, h as userAgent, i as fetchAll, k as IdPPermissionPermit, m as resolveStaticWebsiteUrls, o as fetchPaged, p as platformBaseUrl, q as UserProfileProviderConfig_UserProfileProviderType, v as WorkflowExecution_Status, w as TailorDBType_Permission_Permit, x as TailorDBGQLPermission_Operator, y as WorkflowJobExecution_Status, z as AuthOAuth2Client_ClientType } from "./client-
|
|
2
|
+
import { $ as FilterSchema, A as FunctionExecution_Status, B as AuthOAuth2Client_GrantType, C as TailorDBType_Permission_Operator, D as IdPLang, E as PipelineResolver_OperationType, F as AuthConnection_Type, H as AuthSCIMAttribute_Type, I as AuthHookPoint, J as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, K as TenantProviderConfig_TenantProviderType, L as AuthIDPConfig_AuthType, M as ExecutorJobStatus, N as ExecutorTargetType, O as IdPPermissionOperator, P as ExecutorTriggerType, Q as Condition_Operator, R as AuthInvokerSchema, S as TailorDBGQLPermission_Permit, T as TailorDBType_PermitAction, U as AuthSCIMAttribute_Uniqueness, V as AuthSCIMAttribute_Mutability, W as AuthSCIMConfig_AuthorizationType, X as Subgraph_ServiceType, Y as ApplicationSchemaUpdateAttemptStatus, Z as ConditionSchema, _ as WorkspacePlatformUserRole, a as fetchMachineUserToken, b as TailorDBGQLPermission_Action, d as initOperatorClient, et as PageDirection, g as OperatorService, h as userAgent, i as fetchAll, k as IdPPermissionPermit, m as resolveStaticWebsiteUrls, o as fetchPaged, p as platformBaseUrl, q as UserProfileProviderConfig_UserProfileProviderType, v as WorkflowExecution_Status, w as TailorDBType_Permission_Permit, x as TailorDBGQLPermission_Operator, y as WorkflowJobExecution_Status, z as AuthOAuth2Client_ClientType } from "./client-BwXkoiMq.mjs";
|
|
3
3
|
import { t as db } from "./schema-DBq6hr6h.mjs";
|
|
4
4
|
import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-DTNAMYGy.mjs";
|
|
5
|
-
import { C as loadWorkspaceId, D as writePlatformConfig, S as loadAccessToken, _ as getDistDir, d as buildResolverOperationHookExpr, f as OAuth2ClientSchema, g as createBundleCache, h as loadFilesWithIgnores, m as stringifyFunction, n as generatePluginFilesIfNeeded, p as TailorDBTypeSchema, r as loadApplication, s as createExecutorService, t as defineApplication, u as buildExecutorArgsExpr, v as hashFile, w as readPlatformConfig, y as loadConfig } from "./application-
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { C as loadWorkspaceId, D as writePlatformConfig, S as loadAccessToken, _ as getDistDir, d as buildResolverOperationHookExpr, f as OAuth2ClientSchema, g as createBundleCache, h as loadFilesWithIgnores, m as stringifyFunction, n as generatePluginFilesIfNeeded, p as TailorDBTypeSchema, r as loadApplication, s as createExecutorService, t as defineApplication, u as buildExecutorArgsExpr, v as hashFile, w as readPlatformConfig, y as loadConfig } from "./application-B4zVVNRS.mjs";
|
|
6
|
+
import { t as multiline } from "./multiline-e3IpANmS.mjs";
|
|
7
|
+
import { t as readPackageJson } from "./package-json-6Px8bDpG.mjs";
|
|
8
|
+
import { n as isCLIError, t as createCLIError } from "./errors-wNQxQQBH.mjs";
|
|
9
|
+
import { r as withSpan } from "./telemetry-DXitz4RH.mjs";
|
|
9
10
|
import { arg, createDefineCommand, defineCommand, runCommand } from "politty";
|
|
10
11
|
import { z } from "zod";
|
|
11
12
|
import * as fs$1 from "node:fs";
|
|
@@ -16,7 +17,6 @@ import * as path from "pathe";
|
|
|
16
17
|
import { formatDistanceToNowStrict } from "date-fns";
|
|
17
18
|
import { getBorderCharacters, table } from "table";
|
|
18
19
|
import { pathToFileURL } from "node:url";
|
|
19
|
-
import ml from "multiline-ts";
|
|
20
20
|
import { tmpdir } from "node:os";
|
|
21
21
|
import { findUpSync } from "find-up-simple";
|
|
22
22
|
import { xdgConfig } from "xdg-basedir";
|
|
@@ -787,9 +787,10 @@ function extractAttributesFromConfig(config) {
|
|
|
787
787
|
* @param attributeList - Attribute list configuration
|
|
788
788
|
* @param env - Environment configuration
|
|
789
789
|
* @param machineUserNames - Registered machine user names (used to narrow `authInvoker` strings)
|
|
790
|
+
* @param idpNames - Registered IdP names (used to narrow `idpUser*Trigger({ idp })` strings)
|
|
790
791
|
* @returns Generated type definition source
|
|
791
792
|
*/
|
|
792
|
-
function generateTypeDefinition(attributeMap, attributeList, env, machineUserNames) {
|
|
793
|
+
function generateTypeDefinition(attributeMap, attributeList, env, machineUserNames, idpNames) {
|
|
793
794
|
const mapFields = attributeMap ? Object.entries(attributeMap).map(([key, value]) => ` ${key}: ${value};`).join("\n") : "";
|
|
794
795
|
const mapBody = !attributeMap || Object.keys(attributeMap).length === 0 ? "{}" : `{
|
|
795
796
|
${mapFields}
|
|
@@ -805,7 +806,11 @@ ${envFields}
|
|
|
805
806
|
}`;
|
|
806
807
|
const isValidIdentifier = (s) => /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(s);
|
|
807
808
|
const machineUserFields = machineUserNames?.length ? machineUserNames.map((name) => ` ${isValidIdentifier(name) ? name : JSON.stringify(name)}: true;`).join("\n") : "";
|
|
808
|
-
|
|
809
|
+
const machineUserBody = !machineUserNames || machineUserNames.length === 0 ? "{}" : `{
|
|
810
|
+
${machineUserFields}
|
|
811
|
+
}`;
|
|
812
|
+
const idpNameFields = idpNames?.length ? idpNames.map((name) => ` ${isValidIdentifier(name) ? name : JSON.stringify(name)}: true;`).join("\n") : "";
|
|
813
|
+
return multiline`
|
|
809
814
|
// This file is auto-generated by @tailor-platform/sdk
|
|
810
815
|
// Do not edit this file manually
|
|
811
816
|
// Regenerated automatically when running 'tailor-sdk apply' or 'tailor-sdk generate'
|
|
@@ -814,8 +819,9 @@ declare module "@tailor-platform/sdk" {
|
|
|
814
819
|
interface AttributeMap ${mapBody}
|
|
815
820
|
interface AttributeList ${listBody}
|
|
816
821
|
interface Env ${envBody}
|
|
817
|
-
interface MachineUserNameRegistry ${
|
|
818
|
-
${
|
|
822
|
+
interface MachineUserNameRegistry ${machineUserBody}
|
|
823
|
+
interface IdpNameRegistry ${!idpNames || idpNames.length === 0 ? "{}" : `{
|
|
824
|
+
${idpNameFields}
|
|
819
825
|
}`}
|
|
820
826
|
}
|
|
821
827
|
|
|
@@ -824,8 +830,9 @@ export {};
|
|
|
824
830
|
`;
|
|
825
831
|
}
|
|
826
832
|
function collectAttributesFromConfig(config) {
|
|
833
|
+
const idpNames = config.idp?.length ? [...new Set(config.idp.map((idp) => idp.name))] : void 0;
|
|
827
834
|
const auth = config.auth;
|
|
828
|
-
if (!auth || typeof auth !== "object") return {};
|
|
835
|
+
if (!auth || typeof auth !== "object") return idpNames ? { idpNames } : {};
|
|
829
836
|
const machineUsersObj = auth.machineUsers;
|
|
830
837
|
const machineUserNames = machineUsersObj && typeof machineUsersObj === "object" ? Object.keys(machineUsersObj) : void 0;
|
|
831
838
|
const inferAttributeType = (field) => {
|
|
@@ -849,21 +856,29 @@ function collectAttributesFromConfig(config) {
|
|
|
849
856
|
return acc;
|
|
850
857
|
}, {}) : void 0,
|
|
851
858
|
attributeList,
|
|
852
|
-
machineUserNames
|
|
859
|
+
machineUserNames,
|
|
860
|
+
idpNames
|
|
853
861
|
};
|
|
854
862
|
}
|
|
855
863
|
if ("machineUserAttributes" in auth) {
|
|
856
864
|
const machineUserAttributes = auth.machineUserAttributes;
|
|
857
|
-
if (!machineUserAttributes) return {
|
|
865
|
+
if (!machineUserAttributes) return {
|
|
866
|
+
machineUserNames,
|
|
867
|
+
idpNames
|
|
868
|
+
};
|
|
858
869
|
return {
|
|
859
870
|
attributeMap: Object.entries(machineUserAttributes).reduce((acc, [key, field]) => {
|
|
860
871
|
acc[key] = inferAttributeType(field);
|
|
861
872
|
return acc;
|
|
862
873
|
}, {}),
|
|
863
|
-
machineUserNames
|
|
874
|
+
machineUserNames,
|
|
875
|
+
idpNames
|
|
864
876
|
};
|
|
865
877
|
}
|
|
866
|
-
return {
|
|
878
|
+
return {
|
|
879
|
+
machineUserNames,
|
|
880
|
+
idpNames
|
|
881
|
+
};
|
|
867
882
|
}
|
|
868
883
|
/**
|
|
869
884
|
* Resolve the output path for the generated type definition file.
|
|
@@ -887,14 +902,15 @@ function resolveTypeDefinitionPath(configPath) {
|
|
|
887
902
|
async function generateUserTypes(options) {
|
|
888
903
|
const { config, configPath } = options;
|
|
889
904
|
try {
|
|
890
|
-
const { attributeMap, attributeList, machineUserNames } = extractAttributesFromConfig(config);
|
|
905
|
+
const { attributeMap, attributeList, machineUserNames, idpNames } = extractAttributesFromConfig(config);
|
|
891
906
|
if (!attributeMap && !attributeList) logger.info("No attributes found in configuration", { mode: "plain" });
|
|
892
907
|
if (attributeMap) logger.debug(`Extracted AttributeMap: ${JSON.stringify(attributeMap)}`);
|
|
893
908
|
if (attributeList) logger.debug(`Extracted AttributeList: ${JSON.stringify(attributeList)}`);
|
|
894
909
|
if (machineUserNames?.length) logger.debug(`Extracted MachineUserNames: ${JSON.stringify(machineUserNames)}`);
|
|
910
|
+
if (idpNames?.length) logger.debug(`Extracted IdpNames: ${JSON.stringify(idpNames)}`);
|
|
895
911
|
const env = config.env;
|
|
896
912
|
if (env) logger.debug(`Extracted Env: ${JSON.stringify(env)}`);
|
|
897
|
-
const typeDefContent = generateTypeDefinition(attributeMap, attributeList, env, machineUserNames);
|
|
913
|
+
const typeDefContent = generateTypeDefinition(attributeMap, attributeList, env, machineUserNames, idpNames);
|
|
898
914
|
const outputPath = resolveTypeDefinitionPath(configPath);
|
|
899
915
|
fs$1.mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
900
916
|
fs$1.writeFileSync(outputPath, typeDefContent);
|
|
@@ -2558,9 +2574,9 @@ async function applyIdP(client, result, phase = "create-update") {
|
|
|
2558
2574
|
* @returns Planned changes and metadata
|
|
2559
2575
|
*/
|
|
2560
2576
|
async function planIdP(context) {
|
|
2561
|
-
const { client, workspaceId, application, forRemoval, forceApplyAll = false,
|
|
2577
|
+
const { client, workspaceId, application, forRemoval, forceApplyAll = false, idpUserTriggerTargets } = context;
|
|
2562
2578
|
const idps = forRemoval ? [] : application.idpServices;
|
|
2563
|
-
const { changeSet: serviceChangeSet, conflicts, unmanaged, resourceOwners } = await planServices$3(client, workspaceId, application.name, idps,
|
|
2579
|
+
const { changeSet: serviceChangeSet, conflicts, unmanaged, resourceOwners } = await planServices$3(client, workspaceId, application.name, idps, idpUserTriggerTargets ?? /* @__PURE__ */ new Set());
|
|
2564
2580
|
return {
|
|
2565
2581
|
changeSet: {
|
|
2566
2582
|
service: serviceChangeSet,
|
|
@@ -2647,7 +2663,7 @@ function areIdPServicesEqual(existing, desired) {
|
|
|
2647
2663
|
permission: normalizeComparablePermission(existing.permission)
|
|
2648
2664
|
}), desired);
|
|
2649
2665
|
}
|
|
2650
|
-
async function planServices$3(client, workspaceId, appName, idps,
|
|
2666
|
+
async function planServices$3(client, workspaceId, appName, idps, idpUserTriggerTargets) {
|
|
2651
2667
|
const changeSet = createChangeSet("IdP services");
|
|
2652
2668
|
const conflicts = [];
|
|
2653
2669
|
const unmanaged = [];
|
|
@@ -2696,9 +2712,9 @@ async function planServices$3(client, workspaceId, appName, idps, hasIdpUserTrig
|
|
|
2696
2712
|
}
|
|
2697
2713
|
const lang = convertLang(idp.lang);
|
|
2698
2714
|
const userAuthPolicy = idp.userAuthPolicy;
|
|
2699
|
-
const
|
|
2700
|
-
if (
|
|
2701
|
-
|
|
2715
|
+
const isIdpUserTriggerTarget = idpUserTriggerTargets.has(namespaceName);
|
|
2716
|
+
if (isIdpUserTriggerTarget && idp.publishUserEvents === false) throw new Error(`IdP service "${namespaceName}" has "publishUserEvents: false", but executors with idpUser triggers subscribe to it. Either remove "publishUserEvents: false" or remove the matching executor triggers.`);
|
|
2717
|
+
const publishUserEvents = idp.publishUserEvents ?? isIdpUserTriggerTarget;
|
|
2702
2718
|
const emailConfig = idp.emailConfig;
|
|
2703
2719
|
if (!idp.permission) logger.warn(`IdP service "${namespaceName}" has no permission configured.`);
|
|
2704
2720
|
const parsedPermission = parseIdPPermission(idp.permission);
|
|
@@ -4110,7 +4126,7 @@ async function confirmOwnerConflict(conflicts, appName, yes) {
|
|
|
4110
4126
|
if (!await prompt.confirm({
|
|
4111
4127
|
message: promptMessage,
|
|
4112
4128
|
default: false
|
|
4113
|
-
})) throw new Error(
|
|
4129
|
+
})) throw new Error(multiline`
|
|
4114
4130
|
Apply cancelled. Resources remain managed by their current applications.
|
|
4115
4131
|
To override, run again and confirm, or use --yes flag.
|
|
4116
4132
|
`);
|
|
@@ -4138,7 +4154,7 @@ async function confirmUnmanagedResources(resources, appName, yes) {
|
|
|
4138
4154
|
if (!await prompt.confirm({
|
|
4139
4155
|
message: `Allow tailor-sdk to manage these resources for "${appName}"?`,
|
|
4140
4156
|
default: false
|
|
4141
|
-
})) throw new Error(
|
|
4157
|
+
})) throw new Error(multiline`
|
|
4142
4158
|
Apply cancelled. Resources remain unmanaged.
|
|
4143
4159
|
To override, run again and confirm, or use --yes flag.
|
|
4144
4160
|
`);
|
|
@@ -4163,7 +4179,7 @@ async function confirmImportantResourceDeletion(resources, yes) {
|
|
|
4163
4179
|
if (!await prompt.confirm({
|
|
4164
4180
|
message: "Are you sure you want to delete these resources?",
|
|
4165
4181
|
default: false
|
|
4166
|
-
})) throw new Error(
|
|
4182
|
+
})) throw new Error(multiline`
|
|
4167
4183
|
Apply cancelled. Resources will not be deleted.
|
|
4168
4184
|
To override, run again and confirm, or use --yes flag.
|
|
4169
4185
|
`);
|
|
@@ -4389,9 +4405,20 @@ function resolveResolverNamespace(application, resolverName) {
|
|
|
4389
4405
|
for (const service of application.resolverServices) if (Object.values(service.resolvers).some((r) => r.name === resolverName)) return service.namespace;
|
|
4390
4406
|
throw new Error(`Resolver "${resolverName}" not found in any namespace. Available namespaces: ${application.resolverServices.map((s) => s.namespace).join(", ")}`);
|
|
4391
4407
|
}
|
|
4392
|
-
function resolveIdpNamespace(application) {
|
|
4393
|
-
if (application.idpServices.length === 0) throw new Error("
|
|
4394
|
-
if (
|
|
4408
|
+
function resolveIdpNamespace(application, executorName, idpName) {
|
|
4409
|
+
if (application.idpServices.length === 0) throw new Error(`Executor "${executorName}" uses an idpUser trigger but no IdP is configured.`);
|
|
4410
|
+
if (idpName !== void 0) {
|
|
4411
|
+
const found = application.idpServices.find((idp) => idp.name === idpName);
|
|
4412
|
+
if (!found) {
|
|
4413
|
+
const available = application.idpServices.map((idp) => idp.name).join(", ");
|
|
4414
|
+
throw new Error(`Executor "${executorName}" specifies IdP "${idpName}" in its idpUser trigger, but no IdP with that name is configured. Available IdPs: ${available}`);
|
|
4415
|
+
}
|
|
4416
|
+
return found.name;
|
|
4417
|
+
}
|
|
4418
|
+
if (application.idpServices.length > 1) {
|
|
4419
|
+
const available = application.idpServices.map((idp) => idp.name).join(", ");
|
|
4420
|
+
throw new Error(`Executor "${executorName}" uses an idpUser trigger but the project defines multiple IdPs (${available}). Specify which IdP to subscribe to via the trigger's "idp" option.`);
|
|
4421
|
+
}
|
|
4395
4422
|
return application.idpServices[0].name;
|
|
4396
4423
|
}
|
|
4397
4424
|
function resolveAuthNamespace(application) {
|
|
@@ -4462,7 +4489,7 @@ function protoExecutor(application, executor) {
|
|
|
4462
4489
|
case: "idp",
|
|
4463
4490
|
value: {
|
|
4464
4491
|
eventTypes: trigger.events,
|
|
4465
|
-
namespaceName: resolveIdpNamespace(application)
|
|
4492
|
+
namespaceName: resolveIdpNamespace(application, executor.name, trigger.idp)
|
|
4466
4493
|
}
|
|
4467
4494
|
});
|
|
4468
4495
|
break;
|
|
@@ -6588,7 +6615,7 @@ async function bundleMigrationScript(sourceFile, namespace, migrationNumber) {
|
|
|
6588
6615
|
const outputDir = path.resolve(getDistDir(), "migrations");
|
|
6589
6616
|
fs$1.mkdirSync(outputDir, { recursive: true });
|
|
6590
6617
|
const entryPath = path.join(outputDir, `migration_${namespace}_${migrationNumber}.entry.js`);
|
|
6591
|
-
const entryContent =
|
|
6618
|
+
const entryContent = multiline`
|
|
6592
6619
|
import { main as _migrationMain } from "${path.resolve(sourceFile).replace(/\\/g, "/")}";
|
|
6593
6620
|
import { Kysely, TailordbDialect } from "@tailor-platform/sdk/kysely";
|
|
6594
6621
|
|
|
@@ -8480,6 +8507,25 @@ function tailorDBTrn(workspaceId, name) {
|
|
|
8480
8507
|
function vaultTrn(workspaceId, name) {
|
|
8481
8508
|
return `trn:v1:workspace:${workspaceId}:vault:${name}`;
|
|
8482
8509
|
}
|
|
8510
|
+
/**
|
|
8511
|
+
* Resolve the set of IdP names that have at least one executor subscribed to
|
|
8512
|
+
* their user events. When an executor's idpUser trigger omits the `idp` option
|
|
8513
|
+
* and exactly one IdP is configured, that IdP is implicitly the target.
|
|
8514
|
+
* Executors that omit `idp` while multiple IdPs exist are skipped here; the
|
|
8515
|
+
* apply pipeline throws a clearer error for them later.
|
|
8516
|
+
* @param application - Loaded application
|
|
8517
|
+
* @returns Set of IdP names targeted by idpUser triggers
|
|
8518
|
+
*/
|
|
8519
|
+
function collectIdpUserTriggerTargets(application) {
|
|
8520
|
+
const targets = /* @__PURE__ */ new Set();
|
|
8521
|
+
const idps = application.idpServices;
|
|
8522
|
+
for (const executor of Object.values(application.executorService?.executors ?? {})) {
|
|
8523
|
+
if (executor.trigger.kind !== "idpUser") continue;
|
|
8524
|
+
if (executor.trigger.idp != null) targets.add(executor.trigger.idp);
|
|
8525
|
+
else if (idps.length === 1) targets.add(idps[0].name);
|
|
8526
|
+
}
|
|
8527
|
+
return targets;
|
|
8528
|
+
}
|
|
8483
8529
|
async function shouldForceApplyAll(client, workspaceId, application, functionEntries) {
|
|
8484
8530
|
const desiredLabels = (await buildMetaRequest(applicationTrn(workspaceId, application.name), application.name)).labels;
|
|
8485
8531
|
const candidateTrns = /* @__PURE__ */ new Set();
|
|
@@ -8687,7 +8733,7 @@ async function apply(options) {
|
|
|
8687
8733
|
const yes = options?.yes ?? false;
|
|
8688
8734
|
const forceApplyAll = await withSpan("plan.detectSdkVersionChange", () => shouldForceApplyAll(client, workspaceId, application, functionEntries));
|
|
8689
8735
|
const { functionRegistry, tailorDB, staticWebsite, idp, auth, pipeline, app, executor, workflow, secretManager } = await withSpan("plan", async () => {
|
|
8690
|
-
const
|
|
8736
|
+
const idpUserTriggerTargets = collectIdpUserTriggerTargets(application);
|
|
8691
8737
|
const ctx = {
|
|
8692
8738
|
client,
|
|
8693
8739
|
workspaceId,
|
|
@@ -8696,7 +8742,7 @@ async function apply(options) {
|
|
|
8696
8742
|
config,
|
|
8697
8743
|
noSchemaCheck: options?.noSchemaCheck,
|
|
8698
8744
|
forceApplyAll,
|
|
8699
|
-
|
|
8745
|
+
idpUserTriggerTargets
|
|
8700
8746
|
};
|
|
8701
8747
|
const functionRegistry = await withSpan("plan.functionRegistry", () => planFunctionRegistry(client, workspaceId, application.name, functionEntries));
|
|
8702
8748
|
const unchangedWorkflowJobs = new Set(functionRegistry.changeSet.unchanged.filter((entry) => entry.name.startsWith(WORKFLOW_PREFIX)).map((entry) => entry.name.slice(WORKFLOW_PREFIX.length)));
|
|
@@ -12434,7 +12480,7 @@ const removeCommand$1 = defineAppCommand({
|
|
|
12434
12480
|
if (!await prompt.confirm({
|
|
12435
12481
|
message: "Are you sure you want to remove all resources?",
|
|
12436
12482
|
default: false
|
|
12437
|
-
})) throw new Error(
|
|
12483
|
+
})) throw new Error(multiline`
|
|
12438
12484
|
Remove cancelled. No resources were deleted.
|
|
12439
12485
|
To override, run again and confirm, or use --yes flag.
|
|
12440
12486
|
`);
|
|
@@ -13085,7 +13131,7 @@ async function generate(options) {
|
|
|
13085
13131
|
if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
|
|
13086
13132
|
let pluginManager;
|
|
13087
13133
|
if (plugins.length > 0) pluginManager = new PluginManager(plugins);
|
|
13088
|
-
const { defineApplication } = await import("./application-
|
|
13134
|
+
const { defineApplication } = await import("./application-BIzicxMA.mjs");
|
|
13089
13135
|
const application = defineApplication({
|
|
13090
13136
|
config,
|
|
13091
13137
|
pluginManager
|
|
@@ -14293,7 +14339,7 @@ const updateCommand = defineAppCommand({
|
|
|
14293
14339
|
//#endregion
|
|
14294
14340
|
//#region src/cli/bundler/query/query-bundler.ts
|
|
14295
14341
|
function createSqlEntry() {
|
|
14296
|
-
return
|
|
14342
|
+
return multiline`
|
|
14297
14343
|
import { Kysely, sql, TailordbDialect } from "@tailor-platform/sdk/kysely";
|
|
14298
14344
|
|
|
14299
14345
|
type QueryInput = {
|
|
@@ -14324,7 +14370,7 @@ function createSqlEntry() {
|
|
|
14324
14370
|
`;
|
|
14325
14371
|
}
|
|
14326
14372
|
function createGqlEntry() {
|
|
14327
|
-
return
|
|
14373
|
+
return multiline`
|
|
14328
14374
|
type QueryInput = {
|
|
14329
14375
|
endpoint: string;
|
|
14330
14376
|
accessToken: string;
|
|
@@ -14900,7 +14946,7 @@ async function runRepl(options) {
|
|
|
14900
14946
|
const execute = await prepareQueryExecutor(options);
|
|
14901
14947
|
const historyPath = getReplHistoryPath(options.engine, options.profile, options.workspaceId);
|
|
14902
14948
|
const validate = createReplValidator(options.engine);
|
|
14903
|
-
const { highlightSqlLine, highlightGraphqlLine, replTransform } = await import("./repl-editor-
|
|
14949
|
+
const { highlightSqlLine, highlightGraphqlLine, replTransform } = await import("./repl-editor-BlT2dFtm.mjs");
|
|
14904
14950
|
const highlight = options.engine === "sql" ? highlightSqlLine : highlightGraphqlLine;
|
|
14905
14951
|
const prompt = createPrompt({
|
|
14906
14952
|
prefix: "",
|
|
@@ -15234,4 +15280,4 @@ function isDeno() {
|
|
|
15234
15280
|
|
|
15235
15281
|
//#endregion
|
|
15236
15282
|
export { deleteCommand$1 as $, getMigrationDirPath as $t, truncate as A, executionsCommand as At, updateOrganization as B, MIGRATION_LABEL_KEY as Bt, listCommand$2 as C, toPageDirection as Cn, jobsCommand as Ct, resumeWorkflow as D, startWorkflow as Dt, resumeCommand as E, startCommand as Et, showCommand as F, getCommand$6 as Ft, getCommand$1 as G, INITIAL_SCHEMA_NUMBER as Gt, treeCommand as H, bundleMigrationScript as Ht, logBetaWarning as I, getExecutor as It, updateFolder as J, compareLocalTypesWithSnapshot as Jt, getOrganization as K, MIGRATE_FILE_NAME as Kt, remove as L, apply as Lt, generate as M, listWorkflowExecutions as Mt, generateCommand as N, functionExecutionStatusToString as Nt, listCommand$3 as O, getCommand$5 as Ot, show as P, formatKeyValueTable as Pt, getFolder as Q, getLatestMigrationNumber as Qt, removeCommand$1 as R, executeScript as Rt, listApps as S, paginationArgs as Sn, getExecutorJob as St, healthCommand as T, watchExecutorJob as Tt, listCommand$4 as U, DB_TYPES_FILE_NAME as Ut, organizationTree as V, parseMigrationLabelNumber as Vt, listOrganizations as W, DIFF_FILE_NAME as Wt, listFolders as X, createSnapshotFromLocalTypes as Xt, listCommand$5 as Y, compareSnapshots as Yt, getCommand$2 as Z, formatMigrationNumber as Zt, getWorkspace as _, commonArgs as _n, webhookCommand as _t, updateUser as a, reconstructSnapshotFromMigrations as an, getCommand$3 as at, createCommand as b, isVerbose as bn, listCommand$9 as bt, listCommand as c, hasChanges as cn, tokenCommand as ct, inviteUser as d, sdkNameLabelKey as dn, generate$1 as dt, getMigrationFilePath as en, deleteFolder as et, restoreCommand as f, trnPrefix as fn, listCommand$8 as ft, getCommand as g, defineAppCommand as gn, listWebhookExecutors as gt, listWorkspaces as h, apiCall as hn, getFunctionRegistry as ht, updateCommand as i, loadDiff as in, listOAuth2Clients as it, truncateCommand as j, getWorkflowExecution as jt, listWorkflows as k, getWorkflow as kt, listUsers as l, getNamespacesWithMigrations as ln, listCommand$7 as lt, listCommand$1 as m, apiCommand as mn, getCommand$4 as mt, query as n, getNextMigrationNumber as nn, createFolder as nt, removeCommand as o, formatDiffSummary as on, getOAuth2Client as ot, restoreWorkspace as p, generateUserTypes as pn, listFunctionRegistries as pt, updateCommand$2 as q, SCHEMA_FILE_NAME as qt, queryCommand as r, isValidMigrationNumber as rn, listCommand$6 as rt, removeUser as s, formatMigrationDiff as sn, getMachineUserToken as st, isNativeTypeScriptRuntime as t, getMigrationFiles as tn, createCommand$1 as tt, inviteCommand as u, prompt as un, listMachineUsers as ut, deleteCommand as v, confirmationArgs as vn, triggerCommand as vt, getAppHealth as w, workspaceArgs as wn, listExecutorJobs as wt, createWorkspace as x, pagedLogArgs as xn, listExecutors as xt, deleteWorkspace as y, deploymentArgs as yn, triggerExecutor as yt, updateCommand$1 as z, waitForExecution$1 as zt };
|
|
15237
|
-
//# sourceMappingURL=runtime-
|
|
15283
|
+
//# sourceMappingURL=runtime-D5AJYWnF.mjs.map
|