@stripe/extensibility-dev-tools 0.23.5 → 0.24.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 (62) hide show
  1. package/README.md +28 -0
  2. package/dist/bin/build-custom-object-definitions.cjs +42 -36
  3. package/dist/bin/build-custom-object-definitions.js +42 -36
  4. package/dist/bin/create-upload-image.cjs +42 -36
  5. package/dist/bin/create-upload-image.js +42 -36
  6. package/dist/bin/dev-tools-rpc.cjs +42 -31
  7. package/dist/bin/dev-tools-rpc.js +42 -31
  8. package/dist/bin/gen-workspace.cjs +42 -31
  9. package/dist/bin/gen-workspace.js +42 -31
  10. package/dist/bin/template-info.cjs +28 -30
  11. package/dist/bin/template-info.js +28 -30
  12. package/dist/custom-objects/to-proto-json.d.ts +2 -1
  13. package/dist/custom-objects/to-proto-json.d.ts.map +1 -1
  14. package/dist/index.cjs +42 -31
  15. package/dist/index.js +42 -31
  16. package/dist/templates/extensions/base.d.ts +1 -1
  17. package/dist/templates/extensions/base.d.ts.map +1 -1
  18. package/dist/templates/extensions/core.workflows.custom_action.d.ts.map +1 -1
  19. package/dist/templates/index.cjs +42 -31
  20. package/dist/templates/index.js +42 -31
  21. package/dist/templates/root/index.d.ts.map +1 -1
  22. package/dist/tsconfig.build.tsbuildinfo +1 -1
  23. package/dist/workspace/index.cjs +42 -31
  24. package/dist/workspace/index.js +42 -31
  25. package/package.json +4 -4
  26. package/templates/extensions/billing.bill.discount_calculation/index.ts +2 -3
  27. package/templates/extensions/billing.customer_balance_application/index.test.ts +5 -5
  28. package/templates/extensions/billing.customer_balance_application/index.ts +4 -4
  29. package/templates/extensions/billing.invoice_collection_setting/index.ts +2 -2
  30. package/templates/extensions/billing.prorations/index.ts +2 -2
  31. package/templates/extensions/billing.recurring_billing_item_handling/index.ts +2 -2
  32. package/templates/extensions/core.workflows.custom_action/index.ts +2 -3
  33. package/templates/extensions/extend.workflows.custom_action/index.ts +2 -3
  34. package/templates/root/custom-objects/{package.json → package.json.mustache} +4 -4
  35. package/dist/extensibility-dev-tools-alpha.d.ts +0 -199
  36. package/dist/extensibility-dev-tools-beta.d.ts +0 -199
  37. package/dist/extensibility-dev-tools-dependencies-alpha.d.ts +0 -51
  38. package/dist/extensibility-dev-tools-dependencies-beta.d.ts +0 -51
  39. package/dist/extensibility-dev-tools-dependencies-internal.d.ts +0 -372
  40. package/dist/extensibility-dev-tools-dependencies-public.d.ts +0 -51
  41. package/dist/extensibility-dev-tools-internal.d.ts +0 -1722
  42. package/dist/extensibility-dev-tools-jsonschema-tools-alpha.d.ts +0 -57
  43. package/dist/extensibility-dev-tools-jsonschema-tools-beta.d.ts +0 -57
  44. package/dist/extensibility-dev-tools-jsonschema-tools-internal.d.ts +0 -123
  45. package/dist/extensibility-dev-tools-jsonschema-tools-public.d.ts +0 -57
  46. package/dist/extensibility-dev-tools-manifest-alpha.d.ts +0 -31
  47. package/dist/extensibility-dev-tools-manifest-beta.d.ts +0 -31
  48. package/dist/extensibility-dev-tools-manifest-internal.d.ts +0 -461
  49. package/dist/extensibility-dev-tools-manifest-public.d.ts +0 -31
  50. package/dist/extensibility-dev-tools-public.d.ts +0 -199
  51. package/dist/extensibility-dev-tools-schemas-alpha.d.ts +0 -9
  52. package/dist/extensibility-dev-tools-schemas-beta.d.ts +0 -9
  53. package/dist/extensibility-dev-tools-schemas-internal.d.ts +0 -41
  54. package/dist/extensibility-dev-tools-schemas-public.d.ts +0 -9
  55. package/dist/extensibility-dev-tools-templates-alpha.d.ts +0 -67
  56. package/dist/extensibility-dev-tools-templates-beta.d.ts +0 -67
  57. package/dist/extensibility-dev-tools-templates-internal.d.ts +0 -554
  58. package/dist/extensibility-dev-tools-templates-public.d.ts +0 -67
  59. package/dist/extensibility-dev-tools-workspace-alpha.d.ts +0 -51
  60. package/dist/extensibility-dev-tools-workspace-beta.d.ts +0 -51
  61. package/dist/extensibility-dev-tools-workspace-internal.d.ts +0 -410
  62. package/dist/extensibility-dev-tools-workspace-public.d.ts +0 -51
