magic-renamer 19.0.19 → 19.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/browser/package.json +1 -1
- package/client/package.json +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/package.json +1 -1
- package/tmp-environment.json +11 -5
- package/websql/package.json +1 -1
- package/lib/rename-rule.backend.d.ts +0 -18
- package/lib/rename-rule.backend.js +0 -77
- package/lib/rename-rule.backend.js.map +0 -1
package/browser/package.json
CHANGED
package/client/package.json
CHANGED
|
@@ -4,6 +4,6 @@ exports.CURRENT_PACKAGE_VERSION = exports.PROJECT_NPM_NAME = exports.BUILD_FRAME
|
|
|
4
4
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
5
5
|
exports.BUILD_FRAMEWORK_CLI_NAME = 'tnp';
|
|
6
6
|
exports.PROJECT_NPM_NAME = 'magic-renamer';
|
|
7
|
-
exports.CURRENT_PACKAGE_VERSION = '19.0.
|
|
7
|
+
exports.CURRENT_PACKAGE_VERSION = '19.0.21';
|
|
8
8
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
9
9
|
//# sourceMappingURL=build-info._auto-generated_.js.map
|
package/package.json
CHANGED
package/tmp-environment.json
CHANGED
|
@@ -5,8 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"paths": {},
|
|
7
7
|
"config": {},
|
|
8
|
-
"container": {
|
|
9
|
-
|
|
8
|
+
"container": {
|
|
9
|
+
"only": []
|
|
10
|
+
},
|
|
11
|
+
"ports": {
|
|
12
|
+
"ngNormalAppPort": 4257,
|
|
13
|
+
"ngWebsqlAppPort": 4258,
|
|
14
|
+
"nodeBeAppPort": 4121
|
|
15
|
+
},
|
|
10
16
|
"init": {},
|
|
11
17
|
"build": {
|
|
12
18
|
"pwa": {},
|
|
@@ -24,12 +30,12 @@
|
|
|
24
30
|
"releaseType": "manual",
|
|
25
31
|
"targetArtifact": "npm-lib-and-cli-tool",
|
|
26
32
|
"envName": "__",
|
|
27
|
-
"resolvedNewVersion": "19.0.
|
|
33
|
+
"resolvedNewVersion": "19.0.21"
|
|
28
34
|
},
|
|
29
35
|
"copyToManager": {},
|
|
30
36
|
"buildInfo": {
|
|
31
|
-
"date": "2025-05-
|
|
32
|
-
"hash": "
|
|
37
|
+
"date": "2025-05-17T01:18:10.000Z",
|
|
38
|
+
"hash": "b81ac223c2e775b806175b7583370d73a9bb3559"
|
|
33
39
|
},
|
|
34
40
|
"currentProjectName": "magic-renamer",
|
|
35
41
|
"currentProjectType": "isomorphic-lib",
|
package/websql/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare class RenameRule {
|
|
2
|
-
readonly from: string;
|
|
3
|
-
readonly to: string;
|
|
4
|
-
readonly fromWhiteSpaceReplaced: string;
|
|
5
|
-
readonly toWhiteSpaceReplaced: string;
|
|
6
|
-
constructor(from: string, to: string);
|
|
7
|
-
applyTo(s: string): boolean;
|
|
8
|
-
toString: () => string;
|
|
9
|
-
includes(orgString: any): boolean;
|
|
10
|
-
get combinations(): string[][];
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @param orgString (file name OR file content)
|
|
14
|
-
* @param replaceallPossibliliteis when changin file notent (not name only)
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
replace(filename: string, orgString: string, replaceallPossibliliteis?: boolean): string;
|
|
18
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenameRule = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var tnp_helpers_1 = require("tnp-helpers");
|
|
6
|
-
var tnp_core_1 = require("tnp-core");
|
|
7
|
-
var ng2_logger_1 = require("ng2-logger");
|
|
8
|
-
var log = ng2_logger_1.Log.create('magic-renemer', ng2_logger_1.Level.__NOTHING);
|
|
9
|
-
var RenameRule = /** @class */ (function () {
|
|
10
|
-
function RenameRule(from, to) {
|
|
11
|
-
var _this = this;
|
|
12
|
-
this.from = from;
|
|
13
|
-
this.to = to;
|
|
14
|
-
this.toString = function () {
|
|
15
|
-
return "".concat(_this.from, " => ").concat(_this.to);
|
|
16
|
-
};
|
|
17
|
-
this.fromWhiteSpaceReplaced = from.trim().toLowerCase().replace(/\W/g, ' ');
|
|
18
|
-
this.toWhiteSpaceReplaced = to.trim().toLowerCase().replace(/\W/g, ' ');
|
|
19
|
-
}
|
|
20
|
-
RenameRule.prototype.applyTo = function (s) {
|
|
21
|
-
s = s.trim().toLowerCase().replace(/\W/g, '');
|
|
22
|
-
var res = (s.search(this.from.replace(/\W/g, '')) !== -1);
|
|
23
|
-
return res;
|
|
24
|
-
};
|
|
25
|
-
RenameRule.prototype.includes = function (orgString) {
|
|
26
|
-
return !tnp_core_1._.isUndefined(this.combinations.find(function (v) {
|
|
27
|
-
var _a = tslib_1.__read(v, 2), from = _a[0], to = _a[1];
|
|
28
|
-
return orgString === to;
|
|
29
|
-
}));
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(RenameRule.prototype, "combinations", {
|
|
32
|
-
get: function () {
|
|
33
|
-
var thisTo = this.toWhiteSpaceReplaced;
|
|
34
|
-
var thisFrom = this.fromWhiteSpaceReplaced;
|
|
35
|
-
return [
|
|
36
|
-
// TODO 'rs.asdasd-asd-A.'
|
|
37
|
-
[tnp_core_1._.kebabCase(thisFrom), tnp_core_1._.kebabCase(thisTo)], // my-entity => hello-kitty
|
|
38
|
-
[tnp_core_1._.camelCase(thisFrom), tnp_core_1._.camelCase(thisTo)], // myEntity => helloKitty
|
|
39
|
-
[tnp_core_1._.upperFirst(tnp_core_1._.camelCase(thisFrom)), tnp_core_1._.upperFirst(tnp_core_1._.camelCase(thisTo))], // MyEntity => HelloKitty
|
|
40
|
-
[tnp_core_1._.snakeCase(thisFrom), tnp_core_1._.snakeCase(thisTo)], // my_entity => hello_kitty
|
|
41
|
-
[tnp_core_1._.snakeCase(thisFrom).toUpperCase(), tnp_core_1._.snakeCase(thisTo).toUpperCase()], // MY_ENTITY => HELLO_KITTY
|
|
42
|
-
[tnp_core_1._.startCase(thisFrom), tnp_core_1._.startCase(thisTo)], // My Entity => Hello Kitty
|
|
43
|
-
[tnp_core_1._.upperCase(thisFrom), tnp_core_1._.upperCase(thisTo)], // MY ENTITY => HELLO KITTY
|
|
44
|
-
[tnp_core_1._.lowerCase(thisFrom), tnp_core_1._.lowerCase(thisTo)], // my entity => hello kitty
|
|
45
|
-
[tnp_core_1._.camelCase(thisFrom).toLocaleLowerCase(), tnp_core_1._.camelCase(thisTo).toLocaleLowerCase()], // myentity => hellokitty
|
|
46
|
-
];
|
|
47
|
-
},
|
|
48
|
-
enumerable: false,
|
|
49
|
-
configurable: true
|
|
50
|
-
});
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @param orgString (file name OR file content)
|
|
54
|
-
* @param replaceallPossibliliteis when changin file notent (not name only)
|
|
55
|
-
* @returns
|
|
56
|
-
*/
|
|
57
|
-
RenameRule.prototype.replace = function (filename, orgString, replaceallPossibliliteis) {
|
|
58
|
-
if (replaceallPossibliliteis === void 0) { replaceallPossibliliteis = false; }
|
|
59
|
-
var combinations = this.combinations;
|
|
60
|
-
for (var index = 0; index < combinations.length; index++) {
|
|
61
|
-
var v = combinations[index];
|
|
62
|
-
var _a = tslib_1.__read(v, 2), from = _a[0], to = _a[1];
|
|
63
|
-
if (orgString.search(from) !== -1) {
|
|
64
|
-
var regex = new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx(from));
|
|
65
|
-
log.i("apply! \"".concat(regex.source, "\" to file ").concat(filename, " => \"").concat(to, "\""));
|
|
66
|
-
orgString = orgString.replace(new RegExp(tnp_helpers_1.Helpers.escapeStringForRegEx(from), 'g'), to);
|
|
67
|
-
if (!replaceallPossibliliteis) {
|
|
68
|
-
return orgString;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return orgString;
|
|
73
|
-
};
|
|
74
|
-
return RenameRule;
|
|
75
|
-
}());
|
|
76
|
-
exports.RenameRule = RenameRule;
|
|
77
|
-
//# sourceMappingURL=rename-rule.backend.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rename-rule.backend.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/magic-renamer/src/lib/rename-rule.backend.ts"],"names":[],"mappings":";;;;AAAA,2CAAsC;AACtC,qCAA6B;AAC7B,yCAAwC;AACxC,IAAM,GAAG,GAAG,gBAAG,CAAC,MAAM,CAAC,eAAe,EACpC,kBAAK,CAAC,SAAS,CAChB,CAAA;AAGD;IAIE,oBACkB,IAAY,EACZ,EAAU;QAF5B,iBAOC;QANiB,SAAI,GAAJ,IAAI,CAAQ;QACZ,OAAE,GAAF,EAAE,CAAQ;QAa5B,aAAQ,GAAG;YACT,OAAO,UAAG,KAAI,CAAC,IAAI,iBAAO,KAAI,CAAC,EAAE,CAAE,CAAA;QACrC,CAAC,CAAC;QAZA,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;QAC3E,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;IACzE,CAAC;IAED,4BAAO,GAAP,UAAQ,CAAS;QACf,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAC7C,IAAM,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5D,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