-
Notifications
You must be signed in to change notification settings - Fork 850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin cli #321
Conversation
packages/cli/src/admin-sdk.ts
Outdated
const { content: _, ...schema } = everything; | ||
const modelName = kebabCase(model.name); | ||
fse.emptyDirSync(`./${directory}/${modelName}`); | ||
fse.outputFileSync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like to use a package fs-extra-promise
which lets you use async/await for much better perf and parallelization
await fse.emptyDirAsync(`./${directory}/${modelName}`);
etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can make a big difference when doing things like this that are in a loop/forEach so you don't block the thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just note at times you'll need to use Promise.all too, e.g. above
// from
spaces.modes.forEach(...)
// to
await Promise.all(spaces.models.map(async ...))
); | ||
|
||
// todo change this to prod | ||
const root = 'https://qa.builder.io'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make this configurable via a flag that gets passed in so when we want to test new features we can deploy to qa and test it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is possible in current configuration, the client is getting generated at build time using that specific endpoint, the plan is to eventually move all admin-sdk code from here to it's own package, where this could be possible
); | ||
|
||
// todo change this to prod | ||
const root = 'https://qa.builder.io'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const root = 'https://qa.builder.io'; | |
const root = process.env.ROOT_URL || 'https://qa.builder.io'; |
This way the root URL can be specified at any time at run/build time, and fallback to QA if it's not present.
Like if we do (example):
env ROOT_URL='https://production.builder.io' npm publish
in a Github action, published artifacts will always point to "production", regardless of what we use during development when running npm run whatevs
. That also allows devs to run one-off commands against any environment, without having to change any code.
To make managing env vars easier during development, for example we could use direnv
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as here #321 (comment)
packages/cli/src/admin-sdk.ts
Outdated
import { createHash } from 'crypto'; | ||
import traverse from 'traverse'; | ||
|
||
const multibar = new cliProgress.MultiBar( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about making these module level symbols like UPPER_CASE
? This can help a lot when reading code, like it's easier to see what are local vars/arguments and what is global (which should be used with care).
const multibar = new cliProgress.MultiBar( | |
const MULTIBAR = new cliProgress.MultiBar( |
packages/cli/src/admin-sdk.ts
Outdated
const graphqlClient = createClient({ | ||
fetcher: ({ query, variables }, fetch, qs) => | ||
fetch(`${root}/api/v2/admin?${qs.stringify({ query, variables })}`, { | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${privateKey}`, | ||
}, | ||
}).then(r => r.json()), | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe refactor this into it's own thing? So this could end up being just:
const graphqlClient = createClient({ | |
fetcher: ({ query, variables }, fetch, qs) => | |
fetch(`${root}/api/v2/admin?${qs.stringify({ query, variables })}`, { | |
headers: { | |
'Content-Type': 'application/json', | |
Authorization: `Bearer ${privateKey}`, | |
}, | |
}).then(r => r.json()), | |
}); | |
const graphqlClient = createBuilderGraphQLClient(privateKey); |
} catch (e) { | ||
console.log(`\r\n\r\n`); | ||
console.error(chalk.red('Error importing space')); | ||
console.error(e); | ||
process.exit(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the only thing we do here is report out the error, I suggest to not use a try-catch here, and have the caller report the problem. The caller could (optionally) pass in the progress bar / multibar instances, allowing the inner function to still report progress.
function importSpace(privateKey: string, directory: string, logger?, progressBar?) { ... }
// CLI
// ...
.action(options => {
try {
importSpace(options.key, options.output, loggerInstance, progressBarInstance);
} catch (err) {
console.error(`\r\n\r\n`, chalk.red('Error importing space', err));
process.exit(1);
}
});
This simplifies the actual worker functions a lot, by them not having to worry too much about error handling and user reporting, that's the responsibility of the CLI layer.
await fetch(writeApi, { | ||
method: 'POST', | ||
body: JSON.stringify(contentJSON), | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${newSpacePrivateKey.key}`, | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this is being used only once at the moment I would suggest to also abstract away this into a function (taking just the key and JSON body as params), so future code would just use that function, instead of copy and pasting this block.
Also keep in mind that fetch
doesn't throw on non-OK HTTP statuses, we would have to check the response's statusCode
and throw
accordingly to signal errors during writes to this API.
Co-authored-by: Korey Kassir <korey@builder.io>
* 'admin-cli' of github.com:BuilderIO/builder: Update packages/cli/README.md
Merging to get a |
* [FIX] typo in catchallBuilderPage class (BuilderIO#315) * Feature/better dynamic dropdown (BuilderIO#313) * better dynamic dropdown * remove rollup * bump major version * release gatsby patch * app plugin examples (BuilderIO#316) * app plugin examples * prettier * Update README.md * Update README.md * Update README.md * app context types * plugins * @builder.io utils and tests * cleanup * nextjs - example : cleanup warnings for deprecated prefetch param, use param prop to fetch slug (BuilderIO#317) * utils tests and publish * Fix build on plugins/shopify (BuilderIO#319) * Update ShopifyProductPicker.tsx * prettier * full prettier * fix build * set moduleresolution to resolve json * util resolve json * untrack compiled files * eof * fix utils tests * Add preview field types and handles for products and collections (BuilderIO#320) * release shopify plugin on dev * Add admin cli [dev] (BuilderIO#321) * first pass * second pass with progress bar, working * point to qa endpoint * remove auto gen from git, add readme, commands * pprettier * prettier didnt catch this * feedback: promisify access * prettier * Update packages/cli/README.md Co-authored-by: Korey Kassir <korey@builder.io> * feedback * feedback2 Co-authored-by: Korey Kassir <korey@builder.io> * release admin cli dev version * use post on admin graphql client (BuilderIO#322) * use post on admin graphql client * use the right key * pass content options up to parent when requesting updated content, to address the case of incluldeRefs (BuilderIO#323) * fix a/b tests on data model in static mode (BuilderIO#326) * update input type * Update README.md * dead code cleanup (BuilderIO#330) * dead code cleanup * more cleanup * BuilderComponent -> RenderContent (BuilderIO#332) * utils: fix build and add a method to target specific props and extend (BuilderIO#329) * fix buid and add a method to target specific props and extend * fix readme * fix rebuiltds * eof * Update packages/utils/README.md Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> * Update packages/utils/README.md Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> * rewording * Update README.md * Update packages/utils/README.md Co-authored-by: Korey Kassir <korey@builder.io> Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> Co-authored-by: Korey Kassir <korey@builder.io> * Allow the usage of targeting attributes in the url (BuilderIO#331) * Allow the usage of targeting attributes in the url * ensure the behaviour always works with a test * rename dynamic dropdown to diverge from older non-compatible versions (BuilderIO#334) * rename dynamic dropdown to diverge from older non-compatible versions * keep the name of editor * releases * React SDK spelling and grammar corrections (BuilderIO#337) * bump react package dev version * Builder.registerComponent -> Builder.registerBLock (BuilderIO#335) * Builder.registerComponent -> Builder.registerBLock * prettier * Fix symbols in symbols (BuilderIO#338) * fix symbols in symbols * dev bumps * version bumps * Update README.md * Update README.md * fix utils package missing index after publish (BuilderIO#340) * noWebp option for images - to fix svg issues (BuilderIO#341) * svg fix (BuilderIO#342) * formatting (BuilderIO#343) * Update README.md * fix cli command (BuilderIO#346) * widget async updates (BuilderIO#347) * prettier * Bump axios from 0.19.0 to 0.21.1 in /packages/shopify (BuilderIO#325) Bumps [axios](https://github.com/axios/axios) from 0.19.0 to 0.21.1. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md) - [Commits](axios/axios@v0.19.0...v0.21.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/amp (BuilderIO#307) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/email (BuilderIO#306) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/webcomponents (BuilderIO#304) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/react (BuilderIO#305) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/widgets (BuilderIO#303) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump immer from 3.3.0 to 8.0.1 in /packages/react-native/examples/expo (BuilderIO#333) Bumps [immer](https://github.com/immerjs/immer) from 3.3.0 to 8.0.1. - [Release notes](https://github.com/immerjs/immer/releases) - [Commits](immerjs/immer@v3.3.0...v8.0.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update README.md (BuilderIO#349) Fix typo in README * updated Builder site example (BuilderIO#348) * updated Builder site example * update readmes * fixes * publish core, react, widgets * Update React@17.0.1 (BuilderIO#324) React recently upgrade to the latest [17.0.1](https://github.com/facebook/react/blob/master/CHANGELOG.md#1701-october-22-2020), despite the major version, this seems to be a safe upgrade since it doesn't introduce any difficult breaking changes. Thanks @antonhalim! * Codegen support (alpha) (BuilderIO#351) * codegen * updates * updates * bumps * updates * updates * prettier * add back the null fallbacks - not sure how got lost * extend the shopify plugin to import collections, products and registe… (BuilderIO#350) * extend the shopify plugin to import collections, products and register webhooks to syn with builder * remove unused code * point to builder api * Update plugins/shopify/src/actions/import-product-data.ts Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> * Update README.md * fix empty key binding * pr update * ignore content prop when editing or previewing (BuilderIO#354) * plugin-shopify: release dev and fix error when editing model is not yet loaded (BuilderIO#352) * Update README.md * always fall back to native browser lazy loading (BuilderIO#355) * Update README.md * full fix for content prop (BuilderIO#356) * Latest site updates (BuilderIO#357) * latest site updates * update * comment * Super duper final preview/edit fixes (BuilderIO#358) * more preview and edit fixes * fix previewing * slight optimization * final version bump for final testing * use latest builder versions in example repo so all works as expected * simple vue SDK and Nuxt example (BuilderIO#359) * vue SDK and Nuxt example * vue in readme * fix readme typo * Update README.md (BuilderIO#360) typoes * vue fixes (BuilderIO#361) * Update README.md * print api key after successful space creation- (BuilderIO#364) * include spaces site url in editing url template (BuilderIO#362) * include spaces site url in editing url template * fix loading indicators out of place * release dev * feedbac * release dev * don't refetch vue content (BuilderIO#363) * release minor (BuilderIO#365) * Vue and Nuxt improvements (BuilderIO#366) * client side routing for Vue and Nuxt updates for 404 handling * fix 404 handling * Update README.md * Update README.md * Update README.md * publish cli * release vue package * Prevent propagation from the root content component (BuilderIO#368) * release:patch core and react * fix inline symbols and bump react version * New year, new logo * Update README.md Co-authored-by: Kevin Barns <k.barnoin@gmail.com> Co-authored-by: Korey Kassir <korey@builder.io> Co-authored-by: Aziz Abbas <aziz@builder.io> Co-authored-by: Steve Sewell <steve@builder.io> Co-authored-by: Saurabh Bhatia <saurabh.a.bhatia@gmail.com> Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> Co-authored-by: Tony Tamplin <github@tony.dev> Co-authored-by: Jay Phelps <hello@jayphelps.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mosaab Abbas <musaababs@gmail.com> Co-authored-by: Anton Halim <github@antonhalim.com> Co-authored-by: bdlocks <bdlocksk@gmail.com>
* merge master (#3) * [FIX] typo in catchallBuilderPage class (#315) * Feature/better dynamic dropdown (#313) * better dynamic dropdown * remove rollup * bump major version * release gatsby patch * app plugin examples (#316) * app plugin examples * prettier * Update README.md * Update README.md * Update README.md * app context types * plugins * @builder.io utils and tests * cleanup * nextjs - example : cleanup warnings for deprecated prefetch param, use param prop to fetch slug (#317) * utils tests and publish * Fix build on plugins/shopify (#319) * Update ShopifyProductPicker.tsx * prettier * full prettier * fix build * set moduleresolution to resolve json * util resolve json * untrack compiled files * eof * fix utils tests * Add preview field types and handles for products and collections (#320) * release shopify plugin on dev * Add admin cli [dev] (#321) * first pass * second pass with progress bar, working * point to qa endpoint * remove auto gen from git, add readme, commands * pprettier * prettier didnt catch this * feedback: promisify access * prettier * Update packages/cli/README.md Co-authored-by: Korey Kassir <korey@builder.io> * feedback * feedback2 Co-authored-by: Korey Kassir <korey@builder.io> * release admin cli dev version * use post on admin graphql client (#322) * use post on admin graphql client * use the right key * pass content options up to parent when requesting updated content, to address the case of incluldeRefs (#323) * fix a/b tests on data model in static mode (#326) * update input type * Update README.md * dead code cleanup (#330) * dead code cleanup * more cleanup * BuilderComponent -> RenderContent (#332) * utils: fix build and add a method to target specific props and extend (#329) * fix buid and add a method to target specific props and extend * fix readme * fix rebuiltds * eof * Update packages/utils/README.md Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> * Update packages/utils/README.md Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> * rewording * Update README.md * Update packages/utils/README.md Co-authored-by: Korey Kassir <korey@builder.io> Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> Co-authored-by: Korey Kassir <korey@builder.io> * Allow the usage of targeting attributes in the url (#331) * Allow the usage of targeting attributes in the url * ensure the behaviour always works with a test * rename dynamic dropdown to diverge from older non-compatible versions (#334) * rename dynamic dropdown to diverge from older non-compatible versions * keep the name of editor * releases * React SDK spelling and grammar corrections (#337) * bump react package dev version * Builder.registerComponent -> Builder.registerBLock (#335) * Builder.registerComponent -> Builder.registerBLock * prettier * Fix symbols in symbols (#338) * fix symbols in symbols * dev bumps * version bumps * Update README.md * Update README.md * fix utils package missing index after publish (#340) * noWebp option for images - to fix svg issues (#341) * svg fix (#342) * formatting (#343) * Update README.md * fix cli command (#346) * widget async updates (#347) * prettier * Bump axios from 0.19.0 to 0.21.1 in /packages/shopify (#325) Bumps [axios](https://github.com/axios/axios) from 0.19.0 to 0.21.1. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md) - [Commits](axios/axios@v0.19.0...v0.21.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/amp (#307) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/email (#306) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/webcomponents (#304) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/react (#305) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump semantic-release from 15.13.31 to 17.2.3 in /packages/widgets (#303) Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3. - [Release notes](https://github.com/semantic-release/semantic-release/releases) - [Commits](semantic-release/semantic-release@v15.13.31...v17.2.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump immer from 3.3.0 to 8.0.1 in /packages/react-native/examples/expo (#333) Bumps [immer](https://github.com/immerjs/immer) from 3.3.0 to 8.0.1. - [Release notes](https://github.com/immerjs/immer/releases) - [Commits](immerjs/immer@v3.3.0...v8.0.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update README.md (#349) Fix typo in README * updated Builder site example (#348) * updated Builder site example * update readmes * fixes * publish core, react, widgets * Update React@17.0.1 (#324) React recently upgrade to the latest [17.0.1](https://github.com/facebook/react/blob/master/CHANGELOG.md#1701-october-22-2020), despite the major version, this seems to be a safe upgrade since it doesn't introduce any difficult breaking changes. Thanks @antonhalim! * Codegen support (alpha) (#351) * codegen * updates * updates * bumps * updates * updates * prettier * add back the null fallbacks - not sure how got lost * extend the shopify plugin to import collections, products and registe… (#350) * extend the shopify plugin to import collections, products and register webhooks to syn with builder * remove unused code * point to builder api * Update plugins/shopify/src/actions/import-product-data.ts Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> * Update README.md * fix empty key binding * pr update * ignore content prop when editing or previewing (#354) * plugin-shopify: release dev and fix error when editing model is not yet loaded (#352) * Update README.md * always fall back to native browser lazy loading (#355) * Update README.md * full fix for content prop (#356) * Latest site updates (#357) * latest site updates * update * comment * Super duper final preview/edit fixes (#358) * more preview and edit fixes * fix previewing * slight optimization * final version bump for final testing * use latest builder versions in example repo so all works as expected * simple vue SDK and Nuxt example (#359) * vue SDK and Nuxt example * vue in readme * fix readme typo * Update README.md (#360) typoes * vue fixes (#361) * Update README.md * print api key after successful space creation- (#364) * include spaces site url in editing url template (#362) * include spaces site url in editing url template * fix loading indicators out of place * release dev * feedbac * release dev * don't refetch vue content (#363) * release minor (#365) * Vue and Nuxt improvements (#366) * client side routing for Vue and Nuxt updates for 404 handling * fix 404 handling * Update README.md * Update README.md * Update README.md * publish cli * release vue package * Prevent propagation from the root content component (#368) * release:patch core and react * fix inline symbols and bump react version * New year, new logo * Update README.md Co-authored-by: Kevin Barns <k.barnoin@gmail.com> Co-authored-by: Korey Kassir <korey@builder.io> Co-authored-by: Aziz Abbas <aziz@builder.io> Co-authored-by: Steve Sewell <steve@builder.io> Co-authored-by: Saurabh Bhatia <saurabh.a.bhatia@gmail.com> Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> Co-authored-by: Tony Tamplin <github@tony.dev> Co-authored-by: Jay Phelps <hello@jayphelps.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mosaab Abbas <musaababs@gmail.com> Co-authored-by: Anton Halim <github@antonhalim.com> Co-authored-by: bdlocks <bdlocksk@gmail.com> * async map to context * formatting Co-authored-by: Kevin Barns <k.barnoin@gmail.com> Co-authored-by: Korey Kassir <korey@builder.io> Co-authored-by: Aziz Abbas <aziz@builder.io> Co-authored-by: Steve Sewell <steve@builder.io> Co-authored-by: Saurabh Bhatia <saurabh.a.bhatia@gmail.com> Co-authored-by: Armando Pérez Marqués <gmandx@gmail.com> Co-authored-by: Tony Tamplin <github@tony.dev> Co-authored-by: Jay Phelps <hello@jayphelps.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mosaab Abbas <musaababs@gmail.com> Co-authored-by: Anton Halim <github@antonhalim.com> Co-authored-by: bdlocks <bdlocksk@gmail.com>
Usage
Commands
builder import
builder new
builder import -k [PRIVATE KEY] -o [OUTPUT DIRECTORY]
Import your space to the local filesystem.
builder new -k [PRIVATE KEY] -i [INPUT DIRECTORY] -n [NEW SPACE NAME]
Create a new space from the your local builder directory, as a space under the root organization you specify.