@azure-tools/typespec-ts 0.29.0 → 0.30.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.
- package/CHANGELOG.md +15 -0
- package/dist/src/contextManager.d.ts +70 -0
- package/dist/src/contextManager.d.ts.map +1 -0
- package/dist/src/contextManager.js +59 -0
- package/dist/src/contextManager.js.map +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +38 -28
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +2 -1
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +3 -2
- package/dist/src/lib.js.map +1 -1
- package/dist/src/metaTree.d.ts +12 -0
- package/dist/src/metaTree.d.ts.map +1 -0
- package/dist/src/metaTree.js +2 -0
- package/dist/src/metaTree.js.map +1 -0
- package/dist/src/modular/buildClassicalClient.d.ts +1 -1
- package/dist/src/modular/buildClassicalClient.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.js +22 -16
- package/dist/src/modular/buildClassicalClient.js.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.d.ts +3 -2
- package/dist/src/modular/buildClassicalOperationGroups.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalOperationGroups.js +5 -5
- package/dist/src/modular/buildClassicalOperationGroups.js.map +1 -1
- package/dist/src/modular/buildClientContext.d.ts +1 -1
- package/dist/src/modular/buildClientContext.d.ts.map +1 -1
- package/dist/src/modular/buildClientContext.js +5 -5
- package/dist/src/modular/buildClientContext.js.map +1 -1
- package/dist/src/modular/buildCodeModel.d.ts +2 -2
- package/dist/src/modular/buildCodeModel.d.ts.map +1 -1
- package/dist/src/modular/buildCodeModel.js +69 -43
- package/dist/src/modular/buildCodeModel.js.map +1 -1
- package/dist/src/modular/buildHelperSerializers.d.ts +3 -0
- package/dist/src/modular/buildHelperSerializers.d.ts.map +1 -0
- package/dist/src/modular/buildHelperSerializers.js +60 -0
- package/dist/src/modular/buildHelperSerializers.js.map +1 -0
- package/dist/src/modular/buildLroFiles.d.ts +1 -1
- package/dist/src/modular/buildLroFiles.d.ts.map +1 -1
- package/dist/src/modular/buildLroFiles.js +25 -31
- package/dist/src/modular/buildLroFiles.js.map +1 -1
- package/dist/src/modular/buildOperations.d.ts +3 -2
- package/dist/src/modular/buildOperations.d.ts.map +1 -1
- package/dist/src/modular/buildOperations.js +23 -11
- package/dist/src/modular/buildOperations.js.map +1 -1
- package/dist/src/modular/buildPagingFiles.d.ts.map +1 -1
- package/dist/src/modular/buildPagingFiles.js.map +1 -1
- package/dist/src/modular/buildProjectFiles.d.ts.map +1 -1
- package/dist/src/modular/buildProjectFiles.js.map +1 -1
- package/dist/src/modular/buildRootIndex.d.ts.map +1 -1
- package/dist/src/modular/buildRootIndex.js +1 -1
- package/dist/src/modular/buildRootIndex.js.map +1 -1
- package/dist/src/modular/buildSerializeUtils.d.ts +2 -2
- package/dist/src/modular/buildSerializeUtils.d.ts.map +1 -1
- package/dist/src/modular/buildSerializeUtils.js +15 -8
- package/dist/src/modular/buildSerializeUtils.js.map +1 -1
- package/dist/src/modular/buildSubpathIndex.d.ts.map +1 -1
- package/dist/src/modular/buildSubpathIndex.js +6 -0
- package/dist/src/modular/buildSubpathIndex.js.map +1 -1
- package/dist/src/modular/emitModels.d.ts +5 -5
- package/dist/src/modular/emitModels.d.ts.map +1 -1
- package/dist/src/modular/emitModels.js +52 -21
- package/dist/src/modular/emitModels.js.map +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts +3 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/classicalOperationHelpers.js +26 -12
- package/dist/src/modular/helpers/classicalOperationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.d.ts +3 -2
- package/dist/src/modular/helpers/clientHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.js +14 -5
- package/dist/src/modular/helpers/clientHelpers.js.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts +5 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.js +25 -1
- package/dist/src/modular/helpers/namingHelpers.js.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts +11 -3
- package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.js +160 -66
- package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.d.ts +3 -0
- package/dist/src/modular/helpers/typeHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.js +50 -19
- package/dist/src/modular/helpers/typeHelpers.js.map +1 -1
- package/dist/src/modular/modularCodeModel.d.ts +9 -5
- package/dist/src/modular/modularCodeModel.d.ts.map +1 -1
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts +4 -0
- package/dist/src/modular/serialization/buildSerializerFunction.d.ts.map +1 -0
- package/dist/src/modular/serialization/buildSerializerFunction.js +160 -0
- package/dist/src/modular/serialization/buildSerializerFunction.js.map +1 -0
- package/dist/src/modular/serialization/collectionUtils.d.ts +3 -0
- package/dist/src/modular/serialization/collectionUtils.d.ts.map +1 -0
- package/dist/src/modular/serialization/collectionUtils.js +17 -0
- package/dist/src/modular/serialization/collectionUtils.js.map +1 -0
- package/dist/src/modular/serialization/index.d.ts +5 -0
- package/dist/src/modular/serialization/index.d.ts.map +1 -0
- package/dist/src/modular/serialization/index.js +156 -0
- package/dist/src/modular/serialization/index.js.map +1 -0
- package/dist/src/modular/serialization/operationHelpers.d.ts +37 -0
- package/dist/src/modular/serialization/operationHelpers.d.ts.map +1 -0
- package/dist/src/modular/serialization/operationHelpers.js +457 -0
- package/dist/src/modular/serialization/operationHelpers.js.map +1 -0
- package/dist/src/modular/serialization/serializeArray.d.ts +5 -0
- package/dist/src/modular/serialization/serializeArray.d.ts.map +1 -0
- package/dist/src/modular/serialization/serializeArray.js +33 -0
- package/dist/src/modular/serialization/serializeArray.js.map +1 -0
- package/dist/src/modular/serialization/serializeDateTime.d.ts +4 -0
- package/dist/src/modular/serialization/serializeDateTime.d.ts.map +1 -0
- package/dist/src/modular/serialization/serializeDateTime.js +19 -0
- package/dist/src/modular/serialization/serializeDateTime.js.map +1 -0
- package/dist/src/modular/serialization/serializeHeaders.d.ts +7 -0
- package/dist/src/modular/serialization/serializeHeaders.d.ts.map +1 -0
- package/dist/src/modular/serialization/serializeHeaders.js +44 -0
- package/dist/src/modular/serialization/serializeHeaders.js.map +1 -0
- package/dist/src/modular/serialization/serializers.d.ts +17 -0
- package/dist/src/modular/serialization/serializers.d.ts.map +1 -0
- package/dist/src/modular/serialization/serializers.js +176 -0
- package/dist/src/modular/serialization/serializers.js.map +1 -0
- package/dist/src/modular/serialization/util.d.ts +26 -0
- package/dist/src/modular/serialization/util.d.ts.map +1 -0
- package/dist/src/modular/serialization/util.js +112 -0
- package/dist/src/modular/serialization/util.js.map +1 -0
- package/dist/src/reify/index.d.ts +12 -0
- package/dist/src/reify/index.d.ts.map +1 -0
- package/dist/src/reify/index.js +22 -0
- package/dist/src/reify/index.js.map +1 -0
- package/dist/src/testing/index.d.ts +2 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/index.js +7 -0
- package/dist/src/testing/index.js.map +1 -0
- package/dist/src/transform/transform.d.ts +1 -1
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/transform/transform.js +11 -11
- package/dist/src/transform/transform.js.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts +1 -1
- package/dist/src/transform/transformApiVersionInfo.d.ts.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.js +16 -6
- package/dist/src/transform/transformApiVersionInfo.js.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.js +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.js.map +1 -1
- package/dist/src/transform/transformParameters.d.ts +1 -1
- package/dist/src/transform/transformParameters.d.ts.map +1 -1
- package/dist/src/transform/transformParameters.js +3 -3
- package/dist/src/transform/transformParameters.js.map +1 -1
- package/dist/src/transform/transformPaths.d.ts +1 -1
- package/dist/src/transform/transformPaths.d.ts.map +1 -1
- package/dist/src/transform/transformPaths.js +3 -4
- package/dist/src/transform/transformPaths.js.map +1 -1
- package/dist/src/transform/transformResponses.d.ts +1 -1
- package/dist/src/transform/transformResponses.d.ts.map +1 -1
- package/dist/src/transform/transformResponses.js +12 -9
- package/dist/src/transform/transformResponses.js.map +1 -1
- package/dist/src/transform/transformSchemas.d.ts.map +1 -1
- package/dist/src/transform/transformSchemas.js +10 -4
- package/dist/src/transform/transformSchemas.js.map +1 -1
- package/dist/src/transform/transformTelemetryInfo.d.ts.map +1 -1
- package/dist/src/transform/transformTelemetryInfo.js +1 -1
- package/dist/src/transform/transformTelemetryInfo.js.map +1 -1
- package/dist/src/transform/transfromRLCOptions.d.ts.map +1 -1
- package/dist/src/transform/transfromRLCOptions.js +11 -5
- package/dist/src/transform/transfromRLCOptions.js.map +1 -1
- package/dist/src/utils/clientUtils.js.map +1 -1
- package/dist/src/utils/emitUtil.d.ts +1 -2
- package/dist/src/utils/emitUtil.d.ts.map +1 -1
- package/dist/src/utils/emitUtil.js.map +1 -1
- package/dist/src/utils/importHelper.d.ts +10 -0
- package/dist/src/utils/importHelper.d.ts.map +1 -0
- package/dist/src/utils/importHelper.js +54 -0
- package/dist/src/utils/importHelper.js.map +1 -0
- package/dist/src/utils/modelUtils.d.ts +1 -1
- package/dist/src/utils/modelUtils.d.ts.map +1 -1
- package/dist/src/utils/modelUtils.js +41 -25
- package/dist/src/utils/modelUtils.js.map +1 -1
- package/dist/src/utils/namespaceUtils.d.ts.map +1 -1
- package/dist/src/utils/namespaceUtils.js.map +1 -1
- package/dist/src/utils/operationUtil.d.ts +3 -4
- package/dist/src/utils/operationUtil.d.ts.map +1 -1
- package/dist/src/utils/operationUtil.js +4 -5
- package/dist/src/utils/operationUtil.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +55 -35
- package/src/contextManager.ts +99 -0
- package/src/index.ts +66 -55
- package/src/lib.ts +6 -4
- package/src/metaTree.ts +14 -0
- package/src/modular/buildClassicalClient.ts +36 -18
- package/src/modular/buildClassicalOperationGroups.ts +16 -8
- package/src/modular/buildClientContext.ts +11 -11
- package/src/modular/buildCodeModel.ts +141 -99
- package/src/modular/buildHelperSerializers.ts +71 -0
- package/src/modular/buildLroFiles.ts +29 -33
- package/src/modular/buildOperations.ts +68 -31
- package/src/modular/buildPagingFiles.ts +1 -1
- package/src/modular/buildProjectFiles.ts +1 -1
- package/src/modular/buildRootIndex.ts +1 -1
- package/src/modular/buildSerializeUtils.ts +33 -25
- package/src/modular/buildSubpathIndex.ts +10 -0
- package/src/modular/emitModels.ts +86 -32
- package/src/modular/helpers/classicalOperationHelpers.ts +41 -7
- package/src/modular/helpers/clientHelpers.ts +19 -6
- package/src/modular/helpers/namingHelpers.ts +59 -4
- package/src/modular/helpers/operationHelpers.ts +247 -111
- package/src/modular/helpers/typeHelpers.ts +54 -17
- package/src/modular/modularCodeModel.ts +17 -5
- package/src/modular/serialization/buildSerializerFunction.ts +224 -0
- package/src/modular/serialization/collectionUtils.ts +20 -0
- package/src/modular/serialization/index.ts +263 -0
- package/src/modular/serialization/operationHelpers.ts +660 -0
- package/src/modular/serialization/serializeArray.ts +51 -0
- package/src/modular/serialization/serializeDateTime.ts +22 -0
- package/src/modular/serialization/serializeHeaders.ts +64 -0
- package/src/modular/serialization/serializers.ts +304 -0
- package/src/modular/serialization/util.ts +167 -0
- package/src/reify/index.ts +41 -0
- package/src/testing/index.ts +10 -0
- package/src/transform/transform.ts +15 -15
- package/src/transform/transformApiVersionInfo.ts +29 -16
- package/src/transform/transformHelperFunctionDetails.ts +8 -8
- package/src/transform/transformParameters.ts +15 -15
- package/src/transform/transformPaths.ts +12 -12
- package/src/transform/transformResponses.ts +21 -18
- package/src/transform/transformSchemas.ts +17 -8
- package/src/transform/transformTelemetryInfo.ts +4 -4
- package/src/transform/transfromRLCOptions.ts +14 -7
- package/src/utils/clientUtils.ts +2 -2
- package/src/utils/emitUtil.ts +6 -3
- package/src/utils/importHelper.ts +64 -0
- package/src/utils/modelUtils.ts +79 -47
- package/src/utils/namespaceUtils.ts +1 -1
- package/src/utils/operationUtil.ts +22 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## 0.30.0 (2024-06-28)
|
|
2
|
+
|
|
3
|
+
- [Feature] Support non-exhaustive enum. Please refer to [#2584](https://github.com/Azure/autorest.typescript/pull/2584).
|
|
4
|
+
- [Feature] Add api version in ClientOptions and policy insight generated client. Please refer to [#2561](https://github.com/Azure/autorest.typescript/pull/2561).
|
|
5
|
+
- [Feature] Upgrade TypeSpec compiler version to 0.57.x. Please refer to [#2606](https://github.com/Azure/autorest.typescript/pull/2606).
|
|
6
|
+
- [Feature] Add fixed client level subscriptionId for ARM. Please refer to [#2615](https://github.com/Azure/autorest.typescript/pull/2615).
|
|
7
|
+
- [Feature] Support model based serializer. Please refer to [#2613](https://github.com/Azure/autorest.typescript/pull/2613).
|
|
8
|
+
- [Feature] Skip export of paged result models. Please refer to [#2620](https://github.com/Azure/autorest.typescript/pull/2620).
|
|
9
|
+
- [Feature] Remove env.ts and env.browser.ts file to support test recorder both v3 and v4. Please refer to [#2534](https://github.com/Azure/autorest.typescript/pull/2534) and [#2528](https://github.com/Azure/autorest.typescript/pull/2528).
|
|
10
|
+
- [Feature] remove api layer restore poller support. Please refer to [#2614](https://github.com/Azure/autorest.typescript/pull/2614).
|
|
11
|
+
- [Feature] Upgrade core related dependencies. Please refer to [identity upgrade pr](https://github.com/Azure/autorest.typescript/pull/2570) and [abort controller pr](https://github.com/Azure/autorest.typescript/pull/2555) and [core lro pr](https://github.com/Azure/autorest.typescript/pull/2626) and [core client rest pr](https://github.com/Azure/autorest.typescript/pull/2627).
|
|
12
|
+
- [Bugfix] Fix cast in bear auth. Please refer to [#2576](https://github.com/Azure/autorest.typescript/pull/2576).
|
|
13
|
+
- [Bugfix] Fix duplicate response headers. Please refer to [#2550](https://github.com/Azure/autorest.typescript/pull/2550).
|
|
14
|
+
- [Bugfix] Fix lint error in pollingHelper. Please refer to [#2582](https://github.com/Azure/autorest.typescript/pull/2582).
|
|
15
|
+
|
|
1
16
|
## 0.29.0 (2024-05-30)
|
|
2
17
|
|
|
3
18
|
- [Feature] Treat typespec unknown as any in Modular. Please refer to [#2546](https://github.com/Azure/autorest.typescript/pull/2546).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Project, SourceFile } from "ts-morph";
|
|
2
|
+
import { ModularMetaTree, RlcMetaTree } from "./metaTree.js";
|
|
3
|
+
import { EmitContext } from "@typespec/compiler";
|
|
4
|
+
import { SdkContext } from "@azure-tools/typespec-client-generator-core";
|
|
5
|
+
/**
|
|
6
|
+
* Contexts Object Guidelines
|
|
7
|
+
* --------------------------
|
|
8
|
+
* The `Contexts` object contains various application-wide data that needs to be accessible across different parts of the program without the need to pass down props deeply.
|
|
9
|
+
*
|
|
10
|
+
* When to add a new context:
|
|
11
|
+
* - **Cross-Cutting Concerns**: Add a new context when the data or functionality is a cross-cutting concern used by multiple unrelated components or modules.
|
|
12
|
+
* - **Global State**: If the state needs to be globally accessible and mutable by different parts of the application, and does not belong to a specific component or module.
|
|
13
|
+
* - **Performance Optimization**: To avoid unnecessary compute or prop drilling that may lead to performance bottlenecks, especially when passing down props through many levels.
|
|
14
|
+
* - **Shared Resources**: For resources that are shared across various parts of the application, such as settings, configurations, or metadata.
|
|
15
|
+
*
|
|
16
|
+
* Remember, adding too many contexts can lead to complex dependencies and harder-to-maintain code. Always evaluate if the context is truly necessary or if there are better alternatives such as localized state management or passing props for simpler scenarios.
|
|
17
|
+
*/
|
|
18
|
+
type Contexts = {
|
|
19
|
+
rlcMetaTree: RlcMetaTree;
|
|
20
|
+
modularMetaTree: ModularMetaTree;
|
|
21
|
+
outputProject: Project;
|
|
22
|
+
symbolMap: Map<string, SourceFile>;
|
|
23
|
+
emitContext: {
|
|
24
|
+
compilerContext: EmitContext;
|
|
25
|
+
tcgcContext: SdkContext;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
type ContextKey = keyof Contexts;
|
|
29
|
+
/**
|
|
30
|
+
* Manages shared contexts across the application to minimize prop drilling and enhance modularity.
|
|
31
|
+
* Implements the Singleton pattern to ensure there is a single instance of ContextManager.
|
|
32
|
+
*/
|
|
33
|
+
declare class ContextManager {
|
|
34
|
+
private static instance;
|
|
35
|
+
private contexts;
|
|
36
|
+
private constructor();
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the singleton instance of the ContextManager.
|
|
39
|
+
* @returns {ContextManager} The singleton instance.
|
|
40
|
+
*/
|
|
41
|
+
static getInstance(): ContextManager;
|
|
42
|
+
/**
|
|
43
|
+
* Sets a value for a specific context key.
|
|
44
|
+
* @param {ContextKey} key - The key of the context to set.
|
|
45
|
+
* @param {Contexts[K]} value - The value to set for the specified context.
|
|
46
|
+
*/
|
|
47
|
+
setContext<K extends ContextKey>(key: K, value: Contexts[K]): void;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves the context value for a specific key.
|
|
50
|
+
* @param {ContextKey} key - The key of the context to retrieve.
|
|
51
|
+
* @returns {Contexts[K] | undefined} The value of the context if found, otherwise undefined.
|
|
52
|
+
*/
|
|
53
|
+
getContext<K extends ContextKey>(key: K): Contexts[K] | undefined;
|
|
54
|
+
}
|
|
55
|
+
export declare const contextManager: ContextManager;
|
|
56
|
+
/**
|
|
57
|
+
* A utility function to use a context by key.
|
|
58
|
+
* @param {ContextKey} key - The key of the context to retrieve.
|
|
59
|
+
* @throws Will throw an error if the context is not found.
|
|
60
|
+
* @returns {Contexts[K]} The context value.
|
|
61
|
+
*/
|
|
62
|
+
export declare function useContext<K extends ContextKey>(key: K): Contexts[K];
|
|
63
|
+
/**
|
|
64
|
+
* Provides a context with a value to be accessible across the program.
|
|
65
|
+
* @param {ContextKey} key - The key of the context to provide.
|
|
66
|
+
* @param {Contexts[K]} value - The value to set for the specified context.
|
|
67
|
+
*/
|
|
68
|
+
export declare function provideContext<K extends ContextKey>(key: K, value: Contexts[K]): void;
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=contextManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextManager.d.ts","sourceRoot":"","sources":["../../src/contextManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAEzE;;;;;;;;;;;;GAYG;AACH,KAAK,QAAQ,GAAG;IACd,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,WAAW,EAAE;QACX,eAAe,EAAE,WAAW,CAAC;QAC7B,WAAW,EAAE,UAAU,CAAC;KACzB,CAAC;CACH,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,QAAQ,CAAC;AAEjC;;;GAGG;AACH,cAAM,cAAc;IAClB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAmC;IAEnD,OAAO;IAEP;;;OAGG;WACW,WAAW,IAAI,cAAc;IAO3C;;;;OAIG;IACI,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;IAIzE;;;;OAIG;IACI,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS;CAGzE;AAGD,eAAO,MAAM,cAAc,gBAA+B,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAMpE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EACjD,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GACjB,IAAI,CAEN"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manages shared contexts across the application to minimize prop drilling and enhance modularity.
|
|
3
|
+
* Implements the Singleton pattern to ensure there is a single instance of ContextManager.
|
|
4
|
+
*/
|
|
5
|
+
class ContextManager {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.contexts = new Map();
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves the singleton instance of the ContextManager.
|
|
11
|
+
* @returns {ContextManager} The singleton instance.
|
|
12
|
+
*/
|
|
13
|
+
static getInstance() {
|
|
14
|
+
if (!ContextManager.instance) {
|
|
15
|
+
ContextManager.instance = new ContextManager();
|
|
16
|
+
}
|
|
17
|
+
return ContextManager.instance;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Sets a value for a specific context key.
|
|
21
|
+
* @param {ContextKey} key - The key of the context to set.
|
|
22
|
+
* @param {Contexts[K]} value - The value to set for the specified context.
|
|
23
|
+
*/
|
|
24
|
+
setContext(key, value) {
|
|
25
|
+
this.contexts.set(key, value);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the context value for a specific key.
|
|
29
|
+
* @param {ContextKey} key - The key of the context to retrieve.
|
|
30
|
+
* @returns {Contexts[K] | undefined} The value of the context if found, otherwise undefined.
|
|
31
|
+
*/
|
|
32
|
+
getContext(key) {
|
|
33
|
+
return this.contexts.get(key);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// Expose the singleton instance of the context manager.
|
|
37
|
+
export const contextManager = ContextManager.getInstance();
|
|
38
|
+
/**
|
|
39
|
+
* A utility function to use a context by key.
|
|
40
|
+
* @param {ContextKey} key - The key of the context to retrieve.
|
|
41
|
+
* @throws Will throw an error if the context is not found.
|
|
42
|
+
* @returns {Contexts[K]} The context value.
|
|
43
|
+
*/
|
|
44
|
+
export function useContext(key) {
|
|
45
|
+
const context = contextManager.getContext(key);
|
|
46
|
+
if (!context) {
|
|
47
|
+
throw new Error(`Context ${key} not found`);
|
|
48
|
+
}
|
|
49
|
+
return context;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Provides a context with a value to be accessible across the program.
|
|
53
|
+
* @param {ContextKey} key - The key of the context to provide.
|
|
54
|
+
* @param {Contexts[K]} value - The value to set for the specified context.
|
|
55
|
+
*/
|
|
56
|
+
export function provideContext(key, value) {
|
|
57
|
+
contextManager.setContext(key, value);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=contextManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextManager.js","sourceRoot":"","sources":["../../src/contextManager.ts"],"names":[],"mappings":"AA+BA;;;GAGG;AACH,MAAM,cAAc;IAIlB;QAFQ,aAAQ,GAAyB,IAAI,GAAG,EAAE,CAAC;IAE5B,CAAC;IAExB;;;OAGG;IACI,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;YAC7B,cAAc,CAAC,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;QACjD,CAAC;QACD,OAAO,cAAc,CAAC,QAAQ,CAAC;IACjC,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAuB,GAAM,EAAE,KAAkB;QAChE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAuB,GAAM;QAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAA4B,CAAC;IAC3D,CAAC;CACF;AAED,wDAAwD;AACxD,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAuB,GAAM;IACrD,MAAM,OAAO,GAAG,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,WAAW,GAAG,YAAY,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,GAAM,EACN,KAAkB;IAElB,cAAc,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,WAAW,EAAW,MAAM,oBAAoB,CAAC;AAkC1D,OAAO,EAAuB,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxE,cAAc,UAAU,CAAC;AAEzB,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,iBAwQjD;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GACxC,UAAU,CAkBZ"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import
|
|
4
|
-
import { existsSync } from "fs";
|
|
5
|
-
import { buildClientDefinitions, buildResponseTypes, buildParameterTypes, buildIsUnexpectedHelper, buildClient, buildIndexFile, buildTopLevelIndex, buildRollupConfig, buildTsConfig, buildApiExtractorConfig, buildPackageFile, buildPollingHelper, buildPaginateHelper as buildRLCPaginateHelper, buildEsLintConfig, buildKarmaConfigFile, buildEnvFile, buildEnvBrowserFile, buildRecordedClientFile, buildSampleTest, buildReadmeFile, buildSerializeHelper, buildLogger, hasUnexpectedHelper, buildSamples, buildVitestConfig, buildTsTestBrowserConfig } from "@azure-tools/rlc-common";
|
|
6
|
-
import { transformRLCModel } from "./transform/transform.js";
|
|
7
|
-
import { emitContentByBuilder, emitModels } from "./utils/emitUtil.js";
|
|
3
|
+
import { buildApiExtractorConfig, buildClient, buildClientDefinitions, buildEsLintConfig, buildIndexFile, buildIsUnexpectedHelper, buildKarmaConfigFile, buildLogger, buildPackageFile, buildPaginateHelper as buildRLCPaginateHelper, buildParameterTypes, buildPollingHelper, buildReadmeFile, buildRecordedClientFile, buildResponseTypes, buildRollupConfig, buildSamples, buildSampleTest, buildSerializeHelper, buildTopLevelIndex, buildTsConfig, buildTsTestBrowserConfig, buildVitestConfig, getClientName, hasUnexpectedHelper } from "@azure-tools/rlc-common";
|
|
8
4
|
import { createSdkContext } from "@azure-tools/typespec-client-generator-core";
|
|
5
|
+
import { existsSync } from "fs";
|
|
6
|
+
import * as fsextra from "fs-extra";
|
|
7
|
+
import { join } from "path";
|
|
8
|
+
import { env } from "process";
|
|
9
9
|
import { Project } from "ts-morph";
|
|
10
|
+
import { buildClassicalClient } from "./modular/buildClassicalClient.js";
|
|
11
|
+
import { buildClassicOperationFiles } from "./modular/buildClassicalOperationGroups.js";
|
|
10
12
|
import { buildClientContext } from "./modular/buildClientContext.js";
|
|
11
13
|
import { emitCodeModel } from "./modular/buildCodeModel.js";
|
|
12
|
-
import {
|
|
13
|
-
import { buildModels, buildModelsOptions } from "./modular/emitModels.js";
|
|
14
|
+
import { buildGetPollerHelper, buildRestorePollerHelper } from "./modular/buildLroFiles.js";
|
|
14
15
|
import { buildOperationFiles } from "./modular/buildOperations.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { getRLCClients } from "./utils/clientUtils.js";
|
|
16
|
+
import { buildPagingHelpers as buildModularPagingHelpers, buildPagingTypes } from "./modular/buildPagingFiles.js";
|
|
17
|
+
import { getModuleExports } from "./modular/buildProjectFiles.js";
|
|
18
|
+
import { buildRootIndex, buildSubClientIndexFile } from "./modular/buildRootIndex.js";
|
|
19
19
|
import { buildSerializeUtils } from "./modular/buildSerializeUtils.js";
|
|
20
|
-
import {
|
|
20
|
+
import { buildSubpathIndexFile } from "./modular/buildSubpathIndex.js";
|
|
21
|
+
import { buildModels, buildModelsOptions } from "./modular/emitModels.js";
|
|
22
|
+
import { buildSerializers } from "./modular/serialization/index.js";
|
|
23
|
+
import { transformRLCModel } from "./transform/transform.js";
|
|
21
24
|
import { transformRLCOptions } from "./transform/transfromRLCOptions.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
25
|
+
import { getRLCClients } from "./utils/clientUtils.js";
|
|
26
|
+
import { emitContentByBuilder, emitModels } from "./utils/emitUtil.js";
|
|
27
|
+
import { provideContext, useContext } from "./contextManager.js";
|
|
28
|
+
import { emitSerializerHelpersFile } from "./modular/buildHelperSerializers.js";
|
|
26
29
|
export * from "./lib.js";
|
|
27
30
|
export async function $onEmit(context) {
|
|
28
31
|
/** Shared status */
|
|
@@ -31,6 +34,14 @@ export async function $onEmit(context) {
|
|
|
31
34
|
const dpgContext = createContextWithDefaultOptions(context);
|
|
32
35
|
const needUnexpectedHelper = new Map();
|
|
33
36
|
const serviceNameToRlcModelsMap = new Map();
|
|
37
|
+
provideContext("rlcMetaTree", new Map());
|
|
38
|
+
provideContext("symbolMap", new Map());
|
|
39
|
+
provideContext("modularMetaTree", new Map());
|
|
40
|
+
provideContext("outputProject", new Project());
|
|
41
|
+
provideContext("emitContext", {
|
|
42
|
+
compilerContext: context,
|
|
43
|
+
tcgcContext: dpgContext
|
|
44
|
+
});
|
|
34
45
|
const rlcCodeModels = [];
|
|
35
46
|
let modularCodeModel;
|
|
36
47
|
// 1. Enrich the dpg context with path detail and common options
|
|
@@ -106,7 +117,8 @@ export async function $onEmit(context) {
|
|
|
106
117
|
if (emitterOptions.isModularLibrary) {
|
|
107
118
|
// TODO: Emit modular parts of the library
|
|
108
119
|
const modularSourcesRoot = (_b = (_a = dpgContext.generationPathDetail) === null || _a === void 0 ? void 0 : _a.modularSourcesDir) !== null && _b !== void 0 ? _b : "src";
|
|
109
|
-
const project =
|
|
120
|
+
const project = useContext("outputProject");
|
|
121
|
+
emitSerializerHelpersFile(project, modularSourcesRoot);
|
|
110
122
|
modularCodeModel = emitCodeModel(dpgContext, serviceNameToRlcModelsMap, modularSourcesRoot, project, {
|
|
111
123
|
casing: "camel"
|
|
112
124
|
});
|
|
@@ -118,12 +130,16 @@ export async function $onEmit(context) {
|
|
|
118
130
|
buildModels(subClient, modularCodeModel);
|
|
119
131
|
buildModelsOptions(subClient, modularCodeModel);
|
|
120
132
|
const hasClientUnexpectedHelper = (_c = needUnexpectedHelper.get(subClient.rlcClientName)) !== null && _c !== void 0 ? _c : false;
|
|
121
|
-
|
|
133
|
+
if (!env["EXPERIMENTAL_TYPESPEC_TS_SERIALIZATION"])
|
|
134
|
+
buildSerializeUtils(modularCodeModel);
|
|
122
135
|
// build paging files
|
|
123
136
|
buildPagingTypes(subClient, modularCodeModel);
|
|
124
137
|
buildModularPagingHelpers(subClient, modularCodeModel, hasClientUnexpectedHelper, isMultiClients);
|
|
125
138
|
// build operation files
|
|
126
|
-
|
|
139
|
+
const serializerMap = env["EXPERIMENTAL_TYPESPEC_TS_SERIALIZATION"]
|
|
140
|
+
? buildSerializers(dpgContext, modularCodeModel, subClient)
|
|
141
|
+
: undefined;
|
|
142
|
+
buildOperationFiles(subClient, dpgContext, modularCodeModel, hasClientUnexpectedHelper, serializerMap);
|
|
127
143
|
buildClientContext(subClient, dpgContext, modularCodeModel);
|
|
128
144
|
buildSubpathIndexFile(subClient, modularCodeModel, "models");
|
|
129
145
|
// build lro files
|
|
@@ -138,7 +154,7 @@ export async function $onEmit(context) {
|
|
|
138
154
|
});
|
|
139
155
|
}
|
|
140
156
|
buildClassicalClient(subClient, dpgContext, modularCodeModel);
|
|
141
|
-
buildClassicOperationFiles(modularCodeModel, subClient);
|
|
157
|
+
buildClassicOperationFiles(dpgContext, modularCodeModel, subClient);
|
|
142
158
|
buildSubpathIndexFile(subClient, modularCodeModel, "classic", {
|
|
143
159
|
exportIndex: true,
|
|
144
160
|
interfaceOnly: true
|
|
@@ -189,7 +205,7 @@ export async function $onEmit(context) {
|
|
|
189
205
|
// build metadata relevant files
|
|
190
206
|
await emitContentByBuilder(program, commonBuilders, rlcClient, (_c = dpgContext.generationPathDetail) === null || _c === void 0 ? void 0 : _c.metadataDir);
|
|
191
207
|
if (option.isModularLibrary) {
|
|
192
|
-
const project =
|
|
208
|
+
const project = useContext("outputProject");
|
|
193
209
|
for (const file of project.getSourceFiles()) {
|
|
194
210
|
await emitContentByBuilder(program, () => ({ content: file.getFullText(), path: file.getFilePath() }), modularCodeModel);
|
|
195
211
|
}
|
|
@@ -197,13 +213,7 @@ export async function $onEmit(context) {
|
|
|
197
213
|
}
|
|
198
214
|
// Generate test relevant files
|
|
199
215
|
if (option.generateTest && isAzureFlavor) {
|
|
200
|
-
await emitContentByBuilder(program, [
|
|
201
|
-
buildKarmaConfigFile,
|
|
202
|
-
buildEnvFile,
|
|
203
|
-
buildEnvBrowserFile,
|
|
204
|
-
buildRecordedClientFile,
|
|
205
|
-
buildSampleTest
|
|
206
|
-
], rlcClient, (_d = dpgContext.generationPathDetail) === null || _d === void 0 ? void 0 : _d.metadataDir);
|
|
216
|
+
await emitContentByBuilder(program, [buildKarmaConfigFile, buildRecordedClientFile, buildSampleTest], rlcClient, (_d = dpgContext.generationPathDetail) === null || _d === void 0 ? void 0 : _d.metadataDir);
|
|
207
217
|
}
|
|
208
218
|
}
|
|
209
219
|
}
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,uBAAuB,EACvB,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,mBAAmB,IAAI,sBAAsB,EAC7C,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EAGpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,KAAK,OAAO,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,kBAAkB,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ACnB,2BAA2B,EAAE,IAAI;QACjC,8BAA8B,EAAE,IAAI;QACpC,uBAAuB,EAAE,KAAK;QAC9B,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,0BAA0B;gBAChC,QAAQ,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE;aAC/C;SACF;KACF,CAAC;IACF,OAAO,CAAC,OAAO,GAAG;QAChB,GAAG,OAAO,CAAC,OAAO;QAClB,GAAG,YAAY;KAChB,CAAC;IAEF,OAAO,gBAAgB,CAAC,OAAO,CAAe,CAAC;AACjD,CAAC"}
|
package/dist/src/lib.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { JSONSchemaType } from "@typespec/compiler";
|
|
2
1
|
import { RLCOptions } from "@azure-tools/rlc-common";
|
|
2
|
+
import { JSONSchemaType } from "@typespec/compiler";
|
|
3
3
|
import { Options } from "prettier";
|
|
4
4
|
export interface EmitterOptions extends RLCOptions {
|
|
5
5
|
branded?: boolean;
|
|
6
6
|
compatibilityMode?: boolean;
|
|
7
|
+
experimentalExtensibleEnums?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const RLCOptionsSchema: JSONSchemaType<EmitterOptions>;
|
|
9
10
|
export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
|
package/dist/src/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAEL,cAAc,EAEf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,cAAc,CAgF3D,CAAC;AA+IF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAAgC,CAAC;AAClD,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAS,CAAC;AAEzC,eAAO,MAAM,yBAAyB,EAAE,OASvC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAKjC,CAAC"}
|
package/dist/src/lib.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import {
|
|
3
|
+
import { createTypeSpecLibrary, paramMessage } from "@typespec/compiler";
|
|
4
4
|
export const RLCOptionsSchema = {
|
|
5
5
|
type: "object",
|
|
6
6
|
additionalProperties: true,
|
|
@@ -77,7 +77,8 @@ export const RLCOptionsSchema = {
|
|
|
77
77
|
enum: ["esm", "cjs"],
|
|
78
78
|
default: "esm"
|
|
79
79
|
},
|
|
80
|
-
compatibilityMode: { type: "boolean", nullable: true }
|
|
80
|
+
compatibilityMode: { type: "boolean", nullable: true },
|
|
81
|
+
experimentalExtensibleEnums: { type: "boolean", nullable: true }
|
|
81
82
|
},
|
|
82
83
|
required: []
|
|
83
84
|
};
|
package/dist/src/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC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,CAAC;AAEX,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAClD,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;AAEzC,MAAM,CAAC,MAAM,yBAAyB,GAAY;IAChD,MAAM,EAAE,YAAY;IACpB,WAAW,EAAE,QAAQ;IACrB,cAAc,EAAE,IAAI;IACpB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,KAAK;IAClB,QAAQ,EAAE,CAAC;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAY;IAC1C,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,KAAK;IACX,WAAW,EAAE,KAAK;CACnB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Schema as RlcType } from "@azure-tools/rlc-common";
|
|
2
|
+
import { Type as ModularType } from "./modular/modularCodeModel.js";
|
|
3
|
+
import { Type } from "@typespec/compiler";
|
|
4
|
+
export interface RlcTypeMetadata {
|
|
5
|
+
rlcType: RlcType;
|
|
6
|
+
}
|
|
7
|
+
export interface ModularTypeMetadata {
|
|
8
|
+
modularType: ModularType;
|
|
9
|
+
}
|
|
10
|
+
export type RlcMetaTree = Map<Type, RlcTypeMetadata>;
|
|
11
|
+
export type ModularMetaTree = Map<Type, ModularTypeMetadata>;
|
|
12
|
+
//# sourceMappingURL=metaTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metaTree.d.ts","sourceRoot":"","sources":["../../src/metaTree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;AACrD,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metaTree.js","sourceRoot":"","sources":["../../src/metaTree.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SourceFile } from "ts-morph";
|
|
2
|
-
import { Client, ModularCodeModel } from "./modularCodeModel.js";
|
|
3
2
|
import { SdkContext } from "../utils/interfaces.js";
|
|
3
|
+
import { Client, ModularCodeModel } from "./modularCodeModel.js";
|
|
4
4
|
export declare function buildClassicalClient(client: Client, dpgContext: SdkContext, codeModel: ModularCodeModel): SourceFile;
|
|
5
5
|
//# sourceMappingURL=buildClassicalClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildClassicalClient.d.ts","sourceRoot":"","sources":["../../../src/modular/buildClassicalClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildClassicalClient.d.ts","sourceRoot":"","sources":["../../../src/modular/buildClassicalClient.ts"],"names":[],"mappings":"AAMA,OAAO,EAIL,UAAU,EAEX,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAYpD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGjE,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,gBAAgB,cA0E5B"}
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
+
import { getImportSpecifier, NameType, normalizeName } from "@azure-tools/rlc-common";
|
|
1
2
|
import { Scope, StructureKind } from "ts-morph";
|
|
2
|
-
import { getClientParameters, importCredential } from "./helpers/clientHelpers.js";
|
|
3
|
-
import { getClassicalLayerPrefix, getClientName } from "./helpers/namingHelpers.js";
|
|
4
3
|
import { isRLCMultiEndpoint } from "../utils/clientUtils.js";
|
|
4
|
+
import { importLroCoreDependencies } from "./buildLroFiles.js";
|
|
5
|
+
import { getClientParameters, importCredential } from "./helpers/clientHelpers.js";
|
|
5
6
|
import { getDocsFromDescription } from "./helpers/docsHelpers.js";
|
|
6
|
-
import {
|
|
7
|
+
import { getClassicalLayerPrefix, getClientName } from "./helpers/namingHelpers.js";
|
|
7
8
|
import { getOperationFunction } from "./helpers/operationHelpers.js";
|
|
8
|
-
import {
|
|
9
|
-
import { importLroCoreDependencies } from "./buildLroFiles.js";
|
|
9
|
+
import { shouldPromoteSubscriptionId } from "./helpers/classicalOperationHelpers.js";
|
|
10
10
|
export function buildClassicalClient(client, dpgContext, codeModel) {
|
|
11
11
|
var _a;
|
|
12
12
|
const { description } = client;
|
|
13
13
|
const modularClientName = getClientName(client);
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const classicalClientName = `${getClientName(client)}Client`;
|
|
15
|
+
const classicalParams = getClientParameters(client, dpgContext, true);
|
|
16
|
+
const contextParams = getClientParameters(client, dpgContext, false);
|
|
16
17
|
const srcPath = codeModel.modularOptions.sourceRoot;
|
|
17
18
|
const subfolder = (_a = client.subfolder) !== null && _a !== void 0 ? _a : "";
|
|
18
|
-
const clientFile = codeModel.project.createSourceFile(`${srcPath}/${subfolder !== "" ? subfolder + "/" : ""}${normalizeName(
|
|
19
|
+
const clientFile = codeModel.project.createSourceFile(`${srcPath}/${subfolder !== "" ? subfolder + "/" : ""}${normalizeName(classicalClientName, NameType.File)}.ts`);
|
|
19
20
|
clientFile.addExportDeclaration({
|
|
20
|
-
namedExports: [`${
|
|
21
|
+
namedExports: [`${classicalClientName}Options`],
|
|
21
22
|
moduleSpecifier: `./api/${normalizeName(modularClientName, NameType.File)}Context.js`
|
|
22
23
|
});
|
|
23
24
|
const clientClass = clientFile.addClass({
|
|
24
25
|
isExported: true,
|
|
25
|
-
name: `${
|
|
26
|
+
name: `${classicalClientName}`
|
|
26
27
|
});
|
|
27
28
|
// Add the private client member. This will be the client context from /api
|
|
28
29
|
if (isRLCMultiEndpoint(dpgContext)) {
|
|
@@ -50,10 +51,10 @@ export function buildClassicalClient(client, dpgContext, codeModel) {
|
|
|
50
51
|
// TODO: We may need to generate constructor overloads at some point. Here we'd do that.
|
|
51
52
|
const constructor = clientClass.addConstructor({
|
|
52
53
|
docs: getDocsFromDescription(description),
|
|
53
|
-
parameters:
|
|
54
|
+
parameters: classicalParams
|
|
54
55
|
});
|
|
55
56
|
constructor.addStatements([
|
|
56
|
-
`this._client = create${modularClientName}(${(
|
|
57
|
+
`this._client = create${modularClientName}(${(contextParams !== null && contextParams !== void 0 ? contextParams : [])
|
|
57
58
|
.map((p) => p.name)
|
|
58
59
|
.join(",")})`
|
|
59
60
|
]);
|
|
@@ -62,7 +63,7 @@ export function buildClassicalClient(client, dpgContext, codeModel) {
|
|
|
62
63
|
importCredential(codeModel.runtimeImports, clientFile);
|
|
63
64
|
importPipeline(codeModel.runtimeImports, clientFile);
|
|
64
65
|
importAllModels(clientFile, srcPath, subfolder);
|
|
65
|
-
buildClientOperationGroups(clientFile, client, clientClass);
|
|
66
|
+
buildClientOperationGroups(clientFile, client, dpgContext, clientClass);
|
|
66
67
|
importAllApis(clientFile, srcPath, subfolder);
|
|
67
68
|
clientFile.fixMissingImports();
|
|
68
69
|
clientFile.fixUnusedIdentifiers();
|
|
@@ -86,7 +87,9 @@ function importAllModels(clientFile, srcPath, subfolder) {
|
|
|
86
87
|
if (!apiModels) {
|
|
87
88
|
return;
|
|
88
89
|
}
|
|
89
|
-
const exported = [...apiModels.getExportedDeclarations().keys()]
|
|
90
|
+
const exported = [...apiModels.getExportedDeclarations().keys()].filter((e) => {
|
|
91
|
+
return !e.startsWith("_");
|
|
92
|
+
});
|
|
90
93
|
if (exported.length > 0) {
|
|
91
94
|
clientFile.addImportDeclaration({
|
|
92
95
|
moduleSpecifier: `./models/models.js`,
|
|
@@ -120,7 +123,7 @@ function importPipeline(runtimeImports, clientSourceFile) {
|
|
|
120
123
|
namedImports: ["Pipeline"]
|
|
121
124
|
});
|
|
122
125
|
}
|
|
123
|
-
function buildClientOperationGroups(clientFile, client, clientClass) {
|
|
126
|
+
function buildClientOperationGroups(clientFile, client, dpgContext, clientClass) {
|
|
124
127
|
var _a, _b, _c;
|
|
125
128
|
let clientType = "Client";
|
|
126
129
|
const subfolder = (_a = client.subfolder) !== null && _a !== void 0 ? _a : "";
|
|
@@ -129,6 +132,9 @@ function buildClientOperationGroups(clientFile, client, clientClass) {
|
|
|
129
132
|
}
|
|
130
133
|
for (const operationGroup of client.operationGroups) {
|
|
131
134
|
const groupName = normalizeName((_b = operationGroup.namespaceHierarchies[0]) !== null && _b !== void 0 ? _b : operationGroup.propertyName, NameType.Property);
|
|
135
|
+
// TODO: remove this logic once client-level parameter design is finalized
|
|
136
|
+
// https://github.com/Azure/autorest.typescript/issues/2618
|
|
137
|
+
const hasSubscriptionIdPromoted = shouldPromoteSubscriptionId(dpgContext, operationGroup);
|
|
132
138
|
if (groupName === "") {
|
|
133
139
|
operationGroup.operations.forEach((op) => {
|
|
134
140
|
var _a, _b, _c, _d;
|
|
@@ -168,7 +174,7 @@ function buildClientOperationGroups(clientFile, client, clientClass) {
|
|
|
168
174
|
docs: ["The operation groups for " + operationGroup.propertyName]
|
|
169
175
|
});
|
|
170
176
|
(_c = clientClass
|
|
171
|
-
.getConstructors()[0]) === null || _c === void 0 ? void 0 : _c.addStatements(`this.${groupName} = get${getClassicalLayerPrefix(operationGroup, NameType.Interface, "", 0)}Operations(this._client)`);
|
|
177
|
+
.getConstructors()[0]) === null || _c === void 0 ? void 0 : _c.addStatements(`this.${groupName} = get${getClassicalLayerPrefix(operationGroup, NameType.Interface, "", 0)}Operations(this._client${hasSubscriptionIdPromoted ? ", subscriptionId" : ""})`);
|
|
172
178
|
}
|
|
173
179
|
}
|
|
174
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildClassicalClient.js","sourceRoot":"","sources":["../../../src/modular/buildClassicalClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,EAEL,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"buildClassicalClient.js","sourceRoot":"","sources":["../../../src/modular/buildClassicalClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAElB,QAAQ,EACR,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,KAAK,EAEL,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,uBAAuB,EACvB,aAAa,EACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAErF,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,UAAsB,EACtB,SAA2B;;IAE3B,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IAC/B,MAAM,iBAAiB,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,mBAAmB,GAAG,GAAG,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC7D,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,EAAE,UAAU,EAAE,IAA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eModel } from "./modularCodeModel.js";
|
|
2
1
|
import { SourceFile } from "ts-morph";
|
|
3
|
-
|
|
2
|
+
import { Client, ModularCodeModel } from "./modularCodeModel.js";
|
|
3
|
+
import { SdkContext } from "../utils/interfaces.js";
|
|
4
|
+
export declare function buildClassicOperationFiles(dpgContext: SdkContext, codeModel: ModularCodeModel, client: Client): Map<string, SourceFile>;
|
|
4
5
|
//# sourceMappingURL=buildClassicalOperationGroups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildClassicalOperationGroups.d.ts","sourceRoot":"","sources":["../../../src/modular/buildClassicalOperationGroups.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildClassicalOperationGroups.d.ts","sourceRoot":"","sources":["../../../src/modular/buildClassicalOperationGroups.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC,OAAO,EACL,MAAM,EACN,gBAAgB,EAEjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,MAAM,2BAgHf"}
|