@stripe/extensibility-dev-tools 0.23.7 → 0.24.3
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.
- package/dist/bin/build-custom-object-definitions.cjs +56 -21
- package/dist/bin/build-custom-object-definitions.js +56 -21
- package/dist/bin/create-upload-image.cjs +63 -25
- package/dist/bin/create-upload-image.js +63 -25
- package/dist/bin/dev-tools-rpc.cjs +8 -7
- package/dist/bin/dev-tools-rpc.js +8 -7
- package/dist/bin/gen-workspace.cjs +8 -7
- package/dist/bin/gen-workspace.js +8 -7
- package/dist/bin/template-info.cjs +8 -7
- package/dist/bin/template-info.js +8 -7
- package/dist/custom-objects/build-definitions.d.ts.map +1 -1
- package/dist/custom-objects/to-proto-json.d.ts +2 -1
- package/dist/custom-objects/to-proto-json.d.ts.map +1 -1
- package/dist/dependencies/index.d.ts +7 -7
- package/dist/index.cjs +8 -7
- package/dist/index.js +8 -7
- package/dist/manifest/manifest-v2.d.ts +8 -3
- package/dist/templates/diff-viewer/types.d.ts +2 -2
- package/dist/templates/extensions/base.d.ts +4 -2
- package/dist/templates/extensions/core.workflows.custom_action.d.ts.map +1 -1
- package/dist/templates/extensions/types.d.ts +9 -3
- package/dist/templates/file-writer.d.ts +2 -2
- package/dist/templates/index.cjs +8 -7
- package/dist/templates/index.js +8 -7
- package/dist/templates/root/index.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/workspace/index.cjs +8 -7
- package/dist/workspace/index.d.ts +34 -30
- package/dist/workspace/index.js +8 -7
- package/package.json +3 -3
- package/templates/extensions/billing.bill.discount_calculation/index.ts +1 -1
- package/templates/extensions/billing.customer_balance_application/index.ts +1 -1
- package/templates/extensions/billing.invoice_collection_setting/index.ts +1 -1
- package/templates/extensions/billing.prorations/index.ts +1 -1
- package/templates/extensions/billing.recurring_billing_item_handling/index.ts +1 -1
- package/templates/extensions/core.workflows.custom_action/index.ts +1 -1
- package/templates/extensions/extend.workflows.custom_action/index.ts +1 -1
- package/dist/api-surface.d.ts.map +0 -1
|
@@ -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;
|
|
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"}
|
|
@@ -50,7 +50,7 @@ export interface _StripeCliPluginDependency {
|
|
|
50
50
|
* A dependency that the workspace needs: npm runtime, npm dev, or Stripe CLI plugin.
|
|
51
51
|
* @internal
|
|
52
52
|
*/
|
|
53
|
-
export type _Dependency =
|
|
53
|
+
export type _Dependency = _NpmDependency | _DevNpmDependency | _StripeCliPluginDependency;
|
|
54
54
|
/**
|
|
55
55
|
* Create a runtime npm dependency descriptor.
|
|
56
56
|
* @internal
|
|
@@ -96,7 +96,7 @@ export interface _ConflictResult {
|
|
|
96
96
|
* The action to take for a dependency: add new, update existing, no-op, or flag a conflict.
|
|
97
97
|
* @internal
|
|
98
98
|
*/
|
|
99
|
-
export type _DependencyAction = 'add' | '
|
|
99
|
+
export type _DependencyAction = 'add' | 'update' | 'already-satisfied' | 'conflict';
|
|
100
100
|
/**
|
|
101
101
|
* A pending dependency change accumulated by the dependency manager before commit.
|
|
102
102
|
* @internal
|
|
@@ -147,7 +147,7 @@ export interface _CommitResult {
|
|
|
147
147
|
* Package manager detected in the workspace.
|
|
148
148
|
* @internal
|
|
149
149
|
*/
|
|
150
|
-
export type _PackageManager = '
|
|
150
|
+
export type _PackageManager = 'pnpm' | 'yarn' | 'npm';
|
|
151
151
|
/**
|
|
152
152
|
* Detect the package manager used in the workspace by looking for lockfiles.
|
|
153
153
|
* @internal
|
|
@@ -197,16 +197,16 @@ export declare class _NpmDependencyHandler implements _DependencyHandler<_NpmDep
|
|
|
197
197
|
private get dependencyKey();
|
|
198
198
|
private get dependencyLabel();
|
|
199
199
|
/** Check whether the npm dependency is already present in package.json. */
|
|
200
|
-
check(dep:
|
|
200
|
+
check(dep: _NpmDependency | _DevNpmDependency): Promise<_CheckResult>;
|
|
201
201
|
/** Check whether the requested version conflicts with the currently installed version. */
|
|
202
|
-
checkConflict(dep:
|
|
202
|
+
checkConflict(dep: _NpmDependency | _DevNpmDependency): Promise<_ConflictResult>;
|
|
203
203
|
/** Add or update the npm dependency in package.json. */
|
|
204
|
-
add(dep:
|
|
204
|
+
add(dep: _NpmDependency | _DevNpmDependency): Promise<{
|
|
205
205
|
action: 'add' | 'update';
|
|
206
206
|
message: string;
|
|
207
207
|
}>;
|
|
208
208
|
/** Run the package manager install command in the working directory. */
|
|
209
|
-
install(_deps: (
|
|
209
|
+
install(_deps: (_NpmDependency | _DevNpmDependency)[]): Promise<void>;
|
|
210
210
|
private versionsCompatible;
|
|
211
211
|
private extractMajorVersion;
|
|
212
212
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -94,7 +94,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
94
94
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
95
95
|
|
|
96
96
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
97
|
-
interface MyDiscountCalculationConfig
|
|
97
|
+
interface MyDiscountCalculationConfig {}
|
|
98
98
|
|
|
99
99
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
100
100
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -136,7 +136,7 @@ describe('MyBalanceApp', () => {
|
|
|
136
136
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
137
137
|
|
|
138
138
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
139
|
-
interface MyBalanceAppConfig
|
|
139
|
+
interface MyBalanceAppConfig {}
|
|
140
140
|
|
|
141
141
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
142
142
|
computeAppliedCustomerBalance(
|
|
@@ -177,7 +177,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
177
177
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
178
178
|
|
|
179
179
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
180
|
-
interface MyInvoiceCollectionSettingConfig
|
|
180
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
181
181
|
|
|
182
182
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
183
183
|
collectionOverride(
|
|
@@ -216,7 +216,7 @@ describe('MyProrations', () => {
|
|
|
216
216
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
217
217
|
|
|
218
218
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
219
|
-
interface MyProrationsConfig
|
|
219
|
+
interface MyProrationsConfig {}
|
|
220
220
|
|
|
221
221
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
222
222
|
prorateItems(
|
|
@@ -257,7 +257,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
257
257
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
258
258
|
|
|
259
259
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
260
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
260
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
261
261
|
|
|
262
262
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
263
263
|
beforeItemCreation(
|
|
@@ -507,7 +507,7 @@ describe('MyCustomAction', () => {
|
|
|
507
507
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
508
508
|
|
|
509
509
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
510
|
-
interface MyCustomActionConfig
|
|
510
|
+
interface MyCustomActionConfig {}
|
|
511
511
|
|
|
512
512
|
export default class MyCustomAction implements Core.Workflows
|
|
513
513
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -570,7 +570,7 @@ describe('MyCustomAction', () => {
|
|
|
570
570
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
571
571
|
|
|
572
572
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
573
|
-
interface MyCustomActionConfig
|
|
573
|
+
interface MyCustomActionConfig {}
|
|
574
574
|
|
|
575
575
|
export default class MyCustomAction implements Extend.Workflows
|
|
576
576
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -2258,6 +2258,7 @@ function _createBaseOutput(params, context) {
|
|
|
2258
2258
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
2259
2259
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
2260
2260
|
var customActionTemplate = {
|
|
2261
|
+
deprecated: true,
|
|
2261
2262
|
methods: {
|
|
2262
2263
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
2263
2264
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
30
30
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
33
|
-
interface MyDiscountCalculationConfig
|
|
33
|
+
interface MyDiscountCalculationConfig {}
|
|
34
34
|
|
|
35
35
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
36
36
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -72,7 +72,7 @@ describe('MyBalanceApp', () => {
|
|
|
72
72
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
73
73
|
|
|
74
74
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
75
|
-
interface MyBalanceAppConfig
|
|
75
|
+
interface MyBalanceAppConfig {}
|
|
76
76
|
|
|
77
77
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
78
78
|
computeAppliedCustomerBalance(
|
|
@@ -113,7 +113,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
113
113
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
114
114
|
|
|
115
115
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
116
|
-
interface MyInvoiceCollectionSettingConfig
|
|
116
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
117
117
|
|
|
118
118
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
119
119
|
collectionOverride(
|
|
@@ -152,7 +152,7 @@ describe('MyProrations', () => {
|
|
|
152
152
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
153
153
|
|
|
154
154
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
155
|
-
interface MyProrationsConfig
|
|
155
|
+
interface MyProrationsConfig {}
|
|
156
156
|
|
|
157
157
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
158
158
|
prorateItems(
|
|
@@ -193,7 +193,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
193
193
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
194
194
|
|
|
195
195
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
196
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
196
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
197
197
|
|
|
198
198
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
199
199
|
beforeItemCreation(
|
|
@@ -443,7 +443,7 @@ describe('MyCustomAction', () => {
|
|
|
443
443
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
444
444
|
|
|
445
445
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
446
|
-
interface MyCustomActionConfig
|
|
446
|
+
interface MyCustomActionConfig {}
|
|
447
447
|
|
|
448
448
|
export default class MyCustomAction implements Core.Workflows
|
|
449
449
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -506,7 +506,7 @@ describe('MyCustomAction', () => {
|
|
|
506
506
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
507
507
|
|
|
508
508
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
509
|
-
interface MyCustomActionConfig
|
|
509
|
+
interface MyCustomActionConfig {}
|
|
510
510
|
|
|
511
511
|
export default class MyCustomAction implements Extend.Workflows
|
|
512
512
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -2198,6 +2198,7 @@ function _createBaseOutput(params, context) {
|
|
|
2198
2198
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
2199
2199
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
2200
2200
|
var customActionTemplate = {
|
|
2201
|
+
deprecated: true,
|
|
2201
2202
|
methods: {
|
|
2202
2203
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
2203
2204
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
|
@@ -39,8 +39,8 @@ export interface _CustomObjectDefinitionYaml {
|
|
|
39
39
|
id: string;
|
|
40
40
|
/** Specification describing the type and source file for the definition. */
|
|
41
41
|
specification: {
|
|
42
|
-
content: string;
|
|
43
42
|
type: string;
|
|
43
|
+
content: string;
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -119,8 +119,8 @@ export interface _ExtensionConfig {
|
|
|
119
119
|
script_entry_point?: string;
|
|
120
120
|
/** Inline script definition (type + content path). */
|
|
121
121
|
script?: {
|
|
122
|
-
content: string;
|
|
123
122
|
type: string;
|
|
123
|
+
content: string;
|
|
124
124
|
};
|
|
125
125
|
/** Required permissions for the extension. */
|
|
126
126
|
permissions: string[];
|
|
@@ -130,11 +130,16 @@ export interface _ExtensionConfig {
|
|
|
130
130
|
configuration?: _ExtensionConfiguration;
|
|
131
131
|
/** Remote function endpoints for the extension. */
|
|
132
132
|
endpoints?: {
|
|
133
|
+
/** The unique identifier for the endpoint. */
|
|
133
134
|
id: string;
|
|
135
|
+
/** The type of endpoint. */
|
|
136
|
+
type: 'remote_function' | 'custom_http';
|
|
137
|
+
/** Configuration for the live environment. */
|
|
134
138
|
live?: _EndpointDefinition;
|
|
139
|
+
/** Configuration for the managed sandbox environment. */
|
|
135
140
|
managed_sandbox?: _EndpointDefinition;
|
|
141
|
+
/** Configuration for the test environment. */
|
|
136
142
|
test?: _EndpointDefinition;
|
|
137
|
-
type: 'custom_http' | 'remote_function';
|
|
138
143
|
}[];
|
|
139
144
|
}
|
|
140
145
|
/**
|
|
@@ -6,7 +6,7 @@ export type { _OverwriteDecision };
|
|
|
6
6
|
*/
|
|
7
7
|
export interface DiffLine {
|
|
8
8
|
/** The type of change this line represents */
|
|
9
|
-
type: 'add' | '
|
|
9
|
+
type: 'add' | 'remove' | 'context' | 'header';
|
|
10
10
|
/** The text content of the line (including +/- prefix from diff) */
|
|
11
11
|
text: string;
|
|
12
12
|
/** Line number in the old file (for remove/context lines) */
|
|
@@ -54,5 +54,5 @@ export interface ViewerState {
|
|
|
54
54
|
* Internal result from keypress handler.
|
|
55
55
|
* @internal
|
|
56
56
|
*/
|
|
57
|
-
export type KeypressResult =
|
|
57
|
+
export type KeypressResult = 'continue' | _OverwriteDecision;
|
|
58
58
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -5,7 +5,7 @@ export declare const LANGUAGE_SERVER_PACKAGE_NAME = "@stripe/extensibility-langu
|
|
|
5
5
|
/** @internal */
|
|
6
6
|
export declare const LANGUAGE_SERVER_PACKAGE_VERSION: string;
|
|
7
7
|
/** @internal */
|
|
8
|
-
export type _ExecutionProfile = '
|
|
8
|
+
export type _ExecutionProfile = 'restricted' | 'egress';
|
|
9
9
|
/** @internal */
|
|
10
10
|
export interface _BaseTemplateParams extends _ExtensionParams {
|
|
11
11
|
extensionInterfaceId: string;
|
|
@@ -15,7 +15,9 @@ export interface _BaseTemplateParams extends _ExtensionParams {
|
|
|
15
15
|
* Generate the ESLint config file for an extension workspace.
|
|
16
16
|
* @internal
|
|
17
17
|
*/
|
|
18
|
-
export declare function _createExtensionEslintConfigFile(params:
|
|
18
|
+
export declare function _createExtensionEslintConfigFile(params: Pick<_ExtensionParams, 'id'> & {
|
|
19
|
+
extensionInterfaceId: string;
|
|
20
|
+
}, context: _TemplateContext): _GeneratedFile;
|
|
19
21
|
/** @internal */
|
|
20
22
|
export declare function _createBaseOutput(params: _BaseTemplateParams, context: _TemplateContext): _ExtensionTemplateOutput;
|
|
21
23
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -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;;;;
|
|
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"}
|
|
@@ -13,11 +13,15 @@ import type { _Template, _TemplateOutput } from '../types.js';
|
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
15
|
export type _PostGenerationHook = {
|
|
16
|
+
/** Script name to run via `pnpm run <script>` */
|
|
17
|
+
script: string;
|
|
18
|
+
/** Optional description of what this hook does */
|
|
16
19
|
description?: string;
|
|
17
|
-
exec: string;
|
|
18
20
|
} | {
|
|
21
|
+
/** Command to run via `pnpm exec <command>` */
|
|
22
|
+
exec: string;
|
|
23
|
+
/** Optional description of what this hook does */
|
|
19
24
|
description?: string;
|
|
20
|
-
script: string;
|
|
21
25
|
};
|
|
22
26
|
/**
|
|
23
27
|
* Parameters for extension template generation
|
|
@@ -40,8 +44,10 @@ export interface _ExtensionTemplateOutput extends _TemplateOutput {
|
|
|
40
44
|
methods: Record<string, unknown>;
|
|
41
45
|
/** Dependencies required by the extension */
|
|
42
46
|
dependencies?: {
|
|
43
|
-
|
|
47
|
+
/** Regular dependencies (added to dependencies field) */
|
|
44
48
|
runtime?: _NpmDependency[];
|
|
49
|
+
/** Development dependencies (added to devDependencies field) */
|
|
50
|
+
dev?: _DevNpmDependency[];
|
|
45
51
|
};
|
|
46
52
|
/** Post-generation hooks to run after files are generated and dependencies installed */
|
|
47
53
|
postGenerationHooks?: _PostGenerationHook[];
|
|
@@ -9,7 +9,7 @@ import type { _GeneratedFile } from './types.js';
|
|
|
9
9
|
* User decision when prompted about overwriting a file
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
|
-
export type _OverwriteDecision = '
|
|
12
|
+
export type _OverwriteDecision = 'overwrite' | 'skip' | 'overwrite-all' | 'abort';
|
|
13
13
|
/**
|
|
14
14
|
* Callback function for prompting about file overwrites
|
|
15
15
|
* @param path - Relative path to the file that would be overwritten
|
|
@@ -27,7 +27,7 @@ export type _OverwritePromptCallback = (path: string, cwd: string, newContent: s
|
|
|
27
27
|
* - function: Prompt before overwriting each file (interactive ask mode)
|
|
28
28
|
* @internal
|
|
29
29
|
*/
|
|
30
|
-
export type _WriteMode =
|
|
30
|
+
export type _WriteMode = 'overwrite-all' | 'abort-if-existing' | 'if-missing' | _OverwritePromptCallback;
|
|
31
31
|
/**
|
|
32
32
|
* Options for writing generated files
|
|
33
33
|
* @internal
|
package/dist/templates/index.cjs
CHANGED
|
@@ -78,7 +78,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
78
78
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
79
79
|
|
|
80
80
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
81
|
-
interface MyDiscountCalculationConfig
|
|
81
|
+
interface MyDiscountCalculationConfig {}
|
|
82
82
|
|
|
83
83
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
84
84
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -120,7 +120,7 @@ describe('MyBalanceApp', () => {
|
|
|
120
120
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
121
121
|
|
|
122
122
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
123
|
-
interface MyBalanceAppConfig
|
|
123
|
+
interface MyBalanceAppConfig {}
|
|
124
124
|
|
|
125
125
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
126
126
|
computeAppliedCustomerBalance(
|
|
@@ -161,7 +161,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
161
161
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
162
162
|
|
|
163
163
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
164
|
-
interface MyInvoiceCollectionSettingConfig
|
|
164
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
165
165
|
|
|
166
166
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
167
167
|
collectionOverride(
|
|
@@ -200,7 +200,7 @@ describe('MyProrations', () => {
|
|
|
200
200
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
201
201
|
|
|
202
202
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
203
|
-
interface MyProrationsConfig
|
|
203
|
+
interface MyProrationsConfig {}
|
|
204
204
|
|
|
205
205
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
206
206
|
prorateItems(
|
|
@@ -241,7 +241,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
241
241
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
242
242
|
|
|
243
243
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
244
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
244
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
245
245
|
|
|
246
246
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
247
247
|
beforeItemCreation(
|
|
@@ -491,7 +491,7 @@ describe('MyCustomAction', () => {
|
|
|
491
491
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
492
492
|
|
|
493
493
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
494
|
-
interface MyCustomActionConfig
|
|
494
|
+
interface MyCustomActionConfig {}
|
|
495
495
|
|
|
496
496
|
export default class MyCustomAction implements Core.Workflows
|
|
497
497
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -554,7 +554,7 @@ describe('MyCustomAction', () => {
|
|
|
554
554
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
555
555
|
|
|
556
556
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
557
|
-
interface MyCustomActionConfig
|
|
557
|
+
interface MyCustomActionConfig {}
|
|
558
558
|
|
|
559
559
|
export default class MyCustomAction implements Extend.Workflows
|
|
560
560
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1706,6 +1706,7 @@ function _createBaseOutput(params, context) {
|
|
|
1706
1706
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
1707
1707
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
1708
1708
|
var customActionTemplate = {
|
|
1709
|
+
deprecated: true,
|
|
1709
1710
|
methods: {
|
|
1710
1711
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
1711
1712
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
package/dist/templates/index.js
CHANGED
|
@@ -30,7 +30,7 @@ describe('MyDiscountCalculation', () => {
|
|
|
30
30
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
33
|
-
interface MyDiscountCalculationConfig
|
|
33
|
+
interface MyDiscountCalculationConfig {}
|
|
34
34
|
|
|
35
35
|
export default class MyDiscountCalculation implements Billing.Bill
|
|
36
36
|
.DiscountCalculation<MyDiscountCalculationConfig> {
|
|
@@ -72,7 +72,7 @@ describe('MyBalanceApp', () => {
|
|
|
72
72
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
73
73
|
|
|
74
74
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
75
|
-
interface MyBalanceAppConfig
|
|
75
|
+
interface MyBalanceAppConfig {}
|
|
76
76
|
|
|
77
77
|
export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
|
|
78
78
|
computeAppliedCustomerBalance(
|
|
@@ -113,7 +113,7 @@ describe('MyInvoiceCollectionSetting', () => {
|
|
|
113
113
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
114
114
|
|
|
115
115
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
116
|
-
interface MyInvoiceCollectionSettingConfig
|
|
116
|
+
interface MyInvoiceCollectionSettingConfig {}
|
|
117
117
|
|
|
118
118
|
export default class MyInvoiceCollectionSetting implements Billing.InvoiceCollectionSetting<MyInvoiceCollectionSettingConfig> {
|
|
119
119
|
collectionOverride(
|
|
@@ -152,7 +152,7 @@ describe('MyProrations', () => {
|
|
|
152
152
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
153
153
|
|
|
154
154
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
155
|
-
interface MyProrationsConfig
|
|
155
|
+
interface MyProrationsConfig {}
|
|
156
156
|
|
|
157
157
|
export default class MyProrations implements Billing.Prorations<MyProrationsConfig> {
|
|
158
158
|
prorateItems(
|
|
@@ -193,7 +193,7 @@ describe('MyRecurringBillingItemHandling', () => {
|
|
|
193
193
|
content: `import type { Billing, Context } from '@stripe/extensibility-sdk';
|
|
194
194
|
|
|
195
195
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
196
|
-
interface MyRecurringBillingItemHandlingConfig
|
|
196
|
+
interface MyRecurringBillingItemHandlingConfig {}
|
|
197
197
|
|
|
198
198
|
export default class MyRecurringBillingItemHandling implements Billing.RecurringBillingItemHandling<MyRecurringBillingItemHandlingConfig> {
|
|
199
199
|
beforeItemCreation(
|
|
@@ -443,7 +443,7 @@ describe('MyCustomAction', () => {
|
|
|
443
443
|
content: `import type { Core, Context } from '@stripe/extensibility-sdk';
|
|
444
444
|
|
|
445
445
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
446
|
-
interface MyCustomActionConfig
|
|
446
|
+
interface MyCustomActionConfig {}
|
|
447
447
|
|
|
448
448
|
export default class MyCustomAction implements Core.Workflows
|
|
449
449
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -506,7 +506,7 @@ describe('MyCustomAction', () => {
|
|
|
506
506
|
content: `import type { Extend, Context } from '@stripe/extensibility-sdk';
|
|
507
507
|
|
|
508
508
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
509
|
-
interface MyCustomActionConfig
|
|
509
|
+
interface MyCustomActionConfig {}
|
|
510
510
|
|
|
511
511
|
export default class MyCustomAction implements Extend.Workflows
|
|
512
512
|
.CustomAction<MyCustomActionConfig> {
|
|
@@ -1662,6 +1662,7 @@ function _createBaseOutput(params, context) {
|
|
|
1662
1662
|
// src/templates/extensions/core.workflows.custom_action.ts
|
|
1663
1663
|
var EXTENSION_INTERFACE_ID = "core.workflows.custom_action";
|
|
1664
1664
|
var customActionTemplate = {
|
|
1665
|
+
deprecated: true,
|
|
1665
1666
|
methods: {
|
|
1666
1667
|
execute: { implementation_types: ["script", "remote-function"] },
|
|
1667
1668
|
get_form_state: { implementation_types: ["script", "remote-function"] }
|
|
@@ -30,8 +30,8 @@ export interface _RootWorkspaceParams extends Record<string, unknown> {
|
|
|
30
30
|
export interface _RootWorkspaceOutput extends _TemplateOutput {
|
|
31
31
|
/** Dependencies to install after file generation. */
|
|
32
32
|
dependencies?: {
|
|
33
|
-
dev?: _DevNpmDependency[];
|
|
34
33
|
runtime?: _NpmDependency[];
|
|
34
|
+
dev?: _DevNpmDependency[];
|
|
35
35
|
};
|
|
36
36
|
/** Hooks to run after dependencies are installed. */
|
|
37
37
|
postGenerationHooks?: _PostGenerationHook[];
|