(options: {
envLocal?: string;
devSecretBinding?: string;
rootSecretBinding?: string;
})
| 66 | "binding": "SCM_SESSION_CAPABILITY_ENCRYPTION_KEY", |
| 67 | "store_id": "store-id", |
| 68 | // @dev-generate base64 32 |
| 69 | "secret_name": "SCM_SESSION_CAPABILITY_ENCRYPTION_KEY_DEV" |
| 70 | }`; |
| 71 | |
| 72 | function createGitTokenServiceRepo(options: { |
| 73 | envLocal?: string; |
| 74 | devSecretBinding?: string; |
| 75 | rootSecretBinding?: string; |
| 76 | }): TestRepo { |
| 77 | const rootSecrets = options.rootSecretBinding |
| 78 | ? `"secrets_store_secrets": [${options.rootSecretBinding}],` |
| 79 | : ''; |
| 80 | return createRepo({ |
| 81 | '.env.local': options.envLocal ?? '', |
| 82 | [`${gitTokenServiceDir}/package.json`]: JSON.stringify({ |
| 83 | scripts: { dev: 'wrangler dev --env dev' }, |
| 84 | }), |
| 85 | [`${gitTokenServiceDir}/.dev.vars.example`]: '', |
| 86 | [`${gitTokenServiceDir}/wrangler.jsonc`]: `{ |
| 87 | ${rootSecrets} |
| 88 | "env": { |
| 89 | "dev": { |
| 90 | "secrets_store_secrets": [${options.devSecretBinding ?? annotatedCapabilitySecretBinding}] |
| 91 | } |
| 92 | } |
| 93 | }`, |
| 94 | }); |
no test coverage detected