@laiye_packages/uci 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/base/index.d.ts +4 -1
- package/dist/app/index.d.ts +2 -2
- package/dist/app/organization/app/index.d.ts +2 -4
- package/dist/index.js +25 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/app/base/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LYObject } from '../../object';
|
|
2
|
-
import { LYAppHttpClient, type IHeaderProvider } from '../../http';
|
|
2
|
+
import { LYAppHttpClient, LYOrganizationHttpClient, type IHeaderProvider } from '../../http';
|
|
3
3
|
import type { LYAppPermission } from '../../permission';
|
|
4
4
|
import { LYCrypto } from '../../crypto';
|
|
5
5
|
import { LYi18n, ILYi18n, LYKeyofLang } from '../../i18n';
|
|
@@ -77,3 +77,6 @@ export declare class LYBaseApp extends LYObject {
|
|
|
77
77
|
getComponent<T>(componentName: string): Promise<T>;
|
|
78
78
|
private loadRemoteComponents;
|
|
79
79
|
}
|
|
80
|
+
export declare class LYBaseOrganizationApp extends LYBaseApp {
|
|
81
|
+
protected _createHttpClient(): LYOrganizationHttpClient;
|
|
82
|
+
}
|
package/dist/app/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LYEnv } from '../env';
|
|
2
|
-
import { LYBaseApp, ORGANIZATION_APP_NAME, TENANT_APP_NAME } from './base';
|
|
2
|
+
import { LYBaseApp, LYBaseOrganizationApp, ORGANIZATION_APP_NAME, TENANT_APP_NAME } from './base';
|
|
3
3
|
import { LYOrganizationApp, SSOConfig } from './organization';
|
|
4
4
|
import { LYTenantApp } from './tenant';
|
|
5
5
|
import { LYTenantSession } from './tenant/session';
|
|
@@ -8,7 +8,7 @@ import { LYGatewayAuthorizer } from './organization/authorizer/gateway';
|
|
|
8
8
|
import { LYDirectAuthorizer } from './organization/authorizer/direct';
|
|
9
9
|
import { LYRedirectAuthorizer } from './organization/authorizer/redirect';
|
|
10
10
|
import { LYTenantAuthorizer } from './tenant/authorizer';
|
|
11
|
-
declare class LYApp extends
|
|
11
|
+
declare class LYApp extends LYBaseOrganizationApp {
|
|
12
12
|
}
|
|
13
13
|
export type { SSOConfig };
|
|
14
14
|
export { LYApp, LYBaseApp, LYTenantApp, LYOrganizationApp, LYTenantSession, TENANT_APP_NAME, ORGANIZATION_APP_NAME, LYEnv, LYWebAuthorizer, LYGatewayAuthorizer, LYDirectAuthorizer, LYRedirectAuthorizer, LYTenantAuthorizer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LYBaseOrganizationApp } from '../../base';
|
|
2
2
|
import { LYSessionApi } from '../api/session';
|
|
3
3
|
import type { SSOConfig } from '../api/session';
|
|
4
4
|
import { LYUserApi } from '../api/user';
|
|
@@ -6,8 +6,7 @@ import type { LYBaseAuthorizer } from '../authorizer/base';
|
|
|
6
6
|
import { LYLicenseApi } from '../api/license';
|
|
7
7
|
import { LYOEMApi } from '../api/oem';
|
|
8
8
|
import { LYVerificationCodesApi } from '../api/verificationCodes';
|
|
9
|
-
|
|
10
|
-
declare class LYOrganizationApp extends LYBaseApp {
|
|
9
|
+
declare class LYOrganizationApp extends LYBaseOrganizationApp {
|
|
11
10
|
static _instance?: LYOrganizationApp;
|
|
12
11
|
private _sessionApi;
|
|
13
12
|
private _userApi;
|
|
@@ -17,7 +16,6 @@ declare class LYOrganizationApp extends LYBaseApp {
|
|
|
17
16
|
private _verificationCodesApi;
|
|
18
17
|
constructor(name: string, version: string, description: string);
|
|
19
18
|
static get instance(): LYOrganizationApp;
|
|
20
|
-
_createHttpClient(): LYAppHttpClient;
|
|
21
19
|
get sessionApi(): LYSessionApi;
|
|
22
20
|
get userApi(): LYUserApi;
|
|
23
21
|
get oemApi(): LYOEMApi;
|
package/dist/index.js
CHANGED
|
@@ -3624,7 +3624,7 @@ var __webpack_modules__ = {
|
|
|
3624
3624
|
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
3625
3625
|
});
|
|
3626
3626
|
},
|
|
3627
|
-
"../../node_modules/.pnpm/@module-federation+enhanced@0.8.12_@rspack+core@1.
|
|
3627
|
+
"../../node_modules/.pnpm/@module-federation+enhanced@0.8.12_@rspack+core@1.7.4_react-dom@18.3.1_react@18.3.1_typescript@5.9.3_webpack@5.104.1/node_modules/@module-federation/enhanced/dist/src/runtime.js": function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3628
3628
|
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
3629
3629
|
if (void 0 === k2) k2 = k;
|
|
3630
3630
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -9703,7 +9703,7 @@ class LYAppHttpError extends LYBaseHttpError {
|
|
|
9703
9703
|
return this._code;
|
|
9704
9704
|
}
|
|
9705
9705
|
}
|
|
9706
|
-
var runtime = __webpack_require__("../../node_modules/.pnpm/@module-federation+enhanced@0.8.12_@rspack+core@1.
|
|
9706
|
+
var runtime = __webpack_require__("../../node_modules/.pnpm/@module-federation+enhanced@0.8.12_@rspack+core@1.7.4_react-dom@18.3.1_react@18.3.1_typescript@5.9.3_webpack@5.104.1/node_modules/@module-federation/enhanced/dist/src/runtime.js");
|
|
9707
9707
|
class LYAppPermission extends LYObject {
|
|
9708
9708
|
constructor(app_name, codes){
|
|
9709
9709
|
super(), this._codes = {};
|
|
@@ -10722,9 +10722,10 @@ class base_LYBaseApp extends LYObject {
|
|
|
10722
10722
|
return crypto_crypto;
|
|
10723
10723
|
}
|
|
10724
10724
|
_createHttpClient() {
|
|
10725
|
-
return new
|
|
10725
|
+
return new LYOrganizationHttpClient(this._name, {
|
|
10726
10726
|
get headers () {
|
|
10727
|
-
|
|
10727
|
+
const headers = base_LYBaseApp.getHeaderProvider()?.headers;
|
|
10728
|
+
return headers;
|
|
10728
10729
|
}
|
|
10729
10730
|
});
|
|
10730
10731
|
}
|
|
@@ -10838,6 +10839,24 @@ base_LYBaseApp = app_base_ts_decorate([
|
|
|
10838
10839
|
String
|
|
10839
10840
|
])
|
|
10840
10841
|
], base_LYBaseApp);
|
|
10842
|
+
class LYBaseOrganizationApp extends base_LYBaseApp {
|
|
10843
|
+
_createHttpClient() {
|
|
10844
|
+
const lang = this._i18n.lang;
|
|
10845
|
+
return new LYOrganizationHttpClient(this.name, {
|
|
10846
|
+
get headers () {
|
|
10847
|
+
const session = LYSession.get();
|
|
10848
|
+
if (!session) return;
|
|
10849
|
+
return {
|
|
10850
|
+
Authorization: `Bearer ${session.token}`,
|
|
10851
|
+
'Accept-Language': lang
|
|
10852
|
+
};
|
|
10853
|
+
}
|
|
10854
|
+
});
|
|
10855
|
+
}
|
|
10856
|
+
}
|
|
10857
|
+
LYBaseOrganizationApp = app_base_ts_decorate([
|
|
10858
|
+
register('LYBaseOrganizationApp')
|
|
10859
|
+
], LYBaseOrganizationApp);
|
|
10841
10860
|
class session_LYSessionApi {
|
|
10842
10861
|
constructor(httpClient){
|
|
10843
10862
|
this._httpClient = httpClient;
|
|
@@ -11292,7 +11311,7 @@ function app_ts_decorate(decorators, target, key, desc) {
|
|
|
11292
11311
|
function app_ts_metadata(k, v) {
|
|
11293
11312
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
11294
11313
|
}
|
|
11295
|
-
class LYOrganizationApp extends
|
|
11314
|
+
class LYOrganizationApp extends LYBaseOrganizationApp {
|
|
11296
11315
|
constructor(name1, version, description){
|
|
11297
11316
|
super(name1, version, description);
|
|
11298
11317
|
LYOrganizationApp._instance = this;
|
|
@@ -11312,19 +11331,6 @@ class LYOrganizationApp extends base_LYBaseApp {
|
|
|
11312
11331
|
if (!LYOrganizationApp._instance) throw new Error('LYOrganizationApp not initialized');
|
|
11313
11332
|
return LYOrganizationApp._instance;
|
|
11314
11333
|
}
|
|
11315
|
-
_createHttpClient() {
|
|
11316
|
-
const lang = this._i18n.lang;
|
|
11317
|
-
return new LYOrganizationHttpClient(this.name, {
|
|
11318
|
-
get headers () {
|
|
11319
|
-
const session = LYSession.get();
|
|
11320
|
-
if (!session) return;
|
|
11321
|
-
return {
|
|
11322
|
-
Authorization: `Bearer ${session.token}`,
|
|
11323
|
-
'Accept-Language': lang
|
|
11324
|
-
};
|
|
11325
|
-
}
|
|
11326
|
-
});
|
|
11327
|
-
}
|
|
11328
11334
|
get sessionApi() {
|
|
11329
11335
|
return this._sessionApi;
|
|
11330
11336
|
}
|
|
@@ -11772,7 +11778,7 @@ function src_app_ts_decorate(decorators, target, key, desc) {
|
|
|
11772
11778
|
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11773
11779
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11774
11780
|
}
|
|
11775
|
-
class LYApp extends
|
|
11781
|
+
class LYApp extends LYBaseOrganizationApp {
|
|
11776
11782
|
}
|
|
11777
11783
|
LYApp = src_app_ts_decorate([
|
|
11778
11784
|
register('LYApp')
|