@worktile/planet 12.1.1 → 14.0.0-next.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 +26 -0
- package/application/planet-application-loader.d.ts +73 -0
- package/application/planet-application-loader.d.ts.map +1 -0
- package/application/planet-application-ref.d.ts +36 -0
- package/application/planet-application-ref.d.ts.map +1 -0
- package/application/planet-application.service.d.ts +22 -0
- package/application/planet-application.service.d.ts.map +1 -0
- package/{packages/planet/src/application/portal-application.ts → application/portal-application.d.ts} +5 -18
- package/application/portal-application.d.ts.map +1 -0
- package/assets-loader.d.ts +36 -0
- package/assets-loader.d.ts.map +1 -0
- package/component/planet-component-loader.d.ts +31 -0
- package/component/planet-component-loader.d.ts.map +1 -0
- package/component/planet-component-ref.d.ts +8 -0
- package/component/planet-component-ref.d.ts.map +1 -0
- package/{packages/planet/src/component/plant-component.config.ts → component/plant-component.config.d.ts} +4 -4
- package/component/plant-component.config.d.ts.map +1 -0
- package/debug.d.ts +22 -0
- package/debug.d.ts.map +1 -0
- package/empty/empty.component.d.ts +6 -0
- package/empty/empty.component.d.ts.map +1 -0
- package/esm2020/application/planet-application-loader.mjs +454 -0
- package/esm2020/application/planet-application-ref.mjs +94 -0
- package/esm2020/application/planet-application.service.mjs +85 -0
- package/esm2020/application/portal-application.mjs +16 -0
- package/esm2020/assets-loader.mjs +216 -0
- package/esm2020/component/planet-component-loader.mjs +153 -0
- package/esm2020/component/planet-component-ref.mjs +3 -0
- package/esm2020/component/plant-component.config.mjs +7 -0
- package/esm2020/debug.mjs +33 -0
- package/esm2020/empty/empty.component.mjs +15 -0
- package/esm2020/global-event-dispatcher.mjs +70 -0
- package/esm2020/global-planet.mjs +53 -0
- package/esm2020/helpers.mjs +119 -0
- package/esm2020/module.mjs +31 -0
- package/esm2020/planet.class.mjs +9 -0
- package/esm2020/planet.mjs +91 -0
- package/esm2020/public-api.mjs +18 -0
- package/esm2020/sandbox/constants.mjs +7 -0
- package/esm2020/sandbox/exec.mjs +15 -0
- package/esm2020/sandbox/index.mjs +20 -0
- package/esm2020/sandbox/proxy/patches/document.mjs +12 -0
- package/esm2020/sandbox/proxy/patches/eventListener.mjs +41 -0
- package/esm2020/sandbox/proxy/patches/index.mjs +11 -0
- package/esm2020/sandbox/proxy/patches/storage.mjs +40 -0
- package/esm2020/sandbox/proxy/patches/timer.mjs +43 -0
- package/esm2020/sandbox/proxy/proxies/common.mjs +132 -0
- package/esm2020/sandbox/proxy/proxies/document.mjs +126 -0
- package/esm2020/sandbox/proxy/proxies/window.mjs +158 -0
- package/esm2020/sandbox/proxy/proxy-sandbox.mjs +49 -0
- package/esm2020/sandbox/proxy/types.mjs +2 -0
- package/esm2020/sandbox/sandbox.mjs +7 -0
- package/esm2020/sandbox/snapshot/snapshot-sandbox.mjs +12 -0
- package/esm2020/sandbox/types.mjs +2 -0
- package/esm2020/worktile-planet.mjs +5 -0
- package/fesm2015/worktile-planet.mjs +2049 -0
- package/fesm2015/worktile-planet.mjs.map +1 -0
- package/fesm2020/worktile-planet.mjs +2046 -0
- package/fesm2020/worktile-planet.mjs.map +1 -0
- package/global-event-dispatcher.d.ts +23 -0
- package/global-event-dispatcher.d.ts.map +1 -0
- package/global-planet.d.ts +23 -0
- package/global-planet.d.ts.map +1 -0
- package/helpers.d.ts +39 -0
- package/helpers.d.ts.map +1 -0
- package/index.d.ts +6 -0
- package/module.d.ts +12 -0
- package/module.d.ts.map +1 -0
- package/package.json +27 -120
- package/{packages/planet/src/planet.class.ts → planet.class.d.ts} +5 -26
- package/planet.class.d.ts.map +1 -0
- package/planet.d.ts +28 -0
- package/planet.d.ts.map +1 -0
- package/{packages/planet/src/public-api.ts → public-api.d.ts} +1 -4
- package/public-api.d.ts.map +1 -0
- package/sandbox/constants.d.ts +7 -0
- package/sandbox/constants.d.ts.map +1 -0
- package/sandbox/exec.d.ts +3 -0
- package/sandbox/exec.d.ts.map +1 -0
- package/sandbox/index.d.ts +7 -0
- package/sandbox/index.d.ts.map +1 -0
- package/sandbox/proxy/patches/document.d.ts +3 -0
- package/sandbox/proxy/patches/document.d.ts.map +1 -0
- package/sandbox/proxy/patches/eventListener.d.ts +3 -0
- package/sandbox/proxy/patches/eventListener.d.ts.map +1 -0
- package/sandbox/proxy/patches/index.d.ts +3 -0
- package/sandbox/proxy/patches/index.d.ts.map +1 -0
- package/sandbox/proxy/patches/storage.d.ts +15 -0
- package/sandbox/proxy/patches/storage.d.ts.map +1 -0
- package/sandbox/proxy/patches/timer.d.ts +3 -0
- package/sandbox/proxy/patches/timer.d.ts.map +1 -0
- package/sandbox/proxy/proxies/common.d.ts +13 -0
- package/sandbox/proxy/proxies/common.d.ts.map +1 -0
- package/sandbox/proxy/proxies/document.d.ts +14 -0
- package/sandbox/proxy/proxies/document.d.ts.map +1 -0
- package/sandbox/proxy/proxies/window.d.ts +13 -0
- package/sandbox/proxy/proxies/window.d.ts.map +1 -0
- package/sandbox/proxy/proxy-sandbox.d.ts +16 -0
- package/sandbox/proxy/proxy-sandbox.d.ts.map +1 -0
- package/{packages/planet/src/sandbox/proxy/types.ts → sandbox/proxy/types.d.ts} +2 -8
- package/sandbox/proxy/types.d.ts.map +1 -0
- package/sandbox/sandbox.d.ts +12 -0
- package/sandbox/sandbox.d.ts.map +1 -0
- package/sandbox/snapshot/snapshot-sandbox.d.ts +9 -0
- package/sandbox/snapshot/snapshot-sandbox.d.ts.map +1 -0
- package/sandbox/types.d.ts +2 -0
- package/sandbox/types.d.ts.map +1 -0
- package/worktile-planet.d.ts.map +1 -0
- package/.all-contributorsrc +0 -84
- package/.circleci/config.yml +0 -17
- package/.coveralls.yml +0 -1
- package/.docgeni/public/assets/favicon.ico +0 -0
- package/.docgeni/public/index.html +0 -13
- package/.docgenirc.js +0 -35
- package/.dockerignore +0 -1
- package/.editorconfig +0 -22
- package/.github/FUNDING.yml +0 -12
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.prettierignore +0 -7
- package/.prettierrc +0 -28
- package/.travis.yml +0 -26
- package/.wpmrc.js +0 -11
- package/CODE_OF_CONDUCT.md +0 -76
- package/Dockerfile +0 -11
- package/README.zh-CN.md +0 -307
- package/SECURITY.md +0 -21
- package/angular.json +0 -373
- package/commitlint.config.js +0 -6
- package/docs/api/defineApplication.md +0 -46
- package/docs/api/globalEventDispatcher.md +0 -51
- package/docs/api/index.md +0 -5
- package/docs/api/planet.md +0 -117
- package/docs/guides/getting-started.md +0 -174
- package/docs/guides/index.md +0 -5
- package/docs/guides/intro.md +0 -216
- package/examples/app1/browserslist +0 -11
- package/examples/app1/extra-webpack.config.js +0 -33
- package/examples/app1/karma.conf.js +0 -31
- package/examples/app1/postcss.config.js +0 -1
- package/examples/app1/src/app/app.module.ts +0 -44
- package/examples/app1/src/app/app.routing.ts +0 -49
- package/examples/app1/src/app/counter.service.ts +0 -16
- package/examples/app1/src/app/dashboard/dashboard.component.html +0 -51
- package/examples/app1/src/app/dashboard/dashboard.component.ts +0 -70
- package/examples/app1/src/app/detail/detail.component.html +0 -8
- package/examples/app1/src/app/detail/detail.component.ts +0 -18
- package/examples/app1/src/app/overlay.ts +0 -26
- package/examples/app1/src/app/projects/dialog/projects-dialog.component.html +0 -10
- package/examples/app1/src/app/projects/dialog/projects-dialog.component.ts +0 -41
- package/examples/app1/src/app/projects/projects.component.ts +0 -33
- package/examples/app1/src/app/root/root.component.css +0 -3
- package/examples/app1/src/app/root/root.component.html +0 -16
- package/examples/app1/src/app/root/root.component.ts +0 -35
- package/examples/app1/src/app/services/initialized-data.resolver.ts +0 -15
- package/examples/app1/src/app/shared.module.ts +0 -57
- package/examples/app1/src/app/user/detail/user-detail.component.html +0 -5
- package/examples/app1/src/app/user/detail/user-detail.component.ts +0 -20
- package/examples/app1/src/app/user/user-list.component.html +0 -7
- package/examples/app1/src/app/user/user-list.component.ts +0 -20
- package/examples/app1/src/app/user/user.module.ts +0 -31
- package/examples/app1/src/assets/.gitkeep +0 -0
- package/examples/app1/src/assets/github.png +0 -0
- package/examples/app1/src/assets/main.css +0 -3
- package/examples/app1/src/environments/environment.prod.ts +0 -3
- package/examples/app1/src/environments/environment.ts +0 -16
- package/examples/app1/src/favicon.ico +0 -0
- package/examples/app1/src/index.html +0 -14
- package/examples/app1/src/main.ts +0 -35
- package/examples/app1/src/polyfills.ts +0 -84
- package/examples/app1/src/styles.scss +0 -35
- package/examples/app1/src/test.ts +0 -14
- package/examples/app1/temp.js +0 -221
- package/examples/app1/tsconfig.app.json +0 -10
- package/examples/app1/tsconfig.spec.json +0 -18
- package/examples/app1/tslint.json +0 -17
- package/examples/app1/webpack.config.js +0 -127
- package/examples/app2/browserslist +0 -11
- package/examples/app2/extra-webpack.config.js +0 -32
- package/examples/app2/karma.conf.js +0 -31
- package/examples/app2/src/app/app.module.ts +0 -90
- package/examples/app2/src/app/dashboard/dashboard.component.html +0 -21
- package/examples/app2/src/app/dashboard/dashboard.component.ts +0 -27
- package/examples/app2/src/app/overlay.ts +0 -26
- package/examples/app2/src/app/projects/detail/detail.component.html +0 -16
- package/examples/app2/src/app/projects/detail/detail.component.ts +0 -21
- package/examples/app2/src/app/projects/project-list.component.html +0 -29
- package/examples/app2/src/app/projects/project-list.component.ts +0 -58
- package/examples/app2/src/app/projects/project.resolver.ts +0 -15
- package/examples/app2/src/app/projects/projects.service.ts +0 -28
- package/examples/app2/src/app/projects/tasks/tasks.component.html +0 -10
- package/examples/app2/src/app/projects/tasks/tasks.component.ts +0 -16
- package/examples/app2/src/app/projects/view/view.component.html +0 -1
- package/examples/app2/src/app/projects/view/view.component.ts +0 -20
- package/examples/app2/src/app/root/root.component.html +0 -14
- package/examples/app2/src/app/root/root.component.scss +0 -12
- package/examples/app2/src/app/root/root.component.ts +0 -28
- package/examples/app2/src/app/shared.module.ts +0 -59
- package/examples/app2/src/assets/.gitkeep +0 -0
- package/examples/app2/src/environments/environment.prod.ts +0 -3
- package/examples/app2/src/environments/environment.ts +0 -16
- package/examples/app2/src/favicon.ico +0 -0
- package/examples/app2/src/index.html +0 -14
- package/examples/app2/src/main.ts +0 -36
- package/examples/app2/src/polyfills.ts +0 -84
- package/examples/app2/src/styles.scss +0 -28
- package/examples/app2/src/test.ts +0 -14
- package/examples/app2/tsconfig.app.json +0 -10
- package/examples/app2/tsconfig.spec.json +0 -18
- package/examples/app2/tslint.json +0 -7
- package/examples/app2/webpack.config.js +0 -92
- package/examples/common/app-root-context.ts +0 -10
- package/examples/common/cache.ts +0 -82
- package/examples/common/index.ts +0 -13
- package/examples/common/module.ts +0 -10
- package/examples/common/overlay-container.service.ts +0 -28
- package/examples/common/section-card/section-card.component.html +0 -5
- package/examples/common/section-card/section-card.component.scss +0 -15
- package/examples/common/section-card/section-card.component.ts +0 -11
- package/examples/common/utils.ts +0 -0
- package/examples/portal/src/app/a-detail/a-detail.component.html +0 -8
- package/examples/portal/src/app/a-detail/a-detail.component.ts +0 -18
- package/examples/portal/src/app/about/about.component.html +0 -27
- package/examples/portal/src/app/about/about.component.scss +0 -0
- package/examples/portal/src/app/about/about.component.spec.ts +0 -26
- package/examples/portal/src/app/about/about.component.ts +0 -26
- package/examples/portal/src/app/app-routing.module.ts +0 -57
- package/examples/portal/src/app/app.component.html +0 -73
- package/examples/portal/src/app/app.component.scss +0 -58
- package/examples/portal/src/app/app.component.spec.ts +0 -33
- package/examples/portal/src/app/app.component.ts +0 -111
- package/examples/portal/src/app/app.module.ts +0 -64
- package/examples/portal/src/app/custom-settings.service.ts +0 -44
- package/examples/portal/src/app/overlay.ts +0 -26
- package/examples/portal/src/app/settings/settings.component.html +0 -31
- package/examples/portal/src/app/settings/settings.component.scss +0 -3
- package/examples/portal/src/app/settings/settings.component.ts +0 -43
- package/examples/portal/src/assets/.gitkeep +0 -0
- package/examples/portal/src/assets/apps.json +0 -29
- package/examples/portal/src/assets/icons/sprite.defs.svg +0 -1
- package/examples/portal/src/assets/images/logo.svg +0 -16
- package/examples/portal/src/assets/ngx-planet-micro-front-end.gif +0 -0
- package/examples/portal/src/browserslist +0 -11
- package/examples/portal/src/environments/environment.prod.ts +0 -3
- package/examples/portal/src/environments/environment.ts +0 -16
- package/examples/portal/src/extra-webpack.config.js +0 -32
- package/examples/portal/src/favicon.ico +0 -0
- package/examples/portal/src/index.html +0 -14
- package/examples/portal/src/karma.conf.js +0 -31
- package/examples/portal/src/main.ts +0 -18
- package/examples/portal/src/polyfills.ts +0 -84
- package/examples/portal/src/reboot.scss +0 -14
- package/examples/portal/src/styles.scss +0 -14
- package/examples/portal/src/test.ts +0 -14
- package/examples/portal/src/tsconfig.app.json +0 -10
- package/examples/portal/src/tsconfig.spec.json +0 -9
- package/examples/portal/src/tslint.json +0 -7
- package/extra-webpack.config.js +0 -5
- package/nginx.conf +0 -17
- package/packages/planet/karma.conf.js +0 -37
- package/packages/planet/ng-package.json +0 -7
- package/packages/planet/package.json +0 -10
- package/packages/planet/src/application/planet-application-loader.spec.ts +0 -1102
- package/packages/planet/src/application/planet-application-loader.ts +0 -549
- package/packages/planet/src/application/planet-application-ref.spec.ts +0 -233
- package/packages/planet/src/application/planet-application-ref.ts +0 -131
- package/packages/planet/src/application/planet-application.service.spec.ts +0 -145
- package/packages/planet/src/application/planet-application.service.ts +0 -88
- package/packages/planet/src/application/portal-application.spec.ts +0 -53
- package/packages/planet/src/assets-loader.spec.ts +0 -689
- package/packages/planet/src/assets-loader.ts +0 -247
- package/packages/planet/src/component/planet-component-loader.spec.ts +0 -187
- package/packages/planet/src/component/planet-component-loader.ts +0 -173
- package/packages/planet/src/component/planet-component-ref.ts +0 -8
- package/packages/planet/src/debug.spec.ts +0 -58
- package/packages/planet/src/debug.ts +0 -66
- package/packages/planet/src/empty/empty.component.spec.ts +0 -34
- package/packages/planet/src/empty/empty.component.ts +0 -7
- package/packages/planet/src/global-event-dispatcher.spec.ts +0 -81
- package/packages/planet/src/global-event-dispatcher.ts +0 -82
- package/packages/planet/src/global-planet.spec.ts +0 -39
- package/packages/planet/src/global-planet.ts +0 -73
- package/packages/planet/src/helpers.spec.ts +0 -242
- package/packages/planet/src/helpers.ts +0 -125
- package/packages/planet/src/module.spec.ts +0 -79
- package/packages/planet/src/module.ts +0 -25
- package/packages/planet/src/planet.spec.ts +0 -226
- package/packages/planet/src/planet.ts +0 -113
- package/packages/planet/src/sandbox/constants.ts +0 -6
- package/packages/planet/src/sandbox/exec.ts +0 -22
- package/packages/planet/src/sandbox/index.ts +0 -24
- package/packages/planet/src/sandbox/proxy/patches/document.ts +0 -13
- package/packages/planet/src/sandbox/proxy/patches/eventListener.ts +0 -49
- package/packages/planet/src/sandbox/proxy/patches/index.ts +0 -13
- package/packages/planet/src/sandbox/proxy/patches/storage.ts +0 -53
- package/packages/planet/src/sandbox/proxy/patches/timer.ts +0 -50
- package/packages/planet/src/sandbox/proxy/proxies/common.ts +0 -137
- package/packages/planet/src/sandbox/proxy/proxies/document.ts +0 -140
- package/packages/planet/src/sandbox/proxy/proxies/window.ts +0 -176
- package/packages/planet/src/sandbox/proxy/proxy-sandbox.ts +0 -59
- package/packages/planet/src/sandbox/sandbox.ts +0 -20
- package/packages/planet/src/sandbox/snapshot/snapshot-sandbox.ts +0 -12
- package/packages/planet/src/sandbox/types.ts +0 -1
- package/packages/planet/src/test.ts +0 -16
- package/packages/planet/src/testing/app1.module.ts +0 -34
- package/packages/planet/src/testing/app2.module.ts +0 -24
- package/packages/planet/src/testing/applications.ts +0 -58
- package/packages/planet/src/testing/index.ts +0 -2
- package/packages/planet/src/testing/utils.ts +0 -31
- package/packages/planet/tsconfig.lib.json +0 -27
- package/packages/planet/tsconfig.lib.prod.json +0 -9
- package/packages/planet/tsconfig.spec.json +0 -17
- package/packages/planet/tslint.json +0 -7
- package/postcss.config.js +0 -3
- package/proxy.conf.js +0 -15
- package/tsconfig.json +0 -23
- package/tslint.json +0 -80
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<title>Docgeni</title>
|
|
6
|
-
<base href="/" />
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
-
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<dg-root></dg-root>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
package/.docgenirc.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @type {import('@docgeni/core').DocgeniConfig}
|
|
3
|
-
*/
|
|
4
|
-
module.exports = {
|
|
5
|
-
mode: 'full',
|
|
6
|
-
title: 'Planet',
|
|
7
|
-
description: '微前端解决方案',
|
|
8
|
-
docsDir: 'docs',
|
|
9
|
-
defaultLocale: 'zh-cn',
|
|
10
|
-
repoUrl: 'https://github.com/worktile/ngx-planet',
|
|
11
|
-
logoUrl: 'https://cdn.worktile.com/open-sources/ngx-tethys/logos/tethys.png',
|
|
12
|
-
navs: [
|
|
13
|
-
null,
|
|
14
|
-
{
|
|
15
|
-
title: '示例',
|
|
16
|
-
path: 'http://planet.ngnice.com',
|
|
17
|
-
isExternal: true
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
title: 'GitHub',
|
|
21
|
-
path: 'https://github.com/worktile/ngx-planet',
|
|
22
|
-
isExternal: true
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
title: '更新日志',
|
|
26
|
-
path: 'https://github.com/worktile/ngx-planet/blob/master/CHANGELOG.md',
|
|
27
|
-
isExternal: true,
|
|
28
|
-
locales: {
|
|
29
|
-
'en-us': {
|
|
30
|
-
title: 'Changelog'
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
};
|
package/.dockerignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node_modules
|
package/.editorconfig
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Editor configuration, see https://editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
[*]
|
|
5
|
-
charset = utf-8
|
|
6
|
-
indent_style = space
|
|
7
|
-
indent_size = 2
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
|
|
11
|
-
[*.js]
|
|
12
|
-
indent_size = 4
|
|
13
|
-
|
|
14
|
-
[*.ts]
|
|
15
|
-
indent_size = 4
|
|
16
|
-
|
|
17
|
-
[*.scss]
|
|
18
|
-
indent_size = 4
|
|
19
|
-
|
|
20
|
-
[*.md]
|
|
21
|
-
max_line_length = off
|
|
22
|
-
trim_trailing_whitespace = false
|
package/.github/FUNDING.yml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
otechie: # Replace with a single Otechie username
|
|
12
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Describe the bug**
|
|
11
|
-
A clear and concise description of what the bug is.
|
|
12
|
-
|
|
13
|
-
**To Reproduce**
|
|
14
|
-
Steps to reproduce the behavior:
|
|
15
|
-
1. Go to '...'
|
|
16
|
-
2. Click on '....'
|
|
17
|
-
3. Scroll down to '....'
|
|
18
|
-
4. See error
|
|
19
|
-
|
|
20
|
-
**Expected behavior**
|
|
21
|
-
A clear and concise description of what you expected to happen.
|
|
22
|
-
|
|
23
|
-
**Screenshots**
|
|
24
|
-
If applicable, add screenshots to help explain your problem.
|
|
25
|
-
|
|
26
|
-
**Desktop (please complete the following information):**
|
|
27
|
-
- OS: [e.g. iOS]
|
|
28
|
-
- Browser [e.g. chrome, safari]
|
|
29
|
-
- Version [e.g. 22]
|
|
30
|
-
|
|
31
|
-
**Smartphone (please complete the following information):**
|
|
32
|
-
- Device: [e.g. iPhone6]
|
|
33
|
-
- OS: [e.g. iOS8.1]
|
|
34
|
-
- Browser [e.g. stock browser, safari]
|
|
35
|
-
- Version [e.g. 22]
|
|
36
|
-
|
|
37
|
-
**Additional context**
|
|
38
|
-
Add any other context about the problem here.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature request
|
|
3
|
-
about: Suggest an idea for this project
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Is your feature request related to a problem? Please describe.**
|
|
11
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
-
|
|
13
|
-
**Describe the solution you'd like**
|
|
14
|
-
A clear and concise description of what you want to happen.
|
|
15
|
-
|
|
16
|
-
**Describe alternatives you've considered**
|
|
17
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
-
|
|
19
|
-
**Additional context**
|
|
20
|
-
Add any other context or screenshots about the feature request here.
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"eslintIntegration": true,
|
|
3
|
-
"stylelintIntegration": true,
|
|
4
|
-
"tabWidth": 4,
|
|
5
|
-
"singleQuote": true,
|
|
6
|
-
"semi": true,
|
|
7
|
-
"printWidth": 120,
|
|
8
|
-
"overrides": [
|
|
9
|
-
{
|
|
10
|
-
"files": "*.json",
|
|
11
|
-
"options": {
|
|
12
|
-
"tabWidth": 2
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"files": "*.html",
|
|
17
|
-
"options": {
|
|
18
|
-
"tabWidth": 2
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"files": ".prettierrc",
|
|
23
|
-
"options": {
|
|
24
|
-
"parser": "json"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
package/.travis.yml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
dist: trusty
|
|
2
|
-
sudo: false
|
|
3
|
-
|
|
4
|
-
language: node_js
|
|
5
|
-
node_js:
|
|
6
|
-
- 10.16.0
|
|
7
|
-
|
|
8
|
-
addons:
|
|
9
|
-
apt:
|
|
10
|
-
sources:
|
|
11
|
-
- google-chrome
|
|
12
|
-
packages:
|
|
13
|
-
- google-chrome-stable
|
|
14
|
-
|
|
15
|
-
cache:
|
|
16
|
-
directories:
|
|
17
|
-
- ./node_modules
|
|
18
|
-
|
|
19
|
-
install:
|
|
20
|
-
- npm install
|
|
21
|
-
|
|
22
|
-
script:
|
|
23
|
-
- npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
|
|
24
|
-
|
|
25
|
-
after_success:
|
|
26
|
-
- npm run report-coverage
|
package/.wpmrc.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
allowBranch: ['master', 'v0.*'],
|
|
3
|
-
bumpFiles: ['package.json', 'package-lock.json', 'packages/planet/package.json'],
|
|
4
|
-
tagPrefix: '',
|
|
5
|
-
commitAll: true,
|
|
6
|
-
header: 'Changelog\nAll notable changes to ngx-planet will be documented in this file.\n',
|
|
7
|
-
hooks: {
|
|
8
|
-
prepublish: 'npm run build',
|
|
9
|
-
postreleaseBranch: 'git add .'
|
|
10
|
-
}
|
|
11
|
-
};
|
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
9
|
-
level of experience, education, socio-economic status, nationality, personal
|
|
10
|
-
appearance, race, religion, or sexual identity and orientation.
|
|
11
|
-
|
|
12
|
-
## Our Standards
|
|
13
|
-
|
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
|
15
|
-
include:
|
|
16
|
-
|
|
17
|
-
* Using welcoming and inclusive language
|
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
|
19
|
-
* Gracefully accepting constructive criticism
|
|
20
|
-
* Focusing on what is best for the community
|
|
21
|
-
* Showing empathy towards other community members
|
|
22
|
-
|
|
23
|
-
Examples of unacceptable behavior by participants include:
|
|
24
|
-
|
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
-
advances
|
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
-
* Public or private harassment
|
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
|
30
|
-
address, without explicit permission
|
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
-
professional setting
|
|
33
|
-
|
|
34
|
-
## Our Responsibilities
|
|
35
|
-
|
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
-
response to any instances of unacceptable behavior.
|
|
39
|
-
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
-
threatening, offensive, or harmful.
|
|
45
|
-
|
|
46
|
-
## Scope
|
|
47
|
-
|
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
-
when an individual is representing the project or its community. Examples of
|
|
50
|
-
representing a project or community include using an official project e-mail
|
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
|
53
|
-
further defined and clarified by project maintainers.
|
|
54
|
-
|
|
55
|
-
## Enforcement
|
|
56
|
-
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at why520crazy@163.com. All
|
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
|
63
|
-
|
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
-
members of the project's leadership.
|
|
67
|
-
|
|
68
|
-
## Attribution
|
|
69
|
-
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
72
|
-
|
|
73
|
-
[homepage]: https://www.contributor-covenant.org
|
|
74
|
-
|
|
75
|
-
For answers to common questions about this code of conduct, see
|
|
76
|
-
https://www.contributor-covenant.org/faq
|
package/Dockerfile
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
FROM nginx:mainline-alpine
|
|
2
|
-
RUN rm /etc/nginx/conf.d/*
|
|
3
|
-
|
|
4
|
-
ADD nginx.conf /etc/nginx/conf.d/
|
|
5
|
-
RUN mkdir -p /etc/nginx/html/static/app1
|
|
6
|
-
RUN mkdir -p /etc/nginx/html/static/app2
|
|
7
|
-
RUN mkdir -p /etc/nginx/html/static/portal
|
|
8
|
-
|
|
9
|
-
COPY dist/app1 /etc/nginx/html/static/app1/
|
|
10
|
-
COPY dist/app2 /etc/nginx/html/static/app2/
|
|
11
|
-
COPY dist/portal /etc/nginx/html/static/portal/
|
package/README.zh-CN.md
DELETED
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
# ngx-planet
|
|
2
|
-
|
|
3
|
-
[](https://circleci.com/gh/worktile/ngx-planet)
|
|
4
|
-
[![Coverage Status][coveralls-image]][coveralls-url]
|
|
5
|
-
[](https://www.npmjs.com/package/@worktile/planet)
|
|
6
|
-
[](https://www.npmjs.com/package/@worktile/planet)
|
|
7
|
-
 [](#contributors-)
|
|
8
|
-
|
|
9
|
-
[coveralls-image]: https://coveralls.io/repos/github/worktile/ngx-planet/badge.svg?branch=master
|
|
10
|
-
[coveralls-url]: https://coveralls.io/github/worktile/ngx-planet
|
|
11
|
-
|
|
12
|
-
一个强大、可靠、完善、完全可用于生产环境的 Angular 微前端库。
|
|
13
|
-
Angular 的 API 风格,目前只支持 Angular 框架,不支持其他 MV* 前端框架。
|
|
14
|
-
|
|
15
|
-
中文文档 | [English README](https://github.com/worktile/ngx-planet/blob/master/README.md)
|
|
16
|
-
|
|
17
|
-
## 功能
|
|
18
|
-
|
|
19
|
-
- 支持同时渲染多个子应用
|
|
20
|
-
- 支持并存(coexist)和默认(default)两种模式, 默认模式切换其他子应用销毁当前子应用,并存模式不会销毁,而是隐藏
|
|
21
|
-
- 支持子应用的预加载
|
|
22
|
-
- 支持样式隔离
|
|
23
|
-
- 内置多个应用之间的通信
|
|
24
|
-
- 支持跨应用组件的渲染
|
|
25
|
-
- 完善的示例,包含路由配置、懒加载等所有功能
|
|
26
|
-
|
|
27
|
-
## 其他方案
|
|
28
|
-
|
|
29
|
-
- [single-spa](https://github.com/CanopyTax/single-spa): A javascript front-end framework supports any frameworks.
|
|
30
|
-
- [mooa](https://github.com/phodal/mooa): A independent-deployment micro-frontend Framework for Angular from single-spa, `planet` 和 `mooa` 非常相似, 但是 `planet` 更加强大、可靠,同时完全用于了生产环境,比如:https://pingcode.com
|
|
31
|
-
|
|
32
|
-
## 安装
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
$ npm i @worktile/planet --save
|
|
36
|
-
// 或者
|
|
37
|
-
$ yarn add @worktile/planet
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Dependencies
|
|
41
|
-
|
|
42
|
-
- `@angular/cdk`, 确保安装了 Angular 官方的 CDK `npm i @angular/cdk --save` 或者 `yarn add @angular/cdk`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## 示例
|
|
46
|
-
|
|
47
|
-
[Try out our live demo](http://planet.ngnice.com)
|
|
48
|
-
|
|
49
|
-

|
|
50
|
-
|
|
51
|
-
## 使用说明
|
|
52
|
-
|
|
53
|
-
### 1. 在主应用的`AppModule`中引入`NgxPlanetModule`
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
import { NgxPlanetModule } from '@worktile/planet';
|
|
57
|
-
|
|
58
|
-
@NgModule({
|
|
59
|
-
imports: [
|
|
60
|
-
CommonModule,
|
|
61
|
-
NgxPlanetModule
|
|
62
|
-
]
|
|
63
|
-
})
|
|
64
|
-
class AppModule {}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### 2. 通过`Planet`服务在主应用中注册子应用
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
@Component({
|
|
71
|
-
selector: 'app-portal-root',
|
|
72
|
-
template: `
|
|
73
|
-
<nav>
|
|
74
|
-
<a [routerLink]="['/app1']" routerLinkActive="active">应用1</a>
|
|
75
|
-
<a [routerLink]="['/app2']" routerLinkActive="active">应用2</a>
|
|
76
|
-
</nav>
|
|
77
|
-
<router-outlet></router-outlet>
|
|
78
|
-
<div id="app-host-container"></div>
|
|
79
|
-
<div *ngIf="!loadingDone">加载中...</div>
|
|
80
|
-
`
|
|
81
|
-
})
|
|
82
|
-
export class AppComponent implements OnInit {
|
|
83
|
-
title = 'ngx-planet';
|
|
84
|
-
|
|
85
|
-
get loadingDone() {
|
|
86
|
-
return this.planet.loadingDone;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
constructor(
|
|
90
|
-
private planet: Planet
|
|
91
|
-
) {}
|
|
92
|
-
|
|
93
|
-
ngOnInit() {
|
|
94
|
-
this.planet.setOptions({
|
|
95
|
-
switchMode: SwitchModes.coexist,
|
|
96
|
-
errorHandler: error => {
|
|
97
|
-
console.error(`Failed to load resource, error:`, error);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
this.planet.registerApps([
|
|
102
|
-
{
|
|
103
|
-
name: 'app1',
|
|
104
|
-
hostParent: '#app-host-container',
|
|
105
|
-
hostClass: 'thy-layout',
|
|
106
|
-
routerPathPrefix: '/app1',
|
|
107
|
-
resourcePathPrefix: '/static/app1',
|
|
108
|
-
preload: true,
|
|
109
|
-
scripts: [
|
|
110
|
-
'main.js'
|
|
111
|
-
],
|
|
112
|
-
styles: [
|
|
113
|
-
'styles.css'
|
|
114
|
-
]
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: 'app2',
|
|
118
|
-
hostParent: '#app-host-container',
|
|
119
|
-
hostClass: 'thy-layout',
|
|
120
|
-
routerPathPrefix: '/app2',
|
|
121
|
-
preload: true,
|
|
122
|
-
scripts: [
|
|
123
|
-
'/static/app2/main.js'
|
|
124
|
-
],
|
|
125
|
-
styles: [
|
|
126
|
-
'/static/app2/styles.css'
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
]);
|
|
130
|
-
|
|
131
|
-
// start monitor route changes
|
|
132
|
-
// get apps to active by current path
|
|
133
|
-
// load static resources which contains javascript and css
|
|
134
|
-
// bootstrap angular sub app module and show it
|
|
135
|
-
this.planet.start();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### 3. 子应用通过`defineApplication`定义如何启动子应用的`AppModule`, 同时可以设置`PlanetPortalApplication`服务为主应用的全局服务。
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
defineApplication('app1', (portalApp: PlanetPortalApplication) => {
|
|
144
|
-
return platformBrowserDynamic([
|
|
145
|
-
{
|
|
146
|
-
provide: PlanetPortalApplication,
|
|
147
|
-
useValue: portalApp
|
|
148
|
-
}
|
|
149
|
-
])
|
|
150
|
-
.bootstrapModule(AppModule)
|
|
151
|
-
.then(appModule => {
|
|
152
|
-
return appModule;
|
|
153
|
-
})
|
|
154
|
-
.catch(error => {
|
|
155
|
-
console.error(error);
|
|
156
|
-
return null;
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## 文档
|
|
162
|
-
|
|
163
|
-
### 子应用
|
|
164
|
-
|
|
165
|
-
| Name | Type | Description | 中文描述 |
|
|
166
|
-
| ------------------ | --------------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
167
|
-
| name | string | Application's name | 子应用的名字 |
|
|
168
|
-
| routerPathPrefix | string | Application route path prefix | 子应用路由路径前缀,根据这个匹配应用 |
|
|
169
|
-
| selector | string | selector of app root component | 子应用的启动组件选择器,因为子应用是主应用动态加载的,所以主应用需要先创建这个选择器节点,再启动 AppModule |
|
|
170
|
-
| scripts | string[] | javascript static resource paths | JS 静态资源文件访问地址 |
|
|
171
|
-
| styles | string[] | style static resource paths | 样式静态资源文件访问地址 |
|
|
172
|
-
| resourcePathPrefix | string | path prefix of scripts and styles | 脚本和样式文件路径前缀,多个脚本可以避免重复写同样的前缀 |
|
|
173
|
-
| hostParent | string or HTMLElement | parent element for render | 应用渲染的容器元素, 指定子应用显示在哪个元素内部 |
|
|
174
|
-
| hostClass | string | added class for host which is selector | 宿主元素的 Class,也就是在子应用启动组件上追加的样式 |
|
|
175
|
-
| switchMode | default or coexist | it will be destroyed when set to default, it only hide app when set to coexist | 切换子应用的模式,默认切换会销毁,设置 coexist 后只会隐藏 |
|
|
176
|
-
| preload | boolean | start preload or not | 是否启用预加载,启动后刷新页面等当前页面的应用渲染完毕后预加载子应用 |
|
|
177
|
-
| loadSerial | boolean | serial load scripts | 是否串行加载脚本静态资源 |
|
|
178
|
-
| manifest | string | manifest json file path | manifest.json 文件路径地址,当设置了路径后会先加载这个文件,然后根据 scripts 和 styles 文件名去找到匹配的文件,因为生产环境的静态资文件是 hash 之后的命名,需要动态获取 |
|
|
179
|
-
|
|
180
|
-
### `GlobalEventDispatcher` 实现应用之间的通信
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
import { GlobalEventDispatcher } from "@worktile/planet";
|
|
184
|
-
|
|
185
|
-
// app1 root module
|
|
186
|
-
export class AppModule {
|
|
187
|
-
constructor(private globalEventDispatcher: GlobalEventDispatcher) {
|
|
188
|
-
this.globalEventDispatcher.register('open-a-detail').subscribe(event => {
|
|
189
|
-
// dialog.open(App1DetailComponent);
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
// in other apps
|
|
195
|
-
export class OneComponent {
|
|
196
|
-
constructor(private globalEventDispatcher: GlobalEventDispatcher) {
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
openDetail() {
|
|
200
|
-
this.globalEventDispatcher.dispatch('open-a-detail', payload);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### 跨应用组件渲染
|
|
206
|
-
|
|
207
|
-
```
|
|
208
|
-
import { PlanetComponentLoader } from "@worktile/planet";
|
|
209
|
-
|
|
210
|
-
// in app1
|
|
211
|
-
export class AppModule {
|
|
212
|
-
constructor(private planetComponentLoader: PlanetComponentLoader) {
|
|
213
|
-
this.planetComponentLoader.register([{ name: 'app1-project-list', component: App1ProjectListComponent }]);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// in other apps
|
|
218
|
-
export class OneComponent {
|
|
219
|
-
constructor(private planetComponentLoader: PlanetComponentLoader) {
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
openDetail() {
|
|
223
|
-
this.planetComponentLoader.load('app1', 'app1-project-list', {
|
|
224
|
-
container: this.containerElementRef,
|
|
225
|
-
initialState: {}
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
## FAQ
|
|
233
|
-
|
|
234
|
-
### 无限循环加载主应用的js
|
|
235
|
-
因为主应用和子应用都是通过Webpack打包的,打包的版本依赖会有冲突,需要通过`@angular-builders/custom-webpack`插件设置扩展的`Webpack`配置`runtimeChunk`, 期望 Webpack 5 对于微前端支持的更好。
|
|
236
|
-
```
|
|
237
|
-
// extra-webpack.config.js
|
|
238
|
-
{
|
|
239
|
-
optimization: {
|
|
240
|
-
runtimeChunk: false
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
### 报错 `Cannot read property 'call' of undefined at __webpack_require__ (bootstrap:79)`
|
|
246
|
-
和上面的原因类似,我们需要设置 `vendorChunk` 为 `false`,需要同时设置 `angular.json`中的`build`和`serve`, `serve` 按理说是应该继承 build 的配置的,好像在 Angular 8 中有缺陷,不起作用。
|
|
247
|
-
|
|
248
|
-
```
|
|
249
|
-
...
|
|
250
|
-
"build": {
|
|
251
|
-
"builder": "@angular-builders/custom-webpack:browser",
|
|
252
|
-
"options": {
|
|
253
|
-
"customWebpackConfig": {
|
|
254
|
-
"path": "./examples/app2/extra-webpack.config.js",
|
|
255
|
-
"mergeStrategies": {
|
|
256
|
-
"module.rules": "prepend"
|
|
257
|
-
},
|
|
258
|
-
"replaceDuplicatePlugins": true
|
|
259
|
-
},
|
|
260
|
-
...
|
|
261
|
-
"vendorChunk": false,
|
|
262
|
-
...
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
"serve": {
|
|
266
|
-
"builder": "@angular-builders/custom-webpack:dev-server",
|
|
267
|
-
"options": {
|
|
268
|
-
...
|
|
269
|
-
"vendorChunk": false
|
|
270
|
-
...
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
...
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
### 报错 `An accessor cannot be declared in an ambient context.`
|
|
277
|
-
这好像是 TypeScript 某个版本的缺陷,详细情况可以查看 see [an-accessor-cannot-be-declared](https://stackoverflow.com/questions/61248058/error-ngx-daterangepicker-material-an-accessor-cannot-be-declared-in-an-ambient
|
|
278
|
-
)
|
|
279
|
-
临时解决通过设置 `skipLibCheck` 为 true,将来升级到高级版本的 TypeScript 可能就自动修复了。
|
|
280
|
-
```
|
|
281
|
-
"compilerOptions": {
|
|
282
|
-
"skipLibCheck": true
|
|
283
|
-
}
|
|
284
|
-
```
|
|
285
|
-
### 使用路由延迟加载生产环境报错 `Cannot read property 'call' of undefined``
|
|
286
|
-
|
|
287
|
-
在 Webpack 4 中,多个应用的运行时在同一个页面下会有冲突,因为它们使用了相同的全局变量加载 chunk,为了修复这个问题,你需要通过`output.jsonpFunction`配置项提供一个自定义的名字,详细信息参考:[Automatic unique naming](https://webpack.js.org/blog/2020-10-10-webpack-5-release/#automatic-unique-naming).
|
|
288
|
-
|
|
289
|
-
你需要给每一个子应用的 `extra-webpack.config.js` 文件中配置一个唯一的名字
|
|
290
|
-
```
|
|
291
|
-
output: { jsonpFunction: "app1" }
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
## 开发
|
|
295
|
-
|
|
296
|
-
```
|
|
297
|
-
npm run start // open http://localhost:3000
|
|
298
|
-
|
|
299
|
-
or
|
|
300
|
-
|
|
301
|
-
npm run serve:portal // 3000
|
|
302
|
-
npm run serve:app1 // 3001
|
|
303
|
-
npm run serve:app2 // 3002
|
|
304
|
-
|
|
305
|
-
// test
|
|
306
|
-
npm run test
|
|
307
|
-
```
|
package/SECURITY.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
Use this section to tell people about which versions of your project are
|
|
6
|
-
currently being supported with security updates.
|
|
7
|
-
|
|
8
|
-
| Version | Supported |
|
|
9
|
-
| ------- | ------------------ |
|
|
10
|
-
| 5.1.x | :white_check_mark: |
|
|
11
|
-
| 5.0.x | :x: |
|
|
12
|
-
| 4.0.x | :white_check_mark: |
|
|
13
|
-
| < 4.0 | :x: |
|
|
14
|
-
|
|
15
|
-
## Reporting a Vulnerability
|
|
16
|
-
|
|
17
|
-
Use this section to tell people how to report a vulnerability.
|
|
18
|
-
|
|
19
|
-
Tell them where to go, how often they can expect to get an update on a
|
|
20
|
-
reported vulnerability, what to expect if the vulnerability is accepted or
|
|
21
|
-
declined, etc.
|