@simplysm/sd-cli 14.0.89 → 14.0.90
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/commands/init/generators/client-common.d.ts.map +1 -1
- package/dist/commands/init/generators/client-common.js +6 -2
- package/dist/commands/init/generators/client-common.js.map +1 -1
- package/dist/commands/init/generators/client.d.ts.map +1 -1
- package/dist/commands/init/generators/client.js +13 -2
- package/dist/commands/init/generators/client.js.map +1 -1
- package/dist/commands/init/generators/common.d.ts.map +1 -1
- package/dist/commands/init/generators/common.js +16 -1
- package/dist/commands/init/generators/common.js.map +1 -1
- package/dist/commands/init/generators/server.d.ts.map +1 -1
- package/dist/commands/init/generators/server.js +9 -0
- package/dist/commands/init/generators/server.js.map +1 -1
- package/dist/commands/init/init.d.ts.map +1 -1
- package/dist/commands/init/init.js +11 -2
- package/dist/commands/init/init.js.map +1 -1
- package/dist/commands/init/normalize.d.ts.map +1 -1
- package/dist/commands/init/normalize.js +40 -4
- package/dist/commands/init/normalize.js.map +1 -1
- package/dist/commands/init/prompts.d.ts +1 -1
- package/dist/commands/init/prompts.d.ts.map +1 -1
- package/dist/commands/init/prompts.js +34 -3
- package/dist/commands/init/prompts.js.map +1 -1
- package/dist/commands/init/types.d.ts +16 -1
- package/dist/commands/init/types.d.ts.map +1 -1
- package/dist/commands/init/validate.d.ts.map +1 -1
- package/dist/commands/init/validate.js +3 -0
- package/dist/commands/init/validate.js.map +1 -1
- package/package.json +4 -4
- package/src/commands/init/generators/client-common.ts +18 -5
- package/src/commands/init/generators/client.ts +41 -2
- package/src/commands/init/generators/common.ts +56 -2
- package/src/commands/init/generators/server.ts +30 -0
- package/src/commands/init/init.ts +12 -2
- package/src/commands/init/normalize.ts +49 -4
- package/src/commands/init/prompts.ts +34 -3
- package/src/commands/init/templates/client/login-public/assets/logo-landscape.png +0 -0
- package/src/commands/init/templates/client/login-public/assets/logo.png +0 -0
- package/src/commands/init/templates/client/package.json.hbs +3 -2
- package/src/commands/init/templates/client/src/app/home/home.view.ts.hbs +137 -0
- package/src/commands/init/templates/client/src/app/home/main/main.view.ts.hbs +16 -0
- package/src/commands/init/templates/client/src/app/home/my-info/my-info.detail.ts.hbs +265 -0
- package/src/commands/init/templates/client/src/app/login/login.view.ts.hbs +144 -0
- package/src/commands/init/templates/client/src/app.root.ts.hbs +64 -0
- package/src/commands/init/templates/client/src/index.html.hbs +75 -1
- package/src/commands/init/templates/client/src/main.ts.hbs +147 -7
- package/src/commands/init/templates/client/src/modals/dev.modal.ts.hbs +63 -0
- package/src/commands/init/templates/client/src/routes.ts.hbs +29 -0
- package/src/commands/init/templates/client-common/package.json.hbs +1 -0
- package/src/commands/init/templates/client-common/src/index.ts.hbs +6 -2
- package/src/commands/init/templates/client-common/src/providers/app-auth.provider.ts.hbs +90 -0
- package/src/commands/init/templates/client-common/src/providers/{AppOrmProvider.ts.hbs → app-orm.provider.ts.hbs} +5 -11
- package/src/commands/init/templates/client-common/src/providers/app-service.provider.ts.hbs +68 -0
- package/src/commands/init/templates/client-common/src/providers/app-shared-data.provider.ts.hbs +100 -0
- package/src/commands/init/templates/common/package.json.hbs +2 -1
- package/src/commands/init/templates/common/src/app-structure.ts.hbs +26 -0
- package/src/commands/init/templates/common/src/auth-info-changed.event.ts.hbs +3 -0
- package/src/commands/init/templates/common/src/db/db-context.ts.hbs +20 -0
- package/src/commands/init/templates/common/src/db/system-data-log.ext.ts.hbs +138 -0
- package/src/commands/init/templates/common/src/db/tables/master/user-config.ts.hbs +15 -0
- package/src/commands/init/templates/common/src/db/tables/master/user.ts.hbs +20 -0
- package/src/commands/init/templates/common/src/db/tables/system/role-permission.ts.hbs +16 -0
- package/src/commands/init/templates/common/src/db/tables/system/role.ts.hbs +16 -0
- package/src/commands/init/templates/common/src/db/tables/system/system-data-log.ts.hbs +23 -0
- package/src/commands/init/templates/common/src/db/tables/system/system-log.ts.hbs +21 -0
- package/src/commands/init/templates/common/src/index.ts.hbs +14 -1
- package/src/commands/init/templates/server/package.json.hbs +7 -3
- package/src/commands/init/templates/server/public-dev//354/264/210/352/270/260/355/231/224.xlsx +0 -0
- package/src/commands/init/templates/server/src/index.ts.hbs +4 -0
- package/src/commands/init/templates/server/src/main.ts.hbs +11 -1
- package/src/commands/init/templates/server/src/services/auth.service.ts.hbs +284 -0
- package/src/commands/init/templates/server/src/services/dev.service.ts.hbs +112 -0
- package/src/commands/init/templates/server/src/utils/orm.utils.ts.hbs +8 -0
- package/src/commands/init/templates/workspace-root/sd.config.ts.hbs +2 -2
- package/src/commands/init/types.ts +16 -1
- package/src/commands/init/validate.ts +6 -0
- package/tests/init/__snapshots__/render.spec.ts.snap +36 -9
- package/tests/init/normalize.spec.ts +95 -1
- package/tests/init/render.spec.ts +951 -10
- package/src/commands/init/templates/client/src/AppPage.ts.hbs +0 -18
- package/src/commands/init/templates/client/src/routes.ts +0 -3
- package/src/commands/init/templates/client-common/src/providers/AppServiceProvider.ts +0 -27
- package/src/commands/init/templates/common/src/DbContext.ts.hbs +0 -4
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from "@angular/core";
|
|
2
|
-
{{#if client.hasRouter}}
|
|
3
|
-
import { RouterOutlet } from "@angular/router";
|
|
4
|
-
{{/if}}
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: "app-root",
|
|
8
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
-
encapsulation: ViewEncapsulation.None,
|
|
10
|
-
standalone: true,
|
|
11
|
-
{{#if client.hasRouter}}
|
|
12
|
-
imports: [RouterOutlet],
|
|
13
|
-
template: `<router-outlet />`,
|
|
14
|
-
{{else}}
|
|
15
|
-
template: `<div></div>`,
|
|
16
|
-
{{/if}}
|
|
17
|
-
})
|
|
18
|
-
export class AppPage {}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from "@angular/core";
|
|
2
|
-
import { SdServiceClientFactoryProvider } from "@simplysm/angular";
|
|
3
|
-
import { env, num, parseBoolEnv } from "@simplysm/core-common";
|
|
4
|
-
|
|
5
|
-
export const APP_MAIN_SERVICE_KEY = "MAIN";
|
|
6
|
-
|
|
7
|
-
@Injectable({ providedIn: "root" })
|
|
8
|
-
export class AppServiceProvider {
|
|
9
|
-
private readonly _sdServiceClientFactory = inject(SdServiceClientFactoryProvider);
|
|
10
|
-
|
|
11
|
-
get client() {
|
|
12
|
-
return this._sdServiceClientFactory.get(APP_MAIN_SERVICE_KEY);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
async connectAsync() {
|
|
16
|
-
await this._sdServiceClientFactory.connectAsync(
|
|
17
|
-
APP_MAIN_SERVICE_KEY,
|
|
18
|
-
Boolean(env("SERVER_HOST"))
|
|
19
|
-
? {
|
|
20
|
-
host: env("SERVER_HOST"),
|
|
21
|
-
port: num.parseInt(env("SERVER_PORT")),
|
|
22
|
-
ssl: parseBoolEnv(env("SERVER_SSL")),
|
|
23
|
-
}
|
|
24
|
-
: {},
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
}
|