magic-renamer 18.0.16 → 18.0.17
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 +5 -5
- package/assets/shared/shared_folder_info.txt +1 -1
- package/bin/magic-renamer +10 -10
- package/bin/magic-renamer-debug +10 -10
- package/browser/README.md +24 -24
- package/browser/fesm2022/magic-renamer.mjs.map +1 -1
- package/client/README.md +24 -24
- package/client/fesm2022/magic-renamer.mjs.map +1 -1
- package/package.json +4 -4
- package/taon.jsonc +38 -38
- package/tmp-environment.json +29 -29
- package/websql/README.md +24 -24
- package/websql/fesm2022/magic-renamer.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# magic renamer
|
|
2
|
-
|
|
3
|
-
rename/copy things in magical way in [firedev.io](https://github.com/darekf77/firedev) Visual Studio Plugin...
|
|
4
|
-
|
|
5
|
-
<p style="text-align: center;"><img src="./firedev.png" ></p>
|
|
1
|
+
# magic renamer
|
|
2
|
+
|
|
3
|
+
rename/copy things in magical way in [firedev.io](https://github.com/darekf77/firedev) Visual Studio Plugin...
|
|
4
|
+
|
|
5
|
+
<p style="text-align: center;"><img src="./firedev.png" ></p>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
THIS FILE IS GENERATED. THIS FILE IS GENERATED. THIS FILE IS GENERATED.
|
|
2
2
|
|
|
3
|
-
Assets from this folder are being shipped with this npm package (magic-renamer@18.0.
|
|
3
|
+
Assets from this folder are being shipped with this npm package (magic-renamer@18.0.17)
|
|
4
4
|
created from this project.
|
|
5
5
|
|
|
6
6
|
THIS FILE IS GENERATED.THIS FILE IS GENERATED. THIS FILE IS GENERATED.
|
package/bin/magic-renamer
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var { fse, crossPlatformPath, path } = require('tnp-core');
|
|
3
|
-
var path = {
|
|
4
|
-
dist: path.join(crossPlatformPath(__dirname), '../dist/index.js'),
|
|
5
|
-
bundle: path.join(crossPlatformPath(__dirname), '../index.js')
|
|
6
|
-
}
|
|
7
|
-
var p = fse.existsSync(path.dist) ? path.dist : path.bundle;
|
|
8
|
-
global.globalSystemToolMode = true;
|
|
9
|
-
var run = require(p).run;
|
|
10
|
-
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/index.js'),
|
|
5
|
+
bundle: path.join(crossPlatformPath(__dirname), '../index.js')
|
|
6
|
+
}
|
|
7
|
+
var p = fse.existsSync(path.dist) ? path.dist : path.bundle;
|
|
8
|
+
global.globalSystemToolMode = true;
|
|
9
|
+
var run = require(p).run;
|
|
10
|
+
run(process.argv.slice(2));
|
package/bin/magic-renamer-debug
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#!/usr/bin/env node --inspect
|
|
2
|
-
var { fse, crossPlatformPath, path } = require('tnp-core');
|
|
3
|
-
var path = {
|
|
4
|
-
dist: path.join(crossPlatformPath(__dirname), '../dist/index.js'),
|
|
5
|
-
bundle: path.join(crossPlatformPath(__dirname), '../index.js')
|
|
6
|
-
}
|
|
7
|
-
var p = fse.existsSync(path.dist) ? path.dist : path.bundle;
|
|
8
|
-
global.globalSystemToolMode = true;
|
|
9
|
-
var run = require(p).run;
|
|
10
|
-
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/index.js'),
|
|
5
|
+
bundle: path.join(crossPlatformPath(__dirname), '../index.js')
|
|
6
|
+
}
|
|
7
|
+
var p = fse.existsSync(path.dist) ? path.dist : path.bundle;
|
|
8
|
+
global.globalSystemToolMode = true;
|
|
9
|
+
var run = require(p).run;
|
|
10
|
+
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":"magic-renamer.mjs","sources":["../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/rename-rule.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/magic-renamer.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/index.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/magic-renamer.ts"],"sourcesContent":["\n\nimport { Helpers } from 'tnp-helpers/browser';\nimport { _, UtilsString } from 'tnp-core/browser';\nimport { Log, Level } from 'ng2-logger/browser';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\nexport class RenameRule {\n static from(pArgs: string): RenameRule[] {\n pArgs = pArgs.replace(/\\=\\>/g, '->');\n let args = pArgs.split(/(\\'|\\\")(\\ )+(\\'|\\\")/).filter(f => !!f) as string[];\n log.d('---- Rules ----');\n args.forEach(a => {\n log.d(a);\n });\n log.d('---------------');\n return args\n .filter(a => a.search('->') !== -1)\n .map(a => {\n const [from, to] = a.split('->');\n if (!from || !to) {\n Helpers.error(\n `Incorrect rule\n \"${from}\" -> \"${to}\"\n please follow pattern: 'test name -> my new name '`,\n false,\n true,\n );\n }\n return new RenameRule(from.trim(), to.trim());\n });\n }\n\n public readonly fromWhiteSpaceReplaced: string;\n public readonly toWhiteSpaceReplaced: string;\n constructor(\n public readonly from: string,\n public readonly to: string,\n ) {\n this.fromWhiteSpaceReplaced = from.trim().toLowerCase().replace(/\\W/g, ' ');\n this.toWhiteSpaceReplaced = to.trim().toLowerCase().replace(/\\W/g, ' ');\n }\n\n applyTo(s: string): boolean {\n s = s.trim().toLowerCase().replace(/\\W/g, '');\n const res = s.search(this.from.replace(/\\W/g, '')) !== -1;\n return res;\n }\n\n toString = () => {\n return `${this.from} => ${this.to}`;\n };\n\n includes(orgString) {\n return !_.isUndefined(\n this.combinations.find(v => {\n const [from, to] = v;\n return orgString === to;\n }),\n );\n }\n\n get combinations() {\n const thisTo = this.toWhiteSpaceReplaced;\n const thisFrom = this.fromWhiteSpaceReplaced;\n return [\n\n [\n UtilsString.kebabCaseNoSplitNumbers(thisFrom),\n UtilsString.kebabCaseNoSplitNumbers(thisTo),\n ], // my-entity => hello1-kitty\n [_.kebabCase(thisFrom), _.kebabCase(thisTo)], // my-entity => hello-kitty\n [_.camelCase(thisFrom), _.camelCase(thisTo)], // myEntity => helloKitty\n [_.upperFirst(_.camelCase(thisFrom)), _.upperFirst(_.camelCase(thisTo))], // MyEntity => HelloKitty\n [_.snakeCase(thisFrom), _.snakeCase(thisTo)], // my_entity => hello_kitty\n [_.snakeCase(thisFrom).toUpperCase(), _.snakeCase(thisTo).toUpperCase()], // MY_ENTITY => HELLO_KITTY\n [_.startCase(thisFrom), _.startCase(thisTo)], // My Entity => Hello Kitty\n [_.upperCase(thisFrom), _.upperCase(thisTo)], // MY ENTITY => HELLO KITTY\n [_.lowerCase(thisFrom), _.lowerCase(thisTo)], // my entity => hello kitty\n [\n _.camelCase(thisFrom).toLocaleLowerCase(),\n _.camelCase(thisTo).toLocaleLowerCase(),\n ], // myentity => hellokitty\n ];\n }\n\n /**\n * @param orgString input string\n * @returns string with all possible combinations replaced\n */\n replaceInString(orgString: string): string {\n return this.replace({\n orgString,\n replaceallPossibliliteis: true,\n });\n }\n\n /**\n *\n * @param orgString (file name OR file content)\n * @param replaceallPossibliliteis when changin file notent (not name only)\n * @returns\n */\n replace(options: {\n /**\n * file name for debugging\n */\n fileName?: string;\n orgString: string;\n replaceallPossibliliteis?: boolean;\n }) {\n let { fileName, orgString, replaceallPossibliliteis } = options;\n replaceallPossibliliteis = !!replaceallPossibliliteis;\n const combinations = this.combinations;\n for (let index = 0; index < combinations.length; index++) {\n const v = combinations[index];\n let [from, to] = v;\n if (orgString.search(from) !== -1) {\n const regex = new RegExp(Helpers.escapeStringForRegEx(from));\n log.i(`apply! \"${regex.source}\" to file ${fileName} => \"${to}\"`);\n orgString = orgString.replace(\n new RegExp(Helpers.escapeStringForRegEx(from), 'g'),\n to,\n );\n if (!replaceallPossibliliteis) {\n return orgString;\n }\n }\n }\n return orgString;\n }\n}\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/rename-rule.ts","\n\n\nimport { Log, Level } from 'ng2-logger/browser';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n\nexport class MagicRenamer {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/magic-renamer.ts","\n\nexport * from './rename-rule';\nexport * from './magic-renamer';\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/index.ts","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["log"],"mappings":";;;;AAKA,MAAMA,KAAG,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;MAE3C,UAAU,CAAA;IACrB,OAAO,IAAI,CAAC,KAAa,EAAA;QACvB,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;AACpC,QAAA,IAAI,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAa;AAC1E,QAAAA,KAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACxB,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,IAAG;AACf,YAAAA,KAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,SAAC,CAAC;AACF,QAAAA,KAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACxB,QAAA,OAAO;AACJ,aAAA,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACjC,GAAG,CAAC,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AC;gBAChE,SAAS,GAAG,SAAS,CAAC,OAAO,CAC3B,IAAI,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EACnD,EAAE,CACH;gBACD,IAAI,CAAC,wBAAwB,EAAE;AAC7B,oBAAA,OAAO,SAAS;;;;AAItB,QAAA,OAAO,SAAS;;AAEnB;AAEA;AAAC,CAAC,EAAE,EAAE;;ACjIP,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;AAExD;AACA;AACA;AACA;AACA;MAIa,YAAY,CAAA;AA+JxB;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGC;AAAC,CAAC,EAAE,EAAE;;;ACjMN;AAAC,CAAC,EAAE,EAAE;;ACLP;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"magic-renamer.mjs","sources":["../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/rename-rule.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/magic-renamer.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/index.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/magic-renamer.ts"],"sourcesContent":["\n\nimport { Helpers } from 'tnp-helpers/browser';\nimport { _, UtilsString } from 'tnp-core/browser';\nimport { Log, Level } from 'ng2-logger/browser';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\nexport class RenameRule {\n static from(pArgs: string): RenameRule[] {\n pArgs = pArgs.replace(/\\=\\>/g, '->');\n let args = pArgs.split(/(\\'|\\\")(\\ )+(\\'|\\\")/).filter(f => !!f) as string[];\n log.d('---- Rules ----');\n args.forEach(a => {\n log.d(a);\n });\n log.d('---------------');\n return args\n .filter(a => a.search('->') !== -1)\n .map(a => {\n const [from, to] = a.split('->');\n if (!from || !to) {\n Helpers.error(\n `Incorrect rule\n \"${from}\" -> \"${to}\"\n please follow pattern: 'test name -> my new name '`,\n false,\n true,\n );\n }\n return new RenameRule(from.trim(), to.trim());\n });\n }\n\n public readonly fromWhiteSpaceReplaced: string;\n public readonly toWhiteSpaceReplaced: string;\n constructor(\n public readonly from: string,\n public readonly to: string,\n ) {\n this.fromWhiteSpaceReplaced = from.trim().toLowerCase().replace(/\\W/g, ' ');\n this.toWhiteSpaceReplaced = to.trim().toLowerCase().replace(/\\W/g, ' ');\n }\n\n applyTo(s: string): boolean {\n s = s.trim().toLowerCase().replace(/\\W/g, '');\n const res = s.search(this.from.replace(/\\W/g, '')) !== -1;\n return res;\n }\n\n toString = () => {\n return `${this.from} => ${this.to}`;\n };\n\n includes(orgString) {\n return !_.isUndefined(\n this.combinations.find(v => {\n const [from, to] = v;\n return orgString === to;\n }),\n );\n }\n\n get combinations() {\n const thisTo = this.toWhiteSpaceReplaced;\n const thisFrom = this.fromWhiteSpaceReplaced;\n return [\n\n [\n UtilsString.kebabCaseNoSplitNumbers(thisFrom),\n UtilsString.kebabCaseNoSplitNumbers(thisTo),\n ], // my-entity => hello1-kitty\n [_.kebabCase(thisFrom), _.kebabCase(thisTo)], // my-entity => hello-kitty\n [_.camelCase(thisFrom), _.camelCase(thisTo)], // myEntity => helloKitty\n [_.upperFirst(_.camelCase(thisFrom)), _.upperFirst(_.camelCase(thisTo))], // MyEntity => HelloKitty\n [_.snakeCase(thisFrom), _.snakeCase(thisTo)], // my_entity => hello_kitty\n [_.snakeCase(thisFrom).toUpperCase(), _.snakeCase(thisTo).toUpperCase()], // MY_ENTITY => HELLO_KITTY\n [_.startCase(thisFrom), _.startCase(thisTo)], // My Entity => Hello Kitty\n [_.upperCase(thisFrom), _.upperCase(thisTo)], // MY ENTITY => HELLO KITTY\n [_.lowerCase(thisFrom), _.lowerCase(thisTo)], // my entity => hello kitty\n [\n _.camelCase(thisFrom).toLocaleLowerCase(),\n _.camelCase(thisTo).toLocaleLowerCase(),\n ], // myentity => hellokitty\n ];\n }\n\n /**\n * @param orgString input string\n * @returns string with all possible combinations replaced\n */\n replaceInString(orgString: string): string {\n return this.replace({\n orgString,\n replaceallPossibliliteis: true,\n });\n }\n\n /**\n *\n * @param orgString (file name OR file content)\n * @param replaceallPossibliliteis when changin file notent (not name only)\n * @returns\n */\n replace(options: {\n /**\n * file name for debugging\n */\n fileName?: string;\n orgString: string;\n replaceallPossibliliteis?: boolean;\n }) {\n let { fileName, orgString, replaceallPossibliliteis } = options;\n replaceallPossibliliteis = !!replaceallPossibliliteis;\n const combinations = this.combinations;\n for (let index = 0; index < combinations.length; index++) {\n const v = combinations[index];\n let [from, to] = v;\n if (orgString.search(from) !== -1) {\n const regex = new RegExp(Helpers.escapeStringForRegEx(from));\n log.i(`apply! \"${regex.source}\" to file ${fileName} => \"${to}\"`);\n orgString = orgString.replace(\n new RegExp(Helpers.escapeStringForRegEx(from), 'g'),\n to,\n );\n if (!replaceallPossibliliteis) {\n return orgString;\n }\n }\n }\n return orgString;\n }\n}\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/rename-rule.ts","\n\n\nimport { Log, Level } from 'ng2-logger/browser';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n\nexport class MagicRenamer {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/magic-renamer.ts","\n\nexport * from './rename-rule';\nexport * from './magic-renamer';\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/index.ts","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["log"],"mappings":";;;;AAKA,MAAMA,KAAG,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;MAE5C,UAAU,CAAA;IACrB,OAAO,IAAI,CAAC,KAAa,EAAA;QACvB,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACrC,QAAA,IAAI,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAa,CAAC;AAC3E,QAAAA,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,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":"magic-renamer.mjs","sources":["../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/rename-rule.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/magic-renamer.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/index.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/magic-renamer.ts"],"sourcesContent":["\n\nimport { Helpers } from 'tnp-helpers/browser';\nimport { _, UtilsString } from 'tnp-core/browser';\nimport { Log, Level } from 'ng2-logger/browser';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\nexport class RenameRule {\n static from(pArgs: string): RenameRule[] {\n pArgs = pArgs.replace(/\\=\\>/g, '->');\n let args = pArgs.split(/(\\'|\\\")(\\ )+(\\'|\\\")/).filter(f => !!f) as string[];\n log.d('---- Rules ----');\n args.forEach(a => {\n log.d(a);\n });\n log.d('---------------');\n return args\n .filter(a => a.search('->') !== -1)\n .map(a => {\n const [from, to] = a.split('->');\n if (!from || !to) {\n Helpers.error(\n `Incorrect rule\n \"${from}\" -> \"${to}\"\n please follow pattern: 'test name -> my new name '`,\n false,\n true,\n );\n }\n return new RenameRule(from.trim(), to.trim());\n });\n }\n\n public readonly fromWhiteSpaceReplaced: string;\n public readonly toWhiteSpaceReplaced: string;\n constructor(\n public readonly from: string,\n public readonly to: string,\n ) {\n this.fromWhiteSpaceReplaced = from.trim().toLowerCase().replace(/\\W/g, ' ');\n this.toWhiteSpaceReplaced = to.trim().toLowerCase().replace(/\\W/g, ' ');\n }\n\n applyTo(s: string): boolean {\n s = s.trim().toLowerCase().replace(/\\W/g, '');\n const res = s.search(this.from.replace(/\\W/g, '')) !== -1;\n return res;\n }\n\n toString = () => {\n return `${this.from} => ${this.to}`;\n };\n\n includes(orgString) {\n return !_.isUndefined(\n this.combinations.find(v => {\n const [from, to] = v;\n return orgString === to;\n }),\n );\n }\n\n get combinations() {\n const thisTo = this.toWhiteSpaceReplaced;\n const thisFrom = this.fromWhiteSpaceReplaced;\n return [\n\n [\n UtilsString.kebabCaseNoSplitNumbers(thisFrom),\n UtilsString.kebabCaseNoSplitNumbers(thisTo),\n ], // my-entity => hello1-kitty\n [_.kebabCase(thisFrom), _.kebabCase(thisTo)], // my-entity => hello-kitty\n [_.camelCase(thisFrom), _.camelCase(thisTo)], // myEntity => helloKitty\n [_.upperFirst(_.camelCase(thisFrom)), _.upperFirst(_.camelCase(thisTo))], // MyEntity => HelloKitty\n [_.snakeCase(thisFrom), _.snakeCase(thisTo)], // my_entity => hello_kitty\n [_.snakeCase(thisFrom).toUpperCase(), _.snakeCase(thisTo).toUpperCase()], // MY_ENTITY => HELLO_KITTY\n [_.startCase(thisFrom), _.startCase(thisTo)], // My Entity => Hello Kitty\n [_.upperCase(thisFrom), _.upperCase(thisTo)], // MY ENTITY => HELLO KITTY\n [_.lowerCase(thisFrom), _.lowerCase(thisTo)], // my entity => hello kitty\n [\n _.camelCase(thisFrom).toLocaleLowerCase(),\n _.camelCase(thisTo).toLocaleLowerCase(),\n ], // myentity => hellokitty\n ];\n }\n\n /**\n * @param orgString input string\n * @returns string with all possible combinations replaced\n */\n replaceInString(orgString: string): string {\n return this.replace({\n orgString,\n replaceallPossibliliteis: true,\n });\n }\n\n /**\n *\n * @param orgString (file name OR file content)\n * @param replaceallPossibliliteis when changin file notent (not name only)\n * @returns\n */\n replace(options: {\n /**\n * file name for debugging\n */\n fileName?: string;\n orgString: string;\n replaceallPossibliliteis?: boolean;\n }) {\n let { fileName, orgString, replaceallPossibliliteis } = options;\n replaceallPossibliliteis = !!replaceallPossibliliteis;\n const combinations = this.combinations;\n for (let index = 0; index < combinations.length; index++) {\n const v = combinations[index];\n let [from, to] = v;\n if (orgString.search(from) !== -1) {\n const regex = new RegExp(Helpers.escapeStringForRegEx(from));\n log.i(`apply! \"${regex.source}\" to file ${fileName} => \"${to}\"`);\n orgString = orgString.replace(\n new RegExp(Helpers.escapeStringForRegEx(from), 'g'),\n to,\n );\n if (!replaceallPossibliliteis) {\n return orgString;\n }\n }\n }\n return orgString;\n }\n}\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/rename-rule.ts","\n\n\nimport { Log, Level } from 'ng2-logger/browser';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n\nexport class MagicRenamer {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/magic-renamer.ts","\n\nexport * from './rename-rule';\nexport * from './magic-renamer';\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/index.ts","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["log"],"mappings":";;;;AAKA,MAAMA,KAAG,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;MAE3C,UAAU,CAAA;IACrB,OAAO,IAAI,CAAC,KAAa,EAAA;QACvB,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;AACpC,QAAA,IAAI,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAa;AAC1E,QAAAA,KAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACxB,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,IAAG;AACf,YAAAA,KAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,SAAC,CAAC;AACF,QAAAA,KAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACxB,QAAA,OAAO;AACJ,aAAA,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACjC,GAAG,CAAC,CAAC,IAAG;AACP,YAAA,MAAM,CAAC,IAAI,EAAE,EAAE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I,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EACnD,EAAE,CACH;gBACD,IAAI,CAAC,wBAAwB,EAAE;AAC7B,oBAAA,OAAO,SAAS;;;;AAItB,QAAA,OAAO,SAAS;;AAEnB;AAEA;AAAC,CAAC,EAAE,EAAE;;ACjIP,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;AAExD;AACA;AACA;AACA;AACA;MAIa,YAAY,CAAA;AA+JxB;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGC;AAAC,CAAC,EAAE,EAAE;;;ACjMN;AAAC,CAAC,EAAE,EAAE;;ACLP;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"magic-renamer.mjs","sources":["../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/rename-rule.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/magic-renamer.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/lib/index.ts","../../../tmp-libs-for-dist/magic-renamer/projects/magic-renamer/src/magic-renamer.ts"],"sourcesContent":["\n\nimport { Helpers } from 'tnp-helpers/browser';\nimport { _, UtilsString } from 'tnp-core/browser';\nimport { Log, Level } from 'ng2-logger/browser';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\nexport class RenameRule {\n static from(pArgs: string): RenameRule[] {\n pArgs = pArgs.replace(/\\=\\>/g, '->');\n let args = pArgs.split(/(\\'|\\\")(\\ )+(\\'|\\\")/).filter(f => !!f) as string[];\n log.d('---- Rules ----');\n args.forEach(a => {\n log.d(a);\n });\n log.d('---------------');\n return args\n .filter(a => a.search('->') !== -1)\n .map(a => {\n const [from, to] = a.split('->');\n if (!from || !to) {\n Helpers.error(\n `Incorrect rule\n \"${from}\" -> \"${to}\"\n please follow pattern: 'test name -> my new name '`,\n false,\n true,\n );\n }\n return new RenameRule(from.trim(), to.trim());\n });\n }\n\n public readonly fromWhiteSpaceReplaced: string;\n public readonly toWhiteSpaceReplaced: string;\n constructor(\n public readonly from: string,\n public readonly to: string,\n ) {\n this.fromWhiteSpaceReplaced = from.trim().toLowerCase().replace(/\\W/g, ' ');\n this.toWhiteSpaceReplaced = to.trim().toLowerCase().replace(/\\W/g, ' ');\n }\n\n applyTo(s: string): boolean {\n s = s.trim().toLowerCase().replace(/\\W/g, '');\n const res = s.search(this.from.replace(/\\W/g, '')) !== -1;\n return res;\n }\n\n toString = () => {\n return `${this.from} => ${this.to}`;\n };\n\n includes(orgString) {\n return !_.isUndefined(\n this.combinations.find(v => {\n const [from, to] = v;\n return orgString === to;\n }),\n );\n }\n\n get combinations() {\n const thisTo = this.toWhiteSpaceReplaced;\n const thisFrom = this.fromWhiteSpaceReplaced;\n return [\n\n [\n UtilsString.kebabCaseNoSplitNumbers(thisFrom),\n UtilsString.kebabCaseNoSplitNumbers(thisTo),\n ], // my-entity => hello1-kitty\n [_.kebabCase(thisFrom), _.kebabCase(thisTo)], // my-entity => hello-kitty\n [_.camelCase(thisFrom), _.camelCase(thisTo)], // myEntity => helloKitty\n [_.upperFirst(_.camelCase(thisFrom)), _.upperFirst(_.camelCase(thisTo))], // MyEntity => HelloKitty\n [_.snakeCase(thisFrom), _.snakeCase(thisTo)], // my_entity => hello_kitty\n [_.snakeCase(thisFrom).toUpperCase(), _.snakeCase(thisTo).toUpperCase()], // MY_ENTITY => HELLO_KITTY\n [_.startCase(thisFrom), _.startCase(thisTo)], // My Entity => Hello Kitty\n [_.upperCase(thisFrom), _.upperCase(thisTo)], // MY ENTITY => HELLO KITTY\n [_.lowerCase(thisFrom), _.lowerCase(thisTo)], // my entity => hello kitty\n [\n _.camelCase(thisFrom).toLocaleLowerCase(),\n _.camelCase(thisTo).toLocaleLowerCase(),\n ], // myentity => hellokitty\n ];\n }\n\n /**\n * @param orgString input string\n * @returns string with all possible combinations replaced\n */\n replaceInString(orgString: string): string {\n return this.replace({\n orgString,\n replaceallPossibliliteis: true,\n });\n }\n\n /**\n *\n * @param orgString (file name OR file content)\n * @param replaceallPossibliliteis when changin file notent (not name only)\n * @returns\n */\n replace(options: {\n /**\n * file name for debugging\n */\n fileName?: string;\n orgString: string;\n replaceallPossibliliteis?: boolean;\n }) {\n let { fileName, orgString, replaceallPossibliliteis } = options;\n replaceallPossibliliteis = !!replaceallPossibliliteis;\n const combinations = this.combinations;\n for (let index = 0; index < combinations.length; index++) {\n const v = combinations[index];\n let [from, to] = v;\n if (orgString.search(from) !== -1) {\n const regex = new RegExp(Helpers.escapeStringForRegEx(from));\n log.i(`apply! \"${regex.source}\" to file ${fileName} => \"${to}\"`);\n orgString = orgString.replace(\n new RegExp(Helpers.escapeStringForRegEx(from), 'g'),\n to,\n );\n if (!replaceallPossibliliteis) {\n return orgString;\n }\n }\n }\n return orgString;\n }\n}\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/rename-rule.ts","\n\n\nimport { Log, Level } from 'ng2-logger/browser';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n\nexport class MagicRenamer {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/magic-renamer.ts","\n\nexport * from './rename-rule';\nexport * from './magic-renamer';\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/index.ts","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["log"],"mappings":";;;;AAKA,MAAMA,KAAG,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;MAE5C,UAAU,CAAA;IACrB,OAAO,IAAI,CAAC,KAAa,EAAA;QACvB,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACrC,QAAA,IAAI,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAa,CAAC;AAC3E,QAAAA,KAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AACzB,Q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
|
|
41
41
|
"name": "magic-renamer",
|
|
42
|
-
"version": "18.0.
|
|
42
|
+
"version": "18.0.17",
|
|
43
43
|
"bin": {
|
|
44
44
|
"magic-renamer": "bin/magic-renamer",
|
|
45
45
|
"magic-renamer-debug": "bin/magic-renamer-debug"
|
|
46
46
|
},
|
|
47
47
|
"license": "UNLICENSED",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"tnp-helpers": "~18.0.
|
|
49
|
+
"tnp-helpers": "~18.0.17"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {},
|
|
52
52
|
"private": false,
|
|
53
|
-
"lastBuildTagHash": "
|
|
54
|
-
"main": "
|
|
53
|
+
"lastBuildTagHash": "72b604c7b1cb49396508787330da403f077fb59c",
|
|
54
|
+
"main": "dist/app.electron.js"
|
|
55
55
|
}
|
package/taon.jsonc
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"resources": ["README.md"],
|
|
3
|
-
|
|
4
|
-
"overrided": {
|
|
5
|
-
"ignoreDepsPattern": [],
|
|
6
|
-
"includeAsDev": [],
|
|
7
|
-
"includeOnly": ["tnp-helpers"],
|
|
8
|
-
"dependencies": {},
|
|
9
|
-
"linkedFolders": [],
|
|
10
|
-
"npmFixes": []
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
"smartContainerBuildTarget": "",
|
|
14
|
-
"linkedRepos": [],
|
|
15
|
-
|
|
16
|
-
"libReleaseOptions": {
|
|
17
|
-
"nodts": false,
|
|
18
|
-
"obscure": false,
|
|
19
|
-
"ugly": false,
|
|
20
|
-
"includeNodeModules": false,
|
|
21
|
-
"cliBuildNoDts": false,
|
|
22
|
-
"cliBuildObscure": false,
|
|
23
|
-
"cliBuildIncludeNodeModules": false,
|
|
24
|
-
"cliBuildUglify": false
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
"smartContainerTarget": "",
|
|
28
|
-
"type": "isomorphic-lib",
|
|
29
|
-
"isCoreProject": false,
|
|
30
|
-
"useFramework": false,
|
|
31
|
-
"required": [],
|
|
32
|
-
"version": "v18",
|
|
33
|
-
"isGenerated": false,
|
|
34
|
-
"requiredServers": [],
|
|
35
|
-
"license": "UNLICENSED",
|
|
36
|
-
"private": false,
|
|
37
|
-
"main": "index.js",
|
|
38
|
-
"workerPlugins": {}
|
|
1
|
+
{
|
|
2
|
+
"resources": ["README.md"],
|
|
3
|
+
|
|
4
|
+
"overrided": {
|
|
5
|
+
"ignoreDepsPattern": [],
|
|
6
|
+
"includeAsDev": [],
|
|
7
|
+
"includeOnly": ["tnp-helpers"],
|
|
8
|
+
"dependencies": {},
|
|
9
|
+
"linkedFolders": [],
|
|
10
|
+
"npmFixes": []
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
"smartContainerBuildTarget": "",
|
|
14
|
+
"linkedRepos": [],
|
|
15
|
+
|
|
16
|
+
"libReleaseOptions": {
|
|
17
|
+
"nodts": false,
|
|
18
|
+
"obscure": false,
|
|
19
|
+
"ugly": false,
|
|
20
|
+
"includeNodeModules": false,
|
|
21
|
+
"cliBuildNoDts": false,
|
|
22
|
+
"cliBuildObscure": false,
|
|
23
|
+
"cliBuildIncludeNodeModules": false,
|
|
24
|
+
"cliBuildUglify": false
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
"smartContainerTarget": "",
|
|
28
|
+
"type": "isomorphic-lib",
|
|
29
|
+
"isCoreProject": false,
|
|
30
|
+
"useFramework": false,
|
|
31
|
+
"required": [],
|
|
32
|
+
"version": "v18",
|
|
33
|
+
"isGenerated": false,
|
|
34
|
+
"requiredServers": [],
|
|
35
|
+
"license": "UNLICENSED",
|
|
36
|
+
"private": false,
|
|
37
|
+
"main": "index.js",
|
|
38
|
+
"workerPlugins": {}
|
|
39
39
|
}
|
package/tmp-environment.json
CHANGED
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"workerPlugins": {}
|
|
44
44
|
},
|
|
45
45
|
"name": "magic-renamer",
|
|
46
|
-
"version": "18.0.
|
|
46
|
+
"version": "18.0.17",
|
|
47
47
|
"bin": {
|
|
48
48
|
"magic-renamer": "bin/magic-renamer",
|
|
49
49
|
"magic-renamer-debug": "bin/magic-renamer-debug"
|
|
50
50
|
},
|
|
51
51
|
"license": "UNLICENSED",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"tnp-helpers": "~18.0.
|
|
53
|
+
"tnp-helpers": "~18.0.17"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@angular-builders/custom-webpack": "~18.0.0",
|
|
@@ -216,13 +216,13 @@
|
|
|
216
216
|
"image-focus": "1.2.1",
|
|
217
217
|
"immer": "10.0.2",
|
|
218
218
|
"immutable": "4.3.7",
|
|
219
|
-
"incremental-compiler": "~18.0.
|
|
219
|
+
"incremental-compiler": "~18.0.17",
|
|
220
220
|
"inquirer": "7.3.3",
|
|
221
221
|
"inquirer-autocomplete-prompt": "1.4.0",
|
|
222
222
|
"inquirer-autocomplete-standalone": "0.8.1",
|
|
223
223
|
"inquirer-select-pro": "1.0.0-alpha.7",
|
|
224
224
|
"is-elevated": "3.0.0",
|
|
225
|
-
"isomorphic-region-loader": "~18.0.
|
|
225
|
+
"isomorphic-region-loader": "~18.0.17",
|
|
226
226
|
"istanbul-instrumenter-loader": "3.0.1",
|
|
227
227
|
"jest": "29.7.0",
|
|
228
228
|
"jest-date-mock": "1.0.10",
|
|
@@ -233,8 +233,8 @@
|
|
|
233
233
|
"joi": "17.13.3",
|
|
234
234
|
"jscodeshift": "0.6.3",
|
|
235
235
|
"json-stringify-safe": "5.0.1",
|
|
236
|
-
"json10": "~18.0.
|
|
237
|
-
"json10-writer": "~18.0.
|
|
236
|
+
"json10": "~18.0.17",
|
|
237
|
+
"json10-writer": "~18.0.17",
|
|
238
238
|
"json5": "2.2.3",
|
|
239
239
|
"json5-writer": "0.2.0",
|
|
240
240
|
"jszip": "3.10.1",
|
|
@@ -243,9 +243,9 @@
|
|
|
243
243
|
"localforage": "1.10.0",
|
|
244
244
|
"lockfile": "1.0.4",
|
|
245
245
|
"lodash": "4.17.21",
|
|
246
|
-
"lodash-walk-object": "~18.0.
|
|
246
|
+
"lodash-walk-object": "~18.0.17",
|
|
247
247
|
"lowdb": "7.0.1",
|
|
248
|
-
"magic-renamer": "~18.0.
|
|
248
|
+
"magic-renamer": "~18.0.16",
|
|
249
249
|
"material-design-icons": "3.0.1",
|
|
250
250
|
"method-override": "2.3.10",
|
|
251
251
|
"minimist": "1.2.8",
|
|
@@ -256,11 +256,11 @@
|
|
|
256
256
|
"ng-in-viewport": "16.1.0",
|
|
257
257
|
"ng-lock": "18.0.1",
|
|
258
258
|
"ng-packagr": "18.1.0",
|
|
259
|
-
"ng-talkback": "~18.0.
|
|
260
|
-
"ng2-logger": "~18.0.
|
|
259
|
+
"ng-talkback": "~18.0.15",
|
|
260
|
+
"ng2-logger": "~18.0.19",
|
|
261
261
|
"ng2-pdfjs-viewer": "18.0.0",
|
|
262
|
-
"ng2-rest": "~18.0.
|
|
263
|
-
"ng2-rest-swagger-generator": "18.0.
|
|
262
|
+
"ng2-rest": "~18.0.16",
|
|
263
|
+
"ng2-rest-swagger-generator": "18.0.13",
|
|
264
264
|
"ngx-ace-wrapper": "17.0.0",
|
|
265
265
|
"ngx-editor": "17.5.4",
|
|
266
266
|
"ngx-highlightjs": "12.0.0",
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
"ngx-scrolltop": "18.0.0",
|
|
275
275
|
"ngx-store": "3.1.1",
|
|
276
276
|
"ngx-typed-js": "2.1.1",
|
|
277
|
-
"node-cli-tester": "~18.0.
|
|
277
|
+
"node-cli-tester": "~18.0.15",
|
|
278
278
|
"node-localstorage": "2.1.6",
|
|
279
279
|
"node-notifier": "10.0.1",
|
|
280
280
|
"node-polyfill-webpack-plugin": "2.0.1",
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
"q": "1.5.1",
|
|
306
306
|
"rallax.js": "2.0.4",
|
|
307
307
|
"randomcolor": "0.5.3",
|
|
308
|
-
"record-replay-req-res-scenario": "~18.0.
|
|
308
|
+
"record-replay-req-res-scenario": "~18.0.15",
|
|
309
309
|
"reflect-metadata": "0.2.2",
|
|
310
310
|
"rimraf": "2.6.2",
|
|
311
311
|
"rxjs": "~7.8.1",
|
|
@@ -319,22 +319,22 @@
|
|
|
319
319
|
"sql-template-strings": "2.2.2",
|
|
320
320
|
"sql-template-tag": "5.2.1",
|
|
321
321
|
"sql.js": "1.8.0",
|
|
322
|
-
"static-columns": "~18.0.
|
|
322
|
+
"static-columns": "~18.0.17",
|
|
323
323
|
"string-similarity": "4.0.4",
|
|
324
324
|
"sudo-block": "3.0.0",
|
|
325
325
|
"supertest": "7.0.0",
|
|
326
326
|
"sweetalert2": "11.7.32",
|
|
327
327
|
"systeminformation": "3.45.7",
|
|
328
328
|
"taon": "^18",
|
|
329
|
-
"taon-storage": "18.0.
|
|
330
|
-
"taon-type-sql": "18.0.
|
|
331
|
-
"taon-typeorm": "18.0.
|
|
329
|
+
"taon-storage": "18.0.25",
|
|
330
|
+
"taon-type-sql": "18.0.16",
|
|
331
|
+
"taon-typeorm": "18.0.15",
|
|
332
332
|
"task.js": "0.1.5",
|
|
333
333
|
"threads": "1.7.0",
|
|
334
|
-
"tnp": "~18.0.
|
|
335
|
-
"tnp-config": "~18.0.
|
|
336
|
-
"tnp-core": "~18.0.
|
|
337
|
-
"tnp-models": "~18.0.
|
|
334
|
+
"tnp": "~18.0.18",
|
|
335
|
+
"tnp-config": "~18.0.19",
|
|
336
|
+
"tnp-core": "~18.0.43",
|
|
337
|
+
"tnp-models": "~18.0.18",
|
|
338
338
|
"ts-debug": "1.3.0",
|
|
339
339
|
"ts-json-schema-generator": "2.3.0-next.5",
|
|
340
340
|
"ts-loader": "2.3.1",
|
|
@@ -346,14 +346,14 @@
|
|
|
346
346
|
"typedoc": "0.26.5",
|
|
347
347
|
"typedoc-plugin-markdown": "4.2.3",
|
|
348
348
|
"typescript": "~5.5.4",
|
|
349
|
-
"typescript-class-helpers": "~18.0.
|
|
349
|
+
"typescript-class-helpers": "~18.0.18",
|
|
350
350
|
"typescript-formatter": "~7.2.2",
|
|
351
351
|
"typescript-string-enums": "~1.0.0",
|
|
352
352
|
"underscore": "1.13.7",
|
|
353
353
|
"uuid": "10.0.0",
|
|
354
354
|
"validator": "13.5.2",
|
|
355
355
|
"video.js": "8.3.0",
|
|
356
|
-
"vpn-split": "~18.0.
|
|
356
|
+
"vpn-split": "~18.0.15",
|
|
357
357
|
"vscode": "1.1.37",
|
|
358
358
|
"wait-on": "8.0.1",
|
|
359
359
|
"watch": "1.0.2",
|
|
@@ -364,18 +364,18 @@
|
|
|
364
364
|
"zone.js": "~0.13.0"
|
|
365
365
|
},
|
|
366
366
|
"private": false,
|
|
367
|
-
"lastBuildTagHash": "
|
|
367
|
+
"lastBuildTagHash": "72b604c7b1cb49396508787330da403f077fb59c",
|
|
368
368
|
"main": "dist/app.electron.js"
|
|
369
369
|
},
|
|
370
370
|
"build": {
|
|
371
|
-
"number":
|
|
372
|
-
"date": "2024-
|
|
373
|
-
"hash": "
|
|
371
|
+
"number": 296,
|
|
372
|
+
"date": "2024-12-31T17:54:13.000Z",
|
|
373
|
+
"hash": "b6fa5c4c87e84fbe2c90a6d9c56f3f17e3f92b88"
|
|
374
374
|
},
|
|
375
375
|
"currentProjectName": "magic-renamer",
|
|
376
376
|
"currentProjectGenericName": "magic-renamer",
|
|
377
377
|
"currentProjectType": "isomorphic-lib",
|
|
378
|
-
"currentFrameworkVersion": "18.0.
|
|
378
|
+
"currentFrameworkVersion": "18.0.18",
|
|
379
379
|
"isStandaloneProject": true,
|
|
380
380
|
"isSmartContainer": false,
|
|
381
381
|
"pathesTsconfig": "\"paths\": {\"magic-renamer\":[\"./src/lib\"],\"magic-renamer/*\":[\"./src/lib/*\"]},",
|
package/websql/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":"magic-renamer.mjs","sources":["../../../tmp-libs-for-dist-websql/magic-renamer/projects/magic-renamer/src/lib/rename-rule.ts","../../../tmp-libs-for-dist-websql/magic-renamer/projects/magic-renamer/src/lib/magic-renamer.ts","../../../tmp-libs-for-dist-websql/magic-renamer/projects/magic-renamer/src/lib/index.ts","../../../tmp-libs-for-dist-websql/magic-renamer/projects/magic-renamer/src/magic-renamer.ts"],"sourcesContent":["\n\nimport { Helpers } from 'tnp-helpers/websql';\nimport { _, UtilsString } from 'tnp-core/websql';\nimport { Log, Level } from 'ng2-logger/websql';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\nexport class RenameRule {\n static from(pArgs: string): RenameRule[] {\n pArgs = pArgs.replace(/\\=\\>/g, '->');\n let args = pArgs.split(/(\\'|\\\")(\\ )+(\\'|\\\")/).filter(f => !!f) as string[];\n log.d('---- Rules ----');\n args.forEach(a => {\n log.d(a);\n });\n log.d('---------------');\n return args\n .filter(a => a.search('->') !== -1)\n .map(a => {\n const [from, to] = a.split('->');\n if (!from || !to) {\n Helpers.error(\n `Incorrect rule\n \"${from}\" -> \"${to}\"\n please follow pattern: 'test name -> my new name '`,\n false,\n true,\n );\n }\n return new RenameRule(from.trim(), to.trim());\n });\n }\n\n public readonly fromWhiteSpaceReplaced: string;\n public readonly toWhiteSpaceReplaced: string;\n constructor(\n public readonly from: string,\n public readonly to: string,\n ) {\n this.fromWhiteSpaceReplaced = from.trim().toLowerCase().replace(/\\W/g, ' ');\n this.toWhiteSpaceReplaced = to.trim().toLowerCase().replace(/\\W/g, ' ');\n }\n\n applyTo(s: string): boolean {\n s = s.trim().toLowerCase().replace(/\\W/g, '');\n const res = s.search(this.from.replace(/\\W/g, '')) !== -1;\n return res;\n }\n\n toString = () => {\n return `${this.from} => ${this.to}`;\n };\n\n includes(orgString) {\n return !_.isUndefined(\n this.combinations.find(v => {\n const [from, to] = v;\n return orgString === to;\n }),\n );\n }\n\n get combinations() {\n const thisTo = this.toWhiteSpaceReplaced;\n const thisFrom = this.fromWhiteSpaceReplaced;\n return [\n\n [\n UtilsString.kebabCaseNoSplitNumbers(thisFrom),\n UtilsString.kebabCaseNoSplitNumbers(thisTo),\n ], // my-entity => hello1-kitty\n [_.kebabCase(thisFrom), _.kebabCase(thisTo)], // my-entity => hello-kitty\n [_.camelCase(thisFrom), _.camelCase(thisTo)], // myEntity => helloKitty\n [_.upperFirst(_.camelCase(thisFrom)), _.upperFirst(_.camelCase(thisTo))], // MyEntity => HelloKitty\n [_.snakeCase(thisFrom), _.snakeCase(thisTo)], // my_entity => hello_kitty\n [_.snakeCase(thisFrom).toUpperCase(), _.snakeCase(thisTo).toUpperCase()], // MY_ENTITY => HELLO_KITTY\n [_.startCase(thisFrom), _.startCase(thisTo)], // My Entity => Hello Kitty\n [_.upperCase(thisFrom), _.upperCase(thisTo)], // MY ENTITY => HELLO KITTY\n [_.lowerCase(thisFrom), _.lowerCase(thisTo)], // my entity => hello kitty\n [\n _.camelCase(thisFrom).toLocaleLowerCase(),\n _.camelCase(thisTo).toLocaleLowerCase(),\n ], // myentity => hellokitty\n ];\n }\n\n /**\n * @param orgString input string\n * @returns string with all possible combinations replaced\n */\n replaceInString(orgString: string): string {\n return this.replace({\n orgString,\n replaceallPossibliliteis: true,\n });\n }\n\n /**\n *\n * @param orgString (file name OR file content)\n * @param replaceallPossibliliteis when changin file notent (not name only)\n * @returns\n */\n replace(options: {\n /**\n * file name for debugging\n */\n fileName?: string;\n orgString: string;\n replaceallPossibliliteis?: boolean;\n }) {\n let { fileName, orgString, replaceallPossibliliteis } = options;\n replaceallPossibliliteis = !!replaceallPossibliliteis;\n const combinations = this.combinations;\n for (let index = 0; index < combinations.length; index++) {\n const v = combinations[index];\n let [from, to] = v;\n if (orgString.search(from) !== -1) {\n const regex = new RegExp(Helpers.escapeStringForRegEx(from));\n log.i(`apply! \"${regex.source}\" to file ${fileName} => \"${to}\"`);\n orgString = orgString.replace(\n new RegExp(Helpers.escapeStringForRegEx(from), 'g'),\n to,\n );\n if (!replaceallPossibliliteis) {\n return orgString;\n }\n }\n }\n return orgString;\n }\n}\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/rename-rule.ts","\n\n\nimport { Log, Level } from 'ng2-logger/websql';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n\nexport class MagicRenamer {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/magic-renamer.ts","\n\nexport * from './rename-rule';\nexport * from './magic-renamer';\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/index.ts","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["log"],"mappings":";;;;AAKA,MAAMA,KAAG,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;MAE3C,UAAU,CAAA;IACrB,OAAO,IAAI,CAAC,KAAa,EAAA;QACvB,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;AACpC,QAAA,IAAI,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAa;AAC1E,QAAAA,KAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACxB,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,IAAG;AACf,YAAAA,KAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,SAAC,CAAC;AACF,QAAAA,KAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACxB,QAAA,OAAO;AACJ,aAAA,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACjC,GAAG,CAAC,CAAC,IAAG;AACP,YAAA,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;AAChC,YAAA,IAAI,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AC,EACnD,EAAE,CACH;gBACD,IAAI,CAAC,wBAAwB,EAAE;AAC7B,oBAAA,OAAO,SAAS;;;;AAItB,QAAA,OAAO,SAAS;;AAEnB;AAEA;AAAC,CAAC,EAAE,EAAE;;ACjIP,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;AAExD;AACA;AACA;AACA;AACA;MAIa,YAAY,CAAA;AA+JxB;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGC;AAAC,CAAC,EAAE,EAAE;;;ACjMN;AAAC,CAAC,EAAE,EAAE;;ACLP;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"magic-renamer.mjs","sources":["../../../tmp-libs-for-dist-websql/magic-renamer/projects/magic-renamer/src/lib/rename-rule.ts","../../../tmp-libs-for-dist-websql/magic-renamer/projects/magic-renamer/src/lib/magic-renamer.ts","../../../tmp-libs-for-dist-websql/magic-renamer/projects/magic-renamer/src/lib/index.ts","../../../tmp-libs-for-dist-websql/magic-renamer/projects/magic-renamer/src/magic-renamer.ts"],"sourcesContent":["\n\nimport { Helpers } from 'tnp-helpers/websql';\nimport { _, UtilsString } from 'tnp-core/websql';\nimport { Log, Level } from 'ng2-logger/websql';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\nexport class RenameRule {\n static from(pArgs: string): RenameRule[] {\n pArgs = pArgs.replace(/\\=\\>/g, '->');\n let args = pArgs.split(/(\\'|\\\")(\\ )+(\\'|\\\")/).filter(f => !!f) as string[];\n log.d('---- Rules ----');\n args.forEach(a => {\n log.d(a);\n });\n log.d('---------------');\n return args\n .filter(a => a.search('->') !== -1)\n .map(a => {\n const [from, to] = a.split('->');\n if (!from || !to) {\n Helpers.error(\n `Incorrect rule\n \"${from}\" -> \"${to}\"\n please follow pattern: 'test name -> my new name '`,\n false,\n true,\n );\n }\n return new RenameRule(from.trim(), to.trim());\n });\n }\n\n public readonly fromWhiteSpaceReplaced: string;\n public readonly toWhiteSpaceReplaced: string;\n constructor(\n public readonly from: string,\n public readonly to: string,\n ) {\n this.fromWhiteSpaceReplaced = from.trim().toLowerCase().replace(/\\W/g, ' ');\n this.toWhiteSpaceReplaced = to.trim().toLowerCase().replace(/\\W/g, ' ');\n }\n\n applyTo(s: string): boolean {\n s = s.trim().toLowerCase().replace(/\\W/g, '');\n const res = s.search(this.from.replace(/\\W/g, '')) !== -1;\n return res;\n }\n\n toString = () => {\n return `${this.from} => ${this.to}`;\n };\n\n includes(orgString) {\n return !_.isUndefined(\n this.combinations.find(v => {\n const [from, to] = v;\n return orgString === to;\n }),\n );\n }\n\n get combinations() {\n const thisTo = this.toWhiteSpaceReplaced;\n const thisFrom = this.fromWhiteSpaceReplaced;\n return [\n\n [\n UtilsString.kebabCaseNoSplitNumbers(thisFrom),\n UtilsString.kebabCaseNoSplitNumbers(thisTo),\n ], // my-entity => hello1-kitty\n [_.kebabCase(thisFrom), _.kebabCase(thisTo)], // my-entity => hello-kitty\n [_.camelCase(thisFrom), _.camelCase(thisTo)], // myEntity => helloKitty\n [_.upperFirst(_.camelCase(thisFrom)), _.upperFirst(_.camelCase(thisTo))], // MyEntity => HelloKitty\n [_.snakeCase(thisFrom), _.snakeCase(thisTo)], // my_entity => hello_kitty\n [_.snakeCase(thisFrom).toUpperCase(), _.snakeCase(thisTo).toUpperCase()], // MY_ENTITY => HELLO_KITTY\n [_.startCase(thisFrom), _.startCase(thisTo)], // My Entity => Hello Kitty\n [_.upperCase(thisFrom), _.upperCase(thisTo)], // MY ENTITY => HELLO KITTY\n [_.lowerCase(thisFrom), _.lowerCase(thisTo)], // my entity => hello kitty\n [\n _.camelCase(thisFrom).toLocaleLowerCase(),\n _.camelCase(thisTo).toLocaleLowerCase(),\n ], // myentity => hellokitty\n ];\n }\n\n /**\n * @param orgString input string\n * @returns string with all possible combinations replaced\n */\n replaceInString(orgString: string): string {\n return this.replace({\n orgString,\n replaceallPossibliliteis: true,\n });\n }\n\n /**\n *\n * @param orgString (file name OR file content)\n * @param replaceallPossibliliteis when changin file notent (not name only)\n * @returns\n */\n replace(options: {\n /**\n * file name for debugging\n */\n fileName?: string;\n orgString: string;\n replaceallPossibliliteis?: boolean;\n }) {\n let { fileName, orgString, replaceallPossibliliteis } = options;\n replaceallPossibliliteis = !!replaceallPossibliliteis;\n const combinations = this.combinations;\n for (let index = 0; index < combinations.length; index++) {\n const v = combinations[index];\n let [from, to] = v;\n if (orgString.search(from) !== -1) {\n const regex = new RegExp(Helpers.escapeStringForRegEx(from));\n log.i(`apply! \"${regex.source}\" to file ${fileName} => \"${to}\"`);\n orgString = orgString.replace(\n new RegExp(Helpers.escapeStringForRegEx(from), 'g'),\n to,\n );\n if (!replaceallPossibliliteis) {\n return orgString;\n }\n }\n }\n return orgString;\n }\n}\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/rename-rule.ts","\n\n\nimport { Log, Level } from 'ng2-logger/websql';\nconst log = Log.create('magic-renemer', Level.__NOTHING);\n\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n\nexport class MagicRenamer {\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n}\n\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n/* */\n \n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/magic-renamer.ts","\n\nexport * from './rename-rule';\nexport * from './magic-renamer';\n\n ;({}); // @--end-of-file-for-module=magic-renamer lib/index.ts","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["log"],"mappings":";;;;AAKA,MAAMA,KAAG,GAAG,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;MAE5C,UAAU,CAAA;IACrB,OAAO,IAAI,CAAC,KAAa,EAAA;QACvB,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACrC,QAAA,IAAI,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAa,CAAC;AAC3E,QAAAA,KAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AACzB,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,IAAG;AACf,YAAAA,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