ng-packagr 4.0.0 → 4.2.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.
Files changed (78) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +12 -12
  3. package/cli/main.d.ts +1 -0
  4. package/cli/main.js +4 -2
  5. package/cli/main.js.map +1 -1
  6. package/lib/brocc/build-graph.d.ts +1 -1
  7. package/lib/brocc/build-graph.js.map +1 -1
  8. package/lib/brocc/depth.js.map +1 -1
  9. package/lib/brocc/node.js.map +1 -1
  10. package/lib/brocc/select.js.map +1 -1
  11. package/lib/brocc/transform.di.js.map +1 -1
  12. package/lib/brocc/transform.js.map +1 -1
  13. package/lib/commands/build.command.d.ts +2 -0
  14. package/lib/commands/build.command.js +1 -0
  15. package/lib/commands/build.command.js.map +1 -1
  16. package/lib/commands/command.js.map +1 -1
  17. package/lib/file/file-cache.js +0 -1
  18. package/lib/file/file-cache.js.map +1 -1
  19. package/lib/file/file-watcher.js.map +1 -1
  20. package/lib/flatten/downlevel-transformer.js.map +1 -1
  21. package/lib/flatten/external-module-id-strategy.js.map +1 -1
  22. package/lib/flatten/flatten.js.map +1 -1
  23. package/lib/flatten/rollup.js +3 -0
  24. package/lib/flatten/rollup.js.map +1 -1
  25. package/lib/flatten/uglify.js.map +1 -1
  26. package/lib/flatten/umd-module-id-strategy.js.map +1 -1
  27. package/lib/ng-package-format/entry-point.d.ts +12 -12
  28. package/lib/ng-package-format/entry-point.js.map +1 -1
  29. package/lib/ng-package-format/package.d.ts +9 -9
  30. package/lib/ng-package-format/package.js.map +1 -1
  31. package/lib/ng-package-format/shared.d.ts +1 -1
  32. package/lib/ng-v5/discover-packages.js.map +1 -1
  33. package/lib/ng-v5/entry-point/resources/postcss-clean.js.map +1 -1
  34. package/lib/ng-v5/entry-point/resources/stylesheet-processor.d.ts +4 -4
  35. package/lib/ng-v5/entry-point/resources/stylesheet-processor.js +12 -10
  36. package/lib/ng-v5/entry-point/resources/stylesheet-processor.js.map +1 -1
  37. package/lib/ng-v5/entry-point/ts/compile-ngc.transform.js +7 -4
  38. package/lib/ng-v5/entry-point/ts/compile-ngc.transform.js.map +1 -1
  39. package/lib/ng-v5/entry-point/write-bundles.transform.js.map +1 -1
  40. package/lib/ng-v5/entry-point/write-package.transform.js +2 -1
  41. package/lib/ng-v5/entry-point/write-package.transform.js.map +1 -1
  42. package/lib/ng-v5/init/analyse-sources.transform.js +6 -4
  43. package/lib/ng-v5/init/analyse-sources.transform.js.map +1 -1
  44. package/lib/ng-v5/init/init-tsconfig.di.d.ts +1 -1
  45. package/lib/ng-v5/init/init-tsconfig.di.js.map +1 -1
  46. package/lib/ng-v5/init/init-tsconfig.transform.d.ts +1 -1
  47. package/lib/ng-v5/init/init-tsconfig.transform.js +1 -1
  48. package/lib/ng-v5/init/init-tsconfig.transform.js.map +1 -1
  49. package/lib/ng-v5/nodes.d.ts +3 -4
  50. package/lib/ng-v5/nodes.js +1 -2
  51. package/lib/ng-v5/nodes.js.map +1 -1
  52. package/lib/ng-v5/package.di.js.map +1 -1
  53. package/lib/ng-v5/package.transform.js +15 -23
  54. package/lib/ng-v5/package.transform.js.map +1 -1
  55. package/lib/ng-v5/packagr.d.ts +2 -2
  56. package/lib/ng-v5/packagr.js.map +1 -1
  57. package/lib/ngc/compile-source-files.d.ts +1 -2
  58. package/lib/ngc/compile-source-files.js +2 -15
  59. package/lib/ngc/compile-source-files.js.map +1 -1
  60. package/lib/ngc/create-emit-callback.js +2 -2
  61. package/lib/ngc/create-emit-callback.js.map +1 -1
  62. package/lib/ts/cache-compiler-host.js.map +1 -1
  63. package/lib/ts/conf/tsconfig.ngc.json +0 -2
  64. package/lib/ts/redirect-write-file-compiler-host.js +1 -1
  65. package/lib/ts/redirect-write-file-compiler-host.js.map +1 -1
  66. package/lib/ts/tsconfig.d.ts +14 -7
  67. package/lib/ts/tsconfig.js +69 -54
  68. package/lib/ts/tsconfig.js.map +1 -1
  69. package/lib/util/array.js.map +1 -1
  70. package/lib/util/copy.d.ts +2 -2
  71. package/lib/util/copy.js +5 -18
  72. package/lib/util/copy.js.map +1 -1
  73. package/lib/util/glob.js.map +1 -1
  74. package/lib/util/log.js.map +1 -1
  75. package/lib/util/path.js.map +1 -1
  76. package/lib/util/promisify.js.map +1 -1
  77. package/lib/util/rimraf.js.map +1 -1
  78. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -2,6 +2,74 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ <a name="4.2.0"></a>
