@skmtc/core 0.0.302 → 0.0.303

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 +1 @@
1
- {"version":3,"file":"StackTrail.d.ts","sourceRoot":"","sources":["../../src/context/StackTrail.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;;gBAGT,KAAK,GAAE,MAAM,EAAO;IAIhC,IAAI,UAAU,wBAEb;IACD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU;IA4BlE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU;IA8BlE,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAYvC,QAAQ;CAOT"}
1
+ {"version":3,"file":"StackTrail.d.ts","sourceRoot":"","sources":["../../src/context/StackTrail.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;;gBAGT,KAAK,GAAE,MAAM,EAAO;IAIhC,IAAI,UAAU,wBAEb;IACD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU;IAsBlE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU;IA8BlE,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAYvC,QAAQ;CAOT"}
@@ -19,11 +19,7 @@ export class StackTrail {
19
19
  return __classPrivateFieldGet(this, _StackTrail_stack, "f");
20
20
  }
21
21
  append(frame) {
22
- if (typeof frame === 'string') {
23
- __classPrivateFieldGet(this, _StackTrail_stack, "f").push(frame);
24
- return this;
25
- }
26
- if (typeof frame === 'number') {
22
+ if (typeof frame === 'string' || typeof frame === 'number') {
27
23
  __classPrivateFieldGet(this, _StackTrail_stack, "f").push(frame);
28
24
  return this;
29
25
  }
@@ -38,7 +34,7 @@ export class StackTrail {
38
34
  throw new Error(`Unexpected stack frame: ${frame}`);
39
35
  }
40
36
  remove(frame) {
41
- if (typeof frame === 'string') {
37
+ if (typeof frame === 'string' || typeof frame === 'number') {
42
38
  const lastItem = __classPrivateFieldGet(this, _StackTrail_stack, "f")[__classPrivateFieldGet(this, _StackTrail_stack, "f").length - 1];
43
39
  if (lastItem !== frame) {
44
40
  throw new Error(`Expected to remove frame '${frame}' but found '${lastItem}'`);
package/esm/mod.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import "./_dnt.polyfills.js";
2
2
  export * from './context/CoreContext.js';
3
3
  export * from './context/ParseContext.js';
4
- export * from './context/Trail.js';
5
4
  export * from './dsl/base.js';
6
5
  export * from './dsl/constants.js';
7
6
  export * from './dsl/ContentSettings.js';
package/esm/mod.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC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AAC9C,cAAc,iCAAiC,CAAA"}
package/esm/mod.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import "./_dnt.polyfills.js";
2
2
  export * from './context/CoreContext.js';
3
3
  export * from './context/ParseContext.js';
4
- export * from './context/Trail.js';
5
4
  export * from './dsl/base.js';
6
5
  export * from './dsl/constants.js';
7
6
  export * from './dsl/ContentSettings.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.0.302",
3
+ "version": "0.0.303",
4
4
  "main": "./script/mod.js",
5
5
  "module": "./esm/mod.js",
6
6
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"StackTrail.d.ts","sourceRoot":"","sources":["../../src/context/StackTrail.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;;gBAGT,KAAK,GAAE,MAAM,EAAO;IAIhC,IAAI,UAAU,wBAEb;IACD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU;IA4BlE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU;IA8BlE,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAYvC,QAAQ;CAOT"}
1
+ {"version":3,"file":"StackTrail.d.ts","sourceRoot":"","sources":["../../src/context/StackTrail.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;;gBAGT,KAAK,GAAE,MAAM,EAAO;IAIhC,IAAI,UAAU,wBAEb;IACD,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU;IAsBlE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU;IA8BlE,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAYvC,QAAQ;CAOT"}
@@ -22,11 +22,7 @@ class StackTrail {
22
22
  return __classPrivateFieldGet(this, _StackTrail_stack, "f");
23
23
  }
24
24
  append(frame) {
25
- if (typeof frame === 'string') {
26
- __classPrivateFieldGet(this, _StackTrail_stack, "f").push(frame);
27
- return this;
28
- }
29
- if (typeof frame === 'number') {
25
+ if (typeof frame === 'string' || typeof frame === 'number') {
30
26
  __classPrivateFieldGet(this, _StackTrail_stack, "f").push(frame);
31
27
  return this;
32
28
  }
@@ -41,7 +37,7 @@ class StackTrail {
41
37
  throw new Error(`Unexpected stack frame: ${frame}`);
42
38
  }
43
39
  remove(frame) {
44
- if (typeof frame === 'string') {
40
+ if (typeof frame === 'string' || typeof frame === 'number') {
45
41
  const lastItem = __classPrivateFieldGet(this, _StackTrail_stack, "f")[__classPrivateFieldGet(this, _StackTrail_stack, "f").length - 1];
46
42
  if (lastItem !== frame) {
47
43
  throw new Error(`Expected to remove frame '${frame}' but found '${lastItem}'`);
package/script/mod.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import "./_dnt.polyfills.js";
2
2
  export * from './context/CoreContext.js';
3
3
  export * from './context/ParseContext.js';
4
- export * from './context/Trail.js';
5
4
  export * from './dsl/base.js';
6
5
  export * from './dsl/constants.js';
7
6
  export * from './dsl/ContentSettings.js';
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,C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qB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mCAAmC,CAAA;AACjD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uCAAuC,CAAA;AACrD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA"}
package/script/mod.js CHANGED
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  require("./_dnt.polyfills.js");
18
18
  __exportStar(require("./context/CoreContext.js"), exports);
19
19
  __exportStar(require("./context/ParseContext.js"), exports);
20
- __exportStar(require("./context/Trail.js"), exports);
21
20
  __exportStar(require("./dsl/base.js"), exports);
22
21
  __exportStar(require("./dsl/constants.js"), exports);
23
22
  __exportStar(require("./dsl/ContentSettings.js"), exports);
@@ -1,27 +0,0 @@
1
- import type { OpenAPIV3 } from 'openapi-types';
2
- type ConstructorArgs = {
3
- path?: string[];
4
- apiPath?: string;
5
- method?: string;
6
- schemaRef?: string;
7
- document?: OpenAPIV3.Document;
8
- subMethodIndex?: number;
9
- };
10
- export declare class Trail {
11
- path: string[];
12
- apiPath: string | undefined;
13
- method: string | undefined;
14
- schemaRef: string | undefined;
15
- document: OpenAPIV3.Document | undefined;
16
- subMethodIndex?: number;
17
- constructor({ path, apiPath, method, schemaRef, document, subMethodIndex }?: ConstructorArgs);
18
- add(path: string): Trail;
19
- addApiPath(apiPath: string): Trail;
20
- addMethod(method: string): Trail;
21
- addSchemaRef(schemaRef: string): Trail;
22
- toSubMethodTrail(): Trail;
23
- clone(): Trail;
24
- toString(): string;
25
- }
26
- export {};
27
- //# sourceMappingURL=Trail.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Trail.d.ts","sourceRoot":"","sources":["../../src/context/Trail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,qBAAa,KAAK;IAChB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAA;IACxC,cAAc,CAAC,EAAE,MAAM,CAAA;gBAEX,EACV,IAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,EACT,QAAQ,EACR,cAAc,EACf,GAAE,eAAoB;IASvB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAWxB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK;IAWlC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK;IAWhC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK;IAWtC,gBAAgB,IAAI,KAAK;IAWzB,KAAK,IAAI,KAAK;IAWd,QAAQ,IAAI,MAAM;CASnB"}
@@ -1,114 +0,0 @@
1
- export class Trail {
2
- constructor({ path = [], apiPath, method, schemaRef, document, subMethodIndex } = {}) {
3
- Object.defineProperty(this, "path", {
4
- enumerable: true,
5
- configurable: true,
6
- writable: true,
7
- value: void 0
8
- });
9
- Object.defineProperty(this, "apiPath", {
10
- enumerable: true,
11
- configurable: true,
12
- writable: true,
13
- value: void 0
14
- });
15
- Object.defineProperty(this, "method", {
16
- enumerable: true,
17
- configurable: true,
18
- writable: true,
19
- value: void 0
20
- });
21
- Object.defineProperty(this, "schemaRef", {
22
- enumerable: true,
23
- configurable: true,
24
- writable: true,
25
- value: void 0
26
- });
27
- Object.defineProperty(this, "document", {
28
- enumerable: true,
29
- configurable: true,
30
- writable: true,
31
- value: void 0
32
- });
33
- Object.defineProperty(this, "subMethodIndex", {
34
- enumerable: true,
35
- configurable: true,
36
- writable: true,
37
- value: void 0
38
- });
39
- this.path = Array.isArray(path) ? path : [path];
40
- this.apiPath = apiPath;
41
- this.method = method;
42
- this.schemaRef = schemaRef;
43
- this.document = document;
44
- this.subMethodIndex = subMethodIndex;
45
- }
46
- add(path) {
47
- return new Trail({
48
- path: this.path.concat(path),
49
- apiPath: this.apiPath,
50
- method: this.method,
51
- schemaRef: this.schemaRef,
52
- document: this.document,
53
- subMethodIndex: this.subMethodIndex
54
- });
55
- }
56
- addApiPath(apiPath) {
57
- return new Trail({
58
- path: this.path.concat(`[${apiPath}]`),
59
- apiPath,
60
- method: this.method,
61
- schemaRef: this.schemaRef,
62
- document: this.document,
63
- subMethodIndex: this.subMethodIndex
64
- });
65
- }
66
- addMethod(method) {
67
- return new Trail({
68
- path: this.path.concat(method),
69
- apiPath: this.apiPath,
70
- method,
71
- schemaRef: this.schemaRef,
72
- document: this.document,
73
- subMethodIndex: this.path.length + 1
74
- });
75
- }
76
- addSchemaRef(schemaRef) {
77
- return new Trail({
78
- path: this.path.concat(schemaRef),
79
- apiPath: this.apiPath,
80
- method: this.method,
81
- schemaRef,
82
- document: this.document,
83
- subMethodIndex: this.subMethodIndex
84
- });
85
- }
86
- toSubMethodTrail() {
87
- return new Trail({
88
- path: this.path.slice(this.subMethodIndex),
89
- apiPath: this.apiPath,
90
- method: this.method,
91
- schemaRef: this.schemaRef,
92
- document: this.document,
93
- subMethodIndex: 0
94
- });
95
- }
96
- clone() {
97
- return new Trail({
98
- path: this.path,
99
- apiPath: this.apiPath,
100
- method: this.method,
101
- schemaRef: this.schemaRef,
102
- document: this.document,
103
- subMethodIndex: this.subMethodIndex
104
- });
105
- }
106
- toString() {
107
- return this.path.reduce((acc, path) => {
108
- if (!acc) {
109
- return path;
110
- }
111
- return path.startsWith('[') ? `${acc}${path}` : `${acc}.${path}`;
112
- }, '');
113
- }
114
- }
@@ -1,27 +0,0 @@
1
- import type { OpenAPIV3 } from 'openapi-types';
2
- type ConstructorArgs = {
3
- path?: string[];
4
- apiPath?: string;
5
- method?: string;
6
- schemaRef?: string;
7
- document?: OpenAPIV3.Document;
8
- subMethodIndex?: number;
9
- };
10
- export declare class Trail {
11
- path: string[];
12
- apiPath: string | undefined;
13
- method: string | undefined;
14
- schemaRef: string | undefined;
15
- document: OpenAPIV3.Document | undefined;
16
- subMethodIndex?: number;
17
- constructor({ path, apiPath, method, schemaRef, document, subMethodIndex }?: ConstructorArgs);
18
- add(path: string): Trail;
19
- addApiPath(apiPath: string): Trail;
20
- addMethod(method: string): Trail;
21
- addSchemaRef(schemaRef: string): Trail;
22
- toSubMethodTrail(): Trail;
23
- clone(): Trail;
24
- toString(): string;
25
- }
26
- export {};
27
- //# sourceMappingURL=Trail.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Trail.d.ts","sourceRoot":"","sources":["../../src/context/Trail.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,qBAAa,KAAK;IAChB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAA;IACxC,cAAc,CAAC,EAAE,MAAM,CAAA;gBAEX,EACV,IAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,EACT,QAAQ,EACR,cAAc,EACf,GAAE,eAAoB;IASvB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAWxB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK;IAWlC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK;IAWhC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK;IAWtC,gBAAgB,IAAI,KAAK;IAWzB,KAAK,IAAI,KAAK;IAWd,QAAQ,IAAI,MAAM;CASnB"}
@@ -1,118 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Trail = void 0;
4
- class Trail {
5
- constructor({ path = [], apiPath, method, schemaRef, document, subMethodIndex } = {}) {
6
- Object.defineProperty(this, "path", {
7
- enumerable: true,
8
- configurable: true,
9
- writable: true,
10
- value: void 0
11
- });
12
- Object.defineProperty(this, "apiPath", {
13
- enumerable: true,
14
- configurable: true,
15
- writable: true,
16
- value: void 0
17
- });
18
- Object.defineProperty(this, "method", {
19
- enumerable: true,
20
- configurable: true,
21
- writable: true,
22
- value: void 0
23
- });
24
- Object.defineProperty(this, "schemaRef", {
25
- enumerable: true,
26
- configurable: true,
27
- writable: true,
28
- value: void 0
29
- });
30
- Object.defineProperty(this, "document", {
31
- enumerable: true,
32
- configurable: true,
33
- writable: true,
34
- value: void 0
35
- });
36
- Object.defineProperty(this, "subMethodIndex", {
37
- enumerable: true,
38
- configurable: true,
39
- writable: true,
40
- value: void 0
41
- });
42
- this.path = Array.isArray(path) ? path : [path];
43
- this.apiPath = apiPath;
44
- this.method = method;
45
- this.schemaRef = schemaRef;
46
- this.document = document;
47
- this.subMethodIndex = subMethodIndex;
48
- }
49
- add(path) {
50
- return new Trail({
51
- path: this.path.concat(path),
52
- apiPath: this.apiPath,
53
- method: this.method,
54
- schemaRef: this.schemaRef,
55
- document: this.document,
56
- subMethodIndex: this.subMethodIndex
57
- });
58
- }
59
- addApiPath(apiPath) {
60
- return new Trail({
61
- path: this.path.concat(`[${apiPath}]`),
62
- apiPath,
63
- method: this.method,
64
- schemaRef: this.schemaRef,
65
- document: this.document,
66
- subMethodIndex: this.subMethodIndex
67
- });
68
- }
69
- addMethod(method) {
70
- return new Trail({
71
- path: this.path.concat(method),
72
- apiPath: this.apiPath,
73
- method,
74
- schemaRef: this.schemaRef,
75
- document: this.document,
76
- subMethodIndex: this.path.length + 1
77
- });
78
- }
79
- addSchemaRef(schemaRef) {
80
- return new Trail({
81
- path: this.path.concat(schemaRef),
82
- apiPath: this.apiPath,
83
- method: this.method,
84
- schemaRef,
85
- document: this.document,
86
- subMethodIndex: this.subMethodIndex
87
- });
88
- }
89
- toSubMethodTrail() {
90
- return new Trail({
91
- path: this.path.slice(this.subMethodIndex),
92
- apiPath: this.apiPath,
93
- method: this.method,
94
- schemaRef: this.schemaRef,
95
- document: this.document,
96
- subMethodIndex: 0
97
- });
98
- }
99
- clone() {
100
- return new Trail({
101
- path: this.path,
102
- apiPath: this.apiPath,
103
- method: this.method,
104
- schemaRef: this.schemaRef,
105
- document: this.document,
106
- subMethodIndex: this.subMethodIndex
107
- });
108
- }
109
- toString() {
110
- return this.path.reduce((acc, path) => {
111
- if (!acc) {
112
- return path;
113
- }
114
- return path.startsWith('[') ? `${acc}${path}` : `${acc}.${path}`;
115
- }, '');
116
- }
117
- }
118
- exports.Trail = Trail;