@contractspec/example.integration-stripe 1.57.0 → 1.58.0

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 (53) hide show
  1. package/.turbo/turbo-build.log +40 -42
  2. package/.turbo/turbo-prebuild.log +1 -0
  3. package/CHANGELOG.md +13 -0
  4. package/dist/blueprint.d.ts +2 -6
  5. package/dist/blueprint.d.ts.map +1 -1
  6. package/dist/blueprint.js +61 -65
  7. package/dist/browser/blueprint.js +61 -0
  8. package/dist/browser/connection.sample.js +23 -0
  9. package/dist/browser/docs/index.js +39 -0
  10. package/dist/browser/docs/integration-stripe.docblock.js +39 -0
  11. package/dist/browser/example.js +33 -0
  12. package/dist/browser/index.js +261 -0
  13. package/dist/browser/tenant.js +55 -0
  14. package/dist/browser/workflow.js +54 -0
  15. package/dist/connection.sample.d.ts +2 -6
  16. package/dist/connection.sample.d.ts.map +1 -1
  17. package/dist/connection.sample.js +23 -21
  18. package/dist/docs/index.d.ts +2 -1
  19. package/dist/docs/index.d.ts.map +1 -0
  20. package/dist/docs/index.js +40 -1
  21. package/dist/docs/integration-stripe.docblock.d.ts +2 -1
  22. package/dist/docs/integration-stripe.docblock.d.ts.map +1 -0
  23. package/dist/docs/integration-stripe.docblock.js +37 -27
  24. package/dist/example.d.ts +2 -6
  25. package/dist/example.d.ts.map +1 -1
  26. package/dist/example.js +32 -44
  27. package/dist/index.d.ts +7 -6
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +262 -8
  30. package/dist/node/blueprint.js +61 -0
  31. package/dist/node/connection.sample.js +23 -0
  32. package/dist/node/docs/index.js +39 -0
  33. package/dist/node/docs/integration-stripe.docblock.js +39 -0
  34. package/dist/node/example.js +33 -0
  35. package/dist/node/index.js +261 -0
  36. package/dist/node/tenant.js +55 -0
  37. package/dist/node/workflow.js +54 -0
  38. package/dist/tenant.d.ts +2 -6
  39. package/dist/tenant.d.ts.map +1 -1
  40. package/dist/tenant.js +55 -52
  41. package/dist/workflow.d.ts +2 -6
  42. package/dist/workflow.d.ts.map +1 -1
  43. package/dist/workflow.js +54 -58
  44. package/package.json +85 -30
  45. package/tsdown.config.js +1 -2
  46. package/.turbo/turbo-build$colon$bundle.log +0 -42
  47. package/dist/blueprint.js.map +0 -1
  48. package/dist/connection.sample.js.map +0 -1
  49. package/dist/docs/integration-stripe.docblock.js.map +0 -1
  50. package/dist/example.js.map +0 -1
  51. package/dist/tenant.js.map +0 -1
  52. package/dist/workflow.js.map +0 -1
  53. package/tsconfig.tsbuildinfo +0 -1
