@skmtc/core 0.0.879 → 0.0.880

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.
@@ -1,3 +1,3 @@
1
- import { List } from '../typescript/List.js';
2
- export declare const sanitizePropertyName: (propertyName: string) => string | List<[string, string], ": ", "none">;
1
+ import type { Stringable } from '../dsl/Stringable.js';
2
+ export declare const sanitizePropertyName: (propertyName: string) => string | Stringable;
3
3
  //# sourceMappingURL=sanitizePropertyName.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizePropertyName.d.ts","sourceRoot":"","sources":["../../src/helpers/sanitizePropertyName.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAI5C,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,kDAYxD,CAAA"}
1
+ {"version":3,"file":"sanitizePropertyName.d.ts","sourceRoot":"","sources":["../../src/helpers/sanitizePropertyName.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,KAAG,MAAM,GAAG,UAYpE,CAAA"}
@@ -5,7 +5,7 @@ import { protectedKeywords } from './protectedKeywords.js';
5
5
  export const sanitizePropertyName = (propertyName) => {
6
6
  const sanitizedKeyword = protectedKeywords[propertyName];
7
7
  if (sanitizedKeyword) {
8
- return sanitizedKeyword;
8
+ return List.toKeyValue(propertyName, sanitizedKeyword);
9
9
  }
10
10
  if (!isIdentifierName(propertyName)) {
11
11
  return List.toKeyValue(`'${propertyName}'`, camelCase(propertyName));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.0.879",
3
+ "version": "0.0.880",
4
4
  "description": "Skmtc is a declarative code generation framework",
5
5
  "keywords": [
6
6
  "openapi",
@@ -1,3 +1,3 @@
1
- import { List } from '../typescript/List.js';
2
- export declare const sanitizePropertyName: (propertyName: string) => string | List<[string, string], ": ", "none">;
1
+ import type { Stringable } from '../dsl/Stringable.js';
2
+ export declare const sanitizePropertyName: (propertyName: string) => string | Stringable;
3
3
  //# sourceMappingURL=sanitizePropertyName.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizePropertyName.d.ts","sourceRoot":"","sources":["../../src/helpers/sanitizePropertyName.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAI5C,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,kDAYxD,CAAA"}
1
+ {"version":3,"file":"sanitizePropertyName.d.ts","sourceRoot":"","sources":["../../src/helpers/sanitizePropertyName.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,KAAG,MAAM,GAAG,UAYpE,CAAA"}
@@ -8,7 +8,7 @@ const protectedKeywords_js_1 = require("./protectedKeywords.js");
8
8
  const sanitizePropertyName = (propertyName) => {
9
9
  const sanitizedKeyword = protectedKeywords_js_1.protectedKeywords[propertyName];
10
10
  if (sanitizedKeyword) {
11
- return sanitizedKeyword;
11
+ return List_js_1.List.toKeyValue(propertyName, sanitizedKeyword);
12
12
  }
13
13
  if (!(0, helper_validator_identifier_1.isIdentifierName)(propertyName)) {
14
14
  return List_js_1.List.toKeyValue(`'${propertyName}'`, (0, strings_js_1.camelCase)(propertyName));