@stacksjs/buddy 0.70.22 → 0.70.27

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 (130) hide show
  1. package/README.md +15 -23
  2. package/dist/cli.js +3 -1
  3. package/dist/index.js +449 -1
  4. package/dist/src/cli.d.ts +1 -0
  5. package/dist/src/commands/about.d.ts +2 -0
  6. package/dist/src/commands/auth.d.ts +2 -0
  7. package/dist/src/commands/build.d.ts +2 -0
  8. package/dist/src/commands/changelog.d.ts +2 -0
  9. package/dist/src/commands/clean.d.ts +2 -0
  10. package/dist/src/commands/cloud.d.ts +2 -0
  11. package/dist/src/commands/commit.d.ts +2 -0
  12. package/dist/src/commands/completion.d.ts +2 -0
  13. package/dist/src/commands/config-migrate.d.ts +26 -0
  14. package/dist/src/commands/configure.d.ts +2 -0
  15. package/dist/src/commands/create.d.ts +2 -0
  16. package/dist/src/commands/deploy.d.ts +2 -0
  17. package/dist/{dev.d.ts → src/commands/dev.d.ts} +1 -3
  18. package/dist/src/commands/dns.d.ts +2 -0
  19. package/dist/src/commands/doctor.d.ts +2 -0
  20. package/dist/src/commands/domains.d.ts +2 -0
  21. package/dist/src/commands/email.d.ts +2 -0
  22. package/dist/src/commands/env.d.ts +2 -0
  23. package/dist/src/commands/fresh.d.ts +2 -0
  24. package/dist/src/commands/generate.d.ts +2 -0
  25. package/dist/src/commands/http.d.ts +2 -0
  26. package/dist/src/commands/index.d.ts +49 -0
  27. package/dist/src/commands/install.d.ts +2 -0
  28. package/dist/src/commands/key.d.ts +2 -0
  29. package/dist/src/commands/lint.d.ts +2 -0
  30. package/dist/src/commands/list.d.ts +2 -0
  31. package/dist/src/commands/mail.d.ts +2 -0
  32. package/dist/src/commands/make.d.ts +2 -0
  33. package/dist/src/commands/migrate.d.ts +2 -0
  34. package/dist/src/commands/outdated.d.ts +2 -0
  35. package/dist/src/commands/phone.d.ts +2 -0
  36. package/dist/src/commands/ports.d.ts +2 -0
  37. package/dist/src/commands/prepublish.d.ts +2 -0
  38. package/dist/src/commands/projects.d.ts +2 -0
  39. package/dist/src/commands/publish.d.ts +2 -0
  40. package/dist/src/commands/queue.d.ts +2 -0
  41. package/dist/src/commands/release.d.ts +2 -0
  42. package/dist/src/commands/route.d.ts +2 -0
  43. package/dist/src/commands/saas.d.ts +2 -0
  44. package/dist/src/commands/schedule.d.ts +2 -0
  45. package/dist/src/commands/search.d.ts +2 -0
  46. package/dist/src/commands/seed.d.ts +2 -0
  47. package/dist/src/commands/setup.d.ts +12 -0
  48. package/dist/src/commands/sms.d.ts +2 -0
  49. package/dist/src/commands/telemetry.d.ts +2 -0
  50. package/dist/src/commands/test.d.ts +2 -0
  51. package/dist/src/commands/tinker.d.ts +2 -0
  52. package/dist/src/commands/types.d.ts +2 -0
  53. package/dist/src/commands/upgrade.d.ts +2 -0
  54. package/dist/src/commands/version.d.ts +2 -0
  55. package/dist/src/index.d.ts +1 -0
  56. package/package.json +64 -61
  57. package/dist/add.d.ts +0 -4
  58. package/dist/build.d.ts +0 -4
  59. package/dist/changelog.d.ts +0 -3
  60. package/dist/chunk-0ddnkwwh.js +0 -2
  61. package/dist/chunk-0x2p8v0y.js +0 -8
  62. package/dist/chunk-10x00s2d.js +0 -3
  63. package/dist/chunk-1db0j2x1.js +0 -2
  64. package/dist/chunk-3aav7z7p.js +0 -15
  65. package/dist/chunk-3q6hnzy0.js +0 -2
  66. package/dist/chunk-5asbctb1.js +0 -2
  67. package/dist/chunk-6ct1erv4.js +0 -1
  68. package/dist/chunk-6v69415e.js +0 -2
  69. package/dist/chunk-83fm0fkc.js +0 -3
  70. package/dist/chunk-85qckawc.js +0 -10
  71. package/dist/chunk-8yy9tk7n.js +0 -25
  72. package/dist/chunk-9db6arkz.js +0 -5410
  73. package/dist/chunk-af959jta.js +0 -2
  74. package/dist/chunk-caqr6vy3.js +0 -2
  75. package/dist/chunk-cqrmkpzz.js +0 -8
  76. package/dist/chunk-ct356ajd.js +0 -2
  77. package/dist/chunk-f7vye9sd.js +0 -2
  78. package/dist/chunk-fdxzeydh.js +0 -1
  79. package/dist/chunk-fshxe4zp.js +0 -10
  80. package/dist/chunk-gx994ec4.js +0 -35
  81. package/dist/chunk-h124zbs5.js +0 -6
  82. package/dist/chunk-jex4n4zt.js +0 -55
  83. package/dist/chunk-nhsag58c.js +0 -2
  84. package/dist/chunk-nrk7cdfz.js +0 -2
  85. package/dist/chunk-p9h1e4xh.js +0 -2
  86. package/dist/chunk-qn0s5yy0.js +0 -5
  87. package/dist/chunk-qw71q60g.js +0 -2
  88. package/dist/chunk-tcf9cf6h.js +0 -3
  89. package/dist/chunk-v10ahksj.js +0 -2
  90. package/dist/chunk-vcq7jtzy.js +0 -240
  91. package/dist/chunk-vsgj9f0h.js +0 -2
  92. package/dist/chunk-wwzkw4by.js +0 -33
  93. package/dist/clean.d.ts +0 -3
  94. package/dist/cli.d.ts +0 -4
  95. package/dist/cloud.d.ts +0 -3
  96. package/dist/commit.d.ts +0 -3
  97. package/dist/configure.d.ts +0 -4
  98. package/dist/create.d.ts +0 -8
  99. package/dist/custom-cli.d.ts +0 -1
  100. package/dist/deploy.d.ts +0 -7
  101. package/dist/dns.d.ts +0 -18
  102. package/dist/domains.d.ts +0 -3
  103. package/dist/env.d.ts +0 -20
  104. package/dist/fresh.d.ts +0 -3
  105. package/dist/generate.d.ts +0 -3
  106. package/dist/http.d.ts +0 -6
  107. package/dist/index.d.ts +0 -1
  108. package/dist/install.d.ts +0 -3
  109. package/dist/key.d.ts +0 -3
  110. package/dist/lint.d.ts +0 -3
  111. package/dist/list.d.ts +0 -3
  112. package/dist/make.d.ts +0 -1
  113. package/dist/migrate.d.ts +0 -3
  114. package/dist/outdated.d.ts +0 -3
  115. package/dist/ports.d.ts +0 -6
  116. package/dist/prepublish.d.ts +0 -3
  117. package/dist/projects.d.ts +0 -3
  118. package/dist/queue.d.ts +0 -3
  119. package/dist/release.d.ts +0 -9
  120. package/dist/route.d.ts +0 -3
  121. package/dist/saas.d.ts +0 -3
  122. package/dist/schedule.d.ts +0 -3
  123. package/dist/search.d.ts +0 -3
  124. package/dist/seed.d.ts +0 -3
  125. package/dist/setup.d.ts +0 -8
  126. package/dist/test.d.ts +0 -3
  127. package/dist/tinker.d.ts +0 -3
  128. package/dist/types.d.ts +0 -3
  129. package/dist/upgrade.d.ts +0 -4
  130. package/dist/version.d.ts +0 -3
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function about(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function auth(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function build(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function changelog(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function clean(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function cloud(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function commit(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function completion(buddy: CLI): void;
@@ -0,0 +1,26 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ /*.ts` files.
3
+ * Honors `--dry-run` (prints diffs without writing) and `--only=<id>`
4
+ * (restrict to a single codemod).
5
+ */
6
+ export declare function runConfigMigrations(opts: {
7
+ dryRun?: boolean
8
+ only?: string
9
+ }): Promise<{ changed: string[], skipped: string[] }>;
10
+ export declare function configMigrate(buddy: CLI): void;
11
+ /**
12
+ * A single config codemod — describes a search-and-replace operation
13
+ * against a user config file under `~/config/<file>.ts`. Each codemod
14
+ * is targeted at one specific Stacks-version transition (e.g. "0.65 →
15
+ * 0.66 renamed `cache.driver` to `cache.default`"). The replacement is
16
+ * a string transform — we deliberately avoid AST manipulation here
17
+ * because the input is user TS, comments matter, and we'd rather
18
+ * produce a textual diff than gamble on `ts-morph` reformatting code.
19
+ */
20
+ export declare interface ConfigCodemod {
21
+ id: string
22
+ description: string
23
+ files: string[]
24
+ shouldApply(content: string): boolean
25
+ apply(content: string): string
26
+ }
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function configure(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function create(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function deploy(buddy: CLI): void;
@@ -1,5 +1,3 @@
1
1
  import type { CLI, DevOptions } from '@stacksjs/types';
2
-
3
2
  export declare function dev(buddy: CLI): void;
4
- export declare function startDevelopmentServer(options: DevOptions): Promise<void>;
5
- declare function wantsInteractive(options: DevOptions): void;
3
+ export declare function startDevelopmentServer(options: DevOptions, startTime?: number): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function dns(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function doctor(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function domains(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function email(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function env(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function fresh(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function generate(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function http(buddy: CLI): void;
@@ -0,0 +1,49 @@
1
+ export * from './about';
2
+ export * from './auth';
3
+ export * from './build';
4
+ export * from './changelog';
5
+ export * from './clean';
6
+ export * from './cloud';
7
+ export * from './commit';
8
+ export * from './completion';
9
+ export * from './config-migrate';
10
+ export * from './configure';
11
+ export * from './create';
12
+ export * from './deploy';
13
+ export * from './dev';
14
+ export * from './dns';
15
+ export * from './doctor';
16
+ export * from './domains';
17
+ export * from './email';
18
+ export * from './env';
19
+ export * from './fresh';
20
+ export * from './generate';
21
+ export * from './http';
22
+ export * from './install';
23
+ export * from './key';
24
+ export * from './lint';
25
+ export * from './list';
26
+ export * from './mail';
27
+ export * from './make';
28
+ export * from './migrate';
29
+ export * from './outdated';
30
+ export * from './phone';
31
+ export * from './ports';
32
+ export * from './prepublish';
33
+ export * from './projects';
34
+ export * from './publish';
35
+ export * from './queue';
36
+ export * from './release';
37
+ export * from './route';
38
+ export * from './saas';
39
+ export * from './schedule';
40
+ export * from './search';
41
+ export * from './seed';
42
+ export * from './setup';
43
+ export * from './sms';
44
+ export * from './telemetry';
45
+ export * from './test';
46
+ export * from './tinker';
47
+ export * from './types';
48
+ export * from './upgrade';
49
+ export * from './version';
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function install(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function key(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function lint(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function list(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import { CLI } from '@stacksjs/clapp';
2
+ export declare function mailCommands(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function make(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function migrate(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function outdated(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function phone(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function ports(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function prepublish(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function projects(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function publish(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function queue(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function release(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function route(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function saas(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function schedule(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function search(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function seed(buddy: CLI): void;
@@ -0,0 +1,12 @@
1
+ import type { CLI, CliOptions } from '@stacksjs/types';
2
+ export declare function setup(buddy: CLI): void;
3
+ export declare function ensurePantryInstalled(): Promise<void>;
4
+ export declare function ensurePantryDependencies(cwd: string): Promise<void>;
5
+ export declare function ensureAppKey(cwd: string): Promise<void>;
6
+ /**
7
+ * Reads config/deps.ts dependencies and merges in environment-detected
8
+ * dependencies (e.g. DB_CONNECTION), then writes deps.yaml so pantry install
9
+ * picks up the correct packages.
10
+ */
11
+ export declare function optimizePantryDeps(): Promise<void>;
12
+ export declare function ensureEnvIsSet(options: CliOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function sms(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function telemetryCommand(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function test(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function tinker(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function types(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function upgrade(buddy: CLI): void;
@@ -0,0 +1,2 @@
1
+ import type { CLI } from '@stacksjs/types';
2
+ export declare function version(buddy: CLI): void;
@@ -0,0 +1 @@
1
+ export * from './commands';
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
- "version": "0.70.22",
4
+ "version": "0.70.27",
5
5
  "description": "Meet Buddy. The Stacks runtime.",
6
6
  "author": "Chris Breuer",
7
- "contributors": ["Chris Breuer <chris@stacksjs.org>"],
7
+ "contributors": [
8
+ "Chris Breuer <chris@stacksjs.com>"
9
+ ],
8
10
  "license": "MIT",
9
11
  "funding": "https://github.com/sponsors/chrisbbreuer",
10
12
  "homepage": "https://github.com/stacksjs/stacks/tree/main/stacks#readme",
@@ -20,7 +22,6 @@
20
22
  "stacks",
21
23
  "buddy",
22
24
  "runtime",
23
- "vite",
24
25
  "component",
25
26
  "composables",
26
27
  "functions",
@@ -38,10 +39,13 @@
38
39
  ],
39
40
  "exports": {
40
41
  ".": {
42
+ "types": "./dist/index.d.ts",
43
+ "bun": "./src/index.ts",
41
44
  "import": "./dist/index.js"
42
45
  },
43
46
  "./cli": {
44
47
  "types": "./dist/cli.d.ts",
48
+ "bun": "./src/cli.ts",
45
49
  "import": "./dist/cli.js"
46
50
  },
47
51
  "./*": {
@@ -56,17 +60,20 @@
56
60
  "buddy": "dist/cli.js",
57
61
  "bud": "dist/cli.js"
58
62
  },
59
- "files": ["README.md", "dist"],
63
+ "files": [
64
+ "README.md",
65
+ "dist"
66
+ ],
60
67
  "scripts": {
61
68
  "buddy": "bunx --bun ./src/cli.ts",
62
69
  "build": "bun build.ts",
63
- "compile": "bun build ./bin/cli.ts --compile --minify --sourcemap --outfile dist/buddy",
70
+ "compile": "bun build ./src/cli.ts --compile --minify --sourcemap --external=localtunnels/cloud --external=bun-queue --outfile dist/buddy",
64
71
  "compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
65
- "compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/buddy-linux-x64",
66
- "compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/buddy-linux-arm64",
67
- "compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/buddy-windows-x64.exe",
68
- "compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/buddy-darwin-x64",
69
- "compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/buddy-darwin-arm64",
72
+ "compile:linux-x64": "bun build ./src/cli.ts --compile --minify --target=bun-linux-x64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-linux-x64",
73
+ "compile:linux-arm64": "bun build ./src/cli.ts --compile --minify --target=bun-linux-arm64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-linux-arm64",
74
+ "compile:windows-x64": "bun build ./src/cli.ts --compile --minify --target=bun-windows-x64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-windows-x64.exe",
75
+ "compile:darwin-x64": "bun build ./src/cli.ts --compile --minify --target=bun-darwin-x64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-darwin-x64",
76
+ "compile:darwin-arm64": "bun build ./src/cli.ts --compile --minify --target=bun-darwin-arm64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-darwin-arm64",
70
77
  "typecheck": "bun tsc --noEmit",
71
78
  "zip:all": "bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:windows-x64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64",
72
79
  "zip:linux-x64": "zip -r bin/buddy-linux-x64.zip bin/buddy-linux-x64",
@@ -74,60 +81,56 @@
74
81
  "zip:windows-x64": "zip -r bin/buddy-windows-x64.zip bin/buddy-windows-x64.exe",
75
82
  "zip:darwin-x64": "zip -r bin/buddy-darwin-x64.zip bin/buddy-darwin-x64",
76
83
  "zip:darwin-arm64": "zip -r bin/buddy-darwin-arm64.zip bin/buddy-darwin-arm64",
77
- "prepublishOnly": "bun run build && bun run compile:all && bun run zip:all"
84
+ "prepublishOnly": "bun run build"
78
85
  },
79
86
  "dependencies": {
80
- "@stacksjs/actions": "0.70.18",
81
- "@stacksjs/ai": "0.70.18",
82
- "@stacksjs/alias": "0.70.18",
83
- "@stacksjs/arrays": "0.70.18",
84
- "@stacksjs/auth": "0.70.18",
85
- "@stacksjs/build": "0.70.18",
86
- "@stacksjs/cache": "0.70.18",
87
- "@stacksjs/cli": "0.70.18",
88
- "@stacksjs/cloud": "0.70.18",
89
- "@stacksjs/collections": "0.70.18",
90
- "@stacksjs/config": "0.70.18",
91
- "@stacksjs/database": "0.70.18",
92
- "@stacksjs/desktop": "0.70.18",
93
- "@stacksjs/development": "0.70.18",
94
- "@stacksjs/dns": "0.70.18",
95
- "@stacksjs/docs": "0.70.18",
96
- "@stacksjs/email": "0.70.18",
97
- "@stacksjs/enums": "0.70.18",
98
- "@stacksjs/error-handling": "0.70.18",
99
- "@stacksjs/events": "0.70.18",
100
- "@stacksjs/faker": "0.70.18",
101
- "@stacksjs/git": "0.70.18",
102
- "@stacksjs/health": "0.70.18",
103
- "@stacksjs/lint": "0.70.18",
104
- "@stacksjs/logging": "0.70.18",
105
- "@stacksjs/notifications": "0.70.18",
106
- "@stacksjs/objects": "0.70.18",
107
- "@stacksjs/orm": "0.70.18",
108
- "@stacksjs/path": "0.70.18",
109
- "@stacksjs/payments": "0.70.18",
110
- "@stacksjs/realtime": "0.70.18",
111
- "@stacksjs/router": "0.70.18",
112
- "@stacksjs/search-engine": "0.70.18",
113
- "@stacksjs/security": "0.70.18",
114
- "@stacksjs/server": "0.70.18",
115
- "@stacksjs/storage": "0.70.18",
116
- "@stacksjs/strings": "0.70.18",
117
- "@stacksjs/testing": "0.70.18",
118
- "@stacksjs/tunnel": "0.70.18",
119
- "@stacksjs/types": "0.70.18",
120
- "@stacksjs/ui": "0.70.18",
121
- "@stacksjs/utils": "0.70.18",
122
- "@stacksjs/validation": "0.70.18"
87
+ "@stacksjs/actions": "^0.70.23",
88
+ "@stacksjs/ai": "^0.70.23",
89
+ "@stacksjs/alias": "^0.70.23",
90
+ "@stacksjs/arrays": "^0.70.23",
91
+ "@stacksjs/auth": "^0.70.23",
92
+ "@stacksjs/build": "^0.70.23",
93
+ "@stacksjs/cache": "^0.70.23",
94
+ "@stacksjs/cli": "^0.70.23",
95
+ "@stacksjs/cloud": "^0.70.23",
96
+ "@stacksjs/collections": "^0.70.23",
97
+ "@stacksjs/config": "^0.70.23",
98
+ "@stacksjs/database": "^0.70.23",
99
+ "@stacksjs/desktop": "^0.70.23",
100
+ "@stacksjs/dns": "^0.70.23",
101
+ "@stacksjs/email": "^0.70.23",
102
+ "@stacksjs/enums": "^0.70.23",
103
+ "@stacksjs/error-handling": "^0.70.23",
104
+ "@stacksjs/events": "^0.70.23",
105
+ "@stacksjs/git": "^0.70.23",
106
+ "@stacksjs/health": "^0.70.23",
107
+ "@stacksjs/dnsx": "^0.2.3",
108
+ "@stacksjs/httx": "^0.1.10",
109
+ "@stacksjs/lint": "^0.70.23",
110
+ "@stacksjs/logging": "^0.70.23",
111
+ "@stacksjs/notifications": "^0.70.23",
112
+ "@stacksjs/objects": "^0.70.23",
113
+ "@stacksjs/orm": "^0.70.23",
114
+ "@stacksjs/path": "^0.70.23",
115
+ "@stacksjs/payments": "^0.70.23",
116
+ "@stacksjs/realtime": "^0.70.23",
117
+ "@stacksjs/router": "^0.70.23",
118
+ "@stacksjs/rpx": "^0.11.2",
119
+ "@stacksjs/search-engine": "^0.70.23",
120
+ "@stacksjs/security": "^0.70.23",
121
+ "@stacksjs/server": "^0.70.23",
122
+ "@stacksjs/storage": "^0.70.23",
123
+ "@stacksjs/strings": "^0.70.23",
124
+ "@stacksjs/testing": "^0.70.23",
125
+ "@stacksjs/tunnel": "^0.70.23",
126
+ "@stacksjs/types": "^0.70.23",
127
+ "@stacksjs/ui": "^0.70.23",
128
+ "@stacksjs/utils": "^0.70.23",
129
+ "@stacksjs/validation": "^0.70.23",
130
+ "@stacksjs/ts-cloud": "^0.2.15"
123
131
  },
124
132
  "devDependencies": {
125
- "@stacksjs/development": "0.70.18"
126
- },
127
- "config": {
128
- "commitizen": {
129
- "path": "node_modules/cz-git"
130
- }
133
+ "better-dx": "^0.2.12"
131
134
  },
132
135
  "web-types": "./web-types.json"
133
- }
136
+ }
package/dist/add.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import type { AddOptions, CLI } from '@stacksjs/types';
2
-
3
- export declare function add(buddy: CLI): void;
4
- declare function hasNoOptions(options: AddOptions): void;
package/dist/build.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import type { BuildOptions } from '@stacksjs/types';
2
-
3
- declare function s:(): void;
4
- declare function hasNoOptions(options: BuildOptions): void;
@@ -1,3 +0,0 @@
1
- import type { CLI } from '@stacksjs/types';
2
-
3
- export declare function changelog(buddy: CLI): void;
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ea as r,Fa as s}from"./chunk-cqrmkpzz.js";import"./chunk-6v69415e.js";import"./chunk-5asbctb1.js";export{s as stringifyJSONC,r as parseJSONC};
@@ -1,8 +0,0 @@
1
- import{Vc as X}from"./chunk-5asbctb1.js";var M=X((N,T)=>{var{defineProperty:B,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Z}=Object,$=Object.prototype.hasOwnProperty,H=(b,j)=>B(b,"name",{value:j,configurable:!0}),A=(b,j)=>{for(var q in j)B(b,q,{get:j[q],enumerable:!0})},D=(b,j,q,K)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let z of Z(j))if(!$.call(b,z)&&z!==q)B(b,z,{get:()=>j[z],enumerable:!(K=Y(j,z))||K.enumerable})}return b},E=(b)=>D(B({},"__esModule",{value:!0}),b),L={};A(L,{emitWarningIfUnsupportedVersion:()=>I,setCredentialFeature:()=>Q,setFeature:()=>R,state:()=>G});T.exports=E(L);var G={warningEmitted:!1},I=H((b)=>{if(b&&!G.warningEmitted&&parseInt(b.substring(1,b.indexOf(".")))<18)G.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
2
- no longer support Node.js 16.x on January 6, 2025.
3
-
4
- To continue receiving updates to AWS services, bug fixes, and security
5
- updates please upgrade to a supported Node.js LTS version.
6
-
7
- More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function Q(b,j,q){if(!b.$source)b.$source={};return b.$source[j]=q,b}H(Q,"setCredentialFeature");function R(b,j,q){if(!b.__aws_sdk_context)b.__aws_sdk_context={features:{}};else if(!b.__aws_sdk_context.features)b.__aws_sdk_context.features={};b.__aws_sdk_context.features[j]=q}H(R,"setFeature")});
8
- export{M as Rc};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{Jb as z,Kb as P}from"./chunk-p9h1e4xh.js";import"./chunk-6ct1erv4.js";import"./chunk-nhsag58c.js";import{Sc as D}from"./chunk-nrk7cdfz.js";import{Tc as _}from"./chunk-5asbctb1.js";var m=_(D(),1);import{parse as o}from"node:url";var K=_(D(),1);import{Buffer as a}from"node:buffer";import{request as n}from"node:http";function u(c){return new Promise((I,x)=>{let T=n({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let E=[];N.on("data",(y)=>{E.push(y)}),N.on("end",()=>{I(a.concat(E)),T.destroy()})}),T.end()})}var G=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",Q=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var uc=1000,Ec=0,X=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var f=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var v="AWS_CONTAINER_CREDENTIALS_FULL_URI",L="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",B="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kc=(c={})=>{let{timeout:I,maxRetries:x}=X(c);return()=>f(async()=>{let T=await d({logger:c.logger}),N=JSON.parse(await s(I,T));if(!G(N))throw new m.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return Q(N)},x)},s=async(c,I)=>{if(process.env[B])I.headers={...I.headers,Authorization:process.env[B]};return(await u({...I,timeout:c})).toString()},g="169.254.170.2",l={localhost:!0,"127.0.0.1":!0},r={"http:":!0,"https:":!0},d=async({logger:c})=>{if(process.env[L])return{hostname:g,path:process.env[L]};if(process.env[v]){let I=o(process.env[v]);if(!I.hostname||!(I.hostname in l))throw new m.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in r))throw new m.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new m.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${L} or ${v} environment variable is set`,{tryNextLink:!1,logger:c})};var q=_(D(),1);var U=_(D(),1);class Z extends U.CredentialsProviderError{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Z.prototype)}}var A;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(A||(A={}));var t={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var S;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(S||(S={}));var e="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",i="ec2_metadata_service_endpoint_mode",F={environmentVariableSelector:(c)=>c[e],configFileSelector:(c)=>c[i],default:S.IPv4};var W=async()=>P(await cc()||await Ic()),cc=async()=>z(t)(),Ic=async()=>{let c=await z(F)();switch(c){case S.IPv4:return A.IPv4;case S.IPv6:return A.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(S)}`)}};var b=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.
3
- For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var V=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=b(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=b(T,x);else throw O}return T=N,N}};var k="/latest/meta-data/iam/security-credentials/",Tc="/latest/api/token",H="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",oc=(c={})=>V(Nc(c),{logger:c.logger}),Nc=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=X(c),E=async(y,$)=>{if(I||$.headers?.[M]==null){let w=!1,h=!1,C=await z({environmentVariableSelector:(Y)=>{let j=Y[H];if(h=!!j&&j!=="false",j===void 0)throw new q.CredentialsProviderError(`${H} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{let j=Y[R];return w=!!j&&j!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||C){let Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${H})`);throw new Z(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let p=(await f(async()=>{let w;try{w=await Oc($)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return f(async()=>{let w;try{w=await yc(p,$,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{let y=await W();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E(O,{...y,timeout:N});else{let $;try{$=(await xc({...y,timeout:N})).toString()}catch(J){if(J?.statusCode===400)throw Object.assign(J,{message:"EC2 Metadata token request returned error"});else if(J.message==="TimeoutError"||[403,404,405].includes(J.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E(O,{...y,timeout:N})}return E(O,{...y,headers:{[M]:$},timeout:N})}}},xc=async(c)=>u({...c,path:Tc,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Oc=async(c)=>(await u({...c,path:k})).toString(),yc=async(c,I,x)=>{let T=JSON.parse((await u({...I,path:k+c})).toString());if(!G(T))throw new q.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return Q(T)};export{X as providerConfigFromInit,u as httpRequest,W as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,Kc as fromContainerMetadata,A as Endpoint,L as ENV_CMDS_RELATIVE_URI,v as ENV_CMDS_FULL_URI,B as ENV_CMDS_AUTH_TOKEN,uc as DEFAULT_TIMEOUT,Ec as DEFAULT_MAX_RETRIES};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$a as Le,Ab as se,Bb as te,Cb as Re,Db as Ee,Eb as ae,Fb as re,Gb as qe,Hb as Ie,Ib as Pe,ab as Me,bb as We,cb as Ae,db as Ke,eb as G,fb as O,gb as V,hb as N,ib as Qe,jb as ce,kb as ie,lb as B,mb as F,nb as le,ob as pe,pb as Xe,qb as Ye,rb as rs,sb as Ze,tb as ye,ub as me,vb as Ce,wb as he,xb as Te,yb as ve,zb as ke}from"./chunk-fdxzeydh.js";import{Jb as l,Kb as f}from"./chunk-p9h1e4xh.js";import{$b as Ge,Lb as Fe,Mb as Ue,Pb as je,Qb as ds,Rb as v,Ub as S,Vb as Ne,Wb as h,ac as u,bc as ge,cc as ue,dc as we,ec as $e,fc as Je,hc as fe,ic as ee,jc as i,kc as y,lc as es,mc as be,nc as xe}from"./chunk-qn0s5yy0.js";import{pc as Us,qc as D,tc as x}from"./chunk-8yy9tk7n.js";import"./chunk-85qckawc.js";import"./chunk-6ct1erv4.js";import"./chunk-nhsag58c.js";import"./chunk-0x2p8v0y.js";import"./chunk-nrk7cdfz.js";import{Tc as c}from"./chunk-5asbctb1.js";var p=c(D(),1);var U=c(x(),1);var $=async(e,s,t)=>{return{operation:B(s).operation,region:await F(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function ys(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}}function b(e){return{schemeId:"smithy.api#noAuth"}}var J=(e)=>{let s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(ys(e))}return s},I=(e)=>{let s=U.resolveAwsSdkSigV4Config(e);return Object.assign(s,{})};var P=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},_={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var L={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.777.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Se=c(x(),1);var de=c(x(),1),ne=c(D(),1);var M={["required"]:!1,type:"String"},W={["required"]:!0,default:!1,type:"Boolean"},A={["ref"]:"Endpoint"},C={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},j={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},n={},K={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},T={["ref"]:"PartitionResult"},Q={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[T,"supportsDualStack"]}]},X=[C],Y=[j],Z=[{["ref"]:"Region"}],hs={version:"1.0",parameters:{Region:M,UseDualStack:W,UseFIPS:W,Endpoint:M},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[A]}],rules:[{conditions:X,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:A,properties:n,headers:n},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Z}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Z,assign:"PartitionResult"}],rules:[{conditions:[C,j],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,K]},Q],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:X,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[K,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[T,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:n,headers:n},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[Q],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},H=hs;var us=new G({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),g=(e,s={})=>{return us.get(e,()=>V(H,{endpointParams:e,logger:s.logger}))};O.aws=N;var oe=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??ae,base64Encoder:e?.base64Encoder??re,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??J,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new de.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ne.NoAuthSigner}],logger:e?.logger??new ee,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??f,utf8Decoder:e?.utf8Decoder??se,utf8Encoder:e?.utf8Encoder??te}};var ze=(e)=>{we(process.version);let s=qe(e),t=()=>s().then(ue),r=oe(e);Se.emitWarningIfUnsupportedVersion(process.version);let a={profile:e?.profile};return{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ee,defaultUserAgentProvider:e?.defaultUserAgentProvider??ve({serviceId:r.serviceId,clientVersion:L.version}),maxAttempts:e?.maxAttempts??l(me,e),region:e?.region??l(le,{...pe,...a}),requestHandler:be.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...he,default:async()=>(await t()).retryMode||ye},e),sha256:e?.sha256??Re.bind(null,"sha256"),streamCollector:e?.streamCollector??xe,useDualstackEndpoint:e?.useDualstackEndpoint??l(ce,a),useFipsEndpoint:e?.useFipsEndpoint??l(ie,a),userAgentAppId:e?.userAgentAppId??l(ke,a)}};var De=(e)=>{let{httpAuthSchemes:s,httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){let d=s.findIndex((z)=>z.schemeId===a.schemeId);if(d===-1)s.push(a);else s.splice(d,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Be=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var _e=(e,s)=>{let t=Object.assign(Ie(e),$e(e),Fe(e),De(e));return s.forEach((r)=>r.configure(t)),Object.assign(e,Pe(t),Je(t),Ue(t),Be(t))};class He extends je{config;constructor(...[e]){let s=ze(e||{});super(s);this.initConfig=s;let t=P(s),r=Ke(t),a=Ce(r),d=Xe(a),z=Le(d),cs=Ze(z),is=I(cs),ls=_e(is,e?.extensions||[]);this.config=ls,this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$,identityProviderConfigProvider:async(ps)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":ps.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var ns=c(Us(),1);class o extends Ge{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class k extends o{name="InvalidRequestException";$fault="client";constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});Object.setPrototypeOf(this,k.prototype)}}class R extends o{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,R.prototype)}}class E extends o{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});Object.setPrototypeOf(this,E.prototype)}}class q extends o{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});Object.setPrototypeOf(this,q.prototype)}}var Oe=(e)=>({...e,...e.accessToken&&{accessToken:v}}),ws=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:v},...e.sessionToken&&{sessionToken:v}}),Ve=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ws(e.roleCredentials)}});var m=c(x(),1),ss=c(D(),1);var ts=async(e,s)=>{let t=ss.requestBuilder(e,s),r=i({},fe,{[Fs]:e[Ss]});t.bp("/federation/credentials");let a=i({[Bs]:[,S(e[Ds],"roleName")],[zs]:[,S(e[qs],"accountId")]}),d;return t.m("GET").h(r).q(a).b(d),t.build()};var as=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return bs(e,s);let t=i({$metadata:w(e)}),r=S(Ne(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:es});return Object.assign(t,a),t};var bs=async(e,s)=>{let t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await vs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await ks(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Rs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Es(t,s);default:let a=t.body;return xs({output:e,parsedBody:a,errorCode:r})}},xs=ge(o),vs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new k({$metadata:w(e),...t});return u(d,e.body)},ks=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new R({$metadata:w(e),...t});return u(d,e.body)},Rs=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new E({$metadata:w(e),...t});return u(d,e.body)},Es=async(e,s)=>{let t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);let d=new q({$metadata:w(e),...t});return u(d,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var qs="accountId",Ss="accessToken",zs="account_id";var Ds="roleName",Bs="role_name",Fs="x-amz-sso_bearer_token";class os extends ds.classBuilder().ep(_).m(function(e,s,t,r){return[ns.getSerdePlugin(t,this.serialize,this.deserialize),rs(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Oe,Ve).ser(ts).de(as).build(){}export{He as SSOClient,os as GetRoleCredentialsCommand};