@@ -1,43 +1,41 @@
1
- $ bun build:types && bun build:bundle
2
- $ tsc --noEmit
3
- $ tsdown
4
- ℹ tsdown v0.20.3 powered by rolldown v1.0.0-rc.3
5
- ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/integration-stripe/tsdown.config.js
6
- ℹ entry: src/blueprint.ts, src/connection.sample.ts, src/example.ts, src/index.ts, src/tenant.ts, src/workflow.ts, src/docs/index.ts, src/docs/integration-stripe.docblock.ts
7
- ℹ target: esnext
8
- ℹ tsconfig: tsconfig.json
9
- ℹ Build start
10
- ℹ dist/blueprint.js 1.72 kB │ gzip: 0.73 kB
11
- ℹ dist/docs/integration-stripe.docblock.js 1.59 kB │ gzip: 0.74 kB
12
- ℹ dist/workflow.js 1.35 kB │ gzip: 0.57 kB
13
- ℹ dist/tenant.js 1.29 kB │ gzip: 0.63 kB
14
- ℹ dist/example.js 1.03 kB │ gzip: 0.54 kB
15
- ℹ dist/connection.sample.js 0.60 kB │ gzip: 0.35 kB
16
- ℹ dist/index.js 0.41 kB │ gzip: 0.19 kB
17
- ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
18
- ℹ dist/blueprint.js.map 2.69 kB │ gzip: 1.10 kB
19
- ℹ dist/workflow.js.map 2.20 kB │ gzip: 0.84 kB
20
- ℹ dist/tenant.js.map 2.17 kB │ gzip: 0.98 kB
21
- ℹ dist/docs/integration-stripe.docblock.js.map 2.09 kB │ gzip: 0.93 kB
22
- ℹ dist/example.js.map 1.51 kB │ gzip: 0.73 kB
23
- ℹ dist/connection.sample.js.map 0.98 kB │ gzip: 0.52 kB
24
- ℹ dist/connection.sample.d.ts.map 0.14 kB │ gzip: 0.13 kB
25
- ℹ dist/example.d.ts.map 0.13 kB │ gzip: 0.13 kB
26
- ℹ dist/blueprint.d.ts.map 0.12 kB │ gzip: 0.12 kB
27
- ℹ dist/workflow.d.ts.map 0.12 kB │ gzip: 0.12 kB
28
- ℹ dist/tenant.d.ts.map 0.11 kB │ gzip: 0.12 kB
29
- ℹ dist/index.d.ts 0.39 kB │ gzip: 0.17 kB
30
- ℹ dist/connection.sample.d.ts 0.28 kB │ gzip: 0.17 kB
31
- ℹ dist/blueprint.d.ts 0.25 kB │ gzip: 0.17 kB
32
- ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
33
- ℹ dist/tenant.d.ts 0.25 kB │ gzip: 0.17 kB
34
- ℹ dist/workflow.d.ts 0.24 kB │ gzip: 0.16 kB
35
- ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
36
- ℹ dist/docs/integration-stripe.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
37
- ℹ 27 files, total: 21.99 kB
38
- [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugins. Here is a breakdown:
39
- - rolldown-plugin-dts:generate (55%)
40
- - tsdown:external (43%)
41
- See https://rolldown.rs/options/checks#plugintimings for more details.
1
+ $ contractspec-bun-build prebuild
2
+ $ bun run prebuild && bun run build:bundle && bun run build:types
3
+ $ contractspec-bun-build prebuild
4
+ $ contractspec-bun-build transpile
5
+ [contractspec-bun-build] transpile target=bun root=src entries=8
6
+ Bundled 8 modules in 36ms
42
7
 
43
- ✔ Build complete in 21365ms
8
+ ./blueprint.js 1.77 KB (entry point)
9
+ ./index.js 7.69 KB (entry point)
10
+ ./connection.sample.js 0.58 KB (entry point)
11
+ docs/index.js 1.59 KB (entry point)
12
+ docs/integration-stripe.docblock.js 1.59 KB (entry point)
13
+ ./example.js 1.0 KB (entry point)
14
+ ./tenant.js 1.34 KB (entry point)
15
+ ./workflow.js 1.41 KB (entry point)
16
+
17
+ [contractspec-bun-build] transpile target=node root=src entries=8
18
+ Bundled 8 modules in 26ms
19
+
20
+ ./blueprint.js 1.76 KB (entry point)
21
+ ./index.js 7.66 KB (entry point)
22
+ ./connection.sample.js 0.57 KB (entry point)
23
+ docs/index.js 1.57 KB (entry point)
24
+ docs/integration-stripe.docblock.js 1.57 KB (entry point)
25
+ ./example.js 1.0 KB (entry point)
26
+ ./tenant.js 1.33 KB (entry point)
27
+ ./workflow.js 1.40 KB (entry point)
28
+
29
+ [contractspec-bun-build] transpile target=browser root=src entries=8
30
+ Bundled 8 modules in 16ms
31
+
32
+ ./blueprint.js 1.76 KB (entry point)
33
+ ./index.js 7.66 KB (entry point)
34
+ ./connection.sample.js 0.57 KB (entry point)
35
+ docs/index.js 1.57 KB (entry point)
36
+ docs/integration-stripe.docblock.js 1.57 KB (entry point)
37
+ ./example.js 1.0 KB (entry point)
38
+ ./tenant.js 1.33 KB (entry point)
39
+ ./workflow.js 1.40 KB (entry point)
40
+
41
+ $ contractspec-bun-build types
@@ -0,0 +1 @@
1
+ $ contractspec-bun-build prebuild
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @contractspec/example.integration-stripe
2
2
 
3
+ ## 1.58.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d1f0fd0: chore: Migrate non-app package builds from tsdown to shared Bun tooling, add `@contractspec/tool.bun`, and standardize `prebuild`/`build`/`typecheck` with platform-aware exports and `tsc` declaration emission into `dist`.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [d1f0fd0]
12
+ - Updated dependencies [4355a9e]
13
+ - @contractspec/lib.contracts@1.58.0
14
+ - @contractspec/lib.schema@1.58.0
15
+
3
16
  ## 1.57.0
4
17
 
5
18
  ### Minor Changes
@@ -1,7 +1,3 @@
1
- import { AppBlueprintSpec } from "@contractspec/lib.contracts/app-config/spec";
2
-
3
- //#region src/blueprint.d.ts
4
- declare const artisanStripeBlueprint: AppBlueprintSpec;
5
- //#endregion
6
- export { artisanStripeBlueprint };
1
+ import type { AppBlueprintSpec } from '@contractspec/lib.contracts/app-config/spec';
2
+ export declare const artisanStripeBlueprint: AppBlueprintSpec;
7
3
  //# sourceMappingURL=blueprint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blueprint.d.ts","names":[],"sources":["../src/blueprint.ts"],"mappings":";;;cAOa,sBAAA,EAAwB,gBAAA"}
1
+ {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../src/blueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAOpF,eAAO,MAAM,sBAAsB,EAAE,gBAsDpC,CAAC"}
package/dist/blueprint.js CHANGED
@@ -1,66 +1,62 @@
1
- import { OwnersEnum, StabilityEnum, TagsEnum } from "@contractspec/lib.contracts/ownership";
2
-
3
- //#region src/blueprint.ts
4
- const artisanStripeBlueprint = {
5
- meta: {
6
- key: "artisan.payments.stripe",
7
- version: "1.0.0",
8
- appId: "artisan",
9
- title: "ArtisanOS Stripe Payments",
10
- description: "Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",
11
- domain: "payments",
12
- owners: [OwnersEnum.PlatformCore],
13
- tags: [
14
- TagsEnum.Marketplace,
15
- "stripe",
16
- "payments"
17
- ],
18
- stability: StabilityEnum.Experimental
19
- },
20
- capabilities: { enabled: [{
21
- key: "payments.psp",
22
- version: "1.0.0"
23
- }] },
24
- integrationSlots: [{
25
- slotId: "primary-payments",
26
- requiredCategory: "payments",
27
- allowedModes: ["managed", "byok"],
28
- requiredCapabilities: [{
29
- key: "payments.psp",
30
- version: "1.0.0"
31
- }],
32
- required: true,
33
- description: "Primary card processor slot. Bind the tenant Stripe connection here."
34
- }],
35
- branding: {
36
- appNameKey: "artisan.payments.appName",
37
- assets: [{
38
- type: "logo",
39
- url: "https://cdn.artisanos.dev/branding/logo.png"
40
- }, {
41
- type: "favicon",
42
- url: "https://cdn.artisanos.dev/branding/favicon.ico"
43
- }],
44
- colorTokens: {
45
- primary: "colors.brand.primary",
46
- secondary: "colors.brand.secondary"
47
- }
48
- },
49
- translationCatalog: {
50
- key: "artisan.payments.catalog",
51
- version: "1.0.0"
52
- },
53
- workflows: { collectPayment: {
54
- key: "artisan.payments.collectPayment",
55
- version: "1.0.0"
56
- } },
57
- policies: [{
58
- key: "artisan.payments.default",
59
- version: "1.0.0"
60
- }],
61
- notes: "Install this blueprint and pair it with the Stripe integration connection to enable card collection."
1
+ // @bun
2
+ // src/blueprint.ts
3
+ import {
4
+ OwnersEnum,
5
+ StabilityEnum,
6
+ TagsEnum
7
+ } from "@contractspec/lib.contracts/ownership";
8
+ var artisanStripeBlueprint = {
9
+ meta: {
10
+ key: "artisan.payments.stripe",
11
+ version: "1.0.0",
12
+ appId: "artisan",
13
+ title: "ArtisanOS Stripe Payments",
14
+ description: "Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",
15
+ domain: "payments",
16
+ owners: [OwnersEnum.PlatformCore],
17
+ tags: [TagsEnum.Marketplace, "stripe", "payments"],
18
+ stability: StabilityEnum.Experimental
19
+ },
20
+ capabilities: {
21
+ enabled: [{ key: "payments.psp", version: "1.0.0" }]
22
+ },
23
+ integrationSlots: [
24
+ {
25
+ slotId: "primary-payments",
26
+ requiredCategory: "payments",
27
+ allowedModes: ["managed", "byok"],
28
+ requiredCapabilities: [{ key: "payments.psp", version: "1.0.0" }],
29
+ required: true,
30
+ description: "Primary card processor slot. Bind the tenant Stripe connection here."
31
+ }
32
+ ],
33
+ branding: {
34
+ appNameKey: "artisan.payments.appName",
35
+ assets: [
36
+ { type: "logo", url: "https://cdn.artisanos.dev/branding/logo.png" },
37
+ {
38
+ type: "favicon",
39
+ url: "https://cdn.artisanos.dev/branding/favicon.ico"
40
+ }
41
+ ],
42
+ colorTokens: {
43
+ primary: "colors.brand.primary",
44
+ secondary: "colors.brand.secondary"
45
+ }
46
+ },
47
+ translationCatalog: {
48
+ key: "artisan.payments.catalog",
49
+ version: "1.0.0"
50
+ },
51
+ workflows: {
52
+ collectPayment: {
53
+ key: "artisan.payments.collectPayment",
54
+ version: "1.0.0"
55
+ }
56
+ },
57
+ policies: [{ key: "artisan.payments.default", version: "1.0.0" }],
58
+ notes: "Install this blueprint and pair it with the Stripe integration connection to enable card collection."
59
+ };
60
+ export {
61
+ artisanStripeBlueprint
62
62
  };
63
-
64
- //#endregion
65
- export { artisanStripeBlueprint };
66
- //# sourceMappingURL=blueprint.js.map
@@ -0,0 +1,61 @@
1
+ // src/blueprint.ts
2
+ import {
3
+ OwnersEnum,
4
+ StabilityEnum,
5
+ TagsEnum
6
+ } from "@contractspec/lib.contracts/ownership";
7
+ var artisanStripeBlueprint = {
8
+ meta: {
9
+ key: "artisan.payments.stripe",
10
+ version: "1.0.0",
11
+ appId: "artisan",
12
+ title: "ArtisanOS Stripe Payments",
13
+ description: "Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",
14
+ domain: "payments",
15
+ owners: [OwnersEnum.PlatformCore],
16
+ tags: [TagsEnum.Marketplace, "stripe", "payments"],
17
+ stability: StabilityEnum.Experimental
18
+ },
19
+ capabilities: {
20
+ enabled: [{ key: "payments.psp", version: "1.0.0" }]
21
+ },
22
+ integrationSlots: [
23
+ {
24
+ slotId: "primary-payments",
25
+ requiredCategory: "payments",
26
+ allowedModes: ["managed", "byok"],
27
+ requiredCapabilities: [{ key: "payments.psp", version: "1.0.0" }],
28
+ required: true,
29
+ description: "Primary card processor slot. Bind the tenant Stripe connection here."
30
+ }
31
+ ],
32
+ branding: {
33
+ appNameKey: "artisan.payments.appName",
34
+ assets: [
35
+ { type: "logo", url: "https://cdn.artisanos.dev/branding/logo.png" },
36
+ {
37
+ type: "favicon",
38
+ url: "https://cdn.artisanos.dev/branding/favicon.ico"
39
+ }
40
+ ],
41
+ colorTokens: {
42
+ primary: "colors.brand.primary",
43
+ secondary: "colors.brand.secondary"
44
+ }
45
+ },
46
+ translationCatalog: {
47
+ key: "artisan.payments.catalog",
48
+ version: "1.0.0"
49
+ },
50
+ workflows: {
51
+ collectPayment: {
52
+ key: "artisan.payments.collectPayment",
53
+ version: "1.0.0"
54
+ }
55
+ },
56
+ policies: [{ key: "artisan.payments.default", version: "1.0.0" }],
57
+ notes: "Install this blueprint and pair it with the Stripe integration connection to enable card collection."
58
+ };
59
+ export {
60
+ artisanStripeBlueprint
61
+ };
@@ -0,0 +1,23 @@
1
+ // src/connection.sample.ts
2
+ var stripeLiveConnection = {
3
+ meta: {
4
+ id: "conn-stripe-live",
5
+ tenantId: "artisan-co",
6
+ integrationKey: "payments.stripe",
7
+ integrationVersion: "1",
8
+ label: "Stripe Production",
9
+ environment: "production",
10
+ createdAt: "2026-01-01T00:00:00.000Z",
11
+ updatedAt: "2026-01-01T00:00:00.000Z"
12
+ },
13
+ ownershipMode: "managed",
14
+ config: {
15
+ accountId: "acct_xxx"
16
+ },
17
+ secretProvider: "vault",
18
+ secretRef: "vault://integrations/artisan-co/conn-stripe-live",
19
+ status: "connected"
20
+ };
21
+ export {
22
+ stripeLiveConnection
23
+ };
@@ -0,0 +1,39 @@
1
+ // src/docs/integration-stripe.docblock.ts
2
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
3
+ var blocks = [
4
+ {
5
+ id: "docs.examples.integration-stripe",
6
+ title: "Integration Example — Stripe Payments",
7
+ summary: "How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/examples/integration-stripe",
11
+ tags: ["stripe", "payments", "integrations", "example"],
12
+ body: `## Included
13
+ - App blueprint enabling \`payments.psp\` capability.
14
+ - Workflow invoking Stripe operations (prepare → charge → confirm).
15
+ - Tenant app config binding workflow to an IntegrationConnection.
16
+
17
+ ## Notes
18
+ - Secrets live in secret providers; connection config is non-secret.
19
+ - Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
20
+ },
21
+ {
22
+ id: "docs.examples.integration-stripe.usage",
23
+ title: "Stripe Integration Example — Usage",
24
+ summary: "How to use the blueprint, workflow, and tenant config together.",
25
+ kind: "usage",
26
+ visibility: "public",
27
+ route: "/docs/examples/integration-stripe/usage",
28
+ tags: ["stripe", "usage"],
29
+ body: `## Usage
30
+ 1) Register the blueprint + workflow + catalog in your registry.
31
+ 2) Persist an IntegrationConnection (see connection sample).
32
+ 3) Bind the tenant app config to the connection.
33
+
34
+ ## Guardrails
35
+ - Never log secrets.
36
+ - Keep payment semantics spec-defined; gate breaking changes behind flags.`
37
+ }
38
+ ];
39
+ registerDocBlocks(blocks);
@@ -0,0 +1,39 @@
1
+ // src/docs/integration-stripe.docblock.ts
2
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
3
+ var blocks = [
4
+ {
5
+ id: "docs.examples.integration-stripe",
6
+ title: "Integration Example — Stripe Payments",
7
+ summary: "How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/examples/integration-stripe",
11
+ tags: ["stripe", "payments", "integrations", "example"],
12
+ body: `## Included
13
+ - App blueprint enabling \`payments.psp\` capability.
14
+ - Workflow invoking Stripe operations (prepare → charge → confirm).
15
+ - Tenant app config binding workflow to an IntegrationConnection.
16
+
17
+ ## Notes
18
+ - Secrets live in secret providers; connection config is non-secret.
19
+ - Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
20
+ },
21
+ {
22
+ id: "docs.examples.integration-stripe.usage",
23
+ title: "Stripe Integration Example — Usage",
24
+ summary: "How to use the blueprint, workflow, and tenant config together.",
25
+ kind: "usage",
26
+ visibility: "public",
27
+ route: "/docs/examples/integration-stripe/usage",
28
+ tags: ["stripe", "usage"],
29
+ body: `## Usage
30
+ 1) Register the blueprint + workflow + catalog in your registry.
31
+ 2) Persist an IntegrationConnection (see connection sample).
32
+ 3) Bind the tenant app config to the connection.
33
+
34
+ ## Guardrails
35
+ - Never log secrets.
36
+ - Keep payment semantics spec-defined; gate breaking changes behind flags.`
37
+ }
38
+ ];
39
+ registerDocBlocks(blocks);
@@ -0,0 +1,33 @@
1
+ // src/example.ts
2
+ import { defineExample } from "@contractspec/lib.contracts";
3
+ var example = defineExample({
4
+ meta: {
5
+ key: "integration-stripe",
6
+ version: "1.0.0",
7
+ title: "Integration — Stripe Payments",
8
+ description: "Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).",
9
+ kind: "integration",
10
+ visibility: "public",
11
+ stability: "experimental",
12
+ owners: ["@platform.core"],
13
+ tags: ["stripe", "payments", "integration", "blueprint", "workflow"]
14
+ },
15
+ docs: {
16
+ rootDocId: "docs.examples.integration-stripe",
17
+ usageDocId: "docs.examples.integration-stripe.usage"
18
+ },
19
+ entrypoints: {
20
+ packageName: "@contractspec/example.integration-stripe",
21
+ docs: "./docs"
22
+ },
23
+ surfaces: {
24
+ templates: true,
25
+ sandbox: { enabled: true, modes: ["markdown", "specs"] },
26
+ studio: { enabled: true, installable: true },
27
+ mcp: { enabled: true }
28
+ }
29
+ });
30
+ var example_default = example;
31
+ export {
32
+ example_default as default
33
+ };