@stripe/extensibility-script-build-tools 1.5.4 → 1.5.7

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 (26) hide show
  1. package/dist/index.cjs +120 -189
  2. package/dist/index.js +120 -189
  3. package/dist/runtime-introspect.d.ts.map +1 -1
  4. package/dist/sdk-types/extensions/billing/bill/discount_calculation.d.ts +7 -10
  5. package/dist/sdk-types/extensions/billing/bill/discount_calculation.d.ts.map +1 -1
  6. package/dist/sdk-types/extensions/billing/customer_balance_application.d.ts +7 -9
  7. package/dist/sdk-types/extensions/billing/customer_balance_application.d.ts.map +1 -1
  8. package/dist/sdk-types/extensions/billing/invoice_collection_setting.d.ts +15 -19
  9. package/dist/sdk-types/extensions/billing/invoice_collection_setting.d.ts.map +1 -1
  10. package/dist/sdk-types/extensions/billing/prorations.d.ts +25 -34
  11. package/dist/sdk-types/extensions/billing/prorations.d.ts.map +1 -1
  12. package/dist/sdk-types/extensions/billing/recurring_billing_item_handling.d.ts +29 -47
  13. package/dist/sdk-types/extensions/billing/recurring_billing_item_handling.d.ts.map +1 -1
  14. package/dist/sdk-types/extensions/billing/types.d.ts +4 -4
  15. package/dist/sdk-types/extensions/core/workflows/custom_action.d.ts +7 -12
  16. package/dist/sdk-types/extensions/core/workflows/custom_action.d.ts.map +1 -1
  17. package/dist/sdk-types/extensions/extend/workflows/custom_action.d.ts +7 -12
  18. package/dist/sdk-types/extensions/extend/workflows/custom_action.d.ts.map +1 -1
  19. package/dist/sdk-types/extensions/index.d.ts +6 -2
  20. package/dist/sdk-types/extensions/index.d.ts.map +1 -1
  21. package/dist/tsconfig.build.tsbuildinfo +1 -1
  22. package/package.json +3 -3
  23. package/dist/extensibility-script-build-tools-alpha.d.ts +0 -19
  24. package/dist/extensibility-script-build-tools-beta.d.ts +0 -19
  25. package/dist/extensibility-script-build-tools-internal.d.ts +0 -93
  26. package/dist/extensibility-script-build-tools-public.d.ts +0 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/extensibility-script-build-tools",
3
- "version": "1.5.4",
3
+ "version": "1.5.7",
4
4
  "description": "ESBuild plugin for injecting platform dispatch into Stripe extension scripts",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "esbuild": "^0.25.0",
