@stripe/extensibility-jsonschema-tools 1.0.1 → 1.0.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.
@@ -5,7 +5,7 @@
5
5
  * walks its `implements` clause to find generic type arguments, and
6
6
  * extracts JSON Schema + UI Schema from each config type.
7
7
  */
8
- import type { JsonSchema2020, UISchema } from '@formspec/build';
8
+ import type { JsonSchema2020, UISchema } from '@stripe/formspec-build';
9
9
  /**
10
10
  * Options for extracting config schemas from a class export.
11
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"extract-config-schemas.d.ts","sourceRoot":"","sources":["../src/extract-config-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAOhE;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,cAAc,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,UAAU,EAAE,cAAc,CAAC;IAC3B,8BAA8B;IAC9B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,qEAAqE;IACrE,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAkBD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,cAAc,EAAE,MAAM,CAAC;CACxB;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,4BAA4B,GACpC,cAAc,EAAE,CAqDlB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,2BAA2B,CAc7B"}
1
+ {"version":3,"file":"extract-config-schemas.d.ts","sourceRoot":"","sources":["../src/extract-config-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAOvE;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,cAAc,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,UAAU,EAAE,cAAc,CAAC;IAC3B,8BAA8B;IAC9B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,qEAAqE;IACrE,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAkBD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,cAAc,EAAE,MAAM,CAAC;CACxB;AA2BD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,4BAA4B,GACpC,cAAc,EAAE,CAqDlB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,2BAA2B,CAc7B"}
@@ -1,4 +1,4 @@
1
- import type { JsonSchema2020 } from '@formspec/build';
1
+ import type { JsonSchema2020 } from '@stripe/formspec-build';
2
2
  /**
3
3
  * Post-processes a generated JSON Schema to fix path-targeted constraints on
4
4
  * Decimal sub-properties. Mutates the schema in place for efficiency.
@@ -1 +1 @@
1
- {"version":3,"file":"fixup-decimal-path-constraints.d.ts","sourceRoot":"","sources":["../src/fixup-decimal-path-constraints.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AActD;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAgBnF"}
1
+ {"version":3,"file":"fixup-decimal-path-constraints.d.ts","sourceRoot":"","sources":["../src/fixup-decimal-path-constraints.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAc7D;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAgBnF"}
@@ -1,4 +1,4 @@
1
- import { type GenerateSchemasOptions } from '@formspec/build';
1
+ import { type GenerateSchemasOptions } from '@stripe/formspec-build';
2
2
  /**
3
3
  * Generates JSON Schema and UI Schema using Stripe's canonical config.
4
4
  *
@@ -8,5 +8,5 @@ import { type GenerateSchemasOptions } from '@formspec/build';
8
8
  *
9
9
  * @internal
10
10
  */
11
- export declare function _generateSchemas(options: Omit<GenerateSchemasOptions, 'errorReporting'>): import("@formspec/build").GenerateFromClassResult;
11
+ export declare function _generateSchemas(options: Omit<GenerateSchemasOptions, 'errorReporting'>): import("@stripe/formspec-build").GenerateFromClassResult;
12
12
  //# sourceMappingURL=generate-schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-schemas.d.ts","sourceRoot":"","sources":["../src/generate-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,iBAAiB,CAAC;AAIzB;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,qDAoBxD"}
1
+ {"version":3,"file":"generate-schemas.d.ts","sourceRoot":"","sources":["../src/generate-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,wBAAwB,CAAC;AAIhC;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,4DAoBxD"}
package/dist/index.cjs CHANGED
@@ -46,7 +46,7 @@ __export(index_exports, {
46
46
  });
47
47
  module.exports = __toCommonJS(index_exports);
48
48
 
49
- // ../../node_modules/.pnpm/@formspec+core@0.1.0-alpha.70/node_modules/@formspec/core/dist/index.js
49
+ // ../../node_modules/.pnpm/@stripe+formspec-core@0.1.0-alpha.73/node_modules/@stripe/formspec-core/dist/index.js
50
50
  function defineExtension(def) {
51
51
  return def;
52
52
  }
@@ -98,7 +98,7 @@ function matchesGlob(glob, namespace) {
98
98
  }
99
99
  }
100
100
 
101
- // ../../node_modules/.pnpm/@formspec+core@0.1.0-alpha.70/node_modules/@formspec/core/dist/internals.js
101
+ // ../../node_modules/.pnpm/@stripe+formspec-core@0.1.0-alpha.73/node_modules/@stripe/formspec-core/dist/internals.js
102
102
  var _BUILTIN_CONSTRAINT_DEFINITIONS = {
103
103
  minimum: "number",
104
104
  maximum: "number",
@@ -4170,7 +4170,7 @@ var coerce = {
4170
4170
  };
4171
4171
  var NEVER = INVALID;
4172
4172
 
4173
- // ../../node_modules/.pnpm/@formspec+analysis@0.1.0-alpha.70_typescript@5.9.3/node_modules/@formspec/analysis/dist/internal.js
4173
+ // ../../node_modules/.pnpm/@stripe+formspec-analysis@0.1.0-alpha.73_typescript@5.9.3/node_modules/@stripe/formspec-analysis/dist/internal.js
4174
4174
  var ts3 = __toESM(require("typescript"), 1);
4175
4175
  var ts = __toESM(require("typescript"), 1);
4176
4176
  var ts2 = __toESM(require("typescript"), 1);
@@ -10058,7 +10058,7 @@ var TSDocParser = class {
10058
10058
  }
10059
10059
  };
