@stripe/extensibility-dev-tools 0.23.5 → 0.23.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 (67) hide show
  1. package/README.md +28 -0
  2. package/dist/api-surface.d.ts.map +1 -0
  3. package/dist/bin/build-custom-object-definitions.cjs +21 -24
  4. package/dist/bin/build-custom-object-definitions.js +21 -24
  5. package/dist/bin/create-upload-image.cjs +21 -24
  6. package/dist/bin/create-upload-image.js +21 -24
  7. package/dist/bin/dev-tools-rpc.cjs +35 -25
  8. package/dist/bin/dev-tools-rpc.js +35 -25
  9. package/dist/bin/gen-workspace.cjs +35 -25
  10. package/dist/bin/gen-workspace.js +35 -25
  11. package/dist/bin/template-info.cjs +21 -24
  12. package/dist/bin/template-info.js +21 -24
  13. package/dist/dependencies/index.d.ts +7 -7
  14. package/dist/index.cjs +35 -25
  15. package/dist/index.js +35 -25
  16. package/dist/manifest/manifest-v2.d.ts +3 -8
  17. package/dist/templates/diff-viewer/types.d.ts +2 -2
  18. package/dist/templates/extensions/base.d.ts +3 -5
  19. package/dist/templates/extensions/base.d.ts.map +1 -1
  20. package/dist/templates/extensions/types.d.ts +3 -9
  21. package/dist/templates/file-writer.d.ts +2 -2
  22. package/dist/templates/index.cjs +35 -25
  23. package/dist/templates/index.js +35 -25
  24. package/dist/templates/root/index.d.ts +1 -1
  25. package/dist/templates/root/index.d.ts.map +1 -1
  26. package/dist/tsconfig.build.tsbuildinfo +1 -1
  27. package/dist/workspace/index.cjs +35 -25
  28. package/dist/workspace/index.d.ts +30 -34
  29. package/dist/workspace/index.js +35 -25
  30. package/package.json +4 -4
  31. package/templates/extensions/billing.bill.discount_calculation/index.ts +1 -2
  32. package/templates/extensions/billing.customer_balance_application/index.test.ts +5 -5
  33. package/templates/extensions/billing.customer_balance_application/index.ts +4 -4
  34. package/templates/extensions/billing.invoice_collection_setting/index.ts +1 -1
  35. package/templates/extensions/billing.prorations/index.ts +1 -1
  36. package/templates/extensions/billing.recurring_billing_item_handling/index.ts +1 -1
  37. package/templates/extensions/core.workflows.custom_action/index.ts +1 -2
  38. package/templates/extensions/extend.workflows.custom_action/index.ts +1 -2
  39. package/templates/root/custom-objects/{package.json → package.json.mustache} +4 -4
  40. package/dist/extensibility-dev-tools-alpha.d.ts +0 -199
  41. package/dist/extensibility-dev-tools-beta.d.ts +0 -199
  42. package/dist/extensibility-dev-tools-dependencies-alpha.d.ts +0 -51
  43. package/dist/extensibility-dev-tools-dependencies-beta.d.ts +0 -51
  44. package/dist/extensibility-dev-tools-dependencies-internal.d.ts +0 -372
  45. package/dist/extensibility-dev-tools-dependencies-public.d.ts +0 -51
  46. package/dist/extensibility-dev-tools-internal.d.ts +0 -1722
  47. package/dist/extensibility-dev-tools-jsonschema-tools-alpha.d.ts +0 -57
  48. package/dist/extensibility-dev-tools-jsonschema-tools-beta.d.ts +0 -57
  49. package/dist/extensibility-dev-tools-jsonschema-tools-internal.d.ts +0 -123
  50. package/dist/extensibility-dev-tools-jsonschema-tools-public.d.ts +0 -57
  51. package/dist/extensibility-dev-tools-manifest-alpha.d.ts +0 -31
  52. package/dist/extensibility-dev-tools-manifest-beta.d.ts +0 -31
  53. package/dist/extensibility-dev-tools-manifest-internal.d.ts +0 -461
  54. package/dist/extensibility-dev-tools-manifest-public.d.ts +0 -31
  55. package/dist/extensibility-dev-tools-public.d.ts +0 -199
  56. package/dist/extensibility-dev-tools-schemas-alpha.d.ts +0 -9
  57. package/dist/extensibility-dev-tools-schemas-beta.d.ts +0 -9
  58. package/dist/extensibility-dev-tools-schemas-internal.d.ts +0 -41
  59. package/dist/extensibility-dev-tools-schemas-public.d.ts +0 -9
  60. package/dist/extensibility-dev-tools-templates-alpha.d.ts +0 -67
  61. package/dist/extensibility-dev-tools-templates-beta.d.ts +0 -67
  62. package/dist/extensibility-dev-tools-templates-internal.d.ts +0 -554
  63. package/dist/extensibility-dev-tools-templates-public.d.ts +0 -67
  64. package/dist/extensibility-dev-tools-workspace-alpha.d.ts +0 -51
  65. package/dist/extensibility-dev-tools-workspace-beta.d.ts +0 -51
  66. package/dist/extensibility-dev-tools-workspace-internal.d.ts +0 -410
  67. package/dist/extensibility-dev-tools-workspace-public.d.ts +0 -51
