@stripe/extensibility-dev-tools 0.23.5
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/LICENSE.md +19 -0
- package/dist/bin/build-custom-object-definitions.cjs +2111 -0
- package/dist/bin/build-custom-object-definitions.d.ts +11 -0
- package/dist/bin/build-custom-object-definitions.d.ts.map +1 -0
- package/dist/bin/build-custom-object-definitions.js +2088 -0
- package/dist/bin/create-upload-image.cjs +2136 -0
- package/dist/bin/create-upload-image.d.ts +17 -0
- package/dist/bin/create-upload-image.d.ts.map +1 -0
- package/dist/bin/create-upload-image.js +2113 -0
- package/dist/bin/dev-tools-rpc.cjs +3874 -0
- package/dist/bin/dev-tools-rpc.d.ts +3 -0
- package/dist/bin/dev-tools-rpc.d.ts.map +1 -0
- package/dist/bin/dev-tools-rpc.js +3864 -0
- package/dist/bin/gen-schemas.cjs +20739 -0
- package/dist/bin/gen-schemas.d.ts +8 -0
- package/dist/bin/gen-schemas.d.ts.map +1 -0
- package/dist/bin/gen-schemas.js +20715 -0
- package/dist/bin/gen-workspace.cjs +3847 -0
- package/dist/bin/gen-workspace.d.ts +8 -0
- package/dist/bin/gen-workspace.d.ts.map +1 -0
- package/dist/bin/gen-workspace.js +3841 -0
- package/dist/bin/manifest.cjs +686 -0
- package/dist/bin/manifest.d.ts +10 -0
- package/dist/bin/manifest.d.ts.map +1 -0
- package/dist/bin/manifest.js +663 -0
- package/dist/bin/rpc/dispatch.d.ts +10 -0
- package/dist/bin/rpc/dispatch.d.ts.map +1 -0
- package/dist/bin/rpc/handlers.d.ts +4 -0
- package/dist/bin/rpc/handlers.d.ts.map +1 -0
- package/dist/bin/rpc/types.d.ts +29 -0
- package/dist/bin/rpc/types.d.ts.map +1 -0
- package/dist/bin/template-info.cjs +1511 -0
- package/dist/bin/template-info.d.ts +9 -0
- package/dist/bin/template-info.d.ts.map +1 -0
- package/dist/bin/template-info.js +1488 -0
- package/dist/custom-objects/build-definitions.d.ts +98 -0
- package/dist/custom-objects/build-definitions.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/custom_objects/pub/api/app_api/object_definitions_app_service.pb.d.ts +191 -0
- package/dist/custom-objects/generated/proto/custom_objects/pub/api/app_api/object_definitions_app_service.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/custom_objects/pub/api/common/schema.pb.d.ts +131 -0
- package/dist/custom-objects/generated/proto/custom_objects/pub/api/common/schema.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/google/protobuf/descriptor.pb.d.ts +1482 -0
- package/dist/custom-objects/generated/proto/google/protobuf/descriptor.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/google/protobuf/timestamp.pb.d.ts +167 -0
- package/dist/custom-objects/generated/proto/google/protobuf/timestamp.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/proto/annotations.pb.d.ts +64 -0
- package/dist/custom-objects/generated/proto/proto/annotations.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/proto/extensions.pb.d.ts +657 -0
- package/dist/custom-objects/generated/proto/proto/extensions.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/metadata/pub/api/api_metadata.pb.d.ts +105 -0
- package/dist/custom-objects/generated/proto/vendor/metadata/pub/api/api_metadata.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/net/idempotency/idempotency_model.pb.d.ts +79 -0
- package/dist/custom-objects/generated/proto/vendor/net/idempotency/idempotency_model.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/api_group_enum.pb.d.ts +129 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/api_group_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/api_visibility.pb.d.ts +76 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/api_visibility.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/customize_dispatch_middleware_enum.pb.d.ts +78 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/customize_dispatch_middleware_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/docs_namespace_group_enum.pb.d.ts +146 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/docs_namespace_group_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/documented_enum.pb.d.ts +76 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/documented_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/event_scope_enum.pb.d.ts +92 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/event_scope_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/extension_interface.pb.d.ts +124 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/extension_interface.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/feature_enum.pb.d.ts +1070 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/feature_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/field_validation_rules.pb.d.ts +279 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/field_validation_rules.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/flavor_enum.pb.d.ts +78 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/flavor_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/http_error_status.pb.d.ts +102 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/http_error_status.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/method_kind_enum.pb.d.ts +86 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/method_kind_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/method_priority.pb.d.ts +80 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/method_priority.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/permission_check_enum.pb.d.ts +74 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/permission_check_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/redaction_enum.pb.d.ts +76 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/redaction_enum.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/region_routers.pb.d.ts +103 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/region_routers.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/rollout_configs.pb.d.ts +153 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/rollout_configs.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/v2ext.pb.d.ts +1111 -0
- package/dist/custom-objects/generated/proto/vendor/publicapi/v2ext.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/vext/annotations.pb.d.ts +602 -0
- package/dist/custom-objects/generated/proto/vendor/vext/annotations.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/vext/extensions.pb.d.ts +144 -0
- package/dist/custom-objects/generated/proto/vendor/vext/extensions.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/vext/privacy_unified_annotations.pb.d.ts +851 -0
- package/dist/custom-objects/generated/proto/vendor/vext/privacy_unified_annotations.pb.d.ts.map +1 -0
- package/dist/custom-objects/generated/proto/vendor/vext/xml_annotations.pb.d.ts +125 -0
- package/dist/custom-objects/generated/proto/vendor/vext/xml_annotations.pb.d.ts.map +1 -0
- package/dist/custom-objects/to-proto-json.d.ts +17 -0
- package/dist/custom-objects/to-proto-json.d.ts.map +1 -0
- package/dist/dependencies/index.cjs +601 -0
- package/dist/dependencies/index.d.ts +320 -0
- package/dist/dependencies/index.d.ts.map +1 -0
- package/dist/dependencies/index.js +560 -0
- package/dist/extensibility-dev-tools-alpha.d.ts +199 -0
- package/dist/extensibility-dev-tools-beta.d.ts +199 -0
- package/dist/extensibility-dev-tools-dependencies-alpha.d.ts +51 -0
- package/dist/extensibility-dev-tools-dependencies-beta.d.ts +51 -0
- package/dist/extensibility-dev-tools-dependencies-internal.d.ts +372 -0
- package/dist/extensibility-dev-tools-dependencies-public.d.ts +51 -0
- package/dist/extensibility-dev-tools-internal.d.ts +1722 -0
- package/dist/extensibility-dev-tools-jsonschema-tools-alpha.d.ts +57 -0
- package/dist/extensibility-dev-tools-jsonschema-tools-beta.d.ts +57 -0
- package/dist/extensibility-dev-tools-jsonschema-tools-internal.d.ts +123 -0
- package/dist/extensibility-dev-tools-jsonschema-tools-public.d.ts +57 -0
- package/dist/extensibility-dev-tools-manifest-alpha.d.ts +31 -0
- package/dist/extensibility-dev-tools-manifest-beta.d.ts +31 -0
- package/dist/extensibility-dev-tools-manifest-internal.d.ts +461 -0
- package/dist/extensibility-dev-tools-manifest-public.d.ts +31 -0
- package/dist/extensibility-dev-tools-public.d.ts +199 -0
- package/dist/extensibility-dev-tools-schemas-alpha.d.ts +9 -0
- package/dist/extensibility-dev-tools-schemas-beta.d.ts +9 -0
- package/dist/extensibility-dev-tools-schemas-internal.d.ts +41 -0
- package/dist/extensibility-dev-tools-schemas-public.d.ts +9 -0
- package/dist/extensibility-dev-tools-templates-alpha.d.ts +67 -0
- package/dist/extensibility-dev-tools-templates-beta.d.ts +67 -0
- package/dist/extensibility-dev-tools-templates-internal.d.ts +554 -0
- package/dist/extensibility-dev-tools-templates-public.d.ts +67 -0
- package/dist/extensibility-dev-tools-workspace-alpha.d.ts +51 -0
- package/dist/extensibility-dev-tools-workspace-beta.d.ts +51 -0
- package/dist/extensibility-dev-tools-workspace-internal.d.ts +410 -0
- package/dist/extensibility-dev-tools-workspace-public.d.ts +51 -0
- package/dist/index.cjs +3810 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3758 -0
- package/dist/jsonschema-tools.cjs +20451 -0
- package/dist/jsonschema-tools.d.ts +98 -0
- package/dist/jsonschema-tools.d.ts.map +1 -0
- package/dist/jsonschema-tools.js +20404 -0
- package/dist/manifest/index.cjs +610 -0
- package/dist/manifest/index.d.ts +8 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +571 -0
- package/dist/manifest/manifest-v1.d.ts +102 -0
- package/dist/manifest/manifest-v1.d.ts.map +1 -0
- package/dist/manifest/manifest-v2.d.ts +253 -0
- package/dist/manifest/manifest-v2.d.ts.map +1 -0
- package/dist/manifest/stripe-app-manifest.d.ts +114 -0
- package/dist/manifest/stripe-app-manifest.d.ts.map +1 -0
- package/dist/schemas/index.cjs +20692 -0
- package/dist/schemas/index.d.ts +37 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +20656 -0
- package/dist/templates/diff-viewer/diff-generator.d.ts +22 -0
- package/dist/templates/diff-viewer/diff-generator.d.ts.map +1 -0
- package/dist/templates/diff-viewer/diff-prompt.d.ts +13 -0
- package/dist/templates/diff-viewer/diff-prompt.d.ts.map +1 -0
- package/dist/templates/diff-viewer/index.d.ts +7 -0
- package/dist/templates/diff-viewer/index.d.ts.map +1 -0
- package/dist/templates/diff-viewer/terminal-renderer.d.ts +29 -0
- package/dist/templates/diff-viewer/terminal-renderer.d.ts.map +1 -0
- package/dist/templates/diff-viewer/types.d.ts +58 -0
- package/dist/templates/diff-viewer/types.d.ts.map +1 -0
- package/dist/templates/extensions/base.d.ts +23 -0
- package/dist/templates/extensions/base.d.ts.map +1 -0
- package/dist/templates/extensions/billing.bill.discount_calculation.d.ts +6 -0
- package/dist/templates/extensions/billing.bill.discount_calculation.d.ts.map +1 -0
- package/dist/templates/extensions/billing.customer_balance_application.d.ts +6 -0
- package/dist/templates/extensions/billing.customer_balance_application.d.ts.map +1 -0
- package/dist/templates/extensions/billing.invoice_collection_setting.d.ts +6 -0
- package/dist/templates/extensions/billing.invoice_collection_setting.d.ts.map +1 -0
- package/dist/templates/extensions/billing.prorations.d.ts +6 -0
- package/dist/templates/extensions/billing.prorations.d.ts.map +1 -0
- package/dist/templates/extensions/billing.recurring_billing_item_handling.d.ts +6 -0
- package/dist/templates/extensions/billing.recurring_billing_item_handling.d.ts.map +1 -0
- package/dist/templates/extensions/core.workflows.custom_action.d.ts +6 -0
- package/dist/templates/extensions/core.workflows.custom_action.d.ts.map +1 -0
- package/dist/templates/extensions/extend.objects.custom_objects.d.ts +6 -0
- package/dist/templates/extensions/extend.objects.custom_objects.d.ts.map +1 -0
- package/dist/templates/extensions/extend.workflows.custom_action.d.ts +6 -0
- package/dist/templates/extensions/extend.workflows.custom_action.d.ts.map +1 -0
- package/dist/templates/extensions/index.d.ts +13 -0
- package/dist/templates/extensions/index.d.ts.map +1 -0
- package/dist/templates/extensions/registry.d.ts +10 -0
- package/dist/templates/extensions/registry.d.ts.map +1 -0
- package/dist/templates/extensions/types.d.ts +104 -0
- package/dist/templates/extensions/types.d.ts.map +1 -0
- package/dist/templates/file-writer.d.ts +140 -0
- package/dist/templates/file-writer.d.ts.map +1 -0
- package/dist/templates/fs/_impl.d.ts +29 -0
- package/dist/templates/fs/_impl.d.ts.map +1 -0
- package/dist/templates/fs/filesystem.d.ts +8 -0
- package/dist/templates/fs/filesystem.d.ts.map +1 -0
- package/dist/templates/fs/in-memory.d.ts +9 -0
- package/dist/templates/fs/in-memory.d.ts.map +1 -0
- package/dist/templates/fs/index.d.ts +25 -0
- package/dist/templates/fs/index.d.ts.map +1 -0
- package/dist/templates/fs-utils.d.ts +17 -0
- package/dist/templates/fs-utils.d.ts.map +1 -0
- package/dist/templates/index.cjs +2248 -0
- package/dist/templates/index.d.ts +32 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +2203 -0
- package/dist/templates/root/index.d.ts +60 -0
- package/dist/templates/root/index.d.ts.map +1 -0
- package/dist/templates/simple-templates.d.ts +8 -0
- package/dist/templates/simple-templates.d.ts.map +1 -0
- package/dist/templates/template-manager.d.ts +8 -0
- package/dist/templates/template-manager.d.ts.map +1 -0
- package/dist/templates/types.d.ts +9 -0
- package/dist/templates/types.d.ts.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/workspace/index.cjs +3756 -0
- package/dist/workspace/index.d.ts +336 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +3731 -0
- package/package.json +137 -0
- package/templates/extensions/billing.bill.discount_calculation/index.test.ts +15 -0
- package/templates/extensions/billing.bill.discount_calculation/index.ts +20 -0
- package/templates/extensions/billing.customer_balance_application/index.test.ts +15 -0
- package/templates/extensions/billing.customer_balance_application/index.ts +18 -0
- package/templates/extensions/billing.invoice_collection_setting/index.test.ts +15 -0
- package/templates/extensions/billing.invoice_collection_setting/index.ts +16 -0
- package/templates/extensions/billing.prorations/index.test.ts +15 -0
- package/templates/extensions/billing.prorations/index.ts +18 -0
- package/templates/extensions/billing.recurring_billing_item_handling/index.test.ts +15 -0
- package/templates/extensions/billing.recurring_billing_item_handling/index.ts +42 -0
- package/templates/extensions/common/.prettierignore +3 -0
- package/templates/extensions/common/eslint.config.mts.mustache +95 -0
- package/templates/extensions/common/package.json.mustache +26 -0
- package/templates/extensions/common/tsconfig.build.json.mustache +15 -0
- package/templates/extensions/common/tsconfig.json.mustache +16 -0
- package/templates/extensions/core.workflows.custom_action/custom_input.schema.json +6 -0
- package/templates/extensions/core.workflows.custom_action/index.test.ts +15 -0
- package/templates/extensions/core.workflows.custom_action/index.ts +31 -0
- package/templates/extensions/extend.workflows.custom_action/custom_input.schema.json +6 -0
- package/templates/extensions/extend.workflows.custom_action/index.test.ts +15 -0
- package/templates/extensions/extend.workflows.custom_action/index.ts +31 -0
- package/templates/root/.husky/pre-commit +1 -0
- package/templates/root/.prettierignore +5 -0
- package/templates/root/.prettierrc +7 -0
- package/templates/root/_gitignore +28 -0
- package/templates/root/custom-objects/package.json +20 -0
- package/templates/root/custom-objects/tsconfig.json +9 -0
- package/templates/root/eslint.config.mts +95 -0
- package/templates/root/package.json.mustache +32 -0
- package/templates/root/pnpm-workspace.yaml +7 -0
- package/templates/root/stripe-app.yaml.mustache +6 -0
- package/templates/root/tools/test.mts +38 -0
- package/templates/root/tsconfig.base.json +23 -0
- package/templates/root/tsconfig.json +15 -0
- package/templates/root/ui/package.json +17 -0
- package/templates/root/vitest.config.mts +47 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of checking whether a dependency is satisfied.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare interface _CheckResult {
|
|
6
|
+
/** Whether the dependency requirement is currently satisfied. */
|
|
7
|
+
satisfied: boolean;
|
|
8
|
+
/** The currently installed version, if any. */
|
|
9
|
+
currentVersion?: string;
|
|
10
|
+
/** Human-readable message describing the check result. */
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Shared context threaded through CLI operations.
|
|
16
|
+
*
|
|
17
|
+
* Carry this through call chains so that output can be redirected in tests
|
|
18
|
+
* without patching global `process.stdout`/`process.stderr`.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
declare interface _CliContext {
|
|
23
|
+
/** Output abstraction for writing to stdout/stderr. */
|
|
24
|
+
readonly ux: _CliUx;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Thin output abstraction used by CLI entry points and the functions they call.
|
|
29
|
+
*
|
|
30
|
+
* Inject a `_CliUx` constructed with `PassThrough` streams in tests to capture
|
|
31
|
+
* output without spying on `process.stdout`/`process.stderr`.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
declare class _CliUx {
|
|
36
|
+
#private;
|
|
37
|
+
constructor(options?: {
|
|
38
|
+
readonly stderr?: NodeJS.WritableStream;
|
|
39
|
+
readonly stdout?: NodeJS.WritableStream;
|
|
40
|
+
});
|
|
41
|
+
/** Write a product output line to stdout (or the configured stream). */
|
|
42
|
+
print(message: string): void;
|
|
43
|
+
/** Write a status/progress line to stderr (or the configured stream). */
|
|
44
|
+
log(message: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Error message to **stderr** (or the configured stderr stream).
|
|
47
|
+
*
|
|
48
|
+
* Behaviorally identical to {@link _CliUx.log} today. Use `error()` for failures
|
|
49
|
+
* and `log()` for progress/status — the distinction supports future
|
|
50
|
+
* formatting differentiation (color, prefixes, severity filtering).
|
|
51
|
+
*/
|
|
52
|
+
error(message: string): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Options for committing accumulated dependency changes.
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
export declare interface _CommitOptions {
|
|
60
|
+
/** If true, run package manager install for npm deps. Default: true */
|
|
61
|
+
runInstall?: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Summary of changes applied by a dependency manager commit.
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export declare interface _CommitResult {
|
|
69
|
+
/** Number of new dependencies added. */
|
|
70
|
+
added: number;
|
|
71
|
+
/** Number of existing dependencies updated. */
|
|
72
|
+
updated: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Result of checking whether a dependency version conflicts with an existing installation.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export declare interface _ConflictResult {
|
|
80
|
+
/** Whether a version conflict exists. */
|
|
81
|
+
hasConflict: boolean;
|
|
82
|
+
/** The version currently installed, if any. */
|
|
83
|
+
existingVersion?: string;
|
|
84
|
+
/** The version being requested, if applicable. */
|
|
85
|
+
requestedVersion?: string;
|
|
86
|
+
/** Human-readable message describing the conflict, if any. */
|
|
87
|
+
message?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A dependency that the workspace needs: npm runtime, npm dev, or Stripe CLI plugin.
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
export declare type _Dependency = _DevNpmDependency | _NpmDependency | _StripeCliPluginDependency;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* The action to take for a dependency: add new, update existing, no-op, or flag a conflict.
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
export declare type _DependencyAction = 'add' | 'already-satisfied' | 'conflict' | 'update';
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Handler interface for a specific dependency type (npm or Stripe CLI plugin).
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
export declare interface _DependencyHandler<T extends _Dependency> {
|
|
107
|
+
/** Check if dependency is satisfied */
|
|
108
|
+
check(dep: T): Promise<_CheckResult>;
|
|
109
|
+
/** Check for conflicts with existing state */
|
|
110
|
+
checkConflict(dep: T): Promise<_ConflictResult>;
|
|
111
|
+
/** Add the dependency (update package.json for npm, noop for stripe cli) */
|
|
112
|
+
add(dep: T): Promise<{
|
|
113
|
+
action: 'add' | 'update';
|
|
114
|
+
message: string;
|
|
115
|
+
}>;
|
|
116
|
+
/** Run actual install (npm install for npm deps, stripe plugin install for cli) */
|
|
117
|
+
install(deps: T[]): Promise<void>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Orchestrates dependency analysis and installation across all dependency types.
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
export declare class _DependencyManager {
|
|
125
|
+
private readonly cwd;
|
|
126
|
+
private readonly stripeConfigDir;
|
|
127
|
+
private readonly quiet;
|
|
128
|
+
private readonly context;
|
|
129
|
+
private readonly npmHandler;
|
|
130
|
+
private readonly devNpmHandler;
|
|
131
|
+
private readonly stripeCliPluginHandler;
|
|
132
|
+
/** Internal state: pending changes indexed by dependency key */
|
|
133
|
+
private pendingChanges;
|
|
134
|
+
/** Whether commit() has been called */
|
|
135
|
+
private committed;
|
|
136
|
+
constructor(options?: _DependencyManagerOptions);
|
|
137
|
+
/**
|
|
138
|
+
* Analyze dependencies and accumulate changes.
|
|
139
|
+
* Can be called multiple times before commit().
|
|
140
|
+
* Returns the changes for this specific call.
|
|
141
|
+
*/
|
|
142
|
+
ensureDependencies(input: _EnsureDependenciesInput): Promise<_PendingChange[]>;
|
|
143
|
+
/**
|
|
144
|
+
* Resolve a conflict by marking it for force install.
|
|
145
|
+
* Throws if the dependency is not in conflict state.
|
|
146
|
+
*/
|
|
147
|
+
resolveConflict(dep: _Dependency): void;
|
|
148
|
+
/**
|
|
149
|
+
* Get all pending changes (accumulated across all ensureDependencies calls).
|
|
150
|
+
*/
|
|
151
|
+
getPendingChanges(): _PendingChange[];
|
|
152
|
+
/**
|
|
153
|
+
* Commit all accumulated changes.
|
|
154
|
+
* - For npm deps: updates package.json, optionally runs package manager install
|
|
155
|
+
* - For Stripe CLI deps: always installs (no separate add step)
|
|
156
|
+
*
|
|
157
|
+
* @param options - Commit options. `options.runInstall`: if true, run package manager install for npm deps (default: true)
|
|
158
|
+
* @returns Summary of changes made
|
|
159
|
+
* @throws If called more than once
|
|
160
|
+
*/
|
|
161
|
+
commit(options?: _CommitOptions): Promise<_CommitResult>;
|
|
162
|
+
private analyzeDependency;
|
|
163
|
+
private getHandler;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Options for constructing a dependency manager.
|
|
168
|
+
* @internal
|
|
169
|
+
*/
|
|
170
|
+
export declare interface _DependencyManagerOptions {
|
|
171
|
+
/** Working directory (defaults to process.cwd()) */
|
|
172
|
+
cwd?: string;
|
|
173
|
+
/** Path to Stripe config directory (defaults to ~/.config/stripe) */
|
|
174
|
+
stripeConfigDir?: string;
|
|
175
|
+
/** Whether to suppress console output */
|
|
176
|
+
quiet?: boolean;
|
|
177
|
+
/** CLI context for user-facing output */
|
|
178
|
+
context?: _CliContext;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Detect the package manager used in the workspace by looking for lockfiles.
|
|
183
|
+
* @internal
|
|
184
|
+
*/
|
|
185
|
+
export declare function _detectPackageManager(cwd: string): _PackageManager;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Create a dev npm dependency descriptor.
|
|
189
|
+
* @internal
|
|
190
|
+
*/
|
|
191
|
+
export declare function _devNpmDep(name: string, version: string): _DevNpmDependency;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* A dev npm dependency to add to `devDependencies` in package.json.
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
export declare interface _DevNpmDependency {
|
|
198
|
+
/** Discriminant tag identifying this as a dev npm dependency. */
|
|
199
|
+
type: 'dev-npm';
|
|
200
|
+
/** npm package name. */
|
|
201
|
+
name: string;
|
|
202
|
+
/** Semver version range. */
|
|
203
|
+
version: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Input for requesting dependency installation.
|
|
208
|
+
* @internal
|
|
209
|
+
*/
|
|
210
|
+
export declare interface _EnsureDependenciesInput {
|
|
211
|
+
/** Dependencies that must be present. */
|
|
212
|
+
required: _Dependency[];
|
|
213
|
+
/** Dependencies that are preferred but not required. */
|
|
214
|
+
optional?: _Dependency[];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Create a runtime npm dependency descriptor.
|
|
219
|
+
* @internal
|
|
220
|
+
*/
|
|
221
|
+
export declare function _npmDep(name: string, version: string): _NpmDependency;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* A runtime npm dependency to add to `dependencies` in package.json.
|
|
225
|
+
* @internal
|
|
226
|
+
*/
|
|
227
|
+
export declare interface _NpmDependency {
|
|
228
|
+
/** Discriminant tag identifying this as a runtime npm dependency. */
|
|
229
|
+
type: 'npm';
|
|
230
|
+
/** npm package name. */
|
|
231
|
+
name: string;
|
|
232
|
+
/** Semver version range. */
|
|
233
|
+
version: string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Handles npm and dev-npm dependency installation via package.json updates.
|
|
238
|
+
* @internal
|
|
239
|
+
*/
|
|
240
|
+
export declare class _NpmDependencyHandler implements _DependencyHandler<_NpmDependency | _DevNpmDependency> {
|
|
241
|
+
private readonly cwd;
|
|
242
|
+
private readonly quiet;
|
|
243
|
+
private readonly devDependencies;
|
|
244
|
+
private readonly context;
|
|
245
|
+
constructor(options: _NpmHandlerOptions);
|
|
246
|
+
private get dependencyKey();
|
|
247
|
+
private get dependencyLabel();
|
|
248
|
+
/** Check whether the npm dependency is already present in package.json. */
|
|
249
|
+
check(dep: _DevNpmDependency | _NpmDependency): Promise<_CheckResult>;
|
|
250
|
+
/** Check whether the requested version conflicts with the currently installed version. */
|
|
251
|
+
checkConflict(dep: _DevNpmDependency | _NpmDependency): Promise<_ConflictResult>;
|
|
252
|
+
/** Add or update the npm dependency in package.json. */
|
|
253
|
+
add(dep: _DevNpmDependency | _NpmDependency): Promise<{
|
|
254
|
+
action: 'add' | 'update';
|
|
255
|
+
message: string;
|
|
256
|
+
}>;
|
|
257
|
+
/** Run the package manager install command in the working directory. */
|
|
258
|
+
install(_deps: (_DevNpmDependency | _NpmDependency)[]): Promise<void>;
|
|
259
|
+
private versionsCompatible;
|
|
260
|
+
private extractMajorVersion;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Options for constructing an npm dependency handler.
|
|
265
|
+
* @internal
|
|
266
|
+
*/
|
|
267
|
+
export declare interface _NpmHandlerOptions {
|
|
268
|
+
/** Working directory containing the target package.json. */
|
|
269
|
+
cwd: string;
|
|
270
|
+
/** Whether to suppress console output. */
|
|
271
|
+
quiet: boolean;
|
|
272
|
+
/** If true, manage devDependencies; otherwise manage dependencies. */
|
|
273
|
+
devDependencies?: boolean;
|
|
274
|
+
/** CLI context for user-facing output. */
|
|
275
|
+
context?: _CliContext;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Package manager detected in the workspace.
|
|
280
|
+
* @internal
|
|
281
|
+
*/
|
|
282
|
+
export declare type _PackageManager = 'npm' | 'pnpm' | 'yarn';
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* A pending dependency change accumulated by the dependency manager before commit.
|
|
286
|
+
* @internal
|
|
287
|
+
*/
|
|
288
|
+
export declare interface _PendingChange {
|
|
289
|
+
/** The dependency this change applies to. */
|
|
290
|
+
dependency: _Dependency;
|
|
291
|
+
/** The action that will be taken for this dependency. */
|
|
292
|
+
action: _DependencyAction;
|
|
293
|
+
/** Human-readable message describing the pending change. */
|
|
294
|
+
message: string;
|
|
295
|
+
/** The previously installed version, if an update is involved. */
|
|
296
|
+
previousVersion?: string;
|
|
297
|
+
/** Conflict details when action is 'conflict'. */
|
|
298
|
+
conflict?: _ConflictResult;
|
|
299
|
+
/** Whether conflict has been resolved (force install) */
|
|
300
|
+
conflictResolved?: boolean;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Create a Stripe CLI plugin dependency descriptor.
|
|
305
|
+
* @internal
|
|
306
|
+
*/
|
|
307
|
+
export declare function _stripeCliPluginDep(name: string, minVersion?: string): _StripeCliPluginDependency;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* A Stripe CLI plugin dependency that must be installed via `stripe plugin install`.
|
|
311
|
+
* @internal
|
|
312
|
+
*/
|
|
313
|
+
export declare interface _StripeCliPluginDependency {
|
|
314
|
+
/** Discriminant tag identifying this as a Stripe CLI plugin dependency. */
|
|
315
|
+
type: 'stripe-cli-plugin';
|
|
316
|
+
/** Plugin shortname (e.g., `extensibility`). */
|
|
317
|
+
name: string;
|
|
318
|
+
/** Minimum required semver version of the plugin. */
|
|
319
|
+
minVersion?: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Handles Stripe CLI plugin installation via `stripe plugin install`.
|
|
324
|
+
* @internal
|
|
325
|
+
*/
|
|
326
|
+
export declare class _StripeCliPluginHandler implements _DependencyHandler<_StripeCliPluginDependency> {
|
|
327
|
+
private readonly stripeConfigDir;
|
|
328
|
+
private readonly quiet;
|
|
329
|
+
private readonly context;
|
|
330
|
+
constructor(options: _StripeCliPluginHandlerOptions);
|
|
331
|
+
/** Check whether the Stripe CLI plugin is installed and meets the minimum version. */
|
|
332
|
+
check(dep: _StripeCliPluginDependency): Promise<_CheckResult>;
|
|
333
|
+
/** Check whether the installed plugin version conflicts with the requested minimum. */
|
|
334
|
+
checkConflict(dep: _StripeCliPluginDependency): Promise<_ConflictResult>;
|
|
335
|
+
/** Stage a Stripe CLI plugin for installation; the actual install happens in `install`. */
|
|
336
|
+
add(dep: _StripeCliPluginDependency): Promise<{
|
|
337
|
+
action: 'add' | 'update';
|
|
338
|
+
message: string;
|
|
339
|
+
}>;
|
|
340
|
+
/** Install Stripe CLI plugins using `stripe plugin install`. */
|
|
341
|
+
install(deps: _StripeCliPluginDependency[]): Promise<void>;
|
|
342
|
+
private findPluginInToml;
|
|
343
|
+
/**
|
|
344
|
+
* Check if installed version satisfies the required minimum version.
|
|
345
|
+
*
|
|
346
|
+
* Permissive policy: Non-semver versions (e.g., "local.build.dev", "dev", "canary-abc123")
|
|
347
|
+
* always satisfy version requirements. This avoids forcing upgrades during local development
|
|
348
|
+
* when developers are using locally built plugins.
|
|
349
|
+
*
|
|
350
|
+
* For valid semver versions, uses the semver library for proper semantic version comparison.
|
|
351
|
+
*
|
|
352
|
+
* @param installed - The installed version string
|
|
353
|
+
* @param required - The required minimum version string
|
|
354
|
+
* @returns true if installed version satisfies requirement
|
|
355
|
+
*/
|
|
356
|
+
private isVersionSatisfied;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Options for constructing a Stripe CLI plugin dependency handler.
|
|
361
|
+
* @internal
|
|
362
|
+
*/
|
|
363
|
+
export declare interface _StripeCliPluginHandlerOptions {
|
|
364
|
+
/** Path to the Stripe CLI config directory (e.g., `~/.config/stripe`). */
|
|
365
|
+
stripeConfigDir: string;
|
|
366
|
+
/** Whether to suppress console output. */
|
|
367
|
+
quiet: boolean;
|
|
368
|
+
/** CLI context for user-facing output. */
|
|
369
|
+
context?: _CliContext;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export { }
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* Excluded from this release type: _CheckResult */
|
|
2
|
+
|
|
3
|
+
/* Excluded from this release type: _CliContext */
|
|
4
|
+
|
|
5
|
+
/* Excluded from this release type: _CliUx */
|
|
6
|
+
|
|
7
|
+
/* Excluded from this release type: _CommitOptions */
|
|
8
|
+
|
|
9
|
+
/* Excluded from this release type: _CommitResult */
|
|
10
|
+
|
|
11
|
+
/* Excluded from this release type: _ConflictResult */
|
|
12
|
+
|
|
13
|
+
/* Excluded from this release type: _Dependency */
|
|
14
|
+
|
|
15
|
+
/* Excluded from this release type: _DependencyAction */
|
|
16
|
+
|
|
17
|
+
/* Excluded from this release type: _DependencyHandler */
|
|
18
|
+
|
|
19
|
+
/* Excluded from this release type: _DependencyManager */
|
|
20
|
+
|
|
21
|
+
/* Excluded from this release type: _DependencyManagerOptions */
|
|
22
|
+
|
|
23
|
+
/* Excluded from this release type: _detectPackageManager */
|
|
24
|
+
|
|
25
|
+
/* Excluded from this release type: _devNpmDep */
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: _DevNpmDependency */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: _EnsureDependenciesInput */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: _npmDep */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: _NpmDependency */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: _NpmDependencyHandler */
|
|
36
|
+
|
|
37
|
+
/* Excluded from this release type: _NpmHandlerOptions */
|
|
38
|
+
|
|
39
|
+
/* Excluded from this release type: _PackageManager */
|
|
40
|
+
|
|
41
|
+
/* Excluded from this release type: _PendingChange */
|
|
42
|
+
|
|
43
|
+
/* Excluded from this release type: _stripeCliPluginDep */
|
|
44
|
+
|
|
45
|
+
/* Excluded from this release type: _StripeCliPluginDependency */
|
|
46
|
+
|
|
47
|
+
/* Excluded from this release type: _StripeCliPluginHandler */
|
|
48
|
+
|
|
49
|
+
/* Excluded from this release type: _StripeCliPluginHandlerOptions */
|
|
50
|
+
|
|
51
|
+
export { }
|