10060
10060
 
10061
- // ../../node_modules/.pnpm/@formspec+analysis@0.1.0-alpha.70_typescript@5.9.3/node_modules/@formspec/analysis/dist/internal.js
10061
+ // ../../node_modules/.pnpm/@stripe+formspec-analysis@0.1.0-alpha.73_typescript@5.9.3/node_modules/@stripe/formspec-analysis/dist/internal.js
10062
10062
  var import_meta = {};
10063
10063
  function expectedCloseFor(open) {
10064
10064
  if (open === "[") return "]";
@@ -14182,7 +14182,7 @@ function extractSummaryText(docComment, commentText, parsed) {
14182
14182
  return hasTagOnlySummary ? "" : summary;
14183
14183
  }
14184
14184
 
14185
- // ../../node_modules/.pnpm/@formspec+build@0.1.0-alpha.70_typescript@5.9.3/node_modules/@formspec/build/dist/index.js
14185
+ // ../../node_modules/.pnpm/@stripe+formspec-build@0.1.0-alpha.73_typescript@5.9.3/node_modules/@stripe/formspec-build/dist/index.js
14186
14186
  var ts82 = __toESM(require("typescript"), 1);
14187
14187
  var ts62 = __toESM(require("typescript"), 1);
14188
14188
  var path = __toESM(require("path"), 1);
@@ -19770,8 +19770,8 @@ function isDefineCustomTypeCall(node, checker) {
19770
19770
  const decl = resolved.declarations?.[0];
19771
19771
  if (decl !== void 0) {
19772
19772
  const sourceFile = decl.getSourceFile().fileName.replace(/\\/g, "/");
19773
- return resolved.name === "defineCustomType" && // Match whether in node_modules/@formspec/core or monorepo packages/core.
19774
- (sourceFile.includes("@formspec/core") || sourceFile.includes("/packages/core/"));
19773
+ return resolved.name === "defineCustomType" && // Match whether in node_modules/@stripe/formspec-core or monorepo packages/core.
19774
+ (sourceFile.includes("@stripe/formspec-core") || sourceFile.includes("/packages/core/"));
19775
19775
  }
19776
19776
  }
19777
19777
  return ts72.isIdentifier(node.expression) && node.expression.text === "defineCustomType";
@@ -19804,7 +19804,7 @@ function isDefineExtensionCall(node, checker) {
19804
19804
  const decl = resolved.declarations?.[0];
19805
19805
  if (decl !== void 0) {
19806
19806
  const sourceFile = decl.getSourceFile().fileName.replace(/\\/g, "/");
19807
- return resolved.name === "defineExtension" && (sourceFile.includes("@formspec/core") || sourceFile.includes("/packages/core/"));
19807
+ return resolved.name === "defineExtension" && (sourceFile.includes("@stripe/formspec-core") || sourceFile.includes("/packages/core/"));
19808
19808
  }
19809
19809
  }
19810
19810
  return ts72.isIdentifier(node.expression) && node.expression.text === "defineExtension";
@@ -20290,7 +20290,7 @@ function _generateSchemas(options) {
20290
20290
  return result;
20291
20291
  }
20292
20292
 
20293
- // ../../node_modules/.pnpm/@formspec+build@0.1.0-alpha.70_typescript@5.9.3/node_modules/@formspec/build/dist/browser.js
20293
+ // ../../node_modules/.pnpm/@stripe+formspec-build@0.1.0-alpha.73_typescript@5.9.3/node_modules/@stripe/formspec-build/dist/browser.js
20294
20294
  function toKebabCase2(logicalName) {
20295
20295
  return logicalName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").replace(/-+/g, "-").toLowerCase();
20296
20296
  }
@@ -20528,7 +20528,7 @@ var jsonSchema7Schema2 = external_exports.lazy(
20528
20528
  // src/extract-config-schemas.ts
20529
20529
  var ts12 = __toESM(require("typescript"), 1);
20530
20530
 
20531
- // ../../node_modules/.pnpm/@formspec+build@0.1.0-alpha.70_typescript@5.9.3/node_modules/@formspec/build/dist/internals.js
20531
+ // ../../node_modules/.pnpm/@stripe+formspec-build@0.1.0-alpha.73_typescript@5.9.3/node_modules/@stripe/formspec-build/dist/internals.js
20532
20532
  var ts63 = __toESM(require("typescript"), 1);
20533
20533
  var path3 = __toESM(require("path"), 1);
20534
20534
  var ts53 = __toESM(require("typescript"), 1);