@o3r/apis-manager 12.1.8 → 12.1.11
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.
|
@@ -139,10 +139,10 @@ class ApiFactoryService {
|
|
|
139
139
|
getConfigFor(api) {
|
|
140
140
|
return this.apiManager.getConfiguration(api);
|
|
141
141
|
}
|
|
142
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
143
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
142
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ApiFactoryService, deps: [{ token: API_TOKEN }, { token: INITIAL_APIS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
143
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ApiFactoryService }); }
|
|
144
144
|
}
|
|
145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ApiFactoryService, decorators: [{
|
|
146
146
|
type: Injectable
|
|
147
147
|
}], ctorParameters: () => [{ type: ApiManager, decorators: [{
|
|
148
148
|
type: Inject,
|
|
@@ -184,13 +184,13 @@ class ApiManagerModule {
|
|
|
184
184
|
]
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
188
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
189
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
187
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ApiManagerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
188
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: ApiManagerModule }); }
|
|
189
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ApiManagerModule, providers: [
|
|
190
190
|
ApiFactoryService
|
|
191
191
|
] }); }
|
|
192
192
|
}
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ApiManagerModule, decorators: [{
|
|
194
194
|
type: NgModule,
|
|
195
195
|
args: [{
|
|
196
196
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"o3r-apis-manager.mjs","sources":["../../src/apis-manager/api-manager.ts","../../src/apis-manager/api-manager.token.ts","../../src/apis-manager/api-factory.service.ts","../../src/apis-manager/api-manager.helpers.ts","../../src/apis-manager/api-manager.module.ts","../../src/o3r-apis-manager.ts"],"sourcesContent":["import type {\n ApiClient,\n ApiName,\n} from '@ama-sdk/core';\n\n/**\n * Api manager is responsible to provide an api configuration to a service factory, so that it could instantiate an API\n * with the right parameters. It contains a default configuration and a map of specific configurations for API / set of\n * API. Configurations are only exposed through the method getConfiguration, which will merge the default configuration\n * and the requested one.\n */\nexport class ApiManager {\n private defaultConfiguration: ApiClient;\n private apiConfigurations: { [key: string]: ApiClient };\n\n /**\n * Map of registered Api Client associated to specific API\n * Warning: This should not be used to get the ApiClient for an API, the function getConfiguration() should be used instead\n */\n public get registeredApiConfigurations() {\n return { ...this.apiConfigurations } as const;\n }\n\n /**\n * Create an API manager using a custom ApiClient\n * @param defaultConfiguration\n */\n constructor(defaultConfiguration: ApiClient, apiConfigurations: { [key: string]: ApiClient } = {}) {\n this.defaultConfiguration = defaultConfiguration;\n this.apiConfigurations = apiConfigurations;\n }\n\n /**\n * Retrieve a configuration for a specific API\n * @param api API to get the configuration for\n * @note When passing a string the configuration is expecting to exist else an error is thrown\n * @note when passing an Api instance that does not match a registered configuration, the default one will be returned\n */\n public getConfiguration(api?: string | ApiName): ApiClient {\n if (typeof api === 'string') {\n if (this.apiConfigurations[api]) {\n return this.apiConfigurations[api];\n } else {\n throw new Error(`Unknown API configuration: ${api}\\nKnown API configurations: ${Object.keys(this.apiConfigurations).join(', ')}`);\n }\n }\n return (api && this.apiConfigurations[api.apiName]) || this.defaultConfiguration;\n }\n\n /**\n * Set or override API configuration\n * @param apiClient API configuration to override to the given api\n * @param api API name to override, the default configuration will be used if not specified\n */\n public setConfiguration(apiClient: ApiClient, api?: string | ApiName): void {\n if (api) {\n this.apiConfigurations[typeof api === 'string' ? api : api.apiName] = apiClient;\n } else {\n this.defaultConfiguration = apiClient;\n }\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport {\n ApiManager,\n} from './api-manager';\n\n/**\n * Token used by the core library to provide an Api manager to services. It can be provided in the app.\n */\nexport const API_TOKEN = new InjectionToken<ApiManager>('Custom API manager token');\n","import type {\n Api,\n ApiClient,\n ApiName,\n} from '@ama-sdk/core';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n} from '@angular/core';\nimport {\n ApiManager,\n} from './api-manager';\nimport {\n API_TOKEN,\n} from './api-manager.token';\n\n/** Type of the Class of an SDK Api */\nexport type ApiClassType<T extends Api = Api> = (new (client: ApiClient) => T) & ApiName;\n\n/**\n * Initial APIs instantiations\n */\nexport const INITIAL_APIS_TOKEN = new InjectionToken<(Api | ApiClassType)[]>('Initial APIs token');\n\n@Injectable()\nexport class ApiFactoryService {\n /** Map of loaded APIs */\n private loadedApis: Record<string, Api> = {};\n\n constructor(@Inject(API_TOKEN) private readonly apiManager: ApiManager, @Optional() @Inject(INITIAL_APIS_TOKEN) apis?: (Api | ApiClassType)[]) {\n if (apis) {\n this.updateApiMapping(apis);\n }\n }\n\n /**\n * Determine if the given parameter is a API class\n * @param apiClass object to check\n */\n private isApiClass<T extends Api = Api>(apiClass: any): apiClass is ApiClassType<T> {\n return !!apiClass.apiName && typeof apiClass === 'function';\n }\n\n /**\n * Retrieve a specific API with loaded configuration\n * @param apiClass class of the API to retrieve\n * @param refreshCache Ignore cached API instance and refresh it\n * @param customApiName override the `apiName` set in the `apiClass`\n * @note When passing `customApiName` the configuration is expecting to exist else an error is thrown\n * @note When passing an Api instance that does not match a registered configuration without `customApiName`, the default one will be returned\n */\n public getApi<T extends Api>(apiClass: (new (client: ApiClient) => T) & ApiName, refreshCache = false, customApiName?: string): T {\n const apiName = customApiName ?? apiClass.apiName;\n const cache = this.loadedApis[apiName];\n if (!refreshCache && cache) {\n return cache as T;\n }\n\n const instance = new apiClass(this.getConfigFor(customApiName ?? apiClass));\n this.loadedApis[apiName] = instance;\n return instance;\n }\n\n /**\n * Update the Map of loaded APIs.\n * Note: Can be used to override the a specific API\n * @param map Map of loaded APIs to update\n */\n public updateApiMapping(map: (Api | ApiClassType)[] | Record<string, (Api | ApiClassType)>) {\n const newItems: Record<string, (Api | ApiClassType)> = Array.isArray(map)\n ? map\n .reduce<Record<string, Api | ApiClassType<Api>>>((acc, curr) => {\n acc[curr.apiName] = curr;\n return acc;\n }, {})\n : map;\n\n this.loadedApis = {\n ...this.loadedApis,\n ...Object.entries(newItems)\n .reduce<Record<string, Api>>((acc, [apiName, api]) => {\n acc[apiName] = this.isApiClass(api) ? new api(this.getConfigFor(api)) : api;\n return acc;\n }, {})\n };\n }\n\n /**\n * Clear the cache of loaded APIs\n * @param apis Whitelist of APIs to clear from the cache, if specified only these apis will be removed from the cache\n */\n public clearCache(apis?: (ApiName | string)[]) {\n if (apis) {\n apis.forEach((api) => delete this.loadedApis[typeof api === 'string' ? api : api.apiName]);\n } else {\n this.loadedApis = {};\n }\n }\n\n /**\n * Retrieve the configuration for a specific API\n * @param api API for which retrieving the configuration\n */\n public getConfigFor(api: string | ApiName): ApiClient {\n return this.apiManager.getConfiguration(api);\n }\n}\n","/**\n * Add a preconnect `<link>` element to the DOM\n * @param baseUrl the origin href\n * @param supportCrossOrigin add crossorigin attribute to the link element\n */\nexport function appendPreconnect(baseUrl: string, supportCrossOrigin = true): void {\n const preConnectLink = document.createElement('link');\n preConnectLink.setAttribute('rel', 'preconnect');\n preConnectLink.setAttribute('href', baseUrl);\n if (supportCrossOrigin) {\n preConnectLink.setAttribute('crossorigin', '');\n }\n document.head.append(preConnectLink);\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n ApiFactoryService,\n} from './api-factory.service';\nimport {\n ApiManager,\n} from './api-manager';\nimport {\n API_TOKEN,\n} from './api-manager.token';\n\n// Module that needs to be imported by the application to instantiate an SDK configuration.\n@NgModule({\n providers: [\n ApiFactoryService\n ]\n})\nexport class ApiManagerModule {\n /**\n * Provide a custom apiManager\n * A factory can be provided via injection to the token API_TOKEN\n * @param apiManager\n */\n public static forRoot(apiManager: ApiManager): ModuleWithProviders<ApiManagerModule> {\n return {\n ngModule: ApiManagerModule,\n providers: [\n { provide: API_TOKEN, useValue: apiManager }\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAKA;;;;;AAKG;MACU,UAAU,CAAA;AAIrB;;;AAGG;AACH,IAAA,IAAW,2BAA2B,GAAA;AACpC,QAAA,OAAO,EAAE,GAAG,IAAI,CAAC,iBAAiB,EAAW;;AAG/C;;;AAGG;IACH,WAAY,CAAA,oBAA+B,EAAE,iBAAA,GAAkD,EAAE,EAAA;AAC/F,QAAA,IAAI,CAAC,oBAAoB,GAAG,oBAAoB;AAChD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;AAIG;IACI,OAAO,OAAO,CAAC,UAAsB,EAAA;QAC1C,OAAO;AACL,YAAA,QAAQ,EAAE,gBAAgB;AAC1B,YAAA,SAAS,EAAE;AACT,gBAAA,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU;AAC3C;SACF;;iIAZQ,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAhB,gBAAgB,EAAA,CAAA,CAAA;AAAhB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAJhB,SAAA,EAAA;YACT;AACD,SAAA,EAAA,CAAA,CAAA;;2FAEU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;wBACT;AACD;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"o3r-apis-manager.mjs","sources":["../../src/apis-manager/api-manager.ts","../../src/apis-manager/api-manager.token.ts","../../src/apis-manager/api-factory.service.ts","../../src/apis-manager/api-manager.helpers.ts","../../src/apis-manager/api-manager.module.ts","../../src/o3r-apis-manager.ts"],"sourcesContent":["import type {\n ApiClient,\n ApiName,\n} from '@ama-sdk/core';\n\n/**\n * Api manager is responsible to provide an api configuration to a service factory, so that it could instantiate an API\n * with the right parameters. It contains a default configuration and a map of specific configurations for API / set of\n * API. Configurations are only exposed through the method getConfiguration, which will merge the default configuration\n * and the requested one.\n */\nexport class ApiManager {\n private defaultConfiguration: ApiClient;\n private apiConfigurations: { [key: string]: ApiClient };\n\n /**\n * Map of registered Api Client associated to specific API\n * Warning: This should not be used to get the ApiClient for an API, the function getConfiguration() should be used instead\n */\n public get registeredApiConfigurations() {\n return { ...this.apiConfigurations } as const;\n }\n\n /**\n * Create an API manager using a custom ApiClient\n * @param defaultConfiguration\n */\n constructor(defaultConfiguration: ApiClient, apiConfigurations: { [key: string]: ApiClient } = {}) {\n this.defaultConfiguration = defaultConfiguration;\n this.apiConfigurations = apiConfigurations;\n }\n\n /**\n * Retrieve a configuration for a specific API\n * @param api API to get the configuration for\n * @note When passing a string the configuration is expecting to exist else an error is thrown\n * @note when passing an Api instance that does not match a registered configuration, the default one will be returned\n */\n public getConfiguration(api?: string | ApiName): ApiClient {\n if (typeof api === 'string') {\n if (this.apiConfigurations[api]) {\n return this.apiConfigurations[api];\n } else {\n throw new Error(`Unknown API configuration: ${api}\\nKnown API configurations: ${Object.keys(this.apiConfigurations).join(', ')}`);\n }\n }\n return (api && this.apiConfigurations[api.apiName]) || this.defaultConfiguration;\n }\n\n /**\n * Set or override API configuration\n * @param apiClient API configuration to override to the given api\n * @param api API name to override, the default configuration will be used if not specified\n */\n public setConfiguration(apiClient: ApiClient, api?: string | ApiName): void {\n if (api) {\n this.apiConfigurations[typeof api === 'string' ? api : api.apiName] = apiClient;\n } else {\n this.defaultConfiguration = apiClient;\n }\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport {\n ApiManager,\n} from './api-manager';\n\n/**\n * Token used by the core library to provide an Api manager to services. It can be provided in the app.\n */\nexport const API_TOKEN = new InjectionToken<ApiManager>('Custom API manager token');\n","import type {\n Api,\n ApiClient,\n ApiName,\n} from '@ama-sdk/core';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n} from '@angular/core';\nimport {\n ApiManager,\n} from './api-manager';\nimport {\n API_TOKEN,\n} from './api-manager.token';\n\n/** Type of the Class of an SDK Api */\nexport type ApiClassType<T extends Api = Api> = (new (client: ApiClient) => T) & ApiName;\n\n/**\n * Initial APIs instantiations\n */\nexport const INITIAL_APIS_TOKEN = new InjectionToken<(Api | ApiClassType)[]>('Initial APIs token');\n\n@Injectable()\nexport class ApiFactoryService {\n /** Map of loaded APIs */\n private loadedApis: Record<string, Api> = {};\n\n constructor(@Inject(API_TOKEN) private readonly apiManager: ApiManager, @Optional() @Inject(INITIAL_APIS_TOKEN) apis?: (Api | ApiClassType)[]) {\n if (apis) {\n this.updateApiMapping(apis);\n }\n }\n\n /**\n * Determine if the given parameter is a API class\n * @param apiClass object to check\n */\n private isApiClass<T extends Api = Api>(apiClass: any): apiClass is ApiClassType<T> {\n return !!apiClass.apiName && typeof apiClass === 'function';\n }\n\n /**\n * Retrieve a specific API with loaded configuration\n * @param apiClass class of the API to retrieve\n * @param refreshCache Ignore cached API instance and refresh it\n * @param customApiName override the `apiName` set in the `apiClass`\n * @note When passing `customApiName` the configuration is expecting to exist else an error is thrown\n * @note When passing an Api instance that does not match a registered configuration without `customApiName`, the default one will be returned\n */\n public getApi<T extends Api>(apiClass: (new (client: ApiClient) => T) & ApiName, refreshCache = false, customApiName?: string): T {\n const apiName = customApiName ?? apiClass.apiName;\n const cache = this.loadedApis[apiName];\n if (!refreshCache && cache) {\n return cache as T;\n }\n\n const instance = new apiClass(this.getConfigFor(customApiName ?? apiClass));\n this.loadedApis[apiName] = instance;\n return instance;\n }\n\n /**\n * Update the Map of loaded APIs.\n * Note: Can be used to override the a specific API\n * @param map Map of loaded APIs to update\n */\n public updateApiMapping(map: (Api | ApiClassType)[] | Record<string, (Api | ApiClassType)>) {\n const newItems: Record<string, (Api | ApiClassType)> = Array.isArray(map)\n ? map\n .reduce<Record<string, Api | ApiClassType<Api>>>((acc, curr) => {\n acc[curr.apiName] = curr;\n return acc;\n }, {})\n : map;\n\n this.loadedApis = {\n ...this.loadedApis,\n ...Object.entries(newItems)\n .reduce<Record<string, Api>>((acc, [apiName, api]) => {\n acc[apiName] = this.isApiClass(api) ? new api(this.getConfigFor(api)) : api;\n return acc;\n }, {})\n };\n }\n\n /**\n * Clear the cache of loaded APIs\n * @param apis Whitelist of APIs to clear from the cache, if specified only these apis will be removed from the cache\n */\n public clearCache(apis?: (ApiName | string)[]) {\n if (apis) {\n apis.forEach((api) => delete this.loadedApis[typeof api === 'string' ? api : api.apiName]);\n } else {\n this.loadedApis = {};\n }\n }\n\n /**\n * Retrieve the configuration for a specific API\n * @param api API for which retrieving the configuration\n */\n public getConfigFor(api: string | ApiName): ApiClient {\n return this.apiManager.getConfiguration(api);\n }\n}\n","/**\n * Add a preconnect `<link>` element to the DOM\n * @param baseUrl the origin href\n * @param supportCrossOrigin add crossorigin attribute to the link element\n */\nexport function appendPreconnect(baseUrl: string, supportCrossOrigin = true): void {\n const preConnectLink = document.createElement('link');\n preConnectLink.setAttribute('rel', 'preconnect');\n preConnectLink.setAttribute('href', baseUrl);\n if (supportCrossOrigin) {\n preConnectLink.setAttribute('crossorigin', '');\n }\n document.head.append(preConnectLink);\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n ApiFactoryService,\n} from './api-factory.service';\nimport {\n ApiManager,\n} from './api-manager';\nimport {\n API_TOKEN,\n} from './api-manager.token';\n\n// Module that needs to be imported by the application to instantiate an SDK configuration.\n@NgModule({\n providers: [\n ApiFactoryService\n ]\n})\nexport class ApiManagerModule {\n /**\n * Provide a custom apiManager\n * A factory can be provided via injection to the token API_TOKEN\n * @param apiManager\n */\n public static forRoot(apiManager: ApiManager): ModuleWithProviders<ApiManagerModule> {\n return {\n ngModule: ApiManagerModule,\n providers: [\n { provide: API_TOKEN, useValue: apiManager }\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;AAKA;;;;;AAKG;MACU,UAAU,CAAA;AAIrB;;;AAGG;AACH,IAAA,IAAW,2BAA2B,GAAA;AACpC,QAAA,OAAO,EAAE,GAAG,IAAI,CAAC,iBAAiB,EAAW;;AAG/C;;;AAGG;IACH,WAAA,CAAY,oBAA+B,EAAE,iBAAA,GAAkD,EAAE,EAAA;AAC/F,QAAA,IAAI,CAAC,oBAAoB,GAAG,o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A;AAC3B;;;;AAIG;IACI,OAAO,OAAO,CAAC,UAAsB,EAAA;QAC1C,OAAO;AACL,YAAA,QAAQ,EAAE,gBAAgB;AAC1B,YAAA,SAAS,EAAE;AACT,gBAAA,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU;AAC3C;SACF;;kIAZQ,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mIAAhB,gBAAgB,EAAA,CAAA,CAAA;AAAhB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAAA,SAAA,EAJhB;YACT;AACD,SAAA,EAAA,CAAA,CAAA;;4FAEU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;wBACT;AACD;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/apis-manager",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -11,15 +11,16 @@
|
|
|
11
11
|
"otter-module"
|
|
12
12
|
],
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@ama-sdk/client-fetch": "^12.1.
|
|
15
|
-
"@ama-sdk/core": "^12.1.
|
|
14
|
+
"@ama-sdk/client-fetch": "^12.1.11",
|
|
15
|
+
"@ama-sdk/core": "^12.1.11",
|
|
16
16
|
"@angular-devkit/schematics": "^19.0.0",
|
|
17
17
|
"@angular/common": "^19.0.0",
|
|
18
18
|
"@angular/core": "^19.0.0",
|
|
19
|
-
"@o3r/schematics": "^12.1.
|
|
19
|
+
"@o3r/schematics": "^12.1.11",
|
|
20
20
|
"@schematics/angular": "^19.0.0",
|
|
21
21
|
"rxjs": "^7.8.1",
|
|
22
22
|
"ts-node": "~10.9.2",
|
|
23
|
+
"type-fest": "^4.30.1",
|
|
23
24
|
"typescript": "^5.5.4"
|
|
24
25
|
},
|
|
25
26
|
"peerDependenciesMeta": {
|
|
@@ -34,6 +35,9 @@
|
|
|
34
35
|
},
|
|
35
36
|
"@schematics/angular": {
|
|
36
37
|
"optional": true
|
|
38
|
+
},
|
|
39
|
+
"type-fest": {
|
|
40
|
+
"optional": true
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
"dependencies": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAuFlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,KAAG,IAKtD,CAAC"}
|
|
@@ -8,14 +8,25 @@ const reportMissingSchematicsDep = (logger) => (reason) => {
|
|
|
8
8
|
You need to install '@o3r/schematics' to be able to use the o3r apis-manager package. Please run 'ng add @o3r/schematics'.`);
|
|
9
9
|
throw reason;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* List of external dependencies to be added to the project as peer dependencies
|
|
13
|
+
*/
|
|
14
|
+
const dependenciesToInstall = [
|
|
15
|
+
'@angular/common',
|
|
16
|
+
'@angular/core',
|
|
17
|
+
'rxjs'
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* List of external dependencies to be added to the project as dev dependencies
|
|
21
|
+
*/
|
|
22
|
+
const devDependenciesToInstall = [];
|
|
11
23
|
/**
|
|
12
24
|
* Add Otter apis manager to an Angular Project
|
|
13
25
|
* @param options
|
|
14
26
|
*/
|
|
15
27
|
function ngAddFn(options) {
|
|
16
|
-
return async (tree) => {
|
|
17
|
-
const { getPackageInstallConfig } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
18
|
-
const { setupDependencies, getO3rPeerDeps, applyEsLintFix, getWorkspaceConfig, getProjectNewDependenciesTypes } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
28
|
+
return async (tree, context) => {
|
|
29
|
+
const { getExternalDependenciesInfo, getPackageInstallConfig, setupDependencies, getO3rPeerDeps, applyEsLintFix, getWorkspaceConfig, getProjectNewDependenciesTypes } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
19
30
|
const { updateApiDependencies } = await Promise.resolve().then(() => require('../helpers/update-api-deps'));
|
|
20
31
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
21
32
|
const depsInfo = getO3rPeerDeps(packageJsonPath);
|
|
@@ -28,6 +39,15 @@ function ngAddFn(options) {
|
|
|
28
39
|
if (!options.skipCodeSample) {
|
|
29
40
|
depsInfo.o3rPeerDeps.push('@ama-sdk/client-fetch');
|
|
30
41
|
}
|
|
42
|
+
const projectDirectory = workspaceProject?.root || '.';
|
|
43
|
+
const projectPackageJson = tree.readJson(path.posix.join(projectDirectory, 'package.json'));
|
|
44
|
+
const externalDependenciesInfo = getExternalDependenciesInfo({
|
|
45
|
+
dependenciesToInstall,
|
|
46
|
+
devDependenciesToInstall,
|
|
47
|
+
projectType: workspaceProject?.projectType,
|
|
48
|
+
o3rPackageJsonPath: packageJsonPath,
|
|
49
|
+
projectPackageJson
|
|
50
|
+
}, context.logger);
|
|
31
51
|
const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
|
|
32
52
|
acc[dep] = {
|
|
33
53
|
inManifest: [{
|
|
@@ -43,7 +63,7 @@ function ngAddFn(options) {
|
|
|
43
63
|
options.skipLinter ? schematics_1.noop : applyEsLintFix(),
|
|
44
64
|
setupDependencies({
|
|
45
65
|
projectName: options.projectName,
|
|
46
|
-
dependencies,
|
|
66
|
+
dependencies: { ...dependencies, ...externalDependenciesInfo },
|
|
47
67
|
ngAddToRun: depsInfo.o3rPeerDeps
|
|
48
68
|
})
|
|
49
69
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAClC,2DAIoC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAClC,2DAIoC;AAQpC,MAAM,0BAA0B,GAAG,CAAC,MAA2C,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE;IAClG,MAAM,CAAC,KAAK,CAAC;2HAC4G,CAAC,CAAC;IAC3H,MAAM,MAAM,CAAC;AACf,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,iBAAiB;IACjB,eAAe;IACf,MAAM;CACP,CAAC;AAEF;;GAEG;AACH,MAAM,wBAAwB,GAAa,EAAE,CAAC;AAE9C;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,MAAM,EACJ,2BAA2B,EAC3B,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,8BAA8B,EAC/B,GAAG,2CAAa,iBAAiB,EAAC,CAAC;QACpC,MAAM,EAAE,qBAAqB,EAAE,GAAG,2CAAa,4BAA4B,EAAC,CAAC;QAC7E,MAAM,eAAe,GAAG,IAAI,CAAC,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