@stripe/extensibility-tool-utils 0.6.2

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 (105) hide show
  1. package/LICENSE.md +19 -0
  2. package/dist/cli/cli-ux.d.ts +30 -0
  3. package/dist/cli/cli-ux.d.ts.map +1 -0
  4. package/dist/cli/context.d.ts +24 -0
  5. package/dist/cli/context.d.ts.map +1 -0
  6. package/dist/cli/guards.d.ts +24 -0
  7. package/dist/cli/guards.d.ts.map +1 -0
  8. package/dist/cli/index.d.ts +6 -0
  9. package/dist/cli/index.d.ts.map +1 -0
  10. package/dist/cli/output-path.d.ts +11 -0
  11. package/dist/cli/output-path.d.ts.map +1 -0
  12. package/dist/extensibility-tool-utils-alpha.d.ts +383 -0
  13. package/dist/extensibility-tool-utils-beta.d.ts +383 -0
  14. package/dist/extensibility-tool-utils-internal.d.ts +1866 -0
  15. package/dist/extensibility-tool-utils-public.d.ts +383 -0
  16. package/dist/file-editor/assertions/index.d.ts +68 -0
  17. package/dist/file-editor/assertions/index.d.ts.map +1 -0
  18. package/dist/file-editor/document.d.ts +107 -0
  19. package/dist/file-editor/document.d.ts.map +1 -0
  20. package/dist/file-editor/errors.d.ts +66 -0
  21. package/dist/file-editor/errors.d.ts.map +1 -0
  22. package/dist/file-editor/facades/api-extractor.d.ts +34 -0
  23. package/dist/file-editor/facades/api-extractor.d.ts.map +1 -0
  24. package/dist/file-editor/facades/brands.d.ts +45 -0
  25. package/dist/file-editor/facades/brands.d.ts.map +1 -0
  26. package/dist/file-editor/facades/package-json.d.ts +55 -0
  27. package/dist/file-editor/facades/package-json.d.ts.map +1 -0
  28. package/dist/file-editor/facades/stripe-app-manifest.d.ts +62 -0
  29. package/dist/file-editor/facades/stripe-app-manifest.d.ts.map +1 -0
  30. package/dist/file-editor/facades/tsconfig-options.d.ts +76 -0
  31. package/dist/file-editor/facades/tsconfig-options.d.ts.map +1 -0
  32. package/dist/file-editor/facades/tsconfig.d.ts +43 -0
  33. package/dist/file-editor/facades/tsconfig.d.ts.map +1 -0
  34. package/dist/file-editor/fingerprint.d.ts +39 -0
  35. package/dist/file-editor/fingerprint.d.ts.map +1 -0
  36. package/dist/file-editor/formats/adapter.d.ts +29 -0
  37. package/dist/file-editor/formats/adapter.d.ts.map +1 -0
  38. package/dist/file-editor/formats/detect.d.ts +9 -0
  39. package/dist/file-editor/formats/detect.d.ts.map +1 -0
  40. package/dist/file-editor/formats/index.d.ts +13 -0
  41. package/dist/file-editor/formats/index.d.ts.map +1 -0
  42. package/dist/file-editor/formats/jsonc.d.ts +14 -0
  43. package/dist/file-editor/formats/jsonc.d.ts.map +1 -0
  44. package/dist/file-editor/formats/yaml.d.ts +11 -0
  45. package/dist/file-editor/formats/yaml.d.ts.map +1 -0
  46. package/dist/file-editor/index.d.ts +42 -0
  47. package/dist/file-editor/index.d.ts.map +1 -0
  48. package/dist/file-editor/pointer.d.ts +74 -0
  49. package/dist/file-editor/pointer.d.ts.map +1 -0
  50. package/dist/file-editor/schema.d.ts +72 -0
  51. package/dist/file-editor/schema.d.ts.map +1 -0
  52. package/dist/file-editor/state/fs-manifest.d.ts +30 -0
  53. package/dist/file-editor/state/fs-manifest.d.ts.map +1 -0
  54. package/dist/file-editor/state/in-memory.d.ts +5 -0
  55. package/dist/file-editor/state/in-memory.d.ts.map +1 -0
  56. package/dist/file-editor/state/store.d.ts +19 -0
  57. package/dist/file-editor/state/store.d.ts.map +1 -0
  58. package/dist/file-editor/transaction.d.ts +60 -0
  59. package/dist/file-editor/transaction.d.ts.map +1 -0
  60. package/dist/file-editor/types.d.ts +131 -0
  61. package/dist/file-editor/types.d.ts.map +1 -0
  62. package/dist/file-editor/util/atomic-write.d.ts +7 -0
  63. package/dist/file-editor/util/atomic-write.d.ts.map +1 -0
  64. package/dist/file-editor/util/diff.d.ts +20 -0
  65. package/dist/file-editor/util/diff.d.ts.map +1 -0
  66. package/dist/file-editor/value-at-pointer.d.ts +46 -0
  67. package/dist/file-editor/value-at-pointer.d.ts.map +1 -0
  68. package/dist/index.cjs +2967 -0
  69. package/dist/index.d.ts +26 -0
  70. package/dist/index.d.ts.map +1 -0
  71. package/dist/index.js +2847 -0
  72. package/dist/logging/create-logger.d.ts +29 -0
  73. package/dist/logging/create-logger.d.ts.map +1 -0
  74. package/dist/logging/index.d.ts +10 -0
  75. package/dist/logging/index.d.ts.map +1 -0
  76. package/dist/logging/levels.d.ts +21 -0
  77. package/dist/logging/levels.d.ts.map +1 -0
  78. package/dist/naming/inflection.d.ts +15 -0
  79. package/dist/naming/inflection.d.ts.map +1 -0
  80. package/dist/naming/metadata-policy.d.ts +35 -0
  81. package/dist/naming/metadata-policy.d.ts.map +1 -0
  82. package/dist/naming/stripe-api-case.d.ts +9 -0
  83. package/dist/naming/stripe-api-case.d.ts.map +1 -0
  84. package/dist/naming/types.d.ts +11 -0
  85. package/dist/naming/types.d.ts.map +1 -0
  86. package/dist/naming/validate.d.ts +6 -0
  87. package/dist/naming/validate.d.ts.map +1 -0
  88. package/dist/templates/filesystem-fs.d.ts +20 -0
  89. package/dist/templates/filesystem-fs.d.ts.map +1 -0
  90. package/dist/templates/generator.d.ts +305 -0
  91. package/dist/templates/generator.d.ts.map +1 -0
  92. package/dist/templates/in-memory-fs.d.ts +44 -0
  93. package/dist/templates/in-memory-fs.d.ts.map +1 -0
  94. package/dist/templates/index.d.ts +28 -0
  95. package/dist/templates/index.d.ts.map +1 -0
  96. package/dist/templates/simple-templates.d.ts +75 -0
  97. package/dist/templates/simple-templates.d.ts.map +1 -0
  98. package/dist/templates/template-manager.d.ts +54 -0
  99. package/dist/templates/template-manager.d.ts.map +1 -0
  100. package/dist/templates/types.d.ts +87 -0
  101. package/dist/templates/types.d.ts.map +1 -0
  102. package/dist/tsconfig.build.tsbuildinfo +1 -0
  103. package/dist/workspace-versions.d.ts +30 -0
  104. package/dist/workspace-versions.d.ts.map +1 -0
  105. package/package.json +60 -0
