@azure-tools/typespec-ts 0.36.0 → 0.37.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.
Files changed (143) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/src/contextManager.d.ts +1 -2
  3. package/dist/src/contextManager.d.ts.map +1 -1
  4. package/dist/src/contextManager.js.map +1 -1
  5. package/dist/src/framework/load-static-helpers.d.ts +2 -1
  6. package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
  7. package/dist/src/framework/load-static-helpers.js +17 -0
  8. package/dist/src/framework/load-static-helpers.js.map +1 -1
  9. package/dist/src/index.d.ts.map +1 -1
  10. package/dist/src/index.js +31 -29
  11. package/dist/src/index.js.map +1 -1
  12. package/dist/src/metaTree.d.ts +0 -5
  13. package/dist/src/metaTree.d.ts.map +1 -1
  14. package/dist/src/modular/buildClassicalClient.d.ts +3 -2
  15. package/dist/src/modular/buildClassicalClient.d.ts.map +1 -1
  16. package/dist/src/modular/buildClassicalClient.js +64 -62
  17. package/dist/src/modular/buildClassicalClient.js.map +1 -1
  18. package/dist/src/modular/buildClassicalOperationGroups.d.ts +3 -2
  19. package/dist/src/modular/buildClassicalOperationGroups.d.ts.map +1 -1
  20. package/dist/src/modular/buildClassicalOperationGroups.js +35 -27
  21. package/dist/src/modular/buildClassicalOperationGroups.js.map +1 -1
  22. package/dist/src/modular/buildClientContext.d.ts +4 -3
  23. package/dist/src/modular/buildClientContext.d.ts.map +1 -1
  24. package/dist/src/modular/buildClientContext.js +84 -35
  25. package/dist/src/modular/buildClientContext.js.map +1 -1
  26. package/dist/src/modular/buildModularOptions.d.ts +7 -0
  27. package/dist/src/modular/buildModularOptions.d.ts.map +1 -0
  28. package/dist/src/modular/buildModularOptions.js +16 -0
  29. package/dist/src/modular/buildModularOptions.js.map +1 -0
  30. package/dist/src/modular/buildOperations.d.ts +6 -4
  31. package/dist/src/modular/buildOperations.d.ts.map +1 -1
  32. package/dist/src/modular/buildOperations.js +56 -55
  33. package/dist/src/modular/buildOperations.js.map +1 -1
  34. package/dist/src/modular/buildProjectFiles.d.ts +3 -2
  35. package/dist/src/modular/buildProjectFiles.d.ts.map +1 -1
  36. package/dist/src/modular/buildProjectFiles.js +18 -16
  37. package/dist/src/modular/buildProjectFiles.js.map +1 -1
  38. package/dist/src/modular/buildRestorePoller.d.ts +4 -2
  39. package/dist/src/modular/buildRestorePoller.d.ts.map +1 -1
  40. package/dist/src/modular/buildRestorePoller.js +22 -18
  41. package/dist/src/modular/buildRestorePoller.js.map +1 -1
  42. package/dist/src/modular/buildRootIndex.d.ts +4 -3
  43. package/dist/src/modular/buildRootIndex.d.ts.map +1 -1
  44. package/dist/src/modular/buildRootIndex.js +40 -31
  45. package/dist/src/modular/buildRootIndex.js.map +1 -1
  46. package/dist/src/modular/buildSubpathIndex.d.ts +4 -2
  47. package/dist/src/modular/buildSubpathIndex.d.ts.map +1 -1
  48. package/dist/src/modular/buildSubpathIndex.js +8 -5
  49. package/dist/src/modular/buildSubpathIndex.js.map +1 -1
  50. package/dist/src/modular/emitLoggerFile.d.ts +2 -3
  51. package/dist/src/modular/emitLoggerFile.d.ts.map +1 -1
  52. package/dist/src/modular/emitLoggerFile.js +4 -4
  53. package/dist/src/modular/emitLoggerFile.js.map +1 -1
  54. package/dist/src/modular/emitModels.d.ts +1 -2
  55. package/dist/src/modular/emitModels.d.ts.map +1 -1
  56. package/dist/src/modular/emitModels.js +10 -3
  57. package/dist/src/modular/emitModels.js.map +1 -1
  58. package/dist/src/modular/emitModelsOptions.d.ts +3 -24
  59. package/dist/src/modular/emitModelsOptions.d.ts.map +1 -1
  60. package/dist/src/modular/emitModelsOptions.js +10 -86
  61. package/dist/src/modular/emitModelsOptions.js.map +1 -1
  62. package/dist/src/modular/emitSamples.js +2 -1
  63. package/dist/src/modular/emitSamples.js.map +1 -1
  64. package/dist/src/modular/helpers/classicalOperationHelpers.d.ts +3 -3
  65. package/dist/src/modular/helpers/classicalOperationHelpers.d.ts.map +1 -1
  66. package/dist/src/modular/helpers/classicalOperationHelpers.js +40 -50
  67. package/dist/src/modular/helpers/classicalOperationHelpers.js.map +1 -1
  68. package/dist/src/modular/helpers/clientHelpers.d.ts +11 -8
  69. package/dist/src/modular/helpers/clientHelpers.d.ts.map +1 -1
  70. package/dist/src/modular/helpers/clientHelpers.js +87 -60
  71. package/dist/src/modular/helpers/clientHelpers.js.map +1 -1
  72. package/dist/src/modular/helpers/namingHelpers.d.ts +4 -7
  73. package/dist/src/modular/helpers/namingHelpers.d.ts.map +1 -1
  74. package/dist/src/modular/helpers/namingHelpers.js +3 -26
  75. package/dist/src/modular/helpers/namingHelpers.js.map +1 -1
  76. package/dist/src/modular/helpers/operationHelpers.d.ts +21 -20
  77. package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
  78. package/dist/src/modular/helpers/operationHelpers.js +336 -291
  79. package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
  80. package/dist/src/modular/helpers/typeHelpers.d.ts +4 -25
  81. package/dist/src/modular/helpers/typeHelpers.d.ts.map +1 -1
  82. package/dist/src/modular/helpers/typeHelpers.js +6 -218
  83. package/dist/src/modular/helpers/typeHelpers.js.map +1 -1
  84. package/dist/src/modular/interfaces.d.ts +15 -8
  85. package/dist/src/modular/interfaces.d.ts.map +1 -1
  86. package/dist/src/modular/serialization/buildDeserializerFunction.d.ts.map +1 -1
  87. package/dist/src/modular/serialization/buildDeserializerFunction.js +1 -2
  88. package/dist/src/modular/serialization/buildDeserializerFunction.js.map +1 -1
  89. package/dist/src/modular/serialization/buildSerializerFunction.d.ts.map +1 -1
  90. package/dist/src/modular/serialization/buildSerializerFunction.js +1 -2
  91. package/dist/src/modular/serialization/buildSerializerFunction.js.map +1 -1
  92. package/dist/src/modular/serialization/serializeUtils.d.ts +8 -5
  93. package/dist/src/modular/serialization/serializeUtils.d.ts.map +1 -1
  94. package/dist/src/modular/serialization/serializeUtils.js +22 -22
  95. package/dist/src/modular/serialization/serializeUtils.js.map +1 -1
  96. package/dist/src/utils/clientUtils.d.ts +3 -1
  97. package/dist/src/utils/clientUtils.d.ts.map +1 -1
  98. package/dist/src/utils/clientUtils.js +10 -0
  99. package/dist/src/utils/clientUtils.js.map +1 -1
  100. package/dist/src/utils/operationUtil.d.ts +6 -2
  101. package/dist/src/utils/operationUtil.d.ts.map +1 -1
  102. package/dist/src/utils/operationUtil.js +66 -7
  103. package/dist/src/utils/operationUtil.js.map +1 -1
  104. package/dist/tsconfig.tsbuildinfo +1 -1
  105. package/package.json +3 -3
  106. package/src/contextManager.ts +1 -2
  107. package/src/framework/load-static-helpers.ts +24 -1
  108. package/src/index.ts +65 -37
  109. package/src/metaTree.ts +0 -6
  110. package/src/modular/buildClassicalClient.ts +97 -99
  111. package/src/modular/buildClassicalOperationGroups.ts +53 -47
  112. package/src/modular/buildClientContext.ts +101 -44
  113. package/src/modular/buildModularOptions.ts +27 -0
  114. package/src/modular/buildOperations.ts +91 -78
  115. package/src/modular/buildProjectFiles.ts +24 -21
  116. package/src/modular/buildRestorePoller.ts +39 -23
  117. package/src/modular/buildRootIndex.ts +51 -42
  118. package/src/modular/buildSubpathIndex.ts +16 -7
  119. package/src/modular/emitLoggerFile.ts +12 -10
  120. package/src/modular/emitModels.ts +15 -7
  121. package/src/modular/emitModelsOptions.ts +18 -125
  122. package/src/modular/emitSamples.ts +2 -3
  123. package/src/modular/helpers/classicalOperationHelpers.ts +50 -75
  124. package/src/modular/helpers/clientHelpers.ts +107 -73
  125. package/src/modular/helpers/namingHelpers.ts +6 -65
  126. package/src/modular/helpers/operationHelpers.ts +506 -384
  127. package/src/modular/helpers/typeHelpers.ts +11 -267
  128. package/src/modular/interfaces.ts +16 -8
  129. package/src/modular/serialization/buildDeserializerFunction.ts +1 -6
  130. package/src/modular/serialization/buildSerializerFunction.ts +1 -2
  131. package/src/modular/serialization/serializeUtils.ts +31 -30
  132. package/src/utils/clientUtils.ts +23 -1
  133. package/src/utils/operationUtil.ts +106 -14
  134. package/dist/src/modular/buildCodeModel.d.ts +0 -34
  135. package/dist/src/modular/buildCodeModel.d.ts.map +0 -1
  136. package/dist/src/modular/buildCodeModel.js +0 -1489
  137. package/dist/src/modular/buildCodeModel.js.map +0 -1
  138. package/dist/src/modular/modularCodeModel.d.ts +0 -166
  139. package/dist/src/modular/modularCodeModel.d.ts.map +0 -1
  140. package/dist/src/modular/modularCodeModel.js +0 -2
  141. package/dist/src/modular/modularCodeModel.js.map +0 -1
  142. package/src/modular/buildCodeModel.ts +0 -1965
  143. package/src/modular/modularCodeModel.ts +0 -211
