MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / createGitTokenServiceRepo

Function createGitTokenServiceRepo

dev/local/env-sync/plan.test.ts:68–91  ·  view source on GitHub ↗
(options: {
  envLocal?: string;
  devSecretBinding?: string;
  rootSecretBinding?: string;
})

Source from the content-addressed store, hash-verified

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
72function 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 });

Callers 1

plan.test.tsFile · 0.85

Calls 1

createRepoFunction · 0.70

Tested by

no test coverage detected