RRelease Botchore(release): 0.71.13
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: add CreateFunction definition (#6664) Also remove the recent changes made around createWebhook. They will be folded and reintroduced as part of the function primitive initiative `function` definition types are in https://github.com/NangoHQ/nango/pull/6664/changes#diff-cedceb6eb8af423d2de17f68fed59bd218cf3c5029655359b4361d444c733256 The rest is reverting support for `createWebhook` in `runner-sdk` and `cli` <!-- Describe the problem and your solution --> <!-- Issue ticket number and link (if applicable) --> <!-- Testing instructions (skip if just adding/editing providers) --> <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/NangoHQ/nango/pull/6664?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> | 3 个月前 | |
chore(release): 0.71.13 | 6 天前 | |
feat(nango.yaml): dedicated package, stricter parsing, wider types support (#2303) Fixes NAN-1166 Fixes https://linear.app/nango/issue/NAN-1096/add-comment-at-the-top-of-modelsts-file-to-explain-that-its-auto ## 🤓 Context First **I want to apologize for the length of this PR**, it's way too big but it was "all or nothing" situation unfortunately. When I started playing with types/json schema validation **I wanted better output** for errors at compile time: - realized the CLI had **2 different ways to parse** the nango.yaml - realized **nango-config.service.ts** was not covering the same case that the one in cli - realized neither were **not handling many types/edge cases** (i.e: arrays, number, boolean, union, exotic char in model name, etc.) - then after modifying everything (took me a day), I realized it was **also parsing the table sync_configs** (for a reason I still don't get) so it was just breaking everything. So I had no choice, to rewrite everything just because I wanted to cover more cases to be compatible with json schema 😵💫 The **Good news**: - we now have a dedicated package to parse nango-yaml and it's battle tested (hopefully) - we now have one less thing to remove from shared (nb: the old code is still there and it's still used by sync_configs) There is only **13 mentions to shared left** in CLI ## 🚜 Changes - New published package `@nangohq/nango-yaml` It will be published, as soon as you validate this PR otherwise the CLI won't pass. - New output when validating nango.yaml A lot of new edge cases, errors and warnings are now discovered. It might be breaking but at least it's explicit. - **[breaking]** `endpoint` format is enforced (verb /uri) - **[breaking]** `runs` is explicitly required - **[breaking]** format of `NangoFlows` inside model.ts - **[breaking]** Input and Output specifying a js value (instead of a model) now use a `type` interface with a unique generated name - **[new]** Support for unions, arrays, type array, cyclic ref, literal string, number, true, false, null, undefined, multiple extends - **[fix]** Disallow exotic char in model and property name - **[fix]** Always compile model.ts after loading nango.yaml - ...not exhaustive changelist > [!WARNING] > UI won't show the appropriate model (fixing that later) and this is a breaking change for `GET /flows` `GET /config/:key` ## 😭 How do I review this huge PR? - Starts with: `packages/nango-yaml/parser.v2.ts` - You can read: `packages/nango-yaml/modelsParser.ts` which handle the yaml -> js types - Then `packages/cli/services/model.service.ts` - Optional `packages/types/nangoYaml/index.ts` (describe yaml then parsed yaml) - And voila, the rest is mostly side effects of having good types and slightly different objects ## 🧪 How do I test? Please run the cli on your machine, I have extensively tested but it's so critical and super user dependent. ```sh node ../nango/packages/cli/dist/index.js init node ../nango/packages/cli/dist/index.js generate // try to delete a script and make it re-generate it node ../nango/packages/cli/dist/index.js compile // check your model.ts node ../nango/packages/cli/dist/index.js deploy dev ``` ```yaml models: Test1: id: number str: "literal" issue: Unknown arr: - hello - boy Test2: id: integer title: string url: string Parent: id: integer Test3: __extends: Parent oui: true non: false OUI: True NON: False num: 1 kd?: Pick<dfdk> nulle: null union: True | False nes: ted: number Test4: __string: number ``` ## Example  | 2 年前 |