@@ -1,26 +1,28 @@
1
- import { NameType, clearImportSets, normalizeName } from "@azure-tools/rlc-common";
1
+ import { NameType, normalizeName } from "@azure-tools/rlc-common";
2
2
  import { getDeserializePrivateFunction, getExpectedStatuses, getOperationFunction, getOperationOptionsName, getSendPrivateFunction, isLroOnlyOperation } from "./helpers/operationHelpers.js";
3
3
  import { addImportBySymbol } from "../utils/importHelper.js";
4
4
  import { getDocsFromDescription } from "./helpers/docsHelpers.js";
5
5
  import { getOperationName } from "./helpers/namingHelpers.js";
6
- import { isRLCMultiEndpoint } from "../utils/clientUtils.js";
6
+ import { getModularClientOptions, isRLCMultiEndpoint } from "../utils/clientUtils.js";
7
7
  import { getTypeExpression } from "./type-expressions/get-type-expression.js";
8
- import { buildType } from "./helpers/typeHelpers.js";
8
+ import { getMethodHierarchiesMap } from "../utils/operationUtil.js";
9
+ import { resolveReference } from "../framework/reference.js";
10
+ import { useDependencies } from "../framework/hooks/useDependencies.js";
9
11
  /**
10
12
  * This function creates a file under /api for each operation group.
11
13
  * If there is no operation group in the TypeSpec program, we create a single
12
14
  * file called operations.ts where all operations are generated.
13
15
  */
