@xrmforge/typegen 0.13.1 → 0.13.2
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.d.ts +4 -0
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1480,6 +1480,10 @@ declare function generateEntityNamesEnum(entityNames: string[], _options?: Entit
|
|
|
1480
1480
|
* export const NormalizePhone =
|
|
1481
1481
|
* createUnboundAction<NormalizePhoneParams, NormalizePhoneResult>('markant_NormalizePhone', { ... });
|
|
1482
1482
|
* ```
|
|
1483
|
+
*
|
|
1484
|
+
* Each executor assignment is emitted with a leading pure-call annotation (an `@__PURE__`
|
|
1485
|
+
* comment) so esbuild can tree-shake unused executors out of consumer bundles - importing a
|
|
1486
|
+
* single action from a large global module otherwise pulls in all of them (F-LMA9-01).
|
|
1483
1487
|
*/
|
|
1484
1488
|
|
|
1485
1489
|
/** Options for action/function generation */
|
package/dist/index.js
CHANGED
|
@@ -2532,27 +2532,27 @@ function generateActionModule(apis, isFunction, options = {}) {
|
|
|
2532
2532
|
if (apiInfo.api.bindingtype === 0 /* Global */) {
|
|
2533
2533
|
if (isFunction) {
|
|
2534
2534
|
const funcTypeArg = hasResult ? `<${name}Result>` : "<unknown>";
|
|
2535
|
-
lines.push(`export const ${name} = createUnboundFunction${funcTypeArg}('${apiInfo.api.uniquename}');`);
|
|
2535
|
+
lines.push(`export const ${name} = /* @__PURE__ */ createUnboundFunction${funcTypeArg}('${apiInfo.api.uniquename}');`);
|
|
2536
2536
|
} else if (hasParams) {
|
|
2537
2537
|
const paramMeta = generateParameterMetaMap(apiInfo.requestParameters);
|
|
2538
|
-
lines.push(`export const ${name} = createUnboundAction${typeArgs}('${apiInfo.api.uniquename}', ${paramMeta});`);
|
|
2538
|
+
lines.push(`export const ${name} = /* @__PURE__ */ createUnboundAction${typeArgs}('${apiInfo.api.uniquename}', ${paramMeta});`);
|
|
2539
2539
|
} else if (hasResult) {
|
|
2540
|
-
lines.push(`export const ${name} = createUnboundAction<${name}Result>('${apiInfo.api.uniquename}');`);
|
|
2540
|
+
lines.push(`export const ${name} = /* @__PURE__ */ createUnboundAction<${name}Result>('${apiInfo.api.uniquename}');`);
|
|
2541
2541
|
} else {
|
|
2542
|
-
lines.push(`export const ${name} = createUnboundAction('${apiInfo.api.uniquename}');`);
|
|
2542
|
+
lines.push(`export const ${name} = /* @__PURE__ */ createUnboundAction('${apiInfo.api.uniquename}');`);
|
|
2543
2543
|
}
|
|
2544
2544
|
} else {
|
|
2545
2545
|
const entity = apiInfo.api.boundentitylogicalname;
|
|
2546
2546
|
if (isFunction) {
|
|
2547
2547
|
const funcTypeArg = hasResult ? `<${name}Result>` : "<unknown>";
|
|
2548
|
-
lines.push(`export const ${name} = createBoundFunction${funcTypeArg}('${apiInfo.api.uniquename}', '${entity}');`);
|
|
2548
|
+
lines.push(`export const ${name} = /* @__PURE__ */ createBoundFunction${funcTypeArg}('${apiInfo.api.uniquename}', '${entity}');`);
|
|
2549
2549
|
} else if (hasParams) {
|
|
2550
2550
|
const paramMeta = generateParameterMetaMap(apiInfo.requestParameters);
|
|
2551
|
-
lines.push(`export const ${name} = createBoundAction${typeArgs}('${apiInfo.api.uniquename}', '${entity}', ${paramMeta});`);
|
|
2551
|
+
lines.push(`export const ${name} = /* @__PURE__ */ createBoundAction${typeArgs}('${apiInfo.api.uniquename}', '${entity}', ${paramMeta});`);
|
|
2552
2552
|
} else if (hasResult) {
|
|
2553
|
-
lines.push(`export const ${name} = createBoundAction<${name}Result>('${apiInfo.api.uniquename}', '${entity}');`);
|
|
2553
|
+
lines.push(`export const ${name} = /* @__PURE__ */ createBoundAction<${name}Result>('${apiInfo.api.uniquename}', '${entity}');`);
|
|
2554
2554
|
} else {
|
|
2555
|
-
lines.push(`export const ${name} = createBoundAction('${apiInfo.api.uniquename}', '${entity}');`);
|
|
2555
|
+
lines.push(`export const ${name} = /* @__PURE__ */ createBoundAction('${apiInfo.api.uniquename}', '${entity}');`);
|
|
2556
2556
|
}
|
|
2557
2557
|
}
|
|
2558
2558
|
lines.push("");
|