@skmtc/core 0.0.306 → 0.0.308

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.
Files changed (97) hide show
  1. package/esm/context/CoreContext.d.ts +3 -27
  2. package/esm/context/CoreContext.d.ts.map +1 -1
  3. package/esm/context/CoreContext.js +26 -201
  4. package/esm/context/GenerateContext.d.ts +12 -16
  5. package/esm/context/GenerateContext.d.ts.map +1 -1
  6. package/esm/context/GenerateContext.js +58 -70
  7. package/esm/context/ParseContext.d.ts +1 -2
  8. package/esm/context/ParseContext.d.ts.map +1 -1
  9. package/esm/context/ParseContext.js +18 -12
  10. package/esm/context/RenderContext.d.ts +7 -13
  11. package/esm/context/RenderContext.d.ts.map +1 -1
  12. package/esm/context/RenderContext.js +26 -46
  13. package/esm/context/ResultsHandler.d.ts.map +1 -1
  14. package/esm/context/ResultsHandler.js +0 -1
  15. package/esm/context/StackTrail.d.ts +1 -1
  16. package/esm/context/StackTrail.d.ts.map +1 -1
  17. package/esm/context/types.d.ts +0 -5
  18. package/esm/context/types.d.ts.map +1 -1
  19. package/esm/dsl/Definition.d.ts +2 -2
  20. package/esm/dsl/Definition.d.ts.map +1 -1
  21. package/esm/dsl/ModelDriver.d.ts +3 -3
  22. package/esm/dsl/ModelDriver.d.ts.map +1 -1
  23. package/esm/dsl/ModelInsertable.d.ts +3 -3
  24. package/esm/dsl/ModelInsertable.d.ts.map +1 -1
  25. package/esm/dsl/OperationDriver.d.ts +3 -3
  26. package/esm/dsl/OperationDriver.d.ts.map +1 -1
  27. package/esm/dsl/OperationInsertable.d.ts +3 -3
  28. package/esm/dsl/OperationInsertable.d.ts.map +1 -1
  29. package/esm/dsl/ValueBase.d.ts +3 -3
  30. package/esm/dsl/ValueBase.d.ts.map +1 -1
  31. package/esm/dsl/ValueBase.js +1 -3
  32. package/esm/dsl/base.d.ts +3 -4
  33. package/esm/dsl/base.d.ts.map +1 -1
  34. package/esm/dsl/withConfig.d.ts +7 -7
  35. package/esm/dsl/withConfig.d.ts.map +1 -1
  36. package/esm/generate/generate.d.ts +0 -1
  37. package/esm/generate/generate.d.ts.map +1 -1
  38. package/esm/generate/generate.js +6 -6
  39. package/esm/oas/parameter/toParameterV3.d.ts.map +1 -1
  40. package/esm/oas/parameter/toParameterV3.js +1 -0
  41. package/esm/server/createServer.d.ts.map +1 -1
  42. package/esm/server/createServer.js +3 -7
  43. package/esm/types/CustomValue.d.ts +2 -2
  44. package/esm/types/CustomValue.d.ts.map +1 -1
  45. package/esm/typescript/PathParams.d.ts +3 -3
  46. package/esm/typescript/PathParams.d.ts.map +1 -1
  47. package/esm/typescript/ReactRouterPathParams.d.ts +2 -2
  48. package/esm/typescript/ReactRouterPathParams.d.ts.map +1 -1
  49. package/package.json +1 -1
  50. package/script/context/CoreContext.d.ts +3 -27
  51. package/script/context/CoreContext.d.ts.map +1 -1
  52. package/script/context/CoreContext.js +26 -201
  53. package/script/context/GenerateContext.d.ts +12 -16
  54. package/script/context/GenerateContext.d.ts.map +1 -1
  55. package/script/context/GenerateContext.js +58 -70
  56. package/script/context/ParseContext.d.ts +1 -2
  57. package/script/context/ParseContext.d.ts.map +1 -1
  58. package/script/context/ParseContext.js +18 -12
  59. package/script/context/RenderContext.d.ts +7 -13
  60. package/script/context/RenderContext.d.ts.map +1 -1
  61. package/script/context/RenderContext.js +26 -46
  62. package/script/context/ResultsHandler.d.ts.map +1 -1
  63. package/script/context/ResultsHandler.js +0 -1
  64. package/script/context/StackTrail.d.ts +1 -1
  65. package/script/context/StackTrail.d.ts.map +1 -1
  66. package/script/context/types.d.ts +0 -5
  67. package/script/context/types.d.ts.map +1 -1
  68. package/script/dsl/Definition.d.ts +2 -2
  69. package/script/dsl/Definition.d.ts.map +1 -1
  70. package/script/dsl/ModelDriver.d.ts +3 -3
  71. package/script/dsl/ModelDriver.d.ts.map +1 -1
  72. package/script/dsl/ModelInsertable.d.ts +3 -3
  73. package/script/dsl/ModelInsertable.d.ts.map +1 -1
  74. package/script/dsl/OperationDriver.d.ts +3 -3
  75. package/script/dsl/OperationDriver.d.ts.map +1 -1
  76. package/script/dsl/OperationInsertable.d.ts +3 -3
  77. package/script/dsl/OperationInsertable.d.ts.map +1 -1
  78. package/script/dsl/ValueBase.d.ts +3 -3
  79. package/script/dsl/ValueBase.d.ts.map +1 -1
  80. package/script/dsl/ValueBase.js +1 -3
  81. package/script/dsl/base.d.ts +3 -4
  82. package/script/dsl/base.d.ts.map +1 -1
  83. package/script/dsl/withConfig.d.ts +7 -7
  84. package/script/dsl/withConfig.d.ts.map +1 -1
  85. package/script/generate/generate.d.ts +0 -1
  86. package/script/generate/generate.d.ts.map +1 -1
  87. package/script/generate/generate.js +6 -6
  88. package/script/oas/parameter/toParameterV3.d.ts.map +1 -1
  89. package/script/oas/parameter/toParameterV3.js +1 -0
  90. package/script/server/createServer.d.ts.map +1 -1
  91. package/script/server/createServer.js +3 -7
  92. package/script/types/CustomValue.d.ts +2 -2
  93. package/script/types/CustomValue.d.ts.map +1 -1
  94. package/script/typescript/PathParams.d.ts +3 -3
  95. package/script/typescript/PathParams.d.ts.map +1 -1
  96. package/script/typescript/ReactRouterPathParams.d.ts +2 -2
  97. package/script/typescript/ReactRouterPathParams.d.ts.map +1 -1