@@ -50,11 +50,10 @@ describe('MyDiscountCalculation', () => {
50
50
  },
51
51
  {
52
52
  path: "extensions/billing.bill.discount_calculation/index.ts",
53
- content: `import type { Billing } from '@stripe/extensibility-sdk/extensions';
54
- import type { Context } from '@stripe/extensibility-sdk/extensions';
53
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
55
54
 
56
55
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
57
- interface MyDiscountCalculationConfig extends Record<string, unknown> {}
56
+ interface MyDiscountCalculationConfig {}
58
57
 
59
58
  export default class MyDiscountCalculation implements Billing.Bill
60
59
  .DiscountCalculation<MyDiscountCalculationConfig> {
@@ -76,32 +75,32 @@ export default class MyDiscountCalculation implements Billing.Bill
76
75
  path: "extensions/billing.customer_balance_application/index.test.ts",
77
76
  content: `import { beforeEach, describe, it, expect } from 'vitest';
78
77
 
79
- import MyCustomerBalanceApplication from './index.js';
78
+ import MyBalanceApp from './index.js';
80
79
 
81
- describe('MyCustomerBalanceApplication', () => {
82
- let instance: MyCustomerBalanceApplication;
80
+ describe('MyBalanceApp', () => {
81
+ let instance: MyBalanceApp;
83
82
 
84
83
  beforeEach(() => {
85
- instance = new MyCustomerBalanceApplication();
84
+ instance = new MyBalanceApp();
86
85
  });
87
86
 
88
87
  it('should be constructable', () => {
89
- expect(instance).toBeInstanceOf(MyCustomerBalanceApplication);
88
+ expect(instance).toBeInstanceOf(MyBalanceApp);
90
89
  });
91
90
  });
92
91
  `
93
92
  },
94
93
  {
95
94
  path: "extensions/billing.customer_balance_application/index.ts",
96
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
95
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
97
96
 
98
97
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
99
- interface MyCustomerBalanceApplicationConfig extends Record<string, unknown> {}
98
+ interface MyBalanceAppConfig {}
100
99
 
101
- export default class MyCustomerBalanceApplication implements Billing.CustomerBalanceApplication<MyCustomerBalanceApplicationConfig> {
100
+ export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
102
101
  computeAppliedCustomerBalance(
103
102
  request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
104
- _config: MyCustomerBalanceApplicationConfig,
103
+ _config: MyBalanceAppConfig,
105
104
  _context: Context
106
105
  ) {
107
106
  // TODO: implement your customer balance logic here
@@ -134,10 +133,10 @@ describe('MyInvoiceCollectionSetting', () => {
134
133
  },
135
134
  {
136
135
  path: "extensions/billing.invoice_collection_setting/index.ts",
137
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
136
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
138
137
 
139
138
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
140
- interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
139
+ interface MyInvoiceCollectionSettingConfig {}
141
140
 
142
141
  export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
143
142
  collectionOverride(
@@ -173,10 +172,10 @@ describe('MyProrations', () => {
173
172
  },
174
173
  {
175
174
  path: "extensions/billing.prorations/index.ts",
176
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
175
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
177
176
 
178
177
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
179
- interface MyProrationsConfig extends Record<string, unknown> {}
178
+ interface MyProrationsConfig {}
180
179
 
181
180
  export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
182
181
  prorateItems(
@@ -214,10 +213,10 @@ describe('MyRecurringBillingItemHandling', () => {
214
213
  },
215
214
  {
216
215
  path: "extensions/billing.recurring_billing_item_handling/index.ts",
217
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
216
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
218
217
 
219
218
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
220
- interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
219
+ interface MyRecurringBillingItemHandlingConfig {}
221
220
 
222
221
  export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
223
222
  beforeItemCreation(
@@ -464,11 +463,10 @@ describe('MyCustomAction', () => {
464
463
  },
465
464
  {
466
465
  path: "extensions/core.workflows.custom_action/index.ts",
467
- content: `import type { Core } from '@stripe/extensibility-sdk/extensions';
468
- import type { Context } from '@stripe/extensibility-sdk/extensions';
466
+ content: `import type { Core, Context } from '@stripe/extensibility-sdk';
469
467
 
470
468
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
471
- interface MyCustomActionConfig extends Record<string, unknown> {}
469
+ interface MyCustomActionConfig {}
472
470
 
473
471
  export default class MyCustomAction implements Core.Workflows
474
472
  .CustomAction<MyCustomActionConfig> {
@@ -528,11 +526,10 @@ describe('MyCustomAction', () => {
528
526
  },
529
527
  {
530
528
  path: "extensions/extend.workflows.custom_action/index.ts",
531
- content: `import type { Extend } from '@stripe/extensibility-sdk/extensions';
532
- import type { Context } from '@stripe/extensibility-sdk/extensions';
529
+ content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
533
530
 
534
531
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
535
- interface MyCustomActionConfig extends Record<string, unknown> {}
532
+ interface MyCustomActionConfig {}
536
533
 
537
534
  export default class MyCustomAction implements Extend.Workflows
538
535
  .CustomAction<MyCustomActionConfig> {
@@ -619,7 +616,7 @@ generated
619
616
  `
620
617
  },
621
618
  {
622
- path: "root/custom-objects/package.json",
619
+ path: "root/custom-objects/package.json.mustache",
623
620
  content: `{
624
621
  "name": "custom-objects",
625
622
  "type": "module",
@@ -632,12 +629,12 @@ generated
632
629
  "test": "vitest run"
633
630
  },
634
631
  "dependencies": {
635
- "@stripe/extensibility-custom-objects": "0.7.4",
636
- "@stripe/extensibility-sdk": "0.22.4"
632
+ "@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
633
+ "@stripe/extensibility-sdk": "{{ sdkVersion }}"
637
634
  },
638
635
  "devDependencies": {
639
- "@stripe/extensibility-custom-objects-tools": "0.40.0",
640
- "@stripe/extensibility-test-helpers": "0.2.7"
636
+ "@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
637
+ "@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
641
638
  }
642
639
  }
643
640
  `
@@ -994,7 +991,7 @@ function _devNpmDep(name, version) {
994
991
  import { _workspaceVersion } from "@stripe/extensibility-tool-utils";
995
992
  var SDK_PACKAGE_NAME = "@stripe/extensibility-sdk";
996
993
  var LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
997
- var LANGUAGE_SERVER_PACKAGE_VERSION = "^0.2.0";
994
+ var LANGUAGE_SERVER_PACKAGE_VERSION = `^${_workspaceVersion(LANGUAGE_SERVER_PACKAGE_NAME)}`;
998
995
  function _createExtensionEslintConfigFile(params, context) {
999
996
  const { id, extensionInterfaceId } = params;
1000
997
  const { fs: fs2 } = context;
@@ -1056,6 +1053,7 @@ function _createBaseOutput(params, context) {
1056
1053
  // src/templates/extensions/core.workflows.custom_action.ts
1057
1054
  var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
1058
1055
  var customActionTemplate = {
1056
+ deprecated: true,
1059
1057
  methods: {
1060
1058
  execute: { implementation_types: ["script", "remote-function"] },
1061
1059
  get_form_state: { implementation_types: ["script", "remote-function"] }
@@ -11,7 +11,8 @@ import type { UpsertObjectDefinitionRequest } from './generated/proto/custom_obj
11
11
  *
12
12
  * @internal
13
13
  */
14
- export declare function toUpsertRequestJson(buildArtifact: CustomObjectBuildResult): Omit<UpsertObjectDefinitionRequest, 'apiActions'> & {
14
+ export declare function toUpsertRequestJson(buildArtifact: CustomObjectBuildResult): Omit<UpsertObjectDefinitionRequest, 'apiActions' | 'properties'> & {
15
15
  apiActions: Record<string, Record<string, unknown>>;
16
+ properties: Record<string, Record<string, unknown>>;
16
17
  };
17
18
  //# sourceMappingURL=to-proto-json.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"to-proto-json.d.ts","sourceRoot":"","sources":["../../src/custom-objects/to-proto-json.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uFAAuF,CAAC;AAY3I;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,uBAAuB,GAAG,IAAI,CAC/E,6BAA6B,EAC7B,YAAY,CACb,GAAG;IACF,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD,CAgBA"}
1
+ {"version":3,"file":"to-proto-json.d.ts","sourceRoot":"","sources":["../../src/custom-objects/to-proto-json.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uFAAuF,CAAC;AAO3I;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,uBAAuB,GAAG,IAAI,CAC/E,6BAA6B,EAC7B,YAAY,GAAG,YAAY,CAC5B,GAAG;IACF,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACpD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD,CAgBA"}
package/dist/index.cjs CHANGED
@@ -91,11 +91,10 @@ describe('MyDiscountCalculation', () => {
91
91
  },
92
92
  {
93
93
  path: "extensions/billing.bill.discount_calculation/index.ts",
94
- content: `import type { Billing } from '@stripe/extensibility-sdk/extensions';
95
- import type { Context } from '@stripe/extensibility-sdk/extensions';
94
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
96
95
 
97
96
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
98
- interface MyDiscountCalculationConfig extends Record<string, unknown> {}
97
+ interface MyDiscountCalculationConfig {}
99
98
 
100
99
  export default class MyDiscountCalculation implements Billing.Bill
101
100
  .DiscountCalculation<MyDiscountCalculationConfig> {
@@ -117,32 +116,32 @@ export default class MyDiscountCalculation implements Billing.Bill
117
116
  path: "extensions/billing.customer_balance_application/index.test.ts",
118
117
  content: `import { beforeEach, describe, it, expect } from 'vitest';
119
118
 
120
- import MyCustomerBalanceApplication from './index.js';
119
+ import MyBalanceApp from './index.js';
121
120
 
122
- describe('MyCustomerBalanceApplication', () => {
123
- let instance: MyCustomerBalanceApplication;
121
+ describe('MyBalanceApp', () => {
122
+ let instance: MyBalanceApp;
124
123
 
125
124
  beforeEach(() => {
126
- instance = new MyCustomerBalanceApplication();
125
+ instance = new MyBalanceApp();
127
126
  });
128
127
 
129
128
  it('should be constructable', () => {
130
- expect(instance).toBeInstanceOf(MyCustomerBalanceApplication);
129
+ expect(instance).toBeInstanceOf(MyBalanceApp);
131
130
  });
132
131
  });
133
132
  `
134
133
  },
135
134
  {
136
135
  path: "extensions/billing.customer_balance_application/index.ts",
137
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
136
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
138
137
 
139
138
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
140
- interface MyCustomerBalanceApplicationConfig extends Record<string, unknown> {}
139
+ interface MyBalanceAppConfig {}
141
140
 
142
- export default class MyCustomerBalanceApplication implements Billing.CustomerBalanceApplication<MyCustomerBalanceApplicationConfig> {
141
+ export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
143
142
  computeAppliedCustomerBalance(
144
143
  request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
145
- _config: MyCustomerBalanceApplicationConfig,
144
+ _config: MyBalanceAppConfig,
146
145
  _context: Context
147
146
  ) {
148
147
  // TODO: implement your customer balance logic here
@@ -175,10 +174,10 @@ describe('MyInvoiceCollectionSetting', () => {
175
174
  },
176
175
  {
177
176
  path: "extensions/billing.invoice_collection_setting/index.ts",
178
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
177
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
179
178
 
180
179
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
181
- interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
180
+ interface MyInvoiceCollectionSettingConfig {}
182
181
 
183
182
  export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
184
183
  collectionOverride(
@@ -214,10 +213,10 @@ describe('MyProrations', () => {
214
213
  },
215
214
  {
216
215
  path: "extensions/billing.prorations/index.ts",
217
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
216
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
218
217
 
219
218
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
220
- interface MyProrationsConfig extends Record<string, unknown> {}
219
+ interface MyProrationsConfig {}
221
220
 
222
221
  export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
223
222
  prorateItems(
@@ -255,10 +254,10 @@ describe('MyRecurringBillingItemHandling', () => {
255
254
  },
256
255
  {
257
256
  path: "extensions/billing.recurring_billing_item_handling/index.ts",
258
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
257
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
259
258
 
260
259
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
261
- interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
260
+ interface MyRecurringBillingItemHandlingConfig {}
262
261
 
263
262
  export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
264
263
  beforeItemCreation(
@@ -505,11 +504,10 @@ describe('MyCustomAction', () => {
505
504
  },
506
505
  {
507
506
  path: "extensions/core.workflows.custom_action/index.ts",
508
- content: `import type { Core } from '@stripe/extensibility-sdk/extensions';
509
- import type { Context } from '@stripe/extensibility-sdk/extensions';
507
+ content: `import type { Core, Context } from '@stripe/extensibility-sdk';
510
508
 
511
509
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
512
- interface MyCustomActionConfig extends Record<string, unknown> {}
510
+ interface MyCustomActionConfig {}
513
511
 
514
512
  export default class MyCustomAction implements Core.Workflows
515
513
  .CustomAction<MyCustomActionConfig> {
@@ -569,11 +567,10 @@ describe('MyCustomAction', () => {
569
567
  },
570
568
  {
571
569
  path: "extensions/extend.workflows.custom_action/index.ts",
572
- content: `import type { Extend } from '@stripe/extensibility-sdk/extensions';
573
- import type { Context } from '@stripe/extensibility-sdk/extensions';
570
+ content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
574
571
 
575
572
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
576
- interface MyCustomActionConfig extends Record<string, unknown> {}
573
+ interface MyCustomActionConfig {}
577
574
 
578
575
  export default class MyCustomAction implements Extend.Workflows
579
576
  .CustomAction<MyCustomActionConfig> {
@@ -660,7 +657,7 @@ generated
660
657
  `
661
658
  },
662
659
  {
663
- path: "root/custom-objects/package.json",
660
+ path: "root/custom-objects/package.json.mustache",
664
661
  content: `{
665
662
  "name": "custom-objects",
666
663
  "type": "module",
@@ -673,12 +670,12 @@ generated
673
670
  "test": "vitest run"
674
671
  },
675
672
  "dependencies": {
676
- "@stripe/extensibility-custom-objects": "0.7.4",
677
- "@stripe/extensibility-sdk": "0.22.4"
673
+ "@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
674
+ "@stripe/extensibility-sdk": "{{ sdkVersion }}"
678
675
  },
679
676
  "devDependencies": {
680
- "@stripe/extensibility-custom-objects-tools": "0.40.0",
681
- "@stripe/extensibility-test-helpers": "0.2.7"
677
+ "@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
678
+ "@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
682
679
  }
683
680
  }
684
681
  `
@@ -2199,7 +2196,7 @@ var _DependencyManager = class {
2199
2196
  var import_extensibility_tool_utils7 = require("@stripe/extensibility-tool-utils");
2200
2197
  var SDK_PACKAGE_NAME = "@stripe/extensibility-sdk";
2201
2198
  var LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
2202
- var LANGUAGE_SERVER_PACKAGE_VERSION = "^0.2.0";
2199
+ var LANGUAGE_SERVER_PACKAGE_VERSION = `^${(0, import_extensibility_tool_utils7._workspaceVersion)(LANGUAGE_SERVER_PACKAGE_NAME)}`;
2203
2200
  function _createExtensionEslintConfigFile(params, context) {
2204
2201
  const { id, extensionInterfaceId } = params;
2205
2202
  const { fs: fs2 } = context;
@@ -2261,6 +2258,7 @@ function _createBaseOutput(params, context) {
2261
2258
  // src/templates/extensions/core.workflows.custom_action.ts
2262
2259
  var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
2263
2260
  var customActionTemplate = {
2261
+ deprecated: true,
2264
2262
  methods: {
2265
2263
  execute: { implementation_types: ["script", "remote-function"] },
2266
2264
  get_form_state: { implementation_types: ["script", "remote-function"] }
@@ -2719,7 +2717,20 @@ var _rootWorkspaceTemplate = {
2719
2717
  },
2720
2718
  {
2721
2719
  path: "custom-objects/package.json",
2722
- content: fs2.textFile("custom-objects/package.json"),
2720
+ content: fs2.mustache(
2721
+ {
2722
+ customObjectsVersion: (0, import_extensibility_tool_utils8._workspaceVersion)(
2723
+ "@stripe/extensibility-custom-objects"
2724
+ ),
2725
+ sdkVersion: (0, import_extensibility_tool_utils8._workspaceVersion)("@stripe/extensibility-sdk"),
2726
+ customObjectsToolsVersion: (0, import_extensibility_tool_utils8._workspaceVersion)(
2727
+ "@stripe/extensibility-custom-objects-tools"
2728
+ ),
2729
+ testHelpersVersion: (0, import_extensibility_tool_utils8._workspaceVersion)("@stripe/extensibility-test-helpers")
2730
+ },
2731
+ "custom-objects",
2732
+ "package.json.mustache"
2733
+ ),
2723
2734
  precious: true
2724
2735
  },
2725
2736
  {
package/dist/index.js CHANGED
@@ -27,11 +27,10 @@ describe('MyDiscountCalculation', () => {
27
27
  },
28
28
  {
29
29
  path: "extensions/billing.bill.discount_calculation/index.ts",
30
- content: `import type { Billing } from '@stripe/extensibility-sdk/extensions';
31
- import type { Context } from '@stripe/extensibility-sdk/extensions';
30
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
32
31
 
33
32
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
34
- interface MyDiscountCalculationConfig extends Record<string, unknown> {}
33
+ interface MyDiscountCalculationConfig {}
35
34
 
36
35
  export default class MyDiscountCalculation implements Billing.Bill
37
36
  .DiscountCalculation<MyDiscountCalculationConfig> {
@@ -53,32 +52,32 @@ export default class MyDiscountCalculation implements Billing.Bill
53
52
  path: "extensions/billing.customer_balance_application/index.test.ts",
54
53
  content: `import { beforeEach, describe, it, expect } from 'vitest';
55
54
 
56
- import MyCustomerBalanceApplication from './index.js';
55
+ import MyBalanceApp from './index.js';
57
56
 
58
- describe('MyCustomerBalanceApplication', () => {
59
- let instance: MyCustomerBalanceApplication;
57
+ describe('MyBalanceApp', () => {
58
+ let instance: MyBalanceApp;
60
59
 
61
60
  beforeEach(() => {
62
- instance = new MyCustomerBalanceApplication();
61
+ instance = new MyBalanceApp();
63
62
  });
64
63
 
65
64
  it('should be constructable', () => {
66
- expect(instance).toBeInstanceOf(MyCustomerBalanceApplication);
65
+ expect(instance).toBeInstanceOf(MyBalanceApp);
67
66
  });
68
67
  });
69
68
  `
70
69
  },
71
70
  {
72
71
  path: "extensions/billing.customer_balance_application/index.ts",
73
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
72
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
74
73
 
75
74
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
76
- interface MyCustomerBalanceApplicationConfig extends Record<string, unknown> {}
75
+ interface MyBalanceAppConfig {}
77
76
 
78
- export default class MyCustomerBalanceApplication implements Billing.CustomerBalanceApplication<MyCustomerBalanceApplicationConfig> {
77
+ export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
79
78
  computeAppliedCustomerBalance(
80
79
  request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
81
- _config: MyCustomerBalanceApplicationConfig,
80
+ _config: MyBalanceAppConfig,
82
81
  _context: Context
83
82
  ) {
84
83
  // TODO: implement your customer balance logic here
@@ -111,10 +110,10 @@ describe('MyInvoiceCollectionSetting', () => {
111
110
  },
112
111
  {
113
112
  path: "extensions/billing.invoice_collection_setting/index.ts",
114
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
113
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
115
114
 
116
115
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
117
- interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
116
+ interface MyInvoiceCollectionSettingConfig {}
118
117
 
119
118
  export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
120
119
  collectionOverride(
@@ -150,10 +149,10 @@ describe('MyProrations', () => {
150
149
  },
151
150
  {
152
151
  path: "extensions/billing.prorations/index.ts",
153
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
152
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
154
153
 
155
154
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
156
- interface MyProrationsConfig extends Record<string, unknown> {}
155
+ interface MyProrationsConfig {}
157
156
 
158
157
  export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
159
158
  prorateItems(
@@ -191,10 +190,10 @@ describe('MyRecurringBillingItemHandling', () => {
191
190
  },
192
191
  {
193
192
  path: "extensions/billing.recurring_billing_item_handling/index.ts",
194
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
193
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
195
194
 
196
195
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
197
- interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
196
+ interface MyRecurringBillingItemHandlingConfig {}
198
197
 
199
198
  export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
200
199
  beforeItemCreation(
@@ -441,11 +440,10 @@ describe('MyCustomAction', () => {
441
440
  },
442
441
  {
443
442
  path: "extensions/core.workflows.custom_action/index.ts",
444
- content: `import type { Core } from '@stripe/extensibility-sdk/extensions';
445
- import type { Context } from '@stripe/extensibility-sdk/extensions';
443
+ content: `import type { Core, Context } from '@stripe/extensibility-sdk';
446
444
 
447
445
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
448
- interface MyCustomActionConfig extends Record<string, unknown> {}
446
+ interface MyCustomActionConfig {}
449
447
 
450
448
  export default class MyCustomAction implements Core.Workflows
451
449
  .CustomAction<MyCustomActionConfig> {
@@ -505,11 +503,10 @@ describe('MyCustomAction', () => {
505
503
  },
506
504
  {
507
505
  path: "extensions/extend.workflows.custom_action/index.ts",
508
- content: `import type { Extend } from '@stripe/extensibility-sdk/extensions';
509
- import type { Context } from '@stripe/extensibility-sdk/extensions';
506
+ content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
510
507
 
511
508
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
512
- interface MyCustomActionConfig extends Record<string, unknown> {}
509
+ interface MyCustomActionConfig {}
513
510
 
514
511
  export default class MyCustomAction implements Extend.Workflows
515
512
  .CustomAction<MyCustomActionConfig> {
@@ -596,7 +593,7 @@ generated
596
593
  `
597
594
  },
598
595
  {
599
- path: "root/custom-objects/package.json",
596
+ path: "root/custom-objects/package.json.mustache",
600
597
  content: `{
601
598
  "name": "custom-objects",
602
599
  "type": "module",
@@ -609,12 +606,12 @@ generated
609
606
  "test": "vitest run"
610
607
  },
611
608
  "dependencies": {
612
- "@stripe/extensibility-custom-objects": "0.7.4",
613
- "@stripe/extensibility-sdk": "0.22.4"
609
+ "@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
610
+ "@stripe/extensibility-sdk": "{{ sdkVersion }}"
614
611
  },
615
612
  "devDependencies": {
616
- "@stripe/extensibility-custom-objects-tools": "0.40.0",
617
- "@stripe/extensibility-test-helpers": "0.2.7"
613
+ "@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
614
+ "@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
618
615
  }
619
616
  }
620
617
  `
@@ -2139,7 +2136,7 @@ var _DependencyManager = class {
2139
2136
  import { _workspaceVersion } from "@stripe/extensibility-tool-utils";
2140
2137
  var SDK_PACKAGE_NAME = "@stripe/extensibility-sdk";
2141
2138
  var LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
2142
- var LANGUAGE_SERVER_PACKAGE_VERSION = "^0.2.0";
2139
+ var LANGUAGE_SERVER_PACKAGE_VERSION = `^${_workspaceVersion(LANGUAGE_SERVER_PACKAGE_NAME)}`;
2143
2140
  function _createExtensionEslintConfigFile(params, context) {
2144
2141
  const { id, extensionInterfaceId } = params;
2145
2142
  const { fs: fs2 } = context;
@@ -2201,6 +2198,7 @@ function _createBaseOutput(params, context) {
2201
2198
  // src/templates/extensions/core.workflows.custom_action.ts
2202
2199
  var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
2203
2200
  var customActionTemplate = {
2201
+ deprecated: true,
2204
2202
  methods: {
2205
2203
  execute: { implementation_types: ["script", "remote-function"] },
2206
2204
  get_form_state: { implementation_types: ["script", "remote-function"] }
@@ -2659,7 +2657,20 @@ var _rootWorkspaceTemplate = {
2659
2657
  },
2660
2658
  {
2661
2659
  path: "custom-objects/package.json",
2662
- content: fs2.textFile("custom-objects/package.json"),
2660
+ content: fs2.mustache(
2661
+ {
2662
+ customObjectsVersion: _workspaceVersion2(
2663
+ "@stripe/extensibility-custom-objects"
2664
+ ),
2665
+ sdkVersion: _workspaceVersion2("@stripe/extensibility-sdk"),
2666
+ customObjectsToolsVersion: _workspaceVersion2(
2667
+ "@stripe/extensibility-custom-objects-tools"
2668
+ ),
2669
+ testHelpersVersion: _workspaceVersion2("@stripe/extensibility-test-helpers")
2670
+ },
2671
+ "custom-objects",
2672
+ "package.json.mustache"
2673
+ ),
2663
2674
  precious: true
2664
2675
  },
2665
2676
  {
@@ -3,7 +3,7 @@ import type { _GeneratedFile, _TemplateContext } from '../types.js';
3
3
  /** @internal */
4
4
  export declare const LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
5
5
  /** @internal */
6
- export declare const LANGUAGE_SERVER_PACKAGE_VERSION = "^0.2.0";
6
+ export declare const LANGUAGE_SERVER_PACKAGE_VERSION: string;
7
7
  /** @internal */
8
8
  export type _ExecutionProfile = 'restricted' | 'egress';
9
9
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/templates/extensions/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMpE,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,0CAA0C,CAAC;AAEpF,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,WAAW,CAAC;AAExD,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAExD,gBAAgB;AAChB,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,iBAAiB,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GAAG;IAAE,oBAAoB,EAAE,MAAM,CAAA;CAAE,EACvE,OAAO,EAAE,gBAAgB,GACxB,cAAc,CAahB;AAED,gBAAgB;AAChB,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,gBAAgB,GACxB,wBAAwB,CA2C1B"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/templates/extensions/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMpE,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,0CAA0C,CAAC;AAEpF,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,QAAwD,CAAC;AAErG,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAExD,gBAAgB;AAChB,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,iBAAiB,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GAAG;IAAE,oBAAoB,EAAE,MAAM,CAAA;CAAE,EACvE,OAAO,EAAE,gBAAgB,GACxB,cAAc,CAahB;AAED,gBAAgB;AAChB,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,gBAAgB,GACxB,wBAAwB,CA2C1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"core.workflows.custom_action.d.ts","sourceRoot":"","sources":["../../../src/templates/extensions/core.workflows.custom_action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;;;;AA8DrD,wBAEE"}
1
+ {"version":3,"file":"core.workflows.custom_action.d.ts","sourceRoot":"","sources":["../../../src/templates/extensions/core.workflows.custom_action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;;;;AA+DrD,wBAEE"}