codemaker 1.80.0 → 1.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,6 +102,11 @@ export declare class CodeMaker {
102
102
  * @param sep Separator (defaults to '_')
103
103
  */
104
104
  toSnakeCase(s: string, sep?: string): string;
105
+ /**
106
+ * Gets currently opened file path.
107
+ * @returns Currently opened file path.
108
+ */
109
+ getCurrentFilePath(): string | undefined;
105
110
  private makeIndent;
106
111
  }
107
112
  //# sourceMappingURL=codemaker.d.ts.map
package/lib/codemaker.js CHANGED
@@ -152,6 +152,13 @@ class CodeMaker {
152
152
  toSnakeCase(s, sep = '_') {
153
153
  return caseutils.toSnakeCase(s, sep);
154
154
  }
155
+ /**
156
+ * Gets currently opened file path.
157
+ * @returns Currently opened file path.
158
+ */
159
+ getCurrentFilePath() {
160
+ return this.currentFile?.filePath;
161
+ }
155
162
  makeIndent() {
156
163
  const length = this.currentIndentLength;
157
164
  if (length <= 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codemaker",
3
- "version": "1.80.0",
3
+ "version": "1.82.0",
4
4
  "description": "A tiny utility for generating source code",
5
5
  "license": "Apache-2.0",
6
6
  "author": {