MCPcopy Create free account
hub / github.com/serverless/serverless / createRcDefaultGlobalConfig

Function createRcDefaultGlobalConfig

packages/util/src/rc/index.js:179–199  ·  view source on GitHub ↗
(baseFilename)

Source from the content-addressed store, hash-verified

177 * @returns
178 */
179const createRcDefaultGlobalConfig = async (baseFilename) => {
180 const defaultConfig = {
181 userId: null, // currentUserId
182 frameworkId: randomUUID(),
183 trackingDisabled: false,
184 enterpriseDisabled: false,
185 meta: {
186 created_at: Math.round(Date.now() / 1000), // config file creation date
187 updated_at: null, // config file updated date
188 },
189 users: {},
190 accessKeys: {
191 orgs: {},
192 defaultOrgName: null,
193 },
194 // Per-notification display tracking (e.g., throttling)
195 notifications: {},
196 }
197 await saveRcFile(defaultConfig, getRcDefaultPath(baseFilename))
198 return defaultConfig
199}
200
201export {
202 getRcConfig,

Callers 1

getRcGlobalConfigFunction · 0.85

Calls 2

saveRcFileFunction · 0.85
getRcDefaultPathFunction · 0.85

Tested by

no test coverage detected