@@ -1,37 +1,25 @@
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
+ };
1
7
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
8
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
9
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
11
  };
6
- var _GenerateContext_instances, _GenerateContext_runOperationGenerator, _GenerateContext_runModelGenerator, _GenerateContext_generateModel, _GenerateContext_generateOperation;
12
+ var _GenerateContext_instances, _GenerateContext_files, _GenerateContext_stackTrail, _GenerateContext_runOperationGenerator, _GenerateContext_runModelGenerator, _GenerateContext_generateModel, _GenerateContext_generateOperation;
7
13
  import { join, normalize } from '../deps/jsr.io/@std/path/1.0.0/mod.js';
8
14
  import { Import } from '../dsl/Import.js';
9
- import { toOperationGeneratorKey } from '../types/GeneratorKeys.js';
10
15
  import { OperationDriver } from '../dsl/OperationDriver.js';
11
16
  import { ModelDriver } from '../dsl/ModelDriver.js';
12
17
  import { StackTrail } from './StackTrail.js';
13
18
  import * as Sentry from '@sentry/deno';
14
19
  export class GenerateContext {
15
- constructor({ schemaModel, generatorsMap, settings }) {
20
+ constructor({ schemaModel, settings, logger, callback }) {
16
21
  _GenerateContext_instances.add(this);
17
- Object.defineProperty(this, "files", {
18
- enumerable: true,
19
- configurable: true,
20
- writable: true,
21
- value: void 0
22
- });
23
- Object.defineProperty(this, "renderDependencies", {
24
- enumerable: true,
25
- configurable: true,
26
- writable: true,
27
- value: void 0
28
- });
29
- Object.defineProperty(this, "packageDependencies", {
30
- enumerable: true,
31
- configurable: true,
32
- writable: true,
33
- value: void 0
34
- });
22
+ _GenerateContext_files.set(this, void 0);
35
23
  Object.defineProperty(this, "schemaModel", {
36
24
  enumerable: true,
37
25
  configurable: true,
@@ -44,53 +32,66 @@ export class GenerateContext {
44
32
  writable: true,
45
33
  value: void 0
46
34
  });
47
- Object.defineProperty(this, "generatorsMap", {
35
+ _GenerateContext_stackTrail.set(this, void 0);
36
+ Object.defineProperty(this, "logger", {
48
37
  enumerable: true,
49
38
  configurable: true,
50
39
  writable: true,
51
40
  value: void 0
52
41
  });
53
- Object.defineProperty(this, "stackTrail", {
42
+ Object.defineProperty(this, "callback", {
54
43
  enumerable: true,
55
44
  configurable: true,
56
45
  writable: true,
57
46
  value: void 0
58
47
  });
59
- this.stackTrail = new StackTrail();
60
- this.generatorsMap = generatorsMap;
61
- this.files = new Map();
62
- this.renderDependencies = new Map();
63
- this.packageDependencies = new Map();
48
+ this.logger = logger;
49
+ __classPrivateFieldSet(this, _GenerateContext_stackTrail, new StackTrail(), "f");
50
+ __classPrivateFieldSet(this, _GenerateContext_files, new Map(), "f");
64
51
  this.schemaModel = schemaModel;
65
52
  this.settings = settings;
53
+ this.callback = callback;
66
54
  }
67
- generate(coreContext) {
68
- Sentry.startSpan({ name: 'Generate operations' }, () => Object.values(coreContext.generatorsMap)
55
+ generate(generatorsMap) {
56
+ Sentry.startSpan({ name: 'Generate operations' }, () => Object.values(generatorsMap)
69
57
  .filter(generator => generator.type === 'operation')
70
58
  .forEach(generator => {
71
59
  this.appendStackTrailChunk(generator.id);
72
- __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_runOperationGenerator).call(this, { context: coreContext, generator });
60
+ __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_runOperationGenerator).call(this, {
61
+ schemaModel: this.schemaModel,
62
+ generator
63
+ });
73
64
  this.removeStackTrailChunk(generator.id);
74
65
  }));
75
66
  Sentry.startSpan({ name: 'Generate models' }, () => {
76
- Object.values(coreContext.generatorsMap)
67
+ Object.values(generatorsMap)
77
68
  .filter(generator => generator.type === 'model')
78
69
  .forEach(generator => {
79
70
  this.appendStackTrailChunk(generator.id);
80
- __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_runModelGenerator).call(this, { context: coreContext, generator });
71
+ __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_runModelGenerator).call(this, { schemaModel: this.schemaModel, generator });
81
72
  this.removeStackTrailChunk(generator.id);
82
73
  });
83
74
  });
75
+ return __classPrivateFieldGet(this, _GenerateContext_files, "f");
84
76
  }
85
77
  appendStackTrailChunk(chunk) {
86
- this.stackTrail.append(chunk);
78
+ __classPrivateFieldGet(this, _GenerateContext_stackTrail, "f").append(chunk);
87
79
  }
88
80
  removeStackTrailChunk(chunk) {
89
- this.stackTrail.remove(chunk);
81
+ __classPrivateFieldGet(this, _GenerateContext_stackTrail, "f").remove(chunk);
82
+ }
83
+ // captureCurrentResult(result: SuccessWarningError): void {
84
+ // const stackTrail = this.#stackTrail.toString()
85
+ // if (applyResult({ current: this.#results[stackTrail], incoming: result })) {
86
+ // this.#results[stackTrail] = result
87
+ // }
88
+ // }
89
+ get stackTrail() {
90
+ return __classPrivateFieldGet(this, _GenerateContext_stackTrail, "f").toString();
90
91
  }
91
92
  getFile(filePath, { throwIfNotFound = false } = {}) {
92
93
  const normalisedPath = normalize(filePath);
93
- const currentFile = this.files.get(normalisedPath);
94
+ const currentFile = __classPrivateFieldGet(this, _GenerateContext_files, "f").get(normalisedPath);
94
95
  if (!currentFile) {
95
96
  if (throwIfNotFound) {
96
97
  throw new Error(`File not found: '${normalisedPath}'`);
@@ -101,7 +102,7 @@ export class GenerateContext {
101
102
  }
102
103
  return currentFile;
103
104
  }
104
- register({ imports = {}, packageDependencies = {}, definitions, destinationPath }) {
105
+ register({ imports = {}, definitions, destinationPath }) {
105
106
  const currentFile = this.getFile(destinationPath);
106
107
  Object.entries(imports).forEach(([importModule, importNames]) => {
107
108
  const module = currentFile.imports.get(importModule);
@@ -113,20 +114,17 @@ export class GenerateContext {
113
114
  currentFile.imports.set(importModule, new Set(importItem.importNames.map(n => `${n}`)));
114
115
  }
115
116
  });
116
- Object.entries(packageDependencies).forEach(([module, version]) => {
117
- this.packageDependencies.set(module, version);
118
- });
119
117
  definitions
120
118
  ?.filter((definition) => Boolean(definition))
121
119
  .forEach(definition => {
122
120
  currentFile.definitions.set(`${definition.identifier}`, definition);
123
121
  });
124
122
  }
125
- insert({ coreContext, generation, destinationPath, ...rest }) {
123
+ insert({ generation, destinationPath, ...rest }) {
126
124
  if ('operation' in rest) {
127
125
  const { insertable, operation } = rest;
128
126
  const { settings, definition } = new OperationDriver({
129
- context: coreContext,
127
+ context: this,
130
128
  insertable,
131
129
  operation,
132
130
  generation,
@@ -137,7 +135,7 @@ export class GenerateContext {
137
135
  else {
138
136
  const { insertable, refName } = rest;
139
137
  const { settings, definition } = new ModelDriver({
140
- context: coreContext,
138
+ context: this,
141
139
  insertable,
142
140
  refName,
143
141
  generation,
@@ -179,7 +177,7 @@ export class GenerateContext {
179
177
  return baseSettings;
180
178
  }
181
179
  addFile(normalisedPath) {
182
- if (this.files.has(normalisedPath)) {
180
+ if (__classPrivateFieldGet(this, _GenerateContext_files, "f").has(normalisedPath)) {
183
181
  throw new Error(`File already exists: ${normalisedPath}`);
184
182
  }
185
183
  const newFile = {
@@ -187,7 +185,7 @@ export class GenerateContext {
187
185
  definitions: new Map(),
188
186
  generatorKeys: new Set()
189
187
  };
190
- this.files.set(normalisedPath, newFile);
188
+ __classPrivateFieldGet(this, _GenerateContext_files, "f").set(normalisedPath, newFile);
191
189
  return newFile;
192
190
  }
193
191
  resolveSchemaRefOnce(refName) {
@@ -197,23 +195,14 @@ export class GenerateContext {
197
195
  }
198
196
  return schema;
199
197
  }
200
- addRenderDependency({ generatorId, dependencies, operation }) {
201
- if (!this.renderDependencies.has(generatorId)) {
202
- this.renderDependencies.set(generatorId, new Set());
203
- }
204
- const generatorDependencies = this.renderDependencies.get(generatorId);
205
- dependencies.forEach(dependencyId => {
206
- generatorDependencies?.add(toOperationGeneratorKey({ generatorId: dependencyId, operation }));
207
- });
208
- }
209
198
  /** Produce external instance and return its name */
210
199
  findDefinition({ name, exportPath }) {
211
200
  return this.getFile(exportPath).definitions.get(name);
212
201
  }
213
202
  }
214
- _GenerateContext_instances = new WeakSet(), _GenerateContext_runOperationGenerator = function _GenerateContext_runOperationGenerator({ context, generator }) {
215
- const generatorInstance = new generator(context);
216
- context.schemaModel.operations.forEach(operation => {
203
+ _GenerateContext_files = new WeakMap(), _GenerateContext_stackTrail = new WeakMap(), _GenerateContext_instances = new WeakSet(), _GenerateContext_runOperationGenerator = function _GenerateContext_runOperationGenerator({ schemaModel, generator }) {
204
+ const generatorInstance = new generator(this);
205
+ schemaModel.operations.forEach(operation => {
217
206
  // TODO If we make OasOperation generic, for example by
218
207
  // adding a `method` type, we could make isSupported
219
208
  // a type guard which could help us narrow down the
@@ -224,40 +213,39 @@ _GenerateContext_instances = new WeakSet(), _GenerateContext_runOperationGenerat
224
213
  const { path, method } = operation;
225
214
  if (generator.isSupported(operation)) {
226
215
  this.appendStackTrailChunk([path, method]);
227
- __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_generateOperation).call(this, { context, operation, generatorInstance });
216
+ __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_generateOperation).call(this, { operation, generatorInstance });
228
217
  this.removeStackTrailChunk([path, method]);
229
218
  }
230
219
  });
231
- }, _GenerateContext_runModelGenerator = function _GenerateContext_runModelGenerator({ context, generator }) {
232
- const generatorInstance = new generator(context);
233
- const refNames = Object.keys(context.schemaModel.components?.schemas ?? {});
220
+ }, _GenerateContext_runModelGenerator = function _GenerateContext_runModelGenerator({ schemaModel, generator }) {
221
+ const generatorInstance = new generator(this);
222
+ const refNames = Object.keys(schemaModel.components?.schemas ?? {});
234
223
  refNames.forEach(rn => {
235
224
  this.appendStackTrailChunk(rn);
236
225
  __classPrivateFieldGet(this, _GenerateContext_instances, "m", _GenerateContext_generateModel).call(this, {
237
- context,
238
226
  refName: rn,
239
227
  generatorInstance
240
228
  });
241
229
  this.removeStackTrailChunk(rn);
242
230
  });
243
- }, _GenerateContext_generateModel = function _GenerateContext_generateModel({ context, refName, generatorInstance }) {
231
+ }, _GenerateContext_generateModel = function _GenerateContext_generateModel({ refName, generatorInstance }) {
244
232
  try {
245
233
  generatorInstance.transformModel(refName);
246
- context.captureCurrentResult('success');
234
+ // this.captureCurrentResult('success')
247
235
  }
248
236
  catch (error) {
249
- context.logger.error(error);
250
- context.captureCurrentResult('error');
237
+ this.logger.error(error);
238
+ // this.captureCurrentResult('error')
251
239
  Sentry.captureException(error);
252
240
  }
253
- }, _GenerateContext_generateOperation = function _GenerateContext_generateOperation({ context, operation, generatorInstance }) {
241
+ }, _GenerateContext_generateOperation = function _GenerateContext_generateOperation({ operation, generatorInstance }) {
254
242
  try {
255
243
  generatorInstance.transformOperation(operation);
256
- context.captureCurrentResult('success');
244
+ // this.captureCurrentResult('success')
257
245
  }
258
246
  catch (error) {
259
- context.logger.error(error);
260
- context.captureCurrentResult('error');
247
+ this.logger.error(error);
248
+ // this.captureCurrentResult('error')
261
249
  Sentry.captureException(error);
262
250
  }
263
251
  };
@@ -1,5 +1,4 @@
1
1
  import type { OpenAPIV3 } from 'openapi-types';
2
- import { StackTrail } from './StackTrail.js';
3
2
  import { OasDocument } from '../oas/document/Document.js';
4
3
  import type * as log from '../deps/jsr.io/@std/log/0.224.6/mod.js';
5
4
  type ConstructorArgs = {
@@ -9,12 +8,12 @@ type ConstructorArgs = {
9
8
  export declare class ParseContext {
10
9
  #private;
11
10
  schema: string;
12
- stackTrail: StackTrail;
13
11
  logger: log.Logger;
14
12
  documentRoot: OasDocument;
15
13
  constructor({ schema, logger }: ConstructorArgs);
16
14
  parse(): OasDocument;
17
15
  logSkippedFields(skipped: Record<string, unknown>): void;
16
+ get stackTrail(): string;
18
17
  appendStackTrailChunk(chunk: string | string[]): void;
19
18
  removeStackTrailChunk(chunk: string | string[]): void;
20
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAI5C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,KAAK,GAAG,MAAM,wCAAwC,CAAA;AAElE,KAAK,eA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M,EAAE;IAI9C,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;CAG/C;AAED,eAAO,MAAM,WAAW,WAAY,MAAM,2BAMzC,CAAA"}
@@ -1,9 +1,15 @@
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
+ };
1
7
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
8
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
9
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
11
  };
6
- var _ParseContext_instances, _ParseContext_parseSchema, _ParseContext_parseDocument;
12
+ var _ParseContext_instances, _ParseContext_stackTrail, _ParseContext_parseSchema, _ParseContext_parseDocument;
7
13
  import { StackTrail } from './StackTrail.js';
8
14
  import * as Sentry from '@sentry/deno';
9
15
  import { parse as parseYaml } from '../deps/jsr.io/@std/yaml/0.215.0/mod.js';
@@ -18,12 +24,7 @@ export class ParseContext {
18
24
  writable: true,
19
25
  value: void 0
20
26
  });
21
- Object.defineProperty(this, "stackTrail", {
22
- enumerable: true,
23
- configurable: true,
24
- writable: true,
25
- value: void 0
26
- });
27
+ _ParseContext_stackTrail.set(this, void 0);
27
28
  Object.defineProperty(this, "logger", {
28
29
  enumerable: true,
29
30
  configurable: true,
@@ -38,7 +39,7 @@ export class ParseContext {
38
39
  });
39
40
  this.schema = schema;
40
41
  this.logger = logger;
41
- this.stackTrail = new StackTrail();
42
+ __classPrivateFieldSet(this, _ParseContext_stackTrail, new StackTrail(), "f");
42
43
  this.documentRoot = new OasDocument();
43
44
  }
44
45
  parse() {
@@ -47,17 +48,22 @@ export class ParseContext {
47
48
  }
48
49
  logSkippedFields(skipped) {
49
50
  Object.entries(skipped).forEach(([key, value]) => {
50
- this.logger.warn(`Property not yet implemented. Please request from support if needed - ${JSON.stringify(value).slice(0, 30)}`, key);
51
+ this.logger.warn(`Property not yet implemented. Please request from support if needed - ${JSON.stringify({
52
+ [key]: value
53
+ }).slice(0, 45)}`);
51
54
  });
52
55
  }
56
+ get stackTrail() {
57
+ return __classPrivateFieldGet(this, _ParseContext_stackTrail, "f").toString();
58
+ }
53
59
  appendStackTrailChunk(chunk) {
54
- this.stackTrail.append(chunk);
60
+ __classPrivateFieldGet(this, _ParseContext_stackTrail, "f").append(chunk);
55
61
  }
56
62
  removeStackTrailChunk(chunk) {
57
- this.stackTrail.remove(chunk);
63
+ __classPrivateFieldGet(this, _ParseContext_stackTrail, "f").remove(chunk);
58
64
  }
59
65
  }
60
- _ParseContext_instances = new WeakSet(), _ParseContext_parseSchema = function _ParseContext_parseSchema() {
66
+ _ParseContext_stackTrail = new WeakMap(), _ParseContext_instances = new WeakSet(), _ParseContext_parseSchema = function _ParseContext_parseSchema() {
61
67
  const parsedDocument = Sentry.startSpan({ name: 'Parse schema to document' }, () => parseSchema(this.schema));
62
68
  return parsedDocument;
63
69
  }, _ParseContext_parseDocument = function _ParseContext_parseDocument(parsedDocument) {
@@ -1,31 +1,25 @@
1
1
  import type { PrettierConfigType } from '../types/prettierConfig.js';
2
- import type { AddGeneratorKeyArgs, FileContents, RenderDependencies, RenderOptions, RenderResult } from './types.js';
3
- import type { ClientSettings } from '../types/Settings.js';
2
+ import type { AddGeneratorKeyArgs, FileContents, RenderResult } from './types.js';
4
3
  import type { Definition } from '../dsl/Definition.js';
5
4
  import type { PickArgs } from './GenerateContext.js';
6
- import { StackTrail } from './StackTrail.js';
7
5
  type ConstructorArgs = {
8
6
  files: Map<string, FileContents>;
9
- packageDependencies: Map<string, string>;
10
7
  prettier?: PrettierConfigType;
11
- settings: ClientSettings | undefined;
12
- renderDependencies: RenderDependencies;
8
+ basePath: string | undefined;
13
9
  pinnableGenerators: string[];
14
10
  };
15
11
  export declare class RenderContext {
12
+ #private;
16
13
  files: Map<string, FileContents>;
17
- renderDependencies: RenderDependencies;
18
- packageDependencies: Map<string, string>;
19
14
  private prettier?;
20
- settings: ClientSettings | undefined;
15
+ basePath: string | undefined;
21
16
  currentDestinationPath: string | 'PRE_RENDER' | 'POST_RENDER';
22
17
  pinnableGenerators: string[];
23
- stackTrail: StackTrail;
24
- constructor({ files, packageDependencies, prettier, settings, renderDependencies, pinnableGenerators }: ConstructorArgs);
18
+ constructor({ files, prettier, basePath, pinnableGenerators }: ConstructorArgs);
25
19
  appendStackTrailChunk(chunk: string): void;
26
20
  removeStackTrailChunk(chunk: string): void;
27
- toPackageJson(): string;
28
- render({ packageJson }: RenderOptions): Omit<RenderResult, 'results'>;
21
+ get stackTrail(): string;
22
+ render(): Omit<RenderResult, 'results'>;
29
23
  private collate;
30
24
  getFile(filePath: string): FileContents;
31
25
  addGeneratorKey({ generatorKey }: AddGeneratorKeyArgs): void;
@@ -1 +1 @@
1
- {"version":3,"file":"RenderContext.d.ts","sourceRoot":"","sources":["../../src/context/RenderContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAGpE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EAEZ,kBAAkB,EAClB,aAAa,EACb,YAAY,EACb,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAIpD,OAAO,EAAE,UAAU,EA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E,UAAU,EAAE,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;CAG7D"}
@@ -1,3 +1,15 @@
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
+ };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
12
+ var _RenderContext_stackTrail;
1
13
  import * as Sentry from '@sentry/deno';
2
14
  import { Import } from '../dsl/Import.js';
3
15
  import invariant from 'tiny-invariant';
@@ -5,32 +17,20 @@ import { normalize } from '../deps/jsr.io/@std/path/1.0.0/mod.js';
5
17
  import { toResolvedArtifactPath } from '../helpers/toResolvedArtifactPath.js';
6
18
  import { StackTrail } from './StackTrail.js';
7
19
  export class RenderContext {
8
- constructor({ files, packageDependencies, prettier, settings, renderDependencies, pinnableGenerators }) {
20
+ constructor({ files, prettier, basePath, pinnableGenerators }) {
9
21
  Object.defineProperty(this, "files", {
10
22
  enumerable: true,
11
23
  configurable: true,
12
24
  writable: true,
13
25
  value: void 0
14
26
  });
15
- Object.defineProperty(this, "renderDependencies", {
16
- enumerable: true,
17
- configurable: true,
18
- writable: true,
19
- value: void 0
20
- });
21
- Object.defineProperty(this, "packageDependencies", {
22
- enumerable: true,
23
- configurable: true,
24
- writable: true,
25
- value: void 0
26
- });
27
27
  Object.defineProperty(this, "prettier", {
28
28
  enumerable: true,
29
29
  configurable: true,
30
30
  writable: true,
31
31
  value: void 0
32
32
  });
33
- Object.defineProperty(this, "settings", {
33
+ Object.defineProperty(this, "basePath", {
34
34
  enumerable: true,
35
35
  configurable: true,
36
36
  writable: true,
@@ -48,43 +48,28 @@ export class RenderContext {
48
48
  writable: true,
49
49
  value: void 0
50
50
  });
51
- Object.defineProperty(this, "stackTrail", {
52
- enumerable: true,
53
- configurable: true,
54
- writable: true,
55
- value: void 0
56
- });
57
- this.stackTrail = new StackTrail();
51
+ _RenderContext_stackTrail.set(this, void 0);
52
+ __classPrivateFieldSet(this, _RenderContext_stackTrail, new StackTrail(), "f");
58
53
  this.currentDestinationPath = 'PRE_RENDER';
59
- this.renderDependencies = renderDependencies;
60
54
  this.files = files;
61
- this.packageDependencies = packageDependencies;
62
55
  this.prettier = prettier;
63
- this.settings = settings;
56
+ this.basePath = basePath;
64
57
  this.pinnableGenerators = pinnableGenerators;
65
58
  }
66
59
  appendStackTrailChunk(chunk) {
67
- this.stackTrail.append(chunk);
60
+ __classPrivateFieldGet(this, _RenderContext_stackTrail, "f").append(chunk);
68
61
  }
69
62
  removeStackTrailChunk(chunk) {
70
- this.stackTrail.remove(chunk);
63
+ __classPrivateFieldGet(this, _RenderContext_stackTrail, "f").remove(chunk);
71
64
  }
72
- toPackageJson() {
73
- const dependencies = Object.fromEntries(this.packageDependencies.entries());
74
- const packageJson = JSON.stringify({ dependencies }, null, 2);
75
- return packageJson;
65
+ get stackTrail() {
66
+ return __classPrivateFieldGet(this, _RenderContext_stackTrail, "f").toString();
76
67
  }
77
- render({ packageJson }) {
68
+ render() {
78
69
  return Sentry.startSpan({ name: 'Render artifacts' }, () => {
79
70
  const result = Sentry.startSpan({ name: 'Collate content' }, () => {
80
71
  return this.collate();
81
72
  });
82
- const renderDependenciesEntries = [
83
- ...this.renderDependencies.entries()
84
- ].map(([generatorId, dependencyGeneratorKeys]) => {
85
- return [generatorId, Array.from(dependencyGeneratorKeys)];
86
- });
87
- const renderDependencies = Object.fromEntries(renderDependenciesEntries);
88
73
  const pinnable = Sentry.startSpan({ name: 'Generate pinnable' }, () => {
89
74
  return generatePinnable({
90
75
  pinnableGenerators: this.pinnableGenerators,
@@ -92,15 +77,9 @@ export class RenderContext {
92
77
  });
93
78
  });
94
79
  const rendered = {
95
- artifacts: packageJson
96
- ? {
97
- ...result.artifacts,
98
- 'package.json': this.toPackageJson()
99
- }
100
- : result.artifacts,
80
+ artifacts: result.artifacts,
101
81
  files: result.files,
102
- pinnable,
103
- renderDependencies
82
+ pinnable
104
83
  };
105
84
  return rendered;
106
85
  });
@@ -115,7 +94,7 @@ export class RenderContext {
115
94
  return renderFile({
116
95
  file,
117
96
  destinationPath,
118
- basePath: this.settings?.basePath,
97
+ basePath: this.basePath,
119
98
  prettier: this.prettier
120
99
  });
121
100
  });
@@ -165,6 +144,7 @@ export class RenderContext {
165
144
  return this.getFile(exportPath).definitions.get(name);
166
145
  }
167
146
  }
147
+ _RenderContext_stackTrail = new WeakMap();
168
148
  const renderFile = ({ file, destinationPath, basePath }) => {
169
149
  const imports = Array.from(file.imports.entries()).map(([module, importItems]) => new Import({ module, importNames: Array.from(importItems) }));
170
150
  const definitions = Array.from(file.definitions.values());
@@ -1 +1 @@
1
- {"version":3,"file":"ResultsHandler.d.ts","sourceRoot":"","sources":["../../src/context/ResultsHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,2CAA2C,CAAA;AACrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAA;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAGnD,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,OAAO,EAAE,WAAW,CAAA;CACrB;AAED,qBAAa,cAAe,SAAQ,WAAW;;IAC7C,OAAO,EAAE,WAAW,CAAA;gBAMR,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,qBAAqB;IAMvD,KAAK;IAML,MAAM,CAAC,SAAS,EAAE,SAAS;IASpC,GAAG,CAAC,GAAG,EAAE,MAAM;IAcf,KAAK;IAMI,OAAO;CAKjB"}
1
+ {"version":3,"file":"ResultsHandler.d.ts","sourceRoot":"","sources":["../../src/context/ResultsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,2CAA2C,CAAA;AACrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAA;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAA;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAGnD,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,OAAO,EAAE,WAAW,CAAA;CACrB;AAED,qBAAa,cAAe,SAAQ,WAAW;;IAC7C,OAAO,EAAE,WAAW,CAAA;gBAMR,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,qBAAqB;IAMvD,KAAK;IAML,MAAM,CAAC,SAAS,EAAE,SAAS;IASpC,GAAG,CAAC,GAAG,EAAE,MAAM;IAcf,KAAK;IAMI,OAAO;CAKjB"}
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _ResultsHandler_instances, _ResultsHandler_unloadCallback, _ResultsHandler_resetBuffer;
7
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
8
7
  import { LogLevels } from '../deps/jsr.io/@std/log/0.224.6/levels.js';
9
8
  import { BaseHandler } from '../deps/jsr.io/@std/log/0.224.6/base_handler.js';
10
9
  import { match } from 'ts-pattern';
@@ -4,7 +4,7 @@ export declare class StackTrail {
4
4
  get stackTrail(): (string | number)[];
5
5
  append(frame: string | string[]): StackTrail;
6
6
  remove(frame: string | string[]): StackTrail;
7
- static join(...stacks: StackTrail[]): string;
7
+ static join(...stacks: (StackTrail | string)[]): string;
8
8
  static parse(value: string): StackTrail;
9
9
  toString(): string;
10
10
  }
@@ -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,EAAE,GAAG,UAAU;IAgB5C,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU;IAwB5C,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM;IAI5C,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,EAAE,GAAG,UAAU;IAgB5C,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU;IAwB5C,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC,UAAU,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM;IAIvD,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAYvC,QAAQ;CAOT"}
@@ -7,10 +7,6 @@ export type FileContents = {
7
7
  definitions: Map<string, Definition>;
8
8
  generatorKeys: Set<GeneratorKey>;
9
9
  };
10
- export type RenderOptions = {
11
- packageJson?: boolean;
12
- };
13
- export type RenderDependencies = Map<string, Set<GeneratorKey>>;
14
10
  export type GetFileOptions = {
15
11
  throwIfNotFound?: boolean;
16
12
  };
@@ -26,7 +22,6 @@ export type RenderResult = {
26
22
  artifacts: Record<string, string>;
27
23
  files: Record<string, ManifestEntry>;
28
24
  pinnable: Partial<Record<GeneratorKey, string>>;
29
- renderDependencies: Record<string, string[]>;
30
25
  results: Record<string, SuccessWarningError>;
31
26
  };
32
27
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE9E,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEvD,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IACjC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IACpC,aAAa,EAAE,GAAG,CAAC,YAAY,CAAC,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAA;AAE/D,MAAM,MAAM,cAAc,GAAG;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,m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AED,MAAM,MAAM,cAAc,GAAG;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACpC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACpC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;IAC/C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;CAC7C,CAAA"}
@@ -1,9 +1,9 @@
1
- import type { CoreContext } from '../context/CoreContext.js';
1
+ import type { GenerateContext } from '../context/GenerateContext.js';
2
2
  import type { Identifier } from './Identifier.js';
3
3
  import { ValueBase } from './ValueBase.js';
4
4
  import type { GeneratedValue } from '../types/GeneratedValue.js';
5
5
  type ConstructorArgs<V extends GeneratedValue> = {
6
- context: CoreContext;
6
+ context: GenerateContext;
7
7
  value: V;
8
8
  identifier: Identifier;
9
9
  description?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Definition.d.ts","sourceRoot":"","sources":["../../src/dsl/Definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAA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