@@ -125,8 +125,7 @@ describe('MyDiscountCalculation', () => {
125
125
  },
126
126
  {
127
127
  path: "extensions/billing.bill.discount_calculation/index.ts",
128
- content: `import type { Billing } from '@stripe/extensibility-sdk/extensions';
129
- import type { Context } from '@stripe/extensibility-sdk/extensions';
128
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
130
129
 
131
130
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
132
131
  interface MyDiscountCalculationConfig extends Record<string, unknown> {}
@@ -151,32 +150,32 @@ export default class MyDiscountCalculation implements Billing.Bill
151
150
  path: "extensions/billing.customer_balance_application/index.test.ts",
152
151
  content: `import { beforeEach, describe, it, expect } from 'vitest';
153
152
 
154
- import MyCustomerBalanceApplication from './index.js';
153
+ import MyBalanceApp from './index.js';
155
154
 
156
- describe('MyCustomerBalanceApplication', () => {
157
- let instance: MyCustomerBalanceApplication;
155
+ describe('MyBalanceApp', () => {
156
+ let instance: MyBalanceApp;
158
157
 
159
158
  beforeEach(() => {
160
- instance = new MyCustomerBalanceApplication();
159
+ instance = new MyBalanceApp();
161
160
  });
162
161
 
163
162
  it('should be constructable', () => {
164
- expect(instance).toBeInstanceOf(MyCustomerBalanceApplication);
163
+ expect(instance).toBeInstanceOf(MyBalanceApp);
165
164
  });
166
165
  });
167
166
  `
168
167
  },
169
168
  {
170
169
  path: "extensions/billing.customer_balance_application/index.ts",
171
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
170
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
172
171
 
173
172
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
174
- interface MyCustomerBalanceApplicationConfig extends Record<string, unknown> {}
173
+ interface MyBalanceAppConfig extends Record<string, unknown> {}
175
174
 
176
- export default class MyCustomerBalanceApplication implements Billing.CustomerBalanceApplication<MyCustomerBalanceApplicationConfig> {
175
+ export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
177
176
  computeAppliedCustomerBalance(
178
177
  request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
179
- _config: MyCustomerBalanceApplicationConfig,
178
+ _config: MyBalanceAppConfig,
180
179
  _context: Context
181
180
  ) {
182
181
  // TODO: implement your customer balance logic here
@@ -209,7 +208,7 @@ describe('MyInvoiceCollectionSetting', () => {
209
208
  },
210
209
  {
211
210
  path: "extensions/billing.invoice_collection_setting/index.ts",
212
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
211
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
213
212
 
214
213
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
215
214
  interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
@@ -248,7 +247,7 @@ describe('MyProrations', () => {
248
247
  },
249
248
  {
250
249
  path: "extensions/billing.prorations/index.ts",
251
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
250
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
252
251
 
253
252
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
254
253
  interface MyProrationsConfig extends Record<string, unknown> {}
@@ -289,7 +288,7 @@ describe('MyRecurringBillingItemHandling', () => {
289
288
  },
290
289
  {
291
290
  path: "extensions/billing.recurring_billing_item_handling/index.ts",
292
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
291
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
293
292
 
294
293
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
295
294
  interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
@@ -539,8 +538,7 @@ describe('MyCustomAction', () => {
539
538
  },
540
539
  {
541
540
  path: "extensions/core.workflows.custom_action/index.ts",
542
- content: `import type { Core } from '@stripe/extensibility-sdk/extensions';
543
- import type { Context } from '@stripe/extensibility-sdk/extensions';
541
+ content: `import type { Core, Context } from '@stripe/extensibility-sdk';
544
542
 
545
543
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
546
544
  interface MyCustomActionConfig extends Record<string, unknown> {}
@@ -603,8 +601,7 @@ describe('MyCustomAction', () => {
603
601
  },
604
602
  {
605
603
  path: "extensions/extend.workflows.custom_action/index.ts",
606
- content: `import type { Extend } from '@stripe/extensibility-sdk/extensions';
607
- import type { Context } from '@stripe/extensibility-sdk/extensions';
604
+ content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
608
605
 
609
606
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
610
607
  interface MyCustomActionConfig extends Record<string, unknown> {}
@@ -694,7 +691,7 @@ generated
694
691
  `
695
692
  },
696
693
  {
697
- path: "root/custom-objects/package.json",
694
+ path: "root/custom-objects/package.json.mustache",
698
695
  content: `{
699
696
  "name": "custom-objects",
700
697
  "type": "module",
@@ -707,12 +704,12 @@ generated
707
704
  "test": "vitest run"
708
705
  },
709
706
  "dependencies": {
710
- "@stripe/extensibility-custom-objects": "0.7.4",
711
- "@stripe/extensibility-sdk": "0.22.4"
707
+ "@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
708
+ "@stripe/extensibility-sdk": "{{ sdkVersion }}"
712
709
  },
713
710
  "devDependencies": {
714
- "@stripe/extensibility-custom-objects-tools": "0.40.0",
715
- "@stripe/extensibility-test-helpers": "0.2.7"
711
+ "@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
712
+ "@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
716
713
  }
717
714
  }
718
715
  `
@@ -1602,7 +1599,7 @@ var _DependencyManager = class {
1602
1599
  var import_extensibility_tool_utils4 = require("@stripe/extensibility-tool-utils");
1603
1600
  var SDK_PACKAGE_NAME = "@stripe/extensibility-sdk";
1604
1601
  var LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
1605
- var LANGUAGE_SERVER_PACKAGE_VERSION = "^0.2.0";
1602
+ var LANGUAGE_SERVER_PACKAGE_VERSION = `^${(0, import_extensibility_tool_utils4._workspaceVersion)(LANGUAGE_SERVER_PACKAGE_NAME)}`;
1606
1603
  function _createExtensionEslintConfigFile(params, context) {
1607
1604
  const { id, extensionInterfaceId } = params;
1608
1605
  const { fs: fs2 } = context;
@@ -3310,7 +3307,20 @@ var _rootWorkspaceTemplate = {
3310
3307
  },
3311
3308
  {
3312
3309
  path: "custom-objects/package.json",
3313
- content: fs2.textFile("custom-objects/package.json"),
3310
+ content: fs2.mustache(
3311
+ {
3312
+ customObjectsVersion: (0, import_extensibility_tool_utils10._workspaceVersion)(
3313
+ "@stripe/extensibility-custom-objects"
3314
+ ),
3315
+ sdkVersion: (0, import_extensibility_tool_utils10._workspaceVersion)("@stripe/extensibility-sdk"),
3316
+ customObjectsToolsVersion: (0, import_extensibility_tool_utils10._workspaceVersion)(
3317
+ "@stripe/extensibility-custom-objects-tools"
3318
+ ),
3319
+ testHelpersVersion: (0, import_extensibility_tool_utils10._workspaceVersion)("@stripe/extensibility-test-helpers")
3320
+ },
3321
+ "custom-objects",
3322
+ "package.json.mustache"
3323
+ ),
3314
3324
  precious: true
3315
3325
  },
3316
3326
  {
@@ -102,8 +102,7 @@ describe('MyDiscountCalculation', () => {
102
102
  },
103
103
  {
104
104
  path: "extensions/billing.bill.discount_calculation/index.ts",
105
- content: `import type { Billing } from '@stripe/extensibility-sdk/extensions';
106
- import type { Context } from '@stripe/extensibility-sdk/extensions';
105
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
107
106
 
108
107
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
109
108
  interface MyDiscountCalculationConfig extends Record<string, unknown> {}
@@ -128,32 +127,32 @@ export default class MyDiscountCalculation implements Billing.Bill
128
127
  path: "extensions/billing.customer_balance_application/index.test.ts",
129
128
  content: `import { beforeEach, describe, it, expect } from 'vitest';
130
129
 
131
- import MyCustomerBalanceApplication from './index.js';
130
+ import MyBalanceApp from './index.js';
132
131
 
133
- describe('MyCustomerBalanceApplication', () => {
134
- let instance: MyCustomerBalanceApplication;
132
+ describe('MyBalanceApp', () => {
133
+ let instance: MyBalanceApp;
135
134
 
136
135
  beforeEach(() => {
137
- instance = new MyCustomerBalanceApplication();
136
+ instance = new MyBalanceApp();
138
137
  });
139
138
 
140
139
  it('should be constructable', () => {
141
- expect(instance).toBeInstanceOf(MyCustomerBalanceApplication);
140
+ expect(instance).toBeInstanceOf(MyBalanceApp);
142
141
  });
143
142
  });
144
143
  `
145
144
  },
146
145
  {
147
146
  path: "extensions/billing.customer_balance_application/index.ts",
148
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
147
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
149
148
 
150
149
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
151
- interface MyCustomerBalanceApplicationConfig extends Record<string, unknown> {}
150
+ interface MyBalanceAppConfig extends Record<string, unknown> {}
152
151
 
153
- export default class MyCustomerBalanceApplication implements Billing.CustomerBalanceApplication<MyCustomerBalanceApplicationConfig> {
152
+ export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
154
153
  computeAppliedCustomerBalance(
155
154
  request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
156
- _config: MyCustomerBalanceApplicationConfig,
155
+ _config: MyBalanceAppConfig,
157
156
  _context: Context
158
157
  ) {
159
158
  // TODO: implement your customer balance logic here
@@ -186,7 +185,7 @@ describe('MyInvoiceCollectionSetting', () => {
186
185
  },
187
186
  {
188
187
  path: "extensions/billing.invoice_collection_setting/index.ts",
189
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
188
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
190
189
 
191
190
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
192
191
  interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
@@ -225,7 +224,7 @@ describe('MyProrations', () => {
225
224
  },
226
225
  {
227
226
  path: "extensions/billing.prorations/index.ts",
228
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
227
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
229
228
 
230
229
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
231
230
  interface MyProrationsConfig extends Record<string, unknown> {}
@@ -266,7 +265,7 @@ describe('MyRecurringBillingItemHandling', () => {
266
265
  },
267
266
  {
268
267
  path: "extensions/billing.recurring_billing_item_handling/index.ts",
269
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
268
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
270
269
 
271
270
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
272
271
  interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
@@ -516,8 +515,7 @@ describe('MyCustomAction', () => {
516
515
  },
517
516
  {
518
517
  path: "extensions/core.workflows.custom_action/index.ts",
519
- content: `import type { Core } from '@stripe/extensibility-sdk/extensions';
520
- import type { Context } from '@stripe/extensibility-sdk/extensions';
518
+ content: `import type { Core, Context } from '@stripe/extensibility-sdk';
521
519
 
522
520
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
523
521
  interface MyCustomActionConfig extends Record<string, unknown> {}
@@ -580,8 +578,7 @@ describe('MyCustomAction', () => {
580
578
  },
581
579
  {
582
580
  path: "extensions/extend.workflows.custom_action/index.ts",
583
- content: `import type { Extend } from '@stripe/extensibility-sdk/extensions';
584
- import type { Context } from '@stripe/extensibility-sdk/extensions';
581
+ content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
585
582
 
586
583
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
587
584
  interface MyCustomActionConfig extends Record<string, unknown> {}
@@ -671,7 +668,7 @@ generated
671
668
  `
672
669
  },
673
670
  {
674
- path: "root/custom-objects/package.json",
671
+ path: "root/custom-objects/package.json.mustache",
675
672
  content: `{
676
673
  "name": "custom-objects",
677
674
  "type": "module",
@@ -684,12 +681,12 @@ generated
684
681
  "test": "vitest run"
685
682
  },
686
683
  "dependencies": {
687
- "@stripe/extensibility-custom-objects": "0.7.4",
688
- "@stripe/extensibility-sdk": "0.22.4"
684
+ "@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
685
+ "@stripe/extensibility-sdk": "{{ sdkVersion }}"
689
686
  },
690
687
  "devDependencies": {
691
- "@stripe/extensibility-custom-objects-tools": "0.40.0",
692
- "@stripe/extensibility-test-helpers": "0.2.7"
688
+ "@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
689
+ "@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
693
690
  }
694
691
  }
695
692
  `
@@ -1579,7 +1576,7 @@ var _DependencyManager = class {
1579
1576
  import { _workspaceVersion } from "@stripe/extensibility-tool-utils";
1580
1577
  var SDK_PACKAGE_NAME = "@stripe/extensibility-sdk";
1581
1578
  var LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
1582
- var LANGUAGE_SERVER_PACKAGE_VERSION = "^0.2.0";
1579
+ var LANGUAGE_SERVER_PACKAGE_VERSION = `^${_workspaceVersion(LANGUAGE_SERVER_PACKAGE_NAME)}`;
1583
1580
  function _createExtensionEslintConfigFile(params, context) {
1584
1581
  const { id, extensionInterfaceId } = params;
1585
1582
  const { fs: fs2 } = context;
@@ -3300,7 +3297,20 @@ var _rootWorkspaceTemplate = {
3300
3297
  },
3301
3298
  {
3302
3299
  path: "custom-objects/package.json",
3303
- content: fs2.textFile("custom-objects/package.json"),
3300
+ content: fs2.mustache(
3301
+ {
3302
+ customObjectsVersion: _workspaceVersion2(
3303
+ "@stripe/extensibility-custom-objects"
3304
+ ),
3305
+ sdkVersion: _workspaceVersion2("@stripe/extensibility-sdk"),
3306
+ customObjectsToolsVersion: _workspaceVersion2(
3307
+ "@stripe/extensibility-custom-objects-tools"
3308
+ ),
3309
+ testHelpersVersion: _workspaceVersion2("@stripe/extensibility-test-helpers")
3310
+ },
3311
+ "custom-objects",
3312
+ "package.json.mustache"
3313
+ ),
3304
3314
  precious: true
3305
3315
  },
3306
3316
  {
@@ -1184,8 +1184,7 @@ describe('MyDiscountCalculation', () => {
1184
1184
  },
1185
1185
  {
1186
1186
  path: "extensions/billing.bill.discount_calculation/index.ts",
1187
- content: `import type { Billing } from '@stripe/extensibility-sdk/extensions';
1188
- import type { Context } from '@stripe/extensibility-sdk/extensions';
1187
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1189
1188
 
1190
1189
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1191
1190
  interface MyDiscountCalculationConfig extends Record<string, unknown> {}
@@ -1210,32 +1209,32 @@ export default class MyDiscountCalculation implements Billing.Bill
1210
1209
  path: "extensions/billing.customer_balance_application/index.test.ts",
1211
1210
  content: `import { beforeEach, describe, it, expect } from 'vitest';
1212
1211
 
1213
- import MyCustomerBalanceApplication from './index.js';
1212
+ import MyBalanceApp from './index.js';
1214
1213
 
1215
- describe('MyCustomerBalanceApplication', () => {
1216
- let instance: MyCustomerBalanceApplication;
1214
+ describe('MyBalanceApp', () => {
1215
+ let instance: MyBalanceApp;
1217
1216
 
1218
1217
  beforeEach(() => {
1219
- instance = new MyCustomerBalanceApplication();
1218
+ instance = new MyBalanceApp();
1220
1219
  });
1221
1220
 
1222
1221
  it('should be constructable', () => {
1223
- expect(instance).toBeInstanceOf(MyCustomerBalanceApplication);
1222
+ expect(instance).toBeInstanceOf(MyBalanceApp);
1224
1223
  });
1225
1224
  });
1226
1225
  `
1227
1226
  },
1228
1227
  {
1229
1228
  path: "extensions/billing.customer_balance_application/index.ts",
1230
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
1229
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1231
1230
 
1232
1231
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1233
- interface MyCustomerBalanceApplicationConfig extends Record<string, unknown> {}
1232
+ interface MyBalanceAppConfig extends Record<string, unknown> {}
1234
1233
 
1235
- export default class MyCustomerBalanceApplication implements Billing.CustomerBalanceApplication<MyCustomerBalanceApplicationConfig> {
1234
+ export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
1236
1235
  computeAppliedCustomerBalance(
1237
1236
  request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
1238
- _config: MyCustomerBalanceApplicationConfig,
1237
+ _config: MyBalanceAppConfig,
1239
1238
  _context: Context
1240
1239
  ) {
1241
1240
  // TODO: implement your customer balance logic here
@@ -1268,7 +1267,7 @@ describe('MyInvoiceCollectionSetting', () => {
1268
1267
  },
1269
1268
  {
1270
1269
  path: "extensions/billing.invoice_collection_setting/index.ts",
1271
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
1270
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1272
1271
 
1273
1272
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1274
1273
  interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
@@ -1307,7 +1306,7 @@ describe('MyProrations', () => {
1307
1306
  },
1308
1307
  {
1309
1308
  path: "extensions/billing.prorations/index.ts",
1310
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
1309
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1311
1310
 
1312
1311
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1313
1312
  interface MyProrationsConfig extends Record<string, unknown> {}
@@ -1348,7 +1347,7 @@ describe('MyRecurringBillingItemHandling', () => {
1348
1347
  },
1349
1348
  {
1350
1349
  path: "extensions/billing.recurring_billing_item_handling/index.ts",
1351
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
1350
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1352
1351
 
1353
1352
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1354
1353
  interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
@@ -1598,8 +1597,7 @@ describe('MyCustomAction', () => {
1598
1597
  },
1599
1598
  {
1600
1599
  path: "extensions/core.workflows.custom_action/index.ts",
1601
- content: `import type { Core } from '@stripe/extensibility-sdk/extensions';
1602
- import type { Context } from '@stripe/extensibility-sdk/extensions';
1600
+ content: `import type { Core, Context } from '@stripe/extensibility-sdk';
1603
1601
 
1604
1602
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1605
1603
  interface MyCustomActionConfig extends Record<string, unknown> {}
@@ -1662,8 +1660,7 @@ describe('MyCustomAction', () => {
1662
1660
  },
1663
1661
  {
1664
1662
  path: "extensions/extend.workflows.custom_action/index.ts",
1665
- content: `import type { Extend } from '@stripe/extensibility-sdk/extensions';
1666
- import type { Context } from '@stripe/extensibility-sdk/extensions';
1663
+ content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
1667
1664
 
1668
1665
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1669
1666
  interface MyCustomActionConfig extends Record<string, unknown> {}
@@ -1753,7 +1750,7 @@ generated
1753
1750
  `
1754
1751
  },
1755
1752
  {
1756
- path: "root/custom-objects/package.json",
1753
+ path: "root/custom-objects/package.json.mustache",
1757
1754
  content: `{
1758
1755
  "name": "custom-objects",
1759
1756
  "type": "module",
@@ -1766,12 +1763,12 @@ generated
1766
1763
  "test": "vitest run"
1767
1764
  },
1768
1765
  "dependencies": {
1769
- "@stripe/extensibility-custom-objects": "0.7.4",
1770
- "@stripe/extensibility-sdk": "0.22.4"
1766
+ "@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
1767
+ "@stripe/extensibility-sdk": "{{ sdkVersion }}"
1771
1768
  },
1772
1769
  "devDependencies": {
1773
- "@stripe/extensibility-custom-objects-tools": "0.40.0",
1774
- "@stripe/extensibility-test-helpers": "0.2.7"
1770
+ "@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
1771
+ "@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
1775
1772
  }
1776
1773
  }
1777
1774
  `
@@ -2740,7 +2737,7 @@ var _ExtensionTemplateManager = class extends import_extensibility_tool_utils4._
2740
2737
  var import_extensibility_tool_utils9 = require("@stripe/extensibility-tool-utils");
2741
2738
  var SDK_PACKAGE_NAME = "@stripe/extensibility-sdk";
2742
2739
  var LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
2743
- var LANGUAGE_SERVER_PACKAGE_VERSION = "^0.2.0";
2740
+ var LANGUAGE_SERVER_PACKAGE_VERSION = `^${(0, import_extensibility_tool_utils9._workspaceVersion)(LANGUAGE_SERVER_PACKAGE_NAME)}`;
2744
2741
  function _createExtensionEslintConfigFile(params, context) {
2745
2742
  const { id, extensionInterfaceId } = params;
2746
2743
  const { fs: fs2 } = context;
@@ -3260,7 +3257,20 @@ var _rootWorkspaceTemplate = {
3260
3257
  },
3261
3258
  {
3262
3259
  path: "custom-objects/package.json",
3263
- content: fs2.textFile("custom-objects/package.json"),
3260
+ content: fs2.mustache(
3261
+ {
3262
+ customObjectsVersion: (0, import_extensibility_tool_utils10._workspaceVersion)(
3263
+ "@stripe/extensibility-custom-objects"
3264
+ ),
3265
+ sdkVersion: (0, import_extensibility_tool_utils10._workspaceVersion)("@stripe/extensibility-sdk"),
3266
+ customObjectsToolsVersion: (0, import_extensibility_tool_utils10._workspaceVersion)(
3267
+ "@stripe/extensibility-custom-objects-tools"
3268
+ ),
3269
+ testHelpersVersion: (0, import_extensibility_tool_utils10._workspaceVersion)("@stripe/extensibility-test-helpers")
3270
+ },
3271
+ "custom-objects",
3272
+ "package.json.mustache"
3273
+ ),
3264
3274
  precious: true
3265
3275
  },
3266
3276
  {
@@ -1174,8 +1174,7 @@ describe('MyDiscountCalculation', () => {
1174
1174
  },
1175
1175
  {
1176
1176
  path: "extensions/billing.bill.discount_calculation/index.ts",
1177
- content: `import type { Billing } from '@stripe/extensibility-sdk/extensions';
1178
- import type { Context } from '@stripe/extensibility-sdk/extensions';
1177
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1179
1178
 
1180
1179
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1181
1180
  interface MyDiscountCalculationConfig extends Record<string, unknown> {}
@@ -1200,32 +1199,32 @@ export default class MyDiscountCalculation implements Billing.Bill
1200
1199
  path: "extensions/billing.customer_balance_application/index.test.ts",
1201
1200
  content: `import { beforeEach, describe, it, expect } from 'vitest';
1202
1201
 
1203
- import MyCustomerBalanceApplication from './index.js';
1202
+ import MyBalanceApp from './index.js';
1204
1203
 
1205
- describe('MyCustomerBalanceApplication', () => {
1206
- let instance: MyCustomerBalanceApplication;
1204
+ describe('MyBalanceApp', () => {
1205
+ let instance: MyBalanceApp;
1207
1206
 
1208
1207
  beforeEach(() => {
1209
- instance = new MyCustomerBalanceApplication();
1208
+ instance = new MyBalanceApp();
1210
1209
  });
1211
1210
 
1212
1211
  it('should be constructable', () => {
1213
- expect(instance).toBeInstanceOf(MyCustomerBalanceApplication);
1212
+ expect(instance).toBeInstanceOf(MyBalanceApp);
1214
1213
  });
1215
1214
  });
1216
1215
  `
1217
1216
  },
1218
1217
  {
1219
1218
  path: "extensions/billing.customer_balance_application/index.ts",
1220
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
1219
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1221
1220
 
1222
1221
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1223
- interface MyCustomerBalanceApplicationConfig extends Record<string, unknown> {}
1222
+ interface MyBalanceAppConfig extends Record<string, unknown> {}
1224
1223
 
1225
- export default class MyCustomerBalanceApplication implements Billing.CustomerBalanceApplication<MyCustomerBalanceApplicationConfig> {
1224
+ export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
1226
1225
  computeAppliedCustomerBalance(
1227
1226
  request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
1228
- _config: MyCustomerBalanceApplicationConfig,
1227
+ _config: MyBalanceAppConfig,
1229
1228
  _context: Context
1230
1229
  ) {
1231
1230
  // TODO: implement your customer balance logic here
@@ -1258,7 +1257,7 @@ describe('MyInvoiceCollectionSetting', () => {
1258
1257
  },
1259
1258
  {
1260
1259
  path: "extensions/billing.invoice_collection_setting/index.ts",
1261
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
1260
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1262
1261
 
1263
1262
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1264
1263
  interface MyInvoiceCollectionSettingConfig extends Record<string, unknown> {}
@@ -1297,7 +1296,7 @@ describe('MyProrations', () => {
1297
1296
  },
1298
1297
  {
1299
1298
  path: "extensions/billing.prorations/index.ts",
1300
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
1299
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1301
1300
 
1302
1301
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1303
1302
  interface MyProrationsConfig extends Record<string, unknown> {}
@@ -1338,7 +1337,7 @@ describe('MyRecurringBillingItemHandling', () => {
1338
1337
  },
1339
1338
  {
1340
1339
  path: "extensions/billing.recurring_billing_item_handling/index.ts",
1341
- content: `import type { Billing, Context } from '@stripe/extensibility-sdk/extensions';
1340
+ content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
1342
1341
 
1343
1342
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1344
1343
  interface MyRecurringBillingItemHandlingConfig extends Record<string, unknown> {}
@@ -1588,8 +1587,7 @@ describe('MyCustomAction', () => {
1588
1587
  },
1589
1588
  {
1590
1589
  path: "extensions/core.workflows.custom_action/index.ts",
1591
- content: `import type { Core } from '@stripe/extensibility-sdk/extensions';
1592
- import type { Context } from '@stripe/extensibility-sdk/extensions';
1590
+ content: `import type { Core, Context } from '@stripe/extensibility-sdk';
1593
1591
 
1594
1592
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1595
1593
  interface MyCustomActionConfig extends Record<string, unknown> {}
@@ -1652,8 +1650,7 @@ describe('MyCustomAction', () => {
1652
1650
  },
1653
1651
  {
1654
1652
  path: "extensions/extend.workflows.custom_action/index.ts",
1655
- content: `import type { Extend } from '@stripe/extensibility-sdk/extensions';
1656
- import type { Context } from '@stripe/extensibility-sdk/extensions';
1653
+ content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
1657
1654
 
1658
1655
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1659
1656
  interface MyCustomActionConfig extends Record<string, unknown> {}
@@ -1743,7 +1740,7 @@ generated
1743
1740
  `
1744
1741
  },
1745
1742
  {
1746
- path: "root/custom-objects/package.json",
1743
+ path: "root/custom-objects/package.json.mustache",
1747
1744
  content: `{
1748
1745
  "name": "custom-objects",
1749
1746
  "type": "module",
@@ -1756,12 +1753,12 @@ generated
1756
1753
  "test": "vitest run"
1757
1754
  },
1758
1755
  "dependencies": {
1759
- "@stripe/extensibility-custom-objects": "0.7.4",
1760
- "@stripe/extensibility-sdk": "0.22.4"
1756
+ "@stripe/extensibility-custom-objects": "{{ customObjectsVersion }}",
1757
+ "@stripe/extensibility-sdk": "{{ sdkVersion }}"
1761
1758
  },
1762
1759
  "devDependencies": {
1763
- "@stripe/extensibility-custom-objects-tools": "0.40.0",
1764
- "@stripe/extensibility-test-helpers": "0.2.7"
1760
+ "@stripe/extensibility-custom-objects-tools": "{{ customObjectsToolsVersion }}",
1761
+ "@stripe/extensibility-test-helpers": "{{ testHelpersVersion }}"
1765
1762
  }
1766
1763
  }
1767
1764
  `
@@ -2734,7 +2731,7 @@ var _ExtensionTemplateManager = class extends _TemplateManager {
2734
2731
  import { _workspaceVersion } from "@stripe/extensibility-tool-utils";
2735
2732
  var SDK_PACKAGE_NAME = "@stripe/extensibility-sdk";
2736
2733
  var LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-language-server";
2737
- var LANGUAGE_SERVER_PACKAGE_VERSION = "^0.2.0";
2734
+ var LANGUAGE_SERVER_PACKAGE_VERSION = `^${_workspaceVersion(LANGUAGE_SERVER_PACKAGE_NAME)}`;
2738
2735
  function _createExtensionEslintConfigFile(params, context) {
2739
2736
  const { id, extensionInterfaceId } = params;
2740
2737
  const { fs: fs2 } = context;
@@ -3254,7 +3251,20 @@ var _rootWorkspaceTemplate = {
3254
3251
  },
3255
3252
  {
3256
3253
  path: "custom-objects/package.json",
3257
- content: fs2.textFile("custom-objects/package.json"),
3254
+ content: fs2.mustache(
3255
+ {
3256
+ customObjectsVersion: _workspaceVersion2(
3257
+ "@stripe/extensibility-custom-objects"
3258
+ ),
3259
+ sdkVersion: _workspaceVersion2("@stripe/extensibility-sdk"),
3260
+ customObjectsToolsVersion: _workspaceVersion2(
3261
+ "@stripe/extensibility-custom-objects-tools"
3262
+ ),
3263
+ testHelpersVersion: _workspaceVersion2("@stripe/extensibility-test-helpers")
3264
+ },
3265
+ "custom-objects",
3266
+ "package.json.mustache"
3267
+ ),
3258
3268
  precious: true
3259
3269
  },
3260
3270
  {