@@ -0,0 +1,383 @@
1
+ /**
2
+ * `@stripe/extensibility-tool-utils`
3
+ *
4
+ * Internal standalone utilities shared across Stripe extensibility tooling.
5
+ *
6
+ * @packageDocumentation
7
+ * @internal
8
+ */
9
+
10
+ import type { MetadataInferenceContext } from '@formspec/core';
11
+ import type { MetadataPolicyInput } from '@formspec/core';
12
+ import pino from 'pino';
13
+
14
+ /**
15
+ * Branded string types with validating smart constructors.
16
+ *
17
+ * Brands use symbol keys so they do not appear in IDE autocomplete
18
+ * (per project convention).
19
+ */
20
+ declare const __semverRangeBrand: unique symbol;
21
+
22
+ /** A well-formed semver version string (e.g. `"1.2.3"`, `"4.0.0-rc.1"`). */
23
+ declare const __semverVersionBrand: unique symbol;
24
+
25
+ /* Excluded from this release type: _AfterExecuteResult */
26
+
27
+ /* Excluded from this release type: _ApiExtractorConfig */
28
+
29
+ /* Excluded from this release type: _ApiExtractorDoc */
30
+
31
+ /* Excluded from this release type: _ApiNameValidationResult */
32
+
33
+ /* Excluded from this release type: _Assertion */
34
+
35
+ /* Excluded from this release type: _AssertionContext */
36
+
37
+ /* Excluded from this release type: _AssertionError */
38
+
39
+ /* Excluded from this release type: _AssertOpts */
40
+
41
+ /* Excluded from this release type: _AsyncAssertion */
42
+
43
+ /* Excluded from this release type: _BeforeExecuteResult */
44
+
45
+ /* Excluded from this release type: _beginTransaction */
46
+
47
+ /* Excluded from this release type: _canonicalNormalize */
48
+
49
+ /* Excluded from this release type: _canonicalStringify */
50
+
51
+ /* Excluded from this release type: _check */
52
+
53
+ /* Excluded from this release type: _CliContext */
54
+
55
+ /* Excluded from this release type: _CliUx */
56
+
57
+ /* Excluded from this release type: _CommitOptions */
58
+
59
+ /* Excluded from this release type: _CommitReport */
60
+
61
+ /* Excluded from this release type: _compilePointer */
62
+
63
+ /* Excluded from this release type: _CompilerOptionKey */
64
+
65
+ /* Excluded from this release type: _CompilerOptions */
66
+
67
+ /* Excluded from this release type: _CompilerOptionValue */
68
+
69
+ /* Excluded from this release type: _compositeGenerator */
70
+
71
+ /* Excluded from this release type: _ConfirmationPolicy */
72
+
73
+ /* Excluded from this release type: _Conflict */
74
+
75
+ /* Excluded from this release type: _ConflictAbortedError */
76
+
77
+ /* Excluded from this release type: _ConflictError */
78
+
79
+ /* Excluded from this release type: _ConflictPolicy */
80
+
81
+ /* Excluded from this release type: _ConflictResolution */
82
+
83
+ /* Excluded from this release type: _ConflictResolver */
84
+
85
+ /* Excluded from this release type: _createCliContext */
86
+
87
+ /* Excluded from this release type: _createFilesystemTemplateFS */
88
+
89
+ /* Excluded from this release type: _createInMemoryTemplateFS */
90
+
91
+ /* Excluded from this release type: _createLogger */
92
+
93
+ /* Excluded from this release type: _createSimpleSingleFileTemplate */
94
+
95
+ /* Excluded from this release type: _createSimpleTemplate */
96
+
97
+ /* Excluded from this release type: _defaultMeta */
98
+
99
+ /* Excluded from this release type: _DepKind */
100
+
101
+ /* Excluded from this release type: _detectFormat */
102
+
103
+ /* Excluded from this release type: _detectMeta */
104
+
105
+ /* Excluded from this release type: _Diagnostic */
106
+
107
+ /* Excluded from this release type: _DiffHunk */
108
+
109
+ /* Excluded from this release type: _diffHunks */
110
+
111
+ /* Excluded from this release type: _DiffLine */
112
+
113
+ /* Excluded from this release type: _DiffOptions */
114
+
115
+ /* Excluded from this release type: _diffUnified */
116
+
117
+ /* Excluded from this release type: _Document */
118
+
119
+ /* Excluded from this release type: _escapeToken */
120
+
121
+ /* Excluded from this release type: _FileEditorError */
122
+
123
+ /* Excluded from this release type: _FileWriteOutcome */
124
+
125
+ /* Excluded from this release type: _fingerprint */
126
+
127
+ /* Excluded from this release type: _Format */
128
+
129
+ /* Excluded from this release type: _FormatAdapter */
130
+
131
+ /* Excluded from this release type: _FormatMeta */
132
+
133
+ /* Excluded from this release type: _FormatNotSupportedError */
134
+
135
+ /* Excluded from this release type: _FsCentralManifestStore */
136
+
137
+ /* Excluded from this release type: _FsCentralManifestStoreOptions */
138
+
139
+ /* Excluded from this release type: _GeneratedFile */
140
+
141
+ /* Excluded from this release type: _Generator */
142
+
143
+ /* Excluded from this release type: _GeneratorContext */
144
+
145
+ /* Excluded from this release type: _GeneratorDefectError */
146
+
147
+ /* Excluded from this release type: _GeneratorExecuteContext */
148
+
149
+ /* Excluded from this release type: _GeneratorExecuteResult */
150
+
151
+ /* Excluded from this release type: _GeneratorInputError */
152
+
153
+ /* Excluded from this release type: _GeneratorPlanResult */
154
+
155
+ /* Excluded from this release type: _GeneratorRunner */
156
+
157
+ /* Excluded from this release type: _GeneratorWriteResult */
158
+
159
+ /* Excluded from this release type: _getAdapter */
160
+
161
+ /* Excluded from this release type: _hasPointer */
162
+
163
+ /* Excluded from this release type: _inferStripeApiName */
164
+
165
+ /* Excluded from this release type: _InMemoryStateStore */
166
+
167
+ /* Excluded from this release type: _InMemoryTemplateFS */
168
+
169
+ /* Excluded from this release type: _isRecord */
170
+
171
+ /* Excluded from this release type: _isRecordWithValueType */
172
+
173
+ /* Excluded from this release type: _isSemverRange */
174
+
175
+ /* Excluded from this release type: _isSemverVersion */
176
+
177
+ /* Excluded from this release type: _IsUnknown */
178
+
179
+ /* Excluded from this release type: _jsonAdapter */
180
+
181
+ /* Excluded from this release type: _jsoncAdapter */
182
+
183
+ /* Excluded from this release type: _JsonPointer */
184
+
185
+ /* Excluded from this release type: _LoggerOptions */
186
+
187
+ /* Excluded from this release type: _LogLevel */
188
+
189
+ /* Excluded from this release type: _looksPlural */
190
+
191
+ /* Excluded from this release type: _looksSingular */
192
+
193
+ /* Excluded from this release type: _MergeOptions */
194
+
195
+ /* Excluded from this release type: _MutationOptions */
196
+
197
+ /* Excluded from this release type: _NarrowedElement */
198
+
199
+ /* Excluded from this release type: _NarrowedPartial */
200
+
201
+ /* Excluded from this release type: _NarrowedValue */
202
+
203
+ /* Excluded from this release type: _openApiExtractor */
204
+
205
+ /* Excluded from this release type: _openDocument */
206
+
207
+ /* Excluded from this release type: _openDocumentFromDisk */
208
+
209
+ /* Excluded from this release type: _OpenDocumentOptions */
210
+
211
+ /* Excluded from this release type: _openPackageJson */
212
+
213
+ /* Excluded from this release type: _openStripeAppManifest */
214
+
215
+ /* Excluded from this release type: _openTsConfig */
216
+
217
+ /* Excluded from this release type: _PackageJson */
218
+
219
+ /* Excluded from this release type: _PackageJsonDoc */
220
+
221
+ /* Excluded from this release type: _parseArrayIndex */
222
+
223
+ /* Excluded from this release type: _ParseError */
224
+
225
+ /* Excluded from this release type: _parseLogLevel */
226
+
227
+ /* Excluded from this release type: _parsePointer */
228
+
229
+ /* Excluded from this release type: _PathError */
230
+
231
+ /* Excluded from this release type: _PendingEdit */
232
+
233
+ /* Excluded from this release type: _PlannedFile */
234
+
235
+ /* Excluded from this release type: _pointer */
236
+
237
+ /* Excluded from this release type: _POINTER_STRING */
238
+
239
+ /* Excluded from this release type: _PointerBuilder */
240
+
241
+ /* Excluded from this release type: _PointerSegments */
242
+
243
+ /* Excluded from this release type: _ProjectExecuteContext */
244
+
245
+ /* Excluded from this release type: _ProjectGeneratorContext */
246
+
247
+ /* Excluded from this release type: _registerFormatAdapter */
248
+
249
+ /* Excluded from this release type: _resolvePointer */
250
+
251
+ /* Excluded from this release type: _runAssertions */
252
+
253
+ /* Excluded from this release type: _runAsyncAssertions */
254
+
255
+ /* Excluded from this release type: _SchemaValidationError */
256
+
257
+ /* Excluded from this release type: _SemverRange */
258
+
259
+ /* Excluded from this release type: _semverRange */
260
+
261
+ /* Excluded from this release type: _SemverVersion */
262
+
263
+ /* Excluded from this release type: _semverVersion */
264
+
265
+ /* Excluded from this release type: _Severity */
266
+
267
+ /* Excluded from this release type: _sha256Hex */
268
+
269
+ /* Excluded from this release type: _SingleTemplateManager */
270
+
271
+ /* Excluded from this release type: _SplitPointer */
272
+
273
+ /* Excluded from this release type: _SplitRest */
274
+
275
+ /* Excluded from this release type: _StandaloneExecuteContext */
276
+
277
+ /* Excluded from this release type: _StandaloneGeneratorContext */
278
+
279
+ /* Excluded from this release type: _StandardSchemaV1 */
280
+
281
+ /* Excluded from this release type: _StateRecord */
282
+
283
+ /* Excluded from this release type: _StateStore */
284
+
285
+ /* Excluded from this release type: _StepInto */
286
+
287
+ /* Excluded from this release type: _StripeAppManifest */
288
+
289
+ /* Excluded from this release type: _StripeAppManifestDoc */
290
+
291
+ /* Excluded from this release type: _stripeMetadataPolicy */
292
+
293
+ /* Excluded from this release type: _StripePermission */
294
+
295
+ /* Excluded from this release type: _Template */
296
+
297
+ /* Excluded from this release type: _TemplateContext */
298
+
299
+ /* Excluded from this release type: _TemplateFS */
300
+
301
+ /* Excluded from this release type: _TemplateFSImageEntry */
302
+
303
+ /* Excluded from this release type: _TemplateManager */
304
+
305
+ /* Excluded from this release type: _TemplateOutput */
306
+
307
+ /* Excluded from this release type: _toCapitalized */
308
+
309
+ /* Excluded from this release type: _tokenizeIdentifier */
310
+
311
+ /* Excluded from this release type: _toPascalCase */
312
+
313
+ /* Excluded from this release type: _toPlural */
314
+
315
+ /* Excluded from this release type: _toSentenceDisplayName */
316
+
317
+ /* Excluded from this release type: _toSingular */
318
+
319
+ /* Excluded from this release type: _toSnakeCase */
320
+
321
+ /* Excluded from this release type: _toStripeApiCase */
322
+
323
+ /* Excluded from this release type: _Transaction */
324
+
325
+ /* Excluded from this release type: _TransactionOptions */
326
+
327
+ /* Excluded from this release type: _truncateName */
328
+
329
+ /* Excluded from this release type: _tryParseSemverRange */
330
+
331
+ /* Excluded from this release type: _tryParseSemverVersion */
332
+
333
+ /* Excluded from this release type: _tryValidateWithSchema */
334
+
335
+ /* Excluded from this release type: _TsConfig */
336
+
337
+ /* Excluded from this release type: _TsConfigDoc */
338
+
339
+ /* Excluded from this release type: _TsJsx */
340
+
341
+ /* Excluded from this release type: _TsModule */
342
+
343
+ /* Excluded from this release type: _TsModuleResolution */
344
+
345
+ /* Excluded from this release type: _TsTarget */
346
+
347
+ /* Excluded from this release type: _TypeMismatchError */
348
+
349
+ /* Excluded from this release type: _UnescapeToken */
350
+
351
+ /* Excluded from this release type: _unescapeToken */
352
+
353
+ /* Excluded from this release type: _validateApiName */
354
+
355
+ /* Excluded from this release type: _validateDisplayName */
356
+
357
+ /* Excluded from this release type: _validateWithSchema */
358
+
359
+ /* Excluded from this release type: _ValueAtPointer */
360
+
361
+ /* Excluded from this release type: _ValueAtSegments */
362
+
363
+ /* Excluded from this release type: _workspaceVersion */
364
+
365
+ /* Excluded from this release type: _WriteAbortedError */
366
+
367
+ /* Excluded from this release type: _WriteCapability */
368
+
369
+ /* Excluded from this release type: _WriteConfirm */
370
+
371
+ /* Excluded from this release type: _WriteDecision */
372
+
373
+ /* Excluded from this release type: _WriteError */
374
+
375
+ /* Excluded from this release type: _writeJsonOutput */
376
+
377
+ /* Excluded from this release type: _WriteReason */
378
+
379
+ /* Excluded from this release type: _WriteRequest */
380
+
381
+ /* Excluded from this release type: _yamlAdapter */
382
+
383
+ export { }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Read-only predicates that produce {@link _Diagnostic}s. Compose via
3
+ * {@link _Document.assert}, or call each factory directly on a value.
4
+ *
5
+ * Semver checks use npm's `semver` package.
6
+ *
7
+ * @see https://github.com/npm/node-semver
8
+ */
9
+ import type { _StandardSchemaV1 } from '../schema.js';
10
+ import type { _Diagnostic, _JsonPointer, _Severity } from '../types.js';
11
+ /** A read-only predicate over a document-shaped value. @internal */
12
+ export type _Assertion = (ctx: _AssertionContext) => _Diagnostic[];
13
+ /** An assertion that defers to an async validator (e.g. a Standard Schema). @internal */
14
+ export type _AsyncAssertion = (ctx: _AssertionContext) => Promise<_Diagnostic[]>;
15
+ /** Context handed to each assertion. @internal */
16
+ export interface _AssertionContext {
17
+ readonly path: string;
18
+ readonly value: unknown;
19
+ }
20
+ /** @internal */
21
+ export interface _AssertOpts {
22
+ readonly severity?: _Severity;
23
+ readonly message?: string;
24
+ }
25
+ /**
26
+ * Read-only predicate factories that produce {@link _Assertion}s and
27
+ * {@link _AsyncAssertion}s. Compose via {@link _Document.assert}.
28
+ * @internal
29
+ */
30
+ export declare const _check: {
31
+ /** The pointer must resolve to something (including `null`). @internal */
32
+ readonly exists: (pointer: _JsonPointer, opts?: _AssertOpts) => _Assertion;
33
+ /** The value at the pointer must deep-equal `expected`. @internal */
34
+ readonly equals: (pointer: _JsonPointer, expected: unknown, opts?: _AssertOpts) => _Assertion;
35
+ /** The value at the pointer must equal one of `allowed`. @internal */
36
+ readonly oneOf: (pointer: _JsonPointer, allowed: readonly unknown[], opts?: _AssertOpts) => _Assertion;
37
+ /** The string value at the pointer must match the given pattern. @internal */
38
+ readonly matches: (pointer: _JsonPointer, pattern: RegExp, opts?: _AssertOpts) => _Assertion;
39
+ /**
40
+ * The value at the pointer must satisfy a caller predicate.
41
+ * @internal
42
+ */
43
+ readonly satisfies: (pointer: _JsonPointer, predicate: (v: unknown) => boolean, opts?: _AssertOpts) => _Assertion;
44
+ /**
45
+ * The value at the pointer must validate against the supplied Standard
46
+ * Schema (Zod v4, Valibot, ArkType, etc.). Each schema issue becomes a
47
+ * `SCHEMA_VIOLATION` diagnostic with the pointer extended by the issue's
48
+ * path.
49
+ *
50
+ * NOTE: the validator is invoked synchronously and its result awaited at
51
+ * call time, so this returns a `Promise<_Diagnostic[]>` rather than a
52
+ * synchronous `_Assertion`. Wrap the result with `_runAsyncAssertions` if
53
+ * you need to compose it with other async checks.
54
+ * @internal
55
+ */
56
+ readonly matchesSchema: (pointer: _JsonPointer, schema: _StandardSchemaV1, opts?: _AssertOpts) => _AsyncAssertion;
57
+ /**
58
+ * The string value at the pointer must be a valid semver range satisfying
59
+ * the supplied constraint.
60
+ * @internal
61
+ */
62
+ readonly semverSatisfies: (pointer: _JsonPointer, range: string, opts?: _AssertOpts) => _Assertion;
63
+ };
64
+ /** @internal */
65
+ export declare function _runAssertions(path: string, value: unknown, assertions: readonly _Assertion[]): _Diagnostic[];
66
+ /** @internal */
67
+ export declare function _runAsyncAssertions(path: string, value: unknown, assertions: readonly _AsyncAssertion[]): Promise<_Diagnostic[]>;
68
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.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ACP,WAAW,KAChB,UAAU;CAgDL,CAAC;AAEX,gBAAgB;AAChB,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,SAAS,UAAU,EAAE,GAChC,WAAW,EAAE,CAMf;AAED,gBAAgB;AAChB,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,SAAS,eAAe,EAAE,GACrC,OAAO,CAAC,WAAW,EAAE,CAAC,CAMxB"}
@@ -0,0 +1,107 @@
1
+ import type { _Assertion } from './assertions/index.js';
2
+ import type { _StandardSchemaV1 } from './schema.js';
3
+ import type { _ConflictPolicy, _Diagnostic, _Format, _FormatMeta, _JsonPointer, _MergeOptions, _PendingEdit } from './types.js';
4
+ import type { _ValueAtPointer } from './value-at-pointer.js';
5
+ /**
6
+ * Narrow `_ValueAtPointer<T, P>` only when `P` is a string literal. When `P`
7
+ * widens to `string` (e.g. a computed pointer) the type collapses to
8
+ * `unknown` so callers keep the freedom they had before.
9
+ * @internal
10
+ */
11
+ export type _NarrowedValue<T, P extends string> = string extends P ? unknown : _ValueAtPointer<T, P>;
12
+ /** @internal */
13
+ export type _NarrowedPartial<T, P extends string> = string extends P ? object : Partial<_ValueAtPointer<T, P>> & object;
14
+ /** @internal */
15
+ export type _NarrowedElement<T, P extends string> = string extends P ? unknown : _ValueAtPointer<T, P> extends readonly (infer E)[] ? E : unknown;
16
+ /** Options passed when opening a document directly. */
17
+ /** @internal */
18
+ export interface _OpenDocumentOptions<T = unknown> {
19
+ readonly format?: _Format;
20
+ /** Optional schema for runtime validation (any Standard Schema). */
21
+ readonly schema?: _StandardSchemaV1<T>;
22
+ }
23
+ /** Per-mutation overrides. */
24
+ /** @internal */
25
+ export interface _MutationOptions<T = unknown> {
26
+ readonly conflictPolicy?: _ConflictPolicy;
27
+ readonly guard?: (doc: _Document<T>) => boolean;
28
+ }
29
+ /**
30
+ * A parsed, editable document. Mutations are staged in memory and applied to
31
+ * the source text on demand (see {@link _Document.preview}).
32
+ *
33
+ * `T` is the *expected* shape of the document's root value. When `T` is
34
+ * `unknown` (the default), mutation signatures collapse to accept any value,
35
+ * so the class is usable schema-free. When `T` is a concrete interface,
36
+ * `get`/`set`/`addIfMissing`/etc. narrow both the pointer and the value
37
+ * type via {@link _ValueAtPointer}.
38
+ */
39
+ /** @internal */
40
+ export declare class _Document<T = unknown> {
41
+ readonly absolutePath: string;
42
+ readonly format: _Format;
43
+ /** Optional Standard Schema; when set, {@link _Document.validate} runs it. */
44
+ readonly schema: _StandardSchemaV1<T> | null;
45
+ /** Original on-disk text (may be `""` for new files). */
46
+ private readonly originalText;
47
+ private readonly meta;
48
+ private readonly edits;
49
+ private readonly staticDiagnostics;
50
+ constructor(init: {
51
+ readonly absolutePath: string;
52
+ readonly format: _Format;
53
+ readonly originalText: string;
54
+ readonly meta: _FormatMeta;
55
+ readonly schema?: _StandardSchemaV1<T> | null;
56
+ });
57
+ /** Get the value at a pointer. Reflects pending edits via `preview()`. */
58
+ get<P extends _JsonPointer>(pointer: P): _NarrowedValue<T, P> | undefined;
59
+ /** Like `get` but throws {@link _AssertionError} on miss. */
60
+ getRequired<P extends _JsonPointer>(pointer: P): _NarrowedValue<T, P>;
61
+ has(pointer: _JsonPointer): boolean;
62
+ set<P extends _JsonPointer>(pointer: P, value: _NarrowedValue<T, P>, opts?: _MutationOptions<T>): this;
63
+ addIfMissing<P extends _JsonPointer>(pointer: P, value: _NarrowedValue<T, P>, opts?: _MutationOptions<T>): this;
64
+ updateIfPresent<P extends _JsonPointer>(pointer: P, updater: (current: _NarrowedValue<T, P>) => _NarrowedValue<T, P>, opts?: _MutationOptions<T>): this;
65
+ remove(pointer: _JsonPointer, opts?: _MutationOptions<T>): this;
66
+ merge<P extends _JsonPointer>(pointer: P, partial: _NarrowedPartial<T, P>, opts?: _MutationOptions<T> & {
67
+ mergeOptions?: _MergeOptions;
68
+ }): this;
69
+ arrayAppend<P extends _JsonPointer>(pointer: P, value: _NarrowedElement<T, P>, opts?: _MutationOptions<T>): this;
70
+ arrayUpsert<P extends _JsonPointer, E = _NarrowedElement<T, P>>(pointer: P, value: E, keyFn: (el: E) => unknown, opts?: _MutationOptions<T>): this;
71
+ assert(...checks: readonly _Assertion[]): _Diagnostic[];
72
+ /**
73
+ * If a schema is configured, validate the current preview against it and
74
+ * return a diagnostic per issue. Returns `[]` when no schema is set or
75
+ * validation passes.
76
+ *
77
+ * Each call replaces any previously accumulated `SCHEMA_VIOLATION` diagnostics
78
+ * so that calling `validate()` multiple times does not duplicate findings.
79
+ */
80
+ validate(): Promise<_Diagnostic[]>;
81
+ diagnostics(): readonly _Diagnostic[];
82
+ pendingEdits(): readonly _PendingEdit[];
83
+ /** Serialize with all pending edits applied. Pure — no disk I/O. */
84
+ preview(): string;
85
+ /** Reset all pending edits. Used by transactions on rollback. */
86
+ rollback(): void;
87
+ /** @internal Metadata for transaction serialization. */
88
+ getMeta(): _FormatMeta;
89
+ /** @internal Original text, for transaction fingerprinting. */
90
+ getOriginalText(): string;
91
+ private parseCurrentValue;
92
+ private stage;
93
+ private opts;
94
+ }
95
+ /**
96
+ * Open a document from disk. For non-existent files, returns an empty
97
+ * document whose `format` is inferred from the path (or `options.format`).
98
+ */
99
+ /** @internal */
100
+ export declare function _openDocumentFromDisk<T = unknown>(absolutePath: string, options?: _OpenDocumentOptions<T>): Promise<_Document<T>>;
101
+ /**
102
+ * Compute the on-disk fingerprint for a document's current preview text.
103
+ *
104
+ * @internal — exposed for transaction commit flow.
105
+ */
106
+ export declare function _previewFingerprint(doc: _Document): string;
107
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/file-editor/document.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAMxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aA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,OAAO,CAAC,WAAW,EAAE,CAAC;IAwBxC,WAAW,IAAI,SAAS,WAAW,EAAE;IAMrC,YAAY,IAAI,SAAS,YAAY,EAAE;IAI9C,oEAAoE;IAC7D,OAAO,IAAI,MAAM;IAMxB,iEAAiE;IAC1D,QAAQ,IAAI,IAAI;IAIvB,wDAAwD;IACjD,OAAO,IAAI,WAAW;IAI7B,+DAA+D;IACxD,eAAe,IAAI,MAAM;IAMhC,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,IAAI;CAWb;AAcD;;;GAGG;AACH,gBAAgB;AAChB,wBAAsB,qBAAqB,CAAC,CAAC,GAAG,OAAO,EACrD,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,oBAAoB,CAAC,CAAC,CAAM,GACpC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAsBvB;AAQD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAE1D"}
@@ -0,0 +1,66 @@
1
+ import type { _Conflict, _Format, _JsonPointer } from './types.js';
2
+ /** Base class for all errors raised by this library. */
3
+ /** @internal */
4
+ export declare class _FileEditorError extends Error {
5
+ readonly code: string;
6
+ constructor(code: string, message: string);
7
+ }
8
+ /** Input could not be parsed. */
9
+ /** @internal */
10
+ export declare class _ParseError extends _FileEditorError {
11
+ readonly format: _Format;
12
+ readonly offset: number | null;
13
+ readonly snippet: string | null;
14
+ constructor(format: _Format, message: string, details?: {
15
+ offset?: number;
16
+ snippet?: string;
17
+ });
18
+ }
19
+ /** A JSON Pointer is syntactically invalid or cannot be resolved. */
20
+ /** @internal */
21
+ export declare class _PathError extends _FileEditorError {
22
+ readonly pointer: _JsonPointer;
23
+ constructor(pointer: _JsonPointer, message: string);
24
+ }
25
+ /** A mutation's expected shape doesn't match the current value. */
26
+ /** @internal */
27
+ export declare class _TypeMismatchError extends _FileEditorError {
28
+ readonly pointer: _JsonPointer;
29
+ constructor(pointer: _JsonPointer, message: string);
30
+ }
31
+ /** A required value failed an assertion check. */
32
+ /** @internal */
33
+ export declare class _AssertionError extends _FileEditorError {
34
+ readonly pointer: _JsonPointer;
35
+ readonly expected: unknown;
36
+ readonly actual: unknown;
37
+ constructor(pointer: _JsonPointer, message: string, details?: {
38
+ expected?: unknown;
39
+ actual?: unknown;
40
+ });
41
+ }
42
+ /** Drift detected and policy was "error". */
43
+ /** @internal */
44
+ export declare class _ConflictError extends _FileEditorError {
45
+ readonly conflict: _Conflict;
46
+ constructor(conflict: _Conflict);
47
+ }
48
+ /** Resolver or confirmWrite returned "abort". */
49
+ /** @internal */
50
+ export declare class _ConflictAbortedError extends _FileEditorError {
51
+ readonly path: string;
52
+ constructor(path: string);
53
+ }
54
+ /** confirmWrite returned "abort". */
55
+ /** @internal */
56
+ export declare class _WriteAbortedError extends _FileEditorError {
57
+ readonly path: string;
58
+ constructor(path: string);
59
+ }
60
+ /** Unknown file extension with no format override. */
61
+ /** @internal */
62
+ export declare class _FormatNotSupportedError extends _FileEditorError {
63
+ readonly path: string;
64
+ constructor(path: string, message?: string);
65
+ }
66
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/file-editor/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEnE,wDAAwD;AACxD,gBAAgB;AAChB,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,SAAgB,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAKjD;AAED,iCAAiC;AACjC,gBAAgB;AAChB,qBAAa,WAAY,SAAQ,gBAAgB;IAC/C,SAAgB,MAAM,EAAE,OAAO,CAAC;IAChC,SAAgB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,SAAgB,OAAO,EA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hC;AAED,sDAAsD;AACtD,gBAAgB;AAChB,qBAAa,wBAAyB,SAAQ,gBAAgB;IAC5D,SAAgB,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAQlD"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Typed façade for api-extractor.json (JSONC).
3
+ *
4
+ * @see https://api-extractor.com/pages/setup/configure_api_report/
5
+ */
6
+ import { _Document, type _MutationOptions } from '../document.js';
7
+ import type { _StandardSchemaV1 } from '../schema.js';
8
+ /** @internal */
9
+ export interface _ApiExtractorConfig {
10
+ readonly projectFolder?: string;
11
+ readonly mainEntryPointFilePath?: string;
12
+ readonly apiReport?: {
13
+ readonly enabled?: boolean;
14
+ readonly reportFolder?: string;
15
+ readonly reportFileName?: string;
16
+ };
17
+ readonly dtsRollup?: {
18
+ readonly enabled?: boolean;
19
+ readonly publicTrimmedFilePath?: string;
20
+ readonly untrimmedFilePath?: string;
21
+ };
22
+ }
23
+ /** @internal */
24
+ export declare class _ApiExtractorDoc extends _Document<_ApiExtractorConfig> {
25
+ setMainEntryPoint(path: string, opts?: _MutationOptions<_ApiExtractorConfig>): this;
26
+ enableApiReport(folder: string, fileName: string, opts?: _MutationOptions<_ApiExtractorConfig>): this;
27
+ enableDtsRollup(publicPath: string, opts?: _MutationOptions<_ApiExtractorConfig>): this;
28
+ }
29
+ /** @internal */
30
+ export declare function _openApiExtractor(absolutePath: string, options?: {
31
+ format?: 'jsonc' | 'json';
32
+ schema?: _StandardSchemaV1;
33
+ }): Promise<_ApiExtractorDoc>;
34
+ //# sourceMappingURL=api-extractor.d.ts.map