6
+ # [4.2.0](https://github.com/ng-packagr/ng-packagr/compare/v4.1.1...v4.2.0) (2018-09-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update rollup to version `^0.65.0` ([03db010](https://github.com/ng-packagr/ng-packagr/commit/03db010))
12
+ * update rollup to version ^0.66.0 ([3d381b0](https://github.com/ng-packagr/ng-packagr/commit/3d381b0))
13
+
14
+
15
+ ### Features
16
+
17
+ * add and version as peerDependencies ([97c5fec](https://github.com/ng-packagr/ng-packagr/commit/97c5fec))
18
+ * add `TypeScript` version 3 as a `peerDependency` ([5f0b761](https://github.com/ng-packagr/ng-packagr/commit/5f0b761))
19
+ * add a option to pass a custom `tsconfig` in `CLI` ([cb6a980](https://github.com/ng-packagr/ng-packagr/commit/cb6a980))
20
+
21
+
22
+
23
+ <a name="4.1.1"></a>
24
+ ## [4.1.1](https://github.com/dherges/ng-packagr/compare/v4.1.0...v4.1.1) (2018-08-26)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * allow sass indexed syntax to be compiled (+ integration tests) ([#1053](https://github.com/dherges/ng-packagr/issues/1053)) ([34a259d](https://github.com/dherges/ng-packagr/commit/34a259d))
30
+
31
+
32
+
33
+ <a name="4.1.0"></a>
34
+ # [4.1.0](https://github.com/dherges/ng-packagr/compare/v4.0.1...v4.1.0) (2018-08-12)
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * add fallback for `sources` when re-wiring sourcemaps ([#1033](https://github.com/dherges/ng-packagr/issues/1033)) ([9521281](https://github.com/dherges/ng-packagr/commit/9521281))
40
+ * no elements in sequence error ([#1029](https://github.com/dherges/ng-packagr/issues/1029)) ([e80cc22](https://github.com/dherges/ng-packagr/commit/e80cc22))
41
+ * update node-sass to v4.9.3 ([#1046](https://github.com/dherges/ng-packagr/issues/1046)) ([befb3da](https://github.com/dherges/ng-packagr/commit/befb3da)), closes [#1045](https://github.com/dherges/ng-packagr/issues/1045)
42
+ * update postcss-url to version ^8.0.0 ([#1042](https://github.com/dherges/ng-packagr/issues/1042)) ([6b4ba96](https://github.com/dherges/ng-packagr/commit/6b4ba96))
43
+ * update rollup to version ^0.64.0 ([#1039](https://github.com/dherges/ng-packagr/issues/1039)) ([5d1ab49](https://github.com/dherges/ng-packagr/commit/5d1ab49))
44
+ * update rollup to version ^0.64.0 ([#1047](https://github.com/dherges/ng-packagr/issues/1047)) ([8cb4780](https://github.com/dherges/ng-packagr/commit/8cb4780))
45
+
46
+
47
+ ### Features
48
+
49
+ * add support for `~` import syntax for `less` ([#1036](https://github.com/dherges/ng-packagr/issues/1036)) ([bd7c529](https://github.com/dherges/ng-packagr/commit/bd7c529)), closes [#827](https://github.com/dherges/ng-packagr/issues/827) [#227](https://github.com/dherges/ng-packagr/issues/227)
50
+
51
+
52
+ ### Performance Improvements
53
+
54
+ * reduce memory consumption ([#1022](https://github.com/dherges/ng-packagr/issues/1022)) ([3ba995e](https://github.com/dherges/ng-packagr/commit/3ba995e))
55
+
56
+
57
+
58
+ <a name="4.0.1"></a>
59
+ ## [4.0.1](https://github.com/dherges/ng-packagr/compare/v4.0.0...v4.0.1) (2018-07-26)
60
+
61
+
62
+ ### Bug Fixes
63
+
64
+ * add `enableResourceInlining` by default to tsconfig ([#1021](https://github.com/dherges/ng-packagr/issues/1021)) ([d2e9678](https://github.com/dherges/ng-packagr/commit/d2e9678)), closes [#976](https://github.com/dherges/ng-packagr/issues/976)
65
+
66
+
67
+ ### Performance Improvements
68
+
69
+ * analyse sources only for dirty entrypoints ([#1017](https://github.com/dherges/ng-packagr/issues/1017)) ([191cf00](https://github.com/dherges/ng-packagr/commit/191cf00))
70
+
71
+
72
+
5
73
  <a name="4.0.0"></a>
6
74
  # [4.0.0](https://github.com/dherges/ng-packagr/compare/v4.0.0-rc.4...v4.0.0) (2018-07-22)
7
75
 
package/README.md CHANGED
@@ -3,16 +3,16 @@
3
3
  > Transpile your libraries to Angular Package Format
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/ng-packagr.svg?style=flat-square)](https://www.npmjs.com/package/ng-packagr)
6
- [![npm License](https://img.shields.io/npm/l/ng-packagr.svg?style=flat-square)](https://github.com/dherges/ng-packagr/blob/master/LICENSE)
6
+ [![npm License](https://img.shields.io/npm/l/ng-packagr.svg?style=flat-square)](https://github.com/ng-packagr/ng-packagr/blob/master/LICENSE)
7
7
  [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
8
- [![CircleCI](https://img.shields.io/circleci/project/github/dherges/ng-packagr/master.svg?label=Circle%20CI&style=flat-square)](https://circleci.com/gh/dherges/ng-packagr)
9
- [![Travis](https://img.shields.io/travis/dherges/ng-packagr/master.svg?label=Travis%20CI&style=flat-square)](https://travis-ci.org/dherges/ng-packagr)
8
+ [![CircleCI](https://img.shields.io/circleci/project/github/ng-packagr/ng-packagr/master.svg?label=Circle%20CI&style=flat-square)](https://circleci.com/gh/ng-packagr/ng-packagr)
9
+ [![Travis](https://img.shields.io/travis/ng-packagr/ng-packagr/master.svg?label=Travis%20CI&style=flat-square)](https://travis-ci.org/ng-packagr/ng-packagr)
10
10
 
11
- [![GitHub contributors](https://img.shields.io/github/contributors/dherges/ng-packagr.svg?style=flat-square)](https://github.com/dherges/ng-packagr)
12
- [![GitHub PR Stats](http://issuestats.com/github/dherges/ng-packagr/badge/pr?style=flat-square)](http://issuestats.com/github/dherges/ng-packagr)
13
- [![GitHub Issue Stats](http://issuestats.com/github/dherges/ng-packagr/badge/issue?style=flat-square)](http://issuestats.com/github/dherges/ng-packagr)
11
+ [![GitHub contributors](https://img.shields.io/github/contributors/ng-packagr/ng-packagr.svg?style=flat-square)](https://github.com/ng-packagr/ng-packagr)
12
+ [![GitHub PR Stats](http://issuestats.com/github/ng-packagr/ng-packagr/badge/pr?style=flat-square)](http://issuestats.com/github/ng-packagr/ng-packagr)
13
+ [![GitHub Issue Stats](http://issuestats.com/github/ng-packagr/ng-packagr/badge/issue?style=flat-square)](http://issuestats.com/github/ng-packagr/ng-packagr)
14
14
 
15
- [![GitHub stars](https://img.shields.io/github/stars/dherges/ng-packagr.svg?label=GitHub%20Stars&style=flat-square)](https://github.com/dherges/ng-packagr)
15
+ [![GitHub stars](https://img.shields.io/github/stars/ng-packagr/ng-packagr.svg?label=GitHub%20Stars&style=flat-square)](https://github.com/ng-packagr/ng-packagr)
16
16
  [![npm Downloads](https://img.shields.io/npm/dw/ng-packagr.svg?style=flat-square)](https://www.npmjs.com/package/ng-packagr)
17
17
  [![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg?style=flat-square)](https://renovateapp.com/)
18
18
 
@@ -75,7 +75,7 @@ Create one `package.json` per npm package, run _ng-packagr_ for each!
75
75
  * :surfer: Inlines Templates and Stylesheets
76
76
  * :sparkles: CSS Features
77
77
  * :camel: Runs [SCSS](http://sass-lang.com/guide) preprocessor, supporting the [relative `~` import syntax](https://github.com/webpack-contrib/sass-loader#imports) and custom include paths
78
- * :elephant: Runs [less](http://lesscss.org/#getting-started) preprocessor
78
+ * :elephant: Runs [less](http://lesscss.org/#getting-started) preprocessor, supports the relative `~` import syntax
79
79
  * :snake: Runs [Stylus](http://stylus-lang.com) preprocessor, resolves relative paths relative to ng-package.json
80
80
  * :monkey: Adds vendor-specific prefixes w/ [autoprefixer](https://github.com/postcss/autoprefixer#autoprefixer-) and [browserslist](https://github.com/ai/browserslist#queries) &mdash; just tell your desired `.browserslistrc`
81
81
  * :tiger: Embed assets data w/ [postcss-url](https://github.com/postcss/postcss-url#inline)
@@ -100,14 +100,14 @@ A great step-by-step [example of making an Angular CLI project with a library di
100
100
 
101
101
  Nikolas LeBlanc wrote a tutorial on [building an Angular 4 Component Library with the Angular CLI and ng-packagr](https://medium.com/@ngl817/building-an-angular-4-component-library-with-the-angular-cli-and-ng-packagr-53b2ade0701e)
102
102
 
103
- Here is a [demo repository showing ng-packagr and Angular CLI](https://github.com/dherges/ng-packaged) in action.
103
+ Here is a [demo repository showing ng-packagr and Angular CLI](https://github.com/ng-packagr/ng-packaged) in action.
104
104
 
105
- What about [ng-packagr alongside Nx Workspace](https://github.com/dherges/nx-packaged)? Well, they work well together!
105
+ What about [ng-packagr alongside Nx Workspace](https://github.com/ng-packagr/nx-packaged)? Well, they work well together!
106
106
 
107
107
  #### Further user questions and issue-driven documentation
108
108
 
109
109
  We keep track of user questions in GitHub's issue tracker and try to build a documentation from it.
110
- [Explore issues w/ label documentation](https://github.com/dherges/ng-packagr/issues?q=label%3Adocumentation%20).
110
+ [Explore issues w/ label documentation](https://github.com/ng-packagr/ng-packagr/issues?q=label%3Adocumentation%20).
111
111
 
112
112
  #### Contributing to ng-packagr
113
113
 
@@ -134,4 +134,4 @@ Packaging Angular - Jason Aden at ng-conf 2017 ([28min talk](https://youtu.be/un
134
134
 
135
135
  Create and publish Angular libs like a Pro - Juri Strumpflohner at ngVikings, this time demoing building Angular libraries with ng-packagr, with NX as well as Bazel ([March 2018, 30min talk](https://youtu.be/Tw8TCgeqotg))
136
136
 
137
- [![Juri Strumpflohner - Create & Publish Angular Libs like a PRO at ngVikings](https://img.youtube.com/vi/Tw8TCgeqotg/0.jpg)](https://youtu.be/Tw8TCgeqotg)
137
+ [![Juri Strumpflohner - Create & Publish Angular Libs like a PRO at ngVikings](https://img.youtube.com/vi/Tw8TCgeqotg/0.jpg)](https://youtu.be/Tw8TCgeqotg)
package/cli/main.d.ts CHANGED
@@ -1 +1,2 @@
1
+ #!/usr/bin/env node
1
2
  export {};
package/cli/main.js CHANGED
@@ -14,7 +14,8 @@ program
14
14
  .name('ng-packagr')
15
15
  .option('-V, --version', 'Prints version info')
16
16
  .option('-w, --watch', 'Watch for file changes')
17
- .option('-p, --project [path]', "Path to the 'ng-package.json' or 'package.json' file.", parseProjectPath, DEFAULT_PROJECT_PATH);
17
+ .option('-p, --project [path]', "Path to the 'ng-package.json' or 'package.json' file.", parseProjectPath, DEFAULT_PROJECT_PATH)
18
+ .option('-c, --config [config]', 'Path to a tsconfig file.', (value) => (value ? path.resolve(value) : undefined));
18
19
  const dir = path.dirname(module.filename);
19
20
  const pkg = readPkgUp.sync({ cwd: dir }).pkg;
20
21
  updateNotifier({ pkg }).notify();
@@ -23,5 +24,6 @@ program.on('option:version', () => {
23
24
  process.exit(0);
24
25
  });
25
26
  program.parse(process.argv);
26
- public_api_1.execute(public_api_1.build, { project: program.opts().project, watch: !!program.opts().watch }).catch(err => process.exit(111));
27
+ const { config, project, watch } = program.opts();
28
+ public_api_1.execute(public_api_1.build, { config, project, watch: !!watch }).catch(() => process.exit(111));
27
29
  //# sourceMappingURL=main.js.map
package/cli/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";;;AAEA,qCAAqC;AACrC,6BAA6B;AAC7B,kDAAkD;AAClD,yCAAyC;AACzC,8CAAwD;AAExD,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC;AAE5E,0BAA0B,MAAc;IACtC,MAAM,CAAC,MAAM,IAAI,oBAAoB,CAAC;AACxC,CAAC;AAED,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC;KAC9C,MAAM,CAAC,aAAa,EAAE,wBAAwB,CAAC;KAC/C,MAAM,CACL,sBAAsB,EACtB,uDAAuD,EACvD,gBAAgB,EAChB,oBAAoB,CACrB,CAAC;AAEJ,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC;AAC7C,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAEjC,OAAO,CAAC,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAChC,oBAAO,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,oBAAO,CAAC,kBAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport * as program from 'commander';\nimport * as path from 'path';\nimport * as updateNotifier from 'update-notifier';\nimport * as readPkgUp from 'read-pkg-up';\nimport { execute, build, version } from '../public_api';\n\nconst DEFAULT_PROJECT_PATH = path.resolve(process.cwd(), 'ng-package.json');\n\nfunction parseProjectPath(parsed: string): string {\n return parsed || DEFAULT_PROJECT_PATH;\n}\n\nprogram\n .name('ng-packagr')\n .option('-V, --version', 'Prints version info')\n .option('-w, --watch', 'Watch for file changes')\n .option(\n '-p, --project [path]',\n \"Path to the 'ng-package.json' or 'package.json' file.\",\n parseProjectPath,\n DEFAULT_PROJECT_PATH\n );\n\nconst dir = path.dirname(module.filename);\nconst pkg = readPkgUp.sync({ cwd: dir }).pkg;\nupdateNotifier({ pkg }).notify();\n\nprogram.on('option:version', () => {\n version(pkg);\n process.exit(0);\n});\n\nprogram.parse(process.argv);\n\nexecute(build, { project: program.opts().project, watch: !!program.opts().watch }).catch(err => process.exit(111));\n"]}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":";;;AAEA,qCAAqC;AACrC,6BAA6B;AAC7B,kDAAkD;AAClD,yCAAyC;AACzC,8CAAwD;AAExD,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC;AAE5E,0BAA0B,MAAc;IACtC,OAAO,MAAM,IAAI,oBAAoB,CAAC;AACxC,CAAC;AAED,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC;KAC9C,MAAM,CAAC,aAAa,EAAE,wBAAwB,CAAC;KAC/C,MAAM,CACL,sBAAsB,EACtB,uDAAuD,EACvD,gBAAgB,EAChB,oBAAoB,CACrB;KACA,MAAM,CACL,uBAAuB,EACvB,0BAA0B,EAC1B,CAAC,KAAyB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CACzE,CAAC;AAEJ,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC;AAC7C,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAEjC,OAAO,CAAC,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAChC,oBAAO,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;AAClD,oBAAO,CAAC,kBAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\n\nimport * as program from 'commander';\nimport * as path from 'path';\nimport * as updateNotifier from 'update-notifier';\nimport * as readPkgUp from 'read-pkg-up';\nimport { execute, build, version } from '../public_api';\n\nconst DEFAULT_PROJECT_PATH = path.resolve(process.cwd(), 'ng-package.json');\n\nfunction parseProjectPath(parsed: string): string {\n return parsed || DEFAULT_PROJECT_PATH;\n}\n\nprogram\n .name('ng-packagr')\n .option('-V, --version', 'Prints version info')\n .option('-w, --watch', 'Watch for file changes')\n .option(\n '-p, --project [path]',\n \"Path to the 'ng-package.json' or 'package.json' file.\",\n parseProjectPath,\n DEFAULT_PROJECT_PATH\n )\n .option(\n '-c, --config [config]',\n 'Path to a tsconfig file.',\n (value: string | undefined) => (value ? path.resolve(value) : undefined)\n );\n\nconst dir = path.dirname(module.filename);\nconst pkg = readPkgUp.sync({ cwd: dir }).pkg;\nupdateNotifier({ pkg }).notify();\n\nprogram.on('option:version', () => {\n version(pkg);\n process.exit(0);\n});\n\nprogram.parse(process.argv);\n\nconst { config, project, watch } = program.opts();\nexecute(build, { config, project, watch: !!watch }).catch(() => process.exit(111));\n"]}
@@ -11,7 +11,7 @@ export interface Traversable<T> {
11
11
  export declare class BuildGraph implements Traversable<Node> {
12
12
  private store;
13
13
  put(value: Node | Node[]): this;
14
- private insert(node);
14
+ private insert;
15
15
  get(url: string): Node;
16
16
  has(url: string): boolean;
17
17
  entries(): Node[];
@@ -1 +1 @@
1
- {"version":3,"file":"build-graph.js","sourceRoot":"","sources":["../../../src/lib/brocc/build-graph.ts"],"names":[],"mappings":";;AAQA;;;GAGG;AACH;IAAA;QACU,UAAK,GAAG,IAAI,GAAG,EAAgB,CAAC;IAuD1C,CAAC;IArDQ,GAAG,CAAC,KAAoB;QAC7B,EAAE,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC;YAC3B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3C,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAEO,MAAM,CAAC,IAAU;QACvB,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC7B,+BAA+B;YAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACzC,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;QACjF,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IAEM,GAAG,CAAC,GAAW;QACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,GAAG,CAAC,GAAW;QACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,OAAO;QACZ,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAEnC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAEM,IAAI,CAAC,EAA2C;QACrD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IAEM,MAAM,CAAC,EAA2C;QACvD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAEM,IAAI,CAAC,EAA2C;QACrD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IAEM,IAAI,CAAC,IAAU;QACpB,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI;QACN,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;CACF;AAxDD,gCAwDC","sourcesContent":["import { Node } from './node';\n\nexport interface Traversable<T> {\n filter(by: (value: T, index: number) => boolean): T[];\n find(by: (value: T, index: number) => boolean): T | undefined;\n some(by: (value: T, index: number) => boolean): boolean;\n}\n\n/**\n * A tree of source files. Eventually, it's a graph. Ideally, it's an acyclic directed graph.\n * Technically, it's implemented as a map-like collection with references between map entries.\n */\nexport class BuildGraph implements Traversable<Node> {\n private store = new Map<string, Node>();\n\n public put(value: Node | Node[]) {\n if (value instanceof Array) {\n value.forEach(node => this.insert(node));\n } else {\n this.insert(value);\n }\n\n return this;\n }\n\n private insert(node: Node) {\n if (this.store.has(node.url)) {\n // Clean up dependee references\n const oldNode = this.store.get(node.url);\n oldNode['_dependees'] = oldNode['_dependees'].filter(node => node !== oldNode);\n }\n\n this.store.set(node.url, node);\n }\n\n public get(url: string): Node {\n return this.store.get(url);\n }\n\n public has(url: string): boolean {\n return this.store.has(url);\n }\n\n public entries(): Node[] {\n const values = this.store.values();\n\n return Array.from(values);\n }\n\n public some(by: (value: Node, index: number) => boolean): boolean {\n return this.entries().some(by);\n }\n\n public filter(by: (value: Node, index: number) => boolean): Node[] {\n return this.entries().filter(by);\n }\n\n public find(by: (value: Node, index: number) => boolean): Node | undefined {\n return this.entries().find(by);\n }\n\n public from(node: Node): Traversable<Node> {\n return node;\n }\n\n get size(): number {\n return this.store.size;\n }\n}\n"]}
1
+ {"version":3,"file":"build-graph.js","sourceRoot":"","sources":["../../../src/lib/brocc/build-graph.ts"],"names":[],"mappings":";;AAQA;;;GAGG;AACH;IAAA;QACU,UAAK,GAAG,IAAI,GAAG,EAAgB,CAAC;IAuD1C,CAAC;IArDQ,GAAG,CAAC,KAAoB;QAC7B,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;SAC1C;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACpB;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,MAAM,CAAC,IAAU;QACvB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YAC5B,+BAA+B;YAC/B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACzC,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;SAChF;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IAEM,GAAG,CAAC,GAAW;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,GAAG,CAAC,GAAW;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,OAAO;QACZ,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAEnC,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAEM,IAAI,CAAC,EAA2C;QACrD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IAEM,MAAM,CAAC,EAA2C;QACvD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAEM,IAAI,CAAC,EAA2C;QACrD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC;IAEM,IAAI,CAAC,IAAU;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;CACF;AAxDD,gCAwDC","sourcesContent":["import { Node } from './node';\n\nexport interface Traversable<T> {\n filter(by: (value: T, index: number) => boolean): T[];\n find(by: (value: T, index: number) => boolean): T | undefined;\n some(by: (value: T, index: number) => boolean): boolean;\n}\n\n/**\n * A tree of source files. Eventually, it's a graph. Ideally, it's an acyclic directed graph.\n * Technically, it's implemented as a map-like collection with references between map entries.\n */\nexport class BuildGraph implements Traversable<Node> {\n private store = new Map<string, Node>();\n\n public put(value: Node | Node[]) {\n if (value instanceof Array) {\n value.forEach(node => this.insert(node));\n } else {\n this.insert(value);\n }\n\n return this;\n }\n\n private insert(node: Node) {\n if (this.store.has(node.url)) {\n // Clean up dependee references\n const oldNode = this.store.get(node.url);\n oldNode['_dependees'] = oldNode['_dependees'].filter(node => node !== oldNode);\n }\n\n this.store.set(node.url, node);\n }\n\n public get(url: string): Node {\n return this.store.get(url);\n }\n\n public has(url: string): boolean {\n return this.store.has(url);\n }\n\n public entries(): Node[] {\n const values = this.store.values();\n\n return Array.from(values);\n }\n\n public some(by: (value: Node, index: number) => boolean): boolean {\n return this.entries().some(by);\n }\n\n public filter(by: (value: Node, index: number) => boolean): Node[] {\n return this.entries().filter(by);\n }\n\n public find(by: (value: Node, index: number) => boolean): Node | undefined {\n return this.entries().find(by);\n }\n\n public from(node: Node): Traversable<Node> {\n return node;\n }\n\n get size(): number {\n return this.store.size;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"depth.js","sourceRoot":"","sources":["../../../src/lib/brocc/depth.ts"],"names":[],"mappings":";;AAQA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAAA;QACE,2DAA2D;QACnD,kBAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IA8EpD,CAAC;IA5EQ,GAAG,CAAC,IAAW,EAAE,eAAgC,EAAE;QACxD,qBAAqB;QACrB,YAAY,GAAG,YAAY,YAAY,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;QAE7E,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACjC,mCAAmC;YACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC9C,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;gBACvE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;YACvC,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,aAAa,CAAC,GAAG,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E,EAAE,CAAC;YACxC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;QAClB,CAAC;QAED,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC;IACjB,CAAC;CACF;AAhFD,oCAgFC","sourcesContent":["export type Token = string;\nexport type Depth = number;\n\n/**\n * Groups of tokens. The index is the depth value. The array value is a group of tokens.\n */\nexport type Groups = Token[][];\n\n/**\n * DepthBuilder calculates depth values for nodes and dependencies.\n *\n * Depth represents the furthest distance (number of edges) from a node w/o dependencies.\n * A depth of zero indicates that a node has no dependency.\n * Lower depth values indicate that a node need to be built prior to nodes with a higher depth.\n * Nodes with the same depth value may be built in parallel.\n *\n * #### Example\n *\n * A simple example:\n *\n * - foo depends on bar\n * - foo depends on foobar\n * - bar depends on foobar\n *\n * Here, foobar has depth 0, bar has depth 1, and foo has depth 2.\n *\n * @link https://github.com/dherges/ng-packagr/pull/419#issuecomment-354015908\n */\nexport class DepthBuilder {\n // this serves as a tracker for dependencies between tokens\n private dependencyMap = new Map<Token, Token[]>();\n\n public add(node: Token, dependencies: Token[] | Token = []) {\n // Normalize to array\n dependencies = dependencies instanceof Array ? dependencies : [dependencies];\n\n if (this.dependencyMap.has(node)) {\n // Add to existing and de-duplicate\n const existing = this.dependencyMap.get(node);\n const deps = existing.concat(dependencies).filter((value, index, self) => {\n return self.indexOf(value) === index;\n });\n this.dependencyMap.set(node, deps);\n } else {\n this.dependencyMap.set(node, dependencies);\n }\n\n if (dependencies) {\n for (const dependency of dependencies) {\n if (!this.dependencyMap.has(dependency)) {\n this.dependencyMap.set(dependency, []);\n }\n }\n }\n }\n\n public build(): Groups {\n const allNodes = Array.from(this.dependencyMap.entries()).map(([token, dependencies]) => ({ token, dependencies }));\n // Start with root nodes and expand from there\n const nodeQueue = allNodes.filter(node => node.dependencies.length === 0);\n\n // Serves as a tracker for what nodes have been processed, and their furthest distance from a root node\n const nodeDepths = new Map<Token, Depth>();\n for (const node of nodeQueue) {\n nodeDepths.set(node.token, 0);\n }\n\n // We will use this later to reduce the frequency of dynamic memory allocations\n let maxDepth = 0;\n\n // Walk the tree to determine longest path from root for each node\n while (nodeQueue.length > 0) {\n const currentNode = nodeQueue.pop();\n const currentDepth = nodeDepths.get(currentNode.token) + 1;\n if (currentDepth > maxDepth) {\n maxDepth = currentDepth;\n }\n\n const parentNodes = allNodes.filter(node => node.dependencies.find(dep => dep === currentNode.token));\n parentNodes.forEach(parent => {\n if (!nodeDepths.has(parent.token)) {\n // Push the dependency to the queue and track its depth\n nodeQueue.push(parent);\n nodeDepths.set(parent.token, currentDepth);\n }\n\n const dependencyDepth = nodeDepths.get(parent.token);\n if (currentDepth > dependencyDepth) {\n // Push the dependency to the queue again and track its depth\n nodeQueue.push(parent);\n nodeDepths.set(parent.token, currentDepth);\n }\n });\n }\n\n // All nodes with the same max distance from a root can be run in parallel\n // Now we need to bucket nodes by max depth\n const buckets: Token[][] = new Array<Token[]>(maxDepth + 1);\n for (let i = 0; i < buckets.length; i++) {\n buckets[i] = [];\n }\n\n nodeDepths.forEach((depth, node) => {\n buckets[depth].push(node);\n });\n\n return buckets;\n }\n}\n"]}
1
+ {"version":3,"file":"depth.js","sourceRoot":"","sources":["../../../src/lib/brocc/depth.ts"],"names":[],"mappings":";;AAQA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAAA;QACE,2DAA2D;QACnD,kBAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IA8EpD,CAAC;IA5EQ,GAAG,CAAC,IAAW,EAAE,eAAgC,EAAE;QACxD,qBAAqB;QACrB,YAAY,GAAG,YAAY,YAAY,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;QAE7E,IAAI,IAAI,CAAC,aAAa,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,QAAQ,GAAG,CAAC,CAAC,CAAC;QAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;SACjB;QAED,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAhFD,oCAgFC","sourcesContent":["export type Token = string;\nexport type Depth = number;\n\n/**\n * Groups of tokens. The index is the depth value. The array value is a group of tokens.\n */\nexport type Groups = Token[][];\n\n/**\n * DepthBuilder calculates depth values for nodes and dependencies.\n *\n * Depth represents the furthest distance (number of edges) from a node w/o dependencies.\n * A depth of zero indicates that a node has no dependency.\n * Lower depth values indicate that a node need to be built prior to nodes with a higher depth.\n * Nodes with the same depth value may be built in parallel.\n *\n * #### Example\n *\n * A simple example:\n *\n * - foo depends on bar\n * - foo depends on foobar\n * - bar depends on foobar\n *\n * Here, foobar has depth 0, bar has depth 1, and foo has depth 2.\n *\n * @link https://github.com/dherges/ng-packagr/pull/419#issuecomment-354015908\n */\nexport class DepthBuilder {\n // this serves as a tracker for dependencies between tokens\n private dependencyMap = new Map<Token, Token[]>();\n\n public add(node: Token, dependencies: Token[] | Token = []) {\n // Normalize to array\n dependencies = dependencies instanceof Array ? dependencies : [dependencies];\n\n if (this.dependencyMap.has(node)) {\n // Add to existing and de-duplicate\n const existing = this.dependencyMap.get(node);\n const deps = existing.concat(dependencies).filter((value, index, self) => {\n return self.indexOf(value) === index;\n });\n this.dependencyMap.set(node, deps);\n } else {\n this.dependencyMap.set(node, dependencies);\n }\n\n if (dependencies) {\n for (const dependency of dependencies) {\n if (!this.dependencyMap.has(dependency)) {\n this.dependencyMap.set(dependency, []);\n }\n }\n }\n }\n\n public build(): Groups {\n const allNodes = Array.from(this.dependencyMap.entries()).map(([token, dependencies]) => ({ token, dependencies }));\n // Start with root nodes and expand from there\n const nodeQueue = allNodes.filter(node => node.dependencies.length === 0);\n\n // Serves as a tracker for what nodes have been processed, and their furthest distance from a root node\n const nodeDepths = new Map<Token, Depth>();\n for (const node of nodeQueue) {\n nodeDepths.set(node.token, 0);\n }\n\n // We will use this later to reduce the frequency of dynamic memory allocations\n let maxDepth = 0;\n\n // Walk the tree to determine longest path from root for each node\n while (nodeQueue.length > 0) {\n const currentNode = nodeQueue.pop();\n const currentDepth = nodeDepths.get(currentNode.token) + 1;\n if (currentDepth > maxDepth) {\n maxDepth = currentDepth;\n }\n\n const parentNodes = allNodes.filter(node => node.dependencies.find(dep => dep === currentNode.token));\n parentNodes.forEach(parent => {\n if (!nodeDepths.has(parent.token)) {\n // Push the dependency to the queue and track its depth\n nodeQueue.push(parent);\n nodeDepths.set(parent.token, currentDepth);\n }\n\n const dependencyDepth = nodeDepths.get(parent.token);\n if (currentDepth > dependencyDepth) {\n // Push the dependency to the queue again and track its depth\n nodeQueue.push(parent);\n nodeDepths.set(parent.token, currentDepth);\n }\n });\n }\n\n // All nodes with the same max distance from a root can be run in parallel\n // Now we need to bucket nodes by max depth\n const buckets: Token[][] = new Array<Token[]>(maxDepth + 1);\n for (let i = 0; i < buckets.length; i++) {\n buckets[i] = [];\n }\n\n nodeDepths.forEach((depth, node) => {\n buckets[depth].push(node);\n });\n\n return buckets;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/lib/brocc/node.ts"],"names":[],"mappings":";;AAEa,QAAA,WAAW,GAAc,OAAO,CAAC;AACjC,QAAA,gBAAgB,GAAc,aAAa,CAAC;AAC5C,QAAA,aAAa,GAAc,SAAS,CAAC;AACrC,QAAA,UAAU,GAAc,MAAM,CAAC;AAE5C;;GAEG;AACH;IACE,YAA4B,GAAW;QAAX,QAAG,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done';\n\nexport const STATE_DIRTY: NodeState = 'dirty';\nexport const STATE_IN_PROGESS: NodeState = 'in-progress';\nexport const STATE_PENDING: NodeState = 'pending';\nexport const STATE_DONE: NodeState = 'done';\n\n/**\n * A Node in the {@link BuildGraph}.\n */\nexport class Node {\n constructor(public readonly url: string) {}\n\n public type: string;\n\n public data: any;\n\n public state: NodeState = '';\n\n public filter(by: (value: Node, index: number) => boolean): Node[] {\n return this._dependents.filter(by);\n }\n\n public find(by: (value: Node, index: number) => boolean): Node | undefined {\n return this._dependents.find(by);\n }\n\n public some(by: (value: Node, index: number) => boolean): boolean {\n return this._dependents.some(by);\n }\n\n public get dependents(): Node[] {\n return this._dependents;\n }\n\n private _dependents: Node[] = [];\n private _dependees: Node[] = [];\n\n /** @experimental DO NOT USE. For time being, dirty checking is for `type=entryPoint && state !== 'done'` (full rebuild of entry point). */\n public dependsOn(dependent: Node | Node[]) {\n const newDeps = dependent instanceof Array ? dependent : [dependent];\n\n newDeps.forEach(dep => (dep._dependees = dep._dependees.filter(d => d.url !== this.url).concat(this)));\n\n this._dependents = this._dependents\n .filter(existing => newDeps.some(newDep => newDep.url !== existing.url))\n .concat(newDeps);\n }\n}\n"]}
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/lib/brocc/node.ts"],"names":[],"mappings":";;AAEa,QAAA,WAAW,GAAc,OAAO,CAAC;AACjC,QAAA,gBAAgB,GAAc,aAAa,CAAC;AAC5C,QAAA,aAAa,GAAc,SAAS,CAAC;AACrC,QAAA,UAAU,GAAc,MAAM,CAAC;AAE5C;;GAEG;AACH;IACE,YAA4B,GAAW;QAAX,QAAG,GAAH,GAAG,CAAQ;QAMhC,UAAK,GAAc,EAAE,CAAC;QAkBrB,gBAAW,GAAW,EAAE,CAAC;QACzB,eAAU,GAAW,EAAE,CAAC;IAzBU,CAAC;IAQpC,MAAM,CAAC,EAA2C;QACvD,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC;IAEM,IAAI,CAAC,EAA2C;QACrD,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAEM,IAAI,CAAC,EAA2C;QACrD,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAED,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAKD,2IAA2I;IACpI,SAAS,CAAC,SAAwB;QACvC,MAAM,OAAO,GAAG,SAAS,YAAY,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAErE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAEvG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW;aAChC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC;aACvE,MAAM,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;CACF;AAtCD,oBAsCC","sourcesContent":["export type NodeState = '' | 'dirty' | 'in-progress' | 'pending' | 'done';\n\nexport const STATE_DIRTY: NodeState = 'dirty';\nexport const STATE_IN_PROGESS: NodeState = 'in-progress';\nexport const STATE_PENDING: NodeState = 'pending';\nexport const STATE_DONE: NodeState = 'done';\n\n/**\n * A Node in the {@link BuildGraph}.\n */\nexport class Node {\n constructor(public readonly url: string) {}\n\n public type: string;\n\n public data: any;\n\n public state: NodeState = '';\n\n public filter(by: (value: Node, index: number) => boolean): Node[] {\n return this._dependents.filter(by);\n }\n\n public find(by: (value: Node, index: number) => boolean): Node | undefined {\n return this._dependents.find(by);\n }\n\n public some(by: (value: Node, index: number) => boolean): boolean {\n return this._dependents.some(by);\n }\n\n public get dependents(): Node[] {\n return this._dependents;\n }\n\n private _dependents: Node[] = [];\n private _dependees: Node[] = [];\n\n /** @experimental DO NOT USE. For time being, dirty checking is for `type=entryPoint && state !== 'done'` (full rebuild of entry point). */\n public dependsOn(dependent: Node | Node[]) {\n const newDeps = dependent instanceof Array ? dependent : [dependent];\n\n newDeps.forEach(dep => (dep._dependees = dep._dependees.filter(d => d.url !== this.url).concat(this)));\n\n this._dependents = this._dependents\n .filter(existing => newDeps.some(newDep => newDep.url !== existing.url))\n .concat(newDeps);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/lib/brocc/select.ts"],"names":[],"mappings":";;AAAA,iCAAwF;AAExF,aAAoB,GAAG,QAAqC;IAC1D,MAAM,CAAC,CAAC,IAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACtD,CAAC;AAFD,kBAEC;AAED,YACE,QAAiC;IAKjC,YAAY,IAAI;QACd,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IACD,EAAE,CAAC,KAAK,CAAC,GAAG,UAAS,IAAI;QACvB,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,MAAM,CAAC,EAAS,CAAC;AACnB,CAAC;AAdD,gBAcC;AAED,sBAA6B,IAAU;IACrC,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,uBAAgB,CAAC;AACzC,CAAC;AAFD,oCAEC;AAED,mBAA0B,IAAU;IAClC,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,oBAAa,CAAC;AACtC,CAAC;AAFD,8BAEC;AAED,iBAAwB,IAAU;IAChC,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,kBAAW,CAAC;AACpC,CAAC;AAFD,0BAEC;AAED,gBAAuB,IAAU;IAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK,iBAAU,CAAC;AACnC,CAAC;AAFD,wBAEC","sourcesContent":["import { Node, STATE_IN_PROGESS, STATE_PENDING, STATE_DIRTY, STATE_DONE } from './node';\n\nexport function and(...criteria: ((node: Node) => boolean)[]) {\n return (node: Node) => criteria.every(c => c(node));\n}\n\nexport function by(\n criteria: (node: Node) => boolean\n): {\n (node: Node): boolean;\n and: (criteria: (node: Node) => boolean) => (node: Node) => boolean;\n} {\n function fn(args) {\n return criteria(args);\n }\n fn['and'] = function(args) {\n return and(criteria, args);\n };\n\n return fn as any;\n}\n\nexport function isInProgress(node: Node): boolean {\n return node.state === STATE_IN_PROGESS;\n}\n\nexport function isPending(node: Node): boolean {\n return node.state === STATE_PENDING;\n}\n\nexport function isDirty(node: Node): boolean {\n return node.state === STATE_DIRTY;\n}\n\nexport function isDone(node: Node): boolean {\n return node.state === STATE_DONE;\n}\n"]}
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/lib/brocc/select.ts"],"names":[],"mappings":";;AAAA,iCAAwF;AAExF,aAAoB,GAAG,QAAqC;IAC1D,OAAO,CAAC,IAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACtD,CAAC;AAFD,kBAEC;AAED,YACE,QAAiC;IAKjC,YAAY,IAAI;QACd,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IACD,EAAE,CAAC,KAAK,CAAC,GAAG,UAAS,IAAI;QACvB,OAAO,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,EAAS,CAAC;AACnB,CAAC;AAdD,gBAcC;AAED,sBAA6B,IAAU;IACrC,OAAO,IAAI,CAAC,KAAK,KAAK,uBAAgB,CAAC;AACzC,CAAC;AAFD,oCAEC;AAED,mBAA0B,IAAU;IAClC,OAAO,IAAI,CAAC,KAAK,KAAK,oBAAa,CAAC;AACtC,CAAC;AAFD,8BAEC;AAED,iBAAwB,IAAU;IAChC,OAAO,IAAI,CAAC,KAAK,KAAK,kBAAW,CAAC;AACpC,CAAC;AAFD,0BAEC;AAED,gBAAuB,IAAU;IAC/B,OAAO,IAAI,CAAC,KAAK,KAAK,iBAAU,CAAC;AACnC,CAAC;AAFD,wBAEC","sourcesContent":["import { Node, STATE_IN_PROGESS, STATE_PENDING, STATE_DIRTY, STATE_DONE } from './node';\n\nexport function and(...criteria: ((node: Node) => boolean)[]) {\n return (node: Node) => criteria.every(c => c(node));\n}\n\nexport function by(\n criteria: (node: Node) => boolean\n): {\n (node: Node): boolean;\n and: (criteria: (node: Node) => boolean) => (node: Node) => boolean;\n} {\n function fn(args) {\n return criteria(args);\n }\n fn['and'] = function(args) {\n return and(criteria, args);\n };\n\n return fn as any;\n}\n\nexport function isInProgress(node: Node): boolean {\n return node.state === STATE_IN_PROGESS;\n}\n\nexport function isPending(node: Node): boolean {\n return node.state === STATE_PENDING;\n}\n\nexport function isDirty(node: Node): boolean {\n return node.state === STATE_DIRTY;\n}\n\nexport function isDone(node: Node): boolean {\n return node.state === STATE_DONE;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"transform.di.js","sourceRoot":"","sources":["../../../src/lib/brocc/transform.di.ts"],"names":[],"mappings":";;AAoBA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,0BAAiC,MAAyB;IACxD,MAAM,mBACD,MAAM,IACT,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE,IACvB;AACJ,CAAC;AALD,4CAKC","sourcesContent":["import { InjectionToken, FactoryProvider } from 'injection-js';\nimport { Transform } from './transform';\n\n/**\n * A specialized `FactoryProvider` for a `Transform`.\n */\nexport interface TransformProvider extends FactoryProvider {\n /**\n * An injection token for the `Transform` provided by this provider.\n */\n provide: InjectionToken<Transform>;\n\n /**\n * A function to invoke to create the `Transform`.\n *\n * The factory function is invoked with resolved values of tokens in the `deps` field.\n */\n useFactory: (...args: any[]) => Transform;\n}\n\n/**\n * Creates a provider for a `Transform`.\n *\n * #### Example\n *\n * Creating a transformation `fooBar` that is composed of `foo` and `bar` transforms:\n *\n * ```ts\n * const FOO_BAR_TOKEN = new InjectionToken<Transform>('fooBar');\n *\n * const FOO_BAR_TRANSFORM provideTransform({\n * provide: FOO_BAR_TOKEN,\n * useFactory: (foo, bar) => {\n * return pipe(foo, bar);\n * },\n * deps: [ FOO_TOKEN, BAR_TOKEN ]\n * });\n * ```\n *\n * @param module The provider for the transform\n * @return A (normalized) provider for the transform\n */\nexport function provideTransform(module: TransformProvider): TransformProvider {\n return {\n ...module,\n deps: module.deps || []\n };\n}\n"]}
1
+ {"version":3,"file":"transform.di.js","sourceRoot":"","sources":["../../../src/lib/brocc/transform.di.ts"],"names":[],"mappings":";;AAoBA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,0BAAiC,MAAyB;IACxD,yBACK,MAAM,IACT,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE,IACvB;AACJ,CAAC;AALD,4CAKC","sourcesContent":["import { InjectionToken, FactoryProvider } from 'injection-js';\nimport { Transform } from './transform';\n\n/**\n * A specialized `FactoryProvider` for a `Transform`.\n */\nexport interface TransformProvider extends FactoryProvider {\n /**\n * An injection token for the `Transform` provided by this provider.\n */\n provide: InjectionToken<Transform>;\n\n /**\n * A function to invoke to create the `Transform`.\n *\n * The factory function is invoked with resolved values of tokens in the `deps` field.\n */\n useFactory: (...args: any[]) => Transform;\n}\n\n/**\n * Creates a provider for a `Transform`.\n *\n * #### Example\n *\n * Creating a transformation `fooBar` that is composed of `foo` and `bar` transforms:\n *\n * ```ts\n * const FOO_BAR_TOKEN = new InjectionToken<Transform>('fooBar');\n *\n * const FOO_BAR_TRANSFORM provideTransform({\n * provide: FOO_BAR_TOKEN,\n * useFactory: (foo, bar) => {\n * return pipe(foo, bar);\n * },\n * deps: [ FOO_TOKEN, BAR_TOKEN ]\n * });\n * ```\n *\n * @param module The provider for the transform\n * @return A (normalized) provider for the transform\n */\nexport function provideTransform(module: TransformProvider): TransformProvider {\n return {\n ...module,\n deps: module.deps || []\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/lib/brocc/transform.ts"],"names":[],"mappings":";;AAAA,+BAA2G;AAC3G,8CAAgD;AAqBnC,QAAA,oBAAoB,GAAG,CAAC,WAAkC,EAAa,EAAE,CACpF,WAAI,CACF,qBAAS,CAAC,KAAK,CAAC,EAAE;IAChB,MAAM,eAAe,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAE3C,EAAE,CAAC,CAAC,eAAe,YAAY,OAAO,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,eAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACrF,CAAC;IAAC,IAAI,CAAC,CAAC;QACN,MAAM,CAAC,SAAY,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC;AACH,CAAC,CAAC,CACH,CAAC","sourcesContent":["import { MonoTypeOperatorFunction, Observable, from as fromPromise, of as observableOf, pipe } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\nimport { BuildGraph } from './build-graph';\n\n/**\n * A tranformation applied over the build graph.\n *\n * By design, a pipeable operator over `BuildGraph`.\n * - A transformation takes a `BuildGraph` as input (from previous transformations).\n * - A transformation performs some operations based on the graph's data, potentially modifying nodes in the graph.\n * - It returns a `BuildGraph` that will be passed to subsequent transformations.\n *\n * @link https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md#pipeable-operators\n */\nexport interface Transform extends MonoTypeOperatorFunction<BuildGraph> {\n (source$: Observable<BuildGraph>): Observable<BuildGraph>;\n}\n\nexport interface PromiseBasedTransform {\n (graph: BuildGraph): Promise<BuildGraph | void> | BuildGraph | void;\n}\n\nexport const transformFromPromise = (transformFn: PromiseBasedTransform): Transform =>\n pipe(\n switchMap(graph => {\n const transformResult = transformFn(graph);\n\n if (transformResult instanceof Promise) {\n return fromPromise(transformResult).pipe(map(result => (result ? result : graph)));\n } else {\n return observableOf(transformResult ? transformResult : graph);\n }\n })\n );\n"]}
1
+ {"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/lib/brocc/transform.ts"],"names":[],"mappings":";;AAAA,+BAA2G;AAC3G,8CAAgD;AAqBnC,QAAA,oBAAoB,GAAG,CAAC,WAAkC,EAAa,EAAE,CACpF,WAAI,CACF,qBAAS,CAAC,KAAK,CAAC,EAAE;IAChB,MAAM,eAAe,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAE3C,IAAI,eAAe,YAAY,OAAO,EAAE;QACtC,OAAO,WAAW,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,eAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACpF;SAAM;QACL,OAAO,SAAY,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;KAChE;AACH,CAAC,CAAC,CACH,CAAC","sourcesContent":["import { MonoTypeOperatorFunction, Observable, from as fromPromise, of as observableOf, pipe } from 'rxjs';\nimport { map, switchMap } from 'rxjs/operators';\nimport { BuildGraph } from './build-graph';\n\n/**\n * A tranformation applied over the build graph.\n *\n * By design, a pipeable operator over `BuildGraph`.\n * - A transformation takes a `BuildGraph` as input (from previous transformations).\n * - A transformation performs some operations based on the graph's data, potentially modifying nodes in the graph.\n * - It returns a `BuildGraph` that will be passed to subsequent transformations.\n *\n * @link https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md#pipeable-operators\n */\nexport interface Transform extends MonoTypeOperatorFunction<BuildGraph> {\n (source$: Observable<BuildGraph>): Observable<BuildGraph>;\n}\n\nexport interface PromiseBasedTransform {\n (graph: BuildGraph): Promise<BuildGraph | void> | BuildGraph | void;\n}\n\nexport const transformFromPromise = (transformFn: PromiseBasedTransform): Transform =>\n pipe(\n switchMap(graph => {\n const transformResult = transformFn(graph);\n\n if (transformResult instanceof Promise) {\n return fromPromise(transformResult).pipe(map(result => (result ? result : graph)));\n } else {\n return observableOf(transformResult ? transformResult : graph);\n }\n })\n );\n"]}
@@ -9,6 +9,8 @@ export interface CliArguments {
9
9
  project: string;
10
10
  /** Whether or not ng-packagr will watch for file changes and perform an incremental build. */
11
11
  watch?: boolean;
12
+ /** Path to a tsconfig file. */
13
+ config?: string;
12
14
  }
13
15
  /**
14
16
  * Command running an "one-off" build.
@@ -9,5 +9,6 @@ const packagr_1 = require("../ng-v5/packagr");
9
9
  exports.build = opts => packagr_1.ngPackagr()
10
10
  .forProject(opts.project)
11
11
  .withOptions({ watch: opts.watch })
12
+ .withTsConfig(opts.config)
12
13
  .build();
13
14
  //# sourceMappingURL=build.command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.command.js","sourceRoot":"","sources":["../../../src/lib/commands/build.command.ts"],"names":[],"mappings":";;AACA,8CAA6C;AAc7C;;;;GAIG;AACU,QAAA,KAAK,GAAgC,IAAI,CAAC,EAAE,CACvD,mBAAS,EAAE;KACR,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;KACxB,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;KAClC,KAAK,EAAE,CAAC","sourcesContent":["import { Command } from './command';\nimport { ngPackagr } from '../ng-v5/packagr';\n\n/**\n * CLI arguments passed to `ng-packagr` executable and `build()` command.\n *\n * @stable\n */\nexport interface CliArguments {\n /** Path to the project file 'package.json', 'ng-package.json', or 'ng-package.js'. */\n project: string;\n /** Whether or not ng-packagr will watch for file changes and perform an incremental build. */\n watch?: boolean;\n}\n\n/**\n * Command running an \"one-off\" build.\n *\n * @stable\n */\nexport const build: Command<CliArguments, void> = opts =>\n ngPackagr()\n .forProject(opts.project)\n .withOptions({ watch: opts.watch })\n .build();\n"]}
1
+ {"version":3,"file":"build.command.js","sourceRoot":"","sources":["../../../src/lib/commands/build.command.ts"],"names":[],"mappings":";;AACA,8CAA6C;AAgB7C;;;;GAIG;AACU,QAAA,KAAK,GAAgC,IAAI,CAAC,EAAE,CACvD,mBAAS,EAAE;KACR,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;KACxB,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;KAClC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC;KACzB,KAAK,EAAE,CAAC","sourcesContent":["import { Command } from './command';\nimport { ngPackagr } from '../ng-v5/packagr';\n\n/**\n * CLI arguments passed to `ng-packagr` executable and `build()` command.\n *\n * @stable\n */\nexport interface CliArguments {\n /** Path to the project file 'package.json', 'ng-package.json', or 'ng-package.js'. */\n project: string;\n /** Whether or not ng-packagr will watch for file changes and perform an incremental build. */\n watch?: boolean;\n /** Path to a tsconfig file. */\n config?: string;\n}\n\n/**\n * Command running an \"one-off\" build.\n *\n * @stable\n */\nexport const build: Command<CliArguments, void> = opts =>\n ngPackagr()\n .forProject(opts.project)\n .withOptions({ watch: opts.watch })\n .withTsConfig(opts.config)\n .build();\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/lib/commands/command.ts"],"names":[],"mappings":";;AASA;;;;GAIG;AACH,iBAA8B,OAAsB,EAAE,IAAQ;IAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAChD,EAAE,CAAC,CAAC,MAAM,YAAY,OAAO,CAAC,CAAC,CAAC;QAC9B,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAAC,IAAI,CAAC,CAAC;QACN,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAPD,0BAOC","sourcesContent":["/**\n * Common call signature for a command.\n *\n * @stable\n */\nexport interface Command<Arguments, Result> {\n (args?: Arguments): Result | Promise<Result>;\n}\n\n/**\n * Executes a Command and returns its promisified result.\n *\n * @stable\n */\nexport function execute<A, R>(command: Command<A, R>, args?: A): Promise<R> {\n const result = args ? command(args) : command();\n if (result instanceof Promise) {\n return result;\n } else {\n return Promise.resolve(result);\n }\n}\n"]}
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/lib/commands/command.ts"],"names":[],"mappings":";;AASA;;;;GAIG;AACH,iBAA8B,OAAsB,EAAE,IAAQ;IAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IAChD,IAAI,MAAM,YAAY,OAAO,EAAE;QAC7B,OAAO,MAAM,CAAC;KACf;SAAM;QACL,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;KAChC;AACH,CAAC;AAPD,0BAOC","sourcesContent":["/**\n * Common call signature for a command.\n *\n * @stable\n */\nexport interface Command<Arguments, Result> {\n (args?: Arguments): Result | Promise<Result>;\n}\n\n/**\n * Executes a Command and returns its promisified result.\n *\n * @stable\n */\nexport function execute<A, R>(command: Command<A, R>, args?: A): Promise<R> {\n const result = args ? command(args) : command();\n if (result instanceof Promise) {\n return result;\n } else {\n return Promise.resolve(result);\n }\n}\n"]}
@@ -14,7 +14,6 @@ class FileCache {
14
14
  return path_1.ensureUnixPath(fileName);
15
15
  }
16
16
  delete(fileName) {
17
- const normalizedKey = this.normalizeKey(fileName);
18
17
  return this.cache.delete(this.normalizeKey(fileName));
19
18
  }
20
19
  has(fileName) {
@@ -1 +1 @@
1
- {"version":3,"file":"file-cache.js","sourceRoot":"","sources":["../../../src/lib/file/file-cache.ts"],"names":[],"mappings":";;AACA,uCAA8C;AAS9C;IAAA;QACU,UAAK,GAA4B,IAAI,GAAG,EAAE,CAAC;QAEnD,YAAO,GAGK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChD,UAAK,GAAe,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAkCxD,CAAC;IAhCC,IAAI;QACF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,QAAgB;QAC3B,MAAM,CAAC,qBAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,QAAgB;QACrB,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAClD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,GAAG,CAAC,QAAgB;QAClB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,GAAG,CAAC,QAAgB;QAClB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,WAAW,CAAC,QAAgB;QAC1B,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAE1C,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACX,KAAK,GAAG,EAAE,CAAC;YACX,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QACvC,CAAC;QAED,MAAM,CAAC,KAAK,CAAC;IACf,CAAC;CACF;AAzCD,8BAyCC","sourcesContent":["import * as ts from 'typescript';\nimport { ensureUnixPath } from '../util/path';\n\nexport interface CacheEntry {\n exists?: boolean;\n sourceFile?: ts.SourceFile;\n content?: string;\n declarationFileName?: string;\n}\n\nexport class FileCache {\n private cache: Map<string, CacheEntry> = new Map();\n\n forEach: (\n callbackfn: (value: CacheEntry, key: string, map: Map<string, CacheEntry>) => void,\n thisArg?: any\n ) => void = this.cache.forEach.bind(this.cache);\n clear: () => void = this.cache.clear.bind(this.cache);\n\n size(): number {\n return this.cache.size;\n }\n\n normalizeKey(fileName: string): string {\n return ensureUnixPath(fileName);\n }\n\n delete(fileName: string): boolean {\n const normalizedKey = this.normalizeKey(fileName);\n return this.cache.delete(this.normalizeKey(fileName));\n }\n\n has(fileName: string): boolean {\n return this.cache.has(this.normalizeKey(fileName));\n }\n\n get(fileName: string): CacheEntry | undefined {\n return this.cache.get(this.normalizeKey(fileName));\n }\n\n getOrCreate(fileName: string): CacheEntry {\n const normalizedKey = this.normalizeKey(fileName);\n let entry = this.cache.get(normalizedKey);\n\n if (!entry) {\n entry = {};\n this.cache.set(normalizedKey, entry);\n }\n\n return entry;\n }\n}\n"]}
1
+ {"version":3,"file":"file-cache.js","sourceRoot":"","sources":["../../../src/lib/file/file-cache.ts"],"names":[],"mappings":";;AACA,uCAA8C;AAS9C;IAAA;QACU,UAAK,GAA4B,IAAI,GAAG,EAAE,CAAC;QAEnD,YAAO,GAGK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChD,UAAK,GAAe,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAiCxD,CAAC;IA/BC,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,QAAgB;QAC3B,OAAO,qBAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,QAAgB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,GAAG,CAAC,QAAgB;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,GAAG,CAAC,QAAgB;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,WAAW,CAAC,QAAgB;QAC1B,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAE1C,IAAI,CAAC,KAAK,EAAE;YACV,KAAK,GAAG,EAAE,CAAC;YACX,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;SACtC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAxCD,8BAwCC","sourcesContent":["import * as ts from 'typescript';\nimport { ensureUnixPath } from '../util/path';\n\nexport interface CacheEntry {\n exists?: boolean;\n sourceFile?: ts.SourceFile;\n content?: string;\n declarationFileName?: string;\n}\n\nexport class FileCache {\n private cache: Map<string, CacheEntry> = new Map();\n\n forEach: (\n callbackfn: (value: CacheEntry, key: string, map: Map<string, CacheEntry>) => void,\n thisArg?: any\n ) => void = this.cache.forEach.bind(this.cache);\n clear: () => void = this.cache.clear.bind(this.cache);\n\n size(): number {\n return this.cache.size;\n }\n\n normalizeKey(fileName: string): string {\n return ensureUnixPath(fileName);\n }\n\n delete(fileName: string): boolean {\n return this.cache.delete(this.normalizeKey(fileName));\n }\n\n has(fileName: string): boolean {\n return this.cache.has(this.normalizeKey(fileName));\n }\n\n get(fileName: string): CacheEntry | undefined {\n return this.cache.get(this.normalizeKey(fileName));\n }\n\n getOrCreate(fileName: string): CacheEntry {\n const normalizedKey = this.normalizeKey(fileName);\n let entry = this.cache.get(normalizedKey);\n\n if (!entry) {\n entry = {};\n this.cache.set(normalizedKey, entry);\n }\n\n return entry;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"file-watcher.js","sourceRoot":"","sources":["../../../src/lib/file/file-watcher.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,qCAAqC;AACrC,+BAA4C;AAC5C,uCAA8C;AAC9C,mCAAmC;AASnC,yBACE,WAAmB,EACnB,eAAoC,EAAE;IAEtC,GAAG,CAAC,KAAK,CAAC,sCAAsC,WAAW,mBAAmB,YAAY,EAAE,CAAC,CAAC;IAE9F,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE;QACxC,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,CAAC,GAAG,YAAY,EAAE,oDAAoD,CAAC;QAChF,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAG,CAAC,KAAqB,EAAE,QAAgB,EAAE,QAAoC,EAAE,EAAE;QACzG,GAAG,CAAC,KAAK,CAAC,+BAA+B,KAAK,WAAW,QAAQ,EAAE,CAAC,CAAC;QAErE,MAAM,aAAa,GAAqB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAEhE,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAClC,2GAA2G;YAC3G,MAAM,CAAC;QACT,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC;YACZ,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,qBAAc,CAAC,QAAQ,CAAC,CAAC;YAChD,KAAK;SACN,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,CAAC,iBAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;QAClC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAqB,EAAE,QAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC1G,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC;AAhCD,0CAgCC","sourcesContent":["import * as path from 'path';\nimport * as chokidar from 'chokidar';\nimport { Observer, Observable } from 'rxjs';\nimport { ensureUnixPath } from '../util/path';\nimport * as log from '../util/log';\n\nexport type FileWatchEvent = 'change' | 'unlink' | 'add' | 'unlinkDir' | 'addDir';\n\nexport interface FileChangedEvent {\n filePath: string;\n event: FileWatchEvent;\n}\n\nexport function createFileWatch(\n projectPath: string,\n ignoredPaths: (RegExp | string)[] = []\n): Observable<FileChangedEvent> {\n log.debug(`Watching for changes: projectPath: ${projectPath}, ignoredPaths: ${ignoredPaths}`);\n\n const watch = chokidar.watch(projectPath, {\n ignoreInitial: true,\n ignored: [...ignoredPaths, /((^[\\/\\\\])\\..)|(\\.js$)|(\\.map$)|(\\.metadata\\.json)/],\n persistent: true\n });\n\n const handleFileChange = (event: FileWatchEvent, filePath: string, observer: Observer<FileChangedEvent>) => {\n log.debug(`Watch: Path changed. Event: ${event}, Path: ${filePath}`);\n\n const ignoredEvents: FileWatchEvent[] = ['unlinkDir', 'addDir'];\n\n if (ignoredEvents.includes(event)) {\n // we don't need to trigger on directory removed or renamed as chokidar will fire the changes for each file\n return;\n }\n\n observer.next({\n filePath: path.resolve(ensureUnixPath(filePath)),\n event\n });\n };\n\n return Observable.create(observer => {\n watch.on('all', (event: FileWatchEvent, filePath: string) => handleFileChange(event, filePath, observer));\n return () => watch.close();\n });\n}\n"]}
1
+ {"version":3,"file":"file-watcher.js","sourceRoot":"","sources":["../../../src/lib/file/file-watcher.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,qCAAqC;AACrC,+BAA4C;AAC5C,uCAA8C;AAC9C,mCAAmC;AASnC,yBACE,WAAmB,EACnB,eAAoC,EAAE;IAEtC,GAAG,CAAC,KAAK,CAAC,sCAAsC,WAAW,mBAAmB,YAAY,EAAE,CAAC,CAAC;IAE9F,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE;QACxC,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,CAAC,GAAG,YAAY,EAAE,oDAAoD,CAAC;QAChF,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAG,CAAC,KAAqB,EAAE,QAAgB,EAAE,QAAoC,EAAE,EAAE;QACzG,GAAG,CAAC,KAAK,CAAC,+BAA+B,KAAK,WAAW,QAAQ,EAAE,CAAC,CAAC;QAErE,MAAM,aAAa,GAAqB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAEhE,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YACjC,2GAA2G;YAC3G,OAAO;SACR;QAED,QAAQ,CAAC,IAAI,CAAC;YACZ,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,qBAAc,CAAC,QAAQ,CAAC,CAAC;YAChD,KAAK;SACN,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,iBAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;QAClC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAqB,EAAE,QAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;QAC1G,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC;AAhCD,0CAgCC","sourcesContent":["import * as path from 'path';\nimport * as chokidar from 'chokidar';\nimport { Observer, Observable } from 'rxjs';\nimport { ensureUnixPath } from '../util/path';\nimport * as log from '../util/log';\n\nexport type FileWatchEvent = 'change' | 'unlink' | 'add' | 'unlinkDir' | 'addDir';\n\nexport interface FileChangedEvent {\n filePath: string;\n event: FileWatchEvent;\n}\n\nexport function createFileWatch(\n projectPath: string,\n ignoredPaths: (RegExp | string)[] = []\n): Observable<FileChangedEvent> {\n log.debug(`Watching for changes: projectPath: ${projectPath}, ignoredPaths: ${ignoredPaths}`);\n\n const watch = chokidar.watch(projectPath, {\n ignoreInitial: true,\n ignored: [...ignoredPaths, /((^[\\/\\\\])\\..)|(\\.js$)|(\\.map$)|(\\.metadata\\.json)/],\n persistent: true\n });\n\n const handleFileChange = (event: FileWatchEvent, filePath: string, observer: Observer<FileChangedEvent>) => {\n log.debug(`Watch: Path changed. Event: ${event}, Path: ${filePath}`);\n\n const ignoredEvents: FileWatchEvent[] = ['unlinkDir', 'addDir'];\n\n if (ignoredEvents.includes(event)) {\n // we don't need to trigger on directory removed or renamed as chokidar will fire the changes for each file\n return;\n }\n\n observer.next({\n filePath: path.resolve(ensureUnixPath(filePath)),\n event\n });\n };\n\n return Observable.create(observer => {\n watch.on('all', (event: FileWatchEvent, filePath: string) => handleFileChange(event, filePath, observer));\n return () => watch.close();\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"downlevel-transformer.js","sourceRoot":"","sources":["../../../src/lib/flatten/downlevel-transformer.ts"],"names":[],"mappings":";;AAAA,2CAA8G;AAE9G,6BAA6B;AAE7B,mCAAmC;AAEnC;;GAEG;AACH,MAAM,gBAAgB,GAAoB;IACxC,MAAM,EAAE,yBAAY,CAAC,GAAG;IACxB,MAAM,EAAE,uBAAU,CAAC,MAAM;IACzB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,kBAAkB,EAAE,IAAI;IACxB,gBAAgB,EAAE,iCAAoB,CAAC,MAAM;CAC9C,CAAC;AAEF;;;;GAIG;AACH,8BAAqC,IAAY,EAAE,QAAgB;IACjE,GAAG,CAAC,KAAK,CAAC,OAAO,QAAQ,EAAE,CAAC,CAAC;IAE7B,MAAM,eAAe,qBAChB,gBAAgB,IACnB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAChC,CAAC;IAEF,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,4BAAe,CAAC,IAAI,EAAE;QAC1D,eAAe;KAChB,CAAC,CAAC;IAEH,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;QACrB,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;KAC/B,CAAC,CAAC;AACL,CAAC;AAhBD,oDAgBC","sourcesContent":["import { ModuleKind, ScriptTarget, CompilerOptions, transpileModule, ModuleResolutionKind } from 'typescript';\nimport { RawSourceMap } from 'rollup';\nimport * as path from 'path';\n\nimport * as log from '../util/log';\n\n/**\n * Base `tsc` `CompilerOptions` shared among various downleveling methods.\n */\nconst COMPILER_OPTIONS: CompilerOptions = {\n target: ScriptTarget.ES5,\n module: ModuleKind.ES2015,\n allowJs: true,\n sourceMap: true,\n importHelpers: true,\n downlevelIteration: true,\n moduleResolution: ModuleResolutionKind.NodeJs\n};\n\n/**\n * Downlevels a .js file from `ES2015` to `ES5`. Internally, uses `tsc`.\n *\n * Required for some external as they contains `ES2015` syntax such as `const` and `let`\n */\nexport function downlevelCodeWithTsc(code: string, filePath: string): Promise<{ code: string; map: RawSourceMap }> {\n log.debug(`tsc ${filePath}`);\n\n const compilerOptions: CompilerOptions = {\n ...COMPILER_OPTIONS,\n mapRoot: path.dirname(filePath)\n };\n\n const { outputText, sourceMapText } = transpileModule(code, {\n compilerOptions\n });\n\n return Promise.resolve({\n code: outputText,\n map: JSON.parse(sourceMapText)\n });\n}\n"]}
1
+ {"version":3,"file":"downlevel-transformer.js","sourceRoot":"","sources":["../../../src/lib/flatten/downlevel-transformer.ts"],"names":[],"mappings":";;AAAA,2CAA8G;AAE9G,6BAA6B;AAE7B,mCAAmC;AAEnC;;GAEG;AACH,MAAM,gBAAgB,GAAoB;IACxC,MAAM,EAAE,yBAAY,CAAC,GAAG;IACxB,MAAM,EAAE,uBAAU,CAAC,MAAM;IACzB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,IAAI;IACnB,kBAAkB,EAAE,IAAI;IACxB,gBAAgB,EAAE,iCAAoB,CAAC,MAAM;CAC9C,CAAC;AAEF;;;;GAIG;AACH,8BAAqC,IAAY,EAAE,QAAgB;IACjE,GAAG,CAAC,KAAK,CAAC,OAAO,QAAQ,EAAE,CAAC,CAAC;IAE7B,MAAM,eAAe,qBAChB,gBAAgB,IACnB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAChC,CAAC;IAEF,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,4BAAe,CAAC,IAAI,EAAE;QAC1D,eAAe;KAChB,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,OAAO,CAAC;QACrB,IAAI,EAAE,UAAU;QAChB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;KAC/B,CAAC,CAAC;AACL,CAAC;AAhBD,oDAgBC","sourcesContent":["import { ModuleKind, ScriptTarget, CompilerOptions, transpileModule, ModuleResolutionKind } from 'typescript';\nimport { RawSourceMap } from 'rollup';\nimport * as path from 'path';\n\nimport * as log from '../util/log';\n\n/**\n * Base `tsc` `CompilerOptions` shared among various downleveling methods.\n */\nconst COMPILER_OPTIONS: CompilerOptions = {\n target: ScriptTarget.ES5,\n module: ModuleKind.ES2015,\n allowJs: true,\n sourceMap: true,\n importHelpers: true,\n downlevelIteration: true,\n moduleResolution: ModuleResolutionKind.NodeJs\n};\n\n/**\n * Downlevels a .js file from `ES2015` to `ES5`. Internally, uses `tsc`.\n *\n * Required for some external as they contains `ES2015` syntax such as `const` and `let`\n */\nexport function downlevelCodeWithTsc(code: string, filePath: string): Promise<{ code: string; map: RawSourceMap }> {\n log.debug(`tsc ${filePath}`);\n\n const compilerOptions: CompilerOptions = {\n ...COMPILER_OPTIONS,\n mapRoot: path.dirname(filePath)\n };\n\n const { outputText, sourceMapText } = transpileModule(code, {\n compilerOptions\n });\n\n return Promise.resolve({\n code: outputText,\n map: JSON.parse(sourceMapText)\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"external-module-id-strategy.js","sourceRoot":"","sources":["../../../src/lib/flatten/external-module-id-strategy.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAU7B;IACE,YAAoB,YAAiC,EAAU,cAA8B;QAAzE,iBAAY,GAAZ,YAAY,CAAqB;QAAU,mBAAc,GAAd,cAAc,CAAgB;IAAG,CAAC;IAEjG,8DAA8D;IAC9D,oBAAoB,CAAC,QAAgB;QACnC,oEAAoE;QACpE,yFAAyF;QACzF,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACtF,yGAAyG;YACzG,MAAM,CAAC,KAAK,CAAC;QACf,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACnD,EAAE,CAAC,CACD,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;YACtB,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,QAAQ,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACtE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAC9B,CAAC,CAAC,CAAC;YACD,MAAM,CAAC,KAAK,CAAC;QACf,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,yBAAyB;QACvB,MAAM,EAAE,mBAAmB,GAAG,EAAE,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC;QAE5E,qGAAqG;QACrG,qFAAqF;QACrF,qCAAqC;QACrC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,GAAG,CAAC,CAAC,wBAAwB;QACtC,CAAC;QAED,kDAAkD;QAClD,EAAE,CAAC,CAAC,mBAAmB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACrC,MAAM,CAAC,iBAAiB,CAAC;QAC3B,CAAC;QAED,wDAAwD;QACxD,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACtE,CAAC;CACF;AA7CD,4DA6CC","sourcesContent":["import * as path from 'path';\nimport * as rollup from 'rollup';\n\nexport interface DependencyList {\n /** Direct dependencies including peerDependencies and other entry points. */\n dependencies?: string[];\n /** Direct bundled dependencies */\n bundledDependencies?: string[];\n}\n\nexport class ExternalModuleIdStrategy {\n constructor(private moduleFormat: rollup.ModuleFormat, private dependencyList: DependencyList) {}\n\n /** Return true when moduleId is to be treated as external */\n isExternalDependency(moduleId: string): boolean {\n // more information about why we don't check for 'node_modules' path\n // https://github.com/rollup/rollup-plugin-node-resolve/issues/110#issuecomment-350353632\n if (path.isAbsolute(moduleId) || moduleId.startsWith('.') || moduleId.startsWith('/')) {\n // if it's either 'absolute', marked to embed, starts with a '.' or '/' or is the umd bundle and is tslib\n return false;\n }\n\n const externals = this.getNonBundledDependencies();\n if (\n Array.isArray(externals)\n ? !externals.some(x => x === moduleId || moduleId.startsWith(`${x}/`))\n : !externals.test(moduleId)\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Returns a array of strings or a RegExp of non-bundled dependencies.\n */\n getNonBundledDependencies(): string[] | RegExp {\n const { bundledDependencies = [], dependencies = [] } = this.dependencyList;\n\n // return catch all for when there are no 'bundledDependencies' is very important for secondary entry\n // as if this is not the case everything will be bundled in the secondary entry point\n // since no dependencies are defined.\n if (this.moduleFormat !== 'umd') {\n return /./; // catch all as external\n }\n\n // tslib should always be embeeded for umd modules\n if (bundledDependencies.length === 0) {\n return /^((?!tslib).)*$/;\n }\n\n // filter out dependencies that are meant to be external\n return dependencies.filter(x => bundledDependencies.indexOf(x) < 0);\n }\n}\n"]}
1
+ {"version":3,"file":"external-module-id-strategy.js","sourceRoot":"","sources":["../../../src/lib/flatten/external-module-id-strategy.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAU7B;IACE,YAAoB,YAAiC,EAAU,cAA8B;QAAzE,iBAAY,GAAZ,YAAY,CAAqB;QAAU,mBAAc,GAAd,cAAc,CAAgB;IAAG,CAAC;IAEjG,8DAA8D;IAC9D,oBAAoB,CAAC,QAAgB;QACnC,oEAAoE;QACpE,yFAAyF;QACzF,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACrF,yGAAyG;YACzG,OAAO,KAAK,CAAC;SACd;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACnD,IACE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;YACtB,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,QAAQ,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACtE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAC7B;YACA,OAAO,KAAK,CAAC;SACd;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,yBAAyB;QACvB,MAAM,EAAE,mBAAmB,GAAG,EAAE,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC;QAE5E,qGAAqG;QACrG,qFAAqF;QACrF,qCAAqC;QACrC,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,EAAE;YAC/B,OAAO,GAAG,CAAC,CAAC,wBAAwB;SACrC;QAED,kDAAkD;QAClD,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC,EAAE;YACpC,OAAO,iBAAiB,CAAC;SAC1B;QAED,wDAAwD;QACxD,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACtE,CAAC;CACF;AA7CD,4DA6CC","sourcesContent":["import * as path from 'path';\nimport * as rollup from 'rollup';\n\nexport interface DependencyList {\n /** Direct dependencies including peerDependencies and other entry points. */\n dependencies?: string[];\n /** Direct bundled dependencies */\n bundledDependencies?: string[];\n}\n\nexport class ExternalModuleIdStrategy {\n constructor(private moduleFormat: rollup.ModuleFormat, private dependencyList: DependencyList) {}\n\n /** Return true when moduleId is to be treated as external */\n isExternalDependency(moduleId: string): boolean {\n // more information about why we don't check for 'node_modules' path\n // https://github.com/rollup/rollup-plugin-node-resolve/issues/110#issuecomment-350353632\n if (path.isAbsolute(moduleId) || moduleId.startsWith('.') || moduleId.startsWith('/')) {\n // if it's either 'absolute', marked to embed, starts with a '.' or '/' or is the umd bundle and is tslib\n return false;\n }\n\n const externals = this.getNonBundledDependencies();\n if (\n Array.isArray(externals)\n ? !externals.some(x => x === moduleId || moduleId.startsWith(`${x}/`))\n : !externals.test(moduleId)\n ) {\n return false;\n }\n\n return true;\n }\n\n /**\n * Returns a array of strings or a RegExp of non-bundled dependencies.\n */\n getNonBundledDependencies(): string[] | RegExp {\n const { bundledDependencies = [], dependencies = [] } = this.dependencyList;\n\n // return catch all for when there are no 'bundledDependencies' is very important for secondary entry\n // as if this is not the case everything will be bundled in the secondary entry point\n // since no dependencies are defined.\n if (this.moduleFormat !== 'umd') {\n return /./; // catch all as external\n }\n\n // tslib should always be embeeded for umd modules\n if (bundledDependencies.length === 0) {\n return /^((?!tslib).)*$/;\n }\n\n // filter out dependencies that are meant to be external\n return dependencies.filter(x => bundledDependencies.indexOf(x) < 0);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"flatten.js","sourceRoot":"","sources":["../../../src/lib/flatten/flatten.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qCAA4C;AAC5C,qCAAwC;AACxC,mEAA+D;AA8B/D,uBAAoC,IAAiB;;QACnD,MAAM,CAAC,yBAAgB,CAAC;YACtB,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,KAAK,EAAE,IAAI,CAAC,SAAS;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC,CAAC;IACL,CAAC;CAAA;AATD,sCASC;AAED,sBAAmC,IAAiB;;QAClD,MAAM,CAAC,yBAAgB,CAAC;YACtB,SAAS,EAAE,4CAAoB;YAC/B,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,KAAK,EAAE,IAAI,CAAC,SAAS;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE;YACvB,YAAY,oBACP,IAAI,CAAC,YAAY,CACrB;YACD,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC,CAAC;IACL,CAAC;CAAA;AAdD,oCAcC;AAED,yBAAsC,SAAiB,EAAE,UAAkB;;QACzE,MAAM,CAAC,qBAAY,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;CAAA;AAFD,0CAEC","sourcesContent":["import { rollupBundleFile } from './rollup';\nimport { minifyJsFile } from './uglify';\nimport { downlevelCodeWithTsc } from './downlevel-transformer';\nimport { DependencyList } from './external-module-id-strategy';\n\nexport interface FlattenOpts {\n entryFile: string;\n destFile: string;\n flatModuleFile: string;\n\n /** ECMAScript module ID defined by the FESM bundles. */\n esmModuleId: string;\n\n /** UMD ID defined by the UMD bundle. */\n umdModuleId: string;\n\n /** Specifies the location where debugger should locate the sourcemaps */\n sourceRoot: string;\n\n /** AMD ID defined in the UMD bundle. */\n amdId?: string;\n\n /** Map of external UMD module IDs (dependencies). */\n umdModuleIds?: { [key: string]: string };\n\n /** A list of external dependencies that will not be embedded in the bundle. */\n externals?: string[] | RegExp;\n\n /** List of dependency which are found in package.json */\n dependencyList: DependencyList;\n}\n\nexport async function flattenToFesm(opts: FlattenOpts): Promise<void[]> {\n return rollupBundleFile({\n moduleName: opts.esmModuleId,\n entry: opts.entryFile,\n sourceRoot: opts.sourceRoot,\n format: 'es',\n dest: opts.destFile,\n dependencyList: opts.dependencyList\n });\n}\n\nexport async function flattenToUmd(opts: FlattenOpts): Promise<void[]> {\n return rollupBundleFile({\n transform: downlevelCodeWithTsc,\n moduleName: opts.umdModuleId,\n entry: opts.entryFile,\n sourceRoot: opts.sourceRoot,\n format: 'umd',\n dest: opts.destFile,\n amd: { id: opts.amdId },\n umdModuleIds: {\n ...opts.umdModuleIds\n },\n dependencyList: opts.dependencyList\n });\n}\n\nexport async function flattenToUmdMin(entryFile: string, outputFile: string): Promise<string> {\n return minifyJsFile(entryFile, outputFile);\n}\n"]}
1
+ {"version":3,"file":"flatten.js","sourceRoot":"","sources":["../../../src/lib/flatten/flatten.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,qCAA4C;AAC5C,qCAAwC;AACxC,mEAA+D;AA8B/D,uBAAoC,IAAiB;;QACnD,OAAO,yBAAgB,CAAC;YACtB,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,KAAK,EAAE,IAAI,CAAC,SAAS;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC,CAAC;IACL,CAAC;CAAA;AATD,sCASC;AAED,sBAAmC,IAAiB;;QAClD,OAAO,yBAAgB,CAAC;YACtB,SAAS,EAAE,4CAAoB;YAC/B,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,KAAK,EAAE,IAAI,CAAC,SAAS;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,GAAG,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE;YACvB,YAAY,oBACP,IAAI,CAAC,YAAY,CACrB;YACD,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC,CAAC;IACL,CAAC;CAAA;AAdD,oCAcC;AAED,yBAAsC,SAAiB,EAAE,UAAkB;;QACzE,OAAO,qBAAY,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;CAAA;AAFD,0CAEC","sourcesContent":["import { rollupBundleFile } from './rollup';\nimport { minifyJsFile } from './uglify';\nimport { downlevelCodeWithTsc } from './downlevel-transformer';\nimport { DependencyList } from './external-module-id-strategy';\n\nexport interface FlattenOpts {\n entryFile: string;\n destFile: string;\n flatModuleFile: string;\n\n /** ECMAScript module ID defined by the FESM bundles. */\n esmModuleId: string;\n\n /** UMD ID defined by the UMD bundle. */\n umdModuleId: string;\n\n /** Specifies the location where debugger should locate the sourcemaps */\n sourceRoot: string;\n\n /** AMD ID defined in the UMD bundle. */\n amdId?: string;\n\n /** Map of external UMD module IDs (dependencies). */\n umdModuleIds?: { [key: string]: string };\n\n /** A list of external dependencies that will not be embedded in the bundle. */\n externals?: string[] | RegExp;\n\n /** List of dependency which are found in package.json */\n dependencyList: DependencyList;\n}\n\nexport async function flattenToFesm(opts: FlattenOpts): Promise<void[]> {\n return rollupBundleFile({\n moduleName: opts.esmModuleId,\n entry: opts.entryFile,\n sourceRoot: opts.sourceRoot,\n format: 'es',\n dest: opts.destFile,\n dependencyList: opts.dependencyList\n });\n}\n\nexport async function flattenToUmd(opts: FlattenOpts): Promise<void[]> {\n return rollupBundleFile({\n transform: downlevelCodeWithTsc,\n moduleName: opts.umdModuleId,\n entry: opts.entryFile,\n sourceRoot: opts.sourceRoot,\n format: 'umd',\n dest: opts.destFile,\n amd: { id: opts.amdId },\n umdModuleIds: {\n ...opts.umdModuleIds\n },\n dependencyList: opts.dependencyList\n });\n}\n\nexport async function flattenToUmdMin(entryFile: string, outputFile: string): Promise<string> {\n return minifyJsFile(entryFile, outputFile);\n}\n"]}
@@ -68,6 +68,9 @@ function rollupBundleFile(opts) {
68
68
  else if (sourcePath.indexOf(opts.sourceRoot) > 0) {
69
69
  return sourcePath.substr(sourcePath.indexOf(mapRootUrl));
70
70
  }
71
+ else {
72
+ return sourcePath;
73
+ }
71
74
  });
72
75
  // rollup doesn't add a sourceMappingURL
73
76
  // https://github.com/rollup/rollup/issues/121
@@ -1 +1 @@
1
- {"version":3,"file":"rollup.js","sourceRoot":"","sources":["../../../src/lib/flatten/rollup.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,uDAAuD;AACvD,mDAAmD;AACnD,6BAA6B;AAC7B,mCAAmC;AACnC,+EAAyF;AACzF,qEAA+D;AAE/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8CAA8C;QAC9C,MAAM,CAAC,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,0BAA0B,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC;QAC3E,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,qBAAU,CAAC,iBAAiB,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,qBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC;CAAA;AA3DD,4CA2DC","sourcesContent":["import * as rollup from 'rollup';\nimport * as nodeResolve from 'rollup-plugin-node-resolve';\nimport * as sourcemaps from 'rollup-plugin-sourcemaps';\nimport * as commonJs from 'rollup-plugin-commonjs';\nimport * as path from 'path';\nimport * as log from '../util/log';\nimport { ExternalModuleIdStrategy, DependencyList } from './external-module-id-strategy';\nimport { umdModuleIdStrategy } from './umd-module-id-strategy';\nimport { TransformHook } from 'rollup';\nimport { outputFile, outputJson } from 'fs-extra';\n\n/**\n * Options used in `ng-packagr` for writing flat bundle files.\n *\n * These options are passed through to rollup.\n */\nexport interface RollupOptions {\n moduleName: string;\n entry: string;\n format: rollup.ModuleFormat;\n dest: string;\n sourceRoot: string;\n umdModuleIds?: { [key: string]: string };\n amd?: { id: string };\n transform?: TransformHook;\n dependencyList?: DependencyList;\n}\n\n/** Runs rollup over the given entry file, writes a bundle file. */\nexport async function rollupBundleFile(opts: RollupOptions): Promise<void[]> {\n log.debug(`rollup (v${rollup.VERSION}) ${opts.entry} to ${opts.dest} (${opts.format})`);\n\n const externalModuleIdStrategy = new ExternalModuleIdStrategy(opts.format, opts.dependencyList);\n\n // Create the bundle\n const bundle = await rollup.rollup({\n context: 'this',\n external: moduleId => externalModuleIdStrategy.isExternalDependency(moduleId),\n inlineDynamicImports: false,\n input: opts.entry,\n plugins: [nodeResolve(), commonJs(), sourcemaps(), { transform: opts.transform }],\n onwarn: warning => {\n if (typeof warning === 'string') {\n log.warn(warning);\n } else {\n if (warning.code === 'THIS_IS_UNDEFINED') {\n return;\n }\n\n log.warn(warning.message);\n }\n },\n preserveSymlinks: true\n });\n\n // Output the bundle to disk\n const sourcemapFullFile = `${opts.dest}.map`;\n const sourcemapFile = path.basename(sourcemapFullFile);\n const result = await bundle.generate({\n name: opts.moduleName,\n format: opts.format,\n amd: opts.amd,\n file: opts.dest,\n banner: '',\n globals: moduleId => umdModuleIdStrategy(moduleId, opts.umdModuleIds || {}),\n sourcemap: true,\n sourcemapFile\n });\n\n // relocate sourcemaps\n result.map.sources = result.map.sources.map(sourcePath => {\n if (!sourcePath) {\n return sourcePath;\n }\n\n // the replace here is because during the compilation one of the `/` gets lost sometimes\n const mapRootUrl = opts.sourceRoot.replace('//', '/');\n if (sourcePath.indexOf(mapRootUrl) > 0) {\n return `${opts.sourceRoot}${sourcePath.substr(sourcePath.indexOf(mapRootUrl) + mapRootUrl.length)}`;\n } else if (sourcePath.indexOf(opts.sourceRoot) > 0) {\n return sourcePath.substr(sourcePath.indexOf(mapRootUrl));\n }\n });\n\n // rollup doesn't add a sourceMappingURL\n // https://github.com/rollup/rollup/issues/121\n result.code = `${result.code}\\n//# sourceMappingURL=${result.map.toUrl()}`;\n return Promise.all([outputJson(sourcemapFullFile, result.map), outputFile(opts.dest, result.code)]);\n}\n"]}
1
+ {"version":3,"file":"rollup.js","sourceRoot":"","sources":["../../../src/lib/flatten/rollup.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAAiC;AACjC,0DAA0D;AAC1D,uDAAuD;AACvD,mDAAmD;AACnD,6BAA6B;AAC7B,mCAAmC;AACnC,+EAAyF;AACzF,qEAA+D;AAE/D,uCAAkD;AAmBlD,mEAAmE;AACnE,0BAAuC,IAAmB;;QACxD,GAAG,CAAC,KAAK,CAAC,YAAY,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAExF,MAA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'rollup-plugin-node-resolve';\nimport * as sourcemaps from 'rollup-plugin-sourcemaps';\nimport * as commonJs from 'rollup-plugin-commonjs';\nimport * as path from 'path';\nimport * as log from '../util/log';\nimport { ExternalModuleIdStrategy, DependencyList } from './external-module-id-strategy';\nimport { umdModuleIdStrategy } from './umd-module-id-strategy';\nimport { TransformHook } from 'rollup';\nimport { outputFile, outputJson } from 'fs-extra';\n\n/**\n * Options used in `ng-packagr` for writing flat bundle files.\n *\n * These options are passed through to rollup.\n */\nexport interface RollupOptions {\n moduleName: string;\n entry: string;\n format: rollup.ModuleFormat;\n dest: string;\n sourceRoot: string;\n umdModuleIds?: { [key: string]: string };\n amd?: { id: string };\n transform?: TransformHook;\n dependencyList?: DependencyList;\n}\n\n/** Runs rollup over the given entry file, writes a bundle file. */\nexport async function rollupBundleFile(opts: RollupOptions): Promise<void[]> {\n log.debug(`rollup (v${rollup.VERSION}) ${opts.entry} to ${opts.dest} (${opts.format})`);\n\n const externalModuleIdStrategy = new ExternalModuleIdStrategy(opts.format, opts.dependencyList);\n\n // Create the bundle\n const bundle = await rollup.rollup({\n context: 'this',\n external: moduleId => externalModuleIdStrategy.isExternalDependency(moduleId),\n inlineDynamicImports: false,\n input: opts.entry,\n plugins: [nodeResolve(), commonJs(), sourcemaps(), { transform: opts.transform }],\n onwarn: warning => {\n if (typeof warning === 'string') {\n log.warn(warning);\n } else {\n if (warning.code === 'THIS_IS_UNDEFINED') {\n return;\n }\n\n log.warn(warning.message);\n }\n },\n preserveSymlinks: true\n });\n\n // Output the bundle to disk\n const sourcemapFullFile = `${opts.dest}.map`;\n const sourcemapFile = path.basename(sourcemapFullFile);\n const result = await bundle.generate({\n name: opts.moduleName,\n format: opts.format,\n amd: opts.amd,\n file: opts.dest,\n banner: '',\n globals: moduleId => umdModuleIdStrategy(moduleId, opts.umdModuleIds || {}),\n sourcemap: true,\n sourcemapFile\n });\n\n // relocate sourcemaps\n result.map.sources = result.map.sources.map(sourcePath => {\n if (!sourcePath) {\n return sourcePath;\n }\n\n // the replace here is because during the compilation one of the `/` gets lost sometimes\n const mapRootUrl = opts.sourceRoot.replace('//', '/');\n if (sourcePath.indexOf(mapRootUrl) > 0) {\n return `${opts.sourceRoot}${sourcePath.substr(sourcePath.indexOf(mapRootUrl) + mapRootUrl.length)}`;\n } else if (sourcePath.indexOf(opts.sourceRoot) > 0) {\n return sourcePath.substr(sourcePath.indexOf(mapRootUrl));\n } else {\n return sourcePath;\n }\n });\n\n // rollup doesn't add a sourceMappingURL\n // https://github.com/rollup/rollup/issues/121\n result.code = `${result.code}\\n//# sourceMappingURL=${result.map.toUrl()}`;\n return Promise.all([outputJson(sourcemapFullFile, result.map), outputFile(opts.dest, result.code)]);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"uglify.js","sourceRoot":"","sources":["../../../src/lib/flatten/uglify.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,yCAAmC;AACnC,uCAA+C;AAC/C,+BAAgC;AAChC,uCAA4C;AAE5C,sBAAmC,SAAiB,EAAE,UAAmB;;QACvE,WAAK,CAAC,iBAAiB,SAAS,EAAE,CAAC,CAAC;QAEpC,MAAM,YAAY,GAAG,GAAG,UAAU,MAAM,CAAC;QACzC,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC,GAAa,MAAM,OAAO,CAAC,GAAG,CAAC;YAC1E,mBAAQ,CAAC,SAAS,CAAC;YACnB,mBAAQ,CAAC,GAAG,SAAS,MAAM,CAAC;SAC7B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,kBAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE;YAChD,SAAS,EAAE;gBACT,cAAc,EAAE,IAAI;gBACpB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC;gBACpD,GAAG,EAAE,eAAQ,CAAC,YAAY,CAAC;aAC5B;YACD,KAAK,EAAE;gBACL,YAAY,EAAE,IAAI;aACnB;YACD,GAAG,EAAE,IAAI;YACT,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,QAAQ,EAAE,MAAM;aACjB;SACF,CAAC,CAAC;QAEH,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YACpB,GAAG,CAAC,CAAC,MAAM,cAAc,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC7C,UAAI,CAAC,cAAc,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;QAED,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACjB,MAAM,MAAM,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,oBAAS,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,oBAAS,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC7F,MAAM,CAAC,UAAU,CAAC;IACpB,CAAC;CAAA;AArCD,oCAqCC","sourcesContent":["import { minify } from 'uglify-js';\nimport { writeFile, readFile } from 'fs-extra';\nimport { basename } from 'path';\nimport { debug, warn } from './../util/log';\n\nexport async function minifyJsFile(inputPath: string, outputPath?: string): Promise<string> {\n debug(`minifyJsFile: ${inputPath}`);\n\n const sourcemapOut = `${outputPath}.map`;\n const [inputFileBuffer, inputSourceMapBuffer]: Buffer[] = await Promise.all([\n readFile(inputPath),\n readFile(`${inputPath}.map`)\n ]);\n\n const result = minify(inputFileBuffer.toString(), {\n sourceMap: {\n includeSources: true,\n content: JSON.parse(inputSourceMapBuffer.toString()),\n url: basename(sourcemapOut)\n },\n parse: {\n bare_returns: true\n },\n ie8: true,\n warnings: true,\n output: {\n comments: 'some'\n }\n });\n\n if (result.warnings) {\n for (const warningMessage of result.warnings) {\n warn(warningMessage);\n }\n }\n\n if (result.error) {\n throw result.error;\n }\n\n await Promise.all([writeFile(outputPath, result.code), writeFile(sourcemapOut, result.map)]);\n return outputPath;\n}\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AAC,CAAC,CAAC;QAC7F,OAAO,UAAU,CAAC;IACpB,CAAC;CAAA;AArCD,oCAqCC","sourcesContent":["import { minify } from 'uglify-js';\nimport { writeFile, readFile } from 'fs-extra';\nimport { basename } from 'path';\nimport { debug, warn } from './../util/log';\n\nexport async function minifyJsFile(inputPath: string, outputPath?: string): Promise<string> {\n debug(`minifyJsFile: ${inputPath}`);\n\n const sourcemapOut = `${outputPath}.map`;\n const [inputFileBuffer, inputSourceMapBuffer]: Buffer[] = await Promise.all([\n readFile(inputPath),\n readFile(`${inputPath}.map`)\n ]);\n\n const result = minify(inputFileBuffer.toString(), {\n sourceMap: {\n includeSources: true,\n content: JSON.parse(inputSourceMapBuffer.toString()),\n url: basename(sourcemapOut)\n },\n parse: {\n bare_returns: true\n },\n ie8: true,\n warnings: true,\n output: {\n comments: 'some'\n }\n });\n\n if (result.warnings) {\n for (const warningMessage of result.warnings) {\n warn(warningMessage);\n }\n }\n\n if (result.error) {\n throw result.error;\n }\n\n await Promise.all([writeFile(outputPath, result.code), writeFile(sourcemapOut, result.map)]);\n return outputPath;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"umd-module-id-strategy.js","sourceRoot":"","sources":["../../../src/lib/flatten/umd-module-id-strategy.ts"],"names":[],"mappings":";;AAAa,QAAA,mBAAmB,GAAG,CAAC,QAAgB,EAAE,eAA0C,EAAE,EAAU,EAAE;IAC5G,IAAI,YAAgC,CAAC;IACrC,EAAE,CAAC,CAAC,CAAC,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,CAAC,YAAY,CAAC;IACtB,CAAC;IAED,IAAI,QAAQ,CAAC;IACb,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,6CAA6C,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,MAAM,CAAC,4BAA4B,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACvE,CAAC;IAED,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,qCAAqC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,CAAC,qBAAqB,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC;IAED,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACnD,MAAM,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACjD,CAAC;IAED,EAAE,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,MAAM,CAAC,QAAQ,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,CAAC;IAED,EAAE,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,EAAE,CAAC,CAAC,iDAAiD;AAC9D,CAAC,CAAC","sourcesContent":["export const umdModuleIdStrategy = (moduleId: string, umdModuleIds: { [key: string]: string } = {}): string => {\n let nameProvided: string | undefined;\n if ((nameProvided = umdModuleIds[moduleId])) {\n return nameProvided;\n }\n\n let regMatch;\n if ((regMatch = /^\\@angular\\/platform-browser-dynamic(\\/?.*)/.exec(moduleId))) {\n return `ng.platformBrowserDynamic${regMatch[1]}`.replace(/\\//g, '.');\n }\n\n if ((regMatch = /^\\@angular\\/platform-browser(\\/?.*)/.exec(moduleId))) {\n return `ng.platformBrowser${regMatch[1]}`.replace(/\\//g, '.');\n }\n\n if ((regMatch = /^\\@angular\\/(.+)/.exec(moduleId))) {\n return `ng.${regMatch[1]}`.replace(/\\//g, '.');\n }\n\n if (moduleId === 'rxjs') {\n return 'rxjs';\n }\n\n if ((regMatch = /^rxjs\\/(\\/?.*)/.exec(moduleId))) {\n return `rxjs.${regMatch[1]}`;\n }\n\n if (moduleId === 'tslib') {\n return 'tslib';\n }\n\n return ''; // leave it up to rollup to guess the global name\n};\n"]}
1
+ {"version":3,"file":"umd-module-id-strategy.js","sourceRoot":"","sources":["../../../src/lib/flatten/umd-module-id-strategy.ts"],"names":[],"mappings":";;AAAa,QAAA,mBAAmB,GAAG,CAAC,QAAgB,EAAE,eAA0C,EAAE,EAAU,EAAE;IAC5G,IAAI,YAAgC,CAAC;IACrC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE;QAC3C,OAAO,YAAY,CAAC;KACrB;IAED,IAAI,QAAQ,CAAC;IACb,IAAI,CAAC,QAAQ,GAAG,6CAA6C,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE;QAC7E,OAAO,4BAA4B,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KACtE;IAED,IAAI,CAAC,QAAQ,GAAG,qCAAqC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE;QACrE,OAAO,qBAAqB,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KAC/D;IAED,IAAI,CAAC,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE;QAClD,OAAO,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;KAChD;IAED,IAAI,QAAQ,KAAK,MAAM,EAAE;QACvB,OAAO,MAAM,CAAC;KACf;IAED,IAAI,CAAC,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE;QAChD,OAAO,QAAQ,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9B;IAED,IAAI,QAAQ,KAAK,OAAO,EAAE;QACxB,OAAO,OAAO,CAAC;KAChB;IAED,OAAO,EAAE,CAAC,CAAC,iDAAiD;AAC9D,CAAC,CAAC","sourcesContent":["export const umdModuleIdStrategy = (moduleId: string, umdModuleIds: { [key: string]: string } = {}): string => {\n let nameProvided: string | undefined;\n if ((nameProvided = umdModuleIds[moduleId])) {\n return nameProvided;\n }\n\n let regMatch;\n if ((regMatch = /^\\@angular\\/platform-browser-dynamic(\\/?.*)/.exec(moduleId))) {\n return `ng.platformBrowserDynamic${regMatch[1]}`.replace(/\\//g, '.');\n }\n\n if ((regMatch = /^\\@angular\\/platform-browser(\\/?.*)/.exec(moduleId))) {\n return `ng.platformBrowser${regMatch[1]}`.replace(/\\//g, '.');\n }\n\n if ((regMatch = /^\\@angular\\/(.+)/.exec(moduleId))) {\n return `ng.${regMatch[1]}`.replace(/\\//g, '.');\n }\n\n if (moduleId === 'rxjs') {\n return 'rxjs';\n }\n\n if ((regMatch = /^rxjs\\/(\\/?.*)/.exec(moduleId))) {\n return `rxjs.${regMatch[1]}`;\n }\n\n if (moduleId === 'tslib') {\n return 'tslib';\n }\n\n return ''; // leave it up to rollup to guess the global name\n};\n"]}
@@ -40,18 +40,18 @@ export declare class NgEntryPoint {
40
40
  /** Absolute directory path of this entry point's `package.json` location. */
41
41
  readonly basePath: string;
42
42
  /** XX: additional auto-configured data passed for scondary entry point's. Needs better docs. */
43
- private readonly secondaryData;
43
+ private readonly secondaryData?;
44
44
  constructor(
45
- /** Values from the `package.json` file of this entry point. */
46
- packageJson: any,
47
- /** Values from either the `ngPackage` option (from `package.json`) or values from `ng-package.json`. */
48
- ngPackageJson: NgPackageConfig,
49
- /** Corresponding JSON schema class instantiated from `ngPackageJson` values. */
50
- $schema: SchemaClass<NgPackageConfig>,
51
- /** Absolute directory path of this entry point's `package.json` location. */
52
- basePath: string,
53
- /** XX: additional auto-configured data passed for scondary entry point's. Needs better docs. */
54
- secondaryData?: {
45
+ /** Values from the `package.json` file of this entry point. */
46
+ packageJson: any,
47
+ /** Values from either the `ngPackage` option (from `package.json`) or values from `ng-package.json`. */
48
+ ngPackageJson: NgPackageConfig,
49
+ /** Corresponding JSON schema class instantiated from `ngPackageJson` values. */
50
+ $schema: SchemaClass<NgPackageConfig>,
51
+ /** Absolute directory path of this entry point's `package.json` location. */
52
+ basePath: string,
53
+ /** XX: additional auto-configured data passed for scondary entry point's. Needs better docs. */
54
+ secondaryData?: {
55
55
  [key: string]: any;
56
56
  });
57
57
  /** Absolute file path of the entry point's source code entry file. */
@@ -88,7 +88,7 @@ export declare class NgEntryPoint {
88
88
  * @link http://requirejs.org/docs/whyamd.html#namedmodules
89
89
  */
90
90
  readonly amdId: string;
91
- private flattenModuleId(separator?);
91
+ private flattenModuleId;
92
92
  /**
93
93
  * Enables the `"sideEffects": false` flag in `package.json`.
94
94
  * The flag is enabled and set to `false` by default which results in more aggressive optimizations applied by webpack v4 builds consuming the library.