30
- "@stripe/extensibility-jsonschema-tools": "0.6.3",
31
- "@stripe/extensibility-sdk": "0.22.2"
30
+ "@stripe/extensibility-jsonschema-tools": "0.6.6",
31
+ "@stripe/extensibility-sdk": "0.24.1"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "esbuild": "^0.25.0"
@@ -1,19 +0,0 @@
1
- import * as esbuild from 'esbuild';
2
-
3
- /* Excluded from this release type: _analyzeForDispatch */
4
-
5
- declare const _brand: unique symbol;
6
-
7
- /* Excluded from this release type: _BuildSystemError */
8
-
9
- /* Excluded from this release type: _BuildUserError */
10
-
11
- /* Excluded from this release type: _createPlatformDispatch */
12
-
13
- /* Excluded from this release type: _createPlatformDispatchPlugin */
14
-
15
- /* Excluded from this release type: _DISPATCH_TABLE_EXPORT */
16
-
17
- /* Excluded from this release type: _DispatchAnalysis */
18
-
19
- export { }
@@ -1,19 +0,0 @@
1
- import * as esbuild from 'esbuild';
2
-
3
- /* Excluded from this release type: _analyzeForDispatch */
4
-
5
- declare const _brand: unique symbol;
6
-
7
- /* Excluded from this release type: _BuildSystemError */
8
-
9
- /* Excluded from this release type: _BuildUserError */
10
-
11
- /* Excluded from this release type: _createPlatformDispatch */
12
-
13
- /* Excluded from this release type: _createPlatformDispatchPlugin */
14
-
15
- /* Excluded from this release type: _DISPATCH_TABLE_EXPORT */
16
-
17
- /* Excluded from this release type: _DispatchAnalysis */
18
-
19
- export { }
@@ -1,93 +0,0 @@
1
- import * as esbuild from 'esbuild';
2
-
3
- /**
4
- * Analyzes the extension entry point to determine if a full platform dispatch
5
- * shim can be built. Returns opaque analysis data when all conditions are met:
6
- *
7
- * - The entry point has a named default export
8
- * - The export implements a recognised extension interface
9
- * - The installed SDK version provides `$platformWrap*` factories
10
- *
11
- * Returns `null` if any condition is not met (old SDK, unrecognised interface,
12
- * no named default export, or non-extension script). The caller should treat
13
- * `null` as "build without the plugin".
14
- *
15
- * Throws `_BuildUserError` if a reserved identifier collision is detected in
16
- * the source (only checked when a shim would otherwise be installed).
17
- * @internal
18
- */
19
- export declare function _analyzeForDispatch(entryPoint: string): _DispatchAnalysis | null;
20
-
21
- declare const _brand: unique symbol;
22
-
23
- /**
24
- * Wraps an unexpected error caught by the platform dispatch plugin. Indicates
25
- * a bug in the plugin or an unanticipated environment condition, not a problem
26
- * with the extension author's code.
27
- * @internal
28
- */
29
- export declare class _BuildSystemError extends Error {
30
- /** The original error that triggered this system error. */
31
- readonly cause: unknown;
32
- /** Error class name, overridden for stack trace readability. */
33
- name: string;
34
- constructor(message: string,
35
- /** The original error that triggered this system error. */
36
- cause: unknown);
37
- }
38
-
39
- /**
40
- * Thrown when the user's extension source contains a problem that prevents
41
- * the platform dispatch plugin from processing it. The message is directly
42
- * actionable by the extension author.
43
- * @internal
44
- */
45
- export declare class _BuildUserError extends Error {
46
- /** Error class name, overridden for stack trace readability. */
47
- name: string;
48
- }
49
-
50
- /**
51
- * Creates a platform dispatch invoker from a bundled extension module.
52
- *
53
- * Reads `mod['__stripe_platform_dispatch__'].dispatch` and returns a callable
54
- * that forwards to it.
55
- *
56
- * Returns `null` only if the dispatch table export is entirely absent —
57
- * meaning the module was not built with the platform dispatch plugin at all.
58
- * When the plugin was used, the table is always present (even for entry points
59
- * with no recognised extension interface), so callers can use `null` as an
60
- * unambiguous "plugin not run" signal.
61
- * @internal
62
- */
63
- export declare function _createPlatformDispatch(mod: Record<string, unknown>): ((exportName: string, methodName: string, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown) | null;
64
-
65
- /**
66
- * Creates an esbuild plugin that appends a proxy dispatch table export
67
- * (`__stripe_platform_dispatch__`) to the extension entry point.
68
- *
69
- * Requires pre-computed analysis from `_analyzeForDispatch`. The plugin uses
70
- * the cached source and descriptor data directly, avoiding redundant file
71
- * reads and SDK introspection during the build.
72
- * @internal
73
- */
74
- export declare function _createPlatformDispatchPlugin(analysis: _DispatchAnalysis): esbuild.Plugin;
75
-
76
- /**
77
- * Name of the dispatch table export injected by the platform dispatch plugin.
78
- * @internal
79
- */
80
- export declare const _DISPATCH_TABLE_EXPORT = "__stripe_platform_dispatch__";
81
-
82
- /**
83
- * Pre-computed analysis result from `_analyzeForDispatch`. Treat as opaque —
84
- * pass directly to `_createPlatformDispatchPlugin` without inspecting or
85
- * constructing.
86
- * @internal
87
- */
88
- export declare interface _DispatchAnalysis {
89
- /** Nominal brand that prevents construction outside this module. */
90
- readonly [_brand]: never;
91
- }
92
-
93
- export { }
@@ -1,19 +0,0 @@
1
- import * as esbuild from 'esbuild';
2
-
3
- /* Excluded from this release type: _analyzeForDispatch */
4
-
5
- declare const _brand: unique symbol;
6
-
7
- /* Excluded from this release type: _BuildSystemError */
8
-
9
- /* Excluded from this release type: _BuildUserError */
10
-
11
- /* Excluded from this release type: _createPlatformDispatch */
12
-
13
- /* Excluded from this release type: _createPlatformDispatchPlugin */
14
-
15
- /* Excluded from this release type: _DISPATCH_TABLE_EXPORT */
16
-
17
- /* Excluded from this release type: _DispatchAnalysis */
18
-
19
- export { }