create-sailor 1.9.5 → 1.10.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 (65) hide show
  1. package/README.md +10 -8
  2. package/bin/create-sailor.js +28 -0
  3. package/dist/index.js +137 -138
  4. package/package.json +23 -15
  5. package/templates/backends/gateway/package.json +1 -1
  6. package/templates/docs/docusaurus/package.json +1 -1
  7. package/templates/docs/fumadocs/package.json +1 -1
  8. package/templates/docs/mintlify/package.json +1 -1
  9. package/templates/docs/nextra/package.json +1 -1
  10. package/templates/docs/vitepress/package.json +1 -1
  11. package/templates/infra/ops/README.md +15 -0
  12. package/templates/infra/ops/platform-expected.example.json +45 -0
  13. package/templates/orm/drizzle/package.json +1 -1
  14. package/templates/tests/README.md +18 -0
  15. package/templates/tests/degradation.test.example.ts +469 -0
  16. package/dist/aws-kms-FFRN23DK.js +0 -1
  17. package/dist/bowser-2VXD6AQS.js +0 -11
  18. package/dist/chunk-5ECPN42W.js +0 -1
  19. package/dist/chunk-6MSNEPUX.js +0 -0
  20. package/dist/chunk-A3H5SUSR.js +0 -8
  21. package/dist/chunk-AN6QWW3N.js +0 -1
  22. package/dist/chunk-CVCZBECH.js +0 -1
  23. package/dist/chunk-GA44DNS2.js +0 -1
  24. package/dist/chunk-IYWUY3VA.js +0 -1
  25. package/dist/chunk-LDZWCNWB.js +0 -0
  26. package/dist/chunk-M3NEWJ7L.js +0 -1
  27. package/dist/chunk-MGGNSWUA.js +0 -3
  28. package/dist/chunk-MYIHTCRS.js +0 -4
  29. package/dist/chunk-PA4CKDRJ.js +0 -1
  30. package/dist/chunk-QSLKOXQ6.js +0 -1
  31. package/dist/chunk-S4HCBMFP.js +0 -1
  32. package/dist/chunk-SYWJHPRX.js +0 -0
  33. package/dist/chunk-TW5BOTVX.js +0 -0
  34. package/dist/chunk-UWHWNXNX.js +0 -19
  35. package/dist/chunk-WJLTO7JW.js +0 -0
  36. package/dist/chunk-X6LE6K3W.js +0 -0
  37. package/dist/chunk-XE3I3HCZ.js +0 -40
  38. package/dist/chunk-Z4YWESTY.js +0 -2
  39. package/dist/chunk-ZIBRKYXP.js +0 -23
  40. package/dist/chunk-ZJ3BTCD6.js +0 -17
  41. package/dist/credits-UUPQKRQZ.js +0 -2802
  42. package/dist/dist-23KDUT4O.js +0 -1
  43. package/dist/dist-ZZCU5PKC.js +0 -5
  44. package/dist/dist-es-7HF5URFJ.js +0 -1
  45. package/dist/dist-es-BORZTE76.js +0 -1
  46. package/dist/dist-es-CN2GMFBK.js +0 -1
  47. package/dist/dist-es-FQ6CEUEU.js +0 -1
  48. package/dist/dist-es-FSE4MSDA.js +0 -5
  49. package/dist/dist-es-H47VUS6Q.js +0 -2
  50. package/dist/dist-es-JCIK4C4M.js +0 -2
  51. package/dist/dist-es-MFZXYPBY.js +0 -1
  52. package/dist/dist-es-PREZ4TU2.js +0 -1
  53. package/dist/dist-es-TCZQ4KMP.js +0 -2
  54. package/dist/dist-es-Y7VP7FI6.js +0 -2
  55. package/dist/dist-es-YN4LRIZR.js +0 -5
  56. package/dist/event-streams-TNY7XPBF.js +0 -1
  57. package/dist/loadSso-2XZQIDZP.js +0 -1
  58. package/dist/loadSso-FBBI5PDJ.js +0 -1
  59. package/dist/local-6WWVOMA7.js +0 -1
  60. package/dist/query_compiler_fast_bg.postgresql-JA2BFVW5.js +0 -2
  61. package/dist/query_compiler_fast_bg.postgresql.wasm-base64-URHQ2Y3Y.js +0 -1
  62. package/dist/signin-CJMG23UU.js +0 -1
  63. package/dist/sso-oidc-26OCCRMC.js +0 -1
  64. package/dist/sts-4U2U3ZK4.js +0 -1
  65. package/dist/sts-CP4OREEC.js +0 -1
