MCPcopy
hub / github.com/microfeed/microfeed / run

Method run

ops/init_project.js:86–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84 }
85
86 run() {
87 console.log(`Init project ${this.v.get('CLOUDFLARE_PROJECT_NAME')} [${this.currentEnv}]...`);
88 this._getCurrentProject({}, (json) => {
89 console.log('got it!');
90 console.log(`${this.v.get('CLOUDFLARE_PROJECT_NAME')} exists.`);
91 console.log(json);
92 }, () => {
93 console.log('creating!')
94 console.log(`Creating project: ${this.v.get('CLOUDFLARE_PROJECT_NAME')}...`)
95 const data = JSON.stringify({
96 'subdomain': this.v.get('CLOUDFLARE_PROJECT_NAME'),
97 'production_branch': this.v.get('PRODUCTION_BRANCH', 'main'),
98 'name': this.v.get('CLOUDFLARE_PROJECT_NAME'),
99 });
100 this._createProject(data, () => {
101 console.log('Project created!')
102 });
103 });
104 }
105}
106
107const initProject = new InitProject();

Callers 3

init_project.jsFile · 0.80
_updateOrAddSettingMethod · 0.80
_putItemToContentMethod · 0.80

Calls 3

_getCurrentProjectMethod · 0.95
_createProjectMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected