instant-cli 0.22.115-experimental.drewh-clief.21418205975.1 → 0.22.116-experimental.cli-info.21419152873.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 +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- 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 +5 -14
- package/src/index.js +26 -2
- package/src/ui/index.ts +1 -1
- package/src/util/getAuthPaths.ts +0 -1
- package/tsconfig.json +2 -7
- package/dist/new/commands/init.d.ts +0 -9
- package/dist/new/commands/init.d.ts.map +0 -1
- package/dist/new/commands/init.js +0 -9
- package/dist/new/commands/init.js.map +0 -1
- package/dist/new/commands/initWithoutFiles.d.ts +0 -10
- package/dist/new/commands/initWithoutFiles.d.ts.map +0 -1
- package/dist/new/commands/initWithoutFiles.js +0 -36
- package/dist/new/commands/initWithoutFiles.js.map +0 -1
- package/dist/new/commands/login.d.ts +0 -9
- package/dist/new/commands/login.d.ts.map +0 -1
- package/dist/new/commands/login.js +0 -51
- package/dist/new/commands/login.js.map +0 -1
- package/dist/new/commands/logout.d.ts +0 -4
- package/dist/new/commands/logout.d.ts.map +0 -1
- package/dist/new/commands/logout.js +0 -22
- package/dist/new/commands/logout.js.map +0 -1
- package/dist/new/context/authToken.d.ts +0 -19
- package/dist/new/context/authToken.d.ts.map +0 -1
- package/dist/new/context/authToken.js +0 -51
- package/dist/new/context/authToken.js.map +0 -1
- package/dist/new/context/currentApp.d.ts +0 -36
- package/dist/new/context/currentApp.d.ts.map +0 -1
- package/dist/new/context/currentApp.js +0 -145
- package/dist/new/context/currentApp.js.map +0 -1
- package/dist/new/context/globalOpts.d.ts +0 -11
- package/dist/new/context/globalOpts.d.ts.map +0 -1
- package/dist/new/context/globalOpts.js +0 -10
- package/dist/new/context/globalOpts.js.map +0 -1
- package/dist/new/context/platformApi.d.ts +0 -19
- package/dist/new/context/platformApi.d.ts.map +0 -1
- package/dist/new/context/platformApi.js +0 -24
- package/dist/new/context/platformApi.js.map +0 -1
- package/dist/new/context/projectInfo.d.ts +0 -25
- package/dist/new/context/projectInfo.d.ts.map +0 -1
- package/dist/new/context/projectInfo.js +0 -120
- package/dist/new/context/projectInfo.js.map +0 -1
- package/dist/new/errors.d.ts +0 -10
- package/dist/new/errors.d.ts.map +0 -1
- package/dist/new/errors.js +0 -6
- package/dist/new/errors.js.map +0 -1
- package/dist/new/index.d.ts +0 -17
- package/dist/new/index.d.ts.map +0 -1
- package/dist/new/index.js +0 -159
- package/dist/new/index.js.map +0 -1
- package/dist/new/layer.d.ts +0 -15
- package/dist/new/layer.d.ts.map +0 -1
- package/dist/new/layer.js +0 -41
- package/dist/new/layer.js.map +0 -1
- package/dist/new/lib/createApp.d.ts +0 -4
- package/dist/new/lib/createApp.d.ts.map +0 -1
- package/dist/new/lib/createApp.js +0 -13
- package/dist/new/lib/createApp.js.map +0 -1
- package/dist/new/lib/handleEnv.d.ts +0 -7
- package/dist/new/lib/handleEnv.d.ts.map +0 -1
- package/dist/new/lib/handleEnv.js +0 -88
- package/dist/new/lib/handleEnv.js.map +0 -1
- package/dist/new/lib/http.d.ts +0 -15
- package/dist/new/lib/http.d.ts.map +0 -1
- package/dist/new/lib/http.js +0 -32
- package/dist/new/lib/http.js.map +0 -1
- package/dist/new/lib/login.d.ts +0 -13
- package/dist/new/lib/login.d.ts.map +0 -1
- package/dist/new/lib/login.js +0 -36
- package/dist/new/lib/login.js.map +0 -1
- package/dist/new/lib/ui.d.ts +0 -16
- package/dist/new/lib/ui.d.ts.map +0 -1
- package/dist/new/lib/ui.js +0 -30
- package/dist/new/lib/ui.js.map +0 -1
- package/dist/new/logging.d.ts +0 -3
- package/dist/new/logging.d.ts.map +0 -1
- package/dist/new/logging.js +0 -8
- package/dist/new/logging.js.map +0 -1
- package/src/new/commands/init.ts +0 -12
- package/src/new/commands/initWithoutFiles.ts +0 -44
- package/src/new/commands/login.ts +0 -73
- package/src/new/commands/logout.ts +0 -23
- package/src/new/context/authToken.ts +0 -77
- package/src/new/context/currentApp.ts +0 -207
- package/src/new/context/globalOpts.ts +0 -22
- package/src/new/context/platformApi.ts +0 -35
- package/src/new/context/projectInfo.ts +0 -172
- package/src/new/errors.ts +0 -7
- package/src/new/index.ts +0 -245
- package/src/new/layer.ts +0 -78
- package/src/new/lib/createApp.ts +0 -18
- package/src/new/lib/handleEnv.ts +0 -107
- package/src/new/lib/http.ts +0 -63
- package/src/new/lib/login.ts +0 -50
- package/src/new/lib/ui.ts +0 -45
- package/src/new/logging.ts +0 -9
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> instant-cli@0.22.
|
|
2
|
+
> instant-cli@0.22.116-experimental.cli-info.21419152873.1 build /home/runner/work/instant/instant/client/packages/cli
|
|
3
3
|
> rm -rf dist; tsc -p tsconfig.json
|
|
4
4
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export function createApp(title: any, orgId: any): Promise<{
|
|
2
|
-
appId: `${string}-${string}-${string}-${string}-${string}`;
|
|
3
|
-
adminToken: `${string}-${string}-${string}-${string}-${string}`;
|
|
4
|
-
}>;
|
|
5
1
|
export function readConfigAuthTokenWithErrorLogging(): Promise<string | null>;
|
|
6
2
|
export const rels: {
|
|
7
3
|
'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":"AAuhEA,8EAQC;AA+ED;;;;;EAKE"}
|
package/dist/index.js
CHANGED
|
@@ -254,6 +254,30 @@ program
|
|
|
254
254
|
.action(async () => {
|
|
255
255
|
await logout();
|
|
256
256
|
});
|
|
257
|
+
program
|
|
258
|
+
.command('info')
|
|
259
|
+
.description('Display CLI version and login status')
|
|
260
|
+
.action(async () => {
|
|
261
|
+
console.log(`CLI Version: ${version}`);
|
|
262
|
+
const token = await readConfigAuthToken();
|
|
263
|
+
if (!token) {
|
|
264
|
+
console.log('Not logged in.');
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
const meRes = await fetchJson({
|
|
268
|
+
method: 'GET',
|
|
269
|
+
path: '/dash/me',
|
|
270
|
+
debugName: 'Get user info',
|
|
271
|
+
errorMessage: 'Failed to get user info.',
|
|
272
|
+
command: 'info',
|
|
273
|
+
});
|
|
274
|
+
if (meRes.ok) {
|
|
275
|
+
console.log(`Logged in as: ${meRes.data.user.email}`);
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
console.log('Not logged in.');
|
|
279
|
+
}
|
|
280
|
+
});
|
|
257
281
|
program
|
|
258
282
|
.command('init')
|
|
259
283
|
.description('Set up a new project.')
|
|
@@ -261,7 +285,7 @@ program
|
|
|
261
285
|
.option('-p --package <react|react-native|core|admin>', 'Which package to automatically install if there is not one installed already.')
|
|
262
286
|
.option('--title <title>', 'Title for the created app')
|
|
263
287
|
.action(handleInit);
|
|
264
|
-
|
|
288
|
+
program
|
|
265
289
|
.command('init-without-files')
|
|
266
290
|
.description('Generate a new app id and admin token pair without any files.')
|
|
267
291
|
.option('--title <title>', 'Title for the created app.')
|
|
@@ -794,7 +818,7 @@ async function promptImportAppOrCreateApp() {
|
|
|
794
818
|
source: result.approach === 'import' ? 'imported' : 'created',
|
|
795
819
|
};
|
|
796
820
|
}
|
|
797
|
-
|
|
821
|
+
async function createApp(title, orgId) {
|
|
798
822
|
const id = randomUUID();
|
|
799
823
|
const token = randomUUID();
|
|
800
824
|
const app = { id, title, admin_token: token, org_id: orgId };
|