isomorphic-region-loader 0.0.3 → 1.0.2

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.
@@ -0,0 +1,24 @@
1
+ # MyLib
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
+ > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXNvbW9ycGhpYy1yZWdpb24tbG9hZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vdG1wLWxpYnMtZm9yLWJ1bmRsZS9pc29tb3JwaGljLXJlZ2lvbi1sb2FkZXIvcHJvamVjdHMvaXNvbW9ycGhpYy1yZWdpb24tbG9hZGVyL3NyYy9pc29tb3JwaGljLXJlZ2lvbi1sb2FkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
@@ -0,0 +1,20 @@
1
+ /* */
2
+ /* */
3
+ function StripBrowserCode(content) {
4
+ /* */
5
+ /* */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* */
10
+ /* */
11
+ /* */
12
+ /* */
13
+ /* */
14
+ }
15
+ export { StripBrowserCode as StripBlockLoader };
16
+ /* */
17
+ /* */
18
+ /* */
19
+ export default StripBrowserCode;
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi90bXAtbGlicy1mb3ItYnVuZGxlL2lzb21vcnBoaWMtcmVnaW9uLWxvYWRlci9wcm9qZWN0cy9pc29tb3JwaGljLXJlZ2lvbi1sb2FkZXIvc3JjL2xpYi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxLQUFLO0FBQ0wsS0FBSztBQUdMLFNBQVMsZ0JBQWdCLENBQUMsT0FBTztJQUNqQyxLQUFLO0lBQ0wsS0FBSztJQUNMLEtBQUs7SUFDTCxLQUFLO0lBQ0wsS0FBSztJQUNMLEtBQUs7SUFDTCxLQUFLO0lBQ0wsS0FBSztJQUNMLEtBQUs7SUFDTCxLQUFLO0FBRUwsQ0FBQztBQUVELE9BQU8sRUFBRSxnQkFBZ0IsSUFBSSxnQkFBZ0IsRUFBRSxDQUFDO0FBQ2hELEtBQUs7QUFDTCxLQUFLO0FBQ0wsS0FBSztBQUVMLGVBQWUsZ0JBQWdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiAqL1xuLyogKi9cbiAgXG5cbmZ1bmN0aW9uIFN0cmlwQnJvd3NlckNvZGUoY29udGVudCkge1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbiAgXG59XG5cbmV4cG9ydCB7IFN0cmlwQnJvd3NlckNvZGUgYXMgU3RyaXBCbG9ja0xvYWRlciB9O1xuLyogKi9cbi8qICovXG4vKiAqL1xuICBcbmV4cG9ydCBkZWZhdWx0IFN0cmlwQnJvd3NlckNvZGU7XG4iXX0=
@@ -0,0 +1,2 @@
1
+ export * from './lib';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3RtcC1saWJzLWZvci1idW5kbGUvaXNvbW9ycGhpYy1yZWdpb24tbG9hZGVyL3Byb2plY3RzL2lzb21vcnBoaWMtcmVnaW9uLWxvYWRlci9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLE9BQU8sQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliJztcbiJdfQ==
@@ -0,0 +1,21 @@
1
+ /* */
2
+ /* */
3
+ function StripBrowserCode(content) {
4
+ /* */
5
+ /* */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* */
10
+ /* */
11
+ /* */
12
+ /* */
13
+ /* */
14
+ }
15
+
16
+ /**
17
+ * Generated bundle index. Do not edit.
18
+ */
19
+
20
+ export { StripBrowserCode as StripBlockLoader };
21
+ //# sourceMappingURL=isomorphic-region-loader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isomorphic-region-loader.mjs","sources":["../../../tmp-libs-for-bundle/isomorphic-region-loader/projects/isomorphic-region-loader/src/lib/index.ts","../../../tmp-libs-for-bundle/isomorphic-region-loader/projects/isomorphic-region-loader/src/isomorphic-region-loader.ts"],"sourcesContent":["/* */\n/* */\n \n\nfunction StripBrowserCode(content) {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\nexport { StripBrowserCode as StripBlockLoader };\n/* */\n/* */\n/* */\n \nexport default StripBrowserCode;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AAGA,SAAS,gBAAgB,CAAC,OAAO,EAAA;;;;;;;;;;;AAYjC;;AChBA;;AAEG;;;;"}
@@ -0,0 +1,21 @@
1
+ /* */
2
+ /* */
3
+ function StripBrowserCode(content) {
4
+ /* */
5
+ /* */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* */
10
+ /* */
11
+ /* */
12
+ /* */
13
+ /* */
14
+ }
15
+
16
+ /**
17
+ * Generated bundle index. Do not edit.
18
+ */
19
+
20
+ export { StripBrowserCode as StripBlockLoader };
21
+ //# sourceMappingURL=isomorphic-region-loader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isomorphic-region-loader.mjs","sources":["../../../tmp-libs-for-bundle/isomorphic-region-loader/projects/isomorphic-region-loader/src/lib/index.ts","../../../tmp-libs-for-bundle/isomorphic-region-loader/projects/isomorphic-region-loader/src/isomorphic-region-loader.ts"],"sourcesContent":["/* */\n/* */\n \n\nfunction StripBrowserCode(content) {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\nexport { StripBrowserCode as StripBlockLoader };\n/* */\n/* */\n/* */\n \nexport default StripBrowserCode;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AAGA,SAAS,gBAAgB,CAAC,OAAO,EAAA;;;;;;;;;;;AAYjC;;AChBA;;AAEG;;;;"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="isomorphic-region-loader" />
5
+ export * from './public-api';
@@ -0,0 +1,3 @@
1
+ declare function StripBrowserCode(content: any): void;
2
+ export { StripBrowserCode as StripBlockLoader };
3
+ export default StripBrowserCode;
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "isomorphic-region-loader",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^13.2.0",
6
+ "@angular/core": "^13.2.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "module": "fesm2015/isomorphic-region-loader.mjs",
12
+ "es2020": "fesm2020/isomorphic-region-loader.mjs",
13
+ "esm2020": "esm2020/isomorphic-region-loader.mjs",
14
+ "fesm2020": "fesm2020/isomorphic-region-loader.mjs",
15
+ "fesm2015": "fesm2015/isomorphic-region-loader.mjs",
16
+ "typings": "isomorphic-region-loader.d.ts",
17
+ "exports": {
18
+ "./package.json": {
19
+ "default": "./package.json"
20
+ },
21
+ ".": {
22
+ "types": "./isomorphic-region-loader.d.ts",
23
+ "esm2020": "./esm2020/isomorphic-region-loader.mjs",
24
+ "es2020": "./fesm2020/isomorphic-region-loader.mjs",
25
+ "es2015": "./fesm2015/isomorphic-region-loader.mjs",
26
+ "node": "./fesm2015/isomorphic-region-loader.mjs",
27
+ "default": "./fesm2020/isomorphic-region-loader.mjs"
28
+ }
29
+ },
30
+ "sideEffects": false
31
+ }
@@ -0,0 +1 @@
1
+ export * from './lib';
@@ -0,0 +1,24 @@
1
+ # MyLib
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
8
+ > Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXNvbW9ycGhpYy1yZWdpb24tbG9hZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vdG1wLWxpYnMtZm9yLWJ1bmRsZS9pc29tb3JwaGljLXJlZ2lvbi1sb2FkZXIvcHJvamVjdHMvaXNvbW9ycGhpYy1yZWdpb24tbG9hZGVyL3NyYy9pc29tb3JwaGljLXJlZ2lvbi1sb2FkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
@@ -0,0 +1,20 @@
1
+ /* */
2
+ /* */
3
+ function StripBrowserCode(content) {
4
+ /* */
5
+ /* */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* */
10
+ /* */
11
+ /* */
12
+ /* */
13
+ /* */
14
+ }
15
+ export { StripBrowserCode as StripBlockLoader };
16
+ /* */
17
+ /* */
18
+ /* */
19
+ export default StripBrowserCode;
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi90bXAtbGlicy1mb3ItYnVuZGxlL2lzb21vcnBoaWMtcmVnaW9uLWxvYWRlci9wcm9qZWN0cy9pc29tb3JwaGljLXJlZ2lvbi1sb2FkZXIvc3JjL2xpYi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxLQUFLO0FBQ0wsS0FBSztBQUdMLFNBQVMsZ0JBQWdCLENBQUMsT0FBTztJQUNqQyxLQUFLO0lBQ0wsS0FBSztJQUNMLEtBQUs7SUFDTCxLQUFLO0lBQ0wsS0FBSztJQUNMLEtBQUs7SUFDTCxLQUFLO0lBQ0wsS0FBSztJQUNMLEtBQUs7SUFDTCxLQUFLO0FBRUwsQ0FBQztBQUVELE9BQU8sRUFBRSxnQkFBZ0IsSUFBSSxnQkFBZ0IsRUFBRSxDQUFDO0FBQ2hELEtBQUs7QUFDTCxLQUFLO0FBQ0wsS0FBSztBQUVMLGVBQWUsZ0JBQWdCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiAqL1xuLyogKi9cbiAgXG5cbmZ1bmN0aW9uIFN0cmlwQnJvd3NlckNvZGUoY29udGVudCkge1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbi8qICovXG4vKiAqL1xuLyogKi9cbiAgXG59XG5cbmV4cG9ydCB7IFN0cmlwQnJvd3NlckNvZGUgYXMgU3RyaXBCbG9ja0xvYWRlciB9O1xuLyogKi9cbi8qICovXG4vKiAqL1xuICBcbmV4cG9ydCBkZWZhdWx0IFN0cmlwQnJvd3NlckNvZGU7XG4iXX0=
@@ -0,0 +1,2 @@
1
+ export * from './lib';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3RtcC1saWJzLWZvci1idW5kbGUvaXNvbW9ycGhpYy1yZWdpb24tbG9hZGVyL3Byb2plY3RzL2lzb21vcnBoaWMtcmVnaW9uLWxvYWRlci9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLE9BQU8sQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliJztcbiJdfQ==
@@ -0,0 +1,21 @@
1
+ /* */
2
+ /* */
3
+ function StripBrowserCode(content) {
4
+ /* */
5
+ /* */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* */
10
+ /* */
11
+ /* */
12
+ /* */
13
+ /* */
14
+ }
15
+
16
+ /**
17
+ * Generated bundle index. Do not edit.
18
+ */
19
+
20
+ export { StripBrowserCode as StripBlockLoader };
21
+ //# sourceMappingURL=isomorphic-region-loader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isomorphic-region-loader.mjs","sources":["../../../tmp-libs-for-bundle/isomorphic-region-loader/projects/isomorphic-region-loader/src/lib/index.ts","../../../tmp-libs-for-bundle/isomorphic-region-loader/projects/isomorphic-region-loader/src/isomorphic-region-loader.ts"],"sourcesContent":["/* */\n/* */\n \n\nfunction StripBrowserCode(content) {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\nexport { StripBrowserCode as StripBlockLoader };\n/* */\n/* */\n/* */\n \nexport default StripBrowserCode;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AAGA,SAAS,gBAAgB,CAAC,OAAO,EAAA;;;;;;;;;;;AAYjC;;AChBA;;AAEG;;;;"}
@@ -0,0 +1,21 @@
1
+ /* */
2
+ /* */
3
+ function StripBrowserCode(content) {
4
+ /* */
5
+ /* */
6
+ /* */
7
+ /* */
8
+ /* */
9
+ /* */
10
+ /* */
11
+ /* */
12
+ /* */
13
+ /* */
14
+ }
15
+
16
+ /**
17
+ * Generated bundle index. Do not edit.
18
+ */
19
+
20
+ export { StripBrowserCode as StripBlockLoader };
21
+ //# sourceMappingURL=isomorphic-region-loader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isomorphic-region-loader.mjs","sources":["../../../tmp-libs-for-bundle/isomorphic-region-loader/projects/isomorphic-region-loader/src/lib/index.ts","../../../tmp-libs-for-bundle/isomorphic-region-loader/projects/isomorphic-region-loader/src/isomorphic-region-loader.ts"],"sourcesContent":["/* */\n/* */\n \n\nfunction StripBrowserCode(content) {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\nexport { StripBrowserCode as StripBlockLoader };\n/* */\n/* */\n/* */\n \nexport default StripBrowserCode;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AAGA,SAAS,gBAAgB,CAAC,OAAO,EAAA;;;;;;;;;;;AAYjC;;AChBA;;AAEG;;;;"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="isomorphic-region-loader" />
5
+ export * from './public-api';
@@ -0,0 +1,3 @@
1
+ declare function StripBrowserCode(content: any): void;
2
+ export { StripBrowserCode as StripBlockLoader };
3
+ export default StripBrowserCode;
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "isomorphic-region-loader",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^13.2.0",
6
+ "@angular/core": "^13.2.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "module": "fesm2015/isomorphic-region-loader.mjs",
12
+ "es2020": "fesm2020/isomorphic-region-loader.mjs",
13
+ "esm2020": "esm2020/isomorphic-region-loader.mjs",
14
+ "fesm2020": "fesm2020/isomorphic-region-loader.mjs",
15
+ "fesm2015": "fesm2015/isomorphic-region-loader.mjs",
16
+ "typings": "isomorphic-region-loader.d.ts",
17
+ "exports": {
18
+ "./package.json": {
19
+ "default": "./package.json"
20
+ },
21
+ ".": {
22
+ "types": "./isomorphic-region-loader.d.ts",
23
+ "esm2020": "./esm2020/isomorphic-region-loader.mjs",
24
+ "es2020": "./fesm2020/isomorphic-region-loader.mjs",
25
+ "es2015": "./fesm2015/isomorphic-region-loader.mjs",
26
+ "node": "./fesm2015/isomorphic-region-loader.mjs",
27
+ "default": "./fesm2020/isomorphic-region-loader.mjs"
28
+ }
29
+ },
30
+ "sideEffects": false
31
+ }
@@ -0,0 +1 @@
1
+ export * from './lib';
package/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import def from './dist';
2
+ export * from './dist';
3
+ export default def;
4
+
package/index.js CHANGED
@@ -1,36 +1,466 @@
1
- var loaderUtils = require("loader-utils");
1
+ (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
2
+ /******/ // The module cache
3
+ /******/ var installedModules = {};
4
+ /******/
5
+ /******/ // The require function
6
+ /******/ function __webpack_require__(moduleId) {
7
+ /******/
8
+ /******/ // Check if module is in cache
9
+ /******/ if(installedModules[moduleId]) {
10
+ /******/ return installedModules[moduleId].exports;
11
+ /******/ }
12
+ /******/ // Create a new module (and put it into the cache)
13
+ /******/ var module = installedModules[moduleId] = {
14
+ /******/ i: moduleId,
15
+ /******/ l: false,
16
+ /******/ exports: {}
17
+ /******/ };
18
+ /******/
19
+ /******/ // Execute the module function
20
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+ /******/
22
+ /******/ // Flag the module as loaded
23
+ /******/ module.l = true;
24
+ /******/
25
+ /******/ // Return the exports of the module
26
+ /******/ return module.exports;
27
+ /******/ }
28
+ /******/
29
+ /******/
30
+ /******/ // expose the modules object (__webpack_modules__)
31
+ /******/ __webpack_require__.m = modules;
32
+ /******/
33
+ /******/ // expose the module cache
34
+ /******/ __webpack_require__.c = installedModules;
35
+ /******/
36
+ /******/ // define getter function for harmony exports
37
+ /******/ __webpack_require__.d = function(exports, name, getter) {
38
+ /******/ if(!__webpack_require__.o(exports, name)) {
39
+ /******/ Object.defineProperty(exports, name, {
40
+ /******/ configurable: false,
41
+ /******/ enumerable: true,
42
+ /******/ get: getter
43
+ /******/ });
44
+ /******/ }
45
+ /******/ };
46
+ /******/
47
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
48
+ /******/ __webpack_require__.n = function(module) {
49
+ /******/ var getter = module && module.__esModule ?
50
+ /******/ function getDefault() { return module['default']; } :
51
+ /******/ function getModuleExports() { return module; };
52
+ /******/ __webpack_require__.d(getter, 'a', getter);
53
+ /******/ return getter;
54
+ /******/ };
55
+ /******/
56
+ /******/ // Object.prototype.hasOwnProperty.call
57
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
+ /******/
59
+ /******/ // __webpack_public_path__
60
+ /******/ __webpack_require__.p = "";
61
+ /******/
62
+ /******/ // Load entry module and return exports
63
+ /******/ return __webpack_require__(__webpack_require__.s = 5);
64
+ /******/ })
65
+ /************************************************************************/
66
+ /******/ ([
67
+ /* 0 */
68
+ /***/ (function(module, exports) {
2
69
 
3
- function StripBlockLoader(content) {
4
- var options = loaderUtils.getOptions(this) || {};
5
- var platform = options.platform || 'browser';
6
- content = replaceModule(content, 'isomorphic-rest', 'isomorphic-rest/client')
7
- if (platform === 'browser') {
8
- content = replace(content, ["backend", "nodejs", "node"]);
70
+ module.exports = require("tnp-core");
9
71
 
10
- } else {
11
- content = replace(content, ["browser", "dom", "client"]);
12
- }
72
+ /***/ }),
73
+ /* 1 */
74
+ /***/ (function(module, exports) {
13
75
 
76
+ module.exports = require("tslib");
14
77
 
15
- if (this.cacheable) {
16
- this.cacheable(true);
17
- }
78
+ /***/ }),
79
+ /* 2 */
80
+ /***/ (function(module, exports, __webpack_require__) {
18
81
 
19
- return content;
20
- }
82
+ "use strict";
21
83
 
22
- function replaceModule(c, moduleName, destModulesName) {
23
- var es5 = new RegExp("require\\((\\'|\")" + moduleName + "(\\'|\")\\)", 'g');
24
- c = c.replace(es5, "require(\"" + destModulesName + "\")");
25
- return c;
84
+ Object.defineProperty(exports, "__esModule", { value: true });
85
+ exports.StripBlockLoader = void 0;
86
+ var tslib_1 = __webpack_require__(1);
87
+ //#region @backend
88
+ var region_remover_backend_1 = __webpack_require__(3);
89
+ //#endregion
90
+ function StripBrowserCode(content) {
91
+ //#region @backend
92
+ // @ts-ignore
93
+ content = region_remover_backend_1.RegionRemover.from(this.resourcePath, content, ['@browser']).output + '\n';
94
+ if (this.cacheable) {
95
+ this.cacheable(true);
96
+ }
97
+ return content;
98
+ //#endregion
26
99
  }
100
+ exports.StripBlockLoader = StripBrowserCode;
101
+ //#region @backend
102
+ (0, tslib_1.__exportStar)(__webpack_require__(3), exports);
103
+ (0, tslib_1.__exportStar)(__webpack_require__(4), exports);
104
+ //#endregion
105
+ exports.default = StripBrowserCode;
27
106
 
28
- function replace(c, words) {
29
- if (words.length === 0) return c;
30
- var word = words.shift();
31
- var regexPattern = new RegExp("[\\t ]*\\/\\/\\s*#?region\\s+" + word + " ?[\\s\\S]*?\\/\\/\\s*#?endregion ?[\\t ]*\\n?", "g")
32
- c = c.replace(regexPattern, '');
33
- return replace(c, words);
34
- }
35
107
 
36
- module.exports = StripBlockLoader;
108
+ /***/ }),
109
+ /* 3 */
110
+ /***/ (function(module, exports, __webpack_require__) {
111
+
112
+ "use strict";
113
+
114
+ Object.defineProperty(exports, "__esModule", { value: true });
115
+ exports.RegionRemover = void 0;
116
+ var tnp_core_1 = __webpack_require__(0);
117
+ // import { Models } from 'tnp-models';
118
+ var tnp_core_2 = __webpack_require__(0);
119
+ var region_backend_1 = __webpack_require__(4);
120
+ var REGEX_REGION = {
121
+ TS_JS_SCSS_SASS: {
122
+ START: new RegExp('\\/\\/\\s*\\#region'),
123
+ END: new RegExp('\\/\\/\\s*\\#endregion'),
124
+ },
125
+ HTML: {
126
+ START: new RegExp('\\<\\!\\-\\-\\s*\\#region'),
127
+ END: new RegExp('\\<\\!\\-\\-\\s*\\#endregion'),
128
+ },
129
+ CSS: {
130
+ START: new RegExp('\\/\\*\\s*\\#region'),
131
+ END: new RegExp('\\/\\*\\s*\\#endregion'),
132
+ },
133
+ };
134
+ var RegionRemover = /** @class */ (function () {
135
+ function RegionRemover(fileAbsolutePath, fileExtension, content, replacementss, // Models.dev.Replacement[],
136
+ project) {
137
+ this.fileAbsolutePath = fileAbsolutePath;
138
+ this.content = content;
139
+ this.project = project;
140
+ this.START_REGION = [];
141
+ this.END_REGION = [];
142
+ if (['js', 'ts', 'scss', 'sass'].includes(fileExtension)) {
143
+ this.START_REGION.push(REGEX_REGION.TS_JS_SCSS_SASS.START);
144
+ this.END_REGION.push(REGEX_REGION.TS_JS_SCSS_SASS.END);
145
+ }
146
+ if (['html'].includes(fileExtension)) {
147
+ this.START_REGION.push(REGEX_REGION.HTML.START);
148
+ this.END_REGION.push(REGEX_REGION.HTML.END);
149
+ }
150
+ if (['scss', 'sass', 'css'].includes(fileExtension)) {
151
+ this.START_REGION.push(REGEX_REGION.CSS.START);
152
+ this.END_REGION.push(REGEX_REGION.CSS.END);
153
+ }
154
+ var lines = this.content.split('\n');
155
+ this.root = new region_backend_1.Region(this, replacementss, void 0, 0, (lines.length - 1), tnp_core_1._.first(lines), tnp_core_1._.last(lines), lines);
156
+ this.tree(this.root);
157
+ }
158
+ RegionRemover.from = function (absoluteFilePath, content, replacementss, // Models.dev.Replacement[],
159
+ project) {
160
+ if (!tnp_core_1.path.isAbsolute(absoluteFilePath)) {
161
+ tnp_core_2.Helpers.error("[region-remover][from] path is not absolute:\n \"".concat(absoluteFilePath, "\"\n "), false, true);
162
+ }
163
+ var fileExtension = tnp_core_1.path.extname(absoluteFilePath);
164
+ if (fileExtension.startsWith('.')) {
165
+ fileExtension = fileExtension.replace('.', '');
166
+ }
167
+ if (!replacementss) {
168
+ replacementss = [
169
+ ['@backendFunc', "return (void 0);"],
170
+ '@backend',
171
+ ];
172
+ }
173
+ return new RegionRemover(absoluteFilePath, fileExtension, content, replacementss, project);
174
+ };
175
+ RegionRemover.prototype.matchStartRegion = function (l) {
176
+ var res = !tnp_core_1._.isUndefined(this.START_REGION.find(function (r) { return l.match(r); }));
177
+ return res;
178
+ };
179
+ RegionRemover.prototype.matchEndRegion = function (l) {
180
+ var res = !tnp_core_1._.isUndefined(this.END_REGION.find(function (r) { return l.match(r); }));
181
+ return res;
182
+ };
183
+ RegionRemover.prototype.tree = function (node) {
184
+ var contentLines = node.contentLines;
185
+ // if (contentLines.length <= 3) {
186
+ // for (let i = 0; i < contentLines.length; i++) {
187
+ // const l = contentLines[i];
188
+ // node.addNormalLine(l, i);
189
+ // }
190
+ // } else {
191
+ var stack = 0;
192
+ for (var i = 0; i < contentLines.length; i++) {
193
+ var l = contentLines[i];
194
+ if (!node.isRoot) {
195
+ if (i === 0) {
196
+ node.addNormalLine(l, 0);
197
+ continue;
198
+ }
199
+ if (i === (node.contentLines.length - 1)) {
200
+ node.addNormalLine(l, i);
201
+ continue;
202
+ }
203
+ }
204
+ if (node.lastRegionWithoutEnd) {
205
+ if (this.matchStartRegion(l)) {
206
+ node.addNormalLineToLastRegion(l, i);
207
+ stack++;
208
+ }
209
+ else if (this.matchEndRegion(l)) {
210
+ if (stack === 0) {
211
+ node.endLastRegion(i, l);
212
+ }
213
+ else if (stack > 0) {
214
+ node.addNormalLineToLastRegion(l, i);
215
+ stack--;
216
+ }
217
+ }
218
+ else {
219
+ if (i === (node.contentLines.length - (node.isRoot ? 1 : 2))) {
220
+ stack = 0;
221
+ node.endLastRegion(i, l);
222
+ }
223
+ else {
224
+ node.addNormalLineToLastRegion(l, i);
225
+ }
226
+ }
227
+ }
228
+ else {
229
+ if (this.matchStartRegion(l)) {
230
+ node.addRegion(this, node, i, l);
231
+ }
232
+ else if (this.matchEndRegion(l)) {
233
+ node.addNormalLine(l, i);
234
+ }
235
+ else {
236
+ node.addNormalLine(l, i);
237
+ }
238
+ }
239
+ }
240
+ // }
241
+ var children = node.regions;
242
+ if (children.length > 0) {
243
+ for (var index = 0; index < children.length; index++) {
244
+ var child = children[index];
245
+ this.tree(child);
246
+ }
247
+ }
248
+ };
249
+ Object.defineProperty(RegionRemover.prototype, "output", {
250
+ get: function () {
251
+ return this.root.toString().trimLeft();
252
+ },
253
+ enumerable: false,
254
+ configurable: true
255
+ });
256
+ return RegionRemover;
257
+ }());
258
+ exports.RegionRemover = RegionRemover;
259
+
260
+
261
+ /***/ }),
262
+ /* 4 */
263
+ /***/ (function(module, exports, __webpack_require__) {
264
+
265
+ "use strict";
266
+
267
+ Object.defineProperty(exports, "__esModule", { value: true });
268
+ exports.Region = void 0;
269
+ var tnp_core_1 = __webpack_require__(0);
270
+ var tnp_models_1 = __webpack_require__(6);
271
+ var Region = /** @class */ (function () {
272
+ function Region(context, replacementss, parent, startIndex, endIndex, lineStart, lineEnd, contentLines) {
273
+ if (contentLines === void 0) { contentLines = []; }
274
+ this.context = context;
275
+ this.replacementss = replacementss;
276
+ this.parent = parent;
277
+ this.startIndex = startIndex;
278
+ this.endIndex = endIndex;
279
+ this.lineStart = lineStart;
280
+ this.lineEnd = lineEnd;
281
+ this.contentLines = contentLines;
282
+ this.regionsOrStrings = [];
283
+ }
284
+ Object.defineProperty(Region.prototype, "hasEnd", {
285
+ get: function () {
286
+ return this.endIndex !== void 0;
287
+ },
288
+ enumerable: false,
289
+ configurable: true
290
+ });
291
+ Object.defineProperty(Region.prototype, "lastRegionWithoutEnd", {
292
+ get: function () {
293
+ var last = tnp_core_1._.last(this.regionsOrStrings);
294
+ if (last instanceof Region && !last.hasEnd) {
295
+ return last;
296
+ }
297
+ return void 0;
298
+ },
299
+ enumerable: false,
300
+ configurable: true
301
+ });
302
+ Object.defineProperty(Region.prototype, "regions", {
303
+ get: function () {
304
+ return this.regionsOrStrings.filter(function (f) { return f instanceof Region; });
305
+ },
306
+ enumerable: false,
307
+ configurable: true
308
+ });
309
+ Region.prototype.setEnd = function (endIndex, lineEnd) {
310
+ this.endIndex = endIndex;
311
+ this.lineEnd = lineEnd;
312
+ };
313
+ Object.defineProperty(Region.prototype, "isRoot", {
314
+ get: function () {
315
+ return !this.parent;
316
+ },
317
+ enumerable: false,
318
+ configurable: true
319
+ });
320
+ Region.prototype.addNormalLine = function (l, lineIndex) {
321
+ this.contentLines[lineIndex] = void 0;
322
+ this.regionsOrStrings.push(l);
323
+ };
324
+ Region.prototype.addNormalLineToLastRegion = function (l, lineIndex) {
325
+ this.contentLines[lineIndex] = void 0;
326
+ this.lastRegionWithoutEnd.contentLines.push(l);
327
+ };
328
+ Region.prototype.addRegion = function (context, parent, startIndex, lineStart) {
329
+ this.contentLines[startIndex] = void 0;
330
+ var newReg = new Region(context, this.replacementss, parent, startIndex, void 0, lineStart, void 0, [lineStart]);
331
+ this.regionsOrStrings.push(newReg);
332
+ };
333
+ Region.prototype.endLastRegion = function (endIndex, lineEnd) {
334
+ this.contentLines[endIndex] = void 0;
335
+ var regionWithoutEnd = this.regionsOrStrings.find(function (r) { return r instanceof Region && !r.hasEnd; });
336
+ regionWithoutEnd.contentLines.push(lineEnd);
337
+ regionWithoutEnd.setEnd(endIndex, lineEnd);
338
+ };
339
+ Region.prototype.containsTitle = function (s) {
340
+ var res = (this.titleString.search(s) !== -1);
341
+ // Helpers.log(`checking tag (${res}): "${s}" in line: "${this.titleString}"`)
342
+ return res;
343
+ };
344
+ Object.defineProperty(Region.prototype, "titleString", {
345
+ get: function () {
346
+ var line = this.lineStart;
347
+ var regionWord = '#region';
348
+ var indexOfRegion = line.search(regionWord);
349
+ line = line.replace(line.slice(0, indexOfRegion + regionWord.length), '');
350
+ return line
351
+ .replace('-->', '')
352
+ .replace('<!--', ''); // TODO not necessery ?
353
+ },
354
+ enumerable: false,
355
+ configurable: true
356
+ });
357
+ Region.prototype.toString = function () {
358
+ var _this = this;
359
+ if (this.tmpOutput !== void 0) {
360
+ return this.tmpOutput;
361
+ }
362
+ var previous = '';
363
+ this.tmpOutput = this.regionsOrStrings
364
+ .map(function (regionOrString) {
365
+ if (regionOrString instanceof Region) {
366
+ //#region handle region
367
+ var replacements = _this.replacementss;
368
+ for (var index = 0; index < replacements.length; index++) {
369
+ var rep = replacements[index];
370
+ var isArr = tnp_core_1._.isArray(replacements[index]);
371
+ var regionTag = (isArr ? tnp_core_1._.first(rep) : rep);
372
+ var out = (isArr ? rep[1] : '');
373
+ var verticalLength = regionOrString.toString().split('\n').length - 1;
374
+ if (regionOrString.containsTitle(regionTag)) {
375
+ if (regionTag.toLowerCase() === '@backend'.toLowerCase()) {
376
+ out = "".concat(tnp_core_1._.times(verticalLength).map(function () { return tnp_models_1.Models.label.backendCode + '\n'; }).join(''), " ").concat(out);
377
+ }
378
+ if (regionTag.toLowerCase() === '@notForNpm'.toLowerCase()) {
379
+ out = "".concat(tnp_core_1._.times(verticalLength).map(function () { return tnp_models_1.Models.label.notForNpmCode + '\n'; }).join(''), " ").concat(out);
380
+ }
381
+ if (regionTag.toLowerCase() === '@browser'.toLowerCase()) {
382
+ out = "".concat(tnp_core_1._.times(verticalLength).map(function () { return tnp_models_1.Models.label.browserCode + '\n'; }).join(''), " ").concat(out);
383
+ }
384
+ if (regionTag.toLowerCase() === '@backendFunc'.toLowerCase()) {
385
+ var spacesPrevious = previous.search(/\S/);
386
+ spacesPrevious = (spacesPrevious < 0 ? 0 : spacesPrevious);
387
+ out = "".concat(tnp_core_1._.times(verticalLength).map(function () { return tnp_models_1.Models.label.backendCode + '\n'; }).join(''))
388
+ + "".concat(tnp_core_1._.times(spacesPrevious).map(function (n) { return ' '; }).join(''), " ").concat(out);
389
+ }
390
+ if (regionTag.toLowerCase() === '@cutCodeIfTrue'.toLowerCase()
391
+ ||
392
+ regionTag.toLowerCase() === '@cutCodeIfFalse'.toLowerCase()) {
393
+ var fn = out; // as ReturnType<typeof codeCuttFn>;
394
+ var expressionToExecute = regionOrString.titleString;
395
+ // Helpers.log(`LINE: "${regionOrString.lineStart}"`);
396
+ expressionToExecute = expressionToExecute.replace(regionTag, '');
397
+ // Helpers.log(`Expresion to evaluate "${expressionToExecute}"`);
398
+ // Helpers.log(`this.project "${this.project.name}"`);
399
+ var configForProject = _this.project && _this.project.env.config;
400
+ // Helpers.log(`configForProject "${configForProject}"`);
401
+ var cutCode = fn(expressionToExecute, configForProject, _this.absoluteFilePath);
402
+ // Helpers.info(`Cut code: "${cutCode}"`);
403
+ if (cutCode === null) {
404
+ continue;
405
+ }
406
+ if ((cutCode && (regionTag.toLowerCase() === '@cutCodeIfTrue'.toLowerCase()))
407
+ ||
408
+ (!cutCode && (regionTag.toLowerCase() === '@cutCodeIfFalse'.toLowerCase()))) {
409
+ out = '';
410
+ }
411
+ else {
412
+ continue;
413
+ }
414
+ }
415
+ regionOrString.tmpOutput = out;
416
+ break;
417
+ }
418
+ }
419
+ //#endregion
420
+ }
421
+ var res = regionOrString.toString();
422
+ previous = res;
423
+ return res;
424
+ }).join('\n');
425
+ return this.tmpOutput;
426
+ };
427
+ Object.defineProperty(Region.prototype, "project", {
428
+ get: function () {
429
+ return this.context.project;
430
+ },
431
+ enumerable: false,
432
+ configurable: true
433
+ });
434
+ Object.defineProperty(Region.prototype, "absoluteFilePath", {
435
+ get: function () {
436
+ return this.context.fileAbsolutePath;
437
+ },
438
+ enumerable: false,
439
+ configurable: true
440
+ });
441
+ return Region;
442
+ }());
443
+ exports.Region = Region;
444
+
445
+
446
+ /***/ }),
447
+ /* 5 */
448
+ /***/ (function(module, exports, __webpack_require__) {
449
+
450
+ "use strict";
451
+
452
+ Object.defineProperty(exports, "__esModule", { value: true });
453
+ var tslib_1 = __webpack_require__(1);
454
+ var lib_1 = __webpack_require__(2);
455
+ (0, tslib_1.__exportStar)(__webpack_require__(2), exports);
456
+ exports.default = lib_1.default;
457
+
458
+
459
+ /***/ }),
460
+ /* 6 */
461
+ /***/ (function(module, exports) {
462
+
463
+ module.exports = require("tnp-models");
464
+
465
+ /***/ })
466
+ /******/ ])));
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
- "name": "isomorphic-region-loader",
3
- "version": "0.0.3",
4
- "author": "Dariusz Filipiak @darekf77",
5
- "license": "MIT",
6
- "devDependencies": {
7
- "loader-utils": "^1.1.0"
8
- }
9
- }
2
+ "name": "isomorphic-region-loader",
3
+ "version": "1.0.2",
4
+ "author": "Dariusz Filipiak @darekf77",
5
+ "license": "MIT",
6
+ "devDependencies": {},
7
+ "dependencies": {},
8
+ "private": false
9
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "loader-utils": "^1.1.0"
3
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "resources": [],
3
+ "overrided": {
4
+ "linkedFolders": [],
5
+ "ignoreDepsPattern": [
6
+ "*"
7
+ ],
8
+ "includeAsDev": [],
9
+ "includeOnly": [],
10
+ "dependencies": {}
11
+ },
12
+ "linkedProjects": [],
13
+ "libReleaseOptions": {
14
+ "nodts": false,
15
+ "obscure": false,
16
+ "ugly": false
17
+ },
18
+ "license": "MIT",
19
+ "author": "Dariusz Filipiak @darekf77",
20
+ "type": "isomorphic-lib",
21
+ "version": "v3",
22
+ "private": false
23
+ }
@@ -0,0 +1,294 @@
1
+ {
2
+ "domain": "isomorphic-region-loader.example.domain.com",
3
+ "name": "local",
4
+ "isCoreProject": false,
5
+ "ip": "localhost",
6
+ "packageJSON": {
7
+ "tnp": {
8
+ "resources": [],
9
+ "overrided": {
10
+ "linkedFolders": [],
11
+ "ignoreDepsPattern": [
12
+ "*"
13
+ ],
14
+ "includeAsDev": [],
15
+ "includeOnly": [],
16
+ "dependencies": {}
17
+ },
18
+ "linkedProjects": [],
19
+ "libReleaseOptions": {
20
+ "nodts": false,
21
+ "obscure": false,
22
+ "ugly": false
23
+ },
24
+ "license": "MIT",
25
+ "author": "Dariusz Filipiak @darekf77",
26
+ "type": "isomorphic-lib",
27
+ "version": "v3",
28
+ "private": false
29
+ },
30
+ "name": "isomorphic-region-loader",
31
+ "version": "1.0.2",
32
+ "author": "Dariusz Filipiak @darekf77",
33
+ "license": "MIT",
34
+ "devDependencies": {},
35
+ "dependencies": {
36
+ "@angular-devkit/build-angular": "~13.2.5",
37
+ "@angular-devkit/core": "~13.2.6",
38
+ "@angular/animations": "~13.2.0",
39
+ "@angular/cdk": "~13.2.4",
40
+ "@angular/cli": "~13.2.5",
41
+ "@angular/common": "~13.2.0",
42
+ "@angular/compiler": "~13.2.0",
43
+ "@angular/compiler-cli": "~13.2.0",
44
+ "@angular/core": "~13.2.0",
45
+ "@angular/flex-layout": "~13.0.0-beta.38",
46
+ "@angular/forms": "~13.2.0",
47
+ "@angular/material": "~13.2.4",
48
+ "@angular/platform-browser": "~13.2.0",
49
+ "@angular/platform-browser-dynamic": "~13.2.0",
50
+ "@angular/pwa": "~13.2.5",
51
+ "@angular/router": "~13.2.0",
52
+ "@angular/service-worker": "~13.2.0",
53
+ "@iconify/icons-fa-solid": "1.2.2",
54
+ "@iconify/icons-mdi": "1.2.1",
55
+ "@mdi/js": "6.5.95",
56
+ "@ngrx/component-store": "~13.0.2",
57
+ "@ngrx/data": "~13.0.2",
58
+ "@ngrx/effects": "~13.0.2",
59
+ "@ngrx/entity": "~13.0.2",
60
+ "@ngrx/router-store": "~13.0.2",
61
+ "@ngrx/schematics": "~13.0.2",
62
+ "@ngrx/store": "~13.0.2",
63
+ "@ngrx/store-devtools": "~13.0.2",
64
+ "@ngx-formly/bootstrap": "6.0.0-next.8",
65
+ "@ngx-formly/core": "6.0.0-next.8",
66
+ "@ngx-formly/ionic": "6.0.0-next.8",
67
+ "@ngx-formly/material": "6.0.0-next.8",
68
+ "@ngx-loading-bar/core": "6.0.2",
69
+ "@ngx-loading-bar/http-client": "6.0.2",
70
+ "@ngx-loading-bar/router": "6.0.2",
71
+ "@ngx-translate/core": "14.0.0",
72
+ "@ngx-translate/http-loader": "7.0.0",
73
+ "@swimlane/ngx-datatable": "20.0.0",
74
+ "@types/chai": "4.1.2",
75
+ "@types/chokidar": "2.1.3",
76
+ "@types/dateformat": "1.0.1",
77
+ "@types/diff": "3.2.2",
78
+ "@types/express": "4.11.0",
79
+ "@types/express-fileupload": "0.1.1",
80
+ "@types/fs-extra": "7.0.0",
81
+ "@types/glob": "5.0.35",
82
+ "@types/http-proxy": "1.16.0",
83
+ "@types/http-proxy-middleware": "0.19.2",
84
+ "@types/inquirer": "7.3.1",
85
+ "@types/jasmine": "3.10.0",
86
+ "@types/json-stringify-safe": "5.0.0",
87
+ "@types/json5": "0.0.29",
88
+ "@types/lockfile": "1.0.0",
89
+ "@types/lodash": "4.14.92",
90
+ "@types/lowdb": "1.0.6",
91
+ "@types/mocha": "5.2.5",
92
+ "@types/node": "12.11.1",
93
+ "@types/node-notifier": "5.4.0",
94
+ "@types/oauth2orize": "1.8.0",
95
+ "@types/password-hash": "1.2.19",
96
+ "@types/progress": "2.0.3",
97
+ "@types/q": "1.5.5",
98
+ "@types/rimraf": "2.0.2",
99
+ "@types/semver": "6.0.1",
100
+ "@types/systeminformation": "3.23.0",
101
+ "@types/vinyl": "2.0.2",
102
+ "@types/watch": "1.0.0",
103
+ "accepts": "1.3.4",
104
+ "axios": "0.17.1",
105
+ "babel-cli": "6.26.0",
106
+ "babel-core": "6.25.0",
107
+ "babel-preset-env": "1.7.0",
108
+ "babel-preset-es2015": "6.24.1",
109
+ "background-worker-process": "~13.0.20",
110
+ "bcryptjs": "2.4.3",
111
+ "better-sqlite3": "7.5.1",
112
+ "body-parser": "1.18.2",
113
+ "bootstrap": "5.1.3",
114
+ "bs4-breakpoint": "13.0.28",
115
+ "buffer-shims": "1.0.0",
116
+ "callsite-record": "4.1.3",
117
+ "chai": "4.2.0",
118
+ "chalk": "2.3.2",
119
+ "check-node-version": "3.2.0",
120
+ "cheerio": "1.0.0-rc.3",
121
+ "chokidar": "3.5.1",
122
+ "circular-json": "0.5.1",
123
+ "command-exists": "1.2.2",
124
+ "compression": "1.7.4",
125
+ "concurrently": "3.5.1",
126
+ "content-type": "1.0.4",
127
+ "cookie-parser": "1.4.3",
128
+ "copy-paste": "1.3.0",
129
+ "cors": "2.8.4",
130
+ "cpr": "3.0.1",
131
+ "cross-spawn": "7.0.3",
132
+ "dateformat": "3.0.3",
133
+ "detect-mocha": "0.1.0",
134
+ "diff": "3.2.0",
135
+ "element-resize-detector": "1.1.15",
136
+ "enquirer": "2.3.0",
137
+ "enum-values": "1.2.1",
138
+ "errorhandler": "1.5.0",
139
+ "eslint": "7.13.0",
140
+ "eslint-plugin-import": "2.22.1",
141
+ "eslint-plugin-jsdoc": "30.7.8",
142
+ "eslint-plugin-prefer-arrow": "1.2.2",
143
+ "express": "4.16.3",
144
+ "express-fileupload": "0.4.0",
145
+ "express-session": "1.17.3",
146
+ "fbgraph": "1.4.1",
147
+ "file-loader": "1.1.5",
148
+ "firedev": "^13",
149
+ "firedev-crud": "~13.0.28",
150
+ "firedev-crud-deamon": "~13.0.19",
151
+ "firedev-ports": "~13.0.22",
152
+ "firedev-storage": "~13.0.14",
153
+ "fkill": "6.1.0",
154
+ "font-awesome": "4.7.0",
155
+ "fs-extra": "8.1.0",
156
+ "fuzzy": "0.1.3",
157
+ "glob": "7.1.2",
158
+ "gulp": "3.9.1",
159
+ "hostile": "1.3.3",
160
+ "http-proxy": "1.16.2",
161
+ "http-proxy-middleware": "0.19.1",
162
+ "http-server": "0.11.1",
163
+ "incremental-compiler": "~13.0.20",
164
+ "inquirer": "7.3.3",
165
+ "inquirer-autocomplete-prompt": "1.3.0",
166
+ "is-elevated": "3.0.0",
167
+ "istanbul-instrumenter-loader": "2.0.0",
168
+ "jasmine-core": "4.0.0",
169
+ "jscodeshift": "0.6.3",
170
+ "json-stringify-safe": "5.0.1",
171
+ "json10": "~13.0.19",
172
+ "json10-writer": "~13.0.19",
173
+ "json5": "2.1.3",
174
+ "json5-writer": "0.2.0",
175
+ "karma": "6.3.0",
176
+ "karma-chrome-launcher": "3.1.0",
177
+ "karma-cli": "1.0.1",
178
+ "karma-coverage": "2.1.0",
179
+ "karma-jasmine": "4.0.0",
180
+ "karma-jasmine-html-reporter": "1.7.0",
181
+ "lnk": "1.0.1",
182
+ "lockfile": "1.0.4",
183
+ "lodash": "4.17.4",
184
+ "lodash-walk-object": "~13.0.19",
185
+ "lodash.get": ">= 4",
186
+ "lodash.isequal": ">= 4",
187
+ "lodash.merge": ">= 4",
188
+ "lodash.set": ">= 4",
189
+ "lowdb": "1.0.0",
190
+ "magic-renamer": "~13.0.12",
191
+ "material-design-icons": "3.0.1",
192
+ "method-override": "2.3.10",
193
+ "minimist": "1.2.0",
194
+ "mkdirp": "0.5.1",
195
+ "mocha": "5.2.0",
196
+ "moment": "2.22.2",
197
+ "morphi": "~13.0.42",
198
+ "ng-packagr": "13.0.0",
199
+ "ng-talkback": "~13.0.14",
200
+ "ng2-logger": "~13.0.19",
201
+ "ng2-rest": "~13.0.24",
202
+ "ng4-icons": "~13.0.16",
203
+ "ng4-modal": "~13.0.18",
204
+ "ngx-bootstrap": "8.0.0",
205
+ "ngx-editor": "12.2.1",
206
+ "ngx-moment": "6.0.2",
207
+ "ngx-pipes": "3.0.0",
208
+ "ngx-store": "3.1.1",
209
+ "ngx-toastr": "14.2.2",
210
+ "ngx-wig": "13.0.3",
211
+ "node-cli-tester": "~13.0.14",
212
+ "node-localstorage": "2.1.6",
213
+ "node-notifier": "6.0.0",
214
+ "nodemon": "1.14.11",
215
+ "npm-get-dependents": "1.0.1",
216
+ "npm-run": "4.1.2",
217
+ "omelette": "0.4.5",
218
+ "on-build-webpack": "0.1.0",
219
+ "open": "7.2.1",
220
+ "ora": "3.4.0",
221
+ "passport": "0.3.2",
222
+ "passport-http-bearer": "1.0.1",
223
+ "password-hash": "1.2.2",
224
+ "portfinder": "1.0.21",
225
+ "prettier": "2.5.1",
226
+ "progress": "2.0.3",
227
+ "prompts": "0.1.8",
228
+ "ps-list": "6.1.0",
229
+ "ps-node": "0.1.6",
230
+ "q": "1.5.1",
231
+ "randomcolor": "0.5.3",
232
+ "record-replay-req-res-scenario": "~13.0.15",
233
+ "reflect-metadata": "0.1.10",
234
+ "rimraf": "2.6.2",
235
+ "rxjs": "~7.5.0",
236
+ "semver": "6.3.0",
237
+ "simple-git": "1.96.0",
238
+ "sloc": "0.2.0",
239
+ "socket.io": "2.4.1",
240
+ "sort-package-json": "1.11.0",
241
+ "static-columns": "~13.0.21",
242
+ "string-similarity": "4.0.2",
243
+ "sudo-block": "3.0.0",
244
+ "systeminformation": "3.45.7",
245
+ "task.js": "0.1.5",
246
+ "tnp-cli": "~13.0.21",
247
+ "tnp-config": "~13.0.24",
248
+ "tnp-core": "~13.0.47",
249
+ "tnp-db": "~13.0.29",
250
+ "tnp-helpers": "~13.0.32",
251
+ "tnp-models": "~13.0.22",
252
+ "tnp-ui": "~13.0.19",
253
+ "ts-debug": "1.3.0",
254
+ "ts-loader": "2.3.1",
255
+ "ts-node": "10.7.0",
256
+ "tslib": "~2.3.0",
257
+ "typeorm": "~0.2.45",
258
+ "typescript": "~4.5.2",
259
+ "typescript-class-helpers": "~13.0.21",
260
+ "typescript-formatter": "~7.2.2",
261
+ "underscore": "1.9.1",
262
+ "uuid": "8.3.2",
263
+ "validator": "9.2.0",
264
+ "vpn-split": "~13.0.19",
265
+ "watch": "1.0.2",
266
+ "zone.js": "~0.11.4"
267
+ },
268
+ "private": false
269
+ },
270
+ "build": {
271
+ "number": 39,
272
+ "date": "2022-06-26T10:10:00.000Z",
273
+ "hash": "1ed011a926e211261d5c802bca1db4cbb9421c3e",
274
+ "options": {}
275
+ },
276
+ "currentProjectName": "isomorphic-region-loader",
277
+ "currentProjectPort": 4000,
278
+ "currentProjectLaunchConfiguration": "{\"version\":\"0.2.0\",\"configurations\":[{\"type\":\"node\",\"request\":\"launch\",\"name\":\"Launch Server standalone\",\"program\":\"${workspaceFolder}/run.js\",\"args\":[\"--ENVoverride=%7B%0A%20%20%20%20%22clientProjectName%22%3A%20%22isomorphic-region-loader%22%0A%7D\"],\"runtimeArgs\":[\"--nolazy\",\"-r\",\"ts-node/register\",\"--experimental-worker\"]},{\"name\":\"Debugger with ng serve\",\"type\":\"chrome\",\"request\":\"launch\",\"preLaunchTask\":\"Ng Serve\",\"postDebugTask\":\"terminateall\",\"sourceMaps\":true,\"webRoot\":\"${workspaceFolder}\",\"sourceMapPathOverrides\":{\"webpack:/*\":\"${webRoot}/*\",\"/./*\":\"${webRoot}/*\",\"/tmp-src/*\":\"${webRoot}/*\",\"/*\":\"*\",\"/./~/*\":\"${webRoot}/node_modules/*\"}},{\"type\":\"node\",\"request\":\"attach\",\"name\":\"Attach to global cli tool\",\"port\":9229,\"skipFiles\":[\"<node_internals>/**\"]}],\"compounds\":[{\"name\":\"Debug backend/frontend\",\"configurations\":[\"Launch Server standalone\",\"Debugger with ng serve\"]}]}",
279
+ "currentProjectTasksConfiguration": "{\"version\":\"2.0.0\",\"tasks\":[{\"label\":\"terminateall\",\"command\":\"echo ${input:terminate}\",\"type\":\"shell\",\"problemMatcher\":[]},{\"label\":\"Ng Serve\",\"type\":\"shell\",\"command\":\"tnp build\",\"isBackground\":true,\"presentation\":{\"reveal\":\"always\"},\"group\":{\"kind\":\"build\",\"isDefault\":true},\"problemMatcher\":{\"owner\":\"typescript\",\"source\":\"ts\",\"applyTo\":\"closedDocuments\",\"fileLocation\":[\"relative\",\"${cwd}\"],\"pattern\":\"$tsc\",\"background\":{\"activeOnStart\":true,\"beginsPattern\":{\"regexp\":\"(.*?)\"},\"endsPattern\":{\"regexp\":\"Compiled |Failed to compile.\"}}}}],\"inputs\":[{\"id\":\"terminate\",\"type\":\"command\",\"command\":\"workbench.action.tasks.terminate\",\"args\":\"terminateAll\"}]}",
280
+ "currentProjectType": "isomorphic-lib",
281
+ "currentFrameworkVersion": "13.0.82",
282
+ "currentProjectIsStrictSite": false,
283
+ "currentProjectIsDependencySite": false,
284
+ "currentProjectIsStatic": false,
285
+ "isStandaloneProject": true,
286
+ "frameworks": [
287
+ "bootstrap",
288
+ "ionic",
289
+ "material"
290
+ ],
291
+ "pathesTsconfig": "\"paths\": {},",
292
+ "customRootDir": "\"rootDir\": \"./src\",",
293
+ "currentLibProjectSourceFolder": "src"
294
+ }
@@ -1,19 +0,0 @@
1
- // Place your settings in this file to overwrite default and user settings.
2
- {
3
- "files.exclude": {
4
- "**/.git": true,
5
- "**/.svn": true,
6
- "**/.hg": true,
7
- "**/CVS": true,
8
- "**/.DS_Store": true,
9
- "node_modules": true
10
- },
11
- "workbench.colorCustomizations": {
12
- "activityBar.background": "#115309"
13
- },
14
- "editor.rulers": [
15
- 100,
16
- 120
17
- ],
18
- "html.format.wrapAttributes": "force-aligned",
19
- }
package/README.md DELETED
@@ -1,63 +0,0 @@
1
- <div align="center">
2
- <h1>Isomorphic #region Loader</h1>
3
- <p>A loader for webpack that lets you strip #regions code from bundle.</p>
4
- </div>
5
-
6
- <h2 align="center">Install</h2>
7
-
8
- ```bash
9
- npm install --save-dev isomorphic-region-loader
10
- ```
11
-
12
- <h2 align="center">Usage</h2>
13
-
14
- This load is very helpfull if you wanna write isomorphic applications
15
- in javascript or typescript. Just specify **region** and this loader will
16
- cut it from bundle. Example:
17
-
18
- ```ts
19
- import * as jquery from 'jquery'
20
- //#region nodejs
21
- import * as fs from 'fs'
22
- //#endregion
23
-
24
- class ExampleIsomorphicClass {
25
- ...
26
- }
27
-
28
- ```
29
-
30
- With webpack configuraiton below:
31
-
32
- ```js
33
- module.exports = {
34
- module: {
35
- rules: [
36
- {
37
- test: /\.ts$/,
38
- use: 'isomorphic-region-loader',
39
- options: { platform: 'browser' } // 'borwser' default platform, also there is 'nodejs'
40
- }
41
- ]
42
- }
43
- }
44
- ```
45
- You will get:
46
- ```ts
47
- import * as jquery from 'jquery'
48
-
49
- class ExampleIsomorphicClass {
50
- ...
51
- }
52
-
53
- ```
54
- As result, code inside **#region nodejs** has been stripped.
55
- Also you can do similar things to your nodejs code and strip off
56
- browser things.
57
-
58
- ### Inline
59
-
60
- **In your application**
61
- ```js
62
- import { ExampleIsomorphicClass } from '!isomorphic-region-loader!./isomorphic-class.ts';
63
- ```