@n8n/i18n 1.24.2 → 1.25.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/dist/index.cjs +3949 -7800
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -18
- package/dist/{index.d.ts → index.d.mts} +62 -19
- package/dist/index.mjs +4211 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -0
- package/dist/{types-eBu_kveP.d.cts → types2.d.cts} +62 -19
- package/dist/{types-DACdyL-T.d.ts → types2.d.mts} +62 -19
- package/dist/utils.cjs +1 -1
- package/dist/{utils.d.ts → utils.d.mts} +1 -1
- package/dist/utils.mjs +3 -0
- package/dist/{utils-p9ioSiTo.cjs → utils2.cjs} +3 -9
- package/dist/utils2.cjs.map +1 -0
- package/dist/{utils-BJm12gqs.js → utils2.mjs} +4 -10
- package/dist/utils2.mjs.map +1 -0
- package/package.json +12 -12
- package/dist/index.js +0 -8039
- package/dist/index.js.map +0 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.js +0 -0
- package/dist/utils-BJm12gqs.js.map +0 -1
- package/dist/utils-p9ioSiTo.cjs.map +0 -1
- package/dist/utils.js +0 -3
package/dist/types.d.ts
DELETED
package/dist/types.js
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils-BJm12gqs.js","names":["path: string","parameter: { name: string; type?: string }","parameter: { type?: string }","pathSegments: string[]"],"sources":["../src/utils.ts"],"sourcesContent":["/**\n * Derive the middle key, i.e. the segment of the render key located between\n * the initial key (path to parameters root) and the property to render.\n *\n * Used by `nodeText()` to handle nested params.\n *\n * Location: `n8n-nodes-base.nodes.github.nodeView.<middleKey>.placeholder`\n */\nexport function deriveMiddleKey(path: string, parameter: { name: string; type?: string }) {\n\tlet middleKey = parameter.name;\n\n\tif (isTopLevelCollection(path, parameter) || isNestedInCollectionLike(path)) {\n\t\tconst pathSegments = normalize(path).split('.');\n\t\tmiddleKey = insertOptionsAndValues(pathSegments).join('.');\n\t}\n\n\tif (isNestedCollection(path, parameter) || isFixedCollection(path, parameter)) {\n\t\tconst pathSegments = [...normalize(path).split('.'), parameter.name];\n\t\tmiddleKey = insertOptionsAndValues(pathSegments).join('.');\n\t}\n\n\treturn middleKey;\n}\n\n/**\n * Check if a param path is for a param nested inside a `collection` or\n * `fixedCollection` param.\n */\nexport const isNestedInCollectionLike = (path: string) => path.split('.').length >= 3;\n\nconst isTopLevelCollection = (path: string, parameter: { type?: string }) =>\n\tpath.split('.').length === 2 && parameter.type === 'collection';\n\nconst isNestedCollection = (path: string, parameter: { type?: string }) =>\n\tpath.split('.').length > 2 && parameter.type === 'collection';\n\n/**\n * Check if the param is a normal `fixedCollection`, i.e. a FC other than the wrapper\n * that sits at the root of a node's top-level param and contains all of them.\n */\nconst isFixedCollection = (path: string, parameter: { type?: string }) =>\n\tparameter.type === 'fixedCollection' && path !== 'parameters';\n\n/**\n * Remove all indices and the `parameters.` prefix from a parameter path.\n *\n * Example: `parameters.a[0].b` → `a.b`\n */\nexport const normalize = (path: string) => path.replace(/\\[.*?\\]/g, '').replace('parameters.', '');\n\n/**\n * Insert `'options'` and `'values'` on an alternating basis in a string array of\n * indefinite length. Helper to create a valid render key for a collection-like param.\n *\n * Example: `['a', 'b', 'c']` → `['a', 'options', 'b', 'values', 'c']`\n */\nexport const insertOptionsAndValues = (pathSegments: string[]) => {\n\treturn pathSegments.reduce<string[]>((acc, cur, i) => {\n\t\tacc.push(cur);\n\n\t\tif (i === pathSegments.length - 1) return acc;\n\n\t\tacc.push(i % 2 === 0 ? 'options' : 'values');\n\n\t\treturn acc;\n\t}, []);\n};\n"],"mappings":";;;;;;;;;AAQA,SAAgB,gBAAgBA,MAAcC,WAA4C;CACzF,IAAI,YAAY,UAAU;AAE1B,KAAI,qBAAqB,MAAM,UAAU,IAAI,yBAAyB,KAAK,EAAE;EAC5E,MAAM,eAAe,UAAU,KAAK,CAAC,MAAM,IAAI;AAC/C,cAAY,uBAAuB,aAAa,CAAC,KAAK,IAAI;CAC1D;AAED,KAAI,mBAAmB,MAAM,UAAU,IAAI,kBAAkB,MAAM,UAAU,EAAE;EAC9E,MAAM,eAAe,CAAC,GAAG,UAAU,KAAK,CAAC,MAAM,IAAI,EAAE,UAAU,IAAK;AACpE,cAAY,uBAAuB,aAAa,CAAC,KAAK,IAAI;CAC1D;AAED,QAAO;AACP;;;;;AAMD,MAAa,2BAA2B,CAACD,SAAiB,KAAK,MAAM,IAAI,CAAC,UAAU;AAEpF,MAAM,uBAAuB,CAACA,MAAcE,cAC3C,KAAK,MAAM,IAAI,CAAC,WAAW,KAAK,UAAU,SAAS;AAEpD,MAAM,qBAAqB,CAACF,MAAcE,cACzC,KAAK,MAAM,IAAI,CAAC,SAAS,KAAK,UAAU,SAAS;;;;;AAMlD,MAAM,oBAAoB,CAACF,MAAcE,cACxC,UAAU,SAAS,qBAAqB,SAAS;;;;;;AAOlD,MAAa,YAAY,CAACF,SAAiB,KAAK,QAAQ,YAAY,GAAG,CAAC,QAAQ,eAAe,GAAG;;;;;;;AAQlG,MAAa,yBAAyB,CAACG,iBAA2B;AACjE,QAAO,aAAa,OAAiB,CAAC,KAAK,KAAK,MAAM;AACrD,MAAI,KAAK,IAAI;AAEb,MAAI,MAAM,aAAa,SAAS,EAAG,QAAO;AAE1C,MAAI,KAAK,IAAI,MAAM,IAAI,YAAY,SAAS;AAE5C,SAAO;CACP,GAAE,CAAE,EAAC;AACN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils-p9ioSiTo.cjs","names":["path: string","parameter: { name: string; type?: string }","parameter: { type?: string }","pathSegments: string[]"],"sources":["../src/utils.ts"],"sourcesContent":["/**\n * Derive the middle key, i.e. the segment of the render key located between\n * the initial key (path to parameters root) and the property to render.\n *\n * Used by `nodeText()` to handle nested params.\n *\n * Location: `n8n-nodes-base.nodes.github.nodeView.<middleKey>.placeholder`\n */\nexport function deriveMiddleKey(path: string, parameter: { name: string; type?: string }) {\n\tlet middleKey = parameter.name;\n\n\tif (isTopLevelCollection(path, parameter) || isNestedInCollectionLike(path)) {\n\t\tconst pathSegments = normalize(path).split('.');\n\t\tmiddleKey = insertOptionsAndValues(pathSegments).join('.');\n\t}\n\n\tif (isNestedCollection(path, parameter) || isFixedCollection(path, parameter)) {\n\t\tconst pathSegments = [...normalize(path).split('.'), parameter.name];\n\t\tmiddleKey = insertOptionsAndValues(pathSegments).join('.');\n\t}\n\n\treturn middleKey;\n}\n\n/**\n * Check if a param path is for a param nested inside a `collection` or\n * `fixedCollection` param.\n */\nexport const isNestedInCollectionLike = (path: string) => path.split('.').length >= 3;\n\nconst isTopLevelCollection = (path: string, parameter: { type?: string }) =>\n\tpath.split('.').length === 2 && parameter.type === 'collection';\n\nconst isNestedCollection = (path: string, parameter: { type?: string }) =>\n\tpath.split('.').length > 2 && parameter.type === 'collection';\n\n/**\n * Check if the param is a normal `fixedCollection`, i.e. a FC other than the wrapper\n * that sits at the root of a node's top-level param and contains all of them.\n */\nconst isFixedCollection = (path: string, parameter: { type?: string }) =>\n\tparameter.type === 'fixedCollection' && path !== 'parameters';\n\n/**\n * Remove all indices and the `parameters.` prefix from a parameter path.\n *\n * Example: `parameters.a[0].b` → `a.b`\n */\nexport const normalize = (path: string) => path.replace(/\\[.*?\\]/g, '').replace('parameters.', '');\n\n/**\n * Insert `'options'` and `'values'` on an alternating basis in a string array of\n * indefinite length. Helper to create a valid render key for a collection-like param.\n *\n * Example: `['a', 'b', 'c']` → `['a', 'options', 'b', 'values', 'c']`\n */\nexport const insertOptionsAndValues = (pathSegments: string[]) => {\n\treturn pathSegments.reduce<string[]>((acc, cur, i) => {\n\t\tacc.push(cur);\n\n\t\tif (i === pathSegments.length - 1) return acc;\n\n\t\tacc.push(i % 2 === 0 ? 'options' : 'values');\n\n\t\treturn acc;\n\t}, []);\n};\n"],"mappings":";;;;;;;;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