instant-cli 0.22.110 → 0.22.111-experimental.drewh-clief.21301179372.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/new/commands/init.d.ts +9 -0
- package/dist/new/commands/init.d.ts.map +1 -0
- package/dist/new/commands/init.js +9 -0
- package/dist/new/commands/init.js.map +1 -0
- package/dist/new/commands/initWithoutFiles.d.ts +10 -0
- package/dist/new/commands/initWithoutFiles.d.ts.map +1 -0
- package/dist/new/commands/initWithoutFiles.js +36 -0
- package/dist/new/commands/initWithoutFiles.js.map +1 -0
- package/dist/new/commands/login.d.ts +9 -0
- package/dist/new/commands/login.d.ts.map +1 -0
- package/dist/new/commands/login.js +51 -0
- package/dist/new/commands/login.js.map +1 -0
- package/dist/new/commands/logout.d.ts +4 -0
- package/dist/new/commands/logout.d.ts.map +1 -0
- package/dist/new/commands/logout.js +22 -0
- package/dist/new/commands/logout.js.map +1 -0
- package/dist/new/context/authToken.d.ts +19 -0
- package/dist/new/context/authToken.d.ts.map +1 -0
- package/dist/new/context/authToken.js +51 -0
- package/dist/new/context/authToken.js.map +1 -0
- package/dist/new/context/currentApp.d.ts +36 -0
- package/dist/new/context/currentApp.d.ts.map +1 -0
- package/dist/new/context/currentApp.js +145 -0
- package/dist/new/context/currentApp.js.map +1 -0
- package/dist/new/context/globalOpts.d.ts +11 -0
- package/dist/new/context/globalOpts.d.ts.map +1 -0
- package/dist/new/context/globalOpts.js +10 -0
- package/dist/new/context/globalOpts.js.map +1 -0
- package/dist/new/context/platformApi.d.ts +19 -0
- package/dist/new/context/platformApi.d.ts.map +1 -0
- package/dist/new/context/platformApi.js +24 -0
- package/dist/new/context/platformApi.js.map +1 -0
- package/dist/new/context/projectInfo.d.ts +25 -0
- package/dist/new/context/projectInfo.d.ts.map +1 -0
- package/dist/new/context/projectInfo.js +120 -0
- package/dist/new/context/projectInfo.js.map +1 -0
- package/dist/new/errors.d.ts +10 -0
- package/dist/new/errors.d.ts.map +1 -0
- package/dist/new/errors.js +6 -0
- package/dist/new/errors.js.map +1 -0
- package/dist/new/index.d.ts +17 -0
- package/dist/new/index.d.ts.map +1 -0
- package/dist/new/index.js +159 -0
- package/dist/new/index.js.map +1 -0
- package/dist/new/layer.d.ts +15 -0
- package/dist/new/layer.d.ts.map +1 -0
- package/dist/new/layer.js +41 -0
- package/dist/new/layer.js.map +1 -0
- package/dist/new/lib/createApp.d.ts +4 -0
- package/dist/new/lib/createApp.d.ts.map +1 -0
- package/dist/new/lib/createApp.js +13 -0
- package/dist/new/lib/createApp.js.map +1 -0
- package/dist/new/lib/handleEnv.d.ts +7 -0
- package/dist/new/lib/handleEnv.d.ts.map +1 -0
- package/dist/new/lib/handleEnv.js +88 -0
- package/dist/new/lib/handleEnv.js.map +1 -0
- package/dist/new/lib/http.d.ts +15 -0
- package/dist/new/lib/http.d.ts.map +1 -0
- package/dist/new/lib/http.js +32 -0
- package/dist/new/lib/http.js.map +1 -0
- package/dist/new/lib/login.d.ts +13 -0
- package/dist/new/lib/login.d.ts.map +1 -0
- package/dist/new/lib/login.js +36 -0
- package/dist/new/lib/login.js.map +1 -0
- package/dist/new/lib/ui.d.ts +16 -0
- package/dist/new/lib/ui.d.ts.map +1 -0
- package/dist/new/lib/ui.js +30 -0
- package/dist/new/lib/ui.js.map +1 -0
- package/dist/new/logging.d.ts +3 -0
- package/dist/new/logging.d.ts.map +1 -0
- package/dist/new/logging.js +8 -0
- package/dist/new/logging.js.map +1 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js.map +1 -1
- package/dist/util/getAuthPaths.d.ts.map +1 -1
- package/dist/util/getAuthPaths.js.map +1 -1
- package/package.json +14 -5
- package/src/index.js +24 -2
- package/src/new/commands/init.ts +12 -0
- package/src/new/commands/initWithoutFiles.ts +44 -0
- package/src/new/commands/login.ts +73 -0
- package/src/new/commands/logout.ts +23 -0
- package/src/new/context/authToken.ts +77 -0
- package/src/new/context/currentApp.ts +207 -0
- package/src/new/context/globalOpts.ts +22 -0
- package/src/new/context/platformApi.ts +35 -0
- package/src/new/context/projectInfo.ts +172 -0
- package/src/new/errors.ts +7 -0
- package/src/new/index.ts +245 -0
- package/src/new/layer.ts +78 -0
- package/src/new/lib/createApp.ts +18 -0
- package/src/new/lib/handleEnv.ts +107 -0
- package/src/new/lib/http.ts +63 -0
- package/src/new/lib/login.ts +50 -0
- package/src/new/lib/ui.ts +45 -0
- package/src/new/logging.ts +9 -0
- package/src/ui/index.ts +1 -1
- package/src/util/getAuthPaths.ts +1 -0
- package/tsconfig.json +7 -2
package/.turbo/turbo-build.log
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export function createApp(title: any, orgId: any): Promise<{
|
|
2
|
+
appId: `${string}-${string}-${string}-${string}-${string}`;
|
|
3
|
+
adminToken: `${string}-${string}-${string}-${string}-${string}`;
|
|
4
|
+
}>;
|
|
1
5
|
export function readConfigAuthTokenWithErrorLogging(): Promise<string | null>;
|
|
2
6
|
export const rels: {
|
|
3
7
|
'many-false': string[];
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AA+hCA;;;GAcC;AAk9BD,8EAQC;AA+ED;;;;;EAKE"}
|
package/dist/index.js
CHANGED
|
@@ -261,7 +261,7 @@ program
|
|
|
261
261
|
.option('-p --package <react|react-native|core|admin>', 'Which package to automatically install if there is not one installed already.')
|
|
262
262
|
.option('--title <title>', 'Title for the created app')
|
|
263
263
|
.action(handleInit);
|
|
264
|
-
program
|
|
264
|
+
const initWithoutFilesDef = program
|
|
265
265
|
.command('init-without-files')
|
|
266
266
|
.description('Generate a new app id and admin token pair without any files.')
|
|
267
267
|
.option('--title <title>', 'Title for the created app.')
|
|
@@ -377,6 +377,19 @@ program
|
|
|
377
377
|
console.log(`Found ${chalk.green(envResult.appId.envName)}: ${appId}`);
|
|
378
378
|
await claimEphemeralApp(appId, adminToken);
|
|
379
379
|
});
|
|
380
|
+
program
|
|
381
|
+
.command('explorer')
|
|
382
|
+
.description('Opens the Explorer in your browser')
|
|
383
|
+
.option('-a --app <app-id>', 'App ID to push too. Defaults to *_INSTANT_APP_ID in .env')
|
|
384
|
+
.action(async function (opts) {
|
|
385
|
+
console.log('Opening Explorer...');
|
|
386
|
+
const pkgAndAuthInfo = await getOrPromptPackageAndAuthInfoWithErrorLogging({});
|
|
387
|
+
const { ok, appId } = await getOrCreateAppAndWriteToEnv(pkgAndAuthInfo, opts);
|
|
388
|
+
if (!ok) {
|
|
389
|
+
return process.exit(1);
|
|
390
|
+
}
|
|
391
|
+
openInBrowser(`${instantDashOrigin}/dash?s=main&app=${appId}&t=explorer`);
|
|
392
|
+
});
|
|
380
393
|
program.parse(process.argv);
|
|
381
394
|
async function handleInit(opts) {
|
|
382
395
|
const pkgAndAuthInfo = await getOrPromptPackageAndAuthInfoWithErrorLogging(opts);
|
|
@@ -781,7 +794,7 @@ async function promptImportAppOrCreateApp() {
|
|
|
781
794
|
source: result.approach === 'import' ? 'imported' : 'created',
|
|
782
795
|
};
|
|
783
796
|
}
|
|
784
|
-
async function createApp(title, orgId) {
|
|
797
|
+
export async function createApp(title, orgId) {
|
|
785
798
|
const id = randomUUID();
|
|
786
799
|
const token = randomUUID();
|
|
787
800
|
const app = { id, title, admin_token: token, org_id: orgId };
|