@@ -1 +0,0 @@
1
- import{a as A}from"./chunk-5ECPN42W.js";import{a as e}from"./chunk-XE3I3HCZ.js";import{a as v}from"./chunk-ZJ3BTCD6.js";import{a as l,b as u,c as f,d as y,e as m,f as g,g as S}from"./chunk-QSLKOXQ6.js";import{a as d}from"./chunk-ZIBRKYXP.js";import"./chunk-X6LE6K3W.js";import"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import"./chunk-A3H5SUSR.js";import"./chunk-Z4YWESTY.js";import"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var i=null;function _(){if(process.env.AWS_KMS_KEY_ID||process.env.AWS_KMS_KEY_ARN)return"aws-kms";if(process.env.VAULT_LOCAL_MASTER_KEY||process.env.VAULT_MASTER_KEY)return"local";throw new Error("No vault provider detected. Set AWS_KMS_KEY_ID/AWS_KMS_KEY_ARN (for AWS KMS) or VAULT_LOCAL_MASTER_KEY/VAULT_MASTER_KEY (for local). Or pass explicit config to createVault().")}async function p(n){let r=n?.provider??process.env.VAULT_PROVIDER??_();switch(d.info("[vault] Creating provider",{provider:r}),r){case"aws-kms":{let{AWSKMSProvider:o}=await import("./aws-kms-FFRN23DK.js"),t=n;return new o({provider:"aws-kms",...t?.keyId!==void 0?{keyId:t.keyId}:{},...t?.region!==void 0?{region:t.region}:{},...t?.credentials!==void 0?{credentials:t.credentials}:{},...t?.keyVersion!==void 0?{keyVersion:t.keyVersion}:{}})}case"local":{let{LocalProvider:o}=await import("./local-6WWVOMA7.js"),t=n;return new o({provider:"local",...t?.masterKey!==void 0?{masterKey:t.masterKey}:{},...t?.salt!==void 0?{salt:t.salt}:{},...t?.keyVersion!==void 0?{keyVersion:t.keyVersion}:{}})}default:throw new Error(`Unknown vault provider: ${r}`)}}async function s(){return i||(i=await p()),i}function k(n){i=n}async function V(){i&&(await i.close(),i=null)}async function x(n,r={}){let o=JSON.stringify(n);if(o===void 0)throw new Error("[vault] Cannot encrypt undefined \u2014 value must be JSON-serializable");let t=await s(),c=r.context?.tenantId,a=r.context?.kind;return t.encrypt(o,{...r.id!==void 0?{id:r.id}:{},...c!==void 0?{tenantId:c}:{},metadata:{name:a??"json",type:"credential"}})}async function E(n,r={}){let o=await s(),t=r.context?.tenantId,c=await o.decrypt(n,t!==void 0?{tenantId:t}:void 0);try{return JSON.parse(c)}catch(a){throw new Error(`[vault] decryptJSON: failed to parse decrypted payload as JSON: ${a instanceof Error?a.message:String(a)}`)}}function w(n){if(!n||typeof n!="object")return!1;let r=n;return typeof r.ciphertext=="string"&&typeof r.encryptedDek=="string"&&typeof r.iv=="string"&&typeof r.authTag=="string"&&typeof r.keyVersion=="number"&&r.algorithm==="aes-256-gcm"}var K=e.object({id:e.string(),ciphertext:e.string(),encryptedDek:e.string(),iv:e.string(),authTag:e.string(),dekIv:e.string().optional(),dekAuthTag:e.string().optional(),keyVersion:e.number().int().min(1),envelopeVersion:e.literal(2).optional(),algorithm:e.literal("aes-256-gcm"),tenantId:e.string().optional(),metadata:e.object({name:e.string(),type:e.enum(["api_key","oauth_token","credential","certificate","generic"]),expiresAt:e.string().datetime().optional()}).optional(),createdAt:e.string().datetime(),rotatedAt:e.string().datetime().optional()}),h=e.object({id:e.string(),name:e.string(),tenantId:e.string().optional(),type:e.enum(["api_key","oauth_token","credential","certificate","generic"]),createdAt:e.string().datetime(),rotatedAt:e.string().datetime().optional(),expiresAt:e.string().datetime().optional()});export{v as AWSKMSProvider,K as EncryptedSecretSchema,A as LocalProvider,h as SecretMetadataSchema,u as aesDecrypt,l as aesEncrypt,V as closeVault,p as createVault,E as decryptJSON,f as deriveKey,x as encryptJSON,S as fromBase64,m as generateIv,y as generateKey,s as getVault,w as isEncryptedSecret,k as setVault,g as toBase64};