node-cli-tester 21.0.20 → 21.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/bin/node-cli-tester +11 -11
- package/bin/node-cli-tester-debug +11 -11
- package/browser/README.md +24 -24
- package/browser/fesm2022/node-cli-tester-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser-prod/README.md +24 -24
- package/browser-prod/fesm2022/node-cli-tester-browser.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/package.json +1 -1
- package/lib-prod/base-project-structure.backend.d.ts +13 -0
- package/lib-prod/base-project-structure.backend.js +32 -26
- package/lib-prod/base-project-structure.backend.js.map +1 -0
- package/lib-prod/build-info._auto-generated_.d.ts +24 -0
- package/lib-prod/build-info._auto-generated_.js +10 -6
- package/lib-prod/build-info._auto-generated_.js.map +1 -0
- package/lib-prod/cli-test.backend.d.ts +24 -0
- package/lib-prod/cli-test.backend.js +42 -34
- package/lib-prod/cli-test.backend.js.map +1 -0
- package/lib-prod/env/env.angular-node-app.d.ts +64 -0
- package/lib-prod/env/env.angular-node-app.js +69 -64
- package/lib-prod/env/env.angular-node-app.js.map +1 -0
- package/lib-prod/env/env.docs-webapp.d.ts +64 -0
- package/lib-prod/env/env.docs-webapp.js +69 -64
- package/lib-prod/env/env.docs-webapp.js.map +1 -0
- package/lib-prod/env/env.electron-app.d.ts +64 -0
- package/lib-prod/env/env.electron-app.js +69 -64
- package/lib-prod/env/env.electron-app.js.map +1 -0
- package/lib-prod/env/env.mobile-app.d.ts +64 -0
- package/lib-prod/env/env.mobile-app.js +69 -64
- package/lib-prod/env/env.mobile-app.js.map +1 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +64 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +69 -64
- package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +1 -0
- package/lib-prod/env/env.vscode-plugin.d.ts +64 -0
- package/lib-prod/env/env.vscode-plugin.js +69 -64
- package/lib-prod/env/env.vscode-plugin.js.map +1 -0
- package/lib-prod/env/index.d.ts +6 -0
- package/lib-prod/env/index.js +23 -6
- package/lib-prod/env/index.js.map +1 -0
- package/lib-prod/index._auto-generated_.d.ts +0 -0
- package/lib-prod/index._auto-generated_.js +2 -1
- package/lib-prod/index._auto-generated_.js.map +1 -0
- package/lib-prod/index.d.ts +4 -0
- package/lib-prod/index.js +12 -4
- package/lib-prod/index.js.map +1 -0
- package/lib-prod/meta-content-md.backend.d.ts +42 -0
- package/lib-prod/meta-content-md.backend.js +69 -62
- package/lib-prod/meta-content-md.backend.js.map +1 -0
- package/lib-prod/migrations/index.d.ts +1 -0
- package/lib-prod/migrations/index.js +18 -1
- package/lib-prod/migrations/index.js.map +1 -0
- package/lib-prod/migrations/migrations_index._auto-generated_.d.ts +0 -0
- package/lib-prod/migrations/migrations_index._auto-generated_.js +1 -0
- package/lib-prod/migrations/migrations_index._auto-generated_.js.map +1 -0
- package/lib-prod/node-cli-tester.d.ts +25 -0
- package/lib-prod/node-cli-tester.js +60 -56
- package/lib-prod/node-cli-tester.js.map +1 -0
- package/lib-prod/package.json +1 -1
- package/lib-prod/spec-templates.backend.d.ts +6 -0
- package/lib-prod/spec-templates.backend.js +23 -13
- package/lib-prod/spec-templates.backend.js.map +1 -0
- package/lib-prod/start.backend.d.ts +2 -0
- package/lib-prod/start.backend.js +8 -4
- package/lib-prod/start.backend.js.map +1 -0
- package/package.json +1 -1
- package/websql/README.md +24 -24
- package/websql/fesm2022/node-cli-tester-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql-prod/README.md +24 -24
- package/websql-prod/fesm2022/node-cli-tester-websql.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# node-cli-tester
|
|
2
|
-
|
|
3
|
-
- for testing any cli functionality
|
|
4
|
-
|
|
1
|
+
# node-cli-tester
|
|
2
|
+
|
|
3
|
+
- for testing any cli functionality
|
|
4
|
+
|
package/bin/node-cli-tester
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var { fse, crossPlatformPath, path } = require('tnp-core');
|
|
3
|
-
var path = {
|
|
4
|
-
dist: path.join(crossPlatformPath(__dirname), '../dist/lib/start.backend.js'),
|
|
5
|
-
bundle: path.join(crossPlatformPath(__dirname), '../lib/start.backend.js')
|
|
6
|
-
}
|
|
7
|
-
var p = fse.existsSync(path.dist) ? path.dist : path.bundle;
|
|
8
|
-
global.globalSystemToolMode = true;
|
|
9
|
-
global.useWorker = true;
|
|
10
|
-
var run = require(p).run;
|
|
11
|
-
run(process.argv.slice(2));
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var { fse, crossPlatformPath, path } = require('tnp-core');
|
|
3
|
+
var path = {
|
|
4
|
+
dist: path.join(crossPlatformPath(__dirname), '../dist/lib/start.backend.js'),
|
|
5
|
+
bundle: path.join(crossPlatformPath(__dirname), '../lib/start.backend.js')
|
|
6
|
+
}
|
|
7
|
+
var p = fse.existsSync(path.dist) ? path.dist : path.bundle;
|
|
8
|
+
global.globalSystemToolMode = true;
|
|
9
|
+
global.useWorker = true;
|
|
10
|
+
var run = require(p).run;
|
|
11
|
+
run(process.argv.slice(2));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#!/usr/bin/env node --inspect
|
|
2
|
-
var { fse, crossPlatformPath, path } = require('tnp-core');
|
|
3
|
-
var path = {
|
|
4
|
-
dist: path.join(crossPlatformPath(__dirname), '../dist/start.backend.js'),
|
|
5
|
-
bundle: path.join(crossPlatformPath(__dirname), '../start.backend.js')
|
|
6
|
-
}
|
|
7
|
-
var p = fse.existsSync(path.dist) ? path.dist : path.bundle;
|
|
8
|
-
global.globalSystemToolMode = true;
|
|
9
|
-
global.useWorker = true;
|
|
10
|
-
var run = require(p).run;
|
|
11
|
-
run(process.argv.slice(2));
|
|
1
|
+
#!/usr/bin/env node --inspect
|
|
2
|
+
var { fse, crossPlatformPath, path } = require('tnp-core');
|
|
3
|
+
var path = {
|
|
4
|
+
dist: path.join(crossPlatformPath(__dirname), '../dist/start.backend.js'),
|
|
5
|
+
bundle: path.join(crossPlatformPath(__dirname), '../start.backend.js')
|
|
6
|
+
}
|
|
7
|
+
var p = fse.existsSync(path.dist) ? path.dist : path.bundle;
|
|
8
|
+
global.globalSystemToolMode = true;
|
|
9
|
+
global.useWorker = true;
|
|
10
|
+
var run = require(p).run;
|
|
11
|
+
run(process.argv.slice(2));
|
package/browser/README.md
CHANGED
|
@@ -1,24 +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.
|
|
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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-cli-tester-browser.mjs","sources":["../../../tmp-libs-for-dist/node-cli-tester/projects/node-cli-tester/src/lib/node-cli-tester.ts","../../../tmp-libs-for-dist/node-cli-tester/projects/node-cli-tester/src/lib/index.ts","../../../tmp-libs-for-dist/node-cli-tester/projects/node-cli-tester/src/node-cli-tester-browser.ts"],"sourcesContent":["//#region imports\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n//#endregion\n\nexport class NodeCliTester {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}","export { NodeCliTester } from './node-cli-tester';\n/* */\n/* */\n/* */\n/* */\n ","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;MAEa,aAAa,CAAA;AA8NzB;;ACxOD;AACA;AACA;AACA;;ACJA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"node-cli-tester-browser.mjs","sources":["../../../tmp-libs-for-dist/node-cli-tester/projects/node-cli-tester/src/lib/node-cli-tester.ts","../../../tmp-libs-for-dist/node-cli-tester/projects/node-cli-tester/src/lib/index.ts","../../../tmp-libs-for-dist/node-cli-tester/projects/node-cli-tester/src/node-cli-tester-browser.ts"],"sourcesContent":["//#region imports\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n//#endregion\n\nexport class NodeCliTester {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n","export { NodeCliTester } from './node-cli-tester';\n/* */\n/* */\n/* */\n/* */\n \n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;MAEa,aAAa,CAAA;AA8NzB;;ACxOD;AACA;AACA;AACA;;ACJA;;AAEG;;;;"}
|
package/browser/package.json
CHANGED
package/browser-prod/README.md
CHANGED
|
@@ -1,24 +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.
|
|
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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-cli-tester-browser.mjs","sources":["../../../tmp-libs-for-dist-prod/node-cli-tester/projects/node-cli-tester/src/lib/node-cli-tester.ts","../../../tmp-libs-for-dist-prod/node-cli-tester/projects/node-cli-tester/src/lib/index.ts","../../../tmp-libs-for-dist-prod/node-cli-tester/projects/node-cli-tester/src/node-cli-tester-browser.ts"],"sourcesContent":["//#region imports\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n//#endregion\n\nexport class NodeCliTester {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}","export { NodeCliTester } from './node-cli-tester';\n/* */\n/* */\n/* */\n/* */\n ","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;MAEa,aAAa,CAAA;AA8NzB;;ACxOD;AACA;AACA;AACA;;ACJA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"node-cli-tester-browser.mjs","sources":["../../../tmp-libs-for-dist-prod/node-cli-tester/projects/node-cli-tester/src/lib/node-cli-tester.ts","../../../tmp-libs-for-dist-prod/node-cli-tester/projects/node-cli-tester/src/lib/index.ts","../../../tmp-libs-for-dist-prod/node-cli-tester/projects/node-cli-tester/src/node-cli-tester-browser.ts"],"sourcesContent":["//#region imports\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n//#endregion\n\nexport class NodeCliTester {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n","export { NodeCliTester } from './node-cli-tester';\n/* */\n/* */\n/* */\n/* */\n \n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;MAEa,aAAa,CAAA;AA8NzB;;ACxOD;AACA;AACA;AACA;;ACJA;;AAEG;;;;"}
|
|
@@ -25,6 +25,6 @@ exports.CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
|
25
25
|
/**
|
|
26
26
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
27
27
|
*/
|
|
28
|
-
exports.CURRENT_PACKAGE_VERSION = '21.0.
|
|
28
|
+
exports.CURRENT_PACKAGE_VERSION = '21.0.21';
|
|
29
29
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
30
30
|
//# sourceMappingURL=build-info._auto-generated_.js.map
|
package/lib/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseProject as Project } from 'tnp-helpers/lib-prod';
|
|
2
|
+
export declare class BaseProjectStructure {
|
|
3
|
+
private cwd;
|
|
4
|
+
static BASE_STRUCTURES_FOLDER: string;
|
|
5
|
+
get baseStructureHash(): string;
|
|
6
|
+
get projectPathBasename(): string;
|
|
7
|
+
constructor(cwd: string);
|
|
8
|
+
copyto(destinationCwd: string, basename?: string): void;
|
|
9
|
+
static allBaseStructures(cwd: any): BaseProjectStructure[];
|
|
10
|
+
static generate<P extends Project = Project>(project: P): {
|
|
11
|
+
insideIfNotExists(destinationCwd: string): string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -1,68 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseProjectStructure = void 0;
|
|
1
4
|
//#region imports
|
|
2
|
-
|
|
3
|
-
|
|
5
|
+
const lib_prod_1 = require("tnp-core/lib-prod");
|
|
6
|
+
const lib_prod_2 = require("tnp-helpers/lib-prod");
|
|
4
7
|
//#endregion
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
class BaseProjectStructure {
|
|
9
|
+
cwd;
|
|
10
|
+
static BASE_STRUCTURES_FOLDER = 'base-structures';
|
|
7
11
|
get baseStructureHash() {
|
|
8
|
-
return path.basename(this.cwd);
|
|
12
|
+
return lib_prod_1.path.basename(this.cwd);
|
|
9
13
|
}
|
|
10
14
|
get projectPathBasename() {
|
|
11
|
-
return ___NS__first(path.basename(this.cwd).split('__'));
|
|
15
|
+
return (0, lib_prod_1.___NS__first)(lib_prod_1.path.basename(this.cwd).split('__'));
|
|
12
16
|
}
|
|
13
17
|
constructor(cwd) {
|
|
14
18
|
this.cwd = cwd;
|
|
15
19
|
}
|
|
16
20
|
copyto(destinationCwd, basename) {
|
|
17
|
-
HelpersTaon__NS__copy(this.cwd, path.join(destinationCwd, basename ? basename : this.projectPathBasename));
|
|
21
|
+
(0, lib_prod_2.HelpersTaon__NS__copy)(this.cwd, lib_prod_1.path.join(destinationCwd, basename ? basename : this.projectPathBasename));
|
|
18
22
|
}
|
|
19
23
|
static allBaseStructures(cwd) {
|
|
20
|
-
const folderPath = path.join(cwd, this.BASE_STRUCTURES_FOLDER);
|
|
21
|
-
return Helpers__NS__foldersFrom(folderPath).map(f => new BaseProjectStructure(f));
|
|
24
|
+
const folderPath = lib_prod_1.path.join(cwd, this.BASE_STRUCTURES_FOLDER);
|
|
25
|
+
return (0, lib_prod_2.Helpers__NS__foldersFrom)(folderPath).map(f => new BaseProjectStructure(f));
|
|
22
26
|
}
|
|
23
27
|
static generate(project) {
|
|
24
28
|
const that = this;
|
|
25
|
-
const orgCwd = path.join(project.location);
|
|
29
|
+
const orgCwd = lib_prod_1.path.join(project.location);
|
|
26
30
|
const files = []; //= project.forEmptyStructure();
|
|
27
31
|
const filesWithoutLinks = files.filter(f => !f.relativeLinkFrom);
|
|
28
32
|
let hash = files.length.toString();
|
|
29
33
|
for (let index = 0; index < filesWithoutLinks.length; index++) {
|
|
30
34
|
const file = filesWithoutLinks[index];
|
|
31
|
-
const abasolutePAth = path.join(orgCwd, file.relativePath);
|
|
35
|
+
const abasolutePAth = lib_prod_1.path.join(orgCwd, file.relativePath);
|
|
32
36
|
hash +=
|
|
33
37
|
(file.relativePath.length + 1).toString() +
|
|
34
|
-
(Helpers__NS__isFolder(abasolutePAth)
|
|
38
|
+
((0, lib_prod_2.Helpers__NS__isFolder)(abasolutePAth)
|
|
35
39
|
? ''
|
|
36
|
-
: (Helpers__NS__readFile(abasolutePAth)?.length + 1).toString());
|
|
40
|
+
: ((0, lib_prod_2.Helpers__NS__readFile)(abasolutePAth)?.length + 1).toString());
|
|
37
41
|
}
|
|
38
|
-
hash = `${project.name}__${HelpersTaon__NS__checksum(hash)}`;
|
|
42
|
+
hash = `${project.name}__${(0, lib_prod_2.HelpersTaon__NS__checksum)(hash)}`;
|
|
39
43
|
return {
|
|
40
44
|
insideIfNotExists(destinationCwd) {
|
|
41
|
-
const destStruct = path.join(destinationCwd, that.BASE_STRUCTURES_FOLDER, hash);
|
|
42
|
-
if (Helpers__NS__exists(destStruct)) {
|
|
43
|
-
Helpers__NS__log(`Base structure with name: ${hash}`);
|
|
45
|
+
const destStruct = lib_prod_1.path.join(destinationCwd, that.BASE_STRUCTURES_FOLDER, hash);
|
|
46
|
+
if ((0, lib_prod_2.Helpers__NS__exists)(destStruct)) {
|
|
47
|
+
(0, lib_prod_2.Helpers__NS__log)(`Base structure with name: ${hash}`);
|
|
44
48
|
return hash;
|
|
45
49
|
}
|
|
46
|
-
Helpers__NS__removeFolderIfExists(destStruct);
|
|
50
|
+
(0, lib_prod_2.Helpers__NS__removeFolderIfExists)(destStruct);
|
|
47
51
|
for (let index = 0; index < filesWithoutLinks.length; index++) {
|
|
48
52
|
const file = filesWithoutLinks[index];
|
|
49
|
-
const orgPath = path.join(orgCwd, file.relativePath);
|
|
50
|
-
const destPath = path.join(destStruct, file.relativePath);
|
|
51
|
-
Helpers__NS__mkdirp(path.dirname(destPath));
|
|
52
|
-
if (Helpers__NS__isFolder(orgPath)) {
|
|
53
|
+
const orgPath = lib_prod_1.path.join(orgCwd, file.relativePath);
|
|
54
|
+
const destPath = lib_prod_1.path.join(destStruct, file.relativePath);
|
|
55
|
+
(0, lib_prod_2.Helpers__NS__mkdirp)(lib_prod_1.path.dirname(destPath));
|
|
56
|
+
if ((0, lib_prod_2.Helpers__NS__isFolder)(orgPath)) {
|
|
53
57
|
if (file.includeContent) {
|
|
54
|
-
HelpersTaon__NS__copy(orgPath, destPath);
|
|
58
|
+
(0, lib_prod_2.HelpersTaon__NS__copy)(orgPath, destPath);
|
|
55
59
|
}
|
|
56
60
|
else {
|
|
57
|
-
Helpers__NS__mkdirp(destPath);
|
|
61
|
+
(0, lib_prod_2.Helpers__NS__mkdirp)(destPath);
|
|
58
62
|
}
|
|
59
63
|
}
|
|
60
64
|
else {
|
|
61
65
|
if (file.includeContent) {
|
|
62
|
-
HelpersTaon__NS__copyFile(orgPath, destPath);
|
|
66
|
+
(0, lib_prod_2.HelpersTaon__NS__copyFile)(orgPath, destPath);
|
|
63
67
|
}
|
|
64
68
|
else {
|
|
65
|
-
Helpers__NS__writeFile(destPath, '');
|
|
69
|
+
(0, lib_prod_2.Helpers__NS__writeFile)(destPath, '');
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
}
|
|
@@ -71,3 +75,5 @@ export class BaseProjectStructure {
|
|
|
71
75
|
};
|
|
72
76
|
}
|
|
73
77
|
}
|
|
78
|
+
exports.BaseProjectStructure = BaseProjectStructure;
|
|
79
|
+
//# sourceMappingURL=base-project-structure.backend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-project-structure.backend.js","sourceRoot":"","sources":[""],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autogenerated by current cli tool
|
|
3
|
+
*/
|
|
4
|
+
export declare const BUILD_FRAMEWORK_CLI_NAME = "tnp";
|
|
5
|
+
/**
|
|
6
|
+
* This value can be change in taon.jsonc (appId)
|
|
7
|
+
*/
|
|
8
|
+
export declare const APP_ID = "com.domain.example.node-cli-tester";
|
|
9
|
+
/**
|
|
10
|
+
* Autogenerated by current cli tool
|
|
11
|
+
*/
|
|
12
|
+
export declare const BUILD_BASE_HREF = "";
|
|
13
|
+
/**
|
|
14
|
+
* This value can be change in taon.jsonc (overrideNpmName)
|
|
15
|
+
*/
|
|
16
|
+
export declare const PROJECT_NPM_NAME = "node-cli-tester";
|
|
17
|
+
/**
|
|
18
|
+
* Taon version from you project taon.json
|
|
19
|
+
*/
|
|
20
|
+
export declare const CURRENT_PACKAGE_TAON_VERSION = "v21";
|
|
21
|
+
/**
|
|
22
|
+
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
23
|
+
*/
|
|
24
|
+
export declare const CURRENT_PACKAGE_VERSION = "21.0.21";
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CURRENT_PACKAGE_VERSION = exports.CURRENT_PACKAGE_TAON_VERSION = exports.PROJECT_NPM_NAME = exports.BUILD_BASE_HREF = exports.APP_ID = exports.BUILD_FRAMEWORK_CLI_NAME = void 0;
|
|
1
4
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
2
5
|
/**
|
|
3
6
|
* Autogenerated by current cli tool
|
|
4
7
|
*/
|
|
5
|
-
|
|
8
|
+
exports.BUILD_FRAMEWORK_CLI_NAME = 'tnp';
|
|
6
9
|
/**
|
|
7
10
|
* This value can be change in taon.jsonc (appId)
|
|
8
11
|
*/
|
|
9
|
-
|
|
12
|
+
exports.APP_ID = 'com.domain.example.node-cli-tester';
|
|
10
13
|
/**
|
|
11
14
|
* Autogenerated by current cli tool
|
|
12
15
|
*/
|
|
13
|
-
|
|
16
|
+
exports.BUILD_BASE_HREF = '';
|
|
14
17
|
/**
|
|
15
18
|
* This value can be change in taon.jsonc (overrideNpmName)
|
|
16
19
|
*/
|
|
17
|
-
|
|
20
|
+
exports.PROJECT_NPM_NAME = 'node-cli-tester';
|
|
18
21
|
/**
|
|
19
22
|
* Taon version from you project taon.json
|
|
20
23
|
*/
|
|
21
|
-
|
|
24
|
+
exports.CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
22
25
|
/**
|
|
23
26
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
24
27
|
*/
|
|
25
|
-
|
|
28
|
+
exports.CURRENT_PACKAGE_VERSION = '21.0.21';
|
|
26
29
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
30
|
+
//# sourceMappingURL=build-info._auto-generated_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-info._auto-generated_.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC;;GAEG;AACU,QAAA,wBAAwB,GAAG,KAAK,CAAC;AAC9C;;GAEG;AACU,QAAA,MAAM,GAAG,oCAAoC,CAAC;AAC3D;;GAEG;AACU,QAAA,eAAe,GAAG,EAAE,CAAC;AAClC;;GAEG;AACU,QAAA,gBAAgB,GAAG,iBAAiB,CAAC;AAClD;;GAEG;AACU,QAAA,4BAA4B,GAAG,KAAK,CAAC;AAClD;;GAEG;AACU,QAAA,uBAAuB,GAAG,SAAS,CAAC;AACjD,yCAAyC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MetaMd } from './meta-content-md.backend';
|
|
2
|
+
import type { NodeCliTester } from './node-cli-tester';
|
|
3
|
+
export declare class CliTest {
|
|
4
|
+
cwd: string;
|
|
5
|
+
testName: string;
|
|
6
|
+
static readonly NAME_FOR_CLI_TESTS_FOLDER = "src/tests/tests-cli";
|
|
7
|
+
readonly testDirnamePath: string;
|
|
8
|
+
private static instances;
|
|
9
|
+
static allFrom(cwd: string): CliTest[];
|
|
10
|
+
static getBy(cwd: string, timeHash: string): CliTest;
|
|
11
|
+
static from(cwd: string, testName?: string): CliTest;
|
|
12
|
+
get metaMd(): {
|
|
13
|
+
readonly all: MetaMd[];
|
|
14
|
+
add(originalFilePath: string[], baseCwd: string, NodeCliTestrClass: typeof NodeCliTester): Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
private get firedev_jsonc();
|
|
17
|
+
private get packageJsonPath();
|
|
18
|
+
private get gitignorePath();
|
|
19
|
+
private get specTsPath();
|
|
20
|
+
constructor(cwd: string, testName: string);
|
|
21
|
+
regenerateFiles(): Promise<void>;
|
|
22
|
+
private regeneratePackageJson5;
|
|
23
|
+
private regenerateGitIgnore;
|
|
24
|
+
}
|
|
@@ -1,27 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CliTest = void 0;
|
|
1
4
|
//#region imports
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const lib_prod_1 = require("tnp-core/lib-prod");
|
|
6
|
+
const lib_prod_2 = require("tnp-core/lib-prod");
|
|
7
|
+
const lib_prod_3 = require("tnp-helpers/lib-prod");
|
|
8
|
+
const meta_content_md_backend_1 = require("./meta-content-md.backend");
|
|
9
|
+
const lib_prod_4 = require("typescript-class-helpers/lib-prod");
|
|
7
10
|
//#endregion
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
class CliTest {
|
|
12
|
+
cwd;
|
|
13
|
+
testName;
|
|
14
|
+
static NAME_FOR_CLI_TESTS_FOLDER = 'src/tests/tests-cli';
|
|
15
|
+
testDirnamePath;
|
|
10
16
|
//#region singleton / static inst
|
|
11
|
-
static
|
|
17
|
+
static instances = {};
|
|
12
18
|
static allFrom(cwd) {
|
|
13
|
-
const folderWithTests = path.join(cwd, this.NAME_FOR_CLI_TESTS_FOLDER);
|
|
14
|
-
const folders = Helpers__NS__foldersFrom(folderWithTests);
|
|
19
|
+
const folderWithTests = lib_prod_1.path.join(cwd, this.NAME_FOR_CLI_TESTS_FOLDER);
|
|
20
|
+
const folders = (0, lib_prod_3.Helpers__NS__foldersFrom)(folderWithTests);
|
|
15
21
|
const tests = folders.map(f => CliTest.from(f)).filter(f => !!f);
|
|
16
22
|
return tests;
|
|
17
23
|
}
|
|
18
24
|
static getBy(cwd, timeHash) {
|
|
19
|
-
return this.allFrom(cwd).find(c => !___NS__isUndefined(c.metaMd.all.find(c => c.readonlyMetaJson.timeHash === timeHash)));
|
|
25
|
+
return this.allFrom(cwd).find(c => !(0, lib_prod_1.___NS__isUndefined)(c.metaMd.all.find(c => c.readonlyMetaJson.timeHash === timeHash)));
|
|
20
26
|
}
|
|
21
27
|
static from(cwd, testName) {
|
|
22
28
|
if (!testName) {
|
|
23
|
-
testName = path.basename(cwd);
|
|
24
|
-
cwd = path.dirname(cwd);
|
|
29
|
+
testName = lib_prod_1.path.basename(cwd);
|
|
30
|
+
cwd = lib_prod_1.path.dirname(cwd);
|
|
25
31
|
}
|
|
26
32
|
if (!CliTest.instances[cwd]) {
|
|
27
33
|
CliTest.instances[cwd] = {};
|
|
@@ -38,26 +44,26 @@ export class CliTest {
|
|
|
38
44
|
const that = this;
|
|
39
45
|
return {
|
|
40
46
|
get all() {
|
|
41
|
-
return MetaMd.allInstancesFrom(that.testDirnamePath);
|
|
47
|
+
return meta_content_md_backend_1.MetaMd.allInstancesFrom(that.testDirnamePath);
|
|
42
48
|
},
|
|
43
49
|
async add(originalFilePath, baseCwd, NodeCliTestrClass) {
|
|
44
|
-
await MetaMd.preserveFiles(originalFilePath, that.testDirnamePath, baseCwd, NodeCliTestrClass.foundProjectsFn, that.cwd);
|
|
50
|
+
await meta_content_md_backend_1.MetaMd.preserveFiles(originalFilePath, that.testDirnamePath, baseCwd, NodeCliTestrClass.foundProjectsFn, that.cwd);
|
|
45
51
|
}
|
|
46
52
|
};
|
|
47
53
|
}
|
|
48
54
|
//#endregion
|
|
49
55
|
//#region getters / pathes
|
|
50
56
|
get firedev_jsonc() {
|
|
51
|
-
return path.join(this.testDirnamePath, config.file.firedev_jsonc);
|
|
57
|
+
return lib_prod_1.path.join(this.testDirnamePath, lib_prod_2.config.file.firedev_jsonc);
|
|
52
58
|
}
|
|
53
59
|
get packageJsonPath() {
|
|
54
|
-
return path.join(this.testDirnamePath, config.file.package_json);
|
|
60
|
+
return lib_prod_1.path.join(this.testDirnamePath, lib_prod_2.config.file.package_json);
|
|
55
61
|
}
|
|
56
62
|
get gitignorePath() {
|
|
57
|
-
return path.join(this.testDirnamePath, config.file._gitignore);
|
|
63
|
+
return lib_prod_1.path.join(this.testDirnamePath, lib_prod_2.config.file._gitignore);
|
|
58
64
|
}
|
|
59
65
|
get specTsPath() {
|
|
60
|
-
return path.join(this.testDirnamePath, `${___NS__kebabCase(this.testName)}.spec.ts`);
|
|
66
|
+
return lib_prod_1.path.join(this.testDirnamePath, `${(0, lib_prod_1.___NS__kebabCase)(this.testName)}.spec.ts`);
|
|
61
67
|
}
|
|
62
68
|
//#endregion
|
|
63
69
|
//#endregion
|
|
@@ -67,14 +73,14 @@ export class CliTest {
|
|
|
67
73
|
this.testName = testName;
|
|
68
74
|
cwd = cwd.endsWith(CliTest.NAME_FOR_CLI_TESTS_FOLDER) ? cwd.replace(CliTest.NAME_FOR_CLI_TESTS_FOLDER, '') : cwd;
|
|
69
75
|
this.cwd = cwd;
|
|
70
|
-
this.testDirnamePath = path.join(cwd, CliTest.NAME_FOR_CLI_TESTS_FOLDER, ___NS__kebabCase(this.testName));
|
|
71
|
-
const pathToTempEnvs = path.join(cwd, config.folder.tmpTestsEnvironments);
|
|
72
|
-
const pathToEnvs = path.join(cwd, config.folder.testsEnvironments);
|
|
73
|
-
Helpers__NS__createSymLink(pathToTempEnvs, pathToEnvs, {
|
|
76
|
+
this.testDirnamePath = lib_prod_1.path.join(cwd, CliTest.NAME_FOR_CLI_TESTS_FOLDER, (0, lib_prod_1.___NS__kebabCase)(this.testName));
|
|
77
|
+
const pathToTempEnvs = lib_prod_1.path.join(cwd, lib_prod_2.config.folder.tmpTestsEnvironments);
|
|
78
|
+
const pathToEnvs = lib_prod_1.path.join(cwd, lib_prod_2.config.folder.testsEnvironments);
|
|
79
|
+
(0, lib_prod_3.Helpers__NS__createSymLink)(pathToTempEnvs, pathToEnvs, {
|
|
74
80
|
continueWhenExistedFolderDoesntExists: true
|
|
75
81
|
});
|
|
76
|
-
if (Helpers__NS__exists(this.firedev_jsonc)) {
|
|
77
|
-
const testNameFromPJ5 = Helpers__NS__readJson(this.firedev_jsonc, {}, true).description;
|
|
82
|
+
if ((0, lib_prod_3.Helpers__NS__exists)(this.firedev_jsonc)) {
|
|
83
|
+
const testNameFromPJ5 = (0, lib_prod_3.Helpers__NS__readJson)(this.firedev_jsonc, {}, true).description;
|
|
78
84
|
if (testNameFromPJ5) {
|
|
79
85
|
testName = testNameFromPJ5;
|
|
80
86
|
this.testName = testName;
|
|
@@ -85,13 +91,13 @@ export class CliTest {
|
|
|
85
91
|
//#region public api
|
|
86
92
|
//#region regenerate
|
|
87
93
|
async regenerateFiles() {
|
|
88
|
-
if (!Helpers__NS__exists(this.testDirnamePath)) {
|
|
89
|
-
Helpers__NS__mkdirp(this.testDirnamePath);
|
|
94
|
+
if (!(0, lib_prod_3.Helpers__NS__exists)(this.testDirnamePath)) {
|
|
95
|
+
(0, lib_prod_3.Helpers__NS__mkdirp)(this.testDirnamePath);
|
|
90
96
|
}
|
|
91
97
|
this.regeneratePackageJson5();
|
|
92
|
-
let TestTemplatesClass = CLASS.getBy('TestTemplates');
|
|
98
|
+
let TestTemplatesClass = lib_prod_4.CLASS.getBy('TestTemplates');
|
|
93
99
|
if (!TestTemplatesClass) {
|
|
94
|
-
TestTemplatesClass = await (await
|
|
100
|
+
TestTemplatesClass = await (await Promise.resolve().then(() => require('./spec-templates.backend'))).TestTemplates;
|
|
95
101
|
}
|
|
96
102
|
TestTemplatesClass.regenerateSpecTs(this.specTsPath, this.testName);
|
|
97
103
|
this.regenerateGitIgnore();
|
|
@@ -101,12 +107,12 @@ export class CliTest {
|
|
|
101
107
|
//#region private methods
|
|
102
108
|
//#region regenerate package json 5
|
|
103
109
|
regeneratePackageJson5() {
|
|
104
|
-
if (!Helpers__NS__exists(this.firedev_jsonc)) {
|
|
105
|
-
Helpers__NS__writeFile(this.firedev_jsonc,
|
|
110
|
+
if (!(0, lib_prod_3.Helpers__NS__exists)(this.firedev_jsonc)) {
|
|
111
|
+
(0, lib_prod_3.Helpers__NS__writeFile)(this.firedev_jsonc,
|
|
106
112
|
//#region content of package.json5
|
|
107
113
|
`{
|
|
108
114
|
// generated from basename
|
|
109
|
-
"name": "${___NS__kebabCase(this.testName)}",
|
|
115
|
+
"name": "${(0, lib_prod_1.___NS__kebabCase)(this.testName)}",
|
|
110
116
|
"description": "${this.testName}",
|
|
111
117
|
"tnp": {
|
|
112
118
|
"type": "cli-test"
|
|
@@ -120,12 +126,12 @@ export class CliTest {
|
|
|
120
126
|
//#endregion
|
|
121
127
|
//#region regenerate gitignore
|
|
122
128
|
regenerateGitIgnore() {
|
|
123
|
-
Helpers__NS__writeFile(this.gitignorePath,
|
|
129
|
+
(0, lib_prod_3.Helpers__NS__writeFile)(this.gitignorePath,
|
|
124
130
|
//#region content of .gitignore
|
|
125
131
|
`
|
|
126
132
|
/**/*.*
|
|
127
133
|
!/.gitignore
|
|
128
|
-
!/${path.basename(this.specTsPath)}
|
|
134
|
+
!/${lib_prod_1.path.basename(this.specTsPath)}
|
|
129
135
|
!/package.json
|
|
130
136
|
!/package.json5
|
|
131
137
|
!/*.md
|
|
@@ -135,3 +141,5 @@ export class CliTest {
|
|
|
135
141
|
);
|
|
136
142
|
}
|
|
137
143
|
}
|
|
144
|
+
exports.CliTest = CliTest;
|
|
145
|
+
//# sourceMappingURL=cli-test.backend.js.map
|