14
- export function buildOperationFiles(client, dpgContext, codeModel) {
15
- const operationFiles = [];
16
+ export function buildOperationFiles(dpgContext, client, emitterOptions) {
17
+ const operationFiles = new Set();
18
+ const { subfolder, rlcClientName } = getModularClientOptions(dpgContext, client);
16
19
  const isMultiEndpoint = isRLCMultiEndpoint(dpgContext);
17
- const clientType = isMultiEndpoint
18
- ? `Client.${client.rlcClientName}`
19
- : "Client";
20
- for (const operationGroup of client.operationGroups) {
21
- clearImportSets(codeModel.runtimeImports);
22
- const operationFileName = operationGroup.className && operationGroup.namespaceHierarchies.length > 0
23
- ? `${operationGroup.namespaceHierarchies
20
+ const clientType = isMultiEndpoint ? `Client.${rlcClientName}` : "Client";
21
+ const methodMap = getMethodHierarchiesMap(dpgContext, client);
22
+ for (const [prefixKey, operations] of methodMap) {
23
+ const prefixes = prefixKey.split("/");
24
+ const operationFileName = prefixes.length > 0 && prefixKey !== ""
25
+ ? `${prefixes
24
26
  .map((hierarchy) => {
25
27
  return normalizeName(hierarchy, NameType.File);
26
28
  })
@@ -28,34 +30,33 @@ export function buildOperationFiles(client, dpgContext, codeModel) {
28
30
  : // When the program has no operation groups defined all operations are put
29
31
  // into a nameless operation group. We'll call this operations.
30
32
  "operations";
31
- const subfolder = client.subfolder;
32
- const srcPath = codeModel.modularOptions.sourceRoot;
33
- const operationGroupFile = codeModel.project.createSourceFile(`${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}api/${operationFileName}.ts`);
33
+ const srcPath = emitterOptions.modularOptions.sourceRoot;
34
+ const filepath = `${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}api/${operationFileName}.ts`;
35
+ const operationGroupFile = emitterOptions.project.createSourceFile(filepath);
34
36
  // Import the deserializeUtils
35
- importDeserializeUtils(srcPath, operationGroupFile, codeModel.project, "deserialize", subfolder, operationGroup.namespaceHierarchies.length);
37
+ importDeserializeUtils(srcPath, operationGroupFile, emitterOptions.project, "deserialize", subfolder, prefixes.length);
36
38
  // Import the serializeUtils
37
- importDeserializeUtils(srcPath, operationGroupFile, codeModel.project, "serialize", subfolder, operationGroup.namespaceHierarchies.length);
38
- const indexPathPrefix = "../".repeat(operationGroup.namespaceHierarchies.length) || "./";
39
- operationGroupFile.addImportDeclaration({
40
- namedImports: [`${client.rlcClientName} as Client`],
41
- moduleSpecifier: `${indexPathPrefix}index.js`
42
- });
43
- operationGroup.operations.forEach((o) => {
44
- const operationDeclaration = getOperationFunction(dpgContext, o, clientType);
45
- const sendOperationDeclaration = getSendPrivateFunction(dpgContext, o, clientType);
46
- const deserializeOperationDeclaration = getDeserializePrivateFunction(dpgContext, o);
39
+ importDeserializeUtils(srcPath, operationGroupFile, emitterOptions.project, "serialize", subfolder, prefixes.length);
40
+ operations.forEach((op) => {
41
+ const operationDeclaration = getOperationFunction(dpgContext, [prefixes, op], clientType);
42
+ const sendOperationDeclaration = getSendPrivateFunction(dpgContext, client, [prefixes, op], clientType);
43
+ const deserializeOperationDeclaration = getDeserializePrivateFunction(dpgContext, op);
47
44
  operationGroupFile.addFunctions([
48
45
  sendOperationDeclaration,
49
46
  deserializeOperationDeclaration,
50
47
  operationDeclaration
51
48
  ]);
52
49
  });
53
- // addImportsToFiles(codeModel.runtimeImports, operationGroupFile);
54
- operationGroupFile.fixUnusedIdentifiers();
50
+ const indexPathPrefix = "../".repeat(prefixKey === "" ? 0 : prefixes.length) || "./";
51
+ operationGroupFile.addImportDeclaration({
52
+ namedImports: [`${rlcClientName} as Client`],
53
+ moduleSpecifier: `${indexPathPrefix}index.js`
54
+ });
55
55
  addImportBySymbol("serializeRecord", operationGroupFile);
56
- operationFiles.push(operationGroupFile);
56
+ operationGroupFile.fixUnusedIdentifiers();
57
+ operationFiles.add(operationGroupFile);
57
58
  }
58
- return operationFiles;
59
+ return Array.from(operationFiles);
59
60
  }
60
61
  export function importDeserializeUtils(srcPath, sourceFile, project, serializeType, subfolder = "", importLayer = 0) {
61
62
  var _a;
@@ -77,13 +78,16 @@ export function importDeserializeUtils(srcPath, sourceFile, project, serializeTy
77
78
  /**
78
79
  * This function generates the interfaces for each operation options
79
80
  */
80
- export function buildOperationOptions(context, operation, sourceFile) {
81
- var _a;
81
+ export function buildOperationOptions(context, method, sourceFile) {
82
+ const dependencies = useDependencies();
83
+ const operation = method[1];
82
84
  const optionalParameters = operation.parameters
83
- .filter((p) => p.implementation === "Method")
85
+ .filter((p) => p.onClient === false &&
86
+ !(p.isGeneratedName &&
87
+ (p.name === "contentType" || p.name !== "accept")))
84
88
  .filter((p) => p.optional || p.clientDefaultValue);
85
89
  const options = [...optionalParameters];
86
- const name = getOperationOptionsName(operation, true);
90
+ const name = getOperationOptionsName(method, true);
87
91
  const lroOptions = {
88
92
  name: "updateIntervalInMs",
89
93
  type: "number",
@@ -91,25 +95,20 @@ export function buildOperationOptions(context, operation, sourceFile) {
91
95
  docs: ["Delay to wait until next poll, in milliseconds."]
92
96
  };
93
97
  // handle optional body parameter
94
- if (((_a = operation.bodyParameter) === null || _a === void 0 ? void 0 : _a.optional) === true) {
95
- options.push(operation.bodyParameter);
96
- }
98
+ // if (operation.operation.bodyParam?.optional === true) {
99
+ // options.push(operation.operation.bodyParam);
100
+ // }
101
+ const operationOptionsReference = resolveReference(dependencies.OperationOptions);
97
102
  sourceFile.addInterface({
98
103
  name,
99
104
  isExported: true,
100
- extends: ["OperationOptions"],
105
+ extends: [operationOptionsReference],
101
106
  properties: (isLroOnlyOperation(operation) ? [lroOptions] : []).concat(options.map((p) => {
102
107
  return {
103
- docs: getDocsFromDescription(p.description),
108
+ docs: getDocsFromDescription(p.doc),
104
109
  hasQuestionToken: true,
105
- ...(p.type.tcgcType
106
- ? {
107
- type: getTypeExpression(context, p.type.tcgcType),
108
- name: p.clientName
109
- }
110
- : {
111
- ...buildType(p.clientName, p.type, p.format)
112
- })
110
+ type: getTypeExpression(context, p.type),
111
+ name: normalizeName(p.name, NameType.Parameter)
113
112
  };
114
113
  })),
115
114
  docs: [`Optional parameters.`]
@@ -118,17 +117,19 @@ export function buildOperationOptions(context, operation, sourceFile) {
118
117
  /**
119
118
  * This function creates a map of operation file path to operation names.
120
119
  */
121
- export function buildLroDeserDetailMap(client) {
120
+ export function buildLroDeserDetailMap(context, client) {
122
121
  const map = new Map();
123
122
  const existingNames = new Set();
124
- for (const operationGroup of client.operationGroups) {
125
- const operations = operationGroup.operations.filter((o) => isLroOnlyOperation(o));
123
+ const methodMap = getMethodHierarchiesMap(context, client);
124
+ for (const [prefixKey, operations] of methodMap) {
125
+ const prefixes = prefixKey.split("/");
126
+ const lroOperations = operations.filter((o) => isLroOnlyOperation(o));
126
127
  // skip this operation group if it has no LRO operations
127
- if (operations.length === 0) {
128
+ if (lroOperations.length === 0) {
128
129
  continue;
129
130
  }
130
- const operationFileName = operationGroup.className && operationGroup.namespaceHierarchies.length > 0
131
- ? `${operationGroup.namespaceHierarchies
131
+ const operationFileName = prefixes.length > 0 && prefixKey !== ""
132
+ ? `${prefixes
132
133
  .map((hierarchy) => {
133
134
  return normalizeName(hierarchy, NameType.File);
134
135
  })
@@ -136,7 +137,7 @@ export function buildLroDeserDetailMap(client) {
136
137
  : // When the program has no operation groups defined all operations are put
137
138
  // into a nameless operation group. We'll call this operations.
138
139
  "operations";
139
- map.set(`./api/${operationFileName}.js`, operations.map((o) => {
140
+ map.set(`./api/${operationFileName}.js`, lroOperations.map((o) => {
140
141
  const { name } = getOperationName(o);
141
142
  const deserName = `_${name}Deserialize`;
142
143
  let renamedDeserName = undefined;
@@ -149,7 +150,7 @@ export function buildLroDeserDetailMap(client) {
149
150
  }
150
151
  existingNames.add(deserName);
151
152
  return {
152
- path: `${o.method.toUpperCase()} ${o.url}`,
153
+ path: `${o.operation.verb.toUpperCase()} ${o.operation.path}`,
153
154
  expectedStatusesExpression: getExpectedStatuses(o),
154
155
  deserName,
155
156
  renamedDeserName
@@ -1 +1 @@
1
- {"version":3,"file":"buildOperations.js","sourceRoot":"","sources":["../../../src/modular/buildOperations.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,6BAA6B,EAC7B,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AA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gBAC1E,+DAA+D;gBAC/D,YAAY,CAAC;QACnB,GAAG,CAAC,GAAG,CACL,SAAS,iBAAiB,KAAK,EAC/B,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACtB,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;YACrC,MAAM,SAAS,GAAG,IAAI,IAAI,aAAa,CAAC;YACxC,IAAI,gBAAgB,GAAG,SAAS,CAAC;YACjC,IAAI,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;gBACjC,MAAM,OAAO,GAAG,GAAG,IAAI,eAAe,iBAAiB;qBACpD,KAAK,CAAC,GAAG,CAAC;qBACV,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;qBACZ,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBACf,gBAAgB,GAAG,IAAI,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACnE,CAAC;YACD,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC7B,OAAO;gBACL,IAAI,EAAE,GAAG,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE;gBAC7D,0BAA0B,EAAE,mBAAmB,CAAC,CAAC,CAAC;gBAClD,SAAS;gBACT,gBAAgB;aACjB,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,3 +1,4 @@
1
- import { ModularCodeModel } from "./modularCodeModel.js";
2
- export declare function getModuleExports(codeModel: ModularCodeModel): any;
1
+ import { ModularEmitterOptions } from "./interfaces.js";
2
+ import { SdkContext } from "@azure-tools/typespec-client-generator-core";
3
+ export declare function getModuleExports(context: SdkContext, emitterOptions: ModularEmitterOptions): any;
3
4
  //# sourceMappingURL=buildProjectFiles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildProjectFiles.d.ts","sourceRoot":"","sources":["../../../src/modular/buildProjectFiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAgDzD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,OAY3D"}
1
+ {"version":3,"file":"buildProjectFiles.d.ts","sourceRoot":"","sources":["../../../src/modular/buildProjectFiles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AA8CzE,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,UAAU,EACnB,cAAc,EAAE,qBAAqB,OAatC"}
@@ -1,11 +1,13 @@
1
- import { NameType, normalizeName } from "@azure-tools/rlc-common";
1
+ import { NameType } from "@azure-tools/rlc-common";
2
2
  import { getClassicalLayerPrefix } from "./helpers/namingHelpers.js";
3
- function buildExportsForMultiClient(codeModel, packageInfo) {
4
- if (codeModel.clients.length > 1) {
3
+ import { getModularClientOptions } from "../utils/clientUtils.js";
4
+ import { getMethodHierarchiesMap } from "../utils/operationUtil.js";
5
+ function buildExportsForMultiClient(context, emitterOptions, packageInfo) {
6
+ if (context.sdkPackage.clients.length > 1) {
5
7
  delete packageInfo.exports["./api"];
6
8
  delete packageInfo.exports["./models"];
7
- for (const client of codeModel.clients) {
8
- const subfolder = normalizeName(client.name.replace("Client", ""), NameType.File);
9
+ for (const client of context.sdkPackage.clients) {
10
+ const { subfolder } = getModularClientOptions(context, client);
9
11
  packageInfo.exports[`./${subfolder}`] = `./src/${subfolder}/index.ts`;
10
12
  packageInfo.exports[`./${subfolder}/api`] =
11
13
  `./src/${subfolder}/api/index.ts`;
@@ -13,32 +15,32 @@ function buildExportsForMultiClient(codeModel, packageInfo) {
13
15
  `./src/${subfolder}/models/index.ts`;
14
16
  }
15
17
  }
16
- if (codeModel.options.hierarchyClient) {
17
- for (const client of codeModel.clients) {
18
- for (const operationGroup of client.operationGroups) {
19
- if (operationGroup.namespaceHierarchies.length === 0) {
18
+ if (emitterOptions.options.hierarchyClient) {
19
+ for (const client of context.sdkPackage.clients) {
20
+ const { subfolder } = getModularClientOptions(context, client);
21
+ const methodMap = getMethodHierarchiesMap(context, client);
22
+ for (const [prefixKey, _] of methodMap) {
23
+ const prefixes = prefixKey.split("/");
24
+ if (prefixKey === "") {
20
25
  continue;
21
26
  }
22
- const subfolder = codeModel.clients.length > 1
23
- ? normalizeName(client.name.replace("Client", ""), NameType.File)
24
- : undefined;
25
- const subApiPath = `api/${getClassicalLayerPrefix(operationGroup, NameType.File, "/")}`;
27
+ const subApiPath = `api/${getClassicalLayerPrefix(prefixes, NameType.File, "/")}`;
26
28
  packageInfo.exports[`./${subfolder ? subfolder + "/" : ""}${subApiPath}`] = `src/${subfolder ? subfolder + "/" : ""}${subApiPath}/index.ts`;
27
29
  }
28
30
  }
29
31
  }
30
32
  return packageInfo.exports;
31
33
  }
32
- export function getModuleExports(codeModel) {
34
+ export function getModuleExports(context, emitterOptions) {
33
35
  const exports = {
34
36
  exports: {
35
37
  ".": "./src/index.ts",
36
38
  "./models": "./src/models/index.ts"
37
39
  }
38
40
  };
39
- if (!codeModel.options.azureArm) {
41
+ if (!emitterOptions.options.azureArm) {
40
42
  exports["exports"]["./api"] = "./src/api/index.ts";
41
43
  }
42
- return buildExportsForMultiClient(codeModel, exports);
44
+ return buildExportsForMultiClient(context, emitterOptions, exports);
43
45
  }
44
46
  //# sourceMappingURL=buildProjectFiles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildProjectFiles.js","sourceRoot":"","sources":["../../../src/modular/buildProjectFiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,SAAS,0BAA0B,CACjC,SA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G,CAAC,CAAC,CAAC,EAAE,GAAG,UAAU,WAAW,CAAC;YACtE,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,WAAW,CAAC,OAAO,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,OAAmB,EACnB,cAAqC;IAErC,MAAM,OAAO,GAAwB;QACnC,OAAO,EAAE;YACP,GAAG,EAAE,gBAAgB;YACrB,UAAU,EAAE,uBAAuB;SACpC;KACF,CAAC;IACF,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACrC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,oBAAoB,CAAC;IACrD,CAAC;IAED,OAAO,0BAA0B,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;AACtE,CAAC"}
@@ -1,3 +1,5 @@
1
- import { ModularCodeModel, Client } from "./modularCodeModel.js";
2
- export declare function buildRestorePoller(codeModel: ModularCodeModel, client: Client): void;
1
+ import { ModularEmitterOptions } from "./interfaces.js";
2
+ import { SdkClientType, SdkServiceOperation } from "@azure-tools/typespec-client-generator-core";
3
+ import { SdkContext } from "../utils/interfaces.js";
4
+ export declare function buildRestorePoller(context: SdkContext, client: SdkClientType<SdkServiceOperation>, emitterOptions: ModularEmitterOptions): void;
3
5
  //# sourceMappingURL=buildRestorePoller.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildRestorePoller.d.ts","sourceRoot":"","sources":["../../../src/modular/buildRestorePoller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAYjE,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,MAAM,QA2Lf"}
1
+ {"version":3,"file":"buildRestorePoller.d.ts","sourceRoot":"","sources":["../../../src/modular/buildRestorePoller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAQxD,OAAO,EACL,aAAa,EACb,mBAAmB,EACpB,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGpD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAC1C,cAAc,EAAE,qBAAqB,QAiMtC"}
@@ -4,28 +4,32 @@ import { buildLroDeserDetailMap } from "./buildOperations.js";
4
4
  import { getClientName } from "./helpers/namingHelpers.js";
5
5
  import { NameType, normalizeName } from "@azure-tools/rlc-common";
6
6
  import { resolveReference } from "../framework/reference.js";
7
- import { AzureCoreDependencies, AzurePollingDependencies } from "./external-dependencies.js";
7
+ import { AzurePollingDependencies } from "./external-dependencies.js";
8
8
  import { PollingHelpers } from "./static-helpers-metadata.js";
9
- export function buildRestorePoller(codeModel, client) {
10
- var _a;
11
- const lros = client.operationGroups
12
- .flatMap((op) => op.operations)
13
- .filter(isLroOnlyOperation);
14
- if (lros.length === 0) {
9
+ import { getMethodHierarchiesMap } from "../utils/operationUtil.js";
10
+ import { getModularClientOptions } from "../utils/clientUtils.js";
11
+ import { useDependencies } from "../framework/hooks/useDependencies.js";
12
+ export function buildRestorePoller(context, client, emitterOptions) {
13
+ const dependencies = useDependencies();
14
+ const { subfolder } = getModularClientOptions(context, client);
15
+ const methodMap = getMethodHierarchiesMap(context, client);
16
+ const hasLro = Array.from(methodMap.values()).some((operations) => {
17
+ return operations.some(isLroOnlyOperation);
18
+ });
19
+ if (!hasLro) {
15
20
  return;
16
21
  }
17
- const srcPath = codeModel.modularOptions.sourceRoot;
18
- const subfolder = (_a = client.subfolder) !== null && _a !== void 0 ? _a : "";
19
- const filePath = path.join(`${srcPath}/${subfolder !== "" ? subfolder + "/" : ""}restorePollerHelpers.ts`);
20
- const restorePollerFile = codeModel.project.createSourceFile(filePath, undefined, {
22
+ const srcPath = emitterOptions.modularOptions.sourceRoot;
23
+ const filePath = path.join(`${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}restorePollerHelpers.ts`);
24
+ const restorePollerFile = emitterOptions.project.createSourceFile(filePath, undefined, {
21
25
  overwrite: true
22
26
  });
23
27
  const clientNames = importClassicalClient(client, restorePollerFile);
24
- const deserializeMap = importDeserializeHelpers(client, restorePollerFile);
25
- const pathUncheckedReference = resolveReference(AzureCoreDependencies.PathUncheckedResponse);
28
+ const deserializeMap = importDeserializeHelpers(context, client, restorePollerFile);
29
+ const pathUncheckedReference = resolveReference(dependencies.PathUncheckedResponse);
26
30
  const pollerLikeReference = resolveReference(AzurePollingDependencies.PollerLike);
27
31
  const operationStateReference = resolveReference(AzurePollingDependencies.OperationState);
28
- const operationOptionsReference = resolveReference(AzureCoreDependencies.OperationOptions);
32
+ const operationOptionsReference = resolveReference(dependencies.OperationOptions);
29
33
  const deserializeStateReference = resolveReference(AzurePollingDependencies.DeserializeState);
30
34
  const restorePollerHelperContent = `
31
35
  export interface RestorePollerOptions<
@@ -37,7 +41,7 @@ export function buildRestorePoller(codeModel, client) {
37
41
  /**
38
42
  * The signal which can be used to abort requests.
39
43
  */
40
- abortSignal?: ${resolveReference(AzureCoreDependencies.AbortSignalLike)};
44
+ abortSignal?: ${resolveReference(dependencies.AbortSignalLike)};
41
45
  /** Deserialization function for raw response body */
42
46
  processResponseBody?: (result: TResponse) => Promise<TResult>;
43
47
  }
@@ -175,8 +179,8 @@ export function buildRestorePoller(codeModel, client) {
175
179
  `;
176
180
  restorePollerFile.addStatements(restorePollerHelperContent);
177
181
  }
178
- function importDeserializeHelpers(client, sourceFile) {
179
- const deserializeDetails = buildLroDeserDetailMap(client);
182
+ function importDeserializeHelpers(context, client, sourceFile) {
183
+ const deserializeDetails = buildLroDeserDetailMap(context, client);
180
184
  const deserializeMap = [];
181
185
  for (const [key, value] of deserializeDetails.entries()) {
182
186
  sourceFile.addImportDeclaration({
@@ -193,7 +197,7 @@ function importDeserializeHelpers(client, sourceFile) {
193
197
  return deserializeMap;
194
198
  }
195
199
  function importClassicalClient(client, sourceFile) {
196
- const classicalClientName = `${getClientName(client.tcgcClient)}Client`;
200
+ const classicalClientName = `${getClientName(client)}Client`;
197
201
  sourceFile.addImportDeclaration({
198
202
  namedImports: [`${classicalClientName}`],
199
203
  moduleSpecifier: `./${normalizeName(classicalClientName, NameType.File)}.js`
@@ -1 +1 @@
1
- {"version":3,"file":"buildRestorePoller.js","sourceRoot":"","sources":["../../../src/modular/buildRestorePoller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,UAAU,kBAAkB,CAChC,SAA2B,EAC3B,MAAc;;IAEd,MAAM,IAAI,GAAG,MAAM,CAAC,eAAe;SAChC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC;SAC9B,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAC9B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO;IACT,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,CAAC,cAAc,CAAC,UAAU,CAAC;IACpD,MAAM,SAAS,GAAG,MAAA,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CACxB,GAAG,OA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AAM,mBAAmB,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC7D,UAAU,CAAC,oBAAoB,CAAC;QAC9B,YAAY,EAAE,CAAC,GAAG,mBAAmB,EAAE,CAAC;QACxC,eAAe,EAAE,KAAK,aAAa,CAAC,mBAAmB,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;KAC7E,CAAC,CAAC;IACH,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC/B,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import { SourceFile } from "ts-morph";
2
- import { Client, ModularCodeModel } from "./modularCodeModel.js";
3
- export declare function buildRootIndex(client: Client, codeModel: ModularCodeModel, rootIndexFile: SourceFile): void;
2
+ import { ModularEmitterOptions } from "./interfaces.js";
3
+ import { SdkClientType, SdkContext, SdkServiceOperation } from "@azure-tools/typespec-client-generator-core";
4
+ export declare function buildRootIndex(context: SdkContext, client: SdkClientType<SdkServiceOperation>, emitterOptions: ModularEmitterOptions, rootIndexFile: SourceFile): void;
4
5
  export interface ExportModulesOptions {
5
6
  interfaceOnly?: boolean;
6
7
  isTopLevel?: boolean;
7
8
  subfolder?: string;
8
9
  }
9
- export declare function buildSubClientIndexFile(client: Client, codeModel: ModularCodeModel): void;
10
+ export declare function buildSubClientIndexFile(context: SdkContext, client: SdkClientType<SdkServiceOperation>, emitterOptions: ModularEmitterOptions): void;
10
11
  //# sourceMappingURL=buildRootIndex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildRootIndex.d.ts","sourceRoot":"","sources":["../../../src/modular/buildRootIndex.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,UAAU,EAAE,MAAM,UAAU,CAAC;AAK/C,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIjE,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,gBAAgB,EAC3B,aAAa,EAAE,UAAU,QAoD1B;AAmHD,MAAM,WAAW,oBAAoB;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,gBAAgB,QA8C5B"}
1
+ {"version":3,"file":"buildRootIndex.d.ts","sourceRoot":"","sources":["../../../src/modular/buildRootIndex.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,UAAU,EAAE,MAAM,UAAU,CAAC;AAK/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EACL,aAAa,EACb,UAAU,EACV,mBAAmB,EACpB,MAAM,6CAA6C,CAAC;AAIrD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAC1C,cAAc,EAAE,qBAAqB,EACrC,aAAa,EAAE,UAAU,QAoD1B;AAmHD,MAAM,WAAW,oBAAoB;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAC1C,cAAc,EAAE,qBAAqB,QA8CtC"}
@@ -2,20 +2,22 @@ import { NameType, normalizeName } from "@azure-tools/rlc-common";
2
2
  import { getClassicalClientName, getClientName } from "./helpers/namingHelpers.js";
3
3
  import { resolveReference } from "../framework/reference.js";
4
4
  import { PagingHelpers } from "./static-helpers-metadata.js";
5
- export function buildRootIndex(client, codeModel, rootIndexFile) {
6
- var _a, _b;
7
- const { project } = codeModel;
8
- const srcPath = codeModel.modularOptions.sourceRoot;
9
- const subfolder = (_a = client.subfolder) !== null && _a !== void 0 ? _a : "";
10
- const clientName = `${getClassicalClientName(client.tcgcClient)}`;
11
- const clientFile = project.getSourceFile(`${srcPath}/${subfolder !== "" ? subfolder + "/" : ""}${normalizeName(clientName, NameType.File)}.ts`);
5
+ import { getModularClientOptions } from "../utils/clientUtils.js";
6
+ import { getMethodHierarchiesMap } from "../utils/operationUtil.js";
7
+ export function buildRootIndex(context, client, emitterOptions, rootIndexFile) {
8
+ var _a;
9
+ const { project } = emitterOptions;
10
+ const srcPath = emitterOptions.modularOptions.sourceRoot;
11
+ const { subfolder } = getModularClientOptions(context, client);
12
+ const clientName = `${getClassicalClientName(client)}`;
13
+ const clientFile = project.getSourceFile(`${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}${normalizeName(clientName, NameType.File)}.ts`);
12
14
  if (!clientFile) {
13
15
  throw new Error(`Couldn't find client file: ${srcPath}/${normalizeName(clientName, NameType.File)}.ts`);
14
16
  }
15
- exportClassicalClient(client, rootIndexFile, subfolder);
17
+ exportClassicalClient(client, rootIndexFile, subfolder !== null && subfolder !== void 0 ? subfolder : "");
16
18
  exportRestoreHelpers(rootIndexFile, project, srcPath, clientName, subfolder, true);
17
- const modelsExportsIndex = (_b = rootIndexFile
18
- .getExportDeclarations()) === null || _b === void 0 ? void 0 : _b.find((i) => {
19
+ const modelsExportsIndex = (_a = rootIndexFile
20
+ .getExportDeclarations()) === null || _a === void 0 ? void 0 : _a.find((i) => {
19
21
  return i.getModuleSpecifierValue() === `./models/index.js`;
20
22
  });
21
23
  if (!modelsExportsIndex) {
@@ -32,13 +34,13 @@ export function buildRootIndex(client, codeModel, rootIndexFile) {
32
34
  subfolder,
33
35
  isTopLevel: true
34
36
  });
35
- exportPagingTypes(codeModel, rootIndexFile);
37
+ exportPagingTypes(context, rootIndexFile);
36
38
  }
37
39
  /**
38
40
  * This is a temporary solution for adding paging exports. Eventually we will have the binder generate the exports automatically.
39
41
  */
40
- function exportPagingTypes(codeModel, rootIndexFile) {
41
- if (!hasPaging(codeModel)) {
42
+ function exportPagingTypes(context, rootIndexFile) {
43
+ if (!hasPaging(context)) {
42
44
  return;
43
45
  }
44
46
  const existingExports = getExistingExports(rootIndexFile);
@@ -52,8 +54,16 @@ function exportPagingTypes(codeModel, rootIndexFile) {
52
54
  addExportsToRootIndexFile(rootIndexFile, newNamedExports);
53
55
  }
54
56
  }
55
- function hasPaging(codeModel) {
56
- return codeModel.clients.some((c) => c.operationGroups.some((og) => og.operations.some((op) => op.discriminator === "paging" || op.discriminator === "lropaging")));
57
+ function hasPaging(context) {
58
+ return context.sdkPackage.clients.some((client) => {
59
+ const methodMap = getMethodHierarchiesMap(context, client);
60
+ for (const [_, operations] of methodMap) {
61
+ if (operations.some((op) => op.kind === "paging" || op.kind === "lropaging")) {
62
+ return true;
63
+ }
64
+ }
65
+ return false;
66
+ });
57
67
  }
58
68
  function getExistingExports(rootIndexFile) {
59
69
  return new Set(rootIndexFile
@@ -69,7 +79,7 @@ function addExportsToRootIndexFile(rootIndexFile, newNamedExports) {
69
79
  });
70
80
  }
71
81
  function exportRestoreHelpers(indexFile, project, srcPath, clientName, subfolder = "", isTopLevel = false) {
72
- const helperFile = project.getSourceFile(`${srcPath}/${subfolder !== "" ? subfolder + "/" : ""}restorePollerHelpers.ts`);
82
+ const helperFile = project.getSourceFile(`${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}restorePollerHelpers.ts`);
73
83
  if (!helperFile) {
74
84
  return;
75
85
  }
@@ -80,17 +90,17 @@ function exportRestoreHelpers(indexFile, project, srcPath, clientName, subfolder
80
90
  }
81
91
  return helper;
82
92
  });
83
- const moduleSpecifier = `./${isTopLevel && subfolder !== "" ? subfolder + "/" : ""}restorePollerHelpers.js`;
93
+ const moduleSpecifier = `./${isTopLevel && subfolder && subfolder !== "" ? subfolder + "/" : ""}restorePollerHelpers.js`;
84
94
  indexFile.addExportDeclaration({
85
95
  moduleSpecifier,
86
96
  namedExports
87
97
  });
88
98
  }
89
99
  function exportClassicalClient(client, indexFile, subfolder, isSubClient = false) {
90
- const clientName = `${getClientName(client.tcgcClient)}Client`;
100
+ const clientName = `${getClientName(client)}Client`;
91
101
  indexFile.addExportDeclaration({
92
102
  namedExports: [clientName],
93
- moduleSpecifier: `./${subfolder !== "" && !isSubClient ? subfolder + "/" : ""}${normalizeName(clientName, NameType.File)}.js`
103
+ moduleSpecifier: `./${subfolder && subfolder !== "" && !isSubClient ? subfolder + "/" : ""}${normalizeName(clientName, NameType.File)}.js`
94
104
  });
95
105
  }
96
106
  function exportModules(indexFile, project, srcPath, clientName, moduleName, options = {
@@ -137,23 +147,22 @@ function exportModules(indexFile, project, srcPath, clientName, moduleName, opti
137
147
  namedExports
138
148
  });
139
149
  }
140
- export function buildSubClientIndexFile(client, codeModel) {
141
- var _a;
142
- const subfolder = (_a = client.subfolder) !== null && _a !== void 0 ? _a : "";
143
- const srcPath = codeModel.modularOptions.sourceRoot;
144
- const subClientIndexFile = codeModel.project.createSourceFile(`${srcPath}/${subfolder !== "" ? subfolder + "/" : ""}index.ts`, undefined, { overwrite: true });
145
- const clientName = `${getClientName(client.tcgcClient)}Client`;
146
- const clientFilePath = `${srcPath}/${subfolder !== "" ? subfolder + "/" : ""}${normalizeName(clientName, NameType.File)}.ts`;
147
- const clientFile = codeModel.project.getSourceFile(clientFilePath);
150
+ export function buildSubClientIndexFile(context, client, emitterOptions) {
151
+ const { subfolder } = getModularClientOptions(context, client);
152
+ const srcPath = emitterOptions.modularOptions.sourceRoot;
153
+ const subClientIndexFile = emitterOptions.project.createSourceFile(`${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}index.ts`, undefined, { overwrite: true });
154
+ const clientName = `${getClientName(client)}Client`;
155
+ const clientFilePath = `${srcPath}/${subfolder && subfolder !== "" ? subfolder + "/" : ""}${normalizeName(clientName, NameType.File)}.ts`;
156
+ const clientFile = emitterOptions.project.getSourceFile(clientFilePath);
148
157
  if (!clientFile) {
149
158
  throw new Error(`Couldn't find client file: ${clientFilePath}`);
150
159
  }
151
- exportClassicalClient(client, subClientIndexFile, subfolder, true);
152
- exportRestoreHelpers(subClientIndexFile, codeModel.project, srcPath, clientName, subfolder);
153
- exportModules(subClientIndexFile, codeModel.project, srcPath, clientName, "api", {
160
+ exportClassicalClient(client, subClientIndexFile, subfolder !== null && subfolder !== void 0 ? subfolder : "", true);
161
+ exportRestoreHelpers(subClientIndexFile, emitterOptions.project, srcPath, clientName, subfolder);
162
+ exportModules(subClientIndexFile, emitterOptions.project, srcPath, clientName, "api", {
154
163
  subfolder,
155
164
  interfaceOnly: true
156
165
  });
157
- exportModules(subClientIndexFile, codeModel.project, srcPath, clientName, "classic", { subfolder });
166
+ exportModules(subClientIndexFile, emitterOptions.project, srcPath, clientName, "classic", { subfolder });
158
167
  }
159
168
  //# sourceMappingURL=buildRootIndex.js.map